@contentstack/cli-audit 1.12.0 → 1.12.1
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 +1 -1
- package/lib/config/index.d.ts +1 -0
- package/lib/config/index.js +1 -0
- package/lib/modules/content-types.js +4 -2
- package/oclif.manifest.json +1 -1
- package/package.json +1 -1
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.12.
|
|
22
|
+
@contentstack/cli-audit/1.12.1 linux-x64 node-v22.14.0
|
|
23
23
|
$ csdx --help [COMMAND]
|
|
24
24
|
USAGE
|
|
25
25
|
$ csdx COMMAND
|
package/lib/config/index.d.ts
CHANGED
package/lib/config/index.js
CHANGED
|
@@ -15,6 +15,7 @@ const config = {
|
|
|
15
15
|
'field-rules',
|
|
16
16
|
],
|
|
17
17
|
'fix-fields': ['reference', 'global_field', 'json:rte', 'json:extension', 'blocks', 'group', 'content_types'],
|
|
18
|
+
'schema-fields-data-type': ['blocks', 'group', 'global_field'],
|
|
18
19
|
moduleConfig: {
|
|
19
20
|
'content-types': {
|
|
20
21
|
name: 'content type',
|
|
@@ -381,9 +381,11 @@ class ContentType {
|
|
|
381
381
|
.filter((val) => {
|
|
382
382
|
if (this.config.skipFieldTypes.includes(val === null || val === void 0 ? void 0 : val.data_type))
|
|
383
383
|
return true;
|
|
384
|
-
if ((val === null || val === void 0 ? void 0 : val.schema) &&
|
|
384
|
+
if ((val === null || val === void 0 ? void 0 : val.schema) &&
|
|
385
|
+
(0, isEmpty_1.default)(val === null || val === void 0 ? void 0 : val.schema) &&
|
|
386
|
+
(!(val === null || val === void 0 ? void 0 : val.data_type) || this.config['schema-fields-data-type'].includes(val.data_type)))
|
|
385
387
|
return false;
|
|
386
|
-
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))
|
|
388
|
+
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) && val.data_type === 'reference')
|
|
387
389
|
return false;
|
|
388
390
|
return !!val;
|
|
389
391
|
});
|
package/oclif.manifest.json
CHANGED