Remove problematic lib chalk

This commit is contained in:
2025-09-06 09:57:22 +02:00
parent 347608ca40
commit 9418bfe6ba
4 changed files with 2 additions and 28 deletions
+1 -3
View File
@@ -1,5 +1,4 @@
import {Level, type Options, type Writer} from './types'
import {get_color} from './color'
export const writers = new Map<string, Writer>()
export let options: Options = {
@@ -52,7 +51,6 @@ function log(message: any[], level: Level, namespace: string): void {
let lvl = get_string(level)
if (!options.pad_level) lvl = lvl.trimEnd()
const head_color = head.replace('$level', get_color(level)(lvl))
const head_bw = head.replace('$level', lvl)
for (const [name, writer] of writers.entries()) {
@@ -61,7 +59,7 @@ function log(message: any[], level: Level, namespace: string): void {
if (options.verbose) console.log(`Writer's level is lower, discard message for ${name}`)
continue
}
writer.log(level, options?.with_color ? head_color : head_bw, ...message)
writer.log(level, head_bw, ...message)
}
}