@contentstack/cli-audit 1.5.3 → 1.5.4

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.5.3 linux-x64 node-v18.20.1
22
+ @contentstack/cli-audit/1.5.4 linux-x64 node-v18.20.2
23
23
  $ csdx --help [COMMAND]
24
24
  USAGE
25
25
  $ csdx COMMAND
@@ -285,7 +285,7 @@ EXAMPLES
285
285
  $ csdx plugins
286
286
  ```
287
287
 
288
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.7/src/commands/plugins/index.ts)_
288
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.11/src/commands/plugins/index.ts)_
289
289
 
290
290
  ## `csdx plugins:add PLUGIN`
291
291
 
@@ -359,7 +359,7 @@ EXAMPLES
359
359
  $ csdx plugins:inspect myplugin
360
360
  ```
361
361
 
362
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.7/src/commands/plugins/inspect.ts)_
362
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.11/src/commands/plugins/inspect.ts)_
363
363
 
364
364
  ## `csdx plugins:install PLUGIN`
365
365
 
@@ -408,7 +408,7 @@ EXAMPLES
408
408
  $ csdx plugins:install someuser/someplugin
409
409
  ```
410
410
 
411
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.7/src/commands/plugins/install.ts)_
411
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.11/src/commands/plugins/install.ts)_
412
412
 
413
413
  ## `csdx plugins:link PATH`
414
414
 
@@ -438,7 +438,7 @@ EXAMPLES
438
438
  $ csdx plugins:link myplugin
439
439
  ```
440
440
 
441
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.7/src/commands/plugins/link.ts)_
441
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.11/src/commands/plugins/link.ts)_
442
442
 
443
443
  ## `csdx plugins:remove [PLUGIN]`
444
444
 
@@ -479,7 +479,7 @@ FLAGS
479
479
  --reinstall Reinstall all plugins after uninstalling.
480
480
  ```
481
481
 
482
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.7/src/commands/plugins/reset.ts)_
482
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.11/src/commands/plugins/reset.ts)_
483
483
 
484
484
  ## `csdx plugins:uninstall [PLUGIN]`
485
485
 
@@ -507,7 +507,7 @@ EXAMPLES
507
507
  $ csdx plugins:uninstall myplugin
508
508
  ```
509
509
 
510
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.7/src/commands/plugins/uninstall.ts)_
510
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.11/src/commands/plugins/uninstall.ts)_
511
511
 
512
512
  ## `csdx plugins:unlink [PLUGIN]`
513
513
 
@@ -551,5 +551,5 @@ DESCRIPTION
551
551
  Update installed plugins.
552
552
  ```
553
553
 
554
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.7/src/commands/plugins/update.ts)_
554
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.0.11/src/commands/plugins/update.ts)_
555
555
  <!-- commandsstop -->
@@ -16,6 +16,7 @@ export default class Entries {
16
16
  protected missingRefs: Record<string, any>;
17
17
  entryMetaData: Record<string, any>[];
18
18
  moduleName: keyof typeof auditConfig.moduleConfig;
19
+ isEntryWithoutTitleField: boolean;
19
20
  constructor({ log, fix, config, moduleName, ctSchema, gfSchema }: ModuleConstructorParam & CtConstructorParam);
20
21
  /**
21
22
  * The `run` function checks if a folder path exists, sets the schema based on the module name,
@@ -18,6 +18,7 @@ class Entries {
18
18
  this.missingRefs = {};
19
19
  this.entryMetaData = [];
20
20
  this.moduleName = 'entries';
21
+ this.isEntryWithoutTitleField = false;
21
22
  this.log = log;
22
23
  this.config = config;
23
24
  this.fix = fix !== null && fix !== void 0 ? fix : false;
@@ -732,11 +733,18 @@ class Entries {
732
733
  const entries = (await fsUtility.readChunkFiles.next());
733
734
  for (const entryUid in entries) {
734
735
  let { title } = entries[entryUid];
736
+ if (!title) {
737
+ this.isEntryWithoutTitleField = true;
738
+ this.log(`Entry with UID '${entryUid}' of Content Type '${uid}' in Locale '${code}' does not have a 'title' field.`, `error`);
739
+ }
735
740
  this.entryMetaData.push({ uid: entryUid, title });
736
741
  }
737
742
  }
738
743
  }
739
744
  }
745
+ if (this.isEntryWithoutTitleField) {
746
+ throw Error(`Entries found with missing 'title' field! Please make the data corrections and re-run the audit.`);
747
+ }
740
748
  }
741
749
  }
742
750
  exports.default = Entries;
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.5.3",
2
+ "version": "1.5.4",
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.5.3",
3
+ "version": "1.5.4",
4
4
  "description": "Contentstack audit plugin",
5
5
  "author": "Contentstack CLI",
6
6
  "homepage": "https://github.com/contentstack/cli",