@remkoj/optimizely-cms-cli
Advanced tools
+7
-3
@@ -5,3 +5,3 @@ { | ||
| "type": "module", | ||
| "version": "6.0.0-pre4", | ||
| "version": "6.0.0-pre5", | ||
| "bin": { | ||
@@ -21,3 +21,3 @@ "opti-cms": "./dist/index.js" | ||
| "devDependencies": { | ||
| "@remkoj/optimizely-cms-api": "6.0.0-pre4", | ||
| "@remkoj/optimizely-cms-api": "6.0.0-pre5", | ||
| "@rollup/plugin-json": "^6.1.0", | ||
@@ -35,4 +35,7 @@ "@rollup/plugin-typescript": "^12.1.4", | ||
| "dependencies": { | ||
| "@fastify/deepmerge": "^3.1.0", | ||
| "@inquirer/prompts": "^7.6.0", | ||
| "@remkoj/optimizely-cms-api": "^6.0.0-pre4", | ||
| "@remkoj/optimizely-cms-api": "^6.0.0-pre5", | ||
| "ajv": "^8.17.1", | ||
| "ajv-formats": "^3.0.1", | ||
| "chalk": "^5.4.1", | ||
@@ -42,2 +45,3 @@ "cli-table3": "^0.6.5", | ||
| "dotenv-expand": "^12.0.2", | ||
| "fast-deep-equal": "^3.1.3", | ||
| "figures": "^6.1.0", | ||
@@ -44,0 +48,0 @@ "glob": "^11.0.3", |
+6
-12
@@ -12,3 +12,2 @@ # Optimizely CMS Command Line Toolkit <!-- omit in toc --> | ||
| - [3.1. Generate React Component Factory](#31-generate-react-component-factory) | ||
| - [3.2. Check build and CMS Versions](#32-check-build-and-cms-versions) | ||
@@ -51,7 +50,11 @@ | ||
| | --- | --- | | ||
| |`cms:version`| Fetch the version of the CMS from the endpoint. See [3.2. Check build and CMS Versions](#32-check-build-and-cms-versions) | | ||
| |`cms:version`| Fetch and display the version of the CMS from the endpoint, allowing validation of the connection with Optimizely CMS. | | ||
| |`cms:reset` | Reset the CMS instance by removing all Content, Content Types and Display Templates.<br/>***Note:*** This currently requires some manual steps, the CLI will provide the needed guidance on these manual steps. | | ||
| | `schema:vscode` | Updates the `.vscode` folder to include the JSON Schema for both Content Type defintions and Display Templates. This will also create or update the `settings.json` to enable code-completion and validation on `*.opti-style.json` and `*.opti-type.json` files, using these schema's. Rerun this command to ensure that the definitions remain in sync with the OpenAPI specification of the CMS API. | | ||
| | `schema:validate` | Downloads the OpenAPI Specification from the configured Optimizely CMS instance, extracts the appropriate types from it and uses those to validate all `*.opti-style.json` and `*.opti-type.json` files in the project. The output provides detailled error messages for each file that is not valid. | | ||
| | `style:create` | Create a new Style definition file *(and optionally create it immediately within the CMS as well)* using a CLI interface, that will guide you through the process of setting the required properties.<br/>***Visual Studio Code users:*** Running `yarn opti-cms schema:vscode` will enable VS-Code to provide validation and completion for the generated `*.opti-style.json` file. | | ||
| |`types:pull`| Read all existing content types from the Optimizely CMS and create their representation within the codebase. Use the parameters of this method to control which types will be pulled and to allow overwriting of existing files. | | ||
| |`types:push`| Create or overwrite the content type defintions from the codebase into Optimizely CMS, use the parameters of this method to control which types will be transferred and whether destructive changes are allowed. | | ||
| | `nextjs:factory` | Generate the component factories needed for suggested implementation pattern of Optimizely CMS in Next.JS. See [3.1. Generate React Component Factory](#31-generate-react-component-factory) | | ||
| | `nextjs:create` | An conveniance command, that will run the appropriate commands from the CLI in the right order to fully scaffold a frontend based upon the Content Types and Display Templates that already exist within the Optimizely CMS instance.<br/>It runs these commands: `types:pull`, `styles:pull`, `nextjs:fragments` `nextjs:components`, `nextjs:visualbuilder` and `nextjs:factory`. The command line arguments you provide to `nextjs:create` will be forwarded to each of these commands. | | ||
@@ -75,11 +78,2 @@ ### 3.1. Generate React Component Factory | ||
| | --all | -a | Include non-supported base types, non supported base types are skipped by default | | | ||
| | --force | -f | By default, this method is none-destructive. Set this parameter to overwrite existing files. | | | ||
| ### 3.2. Check build and CMS Versions | ||
| Connect to the Optimizely CMS Service to fetch service health and version information. | ||
| #### Usage & example<!-- omit in toc --> | ||
| Command: `cms:version` | ||
| ```Bash | ||
| yarn opti-cms cms:version | ||
| ``` | ||
| | --force | -f | By default, this method is none-destructive. Set this parameter to overwrite existing files. | | |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is too big to display
URL strings
Supply chain riskPackage contains fragments of external URLs or IP addresses, which the package may be accessing at runtime.
Found 1 instance in 1 package
234026
17.2%2278
19.71%15
36.36%76
-7.32%4
33.33%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added