@noxfly/noxus 2.1.0 → 2.1.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/main.js +2 -2
- package/dist/main.mjs +2 -2
- package/package.json +1 -1
- package/src/utils/logger.ts +2 -2
package/dist/main.js
CHANGED
|
@@ -540,7 +540,7 @@ function formattedArgs(prefix, args, color) {
|
|
|
540
540
|
if (typeof arg === "string") {
|
|
541
541
|
return `${color}${arg}${colReset}`;
|
|
542
542
|
} else if (typeof arg === "object") {
|
|
543
|
-
return formatObject(prefix, arg, color
|
|
543
|
+
return formatObject(prefix, arg, color !== "");
|
|
544
544
|
}
|
|
545
545
|
return arg;
|
|
546
546
|
});
|
|
@@ -614,7 +614,7 @@ function output(level, args) {
|
|
|
614
614
|
const data = formattedArgs(prefix, args);
|
|
615
615
|
const filepath = fileSettings.get(level)?.filepath;
|
|
616
616
|
if (filepath) {
|
|
617
|
-
const message = prefix + " " + data.join(" ");
|
|
617
|
+
const message = prefix + " " + data.join(" ").replace(/\x1b\[[0-9;]*m/g, "");
|
|
618
618
|
enqueue(filepath, message);
|
|
619
619
|
}
|
|
620
620
|
}
|
package/dist/main.mjs
CHANGED
|
@@ -445,7 +445,7 @@ function formattedArgs(prefix, args, color) {
|
|
|
445
445
|
if (typeof arg === "string") {
|
|
446
446
|
return `${color}${arg}${colReset}`;
|
|
447
447
|
} else if (typeof arg === "object") {
|
|
448
|
-
return formatObject(prefix, arg, color
|
|
448
|
+
return formatObject(prefix, arg, color !== "");
|
|
449
449
|
}
|
|
450
450
|
return arg;
|
|
451
451
|
});
|
|
@@ -519,7 +519,7 @@ function output(level, args) {
|
|
|
519
519
|
const data = formattedArgs(prefix, args);
|
|
520
520
|
const filepath = fileSettings.get(level)?.filepath;
|
|
521
521
|
if (filepath) {
|
|
522
|
-
const message = prefix + " " + data.join(" ");
|
|
522
|
+
const message = prefix + " " + data.join(" ").replace(/\x1b\[[0-9;]*m/g, "");
|
|
523
523
|
enqueue(filepath, message);
|
|
524
524
|
}
|
|
525
525
|
}
|
package/package.json
CHANGED
package/src/utils/logger.ts
CHANGED
|
@@ -114,7 +114,7 @@ function formattedArgs(prefix: string, args: any[], color?: string): any[] {
|
|
|
114
114
|
}
|
|
115
115
|
|
|
116
116
|
else if(typeof arg === "object") {
|
|
117
|
-
return formatObject(prefix, arg, color
|
|
117
|
+
return formatObject(prefix, arg, color !== "");
|
|
118
118
|
}
|
|
119
119
|
|
|
120
120
|
return arg;
|
|
@@ -229,7 +229,7 @@ function output(level: LogLevel, args: any[]): void {
|
|
|
229
229
|
const filepath = fileSettings.get(level)?.filepath;
|
|
230
230
|
|
|
231
231
|
if(filepath) {
|
|
232
|
-
const message = prefix + " " + data.join(" ");
|
|
232
|
+
const message = prefix + " " + data.join(" ").replace(/\x1b\[[0-9;]*m/g, ''); // Remove ANSI codes
|
|
233
233
|
enqueue(filepath, message);
|
|
234
234
|
}
|
|
235
235
|
}
|