@contentstack/cli 1.7.8 → 1.7.10
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 +66 -46
- package/lib/help.d.ts +1 -1
- package/lib/help.js +1 -2
- package/lib/interfaces/index.d.ts +1 -1
- package/lib/utils/context-handler.d.ts +1 -0
- package/oclif.manifest.json +1 -1
- package/package.json +18 -17
package/README.md
CHANGED
|
@@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli
|
|
|
18
18
|
$ csdx COMMAND
|
|
19
19
|
running command...
|
|
20
20
|
$ csdx (--version|-v)
|
|
21
|
-
@contentstack/cli/1.7.
|
|
21
|
+
@contentstack/cli/1.7.10 linux-x64 node-v18.16.1
|
|
22
22
|
$ csdx --help [COMMAND]
|
|
23
23
|
USAGE
|
|
24
24
|
$ csdx COMMAND
|
|
@@ -301,6 +301,7 @@ FLAGS
|
|
|
301
301
|
-a, --alias=<value> Alias(name) for the management token
|
|
302
302
|
-c, --config=<value> Path to the config file
|
|
303
303
|
-e, --environments=<value>... Environments where assets will be published
|
|
304
|
+
-k, --stack-api-key=<value> Stack api key to be used
|
|
304
305
|
-l, --locales=<value>... Locales to where assets will be published
|
|
305
306
|
-y, --yes Agree to process the command with the current configuration
|
|
306
307
|
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
|
|
@@ -355,6 +356,12 @@ EXAMPLES
|
|
|
355
356
|
Using --source-env
|
|
356
357
|
|
|
357
358
|
$ csdx cm:assets:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --source-env [SOURCE ENVIRONMENT] --delivery-token [DELIVERY TOKEN]
|
|
359
|
+
|
|
360
|
+
|
|
361
|
+
|
|
362
|
+
Using --stack-api-key flag
|
|
363
|
+
|
|
364
|
+
$ csdx cm:assets:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --stack-api-key [STACK API KEY]
|
|
358
365
|
```
|
|
359
366
|
|
|
360
367
|
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/main/packages/contentstack-bulk-publish/src/commands/cm/assets/publish.js)_
|
|
@@ -365,22 +372,23 @@ Unpublish assets from given environment
|
|
|
365
372
|
|
|
366
373
|
```
|
|
367
374
|
USAGE
|
|
368
|
-
$ csdx cm:assets:unpublish [-a <value>] [-e <value>] [-c <value>] [-y] [--locale <value>] [--branch
|
|
369
|
-
[--retry-failed <value>] [--bulk-unpublish <value>] [--api-version <value>] [--delivery-token <value>]
|
|
375
|
+
$ csdx cm:assets:unpublish [-a <value>] [-k <value>] [-e <value>] [-c <value>] [-y] [--locale <value>] [--branch
|
|
376
|
+
<value>] [--retry-failed <value>] [--bulk-unpublish <value>] [--api-version <value>] [--delivery-token <value>]
|
|
370
377
|
|
|
371
378
|
FLAGS
|
|
372
|
-
-a, --alias=<value>
|
|
373
|
-
-c, --config=<value>
|
|
374
|
-
-e, --environment=<value>
|
|
375
|
-
-
|
|
376
|
-
|
|
377
|
-
--
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
--
|
|
383
|
-
--
|
|
379
|
+
-a, --alias=<value> Alias(name) for the management token
|
|
380
|
+
-c, --config=<value> Path to the config file
|
|
381
|
+
-e, --environment=<value> Source Environment
|
|
382
|
+
-k, --stack-api-key=<value> Stack api key to be used
|
|
383
|
+
-y, --yes Agree to process the command with the current configuration
|
|
384
|
+
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
|
|
385
|
+
--branch=<value> [default: main] Specify the branch to fetch the content (by default the main branch is
|
|
386
|
+
selected)
|
|
387
|
+
--bulk-unpublish=<value> [default: true] By default this flag is set as true. It indicates that contentstack's
|
|
388
|
+
bulkpublish API will be used to unpublish the assets
|
|
389
|
+
--delivery-token=<value> Delivery Token for source environment
|
|
390
|
+
--locale=<value> Locale filter
|
|
391
|
+
--retry-failed=<value> Retry unpublishing failed assets from the logfile
|
|
384
392
|
|
|
385
393
|
DESCRIPTION
|
|
386
394
|
Unpublish assets from given environment
|
|
@@ -415,6 +423,12 @@ EXAMPLES
|
|
|
415
423
|
Using --branch flag
|
|
416
424
|
|
|
417
425
|
$ csdx cm:assets:unpublish --bulk-unpublish --environment [SOURCE ENV] --locale [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --delivery-token [DELIVERY TOKEN] --branch [BRANCH NAME]
|
|
426
|
+
|
|
427
|
+
|
|
428
|
+
|
|
429
|
+
Using --stack-api-key flag
|
|
430
|
+
|
|
431
|
+
$ csdx cm:assets:unpublish --bulk-unpublish --environment [SOURCE ENV] --locale [LOCALE] --stack-api-key [STACK API KEY] --delivery-token [DELIVERY TOKEN]
|
|
418
432
|
```
|
|
419
433
|
|
|
420
434
|
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/main/packages/contentstack-bulk-publish/src/commands/cm/assets/unpublish.js)_
|
|
@@ -718,6 +732,7 @@ FLAGS
|
|
|
718
732
|
-a, --alias=<value> Alias(name) for the management token
|
|
719
733
|
-c, --config=<value> Path to the config file
|
|
720
734
|
-e, --environments=<value>... Environments where assets will be published
|
|
735
|
+
-k, --stack-api-key=<value> Stack api key to be used
|
|
721
736
|
-l, --locales=<value>... Locales to where assets will be published
|
|
722
737
|
-y, --yes Agree to process the command with the current configuration
|
|
723
738
|
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
|
|
@@ -772,6 +787,12 @@ EXAMPLES
|
|
|
772
787
|
Using --source-env
|
|
773
788
|
|
|
774
789
|
$ csdx cm:assets:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --alias [MANAGEMENT TOKEN ALIAS] --source-env [SOURCE ENVIRONMENT] --delivery-token [DELIVERY TOKEN]
|
|
790
|
+
|
|
791
|
+
|
|
792
|
+
|
|
793
|
+
Using --stack-api-key flag
|
|
794
|
+
|
|
795
|
+
$ csdx cm:assets:publish --environments [ENVIRONMENT 1] [ENVIRONMENT 2] --locales [LOCALE] --stack-api-key [STACK API KEY]
|
|
775
796
|
```
|
|
776
797
|
|
|
777
798
|
## `csdx cm:bulk-publish:clear`
|
|
@@ -838,23 +859,24 @@ USAGE
|
|
|
838
859
|
[-y] [--branch <value>] [--onlyAssets] [--onlyEntries]
|
|
839
860
|
|
|
840
861
|
FLAGS
|
|
841
|
-
-B, --branch=<value>
|
|
842
|
-
|
|
843
|
-
-a, --alias=<value>
|
|
844
|
-
-c, --config=<value>
|
|
845
|
-
-
|
|
846
|
-
|
|
847
|
-
--
|
|
848
|
-
|
|
849
|
-
|
|
850
|
-
--
|
|
851
|
-
--
|
|
852
|
-
--
|
|
853
|
-
--
|
|
854
|
-
--
|
|
855
|
-
--
|
|
856
|
-
|
|
857
|
-
|
|
862
|
+
-B, --branch=<value> [default: main] Specify the branch to fetch the content (by default the main branch is
|
|
863
|
+
selected)
|
|
864
|
+
-a, --alias=<value> Alias(name) for the management token
|
|
865
|
+
-c, --config=<value> Path to the config file
|
|
866
|
+
-k, --stack-api-key=<value> Stack api key to be used
|
|
867
|
+
-y, --yes Agree to process the command with the current configuration
|
|
868
|
+
--api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
|
|
869
|
+
--bulk-publish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
|
|
870
|
+
bulkpublish API will be used to publish the entries
|
|
871
|
+
--content-type=<value>... The Contenttypes from which entries will be published
|
|
872
|
+
--delivery-token=<value> Delivery token for source environment
|
|
873
|
+
--environments=<value>... Destination Environments
|
|
874
|
+
--locales=<value> Source locale
|
|
875
|
+
--onlyAssets Unpublish only assets
|
|
876
|
+
--onlyEntries Unpublish only entries
|
|
877
|
+
--retry-failed=<value> (optional) Retry publishing failed entries from the logfile (this flag overrides all
|
|
878
|
+
other flags)
|
|
879
|
+
--source-env=<value> Source Env
|
|
858
880
|
|
|
859
881
|
DESCRIPTION
|
|
860
882
|
Publish entries and assets from one environment to other environments
|
|
@@ -893,6 +915,12 @@ EXAMPLES
|
|
|
893
915
|
Using --branch flag
|
|
894
916
|
|
|
895
917
|
$ 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]
|
|
918
|
+
|
|
919
|
+
|
|
920
|
+
|
|
921
|
+
Using --stack-api-key flag
|
|
922
|
+
|
|
923
|
+
$ csdx cm:bulk-publish:cross-publish --content-type [CONTENT TYPE] --source-env [SOURCE ENV] --environments [DESTINATION ENVIRONMENT] --locales [LOCALE] --stack-api-key [STACK API KEY] --delivery-token [DELIVERY TOKEN]
|
|
896
924
|
```
|
|
897
925
|
|
|
898
926
|
_See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/main/packages/contentstack-bulk-publish/src/commands/cm/bulk-publish/cross-publish.js)_
|
|
@@ -1866,7 +1894,7 @@ _See code: [@contentstack/cli-cm-export-to-csv](https://github.com/contentstack/
|
|
|
1866
1894
|
|
|
1867
1895
|
## `csdx cm:stacks:import [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--backup-dir <value>] [--branch <value>] [--import-webhook-status disable|current]`
|
|
1868
1896
|
|
|
1869
|
-
Import
|
|
1897
|
+
Import content from a stack
|
|
1870
1898
|
|
|
1871
1899
|
```
|
|
1872
1900
|
USAGE
|
|
@@ -1886,11 +1914,7 @@ FLAGS
|
|
|
1886
1914
|
<options: disable|current>
|
|
1887
1915
|
|
|
1888
1916
|
DESCRIPTION
|
|
1889
|
-
Import
|
|
1890
|
-
...
|
|
1891
|
-
Once you export content from the source stack, import it to your destination stack by using the cm:stacks:import
|
|
1892
|
-
command.
|
|
1893
|
-
|
|
1917
|
+
Import content from a stack
|
|
1894
1918
|
|
|
1895
1919
|
ALIASES
|
|
1896
1920
|
$ csdx cm:import
|
|
@@ -2187,11 +2211,11 @@ EXAMPLES
|
|
|
2187
2211
|
$ csdx cm:stacks:export --branch [optional] branch name
|
|
2188
2212
|
```
|
|
2189
2213
|
|
|
2190
|
-
_See code: [@contentstack/cli-cm-export](https://github.com/contentstack/cli/blob/main/packages/contentstack-export/src/commands/cm/stacks/export.
|
|
2214
|
+
_See code: [@contentstack/cli-cm-export](https://github.com/contentstack/cli/blob/main/packages/contentstack-export/src/commands/cm/stacks/export.ts)_
|
|
2191
2215
|
|
|
2192
2216
|
## `csdx cm:stacks:import [-c <value>] [-k <value>] [-d <value>] [-a <value>] [--module <value>] [--backup-dir <value>] [--branch <value>] [--import-webhook-status disable|current]`
|
|
2193
2217
|
|
|
2194
|
-
Import
|
|
2218
|
+
Import content from a stack
|
|
2195
2219
|
|
|
2196
2220
|
```
|
|
2197
2221
|
USAGE
|
|
@@ -2211,11 +2235,7 @@ FLAGS
|
|
|
2211
2235
|
<options: disable|current>
|
|
2212
2236
|
|
|
2213
2237
|
DESCRIPTION
|
|
2214
|
-
Import
|
|
2215
|
-
...
|
|
2216
|
-
Once you export content from the source stack, import it to your destination stack by using the cm:stacks:import
|
|
2217
|
-
command.
|
|
2218
|
-
|
|
2238
|
+
Import content from a stack
|
|
2219
2239
|
|
|
2220
2240
|
ALIASES
|
|
2221
2241
|
$ csdx cm:import
|
|
@@ -2238,7 +2258,7 @@ EXAMPLES
|
|
|
2238
2258
|
$ csdx cm:stacks:import --branch <branch name> --yes
|
|
2239
2259
|
```
|
|
2240
2260
|
|
|
2241
|
-
_See code: [@contentstack/cli-cm-import](https://github.com/contentstack/cli/blob/main/packages/contentstack-import/src/commands/cm/stacks/import.
|
|
2261
|
+
_See code: [@contentstack/cli-cm-import](https://github.com/contentstack/cli/blob/main/packages/contentstack-import/src/commands/cm/stacks/import.ts)_
|
|
2242
2262
|
|
|
2243
2263
|
## `csdx cm:stacks:migration [-k <value>] [-a <value>] [--file-path <value>] [--branch <value>] [--config-file <value>] [--config <value>] [--multiple]`
|
|
2244
2264
|
|
package/lib/help.d.ts
CHANGED
package/lib/help.js
CHANGED
|
@@ -1,10 +1,9 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
const tslib_1 = require("tslib");
|
|
4
|
-
const core_1 = require("@oclif/core");
|
|
5
4
|
const figlet = tslib_1.__importStar(require("figlet"));
|
|
6
5
|
const cli_utilities_1 = require("@contentstack/cli-utilities");
|
|
7
|
-
class MyHelpClass extends
|
|
6
|
+
class MyHelpClass extends cli_utilities_1.Help {
|
|
8
7
|
constructor(config, opts) {
|
|
9
8
|
super(config, opts);
|
|
10
9
|
}
|
package/oclif.manifest.json
CHANGED
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@contentstack/cli",
|
|
3
3
|
"description": "Command-line tool (CLI) to interact with Contentstack",
|
|
4
|
-
"version": "1.7.
|
|
4
|
+
"version": "1.7.10",
|
|
5
5
|
"author": "Contentstack",
|
|
6
6
|
"bin": {
|
|
7
7
|
"csdx": "./bin/run"
|
|
@@ -22,22 +22,22 @@
|
|
|
22
22
|
"prepack": "pnpm compile && oclif manifest && oclif readme"
|
|
23
23
|
},
|
|
24
24
|
"dependencies": {
|
|
25
|
-
"@contentstack/cli-auth": "^1.3.
|
|
26
|
-
"@contentstack/cli-cm-bootstrap": "^1.4.
|
|
27
|
-
"@contentstack/cli-cm-bulk-publish": "^1.3.
|
|
28
|
-
"@contentstack/cli-cm-clone": "^1.4.
|
|
29
|
-
"@contentstack/cli-cm-export": "^1.
|
|
30
|
-
"@contentstack/cli-cm-export-to-csv": "^1.3.
|
|
31
|
-
"@contentstack/cli-cm-import": "^1.
|
|
32
|
-
"@contentstack/cli-cm-migrate-rte": "^1.4.
|
|
33
|
-
"@contentstack/cli-cm-seed": "^1.4.
|
|
34
|
-
"@contentstack/cli-command": "^1.2.
|
|
35
|
-
"@contentstack/cli-config": "^1.4.
|
|
36
|
-
"@contentstack/cli-launch": "^1.0.
|
|
37
|
-
"@contentstack/cli-migration": "^1.3.
|
|
38
|
-
"@contentstack/cli-utilities": "^1.
|
|
25
|
+
"@contentstack/cli-auth": "^1.3.11",
|
|
26
|
+
"@contentstack/cli-cm-bootstrap": "^1.4.12",
|
|
27
|
+
"@contentstack/cli-cm-bulk-publish": "^1.3.9",
|
|
28
|
+
"@contentstack/cli-cm-clone": "^1.4.12",
|
|
29
|
+
"@contentstack/cli-cm-export": "^1.6.1",
|
|
30
|
+
"@contentstack/cli-cm-export-to-csv": "^1.3.11",
|
|
31
|
+
"@contentstack/cli-cm-import": "^1.6.0",
|
|
32
|
+
"@contentstack/cli-cm-migrate-rte": "^1.4.9",
|
|
33
|
+
"@contentstack/cli-cm-seed": "^1.4.12",
|
|
34
|
+
"@contentstack/cli-command": "^1.2.10",
|
|
35
|
+
"@contentstack/cli-config": "^1.4.9",
|
|
36
|
+
"@contentstack/cli-launch": "^1.0.8",
|
|
37
|
+
"@contentstack/cli-migration": "^1.3.9",
|
|
38
|
+
"@contentstack/cli-utilities": "^1.5.0",
|
|
39
39
|
"@contentstack/management": "^1.8.0",
|
|
40
|
-
"@contentstack/cli-cm-branches": "^1.0.
|
|
40
|
+
"@contentstack/cli-cm-branches": "^1.0.9",
|
|
41
41
|
"@oclif/plugin-help": "^5",
|
|
42
42
|
"@oclif/plugin-not-found": "^2.3.9",
|
|
43
43
|
"@oclif/plugin-plugins": "^2.1.7",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"eslint-config-oclif": "^4.0.0",
|
|
66
66
|
"eslint-config-oclif-typescript": "^0.1.0",
|
|
67
67
|
"globby": "^10.0.2",
|
|
68
|
-
"mocha": "
|
|
68
|
+
"mocha": "10.1.0",
|
|
69
69
|
"nock": "^13.1.0",
|
|
70
70
|
"nyc": "^15.1.0",
|
|
71
71
|
"oclif": "^3.8.1",
|
|
@@ -74,6 +74,7 @@
|
|
|
74
74
|
"sinon": "^15.0.1",
|
|
75
75
|
"tmp": "^0.2.1",
|
|
76
76
|
"ts-node": "^10.9.1",
|
|
77
|
+
"tslib": "^2.4.1",
|
|
77
78
|
"typescript": "^4.9.3"
|
|
78
79
|
},
|
|
79
80
|
"engines": {
|