@contentstack/cli 1.27.0 → 1.28.0

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.27.0 linux-x64 node-v18.20.4
21
+ @contentstack/cli/1.28.0 linux-x64 node-v18.20.4
22
22
  $ csdx --help [COMMAND]
23
23
  USAGE
24
24
  $ csdx COMMAND
@@ -86,13 +86,16 @@ USAGE
86
86
  * [`csdx config:get:base-branch`](#csdx-configgetbase-branch)
87
87
  * [`csdx config:get:ea-header`](#csdx-configgetea-header)
88
88
  * [`csdx config:get:early-access-header`](#csdx-configgetearly-access-header)
89
+ * [`csdx config:get:rate-limit`](#csdx-configgetrate-limit)
89
90
  * [`csdx config:get:region`](#csdx-configgetregion)
90
91
  * [`csdx config:remove:base-branch`](#csdx-configremovebase-branch)
91
92
  * [`csdx config:remove:ea-header`](#csdx-configremoveea-header)
92
93
  * [`csdx config:remove:early-access-header`](#csdx-configremoveearly-access-header)
94
+ * [`csdx config:remove:rate-limit`](#csdx-configremoverate-limit)
93
95
  * [`csdx config:set:base-branch`](#csdx-configsetbase-branch)
94
96
  * [`csdx config:set:ea-header`](#csdx-configsetea-header)
95
97
  * [`csdx config:set:early-access-header`](#csdx-configsetearly-access-header)
98
+ * [`csdx config:set:rate-limit`](#csdx-configsetrate-limit)
96
99
  * [`csdx config:set:region [REGION]`](#csdx-configsetregion-region)
97
100
  * [`csdx help [COMMANDS]`](#csdx-help-commands)
98
101
  * [`csdx launch`](#csdx-launch)
@@ -2994,6 +2997,23 @@ EXAMPLES
2994
2997
 
2995
2998
  _See code: [@contentstack/cli-config](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/get/early-access-header.ts)_
2996
2999
 
3000
+ ## `csdx config:get:rate-limit`
3001
+
3002
+ Get rate-limit of organizations
3003
+
3004
+ ```
3005
+ USAGE
3006
+ $ csdx config:get:rate-limit
3007
+
3008
+ DESCRIPTION
3009
+ Get rate-limit of organizations
3010
+
3011
+ EXAMPLES
3012
+ $ csdx config:get:rate-limit
3013
+ ```
3014
+
3015
+ _See code: [@contentstack/cli-config](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/get/rate-limit.ts)_
3016
+
2997
3017
  ## `csdx config:get:region`
2998
3018
 
2999
3019
  Get current region set for CLI
@@ -3084,6 +3104,26 @@ EXAMPLES
3084
3104
 
3085
3105
  _See code: [@contentstack/cli-config](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/remove/early-access-header.ts)_
3086
3106
 
3107
+ ## `csdx config:remove:rate-limit`
3108
+
3109
+ Remove rate-limit of the organization
3110
+
3111
+ ```
3112
+ USAGE
3113
+ $ csdx config:remove:rate-limit [--org <value>]
3114
+
3115
+ FLAGS
3116
+ --org=<value> Provide the organization UID
3117
+
3118
+ DESCRIPTION
3119
+ Remove rate-limit of the organization
3120
+
3121
+ EXAMPLES
3122
+ $ csdx config:remove:rate-limit --org <<org_uid>>
3123
+ ```
3124
+
3125
+ _See code: [@contentstack/cli-config](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/remove/rate-limit.ts)_
3126
+
3087
3127
  ## `csdx config:set:base-branch`
3088
3128
 
3089
3129
  Set branch for CLI
@@ -3157,6 +3197,33 @@ EXAMPLES
3157
3197
 
3158
3198
  _See code: [@contentstack/cli-config](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/set/early-access-header.ts)_
3159
3199
 
3200
+ ## `csdx config:set:rate-limit`
3201
+
3202
+ Set rate-limit for CLI
3203
+
3204
+ ```
3205
+ USAGE
3206
+ $ csdx config:set:rate-limit [--org <value>] [--utilize <value>] [--limit-name <value>...] [--default]
3207
+
3208
+ FLAGS
3209
+ --default Reset to default rate limit
3210
+ --limit-name=<value>... [Optional] Provide the limit names separated by commas ['limit', 'getLimit', 'bulkLimit']
3211
+ --org=<value> Provide the organization UID
3212
+ --utilize=<value> [default: 50] Provide the utilization percentages for rate limit, separated by commas
3213
+
3214
+ DESCRIPTION
3215
+ Set rate-limit for CLI
3216
+
3217
+ EXAMPLES
3218
+ $ csdx config:set:rate-limit --org <<org_uid>>
3219
+
3220
+ $ csdx config:set:rate-limit --org <<org_uid>> --utilize 70,80 --limit-name getLimit,limit
3221
+
3222
+ $ csdx config:set:rate-limit --org <<org_uid>> --default
3223
+ ```
3224
+
3225
+ _See code: [@contentstack/cli-config](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/set/rate-limit.ts)_
3226
+
3160
3227
  ## `csdx config:set:region [REGION]`
3161
3228
 
3162
3229
  Set region for CLI
@@ -3525,7 +3592,7 @@ EXAMPLES
3525
3592
  $ csdx plugins
3526
3593
  ```
3527
3594
 
3528
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.9/src/commands/plugins/index.ts)_
3595
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/index.ts)_
3529
3596
 
3530
3597
  ## `csdx plugins:add PLUGIN`
3531
3598
 
@@ -3599,7 +3666,7 @@ EXAMPLES
3599
3666
  $ csdx plugins:inspect myplugin
3600
3667
  ```
3601
3668
 
3602
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.9/src/commands/plugins/inspect.ts)_
3669
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/inspect.ts)_
3603
3670
 
3604
3671
  ## `csdx plugins:install PLUGIN`
3605
3672
 
@@ -3648,7 +3715,7 @@ EXAMPLES
3648
3715
  $ csdx plugins:install someuser/someplugin
3649
3716
  ```
3650
3717
 
3651
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.9/src/commands/plugins/install.ts)_
3718
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/install.ts)_
3652
3719
 
3653
3720
  ## `csdx plugins:link PATH`
3654
3721
 
@@ -3668,6 +3735,7 @@ FLAGS
3668
3735
 
3669
3736
  DESCRIPTION
3670
3737
  Links a plugin into the CLI for development.
3738
+
3671
3739
  Installation of a linked plugin will override a user-installed or core plugin.
3672
3740
 
3673
3741
  e.g. If you have a user-installed or core plugin that has a 'hello' command, installing a linked plugin with a 'hello'
@@ -3678,7 +3746,7 @@ EXAMPLES
3678
3746
  $ csdx plugins:link myplugin
3679
3747
  ```
3680
3748
 
3681
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.9/src/commands/plugins/link.ts)_
3749
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/link.ts)_
3682
3750
 
3683
3751
  ## `csdx plugins:remove [PLUGIN]`
3684
3752
 
@@ -3719,7 +3787,7 @@ FLAGS
3719
3787
  --reinstall Reinstall all plugins after uninstalling.
3720
3788
  ```
3721
3789
 
3722
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.9/src/commands/plugins/reset.ts)_
3790
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/reset.ts)_
3723
3791
 
3724
3792
  ## `csdx plugins:uninstall [PLUGIN]`
3725
3793
 
@@ -3747,7 +3815,7 @@ EXAMPLES
3747
3815
  $ csdx plugins:uninstall myplugin
3748
3816
  ```
3749
3817
 
3750
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.9/src/commands/plugins/uninstall.ts)_
3818
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/uninstall.ts)_
3751
3819
 
3752
3820
  ## `csdx plugins:unlink [PLUGIN]`
3753
3821
 
@@ -3791,7 +3859,7 @@ DESCRIPTION
3791
3859
  Update installed plugins.
3792
3860
  ```
3793
3861
 
3794
- _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.9/src/commands/plugins/update.ts)_
3862
+ _See code: [@oclif/plugin-plugins](https://github.com/oclif/plugin-plugins/blob/v5.4.14/src/commands/plugins/update.ts)_
3795
3863
 
3796
3864
  ## `csdx tokens`
3797
3865
 
@@ -0,0 +1 @@
1
+ export default function (): void;
@@ -0,0 +1,16 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ const cli_utilities_1 = require("@contentstack/cli-utilities");
4
+ function default_1() {
5
+ const rateLimit = cli_utilities_1.configHandler.get('rateLimit');
6
+ if (!(rateLimit === null || rateLimit === void 0 ? void 0 : rateLimit.default)) {
7
+ const defaultPlan = {
8
+ getLimit: { value: 10, utilize: 50 },
9
+ limit: { value: 10, utilize: 50 },
10
+ bulkLimit: { value: 1, utilize: 50 },
11
+ };
12
+ cli_utilities_1.configHandler.set('rateLimit', { default: defaultPlan });
13
+ cli_utilities_1.cliux.print(`Default rate limit configuration is set to ${JSON.stringify(defaultPlan)}. Please use this command csdx config:set:rate-limit to set the custom rate limit config.`, { color: 'blue' });
14
+ }
15
+ }
16
+ exports.default = default_1;
@@ -1,4 +1,4 @@
1
1
  {
2
- "version": "1.27.0",
2
+ "version": "1.28.0",
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.27.0",
4
+ "version": "1.28.0",
5
5
  "author": "Contentstack",
6
6
  "bin": {
7
7
  "csdx": "./bin/run.js"
@@ -25,21 +25,21 @@
25
25
  "@contentstack/cli-audit": "~1.7.2",
26
26
  "@contentstack/cli-auth": "~1.3.22",
27
27
  "@contentstack/cli-cm-bootstrap": "~1.13.0",
28
- "@contentstack/cli-cm-branches": "~1.1.4",
29
- "@contentstack/cli-cm-bulk-publish": "~1.4.9",
30
- "@contentstack/cli-cm-export": "~1.14.0",
28
+ "@contentstack/cli-cm-branches": "~1.2.0",
29
+ "@contentstack/cli-cm-bulk-publish": "~1.5.0",
30
+ "@contentstack/cli-cm-export": "~1.14.1",
31
31
  "@contentstack/cli-cm-clone": "~1.13.0",
32
32
  "@contentstack/cli-cm-export-to-csv": "~1.7.3",
33
- "@contentstack/cli-cm-import": "~1.19.0",
33
+ "@contentstack/cli-cm-import": "~1.19.1",
34
34
  "@contentstack/cli-cm-migrate-rte": "~1.4.20",
35
35
  "@contentstack/cli-cm-seed": "~1.10.0",
36
36
  "@contentstack/cli-command": "~1.3.2",
37
- "@contentstack/cli-config": "~1.7.3",
37
+ "@contentstack/cli-config": "~1.8.0",
38
38
  "@contentstack/cli-launch": "~1.2.3",
39
- "@contentstack/cli-migration": "~1.6.2",
39
+ "@contentstack/cli-migration": "~1.6.3",
40
40
  "@contentstack/cli-utilities": "~1.8.0",
41
41
  "@contentstack/management": "~1.17.0",
42
- "@contentstack/cli-variants": "~1.1.0",
42
+ "@contentstack/cli-variants": "~1.1.1",
43
43
  "@oclif/core": "^3.26.5",
44
44
  "@oclif/plugin-help": "^5",
45
45
  "@oclif/plugin-not-found": "^2.4.0",
@@ -152,7 +152,8 @@
152
152
  ],
153
153
  "hooks": {
154
154
  "prerun": [
155
- "./lib/hooks/prerun/command-deprecation-check"
155
+ "./lib/hooks/prerun/command-deprecation-check",
156
+ "./lib/hooks/prerun/default-rate-limit-check"
156
157
  ],
157
158
  "init": [
158
159
  "./lib/hooks/init/context-init",