Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
37 commits
Select commit Hold shift + click to select a range
1071a0b
added a delay to check failing test case
Jul 17, 2025
0d309c2
Merge branch 'development' into enhancement/DX-3276
Jul 23, 2025
9337fb5
refactored for gocd pipelines
Jul 23, 2025
110fcab
Merge branch 'development' into enhancement/DX-3276
Jul 24, 2025
9d80610
feat: lazy loading in case of config handler
aman19K Jul 24, 2025
3076b1a
Merge branch 'development' into enhancement/DX-3276
Jul 25, 2025
df1d330
feat: added support of show-console-logs in config:set:log command
aman19K Jul 25, 2025
e88d18e
Merge branch 'development' into feat/DX-3286
aman19K Jul 25, 2025
3a386ff
Update packages/contentstack-config/messages/index.json
aman19K Jul 25, 2025
55b0140
Update packages/contentstack-config/src/commands/config/set/log.ts
aman19K Jul 25, 2025
6ed6d46
Merge pull request #2021 from contentstack/feat/DX-3286
aman19K Jul 25, 2025
4774f0c
removed console
Jul 28, 2025
98e5fb6
Merge branch 'development' into enhancement/DX-3276
Jul 28, 2025
15338e9
refactor: Updated error message formatting to include a newline betwe…
aman19K Jul 28, 2025
86f5f8f
Merge branch 'development' into fix/resolve-conflicts-staging
harshithad0703 Jul 28, 2025
52f4b55
handle default case
aman19K Jul 28, 2025
be2593f
Merge pull request #2025 from contentstack/fix/resolve-conflicts-staging
harshithad0703 Jul 28, 2025
e30b8a8
update key names
Jul 28, 2025
8df0c3d
Merge branch 'development' into enhancement/DX-3276
naman-contentstack Jul 30, 2025
018be43
Merge pull request #2002 from contentstack/enhancement/DX-3276
naman-contentstack Jul 30, 2025
67c0480
fix: Default Log Storage issues
aman19K Jul 30, 2025
f3bafce
Merge branch 'development' into fix/DX-3323
aman19K Jul 30, 2025
9960eb9
refactor: readme file
aman19K Jul 30, 2025
59871cb
refactor: added check to verify whether cwd path exists or not
aman19K Jul 30, 2025
87cc721
Merge pull request #2027 from contentstack/fix/DX-3323
aman19K Jul 30, 2025
ffb2582
Fix: Added the Assets and Field-rules module for the audit fix runnin…
cs-raj Jul 31, 2025
2384684
Removed the assets since the module is already present
cs-raj Jul 31, 2025
b7e94a5
Update .talismanrc
harshithad0703 Aug 1, 2025
f40871e
Merge pull request #2031 from contentstack/fix/DX-3111
cs-raj Aug 1, 2025
cb10b06
Merge branch 'development' into fix/talismanrc-4
harshithad0703 Aug 1, 2025
1e43fff
version bump
harshithad0703 Aug 1, 2025
06effa8
cli-config minor bump
harshithad0703 Aug 1, 2025
20d1893
Merge pull request #2033 from contentstack/fix/talismanrc-4
harshithad0703 Aug 1, 2025
eafa0ed
Update .talismanrc
harshithad0703 Aug 1, 2025
2896cff
Merge pull request #2034 from contentstack/fix/talismanrc-5
harshithad0703 Aug 1, 2025
75342e3
Added assets
cs-raj Aug 1, 2025
5be5b11
Merge pull request #2036 from contentstack/fix/dev5
cs-raj Aug 1, 2025
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: 2 additions & 2 deletions .talismanrc
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
fileignoreconfig:
- filename: pnpm-lock.yaml
checksum: 0c320557538f6b52f375b13221323d8700692a45e744128788785f27e7c72f73
checksum: 2118f054aad8a4d379b03bb7eb9c5861b3337c35b9b9636e8f8ee82603aac878
- filename: packages/contentstack-import/test/integration/auth-token-modules/environments.test.js
checksum: bc6f06b75d082aaf99e2f2f4b932b143765e2f14086967fb8973fe1b2ca6c03e
- filename: packages/contentstack-import/test/integration/environments.test.js
checksum: e71f033dad8944ffeafdf22d0514bda1d20c43e8fea0d62c96e774f3414beb31
- filename: package-lock.json
checksum: 7260d9647ed789f09e454d63f9bdd0393e6dfd93f69d4dd2a1505c1c2a60b194
checksum: 9e0dbe7f71bfab95db965d42f79802c787cfd471ce61718a9c61b81fc7395428
- filename: packages/contentstack-auth/test/unit/tokens-validation.test.ts
checksum: 1fbf278675767ed828f5c83f32d088284410f2d687365bfa759728e3b9b7fa8b
- filename: packages/contentstack-import/test/integration/auth-token.test.js
Expand Down
5,016 changes: 1,239 additions & 3,777 deletions package-lock.json

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion packages/contentstack-audit/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@
],
"dependencies": {
"@contentstack/cli-command": "~1.6.0",
"@contentstack/cli-utilities": "~1.13.0",
"@contentstack/cli-utilities": "~1.13.1",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"@oclif/plugin-plugins": "^5.4.38",
Expand Down
2 changes: 1 addition & 1 deletion 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.5.0 darwin-arm64 node-v22.14.0
@contentstack/cli-auth/1.5.1 darwin-arm64 node-v22.14.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-auth/messages/index.json
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@
"CLI_AUTH_LOGOUT_ALREADY": "You're already logged out",
"CLI_AUTH_LOGOUT_NO_AUTHORIZATIONS": "No authorizations found",
"CLI_AUTH_LOGOUT_NO_AUTHORIZATIONS_USER": "No authorizations found for current user",
"CLI_AUTH_WHOAMI_LOGGED_IN_AS": "You are currently logged in with email '%s'",
"CLI_AUTH_WHOAMI_LOGGED_IN_AS": "You are currently logged in with email:",
"CLI_AUTH_WHOAMI_FAILED": "Failed to get the current user details",
"CLI_AUTH_WHOAMI_DESCRIPTION": "Display current users email address",
"CLI_AUTH_TOKENS_ADD_ASK_TOKEN_ALIAS": "Provide alias to store token",
Expand Down
4 changes: 2 additions & 2 deletions 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.5.0",
"version": "1.5.1",
"author": "Contentstack",
"bugs": "https://github.com/contentstack/cli/issues",
"scripts": {
Expand All @@ -23,7 +23,7 @@
},
"dependencies": {
"@contentstack/cli-command": "~1.6.0",
"@contentstack/cli-utilities": "~1.13.0",
"@contentstack/cli-utilities": "~1.13.1",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28"
},
Expand Down
1 change: 0 additions & 1 deletion packages/contentstack-auth/src/commands/auth/whoami.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ export default class WhoamiCommand extends BaseCommand<typeof WhoamiCommand> {
log.debug('User email found, displaying user information', { ...this.contextDetails, email: this.email });
cliux.print('CLI_AUTH_WHOAMI_LOGGED_IN_AS', { color: 'white' });
cliux.print(this.email, { color: 'green' });
log.info(messageHandler.parse('CLI_AUTH_WHOAMI_LOGGED_IN_AS', this.email), this.contextDetails);
log.debug('Whoami command completed successfully', this.contextDetails);
} else {
log.debug('No user email found in context', this.contextDetails);
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-bootstrap/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ $ npm install -g @contentstack/cli-cm-bootstrap
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-bootstrap/1.15.0 darwin-arm64 node-v18.20.2
@contentstack/cli-cm-bootstrap/1.15.0 darwin-arm64 node-v22.14.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-bootstrap/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
"dependencies": {
"@contentstack/cli-cm-seed": "~1.12.0",
"@contentstack/cli-command": "~1.6.0",
"@contentstack/cli-utilities": "~1.13.0",
"@contentstack/cli-utilities": "~1.13.1",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"inquirer": "8.2.6",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-branches/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@
"@contentstack/cli-command": "~1.6.0",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"@contentstack/cli-utilities": "~1.13.0",
"@contentstack/cli-utilities": "~1.13.1",
"chalk": "^4.1.2",
"just-diff": "^6.0.2",
"lodash": "^4.17.21"
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-bulk-publish/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
"bugs": "https://github.com/contentstack/cli/issues",
"dependencies": {
"@contentstack/cli-command": "~1.6.0",
"@contentstack/cli-utilities": "~1.13.0",
"@contentstack/cli-utilities": "~1.13.1",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"chalk": "^4.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-clone/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ $ npm install -g @contentstack/cli-cm-clone
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-cm-clone/1.15.0 darwin-arm64 node-v18.20.2
@contentstack/cli-cm-clone/1.15.0 darwin-arm64 node-v22.14.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
4 changes: 2 additions & 2 deletions packages/contentstack-clone/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,9 @@
"dependencies": {
"@colors/colors": "^1.6.0",
"@contentstack/cli-cm-export": "~1.18.0",
"@contentstack/cli-cm-import": "~1.26.0",
"@contentstack/cli-cm-import": "~1.26.1",
"@contentstack/cli-command": "~1.6.0",
"@contentstack/cli-utilities": "~1.13.0",
"@contentstack/cli-utilities": "~1.13.1",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"chalk": "^4.1.2",
Expand Down
2 changes: 1 addition & 1 deletion packages/contentstack-command/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@
"format": "eslint src/**/*.ts --fix"
},
"dependencies": {
"@contentstack/cli-utilities": "~1.13.0",
"@contentstack/cli-utilities": "~1.13.1",
"contentstack": "^3.25.3",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28"
Expand Down
15 changes: 9 additions & 6 deletions packages/contentstack-config/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ $ npm install -g @contentstack/cli-config
$ csdx COMMAND
running command...
$ csdx (--version)
@contentstack/cli-config/1.14.0 darwin-arm64 node-v18.20.2
@contentstack/cli-config/1.14.0 darwin-arm64 node-v22.14.0
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down Expand Up @@ -326,20 +326,23 @@ Set logging configuration for CLI

```
USAGE
$ csdx config:set:log [--level debug|info|warn|error] [--path <value>]
$ csdx config:set:log [--level debug|info|warn|error] [--path <value>] [--show-console-logs]

FLAGS
--level=<option> Set the log level for the CLI.
<options: debug|info|warn|error>
--path=<value> Specify the file path where logs should be saved.
--level=<option> Set the log level for the CLI.
<options: debug|info|warn|error>
--path=<value> Specify the file path where logs should be saved.
--[no-]show-console-logs Enable console logging.

DESCRIPTION
Set logging configuration for CLI

EXAMPLES
$ csdx config:set:log

$ csdx config:set:log --level debug --path ./logs/app.log
$ csdx config:set:log --level debug --path ./logs/app.log --show-console-logs

$ csdx config:set:log --no-show-console-logs
```

_See code: [src/commands/config/set/log.ts](https://github.com/contentstack/cli/blob/main/packages/contentstack-config/src/commands/config/set/log.ts)_
Expand Down
9 changes: 5 additions & 4 deletions packages/contentstack-config/messages/index.json
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
{
"CLI_CONFIG_SET_REGION_DESCRIPTION": "Set region for CLI",
"CLI_CONFIG_SET_REGION_FLAG_D_DESCRIPTION": "Custom host to set for content delivery API, if this flag is added then cma and name flags are required",
"CLI_CONFIG_SET_REGION_FLAG_M_DESCRIPTION": "Custom host to set for content management API, if this flag is added then cda and name flags are required",
"CLI_CONFIG_SET_REGION_FLAG_M_DESCRIPTION": "Custom host to set for content management API, , if this flag is added then cda and name flags are required",
"CLI_CONFIG_SET_REGION_FLAG_N_DESCRIPTION": "Name for the region, if this flag is added then cda and cma flags are required",
"CLI_CONFIG_SET_REGION_DEFAULT": "No argument or custom flag provided. Setting region to default AWS-NA",
"CLI_CONFIG_SET_REGION_DEFAULT": "No argument or custom flag provided. Setting region to default NA",
"CLI_CONFIG_GET_REGION_DESCRIPTION": "Get current region set for CLI",
"CLI_CONFIG_GET_REGION_NOT_FOUND": "No region found, please set by running command $ csdx config:set:region",
"CLI_CONFIG_INQUIRE_REGION_NAME": "Enter custom region name",
Expand All @@ -19,5 +19,6 @@
"CLI_CONFIG_LOG_NO_CONFIG": "No config found, please set by running command $ csdx config:set:log",
"CLI_CONFIG_LOG_SET_SUCCESS": "Log config set successfully",
"CLI_CONFIG_LOG_LEVEL_SET": "Log level: '%s'",
"CLI_CONFIG_LOG_PATH_SET": "Log path: '%s'"
}
"CLI_CONFIG_LOG_PATH_SET": "Log path: '%s'",
"CLI_CONFIG_LOG_CONSOLE_SET": "Log console: '%s'"
}
4 changes: 2 additions & 2 deletions packages/contentstack-config/package.json
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
{
"name": "@contentstack/cli-config",
"description": "Contentstack CLI plugin for configuration",
"version": "1.14.0",
"version": "1.15.0",
"author": "Contentstack",
"scripts": {
"build": "npm run clean && npm run compile",
Expand All @@ -22,7 +22,7 @@
},
"dependencies": {
"@contentstack/cli-command": "~1.6.0",
"@contentstack/cli-utilities": "~1.13.0",
"@contentstack/cli-utilities": "~1.13.1",
"@oclif/core": "^4.3.0",
"@oclif/plugin-help": "^6.2.28",
"lodash": "^4.17.21"
Expand Down
36 changes: 19 additions & 17 deletions packages/contentstack-config/src/commands/config/set/log.ts
Original file line number Diff line number Diff line change
@@ -1,30 +1,39 @@
import { Command } from '@contentstack/cli-command';
import { cliux, flags, configHandler, FlagInput, messageHandler, CLIError } from '@contentstack/cli-utilities';
import { cliux, flags, configHandler, FlagInput, messageHandler } from '@contentstack/cli-utilities';
import { interactive } from '../../../utils';
import { existsSync, statSync } from 'fs';
import { dirname } from 'path';

export default class LogSetCommand extends Command {
static description = 'Set logging configuration for CLI';

static flags: FlagInput = {
level: flags.string({
'level': flags.string({
description: 'Set the log level for the CLI.',
options: ['debug', 'info', 'warn', 'error'],
}),
path: flags.string({
description: ' Specify the file path where logs should be saved.',
'path': flags.string({
description: 'Specify the file path where logs should be saved.',
}),
'show-console-logs': flags.boolean({
description: 'Enable console logging.',
allowNo: true, // no-show-console-logs
default: false,
})
};

static examples = ['csdx config:set:log', 'csdx config:set:log --level debug --path ./logs/app.log'];

static examples = [
'csdx config:set:log',
'csdx config:set:log --level debug --path ./logs/app.log --show-console-logs',
'csdx config:set:log --no-show-console-logs',
];

async run() {
try {
const { flags } = await this.parse(LogSetCommand);

let logLevel: string = flags['level'];
let logPath: string = flags['path'];
const showConsoleLogs: boolean = flags['show-console-logs'];

// Interactive prompts if not passed via flags
if (!logLevel) {
Expand All @@ -35,23 +44,16 @@ export default class LogSetCommand extends Command {
logPath = await interactive.askLogPath();
}

if (logPath) {
const logDir = dirname(logPath);
// Check if the directory part of the path exists and is actually a file
if (existsSync(logDir) && statSync(logDir).isFile()) {
throw new CLIError({
message: `The directory path '${logDir}' is a file, not a directory. Please provide a valid directory path for the log file.`,
});
}
}

const currentLoggingConfig = configHandler.get('log') || {};
if (logLevel) currentLoggingConfig.level = logLevel;
if (logPath) currentLoggingConfig.path = logPath;
currentLoggingConfig['show-console-logs'] = showConsoleLogs;

configHandler.set('log', currentLoggingConfig);

cliux.success(messageHandler.parse('CLI_CONFIG_LOG_LEVEL_SET', logLevel));
cliux.success(messageHandler.parse('CLI_CONFIG_LOG_PATH_SET', logPath));
cliux.success(messageHandler.parse('CLI_CONFIG_LOG_CONSOLE_SET', String(showConsoleLogs)));
cliux.print(messageHandler.parse('CLI_CONFIG_LOG_SET_SUCCESS'), { color: 'green' });
} catch (error) {
cliux.error('error', error);
Expand Down
Loading
Loading