@contentstack/cli-cm-import 1.13.0 → 1.13.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
CHANGED
|
@@ -47,7 +47,7 @@ $ npm install -g @contentstack/cli-cm-import
|
|
|
47
47
|
$ csdx COMMAND
|
|
48
48
|
running command...
|
|
49
49
|
$ csdx (--version)
|
|
50
|
-
@contentstack/cli-cm-import/1.13.
|
|
50
|
+
@contentstack/cli-cm-import/1.13.1 linux-x64 node-v18.19.0
|
|
51
51
|
$ csdx --help [COMMAND]
|
|
52
52
|
USAGE
|
|
53
53
|
$ csdx COMMAND
|
|
@@ -112,6 +112,13 @@ class ModuleImporter {
|
|
|
112
112
|
if (this.importConfig.moduleName) {
|
|
113
113
|
args.push('--modules', this.importConfig.moduleName);
|
|
114
114
|
}
|
|
115
|
+
else if (this.importConfig.modules.types.length) {
|
|
116
|
+
this.importConfig.modules.types
|
|
117
|
+
.filter((val) => ['content-types', 'global-fields', 'entries'].includes(val))
|
|
118
|
+
.forEach((val) => {
|
|
119
|
+
args.push('--modules', val);
|
|
120
|
+
});
|
|
121
|
+
}
|
|
115
122
|
(0, utils_1.log)(this.importConfig, 'Starting audit process', 'info');
|
|
116
123
|
const result = await cli_audit_1.AuditFix.run(args);
|
|
117
124
|
(0, utils_1.log)(this.importConfig, 'Audit process completed', 'info');
|
|
@@ -133,7 +140,6 @@ class ModuleImporter {
|
|
|
133
140
|
return true;
|
|
134
141
|
}
|
|
135
142
|
catch (error) {
|
|
136
|
-
(0, utils_1.trace)(error);
|
|
137
143
|
(0, utils_1.log)(this.importConfig, `Audit failed with following error. ${error}`, 'error');
|
|
138
144
|
}
|
|
139
145
|
}
|
|
@@ -147,6 +147,15 @@ const removeReferenceFields = async function (schema, flag = { supressed: false
|
|
|
147
147
|
flag.supressed = true;
|
|
148
148
|
schema[i].reference_to = ['sys_assets'];
|
|
149
149
|
}
|
|
150
|
+
else if (
|
|
151
|
+
// handling entry references in rte
|
|
152
|
+
schema[i].data_type === 'text' &&
|
|
153
|
+
schema[i].field_metadata.rich_text_type &&
|
|
154
|
+
schema[i].field_metadata.embed_entry &&
|
|
155
|
+
schema[i].reference_to.length >= 1) {
|
|
156
|
+
flag.supressed = true;
|
|
157
|
+
schema[i].reference_to = ['sys_assets'];
|
|
158
|
+
}
|
|
150
159
|
}
|
|
151
160
|
};
|
|
152
161
|
exports.removeReferenceFields = removeReferenceFields;
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED