@contentstack/cli-cm-branches 1.0.12 → 1.0.13

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
@@ -37,7 +37,7 @@ $ npm install -g @contentstack/cli-cm-branches
37
37
  $ csdx COMMAND
38
38
  running command...
39
39
  $ csdx (--version)
40
- @contentstack/cli-cm-branches/1.0.12 linux-x64 node-v18.17.1
40
+ @contentstack/cli-cm-branches/1.0.13 linux-x64 node-v18.17.1
41
41
  $ csdx --help [COMMAND]
42
42
  USAGE
43
43
  $ csdx COMMAND
@@ -468,7 +468,9 @@ function entryCreateScript(contentType) {
468
468
  .query({ query: { title: compareRefEntry.title } })
469
469
  .find();
470
470
 
471
- updateValueByPath(entryDetails, references[i], baseRefEntry.items[0].uid);
471
+ if(baseRefEntry?.items?.length > 0 && baseRefEntry.items[0]?.uid){
472
+ updateValueByPath(entryDetails, references[i], baseRefEntry.items[0].uid);
473
+ }
472
474
  }
473
475
  }
474
476
  }
@@ -487,7 +487,9 @@ function entryCreateUpdateScript(contentType) {
487
487
  .query({ query: { title: compareRefEntry.title } })
488
488
  .find();
489
489
 
490
- updateValueByPath(entryDetails, references[i], baseRefEntry.items[0].uid);
490
+ if(baseRefEntry?.items?.length > 0 && baseRefEntry.items[0]?.uid){
491
+ updateValueByPath(entryDetails, references[i], baseRefEntry.items[0].uid);
492
+ }
491
493
  }
492
494
  }
493
495
  }
@@ -486,7 +486,9 @@ function entryUpdateScript(contentType) {
486
486
  .query({ query: { title: compareRefEntry.title } })
487
487
  .find();
488
488
 
489
- updateValueByPath(entryDetails, references[i], baseRefEntry.items[0].uid);
489
+ if(baseRefEntry?.items?.length > 0 && baseRefEntry.items[0]?.uid){
490
+ updateValueByPath(entryDetails, references[i], baseRefEntry.items[0].uid);
491
+ }
490
492
  }
491
493
  }
492
494
  }
@@ -1,5 +1,5 @@
1
1
  {
2
- "version": "1.0.12",
2
+ "version": "1.0.13",
3
3
  "commands": {
4
4
  "cm:branches:create": {
5
5
  "id": "cm:branches:create",
package/package.json CHANGED
@@ -1,14 +1,12 @@
1
1
  {
2
2
  "name": "@contentstack/cli-cm-branches",
3
3
  "description": "Contentstack CLI plugin to do branches operations",
4
- "version": "1.0.12",
4
+ "version": "1.0.13",
5
5
  "author": "Contentstack",
6
6
  "bugs": "https://github.com/contentstack/cli/issues",
7
7
  "dependencies": {
8
8
  "@contentstack/cli-command": "~1.2.12",
9
9
  "@contentstack/cli-utilities": "~1.5.2",
10
- "@oclif/command": "^1.8.16",
11
- "@oclif/config": "^1.18.3",
12
10
  "@oclif/core": "^2.9.3",
13
11
  "async": "^3.2.4",
14
12
  "big-json": "^3.2.0",