@contentstack/cli 1.6.0 → 1.7.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 CHANGED
@@ -1,6 +1,6 @@
1
1
  # @contentstack/cli
2
2
 
3
- Use Contentstack Command-line Interface to command Contentstack for executing a set of operations from the terminal. To get started with CLI, refer to the [CLI’s documentation](https://www.contentstack.com/docs/developers/cli)
3
+ Use Contentstack Command-line Interface to command Contentstack for executing a set of operations from the terminal. To get started with CLI, refer to the [CLI’s documentation](https://www.contentstack.com/docs/developers/cli)
4
4
 
5
5
  [![License](https://img.shields.io/npm/l/@contentstack/cli)](https://github.com/contentstack/cli/blob/main/LICENSE)
6
6
 
@@ -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.6.0 linux-x64 node-v16.20.0
21
+ @contentstack/cli/1.7.1 linux-x64 node-v16.20.0
22
22
  $ csdx --help [COMMAND]
23
23
  USAGE
24
24
  $ csdx COMMAND
@@ -38,6 +38,11 @@ USAGE
38
38
  * [`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)
39
39
  * [`csdx cm:assets:unpublish`](#csdx-cmassetsunpublish)
40
40
  * [`csdx cm:bootstrap`](#csdx-cmbootstrap)
41
+ * [`csdx cm:branches`](#csdx-cmbranches)
42
+ * [`csdx cm:branches:create`](#csdx-cmbranchescreate)
43
+ * [`csdx cm:branches:delete [-uid <value>] [-k <value>]`](#csdx-cmbranchesdelete--uid-value--k-value)
44
+ * [`csdx cm:branches:diff [--base-branch <value>] [--compare-branch <value>] [-k <value>][--module <value>]`](#csdx-cmbranchesdiff---base-branch-value---compare-branch-value--k-value--module-value)
45
+ * [`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)
41
46
  * [`csdx cm:bulk-publish`](#csdx-cmbulk-publish)
42
47
  * [`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>]`](#csdx-cmentriesupdate-and-publish--a-value---retry-failed-value---bulk-publish-value---content-types-value--t-value--e-value--c-value--y---locales-value---branch-value)
43
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>]`](#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-1)
@@ -74,7 +79,10 @@ USAGE
74
79
  * [`csdx cm:stacks:publish-revert`](#csdx-cmstackspublish-revert)
75
80
  * [`csdx cm:stacks:seed [--repo <value>] [--org <value>] [-k <value>] [-n <value>] [-y <value>] [-s <value>]`](#csdx-cmstacksseed---repo-value---org-value--k-value--n-value--y-value--s-value-1)
76
81
  * [`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-1)
82
+ * [`csdx config:get:base-branch`](#csdx-configgetbase-branch)
77
83
  * [`csdx config:get:region`](#csdx-configgetregion)
84
+ * [`csdx config:remove:base-branch`](#csdx-configremovebase-branch)
85
+ * [`csdx config:set:base-branch`](#csdx-configsetbase-branch)
78
86
  * [`csdx config:set:region [REGION]`](#csdx-configsetregion-region)
79
87
  * [`csdx help [COMMANDS]`](#csdx-help-commands)
80
88
  * [`csdx launch`](#csdx-launch)
@@ -445,6 +453,175 @@ EXAMPLES
445
453
 
446
454
  _See code: [@contentstack/cli-cm-bootstrap](https://github.com/contentstack/cli/blob/main/packages/contentstack-bootstrap/src/commands/cm/bootstrap.ts)_
447
455
 
456
+ ## `csdx cm:branches`
457
+
458
+ List the branches
459
+
460
+ ```
461
+ USAGE
462
+ $ csdx cm:branches
463
+
464
+ FLAGS
465
+ -k, --stack-api-key=<value> Stack API Key
466
+ --verbose Verbose
467
+
468
+ DESCRIPTION
469
+ List the branches
470
+
471
+ EXAMPLES
472
+ $ csdx cm:branches
473
+
474
+ $ csdx cm:branches --verbose
475
+
476
+ $ csdx cm:branches -k <stack api key>
477
+ ```
478
+
479
+ _See code: [@contentstack/cli-cm-branches](https://github.com/contentstack/cli/blob/main/packages/contentstack-export/src/commands/cm/branches/index.ts)_
480
+
481
+ ## `csdx cm:branches:create`
482
+
483
+ Create a new branch
484
+
485
+ ```
486
+ USAGE
487
+ $ csdx cm:branches:create
488
+ $ csdx cm:branches:create [--source <value>] [--uid <value>] [-k <value>]
489
+ $ csdx cm:branches:create [--source <value>] [--uid <value>] [--stack-api-key <value>]
490
+
491
+ FLAGS
492
+ -k, --stack-api-key=<value> Stack API key
493
+ --source=<value> Source branch from which new branch to be created
494
+ --uid=<value> Branch UID to be created
495
+
496
+ DESCRIPTION
497
+ Create a new branch
498
+
499
+ EXAMPLES
500
+ $ csdx cm:branches:create
501
+
502
+ $ csdx cm:branches:create --source main -uid new_branch -k bltxxxxxxxx
503
+
504
+ $ csdx cm:branches:create --source main --uid new_branch --stack-api-key bltxxxxxxxx
505
+ ```
506
+
507
+ _See code: [@contentstack/cli-cm-branches](https://github.com/contentstack/cli/blob/main/packages/contentstack-export/src/commands/cm/branches/create.ts)_
508
+
509
+ ## `csdx cm:branches:delete [-uid <value>] [-k <value>]`
510
+
511
+ Delete a branch
512
+
513
+ ```
514
+ USAGE
515
+ $ csdx cm:branches:delete [-uid <value>] [-k <value>]
516
+ $ csdx cm:branches:delete [--uid <value>] [--stack-api-key <value>]
517
+
518
+ FLAGS
519
+ -k, --stack-api-key=<value> Stack API key
520
+ -y, --yes Force the deletion of the branch by skipping the confirmation
521
+ --uid=<value> Branch UID to be deleted
522
+
523
+ DESCRIPTION
524
+ Delete a branch
525
+
526
+ EXAMPLES
527
+ $ csdx cm:branches:delete
528
+
529
+ $ csdx cm:branches:delete --uid main -k bltxxxxxxxx
530
+
531
+ $ csdx cm:branches:delete --uid main --stack-api-key bltxxxxxxxx
532
+
533
+ $ csdx cm:branches:delete --uid main --stack-api-key bltxxxxxxxx --yes
534
+ ```
535
+
536
+ _See code: [@contentstack/cli-cm-branches](https://github.com/contentstack/cli/blob/main/packages/contentstack-export/src/commands/cm/branches/delete.ts)_
537
+
538
+ ## `csdx cm:branches:diff [--base-branch <value>] [--compare-branch <value>] [-k <value>][--module <value>]`
539
+
540
+ Differences between two branches
541
+
542
+ ```
543
+ USAGE
544
+ $ csdx cm:branches:diff [--base-branch <value>] [--compare-branch <value>] [-k <value>][--module <value>]
545
+
546
+ FLAGS
547
+ -k, --stack-api-key=<value> Provide Stack API key to show difference between branches
548
+ --base-branch=<value> Base branch
549
+ --compare-branch=<value> Compare branch
550
+ --format=<option> [default: compact-text] [Optional] Type of flags to show branches differences
551
+ <options: compact-text|detailed-text>
552
+ --module=<option> Module
553
+ <options: content-types|global-fields|all>
554
+
555
+ DESCRIPTION
556
+ Differences between two branches
557
+
558
+ EXAMPLES
559
+ $ csdx cm:branches:diff
560
+
561
+ $ csdx cm:branches:diff --stack-api-key "bltxxxxxxxx"
562
+
563
+ $ csdx cm:branches:diff --compare-branch "develop"
564
+
565
+ $ csdx cm:branches:diff --compare-branch "develop" --stack-api-key "bltxxxxxxxx"
566
+
567
+ $ csdx cm:branches:diff --compare-branch "develop" --module "content-types"
568
+
569
+ $ csdx cm:branches:diff --module "content-types" --format "detailed-text"
570
+
571
+ $ csdx cm:branches:diff --compare-branch "develop" --format "detailed-text"
572
+
573
+ $ csdx cm:branches:diff --stack-api-key "bltxxxxxxxx" --base-branch "main"
574
+
575
+ $ csdx cm:branches:diff --stack-api-key "bltxxxxxxxx" --base-branch "main" --compare-branch "develop"
576
+
577
+ $ csdx cm:branches:diff --stack-api-key "bltxxxxxxxx" --base-branch "main" --module "content-types"
578
+
579
+ $ csdx cm:branches:diff --stack-api-key "bltxxxxxxxx" --base-branch "main" --compare-branch "develop" --module "content-types"
580
+
581
+ $ csdx cm:branches:diff --stack-api-key "bltxxxxxxxx" --base-branch "main" --compare-branch "develop" --module "content-types" --format "detailed-text"
582
+ ```
583
+
584
+ _See code: [@contentstack/cli-cm-branches](https://github.com/contentstack/cli/blob/main/packages/contentstack-export/src/commands/cm/branches/diff.ts)_
585
+
586
+ ## `csdx cm:branches:merge [-k <value>][--compare-branch <value>] [--no-revert] [--export-summary-path <value>] [--use-merge-summary <value>] [--comment <value>] [--base-branch <value>]`
587
+
588
+ Merge changes from a branch
589
+
590
+ ```
591
+ USAGE
592
+ $ csdx cm:branches:merge [-k <value>][--compare-branch <value>] [--no-revert] [--export-summary-path <value>]
593
+ [--use-merge-summary <value>] [--comment <value>] [--base-branch <value>]
594
+
595
+ FLAGS
596
+ -k, --stack-api-key=<value> Provide Stack API key to show difference between branches
597
+ --base-branch=<value> Base branch
598
+ --comment=<value> Merge comment
599
+ --compare-branch=<value> Compare branch name
600
+ --export-summary-path=<value> Export summary file path
601
+ --no-revert If passed, will not create the new revert branch
602
+ --use-merge-summary=<value> Path of merge summary file
603
+
604
+ DESCRIPTION
605
+ Merge changes from a branch
606
+
607
+ EXAMPLES
608
+ $ csdx cm:branches:merge --stack-api-key bltxxxxxxxx --compare-branch feature-branch
609
+
610
+ $ csdx cm:branches:merge --stack-api-key bltxxxxxxxx --comment "merge comment"
611
+
612
+ $ csdx cm:branches:merge -k bltxxxxxxxx --base-branch base-branch
613
+
614
+ $ csdx cm:branches:merge --export-summary-path file/path
615
+
616
+ $ csdx cm:branches:merge --use-merge-summary file-path
617
+
618
+ $ csdx cm:branches:merge -k bltxxxxxxxx --no-revert
619
+
620
+ $ csdx cm:branches:merge -k bltxxxxxxxx --compare-branch feature-branch --no-revert
621
+ ```
622
+
623
+ _See code: [@contentstack/cli-cm-branches](https://github.com/contentstack/cli/blob/main/packages/contentstack-export/src/commands/cm/branches/merge.ts)_
624
+
448
625
  ## `csdx cm:bulk-publish`
449
626
 
450
627
  Bulk Publish script for managing entries and assets
@@ -2344,6 +2521,23 @@ EXAMPLES
2344
2521
 
2345
2522
  _See code: [@contentstack/cli-cm-bulk-publish](https://github.com/contentstack/cli/blob/main/packages/contentstack-bulk-publish/src/commands/cm/stacks/unpublish.js)_
2346
2523
 
2524
+ ## `csdx config:get:base-branch`
2525
+
2526
+ Get current branch set for CLI
2527
+
2528
+ ```
2529
+ USAGE
2530
+ $ csdx config:get:base-branch
2531
+
2532
+ DESCRIPTION
2533
+ Get current branch set for CLI
2534
+
2535
+ EXAMPLES
2536
+ $ csdx config:get:base-branch
2537
+ ```
2538
+
2539
+ _See code: [@contentstack/cli-config](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/get/base-branch.ts)_
2540
+
2347
2541
  ## `csdx config:get:region`
2348
2542
 
2349
2543
  Get current region set for CLI
@@ -2361,6 +2555,52 @@ EXAMPLES
2361
2555
 
2362
2556
  _See code: [@contentstack/cli-config](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/get/region.ts)_
2363
2557
 
2558
+ ## `csdx config:remove:base-branch`
2559
+
2560
+ Remove branch config for CLI
2561
+
2562
+ ```
2563
+ USAGE
2564
+ $ csdx config:remove:base-branch [-k <value>] [-y]
2565
+
2566
+ FLAGS
2567
+ -k, --stack-api-key=<value> Stack API Key
2568
+ -y, --yes Force Remove
2569
+
2570
+ DESCRIPTION
2571
+ Remove branch config for CLI
2572
+
2573
+ EXAMPLES
2574
+ $ csdx config:remove:base-branch
2575
+
2576
+ $ csdx config:remove:base-branch --stack-api-key <value>
2577
+ ```
2578
+
2579
+ _See code: [@contentstack/cli-config](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/remove/base-branch.ts)_
2580
+
2581
+ ## `csdx config:set:base-branch`
2582
+
2583
+ Set branch for CLI
2584
+
2585
+ ```
2586
+ USAGE
2587
+ $ csdx config:set:base-branch [-k <value>] [--base-branch <value>]
2588
+
2589
+ FLAGS
2590
+ -k, --stack-api-key=<value> Stack API Key
2591
+ --base-branch=<value> Base Branch
2592
+
2593
+ DESCRIPTION
2594
+ Set branch for CLI
2595
+
2596
+ EXAMPLES
2597
+ $ csdx config:set:base-branch
2598
+
2599
+ $ csdx config:set:base-branch --stack-api-key <value> --base-branch <value>
2600
+ ```
2601
+
2602
+ _See code: [@contentstack/cli-config](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/set/base-branch.ts)_
2603
+
2364
2604
  ## `csdx config:set:region [REGION]`
2365
2605
 
2366
2606
  Set region for CLI
package/bin/dev CHANGED
@@ -1,6 +1,6 @@
1
1
  #!/usr/bin/env node
2
2
  require('dotenv').config({ path: './.env' });
3
3
  (async () => {
4
- const oclif = require('@oclif/core');
5
- await oclif.execute({ type: 'cjs', development: true, dir: __dirname });
4
+ const { execute } = require('@contentstack/cli-utilities');
5
+ await execute({ type: 'cjs', development: true, dir: __dirname });
6
6
  })();
package/bin/run CHANGED
@@ -1,5 +1,5 @@
1
1
  #!/usr/bin/env node
2
2
  (async () => {
3
- const oclif = require('@oclif/core');
4
- await oclif.execute({ type: 'cjs', dir: __dirname });
3
+ const { execute } = require('@contentstack/cli-utilities');
4
+ await execute({ type: 'cjs', dir: __dirname });
5
5
  })();
@@ -1,4 +1,4 @@
1
1
  {
2
- "version": "1.6.0",
2
+ "version": "1.7.1",
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.6.0",
4
+ "version": "1.7.1",
5
5
  "author": "Contentstack",
6
6
  "bin": {
7
7
  "csdx": "./bin/run"
@@ -21,22 +21,22 @@
21
21
  "prepack": "pnpm compile && oclif manifest && oclif readme"
22
22
  },
23
23
  "dependencies": {
24
- "@contentstack/cli-auth": "^1.3.1",
25
- "@contentstack/cli-cm-bootstrap": "^1.4.1",
26
- "@contentstack/cli-cm-bulk-publish": "^1.3.1",
27
- "@contentstack/cli-cm-clone": "^1.4.1",
28
- "@contentstack/cli-cm-export": "^1.5.1",
29
- "@contentstack/cli-cm-export-to-csv": "^1.3.1",
30
- "@contentstack/cli-cm-import": "^1.5.1",
31
- "@contentstack/cli-cm-migrate-rte": "^1.4.1",
32
- "@contentstack/cli-cm-seed": "^1.4.1",
33
- "@contentstack/cli-command": "^1.2.2",
34
- "@contentstack/cli-config": "^1.3.1",
35
- "@contentstack/cli-launch": "^1.0.0",
36
- "@contentstack/cli-migration": "^1.3.1",
37
- "@contentstack/cli-utilities": "^1.3.2",
38
- "@contentstack/management": "^1.6.1",
39
- "@oclif/core": "^2.3.0",
24
+ "@contentstack/cli-auth": "^1.3.3",
25
+ "@contentstack/cli-cm-bootstrap": "^1.4.3",
26
+ "@contentstack/cli-cm-bulk-publish": "^1.3.3",
27
+ "@contentstack/cli-cm-clone": "^1.4.3",
28
+ "@contentstack/cli-cm-export": "^1.5.3",
29
+ "@contentstack/cli-cm-export-to-csv": "^1.3.3",
30
+ "@contentstack/cli-cm-import": "^1.5.3",
31
+ "@contentstack/cli-cm-migrate-rte": "^1.4.3",
32
+ "@contentstack/cli-cm-seed": "^1.4.3",
33
+ "@contentstack/cli-command": "^1.2.4",
34
+ "@contentstack/cli-config": "^1.4.1",
35
+ "@contentstack/cli-launch": "^1.0.1",
36
+ "@contentstack/cli-migration": "^1.3.3",
37
+ "@contentstack/cli-utilities": "^1.4.1",
38
+ "@contentstack/management": "^1.8.0",
39
+ "@contentstack/cli-cm-branches": "^1.0.0",
40
40
  "@oclif/plugin-help": "^5",
41
41
  "@oclif/plugin-not-found": "^2.3.9",
42
42
  "@oclif/plugin-plugins": "^2.1.7",
@@ -66,7 +66,7 @@
66
66
  "mocha": "^10.0.0",
67
67
  "nock": "^13.1.0",
68
68
  "nyc": "^15.1.0",
69
- "oclif": "^3.1.2",
69
+ "oclif": "^3.8.1",
70
70
  "rimraf": "^2.7.1",
71
71
  "shelljs": "^0.8.4",
72
72
  "sinon": "^15.0.1",
@@ -141,6 +141,7 @@
141
141
  "@contentstack/cli-cm-migrate-rte",
142
142
  "@contentstack/cli-migration",
143
143
  "@contentstack/cli-cm-bulk-publish",
144
+ "@contentstack/cli-cm-branches",
144
145
  "@contentstack/cli-launch"
145
146
  ],
146
147
  "hooks": {
@@ -154,4 +155,4 @@
154
155
  }
155
156
  },
156
157
  "repository": "https://github.com/contentstack/cli"
157
- }
158
+ }