standard-log 13.1.0 → 13.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/standard-log.esm.js
CHANGED
|
@@ -408,17 +408,53 @@ function createConsoleLogReporter(options) {
|
|
|
408
408
|
});
|
|
409
409
|
}
|
|
410
410
|
//#endregion
|
|
411
|
-
//#region ../../node_modules/.pnpm/iso-error@
|
|
412
|
-
|
|
413
|
-
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
}
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
411
|
+
//#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
|
+
function _typeof(o) {
|
|
413
|
+
"@babel/helpers - typeof";
|
|
414
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
415
|
+
return typeof o;
|
|
416
|
+
} : function(o) {
|
|
417
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
418
|
+
}, _typeof(o);
|
|
419
|
+
}
|
|
420
|
+
//#endregion
|
|
421
|
+
//#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
|
+
function toPrimitive(t, r) {
|
|
423
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
424
|
+
var e = t[Symbol.toPrimitive];
|
|
425
|
+
if (void 0 !== e) {
|
|
426
|
+
var i = e.call(t, r || "default");
|
|
427
|
+
if ("object" != _typeof(i)) return i;
|
|
428
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
429
|
+
}
|
|
430
|
+
return ("string" === r ? String : Number)(t);
|
|
431
|
+
}
|
|
432
|
+
//#endregion
|
|
433
|
+
//#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
|
+
function toPropertyKey(t) {
|
|
435
|
+
var i = toPrimitive(t, "string");
|
|
436
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
437
|
+
}
|
|
438
|
+
//#endregion
|
|
439
|
+
//#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
|
+
function _defineProperty(e, r, t) {
|
|
441
|
+
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
442
|
+
value: t,
|
|
443
|
+
enumerable: !0,
|
|
444
|
+
configurable: !0,
|
|
445
|
+
writable: !0
|
|
446
|
+
}) : e[r] = t, e;
|
|
447
|
+
}
|
|
448
|
+
//#endregion
|
|
449
|
+
//#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
|
+
function _assertClassBrand(e, t, n) {
|
|
451
|
+
if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
452
|
+
throw new TypeError("Private element is not present on this object");
|
|
453
|
+
}
|
|
454
|
+
//#endregion
|
|
455
|
+
//#region ../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/index.js
|
|
420
456
|
// istanbul ignore next
|
|
421
|
-
if (!Error.captureStackTrace) Error.captureStackTrace =
|
|
457
|
+
if (!Error.captureStackTrace) Error.captureStackTrace = (error) => {
|
|
422
458
|
const container = /* @__PURE__ */ new Error();
|
|
423
459
|
Object.defineProperty(error, "stack", {
|
|
424
460
|
configurable: true,
|
|
@@ -426,7 +462,7 @@ if (!Error.captureStackTrace) Error.captureStackTrace = function(error) {
|
|
|
426
462
|
defineStack(this, container.stack);
|
|
427
463
|
return container.stack;
|
|
428
464
|
},
|
|
429
|
-
set:
|
|
465
|
+
set: (stack) => {
|
|
430
466
|
defineStack(error, stack);
|
|
431
467
|
}
|
|
432
468
|
});
|
|
@@ -441,12 +477,7 @@ function defineStack(target, value) {
|
|
|
441
477
|
}
|
|
442
478
|
var SerializableConverter = class {
|
|
443
479
|
constructor() {
|
|
444
|
-
|
|
445
|
-
enumerable: true,
|
|
446
|
-
configurable: true,
|
|
447
|
-
writable: true,
|
|
448
|
-
value: []
|
|
449
|
-
});
|
|
480
|
+
_defineProperty(this, "plugins", []);
|
|
450
481
|
}
|
|
451
482
|
addPlugin(plugin) {
|
|
452
483
|
this.plugins.unshift(plugin);
|
|
@@ -464,7 +495,8 @@ var SerializableConverter = class {
|
|
|
464
495
|
const { message, errors, ...rest } = json;
|
|
465
496
|
// istanbul ignore next
|
|
466
497
|
if (global.AggregateError) return Object.assign(new AggregateError(errors, message), rest);
|
|
467
|
-
|
|
498
|
+
/* v8 ignore next 4 -- fallback for runtimes without AggregateError */
|
|
499
|
+
return Object.assign(new Error(message), {
|
|
468
500
|
...rest,
|
|
469
501
|
errors
|
|
470
502
|
});
|
|
@@ -478,7 +510,7 @@ var SerializableConverter = class {
|
|
|
478
510
|
return Object.assign(new IsoError(message, causeError ? { cause: causeError } : void 0), rest);
|
|
479
511
|
}
|
|
480
512
|
deserializeError(json) {
|
|
481
|
-
let err
|
|
513
|
+
let err;
|
|
482
514
|
for (const { fromSerializable } of this.plugins) {
|
|
483
515
|
err = fromSerializable(json);
|
|
484
516
|
if (err) break;
|
|
@@ -499,7 +531,8 @@ var SerializableConverter = class {
|
|
|
499
531
|
errors: err.errors.map(this.toSerializableImpl)
|
|
500
532
|
};
|
|
501
533
|
if (err instanceof Error) {
|
|
502
|
-
const { message
|
|
534
|
+
const { message } = err;
|
|
535
|
+
const cause = err.cause;
|
|
503
536
|
return cause ? {
|
|
504
537
|
...err,
|
|
505
538
|
name: err.constructor.name,
|
|
@@ -575,9 +608,11 @@ var IsoError = class IsoError extends Error {
|
|
|
575
608
|
const messages = [];
|
|
576
609
|
if (err instanceof ModuleError) messages.push(`${err.name}(${err.module}): ${err.message}`);
|
|
577
610
|
else if (err instanceof Error) messages.push(`${err.name}: ${err.message}`);
|
|
578
|
-
if (isAggregateError(err)) err.errors.forEach((e) =>
|
|
611
|
+
if (isAggregateError(err)) err.errors.forEach((e) => {
|
|
612
|
+
messages.push(...this.trace(e).split("\n").map((s) => ` ${s}`));
|
|
613
|
+
});
|
|
579
614
|
if (err instanceof Error) {
|
|
580
|
-
if (
|
|
615
|
+
if (_assertClassBrand(IsoError, this, _hasCause).call(this, err)) messages.push(...this.trace(err.cause).split("\n").map((s) => " " + s));
|
|
581
616
|
} else messages.push(typeof err === "string" ? err : JSON.stringify(err));
|
|
582
617
|
return messages.join("\n");
|
|
583
618
|
}
|
|
@@ -586,30 +621,28 @@ var IsoError = class IsoError extends Error {
|
|
|
586
621
|
}
|
|
587
622
|
constructor(message, options) {
|
|
588
623
|
super(message);
|
|
589
|
-
|
|
590
|
-
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
value: void 0
|
|
606
|
-
});
|
|
624
|
+
_defineProperty(
|
|
625
|
+
this,
|
|
626
|
+
/**
|
|
627
|
+
* Name of the error
|
|
628
|
+
*/
|
|
629
|
+
"name",
|
|
630
|
+
void 0
|
|
631
|
+
);
|
|
632
|
+
_defineProperty(
|
|
633
|
+
this,
|
|
634
|
+
/**
|
|
635
|
+
* Error cause
|
|
636
|
+
*/
|
|
637
|
+
"cause",
|
|
638
|
+
void 0
|
|
639
|
+
);
|
|
607
640
|
const actualProto = new.target.prototype;
|
|
608
641
|
this.name = actualProto.constructor.name;
|
|
609
642
|
// istanbul ignore next
|
|
610
643
|
if (Object.setPrototypeOf) Object.setPrototypeOf(this, actualProto);
|
|
611
644
|
else this.__proto__ = actualProto;
|
|
612
|
-
if (options?.cause) this.cause =
|
|
645
|
+
if (options?.cause) this.cause = _toIsoError.call(IsoError, options.cause);
|
|
613
646
|
if (options?.ssf) Error.captureStackTrace(this, options.ssf);
|
|
614
647
|
}
|
|
615
648
|
toString() {
|
|
@@ -619,17 +652,13 @@ var IsoError = class IsoError extends Error {
|
|
|
619
652
|
return IsoError.trace(this);
|
|
620
653
|
}
|
|
621
654
|
};
|
|
622
|
-
|
|
655
|
+
function _hasCause(x) {
|
|
623
656
|
return !!x.cause;
|
|
624
|
-
}
|
|
657
|
+
}
|
|
658
|
+
function _toIsoError(err) {
|
|
625
659
|
return Object.assign(err, { name: err.name ?? err.constructor.name });
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
enumerable: true,
|
|
629
|
-
configurable: true,
|
|
630
|
-
writable: true,
|
|
631
|
-
value: new SerializableConverter()
|
|
632
|
-
});
|
|
660
|
+
}
|
|
661
|
+
_defineProperty(IsoError, "converter", new SerializableConverter());
|
|
633
662
|
/**
|
|
634
663
|
* An IsoError with a module property.
|
|
635
664
|
*/
|
|
@@ -639,12 +668,7 @@ var ModuleError = class extends IsoError {
|
|
|
639
668
|
*/
|
|
640
669
|
constructor(module, message, options) {
|
|
641
670
|
super(message, options);
|
|
642
|
-
|
|
643
|
-
enumerable: true,
|
|
644
|
-
configurable: true,
|
|
645
|
-
writable: true,
|
|
646
|
-
value: module
|
|
647
|
-
});
|
|
671
|
+
this.module = module;
|
|
648
672
|
}
|
|
649
673
|
};
|
|
650
674
|
function isAggregateError(error) {
|
|
@@ -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.3/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","var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _a, _IsoError_hasCause, _IsoError_toIsoError;\n//#region captureStackTrace polyfill\n// istanbul ignore next\nif (!Error.captureStackTrace) {\n Error.captureStackTrace = function (error) {\n const container = new Error();\n Object.defineProperty(error, 'stack', {\n configurable: true,\n get: function () {\n // Replace property with value for faster future accesses.\n defineStack(this, container.stack);\n return container.stack;\n },\n set: function (stack) {\n defineStack(error, stack);\n }\n });\n };\n}\n// istanbul ignore next\nfunction defineStack(target, value) {\n Object.defineProperty(target, 'stack', {\n configurable: true,\n value,\n writable: true\n });\n}\nexport class SerializableConverter {\n constructor() {\n Object.defineProperty(this, \"plugins\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n }\n addPlugin(plugin) {\n this.plugins.unshift(plugin);\n }\n /**\n * Deserialize an `Error` from `Serializable`\n */\n fromSerializable(json, options) {\n const err = this.deserializeError(json);\n Error.captureStackTrace(err, options?.ssf);\n return err;\n }\n fromSerializableImpl(json) {\n if (json['name'] === 'AggregateError') {\n const { message, errors, ...rest } = json;\n // @ts-ignore\n // istanbul ignore next\n if (global.AggregateError) {\n return Object.assign(new AggregateError(errors, message), rest);\n }\n else {\n return Object.assign(new Error(message), {\n ...rest,\n errors\n });\n }\n }\n const { message, cause, ...rest } = json;\n const causeError = cause ? this.deserializeError(cause) : undefined;\n if (json['name'] === 'Error') {\n return Object.assign(new Error(message), causeError ? { ...rest, cause: causeError } : rest);\n }\n // @ts-ignore\n return Object.assign(new IsoError(message, causeError ? { cause: causeError } : undefined), rest);\n }\n deserializeError(json) {\n let err = undefined;\n for (const { fromSerializable } of this.plugins) {\n err = fromSerializable(json);\n if (err)\n break;\n }\n return err || this.fromSerializableImpl(json);\n }\n /**\n * Serialize `Error` to `Serializable`\n */\n toSerializable(err) {\n return (this.plugins.reduce((p, s) => p || s.toSerializable(err), undefined) || this.toSerializableImpl(err));\n }\n toSerializableImpl(err) {\n if (isAggregateError(err)) {\n return {\n ...err,\n name: err.constructor.name,\n message: err.message,\n errors: err.errors.map(this.toSerializableImpl)\n };\n }\n if (err instanceof Error) {\n const { message, cause } = err;\n return cause\n ? { ...err, name: err.constructor.name, message, cause: this.toSerializableImpl(cause) }\n : { ...err, name: err.constructor.name, message };\n }\n return err;\n }\n}\nconst getCircularReplacer = () => {\n const seen = new WeakSet();\n return (_, value) => {\n if (typeof value === 'object' && value !== null) {\n if (seen.has(value)) {\n return;\n }\n seen.add(value);\n }\n return value;\n };\n};\n/**\n * Isomorphic Error that works across physical boundary.\n */\nclass IsoError extends Error {\n /**\n * Create an IsoError with additional properties without the need to create a new class.\n * @param props properties of the IsoError\n */\n static create(props) {\n const { message, cause, ...rest } = props;\n const err = new IsoError(message, { cause, ssf: IsoError.create });\n return Object.assign(err, rest);\n }\n static stringify(err) {\n return this.serialize(err);\n }\n static serialize(err) {\n return JSON.stringify(this.toSerializable(err), getCircularReplacer());\n }\n static toSerializable(err) {\n return this.converter.toSerializable(err);\n }\n /**\n * @type P Additional properties of the IsoError\n * @param text Json representation of a IsoError\n */\n static parse(text) {\n const json = JSON.parse(text);\n return this.converter.fromSerializable(json, { ssf: IsoError.parse });\n }\n /**\n * @type P Additional properties of the IsoError\n * @param text Json representation of a IsoError\n */\n static deserialize(text) {\n const json = JSON.parse(text);\n return this.converter.fromSerializable(json, { ssf: IsoError.deserialize });\n }\n static fromSerializable(json) {\n return this.converter.fromSerializable(json, { ssf: IsoError.fromSerializable });\n }\n /**\n * returns the error message including the error causes.\n */\n static trace(err) {\n const messages = [];\n if (err instanceof ModuleError) {\n messages.push(`${err.name}(${err.module}): ${err.message}`);\n }\n else if (err instanceof Error) {\n messages.push(`${err.name}: ${err.message}`);\n }\n if (isAggregateError(err)) {\n err.errors.forEach(e => messages.push(...this.trace(e)\n .split('\\n')\n .map(s => ' ' + s)));\n }\n if (err instanceof Error) {\n if (__classPrivateFieldGet(this, _a, \"m\", _IsoError_hasCause).call(this, err))\n messages.push(...this.trace(err.cause)\n .split('\\n')\n .map(s => ' ' + s));\n }\n else {\n messages.push(typeof err === 'string' ? err : JSON.stringify(err));\n }\n return messages.join('\\n');\n }\n static addPlugin(plugin) {\n this.converter.addPlugin(plugin);\n }\n constructor(message, options) {\n super(message);\n /**\n * Name of the error\n */\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * Error cause\n */\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n // restore prototype chain\n const actualProto = new.target.prototype;\n this.name = actualProto.constructor.name;\n // istanbul ignore next\n if (Object.setPrototypeOf)\n Object.setPrototypeOf(this, actualProto);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n else\n this.__proto__ = actualProto;\n if (options?.cause)\n this.cause = __classPrivateFieldGet(IsoError, _a, \"m\", _IsoError_toIsoError).call(IsoError, options.cause);\n if (options?.ssf)\n Error.captureStackTrace(this, options.ssf);\n }\n toString() {\n return IsoError.serialize(this);\n }\n trace() {\n return IsoError.trace(this);\n }\n}\n_a = IsoError, _IsoError_hasCause = function _IsoError_hasCause(x) {\n return !!x.cause;\n}, _IsoError_toIsoError = function _IsoError_toIsoError(err) {\n // When the error is an internal error from deserialization,\n // the err.constructor.name is object.\n // I have to to Object.assign to keep the err instance and its stack trace.\n return Object.assign(err, { name: err.name ?? err.constructor.name });\n};\nObject.defineProperty(IsoError, \"converter\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new SerializableConverter()\n});\nexport { IsoError };\n/**\n * An IsoError with a module property.\n */\nexport class ModuleError extends IsoError {\n /**\n * @param module The module that defines this error.\n */\n constructor(module, message, options) {\n super(message, options);\n Object.defineProperty(this, \"module\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: module\n });\n }\n}\nexport function isAggregateError(error) {\n return error instanceof Error && Array.isArray(error.errors);\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],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,SAAS,SAAS,SAAS,SAAS;CAC5C,OAAO,MAAM;EACZ;EACA;EACA;CACD,IAAI,GAAG,MAAM;EACZ,OAAO;GACN,GAAG;GACH,GAAG;EACJ;CACD,CAAC;AACF;AAQA,SAAS,MAAM,SAAS,SAAS;CAChC,IAAI,QAAQ,OAAO,KAAK,KAAK,QAAQ,OAAO,MAAM,OAAO,QAAQ;CACjE,OAAO,QAAQ,QAAQ,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,SAAS,CAAC,CAAC;AACrD;AAoBA,SAAS,UAAU,IAAI,IAAI,IAAI;CAC9B,IAAI,OAAO,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,QAAQ,UAAU,KAAK;A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I,MAAM,yBAAyB,OAAO;CAE3C,IAAI,aAAa;AAClB"}
|
|
1
|
+
{"version":3,"file":"standard-log.esm.js","names":["ms"],"sources":["../../../node_modules/.pnpm/unpartial@1.0.7/node_modules/unpartial/esm/index.js","../../../node_modules/.pnpm/type-plus@8.0.0-beta.10_typescript@7.0.2/node_modules/type-plus/esm/object/mapKey.js","../../../node_modules/.pnpm/type-plus@8.0.0-beta.10_typescript@7.0.2/node_modules/type-plus/esm/object/reduceKey.js","../../../node_modules/.pnpm/type-plus@8.0.0-beta.10_typescript@7.0.2/node_modules/type-plus/esm/object/record.js","../../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js","../ts/log_levels.ts","../ts/formatter.ts","../ts/platform.browser.ts","../ts/console.ts","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/typeof.js","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/toPrimitive.js","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/toPropertyKey.js","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/defineProperty.js","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/assertClassBrand.js","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/index.js","../ts/errors.ts","../ts/memory.ts","../ts/log_store.ts","../ts/logger.ts","../ts/standard_log.ctx.ts","../ts/standard_log.ts"],"sourcesContent":["//#region ts/index.ts\nfunction required(source1, source2, source3) {\n\treturn merge([\n\t\tsource1,\n\t\tsource2,\n\t\tsource3\n\t], (p, e) => {\n\t\treturn {\n\t\t\t...p,\n\t\t\t...e\n\t\t};\n\t});\n}\nfunction requiredDeep(source1, source2, source3) {\n\treturn merge([\n\t\tsource1,\n\t\tsource2,\n\t\tsource3\n\t], (p, e) => deepmerge(p, e));\n}\nfunction merge(entries, reducer) {\n\tif (entries[0] === void 0 || entries[0] === null) return entries[0];\n\treturn entries.filter((x) => !!x).reduce(reducer, {});\n}\nfunction deepmerge(source1, source2) {\n\tif (typeof source1 !== \"object\" || source1 === null) return source2 !== void 0 ? source2 : source1;\n\tif (Array.isArray(source1)) {\n\t\tif (Array.isArray(source2)) return source2;\n\t\tif (source2 === void 0) return [...source1];\n\t\treturn [...source1, source2];\n\t}\n\treturn getAllKeys(source1).concat(getAllKeys(source2)).reduce((p, k) => {\n\t\tp[k] = deepmerge(source1[k], source2 && source2[k]);\n\t\treturn p;\n\t}, {});\n}\nfunction getAllKeys(subject, internal = false) {\n\tif (typeof subject !== \"object\") return [];\n\tconst propertyNames = Object.getOwnPropertyNames(subject);\n\tconst keys = internal ? propertyNames.filter((n) => n !== \"constructor\") : propertyNames;\n\tconst proto = Object.getPrototypeOf(subject);\n\treturn proto !== Object.prototype ? keys.concat(getAllKeys(proto, true)) : keys;\n}\nfunction unpartial(s1, s2, s3) {\n\tif (s1 === void 0 || s1 === null) return s1;\n\treturn [\n\t\ts1,\n\t\ts2,\n\t\ts3\n\t].filter(notNil).reduce((p, s) => ({\n\t\t...p,\n\t\t...trimNilProps(s)\n\t}), {});\n}\nfunction trimNilProps(value) {\n\treturn Object.keys(value).reduce((p, k) => {\n\t\tif (notNil(value[k])) p[k] = value[k];\n\t\treturn p;\n\t}, {});\n}\nfunction notNil(value) {\n\treturn value !== null && value !== void 0;\n}\nfunction unpartialRecursively(arg1, arg2, arg3) {\n\treturn requiredDeep(arg1, arg2, arg3);\n}\n//#endregion\nexport { required, requiredDeep, unpartial, unpartialRecursively };\n\n//# sourceMappingURL=index.js.map","export function mapKey(subject, predicate, thisArg) {\n return Object.keys(subject).map(function (k, i, a) {\n return predicate.apply(this, [k, i, a, subject]);\n }, thisArg);\n}\n//# sourceMappingURL=mapKey.js.map","export function reduceByKey(subject, callbackfn, initialValue) {\n return Object.keys(subject).reduce((p, k, i, a) => callbackfn(p, k, i, a, subject), initialValue);\n}\n/**\n * @deprecated renamed to reduceByKey\n */\nexport const reduceKey = reduceByKey;\n//# sourceMappingURL=reduceKey.js.map","export function record(value) {\n const r = Object.create(null);\n return (value ? Object.assign(r, value) : r);\n}\n//# sourceMappingURL=record.js.map","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","export const logLevels = {\n\t/**\n\t * none: 0\n\t */\n\tnone: 0 as const,\n\t/**\n\t * emergency: 100\n\t *\n\t * emergency -> alert\n\t */\n\temergency: 100 as const,\n\t/**\n\t * alert: 200\n\t *\n\t * emergency -> alert -> critical\n\t */\n\talert: 200 as const,\n\t/**\n\t * critical: 300\n\t *\n\t * alert -> critical -> error\n\t */\n\tcritical: 300 as const,\n\t/**\n\t * error: 400\n\t *\n\t * critical -> error -> warn\n\t */\n\terror: 400 as const,\n\t/**\n\t * warn: 500\n\t *\n\t * error -> warn -> notice\n\t */\n\twarn: 500 as const,\n\t/**\n\t * notice: 600\n\t *\n\t * warn -> notice -> info\n\t */\n\tnotice: 600 as const,\n\t/**\n\t * info: 700\n\t *\n\t * notice -> info -> debug\n\t */\n\tinfo: 700 as const,\n\t/**\n\t * debug: 800\n\t *\n\t * info -> debug -> trace\n\t */\n\tdebug: 800 as const,\n\t/**\n\t * trace: 900\n\t *\n\t * debug -> trace -> planck\n\t */\n\ttrace: 900 as const,\n\t/**\n\t * planck: Infinity\n\t * `planck unit` is a very small unit <https://en.wikipedia.org/wiki/Planck_units>.\n\t *\n\t * trace -> planck\n\t */\n\tplanck: Number.POSITIVE_INFINITY,\n\t/**\n\t * all: Infinity\n\t */\n\tall: Number.POSITIVE_INFINITY\n}\n\n/**\n * Convert default log level value to log level name.\n */\nexport function toLogLevelName(level: number) {\n\tif (level <= 100) return 'emergency'\n\tif (level <= 200) return 'alert'\n\tif (level <= 300) return 'critical'\n\tif (level <= 400) return 'error'\n\tif (level <= 500) return 'warn'\n\tif (level <= 600) return 'notice'\n\tif (level <= 700) return 'info'\n\tif (level <= 800) return 'debug'\n\tif (level <= 900) return 'trace'\n\treturn 'planck'\n}\n\n/**\n * Convert default log level name to log level value.\n */\nexport function toLogLevel(name: string): number | undefined {\n\treturn (logLevels as any)[name.toLocaleLowerCase()]\n}\n\nexport const DEFAULT_LOG_METHOD_NAMES: string[] = [\n\t'emergency',\n\t'alert',\n\t'critical',\n\t'error',\n\t'warn',\n\t'notice',\n\t'info',\n\t'debug',\n\t'trace',\n\t'planck'\n]\n","import ms from 'ms'\nimport { toLogLevelName } from './log_levels.js'\nimport type { LogEntry } from './types.js'\n\nexport type TimestampFormat = 'none' | 'iso' | 'elapsed'\n\nexport function createTimestampFormatter(format: TimestampFormat): (timestamp: Date) => string | undefined {\n\tswitch (format) {\n\t\tcase 'none':\n\t\t\treturn (_timestamp: Date) => undefined\n\t\tcase 'iso':\n\t\t\treturn (timestamp: Date) => timestamp.toISOString()\n\t\tcase 'elapsed': {\n\t\t\tlet lastTick: number\n\t\t\treturn (timestamp: Date) => {\n\t\t\t\tconst newTick = timestamp.getTime()\n\t\t\t\tconst result = ms(lastTick === undefined ? 0 : newTick - lastTick)\n\t\t\t\tlastTick = newTick\n\t\t\t\treturn result\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport function formatLogLevel(level: number) {\n\treturn `(${toLogLevelName(level).toUpperCase()})`\n}\n\n/**\n * Formats log entry as plain text with the following format:\n * `timestamp id level ...args`\n *\n * This is typically useful for writing logs to file\n */\nexport function plainLogFormatter({ id, level, args, timestamp }: LogEntry) {\n\treturn [timestamp.toISOString(), id, formatLogLevel(level), ...args]\n}\n\n/**\n * Formats log entry like default console log.\n */\nexport function consoleFormatter({ args }: LogEntry) {\n\treturn args\n}\n","import { record } from 'type-plus'\nimport type { ConsoleLike, LogEntry } from './types.js'\n\nexport const toInspectLogEntry = (e: LogEntry) => e\n\nexport const polyfill: { console?: ConsoleLike } = record()\n","import { unpartial } from 'type-plus'\nimport { consoleFormatter } from './formatter.js'\nimport { logLevels } from './log_levels.js'\nimport { polyfill } from './platform.js'\nimport type { ConsoleLike, LogEntry, LogFormatter, LogReporter, LogReporterOptions } from './types.js'\n\nexport function toConsoleMethod(level: number) {\n\tswitch (true) {\n\t\t// edge case in case none is somehow written\n\t\tcase level <= 0:\n\t\t\treturn 'debug'\n\t\tcase level <= logLevels.error:\n\t\t\treturn 'error'\n\t\tcase level <= logLevels.warn:\n\t\t\treturn 'warn'\n\t\tcase level <= logLevels.info:\n\t\t\treturn 'info'\n\t\tdefault:\n\t\t\treturn 'debug'\n\t}\n}\n\n// istanbul ignore next\n/* eslint-disable no-console */\nfunction buildPolyfillConsole() {\n\t// old phantomjs does not have bind function\n\tconst hasBind = !!console.log.bind as boolean\n\tif (hasBind) {\n\t\treturn {\n\t\t\t// the `typeof` guards against IE where `console.log.apply()`\n\t\t\t// results in error `Object doesn't support property or method 'apply'`\n\t\t\tdebug: (typeof console.info === 'function' ? console.debug : console.log).bind(console),\n\t\t\tinfo: (typeof console.info === 'function' ? console.info : console.log).bind(console),\n\t\t\twarn: (typeof console.warn === 'function' ? console.warn : console.log).bind(console),\n\t\t\terror: (typeof console.error === 'function' ? console.error : console.log).bind(console)\n\t\t}\n\t}\n\treturn {\n\t\tdebug: buildFn(typeof console.debug === 'function' ? 'debug' : 'log'),\n\t\tinfo: buildFn(typeof console.info === 'function' ? 'info' : 'log'),\n\t\twarn: buildFn(typeof console.warn === 'function' ? 'warn' : 'log'),\n\t\terror: buildFn(typeof console.error === 'function' ? 'error' : 'log')\n\t}\n}\n\n// istanbul ignore next\nfunction buildFn(name: 'debug' | 'info' | 'warn' | 'error' | 'log') {\n\treturn (...args: any[]) => {\n\t\tconsole[name](...args)\n\t}\n}\n\nexport type ConsoleLogFormatter = LogFormatter<any[]>\nexport type ConsoleLogReporter = LogReporter<any[]> & { console: ConsoleLike }\nexport type ConsoleLogReporterOptions = LogReporterOptions<any[]>\n\nexport function createConsoleLogReporter(options?: ConsoleLogReporterOptions): ConsoleLogReporter {\n\tconst { id, formatter, filter } = unpartial({ id: 'console', formatter: consoleFormatter }, options)\n\tif (!polyfill.console) polyfill.console = buildPolyfillConsole()\n\n\treturn Object.freeze({\n\t\tid,\n\t\tisConsoleReporter: true,\n\t\tget formatter() {\n\t\t\treturn formatter\n\t\t},\n\t\tget filter() {\n\t\t\treturn filter\n\t\t},\n\t\tconsole: polyfill.console,\n\t\twrite(entry: LogEntry) {\n\t\t\tif (filter && !filter(entry)) return\n\t\t\tconst values = formatter(entry)\n\t\t\tconst method = toConsoleMethod(entry.level)\n\t\t\tthis.console[method](...values)\n\t\t}\n\t})\n}\n","//#region \\0@oxc-project+runtime@0.147.0/helpers/esm/typeof.js\nfunction _typeof(o) {\n\t\"@babel/helpers - typeof\";\n\treturn _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(o) {\n\t\treturn typeof o;\n\t} : function(o) {\n\t\treturn o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n\t}, _typeof(o);\n}\n//#endregion\nexport { _typeof as default };\n","import _typeof from \"./typeof.js\";\n//#region \\0@oxc-project+runtime@0.147.0/helpers/esm/toPrimitive.js\nfunction toPrimitive(t, r) {\n\tif (\"object\" != _typeof(t) || !t) return t;\n\tvar e = t[Symbol.toPrimitive];\n\tif (void 0 !== e) {\n\t\tvar i = e.call(t, r || \"default\");\n\t\tif (\"object\" != _typeof(i)) return i;\n\t\tthrow new TypeError(\"@@toPrimitive must return a primitive value.\");\n\t}\n\treturn (\"string\" === r ? String : Number)(t);\n}\n//#endregion\nexport { toPrimitive as default };\n","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\n//#region \\0@oxc-project+runtime@0.147.0/helpers/esm/toPropertyKey.js\nfunction toPropertyKey(t) {\n\tvar i = toPrimitive(t, \"string\");\n\treturn \"symbol\" == _typeof(i) ? i : i + \"\";\n}\n//#endregion\nexport { toPropertyKey as default };\n","import toPropertyKey from \"./toPropertyKey.js\";\n//#region \\0@oxc-project+runtime@0.147.0/helpers/esm/defineProperty.js\nfunction _defineProperty(e, r, t) {\n\treturn (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n\t\tvalue: t,\n\t\tenumerable: !0,\n\t\tconfigurable: !0,\n\t\twritable: !0\n\t}) : e[r] = t, e;\n}\n//#endregion\nexport { _defineProperty as default };\n","//#region \\0@oxc-project+runtime@0.147.0/helpers/esm/assertClassBrand.js\nfunction _assertClassBrand(e, t, n) {\n\tif (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;\n\tthrow new TypeError(\"Private element is not present on this object\");\n}\n//#endregion\nexport { _assertClassBrand as default };\n","import _defineProperty from \"./_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/defineProperty.js\";\nimport _assertClassBrand from \"./_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/assertClassBrand.js\";\n//#region ts/index.ts\n// istanbul ignore next\nif (!Error.captureStackTrace) Error.captureStackTrace = (error) => {\n\tconst container = /* @__PURE__ */ new Error();\n\tObject.defineProperty(error, \"stack\", {\n\t\tconfigurable: true,\n\t\tget: function() {\n\t\t\tdefineStack(this, container.stack);\n\t\t\treturn container.stack;\n\t\t},\n\t\tset: (stack) => {\n\t\t\tdefineStack(error, stack);\n\t\t}\n\t});\n};\n// istanbul ignore next\nfunction defineStack(target, value) {\n\tObject.defineProperty(target, \"stack\", {\n\t\tconfigurable: true,\n\t\tvalue,\n\t\twritable: true\n\t});\n}\nvar SerializableConverter = class {\n\tconstructor() {\n\t\t_defineProperty(this, \"plugins\", []);\n\t}\n\taddPlugin(plugin) {\n\t\tthis.plugins.unshift(plugin);\n\t}\n\t/**\n\t* Deserialize an `Error` from `Serializable`\n\t*/\n\tfromSerializable(json, options) {\n\t\tconst err = this.deserializeError(json);\n\t\tError.captureStackTrace(err, options?.ssf);\n\t\treturn err;\n\t}\n\tfromSerializableImpl(json) {\n\t\tif (json[\"name\"] === \"AggregateError\") {\n\t\t\tconst { message, errors, ...rest } = json;\n\t\t\t// istanbul ignore next\n\t\t\tif (global.AggregateError) return Object.assign(new AggregateError(errors, message), rest);\n\t\t\t/* v8 ignore next 4 -- fallback for runtimes without AggregateError */\n\t\t\treturn Object.assign(new Error(message), {\n\t\t\t\t...rest,\n\t\t\t\terrors\n\t\t\t});\n\t\t}\n\t\tconst { message, cause, ...rest } = json;\n\t\tconst causeError = cause ? this.deserializeError(cause) : void 0;\n\t\tif (json[\"name\"] === \"Error\") return Object.assign(new Error(message), causeError ? {\n\t\t\t...rest,\n\t\t\tcause: causeError\n\t\t} : rest);\n\t\treturn Object.assign(new IsoError(message, causeError ? { cause: causeError } : void 0), rest);\n\t}\n\tdeserializeError(json) {\n\t\tlet err;\n\t\tfor (const { fromSerializable } of this.plugins) {\n\t\t\terr = fromSerializable(json);\n\t\t\tif (err) break;\n\t\t}\n\t\treturn err || this.fromSerializableImpl(json);\n\t}\n\t/**\n\t* Serialize `Error` to `Serializable`\n\t*/\n\ttoSerializable(err) {\n\t\treturn this.plugins.reduce((p, s) => p || s.toSerializable(err), void 0) || this.toSerializableImpl(err);\n\t}\n\ttoSerializableImpl(err) {\n\t\tif (isAggregateError(err)) return {\n\t\t\t...err,\n\t\t\tname: err.constructor.name,\n\t\t\tmessage: err.message,\n\t\t\terrors: err.errors.map(this.toSerializableImpl)\n\t\t};\n\t\tif (err instanceof Error) {\n\t\t\tconst { message } = err;\n\t\t\tconst cause = err.cause;\n\t\t\treturn cause ? {\n\t\t\t\t...err,\n\t\t\t\tname: err.constructor.name,\n\t\t\t\tmessage,\n\t\t\t\tcause: this.toSerializableImpl(cause)\n\t\t\t} : {\n\t\t\t\t...err,\n\t\t\t\tname: err.constructor.name,\n\t\t\t\tmessage\n\t\t\t};\n\t\t}\n\t\treturn err;\n\t}\n};\nconst getCircularReplacer = () => {\n\tconst seen = /* @__PURE__ */ new WeakSet();\n\treturn (_, value) => {\n\t\tif (typeof value === \"object\" && value !== null) {\n\t\t\tif (seen.has(value)) return;\n\t\t\tseen.add(value);\n\t\t}\n\t\treturn value;\n\t};\n};\n/**\n* Isomorphic Error that works across physical boundary.\n*/\nvar IsoError = class IsoError extends Error {\n\t/**\n\t* Create an IsoError with additional properties without the need to create a new class.\n\t* @param props properties of the IsoError\n\t*/\n\tstatic create(props) {\n\t\tconst { message, cause, ...rest } = props;\n\t\tconst err = new IsoError(message, {\n\t\t\tcause,\n\t\t\tssf: IsoError.create\n\t\t});\n\t\treturn Object.assign(err, rest);\n\t}\n\tstatic stringify(err) {\n\t\treturn this.serialize(err);\n\t}\n\tstatic serialize(err) {\n\t\treturn JSON.stringify(this.toSerializable(err), getCircularReplacer());\n\t}\n\tstatic toSerializable(err) {\n\t\treturn this.converter.toSerializable(err);\n\t}\n\t/**\n\t* @type P Additional properties of the IsoError\n\t* @param text Json representation of a IsoError\n\t*/\n\tstatic parse(text) {\n\t\tconst json = JSON.parse(text);\n\t\treturn this.converter.fromSerializable(json, { ssf: IsoError.parse });\n\t}\n\t/**\n\t* @type P Additional properties of the IsoError\n\t* @param text Json representation of a IsoError\n\t*/\n\tstatic deserialize(text) {\n\t\tconst json = JSON.parse(text);\n\t\treturn this.converter.fromSerializable(json, { ssf: IsoError.deserialize });\n\t}\n\tstatic fromSerializable(json) {\n\t\treturn this.converter.fromSerializable(json, { ssf: IsoError.fromSerializable });\n\t}\n\t/**\n\t* returns the error message including the error causes.\n\t*/\n\tstatic trace(err) {\n\t\tconst messages = [];\n\t\tif (err instanceof ModuleError) messages.push(`${err.name}(${err.module}): ${err.message}`);\n\t\telse if (err instanceof Error) messages.push(`${err.name}: ${err.message}`);\n\t\tif (isAggregateError(err)) err.errors.forEach((e) => {\n\t\t\tmessages.push(...this.trace(e).split(\"\\n\").map((s) => ` ${s}`));\n\t\t});\n\t\tif (err instanceof Error) {\n\t\t\tif (_assertClassBrand(IsoError, this, _hasCause).call(this, err)) messages.push(...this.trace(err.cause).split(\"\\n\").map((s) => \" \" + s));\n\t\t} else messages.push(typeof err === \"string\" ? err : JSON.stringify(err));\n\t\treturn messages.join(\"\\n\");\n\t}\n\tstatic addPlugin(plugin) {\n\t\tthis.converter.addPlugin(plugin);\n\t}\n\tconstructor(message, options) {\n\t\tsuper(message);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Name of the error\n\t\t\t*/\n\t\t\t\"name\",\n\t\t\tvoid 0\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Error cause\n\t\t\t*/\n\t\t\t\"cause\",\n\t\t\tvoid 0\n\t\t);\n\t\tconst actualProto = new.target.prototype;\n\t\tthis.name = actualProto.constructor.name;\n\t\t// istanbul ignore next\n\t\tif (Object.setPrototypeOf) Object.setPrototypeOf(this, actualProto);\n\t\telse this.__proto__ = actualProto;\n\t\tif (options?.cause) this.cause = _toIsoError.call(IsoError, options.cause);\n\t\tif (options?.ssf) Error.captureStackTrace(this, options.ssf);\n\t}\n\ttoString() {\n\t\treturn IsoError.serialize(this);\n\t}\n\ttrace() {\n\t\treturn IsoError.trace(this);\n\t}\n};\nfunction _hasCause(x) {\n\treturn !!x.cause;\n}\nfunction _toIsoError(err) {\n\treturn Object.assign(err, { name: err.name ?? err.constructor.name });\n}\n_defineProperty(IsoError, \"converter\", new SerializableConverter());\n/**\n* An IsoError with a module property.\n*/\nvar ModuleError = class extends IsoError {\n\t/**\n\t* @param module The module that defines this error.\n\t*/\n\tconstructor(module, message, options) {\n\t\tsuper(message, options);\n\t\tthis.module = module;\n\t}\n};\nfunction isAggregateError(error) {\n\treturn error instanceof Error && Array.isArray(error.errors);\n}\n//#endregion\nexport { IsoError, ModuleError, SerializableConverter, isAggregateError };\n\n//# sourceMappingURL=index.js.map","import { type IsoError, ModuleError } from 'iso-error'\n\n/**\n * @deprecated No longer used since 11.2.0\n */\nexport class StandardLogError extends ModuleError {\n\tconstructor(description: string, options?: IsoError.Options) {\n\t\tsuper('standard-log', description, options)\n\t}\n}\n\n/**\n * @deprecated no longer used since 11.2.0\n */\nexport class InvalidId extends StandardLogError {\n\tconstructor(\n\t\tpublic id: string,\n\t\toptions?: IsoError.Options\n\t) {\n\t\tsuper(`logger id only supports alphanumeric, unicode characters, and [:_-.]. Received ${id}`, options)\n\t}\n}\n","import { required, unpartial } from 'type-plus'\nimport { createConsoleLogReporter } from './console.js'\nimport { formatLogLevel } from './formatter.js'\nimport { toInspectLogEntry } from './platform.js'\nimport type { LogEntry, LogFormatter, LogReporter, LogReporterOptions } from './types.js'\n\nexport type MemoryLogReporter = LogReporter<LogEntry> & {\n\tlogs: LogEntry[]\n\t/**\n\t * Gets a simple log message for testing.\n\t * The message only contains arguments for each log entry.\n\t */\n\tgetLogMessage(): string\n\tgetLogMessages(): string[]\n\tgetLogMessageWithLevel(): string\n\tgetLogMessagesWithLevel(): string[]\n\tgetLogMessagesWithIdAndLevel(): string[]\n\temit(): void\n}\n\nexport type MemoryLogFormatter = LogFormatter<LogEntry>\n\nexport function toMessageWithLevel(logs: LogEntry[]) {\n\treturn (\n\t\tlogs\n\t\t\t.map(toInspectLogEntry)\n\t\t\t.map(log => `${formatLogLevel(log.level)} ${log.args.join(' ')}`)\n\t\t\t.join('\\n')\n\t\t\t// if it has more than this log,\n\t\t\t// we assume it is running under tests,\n\t\t\t// and remove this log to simplify testing.\n\t\t\t.replace(/^\\(WARN\\) already configured for test, ignoring config\\(\\) call\\n/, '')\n\t)\n}\n\nexport function createMemoryLogReporter(options?: LogReporterOptions<LogEntry>): MemoryLogReporter {\n\treturn Object.freeze(buildMemoryReporter(unpartial({ id: 'memory' }, options)))\n}\n\nfunction buildMemoryReporter(options?: LogReporterOptions<LogEntry>) {\n\tconst { id, formatter, filter } = required({ id: 'memory', formatter: (e: LogEntry) => e }, options)\n\tconst logs: LogEntry[] = []\n\treturn {\n\t\tid,\n\t\tget formatter() {\n\t\t\treturn formatter\n\t\t},\n\t\tget filter() {\n\t\t\treturn filter\n\t\t},\n\t\tlogs,\n\t\twrite(entry: LogEntry) {\n\t\t\tif (filter && !filter(entry)) return\n\t\t\tlogs.push(formatter(entry))\n\t\t},\n\t\tgetLogMessage() {\n\t\t\treturn this.getLogMessages().join('\\n')\n\t\t},\n\t\tgetLogMessages() {\n\t\t\treturn logs.map(toInspectLogEntry).map(log => log.args.join(' '))\n\t\t},\n\t\tgetLogMessagesWithLevel() {\n\t\t\treturn logs.map(toInspectLogEntry).map(log => `${formatLogLevel(log.level)} ${log.args.join(' ')}`)\n\t\t},\n\t\tgetLogMessagesWithIdAndLevel() {\n\t\t\treturn logs\n\t\t\t\t.map(toInspectLogEntry)\n\t\t\t\t.map(log => `${log.id} ${formatLogLevel(log.level)} ${log.args.join(' ')}`)\n\t\t},\n\t\tgetLogMessageWithLevel() {\n\t\t\treturn toMessageWithLevel(logs)\n\t\t},\n\t\t/**\n\t\t * emit the saved log to console for easy debugging\n\t\t */\n\t\temit() {\n\t\t\tconst reporter = createConsoleLogReporter()\n\t\t\tlogs.forEach(l => reporter.write(l))\n\t\t}\n\t}\n}\n\nexport function createMemoryWithConsoleLogReporter(\n\toptions?: LogReporterOptions<LogEntry>\n): MemoryLogReporter {\n\treturn Object.freeze(\n\t\tObject.assign(buildMemoryReporter(unpartial({ id: 'memory-with-console' }, options)), {\n\t\t\tisConsoleReporter: true\n\t\t})\n\t)\n}\n","import { mapKey, record, reduceByKey, reduceKey } from 'type-plus'\nimport { createConsoleLogReporter } from './console.js'\nimport { logLevels, toLogLevel, toLogLevelName } from './log_levels.js'\nimport type { Logger, LogLevel, LogMethodNames, LogReporter, StandardLogOptions } from './types.js'\n\nexport function createLogStore<N extends string = LogMethodNames>(\n\toptions: Required<StandardLogOptions<N>>\n): LogStore {\n\treturn {\n\t\tloggers: record(),\n\t\tnonConsoleLoggers: record(),\n\t\treporters: options.reporters || [createConsoleLogReporter()],\n\t\tlogLevel: options.logLevel,\n\t\tlogLevelStore: logLevelStore(options)\n\t}\n}\n\nexport interface LogStore {\n\tloggers: Record<string, Logger>\n\tnonConsoleLoggers: Record<string, Logger>\n\treporters: LogReporter[]\n\tlogLevel: LogLevel\n\tlogLevelStore: ReturnType<typeof logLevelStore>\n}\n\nexport interface LogLevelStoreOptions {\n\tcustomLevels?: Record<string, number>\n}\n\nexport function logLevelStore(options: LogLevelStoreOptions) {\n\tconst customLevels = options.customLevels || record()\n\n\tconst store = {\n\t\tcustomLevels,\n\t\tcustomLevelsReverse: reduceByKey(\n\t\t\tcustomLevels,\n\t\t\t(p, k) => {\n\t\t\t\tp[customLevels[k]] = k\n\t\t\t\treturn p\n\t\t\t},\n\t\t\t{} as Record<number, string>\n\t\t)\n\t}\n\treturn {\n\t\tgetName(level: number) {\n\t\t\treturn store.customLevelsReverse[level] ?? toLogLevelName(level)\n\t\t},\n\t\tgetLevel(name: string) {\n\t\t\treturn store.customLevels[name] ?? toLogLevel(name)\n\t\t},\n\t\tgetAllLevels() {\n\t\t\treturn reduceKey(\n\t\t\t\tlogLevels,\n\t\t\t\t(result, name) => {\n\t\t\t\t\tif (name !== 'none' && name !== 'all') result.push({ name, level: logLevels[name] })\n\n\t\t\t\t\treturn result\n\t\t\t\t},\n\t\t\t\tmapKey(store.customLevels, name => ({ name, level: store.customLevels[name] }))\n\t\t\t)\n\t\t}\n\t}\n}\n","import { logLevels } from './log_levels.js'\nimport type { LogStore } from './log_store.js'\nimport type {\n\tLogEntry,\n\tLogFunction,\n\tLogger,\n\tLoggerOptions,\n\tLogLevel,\n\tLogMethodNames,\n\tLogReporter\n} from './types.js'\n\nexport function createLogger<N extends string = LogMethodNames>(\n\tstore: LogStore,\n\tid: string,\n\toptions?: LoggerOptions\n): Logger<N | LogMethodNames> {\n\tid = sanitizeId(id)\n\tconst writeTo = options?.writeTo ?? (() => true)\n\tconst [filter, reporters]: [(reporterId: string) => boolean, LogReporter[]] =\n\t\ttypeof writeTo === 'string'\n\t\t\t? [id => id === writeTo, store.reporters]\n\t\t\t: writeTo instanceof RegExp\n\t\t\t\t? [id => writeTo.test(id), store.reporters]\n\t\t\t\t: typeof writeTo === 'function'\n\t\t\t\t\t? [writeTo, store.reporters]\n\t\t\t\t\t: [() => true, [writeTo]]\n\n\tfunction write(entry: LogEntry) {\n\t\twriteToReporters(reporters, entry, filter)\n\t}\n\n\tconst logger = {\n\t\tlevel: options?.level,\n\t\twrite\n\t} as any\n\n\tObject.defineProperties(logger, {\n\t\tid: { value: id, writable: false },\n\t\tcount: {\n\t\t\twritable: false,\n\t\t\tvalue: (\n\t\t\t\tcounter =>\n\t\t\t\t(...args: any[]): void => {\n\t\t\t\t\tif (shouldLog(store, logLevels.debug, logger.level))\n\t\t\t\t\t\twrite({\n\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\tlevel: logLevels.debug,\n\t\t\t\t\t\t\targs: [++counter, ...args],\n\t\t\t\t\t\t\ttimestamp: new Date()\n\t\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t)(0)\n\t\t},\n\t\ton: {\n\t\t\twritable: false,\n\t\t\tvalue: (level: number | N | LogMethodNames, logFn: LogFunction) => {\n\t\t\t\tconst logLevel = typeof level === 'string' ? store.logLevelStore.getLevel(level)! : level\n\t\t\t\tif (shouldLog(store, logLevel, logger.level)) {\n\t\t\t\t\tconst methodName = store.logLevelStore.getName(logLevel)\n\t\t\t\t\tconst bindedMethod = logger[methodName].bind(logger)\n\t\t\t\t\tconst result = logFn(bindedMethod, logger.level ?? store.logLevel)\n\t\t\t\t\tif (result) bindedMethod(result)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tstore.logLevelStore.getAllLevels().forEach(function addMethod({ name, level }) {\n\t\tObject.defineProperty(logger, name, {\n\t\t\twritable: false,\n\t\t\tvalue: (...args: any[]) => {\n\t\t\t\tif (shouldLog(store, level, logger.level)) write({ id, level, args, timestamp: new Date() })\n\t\t\t}\n\t\t})\n\t})\n\treturn logger\n}\n\nfunction sanitizeId(id: string) {\n\treturn id.replace(/[`~!#$%^&*()=+[\\]{},|<>?]/g, '-')\n}\n\nfunction writeToReporters(\n\treporters: LogReporter[],\n\tlogEntry: LogEntry,\n\tfilter: (reporterId: string) => boolean\n) {\n\treporters.filter(r => filter(r.id)).forEach(r => r.write(logEntry!))\n}\n\n/**\n * Determines should you log.\n * @param loggerLevel Log level of the logger.\n * It can be undefined which the global log level will be used.\n */\nfunction shouldLog(store: LogStore, targetLevel: LogLevel, loggerLevel: LogLevel | undefined) {\n\treturn targetLevel <= (loggerLevel !== undefined ? loggerLevel : store.logLevel)\n}\n","import { record } from 'type-plus'\nimport type { LogStore } from './log_store.js'\nimport type { LogMethodNames, StandardLogInstance } from './types.js'\n\nexport const ctx: {\n\tconfigured?: boolean\n\tgsl?: { store: LogStore; standardLog: StandardLogInstance<LogMethodNames> }\n} = record()\n","import { record, required } from 'type-plus'\nimport { DEFAULT_LOG_METHOD_NAMES, logLevels } from './log_levels.js'\nimport { createLogStore, type LogStore } from './log_store.js'\nimport { createLogger } from './logger.js'\nimport { ctx } from './standard_log.ctx.js'\nimport type {\n\tLogger,\n\tLoggerOptions,\n\tLogMethodNames,\n\tStandardLogInstance,\n\tStandardLogOptions\n} from './types.js'\n\nexport interface StandardLog<N extends string = LogMethodNames> extends Readonly<StandardLogInstance<N>> {}\n\nexport function createStandardLog<N extends string = LogMethodNames>(\n\toptions?: StandardLogOptions<N>\n): StandardLog<N> {\n\tconst closure = createStandardLogClosure(options)\n\tif (options?.reporters?.some(r => !r.id)) {\n\t\tconst log = closure.standardLog.getLogger('standard-log')\n\t\tlog.critical(\n\t\t\t`Detected reporter with empty id. This is not allowed as it will create problems with feature like 'getNonConsoleLogger()'. Please add an id to your reporter.`\n\t\t)\n\t}\n\n\tif (!ctx.gsl) ctx.gsl = closure as any\n\treturn closure.standardLog\n}\n\nfunction noop() {}\n\nexport function createStandardLogClosure<N extends string = LogMethodNames>(\n\toptions?: StandardLogOptions<N>\n): { store: LogStore; standardLog: StandardLog<N> } {\n\t// TODO reporter.id must not be empty\n\tconst store = createLogStore(required({ logLevel: logLevels.info }, options))\n\tconst nonConsoleReporters = options?.reporters?.filter(r => !r.isConsoleReporter).map(r => r.id) ?? []\n\tconst logMethods = DEFAULT_LOG_METHOD_NAMES.concat(Object.keys(options?.customLevels ?? {})).concat([\n\t\t'on',\n\t\t'count',\n\t\t'write'\n\t])\n\treturn {\n\t\tstore,\n\t\tstandardLog: {\n\t\t\tget logLevel() {\n\t\t\t\treturn store.logLevel\n\t\t\t},\n\n\t\t\ttoLogLevelName(level: number) {\n\t\t\t\treturn store.logLevelStore.getName(level)\n\t\t\t},\n\t\t\ttoLogLevel(name: string) {\n\t\t\t\treturn store.logLevelStore.getLevel(name)\n\t\t\t},\n\t\t\tgetLogger(id: string, options?: LoggerOptions) {\n\t\t\t\tif (store.loggers[id]) return store.loggers[id] as any\n\t\t\t\treturn (store.loggers[id] = createLogger(store, id, { ssf: this.getLogger, ...options }) as any)\n\t\t\t},\n\t\t\tgetNonConsoleLogger(id, options?) {\n\t\t\t\tif (store.nonConsoleLoggers[id]) return store.nonConsoleLoggers[id] as any\n\n\t\t\t\tif (store.loggers[id]) {\n\t\t\t\t\tconst log = this.getLogger('standard-log')\n\t\t\t\t\tlog.warn(`attempt to create a non-console logger with existing id ('${id}'), ignoring`)\n\t\t\t\t\treturn (store.nonConsoleLoggers[id] = createDummyLogger(logMethods))\n\t\t\t\t}\n\n\t\t\t\treturn (store.nonConsoleLoggers[id] =\n\t\t\t\t\tnonConsoleReporters.length === 0\n\t\t\t\t\t\t? createDummyLogger(logMethods)\n\t\t\t\t\t\t: createLogger(store, id, {\n\t\t\t\t\t\t\t\tssf: this.getNonConsoleLogger,\n\t\t\t\t\t\t\t\t...options,\n\t\t\t\t\t\t\t\twriteTo(reporterId) {\n\t\t\t\t\t\t\t\t\treturn nonConsoleReporters.indexOf(reporterId) >= 0\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}))\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction createDummyLogger(logMethods: string[]) {\n\treturn logMethods.reduce((p, m) => {\n\t\tp[m] = noop\n\t\treturn p\n\t}, record()) as Logger\n}\n\n/**\n * Suppress logging within the code block.\n */\nexport function suppressLogs<R>(block: () => R, log: Logger, ...logs: Logger[]): R\nexport function suppressLogs<R>(block: () => R, ...logs: Logger[]): R {\n\tconst origLevels = logs.map(l => l.level)\n\tlogs.forEach(l => (l.level = logLevels.none))\n\tconst result = block()\n\tlogs.forEach((l, i) => (l.level = origLevels[i]))\n\treturn result\n}\n\nexport type GetLogger<N extends string = LogMethodNames> = (\n\tid: string,\n\toptions?: LoggerOptions\n) => Logger<LogMethodNames | N>\n\nexport function getLogger<N extends string = LogMethodNames>(id: string, options?: LoggerOptions) {\n\treturn getGlobalSL<N>().getLogger(id, options)\n}\n\nfunction getGlobalSL<N extends string = LogMethodNames>(): StandardLogInstance<N> {\n\tif (!ctx.gsl) ctx.gsl = createStandardLogClosure()\n\n\treturn ctx.gsl!.standardLog as StandardLogInstance<N>\n}\n\nexport function configGlobal(options: Omit<StandardLogOptions, 'customLevels'>) {\n\tif (ctx.configured) {\n\t\tconst log = ctx.gsl!.standardLog.getLogger('standard-log')\n\t\tlog.warn(\n\t\t\t'configGlobal() is being called more than once. Please make sure this is expected. Application should use `createStandardLog()` most of the time.'\n\t\t)\n\t}\n\n\tif (ctx.gsl) {\n\t\tif (options.logLevel) {\n\t\t\tctx.gsl.store.logLevel = options.logLevel\n\t\t}\n\t\tif (options.reporters) {\n\t\t\tconst reporters = ctx.gsl.store.reporters\n\t\t\treporters.length = 0\n\t\t\treporters.push(...options.reporters)\n\t\t}\n\t} else {\n\t\tctx.gsl = createStandardLogClosure(options)\n\t}\n\tctx.configured = true\n}\n"],"x_google_ignoreList":[0,1,2,3,4,9,10,11,12,13,14],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;AACA,SAAS,SAAS,SAAS,SAAS,SAAS;CAC5C,OAAO,MAAM;EACZ;EACA;EACA;CACD,IAAI,GAAG,MAAM;EACZ,OAAO;GACN,GAAG;GACH,GAAG;EACJ;CACD,CAAC;AACF;AAQA,SAAS,MAAM,SAAS,SAAS;CAChC,IAAI,QAAQ,OAAO,KAAK,KAAK,QAAQ,OAAO,MAAM,OAAO,QAAQ;CACjE,OAAO,QAAQ,QAAQ,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,SAAS,CAAC,CAAC;AACrD;AAoBA,SAAS,UAAU,IAAI,IAAI,IAAI;CAC9B,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,GA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AAS,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"}
|
|
@@ -410,17 +410,53 @@ var StandardLog = (function(exports) {
|
|
|
410
410
|
});
|
|
411
411
|
}
|
|
412
412
|
//#endregion
|
|
413
|
-
//#region ../../node_modules/.pnpm/iso-error@
|
|
414
|
-
|
|
415
|
-
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
413
|
+
//#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
|
|
414
|
+
function _typeof(o) {
|
|
415
|
+
"@babel/helpers - typeof";
|
|
416
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function(o) {
|
|
417
|
+
return typeof o;
|
|
418
|
+
} : function(o) {
|
|
419
|
+
return o && "function" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? "symbol" : typeof o;
|
|
420
|
+
}, _typeof(o);
|
|
421
|
+
}
|
|
422
|
+
//#endregion
|
|
423
|
+
//#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
|
|
424
|
+
function toPrimitive(t, r) {
|
|
425
|
+
if ("object" != _typeof(t) || !t) return t;
|
|
426
|
+
var e = t[Symbol.toPrimitive];
|
|
427
|
+
if (void 0 !== e) {
|
|
428
|
+
var i = e.call(t, r || "default");
|
|
429
|
+
if ("object" != _typeof(i)) return i;
|
|
430
|
+
throw new TypeError("@@toPrimitive must return a primitive value.");
|
|
431
|
+
}
|
|
432
|
+
return ("string" === r ? String : Number)(t);
|
|
433
|
+
}
|
|
434
|
+
//#endregion
|
|
435
|
+
//#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
|
|
436
|
+
function toPropertyKey(t) {
|
|
437
|
+
var i = toPrimitive(t, "string");
|
|
438
|
+
return "symbol" == _typeof(i) ? i : i + "";
|
|
439
|
+
}
|
|
440
|
+
//#endregion
|
|
441
|
+
//#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
|
|
442
|
+
function _defineProperty(e, r, t) {
|
|
443
|
+
return (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {
|
|
444
|
+
value: t,
|
|
445
|
+
enumerable: !0,
|
|
446
|
+
configurable: !0,
|
|
447
|
+
writable: !0
|
|
448
|
+
}) : e[r] = t, e;
|
|
449
|
+
}
|
|
450
|
+
//#endregion
|
|
451
|
+
//#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
|
|
452
|
+
function _assertClassBrand(e, t, n) {
|
|
453
|
+
if ("function" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;
|
|
454
|
+
throw new TypeError("Private element is not present on this object");
|
|
455
|
+
}
|
|
456
|
+
//#endregion
|
|
457
|
+
//#region ../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/index.js
|
|
422
458
|
// istanbul ignore next
|
|
423
|
-
if (!Error.captureStackTrace) Error.captureStackTrace =
|
|
459
|
+
if (!Error.captureStackTrace) Error.captureStackTrace = (error) => {
|
|
424
460
|
const container = /* @__PURE__ */ new Error();
|
|
425
461
|
Object.defineProperty(error, "stack", {
|
|
426
462
|
configurable: true,
|
|
@@ -428,7 +464,7 @@ var StandardLog = (function(exports) {
|
|
|
428
464
|
defineStack(this, container.stack);
|
|
429
465
|
return container.stack;
|
|
430
466
|
},
|
|
431
|
-
set:
|
|
467
|
+
set: (stack) => {
|
|
432
468
|
defineStack(error, stack);
|
|
433
469
|
}
|
|
434
470
|
});
|
|
@@ -443,12 +479,7 @@ var StandardLog = (function(exports) {
|
|
|
443
479
|
}
|
|
444
480
|
var SerializableConverter = class {
|
|
445
481
|
constructor() {
|
|
446
|
-
|
|
447
|
-
enumerable: true,
|
|
448
|
-
configurable: true,
|
|
449
|
-
writable: true,
|
|
450
|
-
value: []
|
|
451
|
-
});
|
|
482
|
+
_defineProperty(this, "plugins", []);
|
|
452
483
|
}
|
|
453
484
|
addPlugin(plugin) {
|
|
454
485
|
this.plugins.unshift(plugin);
|
|
@@ -466,7 +497,8 @@ var StandardLog = (function(exports) {
|
|
|
466
497
|
const { message, errors, ...rest } = json;
|
|
467
498
|
// istanbul ignore next
|
|
468
499
|
if (global.AggregateError) return Object.assign(new AggregateError(errors, message), rest);
|
|
469
|
-
|
|
500
|
+
/* v8 ignore next 4 -- fallback for runtimes without AggregateError */
|
|
501
|
+
return Object.assign(new Error(message), {
|
|
470
502
|
...rest,
|
|
471
503
|
errors
|
|
472
504
|
});
|
|
@@ -480,7 +512,7 @@ var StandardLog = (function(exports) {
|
|
|
480
512
|
return Object.assign(new IsoError(message, causeError ? { cause: causeError } : void 0), rest);
|
|
481
513
|
}
|
|
482
514
|
deserializeError(json) {
|
|
483
|
-
let err
|
|
515
|
+
let err;
|
|
484
516
|
for (const { fromSerializable } of this.plugins) {
|
|
485
517
|
err = fromSerializable(json);
|
|
486
518
|
if (err) break;
|
|
@@ -501,7 +533,8 @@ var StandardLog = (function(exports) {
|
|
|
501
533
|
errors: err.errors.map(this.toSerializableImpl)
|
|
502
534
|
};
|
|
503
535
|
if (err instanceof Error) {
|
|
504
|
-
const { message
|
|
536
|
+
const { message } = err;
|
|
537
|
+
const cause = err.cause;
|
|
505
538
|
return cause ? {
|
|
506
539
|
...err,
|
|
507
540
|
name: err.constructor.name,
|
|
@@ -577,9 +610,11 @@ var StandardLog = (function(exports) {
|
|
|
577
610
|
const messages = [];
|
|
578
611
|
if (err instanceof ModuleError) messages.push(`${err.name}(${err.module}): ${err.message}`);
|
|
579
612
|
else if (err instanceof Error) messages.push(`${err.name}: ${err.message}`);
|
|
580
|
-
if (isAggregateError(err)) err.errors.forEach((e) =>
|
|
613
|
+
if (isAggregateError(err)) err.errors.forEach((e) => {
|
|
614
|
+
messages.push(...this.trace(e).split("\n").map((s) => ` ${s}`));
|
|
615
|
+
});
|
|
581
616
|
if (err instanceof Error) {
|
|
582
|
-
if (
|
|
617
|
+
if (_assertClassBrand(IsoError, this, _hasCause).call(this, err)) messages.push(...this.trace(err.cause).split("\n").map((s) => " " + s));
|
|
583
618
|
} else messages.push(typeof err === "string" ? err : JSON.stringify(err));
|
|
584
619
|
return messages.join("\n");
|
|
585
620
|
}
|
|
@@ -588,30 +623,28 @@ var StandardLog = (function(exports) {
|
|
|
588
623
|
}
|
|
589
624
|
constructor(message, options) {
|
|
590
625
|
super(message);
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
|
|
597
|
-
|
|
598
|
-
|
|
599
|
-
|
|
600
|
-
|
|
601
|
-
|
|
602
|
-
|
|
603
|
-
|
|
604
|
-
|
|
605
|
-
|
|
606
|
-
|
|
607
|
-
value: void 0
|
|
608
|
-
});
|
|
626
|
+
_defineProperty(
|
|
627
|
+
this,
|
|
628
|
+
/**
|
|
629
|
+
* Name of the error
|
|
630
|
+
*/
|
|
631
|
+
"name",
|
|
632
|
+
void 0
|
|
633
|
+
);
|
|
634
|
+
_defineProperty(
|
|
635
|
+
this,
|
|
636
|
+
/**
|
|
637
|
+
* Error cause
|
|
638
|
+
*/
|
|
639
|
+
"cause",
|
|
640
|
+
void 0
|
|
641
|
+
);
|
|
609
642
|
const actualProto = new.target.prototype;
|
|
610
643
|
this.name = actualProto.constructor.name;
|
|
611
644
|
// istanbul ignore next
|
|
612
645
|
if (Object.setPrototypeOf) Object.setPrototypeOf(this, actualProto);
|
|
613
646
|
else this.__proto__ = actualProto;
|
|
614
|
-
if (options?.cause) this.cause =
|
|
647
|
+
if (options?.cause) this.cause = _toIsoError.call(IsoError, options.cause);
|
|
615
648
|
if (options?.ssf) Error.captureStackTrace(this, options.ssf);
|
|
616
649
|
}
|
|
617
650
|
toString() {
|
|
@@ -621,17 +654,13 @@ var StandardLog = (function(exports) {
|
|
|
621
654
|
return IsoError.trace(this);
|
|
622
655
|
}
|
|
623
656
|
};
|
|
624
|
-
|
|
657
|
+
function _hasCause(x) {
|
|
625
658
|
return !!x.cause;
|
|
626
|
-
}
|
|
659
|
+
}
|
|
660
|
+
function _toIsoError(err) {
|
|
627
661
|
return Object.assign(err, { name: err.name ?? err.constructor.name });
|
|
628
|
-
}
|
|
629
|
-
|
|
630
|
-
enumerable: true,
|
|
631
|
-
configurable: true,
|
|
632
|
-
writable: true,
|
|
633
|
-
value: new SerializableConverter()
|
|
634
|
-
});
|
|
662
|
+
}
|
|
663
|
+
_defineProperty(IsoError, "converter", new SerializableConverter());
|
|
635
664
|
/**
|
|
636
665
|
* An IsoError with a module property.
|
|
637
666
|
*/
|
|
@@ -641,12 +670,7 @@ var StandardLog = (function(exports) {
|
|
|
641
670
|
*/
|
|
642
671
|
constructor(module, message, options) {
|
|
643
672
|
super(message, options);
|
|
644
|
-
|
|
645
|
-
enumerable: true,
|
|
646
|
-
configurable: true,
|
|
647
|
-
writable: true,
|
|
648
|
-
value: module
|
|
649
|
-
});
|
|
673
|
+
this.module = module;
|
|
650
674
|
}
|
|
651
675
|
};
|
|
652
676
|
function isAggregateError(error) {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standard-log.iife.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.3/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","var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _a, _IsoError_hasCause, _IsoError_toIsoError;\n//#region captureStackTrace polyfill\n// istanbul ignore next\nif (!Error.captureStackTrace) {\n Error.captureStackTrace = function (error) {\n const container = new Error();\n Object.defineProperty(error, 'stack', {\n configurable: true,\n get: function () {\n // Replace property with value for faster future accesses.\n defineStack(this, container.stack);\n return container.stack;\n },\n set: function (stack) {\n defineStack(error, stack);\n }\n });\n };\n}\n// istanbul ignore next\nfunction defineStack(target, value) {\n Object.defineProperty(target, 'stack', {\n configurable: true,\n value,\n writable: true\n });\n}\nexport class SerializableConverter {\n constructor() {\n Object.defineProperty(this, \"plugins\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n }\n addPlugin(plugin) {\n this.plugins.unshift(plugin);\n }\n /**\n * Deserialize an `Error` from `Serializable`\n */\n fromSerializable(json, options) {\n const err = this.deserializeError(json);\n Error.captureStackTrace(err, options?.ssf);\n return err;\n }\n fromSerializableImpl(json) {\n if (json['name'] === 'AggregateError') {\n const { message, errors, ...rest } = json;\n // @ts-ignore\n // istanbul ignore next\n if (global.AggregateError) {\n return Object.assign(new AggregateError(errors, message), rest);\n }\n else {\n return Object.assign(new Error(message), {\n ...rest,\n errors\n });\n }\n }\n const { message, cause, ...rest } = json;\n const causeError = cause ? this.deserializeError(cause) : undefined;\n if (json['name'] === 'Error') {\n return Object.assign(new Error(message), causeError ? { ...rest, cause: causeError } : rest);\n }\n // @ts-ignore\n return Object.assign(new IsoError(message, causeError ? { cause: causeError } : undefined), rest);\n }\n deserializeError(json) {\n let err = undefined;\n for (const { fromSerializable } of this.plugins) {\n err = fromSerializable(json);\n if (err)\n break;\n }\n return err || this.fromSerializableImpl(json);\n }\n /**\n * Serialize `Error` to `Serializable`\n */\n toSerializable(err) {\n return (this.plugins.reduce((p, s) => p || s.toSerializable(err), undefined) || this.toSerializableImpl(err));\n }\n toSerializableImpl(err) {\n if (isAggregateError(err)) {\n return {\n ...err,\n name: err.constructor.name,\n message: err.message,\n errors: err.errors.map(this.toSerializableImpl)\n };\n }\n if (err instanceof Error) {\n const { message, cause } = err;\n return cause\n ? { ...err, name: err.constructor.name, message, cause: this.toSerializableImpl(cause) }\n : { ...err, name: err.constructor.name, message };\n }\n return err;\n }\n}\nconst getCircularReplacer = () => {\n const seen = new WeakSet();\n return (_, value) => {\n if (typeof value === 'object' && value !== null) {\n if (seen.has(value)) {\n return;\n }\n seen.add(value);\n }\n return value;\n };\n};\n/**\n * Isomorphic Error that works across physical boundary.\n */\nclass IsoError extends Error {\n /**\n * Create an IsoError with additional properties without the need to create a new class.\n * @param props properties of the IsoError\n */\n static create(props) {\n const { message, cause, ...rest } = props;\n const err = new IsoError(message, { cause, ssf: IsoError.create });\n return Object.assign(err, rest);\n }\n static stringify(err) {\n return this.serialize(err);\n }\n static serialize(err) {\n return JSON.stringify(this.toSerializable(err), getCircularReplacer());\n }\n static toSerializable(err) {\n return this.converter.toSerializable(err);\n }\n /**\n * @type P Additional properties of the IsoError\n * @param text Json representation of a IsoError\n */\n static parse(text) {\n const json = JSON.parse(text);\n return this.converter.fromSerializable(json, { ssf: IsoError.parse });\n }\n /**\n * @type P Additional properties of the IsoError\n * @param text Json representation of a IsoError\n */\n static deserialize(text) {\n const json = JSON.parse(text);\n return this.converter.fromSerializable(json, { ssf: IsoError.deserialize });\n }\n static fromSerializable(json) {\n return this.converter.fromSerializable(json, { ssf: IsoError.fromSerializable });\n }\n /**\n * returns the error message including the error causes.\n */\n static trace(err) {\n const messages = [];\n if (err instanceof ModuleError) {\n messages.push(`${err.name}(${err.module}): ${err.message}`);\n }\n else if (err instanceof Error) {\n messages.push(`${err.name}: ${err.message}`);\n }\n if (isAggregateError(err)) {\n err.errors.forEach(e => messages.push(...this.trace(e)\n .split('\\n')\n .map(s => ' ' + s)));\n }\n if (err instanceof Error) {\n if (__classPrivateFieldGet(this, _a, \"m\", _IsoError_hasCause).call(this, err))\n messages.push(...this.trace(err.cause)\n .split('\\n')\n .map(s => ' ' + s));\n }\n else {\n messages.push(typeof err === 'string' ? err : JSON.stringify(err));\n }\n return messages.join('\\n');\n }\n static addPlugin(plugin) {\n this.converter.addPlugin(plugin);\n }\n constructor(message, options) {\n super(message);\n /**\n * Name of the error\n */\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * Error cause\n */\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n // restore prototype chain\n const actualProto = new.target.prototype;\n this.name = actualProto.constructor.name;\n // istanbul ignore next\n if (Object.setPrototypeOf)\n Object.setPrototypeOf(this, actualProto);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n else\n this.__proto__ = actualProto;\n if (options?.cause)\n this.cause = __classPrivateFieldGet(IsoError, _a, \"m\", _IsoError_toIsoError).call(IsoError, options.cause);\n if (options?.ssf)\n Error.captureStackTrace(this, options.ssf);\n }\n toString() {\n return IsoError.serialize(this);\n }\n trace() {\n return IsoError.trace(this);\n }\n}\n_a = IsoError, _IsoError_hasCause = function _IsoError_hasCause(x) {\n return !!x.cause;\n}, _IsoError_toIsoError = function _IsoError_toIsoError(err) {\n // When the error is an internal error from deserialization,\n // the err.constructor.name is object.\n // I have to to Object.assign to keep the err instance and its stack trace.\n return Object.assign(err, { name: err.name ?? err.constructor.name });\n};\nObject.defineProperty(IsoError, \"converter\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new SerializableConverter()\n});\nexport { IsoError };\n/**\n * An IsoError with a module property.\n */\nexport class ModuleError extends IsoError {\n /**\n * @param module The module that defines this error.\n */\n constructor(module, message, options) {\n super(message, options);\n Object.defineProperty(this, \"module\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: module\n });\n }\n}\nexport function isAggregateError(error) {\n return error instanceof Error && Array.isArray(error.errors);\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],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;CACA,SAAS,SAAS,SAAS,SAAS,SAAS;EAC5C,OAAO,MAAM;GACZ;GACA;GACA;EACD,IAAI,GAAG,MAAM;GACZ,OAAO;IACN,GAAG;IACH,GAAG;GACJ;EACD,CAAC;CACF;CAQA,SAAS,MAAM,SAAS,SAAS;EAChC,IAAI,QAAQ,OAAO,KAAK,KAAK,QAAQ,OAAO,MAAM,OAAO,QAAQ;EACjE,OAAO,QAAQ,QAAQ,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,SAAS,CAAC,CAAC;CACrD;CAoBA,SAAS,UAAU,IAAI,IAAI,IAAI;EAC9B,IAAI,OAAO,KAAK,KAAK,OAAO,MAAM,OAAO;EACzC,OAAO;GACN;GACA;GACA;EACD,CAAC,CAAC,OAAO,MAAM,CAAC,CAAC,QAA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;CAEA,SAAgB,aAAa,SAAmD;EAC/E,IAAI,IAAI,YAEP,IADgB,IAAK,YAAY,UAAU,cACzC,CAAC,CAAC,KACH,kJACD;EAGD,IAAI,IAAI,KAAK;GACZ,IAAI,QAAQ,UACX,IAAI,IAAI,MAAM,WAAW,QAAQ;GAElC,IAAI,QAAQ,WAAW;IACtB,MAAM,YAAY,IAAI,IAAI,MAAM;IAChC,UAAU,SAAS;IACnB,UAAU,KAAK,GAAG,QAAQ,SAAS;GACpC;EACD,OACC,IAAI,MAAM,yBAAyB,OAAO;EAE3C,IAAI,aAAa;CAClB"}
|
|
1
|
+
{"version":3,"file":"standard-log.iife.js","names":["ms"],"sources":["../../../node_modules/.pnpm/unpartial@1.0.7/node_modules/unpartial/esm/index.js","../../../node_modules/.pnpm/type-plus@8.0.0-beta.10_typescript@7.0.2/node_modules/type-plus/esm/object/mapKey.js","../../../node_modules/.pnpm/type-plus@8.0.0-beta.10_typescript@7.0.2/node_modules/type-plus/esm/object/reduceKey.js","../../../node_modules/.pnpm/type-plus@8.0.0-beta.10_typescript@7.0.2/node_modules/type-plus/esm/object/record.js","../../../node_modules/.pnpm/ms@2.1.3/node_modules/ms/index.js","../ts/log_levels.ts","../ts/formatter.ts","../ts/platform.browser.ts","../ts/console.ts","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/typeof.js","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/toPrimitive.js","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/toPropertyKey.js","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/defineProperty.js","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/assertClassBrand.js","../../../node_modules/.pnpm/iso-error@7.0.0/node_modules/iso-error/esm/index.js","../ts/errors.ts","../ts/memory.ts","../ts/log_store.ts","../ts/logger.ts","../ts/standard_log.ctx.ts","../ts/standard_log.ts"],"sourcesContent":["//#region ts/index.ts\nfunction required(source1, source2, source3) {\n\treturn merge([\n\t\tsource1,\n\t\tsource2,\n\t\tsource3\n\t], (p, e) => {\n\t\treturn {\n\t\t\t...p,\n\t\t\t...e\n\t\t};\n\t});\n}\nfunction requiredDeep(source1, source2, source3) {\n\treturn merge([\n\t\tsource1,\n\t\tsource2,\n\t\tsource3\n\t], (p, e) => deepmerge(p, e));\n}\nfunction merge(entries, reducer) {\n\tif (entries[0] === void 0 || entries[0] === null) return entries[0];\n\treturn entries.filter((x) => !!x).reduce(reducer, {});\n}\nfunction deepmerge(source1, source2) {\n\tif (typeof source1 !== \"object\" || source1 === null) return source2 !== void 0 ? source2 : source1;\n\tif (Array.isArray(source1)) {\n\t\tif (Array.isArray(source2)) return source2;\n\t\tif (source2 === void 0) return [...source1];\n\t\treturn [...source1, source2];\n\t}\n\treturn getAllKeys(source1).concat(getAllKeys(source2)).reduce((p, k) => {\n\t\tp[k] = deepmerge(source1[k], source2 && source2[k]);\n\t\treturn p;\n\t}, {});\n}\nfunction getAllKeys(subject, internal = false) {\n\tif (typeof subject !== \"object\") return [];\n\tconst propertyNames = Object.getOwnPropertyNames(subject);\n\tconst keys = internal ? propertyNames.filter((n) => n !== \"constructor\") : propertyNames;\n\tconst proto = Object.getPrototypeOf(subject);\n\treturn proto !== Object.prototype ? keys.concat(getAllKeys(proto, true)) : keys;\n}\nfunction unpartial(s1, s2, s3) {\n\tif (s1 === void 0 || s1 === null) return s1;\n\treturn [\n\t\ts1,\n\t\ts2,\n\t\ts3\n\t].filter(notNil).reduce((p, s) => ({\n\t\t...p,\n\t\t...trimNilProps(s)\n\t}), {});\n}\nfunction trimNilProps(value) {\n\treturn Object.keys(value).reduce((p, k) => {\n\t\tif (notNil(value[k])) p[k] = value[k];\n\t\treturn p;\n\t}, {});\n}\nfunction notNil(value) {\n\treturn value !== null && value !== void 0;\n}\nfunction unpartialRecursively(arg1, arg2, arg3) {\n\treturn requiredDeep(arg1, arg2, arg3);\n}\n//#endregion\nexport { required, requiredDeep, unpartial, unpartialRecursively };\n\n//# sourceMappingURL=index.js.map","export function mapKey(subject, predicate, thisArg) {\n return Object.keys(subject).map(function (k, i, a) {\n return predicate.apply(this, [k, i, a, subject]);\n }, thisArg);\n}\n//# sourceMappingURL=mapKey.js.map","export function reduceByKey(subject, callbackfn, initialValue) {\n return Object.keys(subject).reduce((p, k, i, a) => callbackfn(p, k, i, a, subject), initialValue);\n}\n/**\n * @deprecated renamed to reduceByKey\n */\nexport const reduceKey = reduceByKey;\n//# sourceMappingURL=reduceKey.js.map","export function record(value) {\n const r = Object.create(null);\n return (value ? Object.assign(r, value) : r);\n}\n//# sourceMappingURL=record.js.map","/**\n * Helpers.\n */\n\nvar s = 1000;\nvar m = s * 60;\nvar h = m * 60;\nvar d = h * 24;\nvar w = d * 7;\nvar y = d * 365.25;\n\n/**\n * Parse or format the given `val`.\n *\n * Options:\n *\n * - `long` verbose formatting [false]\n *\n * @param {String|Number} val\n * @param {Object} [options]\n * @throws {Error} throw an error if val is not a non-empty string or a number\n * @return {String|Number}\n * @api public\n */\n\nmodule.exports = function (val, options) {\n options = options || {};\n var type = typeof val;\n if (type === 'string' && val.length > 0) {\n return parse(val);\n } else if (type === 'number' && isFinite(val)) {\n return options.long ? fmtLong(val) : fmtShort(val);\n }\n throw new Error(\n 'val is not a non-empty string or a valid number. val=' +\n JSON.stringify(val)\n );\n};\n\n/**\n * Parse the given `str` and return milliseconds.\n *\n * @param {String} str\n * @return {Number}\n * @api private\n */\n\nfunction parse(str) {\n str = String(str);\n if (str.length > 100) {\n return;\n }\n var match = /^(-?(?:\\d+)?\\.?\\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(\n str\n );\n if (!match) {\n return;\n }\n var n = parseFloat(match[1]);\n var type = (match[2] || 'ms').toLowerCase();\n switch (type) {\n case 'years':\n case 'year':\n case 'yrs':\n case 'yr':\n case 'y':\n return n * y;\n case 'weeks':\n case 'week':\n case 'w':\n return n * w;\n case 'days':\n case 'day':\n case 'd':\n return n * d;\n case 'hours':\n case 'hour':\n case 'hrs':\n case 'hr':\n case 'h':\n return n * h;\n case 'minutes':\n case 'minute':\n case 'mins':\n case 'min':\n case 'm':\n return n * m;\n case 'seconds':\n case 'second':\n case 'secs':\n case 'sec':\n case 's':\n return n * s;\n case 'milliseconds':\n case 'millisecond':\n case 'msecs':\n case 'msec':\n case 'ms':\n return n;\n default:\n return undefined;\n }\n}\n\n/**\n * Short format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtShort(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return Math.round(ms / d) + 'd';\n }\n if (msAbs >= h) {\n return Math.round(ms / h) + 'h';\n }\n if (msAbs >= m) {\n return Math.round(ms / m) + 'm';\n }\n if (msAbs >= s) {\n return Math.round(ms / s) + 's';\n }\n return ms + 'ms';\n}\n\n/**\n * Long format for `ms`.\n *\n * @param {Number} ms\n * @return {String}\n * @api private\n */\n\nfunction fmtLong(ms) {\n var msAbs = Math.abs(ms);\n if (msAbs >= d) {\n return plural(ms, msAbs, d, 'day');\n }\n if (msAbs >= h) {\n return plural(ms, msAbs, h, 'hour');\n }\n if (msAbs >= m) {\n return plural(ms, msAbs, m, 'minute');\n }\n if (msAbs >= s) {\n return plural(ms, msAbs, s, 'second');\n }\n return ms + ' ms';\n}\n\n/**\n * Pluralization helper.\n */\n\nfunction plural(ms, msAbs, n, name) {\n var isPlural = msAbs >= n * 1.5;\n return Math.round(ms / n) + ' ' + name + (isPlural ? 's' : '');\n}\n","export const logLevels = {\n\t/**\n\t * none: 0\n\t */\n\tnone: 0 as const,\n\t/**\n\t * emergency: 100\n\t *\n\t * emergency -> alert\n\t */\n\temergency: 100 as const,\n\t/**\n\t * alert: 200\n\t *\n\t * emergency -> alert -> critical\n\t */\n\talert: 200 as const,\n\t/**\n\t * critical: 300\n\t *\n\t * alert -> critical -> error\n\t */\n\tcritical: 300 as const,\n\t/**\n\t * error: 400\n\t *\n\t * critical -> error -> warn\n\t */\n\terror: 400 as const,\n\t/**\n\t * warn: 500\n\t *\n\t * error -> warn -> notice\n\t */\n\twarn: 500 as const,\n\t/**\n\t * notice: 600\n\t *\n\t * warn -> notice -> info\n\t */\n\tnotice: 600 as const,\n\t/**\n\t * info: 700\n\t *\n\t * notice -> info -> debug\n\t */\n\tinfo: 700 as const,\n\t/**\n\t * debug: 800\n\t *\n\t * info -> debug -> trace\n\t */\n\tdebug: 800 as const,\n\t/**\n\t * trace: 900\n\t *\n\t * debug -> trace -> planck\n\t */\n\ttrace: 900 as const,\n\t/**\n\t * planck: Infinity\n\t * `planck unit` is a very small unit <https://en.wikipedia.org/wiki/Planck_units>.\n\t *\n\t * trace -> planck\n\t */\n\tplanck: Number.POSITIVE_INFINITY,\n\t/**\n\t * all: Infinity\n\t */\n\tall: Number.POSITIVE_INFINITY\n}\n\n/**\n * Convert default log level value to log level name.\n */\nexport function toLogLevelName(level: number) {\n\tif (level <= 100) return 'emergency'\n\tif (level <= 200) return 'alert'\n\tif (level <= 300) return 'critical'\n\tif (level <= 400) return 'error'\n\tif (level <= 500) return 'warn'\n\tif (level <= 600) return 'notice'\n\tif (level <= 700) return 'info'\n\tif (level <= 800) return 'debug'\n\tif (level <= 900) return 'trace'\n\treturn 'planck'\n}\n\n/**\n * Convert default log level name to log level value.\n */\nexport function toLogLevel(name: string): number | undefined {\n\treturn (logLevels as any)[name.toLocaleLowerCase()]\n}\n\nexport const DEFAULT_LOG_METHOD_NAMES: string[] = [\n\t'emergency',\n\t'alert',\n\t'critical',\n\t'error',\n\t'warn',\n\t'notice',\n\t'info',\n\t'debug',\n\t'trace',\n\t'planck'\n]\n","import ms from 'ms'\nimport { toLogLevelName } from './log_levels.js'\nimport type { LogEntry } from './types.js'\n\nexport type TimestampFormat = 'none' | 'iso' | 'elapsed'\n\nexport function createTimestampFormatter(format: TimestampFormat): (timestamp: Date) => string | undefined {\n\tswitch (format) {\n\t\tcase 'none':\n\t\t\treturn (_timestamp: Date) => undefined\n\t\tcase 'iso':\n\t\t\treturn (timestamp: Date) => timestamp.toISOString()\n\t\tcase 'elapsed': {\n\t\t\tlet lastTick: number\n\t\t\treturn (timestamp: Date) => {\n\t\t\t\tconst newTick = timestamp.getTime()\n\t\t\t\tconst result = ms(lastTick === undefined ? 0 : newTick - lastTick)\n\t\t\t\tlastTick = newTick\n\t\t\t\treturn result\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport function formatLogLevel(level: number) {\n\treturn `(${toLogLevelName(level).toUpperCase()})`\n}\n\n/**\n * Formats log entry as plain text with the following format:\n * `timestamp id level ...args`\n *\n * This is typically useful for writing logs to file\n */\nexport function plainLogFormatter({ id, level, args, timestamp }: LogEntry) {\n\treturn [timestamp.toISOString(), id, formatLogLevel(level), ...args]\n}\n\n/**\n * Formats log entry like default console log.\n */\nexport function consoleFormatter({ args }: LogEntry) {\n\treturn args\n}\n","import { record } from 'type-plus'\nimport type { ConsoleLike, LogEntry } from './types.js'\n\nexport const toInspectLogEntry = (e: LogEntry) => e\n\nexport const polyfill: { console?: ConsoleLike } = record()\n","import { unpartial } from 'type-plus'\nimport { consoleFormatter } from './formatter.js'\nimport { logLevels } from './log_levels.js'\nimport { polyfill } from './platform.js'\nimport type { ConsoleLike, LogEntry, LogFormatter, LogReporter, LogReporterOptions } from './types.js'\n\nexport function toConsoleMethod(level: number) {\n\tswitch (true) {\n\t\t// edge case in case none is somehow written\n\t\tcase level <= 0:\n\t\t\treturn 'debug'\n\t\tcase level <= logLevels.error:\n\t\t\treturn 'error'\n\t\tcase level <= logLevels.warn:\n\t\t\treturn 'warn'\n\t\tcase level <= logLevels.info:\n\t\t\treturn 'info'\n\t\tdefault:\n\t\t\treturn 'debug'\n\t}\n}\n\n// istanbul ignore next\n/* eslint-disable no-console */\nfunction buildPolyfillConsole() {\n\t// old phantomjs does not have bind function\n\tconst hasBind = !!console.log.bind as boolean\n\tif (hasBind) {\n\t\treturn {\n\t\t\t// the `typeof` guards against IE where `console.log.apply()`\n\t\t\t// results in error `Object doesn't support property or method 'apply'`\n\t\t\tdebug: (typeof console.info === 'function' ? console.debug : console.log).bind(console),\n\t\t\tinfo: (typeof console.info === 'function' ? console.info : console.log).bind(console),\n\t\t\twarn: (typeof console.warn === 'function' ? console.warn : console.log).bind(console),\n\t\t\terror: (typeof console.error === 'function' ? console.error : console.log).bind(console)\n\t\t}\n\t}\n\treturn {\n\t\tdebug: buildFn(typeof console.debug === 'function' ? 'debug' : 'log'),\n\t\tinfo: buildFn(typeof console.info === 'function' ? 'info' : 'log'),\n\t\twarn: buildFn(typeof console.warn === 'function' ? 'warn' : 'log'),\n\t\terror: buildFn(typeof console.error === 'function' ? 'error' : 'log')\n\t}\n}\n\n// istanbul ignore next\nfunction buildFn(name: 'debug' | 'info' | 'warn' | 'error' | 'log') {\n\treturn (...args: any[]) => {\n\t\tconsole[name](...args)\n\t}\n}\n\nexport type ConsoleLogFormatter = LogFormatter<any[]>\nexport type ConsoleLogReporter = LogReporter<any[]> & { console: ConsoleLike }\nexport type ConsoleLogReporterOptions = LogReporterOptions<any[]>\n\nexport function createConsoleLogReporter(options?: ConsoleLogReporterOptions): ConsoleLogReporter {\n\tconst { id, formatter, filter } = unpartial({ id: 'console', formatter: consoleFormatter }, options)\n\tif (!polyfill.console) polyfill.console = buildPolyfillConsole()\n\n\treturn Object.freeze({\n\t\tid,\n\t\tisConsoleReporter: true,\n\t\tget formatter() {\n\t\t\treturn formatter\n\t\t},\n\t\tget filter() {\n\t\t\treturn filter\n\t\t},\n\t\tconsole: polyfill.console,\n\t\twrite(entry: LogEntry) {\n\t\t\tif (filter && !filter(entry)) return\n\t\t\tconst values = formatter(entry)\n\t\t\tconst method = toConsoleMethod(entry.level)\n\t\t\tthis.console[method](...values)\n\t\t}\n\t})\n}\n","//#region \\0@oxc-project+runtime@0.147.0/helpers/esm/typeof.js\nfunction _typeof(o) {\n\t\"@babel/helpers - typeof\";\n\treturn _typeof = \"function\" == typeof Symbol && \"symbol\" == typeof Symbol.iterator ? function(o) {\n\t\treturn typeof o;\n\t} : function(o) {\n\t\treturn o && \"function\" == typeof Symbol && o.constructor === Symbol && o !== Symbol.prototype ? \"symbol\" : typeof o;\n\t}, _typeof(o);\n}\n//#endregion\nexport { _typeof as default };\n","import _typeof from \"./typeof.js\";\n//#region \\0@oxc-project+runtime@0.147.0/helpers/esm/toPrimitive.js\nfunction toPrimitive(t, r) {\n\tif (\"object\" != _typeof(t) || !t) return t;\n\tvar e = t[Symbol.toPrimitive];\n\tif (void 0 !== e) {\n\t\tvar i = e.call(t, r || \"default\");\n\t\tif (\"object\" != _typeof(i)) return i;\n\t\tthrow new TypeError(\"@@toPrimitive must return a primitive value.\");\n\t}\n\treturn (\"string\" === r ? String : Number)(t);\n}\n//#endregion\nexport { toPrimitive as default };\n","import _typeof from \"./typeof.js\";\nimport toPrimitive from \"./toPrimitive.js\";\n//#region \\0@oxc-project+runtime@0.147.0/helpers/esm/toPropertyKey.js\nfunction toPropertyKey(t) {\n\tvar i = toPrimitive(t, \"string\");\n\treturn \"symbol\" == _typeof(i) ? i : i + \"\";\n}\n//#endregion\nexport { toPropertyKey as default };\n","import toPropertyKey from \"./toPropertyKey.js\";\n//#region \\0@oxc-project+runtime@0.147.0/helpers/esm/defineProperty.js\nfunction _defineProperty(e, r, t) {\n\treturn (r = toPropertyKey(r)) in e ? Object.defineProperty(e, r, {\n\t\tvalue: t,\n\t\tenumerable: !0,\n\t\tconfigurable: !0,\n\t\twritable: !0\n\t}) : e[r] = t, e;\n}\n//#endregion\nexport { _defineProperty as default };\n","//#region \\0@oxc-project+runtime@0.147.0/helpers/esm/assertClassBrand.js\nfunction _assertClassBrand(e, t, n) {\n\tif (\"function\" == typeof e ? e === t : e.has(t)) return arguments.length < 3 ? t : n;\n\tthrow new TypeError(\"Private element is not present on this object\");\n}\n//#endregion\nexport { _assertClassBrand as default };\n","import _defineProperty from \"./_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/defineProperty.js\";\nimport _assertClassBrand from \"./_virtual/_@oxc-project_runtime@0.147.0/helpers/esm/assertClassBrand.js\";\n//#region ts/index.ts\n// istanbul ignore next\nif (!Error.captureStackTrace) Error.captureStackTrace = (error) => {\n\tconst container = /* @__PURE__ */ new Error();\n\tObject.defineProperty(error, \"stack\", {\n\t\tconfigurable: true,\n\t\tget: function() {\n\t\t\tdefineStack(this, container.stack);\n\t\t\treturn container.stack;\n\t\t},\n\t\tset: (stack) => {\n\t\t\tdefineStack(error, stack);\n\t\t}\n\t});\n};\n// istanbul ignore next\nfunction defineStack(target, value) {\n\tObject.defineProperty(target, \"stack\", {\n\t\tconfigurable: true,\n\t\tvalue,\n\t\twritable: true\n\t});\n}\nvar SerializableConverter = class {\n\tconstructor() {\n\t\t_defineProperty(this, \"plugins\", []);\n\t}\n\taddPlugin(plugin) {\n\t\tthis.plugins.unshift(plugin);\n\t}\n\t/**\n\t* Deserialize an `Error` from `Serializable`\n\t*/\n\tfromSerializable(json, options) {\n\t\tconst err = this.deserializeError(json);\n\t\tError.captureStackTrace(err, options?.ssf);\n\t\treturn err;\n\t}\n\tfromSerializableImpl(json) {\n\t\tif (json[\"name\"] === \"AggregateError\") {\n\t\t\tconst { message, errors, ...rest } = json;\n\t\t\t// istanbul ignore next\n\t\t\tif (global.AggregateError) return Object.assign(new AggregateError(errors, message), rest);\n\t\t\t/* v8 ignore next 4 -- fallback for runtimes without AggregateError */\n\t\t\treturn Object.assign(new Error(message), {\n\t\t\t\t...rest,\n\t\t\t\terrors\n\t\t\t});\n\t\t}\n\t\tconst { message, cause, ...rest } = json;\n\t\tconst causeError = cause ? this.deserializeError(cause) : void 0;\n\t\tif (json[\"name\"] === \"Error\") return Object.assign(new Error(message), causeError ? {\n\t\t\t...rest,\n\t\t\tcause: causeError\n\t\t} : rest);\n\t\treturn Object.assign(new IsoError(message, causeError ? { cause: causeError } : void 0), rest);\n\t}\n\tdeserializeError(json) {\n\t\tlet err;\n\t\tfor (const { fromSerializable } of this.plugins) {\n\t\t\terr = fromSerializable(json);\n\t\t\tif (err) break;\n\t\t}\n\t\treturn err || this.fromSerializableImpl(json);\n\t}\n\t/**\n\t* Serialize `Error` to `Serializable`\n\t*/\n\ttoSerializable(err) {\n\t\treturn this.plugins.reduce((p, s) => p || s.toSerializable(err), void 0) || this.toSerializableImpl(err);\n\t}\n\ttoSerializableImpl(err) {\n\t\tif (isAggregateError(err)) return {\n\t\t\t...err,\n\t\t\tname: err.constructor.name,\n\t\t\tmessage: err.message,\n\t\t\terrors: err.errors.map(this.toSerializableImpl)\n\t\t};\n\t\tif (err instanceof Error) {\n\t\t\tconst { message } = err;\n\t\t\tconst cause = err.cause;\n\t\t\treturn cause ? {\n\t\t\t\t...err,\n\t\t\t\tname: err.constructor.name,\n\t\t\t\tmessage,\n\t\t\t\tcause: this.toSerializableImpl(cause)\n\t\t\t} : {\n\t\t\t\t...err,\n\t\t\t\tname: err.constructor.name,\n\t\t\t\tmessage\n\t\t\t};\n\t\t}\n\t\treturn err;\n\t}\n};\nconst getCircularReplacer = () => {\n\tconst seen = /* @__PURE__ */ new WeakSet();\n\treturn (_, value) => {\n\t\tif (typeof value === \"object\" && value !== null) {\n\t\t\tif (seen.has(value)) return;\n\t\t\tseen.add(value);\n\t\t}\n\t\treturn value;\n\t};\n};\n/**\n* Isomorphic Error that works across physical boundary.\n*/\nvar IsoError = class IsoError extends Error {\n\t/**\n\t* Create an IsoError with additional properties without the need to create a new class.\n\t* @param props properties of the IsoError\n\t*/\n\tstatic create(props) {\n\t\tconst { message, cause, ...rest } = props;\n\t\tconst err = new IsoError(message, {\n\t\t\tcause,\n\t\t\tssf: IsoError.create\n\t\t});\n\t\treturn Object.assign(err, rest);\n\t}\n\tstatic stringify(err) {\n\t\treturn this.serialize(err);\n\t}\n\tstatic serialize(err) {\n\t\treturn JSON.stringify(this.toSerializable(err), getCircularReplacer());\n\t}\n\tstatic toSerializable(err) {\n\t\treturn this.converter.toSerializable(err);\n\t}\n\t/**\n\t* @type P Additional properties of the IsoError\n\t* @param text Json representation of a IsoError\n\t*/\n\tstatic parse(text) {\n\t\tconst json = JSON.parse(text);\n\t\treturn this.converter.fromSerializable(json, { ssf: IsoError.parse });\n\t}\n\t/**\n\t* @type P Additional properties of the IsoError\n\t* @param text Json representation of a IsoError\n\t*/\n\tstatic deserialize(text) {\n\t\tconst json = JSON.parse(text);\n\t\treturn this.converter.fromSerializable(json, { ssf: IsoError.deserialize });\n\t}\n\tstatic fromSerializable(json) {\n\t\treturn this.converter.fromSerializable(json, { ssf: IsoError.fromSerializable });\n\t}\n\t/**\n\t* returns the error message including the error causes.\n\t*/\n\tstatic trace(err) {\n\t\tconst messages = [];\n\t\tif (err instanceof ModuleError) messages.push(`${err.name}(${err.module}): ${err.message}`);\n\t\telse if (err instanceof Error) messages.push(`${err.name}: ${err.message}`);\n\t\tif (isAggregateError(err)) err.errors.forEach((e) => {\n\t\t\tmessages.push(...this.trace(e).split(\"\\n\").map((s) => ` ${s}`));\n\t\t});\n\t\tif (err instanceof Error) {\n\t\t\tif (_assertClassBrand(IsoError, this, _hasCause).call(this, err)) messages.push(...this.trace(err.cause).split(\"\\n\").map((s) => \" \" + s));\n\t\t} else messages.push(typeof err === \"string\" ? err : JSON.stringify(err));\n\t\treturn messages.join(\"\\n\");\n\t}\n\tstatic addPlugin(plugin) {\n\t\tthis.converter.addPlugin(plugin);\n\t}\n\tconstructor(message, options) {\n\t\tsuper(message);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Name of the error\n\t\t\t*/\n\t\t\t\"name\",\n\t\t\tvoid 0\n\t\t);\n\t\t_defineProperty(\n\t\t\tthis,\n\t\t\t/**\n\t\t\t* Error cause\n\t\t\t*/\n\t\t\t\"cause\",\n\t\t\tvoid 0\n\t\t);\n\t\tconst actualProto = new.target.prototype;\n\t\tthis.name = actualProto.constructor.name;\n\t\t// istanbul ignore next\n\t\tif (Object.setPrototypeOf) Object.setPrototypeOf(this, actualProto);\n\t\telse this.__proto__ = actualProto;\n\t\tif (options?.cause) this.cause = _toIsoError.call(IsoError, options.cause);\n\t\tif (options?.ssf) Error.captureStackTrace(this, options.ssf);\n\t}\n\ttoString() {\n\t\treturn IsoError.serialize(this);\n\t}\n\ttrace() {\n\t\treturn IsoError.trace(this);\n\t}\n};\nfunction _hasCause(x) {\n\treturn !!x.cause;\n}\nfunction _toIsoError(err) {\n\treturn Object.assign(err, { name: err.name ?? err.constructor.name });\n}\n_defineProperty(IsoError, \"converter\", new SerializableConverter());\n/**\n* An IsoError with a module property.\n*/\nvar ModuleError = class extends IsoError {\n\t/**\n\t* @param module The module that defines this error.\n\t*/\n\tconstructor(module, message, options) {\n\t\tsuper(message, options);\n\t\tthis.module = module;\n\t}\n};\nfunction isAggregateError(error) {\n\treturn error instanceof Error && Array.isArray(error.errors);\n}\n//#endregion\nexport { IsoError, ModuleError, SerializableConverter, isAggregateError };\n\n//# sourceMappingURL=index.js.map","import { type IsoError, ModuleError } from 'iso-error'\n\n/**\n * @deprecated No longer used since 11.2.0\n */\nexport class StandardLogError extends ModuleError {\n\tconstructor(description: string, options?: IsoError.Options) {\n\t\tsuper('standard-log', description, options)\n\t}\n}\n\n/**\n * @deprecated no longer used since 11.2.0\n */\nexport class InvalidId extends StandardLogError {\n\tconstructor(\n\t\tpublic id: string,\n\t\toptions?: IsoError.Options\n\t) {\n\t\tsuper(`logger id only supports alphanumeric, unicode characters, and [:_-.]. Received ${id}`, options)\n\t}\n}\n","import { required, unpartial } from 'type-plus'\nimport { createConsoleLogReporter } from './console.js'\nimport { formatLogLevel } from './formatter.js'\nimport { toInspectLogEntry } from './platform.js'\nimport type { LogEntry, LogFormatter, LogReporter, LogReporterOptions } from './types.js'\n\nexport type MemoryLogReporter = LogReporter<LogEntry> & {\n\tlogs: LogEntry[]\n\t/**\n\t * Gets a simple log message for testing.\n\t * The message only contains arguments for each log entry.\n\t */\n\tgetLogMessage(): string\n\tgetLogMessages(): string[]\n\tgetLogMessageWithLevel(): string\n\tgetLogMessagesWithLevel(): string[]\n\tgetLogMessagesWithIdAndLevel(): string[]\n\temit(): void\n}\n\nexport type MemoryLogFormatter = LogFormatter<LogEntry>\n\nexport function toMessageWithLevel(logs: LogEntry[]) {\n\treturn (\n\t\tlogs\n\t\t\t.map(toInspectLogEntry)\n\t\t\t.map(log => `${formatLogLevel(log.level)} ${log.args.join(' ')}`)\n\t\t\t.join('\\n')\n\t\t\t// if it has more than this log,\n\t\t\t// we assume it is running under tests,\n\t\t\t// and remove this log to simplify testing.\n\t\t\t.replace(/^\\(WARN\\) already configured for test, ignoring config\\(\\) call\\n/, '')\n\t)\n}\n\nexport function createMemoryLogReporter(options?: LogReporterOptions<LogEntry>): MemoryLogReporter {\n\treturn Object.freeze(buildMemoryReporter(unpartial({ id: 'memory' }, options)))\n}\n\nfunction buildMemoryReporter(options?: LogReporterOptions<LogEntry>) {\n\tconst { id, formatter, filter } = required({ id: 'memory', formatter: (e: LogEntry) => e }, options)\n\tconst logs: LogEntry[] = []\n\treturn {\n\t\tid,\n\t\tget formatter() {\n\t\t\treturn formatter\n\t\t},\n\t\tget filter() {\n\t\t\treturn filter\n\t\t},\n\t\tlogs,\n\t\twrite(entry: LogEntry) {\n\t\t\tif (filter && !filter(entry)) return\n\t\t\tlogs.push(formatter(entry))\n\t\t},\n\t\tgetLogMessage() {\n\t\t\treturn this.getLogMessages().join('\\n')\n\t\t},\n\t\tgetLogMessages() {\n\t\t\treturn logs.map(toInspectLogEntry).map(log => log.args.join(' '))\n\t\t},\n\t\tgetLogMessagesWithLevel() {\n\t\t\treturn logs.map(toInspectLogEntry).map(log => `${formatLogLevel(log.level)} ${log.args.join(' ')}`)\n\t\t},\n\t\tgetLogMessagesWithIdAndLevel() {\n\t\t\treturn logs\n\t\t\t\t.map(toInspectLogEntry)\n\t\t\t\t.map(log => `${log.id} ${formatLogLevel(log.level)} ${log.args.join(' ')}`)\n\t\t},\n\t\tgetLogMessageWithLevel() {\n\t\t\treturn toMessageWithLevel(logs)\n\t\t},\n\t\t/**\n\t\t * emit the saved log to console for easy debugging\n\t\t */\n\t\temit() {\n\t\t\tconst reporter = createConsoleLogReporter()\n\t\t\tlogs.forEach(l => reporter.write(l))\n\t\t}\n\t}\n}\n\nexport function createMemoryWithConsoleLogReporter(\n\toptions?: LogReporterOptions<LogEntry>\n): MemoryLogReporter {\n\treturn Object.freeze(\n\t\tObject.assign(buildMemoryReporter(unpartial({ id: 'memory-with-console' }, options)), {\n\t\t\tisConsoleReporter: true\n\t\t})\n\t)\n}\n","import { mapKey, record, reduceByKey, reduceKey } from 'type-plus'\nimport { createConsoleLogReporter } from './console.js'\nimport { logLevels, toLogLevel, toLogLevelName } from './log_levels.js'\nimport type { Logger, LogLevel, LogMethodNames, LogReporter, StandardLogOptions } from './types.js'\n\nexport function createLogStore<N extends string = LogMethodNames>(\n\toptions: Required<StandardLogOptions<N>>\n): LogStore {\n\treturn {\n\t\tloggers: record(),\n\t\tnonConsoleLoggers: record(),\n\t\treporters: options.reporters || [createConsoleLogReporter()],\n\t\tlogLevel: options.logLevel,\n\t\tlogLevelStore: logLevelStore(options)\n\t}\n}\n\nexport interface LogStore {\n\tloggers: Record<string, Logger>\n\tnonConsoleLoggers: Record<string, Logger>\n\treporters: LogReporter[]\n\tlogLevel: LogLevel\n\tlogLevelStore: ReturnType<typeof logLevelStore>\n}\n\nexport interface LogLevelStoreOptions {\n\tcustomLevels?: Record<string, number>\n}\n\nexport function logLevelStore(options: LogLevelStoreOptions) {\n\tconst customLevels = options.customLevels || record()\n\n\tconst store = {\n\t\tcustomLevels,\n\t\tcustomLevelsReverse: reduceByKey(\n\t\t\tcustomLevels,\n\t\t\t(p, k) => {\n\t\t\t\tp[customLevels[k]] = k\n\t\t\t\treturn p\n\t\t\t},\n\t\t\t{} as Record<number, string>\n\t\t)\n\t}\n\treturn {\n\t\tgetName(level: number) {\n\t\t\treturn store.customLevelsReverse[level] ?? toLogLevelName(level)\n\t\t},\n\t\tgetLevel(name: string) {\n\t\t\treturn store.customLevels[name] ?? toLogLevel(name)\n\t\t},\n\t\tgetAllLevels() {\n\t\t\treturn reduceKey(\n\t\t\t\tlogLevels,\n\t\t\t\t(result, name) => {\n\t\t\t\t\tif (name !== 'none' && name !== 'all') result.push({ name, level: logLevels[name] })\n\n\t\t\t\t\treturn result\n\t\t\t\t},\n\t\t\t\tmapKey(store.customLevels, name => ({ name, level: store.customLevels[name] }))\n\t\t\t)\n\t\t}\n\t}\n}\n","import { logLevels } from './log_levels.js'\nimport type { LogStore } from './log_store.js'\nimport type {\n\tLogEntry,\n\tLogFunction,\n\tLogger,\n\tLoggerOptions,\n\tLogLevel,\n\tLogMethodNames,\n\tLogReporter\n} from './types.js'\n\nexport function createLogger<N extends string = LogMethodNames>(\n\tstore: LogStore,\n\tid: string,\n\toptions?: LoggerOptions\n): Logger<N | LogMethodNames> {\n\tid = sanitizeId(id)\n\tconst writeTo = options?.writeTo ?? (() => true)\n\tconst [filter, reporters]: [(reporterId: string) => boolean, LogReporter[]] =\n\t\ttypeof writeTo === 'string'\n\t\t\t? [id => id === writeTo, store.reporters]\n\t\t\t: writeTo instanceof RegExp\n\t\t\t\t? [id => writeTo.test(id), store.reporters]\n\t\t\t\t: typeof writeTo === 'function'\n\t\t\t\t\t? [writeTo, store.reporters]\n\t\t\t\t\t: [() => true, [writeTo]]\n\n\tfunction write(entry: LogEntry) {\n\t\twriteToReporters(reporters, entry, filter)\n\t}\n\n\tconst logger = {\n\t\tlevel: options?.level,\n\t\twrite\n\t} as any\n\n\tObject.defineProperties(logger, {\n\t\tid: { value: id, writable: false },\n\t\tcount: {\n\t\t\twritable: false,\n\t\t\tvalue: (\n\t\t\t\tcounter =>\n\t\t\t\t(...args: any[]): void => {\n\t\t\t\t\tif (shouldLog(store, logLevels.debug, logger.level))\n\t\t\t\t\t\twrite({\n\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\tlevel: logLevels.debug,\n\t\t\t\t\t\t\targs: [++counter, ...args],\n\t\t\t\t\t\t\ttimestamp: new Date()\n\t\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t)(0)\n\t\t},\n\t\ton: {\n\t\t\twritable: false,\n\t\t\tvalue: (level: number | N | LogMethodNames, logFn: LogFunction) => {\n\t\t\t\tconst logLevel = typeof level === 'string' ? store.logLevelStore.getLevel(level)! : level\n\t\t\t\tif (shouldLog(store, logLevel, logger.level)) {\n\t\t\t\t\tconst methodName = store.logLevelStore.getName(logLevel)\n\t\t\t\t\tconst bindedMethod = logger[methodName].bind(logger)\n\t\t\t\t\tconst result = logFn(bindedMethod, logger.level ?? store.logLevel)\n\t\t\t\t\tif (result) bindedMethod(result)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tstore.logLevelStore.getAllLevels().forEach(function addMethod({ name, level }) {\n\t\tObject.defineProperty(logger, name, {\n\t\t\twritable: false,\n\t\t\tvalue: (...args: any[]) => {\n\t\t\t\tif (shouldLog(store, level, logger.level)) write({ id, level, args, timestamp: new Date() })\n\t\t\t}\n\t\t})\n\t})\n\treturn logger\n}\n\nfunction sanitizeId(id: string) {\n\treturn id.replace(/[`~!#$%^&*()=+[\\]{},|<>?]/g, '-')\n}\n\nfunction writeToReporters(\n\treporters: LogReporter[],\n\tlogEntry: LogEntry,\n\tfilter: (reporterId: string) => boolean\n) {\n\treporters.filter(r => filter(r.id)).forEach(r => r.write(logEntry!))\n}\n\n/**\n * Determines should you log.\n * @param loggerLevel Log level of the logger.\n * It can be undefined which the global log level will be used.\n */\nfunction shouldLog(store: LogStore, targetLevel: LogLevel, loggerLevel: LogLevel | undefined) {\n\treturn targetLevel <= (loggerLevel !== undefined ? loggerLevel : store.logLevel)\n}\n","import { record } from 'type-plus'\nimport type { LogStore } from './log_store.js'\nimport type { LogMethodNames, StandardLogInstance } from './types.js'\n\nexport const ctx: {\n\tconfigured?: boolean\n\tgsl?: { store: LogStore; standardLog: StandardLogInstance<LogMethodNames> }\n} = record()\n","import { record, required } from 'type-plus'\nimport { DEFAULT_LOG_METHOD_NAMES, logLevels } from './log_levels.js'\nimport { createLogStore, type LogStore } from './log_store.js'\nimport { createLogger } from './logger.js'\nimport { ctx } from './standard_log.ctx.js'\nimport type {\n\tLogger,\n\tLoggerOptions,\n\tLogMethodNames,\n\tStandardLogInstance,\n\tStandardLogOptions\n} from './types.js'\n\nexport interface StandardLog<N extends string = LogMethodNames> extends Readonly<StandardLogInstance<N>> {}\n\nexport function createStandardLog<N extends string = LogMethodNames>(\n\toptions?: StandardLogOptions<N>\n): StandardLog<N> {\n\tconst closure = createStandardLogClosure(options)\n\tif (options?.reporters?.some(r => !r.id)) {\n\t\tconst log = closure.standardLog.getLogger('standard-log')\n\t\tlog.critical(\n\t\t\t`Detected reporter with empty id. This is not allowed as it will create problems with feature like 'getNonConsoleLogger()'. Please add an id to your reporter.`\n\t\t)\n\t}\n\n\tif (!ctx.gsl) ctx.gsl = closure as any\n\treturn closure.standardLog\n}\n\nfunction noop() {}\n\nexport function createStandardLogClosure<N extends string = LogMethodNames>(\n\toptions?: StandardLogOptions<N>\n): { store: LogStore; standardLog: StandardLog<N> } {\n\t// TODO reporter.id must not be empty\n\tconst store = createLogStore(required({ logLevel: logLevels.info }, options))\n\tconst nonConsoleReporters = options?.reporters?.filter(r => !r.isConsoleReporter).map(r => r.id) ?? []\n\tconst logMethods = DEFAULT_LOG_METHOD_NAMES.concat(Object.keys(options?.customLevels ?? {})).concat([\n\t\t'on',\n\t\t'count',\n\t\t'write'\n\t])\n\treturn {\n\t\tstore,\n\t\tstandardLog: {\n\t\t\tget logLevel() {\n\t\t\t\treturn store.logLevel\n\t\t\t},\n\n\t\t\ttoLogLevelName(level: number) {\n\t\t\t\treturn store.logLevelStore.getName(level)\n\t\t\t},\n\t\t\ttoLogLevel(name: string) {\n\t\t\t\treturn store.logLevelStore.getLevel(name)\n\t\t\t},\n\t\t\tgetLogger(id: string, options?: LoggerOptions) {\n\t\t\t\tif (store.loggers[id]) return store.loggers[id] as any\n\t\t\t\treturn (store.loggers[id] = createLogger(store, id, { ssf: this.getLogger, ...options }) as any)\n\t\t\t},\n\t\t\tgetNonConsoleLogger(id, options?) {\n\t\t\t\tif (store.nonConsoleLoggers[id]) return store.nonConsoleLoggers[id] as any\n\n\t\t\t\tif (store.loggers[id]) {\n\t\t\t\t\tconst log = this.getLogger('standard-log')\n\t\t\t\t\tlog.warn(`attempt to create a non-console logger with existing id ('${id}'), ignoring`)\n\t\t\t\t\treturn (store.nonConsoleLoggers[id] = createDummyLogger(logMethods))\n\t\t\t\t}\n\n\t\t\t\treturn (store.nonConsoleLoggers[id] =\n\t\t\t\t\tnonConsoleReporters.length === 0\n\t\t\t\t\t\t? createDummyLogger(logMethods)\n\t\t\t\t\t\t: createLogger(store, id, {\n\t\t\t\t\t\t\t\tssf: this.getNonConsoleLogger,\n\t\t\t\t\t\t\t\t...options,\n\t\t\t\t\t\t\t\twriteTo(reporterId) {\n\t\t\t\t\t\t\t\t\treturn nonConsoleReporters.indexOf(reporterId) >= 0\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}))\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction createDummyLogger(logMethods: string[]) {\n\treturn logMethods.reduce((p, m) => {\n\t\tp[m] = noop\n\t\treturn p\n\t}, record()) as Logger\n}\n\n/**\n * Suppress logging within the code block.\n */\nexport function suppressLogs<R>(block: () => R, log: Logger, ...logs: Logger[]): R\nexport function suppressLogs<R>(block: () => R, ...logs: Logger[]): R {\n\tconst origLevels = logs.map(l => l.level)\n\tlogs.forEach(l => (l.level = logLevels.none))\n\tconst result = block()\n\tlogs.forEach((l, i) => (l.level = origLevels[i]))\n\treturn result\n}\n\nexport type GetLogger<N extends string = LogMethodNames> = (\n\tid: string,\n\toptions?: LoggerOptions\n) => Logger<LogMethodNames | N>\n\nexport function getLogger<N extends string = LogMethodNames>(id: string, options?: LoggerOptions) {\n\treturn getGlobalSL<N>().getLogger(id, options)\n}\n\nfunction getGlobalSL<N extends string = LogMethodNames>(): StandardLogInstance<N> {\n\tif (!ctx.gsl) ctx.gsl = createStandardLogClosure()\n\n\treturn ctx.gsl!.standardLog as StandardLogInstance<N>\n}\n\nexport function configGlobal(options: Omit<StandardLogOptions, 'customLevels'>) {\n\tif (ctx.configured) {\n\t\tconst log = ctx.gsl!.standardLog.getLogger('standard-log')\n\t\tlog.warn(\n\t\t\t'configGlobal() is being called more than once. Please make sure this is expected. Application should use `createStandardLog()` most of the time.'\n\t\t)\n\t}\n\n\tif (ctx.gsl) {\n\t\tif (options.logLevel) {\n\t\t\tctx.gsl.store.logLevel = options.logLevel\n\t\t}\n\t\tif (options.reporters) {\n\t\t\tconst reporters = ctx.gsl.store.reporters\n\t\t\treporters.length = 0\n\t\t\treporters.push(...options.reporters)\n\t\t}\n\t} else {\n\t\tctx.gsl = createStandardLogClosure(options)\n\t}\n\tctx.configured = true\n}\n"],"x_google_ignoreList":[0,1,2,3,4,9,10,11,12,13,14],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;CACA,SAAS,SAAS,SAAS,SAAS,SAAS;EAC5C,OAAO,MAAM;GACZ;GACA;GACA;EACD,IAAI,GAAG,MAAM;GACZ,OAAO;IACN,GAAG;IACH,GAAG;GACJ;EACD,CAAC;CACF;CAQA,SAAS,MAAM,SAAS,SAAS;EAChC,IAAI,QAAQ,OAAO,KAAK,KAAK,QAAQ,OAAO,MAAM,OAAO,QAAQ;EACjE,OAAO,QAAQ,QAAQ,MAAM,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,SAAS,CAAC,CAAC;CACrD;CAoBA,SAAS,UAAU,IAAI,IAAI,IAAI;EAC9B,IAAI,OAAO,KAAK,KAAK,OAAO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gB,aAAgB,OAAgB,GAAG,MAAmB;EACrE,MAAM,aAAa,KAAK,KAAI,MAAK,EAAE,KAAK;EACxC,KAAK,SAAQ,MAAM,EAAE,QAAQ,UAAU,IAAK;EAC5C,MAAM,SAAS,MAAM;EACrB,KAAK,SAAS,GAAG,MAAO,EAAE,QAAQ,WAAW,EAAG;EAChD,OAAO;CACR;CAOA,SAAgB,UAA6C,IAAY,SAAyB;EACjG,OAAO,YAAe,CAAC,CAAC,UAAU,IAAI,OAAO;CAC9C;CAEA,SAAS,cAAyE;EACjF,IAAI,CAAC,IAAI,KAAK,IAAI,MAAM,yBAAyB;EAEjD,OAAO,IAAI,IAAK;CACjB;CAEA,SAAgB,aAAa,SAAmD;EAC/E,IAAI,IAAI,YAEP,IADgB,IAAK,YAAY,UAAU,cACzC,CAAC,CAAC,KACH,kJACD;EAGD,IAAI,IAAI,KAAK;GACZ,IAAI,QAAQ,UACX,IAAI,IAAI,MAAM,WAAW,QAAQ;GAElC,IAAI,QAAQ,WAAW;IACtB,MAAM,YAAY,IAAI,IAAI,MAAM;IAChC,UAAU,SAAS;IACnB,UAAU,KAAK,GAAG,QAAQ,SAAS;GACpC;EACD,OACC,IAAI,MAAM,yBAAyB,OAAO;EAE3C,IAAI,aAAa;CAClB"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "standard-log",
|
|
3
|
-
"version": "13.
|
|
3
|
+
"version": "13.3.0",
|
|
4
4
|
"description": "The standard log library",
|
|
5
5
|
"homepage": "https://github.com/cyberuni/standard-log/tree/main/packages/log",
|
|
6
6
|
"bugs": {
|
|
@@ -58,17 +58,17 @@
|
|
|
58
58
|
"!**/test_utils.*"
|
|
59
59
|
],
|
|
60
60
|
"dependencies": {
|
|
61
|
-
"@just-func/types": "^0.
|
|
62
|
-
"iso-error": "^
|
|
61
|
+
"@just-func/types": "^0.6.0",
|
|
62
|
+
"iso-error": "^7.0.0",
|
|
63
63
|
"ms": "^2.1.3",
|
|
64
|
-
"type-plus": "
|
|
64
|
+
"type-plus": "8.0.0-beta.10"
|
|
65
65
|
},
|
|
66
66
|
"devDependencies": {
|
|
67
67
|
"@repobuddy/vitest": "^2.1.1",
|
|
68
68
|
"@types/ms": "^2.0.0",
|
|
69
69
|
"@types/node": "^24.0.0",
|
|
70
70
|
"@types/ramda": "^0.32.0",
|
|
71
|
-
"assertron": "^11.
|
|
71
|
+
"assertron": "^11.6.0",
|
|
72
72
|
"depcheck": "^1.4.3",
|
|
73
73
|
"dirname-filename-esm": "^1.1.1",
|
|
74
74
|
"ramda": "^0.32.0",
|