Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 3 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -20,4 +20,6 @@ contents-*
*.http
*.todo
talisman_output.log
snyk_output.log
snyk_output.log
# Snyk Security Extension - AI Rules (auto-generated)
.cursor/rules/snyk_rules.mdc
8 changes: 4 additions & 4 deletions packages/contentstack-auth/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-auth
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-auth/1.6.2 darwin-arm64 node-v22.14.0
@contentstack/cli-auth/2.0.0-beta.1 darwin-arm64 node-v24.11.1
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down Expand Up @@ -141,12 +141,12 @@ USAGE

FLAGS
-a, --alias=<value> Alias (name) you want to assign to the token
-d, --delivery Set this flag to save delivery token
-e, --environment=<value> Environment name for delivery token
-k, --stack-api-key=<value> Stack API Key
-m, --management Set this flag to save management token
-t, --token=<value> Add the token name
-y, --yes Use this flag to skip confirmation
--delivery Set this flag to save delivery token
--management Set this flag to save management token
--token=<value> Add the token name

DESCRIPTION
Adds management/delivery tokens to your session to use it with other CLI commands
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-auth/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-auth",
"description": "Contentstack CLI plugin for authentication activities",
"version": "1.6.2",
"version": "2.0.0-beta.1",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"scripts": {
Expand Down
11 changes: 1 addition & 10 deletions packages/contentstack-auth/src/commands/auth/logout.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
cliux,
configHandler,
printFlagDeprecation,
flags,
authHandler as oauthHandler,
managementSDKClient,
Expand All @@ -25,14 +24,6 @@ export default class LogoutCommand extends BaseCommand<typeof LogoutCommand> {
required: false,
default: false,
}),
force: flags.boolean({
char: 'f',
description: 'Force log out by skipping the confirmation.',
required: false,
hidden: true,
default: false,
parse: printFlagDeprecation(['-f', '--force'], ['-y', '--yes']),
}),
};

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

const { flags: logoutFlags } = await this.parse(LogoutCommand);
log.debug('Token add flags parsed', {...this.contextDetails, flags: logoutFlags });
log.debug('Token add flags parsed', { ...this.contextDetails, flags: logoutFlags });

let confirm = logoutFlags.force === true || logoutFlags.yes === true;
log.debug(`Initial confirmation status: ${confirm}`, {
Expand Down
20 changes: 0 additions & 20 deletions packages/contentstack-auth/src/commands/auth/tokens/add.ts
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
import {
cliux,
configHandler,
printFlagDeprecation,
flags,
FlagInput,
HttpClient,
Expand Down Expand Up @@ -33,16 +32,12 @@ export default class TokensAddCommand extends BaseCommand<typeof TokensAddComman
static flags: FlagInput = {
alias: Flags.string({ char: 'a', description: 'Alias (name) you want to assign to the token' }),
delivery: flags.boolean({
char: 'd',
description: 'Set this flag to save delivery token',
exclusive: ['management'],
parse: printFlagDeprecation(['-d'], ['--delivery']),
}),
management: flags.boolean({
char: 'm',
description: 'Set this flag to save management token',
exclusive: ['delivery', 'environment'],
parse: printFlagDeprecation(['-m'], ['--management']),
}),
environment: flags.string({
char: 'e',
Expand All @@ -52,23 +47,8 @@ export default class TokensAddCommand extends BaseCommand<typeof TokensAddComman
'stack-api-key': flags.string({ char: 'k', description: 'Stack API Key' }),
yes: flags.boolean({ char: 'y', description: 'Use this flag to skip confirmation' }),
token: flags.string({
char: 't',
description: 'Add the token name',
env: 'TOKEN',
parse: printFlagDeprecation(['-t'], ['--token']),
}),

//To be deprecated
'api-key': flags.string({
description: 'API Key',
hidden: true,
parse: printFlagDeprecation(['api-key'], ['-k', 'stack-api-key']),
}),
force: flags.boolean({
char: 'f',
hidden: true,
description: 'Force adding',
parse: printFlagDeprecation(['-f', '--force'], ['-y', '--yes']),
}),
branch: flags.string({
required: false,
Expand Down
36 changes: 14 additions & 22 deletions packages/contentstack/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli
$ csdx COMMAND
running command...
$ csdx (--version|-v)
@contentstack/cli/2.0.0-beta.1 darwin-arm64 node-v22.14.0
@contentstack/cli/2.0.0-beta.3 darwin-arm64 node-v24.11.1
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down Expand Up @@ -331,12 +331,12 @@ USAGE

FLAGS
-a, --alias=<value> Alias (name) you want to assign to the token
-d, --delivery Set this flag to save delivery token
-e, --environment=<value> Environment name for delivery token
-k, --stack-api-key=<value> Stack API Key
-m, --management Set this flag to save management token
-t, --token=<value> [env: TOKEN] Add the token name
-y, --yes Use this flag to skip confirmation
--delivery Set this flag to save delivery token
--management Set this flag to save management token
--token=<value> Add the token name

DESCRIPTION
Adds management/delivery tokens to your session to use it with other CLI commands
Expand Down Expand Up @@ -2392,8 +2392,6 @@ FLAGS
extensions, marketplace-apps, global-fields, labels, locales, webhooks,
workflows, custom-roles, personalize projects, and taxonomies.
-y, --yes [optional] Force override all Marketplace prompts.
--branch-alias=<value> Specify the branch alias where you want to import your content. If not
specified, the content is imported into the main branch by default.
--branch-alias=<value> Specify the branch alias where you want to import your content. If not
specified, the content is imported into the main branch by default.
--exclude-global-modules Excludes the branch-independent module from the import operation.
Expand Down Expand Up @@ -2449,8 +2447,6 @@ FLAGS
branches involved, then the path should point till the particular branch. For example,
“-d "C:\Users\Name\Desktop\cli\content\branch_name"
-k, --stack-api-key=<value> API key of the target stack
--branch-alias=<value> Specify the branch alias where you want to import your content. If not specified, the
content is imported into the main branch by default.
--branch-alias=<value> Specify the branch alias where you want to import your content. If not specified, the
content is imported into the main branch by default.
--module=<option>... [optional] Specify the modules/module to import into the target stack. currently options
Expand Down Expand Up @@ -2570,7 +2566,7 @@ EXAMPLES

$ csdx cm:migration --config-file <path/to/json/config/file> --file-path <migration/script/file/path>

$ csdx cm:migration --multiple --file-path <migration/scripts/dir/path>
$ csdx cm:migration --multiple --file-path <migration/scripts/dir/path>

$ csdx cm:migration --alias --file-path <migration/script/file/path> -k <api-key>
```
Expand Down Expand Up @@ -2916,8 +2912,6 @@ FLAGS
extensions, marketplace-apps, global-fields, labels, locales, webhooks,
workflows, custom-roles, personalize projects, and taxonomies.
-y, --yes [optional] Force override all Marketplace prompts.
--branch-alias=<value> Specify the branch alias where you want to import your content. If not
specified, the content is imported into the main branch by default.
--branch-alias=<value> Specify the branch alias where you want to import your content. If not
specified, the content is imported into the main branch by default.
--exclude-global-modules Excludes the branch-independent module from the import operation.
Expand Down Expand Up @@ -2975,8 +2969,6 @@ FLAGS
branches involved, then the path should point till the particular branch. For example,
“-d "C:\Users\Name\Desktop\cli\content\branch_name"
-k, --stack-api-key=<value> API key of the target stack
--branch-alias=<value> Specify the branch alias where you want to import your content. If not specified, the
content is imported into the main branch by default.
--branch-alias=<value> Specify the branch alias where you want to import your content. If not specified, the
content is imported into the main branch by default.
--module=<option>... [optional] Specify the modules/module to import into the target stack. currently options
Expand Down Expand Up @@ -3037,7 +3029,7 @@ EXAMPLES

$ csdx cm:migration --config-file <path/to/json/config/file> --file-path <migration/script/file/path>

$ csdx cm:migration --multiple --file-path <migration/scripts/dir/path>
$ csdx cm:migration --multiple --file-path <migration/scripts/dir/path>

$ csdx cm:migration --alias --file-path <migration/script/file/path> -k <api-key>
```
Expand Down Expand Up @@ -3681,7 +3673,7 @@ USAGE
[--personalize <value>] [--launch <value>]

ARGUMENTS
[REGION] Name for the region
REGION Name for the region

FLAGS
-d, --cda=<value> Custom host to set for content delivery API, if this flag is added then cma, ui-host and
Expand Down Expand Up @@ -3737,7 +3729,7 @@ USAGE
$ csdx help [COMMAND...] [-n]

ARGUMENTS
[COMMAND...] Command to show help for.
COMMAND... Command to show help for.

FLAGS
-n, --nested-commands Include all nested commands in the output.
Expand All @@ -3746,7 +3738,7 @@ DESCRIPTION
Display help for csdx.
```

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

## `csdx launch`

Expand Down Expand Up @@ -3887,8 +3879,8 @@ USAGE
$ csdx launch:functions [-p <value>] [-d <value>]

FLAGS
-d, --data-dir=<value> [default: /Users/aman.kumar/Documents/cli-repos/beta-release/cli/packages/contentstack]
Current working directory
-d, --data-dir=<value> [default: /Users/netraj.patel/projects/contentstack/cli/packages/contentstack] Current working
directory
-p, --port=<value> [default: 3000] Port number

DESCRIPTION
Expand Down Expand Up @@ -4229,7 +4221,7 @@ USAGE
$ csdx plugins:remove [PLUGIN...] [-h] [-v]

ARGUMENTS
[PLUGIN...] plugin to uninstall
PLUGIN... plugin to uninstall

FLAGS
-h, --help Show CLI help.
Expand Down Expand Up @@ -4270,7 +4262,7 @@ USAGE
$ csdx plugins:uninstall [PLUGIN...] [-h] [-v]

ARGUMENTS
[PLUGIN...] plugin to uninstall
PLUGIN... plugin to uninstall

FLAGS
-h, --help Show CLI help.
Expand Down Expand Up @@ -4298,7 +4290,7 @@ USAGE
$ csdx plugins:unlink [PLUGIN...] [-h] [-v]

ARGUMENTS
[PLUGIN...] plugin to uninstall
PLUGIN... plugin to uninstall

FLAGS
-h, --help Show CLI help.
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli",
"description": "Command-line tool (CLI) to interact with Contentstack",
"version": "2.0.0-beta.2",
"version": "2.0.0-beta.3",
"author": "Contentstack",
"bin": {
"csdx": "./bin/run.js"
Expand All @@ -23,7 +23,7 @@
},
"dependencies": {
"@contentstack/cli-audit": "~1.16.0",
"@contentstack/cli-auth": "~1.6.2",
"@contentstack/cli-auth": "~2.0.0-beta.1",
"@contentstack/cli-cm-bootstrap": "~2.0.0-beta.2",
"@contentstack/cli-cm-branches": "~1.6.1",
"@contentstack/cli-cm-bulk-publish": "~1.10.1",
Expand Down
Loading