@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 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.8 linux-x64 node-v16.20.1
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 <value>]
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> Alias(name) for the management token
373
- -c, --config=<value> Path to the config file
374
- -e, --environment=<value> Source Environment
375
- -y, --yes Agree to process the command with the current configuration
376
- --api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
377
- --branch=<value> [default: main] Specify the branch to fetch the content (by default the main branch is
378
- selected)
379
- --bulk-unpublish=<value> [default: true] By default this flag is set as true. It indicates that contentstack's
380
- bulkpublish API will be used to unpublish the assets
381
- --delivery-token=<value> Delivery Token for source environment
382
- --locale=<value> Locale filter
383
- --retry-failed=<value> Retry unpublishing failed assets from the logfile
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> [default: main] Specify the branch to fetch the content (by default the main branch is
842
- selected)
843
- -a, --alias=<value> Alias(name) for the management token
844
- -c, --config=<value> Path to the config file
845
- -y, --yes Agree to process the command with the current configuration
846
- --api-version=<value> API Version to be used. Values [Default: 3, Nested Reference Publishing: 3.2].
847
- --bulk-publish=<value> [default: true] This flag is set to true by default. It indicates that contentstack's
848
- bulkpublish API will be used to publish the entries
849
- --content-type=<value>... The Contenttypes from which entries will be published
850
- --delivery-token=<value> Delivery token for source environment
851
- --environments=<value>... Destination Environments
852
- --locales=<value> Source locale
853
- --onlyAssets Unpublish only assets
854
- --onlyEntries Unpublish only entries
855
- --retry-failed=<value> (optional) Retry publishing failed entries from the logfile (this flag overrides all other
856
- flags)
857
- --source-env=<value> Source Env
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 script for importing the content into the new stack
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 script for importing the content into the new stack
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.js)_
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 script for importing the content into the new stack
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 script for importing the content into the new stack
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.js)_
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
@@ -1,4 +1,4 @@
1
- import { Help } from '@oclif/core';
1
+ import { Help } from '@contentstack/cli-utilities';
2
2
  export default class MyHelpClass extends Help {
3
3
  constructor(config: any, opts: any);
4
4
  showRootHelp(): any;
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 core_1.Help {
6
+ class MyHelpClass extends cli_utilities_1.Help {
8
7
  constructor(config, opts) {
9
8
  super(config, opts);
10
9
  }
@@ -1,4 +1,4 @@
1
- import { Config, Plugin } from '@oclif/core';
1
+ import { Config, Plugin } from '@contentstack/cli-utilities';
2
2
  export interface PrintOptions {
3
3
  color?: string;
4
4
  }
@@ -10,6 +10,7 @@ export default class CsdxContext {
10
10
  readonly messageFilePath: string;
11
11
  readonly analyticsInfo: string;
12
12
  flagWarningPrintState: any;
13
+ flags: any;
13
14
  constructor(cliOpts: any, cliConfig: any);
14
15
  getToken(alias: string): any;
15
16
  }
@@ -1,4 +1,4 @@
1
1
  {
2
- "version": "1.7.8",
2
+ "version": "1.7.10",
3
3
  "commands": {}
4
4
  }
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.8",
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.10",
26
- "@contentstack/cli-cm-bootstrap": "^1.4.10",
27
- "@contentstack/cli-cm-bulk-publish": "^1.3.8",
28
- "@contentstack/cli-cm-clone": "^1.4.10",
29
- "@contentstack/cli-cm-export": "^1.5.9",
30
- "@contentstack/cli-cm-export-to-csv": "^1.3.10",
31
- "@contentstack/cli-cm-import": "^1.5.10",
32
- "@contentstack/cli-cm-migrate-rte": "^1.4.8",
33
- "@contentstack/cli-cm-seed": "^1.4.10",
34
- "@contentstack/cli-command": "^1.2.9",
35
- "@contentstack/cli-config": "^1.4.8",
36
- "@contentstack/cli-launch": "^1.0.7",
37
- "@contentstack/cli-migration": "^1.3.8",
38
- "@contentstack/cli-utilities": "^1.4.5",
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.7",
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": "^10.0.0",
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": {