feat: refresh CLI output styling and progress
This commit is contained in:
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user