Skip to content

Commit a34b8d2

Browse files
Merge pull request #800 from contentstack/staging
Main <- Staging : 17/05/2023 (NRP Changes)
2 parents 4bb1e73 + 4f51f12 commit a34b8d2

58 files changed

Lines changed: 649 additions & 435 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

package-lock.json

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

packages/contentstack-auth/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-auth
1818
$ csdx COMMAND
1919
running command...
2020
$ csdx (--version)
21-
@contentstack/cli-auth/1.3.4 darwin-arm64 node-v18.15.0
21+
@contentstack/cli-auth/1.3.5 darwin-arm64 node-v18.15.0
2222
$ csdx --help [COMMAND]
2323
USAGE
2424
$ csdx COMMAND

packages/contentstack-auth/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@contentstack/cli-auth",
33
"description": "Contentstack CLI plugin for authentication activities",
4-
"version": "1.3.4",
4+
"version": "1.3.5",
55
"author": "Contentstack",
66
"bugs": "https://github.com/contentstack/cli/issues",
77
"scripts": {
@@ -21,7 +21,7 @@
2121
"test:unit": "mocha --forbid-only \"test/unit/*.test.ts\""
2222
},
2323
"dependencies": {
24-
"@contentstack/cli-command": "^1.2.4",
24+
"@contentstack/cli-command": "^1.2.5",
2525
"@contentstack/cli-utilities": "^1.4.1",
2626
"chalk": "^4.0.0",
2727
"debug": "^4.1.1",

packages/contentstack-bootstrap/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ $ npm install -g @contentstack/cli-cm-bootstrap
1515
$ csdx COMMAND
1616
running command...
1717
$ csdx (--version)
18-
@contentstack/cli-cm-bootstrap/1.4.4 darwin-arm64 node-v18.15.0
18+
@contentstack/cli-cm-bootstrap/1.4.5 darwin-arm64 node-v18.15.0
1919
$ csdx --help [COMMAND]
2020
USAGE
2121
$ csdx COMMAND

packages/contentstack-bootstrap/package.json

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@contentstack/cli-cm-bootstrap",
33
"description": "Bootstrap contentstack apps",
4-
"version": "1.4.4",
4+
"version": "1.4.5",
55
"author": "Contentstack",
66
"bugs": "https://github.com/contentstack/cli/issues",
77
"scripts": {
@@ -17,8 +17,8 @@
1717
"test:report": "nyc --reporter=lcov mocha \"test/**/*.test.js\""
1818
},
1919
"dependencies": {
20-
"@contentstack/cli-cm-seed": "^1.4.4",
21-
"@contentstack/cli-command": "^1.2.4",
20+
"@contentstack/cli-cm-seed": "^1.4.5",
21+
"@contentstack/cli-command": "^1.2.5",
2222
"@contentstack/cli-utilities": "^1.4.1",
2323
"inquirer": "8.2.4",
2424
"mkdirp": "^1.0.4",

packages/contentstack-branches/README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ $ npm install -g @contentstack/cli-cm-branches
3838
$ csdx COMMAND
3939
running command...
4040
$ csdx (--version)
41-
@contentstack/cli-cm-branches/1.0.1 darwin-arm64 node-v18.15.0
41+
@contentstack/cli-cm-branches/1.0.2 darwin-arm64 node-v18.15.0
4242
$ csdx --help [COMMAND]
4343
USAGE
4444
$ csdx COMMAND

packages/contentstack-branches/package.json

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "@contentstack/cli-cm-branches",
33
"description": "Contentstack CLI plugin to do branches operations",
4-
"version": "1.0.1",
4+
"version": "1.0.2",
55
"author": "Contentstack",
66
"bugs": "https://github.com/contentstack/cli/issues",
77
"dependencies": {
8-
"@contentstack/cli-command": "^1.2.3",
8+
"@contentstack/cli-command": "^1.2.5",
99
"@contentstack/cli-utilities": "^1.4.0",
1010
"@oclif/command": "^1.8.16",
1111
"@oclif/config": "^1.18.3",
@@ -27,8 +27,8 @@
2727
"winston": "^3.7.2"
2828
},
2929
"devDependencies": {
30-
"@contentstack/cli-auth": "^1.3.4",
31-
"@contentstack/cli-config": "^1.4.2",
30+
"@contentstack/cli-auth": "^1.3.5",
31+
"@contentstack/cli-config": "^1.4.3",
3232
"@contentstack/cli-dev-dependencies": "^1.2.0",
3333
"@oclif/plugin-help": "^5.1.19",
3434
"@oclif/test": "^1.2.6",

packages/contentstack-bulk-publish/README.md

Lines changed: 27 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-cm-bulk-publish
1818
$ csdx COMMAND
1919
running command...
2020
$ csdx (--version)
21-
@contentstack/cli-cm-bulk-publish/1.3.3 darwin-arm64 node-v18.15.0
21+
@contentstack/cli-cm-bulk-publish/1.3.4 darwin-arm64 node-v18.15.0
2222
$ csdx --help [COMMAND]
2323
USAGE
2424
$ csdx COMMAND
@@ -72,6 +72,7 @@ FLAGS
7272
-e, --environments=<value>... Environments where assets will be published
7373
-l, --locales=<value>... Locales to where assets will be published
7474
-y, --yes Agree to process the command with the current configuration
75+
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
7576
--bulk-publish=<value> [default: true] By default this flag is set as true. It indicates that contentstack's
7677
bulkpublish API will be used to publish the assets
7778
--delivery-token=<value> Delivery token for source environment
@@ -134,13 +135,14 @@ Unpublish assets from given environment
134135
```
135136
USAGE
136137
$ csdx cm:assets:unpublish [-a <value>] [-e <value>] [-c <value>] [-y] [--locale <value>] [--branch <value>]
137-
[--retry-failed <value>] [--bulk-unpublish <value>] [--delivery-token <value>]
138+
[--retry-failed <value>] [--bulk-unpublish <value>] [--api-version <value>] [--delivery-token <value>]
138139
139140
FLAGS
140141
-a, --alias=<value> Alias(name) for the management token
141142
-c, --config=<value> Path to the config file
142143
-e, --environment=<value> Source Environment
143144
-y, --yes Agree to process the command with the current configuration
145+
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
144146
--branch=<value> [default: main] Specify the branch to fetch the content (by default the main branch is
145147
selected)
146148
--bulk-unpublish=<value> [default: true] By default this flag is set as true. It indicates that contentstack's
@@ -218,6 +220,7 @@ FLAGS
218220
-l, --locales=<value>... Locales where entries will be published
219221
-t, --contentTypes=<value>... The Contenttypes from which entries will be published
220222
-y, --yes Agree to process the command with the current configuration
223+
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
221224
--bulk-publish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
222225
bulkpublish API will be used to publish the entries
223226
--content-types=<value>... The Contenttypes from which entries will be published
@@ -281,6 +284,7 @@ FLAGS
281284
-e, --environments=<value>... Environments where assets will be published
282285
-l, --locales=<value>... Locales to where assets will be published
283286
-y, --yes Agree to process the command with the current configuration
287+
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
284288
--bulk-publish=<value> [default: true] By default this flag is set as true. It indicates that contentstack's
285289
bulkpublish API will be used to publish the assets
286290
--delivery-token=<value> Delivery token for source environment
@@ -403,6 +407,7 @@ FLAGS
403407
-a, --alias=<value> Alias(name) for the management token
404408
-c, --config=<value> Path to the config file
405409
-y, --yes Agree to process the command with the current configuration
410+
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
406411
--bulk-publish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
407412
bulkpublish API will be used to publish the entries
408413
--content-type=<value>... The Contenttypes from which entries will be published
@@ -475,6 +480,7 @@ FLAGS
475480
-e, --environments=<value>... Environments where entries will be published
476481
-l, --locales=<value>... Locales where entries will be published
477482
-y, --yes Agree to process the command with the current configuration
483+
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
478484
--bulk-publish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
479485
bulkpublish API will be used to publish the entries
480486
--content-types=<value>... The Contenttypes from which entries need to be published
@@ -550,6 +556,7 @@ FLAGS
550556
-e, --environments=<value>... Destination environments
551557
-l, --locales=<value>... Locales where edited entries will be published
552558
-y, --yes Agree to process the command with the current configuration
559+
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
553560
--bulk-publish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
554561
bulkpublish API will be used to publish the entries
555562
--content-types=<value>... The Contenttypes which will be checked for edited entries
@@ -615,6 +622,7 @@ FLAGS
615622
-c, --config=<value> Path to the config file
616623
-e, --environments=<value>... Destination environments
617624
-y, --yes Agree to process the command with the current configuration
625+
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
618626
--bulk-publish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
619627
bulkpublish API will be used to publish the entries
620628
--content-types=<value>... The Contenttypes from which entries will be published
@@ -711,6 +719,7 @@ FLAGS
711719
-e, --environment=<value> Source Environment
712720
-l, --locale=<value> Locale filter
713721
-y, --yes Agree to process the command with the current configuration
722+
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
714723
--bulk-unpublish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
715724
bulkpublish API will be used to unpublish the entries and assets
716725
--content-type=<value> Content type filter
@@ -802,6 +811,7 @@ FLAGS
802811
-c, --config=<value> Path to the config file
803812
-e, --environments=<value>... Destination environments
804813
-y, --yes Agree to process the command with the current configuration
814+
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
805815
--content-types=<value>... The Contenttypes from which entries will be published
806816
--locales=<value> Source locale
807817
--retry-failed=<value> Retry publishing failed entries from the logfile
@@ -867,6 +877,7 @@ FLAGS
867877
-e, --environments=<value>... Environments where entries will be published
868878
-l, --locales=<value>... Locales where entries will be published
869879
-y, --yes Agree to process the command with the current configuration
880+
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
870881
--bulk-publish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
871882
bulkpublish API will be used to publish the entries
872883
--content-types=<value>... The Contenttypes from which entries need to be published
@@ -944,6 +955,7 @@ FLAGS
944955
-e, --environments=<value>... Destination environments
945956
-l, --locales=<value>... Locales where edited entries will be published
946957
-y, --yes Agree to process the command with the current configuration
958+
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
947959
--bulk-publish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
948960
bulkpublish API will be used to publish the entries
949961
--content-types=<value>... The Contenttypes which will be checked for edited entries
@@ -1011,6 +1023,7 @@ FLAGS
10111023
-c, --config=<value> Path to the config file
10121024
-e, --environments=<value>... Destination environments
10131025
-y, --yes Agree to process the command with the current configuration
1026+
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
10141027
--bulk-publish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
10151028
bulkpublish API will be used to publish the entries
10161029
--content-types=<value>... The Contenttypes from which entries will be published
@@ -1078,6 +1091,7 @@ FLAGS
10781091
-c, --config=<value> Path to the config file
10791092
-e, --environments=<value>... Destination environments
10801093
-y, --yes Agree to process the command with the current configuration
1094+
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
10811095
--content-types=<value>... The Contenttypes from which entries will be published
10821096
--locales=<value> Source locale
10831097
--retry-failed=<value> Retry publishing failed entries from the logfile
@@ -1133,13 +1147,15 @@ Unpublish entries from the given environment
11331147
```
11341148
USAGE
11351149
$ csdx cm:entries:unpublish [-a <value>] [-e <value>] [-c <value>] [-y] [--locale <value>] [--branch <value>]
1136-
[--retry-failed <value>] [--bulk-unpublish <value>] [--content-type <value>] [--delivery-token <value>]
1150+
[--retry-failed <value>] [--bulk-unpublish <value>] [--api-version <value>] [--content-type <value>]
1151+
[--delivery-token <value>]
11371152
11381153
FLAGS
11391154
-a, --alias=<value> Alias(name) for the management token
11401155
-c, --config=<value> Path to the config file
11411156
-e, --environment=<value> Source Environment
11421157
-y, --yes Agree to process the command with the current configuration
1158+
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
11431159
--branch=<value> [default: main] Specify the branch to fetch the content (by default the main branch is
11441160
selected)
11451161
--bulk-unpublish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
@@ -1206,6 +1222,7 @@ FLAGS
12061222
-l, --locales=<value>... Locales where entries will be published
12071223
-t, --contentTypes=<value>... The Contenttypes from which entries will be published
12081224
-y, --yes Agree to process the command with the current configuration
1225+
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
12091226
--bulk-publish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
12101227
bulkpublish API will be used to publish the entries
12111228
--content-types=<value>... The Contenttypes from which entries will be published
@@ -1296,6 +1313,12 @@ EXAMPLES
12961313
Using --branch flag
12971314
12981315
$ csdx cm:stacks:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]
1316+
1317+
1318+
1319+
Using --api-version flag
1320+
1321+
$ csdx cm:stacks:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --api-version [API VERSION]
12991322
```
13001323

13011324
_See code: [src/commands/cm/stacks/publish.js](https://github.com/contentstack/cli/blob/main/packages/contentstack-bulk-publish/src/commands/cm/stacks/publish.js)_
@@ -1409,6 +1432,7 @@ FLAGS
14091432
-e, --environment=<value> Source Environment
14101433
-l, --locale=<value> Locale filter
14111434
-y, --yes Agree to process the command with the current configuration
1435+
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
14121436
--bulk-unpublish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
14131437
bulkpublish API will be used to unpublish the entries and assets
14141438
--content-type=<value> Content type filter

packages/contentstack-bulk-publish/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,11 @@
11
{
22
"name": "@contentstack/cli-cm-bulk-publish",
33
"description": "Contentstack CLI plugin for bulk publish actions",
4-
"version": "1.3.3",
4+
"version": "1.3.4",
55
"author": "Contentstack",
66
"bugs": "https://github.com/contentstack/cli/issues",
77
"dependencies": {
8-
"@contentstack/cli-command": "^1.2.4",
8+
"@contentstack/cli-command": "^1.2.5",
99
"@contentstack/cli-utilities": "^1.4.1",
1010
"bluebird": "^3.7.2",
1111
"chalk": "^4.1.2",

packages/contentstack-bulk-publish/src/commands/cm/assets/publish.js

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,8 @@ class AssetsPublishCommand extends Command {
1414
assetsFlags.retryFailed = assetsFlags['retry-failed'] || assetsFlags.retryFailed || false;
1515
assetsFlags.folderUid = assetsFlags['folder-uid'] || assetsFlags.folderUid;
1616
assetsFlags.bulkPublish = assetsFlags['bulk-publish'] || assetsFlags.bulkPublish;
17+
assetsFlags.apiVersion = assetsFlags['api-version'] || '3'; // setting default value for apiVersion
18+
delete assetsFlags['api-version']
1719
delete assetsFlags['retry-failed'];
1820
delete assetsFlags['folder-uid'];
1921
delete assetsFlags['bulk-publish'];
@@ -211,6 +213,9 @@ AssetsPublishCommand.flags = {
211213
hidden: true,
212214
parse: printFlagDeprecation(['-b', '--bulkPublish'], ['--bulk-publish']),
213215
}),
216+
'api-version': flags.string({
217+
description : "API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].",
218+
}),
214219
'delivery-token': flags.string({ description: 'Delivery token for source environment' }),
215220
'source-env': flags.string({ description: 'Source environment' }),
216221
'content-types': flags.string({ description: 'Content types', hidden: true, multiple: true }), // this is a work around, as this command is to be run with entries:publish command and should not break flags check.

0 commit comments

Comments
 (0)