@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 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
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@noxfly/noxus",
3
- "version": "2.1.0",
3
+ "version": "2.1.1",
4
4
  "main": "dist/main.js",
5
5
  "module": "dist/main.mjs",
6
6
  "types": "dist/main.d.ts",
@@ -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
  }