standard-log 13.2.0 → 13.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (74) 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 +1 -1
  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 +3 -2
  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.d.ts +2 -3
  24. package/cjs/platform.d.ts.map +1 -1
  25. package/cjs/platform.js +1 -1
  26. package/cjs/standard_log.ctx.d.ts +1 -2
  27. package/cjs/standard_log.ctx.d.ts.map +1 -1
  28. package/cjs/standard_log.d.ts +7 -8
  29. package/cjs/standard_log.d.ts.map +1 -1
  30. package/cjs/standard_log.testing.d.ts +3 -4
  31. package/cjs/standard_log.testing.d.ts.map +1 -1
  32. package/cjs/types.d.ts +16 -17
  33. package/cjs/types.d.ts.map +1 -1
  34. package/dist/standard-log.esm.js +110 -51
  35. package/dist/standard-log.esm.js.map +1 -1
  36. package/dist/standard-log.iife.js +110 -51
  37. package/dist/standard-log.iife.js.map +1 -1
  38. package/esm/console.d.ts +5 -6
  39. package/esm/console.d.ts.map +1 -1
  40. package/esm/console.js +1 -1
  41. package/esm/console.js.map +1 -1
  42. package/esm/errors.d.ts +2 -3
  43. package/esm/errors.d.ts.map +1 -1
  44. package/esm/formatter.d.ts +5 -6
  45. package/esm/formatter.d.ts.map +1 -1
  46. package/esm/log_levels.d.ts +4 -5
  47. package/esm/log_levels.d.ts.map +1 -1
  48. package/esm/log_store.d.ts +4 -5
  49. package/esm/log_store.d.ts.map +1 -1
  50. package/esm/log_store.js +2 -2
  51. package/esm/log_store.js.map +1 -1
  52. package/esm/logger.d.ts +1 -2
  53. package/esm/logger.d.ts.map +1 -1
  54. package/esm/memory.d.ts +5 -6
  55. package/esm/memory.d.ts.map +1 -1
  56. package/esm/memory.js +2 -1
  57. package/esm/memory.js.map +1 -1
  58. package/esm/platform.browser.d.ts +2 -3
  59. package/esm/platform.browser.d.ts.map +1 -1
  60. package/esm/platform.d.ts +2 -3
  61. package/esm/platform.d.ts.map +1 -1
  62. package/esm/platform.js +1 -1
  63. package/esm/standard_log.ctx.d.ts +1 -2
  64. package/esm/standard_log.ctx.d.ts.map +1 -1
  65. package/esm/standard_log.d.ts +7 -8
  66. package/esm/standard_log.d.ts.map +1 -1
  67. package/esm/standard_log.testing.d.ts +3 -4
  68. package/esm/standard_log.testing.d.ts.map +1 -1
  69. package/esm/types.d.ts +16 -17
  70. package/esm/types.d.ts.map +1 -1
  71. package/package.json +7 -6
  72. package/ts/console.ts +1 -1
  73. package/ts/log_store.ts +2 -2
  74. package/ts/memory.ts +2 -1
@@ -21,23 +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
25
- function required(source1, source2, source3) {
26
- return merge([
27
- source1,
28
- source2,
29
- source3
30
- ], (p, e) => {
31
- return {
32
- ...p,
33
- ...e
34
- };
35
- });
36
- }
37
- function merge(entries, reducer) {
38
- if (entries[0] === void 0 || entries[0] === null) return entries[0];
39
- return entries.filter((x) => !!x).reduce(reducer, {});
40
- }
24
+ //#region ../../node_modules/.pnpm/unpartial@1.0.8/node_modules/unpartial/esm/index.js
41
25
  function unpartial(s1, s2, s3) {
42
26
  if (s1 === void 0 || s1 === null) return s1;
43
27
  return [
@@ -59,33 +43,6 @@ function notNil(value) {
59
43
  return value !== null && value !== void 0;
60
44
  }
61
45
  //#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
46
  //#region ts/log_levels.ts
90
47
  var import_ms = /* @__PURE__ */ __toESM((/* @__PURE__ */ __commonJSMin(((exports, module) => {
91
48
  /**
@@ -348,6 +305,108 @@ function consoleFormatter({ args }) {
348
305
  return args;
349
306
  }
350
307
  //#endregion
308
+ //#region ../../node_modules/.pnpm/type-plus@8.0.0-beta.12_typescript@7.0.2/node_modules/type-plus/esm/object/map-key.js
309
+ /**
310
+ * `Array.prototype.map` over the *keys* of `subject`. Returns an array of the
311
+ * callback results in `Object.keys()` order -- an array, not a record.
312
+ *
313
+ * @example
314
+ * ```ts
315
+ * const r = mapKey({ a: 1, b: 2 }, (k, i) => `${String(k)}${i}`)
316
+ * // r === ['a0', 'b1']
317
+ *
318
+ * const r = mapKey({ a: 1, b: 2 }, (k, _i, _a, s) => s[k])
319
+ * // r === [1, 2]
320
+ * ```
321
+ */
322
+ function mapKey(subject, predicate, thisArg) {
323
+ return Object.keys(subject).map(function(k, i, a) {
324
+ return predicate.apply(this, [
325
+ k,
326
+ i,
327
+ a,
328
+ subject
329
+ ]);
330
+ }, thisArg);
331
+ }
332
+ //#endregion
333
+ //#region ../../node_modules/.pnpm/type-plus@8.0.0-beta.12_typescript@7.0.2/node_modules/type-plus/esm/object/reduce-key.js
334
+ /**
335
+ * `Array.prototype.reduce` over the *keys* of `subject`, in
336
+ * `Object.keys()` order.
337
+ *
338
+ * The callback receives the accumulator, the key, the index, the whole key
339
+ * array and `subject` itself, so the value is reachable as `subject[key]`
340
+ * without closing over it.
341
+ *
342
+ * Only own enumerable string keys are visited; symbol keys and inherited
343
+ * properties are skipped.
344
+ *
345
+ * @example
346
+ * ```ts
347
+ * const r = reduceByKey({ a: 1, b: 2 }, (acc, k) => acc + String(k), '')
348
+ * // r === 'ab'
349
+ *
350
+ * const sum = reduceByKey({ a: 1, b: 2 }, (acc, k, _i, _a, s) => acc + s[k], 0)
351
+ * // sum === 3
352
+ * ```
353
+ */
354
+ function reduceByKey(subject, callbackfn, initialValue) {
355
+ return Object.keys(subject).reduce((p, k, i, a) => callbackfn(p, k, i, a, subject), initialValue);
356
+ }
357
+ //#endregion
358
+ //#region ../../node_modules/.pnpm/type-plus@8.0.0-beta.12_typescript@7.0.2/node_modules/type-plus/esm/object/record.js
359
+ function record(value) {
360
+ const r = Object.create(null);
361
+ return value ? Object.assign(r, value) : r;
362
+ }
363
+ //#endregion
364
+ //#region ../../node_modules/.pnpm/unpartial@1.0.7/node_modules/unpartial/esm/index.js
365
+ function required$1(source1, source2, source3) {
366
+ return merge([
367
+ source1,
368
+ source2,
369
+ source3
370
+ ], (p, e) => {
371
+ return {
372
+ ...p,
373
+ ...e
374
+ };
375
+ });
376
+ }
377
+ function merge(entries, reducer) {
378
+ if (entries[0] === void 0 || entries[0] === null) return entries[0];
379
+ return entries.filter((x) => !!x).reduce(reducer, {});
380
+ }
381
+ //#endregion
382
+ //#region ../../node_modules/.pnpm/type-plus@8.0.0-beta.12_typescript@7.0.2/node_modules/type-plus/esm/unpartial.js
383
+ /**
384
+ * 🦴 *utilities*
385
+ *
386
+ * Merges up to three partial objects, left to right, into one value typed as
387
+ * the intersection of their full types. Re-exported from the
388
+ * [`unpartial`](https://github.com/unional/unpartial) package.
389
+ *
390
+ * The merge is shallow: each source is spread over the previous result, so a
391
+ * later source replaces a nested object instead of merging into it. A key the
392
+ * later source sets to `undefined` overwrites the earlier value. `null` and
393
+ * `undefined` sources are skipped. If `source1` is `null` or `undefined`, it
394
+ * is returned as is.
395
+ *
396
+ * Use `requiredDeep()` to merge nested objects.
397
+ *
398
+ * @example
399
+ * ```ts
400
+ * type Options = { a: number; b: { x: number; y?: number } }
401
+ * const defaults: Options = { a: 1, b: { x: 1, y: 1 } }
402
+ *
403
+ * const r = required<Options>(defaults, { b: { x: 2 } })
404
+ * // r === { a: 1, b: { x: 2 } }
405
+ * // typeof r === Options
406
+ * ```
407
+ */
408
+ const required = required$1;
409
+ //#endregion
351
410
  //#region ts/platform.browser.ts
352
411
  const toInspectLogEntry = (e) => e;
353
412
  const polyfill = record();
@@ -408,7 +467,7 @@ function createConsoleLogReporter(options) {
408
467
  });
409
468
  }
410
469
  //#endregion
411
- //#region ../../node_modules/.pnpm/iso-error@6.0.5/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/typeof.js
470
+ //#region ../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/typeof.js
412
471
  function _typeof(o) {
413
472
  "@babel/helpers - typeof";
414
473
  return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
@@ -418,7 +477,7 @@ function _typeof(o) {
418
477
  }, _typeof(o);
419
478
  }
420
479
  //#endregion
421
- //#region ../../node_modules/.pnpm/iso-error@6.0.5/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/toPrimitive.js
480
+ //#region ../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/toPrimitive.js
422
481
  function toPrimitive(t, r) {
423
482
  if ("object" != _typeof(t) || !t) return t;
424
483
  var e = t[Symbol.toPrimitive];
@@ -430,13 +489,13 @@ function toPrimitive(t, r) {
430
489
  return ("string" === r ? String : Number)(t);
431
490
  }
432
491
  //#endregion
433
- //#region ../../node_modules/.pnpm/iso-error@6.0.5/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/toPropertyKey.js
492
+ //#region ../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/toPropertyKey.js
434
493
  function toPropertyKey(t) {
435
494
  var i = toPrimitive(t, "string");
436
495
  return "symbol" == _typeof(i) ? i : i + "";
437
496
  }
438
497
  //#endregion
439
- //#region ../../node_modules/.pnpm/iso-error@6.0.5/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/defineProperty.js
498
+ //#region ../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/defineProperty.js
440
499
  function _defineProperty(e, r, t) {
441
500
  return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
442
501
  value: t,
@@ -446,13 +505,13 @@ function _defineProperty(e, r, t) {
446
505
  }) : e[r] = t, e;
447
506
  }
448
507
  //#endregion
449
- //#region ../../node_modules/.pnpm/iso-error@6.0.5/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/assertClassBrand.js
508
+ //#region ../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/assertClassBrand.js
450
509
  function _assertClassBrand(e, t, n) {
451
510
  if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
452
511
  throw new TypeError("Private element is not present on this object");
453
512
  }
454
513
  //#endregion
455
- //#region ../../node_modules/.pnpm/iso-error@6.0.5/node_modules/iso-error/esm/index.js
514
+ //#region ../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/index.js
456
515
  // istanbul ignore next
457
516
  if (!Error.captureStackTrace) Error.captureStackTrace = (error) => {
458
517
  const container = /* @__PURE__ */ new Error();
@@ -776,7 +835,7 @@ function logLevelStore(options) {
776
835
  return store.customLevels[name] ?? toLogLevel(name);
777
836
  },
778
837
  getAllLevels() {
779
- return reduceKey(logLevels, (result, name) => {
838
+ return reduceByKey(logLevels, (result, name) => {
780
839
  if (name !== "none" && name !== "all") result.push({
781
840
  name,
782
841
  level: logLevels[name]
@@ -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@6.0.5/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/typeof.js","../../../node_modules/.pnpm/iso-error@6.0.5/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/toPrimitive.js","../../../node_modules/.pnpm/iso-error@6.0.5/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/toPropertyKey.js","../../../node_modules/.pnpm/iso-error@6.0.5/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/defineProperty.js","../../../node_modules/.pnpm/iso-error@6.0.5/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/assertClassBrand.js","../../../node_modules/.pnpm/iso-error@6.0.5/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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AU,IAC5B,aAAa,OAAO,IAAI;KACxB,KAAK,KAAK;KACV,GAAG;KACH,QAAQ,YAAY;MACnB,OAAO,oBAAoB,QAAQ,UAAU,KAAK;KACnD;IACD,CAAC;GACL;EACD;CACD;AACD;AAEA,SAAS,kBAAkB,YAAsB;CAChD,OAAO,WAAW,QAAQ,GAAG,MAAM;EAClC,EAAE,KAAK;EACP,OAAO;CACR,GAAG,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","required","_required"],"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","../../../node_modules/.pnpm/type-plus@8.0.0-beta.12_typescript@7.0.2/node_modules/type-plus/esm/object/map-key.js","../../../node_modules/.pnpm/type-plus@8.0.0-beta.12_typescript@7.0.2/node_modules/type-plus/esm/object/reduce-key.js","../../../node_modules/.pnpm/type-plus@8.0.0-beta.12_typescript@7.0.2/node_modules/type-plus/esm/object/record.js","../../../node_modules/.pnpm/unpartial@1.0.7/node_modules/unpartial/esm/index.js","../../../node_modules/.pnpm/type-plus@8.0.0-beta.12_typescript@7.0.2/node_modules/type-plus/esm/unpartial.js","../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 * `Array.prototype.map` over the *keys* of `subject`. Returns an array of the\n * callback results in `Object.keys()` order -- an array, not a record.\n *\n * @example\n * ```ts\n * const r = mapKey({ a: 1, b: 2 }, (k, i) => `${String(k)}${i}`)\n * // r === ['a0', 'b1']\n *\n * const r = mapKey({ a: 1, b: 2 }, (k, _i, _a, s) => s[k])\n * // r === [1, 2]\n * ```\n */\nexport 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=map-key.js.map","/**\n * `Array.prototype.reduce` over the *keys* of `subject`, in\n * `Object.keys()` order.\n *\n * The callback receives the accumulator, the key, the index, the whole key\n * array and `subject` itself, so the value is reachable as `subject[key]`\n * without closing over it.\n *\n * Only own enumerable string keys are visited; symbol keys and inherited\n * properties are skipped.\n *\n * @example\n * ```ts\n * const r = reduceByKey({ a: 1, b: 2 }, (acc, k) => acc + String(k), '')\n * // r === 'ab'\n *\n * const sum = reduceByKey({ a: 1, b: 2 }, (acc, k, _i, _a, s) => acc + s[k], 0)\n * // sum === 3\n * ```\n */\nexport function reduceByKey(subject, callbackfn, initialValue) {\n return Object.keys(subject).reduce((p, k, i, a) => callbackfn(p, k, i, a, subject), initialValue);\n}\n//# sourceMappingURL=reduce-key.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","//#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","import { required as _required, requiredDeep as _requiredDeep } from 'unpartial';\n/**\n * 🦴 *utilities*\n *\n * Merges up to three partial objects, left to right, into one value typed as\n * the intersection of their full types. Re-exported from the\n * [`unpartial`](https://github.com/unional/unpartial) package.\n *\n * The merge is shallow: each source is spread over the previous result, so a\n * later source replaces a nested object instead of merging into it. A key the\n * later source sets to `undefined` overwrites the earlier value. `null` and\n * `undefined` sources are skipped. If `source1` is `null` or `undefined`, it\n * is returned as is.\n *\n * Use `requiredDeep()` to merge nested objects.\n *\n * @example\n * ```ts\n * type Options = { a: number; b: { x: number; y?: number } }\n * const defaults: Options = { a: 1, b: { x: 1, y: 1 } }\n *\n * const r = required<Options>(defaults, { b: { x: 2 } })\n * // r === { a: 1, b: { x: 2 } }\n * // typeof r === Options\n * ```\n */\nexport const required = _required;\n/**\n * 🦴 *utilities*\n *\n * Merges up to three partial objects, left to right and recursively, into one\n * value typed as the intersection of their full types. Re-exported from the\n * [`unpartial`](https://github.com/unional/unpartial) package.\n *\n * Nested objects are merged key by key. An array in a later source replaces\n * the earlier array. A key the later source sets to `undefined` keeps the\n * earlier value. `null` and `undefined` sources are skipped. If `source1` is\n * `null` or `undefined`, it is returned as is.\n *\n * Use `required()` for a shallow merge.\n *\n * @example\n * ```ts\n * type Options = { a: number; b: { x: number; y?: number } }\n * const defaults: Options = { a: 1, b: { x: 1, y: 1 } }\n *\n * const r = requiredDeep<Options>(defaults, { b: { x: 2 } })\n * // r === { a: 1, b: { x: 2, y: 1 } }\n * // typeof r === Options\n * ```\n */\nexport const requiredDeep = _requiredDeep;\n//# sourceMappingURL=unpartial.js.map","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 '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 } from 'type-plus'\nimport { 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 { mapKey, record, reduceByKey } 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 reduceByKey(\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,4,5,6,7,8,11,12,13,14,15,16],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AA2CA,SAAS,UAAU,IAAI,IAAI,IAAI;CAC9B,IAAI,OAAO,KAAK,KAAK,OAAO,MAAM,OAAO;CACzC,OAAO;EACN;EACA;EACA;CACD,CAAC,CAAC,OAAO,MAAM,CAAC,CAAC,QAAQ,GAAG,OAAO;EAClC,GAAG;EACH,GAAG,aAAa,CAAC;CAClB,IAAI,CAAC,CAAC;AACP;AACA,SAAS,aAAa,OAAO;CAC5B,OAAO,OAAO,KAAK,KAAK,CAAC,CAAC,QAAQ,GAAG,MAAM;EAC1C,IAAI,OAAO,MAAM,EAAE,GAAG,EAAE,KAAK,MAAM;EACnC,OAAO;CACR,GAAG,CAAC,CAAC;AACN;AACA,SAAS,OAAO,OAAO;CACtB,OAAO,UAAU,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