@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 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.4 linux-x64 node-v18.20.6
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
@@ -428,7 +428,7 @@ const config = {
428
428
  getEncryptionKeyMaxRetry: 3,
429
429
  // useBackedupDir: '',
430
430
  // backupConcurrency: 10,
431
- onlyTSModules: ['taxonomies'],
431
+ onlyTSModules: ['taxonomies', 'personalize'],
432
432
  auditConfig: {
433
433
  noLog: false,
434
434
  skipConfirm: true,
@@ -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
- return (_a = content === null || content === void 0 ? void 0 : content.publish_details) === null || _a === void 0 ? void 0 : _a.map((publish) => (Object.assign(Object.assign({}, content), { locale: publish.locale, publish_details: [publish] })));
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
- await this.makeConcurrentCall({
764
- apiContent,
765
- processName,
766
- indexerCount,
767
- currentIndexer: +index,
768
- apiParams: {
769
- reject: onReject,
770
- resolve: onSuccess,
771
- entity: 'publish-entries',
772
- includeParamOnCompletion: true,
773
- serializeData: this.serializePublishEntries.bind(this),
774
- additionalInfo: { contentType, locale, cTUid },
775
- },
776
- concurrencyLimit: this.importConcurrency,
777
- }).then(() => {
778
- (0, utils_1.log)(this.importConfig, `Published entries for content type ${cTUid} in locale ${locale}`, 'success');
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
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.19.4",
2
+ "version": "1.19.5",
3
3
  "commands": {
4
4
  "cm:stacks:import": {
5
5
  "id": "cm:stacks:import",
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",
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.1",
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",