@contentstack/cli-cm-bulk-publish 1.0.0 → 1.0.1
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 +19 -22
- package/oclif.manifest.json +1 -1
- package/package.json +3 -3
- package/src/commands/cm/assets/publish.js +41 -31
- package/src/consumer/publish.js +4 -2
- package/src/producer/cross-publish.js +6 -5
- package/src/util/index.js +31 -28
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-cm-bulk-publish
|
|
|
18
18
|
$ csdx COMMAND
|
|
19
19
|
running command...
|
|
20
20
|
$ csdx (-v|--version|version)
|
|
21
|
-
@contentstack/cli-cm-bulk-publish/1.0.
|
|
21
|
+
@contentstack/cli-cm-bulk-publish/1.0.1 darwin-arm64 node-v16.17.0
|
|
22
22
|
$ csdx --help [COMMAND]
|
|
23
23
|
USAGE
|
|
24
24
|
$ csdx COMMAND
|
|
@@ -29,7 +29,7 @@ USAGE
|
|
|
29
29
|
# Commands
|
|
30
30
|
|
|
31
31
|
<!-- commands -->
|
|
32
|
-
* [`csdx cm:assets:publish [-a <value>] [--retry-failed <value>] [-e <value>] [--folder-uid <value>] [--bulk-publish <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>] [--delivery-token <value>] [--source-env <value>]
|
|
32
|
+
* [`csdx cm:assets:publish [-a <value>] [--retry-failed <value>] [-e <value>] [--folder-uid <value>] [--bulk-publish <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>] [--delivery-token <value>] [--source-env <value>]`](#csdx-cmassetspublish--a-value---retry-failed-value--e-value---folder-uid-value---bulk-publish-value--c-value--y---locales-value---branch-value---delivery-token-value---source-env-value)
|
|
33
33
|
* [`csdx cm:assets:unpublish`](#csdx-cmassetsunpublish)
|
|
34
34
|
* [`csdx cm:bulk-publish`](#csdx-cmbulk-publish)
|
|
35
35
|
* [`csdx cm:bulk-publish:cross-publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--content-type <value>] [--locales <value>] [--source-env <value>] [--environments <value>] [--delivery-token <value>] [-c <value>] [-y] [--branch <value>] [--onlyAssets] [--onlyEntries]`](#csdx-cmbulk-publishcross-publish--a-value---retry-failed-value---bulk-publish-value---content-type-value---locales-value---source-env-value---environments-value---delivery-token-value--c-value--y---branch-value---onlyassets---onlyentries)
|
|
@@ -45,15 +45,14 @@ USAGE
|
|
|
45
45
|
* [`csdx cm:stacks:publish-revert`](#csdx-cmstackspublish-revert)
|
|
46
46
|
* [`csdx csdx cm:stacks:unpublish [-a <value>] [-e <value>] [-c <value>] [-y] [--locale <value>] [--branch <value>] [--retry-failed <value>] [--bulk-unpublish <value>] [--content-type <value>] [--delivery-token <value>] [--only-assets] [--only-entries]`](#csdx-csdx-cmstacksunpublish--a-value--e-value--c-value--y---locale-value---branch-value---retry-failed-value---bulk-unpublish-value---content-type-value---delivery-token-value---only-assets---only-entries)
|
|
47
47
|
|
|
48
|
-
## `csdx cm:assets:publish [-a <value>] [--retry-failed <value>] [-e <value>] [--folder-uid <value>] [--bulk-publish <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>] [--delivery-token <value>] [--source-env <value>]
|
|
48
|
+
## `csdx cm:assets:publish [-a <value>] [--retry-failed <value>] [-e <value>] [--folder-uid <value>] [--bulk-publish <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>] [--delivery-token <value>] [--source-env <value>]`
|
|
49
49
|
|
|
50
50
|
Publish assets to the specified environments
|
|
51
51
|
|
|
52
52
|
```
|
|
53
53
|
USAGE
|
|
54
54
|
$ csdx cm:assets:publish [-a <value>] [--retry-failed <value>] [-e <value>] [--folder-uid <value>] [--bulk-publish
|
|
55
|
-
<value>] [-c <value>] [-y] [--locales <value>] [--branch <value>] [--delivery-token <value>] [--source-env <value>]
|
|
56
|
-
[--content-types <value>]
|
|
55
|
+
<value>] [-c <value>] [-y] [--locales <value>] [--branch <value>] [--delivery-token <value>] [--source-env <value>]
|
|
57
56
|
|
|
58
57
|
OPTIONS
|
|
59
58
|
-B, --branch=branch [default: main] Specify the branch to fetch the content (by default the main branch
|
|
@@ -72,8 +71,6 @@ OPTIONS
|
|
|
72
71
|
--bulk-publish=bulk-publish [default: true] By default this flag is set as true. It indicates that contentstack's
|
|
73
72
|
bulkpublish API will be used to publish the assets
|
|
74
73
|
|
|
75
|
-
--content-types=content-types Content types
|
|
76
|
-
|
|
77
74
|
--delivery-token=delivery-token Delivery token for source environment
|
|
78
75
|
|
|
79
76
|
--folder-uid=folder-uid [default: cs_root] Folder-uid from where the assets will be published
|
|
@@ -114,7 +111,7 @@ EXAMPLES
|
|
|
114
111
|
ALIAS] --source-env [SOURCE ENVIRONMENT] --delivery-token [DELIVERY TOKEN]
|
|
115
112
|
```
|
|
116
113
|
|
|
117
|
-
_See code: [src/commands/cm/assets/publish.js](https://github.com/contentstack/cli/blob/v1.0.
|
|
114
|
+
_See code: [src/commands/cm/assets/publish.js](https://github.com/contentstack/cli/blob/v1.0.1/packages/contentstack-bulk-publish/src/commands/cm/assets/publish.js)_
|
|
118
115
|
|
|
119
116
|
## `csdx cm:assets:unpublish`
|
|
120
117
|
|
|
@@ -166,7 +163,7 @@ EXAMPLES
|
|
|
166
163
|
ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]
|
|
167
164
|
```
|
|
168
165
|
|
|
169
|
-
_See code: [src/commands/cm/assets/unpublish.js](https://github.com/contentstack/cli/blob/v1.0.
|
|
166
|
+
_See code: [src/commands/cm/assets/unpublish.js](https://github.com/contentstack/cli/blob/v1.0.1/packages/contentstack-bulk-publish/src/commands/cm/assets/unpublish.js)_
|
|
170
167
|
|
|
171
168
|
## `csdx cm:bulk-publish`
|
|
172
169
|
|
|
@@ -177,7 +174,7 @@ USAGE
|
|
|
177
174
|
$ csdx cm:bulk-publish
|
|
178
175
|
```
|
|
179
176
|
|
|
180
|
-
_See code: [src/commands/cm/bulk-publish/index.js](https://github.com/contentstack/cli/blob/v1.0.
|
|
177
|
+
_See code: [src/commands/cm/bulk-publish/index.js](https://github.com/contentstack/cli/blob/v1.0.1/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/index.js)_
|
|
181
178
|
|
|
182
179
|
## `csdx cm:bulk-publish:cross-publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--content-type <value>] [--locales <value>] [--source-env <value>] [--environments <value>] [--delivery-token <value>] [-c <value>] [-y] [--branch <value>] [--onlyAssets] [--onlyEntries]`
|
|
183
180
|
|
|
@@ -245,7 +242,7 @@ EXAMPLES
|
|
|
245
242
|
ENVIRONMENT] --locales [LOCALE] -a [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]
|
|
246
243
|
```
|
|
247
244
|
|
|
248
|
-
_See code: [src/commands/cm/bulk-publish/cross-publish.js](https://github.com/contentstack/cli/blob/v1.0.
|
|
245
|
+
_See code: [src/commands/cm/bulk-publish/cross-publish.js](https://github.com/contentstack/cli/blob/v1.0.1/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/cross-publish.js)_
|
|
249
246
|
|
|
250
247
|
## `csdx cm:entries:publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--publish-all-content-types] [--content-types <value>] [--locales <value>] [-e <value>] [-c <value>] [-y] [--branch <value>] [--delivery-token <value>] [--source-env <value>]`
|
|
251
248
|
|
|
@@ -321,7 +318,7 @@ EXAMPLES
|
|
|
321
318
|
[LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS] --source-env [SOURCE ENVIRONMENT] --delivery-token [DELIVERY TOKEN]
|
|
322
319
|
```
|
|
323
320
|
|
|
324
|
-
_See code: [src/commands/cm/entries/publish.js](https://github.com/contentstack/cli/blob/v1.0.
|
|
321
|
+
_See code: [src/commands/cm/entries/publish.js](https://github.com/contentstack/cli/blob/v1.0.1/packages/contentstack-bulk-publish/src/commands/cm/entries/publish.js)_
|
|
325
322
|
|
|
326
323
|
## `csdx cm:entries:publish-modified [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--source-env <value>] [--content-types <value>] [--locales <value>] [-e <value>] [-c <value>] [-y] [--branch <value>]`
|
|
327
324
|
|
|
@@ -386,7 +383,7 @@ EXAMPLES
|
|
|
386
383
|
[ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]
|
|
387
384
|
```
|
|
388
385
|
|
|
389
|
-
_See code: [src/commands/cm/entries/publish-modified.js](https://github.com/contentstack/cli/blob/v1.0.
|
|
386
|
+
_See code: [src/commands/cm/entries/publish-modified.js](https://github.com/contentstack/cli/blob/v1.0.1/packages/contentstack-bulk-publish/src/commands/cm/entries/publish-modified.js)_
|
|
390
387
|
|
|
391
388
|
## `csdx cm:entries:publish-non-localized-fields [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--source-env <value>] [--content-types <value>] [-e <value>] [-c <value>] [-y] [--branch <value>]`
|
|
392
389
|
|
|
@@ -446,7 +443,7 @@ EXAMPLES
|
|
|
446
443
|
[ENVIRONMENT 1] [ENVIRONMENT 2] --alias [MANAGEMENT TOKEN ALIAS] --source-env [SOURCE ENV] --branch [BRANCH NAME]
|
|
447
444
|
```
|
|
448
445
|
|
|
449
|
-
_See code: [src/commands/cm/entries/publish-non-localized-fields.js](https://github.com/contentstack/cli/blob/v1.0.
|
|
446
|
+
_See code: [src/commands/cm/entries/publish-non-localized-fields.js](https://github.com/contentstack/cli/blob/v1.0.1/packages/contentstack-bulk-publish/src/commands/cm/entries/publish-non-localized-fields.js)_
|
|
450
447
|
|
|
451
448
|
## `csdx cm:entries:publish-only-unpublished [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--source-env <value>] [--content-types <value>] [--locales <value>] [-e <value>] [-c <value>] [-y] [--branch <value>]`
|
|
452
449
|
|
|
@@ -509,7 +506,7 @@ EXAMPLES
|
|
|
509
506
|
[MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME] -source-env [SOURCE ENV]
|
|
510
507
|
```
|
|
511
508
|
|
|
512
|
-
_See code: [src/commands/cm/entries/publish-only-unpublished.js](https://github.com/contentstack/cli/blob/v1.0.
|
|
509
|
+
_See code: [src/commands/cm/entries/publish-only-unpublished.js](https://github.com/contentstack/cli/blob/v1.0.1/packages/contentstack-bulk-publish/src/commands/cm/entries/publish-only-unpublished.js)_
|
|
513
510
|
|
|
514
511
|
## `csdx cm:entries:unpublish`
|
|
515
512
|
|
|
@@ -564,7 +561,7 @@ EXAMPLES
|
|
|
564
561
|
--alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]
|
|
565
562
|
```
|
|
566
563
|
|
|
567
|
-
_See code: [src/commands/cm/entries/unpublish.js](https://github.com/contentstack/cli/blob/v1.0.
|
|
564
|
+
_See code: [src/commands/cm/entries/unpublish.js](https://github.com/contentstack/cli/blob/v1.0.1/packages/contentstack-bulk-publish/src/commands/cm/entries/unpublish.js)_
|
|
568
565
|
|
|
569
566
|
## `csdx cm:entries:update-and-publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--content-types <value>] [-t <value>] [-e <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>]`
|
|
570
567
|
|
|
@@ -629,7 +626,7 @@ EXAMPLES
|
|
|
629
626
|
2] --locale [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]
|
|
630
627
|
```
|
|
631
628
|
|
|
632
|
-
_See code: [src/commands/cm/entries/update-and-publish.js](https://github.com/contentstack/cli/blob/v1.0.
|
|
629
|
+
_See code: [src/commands/cm/entries/update-and-publish.js](https://github.com/contentstack/cli/blob/v1.0.1/packages/contentstack-bulk-publish/src/commands/cm/entries/update-and-publish.js)_
|
|
633
630
|
|
|
634
631
|
## `csdx cm:stacks:publish`
|
|
635
632
|
|
|
@@ -664,7 +661,7 @@ EXAMPLES
|
|
|
664
661
|
ALIAS] --branch [BRANCH NAME]
|
|
665
662
|
```
|
|
666
663
|
|
|
667
|
-
_See code: [src/commands/cm/stacks/publish.js](https://github.com/contentstack/cli/blob/v1.0.
|
|
664
|
+
_See code: [src/commands/cm/stacks/publish.js](https://github.com/contentstack/cli/blob/v1.0.1/packages/contentstack-bulk-publish/src/commands/cm/stacks/publish.js)_
|
|
668
665
|
|
|
669
666
|
## `csdx cm:stacks:publish-clear-logs`
|
|
670
667
|
|
|
@@ -688,7 +685,7 @@ EXAMPLES
|
|
|
688
685
|
csdx cm:stacks:publish-clear-logs -y
|
|
689
686
|
```
|
|
690
687
|
|
|
691
|
-
_See code: [src/commands/cm/stacks/publish-clear-logs.js](https://github.com/contentstack/cli/blob/v1.0.
|
|
688
|
+
_See code: [src/commands/cm/stacks/publish-clear-logs.js](https://github.com/contentstack/cli/blob/v1.0.1/packages/contentstack-bulk-publish/src/commands/cm/stacks/publish-clear-logs.js)_
|
|
692
689
|
|
|
693
690
|
## `csdx cm:stacks:publish-configure`
|
|
694
691
|
|
|
@@ -710,7 +707,7 @@ EXAMPLES
|
|
|
710
707
|
csdx cm:stacks:publish-configure --alias <management_token_alias>
|
|
711
708
|
```
|
|
712
709
|
|
|
713
|
-
_See code: [src/commands/cm/stacks/publish-configure.js](https://github.com/contentstack/cli/blob/v1.0.
|
|
710
|
+
_See code: [src/commands/cm/stacks/publish-configure.js](https://github.com/contentstack/cli/blob/v1.0.1/packages/contentstack-bulk-publish/src/commands/cm/stacks/publish-configure.js)_
|
|
714
711
|
|
|
715
712
|
## `csdx cm:stacks:publish-revert`
|
|
716
713
|
|
|
@@ -739,7 +736,7 @@ EXAMPLES
|
|
|
739
736
|
cm:bulk-publish:revert --retry-failed [LOG FILE NAME]
|
|
740
737
|
```
|
|
741
738
|
|
|
742
|
-
_See code: [src/commands/cm/stacks/publish-revert.js](https://github.com/contentstack/cli/blob/v1.0.
|
|
739
|
+
_See code: [src/commands/cm/stacks/publish-revert.js](https://github.com/contentstack/cli/blob/v1.0.1/packages/contentstack-bulk-publish/src/commands/cm/stacks/publish-revert.js)_
|
|
743
740
|
|
|
744
741
|
## `csdx csdx cm:stacks:unpublish [-a <value>] [-e <value>] [-c <value>] [-y] [--locale <value>] [--branch <value>] [--retry-failed <value>] [--bulk-unpublish <value>] [--content-type <value>] [--delivery-token <value>] [--only-assets] [--only-entries]`
|
|
745
742
|
|
|
@@ -817,5 +814,5 @@ EXAMPLES
|
|
|
817
814
|
--alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]
|
|
818
815
|
```
|
|
819
816
|
|
|
820
|
-
_See code: [src/commands/cm/stacks/unpublish.js](https://github.com/contentstack/cli/blob/v1.0.
|
|
817
|
+
_See code: [src/commands/cm/stacks/unpublish.js](https://github.com/contentstack/cli/blob/v1.0.1/packages/contentstack-bulk-publish/src/commands/cm/stacks/unpublish.js)_
|
|
821
818
|
<!-- commandsstop -->
|
package/oclif.manifest.json
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":"1.0.0","commands":{"cm:assets:publish":{"id":"cm:assets:publish","description":"Publish assets to the specified environments\nThe assets command is used to publish assets from the specified stack, to the specified environments\n\nNote: Environment(s) and Locale(s) are required to execute the command successfully\nBut, if retryFailed flag is set, then only a logfile is required\n","usage":"cm:assets:publish [-a <value>] [--retry-failed <value>] [-e <value>] [--folder-uid <value>] [--bulk-publish <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>] [--delivery-token <value>] [--source-env <value>] [--content-types <value>]","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":["cm:bulk-publish:assets"],"examples":["General Usage","csdx cm:assets:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:stacks:publish-configure -a [ALIAS]`","csdx cm:assets:publish --config [PATH TO CONFIG FILE]","csdx cm:assets:publish -c [PATH TO CONFIG FILE]","","Using --retry-failed flag","csdx cm:assets:publish --retry-failed [LOG FILE NAME]","","Using --branch flag","csdx cm:assets:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]","","Using --source-env","csdx cm:assets:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --source-env [SOURCE ENVIRONMENT] --delivery-token [DELIVERY TOKEN]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"},"retry-failed":{"name":"retry-failed","type":"option","description":"Retry publishing failed assets from the logfile (optional, will override all other flags)"},"environments":{"name":"environments","type":"option","char":"e","description":"Environments where assets will be published"},"folder-uid":{"name":"folder-uid","type":"option","description":"[default: cs_root] Folder-uid from where the assets will be published"},"bulk-publish":{"name":"bulk-publish","type":"option","description":"By default this flag is set as true. It indicates that contentstack's bulkpublish API will be used to publish the assets","default":"true"},"config":{"name":"config","type":"option","char":"c","description":"Path to the config file"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"locales":{"name":"locales","type":"option","char":"l","description":"Locales to where assets will be published"},"branch":{"name":"branch","type":"option","char":"B","description":"Specify the branch to fetch the content (by default the main branch is selected)","default":"main"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed assets from the logfile (optional, will override all other flags)","hidden":true},"folderUid":{"name":"folderUid","type":"option","char":"u","description":"[default: cs_root] Folder-uid from where the assets will be published","hidden":true},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"By default this flag is set as true. It indicates that contentstack's bulkpublish API will be used to publish the entries","hidden":true},"delivery-token":{"name":"delivery-token","type":"option","description":"Delivery token for source environment"},"source-env":{"name":"source-env","type":"option","description":"Source environment"},"content-types":{"name":"content-types","type":"option","description":"Content types"}},"args":[]},"cm:assets:unpublish":{"id":"cm:assets:unpublish","description":"Unpublish assets from given environment\nThe unpublish command is used for unpublishing assets from the given environment\n\nNote: Environment (Source Environment) and Locale are required to execute the command successfully\nBut, if retry-failed flag is set, then only a logfile is required","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:assets:unpublish --bulk-unpublish --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure --alias [ALIAS]`","csdx cm:assets:unpublish --config [PATH TO CONFIG FILE]","csdx cm:assets:unpublish -c [PATH TO CONFIG FILE]","","Using --retry-failed flag","csdx cm:assets:unpublish --retry-failed [LOG FILE NAME]","","Using --branch flag","csdx cm:assets:unpublish --bulk-unpublish --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"},"environment":{"name":"environment","type":"option","char":"e","description":"Source Environment"},"config":{"name":"config","type":"option","char":"c","description":"Path to the config file"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"locale":{"name":"locale","type":"option","description":"Locale filter"},"branch":{"name":"branch","type":"option","description":"Specify the branch to fetch the content (by default the main branch is selected)","default":"main"},"retry-failed":{"name":"retry-failed","type":"option","description":"Retry unpublishing failed assets from the logfile"},"bulk-unpublish":{"name":"bulk-unpublish","type":"option","description":"By default this flag is set as true. It indicates that contentstack's bulkpublish API will be used to unpublish the assets","default":"true"},"delivery-token":{"name":"delivery-token","type":"option","description":"Delivery Token for source environment"}},"args":[]},"cm:bulk-publish:cross-publish":{"id":"cm:bulk-publish:cross-publish","description":"Publish entries and assets from one environment to other environments\nThe cross-publish command is used to publish entries and assets from one environment to other environments\n\nNote: Content Type, Environment, Destination Environment(s) and Locale are required to execute the command successfully\nBut, if retryFailed flag is set, then only a logfile is required\n","usage":"cm:bulk-publish:cross-publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--content-type <value>] [--locales <value>] [--source-env <value>] [--environments <value>] [--delivery-token <value>] [-c <value>] [-y] [--branch <value>] [--onlyAssets] [--onlyEntries]","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:bulk-publish:cross-publish --content-type [CONTENT TYPE] --source-env [SOURCE ENV] --environments [DESTINATION ENVIRONMENT] --locales [LOCALE] -a [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:bulk-publish:cross-publish --config [PATH TO CONFIG FILE]","csdx cm:bulk-publish:cross-publish -c [PATH TO CONFIG FILE]","","Using --retry-failed flag","csdx cm:bulk-publish:cross-publish --retry-failed [LOG FILE NAME]","csdx cm:bulk-publish:cross-publish -r [LOG FILE NAME]","","Using --branch flag","csdx cm:bulk-publish:cross-publish --content-type [CONTENT TYPE] --source-env [SOURCE ENV] --environments [DESTINATION ENVIRONMENT] --locales [LOCALE] -a [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"(optional) Retry publishing failed entries from the logfile (this flag overrides all other flags)","hidden":true},"retry-failed":{"name":"retry-failed","type":"option","description":"(optional) Retry publishing failed entries from the logfile (this flag overrides all other flags)"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","hidden":true,"default":"true"},"bulk-publish":{"name":"bulk-publish","type":"option","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","default":"true"},"contentType":{"name":"contentType","type":"option","char":"t","description":"The Content-Types from which entries need to be published","hidden":true},"content-type":{"name":"content-type","type":"option","description":"The Contenttypes from which entries will be published"},"locale":{"name":"locale","type":"option","char":"l","description":"Source locale","hidden":true},"locales":{"name":"locales","type":"option","description":"Source locale"},"environment":{"name":"environment","type":"option","char":"e","description":"Source Environment","hidden":true},"source-env":{"name":"source-env","type":"option","description":"Source Env"},"destEnv":{"name":"destEnv","type":"option","char":"d","description":"Destination Environments","hidden":true},"environments":{"name":"environments","type":"option","description":"Destination Environments"},"deliveryToken":{"name":"deliveryToken","type":"option","char":"x","description":"Delivery token for source environment","hidden":true},"delivery-token":{"name":"delivery-token","type":"option","description":"Delivery token for source environment"},"config":{"name":"config","type":"option","char":"c","description":"Path to the config file"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"branch":{"name":"branch","type":"option","char":"B","description":"Specify the branch to fetch the content (by default the main branch is selected)","default":"main"},"onlyAssets":{"name":"onlyAssets","type":"boolean","description":"Unpublish only assets","allowNo":false},"onlyEntries":{"name":"onlyEntries","type":"boolean","description":"Unpublish only entries","allowNo":false}},"args":[]},"cm:bulk-publish":{"id":"cm:bulk-publish","description":"Bulk Publish script for managing entries and assets\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"flags":{},"args":[]},"cm:entries:publish-modified":{"id":"cm:entries:publish-modified","description":"Publish edited entries from a specified content type to the given locales and environments\nThe publish-modified command is used to publish entries from the specified content types, to the\nspecified environments and locales\n\nNote: Content type(s), Source Environment, Destination Environment(s) and Locale(s) are required to execute the command successfully\nBut, if retry-failed flag is set, then only a logfile is required\n","usage":"cm:entries:publish-modified [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--source-env <value>] [--content-types <value>] [--locales <value>] [-e <value>] [-c <value>] [-y] [--branch <value>]","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":["cm:bulk-publish:entry-edits"],"examples":["General Usage","csdx cm:entries:publish-modified --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] --source-env [SOURCE_ENV] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:stacks:publish-configure -a [ALIAS]`","csdx cm:entries:publish-modified --config [PATH TO CONFIG FILE]","csdx cm:entries:publish-modified -c [PATH TO CONFIG FILE]","","Using --retry-failed","csdx cm:entries:publish-modified --retry-failed [LOG FILE NAME]","csdx cm:entries:publish-modified -r [LOG FILE NAME]","","Using --branch","csdx cm:entries:publish-modified --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] --source-env [SOURCE_ENV] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile (optional, overrides all other flags)","hidden":true},"retry-failed":{"name":"retry-failed","type":"option","description":"Retry publishing failed entries from the logfile (optional, overrides all other flags)"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","hidden":true},"bulk-publish":{"name":"bulk-publish","type":"option","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","default":"true"},"sourceEnv":{"name":"sourceEnv","type":"option","char":"s","description":"Environment from which edited entries will be published","hidden":true},"source-env":{"name":"source-env","type":"option","description":"Environment from which edited entries will be published"},"contentTypes":{"name":"contentTypes","type":"option","char":"t","description":"The Content-Types which will be checked for edited entries","hidden":true},"content-types":{"name":"content-types","type":"option","description":"The Contenttypes which will be checked for edited entries"},"locales":{"name":"locales","type":"option","char":"l","description":"Locales where edited entries will be published"},"environments":{"name":"environments","type":"option","char":"e","description":"Destination environments"},"config":{"name":"config","type":"option","char":"c","description":"Path to the config file"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"branch":{"name":"branch","type":"option","char":"B","description":"Specify the branch to fetch the content (by default the main branch is selected)","default":"main"}},"args":[]},"cm:entries:publish-non-localized-fields":{"id":"cm:entries:publish-non-localized-fields","description":"Publish non-localized fields for the given content types, from a particular source environment to the specified environments\nThe non-localized field changes command is used to publish non-localized field changes from the given content types to the specified environments\n\nNote: Content types, Environments and Source Environment are required to execute this command successfully.\nBut, if retryFailed flag is set, then only a logfile is required","usage":"cm:entries:publish-non-localized-fields [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--source-env <value>] [--content-types <value>] [-e <value>] [-c <value>] [-y] [--branch <value>]","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":["cm:bulk-publish:nonlocalized-field-changes"],"examples":["General Usage","csdx cm:entries:publish-non-localized-fields --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --alias [MANAGEMENT TOKEN ALIAS] --source-env [SOURCE ENV]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:entries:publish-non-localized-fields --config [PATH TO CONFIG FILE]","csdx cm:entries:publish-non-localized-fields -c [PATH TO CONFIG FILE]","","Using --retry-failed flag","csdx cm:entries:publish-non-localized-fields --retry-failed [LOG FILE NAME]","","Using --branch flag","csdx cm:entries:publish-non-localized-fields --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --alias [MANAGEMENT TOKEN ALIAS] --source-env [SOURCE ENV] --branch [BRANCH NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"},"retry-failed":{"name":"retry-failed","type":"option","description":"Retry publishing failed entries from the logfile"},"bulk-publish":{"name":"bulk-publish","type":"option","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","default":"true"},"source-env":{"name":"source-env","type":"option","description":"Source Environment"},"content-types":{"name":"content-types","type":"option","description":"The Contenttypes from which entries will be published"},"environments":{"name":"environments","type":"option","char":"e","description":"Destination environments"},"config":{"name":"config","type":"option","char":"c","description":"Path to the config file"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"branch":{"name":"branch","type":"option","char":"B","description":"Specify the branch to fetch the content (by default the main branch is selected)","default":"main"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile","hidden":true},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","hidden":true,"default":"true"},"sourceEnv":{"name":"sourceEnv","type":"option","char":"s","description":"Source Environment","hidden":true},"contentTypes":{"name":"contentTypes","type":"option","char":"t","description":"The contenttypes from which entries will be published","hidden":true}},"args":[]},"cm:entries:publish-only-unpublished":{"id":"cm:entries:publish-only-unpublished","description":"Publish unpublished entries from the source environment, to other environments and locales\nThe publish-only-unpublished command is used to publish unpublished entries from the source environment, to other environments and locales\n\nNote: Content type(s), Source Environment, Destination Environment(s) and Source Locale are required to execute the command successfully\nBut, if retry-failed flag is set, then only a logfile is required\n","usage":"cm:entries:publish-only-unpublished [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--source-env <value>] [--content-types <value>] [--locales <value>] [-e <value>] [-c <value>] [-y] [--branch <value>]","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":["cm:bulk-publish:unpublished-entries"],"examples":["General Usage","csdx cm:entries:publish-only-unpublished -b --content-types [CONTENT TYPES] -e [ENVIRONMENTS] --locales LOCALE -a [MANAGEMENT TOKEN ALIAS] -source-env [SOURCE ENV]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:entries:publish-only-unpublished --config [PATH TO CONFIG FILE]","csdx cm:entries:publish-only-unpublished -c [PATH TO CONFIG FILE]","","Using --retry-failed","csdx cm:entries:publish-only-unpublished --retry-failed [LOG FILE NAME]","","Using --branch","csdx cm:entries:publish-only-unpublished -b --content-types [CONTENT TYPES] -e [ENVIRONMENTS] --locales LOCALE -a [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME] -source-env [SOURCE ENV]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile","hidden":true},"retry-failed":{"name":"retry-failed","type":"option","description":"Retry publishing failed entries from the logfile"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","hidden":true,"default":"true"},"bulk-publish":{"name":"bulk-publish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","default":"true"},"sourceEnv":{"name":"sourceEnv","type":"option","char":"s","description":"Source Env","hidden":true},"source-env":{"name":"source-env","type":"option","description":"Source Env"},"contentTypes":{"name":"contentTypes","type":"option","char":"t","description":"The Content-Types from which entries need to be published","hidden":true},"content-types":{"name":"content-types","type":"option","description":"The Contenttypes from which entries will be published"},"locale":{"name":"locale","type":"option","char":"l","description":"Source locale","hidden":true},"locales":{"name":"locales","type":"option","description":"Source locale"},"environments":{"name":"environments","type":"option","char":"e","description":"Destination environments"},"config":{"name":"config","type":"option","char":"c","description":"Path to the config file"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"branch":{"name":"branch","type":"option","char":"B","description":"Specify the branch to fetch the content (by default the main branch is selected)","default":"main"}},"args":[]},"cm:entries:publish":{"id":"cm:entries:publish","description":"Publish entries from multiple contenttypes to multiple environments and locales\nThe publish command is used to publish entries from the specified content types, to the\nspecified environments and locales \n\nNote: Content Types, Environments and Locales are required to execute the command successfully\nBut, if retry-failed flag is set, then only a logfile is required\n","usage":"cm:entries:publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--publish-all-content-types] [--content-types <value>] [--locales <value>] [-e <value>] [-c <value>] [-y] [--branch <value>] [--delivery-token <value>] [--source-env <value>]","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":["cm:bulk-publish:entries"],"examples":["General Usage","csdx cm:entries:publish --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:stacks:publish-configure -a [ALIAS]`","csdx cm:entries:publish --config [PATH TO CONFIG FILE]","csdx cm:entries:publish -c [PATH TO CONFIG FILE]","","Using --retry-failed","csdx cm:entries:publish --retry-failed [LOG FILE NAME]","csdx cm:entries:publish -r [LOG FILE NAME]","","Using --branch","csdx cm:entries:publish --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]","","Using --source-env","csdx cm:entries:publish --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS] --source-env [SOURCE ENVIRONMENT] --delivery-token [DELIVERY TOKEN]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry failed entries from the logfile (optional, overrides all other flags) This flag is used to retry publishing entries that failed to publish in a previous attempt. A log file for the previous session will be required for processing the failed entries","hidden":true},"retry-failed":{"name":"retry-failed","type":"option","description":"(optional) Retry failed entries from the logfile (overrides all other flags) This flag is used to retry publishing entries that failed to publish in a previous attempt. A log file for the previous session will be required for processing the failed entries"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","hidden":true},"bulk-publish":{"name":"bulk-publish","type":"option","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","default":"true"},"publish-all-content-types":{"name":"publish-all-content-types","type":"boolean","description":"(optional) Publish all contenttypes (cannot be set when contentTypes flag is set)","allowNo":false},"publishAllContentTypes":{"name":"publishAllContentTypes","type":"boolean","char":"o","description":"Publish all content-types (optional, cannot be set when contentTypes flag is set)","hidden":true,"allowNo":false},"content-types":{"name":"content-types","type":"option","description":"The Contenttypes from which entries need to be published"},"contentTypes":{"name":"contentTypes","type":"option","char":"t","description":"The Contenttypes from which entries will be published","hidden":true},"locales":{"name":"locales","type":"option","char":"l","description":"Locales where entries will be published"},"environments":{"name":"environments","type":"option","char":"e","description":"Environments where entries will be published"},"config":{"name":"config","type":"option","char":"c","description":"Path for the external config file (A new config file can be generated at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`)"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"branch":{"name":"branch","type":"option","char":"B","description":"Specify the branch to fetch the content (by default the main branch is selected)","default":"main"},"delivery-token":{"name":"delivery-token","type":"option","description":"Delivery token for source environment"},"source-env":{"name":"source-env","type":"option","description":"Source environment"}},"args":[]},"cm:entries:unpublish":{"id":"cm:entries:unpublish","description":"Unpublish entries from the given environment\nThe unpublish command is used to unpublish entries from the given environment\n\nNote: Environment (Source Environment) and Locale are required to execute the command successfully\nBut, if retry-failed flag is set, then only a logfile is required","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:stacks:unpublish --bulk-unpublish --content-type [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure --alias [ALIAS]`","csdx cm:stacks:unpublish --config [PATH TO CONFIG FILE]","csdx cm:stacks:unpublish -c [PATH TO CONFIG FILE]","","Using --retry-failed flag","csdx cm:stacks:unpublish --retry-failed [LOG FILE NAME]","","","Using --branch flag","csdx cm:stacks:unpublish --bulk-unpublish --content-type [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"},"environment":{"name":"environment","type":"option","char":"e","description":"Source Environment"},"config":{"name":"config","type":"option","char":"c","description":"Path to the config file"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"locale":{"name":"locale","type":"option","description":"Locale filter"},"branch":{"name":"branch","type":"option","description":"Specify the branch to fetch the content (by default the main branch is selected)","default":"main"},"retry-failed":{"name":"retry-failed","type":"option","description":"Retry publishing failed entries from the logfile"},"bulk-unpublish":{"name":"bulk-unpublish","type":"option","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to unpublish the entries","default":"true"},"content-type":{"name":"content-type","type":"option","description":"Content type filter"},"delivery-token":{"name":"delivery-token","type":"option","description":"Delivery token for source environment"}},"args":[]},"cm:entries:update-and-publish":{"id":"cm:entries:update-and-publish","description":"Add fields from updated content types to their respective entries\nThe update-and-publish command is used to update existing entries with the updated schema of the respective content type\n\nNote: Content types, Environments and Locales are required to execute the command successfully\nBut, if retry-failed flag is set, then only a logfile is required\n","usage":"cm:entries:update-and-publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--content-types <value>] [-t <value>] [-e <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>]","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":["cm:bulk-publish:add-fields"],"examples":["General Usage","csdx cm:entries:update-and-publish --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locale [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:stacks:publish-configure -a [ALIAS]`","csdx cm:entries:update-and-publish --config [PATH TO CONFIG FILE]","csdx cm:entries:update-and-publish -c [PATH TO CONFIG FILE]","","Using --retry-failed","csdx cm:entries:update-and-publish --retry-failed [LOG FILE NAME]","","Using --branch","csdx cm:entries:update-and-publish --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locale [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"},"retry-failed":{"name":"retry-failed","type":"option","description":"Retry publishing failed entries from the logfile (optional, overrides all other flags)"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile (optional, overrides all other flags)","hidden":true},"bulk-publish":{"name":"bulk-publish","type":"option","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","default":"true"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","hidden":true},"content-types":{"name":"content-types","type":"option","description":"The Contenttypes from which entries will be published"},"contentTypes":{"name":"contentTypes","type":"option","char":"t","description":"The Contenttypes from which entries will be published"},"environments":{"name":"environments","type":"option","char":"e","description":"Environments where entries will be published"},"config":{"name":"config","type":"option","char":"c","description":"Path to the config file"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"locales":{"name":"locales","type":"option","char":"l","description":"Locales where entries will be published"},"branch":{"name":"branch","type":"option","char":"B","description":"Specify the branch to fetch the content (by default the main branch is selected)","default":"main"},"force":{"name":"force","type":"boolean","description":"Update and publish all entries even if no fields have been added","allowNo":false}},"args":[]},"cm:stacks:publish-clear-logs":{"id":"cm:stacks:publish-clear-logs","description":"Clear the log folder","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":["cm:bulk-publish:clear"],"examples":["csdx cm:stacks:publish-clear-logs","csdx cm:stacks:publish-clear-logs --log-files-count","csdx cm:stacks:publish-clear-logs --yes","csdx cm:stacks:publish-clear-logs -y"],"flags":{"log-files-count":{"name":"log-files-count","type":"boolean","description":"List number of log files","allowNo":false},"yes":{"name":"yes","type":"boolean","char":"y","description":"Delete all files without asking for confirmation","allowNo":false},"list":{"name":"list","type":"boolean","char":"l","description":"List number of log files","hidden":true,"allowNo":false}},"args":[]},"cm:stacks:publish-configure":{"id":"cm:stacks:publish-configure","description":"The configure command is used to generate a configuration file for publish scripts.","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":["cm:bulk-publish:configure"],"examples":["csdx cm:stacks:publish-configure","csdx cm:stacks:publish-configure -a <management_token_alias>","csdx cm:stacks:publish-configure --alias <management_token_alias>"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"}},"args":[]},"cm:stacks:publish-revert":{"id":"cm:stacks:publish-revert","description":"Revert publish operations by using a log file\nThe revert command is used to revert all publish operations performed using bulk-publish script.\nA log file name is required to execute revert command\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":["cm:bulk-publish:revert"],"examples":["Using --log-file","cm:bulk-publish:revert --log-file [LOG FILE NAME]","","Using --retry-failed","cm:bulk-publish:revert --retry-failed [LOG FILE NAME]"],"flags":{"retry-failed":{"name":"retry-failed","type":"option","description":"retry publishing failed entries from the logfile"},"log-file":{"name":"log-file","type":"option","description":"logfile to be used to revert"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"retry publishing failed entries from the logfile","hidden":true},"logFile":{"name":"logFile","type":"option","char":"l","description":"logfile to be used to revert","hidden":true}},"args":[]},"cm:stacks:publish":{"id":"cm:stacks:publish","description":"Publish entries and assets to multiple environments and locales\nThe publish command is used to publish entries and assets, to the specified environments and locales.\n\nNote: Content types, Environments and Locales are required to execute the publish entries command successfully.\nNote: Environments and Locales are required to execute the publish assets command successfully.\nBut, if retry-failed flag is set, then only a logfile is required","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:stacks:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file in the current working directory using `csdx cm:stacks:publish-configure -a [ALIAS]`","csdx cm:stacks:publish --config [PATH TO CONFIG FILE]","csdx cm:stacks:publish -c [PATH TO CONFIG FILE]","","Using --retry-failed flag","csdx cm:stacks:publish --retry-failed [LOG FILE NAME]","","Using --branch flag","csdx cm:stacks:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]"],"flags":{},"args":[]},"cm:stacks:unpublish":{"id":"cm:stacks:unpublish","description":"Unpublish entries or assets of given content types from the specified environment\nThe unpublish command is used to unpublish entries or assets from given environment\n\nEnvironment (Source Environment) and Locale are required to execute the command successfully\nBut, if retry-failed flag is set, then only a logfile is required\n\nA content type can be specified for unpublishing entries, but if no content-type(s) is/are specified and --only-assets is not used,\nthen all entries from all content types will be unpublished from the source environment\n\nNote: --only-assets can be used to unpublish only assets and --only-entries can be used to unpublish only entries.\n(--only-assets and --only-entries cannot be used together at the same time)\n","usage":"csdx cm:stacks:unpublish [-a <value>] [-e <value>] [-c <value>] [-y] [--locale <value>] [--branch <value>] [--retry-failed <value>] [--bulk-unpublish <value>] [--content-type <value>] [--delivery-token <value>] [--only-assets] [--only-entries]","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":["cm:bulk-publish:unpublish"],"examples":["General Usage","csdx cm:stacks:unpublish --bulk-unpublish --content-type [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] ----delivery-token [DELIVERY TOKEN]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure --alias [ALIAS]`","csdx cm:stacks:unpublish --config [PATH TO CONFIG FILE]","csdx cm:stacks:unpublish -c [PATH TO CONFIG FILE]","","Using --retry-failed flag","csdx cm:stacks:unpublish --retry-failed [LOG FILE NAME]","","No content type","csdx cm:stacks:unpublish --environment [SOURCE ENV] --locale [LOCALE] (Will unpublish all entries from all content types and assets from the source environment)","","Using --only-assets","csdx cm:stacks:unpublish --environment [SOURCE ENV] --locale [LOCALE] --only-assets (Will unpublish only assets from the source environment)","","Using --only-entries","csdx cm:stacks:unpublish --environment [SOURCE ENV] --locale [LOCALE] --only-entries (Will unpublish only entries, all entries, from the source environment)","csdx cm:stacks:unpublish --contentType [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE] --only-entries (Will unpublish only entries, (from CONTENT TYPE) from the source environment)","","Using --branch flag","csdx cm:stacks:unpublish --bulk-unpublish --content-type [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"},"environment":{"name":"environment","type":"option","char":"e","description":"Source Environment"},"config":{"name":"config","type":"option","char":"c","description":"Path to the config file"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"locale":{"name":"locale","type":"option","char":"l","description":"Locale filter"},"branch":{"name":"branch","type":"option","char":"B","description":"Specify the branch to fetch the content from (default is main branch)","default":"main"},"retry-failed":{"name":"retry-failed","type":"option","description":"Retry publishing failed entries from the logfile (optional, overrides all other flags)"},"bulk-unpublish":{"name":"bulk-unpublish","type":"option","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to unpublish the entries and assets","default":"true"},"content-type":{"name":"content-type","type":"option","description":"Content type filter"},"delivery-token":{"name":"delivery-token","type":"option","description":"Delivery token for source environment"},"only-assets":{"name":"only-assets","type":"boolean","description":"Unpublish only assets","hidden":true,"allowNo":false},"only-entries":{"name":"only-entries","type":"boolean","description":"Unpublish only entries","hidden":true,"allowNo":false},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile","hidden":true},"bulkUnpublish":{"name":"bulkUnpublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used for publishing the entries","hidden":true,"default":"true"},"contentType":{"name":"contentType","type":"option","char":"t","description":"Content Type filter","hidden":true},"deliveryToken":{"name":"deliveryToken","type":"option","char":"x","description":"Delivery Token for source environment","hidden":true},"onlyAssets":{"name":"onlyAssets","type":"boolean","description":"Unpublish only assets","hidden":true,"allowNo":false},"onlyEntries":{"name":"onlyEntries","type":"boolean","description":"Unpublish only entries","hidden":true,"allowNo":false}},"args":[]}}}
|
|
1
|
+
{"version":"1.0.1","commands":{"cm:assets:publish":{"id":"cm:assets:publish","description":"Publish assets to the specified environments\nThe assets command is used to publish assets from the specified stack, to the specified environments\n\nNote: Environment(s) and Locale(s) are required to execute the command successfully\nBut, if retryFailed flag is set, then only a logfile is required\n","usage":"cm:assets:publish [-a <value>] [--retry-failed <value>] [-e <value>] [--folder-uid <value>] [--bulk-publish <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>] [--delivery-token <value>] [--source-env <value>]","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":["cm:bulk-publish:assets"],"examples":["General Usage","csdx cm:assets:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:stacks:publish-configure -a [ALIAS]`","csdx cm:assets:publish --config [PATH TO CONFIG FILE]","csdx cm:assets:publish -c [PATH TO CONFIG FILE]","","Using --retry-failed flag","csdx cm:assets:publish --retry-failed [LOG FILE NAME]","","Using --branch flag","csdx cm:assets:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]","","Using --source-env","csdx cm:assets:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --source-env [SOURCE ENVIRONMENT] --delivery-token [DELIVERY TOKEN]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"},"retry-failed":{"name":"retry-failed","type":"option","description":"Retry publishing failed assets from the logfile (optional, will override all other flags)"},"environments":{"name":"environments","type":"option","char":"e","description":"Environments where assets will be published"},"folder-uid":{"name":"folder-uid","type":"option","description":"[default: cs_root] Folder-uid from where the assets will be published"},"bulk-publish":{"name":"bulk-publish","type":"option","description":"By default this flag is set as true. It indicates that contentstack's bulkpublish API will be used to publish the assets","default":"true"},"config":{"name":"config","type":"option","char":"c","description":"Path to the config file"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"locales":{"name":"locales","type":"option","char":"l","description":"Locales to where assets will be published"},"branch":{"name":"branch","type":"option","char":"B","description":"Specify the branch to fetch the content (by default the main branch is selected)","default":"main"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed assets from the logfile (optional, will override all other flags)","hidden":true},"folderUid":{"name":"folderUid","type":"option","char":"u","description":"[default: cs_root] Folder-uid from where the assets will be published","hidden":true},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"By default this flag is set as true. It indicates that contentstack's bulkpublish API will be used to publish the entries","hidden":true,"default":"true"},"delivery-token":{"name":"delivery-token","type":"option","description":"Delivery token for source environment"},"source-env":{"name":"source-env","type":"option","description":"Source environment"},"content-types":{"name":"content-types","type":"option","description":"Content types","hidden":true}},"args":[]},"cm:assets:unpublish":{"id":"cm:assets:unpublish","description":"Unpublish assets from given environment\nThe unpublish command is used for unpublishing assets from the given environment\n\nNote: Environment (Source Environment) and Locale are required to execute the command successfully\nBut, if retry-failed flag is set, then only a logfile is required","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:assets:unpublish --bulk-unpublish --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure --alias [ALIAS]`","csdx cm:assets:unpublish --config [PATH TO CONFIG FILE]","csdx cm:assets:unpublish -c [PATH TO CONFIG FILE]","","Using --retry-failed flag","csdx cm:assets:unpublish --retry-failed [LOG FILE NAME]","","Using --branch flag","csdx cm:assets:unpublish --bulk-unpublish --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"},"environment":{"name":"environment","type":"option","char":"e","description":"Source Environment"},"config":{"name":"config","type":"option","char":"c","description":"Path to the config file"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"locale":{"name":"locale","type":"option","description":"Locale filter"},"branch":{"name":"branch","type":"option","description":"Specify the branch to fetch the content (by default the main branch is selected)","default":"main"},"retry-failed":{"name":"retry-failed","type":"option","description":"Retry unpublishing failed assets from the logfile"},"bulk-unpublish":{"name":"bulk-unpublish","type":"option","description":"By default this flag is set as true. It indicates that contentstack's bulkpublish API will be used to unpublish the assets","default":"true"},"delivery-token":{"name":"delivery-token","type":"option","description":"Delivery Token for source environment"}},"args":[]},"cm:bulk-publish:cross-publish":{"id":"cm:bulk-publish:cross-publish","description":"Publish entries and assets from one environment to other environments\nThe cross-publish command is used to publish entries and assets from one environment to other environments\n\nNote: Content Type, Environment, Destination Environment(s) and Locale are required to execute the command successfully\nBut, if retryFailed flag is set, then only a logfile is required\n","usage":"cm:bulk-publish:cross-publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--content-type <value>] [--locales <value>] [--source-env <value>] [--environments <value>] [--delivery-token <value>] [-c <value>] [-y] [--branch <value>] [--onlyAssets] [--onlyEntries]","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:bulk-publish:cross-publish --content-type [CONTENT TYPE] --source-env [SOURCE ENV] --environments [DESTINATION ENVIRONMENT] --locales [LOCALE] -a [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:bulk-publish:cross-publish --config [PATH TO CONFIG FILE]","csdx cm:bulk-publish:cross-publish -c [PATH TO CONFIG FILE]","","Using --retry-failed flag","csdx cm:bulk-publish:cross-publish --retry-failed [LOG FILE NAME]","csdx cm:bulk-publish:cross-publish -r [LOG FILE NAME]","","Using --branch flag","csdx cm:bulk-publish:cross-publish --content-type [CONTENT TYPE] --source-env [SOURCE ENV] --environments [DESTINATION ENVIRONMENT] --locales [LOCALE] -a [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"(optional) Retry publishing failed entries from the logfile (this flag overrides all other flags)","hidden":true},"retry-failed":{"name":"retry-failed","type":"option","description":"(optional) Retry publishing failed entries from the logfile (this flag overrides all other flags)"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","hidden":true,"default":"true"},"bulk-publish":{"name":"bulk-publish","type":"option","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","default":"true"},"contentType":{"name":"contentType","type":"option","char":"t","description":"The Content-Types from which entries need to be published","hidden":true},"content-type":{"name":"content-type","type":"option","description":"The Contenttypes from which entries will be published"},"locale":{"name":"locale","type":"option","char":"l","description":"Source locale","hidden":true},"locales":{"name":"locales","type":"option","description":"Source locale"},"environment":{"name":"environment","type":"option","char":"e","description":"Source Environment","hidden":true},"source-env":{"name":"source-env","type":"option","description":"Source Env"},"destEnv":{"name":"destEnv","type":"option","char":"d","description":"Destination Environments","hidden":true},"environments":{"name":"environments","type":"option","description":"Destination Environments"},"deliveryToken":{"name":"deliveryToken","type":"option","char":"x","description":"Delivery token for source environment","hidden":true},"delivery-token":{"name":"delivery-token","type":"option","description":"Delivery token for source environment"},"config":{"name":"config","type":"option","char":"c","description":"Path to the config file"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"branch":{"name":"branch","type":"option","char":"B","description":"Specify the branch to fetch the content (by default the main branch is selected)","default":"main"},"onlyAssets":{"name":"onlyAssets","type":"boolean","description":"Unpublish only assets","allowNo":false},"onlyEntries":{"name":"onlyEntries","type":"boolean","description":"Unpublish only entries","allowNo":false}},"args":[]},"cm:bulk-publish":{"id":"cm:bulk-publish","description":"Bulk Publish script for managing entries and assets\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"flags":{},"args":[]},"cm:entries:publish-modified":{"id":"cm:entries:publish-modified","description":"Publish edited entries from a specified content type to the given locales and environments\nThe publish-modified command is used to publish entries from the specified content types, to the\nspecified environments and locales\n\nNote: Content type(s), Source Environment, Destination Environment(s) and Locale(s) are required to execute the command successfully\nBut, if retry-failed flag is set, then only a logfile is required\n","usage":"cm:entries:publish-modified [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--source-env <value>] [--content-types <value>] [--locales <value>] [-e <value>] [-c <value>] [-y] [--branch <value>]","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":["cm:bulk-publish:entry-edits"],"examples":["General Usage","csdx cm:entries:publish-modified --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] --source-env [SOURCE_ENV] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:stacks:publish-configure -a [ALIAS]`","csdx cm:entries:publish-modified --config [PATH TO CONFIG FILE]","csdx cm:entries:publish-modified -c [PATH TO CONFIG FILE]","","Using --retry-failed","csdx cm:entries:publish-modified --retry-failed [LOG FILE NAME]","csdx cm:entries:publish-modified -r [LOG FILE NAME]","","Using --branch","csdx cm:entries:publish-modified --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] --source-env [SOURCE_ENV] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile (optional, overrides all other flags)","hidden":true},"retry-failed":{"name":"retry-failed","type":"option","description":"Retry publishing failed entries from the logfile (optional, overrides all other flags)"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","hidden":true},"bulk-publish":{"name":"bulk-publish","type":"option","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","default":"true"},"sourceEnv":{"name":"sourceEnv","type":"option","char":"s","description":"Environment from which edited entries will be published","hidden":true},"source-env":{"name":"source-env","type":"option","description":"Environment from which edited entries will be published"},"contentTypes":{"name":"contentTypes","type":"option","char":"t","description":"The Content-Types which will be checked for edited entries","hidden":true},"content-types":{"name":"content-types","type":"option","description":"The Contenttypes which will be checked for edited entries"},"locales":{"name":"locales","type":"option","char":"l","description":"Locales where edited entries will be published"},"environments":{"name":"environments","type":"option","char":"e","description":"Destination environments"},"config":{"name":"config","type":"option","char":"c","description":"Path to the config file"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"branch":{"name":"branch","type":"option","char":"B","description":"Specify the branch to fetch the content (by default the main branch is selected)","default":"main"}},"args":[]},"cm:entries:publish-non-localized-fields":{"id":"cm:entries:publish-non-localized-fields","description":"Publish non-localized fields for the given content types, from a particular source environment to the specified environments\nThe non-localized field changes command is used to publish non-localized field changes from the given content types to the specified environments\n\nNote: Content types, Environments and Source Environment are required to execute this command successfully.\nBut, if retryFailed flag is set, then only a logfile is required","usage":"cm:entries:publish-non-localized-fields [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--source-env <value>] [--content-types <value>] [-e <value>] [-c <value>] [-y] [--branch <value>]","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":["cm:bulk-publish:nonlocalized-field-changes"],"examples":["General Usage","csdx cm:entries:publish-non-localized-fields --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --alias [MANAGEMENT TOKEN ALIAS] --source-env [SOURCE ENV]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:entries:publish-non-localized-fields --config [PATH TO CONFIG FILE]","csdx cm:entries:publish-non-localized-fields -c [PATH TO CONFIG FILE]","","Using --retry-failed flag","csdx cm:entries:publish-non-localized-fields --retry-failed [LOG FILE NAME]","","Using --branch flag","csdx cm:entries:publish-non-localized-fields --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --alias [MANAGEMENT TOKEN ALIAS] --source-env [SOURCE ENV] --branch [BRANCH NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"},"retry-failed":{"name":"retry-failed","type":"option","description":"Retry publishing failed entries from the logfile"},"bulk-publish":{"name":"bulk-publish","type":"option","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","default":"true"},"source-env":{"name":"source-env","type":"option","description":"Source Environment"},"content-types":{"name":"content-types","type":"option","description":"The Contenttypes from which entries will be published"},"environments":{"name":"environments","type":"option","char":"e","description":"Destination environments"},"config":{"name":"config","type":"option","char":"c","description":"Path to the config file"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"branch":{"name":"branch","type":"option","char":"B","description":"Specify the branch to fetch the content (by default the main branch is selected)","default":"main"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile","hidden":true},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","hidden":true,"default":"true"},"sourceEnv":{"name":"sourceEnv","type":"option","char":"s","description":"Source Environment","hidden":true},"contentTypes":{"name":"contentTypes","type":"option","char":"t","description":"The contenttypes from which entries will be published","hidden":true}},"args":[]},"cm:entries:publish-only-unpublished":{"id":"cm:entries:publish-only-unpublished","description":"Publish unpublished entries from the source environment, to other environments and locales\nThe publish-only-unpublished command is used to publish unpublished entries from the source environment, to other environments and locales\n\nNote: Content type(s), Source Environment, Destination Environment(s) and Source Locale are required to execute the command successfully\nBut, if retry-failed flag is set, then only a logfile is required\n","usage":"cm:entries:publish-only-unpublished [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--source-env <value>] [--content-types <value>] [--locales <value>] [-e <value>] [-c <value>] [-y] [--branch <value>]","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":["cm:bulk-publish:unpublished-entries"],"examples":["General Usage","csdx cm:entries:publish-only-unpublished -b --content-types [CONTENT TYPES] -e [ENVIRONMENTS] --locales LOCALE -a [MANAGEMENT TOKEN ALIAS] -source-env [SOURCE ENV]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`","csdx cm:entries:publish-only-unpublished --config [PATH TO CONFIG FILE]","csdx cm:entries:publish-only-unpublished -c [PATH TO CONFIG FILE]","","Using --retry-failed","csdx cm:entries:publish-only-unpublished --retry-failed [LOG FILE NAME]","","Using --branch","csdx cm:entries:publish-only-unpublished -b --content-types [CONTENT TYPES] -e [ENVIRONMENTS] --locales LOCALE -a [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME] -source-env [SOURCE ENV]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile","hidden":true},"retry-failed":{"name":"retry-failed","type":"option","description":"Retry publishing failed entries from the logfile"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","hidden":true,"default":"true"},"bulk-publish":{"name":"bulk-publish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","default":"true"},"sourceEnv":{"name":"sourceEnv","type":"option","char":"s","description":"Source Env","hidden":true},"source-env":{"name":"source-env","type":"option","description":"Source Env"},"contentTypes":{"name":"contentTypes","type":"option","char":"t","description":"The Content-Types from which entries need to be published","hidden":true},"content-types":{"name":"content-types","type":"option","description":"The Contenttypes from which entries will be published"},"locale":{"name":"locale","type":"option","char":"l","description":"Source locale","hidden":true},"locales":{"name":"locales","type":"option","description":"Source locale"},"environments":{"name":"environments","type":"option","char":"e","description":"Destination environments"},"config":{"name":"config","type":"option","char":"c","description":"Path to the config file"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"branch":{"name":"branch","type":"option","char":"B","description":"Specify the branch to fetch the content (by default the main branch is selected)","default":"main"}},"args":[]},"cm:entries:publish":{"id":"cm:entries:publish","description":"Publish entries from multiple contenttypes to multiple environments and locales\nThe publish command is used to publish entries from the specified content types, to the\nspecified environments and locales \n\nNote: Content Types, Environments and Locales are required to execute the command successfully\nBut, if retry-failed flag is set, then only a logfile is required\n","usage":"cm:entries:publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--publish-all-content-types] [--content-types <value>] [--locales <value>] [-e <value>] [-c <value>] [-y] [--branch <value>] [--delivery-token <value>] [--source-env <value>]","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":["cm:bulk-publish:entries"],"examples":["General Usage","csdx cm:entries:publish --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:stacks:publish-configure -a [ALIAS]`","csdx cm:entries:publish --config [PATH TO CONFIG FILE]","csdx cm:entries:publish -c [PATH TO CONFIG FILE]","","Using --retry-failed","csdx cm:entries:publish --retry-failed [LOG FILE NAME]","csdx cm:entries:publish -r [LOG FILE NAME]","","Using --branch","csdx cm:entries:publish --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]","","Using --source-env","csdx cm:entries:publish --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS] --source-env [SOURCE ENVIRONMENT] --delivery-token [DELIVERY TOKEN]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry failed entries from the logfile (optional, overrides all other flags) This flag is used to retry publishing entries that failed to publish in a previous attempt. A log file for the previous session will be required for processing the failed entries","hidden":true},"retry-failed":{"name":"retry-failed","type":"option","description":"(optional) Retry failed entries from the logfile (overrides all other flags) This flag is used to retry publishing entries that failed to publish in a previous attempt. A log file for the previous session will be required for processing the failed entries"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","hidden":true},"bulk-publish":{"name":"bulk-publish","type":"option","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","default":"true"},"publish-all-content-types":{"name":"publish-all-content-types","type":"boolean","description":"(optional) Publish all contenttypes (cannot be set when contentTypes flag is set)","allowNo":false},"publishAllContentTypes":{"name":"publishAllContentTypes","type":"boolean","char":"o","description":"Publish all content-types (optional, cannot be set when contentTypes flag is set)","hidden":true,"allowNo":false},"content-types":{"name":"content-types","type":"option","description":"The Contenttypes from which entries need to be published"},"contentTypes":{"name":"contentTypes","type":"option","char":"t","description":"The Contenttypes from which entries will be published","hidden":true},"locales":{"name":"locales","type":"option","char":"l","description":"Locales where entries will be published"},"environments":{"name":"environments","type":"option","char":"e","description":"Environments where entries will be published"},"config":{"name":"config","type":"option","char":"c","description":"Path for the external config file (A new config file can be generated at the current working directory using `csdx cm:bulk-publish:configure -a [ALIAS]`)"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"branch":{"name":"branch","type":"option","char":"B","description":"Specify the branch to fetch the content (by default the main branch is selected)","default":"main"},"delivery-token":{"name":"delivery-token","type":"option","description":"Delivery token for source environment"},"source-env":{"name":"source-env","type":"option","description":"Source environment"}},"args":[]},"cm:entries:unpublish":{"id":"cm:entries:unpublish","description":"Unpublish entries from the given environment\nThe unpublish command is used to unpublish entries from the given environment\n\nNote: Environment (Source Environment) and Locale are required to execute the command successfully\nBut, if retry-failed flag is set, then only a logfile is required","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:stacks:unpublish --bulk-unpublish --content-type [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure --alias [ALIAS]`","csdx cm:stacks:unpublish --config [PATH TO CONFIG FILE]","csdx cm:stacks:unpublish -c [PATH TO CONFIG FILE]","","Using --retry-failed flag","csdx cm:stacks:unpublish --retry-failed [LOG FILE NAME]","","","Using --branch flag","csdx cm:stacks:unpublish --bulk-unpublish --content-type [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"},"environment":{"name":"environment","type":"option","char":"e","description":"Source Environment"},"config":{"name":"config","type":"option","char":"c","description":"Path to the config file"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"locale":{"name":"locale","type":"option","description":"Locale filter"},"branch":{"name":"branch","type":"option","description":"Specify the branch to fetch the content (by default the main branch is selected)","default":"main"},"retry-failed":{"name":"retry-failed","type":"option","description":"Retry publishing failed entries from the logfile"},"bulk-unpublish":{"name":"bulk-unpublish","type":"option","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to unpublish the entries","default":"true"},"content-type":{"name":"content-type","type":"option","description":"Content type filter"},"delivery-token":{"name":"delivery-token","type":"option","description":"Delivery token for source environment"}},"args":[]},"cm:entries:update-and-publish":{"id":"cm:entries:update-and-publish","description":"Add fields from updated content types to their respective entries\nThe update-and-publish command is used to update existing entries with the updated schema of the respective content type\n\nNote: Content types, Environments and Locales are required to execute the command successfully\nBut, if retry-failed flag is set, then only a logfile is required\n","usage":"cm:entries:update-and-publish [-a <value>] [--retry-failed <value>] [--bulk-publish <value>] [--content-types <value>] [-t <value>] [-e <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>]","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":["cm:bulk-publish:add-fields"],"examples":["General Usage","csdx cm:entries:update-and-publish --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locale [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:stacks:publish-configure -a [ALIAS]`","csdx cm:entries:update-and-publish --config [PATH TO CONFIG FILE]","csdx cm:entries:update-and-publish -c [PATH TO CONFIG FILE]","","Using --retry-failed","csdx cm:entries:update-and-publish --retry-failed [LOG FILE NAME]","","Using --branch","csdx cm:entries:update-and-publish --content-types [CONTENT TYPE 1] [CONTENT TYPE 2] -e [ENVIRONMENT 1] [ENVIRONMENT 2] --locale [LOCALE 1] [LOCALE 2] -a [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"},"retry-failed":{"name":"retry-failed","type":"option","description":"Retry publishing failed entries from the logfile (optional, overrides all other flags)"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile (optional, overrides all other flags)","hidden":true},"bulk-publish":{"name":"bulk-publish","type":"option","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","default":"true"},"bulkPublish":{"name":"bulkPublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to publish the entries","hidden":true},"content-types":{"name":"content-types","type":"option","description":"The Contenttypes from which entries will be published"},"contentTypes":{"name":"contentTypes","type":"option","char":"t","description":"The Contenttypes from which entries will be published"},"environments":{"name":"environments","type":"option","char":"e","description":"Environments where entries will be published"},"config":{"name":"config","type":"option","char":"c","description":"Path to the config file"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"locales":{"name":"locales","type":"option","char":"l","description":"Locales where entries will be published"},"branch":{"name":"branch","type":"option","char":"B","description":"Specify the branch to fetch the content (by default the main branch is selected)","default":"main"},"force":{"name":"force","type":"boolean","description":"Update and publish all entries even if no fields have been added","allowNo":false}},"args":[]},"cm:stacks:publish-clear-logs":{"id":"cm:stacks:publish-clear-logs","description":"Clear the log folder","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":["cm:bulk-publish:clear"],"examples":["csdx cm:stacks:publish-clear-logs","csdx cm:stacks:publish-clear-logs --log-files-count","csdx cm:stacks:publish-clear-logs --yes","csdx cm:stacks:publish-clear-logs -y"],"flags":{"log-files-count":{"name":"log-files-count","type":"boolean","description":"List number of log files","allowNo":false},"yes":{"name":"yes","type":"boolean","char":"y","description":"Delete all files without asking for confirmation","allowNo":false},"list":{"name":"list","type":"boolean","char":"l","description":"List number of log files","hidden":true,"allowNo":false}},"args":[]},"cm:stacks:publish-configure":{"id":"cm:stacks:publish-configure","description":"The configure command is used to generate a configuration file for publish scripts.","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":["cm:bulk-publish:configure"],"examples":["csdx cm:stacks:publish-configure","csdx cm:stacks:publish-configure -a <management_token_alias>","csdx cm:stacks:publish-configure --alias <management_token_alias>"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"}},"args":[]},"cm:stacks:publish-revert":{"id":"cm:stacks:publish-revert","description":"Revert publish operations by using a log file\nThe revert command is used to revert all publish operations performed using bulk-publish script.\nA log file name is required to execute revert command\n","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":["cm:bulk-publish:revert"],"examples":["Using --log-file","cm:bulk-publish:revert --log-file [LOG FILE NAME]","","Using --retry-failed","cm:bulk-publish:revert --retry-failed [LOG FILE NAME]"],"flags":{"retry-failed":{"name":"retry-failed","type":"option","description":"retry publishing failed entries from the logfile"},"log-file":{"name":"log-file","type":"option","description":"logfile to be used to revert"},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"retry publishing failed entries from the logfile","hidden":true},"logFile":{"name":"logFile","type":"option","char":"l","description":"logfile to be used to revert","hidden":true}},"args":[]},"cm:stacks:publish":{"id":"cm:stacks:publish","description":"Publish entries and assets to multiple environments and locales\nThe publish command is used to publish entries and assets, to the specified environments and locales.\n\nNote: Content types, Environments and Locales are required to execute the publish entries command successfully.\nNote: Environments and Locales are required to execute the publish assets command successfully.\nBut, if retry-failed flag is set, then only a logfile is required","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":[],"examples":["General Usage","csdx cm:stacks:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN ALIAS]","","Using --config or -c flag","Generate a config file in the current working directory using `csdx cm:stacks:publish-configure -a [ALIAS]`","csdx cm:stacks:publish --config [PATH TO CONFIG FILE]","csdx cm:stacks:publish -c [PATH TO CONFIG FILE]","","Using --retry-failed flag","csdx cm:stacks:publish --retry-failed [LOG FILE NAME]","","Using --branch flag","csdx cm:stacks:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --branch [BRANCH NAME]"],"flags":{},"args":[]},"cm:stacks:unpublish":{"id":"cm:stacks:unpublish","description":"Unpublish entries or assets of given content types from the specified environment\nThe unpublish command is used to unpublish entries or assets from given environment\n\nEnvironment (Source Environment) and Locale are required to execute the command successfully\nBut, if retry-failed flag is set, then only a logfile is required\n\nA content type can be specified for unpublishing entries, but if no content-type(s) is/are specified and --only-assets is not used,\nthen all entries from all content types will be unpublished from the source environment\n\nNote: --only-assets can be used to unpublish only assets and --only-entries can be used to unpublish only entries.\n(--only-assets and --only-entries cannot be used together at the same time)\n","usage":"csdx cm:stacks:unpublish [-a <value>] [-e <value>] [-c <value>] [-y] [--locale <value>] [--branch <value>] [--retry-failed <value>] [--bulk-unpublish <value>] [--content-type <value>] [--delivery-token <value>] [--only-assets] [--only-entries]","pluginName":"@contentstack/cli-cm-bulk-publish","pluginType":"core","aliases":["cm:bulk-publish:unpublish"],"examples":["General Usage","csdx cm:stacks:unpublish --bulk-unpublish --content-type [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] ----delivery-token [DELIVERY TOKEN]","","Using --config or -c flag","Generate a config file at the current working directory using `csdx cm:bulk-publish:configure --alias [ALIAS]`","csdx cm:stacks:unpublish --config [PATH TO CONFIG FILE]","csdx cm:stacks:unpublish -c [PATH TO CONFIG FILE]","","Using --retry-failed flag","csdx cm:stacks:unpublish --retry-failed [LOG FILE NAME]","","No content type","csdx cm:stacks:unpublish --environment [SOURCE ENV] --locale [LOCALE] (Will unpublish all entries from all content types and assets from the source environment)","","Using --only-assets","csdx cm:stacks:unpublish --environment [SOURCE ENV] --locale [LOCALE] --only-assets (Will unpublish only assets from the source environment)","","Using --only-entries","csdx cm:stacks:unpublish --environment [SOURCE ENV] --locale [LOCALE] --only-entries (Will unpublish only entries, all entries, from the source environment)","csdx cm:stacks:unpublish --contentType [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE] --only-entries (Will unpublish only entries, (from CONTENT TYPE) from the source environment)","","Using --branch flag","csdx cm:stacks:unpublish --bulk-unpublish --content-type [CONTENT TYPE] --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]"],"flags":{"alias":{"name":"alias","type":"option","char":"a","description":"Alias(name) for the management token"},"environment":{"name":"environment","type":"option","char":"e","description":"Source Environment"},"config":{"name":"config","type":"option","char":"c","description":"Path to the config file"},"yes":{"name":"yes","type":"boolean","char":"y","description":"Agree to process the command with the current configuration","allowNo":false},"locale":{"name":"locale","type":"option","char":"l","description":"Locale filter"},"branch":{"name":"branch","type":"option","char":"B","description":"Specify the branch to fetch the content from (default is main branch)","default":"main"},"retry-failed":{"name":"retry-failed","type":"option","description":"Retry publishing failed entries from the logfile (optional, overrides all other flags)"},"bulk-unpublish":{"name":"bulk-unpublish","type":"option","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used to unpublish the entries and assets","default":"true"},"content-type":{"name":"content-type","type":"option","description":"Content type filter"},"delivery-token":{"name":"delivery-token","type":"option","description":"Delivery token for source environment"},"only-assets":{"name":"only-assets","type":"boolean","description":"Unpublish only assets","hidden":true,"allowNo":false},"only-entries":{"name":"only-entries","type":"boolean","description":"Unpublish only entries","hidden":true,"allowNo":false},"retryFailed":{"name":"retryFailed","type":"option","char":"r","description":"Retry publishing failed entries from the logfile","hidden":true},"bulkUnpublish":{"name":"bulkUnpublish","type":"option","char":"b","description":"This flag is set to true by default. It indicates that contentstack's bulkpublish API will be used for publishing the entries","hidden":true,"default":"true"},"contentType":{"name":"contentType","type":"option","char":"t","description":"Content Type filter","hidden":true},"deliveryToken":{"name":"deliveryToken","type":"option","char":"x","description":"Delivery Token for source environment","hidden":true},"onlyAssets":{"name":"onlyAssets","type":"boolean","description":"Unpublish only assets","hidden":true,"allowNo":false},"onlyEntries":{"name":"onlyEntries","type":"boolean","description":"Unpublish only entries","hidden":true,"allowNo":false}},"args":[]}}}
|
package/package.json
CHANGED
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/cli-cm-bulk-publish",
|
|
3
3
|
"description": "Contentstack CLI plugin for bulk publish actions",
|
|
4
|
-
"version": "1.0.
|
|
4
|
+
"version": "1.0.1",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"bugs": "https://github.com/contentstack/cli/issues",
|
|
7
7
|
"dependencies": {
|
|
8
|
-
"@contentstack/cli-command": "^1.0.
|
|
9
|
-
"@contentstack/cli-utilities": "^1.0.
|
|
8
|
+
"@contentstack/cli-command": "^1.0.1",
|
|
9
|
+
"@contentstack/cli-utilities": "^1.0.2",
|
|
10
10
|
"@contentstack/management": "^1.3.0",
|
|
11
11
|
"@oclif/command": "^1.8.16",
|
|
12
12
|
"@oclif/config": "^1.18.3",
|
|
@@ -3,8 +3,6 @@ const { start: startPublish } = require('../../../producer/publish-assets');
|
|
|
3
3
|
const { start: startCrossPublish } = require('../../../producer/cross-publish');
|
|
4
4
|
const store = require('../../../util/store.js');
|
|
5
5
|
const { cliux } = require('@contentstack/cli-utilities');
|
|
6
|
-
const configKey = 'publish_assets';
|
|
7
|
-
const configKeyCrossEnv = 'cross_env_publish';
|
|
8
6
|
const { prettyPrint, formatError } = require('../../../util');
|
|
9
7
|
const { getStack } = require('../../../util/client.js');
|
|
10
8
|
const { printFlagDeprecation } = require('@contentstack/cli-utilities');
|
|
@@ -22,8 +20,8 @@ class AssetsPublishCommand extends Command {
|
|
|
22
20
|
|
|
23
21
|
let updatedFlags;
|
|
24
22
|
try {
|
|
25
|
-
const
|
|
26
|
-
updatedFlags = assetsFlags.config ? store.updateMissing(
|
|
23
|
+
const storeConfigKeyName = assetsFlags['source-env'] ? 'cross_env_publish' : 'publish_assets';
|
|
24
|
+
updatedFlags = assetsFlags.config ? store.updateMissing(storeConfigKeyName, assetsFlags) : assetsFlags;
|
|
27
25
|
} catch (error) {
|
|
28
26
|
this.error(error.message, { exit: 2 });
|
|
29
27
|
}
|
|
@@ -42,7 +40,10 @@ class AssetsPublishCommand extends Command {
|
|
|
42
40
|
try {
|
|
43
41
|
this.getToken(updatedFlags.alias);
|
|
44
42
|
} catch (error) {
|
|
45
|
-
this.error(
|
|
43
|
+
this.error(
|
|
44
|
+
`The configured management token alias ${updatedFlags.alias} has not been added yet. Add it using 'csdx auth:tokens:add -a ${updatedFlags.alias}'`,
|
|
45
|
+
{ exit: 2 },
|
|
46
|
+
);
|
|
46
47
|
}
|
|
47
48
|
config = {
|
|
48
49
|
alias: updatedFlags.alias,
|
|
@@ -56,39 +57,48 @@ class AssetsPublishCommand extends Command {
|
|
|
56
57
|
try {
|
|
57
58
|
const publishFunction = async (func) => {
|
|
58
59
|
if (!updatedFlags.retryFailed) {
|
|
59
|
-
|
|
60
|
+
try {
|
|
61
|
+
await func(updatedFlags, stack, config);
|
|
62
|
+
} catch (error) {
|
|
63
|
+
let message = formatError(error);
|
|
64
|
+
this.error(message, { exit: 2 });
|
|
65
|
+
}
|
|
60
66
|
} else {
|
|
61
|
-
|
|
67
|
+
try {
|
|
68
|
+
await func(updatedFlags);
|
|
69
|
+
} catch (error) {
|
|
70
|
+
let message = formatError(error);
|
|
71
|
+
this.error(message, { exit: 2 });
|
|
72
|
+
}
|
|
62
73
|
}
|
|
63
|
-
}
|
|
74
|
+
};
|
|
64
75
|
|
|
65
76
|
if (updatedFlags['source-env']) {
|
|
66
|
-
updatedFlags.deliveryToken = updatedFlags['delivery-token']
|
|
67
|
-
updatedFlags.destEnv = updatedFlags.environments
|
|
68
|
-
updatedFlags.environment = updatedFlags['source-env']
|
|
69
|
-
updatedFlags.onlyAssets = true
|
|
77
|
+
updatedFlags.deliveryToken = updatedFlags['delivery-token'];
|
|
78
|
+
updatedFlags.destEnv = updatedFlags.environments;
|
|
79
|
+
updatedFlags.environment = updatedFlags['source-env'];
|
|
80
|
+
updatedFlags.onlyAssets = true;
|
|
70
81
|
if (updatedFlags.locales instanceof Array) {
|
|
71
|
-
updatedFlags.locales.forEach(locale => {
|
|
72
|
-
updatedFlags.locale = locale
|
|
73
|
-
publishFunction(startCrossPublish)
|
|
82
|
+
updatedFlags.locales.forEach((locale) => {
|
|
83
|
+
updatedFlags.locale = locale;
|
|
84
|
+
publishFunction(startCrossPublish);
|
|
74
85
|
});
|
|
75
86
|
} else {
|
|
76
|
-
updatedFlags.locale = locales
|
|
77
|
-
publishFunction(startCrossPublish)
|
|
87
|
+
updatedFlags.locale = locales;
|
|
88
|
+
publishFunction(startCrossPublish);
|
|
78
89
|
}
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
else {
|
|
82
|
-
publishFunction(startPublish)
|
|
90
|
+
} else {
|
|
91
|
+
publishFunction(startPublish);
|
|
83
92
|
}
|
|
84
|
-
|
|
85
93
|
} catch (error) {
|
|
86
94
|
let message = formatError(error);
|
|
87
95
|
this.error(message, { exit: 2 });
|
|
88
96
|
}
|
|
89
97
|
} else {
|
|
90
|
-
this.
|
|
98
|
+
this.error('Confirmation failed');
|
|
91
99
|
}
|
|
100
|
+
} else {
|
|
101
|
+
this.error('Validation failed');
|
|
92
102
|
}
|
|
93
103
|
}
|
|
94
104
|
|
|
@@ -99,10 +109,7 @@ class AssetsPublishCommand extends Command {
|
|
|
99
109
|
}
|
|
100
110
|
|
|
101
111
|
if (sourceEnv && !deliveryToken) {
|
|
102
|
-
this.error(
|
|
103
|
-
'Specify source environment delivery token. Please check --help for more details',
|
|
104
|
-
{ exit: 2 },
|
|
105
|
-
);
|
|
112
|
+
this.error('Specify source environment delivery token. Please check --help for more details', { exit: 2 });
|
|
106
113
|
}
|
|
107
114
|
|
|
108
115
|
if (!environments || environments.length === 0) {
|
|
@@ -154,6 +161,7 @@ AssetsPublishCommand.flags = {
|
|
|
154
161
|
}),
|
|
155
162
|
'folder-uid': flags.string({
|
|
156
163
|
description: '[default: cs_root] Folder-uid from where the assets will be published',
|
|
164
|
+
exclusive: ['source-env'],
|
|
157
165
|
}),
|
|
158
166
|
'bulk-publish': flags.string({
|
|
159
167
|
description:
|
|
@@ -193,18 +201,19 @@ AssetsPublishCommand.flags = {
|
|
|
193
201
|
description: '[default: cs_root] Folder-uid from where the assets will be published',
|
|
194
202
|
hidden: true,
|
|
195
203
|
parse: printFlagDeprecation(['-u', '--folderUid'], ['--folder-uid']),
|
|
204
|
+
exclusive: ['source-env'],
|
|
196
205
|
}),
|
|
197
206
|
bulkPublish: flags.string({
|
|
198
207
|
char: 'b',
|
|
199
208
|
description:
|
|
200
209
|
"By default this flag is set as true. It indicates that contentstack's bulkpublish API will be used to publish the entries",
|
|
201
|
-
|
|
210
|
+
default: 'true',
|
|
202
211
|
hidden: true,
|
|
203
212
|
parse: printFlagDeprecation(['-b', '--bulkPublish'], ['--bulk-publish']),
|
|
204
213
|
}),
|
|
205
214
|
'delivery-token': flags.string({ description: 'Delivery token for source environment' }),
|
|
206
|
-
'source-env': flags.string({ description: 'Source environment'}),
|
|
207
|
-
'content-types': flags.string({ description: 'Content types', multiple: true }), // this is a work around, as this command is to be run with entries:publish command and should not break flags check.
|
|
215
|
+
'source-env': flags.string({ description: 'Source environment' }),
|
|
216
|
+
'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.
|
|
208
217
|
};
|
|
209
218
|
|
|
210
219
|
AssetsPublishCommand.examples = [
|
|
@@ -228,6 +237,7 @@ AssetsPublishCommand.examples = [
|
|
|
228
237
|
|
|
229
238
|
AssetsPublishCommand.aliases = ['cm:bulk-publish:assets'];
|
|
230
239
|
|
|
231
|
-
AssetsPublishCommand.usage =
|
|
240
|
+
AssetsPublishCommand.usage =
|
|
241
|
+
'cm:assets:publish [-a <value>] [--retry-failed <value>] [-e <value>] [--folder-uid <value>] [--bulk-publish <value>] [-c <value>] [-y] [--locales <value>] [--branch <value>] [--delivery-token <value>] [--source-env <value>]';
|
|
232
242
|
|
|
233
243
|
module.exports = AssetsPublishCommand;
|
package/src/consumer/publish.js
CHANGED
|
@@ -66,7 +66,8 @@ async function publishEntry(data, _config, queue) {
|
|
|
66
66
|
delete entryObj.stack;
|
|
67
67
|
console.log(
|
|
68
68
|
chalk.red(
|
|
69
|
-
`entry could not be published with ContentType uid=${entryObj.content_type} entry uid=${
|
|
69
|
+
`entry could not be published with ContentType uid=${entryObj.content_type} entry uid=${
|
|
70
|
+
entryObj.entryUid
|
|
70
71
|
} locale=${entryObj.locale} error=${formatError(error)}`,
|
|
71
72
|
),
|
|
72
73
|
);
|
|
@@ -159,7 +160,8 @@ async function UnpublishEntry(data, _config, queue) {
|
|
|
159
160
|
delete entryObj.stack;
|
|
160
161
|
console.log(
|
|
161
162
|
chalk.red(
|
|
162
|
-
`Entry could not be unpublished with ContentType uid=${entryObj.content_type} Entry uid=${
|
|
163
|
+
`Entry could not be unpublished with ContentType uid=${entryObj.content_type} Entry uid=${
|
|
164
|
+
entryObj.entryUid
|
|
163
165
|
} locale=${entryObj.locale} error=${formatError(error)}`,
|
|
164
166
|
),
|
|
165
167
|
);
|
|
@@ -114,6 +114,7 @@ async function bulkAction(stack, items, bulkPublish, filter, destEnv) {
|
|
|
114
114
|
await assetQueue.Enqueue({
|
|
115
115
|
assetUid: items[index].data.uid,
|
|
116
116
|
publish_details: [items[index].data.publish_details],
|
|
117
|
+
locale: filter.locale,
|
|
117
118
|
environments: destEnv,
|
|
118
119
|
Type: 'asset',
|
|
119
120
|
stack: stack,
|
|
@@ -139,7 +140,7 @@ async function getSyncEntries(
|
|
|
139
140
|
try {
|
|
140
141
|
const tokenDetails = command.getToken(config.alias);
|
|
141
142
|
const queryParamsObj = {};
|
|
142
|
-
const pairs = queryParams.split('&');
|
|
143
|
+
const pairs = queryParams.split('&').filter((e) => e !== null && e !== '' && e !== undefined);
|
|
143
144
|
for (let i in pairs) {
|
|
144
145
|
const split = pairs[i].split('=');
|
|
145
146
|
queryParamsObj[decodeURIComponent(split[0])] = decodeURIComponent(split[1]);
|
|
@@ -187,10 +188,10 @@ async function getSyncEntries(
|
|
|
187
188
|
entriesResponse.pagination_token,
|
|
188
189
|
);
|
|
189
190
|
}, 3000);
|
|
191
|
+
return resolve();
|
|
190
192
|
} catch (error) {
|
|
191
193
|
reject(error);
|
|
192
194
|
}
|
|
193
|
-
return resolve();
|
|
194
195
|
});
|
|
195
196
|
}
|
|
196
197
|
|
|
@@ -244,10 +245,10 @@ async function start(
|
|
|
244
245
|
return false;
|
|
245
246
|
}
|
|
246
247
|
|
|
247
|
-
|
|
248
|
-
setConfig(config,
|
|
248
|
+
const bulkPublishFlag = retryFailed.match(/bulk/) ? true : false;
|
|
249
|
+
setConfig(config, bulkPublishFlag);
|
|
249
250
|
|
|
250
|
-
if (
|
|
251
|
+
if (bulkPublishFlag) {
|
|
251
252
|
await retryFailedLogs(retryFailed, queue, 'bulk');
|
|
252
253
|
} else {
|
|
253
254
|
await retryFailedLogs(retryFailed, { entryQueue, assetQueue }, 'publish');
|
package/src/util/index.js
CHANGED
|
@@ -1,42 +1,38 @@
|
|
|
1
|
-
const chalk = require('chalk')
|
|
2
|
-
const fs = require('fs')
|
|
1
|
+
const chalk = require('chalk');
|
|
2
|
+
const fs = require('fs');
|
|
3
3
|
|
|
4
4
|
function prettyPrint(data) {
|
|
5
|
-
console.log(chalk.yellow('Configuration to be used for executing this command:'))
|
|
5
|
+
console.log(chalk.yellow('Configuration to be used for executing this command:'));
|
|
6
6
|
Object.keys(data).forEach((key, _index) => {
|
|
7
|
-
console.log(chalk.grey(`${key}: ${data[key]}`))
|
|
8
|
-
})
|
|
9
|
-
console.log('\n')
|
|
7
|
+
console.log(chalk.grey(`${key}: ${data[key]}`));
|
|
8
|
+
});
|
|
9
|
+
console.log('\n');
|
|
10
10
|
}
|
|
11
11
|
|
|
12
12
|
function formatError(error) {
|
|
13
13
|
try {
|
|
14
14
|
if (typeof error === 'string') {
|
|
15
|
-
error = JSON.parse(error)
|
|
15
|
+
error = JSON.parse(error);
|
|
16
16
|
} else {
|
|
17
|
-
error = JSON.parse(error.message)
|
|
17
|
+
error = JSON.parse(error.message);
|
|
18
18
|
}
|
|
19
19
|
} catch (e) {}
|
|
20
|
-
let message = error.errorMessage || error.error_message || error
|
|
20
|
+
let message = error.errorMessage || error.error_message || error.statusText || error;
|
|
21
21
|
if (error.errors && Object.keys(error.errors).length > 0) {
|
|
22
22
|
Object.keys(error.errors).forEach((e) => {
|
|
23
|
-
let entity = e
|
|
24
|
-
if (e === 'authorization')
|
|
25
|
-
|
|
26
|
-
if (e === '
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
if (e === 'access_token')
|
|
31
|
-
entity = 'Delivery Token'
|
|
32
|
-
message += ' ' + [entity, error.errors[e]].join(' ')
|
|
33
|
-
})
|
|
23
|
+
let entity = e;
|
|
24
|
+
if (e === 'authorization') entity = 'Management Token';
|
|
25
|
+
if (e === 'api_key') entity = 'Stack API key';
|
|
26
|
+
if (e === 'uid') entity = 'Content Type';
|
|
27
|
+
if (e === 'access_token') entity = 'Delivery Token';
|
|
28
|
+
message += ' ' + [entity, error.errors[e]].join(' ');
|
|
29
|
+
});
|
|
34
30
|
}
|
|
35
|
-
return message
|
|
31
|
+
return message;
|
|
36
32
|
}
|
|
37
33
|
|
|
38
34
|
function formatHostname(hostname) {
|
|
39
|
-
return hostname.split('//').pop()
|
|
35
|
+
return hostname.split('//').pop();
|
|
40
36
|
}
|
|
41
37
|
|
|
42
38
|
function setDelayForBulkPublish(_queue) {
|
|
@@ -49,18 +45,25 @@ function getNumberOfBulkPublishRequests(count) {
|
|
|
49
45
|
// for example, if the total count of elements is 738
|
|
50
46
|
// then the number of requets that'll be required are (if there are 10 elements per request)
|
|
51
47
|
// (738 - 8)/10 + 1 = 74 requests
|
|
52
|
-
return (count - (count % 10)) / 10 + 1
|
|
48
|
+
return (count - (count % 10)) / 10 + 1;
|
|
53
49
|
}
|
|
54
50
|
|
|
55
51
|
function isEmpty(file) {
|
|
56
52
|
return new Promise((resolve) => {
|
|
57
53
|
fs.readFile(file, (_err, data) => {
|
|
58
54
|
if (data.length === 0) {
|
|
59
|
-
return resolve(true)
|
|
55
|
+
return resolve(true);
|
|
60
56
|
}
|
|
61
|
-
return resolve(false)
|
|
62
|
-
})
|
|
63
|
-
})
|
|
57
|
+
return resolve(false);
|
|
58
|
+
});
|
|
59
|
+
});
|
|
64
60
|
}
|
|
65
61
|
|
|
66
|
-
module.exports = {
|
|
62
|
+
module.exports = {
|
|
63
|
+
prettyPrint,
|
|
64
|
+
formatError,
|
|
65
|
+
formatHostname,
|
|
66
|
+
setDelayForBulkPublish,
|
|
67
|
+
getNumberOfBulkPublishRequests,
|
|
68
|
+
isEmpty,
|
|
69
|
+
};
|