feat(build): add verbose build output, progress logging, and timing for builds/tests

This commit is contained in:
2026-02-06 14:52:16 +00:00
parent 16cd0bbd87
commit 02b267ee10
8 changed files with 115 additions and 49 deletions

View File

@@ -15,3 +15,12 @@ export const logger = new plugins.smartlog.Smartlog({
logger.addLogDestination(new plugins.smartlogDestinationLocal.DestinationLocal());
export const ora = new plugins.smartlogSouceOra.SmartlogSourceOra();
export function formatDuration(ms: number): string {
if (ms < 1000) return `${ms}ms`;
const totalSeconds = ms / 1000;
if (totalSeconds < 60) return `${totalSeconds.toFixed(1)}s`;
const minutes = Math.floor(totalSeconds / 60);
const seconds = Math.round(totalSeconds % 60);
return `${minutes}m ${seconds}s`;
}