@contentstack/cli-cm-import 1.19.4 → 1.19.5
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.js +1 -1
- package/lib/import/modules/entries.js +26 -18
- package/oclif.manifest.json +1 -1
- package/package.json +2 -2
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.19.
|
|
50
|
+
@contentstack/cli-cm-import/1.19.5 linux-x64 node-v22.14.0
|
|
51
51
|
$ csdx --help [COMMAND]
|
|
52
52
|
USAGE
|
|
53
53
|
$ csdx COMMAND
|
package/lib/config/index.js
CHANGED
|
@@ -757,26 +757,34 @@ class EntriesImport extends base_class_1.default {
|
|
|
757
757
|
let apiContentDuplicate = [];
|
|
758
758
|
apiContentDuplicate = apiContent.flatMap((content) => {
|
|
759
759
|
var _a;
|
|
760
|
-
|
|
760
|
+
if (((_a = content === null || content === void 0 ? void 0 : content.publish_details) === null || _a === void 0 ? void 0 : _a.length) > 0) {
|
|
761
|
+
return content.publish_details.map((publish) => (Object.assign(Object.assign({}, content), { locale: publish.locale, publish_details: [publish] })));
|
|
762
|
+
}
|
|
763
|
+
return []; // Return an empty array if publish_details is empty
|
|
761
764
|
});
|
|
762
765
|
apiContent = apiContentDuplicate;
|
|
763
|
-
|
|
764
|
-
|
|
765
|
-
|
|
766
|
-
|
|
767
|
-
|
|
768
|
-
|
|
769
|
-
|
|
770
|
-
|
|
771
|
-
|
|
772
|
-
|
|
773
|
-
|
|
774
|
-
|
|
775
|
-
|
|
776
|
-
|
|
777
|
-
|
|
778
|
-
|
|
779
|
-
|
|
766
|
+
if ((apiContent === null || apiContent === void 0 ? void 0 : apiContent.length) === 0) {
|
|
767
|
+
continue;
|
|
768
|
+
}
|
|
769
|
+
else {
|
|
770
|
+
await this.makeConcurrentCall({
|
|
771
|
+
apiContent,
|
|
772
|
+
processName,
|
|
773
|
+
indexerCount,
|
|
774
|
+
currentIndexer: +index,
|
|
775
|
+
apiParams: {
|
|
776
|
+
reject: onReject,
|
|
777
|
+
resolve: onSuccess,
|
|
778
|
+
entity: 'publish-entries',
|
|
779
|
+
includeParamOnCompletion: true,
|
|
780
|
+
serializeData: this.serializePublishEntries.bind(this),
|
|
781
|
+
additionalInfo: { contentType, locale, cTUid },
|
|
782
|
+
},
|
|
783
|
+
concurrencyLimit: this.importConcurrency,
|
|
784
|
+
}).then(() => {
|
|
785
|
+
(0, utils_1.log)(this.importConfig, `Published entries for content type ${cTUid} in locale ${locale}`, 'success');
|
|
786
|
+
});
|
|
787
|
+
}
|
|
780
788
|
}
|
|
781
789
|
}
|
|
782
790
|
}
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,13 +1,13 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/cli-cm-import",
|
|
3
3
|
"description": "Contentstack CLI plugin to import content into stack",
|
|
4
|
-
"version": "1.19.
|
|
4
|
+
"version": "1.19.5",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"bugs": "https://github.com/contentstack/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
8
|
"@contentstack/cli-audit": "~1.7.5",
|
|
9
9
|
"@contentstack/cli-command": "~1.3.3",
|
|
10
|
-
"@contentstack/cli-utilities": "~1.8.
|
|
10
|
+
"@contentstack/cli-utilities": "~1.8.2",
|
|
11
11
|
"@contentstack/management": "~1.18.4",
|
|
12
12
|
"@contentstack/cli-variants": "~1.1.5",
|
|
13
13
|
"@oclif/core": "^3.27.0",
|