@episerver/content-definitions

1.1.0 • Public • Published

Optimizely Content Delivery JavaScript SDK - Content Definitions

SDK and CLI for managing content definitions and modelling of data in an Optimizely application running the Content Definitions API.

Please visit Optimizely World for full documentation of the APIs.

Installing

Using npm:

$ npm install @episerver/content-definitions@latest --save-dev

using yarn:

$ yarn install @episerver/content-definitions@latest --save-dev

Examples

Help:

$ npx content-definitions --help
Usage: cli <command> [options]

Options:
  -V, --version          Output the version number
  -h, --help             Display help for command

Commands:
  push [options] <path>  Push a manifest with content definitions to a management application from the specified path.
  pull [options] [path]  Pull a manifest with content definitions from a management application to the specified path.
  help [command]         Display help for command

Push content definitions manifest:

$ npx content-definitions push manifest.json -s https://example.com --allowed-upgrades major --authority https://example.com --client-id xxx --client-secret xxx
Usage: cli push [options] <path>

Push a manifest with content definitions to a management application from the specified path.

Options:
  -s, --source <source>                     URL to the management application.
  --authority <authority>                   Login authority.
  --client-id <clientId>                    Login client ID.
  --client-secret <clientSecret>            Login client secret.
  --allowed-upgrades [allowedUpgrades]      Which semantic upgrades of definitions should be allowed. Allowed values are "none", "patch", "minor", and "major".  
  -f, --force [force]                       Should the push proceed even though there are warnings or the changes are not allowed.
  -h, --help                                Display help for command

Pull content definitions manifest:

$ npx content-definitions pull manifest.json -s https://example.com --authority https://example.com --client-id xxx --client-secret xxx

Note that path is optional, if left empty the manifest will be displayed in the output instead.

Usage: cli pull [options] [path]

Pull a manifest with content definitions from a management application to the specified path.

Options:
  -s, --source <source>           URL to the management application.
  --authority <authority>         Login authority.
  --client-id <clientId>          Login client ID.
  --client-secret <clientSecret>  Login client secret.
  -h, --help                      Display help for command

Package Sidebar

Install

npm i @episerver/content-definitions

Weekly Downloads

9

Version

1.1.0

License

Apache-2.0

Unpacked Size

27.6 kB

Total Files

14

Last publish

Collaborators

  • ryanbare
  • barteksekula
  • alwa
  • robinjac
  • johanpetersson