@contentstack/cli 2.0.0-beta.13 → 2.0.0-beta.15

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/2.0.0-beta.13 linux-x64 node-v22.22.0
21
+ @contentstack/cli/2.0.0-beta.15 linux-x64 node-v22.22.1
22
22
  $ csdx --help [COMMAND]
23
23
  USAGE
24
24
  $ csdx COMMAND
@@ -41,6 +41,8 @@ USAGE
41
41
  * [`csdx cm:branches:delete [-uid <value>] [-k <value>]`](#csdx-cmbranchesdelete--uid-value--k-value)
42
42
  * [`csdx cm:branches:diff [--base-branch <value>] [--compare-branch <value>] [-k <value>][--module <value>] [--format <value>] [--csv-path <value>]`](#csdx-cmbranchesdiff---base-branch-value---compare-branch-value--k-value--module-value---format-value---csv-path-value)
43
43
  * [`csdx cm:branches:merge [-k <value>][--compare-branch <value>] [--no-revert] [--export-summary-path <value>] [--use-merge-summary <value>] [--comment <value>] [--base-branch <value>]`](#csdx-cmbranchesmerge--k-value--compare-branch-value---no-revert---export-summary-path-value---use-merge-summary-value---comment-value---base-branch-value)
44
+ * [`csdx cm:export-to-csv`](#csdx-cmexport-to-csv)
45
+ * [`csdx cm:stacks:migration [-k <value>] [-a <value>] [--file-path <value>] [--branch <value>] [--config-file <value>] [--config <value>] [--multiple]`](#csdx-cmstacksmigration--k-value--a-value---file-path-value---branch-value---config-file-value---config-value---multiple)
44
46
  * [`csdx cm:stacks:clone [--source-branch <value>] [--target-branch <value>] [--source-management-token-alias <value>] [--destination-management-token-alias <value>] [-n <value>] [--type a|b] [--source-stack-api-key <value>] [--destination-stack-api-key <value>] [--import-webhook-status disable|current]`](#csdx-cmstacksclone---source-branch-value---target-branch-value---source-management-token-alias-value---destination-management-token-alias-value--n-value---type-ab---source-stack-api-key-value---destination-stack-api-key-value---import-webhook-status-disablecurrent)
45
47
  * [`csdx cm:stacks:audit`](#csdx-cmstacksaudit)
46
48
  * [`csdx cm:stacks:audit:fix`](#csdx-cmstacksauditfix)
@@ -50,6 +52,7 @@ USAGE
50
52
  * [`csdx cm:stacks:export [--config <value>] [--stack-api-key <value>] [--data-dir <value>] [--alias <value>] [--module <value>] [--content-types <value>] [--branch <value>] [--secured-assets]`](#csdx-cmstacksexport---config-value---stack-api-key-value---data-dir-value---alias-value---module-value---content-types-value---branch-value---secured-assets)
51
53
  * [`csdx cm:stacks:import [--config <value>] [--stack-api-key <value>] [--data-dir <value>] [--alias <value>] [--module <value>] [--backup-dir <value>] [--branch <value>] [--import-webhook-status disable|current]`](#csdx-cmstacksimport---config-value---stack-api-key-value---data-dir-value---alias-value---module-value---backup-dir-value---branch-value---import-webhook-status-disablecurrent)
52
54
  * [`csdx cm:stacks:import-setup [-k <value>] [-d <value>] [-a <value>] [--modules <value,value>]`](#csdx-cmstacksimport-setup--k-value--d-value--a-value---modules-valuevalue)
55
+ * [`csdx cm:stacks:migration [-k <value>] [-a <value>] [--file-path <value>] [--branch <value>] [--config-file <value>] [--config <value>] [--multiple]`](#csdx-cmstacksmigration--k-value--a-value---file-path-value---branch-value---config-file-value---config-value---multiple)
53
56
  * [`csdx cm:stacks:seed [--repo <value>] [--org <value>] [--stack-api-key <value>] [--stack-name <value>] [--yes <value>] [--alias <value>] [--locale <value>]`](#csdx-cmstacksseed---repo-value---org-value---stack-api-key-value---stack-name-value---yes-value---alias-value---locale-value)
54
57
  * [`csdx config:get:base-branch`](#csdx-configgetbase-branch)
55
58
  * [`csdx config:get:ea-header`](#csdx-configgetea-header)
@@ -489,6 +492,142 @@ EXAMPLES
489
492
 
490
493
  _See code: [@contentstack/cli-cm-branches](https://github.com/contentstack/cli/blob/main/packages/contentstack-export/src/commands/cm/branches/merge.ts)_
491
494
 
495
+ ## `csdx cm:export-to-csv`
496
+
497
+ Export entries, taxonomies, terms or organization users to csv using this command
498
+
499
+ ```
500
+ USAGE
501
+ $ csdx cm:export-to-csv [--action entries|users|teams|taxonomies] [-a <value>] [--org <value>] [-n <value>] [-k
502
+ <value>] [--org-name <value>] [--locale <value>] [--content-type <value>] [--branch <value>] [--team-uid <value>]
503
+ [--taxonomy-uid <value>] [--include-fallback] [--fallback-locale <value>] [--delimiter <value>]
504
+
505
+ FLAGS
506
+ -a, --alias=<value> Alias of the management token.
507
+ -k, --stack-api-key=<value> API Key of the source stack.
508
+ -n, --stack-name=<value> Name of the stack that needs to be created as CSV filename.
509
+ --action=<option> Option to export data (entries, users, teams, taxonomies). <options:
510
+ entries|users|teams|taxonomies>
511
+ <options: entries|users|teams|taxonomies>
512
+ --branch=<value> Branch from which entries will be exported.
513
+ --content-type=<value> Content type of entries that will be exported.
514
+ --delimiter=<value> [default: ,] [optional] Provide a delimiter to separate individual data fields within
515
+ the CSV file. For example: cm:export-to-csv --delimiter '|'
516
+ --fallback-locale=<value> [Optional] Specify a specific fallback locale for taxonomy export. This locale will be
517
+ used when a taxonomy term doesn't exist in the primary locale. Takes priority over
518
+ branch fallback hierarchy when both are specified.
519
+ --include-fallback [Optional] Include fallback locale data when exporting taxonomies. When enabled, if a
520
+ taxonomy term doesn't exist in the specified locale, it will fallback to the hierarchy
521
+ defined in the branch settings.
522
+ --locale=<value> Locale of entries that will be exported.
523
+ --org=<value> Provide organization UID to clone org users.
524
+ --org-name=<value> Name of the organization that needs to be created as CSV filename.
525
+ --taxonomy-uid=<value> Provide the taxonomy UID of the related terms you want to export.
526
+ --team-uid=<value> Provide the UID of a specific team in an organization.
527
+
528
+ DESCRIPTION
529
+ Export entries, taxonomies, terms or organization users to csv using this command
530
+
531
+ ALIASES
532
+ $ csdx cm:export-to-csv
533
+
534
+ EXAMPLES
535
+ $ csdx cm:export-to-csv
536
+
537
+
538
+
539
+ Exporting entries to CSV
540
+
541
+ $ csdx cm:export-to-csv --action entries --locale <locale> --alias <management-token-alias> --content-type <content-type>
542
+
543
+
544
+
545
+ Exporting entries to CSV with stack name and branch
546
+
547
+ $ csdx cm:export-to-csv --action entries --locale <locale> --alias <management-token-alias> --content-type <content-type> --stack-name <stack-name> --branch <branch-name>
548
+
549
+
550
+
551
+ Exporting organization users to CSV
552
+
553
+ $ csdx cm:export-to-csv --action users --org <org-uid>
554
+
555
+
556
+
557
+ Exporting organization teams to CSV
558
+
559
+ $ csdx cm:export-to-csv --action teams --org <org-uid>
560
+
561
+
562
+
563
+ Exporting teams with specific team UID
564
+
565
+ $ csdx cm:export-to-csv --action teams --org <org-uid> --team-uid <team-uid>
566
+
567
+
568
+
569
+ Exporting taxonomies to CSV
570
+
571
+ $ csdx cm:export-to-csv --action taxonomies --alias <management-token-alias>
572
+
573
+
574
+
575
+ Exporting specific taxonomy with locale
576
+
577
+ $ csdx cm:export-to-csv --action taxonomies --alias <management-token-alias> --taxonomy-uid <taxonomy-uid> --locale <locale>
578
+
579
+
580
+
581
+ Exporting taxonomies with fallback locale
582
+
583
+ $ csdx cm:export-to-csv --action taxonomies --alias <management-token-alias> --locale <locale> --include-fallback --fallback-locale <fallback-locale>
584
+ ```
585
+
586
+ _See code: [@contentstack/cli-cm-export-to-csv](https://github.com/contentstack/cli/blob/main/packages/contentstack-export-to-csv/src/commands/cm/export-to-csv.ts)_
587
+
588
+ ## `csdx cm:stacks:migration [-k <value>] [-a <value>] [--file-path <value>] [--branch <value>] [--config-file <value>] [--config <value>] [--multiple]`
589
+
590
+ Contentstack migration script.
591
+
592
+ ```
593
+ USAGE
594
+ $ csdx cm:migration cm:stacks:migration [-k <value>] [-a <value>] [--file-path <value>] [--branch <value>]
595
+ [--config-file <value>] [--config <value>] [--multiple]
596
+
597
+ FLAGS
598
+ -a, --alias=<value> Use this flag to add the management token alias. You must use either the --alias flag or
599
+ the --stack-api-key flag.
600
+ -k, --stack-api-key=<value> Use this flag to add the API key of your stack. You must use either the --stack-api-key
601
+ flag or the --alias flag.
602
+ --branch=<value> Use this flag to add the branch name where you want to perform the migration. (target
603
+ branch name)
604
+ --config=<value>... [optional] Inline configuration, <key1>:<value1>. Passing an external configuration makes
605
+ the script re-usable.
606
+ --config-file=<value> [optional] Path of the JSON configuration file.
607
+ --file-path=<value> Use this flag to provide the path of the file of the migration script.
608
+ --multiple This flag helps you to migrate multiple content files in a single instance. Mention the
609
+ folder path where your migration script files are stored.
610
+
611
+ DESCRIPTION
612
+ Contentstack migration script.
613
+
614
+ ALIASES
615
+ $ csdx cm:migration
616
+
617
+ EXAMPLES
618
+ $ csdx cm:migration --file-path <migration/script/file/path> -k <api-key>
619
+
620
+ $ csdx cm:migration --file-path <migration/script/file/path> -k <api-key> --branch <target branch name>
621
+
622
+ $ csdx cm:migration --config <key1>:<value1> <key2>:<value2> ... --file-path <migration/script/file/path>
623
+
624
+ $ csdx cm:migration --config-file <path/to/json/config/file> --file-path <migration/script/file/path>
625
+
626
+ $ csdx cm:migration --multiple --file-path <migration/scripts/dir/path>
627
+
628
+ $ csdx cm:migration --alias <management-token-alias> --file-path <migration/script/file/path>
629
+ ```
630
+
492
631
  ## `csdx cm:stacks:clone [--source-branch <value>] [--target-branch <value>] [--source-management-token-alias <value>] [--destination-management-token-alias <value>] [-n <value>] [--type a|b] [--source-stack-api-key <value>] [--destination-stack-api-key <value>] [--import-webhook-status disable|current]`
493
632
 
494
633
  Clone data (structure/content or both) of a stack into another stack
@@ -715,7 +854,7 @@ EXAMPLES
715
854
  $ csdx cm:stacks:bulk-assets --revert ./bulk-operation -a myAlias
716
855
  ```
717
856
 
718
- _See code: [@contentstack/cli-bulk-operations](https://github.com/contentstack/cli-bulk-operations/blob/v1.0.0-beta/src/commands/cm/stacks/bulk-assets.ts)_
857
+ _See code: [@contentstack/cli-bulk-operations](https://github.com/contentstack/cli-bulk-operations/blob/v1.0.0/src/commands/cm/stacks/bulk-assets.ts)_
719
858
 
720
859
  ## `csdx cm:stacks:bulk-entries`
721
860
 
@@ -788,6 +927,12 @@ EXAMPLES
788
927
 
789
928
  $ csdx cm:stacks:bulk-entries --operation publish --content-types blog --environments prod --locales en-us --filter modified -k blt123
790
929
 
930
+ $ csdx cm:stacks:bulk-entries --operation publish --content-types blog --environments prod --locales en-us --filter draft -k blt123
931
+
932
+ $ csdx cm:stacks:bulk-entries --operation publish --content-types blog --environments prod --locales en-us --filter unpublished -k blt123
933
+
934
+ $ csdx cm:stacks:bulk-entries --operation publish --content-types blog --environments prod --filter non-localized -k blt123
935
+
791
936
  $ csdx cm:stacks:bulk-entries --operation publish --content-types blog --environments prod --locales en-us --include-variants -k blt123
792
937
 
793
938
  $ csdx cm:stacks:bulk-entries --retry-failed ./bulk-operation
@@ -795,7 +940,7 @@ EXAMPLES
795
940
  $ csdx cm:stacks:bulk-entries --revert ./bulk-operation
796
941
  ```
797
942
 
798
- _See code: [@contentstack/cli-bulk-operations](https://github.com/contentstack/cli-bulk-operations/blob/v1.0.0-beta/src/commands/cm/stacks/bulk-entries.ts)_
943
+ _See code: [@contentstack/cli-bulk-operations](https://github.com/contentstack/cli-bulk-operations/blob/v1.0.0/src/commands/cm/stacks/bulk-entries.ts)_
799
944
 
800
945
  ## `csdx cm:stacks:clone [--source-branch <value>] [--target-branch <value>] [--source-management-token-alias <value>] [--destination-management-token-alias <value>] [-n <value>] [--type a|b] [--source-stack-api-key <value>] [--destination-stack-api-key <value>] [--import-webhook-status disable|current]`
801
946
 
@@ -1028,6 +1173,51 @@ EXAMPLES
1028
1173
 
1029
1174
  _See code: [@contentstack/cli-cm-import-setup](https://github.com/contentstack/cli/blob/main/packages/contentstack-import-setup/src/commands/cm/stacks/import-setup.ts)_
1030
1175
 
1176
+ ## `csdx cm:stacks:migration [-k <value>] [-a <value>] [--file-path <value>] [--branch <value>] [--config-file <value>] [--config <value>] [--multiple]`
1177
+
1178
+ Contentstack migration script.
1179
+
1180
+ ```
1181
+ USAGE
1182
+ $ csdx cm:stacks:migration [-k <value>] [-a <value>] [--file-path <value>] [--branch <value>] [--config-file <value>]
1183
+ [--config <value>] [--multiple]
1184
+
1185
+ FLAGS
1186
+ -a, --alias=<value> Use this flag to add the management token alias. You must use either the --alias flag or
1187
+ the --stack-api-key flag.
1188
+ -k, --stack-api-key=<value> Use this flag to add the API key of your stack. You must use either the --stack-api-key
1189
+ flag or the --alias flag.
1190
+ --branch=<value> Use this flag to add the branch name where you want to perform the migration. (target
1191
+ branch name)
1192
+ --config=<value>... [optional] Inline configuration, <key1>:<value1>. Passing an external configuration makes
1193
+ the script re-usable.
1194
+ --config-file=<value> [optional] Path of the JSON configuration file.
1195
+ --file-path=<value> Use this flag to provide the path of the file of the migration script.
1196
+ --multiple This flag helps you to migrate multiple content files in a single instance. Mention the
1197
+ folder path where your migration script files are stored.
1198
+
1199
+ DESCRIPTION
1200
+ Contentstack migration script.
1201
+
1202
+ ALIASES
1203
+ $ csdx cm:migration
1204
+
1205
+ EXAMPLES
1206
+ $ csdx cm:migration --file-path <migration/script/file/path> -k <api-key>
1207
+
1208
+ $ csdx cm:migration --file-path <migration/script/file/path> -k <api-key> --branch <target branch name>
1209
+
1210
+ $ csdx cm:migration --config <key1>:<value1> <key2>:<value2> ... --file-path <migration/script/file/path>
1211
+
1212
+ $ csdx cm:migration --config-file <path/to/json/config/file> --file-path <migration/script/file/path>
1213
+
1214
+ $ csdx cm:migration --multiple --file-path <migration/scripts/dir/path>
1215
+
1216
+ $ csdx cm:migration --alias <management-token-alias> --file-path <migration/script/file/path>
1217
+ ```
1218
+
1219
+ _See code: [@contentstack/cli-migration](https://github.com/contentstack/cli/blob/main/packages/contentstack-migration/src/commands/cm/stacks/migration.ts)_
1220
+
1031
1221
  ## `csdx cm:stacks:seed [--repo <value>] [--org <value>] [--stack-api-key <value>] [--stack-name <value>] [--yes <value>] [--alias <value>] [--locale <value>]`
1032
1222
 
1033
1223
  Create a stack from existing content types, entries, assets, etc
@@ -1,4 +1,4 @@
1
1
  {
2
2
  "commands": {},
3
- "version": "2.0.0-beta.13"
3
+ "version": "2.0.0-beta.15"
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": "2.0.0-beta.13",
4
+ "version": "2.0.0-beta.15",
5
5
  "author": "Contentstack",
6
6
  "bin": {
7
7
  "csdx": "./bin/run.js"
@@ -9,8 +9,8 @@
9
9
  "main": "lib/index.js",
10
10
  "types": "lib/index.d.ts",
11
11
  "scripts": {
12
- "build": "npm run clean && npm run compile",
13
- "clean": "rm -rf ./lib ./node_modules tsconfig.build.tsbuildinfo",
12
+ "build": "pnpm compile && oclif manifest && oclif readme",
13
+ "clean": "rm -rf ./lib ./node_modules tsconfig.tsbuildinfo",
14
14
  "compile": "tsc -b tsconfig.json",
15
15
  "postpack": "rm -f oclif.manifest.json",
16
16
  "version": "oclif readme && git add README.md",
@@ -22,23 +22,23 @@
22
22
  "prepack": "pnpm compile && oclif manifest && oclif readme"
23
23
  },
24
24
  "dependencies": {
25
- "@contentstack/cli-audit": "~2.0.0-beta.5",
26
- "@contentstack/cli-cm-export": "~2.0.0-beta.10",
27
- "@contentstack/cli-cm-import": "~2.0.0-beta.10",
28
- "@contentstack/cli-auth": "~2.0.0-beta.6",
29
- "@contentstack/cli-bulk-operations": "^1.0.0-beta",
30
- "@contentstack/cli-cm-bootstrap": "~2.0.0-beta.10",
31
- "@contentstack/cli-cm-branches": "~2.0.0-beta.1",
32
- "@contentstack/cli-cm-clone": "~2.0.0-beta.11",
33
- "@contentstack/cli-cm-export-to-csv": "~2.0.0-beta.1",
34
- "@contentstack/cli-cm-import-setup": "~2.0.0-beta.5",
35
- "@contentstack/cli-cm-seed": "~2.0.0-beta.9",
36
- "@contentstack/cli-command": "~2.0.0-beta",
37
- "@contentstack/cli-config": "~2.0.0-beta.2",
25
+ "@contentstack/cli-audit": "~2.0.0-beta.6",
26
+ "@contentstack/cli-cm-export": "~2.0.0-beta.11",
27
+ "@contentstack/cli-cm-import": "~2.0.0-beta.11",
28
+ "@contentstack/cli-auth": "~2.0.0-beta.7",
29
+ "@contentstack/cli-bulk-operations": "^1.0.0",
30
+ "@contentstack/cli-cm-bootstrap": "~2.0.0-beta.11",
31
+ "@contentstack/cli-cm-branches": "~2.0.0-beta.2",
32
+ "@contentstack/cli-cm-clone": "~2.0.0-beta.12",
33
+ "@contentstack/cli-cm-export-to-csv": "~2.0.0-beta.2",
34
+ "@contentstack/cli-cm-import-setup": "~2.0.0-beta.6",
35
+ "@contentstack/cli-cm-seed": "~2.0.0-beta.10",
36
+ "@contentstack/cli-command": "~2.0.0-beta.2",
37
+ "@contentstack/cli-config": "~2.0.0-beta.3",
38
38
  "@contentstack/cli-launch": "^1.9.6",
39
- "@contentstack/cli-migration": "~2.0.0-beta.6",
40
- "@contentstack/cli-utilities": "~2.0.0-beta.1",
41
- "@contentstack/cli-variants": "~2.0.0-beta.7",
39
+ "@contentstack/cli-migration": "~2.0.0-beta.7",
40
+ "@contentstack/cli-utilities": "~2.0.0-beta.2",
41
+ "@contentstack/cli-variants": "~2.0.0-beta.8",
42
42
  "@contentstack/management": "~1.27.6",
43
43
  "@contentstack/utils": "~1.7.0",
44
44
  "@oclif/core": "^4.8.0",
@@ -167,4 +167,4 @@
167
167
  }
168
168
  },
169
169
  "repository": "https://github.com/contentstack/cli"
170
- }
170
+ }