{"version":3,"file":"dev.mjs","names":[],"sources":["../../../src/cli/render/dev.ts"],"sourcesContent":["import type { StartSummary } from \"../../services/dev/session\";\nimport { colors } from \"../../utils/theme\";\nimport { formatDuration, sumPhaseDurations } from \"../../utils/timing\";\n\n/** The `bos start` boot summary. */\nexport function printStartSummary(summary: StartSummary) {\n  console.log();\n  console.log(`  ${colors.dim(\"Config Source:\")}  ${summary.configSource}`);\n  if (summary.configSourceHttp) {\n    console.log(`                  ${colors.dim(summary.configSourceHttp)}`);\n  }\n  console.log(`  ${colors.dim(\"Account:\")}        ${summary.account}`);\n  console.log(`  ${colors.dim(\"Domain:\")}         ${summary.domain ?? \"not configured\"}`);\n  console.log();\n  console.log(`  ${colors.dim(\"Modules:\")}`);\n  console.log(`    ${colors.dim(\"HOST\")}  → ${summary.modules.host ?? \"local\"}`);\n  console.log(`    ${colors.dim(\"UI\")}   → ${summary.modules.ui ?? \"local\"}`);\n  console.log(`    ${colors.dim(\"API\")}  → ${summary.modules.api ?? \"local\"}`);\n  if (summary.modules.auth) {\n    console.log(`    ${colors.dim(\"AUTH\")}  → ${summary.modules.auth}`);\n  }\n  if (summary.warnings.length > 0) {\n    console.log();\n    for (const w of summary.warnings) {\n      console.log(`  ${colors.yellow(w)}`);\n    }\n  }\n  console.log();\n}\n\n/** Phase timings below a long-running summary. */\nexport function printTimingSummary(\n  timings: Array<{ name: string; durationMs: number }> | undefined,\n) {\n  if (!timings || timings.length === 0) return;\n\n  console.log(`  ${colors.dim(\"Timings:\")}`);\n  for (const timing of timings) {\n    console.log(`    ${colors.dim(timing.name.padEnd(22))} ${formatDuration(timing.durationMs)}`);\n  }\n  console.log(\n    `    ${colors.dim(\"total\".padEnd(22))} ${formatDuration(sumPhaseDurations(timings))}`,\n  );\n}\n\n/** Erase the clack spinner line so streamed output starts clean. */\nexport function clearSpinnerStopLine() {\n  if (!process.stdout.isTTY) return;\n  process.stdout.write(\"\\x1b[1A\\x1b[2K\\r\");\n}\n"],"mappings":";;;;;A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