import { styleText } from "node:util"; function styled(format: Parameters[0], text: string): string { return process.stdout.isTTY ? styleText(format, text) : text; } export const heading = (text: string): string => styled(["bold", "cyan"], text); export const ok = (text: string): string => styled("green", text); export const warn = (text: string): string => styled("yellow", text); export const fail = (text: string): string => styled("red", text); export const dim = (text: string): string => styled("dim", text);