Fix/console log policy plugins - #353
Conversation
… off Bulk command failures were silently swallowed when log.showConsoleLogs was disabled — handleAndLogError only reaches the console through the winston error transport, which is silenced in that mode, so the terminal showed nothing on failure (e.g. an invalid stack API key). Print a user-facing error line in BaseBulkCommand.catch() when console logs are off, reusing cliErrorHandler.classifyError so the message matches the friendly text written to the log file. Guarded to avoid double-printing when console logs are on. Ref: DX-10224 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Step 2 of the logger-scoping change; step 1 landed in the cli repo (console-policy module, logger filter, progress-manager self-seeding, console-policy init hook). Console visibility is now a process-wide policy resolved once, before any command runs, from static inputs: CS_CLI_CONSOLE_LOGS, then user config (on `true` only), then the plugin's csdxConfig.showConsoleLogs, then files-only. Plugins no longer decide it, thread it, or persist it. - Remove the log.progressSupportedModule writes and the clearProgressModuleSetting calls; nothing reads that key any more. - Drop the seeding boilerplate at all 17 progress-manager call sites — CLIProgressManager reads the policy itself, so createSimple/ createNested no longer take showConsoleLogs. - Reduce the local withLoadingSpinner wrappers to a plain delegation; the manager now skips the spinner in console-log mode internally. - Re-source the sites that choose their own content (audit's banners, the `if (!showConsoleLogs) cliux.print` compensation in export, import and import-setup) to isConsoleLogEnabled(). - Stop audit persisting `log.showConsoleLogs: false` into the user's config. That value silently outranked every plugin declaration; step 1 makes a persisted `false` read as "no opinion", and the two halves have to ship together. - Declare csdxConfig.showConsoleLogs on query-export and cli-tsgen, whose only user-facing output is log.*. Console logs and the progress UI are mutually exclusive: opting in to console logs turns the bars, spinners and headers off, so the two consumers of the terminal can never interleave.
…o fix/console-log-policy-plugins
✅ Snyk checks have passed. No issues have been found so far.
💻 Catch issues earlier using the plugins for VS Code, JetBrains IDEs, Visual Studio, and Eclipse. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
…into fix/DX-10224-bulk-error-visibility
…lity
Post-merge, the console-log state moved from configHandler.get('log').
showConsoleLogs to the process-wide console-policy module, and the
configHandler import was dropped. catch() still referenced configHandler,
breaking the build (TS2304).
Switch the guard to isConsoleLogEnabled() so the friendly error line still
prints on failure when console logs are off, without double-printing when
they are on. Matches the convention the rest of the file now follows.
Ref: DX-10224
Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
…ibility fix(bulk-operations): surface errors on console when console logs are off [DX-10224]
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
…ack/cli-plugins into fix/console-log-policy-plugins
🔒 Security Scan Results
⏱️ SLA Breach Summary
✅ BUILD PASSED - All security checks passed |
No description provided.