diff --git a/package-lock.json b/package-lock.json index a311267e7a..eba3009fcb 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23549,13 +23549,13 @@ "@contentstack/cli-cm-branches": "~1.0.22", "@contentstack/cli-cm-bulk-publish": "~1.4.0", "@contentstack/cli-cm-clone": "~1.10.0", - "@contentstack/cli-cm-export": "~1.10.4", + "@contentstack/cli-cm-export": "~1.10.5", "@contentstack/cli-cm-export-to-csv": "~1.6.2", "@contentstack/cli-cm-import": "~1.13.3", "@contentstack/cli-cm-migrate-rte": "~1.4.15", "@contentstack/cli-cm-seed": "~1.7.1", "@contentstack/cli-command": "~1.2.17", - "@contentstack/cli-config": "~1.6.1", + "@contentstack/cli-config": "~1.6.2", "@contentstack/cli-launch": "~1.0.16", "@contentstack/cli-migration": "~1.4.2", "@contentstack/cli-utilities": "~1.5.11", @@ -24220,7 +24220,7 @@ }, "packages/contentstack-config": { "name": "@contentstack/cli-config", - "version": "1.6.1", + "version": "1.6.2", "license": "MIT", "dependencies": { "@contentstack/cli-command": "~1.2.16", @@ -24525,7 +24525,7 @@ }, "packages/contentstack-export": { "name": "@contentstack/cli-cm-export", - "version": "1.10.4", + "version": "1.10.5", "license": "MIT", "dependencies": { "@contentstack/cli-command": "~1.2.16", diff --git a/packages/contentstack-audit/README.md b/packages/contentstack-audit/README.md index a9766ba649..5af1961475 100644 --- a/packages/contentstack-audit/README.md +++ b/packages/contentstack-audit/README.md @@ -19,7 +19,7 @@ $ npm install -g @contentstack/cli-audit $ csdx COMMAND running command... $ csdx (--version|-v) -@contentstack/cli-audit/1.3.4 darwin-arm64 node-v20.8.0 +@contentstack/cli-audit/1.3.5 darwin-arm64 node-v20.8.0 $ csdx --help [COMMAND] USAGE $ csdx COMMAND diff --git a/packages/contentstack-config/README.md b/packages/contentstack-config/README.md index 85326a1899..8f354746ed 100644 --- a/packages/contentstack-config/README.md +++ b/packages/contentstack-config/README.md @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-config $ csdx COMMAND running command... $ csdx (--version) -@contentstack/cli-config/1.6.0 darwin-arm64 node-v20.8.0 +@contentstack/cli-config/1.6.2 darwin-arm64 node-v20.8.0 $ csdx --help [COMMAND] USAGE $ csdx COMMAND diff --git a/packages/contentstack-config/package.json b/packages/contentstack-config/package.json index 17ce590482..c1f5c26894 100644 --- a/packages/contentstack-config/package.json +++ b/packages/contentstack-config/package.json @@ -1,7 +1,7 @@ { "name": "@contentstack/cli-config", "description": "Contentstack CLI plugin for configuration", - "version": "1.6.1", + "version": "1.6.2", "author": "Contentstack", "scripts": { "build": "npm run clean && npm run compile", diff --git a/packages/contentstack-export/README.md b/packages/contentstack-export/README.md index 08d60884f0..ae1378c585 100755 --- a/packages/contentstack-export/README.md +++ b/packages/contentstack-export/README.md @@ -48,7 +48,7 @@ $ npm install -g @contentstack/cli-cm-export $ csdx COMMAND running command... $ csdx (--version) -@contentstack/cli-cm-export/1.10.4 darwin-arm64 node-v20.8.0 +@contentstack/cli-cm-export/1.10.5 darwin-arm64 node-v20.8.0 $ csdx --help [COMMAND] USAGE $ csdx COMMAND diff --git a/packages/contentstack-export/package.json b/packages/contentstack-export/package.json index 2b54eea5f8..a2bde1bc8a 100644 --- a/packages/contentstack-export/package.json +++ b/packages/contentstack-export/package.json @@ -1,7 +1,7 @@ { "name": "@contentstack/cli-cm-export", "description": "Contentstack CLI plugin to export content from stack", - "version": "1.10.4", + "version": "1.10.5", "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { diff --git a/packages/contentstack-export/src/commands/cm/stacks/export.ts b/packages/contentstack-export/src/commands/cm/stacks/export.ts index eb6e3a51d9..805a420f16 100644 --- a/packages/contentstack-export/src/commands/cm/stacks/export.ts +++ b/packages/contentstack-export/src/commands/cm/stacks/export.ts @@ -71,14 +71,12 @@ export default class ExportCommand extends Command { module: flags.string({ char: 'm', description: '[optional] specific module name', - exclusive: ['content-types'], parse: printFlagDeprecation(['-m'], ['--module']), }), 'content-types': flags.string({ char: 't', description: '[optional] content type', multiple: true, - exclusive: ['module'], parse: printFlagDeprecation(['-t'], ['--content-types']), }), branch: flags.string({ diff --git a/packages/contentstack-export/src/export/modules-js/content-types.js b/packages/contentstack-export/src/export/modules-js/content-types.js index 72affabb9f..058525a5bf 100644 --- a/packages/contentstack-export/src/export/modules-js/content-types.js +++ b/packages/contentstack-export/src/export/modules-js/content-types.js @@ -14,7 +14,7 @@ class ContentTypesExport { include_global_field_schema: true, }; // If content type id is provided then use it as part of query - if (Array.isArray(this.exportConfig.contentTypes) && this.exportConfig.length > 0) { + if (Array.isArray(this.exportConfig.contentTypes) && this.exportConfig.contentTypes.length > 0) { this.qs.uid = { $in: this.exportConfig.contentTypes }; } this.contentTypesPath = path.resolve( diff --git a/packages/contentstack-export/src/export/modules/content-types.ts b/packages/contentstack-export/src/export/modules/content-types.ts index 7b2ba3fbf9..54ccdbd8c1 100644 --- a/packages/contentstack-export/src/export/modules/content-types.ts +++ b/packages/contentstack-export/src/export/modules/content-types.ts @@ -13,6 +13,7 @@ export default class ContentTypesExport extends BaseClass { skip?: number; limit?: number; include_global_field_schema: boolean; + uid?: Record }; private contentTypesConfig: { dirName?: string; @@ -35,6 +36,12 @@ export default class ContentTypesExport extends BaseClass { limit: this.contentTypesConfig.limit, include_global_field_schema: true, }; + + // If content type id is provided then use it as part of query + if (Array.isArray(this.exportConfig.contentTypes) && this.exportConfig.contentTypes.length > 0) { + this.qs.uid = { $in: this.exportConfig.contentTypes }; + } + this.contentTypesDirPath = path.resolve( exportConfig.data, exportConfig.branchName || '', diff --git a/packages/contentstack-import/README.md b/packages/contentstack-import/README.md index 067cb318e0..ca6fe2c3ff 100644 --- a/packages/contentstack-import/README.md +++ b/packages/contentstack-import/README.md @@ -47,7 +47,7 @@ $ npm install -g @contentstack/cli-cm-import $ csdx COMMAND running command... $ csdx (--version) -@contentstack/cli-cm-import/1.13.2 darwin-arm64 node-v20.8.0 +@contentstack/cli-cm-import/1.13.3 darwin-arm64 node-v20.8.0 $ csdx --help [COMMAND] USAGE $ csdx COMMAND diff --git a/packages/contentstack-launch/README.md b/packages/contentstack-launch/README.md index acf6a6c9db..dbef306de9 100755 --- a/packages/contentstack-launch/README.md +++ b/packages/contentstack-launch/README.md @@ -19,7 +19,7 @@ $ npm install -g @contentstack/cli-launch $ csdx COMMAND running command... $ csdx (--version|-v) -@contentstack/cli-launch/1.0.16 darwin-arm64 node-v20.10.0 +@contentstack/cli-launch/1.0.16 darwin-arm64 node-v20.8.0 $ csdx --help [COMMAND] USAGE $ csdx COMMAND diff --git a/packages/contentstack/README.md b/packages/contentstack/README.md index 058af6fa94..092ad93fcf 100644 --- a/packages/contentstack/README.md +++ b/packages/contentstack/README.md @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli $ csdx COMMAND running command... $ csdx (--version|-v) -@contentstack/cli/1.13.0 darwin-arm64 node-v20.10.0 +@contentstack/cli/1.13.3 darwin-arm64 node-v20.8.0 $ csdx --help [COMMAND] USAGE $ csdx COMMAND diff --git a/packages/contentstack/package.json b/packages/contentstack/package.json index aa654da0ea..7fd21fa112 100755 --- a/packages/contentstack/package.json +++ b/packages/contentstack/package.json @@ -27,14 +27,14 @@ "@contentstack/cli-cm-bootstrap": "~1.8.0", "@contentstack/cli-cm-branches": "~1.0.22", "@contentstack/cli-cm-bulk-publish": "~1.4.0", + "@contentstack/cli-cm-export": "~1.10.5", "@contentstack/cli-cm-clone": "~1.10.0", - "@contentstack/cli-cm-export": "~1.10.4", "@contentstack/cli-cm-export-to-csv": "~1.6.2", "@contentstack/cli-cm-import": "~1.13.3", "@contentstack/cli-cm-migrate-rte": "~1.4.15", "@contentstack/cli-cm-seed": "~1.7.1", "@contentstack/cli-command": "~1.2.17", - "@contentstack/cli-config": "~1.6.1", + "@contentstack/cli-config": "~1.6.2", "@contentstack/cli-launch": "~1.0.16", "@contentstack/cli-migration": "~1.4.2", "@contentstack/cli-utilities": "~1.5.11", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 223e2f2032..bd5b947a76 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -16,13 +16,13 @@ importers: '@contentstack/cli-cm-branches': ~1.0.22 '@contentstack/cli-cm-bulk-publish': ~1.4.0 '@contentstack/cli-cm-clone': ~1.10.0 - '@contentstack/cli-cm-export': ~1.10.4 + '@contentstack/cli-cm-export': ~1.10.5 '@contentstack/cli-cm-export-to-csv': ~1.6.2 '@contentstack/cli-cm-import': ~1.13.3 '@contentstack/cli-cm-migrate-rte': ~1.4.15 '@contentstack/cli-cm-seed': ~1.7.1 '@contentstack/cli-command': ~1.2.17 - '@contentstack/cli-config': ~1.6.1 + '@contentstack/cli-config': ~1.6.2 '@contentstack/cli-launch': ~1.0.16 '@contentstack/cli-migration': ~1.4.2 '@contentstack/cli-utilities': ~1.5.11