@contentstack/cli-audit 1.15.0 → 1.16.0
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 +13 -13
- package/lib/modules/entries.js +22 -2
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
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.
|
|
22
|
+
@contentstack/cli-audit/1.16.0 linux-x64 node-v22.21.1
|
|
23
23
|
$ csdx --help [COMMAND]
|
|
24
24
|
USAGE
|
|
25
25
|
$ csdx COMMAND
|
|
@@ -273,7 +273,7 @@ USAGE
|
|
|
273
273
|
$ csdx help [COMMAND...] [-n]
|
|
274
274
|
|
|
275
275
|
ARGUMENTS
|
|
276
|
-
COMMAND... Command to show help for.
|
|
276
|
+
[COMMAND...] Command to show help for.
|
|
277
277
|
|
|
278
278
|
FLAGS
|
|
279
279
|
-n, --nested-commands Include all nested commands in the output.
|
|
@@ -282,7 +282,7 @@ DESCRIPTION
|
|
|
282
282
|
Display help for csdx.
|
|
283
283
|
```
|
|
284
284
|
|
|
285
|
-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.
|
|
285
|
+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.35/src/commands/help.ts)_
|
|
286
286
|
|
|
287
287
|
## `csdx plugins`
|
|
288
288
|
|
|
@@ -305,7 +305,7 @@ EXAMPLES
|
|
|
305
305
|
$ csdx plugins
|
|
306
306
|
```
|
|
307
307
|
|
|
308
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
308
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/index.ts)_
|
|
309
309
|
|
|
310
310
|
## `csdx plugins:add PLUGIN`
|
|
311
311
|
|
|
@@ -379,7 +379,7 @@ EXAMPLES
|
|
|
379
379
|
$ csdx plugins:inspect myplugin
|
|
380
380
|
```
|
|
381
381
|
|
|
382
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
382
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/inspect.ts)_
|
|
383
383
|
|
|
384
384
|
## `csdx plugins:install PLUGIN`
|
|
385
385
|
|
|
@@ -428,7 +428,7 @@ EXAMPLES
|
|
|
428
428
|
$ csdx plugins:install someuser/someplugin
|
|
429
429
|
```
|
|
430
430
|
|
|
431
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
431
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/install.ts)_
|
|
432
432
|
|
|
433
433
|
## `csdx plugins:link PATH`
|
|
434
434
|
|
|
@@ -459,7 +459,7 @@ EXAMPLES
|
|
|
459
459
|
$ csdx plugins:link myplugin
|
|
460
460
|
```
|
|
461
461
|
|
|
462
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
462
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/link.ts)_
|
|
463
463
|
|
|
464
464
|
## `csdx plugins:remove [PLUGIN]`
|
|
465
465
|
|
|
@@ -470,7 +470,7 @@ USAGE
|
|
|
470
470
|
$ csdx plugins:remove [PLUGIN...] [-h] [-v]
|
|
471
471
|
|
|
472
472
|
ARGUMENTS
|
|
473
|
-
PLUGIN... plugin to uninstall
|
|
473
|
+
[PLUGIN...] plugin to uninstall
|
|
474
474
|
|
|
475
475
|
FLAGS
|
|
476
476
|
-h, --help Show CLI help.
|
|
@@ -500,7 +500,7 @@ FLAGS
|
|
|
500
500
|
--reinstall Reinstall all plugins after uninstalling.
|
|
501
501
|
```
|
|
502
502
|
|
|
503
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
503
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/reset.ts)_
|
|
504
504
|
|
|
505
505
|
## `csdx plugins:uninstall [PLUGIN]`
|
|
506
506
|
|
|
@@ -511,7 +511,7 @@ USAGE
|
|
|
511
511
|
$ csdx plugins:uninstall [PLUGIN...] [-h] [-v]
|
|
512
512
|
|
|
513
513
|
ARGUMENTS
|
|
514
|
-
PLUGIN... plugin to uninstall
|
|
514
|
+
[PLUGIN...] plugin to uninstall
|
|
515
515
|
|
|
516
516
|
FLAGS
|
|
517
517
|
-h, --help Show CLI help.
|
|
@@ -528,7 +528,7 @@ EXAMPLES
|
|
|
528
528
|
$ csdx plugins:uninstall myplugin
|
|
529
529
|
```
|
|
530
530
|
|
|
531
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
531
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/uninstall.ts)_
|
|
532
532
|
|
|
533
533
|
## `csdx plugins:unlink [PLUGIN]`
|
|
534
534
|
|
|
@@ -539,7 +539,7 @@ USAGE
|
|
|
539
539
|
$ csdx plugins:unlink [PLUGIN...] [-h] [-v]
|
|
540
540
|
|
|
541
541
|
ARGUMENTS
|
|
542
|
-
PLUGIN... plugin to uninstall
|
|
542
|
+
[PLUGIN...] plugin to uninstall
|
|
543
543
|
|
|
544
544
|
FLAGS
|
|
545
545
|
-h, --help Show CLI help.
|
|
@@ -572,5 +572,5 @@ DESCRIPTION
|
|
|
572
572
|
Update installed plugins.
|
|
573
573
|
```
|
|
574
574
|
|
|
575
|
-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.
|
|
575
|
+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.53/src/commands/plugins/update.ts)_
|
|
576
576
|
<!-- commandsstop -->
|
package/lib/modules/entries.js
CHANGED
|
@@ -416,7 +416,17 @@ class Entries {
|
|
|
416
416
|
break;
|
|
417
417
|
case 'global_field':
|
|
418
418
|
cli_utilities_1.log.debug(`Validating global field: ${display_name}`, this.config.auditContext);
|
|
419
|
-
|
|
419
|
+
if (child.multiple && Array.isArray(entry[uid])) {
|
|
420
|
+
cli_utilities_1.log.debug(`Processing ${entry[uid].length} multiple global field entries`, this.config.auditContext);
|
|
421
|
+
entry[uid].forEach((globalFieldEntry, index) => {
|
|
422
|
+
cli_utilities_1.log.debug(`Processing global field entry ${index}`, this.config.auditContext);
|
|
423
|
+
this.validateGlobalField([...tree, { uid: child.uid, name: child.display_name, field: uid }], child, globalFieldEntry);
|
|
424
|
+
});
|
|
425
|
+
}
|
|
426
|
+
else {
|
|
427
|
+
cli_utilities_1.log.debug(`Processing single global field entry`, this.config.auditContext);
|
|
428
|
+
this.validateGlobalField([...tree, { uid: child.uid, name: child.display_name, field: uid }], child, entry[uid]);
|
|
429
|
+
}
|
|
420
430
|
break;
|
|
421
431
|
case 'json':
|
|
422
432
|
if ('extension' in child.field_metadata && child.field_metadata.extension) {
|
|
@@ -791,7 +801,17 @@ class Entries {
|
|
|
791
801
|
switch (data_type) {
|
|
792
802
|
case 'global_field':
|
|
793
803
|
cli_utilities_1.log.debug(`Fixing global field: ${uid}`);
|
|
794
|
-
|
|
804
|
+
if (field.multiple && Array.isArray(entry[uid])) {
|
|
805
|
+
cli_utilities_1.log.debug(`Fixing ${entry[uid].length} multiple global field entries`, this.config.auditContext);
|
|
806
|
+
entry[uid] = entry[uid].map((globalFieldEntry, index) => {
|
|
807
|
+
cli_utilities_1.log.debug(`Fixing global field entry ${index}`, this.config.auditContext);
|
|
808
|
+
return this.fixGlobalFieldReferences([...tree, { uid: field.uid, name: field.display_name, data_type: field.data_type }], field, globalFieldEntry);
|
|
809
|
+
});
|
|
810
|
+
}
|
|
811
|
+
else {
|
|
812
|
+
cli_utilities_1.log.debug(`Fixing single global field entry`, this.config.auditContext);
|
|
813
|
+
entry[uid] = this.fixGlobalFieldReferences([...tree, { uid: field.uid, name: field.display_name, data_type: field.data_type }], field, entry[uid]);
|
|
814
|
+
}
|
|
795
815
|
break;
|
|
796
816
|
case 'json':
|
|
797
817
|
case 'reference':
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/cli-audit",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.16.0",
|
|
4
4
|
"description": "Contentstack audit plugin",
|
|
5
5
|
"author": "Contentstack CLI",
|
|
6
6
|
"homepage": "https://github.com/contentstack/cli",
|
|
@@ -19,7 +19,7 @@
|
|
|
19
19
|
],
|
|
20
20
|
"dependencies": {
|
|
21
21
|
"@contentstack/cli-command": "~1.6.1",
|
|
22
|
-
"@contentstack/cli-utilities": "~1.14.
|
|
22
|
+
"@contentstack/cli-utilities": "~1.14.4",
|
|
23
23
|
"@oclif/core": "^4.3.0",
|
|
24
24
|
"@oclif/plugin-help": "^6.2.28",
|
|
25
25
|
"@oclif/plugin-plugins": "^5.4.38",
|