diff --git a/.talismanrc b/.talismanrc index 13bfde9e48..2430771d64 100644 --- a/.talismanrc +++ b/.talismanrc @@ -1,4 +1,4 @@ fileignoreconfig: - - filename: eslint.config.base.js - checksum: 42ffeeab54d02b41d9cc9253f380a5269603d4a9da3798d32bf5c815684ea466 + - filename: packages/contentstack/README.md + checksum: 1846c4aefe667bf30c352009ac7aa90f6f966af5a9dfc71c4b5a7c66cd444c9c version: '1.0' diff --git a/packages/contentstack-auth/package.json b/packages/contentstack-auth/package.json index 347e29aff3..8b2c69968e 100644 --- a/packages/contentstack-auth/package.json +++ b/packages/contentstack-auth/package.json @@ -18,7 +18,6 @@ "@contentstack/cli-command": "~1.8.1", "@contentstack/cli-utilities": "~1.18.3", "@oclif/core": "^4.10.5", - "@oclif/plugin-help": "^6.2.44", "otplib": "^12.0.1" }, "overrides": { @@ -27,11 +26,8 @@ } }, "devDependencies": { - "@fancy-test/nock": "^0.1.1", - "@oclif/plugin-help": "^6.2.28", "@oclif/test": "^4.1.13", "@types/chai": "^4.3.20", - "@types/mkdirp": "^1.0.2", "@types/mocha": "^8.2.3", "@types/node": "^14.18.63", "@types/sinon": "^21.0.0", @@ -41,6 +37,7 @@ "eslint-config-oclif": "^5.2.2", "eslint-config-oclif-typescript": "^3.1.14", "mocha": "10.8.2", + "nock": "^13.5.6", "nyc": "^15.1.0", "oclif": "^4.17.46", "sinon": "^21.0.1", diff --git a/packages/contentstack-command/package.json b/packages/contentstack-command/package.json index 4385bd49b2..101874a28b 100644 --- a/packages/contentstack-command/package.json +++ b/packages/contentstack-command/package.json @@ -16,8 +16,7 @@ "dependencies": { "@contentstack/cli-utilities": "~1.18.3", "contentstack": "^3.27.0", - "@oclif/core": "^4.10.5", - "@oclif/plugin-help": "^6.2.28" + "@oclif/core": "^4.10.5" }, "overrides": { "@oclif/core": { @@ -26,7 +25,6 @@ }, "devDependencies": { "@oclif/test": "^4.1.13", - "@types/mkdirp": "^1.0.2", "@types/mocha": "^8.2.3", "@types/node": "^14.18.63", "eslint": "^9.26.0", diff --git a/packages/contentstack-config/package.json b/packages/contentstack-config/package.json index 4a2f18944c..b2caf73c9d 100644 --- a/packages/contentstack-config/package.json +++ b/packages/contentstack-config/package.json @@ -17,9 +17,7 @@ "@contentstack/cli-command": "~1.8.1", "@contentstack/cli-utilities": "~1.18.3", "@contentstack/utils": "~1.9.1", - "@oclif/core": "^4.8.3", - "@oclif/plugin-help": "^6.2.28", - "lodash": "^4.18.1" + "@oclif/core": "^4.8.3" }, "overrides": { "@oclif/core": { diff --git a/packages/contentstack/README.md b/packages/contentstack/README.md index a3ff1cf571..849e6b303b 100644 --- a/packages/contentstack/README.md +++ b/packages/contentstack/README.md @@ -39,6 +39,7 @@ USAGE * [`csdx auth:whoami`](#csdx-authwhoami) * [`csdx cm:assets:publish [-a ] [--retry-failed ] [-e ] [--folder-uid ] [--bulk-publish ] [-c ] [-y] [--locales ] [--branch ] [--delivery-token ] [--source-env ]`](#csdx-cmassetspublish--a-value---retry-failed-value--e-value---folder-uid-value---bulk-publish-value--c-value--y---locales-value---branch-value---delivery-token-value---source-env-value) * [`csdx cm:assets:unpublish`](#csdx-cmassetsunpublish) +* [`csdx cm:bootstrap`](#csdx-cmbootstrap) * [`csdx cm:branches`](#csdx-cmbranches) * [`csdx cm:branches:create`](#csdx-cmbranchescreate) * [`csdx cm:branches:delete [-uid ] [-k ]`](#csdx-cmbranchesdelete--uid-value--k-value) @@ -70,8 +71,11 @@ USAGE * [`csdx cm:stacks:import-setup [-k ] [-d ] [-a ] [--modules ]`](#csdx-cmstacksimport-setup--k-value--d-value--a-value---modules-valuevalue) * [`csdx cm:migrate-rte`](#csdx-cmmigrate-rte) * [`csdx cm:stacks:migration [-k ] [-a ] [--file-path ] [--branch ] [--config-file ] [--config ] [--multiple]`](#csdx-cmstacksmigration--k-value--a-value---file-path-value---branch-value---config-file-value---config-value---multiple) +* [`csdx cm:stacks:seed [--repo ] [--org ] [-k ] [-n ] [-y] [-s ] [--locale ]`](#csdx-cmstacksseed---repo-value---org-value--k-value--n-value--y--s-value---locale-value) +* [`csdx cm:stacks:clone [--source-branch ] [--target-branch ] [--source-management-token-alias ] [--destination-management-token-alias ] [-n ] [--type a|b] [--source-stack-api-key ] [--destination-stack-api-key ] [--import-webhook-status disable|current]`](#csdx-cmstacksclone---source-branch-value---target-branch-value---source-management-token-alias-value---destination-management-token-alias-value--n-value---type-ab---source-stack-api-key-value---destination-stack-api-key-value---import-webhook-status-disablecurrent) * [`csdx cm:stacks:audit`](#csdx-cmstacksaudit) * [`csdx cm:stacks:audit:fix`](#csdx-cmstacksauditfix) +* [`csdx cm:stacks:clone [--source-branch ] [--target-branch ] [--source-management-token-alias ] [--destination-management-token-alias ] [-n ] [--type a|b] [--source-stack-api-key ] [--destination-stack-api-key ] [--import-webhook-status disable|current]`](#csdx-cmstacksclone---source-branch-value---target-branch-value---source-management-token-alias-value---destination-management-token-alias-value--n-value---type-ab---source-stack-api-key-value---destination-stack-api-key-value---import-webhook-status-disablecurrent) * [`csdx cm:stacks:export [-c ] [-k ] [-d ] [-a ] [--module ] [--content-types ] [--branch ] [--secured-assets]`](#csdx-cmstacksexport--c-value--k-value--d-value--a-value---module-value---content-types-value---branch-value---secured-assets) * [`csdx cm:stacks:import [-c ] [-k ] [-d ] [-a ] [--module ] [--backup-dir ] [--branch ] [--import-webhook-status disable|current]`](#csdx-cmstacksimport--c-value--k-value--d-value--a-value---module-value---backup-dir-value---branch-value---import-webhook-status-disablecurrent) * [`csdx cm:stacks:import-setup [-k ] [-d ] [-a ] [--modules ]`](#csdx-cmstacksimport-setup--k-value--d-value--a-value---modules-valuevalue) @@ -80,6 +84,7 @@ USAGE * [`csdx cm:stacks:publish-clear-logs`](#csdx-cmstackspublish-clear-logs) * [`csdx cm:stacks:publish-configure`](#csdx-cmstackspublish-configure) * [`csdx cm:stacks:publish-revert`](#csdx-cmstackspublish-revert) +* [`csdx cm:stacks:seed [--repo ] [--org ] [-k ] [-n ] [-y] [-s ] [--locale ]`](#csdx-cmstacksseed---repo-value---org-value--k-value--n-value--y--s-value---locale-value) * [`csdx csdx cm:stacks:unpublish [-a ] [-e ] [-c ] [-y] [--locale ] [--branch ] [--retry-failed ] [--bulk-unpublish ] [--content-type ] [--delivery-token ] [--only-assets] [--only-entries]`](#csdx-csdx-cmstacksunpublish--a-value--e-value--c-value--y---locale-value---branch-value---retry-failed-value---bulk-unpublish-value---content-type-value---delivery-token-value---only-assets---only-entries) * [`csdx config:get:base-branch`](#csdx-configgetbase-branch) * [`csdx config:get:ea-header`](#csdx-configgetea-header) @@ -572,6 +577,46 @@ EXAMPLES _See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/main/packages/contentstack-bulk-publish/src/commands/cm/assets/unpublish.js)_ +## `csdx cm:bootstrap` + +Bootstrap contentstack apps + +``` +USAGE + $ csdx cm:bootstrap [--app-name ] [--project-dir ] [-k | --org | -n ] [-y] + [--run-dev-server] [-a ] + +FLAGS + -a, --alias= Alias of the management token + -k, --stack-api-key= Provide stack API key to seed content + -n, --stack-name= Name of the new stack that will be created. + -y, --yes [Optional] Skip stack confirmation + --app-name= App name, kickstart-next, kickstart-next-ssr, kickstart-next-ssg, kickstart-next-graphql, + kickstart-next-middleware, kickstart-nuxt, kickstart-nuxt-ssr + --org= Provide organization UID to create a new stack + --project-dir= Directory to setup the project. If directory name has a space then provide the path as a + string or escap the space using back slash eg: "../../test space" or ../../test\ space + --run-dev-server Automatically start the development server after setup + +DESCRIPTION + Bootstrap contentstack apps + +EXAMPLES + $ csdx cm:bootstrap + + $ csdx cm:bootstrap --project-dir + + $ csdx cm:bootstrap --app-name "kickstart-next" --project-dir + + $ csdx cm:bootstrap --app-name "kickstart-next" --project-dir --stack-api-key "stack-api-key" + + $ csdx cm:bootstrap --app-name "kickstart-next" --project-dir --org "your-org-uid" --stack-name "stack-name" + + $ csdx cm:bootstrap --app-name "kickstart-next" --project-dir --run-dev-server +``` + +_See code: [@contentstack/cli-cm-bootstrap](https://github.com/contentstack/cli/blob/main/packages/contentstack-bootstrap/src/commands/cm/bootstrap.ts)_ + ## `csdx cm:branches` List the branches @@ -2545,6 +2590,97 @@ EXAMPLES $ csdx cm:migration --alias --file-path -k ``` +## `csdx cm:stacks:seed [--repo ] [--org ] [-k ] [-n ] [-y] [-s ] [--locale ]` + +Create a stack from existing content types, entries, assets, etc + +``` +USAGE + $ csdx cm:seed cm:stacks:seed [--repo ] [--org ] [-k ] [-n ] [-y] [-s ] + [--locale ] + +FLAGS + -a, --alias= Alias of the management token + -k, --stack-api-key= Provide stack API key to seed content to + -n, --stack-name= Name of a new stack that needs to be created. + -o, --org= Provide Organization UID to create a new stack + -r, --repo= GitHub organization name or GitHub user name/repository name. + -s, --stack= Provide the stack UID to seed content. + -y, --yes [Optional] Skip the stack confirmation. + +DESCRIPTION + Create a stack from existing content types, entries, assets, etc + +ALIASES + $ csdx cm:seed + +EXAMPLES + $ csdx cm:stacks:seed + + $ csdx cm:stacks:seed --repo "account" + + $ csdx cm:stacks:seed --repo "account/repository" + + $ csdx cm:stacks:seed --repo "account/repository" --stack-api-key "stack-api-key" //seed content into specific stack + + $ csdx cm:stacks:seed --repo "account/repository" --org "your-org-uid" --stack-name "stack-name" //create a new stack in given org uid +``` + +## `csdx cm:stacks:clone [--source-branch ] [--target-branch ] [--source-management-token-alias ] [--destination-management-token-alias ] [-n ] [--type a|b] [--source-stack-api-key ] [--destination-stack-api-key ] [--import-webhook-status disable|current]` + +Clone data (structure/content or both) of a stack into another stack + +``` +USAGE + $ csdx cm:stack-clone cm:stacks:clone [--source-branch ] [--target-branch ] + [--source-management-token-alias ] [--destination-management-token-alias ] [-n ] [--type a|b] + [--source-stack-api-key ] [--destination-stack-api-key ] [--import-webhook-status disable|current] + +FLAGS + -c, --config= Path for the external configuration + -n, --stack-name= Provide a name for the new stack to store the cloned content. + -y, --yes Force override all Marketplace prompts. + --destination-management-token-alias= Destination management token alias. + --destination-stack-api-key= Destination stack API key + --import-webhook-status=