@warlock.js/logger 4.1.6 → 4.1.8

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/cjs/index.cjs CHANGED
@@ -39,7 +39,7 @@ path = __toESM(path, 1);
39
39
  let safe_stable_stringify = require("safe-stable-stringify");
40
40
  let _mongez_reinforcements = require("@mongez/reinforcements");
41
41
 
42
- //#region ../../@warlock.js/logger/src/log-channel.ts
42
+ //#region ../@warlock.js/logger/src/log-channel.ts
43
43
  var LogChannel = class {
44
44
  /**
45
45
  * Constructor
@@ -112,7 +112,7 @@ var LogChannel = class {
112
112
  };
113
113
 
114
114
  //#endregion
115
- //#region ../../@warlock.js/logger/src/channels/console-log.ts
115
+ //#region ../@warlock.js/logger/src/channels/console-log.ts
116
116
  var ConsoleLog = class extends LogChannel {
117
117
  constructor(..._args) {
118
118
  super(..._args);
@@ -157,7 +157,7 @@ var ConsoleLog = class extends LogChannel {
157
157
  };
158
158
 
159
159
  //#endregion
160
- //#region ../../@warlock.js/logger/src/channels/file-log.ts
160
+ //#region ../@warlock.js/logger/src/channels/file-log.ts
161
161
  var FileLog = class extends LogChannel {
162
162
  constructor(..._args) {
163
163
  super(..._args);
@@ -415,7 +415,7 @@ var FileLog = class extends LogChannel {
415
415
  };
416
416
 
417
417
  //#endregion
418
- //#region ../../@warlock.js/logger/src/utils/safe-json-stringify.ts
418
+ //#region ../@warlock.js/logger/src/utils/safe-json-stringify.ts
419
419
  /**
420
420
  * Replacer that surfaces Error data — `name`, `message`, and `stack` are
421
421
  * non-enumerable on `Error`, so neither default JSON serialization nor an
@@ -446,7 +446,7 @@ function safeJsonStringify(value, space) {
446
446
  }
447
447
 
448
448
  //#endregion
449
- //#region ../../@warlock.js/logger/src/channels/json-file-log.ts
449
+ //#region ../@warlock.js/logger/src/channels/json-file-log.ts
450
450
  var JSONFileLog = class extends FileLog {
451
451
  constructor(..._args) {
452
452
  super(..._args);
@@ -574,7 +574,7 @@ var JSONFileLog = class extends FileLog {
574
574
  };
575
575
 
576
576
  //#endregion
577
- //#region ../../@warlock.js/logger/src/redact/redact.ts
577
+ //#region ../@warlock.js/logger/src/redact/redact.ts
578
578
  /**
579
579
  * Deep-clone a value with structural fidelity for log entries — handles plain
580
580
  * objects, arrays, `Date`, `Error`, and primitives. Anything else is copied
@@ -681,7 +681,7 @@ function mergeRedact(base, extra) {
681
681
  }
682
682
 
683
683
  //#endregion
684
- //#region ../../@warlock.js/logger/src/utils/clear-message.ts
684
+ //#region ../@warlock.js/logger/src/utils/clear-message.ts
685
685
  /**
686
686
  * Clear message from any terminal codes
687
687
  */
@@ -691,7 +691,7 @@ function clearMessage(message) {
691
691
  }
692
692
 
693
693
  //#endregion
694
- //#region ../../@warlock.js/logger/src/logger.ts
694
+ //#region ../@warlock.js/logger/src/logger.ts
695
695
  const SIGNAL_EVENTS = new Set([
696
696
  "SIGINT",
697
697
  "SIGTERM",
@@ -967,7 +967,7 @@ var Logger = class {
967
967
  const log = new Logger();
968
968
 
969
969
  //#endregion
970
- //#region ../../@warlock.js/logger/src/utils/capture-unhandled-errors.ts
970
+ //#region ../@warlock.js/logger/src/utils/capture-unhandled-errors.ts
971
971
  /**
972
972
  * Route Node's process-level failure events through the logger so they land in
973
973
  * every configured channel with full stack context. Registers one listener for
@@ -1,7 +1,7 @@
1
1
  import { BasicLogConfigurations, LoggingData } from "../types.mjs";
2
2
  import { LogChannel } from "../log-channel.mjs";
3
3
 
4
- //#region ../../@warlock.js/logger/src/channels/console-log.d.ts
4
+ //#region ../@warlock.js/logger/src/channels/console-log.d.ts
5
5
  type ConsoleLogConfig = BasicLogConfigurations & {
6
6
  /**
7
7
  * Render the log entry's `context` object on a second line after the main
@@ -2,7 +2,7 @@ import { LogChannel } from "../log-channel.mjs";
2
2
  import { colors } from "@mongez/copper";
3
3
  import { inspect } from "util";
4
4
 
5
- //#region ../../@warlock.js/logger/src/channels/console-log.ts
5
+ //#region ../@warlock.js/logger/src/channels/console-log.ts
6
6
  var ConsoleLog = class extends LogChannel {
7
7
  constructor(..._args) {
8
8
  super(..._args);
@@ -1,7 +1,7 @@
1
1
  import { BasicLogConfigurations, LogContract, LogLevel, LogMessage, LoggingData } from "../types.mjs";
2
2
  import { LogChannel } from "../log-channel.mjs";
3
3
 
4
- //#region ../../@warlock.js/logger/src/channels/file-log.d.ts
4
+ //#region ../@warlock.js/logger/src/channels/file-log.d.ts
5
5
  type FileLogConfig = BasicLogConfigurations & {
6
6
  storagePath?: string;
7
7
  /**
@@ -5,7 +5,7 @@ import fs from "fs";
5
5
  import { EOL } from "os";
6
6
  import path from "path";
7
7
 
8
- //#region ../../@warlock.js/logger/src/channels/file-log.ts
8
+ //#region ../@warlock.js/logger/src/channels/file-log.ts
9
9
  var FileLog = class extends LogChannel {
10
10
  constructor(..._args) {
11
11
  super(..._args);
@@ -1,7 +1,7 @@
1
1
  import { LogContract, LoggingData } from "../types.mjs";
2
2
  import { FileLog } from "./file-log.mjs";
3
3
 
4
- //#region ../../@warlock.js/logger/src/channels/json-file-log.d.ts
4
+ //#region ../@warlock.js/logger/src/channels/json-file-log.d.ts
5
5
  declare class JSONFileLog extends FileLog implements LogContract {
6
6
  /**
7
7
  * {@inheritdoc}
@@ -5,7 +5,7 @@ import dayjs from "dayjs";
5
5
  import fs from "fs";
6
6
  import path from "path";
7
7
 
8
- //#region ../../@warlock.js/logger/src/channels/json-file-log.ts
8
+ //#region ../@warlock.js/logger/src/channels/json-file-log.ts
9
9
  var JSONFileLog = class extends FileLog {
10
10
  constructor(..._args) {
11
11
  super(..._args);
@@ -1,6 +1,6 @@
1
1
  import { BasicLogConfigurations, LogContract, LoggingData, RedactConfig } from "./types.mjs";
2
2
 
3
- //#region ../../@warlock.js/logger/src/log-channel.d.ts
3
+ //#region ../@warlock.js/logger/src/log-channel.d.ts
4
4
  declare abstract class LogChannel<Options extends BasicLogConfigurations = BasicLogConfigurations> implements LogContract {
5
5
  /**
6
6
  * Channel name
@@ -1,4 +1,4 @@
1
- //#region ../../@warlock.js/logger/src/log-channel.ts
1
+ //#region ../@warlock.js/logger/src/log-channel.ts
2
2
  var LogChannel = class {
3
3
  /**
4
4
  * Constructor
package/esm/logger.d.mts CHANGED
@@ -1,7 +1,7 @@
1
1
  import { AutoFlushEvent, BasicLogConfigurations, LogLevel, LoggingData, OmittedLoggingData, RedactConfig } from "./types.mjs";
2
2
  import { LogChannel } from "./log-channel.mjs";
3
3
 
4
- //#region ../../@warlock.js/logger/src/logger.d.ts
4
+ //#region ../@warlock.js/logger/src/logger.d.ts
5
5
  declare class Logger {
6
6
  /**
7
7
  * Current channel
package/esm/logger.mjs CHANGED
@@ -2,7 +2,7 @@ import { applyRedact, mergeRedact } from "./redact/redact.mjs";
2
2
  import { clearMessage } from "./utils/clear-message.mjs";
3
3
  import { Random } from "@mongez/reinforcements";
4
4
 
5
- //#region ../../@warlock.js/logger/src/logger.ts
5
+ //#region ../@warlock.js/logger/src/logger.ts
6
6
  const SIGNAL_EVENTS = new Set([
7
7
  "SIGINT",
8
8
  "SIGTERM",
@@ -1,6 +1,6 @@
1
1
  import { LoggingData, RedactConfig } from "../types.mjs";
2
2
 
3
- //#region ../../@warlock.js/logger/src/redact/redact.d.ts
3
+ //#region ../@warlock.js/logger/src/redact/redact.d.ts
4
4
  /**
5
5
  * Produce a new `LoggingData` with every path in `config.paths` replaced
6
6
  * by `config.censor`. The original entry is never mutated — channels and
@@ -1,4 +1,4 @@
1
- //#region ../../@warlock.js/logger/src/redact/redact.ts
1
+ //#region ../@warlock.js/logger/src/redact/redact.ts
2
2
  /**
3
3
  * Deep-clone a value with structural fidelity for log entries — handles plain
4
4
  * objects, arrays, `Date`, `Error`, and primitives. Anything else is copied
package/esm/types.d.mts CHANGED
@@ -1,4 +1,4 @@
1
- //#region ../../@warlock.js/logger/src/types.d.ts
1
+ //#region ../@warlock.js/logger/src/types.d.ts
2
2
  type LogLevel = "debug" | "info" | "warn" | "error" | "success";
3
3
  /**
4
4
  * Process-level events that `Logger.enableAutoFlush()` can hook to drain
@@ -1,4 +1,4 @@
1
- //#region ../../@warlock.js/logger/src/utils/capture-unhandled-errors.d.ts
1
+ //#region ../@warlock.js/logger/src/utils/capture-unhandled-errors.d.ts
2
2
  /**
3
3
  * Route Node's process-level failure events through the logger so they land in
4
4
  * every configured channel with full stack context. Registers one listener for
@@ -1,6 +1,6 @@
1
1
  import { log } from "../logger.mjs";
2
2
 
3
- //#region ../../@warlock.js/logger/src/utils/capture-unhandled-errors.ts
3
+ //#region ../@warlock.js/logger/src/utils/capture-unhandled-errors.ts
4
4
  /**
5
5
  * Route Node's process-level failure events through the logger so they land in
6
6
  * every configured channel with full stack context. Registers one listener for
@@ -1,4 +1,4 @@
1
- //#region ../../@warlock.js/logger/src/utils/clear-message.d.ts
1
+ //#region ../@warlock.js/logger/src/utils/clear-message.d.ts
2
2
  /**
3
3
  * Clear message from any terminal codes
4
4
  */
@@ -1,4 +1,4 @@
1
- //#region ../../@warlock.js/logger/src/utils/clear-message.ts
1
+ //#region ../@warlock.js/logger/src/utils/clear-message.ts
2
2
  /**
3
3
  * Clear message from any terminal codes
4
4
  */
@@ -1,4 +1,4 @@
1
- //#region ../../@warlock.js/logger/src/utils/safe-json-stringify.d.ts
1
+ //#region ../@warlock.js/logger/src/utils/safe-json-stringify.d.ts
2
2
  /**
3
3
  * JSON-serialize log payloads safely. Circular refs, BigInt, and repeated
4
4
  * non-tree references are handled by `safe-stable-stringify`; functions and
@@ -1,6 +1,6 @@
1
1
  import { stringify } from "safe-stable-stringify";
2
2
 
3
- //#region ../../@warlock.js/logger/src/utils/safe-json-stringify.ts
3
+ //#region ../@warlock.js/logger/src/utils/safe-json-stringify.ts
4
4
  /**
5
5
  * Replacer that surfaces Error data — `name`, `message`, and `stack` are
6
6
  * non-enumerable on `Error`, so neither default JSON serialization nor an
package/package.json CHANGED
@@ -15,13 +15,13 @@
15
15
  "url": "https://github.com/warlockjs/logger"
16
16
  },
17
17
  "dependencies": {
18
- "@warlock.js/fs": "4.1.6",
18
+ "@warlock.js/fs": "*",
19
19
  "@mongez/copper": "^2.1.2",
20
20
  "@mongez/reinforcements": "^3.2.0",
21
21
  "dayjs": "^1.11.9",
22
22
  "safe-stable-stringify": "^2.5.0"
23
23
  },
24
- "version": "4.1.6",
24
+ "version": "4.1.8",
25
25
  "main": "./cjs/index.cjs",
26
26
  "module": "./esm/index.mjs",
27
27
  "types": "./esm/index.d.mts",