From c83b4f63915b024968366d626f9289564a62f99e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Davor=20Raci=C4=87?= Date: Mon, 9 Feb 2026 08:04:23 +0100 Subject: [PATCH] fix: batch directory creation log messages for cleaner installer output Collect all created directory names during module directory setup and emit them as a single log message instead of one per directory. This eliminates the excessive blank-line spacing that @clack/prompts adds between individual log.message() calls. Co-Authored-By: Claude Opus 4.6 --- tools/cli/installers/lib/modules/manager.js | 17 ++++++++++++++--- 1 file changed, 14 insertions(+), 3 deletions(-) diff --git a/tools/cli/installers/lib/modules/manager.js b/tools/cli/installers/lib/modules/manager.js index bc199a53d..c7611a128 100644 --- a/tools/cli/installers/lib/modules/manager.js +++ b/tools/cli/installers/lib/modules/manager.js @@ -1290,6 +1290,8 @@ class ModuleManager { const color = await prompts.getColor(); const directories = moduleYaml.directories; const wdsFolders = moduleYaml.wds_folders || []; + const createdDirs = []; + const createdWdsFolders = []; for (const dirRef of directories) { // Parse variable reference like "{design_artifacts}" @@ -1325,22 +1327,31 @@ class ModuleManager { // Create directory if it doesn't exist if (!(await fs.pathExists(fullPath))) { const dirName = configKey.replaceAll('_', ' '); - await prompts.log.message(color.yellow(`Creating ${dirName} directory: ${dirPath}`)); + createdDirs.push(`${dirName}: ${dirPath}`); await fs.ensureDir(fullPath); } // Create WDS subfolders if this is the design_artifacts directory if (configKey === 'design_artifacts' && wdsFolders.length > 0) { - await prompts.log.message(color.cyan('Creating WDS folder structure...')); for (const subfolder of wdsFolders) { const subPath = path.join(fullPath, subfolder); if (!(await fs.pathExists(subPath))) { await fs.ensureDir(subPath); - await prompts.log.message(color.dim(` ✓ ${subfolder}/`)); + createdWdsFolders.push(subfolder); } } } } + + // Batch output: single log message for all created directories + if (createdDirs.length > 0) { + const lines = createdDirs.map((d) => ` ${d}`).join('\n'); + await prompts.log.message(color.yellow(`Created directories:\n${lines}`)); + } + if (createdWdsFolders.length > 0) { + const lines = createdWdsFolders.map((f) => color.dim(` ✓ ${f}/`)).join('\n'); + await prompts.log.message(color.cyan(`Created WDS folder structure:\n${lines}`)); + } } /**