feat(bulk-operations): integrate progress manager UI [DX-3882]#293
feat(bulk-operations): integrate progress manager UI [DX-3882]#293harshitha-cstk wants to merge 6 commits into
Conversation
Wire CLIProgressManager/SummaryManager into the bulk operations commands, matching the export/import/audit pattern: - replace the direct `chalk` import with loadChalk()/getChalk() (ESM-safe) - set/clear `log.progressSupportedModule` in init()/finally(); null-reset first so pre-flight/auth/setup errors still reach the console - initialize the run-level global summary + header in executeBulkOperation (empty-branch fallback like import; label suffixed with branch when set) - show a loading spinner while the async batch/job queue drains, then record accurate success/failed counts from the final result - print the global summary and clear the progress-module flag in finally()
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
Consider reviewing these vulnerabilities when fixes become available. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
Consider reviewing these vulnerabilities when fixes become available. |
There was a problem hiding this comment.
Pull request overview
Integrates the shared CLIProgressManager/global summary UX into the bulk-operations plugin’s BaseBulkCommand, aligning it with the progress/summary behavior used by other CLI plugins while keeping Bulk API’s async nature in mind.
Changes:
- Replaces direct
chalkusage inBaseBulkCommandwithloadChalk()/getChalk()and initializes progress UI prerequisites ininit(). - Enables/disables the progress-module suppression flag (
log.progressSupportedModule) around command execution and prints the global summary infinally(). - Wraps bulk execution in a loading spinner and attempts to record final success/failure counts into the progress summary.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
Consider reviewing these vulnerabilities when fixes become available. |
There was a problem hiding this comment.
Pull request overview
Copilot reviewed 4 out of 4 changed files in this pull request and generated 1 comment.
Comments suppressed due to low confidence (1)
packages/contentstack-bulk-operations/src/base-bulk-command.ts:246
initForRevertOrRetry()callsprocess.exit(0)after enabling the progress module. Becauseprocess.exitbypasses the normal oclif lifecycle,finally()will not run, so the global progress summary won’t be printed andclearProgressModuleSetting()won’t be called. This can leavelog.progressSupportedModuleset in persisted config and affect subsequent commands.
protected async setupStack(): Promise<void> {
const flags = this.parsedFlags || (await this.parse(this.constructor as typeof BaseBulkCommand)).flags;
let stackConfig;
try {
stackConfig = setupStackConfig(flags, this.cmaHost, this.cdaHost);
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
Consider reviewing these vulnerabilities when fixes become available. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
Consider reviewing these vulnerabilities when fixes become available. |
🔒 Security Scan Results
⏱️ SLA Breach Summary
ℹ️ Vulnerabilities Without Available Fixes (Informational Only)The following vulnerabilities were detected but do not have fixes available (no upgrade or patch). These are excluded from failure thresholds:
Consider reviewing these vulnerabilities when fixes become available. |
Overview
Integrates the Progress Manager UI into all
cm:stacks:bulk-*commands so bulkoperations show a clean header, a live summary with per-command Module Details,
and suppress the timestamped console logs by default.
Purpose
Bulk commands previously streamed raw
[timestamp] INFO:log lines with noconsolidated summary, making the output noisy and hard to scan. This gives a
concise, readable run experience with an at-a-glance pass/fail summary.
Changes
buildConfig()(config layer) before the firstlog call, so console logs are suppressed and the progress UI renders. Users who
need raw logs can opt back in with
csdx config:set:log --show-console-logs.per-command Module Details row (
ENTRY/ASSET/TAXONOMY) withsuccess/failed counts, printed once at the end.
BaseBulkCommand(
beginOperationSummary,recordModuleSummary,finalizeProgressSummary);bulk-taxonomies(which overridesinit/executeBulkOperation) reuses them.bulk-am-assets(separate base) suppresses console logs and clears theprogress flag on completion; it keeps its existing delete/move summary output.
chalkimport withloadChalk()/getChalk().🤖 Generated with Claude Code