Skip to content

Commit 04e2016

Browse files
Fixed merge conflits (#1647)
* Fixed merge conflits * Fixed variants publish issue when bulkPublishLimit is 1
1 parent f69e073 commit 04e2016

File tree

11 files changed

+2354
-1290
lines changed

11 files changed

+2354
-1290
lines changed

package-lock.json

Lines changed: 1926 additions & 976 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

packages/contentstack-audit/package.json

Lines changed: 16 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -24,32 +24,32 @@
2424
"@oclif/plugin-plugins": "^5.4.15",
2525
"chalk": "^4.1.2",
2626
"fast-csv": "^4.3.6",
27-
"fs-extra": "^11.1.1",
27+
"fs-extra": "^11.2.0",
2828
"lodash": "^4.17.21",
2929
"uuid": "^9.0.1",
30-
"winston": "^3.10.0"
30+
"winston": "^3.15.0"
3131
},
3232
"devDependencies": {
3333
"@contentstack/cli-dev-dependencies": "^1.2.4",
3434
"@oclif/test": "^2.5.6",
35-
"@types/chai": "^4.3.5",
36-
"@types/fs-extra": "^11.0.2",
37-
"@types/mocha": "^10.0.6",
38-
"@types/node": "^20.3.1",
39-
"@types/uuid": "^9.0.4",
40-
"chai": "^4.3.7",
41-
"eslint": "^8.43.0",
35+
"@types/chai": "^4.3.20",
36+
"@types/fs-extra": "^11.0.4",
37+
"@types/mocha": "^10.0.9",
38+
"@types/node": "^20.16.14",
39+
"@types/uuid": "^9.0.8",
40+
"chai": "^4.5.0",
41+
"eslint": "^8.57.1",
4242
"eslint-config-oclif": "^4.0.0",
43-
"eslint-config-oclif-typescript": "^3.0.8",
44-
"mocha": "^10.2.0",
43+
"eslint-config-oclif-typescript": "^3.1.12",
44+
"mocha": "^10.7.3",
4545
"nyc": "^15.1.0",
4646
"oclif": "^3",
4747
"shx": "^0.3.4",
48-
"sinon": "^19.0.0",
49-
"ts-jest": "^29.1.1",
50-
"ts-node": "^10.9.1",
51-
"tslib": "^2.5.3",
52-
"typescript": "^5.1.3"
48+
"sinon": "^19.0.2",
49+
"ts-jest": "^29.2.5",
50+
"ts-node": "^10.9.2",
51+
"tslib": "^2.8.0",
52+
"typescript": "^5.6.3"
5353
},
5454
"oclif": {
5555
"bin": "csdx",

packages/contentstack-auth/package.json

Lines changed: 19 additions & 19 deletions
Original file line numberDiff line numberDiff line change
@@ -24,35 +24,35 @@
2424
"dependencies": {
2525
"@contentstack/cli-command": "~1.3.2",
2626
"@contentstack/cli-utilities": "~1.8.0",
27-
"chalk": "^4.0.0",
27+
"chalk": "^4.1.2",
2828
"debug": "^4.1.1",
29-
"inquirer": "8.2.4",
30-
"winston": "^3.7.2"
29+
"inquirer": "8.2.6",
30+
"winston": "^3.15.0"
3131
},
3232
"devDependencies": {
3333
"@fancy-test/nock": "^0.1.1",
34-
"@oclif/plugin-help": "^5.1.19",
34+
"@oclif/plugin-help": "^5.2.20",
3535
"@oclif/test": "^2.5.6",
36-
"@types/chai": "^4.2.18",
37-
"@types/inquirer": "^9.0.3",
38-
"@types/mkdirp": "^1.0.1",
39-
"@types/mocha": "^8.2.2",
40-
"@types/node": "^14.14.32",
41-
"@types/sinon": "^10.0.2",
42-
"chai": "^4.3.4",
43-
"dotenv": "^16.0.3",
44-
"eslint": "^8.18.0",
36+
"@types/chai": "^4.3.20",
37+
"@types/inquirer": "^9.0.7",
38+
"@types/mkdirp": "^1.0.2",
39+
"@types/mocha": "^8.2.3",
40+
"@types/node": "^14.18.63",
41+
"@types/sinon": "^10.0.20",
42+
"chai": "^4.5.0",
43+
"dotenv": "^16.4.5",
44+
"eslint": "^8.57.1",
4545
"eslint-config-oclif": "^4.0.0",
46-
"eslint-config-oclif-typescript": "^3.0.8",
46+
"eslint-config-oclif-typescript": "^3.1.12",
4747
"globby": "^10.0.2",
48-
"mocha": "10.1.0",
48+
"mocha": "10.7.3",
4949
"nyc": "^15.1.0",
50-
"oclif": "^3.8.1",
50+
"oclif": "^3.17.2",
5151
"rimraf": "^2.7.1",
52-
"sinon": "^19.0.0",
52+
"sinon": "^19.0.2",
5353
"tmp": "^0.2.2",
54-
"ts-node": "^10.9.1",
55-
"typescript": "^4.9.3"
54+
"ts-node": "^10.9.2",
55+
"typescript": "^4.9.5"
5656
},
5757
"engines": {
5858
"node": ">=14.0.0"

packages/contentstack-bootstrap/package.json

Lines changed: 12 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -20,28 +20,28 @@
2020
"@contentstack/cli-cm-seed": "~1.10.0",
2121
"@contentstack/cli-command": "~1.3.2",
2222
"@contentstack/cli-utilities": "~1.8.0",
23-
"inquirer": "8.2.4",
23+
"inquirer": "8.2.6",
2424
"mkdirp": "^1.0.4",
2525
"tar": "^6.2.1 "
2626
},
2727
"devDependencies": {
2828
"@oclif/test": "^2.5.6",
29-
"@types/inquirer": "^9.0.3",
30-
"@types/mkdirp": "^1.0.1",
31-
"@types/node": "^14.14.32",
32-
"@types/tar": "^6.1.3",
33-
"chai": "^4.3.4",
34-
"eslint": "^8.18.0",
29+
"@types/inquirer": "^9.0.7",
30+
"@types/mkdirp": "^1.0.2",
31+
"@types/node": "^14.18.63",
32+
"@types/tar": "^6.1.13",
33+
"chai": "^4.5.0",
34+
"eslint": "^8.57.1",
3535
"eslint-config-oclif": "^4.0.0",
36-
"eslint-config-oclif-typescript": "^3.0.8",
36+
"eslint-config-oclif-typescript": "^3.1.12",
3737
"globby": "^10.0.2",
38-
"mocha": "10.1.0",
38+
"mocha": "10.7.3",
3939
"nyc": "^15.1.0",
40-
"oclif": "^3.8.1",
40+
"oclif": "^3.17.2",
4141
"rimraf": "^2.7.1",
42-
"tmp": "^0.2.2",
42+
"tmp": "^0.2.3",
4343
"ts-node": "^8.10.2",
44-
"typescript": "^4.9.3"
44+
"typescript": "^4.9.5"
4545
},
4646
"engines": {
4747
"node": ">=14.0.0"

packages/contentstack-branches/package.json

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,42 +8,42 @@
88
"@contentstack/cli-command": "~1.3.2",
99
"@contentstack/cli-utilities": "~1.8.0",
1010
"@oclif/core": "^3.26.5",
11-
"async": "^3.2.4",
11+
"async": "^3.2.6",
1212
"big-json": "^3.2.0",
1313
"bluebird": "^3.7.2",
1414
"chalk": "^4.1.2",
1515
"is-valid-path": "^0.1.1",
1616
"just-diff": "^6.0.2",
17-
"lodash": "^4.17.20",
17+
"lodash": "^4.17.21",
1818
"merge": "^2.1.1",
1919
"mkdirp": "^1.0.4",
2020
"path": "^0.12.7",
2121
"progress-stream": "^2.0.0",
2222
"promise-limit": "^2.7.0",
2323
"proxyquire": "^2.1.3",
24-
"tslib": "^2.4.1",
25-
"winston": "^3.7.2"
24+
"tslib": "^2.8.0",
25+
"winston": "^3.15.0"
2626
},
2727
"devDependencies": {
2828
"@contentstack/cli-auth": "~1.3.22",
2929
"@contentstack/cli-config": "~1.8.0",
3030
"@contentstack/cli-dev-dependencies": "~1.2.4",
31-
"@oclif/plugin-help": "^5.1.19",
31+
"@oclif/plugin-help": "^5.2.20",
3232
"@oclif/test": "^2.5.6",
33-
"@types/flat": "^5.0.2",
34-
"assert": "^2.0.0",
35-
"chai": "^4.2.0",
36-
"dotenv": "^16.0.1",
33+
"@types/flat": "^5.0.5",
34+
"assert": "^2.1.0",
35+
"chai": "^4.5.0",
36+
"dotenv": "^16.4.5",
3737
"dotenv-expand": "^9.0.0",
38-
"eslint": "^8.18.0",
38+
"eslint": "^8.57.1",
3939
"eslint-config-oclif": "^4.0.0",
4040
"globby": "^10.0.2",
41-
"mocha": "10.1.0",
41+
"mocha": "10.7.3",
4242
"nyc": "^15.1.0",
43-
"oclif": "^3.1.2",
44-
"sinon": "^19.0.0",
45-
"ts-node": "^10.9.1",
46-
"typescript": "^4.9.3"
43+
"oclif": "^3.17.2",
44+
"sinon": "^19.0.2",
45+
"ts-node": "^10.9.2",
46+
"typescript": "^4.9.5"
4747
},
4848
"scripts": {
4949
"build": "npm run clean && npm run compile",

packages/contentstack-bulk-publish/package.json

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -9,23 +9,23 @@
99
"@contentstack/cli-utilities": "~1.8.0",
1010
"bluebird": "^3.7.2",
1111
"chalk": "^4.1.2",
12-
"dotenv": "^16.1.4",
13-
"inquirer": "8.2.4",
14-
"lodash": "^4.17.15",
12+
"dotenv": "^16.4.5",
13+
"inquirer": "8.2.6",
14+
"lodash": "^4.17.21",
1515
"mkdirp": "^1.0.4",
16-
"nock": "^13.0.2",
17-
"winston": "^3.7.2"
16+
"nock": "^13.5.5",
17+
"winston": "^3.15.0"
1818
},
1919
"devDependencies": {
2020
"@oclif/test": "^2.5.6",
21-
"chai": "^4.2.0",
22-
"eslint": "^8.18.0",
21+
"chai": "^4.5.0",
22+
"eslint": "^8.57.1",
2323
"eslint-config-oclif": "^4.0.0",
2424
"globby": "^10.0.2",
25-
"mocha": "^10.0.0",
25+
"mocha": "^10.7.3",
2626
"nyc": "^15.1.0",
27-
"oclif": "^3.8.1",
28-
"tslib": "^1.13.0"
27+
"oclif": "^3.17.2",
28+
"tslib": "^1.14.1"
2929
},
3030
"engines": {
3131
"node": ">=14.0.0"

packages/contentstack-bulk-publish/src/producer/cross-publish.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ async function bulkAction(stack, items, bulkPublish, filter, destEnv, apiVersion
5050
publish_details: [items[index].data.publish_details] || [],
5151
};
5252

53-
if (variantsFlag) {
53+
if (variantsFlag && Array.isArray(items[index].data.variants) && items[index].data.variants.length > 0) {
5454
entry.variants = items[index].data.variants || [];
5555
entry.variant_rules = {
5656
publish_latest_base: false,

packages/contentstack-bulk-publish/src/producer/unpublish.js

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,6 @@ function bulkAction(stack, items, bulkUnpublish, environment, locale, apiVersion
6969
if (variantsFlag && Array.isArray(items[index].data.variants) && items[index].data.variants.length > 0) {
7070
const entryWithVariants = { ...entryData, variants: items[index].data.variants };
7171
bulkUnPublishSet.push(entryWithVariants);
72-
bulkUnPublishSet.push(entryData);
7372
} else {
7473
bulkUnPublishSet.push(entryData);
7574
}
@@ -215,13 +214,16 @@ async function getSyncEntries(
215214
syncData['type'] = queryParamsObj.type;
216215
}
217216

218-
let entriesResponse = await Stack.sync(syncData);
217+
const entriesResponse = await Stack.sync(syncData);
219218
if (entriesResponse.items.length > 0) {
220219
if (variantsFlag) {
221220
queryParamsObj.apiVersion = VARIANTS_UNPUBLISH_API_VERSION;
222-
entriesResponse.items = await attachVariantsToItems(stack, entriesResponse.items, queryParamsObj); // with variants data
221+
const itemsWithVariants = await attachVariantsToItems(stack, entriesResponse.items, queryParamsObj);
222+
// Call bulkAction for entries with variants
223+
await bulkAction(stack, itemsWithVariants, bulkUnpublish, environment, locale, apiVersion, bulkPublishLimit, variantsFlag);
223224
}
224-
await bulkAction(stack, entriesResponse.items, bulkUnpublish, environment, locale, apiVersion, variantsFlag, bulkPublishLimit);
225+
// Call bulkAction for entries without variants
226+
await bulkAction(stack, entriesResponse.items, bulkUnpublish, environment, locale, apiVersion, bulkPublishLimit, false);
225227
}
226228

227229
if (entriesResponse.items.length === 0) {
@@ -248,7 +250,6 @@ async function getSyncEntries(
248250
}
249251
});
250252
}
251-
252253
async function attachVariantsToItems(stack, items, queryParams) {
253254
for (const item of items) {
254255
const { content_type_uid, data } = item;
@@ -375,4 +376,4 @@ module.exports = {
375376
setConfig,
376377
getQueryParams,
377378
start,
378-
};
379+
};

packages/contentstack/README.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli
1818
$ csdx COMMAND
1919
running command...
2020
$ csdx (--version|-v)
21-
@contentstack/cli/1.28.1 darwin-arm64 node-v22.2.0
21+
@contentstack/cli/1.29.0 darwin-arm64 node-v22.2.0
2222
$ csdx --help [COMMAND]
2323
USAGE
2424
$ csdx COMMAND
@@ -3634,7 +3634,7 @@ EXAMPLES
36343634
$ csdx plugins
36353635
```
36363636

3637-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/index.ts)_
3637+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.15/src/commands/plugins/index.ts)_
36383638

36393639
## `csdx plugins:add PLUGIN`
36403640

@@ -3708,7 +3708,7 @@ EXAMPLES
37083708
$ csdx plugins:inspect myplugin
37093709
```
37103710

3711-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/inspect.ts)_
3711+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.15/src/commands/plugins/inspect.ts)_
37123712

37133713
## `csdx plugins:install PLUGIN`
37143714

@@ -3757,7 +3757,7 @@ EXAMPLES
37573757
$ csdx plugins:install someuser/someplugin
37583758
```
37593759

3760-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/install.ts)_
3760+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.15/src/commands/plugins/install.ts)_
37613761

37623762
## `csdx plugins:link PATH`
37633763

@@ -3788,7 +3788,7 @@ EXAMPLES
37883788
$ csdx plugins:link myplugin
37893789
```
37903790

3791-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/link.ts)_
3791+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.15/src/commands/plugins/link.ts)_
37923792

37933793
## `csdx plugins:remove [PLUGIN]`
37943794

@@ -3829,7 +3829,7 @@ FLAGS
38293829
--reinstall Reinstall all plugins after uninstalling.
38303830
```
38313831

3832-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/reset.ts)_
3832+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.15/src/commands/plugins/reset.ts)_
38333833

38343834
## `csdx plugins:uninstall [PLUGIN]`
38353835

@@ -3857,7 +3857,7 @@ EXAMPLES
38573857
$ csdx plugins:uninstall myplugin
38583858
```
38593859

3860-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/uninstall.ts)_
3860+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.15/src/commands/plugins/uninstall.ts)_
38613861

38623862
## `csdx plugins:unlink [PLUGIN]`
38633863

@@ -3901,7 +3901,7 @@ DESCRIPTION
39013901
Update installed plugins.
39023902
```
39033903

3904-
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/update.ts)_
3904+
_See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.15/src/commands/plugins/update.ts)_
39053905

39063906
## `csdx tokens`
39073907

0 commit comments

Comments
 (0)