feat: refresh CLI output styling and progress

This commit is contained in:
Peter Steinberger
2026-01-08 05:19:57 +01:00
parent ab98ffe9fe
commit 28cd2e4c24
24 changed files with 652 additions and 273 deletions

View File

@@ -1,5 +1,5 @@
import chalk from "chalk";
import { getLogger, isFileLogLevelEnabled } from "./logging.js";
import { theme } from "./terminal/theme.js";
let globalVerbose = false;
let globalYes = false;
@@ -24,12 +24,12 @@ export function logVerbose(message: string) {
// ignore logger failures to avoid breaking verbose printing
}
if (!globalVerbose) return;
console.log(chalk.gray(message));
console.log(theme.muted(message));
}
export function logVerboseConsole(message: string) {
if (!globalVerbose) return;
console.log(chalk.gray(message));
console.log(theme.muted(message));
}
export function setYes(v: boolean) {
@@ -40,7 +40,7 @@ export function isYes() {
return globalYes;
}
export const success = chalk.green;
export const warn = chalk.yellow;
export const info = chalk.cyan;
export const danger = chalk.red;
export const success = theme.success;
export const warn = theme.warn;
export const info = theme.info;
export const danger = theme.error;