@lowfat/log 0.2.0 → 0.3.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/index.d.mts CHANGED
@@ -28,23 +28,23 @@ interface LoggerColors {
28
28
  declare class Log {
29
29
  #private;
30
30
  static colors: LoggerColors;
31
- static error(...message: string[]): void;
32
- static warn(...message: string[]): void;
33
- static note(...message: string[]): void;
34
- static info(...message: string[]): void;
35
- static success(...message: string[]): void;
36
- static debug(...message: string[]): void;
31
+ static error(...message: Parameters<typeof console.error>): void;
32
+ static warn(...message: Parameters<typeof console.warn>): void;
33
+ static note(...message: Parameters<typeof console.log>): void;
34
+ static info(...message: Parameters<typeof console.log>): void;
35
+ static success(...message: Parameters<typeof console.log>): void;
36
+ static debug(...message: Parameters<typeof console.debug>): void;
37
37
  constructor({
38
38
  label,
39
39
  sublabel,
40
40
  total
41
41
  }: LoggerOptions);
42
- error(...message: string[]): void;
43
- warn(...message: string[]): void;
44
- note(...message: string[]): void;
45
- info(...message: string[]): void;
46
- success(...message: string[]): void;
47
- debug(...message: string[]): void;
42
+ error(...message: Parameters<typeof console.error>): void;
43
+ warn(...message: Parameters<typeof console.warn>): void;
44
+ note(...message: Parameters<typeof console.log>): void;
45
+ info(...message: Parameters<typeof console.log>): void;
46
+ success(...message: Parameters<typeof console.log>): void;
47
+ debug(...message: Parameters<typeof console.debug>): void;
48
48
  update(total: number): void;
49
49
  progress(i: number, {
50
50
  color,
package/dist/index.mjs CHANGED
@@ -33,7 +33,7 @@ var Log = class Log {
33
33
  console.warn(Log.#prefix(), Log.#clr(Log.colors.YELLOW, message.join(" ")));
34
34
  }
35
35
  static note(...message) {
36
- console.info(Log.#prefix(), Log.#clr(Log.colors.CYAN, message.join(" ")));
36
+ console.log(Log.#prefix(), Log.#clr(Log.colors.CYAN, message.join(" ")));
37
37
  }
38
38
  static info(...message) {
39
39
  console.log(Log.#prefix(), message.join(" "));
@@ -45,7 +45,7 @@ var Log = class Log {
45
45
  console.debug(Log.#prefix(), Log.#clr(Log.colors.MAGENTA, message.join(" ")));
46
46
  }
47
47
  /** Updates the static value for maximum column count. */
48
- static #setMaxColumns(label, padding = 6) {
48
+ static #setMaxColumns(label, padding = 8) {
49
49
  Log.#maxColumns = process.stdout.columns - label.length - padding;
50
50
  }
51
51
  /** Sets up a listener to listen for output window size changes to adjust column count. */
@@ -74,7 +74,7 @@ var Log = class Log {
74
74
  console.warn(this.#instancePrefix, Log.#clr(Log.colors.YELLOW, message.join(" ")));
75
75
  }
76
76
  note(...message) {
77
- console.info(this.#instancePrefix, Log.#clr(Log.colors.CYAN, message.join(" ")));
77
+ console.log(this.#instancePrefix, Log.#clr(Log.colors.CYAN, message.join(" ")));
78
78
  }
79
79
  info(...message) {
80
80
  console.log(this.#instancePrefix, message.join(" "));
package/package.json CHANGED
@@ -28,5 +28,5 @@
28
28
  },
29
29
  "type": "module",
30
30
  "types": "./dist/index.d.mts",
31
- "version": "0.2.0"
31
+ "version": "0.3.1"
32
32
  }