fix: use CSS color instead

This commit is contained in:
2026-03-21 00:52:39 +07:00 Unverified
parent 48bd9b9c96
commit e035746a0f
+12 -5
View File
@@ -1,3 +1,4 @@
import { feature } from "bun:bundle";
import { color, inspect } from "bun";
const colors = [
@@ -7,17 +8,23 @@ const colors = [
"blue",
"magenta",
"cyan",
"brightRed",
"brightGreen",
"brightBlue",
"brightMagenta",
"lime",
"orange",
"violet",
"skyblue",
"pink",
"turquoise",
"gold",
"deepskyblue",
"springgreen",
];
var i = 0;
if (!feature("API"))
console.log(
colors.map((c) => `${color(c, "ansi")}${c.slice(0, 1)}`).join("") +
color("lightgray", "ansi"),
);
export function createLogger() {
const start = Date.now();
const col = color(colors[i], "ansi");