diff --git a/package-lock.json b/package-lock.json index e53a535649..ecea4e13ea 100644 --- a/package-lock.json +++ b/package-lock.json @@ -23493,7 +23493,7 @@ "version": "1.12.2", "license": "MIT", "dependencies": { - "@contentstack/cli-audit": "~1.3.2", + "@contentstack/cli-audit": "~1.3.3", "@contentstack/cli-auth": "~1.3.17", "@contentstack/cli-cm-bootstrap": "~1.7.1", "@contentstack/cli-cm-branches": "~1.0.21", @@ -23501,7 +23501,7 @@ "@contentstack/cli-cm-clone": "~1.9.0", "@contentstack/cli-cm-export": "~1.10.2", "@contentstack/cli-cm-export-to-csv": "~1.6.2", - "@contentstack/cli-cm-import": "~1.13.0", + "@contentstack/cli-cm-import": "~1.13.1", "@contentstack/cli-cm-migrate-rte": "~1.4.15", "@contentstack/cli-cm-seed": "~1.7.1", "@contentstack/cli-command": "~1.2.17", @@ -23558,7 +23558,7 @@ }, "packages/contentstack-audit": { "name": "@contentstack/cli-audit", - "version": "1.3.2", + "version": "1.3.3", "license": "MIT", "dependencies": { "@contentstack/cli-command": "~1.2.16", @@ -24920,7 +24920,7 @@ }, "packages/contentstack-import": { "name": "@contentstack/cli-cm-import", - "version": "1.13.0", + "version": "1.13.1", "license": "MIT", "dependencies": { "@contentstack/cli-audit": "^1.3.2", @@ -25381,7 +25381,7 @@ "version": "1.7.1", "license": "MIT", "dependencies": { - "@contentstack/cli-cm-import": "~1.13.0", + "@contentstack/cli-cm-import": "~1.13.1", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.10", "inquirer": "8.2.4", diff --git a/packages/contentstack-audit/package.json b/packages/contentstack-audit/package.json index 202e4c6d65..70f1cb1726 100644 --- a/packages/contentstack-audit/package.json +++ b/packages/contentstack-audit/package.json @@ -1,6 +1,6 @@ { "name": "@contentstack/cli-audit", - "version": "1.3.2", + "version": "1.3.3", "description": "Contentstack audit plugin", "author": "Contentstack CLI", "homepage": "https://github.com/contentstack/cli", diff --git a/packages/contentstack-audit/src/commands/cm/stacks/audit/index.ts b/packages/contentstack-audit/src/commands/cm/stacks/audit/index.ts index f0dcd81221..57113bd0cb 100644 --- a/packages/contentstack-audit/src/commands/cm/stacks/audit/index.ts +++ b/packages/contentstack-audit/src/commands/cm/stacks/audit/index.ts @@ -42,6 +42,7 @@ export default class Audit extends AuditBaseCommand { try { await this.start('cm:stacks:audit'); } catch (error) { + console.trace(error); this.log(error instanceof Error ? error.message : error, 'error'); ux.action.stop('Process failed.!'); this.exit(1); diff --git a/packages/contentstack-audit/src/config/index.ts b/packages/contentstack-audit/src/config/index.ts index fd25645bfb..7a5a773273 100644 --- a/packages/contentstack-audit/src/config/index.ts +++ b/packages/contentstack-audit/src/config/index.ts @@ -1,6 +1,7 @@ const config = { showTerminalOutput: true, skipRefs: ['sys_assets'], + skipFieldTypes: ['taxonomy'], modules: ['content-types', 'global-fields', 'entries'], 'fix-fields': ['reference', 'global_field', 'json:rte', 'json:custom-field', 'blocks', 'group'], moduleConfig: { diff --git a/packages/contentstack-audit/src/modules/content-types.ts b/packages/contentstack-audit/src/modules/content-types.ts index 0b544992f5..8e26bdb6f4 100644 --- a/packages/contentstack-audit/src/modules/content-types.ts +++ b/packages/contentstack-audit/src/modules/content-types.ts @@ -379,8 +379,9 @@ export default class ContentType { } }) .filter((val: any) => { - if (val?.schema && isEmpty(val.schema)) return false; - if (val?.reference_to && isEmpty(val.reference_to)) return false; + if (this.config.skipFieldTypes.includes(val?.data_type)) return true; + if (val?.schema && isEmpty(val?.schema)) return false; + if (val?.reference_to && isEmpty(val?.reference_to)) return false; return !!val; }) as ContentTypeSchemaType[]; diff --git a/packages/contentstack-bulk-publish/README.md b/packages/contentstack-bulk-publish/README.md index 2518496f86..d7f25b559d 100644 --- a/packages/contentstack-bulk-publish/README.md +++ b/packages/contentstack-bulk-publish/README.md @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-cm-bulk-publish $ csdx COMMAND running command... $ csdx (--version) -@contentstack/cli-cm-bulk-publish/1.4.0 darwin-arm64 node-v20.8.0 +@contentstack/cli-cm-bulk-publish/1.4.0 darwin-arm64 node-v20.10.0 $ csdx --help [COMMAND] USAGE $ csdx COMMAND diff --git a/packages/contentstack-import/package.json b/packages/contentstack-import/package.json index 185e5a6515..d407057776 100644 --- a/packages/contentstack-import/package.json +++ b/packages/contentstack-import/package.json @@ -1,7 +1,7 @@ { "name": "@contentstack/cli-cm-import", "description": "Contentstack CLI plugin to import content into stack", - "version": "1.13.0", + "version": "1.13.1", "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { diff --git a/packages/contentstack-import/src/import/module-importer.ts b/packages/contentstack-import/src/import/module-importer.ts index 1fd509978e..95e4bca001 100755 --- a/packages/contentstack-import/src/import/module-importer.ts +++ b/packages/contentstack-import/src/import/module-importer.ts @@ -130,6 +130,12 @@ class ModuleImporter { if (this.importConfig.moduleName) { args.push('--modules', this.importConfig.moduleName); + } else if (this.importConfig.modules.types.length) { + this.importConfig.modules.types + .filter((val) => ['content-types', 'global-fields', 'entries'].includes(val)) + .forEach((val) => { + args.push('--modules', val); + }); } log(this.importConfig, 'Starting audit process', 'info'); @@ -159,7 +165,6 @@ class ModuleImporter { return true; } catch (error) { - trace(error); log(this.importConfig, `Audit failed with following error. ${error}`, 'error'); } } diff --git a/packages/contentstack-seed/package.json b/packages/contentstack-seed/package.json index a5998b0e1f..911afc2dd4 100644 --- a/packages/contentstack-seed/package.json +++ b/packages/contentstack-seed/package.json @@ -5,7 +5,7 @@ "author": "Contentstack", "bugs": "https://github.com/contentstack/cli/issues", "dependencies": { - "@contentstack/cli-cm-import": "~1.13.0", + "@contentstack/cli-cm-import": "~1.13.1", "@contentstack/cli-command": "~1.2.16", "@contentstack/cli-utilities": "~1.5.10", "inquirer": "8.2.4", diff --git a/packages/contentstack/package.json b/packages/contentstack/package.json index 99c0982b14..827610a276 100755 --- a/packages/contentstack/package.json +++ b/packages/contentstack/package.json @@ -22,7 +22,7 @@ "prepack": "pnpm compile && oclif manifest && oclif readme" }, "dependencies": { - "@contentstack/cli-audit": "~1.3.2", + "@contentstack/cli-audit": "~1.3.3", "@contentstack/cli-auth": "~1.3.17", "@contentstack/cli-cm-bootstrap": "~1.7.1", "@contentstack/cli-cm-branches": "~1.0.21", @@ -30,7 +30,7 @@ "@contentstack/cli-cm-clone": "~1.9.0", "@contentstack/cli-cm-export": "~1.10.2", "@contentstack/cli-cm-export-to-csv": "~1.6.2", - "@contentstack/cli-cm-import": "~1.13.0", + "@contentstack/cli-cm-import": "~1.13.1", "@contentstack/cli-cm-migrate-rte": "~1.4.15", "@contentstack/cli-cm-seed": "~1.7.1", "@contentstack/cli-command": "~1.2.17", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4404727212..145763a2d6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,7 +10,7 @@ importers: packages/contentstack: specifiers: - '@contentstack/cli-audit': ~1.3.2 + '@contentstack/cli-audit': ~1.3.3 '@contentstack/cli-auth': ~1.3.17 '@contentstack/cli-cm-bootstrap': ~1.7.1 '@contentstack/cli-cm-branches': ~1.0.21 @@ -18,7 +18,7 @@ importers: '@contentstack/cli-cm-clone': ~1.9.0 '@contentstack/cli-cm-export': ~1.10.2 '@contentstack/cli-cm-export-to-csv': ~1.6.2 - '@contentstack/cli-cm-import': ~1.13.0 + '@contentstack/cli-cm-import': ~1.13.1 '@contentstack/cli-cm-migrate-rte': ~1.4.15 '@contentstack/cli-cm-seed': ~1.7.1 '@contentstack/cli-command': ~1.2.17 @@ -984,7 +984,7 @@ importers: packages/contentstack-seed: specifiers: - '@contentstack/cli-cm-import': ~1.13.0 + '@contentstack/cli-cm-import': ~1.13.1 '@contentstack/cli-command': ~1.2.16 '@contentstack/cli-utilities': ~1.5.10 '@oclif/plugin-help': ^5.1.19