Skip to content

Commit 71bb9d6

Browse files
authored
Merge pull request #2237 from contentstack/feat/dx-3731
Feat/dx 3731
2 parents e40d005 + bf763d6 commit 71bb9d6

File tree

7 files changed

+25
-60
lines changed

7 files changed

+25
-60
lines changed

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,4 +20,6 @@ contents-*
2020
*.http
2121
*.todo
2222
talisman_output.log
23-
snyk_output.log
23+
snyk_output.log
24+
# Snyk Security Extension - AI Rules (auto-generated)
25+
.cursor/rules/snyk_rules.mdc

packages/contentstack-auth/README.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-auth
1818
$ csdx COMMAND
1919
running command...
2020
$ csdx (--version)
21-
@contentstack/cli-auth/1.6.2 darwin-arm64 node-v22.14.0
21+
@contentstack/cli-auth/2.0.0-beta.1 darwin-arm64 node-v24.11.1
2222
$ csdx --help [COMMAND]
2323
USAGE
2424
$ csdx COMMAND
@@ -141,12 +141,12 @@ USAGE
141141
142142
FLAGS
143143
-a, --alias=<value> Alias (name) you want to assign to the token
144-
-d, --delivery Set this flag to save delivery token
145144
-e, --environment=<value> Environment name for delivery token
146145
-k, --stack-api-key=<value> Stack API Key
147-
-m, --management Set this flag to save management token
148-
-t, --token=<value> Add the token name
149146
-y, --yes Use this flag to skip confirmation
147+
--delivery Set this flag to save delivery token
148+
--management Set this flag to save management token
149+
--token=<value> Add the token name
150150
151151
DESCRIPTION
152152
Adds management/delivery tokens to your session to use it with other CLI commands

packages/contentstack-auth/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@contentstack/cli-auth",
33
"description": "Contentstack CLI plugin for authentication activities",
4-
"version": "1.6.2",
4+
"version": "2.0.0-beta.1",
55
"author": "Contentstack",
66
"bugs": "https://github.com/contentstack/cli/issues",
77
"scripts": {

packages/contentstack-auth/src/commands/auth/logout.ts

Lines changed: 1 addition & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
cliux,
33
configHandler,
4-
printFlagDeprecation,
54
flags,
65
authHandler as oauthHandler,
76
managementSDKClient,
@@ -25,14 +24,6 @@ export default class LogoutCommand extends BaseCommand<typeof LogoutCommand> {
2524
required: false,
2625
default: false,
2726
}),
28-
force: flags.boolean({
29-
char: 'f',
30-
description: 'Force log out by skipping the confirmation.',
31-
required: false,
32-
hidden: true,
33-
default: false,
34-
parse: printFlagDeprecation(['-f', '--force'], ['-y', '--yes']),
35-
}),
3627
};
3728

3829
static aliases = ['logout'];
@@ -41,7 +32,7 @@ export default class LogoutCommand extends BaseCommand<typeof LogoutCommand> {
4132
log.debug('LogoutCommand run method started', this.contextDetails);
4233

4334
const { flags: logoutFlags } = await this.parse(LogoutCommand);
44-
log.debug('Token add flags parsed', {...this.contextDetails, flags: logoutFlags });
35+
log.debug('Token add flags parsed', { ...this.contextDetails, flags: logoutFlags });
4536

4637
let confirm = logoutFlags.force === true || logoutFlags.yes === true;
4738
log.debug(`Initial confirmation status: ${confirm}`, {

packages/contentstack-auth/src/commands/auth/tokens/add.ts

Lines changed: 0 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,6 @@
11
import {
22
cliux,
33
configHandler,
4-
printFlagDeprecation,
54
flags,
65
FlagInput,
76
HttpClient,
@@ -33,16 +32,12 @@ export default class TokensAddCommand extends BaseCommand<typeof TokensAddComman
3332
static flags: FlagInput = {
3433
alias: Flags.string({ char: 'a', description: 'Alias (name) you want to assign to the token' }),
3534
delivery: flags.boolean({
36-
char: 'd',
3735
description: 'Set this flag to save delivery token',
3836
exclusive: ['management'],
39-
parse: printFlagDeprecation(['-d'], ['--delivery']),
4037
}),
4138
management: flags.boolean({
42-
char: 'm',
4339
description: 'Set this flag to save management token',
4440
exclusive: ['delivery', 'environment'],
45-
parse: printFlagDeprecation(['-m'], ['--management']),
4641
}),
4742
environment: flags.string({
4843
char: 'e',
@@ -52,23 +47,8 @@ export default class TokensAddCommand extends BaseCommand<typeof TokensAddComman
5247
'stack-api-key': flags.string({ char: 'k', description: 'Stack API Key' }),
5348
yes: flags.boolean({ char: 'y', description: 'Use this flag to skip confirmation' }),
5449
token: flags.string({
55-
char: 't',
5650
description: 'Add the token name',
5751
env: 'TOKEN',
58-
parse: printFlagDeprecation(['-t'], ['--token']),
59-
}),
60-
61-
//To be deprecated
62-
'api-key': flags.string({
63-
description: 'API Key',
64-
hidden: true,
65-
parse: printFlagDeprecation(['api-key'], ['-k', 'stack-api-key']),
66-
}),
67-
force: flags.boolean({
68-
char: 'f',
69-
hidden: true,
70-
description: 'Force adding',
71-
parse: printFlagDeprecation(['-f', '--force'], ['-y', '--yes']),
7252
}),
7353
branch: flags.string({
7454
required: false,

packages/contentstack/README.md

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli
1818
$ csdx COMMAND
1919
running command...
2020
$ csdx (--version|-v)
21-
@contentstack/cli/2.0.0-beta.1 darwin-arm64 node-v22.14.0
21+
@contentstack/cli/2.0.0-beta.3 darwin-arm64 node-v24.11.1
2222
$ csdx --help [COMMAND]
2323
USAGE
2424
$ csdx COMMAND
@@ -331,12 +331,12 @@ USAGE
331331
332332
FLAGS
333333
-a, --alias=<value> Alias (name) you want to assign to the token
334-
-d, --delivery Set this flag to save delivery token
335334
-e, --environment=<value> Environment name for delivery token
336335
-k, --stack-api-key=<value> Stack API Key
337-
-m, --management Set this flag to save management token
338-
-t, --token=<value> [env: TOKEN] Add the token name
339336
-y, --yes Use this flag to skip confirmation
337+
--delivery Set this flag to save delivery token
338+
--management Set this flag to save management token
339+
--token=<value> Add the token name
340340
341341
DESCRIPTION
342342
Adds management/delivery tokens to your session to use it with other CLI commands
@@ -2392,8 +2392,6 @@ FLAGS
23922392
extensions, marketplace-apps, global-fields, labels, locales, webhooks,
23932393
workflows, custom-roles, personalize projects, and taxonomies.
23942394
-y, --yes [optional] Force override all Marketplace prompts.
2395-
--branch-alias=<value> Specify the branch alias where you want to import your content. If not
2396-
specified, the content is imported into the main branch by default.
23972395
--branch-alias=<value> Specify the branch alias where you want to import your content. If not
23982396
specified, the content is imported into the main branch by default.
23992397
--exclude-global-modules Excludes the branch-independent module from the import operation.
@@ -2449,8 +2447,6 @@ FLAGS
24492447
branches involved, then the path should point till the particular branch. For example,
24502448
“-d "C:\Users\Name\Desktop\cli\content\branch_name"
24512449
-k, --stack-api-key=<value> API key of the target stack
2452-
--branch-alias=<value> Specify the branch alias where you want to import your content. If not specified, the
2453-
content is imported into the main branch by default.
24542450
--branch-alias=<value> Specify the branch alias where you want to import your content. If not specified, the
24552451
content is imported into the main branch by default.
24562452
--module=<option>... [optional] Specify the modules/module to import into the target stack. currently options
@@ -2570,7 +2566,7 @@ EXAMPLES
25702566
25712567
$ csdx cm:migration --config-file <path/to/json/config/file> --file-path <migration/script/file/path>
25722568
2573-
$ csdx cm:migration --multiple --file-path <migration/scripts/dir/path>
2569+
$ csdx cm:migration --multiple --file-path <migration/scripts/dir/path>
25742570
25752571
$ csdx cm:migration --alias --file-path <migration/script/file/path> -k <api-key>
25762572
```
@@ -2916,8 +2912,6 @@ FLAGS
29162912
extensions, marketplace-apps, global-fields, labels, locales, webhooks,
29172913
workflows, custom-roles, personalize projects, and taxonomies.
29182914
-y, --yes [optional] Force override all Marketplace prompts.
2919-
--branch-alias=<value> Specify the branch alias where you want to import your content. If not
2920-
specified, the content is imported into the main branch by default.
29212915
--branch-alias=<value> Specify the branch alias where you want to import your content. If not
29222916
specified, the content is imported into the main branch by default.
29232917
--exclude-global-modules Excludes the branch-independent module from the import operation.
@@ -2975,8 +2969,6 @@ FLAGS
29752969
branches involved, then the path should point till the particular branch. For example,
29762970
“-d "C:\Users\Name\Desktop\cli\content\branch_name"
29772971
-k, --stack-api-key=<value> API key of the target stack
2978-
--branch-alias=<value> Specify the branch alias where you want to import your content. If not specified, the
2979-
content is imported into the main branch by default.
29802972
--branch-alias=<value> Specify the branch alias where you want to import your content. If not specified, the
29812973
content is imported into the main branch by default.
29822974
--module=<option>... [optional] Specify the modules/module to import into the target stack. currently options
@@ -3037,7 +3029,7 @@ EXAMPLES
30373029
30383030
$ csdx cm:migration --config-file <path/to/json/config/file> --file-path <migration/script/file/path>
30393031
3040-
$ csdx cm:migration --multiple --file-path <migration/scripts/dir/path>
3032+
$ csdx cm:migration --multiple --file-path <migration/scripts/dir/path>
30413033
30423034
$ csdx cm:migration --alias --file-path <migration/script/file/path> -k <api-key>
30433035
```
@@ -3681,7 +3673,7 @@ USAGE
36813673
[--personalize <value>] [--launch <value>]
36823674
36833675
ARGUMENTS
3684-
[REGION] Name for the region
3676+
REGION Name for the region
36853677
36863678
FLAGS
36873679
-d, --cda=<value> Custom host to set for content delivery API, if this flag is added then cma, ui-host and
@@ -3737,7 +3729,7 @@ USAGE
37373729
$ csdx help [COMMAND...] [-n]
37383730
37393731
ARGUMENTS
3740-
[COMMAND...] Command to show help for.
3732+
COMMAND... Command to show help for.
37413733
37423734
FLAGS
37433735
-n, --nested-commands Include all nested commands in the output.
@@ -3746,7 +3738,7 @@ DESCRIPTION
37463738
Display help for csdx.
37473739
```
37483740

3749-
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.34/src/commands/help.ts)_
3741+
_See code: [@oclif/plugin-help](https://github.com/oclif/plugin-help/blob/v6.2.33/src/commands/help.ts)_
37503742

37513743
## `csdx launch`
37523744

@@ -3887,8 +3879,8 @@ USAGE
38873879
$ csdx launch:functions [-p <value>] [-d <value>]
38883880
38893881
FLAGS
3890-
-d, --data-dir=<value> [default: /Users/aman.kumar/Documents/cli-repos/beta-release/cli/packages/contentstack]
3891-
Current working directory
3882+
-d, --data-dir=<value> [default: /Users/netraj.patel/projects/contentstack/cli/packages/contentstack] Current working
3883+
directory
38923884
-p, --port=<value> [default: 3000] Port number
38933885
38943886
DESCRIPTION
@@ -4229,7 +4221,7 @@ USAGE
42294221
$ csdx plugins:remove [PLUGIN...] [-h] [-v]
42304222
42314223
ARGUMENTS
4232-
[PLUGIN...] plugin to uninstall
4224+
PLUGIN... plugin to uninstall
42334225
42344226
FLAGS
42354227
-h, --help Show CLI help.
@@ -4270,7 +4262,7 @@ USAGE
42704262
$ csdx plugins:uninstall [PLUGIN...] [-h] [-v]
42714263
42724264
ARGUMENTS
4273-
[PLUGIN...] plugin to uninstall
4265+
PLUGIN... plugin to uninstall
42744266
42754267
FLAGS
42764268
-h, --help Show CLI help.
@@ -4298,7 +4290,7 @@ USAGE
42984290
$ csdx plugins:unlink [PLUGIN...] [-h] [-v]
42994291
43004292
ARGUMENTS
4301-
[PLUGIN...] plugin to uninstall
4293+
PLUGIN... plugin to uninstall
43024294
43034295
FLAGS
43044296
-h, --help Show CLI help.

packages/contentstack/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
{
22
"name": "@contentstack/cli",
33
"description": "Command-line tool (CLI) to interact with Contentstack",
4-
"version": "2.0.0-beta.2",
4+
"version": "2.0.0-beta.3",
55
"author": "Contentstack",
66
"bin": {
77
"csdx": "./bin/run.js"
@@ -23,7 +23,7 @@
2323
},
2424
"dependencies": {
2525
"@contentstack/cli-audit": "~1.16.0",
26-
"@contentstack/cli-auth": "~1.6.2",
26+
"@contentstack/cli-auth": "~2.0.0-beta.1",
2727
"@contentstack/cli-cm-bootstrap": "~2.0.0-beta.2",
2828
"@contentstack/cli-cm-branches": "~1.6.1",
2929
"@contentstack/cli-cm-bulk-publish": "~1.10.1",

0 commit comments

Comments
 (0)