Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
26 commits
Select commit Hold shift + click to select a range
e106d94
fixed circular object parsing bug
Jul 30, 2026
a5a475a
merged latest changes
Jul 30, 2026
34fdde3
Merge branch 'development' into fix/logger-circular-object-parsing
netrajpatel Aug 4, 2026
1ea73c0
fix(config): correct swapped flag descriptions in config:set:early-ac…
cs-raj Aug 5, 2026
81686da
Merge pull request #2683 from contentstack/fix/config-set-early-acces…
netrajpatel Aug 5, 2026
6b96eba
chore(config): bump @contentstack/cli-config to 1.21.1
cs-raj Aug 5, 2026
147ef23
Merge pull request #2684 from contentstack/chore/config-version-bump-…
netrajpatel Aug 5, 2026
2296333
Merge branch 'development' of github.com:contentstack/cli into fix/lo…
Aug 5, 2026
96e3d19
Merge branch 'fix/logger-circular-object-parsing' of github.com:conte…
Aug 5, 2026
a3230d9
Merge pull request #2675 from contentstack/fix/logger-circular-object…
shafeeqd959 Aug 5, 2026
6bec2b0
docs(cli): replace oclif command dump with concise README and plugin …
cs-raj Aug 5, 2026
57248d6
version bump
Aug 5, 2026
0c6c9ad
Merge branch 'development' into chore/readme-cleanup-contentstack-pkg
cs-raj Aug 5, 2026
6d79345
revert: undo version bump in packages/contentstack/package.json
Aug 5, 2026
7dba181
updated lock file
Aug 5, 2026
779ede3
docs(cli): remove bulk-operations, asterisk footnotes, and bulk note
cs-raj Aug 5, 2026
9b07386
Merge pull request #2687 from contentstack/version-bump
shafeeqd959 Aug 5, 2026
1c73bc2
Merge branch 'development' into chore/readme-cleanup-contentstack-pkg
cs-raj Aug 5, 2026
53dbeaa
docs(cli): add documentation links to plugin tables (v1)
cs-raj Aug 5, 2026
f64e250
docs(cli): add all verified documentation links to plugin tables (v1)
cs-raj Aug 5, 2026
3d6af47
Merge pull request #2686 from contentstack/chore/readme-cleanup-conte…
netrajpatel Aug 5, 2026
4df4b90
chore: bump @contentstack/cli to 1.67.0 with updated plugin dependenc…
Aug 5, 2026
2761939
updated lock file
Aug 5, 2026
2afec4c
Merge pull request #2690 from contentstack/chore/cli-version-bump-1.66.1
shafeeqd959 Aug 5, 2026
be04c6e
v1 changes
Aug 6, 2026
2a0d3d0
merged latest changes from v2
Aug 6, 2026
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
6 changes: 5 additions & 1 deletion .talismanrc
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
fileignoreconfig:

- filename: pnpm-lock.yaml
checksum: 3d5920821aca485d93dc90dc2006bb81b077344b5f5fd6487002d8b4222cff09
checksum: 98cc0f62b09ea6768f3a20152860a327722a92efaa372acfc7d37bdd2afd014e
- filename: packages/contentstack/README.md
checksum: df0892cbcf3f04972161b30a1a0ef8844a2682ce8a3270f2911909e7789ad8d7
- filename: packages/contentstack-utilities/src/logger/logger.ts
checksum: 8c960b88f59f2efd233e7e00fb69dfb90e6eccf52e7253d144d4e20ff72a6906
version: '1.0'
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/2.0.0-beta.17 darwin-arm64 node-v24.18.0
@contentstack/cli-auth/2.0.0-beta.17 darwin-arm64 node-v22.13.1
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
2 changes: 1 addition & 1 deletion 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/2.0.0-beta.15 darwin-arm64 node-v24.18.0
@contentstack/cli-config/2.0.0-beta.15 darwin-arm64 node-v22.13.1
$ csdx --help [COMMAND]
USAGE
$ csdx COMMAND
Expand Down
31 changes: 27 additions & 4 deletions packages/contentstack-utilities/src/logger/logger.ts
Original file line number Diff line number Diff line change
Expand Up @@ -63,7 +63,7 @@ export default class Logger {
winston.format.printf((info) => {
// Apply minimal redaction for files (debugging info preserved)
const redactedInfo = this.redact(info, false);
return JSON.stringify(redactedInfo);
return this.safeStringify(redactedInfo);
}),
),
}),
Expand All @@ -75,7 +75,7 @@ export default class Logger {
const logConfig = configHandler.get('log') || {};
const currentModule = logConfig.progressSupportedModule;
const hasProgressSupport = currentModule && PROGRESS_SUPPORTED_MODULES.includes(currentModule);

if (hasProgressSupport) {
// Plugin has progress bars - respect user's explicit setting, or default to false (show progress bars)
showConsoleLogs = logConfig.showConsoleLogs ?? false;
Expand Down Expand Up @@ -146,6 +146,26 @@ export default class Logger {
}
}

/**
* Stringifies a log entry without throwing on circular references.
* `redact()` can fall back to the original (still-circular) object when
* cloning fails, so this must never assume the input is cycle-free.
*/
private safeStringify(value: any): string {
const seen = new WeakSet();
try {
return JSON.stringify(value, (_key, val) => {
if (typeof val === 'object' && val !== null) {
if (seen.has(val)) return '[Circular]';
seen.add(val);
}
return val;
});
} catch {
return JSON.stringify({ level: value?.level, message: value?.message ?? '[Unserializable log entry]' });
}
}

private shouldLog(level: LogType, target: 'console' | 'file'): boolean {
// If console logging is disabled, don't log to console
if (target === 'console' && this.config.consoleLoggingEnabled === false) {
Expand Down Expand Up @@ -215,9 +235,12 @@ export default class Logger {
this.loggers.error.error(logPayload);
}

// For console, use debug level if hidden, otherwise error level
// For console, use debug level if hidden, otherwise error level. Each level's
// winston logger instance bundles both the file and console transports, so only
// write again here when the target differs from the one already written above —
// otherwise this would duplicate both the console line and the file entry.
const consoleLevel: LogType = params.hidden ? 'debug' : 'error';
if (this.shouldLog(consoleLevel, 'console')) {
if (consoleLevel !== 'error' && this.shouldLog(consoleLevel, 'console')) {
this.loggers[consoleLevel].error(logPayload);
}
}
Expand Down
Loading
Loading