standard-log 13.3.0 → 13.3.2

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.
Files changed (102) hide show
  1. package/cjs/console.d.ts +5 -6
  2. package/cjs/console.d.ts.map +1 -1
  3. package/cjs/console.js +2 -2
  4. package/cjs/console.js.map +1 -1
  5. package/cjs/errors.d.ts +2 -3
  6. package/cjs/errors.d.ts.map +1 -1
  7. package/cjs/formatter.d.ts +5 -6
  8. package/cjs/formatter.d.ts.map +1 -1
  9. package/cjs/log_levels.d.ts +4 -5
  10. package/cjs/log_levels.d.ts.map +1 -1
  11. package/cjs/log_store.d.ts +4 -5
  12. package/cjs/log_store.d.ts.map +1 -1
  13. package/cjs/log_store.js +7 -7
  14. package/cjs/log_store.js.map +1 -1
  15. package/cjs/logger.d.ts +1 -2
  16. package/cjs/logger.d.ts.map +1 -1
  17. package/cjs/memory.d.ts +5 -6
  18. package/cjs/memory.d.ts.map +1 -1
  19. package/cjs/memory.js +4 -4
  20. package/cjs/memory.js.map +1 -1
  21. package/cjs/platform.browser.d.ts +2 -3
  22. package/cjs/platform.browser.d.ts.map +1 -1
  23. package/cjs/platform.browser.js +2 -2
  24. package/cjs/platform.browser.js.map +1 -1
  25. package/cjs/platform.d.ts +2 -3
  26. package/cjs/platform.d.ts.map +1 -1
  27. package/cjs/platform.js +2 -2
  28. package/cjs/platform.js.map +1 -1
  29. package/cjs/record.d.ts +9 -0
  30. package/cjs/record.d.ts.map +1 -0
  31. package/cjs/record.js +15 -0
  32. package/cjs/record.js.map +1 -0
  33. package/cjs/standard_log.ctx.d.ts +1 -2
  34. package/cjs/standard_log.ctx.d.ts.map +1 -1
  35. package/cjs/standard_log.ctx.js +1 -1
  36. package/cjs/standard_log.ctx.js.map +1 -1
  37. package/cjs/standard_log.d.ts +7 -8
  38. package/cjs/standard_log.d.ts.map +1 -1
  39. package/cjs/standard_log.js +4 -3
  40. package/cjs/standard_log.js.map +1 -1
  41. package/cjs/standard_log.testing.d.ts +3 -4
  42. package/cjs/standard_log.testing.d.ts.map +1 -1
  43. package/cjs/types.d.ts +20 -18
  44. package/cjs/types.d.ts.map +1 -1
  45. package/dist/standard-log.esm.js +15 -31
  46. package/dist/standard-log.esm.js.map +1 -1
  47. package/dist/standard-log.iife.js +15 -31
  48. package/dist/standard-log.iife.js.map +1 -1
  49. package/esm/console.d.ts +5 -6
  50. package/esm/console.d.ts.map +1 -1
  51. package/esm/console.js +1 -1
  52. package/esm/console.js.map +1 -1
  53. package/esm/errors.d.ts +2 -3
  54. package/esm/errors.d.ts.map +1 -1
  55. package/esm/formatter.d.ts +5 -6
  56. package/esm/formatter.d.ts.map +1 -1
  57. package/esm/log_levels.d.ts +4 -5
  58. package/esm/log_levels.d.ts.map +1 -1
  59. package/esm/log_store.d.ts +4 -5
  60. package/esm/log_store.d.ts.map +1 -1
  61. package/esm/log_store.js +4 -4
  62. package/esm/log_store.js.map +1 -1
  63. package/esm/logger.d.ts +1 -2
  64. package/esm/logger.d.ts.map +1 -1
  65. package/esm/memory.d.ts +5 -6
  66. package/esm/memory.d.ts.map +1 -1
  67. package/esm/memory.js +1 -1
  68. package/esm/memory.js.map +1 -1
  69. package/esm/platform.browser.d.ts +2 -3
  70. package/esm/platform.browser.d.ts.map +1 -1
  71. package/esm/platform.browser.js +1 -1
  72. package/esm/platform.browser.js.map +1 -1
  73. package/esm/platform.d.ts +2 -3
  74. package/esm/platform.d.ts.map +1 -1
  75. package/esm/platform.js +1 -1
  76. package/esm/platform.js.map +1 -1
  77. package/esm/record.d.ts +9 -0
  78. package/esm/record.d.ts.map +1 -0
  79. package/esm/record.js +14 -0
  80. package/esm/record.js.map +1 -0
  81. package/esm/standard_log.ctx.d.ts +1 -2
  82. package/esm/standard_log.ctx.d.ts.map +1 -1
  83. package/esm/standard_log.ctx.js +1 -1
  84. package/esm/standard_log.ctx.js.map +1 -1
  85. package/esm/standard_log.d.ts +7 -8
  86. package/esm/standard_log.d.ts.map +1 -1
  87. package/esm/standard_log.js +2 -1
  88. package/esm/standard_log.js.map +1 -1
  89. package/esm/standard_log.testing.d.ts +3 -4
  90. package/esm/standard_log.testing.d.ts.map +1 -1
  91. package/esm/types.d.ts +20 -18
  92. package/esm/types.d.ts.map +1 -1
  93. package/package.json +7 -7
  94. package/ts/console.ts +1 -1
  95. package/ts/log_store.ts +4 -6
  96. package/ts/memory.ts +1 -1
  97. package/ts/platform.browser.ts +1 -1
  98. package/ts/platform.ts +1 -1
  99. package/ts/record.ts +9 -0
  100. package/ts/standard_log.ctx.ts +1 -1
  101. package/ts/standard_log.ts +2 -1
  102. package/ts/types.ts +5 -3
@@ -2,7 +2,7 @@ import { LogMethodNames, StandardLogOptions } from "./types.js";
2
2
  import { MemoryLogReporter } from "./memory.js";
3
3
  import { StandardLog } from "./standard_log.js";
4
4
  //#region ts/standard_log.testing.d.ts
5
- type StandardLogForTestOptions<N extends string = LogMethodNames> = StandardLogOptions<N> & {
5
+ export type StandardLogForTestOptions<N extends string = LogMethodNames> = StandardLogOptions<N> & {
6
6
  /**
7
7
  * Send the logs to console for easy debugging.
8
8
  *
@@ -10,10 +10,9 @@ type StandardLogForTestOptions<N extends string = LogMethodNames> = StandardLogO
10
10
  */
11
11
  emitLog?: boolean;
12
12
  };
13
- type StandardLogForTest<N extends string = LogMethodNames> = StandardLog<N> & {
13
+ export type StandardLogForTest<N extends string = LogMethodNames> = StandardLog<N> & {
14
14
  reporter: MemoryLogReporter;
15
15
  };
16
- declare function createStandardLogForTest<N extends string = LogMethodNames>(options?: StandardLogForTestOptions<N>): StandardLogForTest<N>;
16
+ export declare function createStandardLogForTest<N extends string = LogMethodNames>(options?: StandardLogForTestOptions<N>): StandardLogForTest<N>;
17
17
  //#endregion
18
- export { StandardLogForTest, StandardLogForTestOptions, createStandardLogForTest };
19
18
  //# sourceMappingURL=standard_log.testing.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"standard_log.testing.d.ts","names":[],"sources":["../ts/standard_log.testing.ts"],"mappings":";;;;KAMY,0BAA0B,mBAAmB,kBAAkB,mBAAmB;;;;;;EAM7F;;KAGW,mBAAmB,mBAAmB,kBAAkB,YAAY;EAC/E,UAAU;;iBAGK,yBAAyB,mBAAmB,gBAC3D,UAAS,0BAA0B,KACjC,mBAAmB"}
1
+ {"version":3,"file":"standard_log.testing.d.ts","names":[],"sources":["../ts/standard_log.testing.ts"],"mappings":";;;;YAMY,0BAA0B,mBAAmB,kBAAkB,mBAAmB;;;;;;EAM7F;;YAGW,mBAAmB,mBAAmB,kBAAkB,YAAY;EAC/E,UAAU;;wBAGK,yBAAyB,mBAAmB,gBAC3D,UAAS,0BAA0B,KACjC,mBAAmB"}
package/cjs/types.d.ts CHANGED
@@ -1,6 +1,5 @@
1
- import { StackTraceMeta } from "@just-func/types";
2
1
  //#region ts/types.d.ts
3
- type StandardLogOptions<CustomLevelNames extends string = LogMethodNames> = {
2
+ export type StandardLogOptions<CustomLevelNames extends string = LogMethodNames> = {
4
3
  /**
5
4
  * A map of custom log levels.
6
5
  *
@@ -19,11 +18,15 @@ type StandardLogOptions<CustomLevelNames extends string = LogMethodNames> = {
19
18
  logLevel?: number;
20
19
  reporters?: LogReporter[];
21
20
  };
22
- interface LoggerOptions extends StackTraceMeta {
21
+ export interface LoggerOptions {
22
+ /**
23
+ * Stack start function: the stack trace is adjusted to start from this function.
24
+ */
25
+ ssf?: (...args: any[]) => any;
23
26
  level?: number;
24
27
  writeTo?: LogReporter | ReporterFilter;
25
28
  }
26
- type Logger<N extends string = LogMethodNames> = {
29
+ export type Logger<N extends string = LogMethodNames> = {
27
30
  readonly id: string;
28
31
  /**
29
32
  * Logger local log level.
@@ -43,17 +46,17 @@ type Logger<N extends string = LogMethodNames> = {
43
46
  /**
44
47
  * Names of the standard log methods.
45
48
  */
46
- type LogMethodNames = 'emergency' | 'alert' | 'critical' | 'error' | 'warn' | 'notice' | 'info' | 'debug' | 'trace' | 'planck';
47
- type LogEntry = {
49
+ export type LogMethodNames = 'emergency' | 'alert' | 'critical' | 'error' | 'warn' | 'notice' | 'info' | 'debug' | 'trace' | 'planck';
50
+ export type LogEntry = {
48
51
  id: string;
49
52
  level: number;
50
53
  args: any[];
51
54
  timestamp: Date;
52
55
  };
53
- type LogMethod = (...args: any[]) => void;
54
- type LogFunction = (log: LogMethod, logLevel: number) => string | undefined | void;
55
- type ReporterFilter = string | RegExp | ((reporterId: string) => boolean);
56
- interface StandardLogInstance<N extends string = LogMethodNames> {
56
+ export type LogMethod = (...args: any[]) => void;
57
+ export type LogFunction = (log: LogMethod, logLevel: number) => string | undefined | void;
58
+ export type ReporterFilter = string | RegExp | ((reporterId: string) => boolean);
59
+ export interface StandardLogInstance<N extends string = LogMethodNames> {
57
60
  /**
58
61
  * The current log level.
59
62
  */
@@ -94,16 +97,16 @@ interface StandardLogInstance<N extends string = LogMethodNames> {
94
97
  * Depends on the reporter, it can expect a different return type.
95
98
  * By default the return type is `any[]` which the `console` accepts.
96
99
  */
97
- type LogFormatter<T = any[]> = (entry: LogEntry) => T;
100
+ export type LogFormatter<T = any[]> = (entry: LogEntry) => T;
98
101
  /**
99
102
  * Determines whether the entry should be written.
100
103
  */
101
- type LogFilter = (entry: LogEntry) => boolean;
102
- type LogLevelEntry = {
104
+ export type LogFilter = (entry: LogEntry) => boolean;
105
+ export type LogLevelEntry = {
103
106
  name: string;
104
107
  level: number;
105
108
  };
106
- interface LogReporter<T = any> {
109
+ export interface LogReporter<T = any> {
107
110
  readonly id: string;
108
111
  /**
109
112
  * Specifies the formatter to be used by the reporter.
@@ -121,7 +124,7 @@ interface LogReporter<T = any> {
121
124
  readonly isConsoleReporter?: boolean;
122
125
  write(entry: LogEntry): void;
123
126
  }
124
- type LogReporterOptions<T = any> = {
127
+ export type LogReporterOptions<T = any> = {
125
128
  id?: string;
126
129
  /**
127
130
  * Specifies the formatter to be used by the reporter.
@@ -133,13 +136,12 @@ type LogReporterOptions<T = any> = {
133
136
  */
134
137
  filter?: LogFilter;
135
138
  };
136
- type LogLevel = number;
137
- interface ConsoleLike {
139
+ export type LogLevel = number;
140
+ export interface ConsoleLike {
138
141
  debug(...args: any[]): void;
139
142
  info(...args: any[]): void;
140
143
  warn(...args: any[]): void;
141
144
  error(...args: any[]): void;
142
145
  }
143
146
  //#endregion
144
- export { ConsoleLike, LogEntry, LogFilter, LogFormatter, LogFunction, LogLevel, LogLevelEntry, LogMethod, LogMethodNames, LogReporter, LogReporterOptions, Logger, LoggerOptions, ReporterFilter, StandardLogInstance, StandardLogOptions };
145
147
  //# sourceMappingURL=types.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","names":[],"sources":["../ts/types.ts"],"mappings":";;KAEY,mBAAmB,kCAAkC;;;;;;;;;;;;;;;EAehE,eAAe,OAAO;EACtB;EACA,YAAY;;UAGI,sBAAsB;EACtC;EACA,UAAU,cAAc;;KAGb,OAAO,mBAAmB;WAC5B;;;;EAIT;;;;;EAKA,SAAS;EACT,GAAG,gBAAgB,GAAG,aAAa;;;;EAInC,MAAM,OAAO;OACP,KAAK,IAAI;;;;KAKJ;KAYA;EACX;EACA;EAEA;EACA,WAAW;;KAGA,gBAAgB;KAEhB,eAAe,KAAK,WAAW;KAE/B,0BAA0B,WAAW;UAEhC,oBAAoB,mBAAmB;;;;EAIvD;;;;EAIA,eAAe;;;;EAIf,WAAW,MAAM;;;;;;;;;;EAUjB,UAAU,YAAY,UAAU,gBAAgB,OAAO,IAAI;;;;;;;;;;;;EAY3D,oBAAoB,YAAY,UAAU,gBAAgB,OAAO,IAAI;;;;;;;KAQ1D,aAAa,cAAc,OAAO,aAAa;;;;KAK/C,aAAa,OAAO;KAEpB;EAAkB;EAAc;;UAE3B,YAAY;WACnB;;;;;WAKA,WAAW,aAAa;;;;WAIxB,SAAS;;;;;WAKT;EACT,MAAM,OAAO;;KAGF,mBAAmB;EAC9B;;;;;EAKA,YAAY,aAAa;;;;EAIzB,SAAS;;KAGE;UAEK;EAChB,SAAS;EACT,QAAQ;EACR,QAAQ;EACR,SAAS"}
1
+ {"version":3,"file":"types.d.ts","names":[],"sources":["../ts/types.ts"],"mappings":";YAAY,mBAAmB,kCAAkC;;;;;;;;;;;;;;;EAehE,eAAe,OAAO;EACtB;EACA,YAAY;;iBAGI;;;;EAIhB,UAAU;EACV;EACA,UAAU,cAAc;;YAGb,OAAO,mBAAmB;WAC5B;;;;EAIT;;;;;EAKA,SAAS;EACT,GAAG,gBAAgB,GAAG,aAAa;;;;EAInC,MAAM,OAAO;OACP,KAAK,IAAI;;;;YAKJ;YAYA;EACX;EACA;EAEA;EACA,WAAW;;YAGA,gBAAgB;YAEhB,eAAe,KAAK,WAAW;YAE/B,0BAA0B,WAAW;iBAEhC,oBAAoB,mBAAmB;;;;EAIvD;;;;EAIA,eAAe;;;;EAIf,WAAW,MAAM;;;;;;;;;;EAUjB,UAAU,YAAY,UAAU,gBAAgB,OAAO,IAAI;;;;;;;;;;;;EAY3D,oBAAoB,YAAY,UAAU,gBAAgB,OAAO,IAAI;;;;;;;YAQ1D,aAAa,cAAc,OAAO,aAAa;;;;YAK/C,aAAa,OAAO;YAEpB;EAAkB;EAAc;;iBAE3B,YAAY;WACnB;;;;;WAKA,WAAW,aAAa;;;;WAIxB,SAAS;;;;;WAKT;EACT,MAAM,OAAO;;YAGF,mBAAmB;EAC9B;;;;;EAKA,YAAY,aAAa;;;;EAIzB,SAAS;;YAGE;iBAEK;EAChB,SAAS;EACT,QAAQ;EACR,QAAQ;EACR,SAAS"}
@@ -21,7 +21,7 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
21
21
  enumerable: true
22
22
  }) : target, mod));
23
23
  //#endregion
24
- //#region ../../node_modules/.pnpm/unpartial@1.0.7/node_modules/unpartial/esm/index.js
24
+ //#region ../../node_modules/.pnpm/unpartial@1.0.8/node_modules/unpartial/esm/index.js
25
25
  function required(source1, source2, source3) {
26
26
  return merge([
27
27
  source1,
@@ -59,33 +59,6 @@ function notNil(value) {
59
59
  return value !== null && value !== void 0;
60
60
  }
61
61
  //#endregion
62
- //#region ../../node_modules/.pnpm/type-plus@8.0.0-beta.10_typescript@7.0.2/node_modules/type-plus/esm/object/mapKey.js
63
- function mapKey(subject, predicate, thisArg) {
64
- return Object.keys(subject).map(function(k, i, a) {
65
- return predicate.apply(this, [
66
- k,
67
- i,
68
- a,
69
- subject
70
- ]);
71
- }, thisArg);
72
- }
73
- //#endregion
74
- //#region ../../node_modules/.pnpm/type-plus@8.0.0-beta.10_typescript@7.0.2/node_modules/type-plus/esm/object/reduceKey.js
75
- function reduceByKey(subject, callbackfn, initialValue) {
76
- return Object.keys(subject).reduce((p, k, i, a) => callbackfn(p, k, i, a, subject), initialValue);
77
- }
78
- /**
79
- * @deprecated renamed to reduceByKey
80
- */
81
- const reduceKey = reduceByKey;
82
- //#endregion
83
- //#region ../../node_modules/.pnpm/type-plus@8.0.0-beta.10_typescript@7.0.2/node_modules/type-plus/esm/object/record.js
84
- function record(value) {
85
- const r = Object.create(null);
86
- return value ? Object.assign(r, value) : r;
87
- }
88
- //#endregion
89
62
  //#region ts/log_levels.ts
90
63
  var import_ms = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
91
64
  /**
@@ -348,6 +321,17 @@ function consoleFormatter({ args }) {
348
321
  return args;
349
322
  }
350
323
  //#endregion
324
+ //#region ts/record.ts
325
+ /**
326
+ * Creates a prototype-less object, optionally seeded with `value`.
327
+ *
328
+ * Inlined from `type-plus` so the CJS build does not `require()` the ESM-only `type-plus`.
329
+ */
330
+ function record(value) {
331
+ const r = Object.create(null);
332
+ return value ? Object.assign(r, value) : r;
333
+ }
334
+ //#endregion
351
335
  //#region ts/platform.browser.ts
352
336
  const toInspectLogEntry = (e) => e;
353
337
  const polyfill = record();
@@ -763,7 +747,7 @@ function logLevelStore(options) {
763
747
  const customLevels = options.customLevels || record();
764
748
  const store = {
765
749
  customLevels,
766
- customLevelsReverse: reduceByKey(customLevels, (p, k) => {
750
+ customLevelsReverse: Object.keys(customLevels).reduce((p, k) => {
767
751
  p[customLevels[k]] = k;
768
752
  return p;
769
753
  }, {})
@@ -776,13 +760,13 @@ function logLevelStore(options) {
776
760
  return store.customLevels[name] ?? toLogLevel(name);
777
761
  },
778
762
  getAllLevels() {
779
- return reduceKey(logLevels, (result, name) => {
763
+ return Object.keys(logLevels).reduce((result, name) => {
780
764
  if (name !== "none" && name !== "all") result.push({
781
765
  name,
782
766
  level: logLevels[name]
783
767
  });
784
768
  return result;
785
- }, mapKey(store.customLevels, (name) => ({
769
+ }, Object.keys(store.customLevels).map((name) => ({
786
770
  name,
787
771
  level: store.customLevels[name]
788
772
  })));
@@ -1 +1 @@
1
- {"version":3,"file":"standard-log.esm.js","names":["ms"],"sources":["../../../node_modules/.pnpm/unpartial@1.0.7/node_modules/unpartial/esm/index.js","../../../node_modules/.pnpm/type-plus@8.0.0-beta.10_typescript@7.0.2/node_modules/type-plus/esm/object/mapKey.js","../../../node_modules/.pnpm/type-plus@8.0.0-beta.10_typescript@7.0.2/node_modules/type-plus/esm/object/reduceKey.js","../../../node_modules/.pnpm/type-plus@8.0.0-beta.10_typescript@7.0.2/node_modules/type-plus/esm/object/record.js","../../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js","../ts/log_levels.ts","../ts/formatter.ts","../ts/platform.browser.ts","../ts/console.ts","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/typeof.js","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/toPrimitive.js","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/toPropertyKey.js","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/defineProperty.js","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/assertClassBrand.js","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/index.js","../ts/errors.ts","../ts/memory.ts","../ts/log_store.ts","../ts/logger.ts","../ts/standard_log.ctx.ts","../ts/standard_log.ts"],"sourcesContent":["//#region ts/index.ts\nfunction required(source1, source2, source3) {\n\treturn merge([\n\t\tsource1,\n\t\tsource2,\n\t\tsource3\n\t], (p, e) => {\n\t\treturn {\n\t\t\t...p,\n\t\t\t...e\n\t\t};\n\t});\n}\nfunction requiredDeep(source1, source2, source3) {\n\treturn merge([\n\t\tsource1,\n\t\tsource2,\n\t\tsource3\n\t], (p, e) => deepmerge(p, e));\n}\nfunction merge(entries, reducer) {\n\tif (entries[0] === void 0 || entries[0] === null) return entries[0];\n\treturn entries.filter((x) => !!x).reduce(reducer, {});\n}\nfunction deepmerge(source1, source2) {\n\tif (typeof source1 !== \"object\" || source1 === null) return source2 !== void 0 ? source2 : source1;\n\tif (Array.isArray(source1)) {\n\t\tif (Array.isArray(source2)) return source2;\n\t\tif (source2 === void 0) return [...source1];\n\t\treturn [...source1, source2];\n\t}\n\treturn getAllKeys(source1).concat(getAllKeys(source2)).reduce((p, k) => {\n\t\tp[k] = deepmerge(source1[k], source2 && source2[k]);\n\t\treturn p;\n\t}, {});\n}\nfunction getAllKeys(subject, internal = false) {\n\tif (typeof subject !== \"object\") return [];\n\tconst propertyNames = Object.getOwnPropertyNames(subject);\n\tconst keys = internal ? propertyNames.filter((n) => n !== \"constructor\") : propertyNames;\n\tconst proto = Object.getPrototypeOf(subject);\n\treturn proto !== Object.prototype ? keys.concat(getAllKeys(proto, true)) : keys;\n}\nfunction unpartial(s1, s2, s3) {\n\tif (s1 === void 0 || s1 === null) return s1;\n\treturn [\n\t\ts1,\n\t\ts2,\n\t\ts3\n\t].filter(notNil).reduce((p, s) => ({\n\t\t...p,\n\t\t...trimNilProps(s)\n\t}), {});\n}\nfunction trimNilProps(value) {\n\treturn Object.keys(value).reduce((p, k) => {\n\t\tif (notNil(value[k])) p[k] = value[k];\n\t\treturn p;\n\t}, {});\n}\nfunction notNil(value) {\n\treturn value !== null && value !== void 0;\n}\nfunction unpartialRecursively(arg1, arg2, arg3) {\n\treturn requiredDeep(arg1, arg2, arg3);\n}\n//#endregion\nexport { required, requiredDeep, unpartial, unpartialRecursively };\n\n//# sourceMappingURL=index.js.map","export function mapKey(subject, predicate, thisArg) {\n return Object.keys(subject).map(function (k, i, a) {\n return predicate.apply(this, [k, i, a, subject]);\n }, thisArg);\n}\n//# sourceMappingURL=mapKey.js.map","export function reduceByKey(subject, callbackfn, initialValue) {\n return Object.keys(subject).reduce((p, k, i, a) => callbackfn(p, k, i, a, subject), initialValue);\n}\n/**\n * @deprecated renamed to reduceByKey\n */\nexport const reduceKey = reduceByKey;\n//# sourceMappingURL=reduceKey.js.map","export function record(value) {\n const r = Object.create(null);\n return (value ? Object.assign(r, value) : r);\n}\n//# sourceMappingURL=record.js.map","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","export const logLevels = {\n\t/**\n\t * none: 0\n\t */\n\tnone: 0 as const,\n\t/**\n\t * emergency: 100\n\t *\n\t * emergency -> alert\n\t */\n\temergency: 100 as const,\n\t/**\n\t * alert: 200\n\t *\n\t * emergency -> alert -> critical\n\t */\n\talert: 200 as const,\n\t/**\n\t * critical: 300\n\t *\n\t * alert -> critical -> error\n\t */\n\tcritical: 300 as const,\n\t/**\n\t * error: 400\n\t *\n\t * critical -> error -> warn\n\t */\n\terror: 400 as const,\n\t/**\n\t * warn: 500\n\t *\n\t * error -> warn -> notice\n\t */\n\twarn: 500 as const,\n\t/**\n\t * notice: 600\n\t *\n\t * warn -> notice -> info\n\t */\n\tnotice: 600 as const,\n\t/**\n\t * info: 700\n\t *\n\t * notice -> info -> debug\n\t */\n\tinfo: 700 as const,\n\t/**\n\t * debug: 800\n\t *\n\t * info -> debug -> trace\n\t */\n\tdebug: 800 as const,\n\t/**\n\t * trace: 900\n\t *\n\t * debug -> trace -> planck\n\t */\n\ttrace: 900 as const,\n\t/**\n\t * planck: Infinity\n\t * `planck unit` is a very small unit <https://en.wikipedia.org/wiki/Planck_units>.\n\t *\n\t * trace -> planck\n\t */\n\tplanck: Number.POSITIVE_INFINITY,\n\t/**\n\t * all: Infinity\n\t */\n\tall: Number.POSITIVE_INFINITY\n}\n\n/**\n * Convert default log level value to log level name.\n */\nexport function toLogLevelName(level: number) {\n\tif (level <= 100) return 'emergency'\n\tif (level <= 200) return 'alert'\n\tif (level <= 300) return 'critical'\n\tif (level <= 400) return 'error'\n\tif (level <= 500) return 'warn'\n\tif (level <= 600) return 'notice'\n\tif (level <= 700) return 'info'\n\tif (level <= 800) return 'debug'\n\tif (level <= 900) return 'trace'\n\treturn 'planck'\n}\n\n/**\n * Convert default log level name to log level value.\n */\nexport function toLogLevel(name: string): number | undefined {\n\treturn (logLevels as any)[name.toLocaleLowerCase()]\n}\n\nexport const DEFAULT_LOG_METHOD_NAMES: string[] = [\n\t'emergency',\n\t'alert',\n\t'critical',\n\t'error',\n\t'warn',\n\t'notice',\n\t'info',\n\t'debug',\n\t'trace',\n\t'planck'\n]\n","import ms from 'ms'\nimport { toLogLevelName } from './log_levels.js'\nimport type { LogEntry } from './types.js'\n\nexport type TimestampFormat = 'none' | 'iso' | 'elapsed'\n\nexport function createTimestampFormatter(format: TimestampFormat): (timestamp: Date) => string | undefined {\n\tswitch (format) {\n\t\tcase 'none':\n\t\t\treturn (_timestamp: Date) => undefined\n\t\tcase 'iso':\n\t\t\treturn (timestamp: Date) => timestamp.toISOString()\n\t\tcase 'elapsed': {\n\t\t\tlet lastTick: number\n\t\t\treturn (timestamp: Date) => {\n\t\t\t\tconst newTick = timestamp.getTime()\n\t\t\t\tconst result = ms(lastTick === undefined ? 0 : newTick - lastTick)\n\t\t\t\tlastTick = newTick\n\t\t\t\treturn result\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport function formatLogLevel(level: number) {\n\treturn `(${toLogLevelName(level).toUpperCase()})`\n}\n\n/**\n * Formats log entry as plain text with the following format:\n * `timestamp id level ...args`\n *\n * This is typically useful for writing logs to file\n */\nexport function plainLogFormatter({ id, level, args, timestamp }: LogEntry) {\n\treturn [timestamp.toISOString(), id, formatLogLevel(level), ...args]\n}\n\n/**\n * Formats log entry like default console log.\n */\nexport function consoleFormatter({ args }: LogEntry) {\n\treturn args\n}\n","import { record } from 'type-plus'\nimport type { ConsoleLike, LogEntry } from './types.js'\n\nexport const toInspectLogEntry = (e: LogEntry) => e\n\nexport const polyfill: { console?: ConsoleLike } = record()\n","import { unpartial } from 'type-plus'\nimport { consoleFormatter } from './formatter.js'\nimport { logLevels } from './log_levels.js'\nimport { polyfill } from './platform.js'\nimport type { ConsoleLike, LogEntry, LogFormatter, LogReporter, LogReporterOptions } from './types.js'\n\nexport function toConsoleMethod(level: number) {\n\tswitch (true) {\n\t\t// edge case in case none is somehow written\n\t\tcase level <= 0:\n\t\t\treturn 'debug'\n\t\tcase level <= logLevels.error:\n\t\t\treturn 'error'\n\t\tcase level <= logLevels.warn:\n\t\t\treturn 'warn'\n\t\tcase level <= logLevels.info:\n\t\t\treturn 'info'\n\t\tdefault:\n\t\t\treturn 'debug'\n\t}\n}\n\n// istanbul ignore next\n/* eslint-disable no-console */\nfunction buildPolyfillConsole() {\n\t// old phantomjs does not have bind function\n\tconst hasBind = !!console.log.bind as boolean\n\tif (hasBind) {\n\t\treturn {\n\t\t\t// the `typeof` guards against IE where `console.log.apply()`\n\t\t\t// results in error `Object doesn't support property or method 'apply'`\n\t\t\tdebug: (typeof console.info === 'function' ? console.debug : console.log).bind(console),\n\t\t\tinfo: (typeof console.info === 'function' ? console.info : console.log).bind(console),\n\t\t\twarn: (typeof console.warn === 'function' ? console.warn : console.log).bind(console),\n\t\t\terror: (typeof console.error === 'function' ? console.error : console.log).bind(console)\n\t\t}\n\t}\n\treturn {\n\t\tdebug: buildFn(typeof console.debug === 'function' ? 'debug' : 'log'),\n\t\tinfo: buildFn(typeof console.info === 'function' ? 'info' : 'log'),\n\t\twarn: buildFn(typeof console.warn === 'function' ? 'warn' : 'log'),\n\t\terror: buildFn(typeof console.error === 'function' ? 'error' : 'log')\n\t}\n}\n\n// istanbul ignore next\nfunction buildFn(name: 'debug' | 'info' | 'warn' | 'error' | 'log') {\n\treturn (...args: any[]) => {\n\t\tconsole[name](...args)\n\t}\n}\n\nexport type ConsoleLogFormatter = LogFormatter<any[]>\nexport type ConsoleLogReporter = LogReporter<any[]> & { console: ConsoleLike }\nexport type ConsoleLogReporterOptions = LogReporterOptions<any[]>\n\nexport function createConsoleLogReporter(options?: ConsoleLogReporterOptions): ConsoleLogReporter {\n\tconst { id, formatter, filter } = unpartial({ id: 'console', formatter: consoleFormatter }, options)\n\tif (!polyfill.console) polyfill.console = buildPolyfillConsole()\n\n\treturn Object.freeze({\n\t\tid,\n\t\tisConsoleReporter: true,\n\t\tget formatter() {\n\t\t\treturn formatter\n\t\t},\n\t\tget filter() {\n\t\t\treturn filter\n\t\t},\n\t\tconsole: polyfill.console,\n\t\twrite(entry: LogEntry) {\n\t\t\tif (filter && !filter(entry)) return\n\t\t\tconst values = formatter(entry)\n\t\t\tconst method = toConsoleMethod(entry.level)\n\t\t\tthis.console[method](...values)\n\t\t}\n\t})\n}\n","//#region \\0@oxc-project+runtime@0.147.0/helpers/esm/typeof.js\nfunction _typeof(o) {\n\t\"@babel/helpers - typeof\";\n\treturn _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(o) {\n\t\treturn typeof o;\n\t} : function(o) {\n\t\treturn o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n\t}, _typeof(o);\n}\n//#endregion\nexport { _typeof as default };\n","import _typeof from \"./typeof.js\";\n//#region \\0@oxc-project+runtime@0.147.0/helpers/esm/toPrimitive.js\nfunction toPrimitive(t, r) {\n\tif (\"object\" != _typeof(t) || !t) return t;\n\tvar e = t[Symbol.toPrimitive];\n\tif (void 0 !== e) {\n\t\tvar i = e.call(t, r || \"default\");\n\t\tif (\"object\" != _typeof(i)) return i;\n\t\tthrow new TypeError(\"@@toPrimitive must return a primitive value.\");\n\t}\n\treturn (\"string\" === r ? String : Number)(t);\n}\n//#endregion\nexport { toPrimitive as default };\n","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\n//#region \\0@oxc-project+runtime@0.147.0/helpers/esm/toPropertyKey.js\nfunction toPropertyKey(t) {\n\tvar i = toPrimitive(t, \"string\");\n\treturn \"symbol\" == _typeof(i) ? i : i + \"\";\n}\n//#endregion\nexport { toPropertyKey as default };\n","import toPropertyKey from \"./toPropertyKey.js\";\n//#region \\0@oxc-project+runtime@0.147.0/helpers/esm/defineProperty.js\nfunction _defineProperty(e, r, t) {\n\treturn (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n\t\tvalue: t,\n\t\tenumerable: !0,\n\t\tconfigurable: !0,\n\t\twritable: !0\n\t}) : e[r] = t, e;\n}\n//#endregion\nexport { _defineProperty as default };\n","//#region \\0@oxc-project+runtime@0.147.0/helpers/esm/assertClassBrand.js\nfunction _assertClassBrand(e, t, n) {\n\tif (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;\n\tthrow new TypeError(\"Private element is not present on this object\");\n}\n//#endregion\nexport { _assertClassBrand as default };\n","import _defineProperty from \"./_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/defineProperty.js\";\nimport _assertClassBrand from \"./_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/assertClassBrand.js\";\n//#region ts/index.ts\n// istanbul ignore next\nif (!Error.captureStackTrace) Error.captureStackTrace = (error) => {\n\tconst container = /* @__PURE__ */ new Error();\n\tObject.defineProperty(error, \"stack\", {\n\t\tconfigurable: true,\n\t\tget: function() {\n\t\t\tdefineStack(this, container.stack);\n\t\t\treturn container.stack;\n\t\t},\n\t\tset: (stack) => {\n\t\t\tdefineStack(error, stack);\n\t\t}\n\t});\n};\n// istanbul ignore next\nfunction defineStack(target, value) {\n\tObject.defineProperty(target, \"stack\", {\n\t\tconfigurable: true,\n\t\tvalue,\n\t\twritable: true\n\t});\n}\nvar SerializableConverter = class {\n\tconstructor() {\n\t\t_defineProperty(this, \"plugins\", []);\n\t}\n\taddPlugin(plugin) {\n\t\tthis.plugins.unshift(plugin);\n\t}\n\t/**\n\t* Deserialize an `Error` from `Serializable`\n\t*/\n\tfromSerializable(json, options) {\n\t\tconst err = this.deserializeError(json);\n\t\tError.captureStackTrace(err, options?.ssf);\n\t\treturn err;\n\t}\n\tfromSerializableImpl(json) {\n\t\tif (json[\"name\"] === \"AggregateError\") {\n\t\t\tconst { message, errors, ...rest } = json;\n\t\t\t// istanbul ignore next\n\t\t\tif (global.AggregateError) return Object.assign(new AggregateError(errors, message), rest);\n\t\t\t/* v8 ignore next 4 -- fallback for runtimes without AggregateError */\n\t\t\treturn Object.assign(new Error(message), {\n\t\t\t\t...rest,\n\t\t\t\terrors\n\t\t\t});\n\t\t}\n\t\tconst { message, cause, ...rest } = json;\n\t\tconst causeError = cause ? this.deserializeError(cause) : void 0;\n\t\tif (json[\"name\"] === \"Error\") return Object.assign(new Error(message), causeError ? {\n\t\t\t...rest,\n\t\t\tcause: causeError\n\t\t} : rest);\n\t\treturn Object.assign(new IsoError(message, causeError ? { cause: causeError } : void 0), rest);\n\t}\n\tdeserializeError(json) {\n\t\tlet err;\n\t\tfor (const { fromSerializable } of this.plugins) {\n\t\t\terr = fromSerializable(json);\n\t\t\tif (err) break;\n\t\t}\n\t\treturn err || this.fromSerializableImpl(json);\n\t}\n\t/**\n\t* Serialize `Error` to `Serializable`\n\t*/\n\ttoSerializable(err) {\n\t\treturn this.plugins.reduce((p, s) => p || s.toSerializable(err), void 0) || this.toSerializableImpl(err);\n\t}\n\ttoSerializableImpl(err) {\n\t\tif (isAggregateError(err)) return {\n\t\t\t...err,\n\t\t\tname: err.constructor.name,\n\t\t\tmessage: err.message,\n\t\t\terrors: err.errors.map(this.toSerializableImpl)\n\t\t};\n\t\tif (err instanceof Error) {\n\t\t\tconst { message } = err;\n\t\t\tconst cause = err.cause;\n\t\t\treturn cause ? {\n\t\t\t\t...err,\n\t\t\t\tname: err.constructor.name,\n\t\t\t\tmessage,\n\t\t\t\tcause: this.toSerializableImpl(cause)\n\t\t\t} : {\n\t\t\t\t...err,\n\t\t\t\tname: err.constructor.name,\n\t\t\t\tmessage\n\t\t\t};\n\t\t}\n\t\treturn err;\n\t}\n};\nconst getCircularReplacer = () => {\n\tconst seen = /* @__PURE__ */ new WeakSet();\n\treturn (_, value) => {\n\t\tif (typeof value === \"object\" && value !== null) {\n\t\t\tif (seen.has(value)) return;\n\t\t\tseen.add(value);\n\t\t}\n\t\treturn value;\n\t};\n};\n/**\n* Isomorphic Error that works across physical boundary.\n*/\nvar IsoError = class IsoError extends Error {\n\t/**\n\t* Create an IsoError with additional properties without the need to create a new class.\n\t* @param props properties of the IsoError\n\t*/\n\tstatic create(props) {\n\t\tconst { message, cause, ...rest } = props;\n\t\tconst err = new IsoError(message, {\n\t\t\tcause,\n\t\t\tssf: IsoError.create\n\t\t});\n\t\treturn Object.assign(err, rest);\n\t}\n\tstatic stringify(err) {\n\t\treturn this.serialize(err);\n\t}\n\tstatic serialize(err) {\n\t\treturn JSON.stringify(this.toSerializable(err), getCircularReplacer());\n\t}\n\tstatic toSerializable(err) {\n\t\treturn this.converter.toSerializable(err);\n\t}\n\t/**\n\t* @type P Additional properties of the IsoError\n\t* @param text Json representation of a IsoError\n\t*/\n\tstatic parse(text) {\n\t\tconst json = JSON.parse(text);\n\t\treturn this.converter.fromSerializable(json, { ssf: IsoError.parse });\n\t}\n\t/**\n\t* @type P Additional properties of the IsoError\n\t* @param text Json representation of a IsoError\n\t*/\n\tstatic deserialize(text) {\n\t\tconst json = JSON.parse(text);\n\t\treturn this.converter.fromSerializable(json, { ssf: IsoError.deserialize });\n\t}\n\tstatic fromSerializable(json) {\n\t\treturn this.converter.fromSerializable(json, { ssf: IsoError.fromSerializable });\n\t}\n\t/**\n\t* returns the error message including the error causes.\n\t*/\n\tstatic trace(err) {\n\t\tconst messages = [];\n\t\tif (err instanceof ModuleError) messages.push(`${err.name}(${err.module}): ${err.message}`);\n\t\telse if (err instanceof Error) messages.push(`${err.name}: ${err.message}`);\n\t\tif (isAggregateError(err)) err.errors.forEach((e) => {\n\t\t\tmessages.push(...this.trace(e).split(\"\\n\").map((s) => ` ${s}`));\n\t\t});\n\t\tif (err instanceof Error) {\n\t\t\tif (_assertClassBrand(IsoError, this, _hasCause).call(this, err)) messages.push(...this.trace(err.cause).split(\"\\n\").map((s) => \" \" + s));\n\t\t} else messages.push(typeof err === \"string\" ? err : JSON.stringify(err));\n\t\treturn messages.join(\"\\n\");\n\t}\n\tstatic addPlugin(plugin) {\n\t\tthis.converter.addPlugin(plugin);\n\t}\n\tconstructor(message, options) {\n\t\tsuper(message);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Name of the error\n\t\t\t*/\n\t\t\t\"name\",\n\t\t\tvoid 0\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Error cause\n\t\t\t*/\n\t\t\t\"cause\",\n\t\t\tvoid 0\n\t\t);\n\t\tconst actualProto = new.target.prototype;\n\t\tthis.name = actualProto.constructor.name;\n\t\t// istanbul ignore next\n\t\tif (Object.setPrototypeOf) Object.setPrototypeOf(this, actualProto);\n\t\telse this.__proto__ = actualProto;\n\t\tif (options?.cause) this.cause = _toIsoError.call(IsoError, options.cause);\n\t\tif (options?.ssf) Error.captureStackTrace(this, options.ssf);\n\t}\n\ttoString() {\n\t\treturn IsoError.serialize(this);\n\t}\n\ttrace() {\n\t\treturn IsoError.trace(this);\n\t}\n};\nfunction _hasCause(x) {\n\treturn !!x.cause;\n}\nfunction _toIsoError(err) {\n\treturn Object.assign(err, { name: err.name ?? err.constructor.name });\n}\n_defineProperty(IsoError, \"converter\", new SerializableConverter());\n/**\n* An IsoError with a module property.\n*/\nvar ModuleError = class extends IsoError {\n\t/**\n\t* @param module The module that defines this error.\n\t*/\n\tconstructor(module, message, options) {\n\t\tsuper(message, options);\n\t\tthis.module = module;\n\t}\n};\nfunction isAggregateError(error) {\n\treturn error instanceof Error && Array.isArray(error.errors);\n}\n//#endregion\nexport { IsoError, ModuleError, SerializableConverter, isAggregateError };\n\n//# sourceMappingURL=index.js.map","import { type IsoError, ModuleError } from 'iso-error'\n\n/**\n * @deprecated No longer used since 11.2.0\n */\nexport class StandardLogError extends ModuleError {\n\tconstructor(description: string, options?: IsoError.Options) {\n\t\tsuper('standard-log', description, options)\n\t}\n}\n\n/**\n * @deprecated no longer used since 11.2.0\n */\nexport class InvalidId extends StandardLogError {\n\tconstructor(\n\t\tpublic id: string,\n\t\toptions?: IsoError.Options\n\t) {\n\t\tsuper(`logger id only supports alphanumeric, unicode characters, and [:_-.]. Received ${id}`, options)\n\t}\n}\n","import { required, unpartial } from 'type-plus'\nimport { createConsoleLogReporter } from './console.js'\nimport { formatLogLevel } from './formatter.js'\nimport { toInspectLogEntry } from './platform.js'\nimport type { LogEntry, LogFormatter, LogReporter, LogReporterOptions } from './types.js'\n\nexport type MemoryLogReporter = LogReporter<LogEntry> & {\n\tlogs: LogEntry[]\n\t/**\n\t * Gets a simple log message for testing.\n\t * The message only contains arguments for each log entry.\n\t */\n\tgetLogMessage(): string\n\tgetLogMessages(): string[]\n\tgetLogMessageWithLevel(): string\n\tgetLogMessagesWithLevel(): string[]\n\tgetLogMessagesWithIdAndLevel(): string[]\n\temit(): void\n}\n\nexport type MemoryLogFormatter = LogFormatter<LogEntry>\n\nexport function toMessageWithLevel(logs: LogEntry[]) {\n\treturn (\n\t\tlogs\n\t\t\t.map(toInspectLogEntry)\n\t\t\t.map(log => `${formatLogLevel(log.level)} ${log.args.join(' ')}`)\n\t\t\t.join('\\n')\n\t\t\t// if it has more than this log,\n\t\t\t// we assume it is running under tests,\n\t\t\t// and remove this log to simplify testing.\n\t\t\t.replace(/^\\(WARN\\) already configured for test, ignoring config\\(\\) call\\n/, '')\n\t)\n}\n\nexport function createMemoryLogReporter(options?: LogReporterOptions<LogEntry>): MemoryLogReporter {\n\treturn Object.freeze(buildMemoryReporter(unpartial({ id: 'memory' }, options)))\n}\n\nfunction buildMemoryReporter(options?: LogReporterOptions<LogEntry>) {\n\tconst { id, formatter, filter } = required({ id: 'memory', formatter: (e: LogEntry) => e }, options)\n\tconst logs: LogEntry[] = []\n\treturn {\n\t\tid,\n\t\tget formatter() {\n\t\t\treturn formatter\n\t\t},\n\t\tget filter() {\n\t\t\treturn filter\n\t\t},\n\t\tlogs,\n\t\twrite(entry: LogEntry) {\n\t\t\tif (filter && !filter(entry)) return\n\t\t\tlogs.push(formatter(entry))\n\t\t},\n\t\tgetLogMessage() {\n\t\t\treturn this.getLogMessages().join('\\n')\n\t\t},\n\t\tgetLogMessages() {\n\t\t\treturn logs.map(toInspectLogEntry).map(log => log.args.join(' '))\n\t\t},\n\t\tgetLogMessagesWithLevel() {\n\t\t\treturn logs.map(toInspectLogEntry).map(log => `${formatLogLevel(log.level)} ${log.args.join(' ')}`)\n\t\t},\n\t\tgetLogMessagesWithIdAndLevel() {\n\t\t\treturn logs\n\t\t\t\t.map(toInspectLogEntry)\n\t\t\t\t.map(log => `${log.id} ${formatLogLevel(log.level)} ${log.args.join(' ')}`)\n\t\t},\n\t\tgetLogMessageWithLevel() {\n\t\t\treturn toMessageWithLevel(logs)\n\t\t},\n\t\t/**\n\t\t * emit the saved log to console for easy debugging\n\t\t */\n\t\temit() {\n\t\t\tconst reporter = createConsoleLogReporter()\n\t\t\tlogs.forEach(l => reporter.write(l))\n\t\t}\n\t}\n}\n\nexport function createMemoryWithConsoleLogReporter(\n\toptions?: LogReporterOptions<LogEntry>\n): MemoryLogReporter {\n\treturn Object.freeze(\n\t\tObject.assign(buildMemoryReporter(unpartial({ id: 'memory-with-console' }, options)), {\n\t\t\tisConsoleReporter: true\n\t\t})\n\t)\n}\n","import { mapKey, record, reduceByKey, reduceKey } from 'type-plus'\nimport { createConsoleLogReporter } from './console.js'\nimport { logLevels, toLogLevel, toLogLevelName } from './log_levels.js'\nimport type { Logger, LogLevel, LogMethodNames, LogReporter, StandardLogOptions } from './types.js'\n\nexport function createLogStore<N extends string = LogMethodNames>(\n\toptions: Required<StandardLogOptions<N>>\n): LogStore {\n\treturn {\n\t\tloggers: record(),\n\t\tnonConsoleLoggers: record(),\n\t\treporters: options.reporters || [createConsoleLogReporter()],\n\t\tlogLevel: options.logLevel,\n\t\tlogLevelStore: logLevelStore(options)\n\t}\n}\n\nexport interface LogStore {\n\tloggers: Record<string, Logger>\n\tnonConsoleLoggers: Record<string, Logger>\n\treporters: LogReporter[]\n\tlogLevel: LogLevel\n\tlogLevelStore: ReturnType<typeof logLevelStore>\n}\n\nexport interface LogLevelStoreOptions {\n\tcustomLevels?: Record<string, number>\n}\n\nexport function logLevelStore(options: LogLevelStoreOptions) {\n\tconst customLevels = options.customLevels || record()\n\n\tconst store = {\n\t\tcustomLevels,\n\t\tcustomLevelsReverse: reduceByKey(\n\t\t\tcustomLevels,\n\t\t\t(p, k) => {\n\t\t\t\tp[customLevels[k]] = k\n\t\t\t\treturn p\n\t\t\t},\n\t\t\t{} as Record<number, string>\n\t\t)\n\t}\n\treturn {\n\t\tgetName(level: number) {\n\t\t\treturn store.customLevelsReverse[level] ?? toLogLevelName(level)\n\t\t},\n\t\tgetLevel(name: string) {\n\t\t\treturn store.customLevels[name] ?? toLogLevel(name)\n\t\t},\n\t\tgetAllLevels() {\n\t\t\treturn reduceKey(\n\t\t\t\tlogLevels,\n\t\t\t\t(result, name) => {\n\t\t\t\t\tif (name !== 'none' && name !== 'all') result.push({ name, level: logLevels[name] })\n\n\t\t\t\t\treturn result\n\t\t\t\t},\n\t\t\t\tmapKey(store.customLevels, name => ({ name, level: store.customLevels[name] }))\n\t\t\t)\n\t\t}\n\t}\n}\n","import { logLevels } from './log_levels.js'\nimport type { LogStore } from './log_store.js'\nimport type {\n\tLogEntry,\n\tLogFunction,\n\tLogger,\n\tLoggerOptions,\n\tLogLevel,\n\tLogMethodNames,\n\tLogReporter\n} from './types.js'\n\nexport function createLogger<N extends string = LogMethodNames>(\n\tstore: LogStore,\n\tid: string,\n\toptions?: LoggerOptions\n): Logger<N | LogMethodNames> {\n\tid = sanitizeId(id)\n\tconst writeTo = options?.writeTo ?? (() => true)\n\tconst [filter, reporters]: [(reporterId: string) => boolean, LogReporter[]] =\n\t\ttypeof writeTo === 'string'\n\t\t\t? [id => id === writeTo, store.reporters]\n\t\t\t: writeTo instanceof RegExp\n\t\t\t\t? [id => writeTo.test(id), store.reporters]\n\t\t\t\t: typeof writeTo === 'function'\n\t\t\t\t\t? [writeTo, store.reporters]\n\t\t\t\t\t: [() => true, [writeTo]]\n\n\tfunction write(entry: LogEntry) {\n\t\twriteToReporters(reporters, entry, filter)\n\t}\n\n\tconst logger = {\n\t\tlevel: options?.level,\n\t\twrite\n\t} as any\n\n\tObject.defineProperties(logger, {\n\t\tid: { value: id, writable: false },\n\t\tcount: {\n\t\t\twritable: false,\n\t\t\tvalue: (\n\t\t\t\tcounter =>\n\t\t\t\t(...args: any[]): void => {\n\t\t\t\t\tif (shouldLog(store, logLevels.debug, logger.level))\n\t\t\t\t\t\twrite({\n\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\tlevel: logLevels.debug,\n\t\t\t\t\t\t\targs: [++counter, ...args],\n\t\t\t\t\t\t\ttimestamp: new Date()\n\t\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t)(0)\n\t\t},\n\t\ton: {\n\t\t\twritable: false,\n\t\t\tvalue: (level: number | N | LogMethodNames, logFn: LogFunction) => {\n\t\t\t\tconst logLevel = typeof level === 'string' ? store.logLevelStore.getLevel(level)! : level\n\t\t\t\tif (shouldLog(store, logLevel, logger.level)) {\n\t\t\t\t\tconst methodName = store.logLevelStore.getName(logLevel)\n\t\t\t\t\tconst bindedMethod = logger[methodName].bind(logger)\n\t\t\t\t\tconst result = logFn(bindedMethod, logger.level ?? store.logLevel)\n\t\t\t\t\tif (result) bindedMethod(result)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tstore.logLevelStore.getAllLevels().forEach(function addMethod({ name, level }) {\n\t\tObject.defineProperty(logger, name, {\n\t\t\twritable: false,\n\t\t\tvalue: (...args: any[]) => {\n\t\t\t\tif (shouldLog(store, level, logger.level)) write({ id, level, args, timestamp: new Date() })\n\t\t\t}\n\t\t})\n\t})\n\treturn logger\n}\n\nfunction sanitizeId(id: string) {\n\treturn id.replace(/[`~!#$%^&*()=+[\\]{},|<>?]/g, '-')\n}\n\nfunction writeToReporters(\n\treporters: LogReporter[],\n\tlogEntry: LogEntry,\n\tfilter: (reporterId: string) => boolean\n) {\n\treporters.filter(r => filter(r.id)).forEach(r => r.write(logEntry!))\n}\n\n/**\n * Determines should you log.\n * @param loggerLevel Log level of the logger.\n * It can be undefined which the global log level will be used.\n */\nfunction shouldLog(store: LogStore, targetLevel: LogLevel, loggerLevel: LogLevel | undefined) {\n\treturn targetLevel <= (loggerLevel !== undefined ? loggerLevel : store.logLevel)\n}\n","import { record } from 'type-plus'\nimport type { LogStore } from './log_store.js'\nimport type { LogMethodNames, StandardLogInstance } from './types.js'\n\nexport const ctx: {\n\tconfigured?: boolean\n\tgsl?: { store: LogStore; standardLog: StandardLogInstance<LogMethodNames> }\n} = record()\n","import { record, required } from 'type-plus'\nimport { DEFAULT_LOG_METHOD_NAMES, logLevels } from './log_levels.js'\nimport { createLogStore, type LogStore } from './log_store.js'\nimport { createLogger } from './logger.js'\nimport { ctx } from './standard_log.ctx.js'\nimport type {\n\tLogger,\n\tLoggerOptions,\n\tLogMethodNames,\n\tStandardLogInstance,\n\tStandardLogOptions\n} from './types.js'\n\nexport interface StandardLog<N extends string = LogMethodNames> extends Readonly<StandardLogInstance<N>> {}\n\nexport function createStandardLog<N extends string = LogMethodNames>(\n\toptions?: StandardLogOptions<N>\n): StandardLog<N> {\n\tconst closure = createStandardLogClosure(options)\n\tif (options?.reporters?.some(r => !r.id)) {\n\t\tconst log = closure.standardLog.getLogger('standard-log')\n\t\tlog.critical(\n\t\t\t`Detected reporter with empty id. This is not allowed as it will create problems with feature like 'getNonConsoleLogger()'. Please add an id to your reporter.`\n\t\t)\n\t}\n\n\tif (!ctx.gsl) ctx.gsl = closure as any\n\treturn closure.standardLog\n}\n\nfunction noop() {}\n\nexport function createStandardLogClosure<N extends string = LogMethodNames>(\n\toptions?: StandardLogOptions<N>\n): { store: LogStore; standardLog: StandardLog<N> } {\n\t// TODO reporter.id must not be empty\n\tconst store = createLogStore(required({ logLevel: logLevels.info }, options))\n\tconst nonConsoleReporters = options?.reporters?.filter(r => !r.isConsoleReporter).map(r => r.id) ?? []\n\tconst logMethods = DEFAULT_LOG_METHOD_NAMES.concat(Object.keys(options?.customLevels ?? {})).concat([\n\t\t'on',\n\t\t'count',\n\t\t'write'\n\t])\n\treturn {\n\t\tstore,\n\t\tstandardLog: {\n\t\t\tget logLevel() {\n\t\t\t\treturn store.logLevel\n\t\t\t},\n\n\t\t\ttoLogLevelName(level: number) {\n\t\t\t\treturn store.logLevelStore.getName(level)\n\t\t\t},\n\t\t\ttoLogLevel(name: string) {\n\t\t\t\treturn store.logLevelStore.getLevel(name)\n\t\t\t},\n\t\t\tgetLogger(id: string, options?: LoggerOptions) {\n\t\t\t\tif (store.loggers[id]) return store.loggers[id] as any\n\t\t\t\treturn (store.loggers[id] = createLogger(store, id, { ssf: this.getLogger, ...options }) as any)\n\t\t\t},\n\t\t\tgetNonConsoleLogger(id, options?) {\n\t\t\t\tif (store.nonConsoleLoggers[id]) return store.nonConsoleLoggers[id] as any\n\n\t\t\t\tif (store.loggers[id]) {\n\t\t\t\t\tconst log = this.getLogger('standard-log')\n\t\t\t\t\tlog.warn(`attempt to create a non-console logger with existing id ('${id}'), ignoring`)\n\t\t\t\t\treturn (store.nonConsoleLoggers[id] = createDummyLogger(logMethods))\n\t\t\t\t}\n\n\t\t\t\treturn (store.nonConsoleLoggers[id] =\n\t\t\t\t\tnonConsoleReporters.length === 0\n\t\t\t\t\t\t? createDummyLogger(logMethods)\n\t\t\t\t\t\t: createLogger(store, id, {\n\t\t\t\t\t\t\t\tssf: this.getNonConsoleLogger,\n\t\t\t\t\t\t\t\t...options,\n\t\t\t\t\t\t\t\twriteTo(reporterId) {\n\t\t\t\t\t\t\t\t\treturn nonConsoleReporters.indexOf(reporterId) >= 0\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}))\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction createDummyLogger(logMethods: string[]) {\n\treturn logMethods.reduce((p, m) => {\n\t\tp[m] = noop\n\t\treturn p\n\t}, record()) as Logger\n}\n\n/**\n * Suppress logging within the code block.\n */\nexport function suppressLogs<R>(block: () => R, log: Logger, ...logs: Logger[]): R\nexport function suppressLogs<R>(block: () => R, ...logs: Logger[]): R {\n\tconst origLevels = logs.map(l => l.level)\n\tlogs.forEach(l => (l.level = logLevels.none))\n\tconst result = block()\n\tlogs.forEach((l, i) => (l.level = origLevels[i]))\n\treturn result\n}\n\nexport type GetLogger<N extends string = LogMethodNames> = (\n\tid: string,\n\toptions?: LoggerOptions\n) => Logger<LogMethodNames | N>\n\nexport function getLogger<N extends string = LogMethodNames>(id: string, options?: LoggerOptions) {\n\treturn getGlobalSL<N>().getLogger(id, options)\n}\n\nfunction getGlobalSL<N extends string = LogMethodNames>(): StandardLogInstance<N> {\n\tif (!ctx.gsl) ctx.gsl = createStandardLogClosure()\n\n\treturn ctx.gsl!.standardLog as StandardLogInstance<N>\n}\n\nexport function configGlobal(options: Omit<StandardLogOptions, 'customLevels'>) {\n\tif (ctx.configured) {\n\t\tconst log = ctx.gsl!.standardLog.getLogger('standard-log')\n\t\tlog.warn(\n\t\t\t'configGlobal() is being called more than once. Please make sure this is expected. Application should use `createStandardLog()` most of the time.'\n\t\t)\n\t}\n\n\tif (ctx.gsl) {\n\t\tif (options.logLevel) {\n\t\t\tctx.gsl.store.logLevel = options.logLevel\n\t\t}\n\t\tif (options.reporters) {\n\t\t\tconst reporters = ctx.gsl.store.reporters\n\t\t\treporters.length = 0\n\t\t\treporters.push(...options.reporters)\n\t\t}\n\t} else {\n\t\tctx.gsl = createStandardLogClosure(options)\n\t}\n\tctx.configured = true\n}\n"],"x_google_ignoreList":[0,1,2,3,4,9,10,11,12,13,14],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,SAAS,SAAS,SAAS,SAAS;CAC5C,OAAO,MAAM;EACZ;EACA;EACA;CACD,IAAI,GAAG,MAAM;EACZ,OAAO;GACN,GAAG;GACH,GAAG;EACJ;CACD,CAAC;AACF;AAQA,SAAS,MAAM,SAAS,SAAS;CAChC,IAAI,QAAQ,OAAO,KAAK,KAAK,QAAQ,OAAO,MAAM,OAAO,QAAQ;CACjE,OAAO,QAAQ,QAAQ,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,SAAS,CAAC,CAAC;AACrD;AAoBA,SAAS,UAAU,IAAI,IAAI,IAAI;CAC9B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G,OAAO,CAAC;AACZ;AAMA,SAAgB,aAAgB,OAAgB,GAAG,MAAmB;CACrE,MAAM,aAAa,KAAK,KAAI,MAAK,EAAE,KAAK;CACxC,KAAK,SAAQ,MAAM,EAAE,QAAQ,UAAU,IAAK;CAC5C,MAAM,SAAS,MAAM;CACrB,KAAK,SAAS,GAAG,MAAO,EAAE,QAAQ,WAAW,EAAG;CAChD,OAAO;AACR;AAOA,SAAgB,UAA6C,IAAY,SAAyB;CACjG,OAAO,YAAe,CAAC,CAAC,UAAU,IAAI,OAAO;AAC9C;AAEA,SAAS,cAAyE;CACjF,IAAI,CAAC,IAAI,KAAK,IAAI,MAAM,yBAAyB;CAEjD,OAAO,IAAI,IAAK;AACjB;AAEA,SAAgB,aAAa,SAAmD;CAC/E,IAAI,IAAI,YAEP,IADgB,IAAK,YAAY,UAAU,cACzC,CAAC,CAAC,KACH,kJACD;CAGD,IAAI,IAAI,KAAK;EACZ,IAAI,QAAQ,UACX,IAAI,IAAI,MAAM,WAAW,QAAQ;EAElC,IAAI,QAAQ,WAAW;GACtB,MAAM,YAAY,IAAI,IAAI,MAAM;GAChC,UAAU,SAAS;GACnB,UAAU,KAAK,GAAG,QAAQ,SAAS;EACpC;CACD,OACC,IAAI,MAAM,yBAAyB,OAAO;CAE3C,IAAI,aAAa;AAClB"}
1
+ {"version":3,"file":"standard-log.esm.js","names":["ms"],"sources":["../../../node_modules/.pnpm/unpartial@1.0.8/node_modules/unpartial/esm/index.js","../../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js","../ts/log_levels.ts","../ts/formatter.ts","../ts/record.ts","../ts/platform.browser.ts","../ts/console.ts","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/typeof.js","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/toPrimitive.js","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/toPropertyKey.js","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/defineProperty.js","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/assertClassBrand.js","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/index.js","../ts/errors.ts","../ts/memory.ts","../ts/log_store.ts","../ts/logger.ts","../ts/standard_log.ctx.ts","../ts/standard_log.ts"],"sourcesContent":["//#region ts/index.ts\nfunction required(source1, source2, source3) {\n\treturn merge([\n\t\tsource1,\n\t\tsource2,\n\t\tsource3\n\t], (p, e) => {\n\t\treturn {\n\t\t\t...p,\n\t\t\t...e\n\t\t};\n\t});\n}\nfunction requiredDeep(source1, source2, source3) {\n\treturn merge([\n\t\tsource1,\n\t\tsource2,\n\t\tsource3\n\t], (p, e) => deepmerge(p, e));\n}\nfunction merge(entries, reducer) {\n\tif (entries[0] === void 0 || entries[0] === null) return entries[0];\n\treturn entries.filter((x) => !!x).reduce(reducer, {});\n}\nfunction deepmerge(source1, source2) {\n\tif (typeof source1 !== \"object\" || source1 === null) return source2 !== void 0 ? source2 : source1;\n\tif (Array.isArray(source1)) {\n\t\tif (Array.isArray(source2)) return source2;\n\t\tif (source2 === void 0) return [...source1];\n\t\treturn [...source1, source2];\n\t}\n\treturn getAllKeys(source1).concat(getAllKeys(source2)).reduce((p, k) => {\n\t\tp[k] = deepmerge(source1[k], source2 && source2[k]);\n\t\treturn p;\n\t}, {});\n}\nfunction getAllKeys(subject, internal = false) {\n\tif (typeof subject !== \"object\") return [];\n\tconst propertyNames = Object.getOwnPropertyNames(subject);\n\tconst keys = internal ? propertyNames.filter((n) => n !== \"constructor\") : propertyNames;\n\tconst proto = Object.getPrototypeOf(subject);\n\treturn proto !== Object.prototype ? keys.concat(getAllKeys(proto, true)) : keys;\n}\nfunction unpartial(s1, s2, s3) {\n\tif (s1 === void 0 || s1 === null) return s1;\n\treturn [\n\t\ts1,\n\t\ts2,\n\t\ts3\n\t].filter(notNil).reduce((p, s) => ({\n\t\t...p,\n\t\t...trimNilProps(s)\n\t}), {});\n}\nfunction trimNilProps(value) {\n\treturn Object.keys(value).reduce((p, k) => {\n\t\tif (notNil(value[k])) p[k] = value[k];\n\t\treturn p;\n\t}, {});\n}\nfunction notNil(value) {\n\treturn value !== null && value !== void 0;\n}\nfunction unpartialRecursively(arg1, arg2, arg3) {\n\treturn requiredDeep(arg1, arg2, arg3);\n}\n//#endregion\nexport { required, requiredDeep, unpartial, unpartialRecursively };\n\n//# sourceMappingURL=index.js.map","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","export const logLevels = {\n\t/**\n\t * none: 0\n\t */\n\tnone: 0 as const,\n\t/**\n\t * emergency: 100\n\t *\n\t * emergency -> alert\n\t */\n\temergency: 100 as const,\n\t/**\n\t * alert: 200\n\t *\n\t * emergency -> alert -> critical\n\t */\n\talert: 200 as const,\n\t/**\n\t * critical: 300\n\t *\n\t * alert -> critical -> error\n\t */\n\tcritical: 300 as const,\n\t/**\n\t * error: 400\n\t *\n\t * critical -> error -> warn\n\t */\n\terror: 400 as const,\n\t/**\n\t * warn: 500\n\t *\n\t * error -> warn -> notice\n\t */\n\twarn: 500 as const,\n\t/**\n\t * notice: 600\n\t *\n\t * warn -> notice -> info\n\t */\n\tnotice: 600 as const,\n\t/**\n\t * info: 700\n\t *\n\t * notice -> info -> debug\n\t */\n\tinfo: 700 as const,\n\t/**\n\t * debug: 800\n\t *\n\t * info -> debug -> trace\n\t */\n\tdebug: 800 as const,\n\t/**\n\t * trace: 900\n\t *\n\t * debug -> trace -> planck\n\t */\n\ttrace: 900 as const,\n\t/**\n\t * planck: Infinity\n\t * `planck unit` is a very small unit <https://en.wikipedia.org/wiki/Planck_units>.\n\t *\n\t * trace -> planck\n\t */\n\tplanck: Number.POSITIVE_INFINITY,\n\t/**\n\t * all: Infinity\n\t */\n\tall: Number.POSITIVE_INFINITY\n}\n\n/**\n * Convert default log level value to log level name.\n */\nexport function toLogLevelName(level: number) {\n\tif (level <= 100) return 'emergency'\n\tif (level <= 200) return 'alert'\n\tif (level <= 300) return 'critical'\n\tif (level <= 400) return 'error'\n\tif (level <= 500) return 'warn'\n\tif (level <= 600) return 'notice'\n\tif (level <= 700) return 'info'\n\tif (level <= 800) return 'debug'\n\tif (level <= 900) return 'trace'\n\treturn 'planck'\n}\n\n/**\n * Convert default log level name to log level value.\n */\nexport function toLogLevel(name: string): number | undefined {\n\treturn (logLevels as any)[name.toLocaleLowerCase()]\n}\n\nexport const DEFAULT_LOG_METHOD_NAMES: string[] = [\n\t'emergency',\n\t'alert',\n\t'critical',\n\t'error',\n\t'warn',\n\t'notice',\n\t'info',\n\t'debug',\n\t'trace',\n\t'planck'\n]\n","import ms from 'ms'\nimport { toLogLevelName } from './log_levels.js'\nimport type { LogEntry } from './types.js'\n\nexport type TimestampFormat = 'none' | 'iso' | 'elapsed'\n\nexport function createTimestampFormatter(format: TimestampFormat): (timestamp: Date) => string | undefined {\n\tswitch (format) {\n\t\tcase 'none':\n\t\t\treturn (_timestamp: Date) => undefined\n\t\tcase 'iso':\n\t\t\treturn (timestamp: Date) => timestamp.toISOString()\n\t\tcase 'elapsed': {\n\t\t\tlet lastTick: number\n\t\t\treturn (timestamp: Date) => {\n\t\t\t\tconst newTick = timestamp.getTime()\n\t\t\t\tconst result = ms(lastTick === undefined ? 0 : newTick - lastTick)\n\t\t\t\tlastTick = newTick\n\t\t\t\treturn result\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport function formatLogLevel(level: number) {\n\treturn `(${toLogLevelName(level).toUpperCase()})`\n}\n\n/**\n * Formats log entry as plain text with the following format:\n * `timestamp id level ...args`\n *\n * This is typically useful for writing logs to file\n */\nexport function plainLogFormatter({ id, level, args, timestamp }: LogEntry) {\n\treturn [timestamp.toISOString(), id, formatLogLevel(level), ...args]\n}\n\n/**\n * Formats log entry like default console log.\n */\nexport function consoleFormatter({ args }: LogEntry) {\n\treturn args\n}\n","/**\n * Creates a prototype-less object, optionally seeded with `value`.\n *\n * Inlined from `type-plus` so the CJS build does not `require()` the ESM-only `type-plus`.\n */\nexport function record<R extends Record<any, any>>(value?: R): R {\n\tconst r = Object.create(null)\n\treturn value ? Object.assign(r, value) : r\n}\n","import { record } from './record.js'\nimport type { ConsoleLike, LogEntry } from './types.js'\n\nexport const toInspectLogEntry = (e: LogEntry) => e\n\nexport const polyfill: { console?: ConsoleLike } = record()\n","import { unpartial } from 'unpartial'\nimport { consoleFormatter } from './formatter.js'\nimport { logLevels } from './log_levels.js'\nimport { polyfill } from './platform.js'\nimport type { ConsoleLike, LogEntry, LogFormatter, LogReporter, LogReporterOptions } from './types.js'\n\nexport function toConsoleMethod(level: number) {\n\tswitch (true) {\n\t\t// edge case in case none is somehow written\n\t\tcase level <= 0:\n\t\t\treturn 'debug'\n\t\tcase level <= logLevels.error:\n\t\t\treturn 'error'\n\t\tcase level <= logLevels.warn:\n\t\t\treturn 'warn'\n\t\tcase level <= logLevels.info:\n\t\t\treturn 'info'\n\t\tdefault:\n\t\t\treturn 'debug'\n\t}\n}\n\n// istanbul ignore next\n/* eslint-disable no-console */\nfunction buildPolyfillConsole() {\n\t// old phantomjs does not have bind function\n\tconst hasBind = !!console.log.bind as boolean\n\tif (hasBind) {\n\t\treturn {\n\t\t\t// the `typeof` guards against IE where `console.log.apply()`\n\t\t\t// results in error `Object doesn't support property or method 'apply'`\n\t\t\tdebug: (typeof console.info === 'function' ? console.debug : console.log).bind(console),\n\t\t\tinfo: (typeof console.info === 'function' ? console.info : console.log).bind(console),\n\t\t\twarn: (typeof console.warn === 'function' ? console.warn : console.log).bind(console),\n\t\t\terror: (typeof console.error === 'function' ? console.error : console.log).bind(console)\n\t\t}\n\t}\n\treturn {\n\t\tdebug: buildFn(typeof console.debug === 'function' ? 'debug' : 'log'),\n\t\tinfo: buildFn(typeof console.info === 'function' ? 'info' : 'log'),\n\t\twarn: buildFn(typeof console.warn === 'function' ? 'warn' : 'log'),\n\t\terror: buildFn(typeof console.error === 'function' ? 'error' : 'log')\n\t}\n}\n\n// istanbul ignore next\nfunction buildFn(name: 'debug' | 'info' | 'warn' | 'error' | 'log') {\n\treturn (...args: any[]) => {\n\t\tconsole[name](...args)\n\t}\n}\n\nexport type ConsoleLogFormatter = LogFormatter<any[]>\nexport type ConsoleLogReporter = LogReporter<any[]> & { console: ConsoleLike }\nexport type ConsoleLogReporterOptions = LogReporterOptions<any[]>\n\nexport function createConsoleLogReporter(options?: ConsoleLogReporterOptions): ConsoleLogReporter {\n\tconst { id, formatter, filter } = unpartial({ id: 'console', formatter: consoleFormatter }, options)\n\tif (!polyfill.console) polyfill.console = buildPolyfillConsole()\n\n\treturn Object.freeze({\n\t\tid,\n\t\tisConsoleReporter: true,\n\t\tget formatter() {\n\t\t\treturn formatter\n\t\t},\n\t\tget filter() {\n\t\t\treturn filter\n\t\t},\n\t\tconsole: polyfill.console,\n\t\twrite(entry: LogEntry) {\n\t\t\tif (filter && !filter(entry)) return\n\t\t\tconst values = formatter(entry)\n\t\t\tconst method = toConsoleMethod(entry.level)\n\t\t\tthis.console[method](...values)\n\t\t}\n\t})\n}\n","//#region \\0@oxc-project+runtime@0.147.0/helpers/esm/typeof.js\nfunction _typeof(o) {\n\t\"@babel/helpers - typeof\";\n\treturn _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(o) {\n\t\treturn typeof o;\n\t} : function(o) {\n\t\treturn o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n\t}, _typeof(o);\n}\n//#endregion\nexport { _typeof as default };\n","import _typeof from \"./typeof.js\";\n//#region \\0@oxc-project+runtime@0.147.0/helpers/esm/toPrimitive.js\nfunction toPrimitive(t, r) {\n\tif (\"object\" != _typeof(t) || !t) return t;\n\tvar e = t[Symbol.toPrimitive];\n\tif (void 0 !== e) {\n\t\tvar i = e.call(t, r || \"default\");\n\t\tif (\"object\" != _typeof(i)) return i;\n\t\tthrow new TypeError(\"@@toPrimitive must return a primitive value.\");\n\t}\n\treturn (\"string\" === r ? String : Number)(t);\n}\n//#endregion\nexport { toPrimitive as default };\n","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\n//#region \\0@oxc-project+runtime@0.147.0/helpers/esm/toPropertyKey.js\nfunction toPropertyKey(t) {\n\tvar i = toPrimitive(t, \"string\");\n\treturn \"symbol\" == _typeof(i) ? i : i + \"\";\n}\n//#endregion\nexport { toPropertyKey as default };\n","import toPropertyKey from \"./toPropertyKey.js\";\n//#region \\0@oxc-project+runtime@0.147.0/helpers/esm/defineProperty.js\nfunction _defineProperty(e, r, t) {\n\treturn (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n\t\tvalue: t,\n\t\tenumerable: !0,\n\t\tconfigurable: !0,\n\t\twritable: !0\n\t}) : e[r] = t, e;\n}\n//#endregion\nexport { _defineProperty as default };\n","//#region \\0@oxc-project+runtime@0.147.0/helpers/esm/assertClassBrand.js\nfunction _assertClassBrand(e, t, n) {\n\tif (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;\n\tthrow new TypeError(\"Private element is not present on this object\");\n}\n//#endregion\nexport { _assertClassBrand as default };\n","import _defineProperty from \"./_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/defineProperty.js\";\nimport _assertClassBrand from \"./_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/assertClassBrand.js\";\n//#region ts/index.ts\n// istanbul ignore next\nif (!Error.captureStackTrace) Error.captureStackTrace = (error) => {\n\tconst container = /* @__PURE__ */ new Error();\n\tObject.defineProperty(error, \"stack\", {\n\t\tconfigurable: true,\n\t\tget: function() {\n\t\t\tdefineStack(this, container.stack);\n\t\t\treturn container.stack;\n\t\t},\n\t\tset: (stack) => {\n\t\t\tdefineStack(error, stack);\n\t\t}\n\t});\n};\n// istanbul ignore next\nfunction defineStack(target, value) {\n\tObject.defineProperty(target, \"stack\", {\n\t\tconfigurable: true,\n\t\tvalue,\n\t\twritable: true\n\t});\n}\nvar SerializableConverter = class {\n\tconstructor() {\n\t\t_defineProperty(this, \"plugins\", []);\n\t}\n\taddPlugin(plugin) {\n\t\tthis.plugins.unshift(plugin);\n\t}\n\t/**\n\t* Deserialize an `Error` from `Serializable`\n\t*/\n\tfromSerializable(json, options) {\n\t\tconst err = this.deserializeError(json);\n\t\tError.captureStackTrace(err, options?.ssf);\n\t\treturn err;\n\t}\n\tfromSerializableImpl(json) {\n\t\tif (json[\"name\"] === \"AggregateError\") {\n\t\t\tconst { message, errors, ...rest } = json;\n\t\t\t// istanbul ignore next\n\t\t\tif (global.AggregateError) return Object.assign(new AggregateError(errors, message), rest);\n\t\t\t/* v8 ignore next 4 -- fallback for runtimes without AggregateError */\n\t\t\treturn Object.assign(new Error(message), {\n\t\t\t\t...rest,\n\t\t\t\terrors\n\t\t\t});\n\t\t}\n\t\tconst { message, cause, ...rest } = json;\n\t\tconst causeError = cause ? this.deserializeError(cause) : void 0;\n\t\tif (json[\"name\"] === \"Error\") return Object.assign(new Error(message), causeError ? {\n\t\t\t...rest,\n\t\t\tcause: causeError\n\t\t} : rest);\n\t\treturn Object.assign(new IsoError(message, causeError ? { cause: causeError } : void 0), rest);\n\t}\n\tdeserializeError(json) {\n\t\tlet err;\n\t\tfor (const { fromSerializable } of this.plugins) {\n\t\t\terr = fromSerializable(json);\n\t\t\tif (err) break;\n\t\t}\n\t\treturn err || this.fromSerializableImpl(json);\n\t}\n\t/**\n\t* Serialize `Error` to `Serializable`\n\t*/\n\ttoSerializable(err) {\n\t\treturn this.plugins.reduce((p, s) => p || s.toSerializable(err), void 0) || this.toSerializableImpl(err);\n\t}\n\ttoSerializableImpl(err) {\n\t\tif (isAggregateError(err)) return {\n\t\t\t...err,\n\t\t\tname: err.constructor.name,\n\t\t\tmessage: err.message,\n\t\t\terrors: err.errors.map(this.toSerializableImpl)\n\t\t};\n\t\tif (err instanceof Error) {\n\t\t\tconst { message } = err;\n\t\t\tconst cause = err.cause;\n\t\t\treturn cause ? {\n\t\t\t\t...err,\n\t\t\t\tname: err.constructor.name,\n\t\t\t\tmessage,\n\t\t\t\tcause: this.toSerializableImpl(cause)\n\t\t\t} : {\n\t\t\t\t...err,\n\t\t\t\tname: err.constructor.name,\n\t\t\t\tmessage\n\t\t\t};\n\t\t}\n\t\treturn err;\n\t}\n};\nconst getCircularReplacer = () => {\n\tconst seen = /* @__PURE__ */ new WeakSet();\n\treturn (_, value) => {\n\t\tif (typeof value === \"object\" && value !== null) {\n\t\t\tif (seen.has(value)) return;\n\t\t\tseen.add(value);\n\t\t}\n\t\treturn value;\n\t};\n};\n/**\n* Isomorphic Error that works across physical boundary.\n*/\nvar IsoError = class IsoError extends Error {\n\t/**\n\t* Create an IsoError with additional properties without the need to create a new class.\n\t* @param props properties of the IsoError\n\t*/\n\tstatic create(props) {\n\t\tconst { message, cause, ...rest } = props;\n\t\tconst err = new IsoError(message, {\n\t\t\tcause,\n\t\t\tssf: IsoError.create\n\t\t});\n\t\treturn Object.assign(err, rest);\n\t}\n\tstatic stringify(err) {\n\t\treturn this.serialize(err);\n\t}\n\tstatic serialize(err) {\n\t\treturn JSON.stringify(this.toSerializable(err), getCircularReplacer());\n\t}\n\tstatic toSerializable(err) {\n\t\treturn this.converter.toSerializable(err);\n\t}\n\t/**\n\t* @type P Additional properties of the IsoError\n\t* @param text Json representation of a IsoError\n\t*/\n\tstatic parse(text) {\n\t\tconst json = JSON.parse(text);\n\t\treturn this.converter.fromSerializable(json, { ssf: IsoError.parse });\n\t}\n\t/**\n\t* @type P Additional properties of the IsoError\n\t* @param text Json representation of a IsoError\n\t*/\n\tstatic deserialize(text) {\n\t\tconst json = JSON.parse(text);\n\t\treturn this.converter.fromSerializable(json, { ssf: IsoError.deserialize });\n\t}\n\tstatic fromSerializable(json) {\n\t\treturn this.converter.fromSerializable(json, { ssf: IsoError.fromSerializable });\n\t}\n\t/**\n\t* returns the error message including the error causes.\n\t*/\n\tstatic trace(err) {\n\t\tconst messages = [];\n\t\tif (err instanceof ModuleError) messages.push(`${err.name}(${err.module}): ${err.message}`);\n\t\telse if (err instanceof Error) messages.push(`${err.name}: ${err.message}`);\n\t\tif (isAggregateError(err)) err.errors.forEach((e) => {\n\t\t\tmessages.push(...this.trace(e).split(\"\\n\").map((s) => ` ${s}`));\n\t\t});\n\t\tif (err instanceof Error) {\n\t\t\tif (_assertClassBrand(IsoError, this, _hasCause).call(this, err)) messages.push(...this.trace(err.cause).split(\"\\n\").map((s) => \" \" + s));\n\t\t} else messages.push(typeof err === \"string\" ? err : JSON.stringify(err));\n\t\treturn messages.join(\"\\n\");\n\t}\n\tstatic addPlugin(plugin) {\n\t\tthis.converter.addPlugin(plugin);\n\t}\n\tconstructor(message, options) {\n\t\tsuper(message);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Name of the error\n\t\t\t*/\n\t\t\t\"name\",\n\t\t\tvoid 0\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Error cause\n\t\t\t*/\n\t\t\t\"cause\",\n\t\t\tvoid 0\n\t\t);\n\t\tconst actualProto = new.target.prototype;\n\t\tthis.name = actualProto.constructor.name;\n\t\t// istanbul ignore next\n\t\tif (Object.setPrototypeOf) Object.setPrototypeOf(this, actualProto);\n\t\telse this.__proto__ = actualProto;\n\t\tif (options?.cause) this.cause = _toIsoError.call(IsoError, options.cause);\n\t\tif (options?.ssf) Error.captureStackTrace(this, options.ssf);\n\t}\n\ttoString() {\n\t\treturn IsoError.serialize(this);\n\t}\n\ttrace() {\n\t\treturn IsoError.trace(this);\n\t}\n};\nfunction _hasCause(x) {\n\treturn !!x.cause;\n}\nfunction _toIsoError(err) {\n\treturn Object.assign(err, { name: err.name ?? err.constructor.name });\n}\n_defineProperty(IsoError, \"converter\", new SerializableConverter());\n/**\n* An IsoError with a module property.\n*/\nvar ModuleError = class extends IsoError {\n\t/**\n\t* @param module The module that defines this error.\n\t*/\n\tconstructor(module, message, options) {\n\t\tsuper(message, options);\n\t\tthis.module = module;\n\t}\n};\nfunction isAggregateError(error) {\n\treturn error instanceof Error && Array.isArray(error.errors);\n}\n//#endregion\nexport { IsoError, ModuleError, SerializableConverter, isAggregateError };\n\n//# sourceMappingURL=index.js.map","import { type IsoError, ModuleError } from 'iso-error'\n\n/**\n * @deprecated No longer used since 11.2.0\n */\nexport class StandardLogError extends ModuleError {\n\tconstructor(description: string, options?: IsoError.Options) {\n\t\tsuper('standard-log', description, options)\n\t}\n}\n\n/**\n * @deprecated no longer used since 11.2.0\n */\nexport class InvalidId extends StandardLogError {\n\tconstructor(\n\t\tpublic id: string,\n\t\toptions?: IsoError.Options\n\t) {\n\t\tsuper(`logger id only supports alphanumeric, unicode characters, and [:_-.]. Received ${id}`, options)\n\t}\n}\n","import { required, unpartial } from 'unpartial'\nimport { createConsoleLogReporter } from './console.js'\nimport { formatLogLevel } from './formatter.js'\nimport { toInspectLogEntry } from './platform.js'\nimport type { LogEntry, LogFormatter, LogReporter, LogReporterOptions } from './types.js'\n\nexport type MemoryLogReporter = LogReporter<LogEntry> & {\n\tlogs: LogEntry[]\n\t/**\n\t * Gets a simple log message for testing.\n\t * The message only contains arguments for each log entry.\n\t */\n\tgetLogMessage(): string\n\tgetLogMessages(): string[]\n\tgetLogMessageWithLevel(): string\n\tgetLogMessagesWithLevel(): string[]\n\tgetLogMessagesWithIdAndLevel(): string[]\n\temit(): void\n}\n\nexport type MemoryLogFormatter = LogFormatter<LogEntry>\n\nexport function toMessageWithLevel(logs: LogEntry[]) {\n\treturn (\n\t\tlogs\n\t\t\t.map(toInspectLogEntry)\n\t\t\t.map(log => `${formatLogLevel(log.level)} ${log.args.join(' ')}`)\n\t\t\t.join('\\n')\n\t\t\t// if it has more than this log,\n\t\t\t// we assume it is running under tests,\n\t\t\t// and remove this log to simplify testing.\n\t\t\t.replace(/^\\(WARN\\) already configured for test, ignoring config\\(\\) call\\n/, '')\n\t)\n}\n\nexport function createMemoryLogReporter(options?: LogReporterOptions<LogEntry>): MemoryLogReporter {\n\treturn Object.freeze(buildMemoryReporter(unpartial({ id: 'memory' }, options)))\n}\n\nfunction buildMemoryReporter(options?: LogReporterOptions<LogEntry>) {\n\tconst { id, formatter, filter } = required({ id: 'memory', formatter: (e: LogEntry) => e }, options)\n\tconst logs: LogEntry[] = []\n\treturn {\n\t\tid,\n\t\tget formatter() {\n\t\t\treturn formatter\n\t\t},\n\t\tget filter() {\n\t\t\treturn filter\n\t\t},\n\t\tlogs,\n\t\twrite(entry: LogEntry) {\n\t\t\tif (filter && !filter(entry)) return\n\t\t\tlogs.push(formatter(entry))\n\t\t},\n\t\tgetLogMessage() {\n\t\t\treturn this.getLogMessages().join('\\n')\n\t\t},\n\t\tgetLogMessages() {\n\t\t\treturn logs.map(toInspectLogEntry).map(log => log.args.join(' '))\n\t\t},\n\t\tgetLogMessagesWithLevel() {\n\t\t\treturn logs.map(toInspectLogEntry).map(log => `${formatLogLevel(log.level)} ${log.args.join(' ')}`)\n\t\t},\n\t\tgetLogMessagesWithIdAndLevel() {\n\t\t\treturn logs\n\t\t\t\t.map(toInspectLogEntry)\n\t\t\t\t.map(log => `${log.id} ${formatLogLevel(log.level)} ${log.args.join(' ')}`)\n\t\t},\n\t\tgetLogMessageWithLevel() {\n\t\t\treturn toMessageWithLevel(logs)\n\t\t},\n\t\t/**\n\t\t * emit the saved log to console for easy debugging\n\t\t */\n\t\temit() {\n\t\t\tconst reporter = createConsoleLogReporter()\n\t\t\tlogs.forEach(l => reporter.write(l))\n\t\t}\n\t}\n}\n\nexport function createMemoryWithConsoleLogReporter(\n\toptions?: LogReporterOptions<LogEntry>\n): MemoryLogReporter {\n\treturn Object.freeze(\n\t\tObject.assign(buildMemoryReporter(unpartial({ id: 'memory-with-console' }, options)), {\n\t\t\tisConsoleReporter: true\n\t\t})\n\t)\n}\n","import { createConsoleLogReporter } from './console.js'\nimport { logLevels, toLogLevel, toLogLevelName } from './log_levels.js'\nimport { record } from './record.js'\nimport type { Logger, LogLevel, LogMethodNames, LogReporter, StandardLogOptions } from './types.js'\n\nexport function createLogStore<N extends string = LogMethodNames>(\n\toptions: Required<StandardLogOptions<N>>\n): LogStore {\n\treturn {\n\t\tloggers: record(),\n\t\tnonConsoleLoggers: record(),\n\t\treporters: options.reporters || [createConsoleLogReporter()],\n\t\tlogLevel: options.logLevel,\n\t\tlogLevelStore: logLevelStore(options)\n\t}\n}\n\nexport interface LogStore {\n\tloggers: Record<string, Logger>\n\tnonConsoleLoggers: Record<string, Logger>\n\treporters: LogReporter[]\n\tlogLevel: LogLevel\n\tlogLevelStore: ReturnType<typeof logLevelStore>\n}\n\nexport interface LogLevelStoreOptions {\n\tcustomLevels?: Record<string, number>\n}\n\nexport function logLevelStore(options: LogLevelStoreOptions) {\n\tconst customLevels = options.customLevels || record()\n\n\tconst store = {\n\t\tcustomLevels,\n\t\tcustomLevelsReverse: Object.keys(customLevels).reduce(\n\t\t\t(p, k) => {\n\t\t\t\tp[customLevels[k]] = k\n\t\t\t\treturn p\n\t\t\t},\n\t\t\t{} as Record<number, string>\n\t\t)\n\t}\n\treturn {\n\t\tgetName(level: number) {\n\t\t\treturn store.customLevelsReverse[level] ?? toLogLevelName(level)\n\t\t},\n\t\tgetLevel(name: string) {\n\t\t\treturn store.customLevels[name] ?? toLogLevel(name)\n\t\t},\n\t\tgetAllLevels() {\n\t\t\treturn (Object.keys(logLevels) as Array<keyof typeof logLevels>).reduce(\n\t\t\t\t(result, name) => {\n\t\t\t\t\tif (name !== 'none' && name !== 'all') result.push({ name, level: logLevels[name] })\n\n\t\t\t\t\treturn result\n\t\t\t\t},\n\t\t\t\tObject.keys(store.customLevels).map(name => ({ name, level: store.customLevels[name] }))\n\t\t\t)\n\t\t}\n\t}\n}\n","import { logLevels } from './log_levels.js'\nimport type { LogStore } from './log_store.js'\nimport type {\n\tLogEntry,\n\tLogFunction,\n\tLogger,\n\tLoggerOptions,\n\tLogLevel,\n\tLogMethodNames,\n\tLogReporter\n} from './types.js'\n\nexport function createLogger<N extends string = LogMethodNames>(\n\tstore: LogStore,\n\tid: string,\n\toptions?: LoggerOptions\n): Logger<N | LogMethodNames> {\n\tid = sanitizeId(id)\n\tconst writeTo = options?.writeTo ?? (() => true)\n\tconst [filter, reporters]: [(reporterId: string) => boolean, LogReporter[]] =\n\t\ttypeof writeTo === 'string'\n\t\t\t? [id => id === writeTo, store.reporters]\n\t\t\t: writeTo instanceof RegExp\n\t\t\t\t? [id => writeTo.test(id), store.reporters]\n\t\t\t\t: typeof writeTo === 'function'\n\t\t\t\t\t? [writeTo, store.reporters]\n\t\t\t\t\t: [() => true, [writeTo]]\n\n\tfunction write(entry: LogEntry) {\n\t\twriteToReporters(reporters, entry, filter)\n\t}\n\n\tconst logger = {\n\t\tlevel: options?.level,\n\t\twrite\n\t} as any\n\n\tObject.defineProperties(logger, {\n\t\tid: { value: id, writable: false },\n\t\tcount: {\n\t\t\twritable: false,\n\t\t\tvalue: (\n\t\t\t\tcounter =>\n\t\t\t\t(...args: any[]): void => {\n\t\t\t\t\tif (shouldLog(store, logLevels.debug, logger.level))\n\t\t\t\t\t\twrite({\n\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\tlevel: logLevels.debug,\n\t\t\t\t\t\t\targs: [++counter, ...args],\n\t\t\t\t\t\t\ttimestamp: new Date()\n\t\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t)(0)\n\t\t},\n\t\ton: {\n\t\t\twritable: false,\n\t\t\tvalue: (level: number | N | LogMethodNames, logFn: LogFunction) => {\n\t\t\t\tconst logLevel = typeof level === 'string' ? store.logLevelStore.getLevel(level)! : level\n\t\t\t\tif (shouldLog(store, logLevel, logger.level)) {\n\t\t\t\t\tconst methodName = store.logLevelStore.getName(logLevel)\n\t\t\t\t\tconst bindedMethod = logger[methodName].bind(logger)\n\t\t\t\t\tconst result = logFn(bindedMethod, logger.level ?? store.logLevel)\n\t\t\t\t\tif (result) bindedMethod(result)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tstore.logLevelStore.getAllLevels().forEach(function addMethod({ name, level }) {\n\t\tObject.defineProperty(logger, name, {\n\t\t\twritable: false,\n\t\t\tvalue: (...args: any[]) => {\n\t\t\t\tif (shouldLog(store, level, logger.level)) write({ id, level, args, timestamp: new Date() })\n\t\t\t}\n\t\t})\n\t})\n\treturn logger\n}\n\nfunction sanitizeId(id: string) {\n\treturn id.replace(/[`~!#$%^&*()=+[\\]{},|<>?]/g, '-')\n}\n\nfunction writeToReporters(\n\treporters: LogReporter[],\n\tlogEntry: LogEntry,\n\tfilter: (reporterId: string) => boolean\n) {\n\treporters.filter(r => filter(r.id)).forEach(r => r.write(logEntry!))\n}\n\n/**\n * Determines should you log.\n * @param loggerLevel Log level of the logger.\n * It can be undefined which the global log level will be used.\n */\nfunction shouldLog(store: LogStore, targetLevel: LogLevel, loggerLevel: LogLevel | undefined) {\n\treturn targetLevel <= (loggerLevel !== undefined ? loggerLevel : store.logLevel)\n}\n","import type { LogStore } from './log_store.js'\nimport { record } from './record.js'\nimport type { LogMethodNames, StandardLogInstance } from './types.js'\n\nexport const ctx: {\n\tconfigured?: boolean\n\tgsl?: { store: LogStore; standardLog: StandardLogInstance<LogMethodNames> }\n} = record()\n","import { required } from 'unpartial'\nimport { DEFAULT_LOG_METHOD_NAMES, logLevels } from './log_levels.js'\nimport { createLogStore, type LogStore } from './log_store.js'\nimport { createLogger } from './logger.js'\nimport { record } from './record.js'\nimport { ctx } from './standard_log.ctx.js'\nimport type {\n\tLogger,\n\tLoggerOptions,\n\tLogMethodNames,\n\tStandardLogInstance,\n\tStandardLogOptions\n} from './types.js'\n\nexport interface StandardLog<N extends string = LogMethodNames> extends Readonly<StandardLogInstance<N>> {}\n\nexport function createStandardLog<N extends string = LogMethodNames>(\n\toptions?: StandardLogOptions<N>\n): StandardLog<N> {\n\tconst closure = createStandardLogClosure(options)\n\tif (options?.reporters?.some(r => !r.id)) {\n\t\tconst log = closure.standardLog.getLogger('standard-log')\n\t\tlog.critical(\n\t\t\t`Detected reporter with empty id. This is not allowed as it will create problems with feature like 'getNonConsoleLogger()'. Please add an id to your reporter.`\n\t\t)\n\t}\n\n\tif (!ctx.gsl) ctx.gsl = closure as any\n\treturn closure.standardLog\n}\n\nfunction noop() {}\n\nexport function createStandardLogClosure<N extends string = LogMethodNames>(\n\toptions?: StandardLogOptions<N>\n): { store: LogStore; standardLog: StandardLog<N> } {\n\t// TODO reporter.id must not be empty\n\tconst store = createLogStore(required({ logLevel: logLevels.info }, options))\n\tconst nonConsoleReporters = options?.reporters?.filter(r => !r.isConsoleReporter).map(r => r.id) ?? []\n\tconst logMethods = DEFAULT_LOG_METHOD_NAMES.concat(Object.keys(options?.customLevels ?? {})).concat([\n\t\t'on',\n\t\t'count',\n\t\t'write'\n\t])\n\treturn {\n\t\tstore,\n\t\tstandardLog: {\n\t\t\tget logLevel() {\n\t\t\t\treturn store.logLevel\n\t\t\t},\n\n\t\t\ttoLogLevelName(level: number) {\n\t\t\t\treturn store.logLevelStore.getName(level)\n\t\t\t},\n\t\t\ttoLogLevel(name: string) {\n\t\t\t\treturn store.logLevelStore.getLevel(name)\n\t\t\t},\n\t\t\tgetLogger(id: string, options?: LoggerOptions) {\n\t\t\t\tif (store.loggers[id]) return store.loggers[id] as any\n\t\t\t\treturn (store.loggers[id] = createLogger(store, id, { ssf: this.getLogger, ...options }) as any)\n\t\t\t},\n\t\t\tgetNonConsoleLogger(id, options?) {\n\t\t\t\tif (store.nonConsoleLoggers[id]) return store.nonConsoleLoggers[id] as any\n\n\t\t\t\tif (store.loggers[id]) {\n\t\t\t\t\tconst log = this.getLogger('standard-log')\n\t\t\t\t\tlog.warn(`attempt to create a non-console logger with existing id ('${id}'), ignoring`)\n\t\t\t\t\treturn (store.nonConsoleLoggers[id] = createDummyLogger(logMethods))\n\t\t\t\t}\n\n\t\t\t\treturn (store.nonConsoleLoggers[id] =\n\t\t\t\t\tnonConsoleReporters.length === 0\n\t\t\t\t\t\t? createDummyLogger(logMethods)\n\t\t\t\t\t\t: createLogger(store, id, {\n\t\t\t\t\t\t\t\tssf: this.getNonConsoleLogger,\n\t\t\t\t\t\t\t\t...options,\n\t\t\t\t\t\t\t\twriteTo(reporterId) {\n\t\t\t\t\t\t\t\t\treturn nonConsoleReporters.indexOf(reporterId) >= 0\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}))\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction createDummyLogger(logMethods: string[]) {\n\treturn logMethods.reduce((p, m) => {\n\t\tp[m] = noop\n\t\treturn p\n\t}, record()) as Logger\n}\n\n/**\n * Suppress logging within the code block.\n */\nexport function suppressLogs<R>(block: () => R, log: Logger, ...logs: Logger[]): R\nexport function suppressLogs<R>(block: () => R, ...logs: Logger[]): R {\n\tconst origLevels = logs.map(l => l.level)\n\tlogs.forEach(l => (l.level = logLevels.none))\n\tconst result = block()\n\tlogs.forEach((l, i) => (l.level = origLevels[i]))\n\treturn result\n}\n\nexport type GetLogger<N extends string = LogMethodNames> = (\n\tid: string,\n\toptions?: LoggerOptions\n) => Logger<LogMethodNames | N>\n\nexport function getLogger<N extends string = LogMethodNames>(id: string, options?: LoggerOptions) {\n\treturn getGlobalSL<N>().getLogger(id, options)\n}\n\nfunction getGlobalSL<N extends string = LogMethodNames>(): StandardLogInstance<N> {\n\tif (!ctx.gsl) ctx.gsl = createStandardLogClosure()\n\n\treturn ctx.gsl!.standardLog as StandardLogInstance<N>\n}\n\nexport function configGlobal(options: Omit<StandardLogOptions, 'customLevels'>) {\n\tif (ctx.configured) {\n\t\tconst log = ctx.gsl!.standardLog.getLogger('standard-log')\n\t\tlog.warn(\n\t\t\t'configGlobal() is being called more than once. Please make sure this is expected. Application should use `createStandardLog()` most of the time.'\n\t\t)\n\t}\n\n\tif (ctx.gsl) {\n\t\tif (options.logLevel) {\n\t\t\tctx.gsl.store.logLevel = options.logLevel\n\t\t}\n\t\tif (options.reporters) {\n\t\t\tconst reporters = ctx.gsl.store.reporters\n\t\t\treporters.length = 0\n\t\t\treporters.push(...options.reporters)\n\t\t}\n\t} else {\n\t\tctx.gsl = createStandardLogClosure(options)\n\t}\n\tctx.configured = true\n}\n"],"x_google_ignoreList":[0,1,7,8,9,10,11,12],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,SAAS,SAAS,SAAS,SAAS;CAC5C,OAAO,MAAM;EACZ;EACA;EACA;CACD,IAAI,GAAG,MAAM;EACZ,OAAO;GACN,GAAG;GACH,GAAG;EACJ;CACD,CAAC;AACF;AAQA,SAAS,MAAM,SAAS,SAAS;CAChC,IAAI,QAAQ,OAAO,KAAK,KAAK,QAAQ,OAAO,MAAM,OAAO,QAAQ;CACjE,OAAO,QAAQ,QAAQ,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,SAAS,CAAC,CAAC;AACrD;AAoBA,SAAS,UAAU,IAAI,IAAI,IAAI;CAC9B,IAAI,OAAO,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AAU,IAAI,OAAO;AAC9C;AAEA,SAAS,cAAyE;CACjF,IAAI,CAAC,IAAI,KAAK,IAAI,MAAM,yBAAyB;CAEjD,OAAO,IAAI,IAAK;AACjB;AAEA,SAAgB,aAAa,SAAmD;CAC/E,IAAI,IAAI,YAEP,IADgB,IAAK,YAAY,UAAU,cACzC,CAAC,CAAC,KACH,kJACD;CAGD,IAAI,IAAI,KAAK;EACZ,IAAI,QAAQ,UACX,IAAI,IAAI,MAAM,WAAW,QAAQ;EAElC,IAAI,QAAQ,WAAW;GACtB,MAAM,YAAY,IAAI,IAAI,MAAM;GAChC,UAAU,SAAS;GACnB,UAAU,KAAK,GAAG,QAAQ,SAAS;EACpC;CACD,OACC,IAAI,MAAM,yBAAyB,OAAO;CAE3C,IAAI,aAAa;AAClB"}
@@ -23,7 +23,7 @@ var StandardLog = (function(exports) {
23
23
  enumerable: true
24
24
  }) : target, mod));
25
25
  //#endregion
26
- //#region ../../node_modules/.pnpm/unpartial@1.0.7/node_modules/unpartial/esm/index.js
26
+ //#region ../../node_modules/.pnpm/unpartial@1.0.8/node_modules/unpartial/esm/index.js
27
27
  function required(source1, source2, source3) {
28
28
  return merge([
29
29
  source1,
@@ -61,33 +61,6 @@ var StandardLog = (function(exports) {
61
61
  return value !== null && value !== void 0;
62
62
  }
63
63
  //#endregion
64
- //#region ../../node_modules/.pnpm/type-plus@8.0.0-beta.10_typescript@7.0.2/node_modules/type-plus/esm/object/mapKey.js
65
- function mapKey(subject, predicate, thisArg) {
66
- return Object.keys(subject).map(function(k, i, a) {
67
- return predicate.apply(this, [
68
- k,
69
- i,
70
- a,
71
- subject
72
- ]);
73
- }, thisArg);
74
- }
75
- //#endregion
76
- //#region ../../node_modules/.pnpm/type-plus@8.0.0-beta.10_typescript@7.0.2/node_modules/type-plus/esm/object/reduceKey.js
77
- function reduceByKey(subject, callbackfn, initialValue) {
78
- return Object.keys(subject).reduce((p, k, i, a) => callbackfn(p, k, i, a, subject), initialValue);
79
- }
80
- /**
81
- * @deprecated renamed to reduceByKey
82
- */
83
- const reduceKey = reduceByKey;
84
- //#endregion
85
- //#region ../../node_modules/.pnpm/type-plus@8.0.0-beta.10_typescript@7.0.2/node_modules/type-plus/esm/object/record.js
86
- function record(value) {
87
- const r = Object.create(null);
88
- return value ? Object.assign(r, value) : r;
89
- }
90
- //#endregion
91
64
  //#region ts/log_levels.ts
92
65
  var import_ms = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
93
66
  /**
@@ -350,6 +323,17 @@ var StandardLog = (function(exports) {
350
323
  return args;
351
324
  }
352
325
  //#endregion
326
+ //#region ts/record.ts
327
+ /**
328
+ * Creates a prototype-less object, optionally seeded with `value`.
329
+ *
330
+ * Inlined from `type-plus` so the CJS build does not `require()` the ESM-only `type-plus`.
331
+ */
332
+ function record(value) {
333
+ const r = Object.create(null);
334
+ return value ? Object.assign(r, value) : r;
335
+ }
336
+ //#endregion
353
337
  //#region ts/platform.browser.ts
354
338
  const toInspectLogEntry = (e) => e;
355
339
  const polyfill = record();
@@ -765,7 +749,7 @@ var StandardLog = (function(exports) {
765
749
  const customLevels = options.customLevels || record();
766
750
  const store = {
767
751
  customLevels,
768
- customLevelsReverse: reduceByKey(customLevels, (p, k) => {
752
+ customLevelsReverse: Object.keys(customLevels).reduce((p, k) => {
769
753
  p[customLevels[k]] = k;
770
754
  return p;
771
755
  }, {})
@@ -778,13 +762,13 @@ var StandardLog = (function(exports) {
778
762
  return store.customLevels[name] ?? toLogLevel(name);
779
763
  },
780
764
  getAllLevels() {
781
- return reduceKey(logLevels, (result, name) => {
765
+ return Object.keys(logLevels).reduce((result, name) => {
782
766
  if (name !== "none" && name !== "all") result.push({
783
767
  name,
784
768
  level: logLevels[name]
785
769
  });
786
770
  return result;
787
- }, mapKey(store.customLevels, (name) => ({
771
+ }, Object.keys(store.customLevels).map((name) => ({
788
772
  name,
789
773
  level: store.customLevels[name]
790
774
  })));