@contentstack/cli-audit 1.3.2 → 1.3.3

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/README.md CHANGED
@@ -19,7 +19,7 @@ $ npm install -g @contentstack/cli-audit
19
19
  $ csdx COMMAND
20
20
  running command...
21
21
  $ csdx (--version|-v)
22
- @contentstack/cli-audit/1.3.2 linux-x64 node-v18.19.0
22
+ @contentstack/cli-audit/1.3.3 linux-x64 node-v18.19.0
23
23
  $ csdx --help [COMMAND]
24
24
  USAGE
25
25
  $ csdx COMMAND
@@ -16,6 +16,7 @@ class Audit extends audit_base_command_1.AuditBaseCommand {
16
16
  await this.start('cm:stacks:audit');
17
17
  }
18
18
  catch (error) {
19
+ console.trace(error);
19
20
  this.log(error instanceof Error ? error.message : error, 'error');
20
21
  cli_utilities_1.ux.action.stop('Process failed.!');
21
22
  this.exit(1);
@@ -1,6 +1,7 @@
1
1
  declare const config: {
2
2
  showTerminalOutput: boolean;
3
3
  skipRefs: string[];
4
+ skipFieldTypes: string[];
4
5
  modules: string[];
5
6
  'fix-fields': string[];
6
7
  moduleConfig: {
@@ -3,6 +3,7 @@ Object.defineProperty(exports, "__esModule", { value: true });
3
3
  const config = {
4
4
  showTerminalOutput: true,
5
5
  skipRefs: ['sys_assets'],
6
+ skipFieldTypes: ['taxonomy'],
6
7
  modules: ['content-types', 'global-fields', 'entries'],
7
8
  'fix-fields': ['reference', 'global_field', 'json:rte', 'json:custom-field', 'blocks', 'group'],
8
9
  moduleConfig: {
@@ -295,9 +295,11 @@ class ContentType {
295
295
  }
296
296
  })
297
297
  .filter((val) => {
298
- if ((val === null || val === void 0 ? void 0 : val.schema) && (0, isEmpty_1.default)(val.schema))
298
+ if (this.config.skipFieldTypes.includes(val === null || val === void 0 ? void 0 : val.data_type))
299
+ return true;
300
+ if ((val === null || val === void 0 ? void 0 : val.schema) && (0, isEmpty_1.default)(val === null || val === void 0 ? void 0 : val.schema))
299
301
  return false;
300
- if ((val === null || val === void 0 ? void 0 : val.reference_to) && (0, isEmpty_1.default)(val.reference_to))
302
+ if ((val === null || val === void 0 ? void 0 : val.reference_to) && (0, isEmpty_1.default)(val === null || val === void 0 ? void 0 : val.reference_to))
301
303
  return false;
302
304
  return !!val;
303
305
  });
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.3.2",
2
+ "version": "1.3.3",
3
3
  "commands": {
4
4
  "cm:stacks:audit:fix": {
5
5
  "id": "cm:stacks:audit:fix",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@contentstack/cli-audit",
3
- "version": "1.3.2",
3
+ "version": "1.3.3",
4
4
  "description": "Contentstack audit plugin",
5
5
  "author": "Contentstack CLI",
6
6
  "homepage": "https://github.com/contentstack/cli",