standard-log 9.1.8 → 10.1.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/README.md +2 -3
- package/cjs/console.js +1 -1
- package/cjs/console.js.map +1 -1
- package/cjs/console.spec.js +2 -2
- package/cjs/console.spec.js.map +1 -1
- package/cjs/formatter.d.ts +11 -1
- package/cjs/formatter.d.ts.map +1 -1
- package/cjs/formatter.js +15 -1
- package/cjs/formatter.js.map +1 -1
- package/cjs/memory.d.ts +1 -0
- package/cjs/memory.d.ts.map +1 -1
- package/cjs/memory.js +4 -2
- package/cjs/memory.js.map +1 -1
- package/cjs/memory.spec.js +61 -49
- package/cjs/memory.spec.js.map +1 -1
- package/cjs/standardLog.js +1 -2
- package/cjs/standardLog.js.map +1 -1
- package/cjs/standardLog.spec.js +9 -1
- package/cjs/standardLog.spec.js.map +1 -1
- package/dist/standard-log.es5.js +21 -6
- package/dist/standard-log.es5.js.gz +0 -0
- package/dist/standard-log.es5.js.map +1 -1
- package/dist/standard-log.es5.js.map.gz +0 -0
- package/dist/standard-log.esm.js +20 -5
- package/dist/standard-log.esm.js.gz +0 -0
- package/dist/standard-log.esm.js.map +1 -1
- package/dist/standard-log.esm.js.map.gz +0 -0
- package/esm/console.js +2 -2
- package/esm/console.js.map +1 -1
- package/esm/console.spec.js +2 -2
- package/esm/console.spec.js.map +1 -1
- package/esm/formatter.d.ts +11 -1
- package/esm/formatter.d.ts.map +1 -1
- package/esm/formatter.js +12 -0
- package/esm/formatter.js.map +1 -1
- package/esm/memory.d.ts +1 -0
- package/esm/memory.d.ts.map +1 -1
- package/esm/memory.js +4 -2
- package/esm/memory.js.map +1 -1
- package/esm/memory.spec.js +63 -51
- package/esm/memory.spec.js.map +1 -1
- package/esm/standardLog.js +1 -2
- package/esm/standardLog.js.map +1 -1
- package/esm/standardLog.spec.js +9 -1
- package/esm/standardLog.spec.js.map +1 -1
- package/package.json +1 -1
- package/ts/console.ts +2 -2
- package/ts/formatter.ts +14 -1
- package/ts/memory.ts +4 -1
- package/ts/standardLog.ts +1 -1
|
Binary file
|
package/dist/standard-log.esm.js
CHANGED
|
@@ -233,7 +233,7 @@ function buildFn(name) {
|
|
|
233
233
|
return function (...args) { console[name](...args); };
|
|
234
234
|
}
|
|
235
235
|
function createConsoleLogReporter(options) {
|
|
236
|
-
const { id, formatter, filter } = (0,type_plus__WEBPACK_IMPORTED_MODULE_1__.unpartial)({ id: 'console', formatter: _formatter_js__WEBPACK_IMPORTED_MODULE_2__.
|
|
236
|
+
const { id, formatter, filter } = (0,type_plus__WEBPACK_IMPORTED_MODULE_1__.unpartial)({ id: 'console', formatter: _formatter_js__WEBPACK_IMPORTED_MODULE_2__.consoleFormatter }, options);
|
|
237
237
|
if (!_platform_js__WEBPACK_IMPORTED_MODULE_3__.polyfill.console)
|
|
238
238
|
_platform_js__WEBPACK_IMPORTED_MODULE_3__.polyfill.console = buildPolyfillConsole();
|
|
239
239
|
return Object.freeze({
|
|
@@ -298,6 +298,7 @@ class InvalidId extends StandardLogError {
|
|
|
298
298
|
"use strict";
|
|
299
299
|
__webpack_require__.r(__webpack_exports__);
|
|
300
300
|
/* harmony export */ __webpack_require__.d(__webpack_exports__, {
|
|
301
|
+
/* harmony export */ "consoleFormatter": function() { return /* binding */ consoleFormatter; },
|
|
301
302
|
/* harmony export */ "createTimestampFormatter": function() { return /* binding */ createTimestampFormatter; },
|
|
302
303
|
/* harmony export */ "formatLogLevel": function() { return /* binding */ formatLogLevel; },
|
|
303
304
|
/* harmony export */ "plainLogFormatter": function() { return /* binding */ plainLogFormatter; }
|
|
@@ -329,9 +330,21 @@ function createTimestampFormatter(format) {
|
|
|
329
330
|
function formatLogLevel(level) {
|
|
330
331
|
return `(${(0,upper_case__WEBPACK_IMPORTED_MODULE_1__.upperCase)((0,_logLevels_js__WEBPACK_IMPORTED_MODULE_2__.toLogLevelName)(level))})`;
|
|
331
332
|
}
|
|
333
|
+
/**
|
|
334
|
+
* Formats log entry as plain text with the following format:
|
|
335
|
+
* `timestamp id level ...args`
|
|
336
|
+
*
|
|
337
|
+
* This is typically useful for writing logs to file
|
|
338
|
+
*/
|
|
332
339
|
function plainLogFormatter({ id, level, args, timestamp }) {
|
|
333
340
|
return [timestamp.toISOString(), id, formatLogLevel(level), ...args];
|
|
334
341
|
}
|
|
342
|
+
/**
|
|
343
|
+
* Formats log entry like default console log.
|
|
344
|
+
*/
|
|
345
|
+
function consoleFormatter({ args }) {
|
|
346
|
+
return args;
|
|
347
|
+
}
|
|
335
348
|
|
|
336
349
|
|
|
337
350
|
/***/ }),
|
|
@@ -625,9 +638,11 @@ function createMemoryLogReporter(options) {
|
|
|
625
638
|
logs.push(formatter(entry));
|
|
626
639
|
},
|
|
627
640
|
getLogMessage() {
|
|
641
|
+
return this.getLogMessages().join('\n');
|
|
642
|
+
},
|
|
643
|
+
getLogMessages() {
|
|
628
644
|
return logs.map(_platform_js__WEBPACK_IMPORTED_MODULE_0__.toInspectLogEntry)
|
|
629
|
-
.map(log => log.args.join(' '))
|
|
630
|
-
.join('\n');
|
|
645
|
+
.map(log => log.args.join(' '));
|
|
631
646
|
},
|
|
632
647
|
getLogMessageWithLevel() { return toMessageWithLevel(logs); }
|
|
633
648
|
});
|
|
@@ -745,8 +760,7 @@ function configGlobal(options) {
|
|
|
745
760
|
}
|
|
746
761
|
if (options.reporters) {
|
|
747
762
|
const reporters = ctx.gsl.store.reporters;
|
|
748
|
-
|
|
749
|
-
reporters.pop();
|
|
763
|
+
reporters.length = 0;
|
|
750
764
|
reporters.push(...options.reporters);
|
|
751
765
|
}
|
|
752
766
|
}
|
|
@@ -1949,6 +1963,7 @@ __webpack_require__.r(__webpack_exports__);
|
|
|
1949
1963
|
/* harmony export */ "InvalidId": function() { return /* reexport safe */ _errors_js__WEBPACK_IMPORTED_MODULE_1__.InvalidId; },
|
|
1950
1964
|
/* harmony export */ "StandardLogError": function() { return /* reexport safe */ _errors_js__WEBPACK_IMPORTED_MODULE_1__.StandardLogError; },
|
|
1951
1965
|
/* harmony export */ "configGlobal": function() { return /* reexport safe */ _standardLog_js__WEBPACK_IMPORTED_MODULE_5__.configGlobal; },
|
|
1966
|
+
/* harmony export */ "consoleFormatter": function() { return /* reexport safe */ _formatter_js__WEBPACK_IMPORTED_MODULE_2__.consoleFormatter; },
|
|
1952
1967
|
/* harmony export */ "createConsoleLogReporter": function() { return /* reexport safe */ _console_js__WEBPACK_IMPORTED_MODULE_0__.createConsoleLogReporter; },
|
|
1953
1968
|
/* harmony export */ "createMemoryLogReporter": function() { return /* reexport safe */ _memory_js__WEBPACK_IMPORTED_MODULE_4__.createMemoryLogReporter; },
|
|
1954
1969
|
/* harmony export */ "createStandardLog": function() { return /* reexport safe */ _standardLog_js__WEBPACK_IMPORTED_MODULE_5__.createStandardLog; },
|
|
Binary file
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"standard-log.esm.js","mappings":";;;;;;;;;;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AAC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A;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,wBAAwB,SAAS;AACjC;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,kBAAkB,qBAAM;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;;;AAGf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,4CAA4C,KAAK;;AAEjD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;AAGA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,UAAU;AACV;AACA;AACA,WAAW;AACX;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,eAAe;;AAEf;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA,eAAe;;AAEf;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB,sHAAgD;;AAEhD;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW;AACX;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA,2HAAsC;;AAEtC,eAAe;AACf;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;ACzkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,oCAAoC,4BAA4B;AAChE,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,0BAA0B;AAC1C,4CAA4C,6BAA6B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kCAAkC;AACzD;AACA;AACA;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,YAAY,0BAA0B;AACtC;AACA;AACA,gEAAgE,6BAA6B;AAC7F;AACA;AACA,8DAA8D,oBAAoB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA,gBAAgB;AAChB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,2EAA2E;AAC3G;AACA;AACA;AACA;AACA,yBAAyB,SAAS,GAAG,WAAW,KAAK,YAAY;AACjE;AACA;AACA,yBAAyB,SAAS,IAAI,YAAY;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACO;AACP;AACA;AACA;;;;;;;;;;;;;;;AC5NO;AACP;AACA;AACA;;;;;;;;;;;;;;;ACHA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACPO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;;;;;;;;;;;;;;;;ACPA;AACA;AACO;AACP;AACA,iBAAiB;AACjB,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,IAAI;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACvC6C;AACtC;AACP;AACA,WAAW,0DAAY;AACvB;AACO;AACP;AACA;AACA;AACA;AACA;AACA,6BAA6B,0BAA0B,KAAK;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,IAAI;AACT;AACA;AACA;AACA;AACA;;;;;;UCvBA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC;;;;;WCPD,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACN4B;AACD;AACG;AACA;AACH;AAIF;AAEC","sources":["webpack://StandardLog/../../node_modules/ms/index.js","webpack://StandardLog/./ts/console.ts","webpack://StandardLog/./ts/errors.ts","webpack://StandardLog/./ts/formatter.ts","webpack://StandardLog/./ts/logLevels.ts","webpack://StandardLog/./ts/logStore.ts","webpack://StandardLog/./ts/logger.ts","webpack://StandardLog/./ts/memory.ts","webpack://StandardLog/./ts/platform.ts","webpack://StandardLog/./ts/standardLog.ts","webpack://StandardLog/../../node_modules/upper-case/dist/index.js","webpack://StandardLog/../../node_modules/util/node_modules/inherits/inherits_browser.js","webpack://StandardLog/../../node_modules/util/support/isBufferBrowser.js","webpack://StandardLog/../../node_modules/util/util.js","webpack://StandardLog/../../node_modules/iso-error/esm/index.js","webpack://StandardLog/../../node_modules/type-plus/esm/object/mapKey.js","webpack://StandardLog/../../node_modules/type-plus/esm/object/record.js","webpack://StandardLog/../../node_modules/type-plus/esm/object/reduceKey.js","webpack://StandardLog/../../node_modules/unpartial/esm/required.js","webpack://StandardLog/../../node_modules/unpartial/esm/unpartial.js","webpack://StandardLog/webpack/bootstrap","webpack://StandardLog/webpack/runtime/compat get default export","webpack://StandardLog/webpack/runtime/define property getters","webpack://StandardLog/webpack/runtime/global","webpack://StandardLog/webpack/runtime/hasOwnProperty shorthand","webpack://StandardLog/webpack/runtime/make namespace object","webpack://StandardLog/./ts/index.ts"],"sourcesContent":["/**\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","import { unpartial } from 'type-plus'\nimport { plainLogFormatter } from './formatter.js'\nimport { logLevels } from './logLevels.js'\nimport { polyfill } from './platform.js'\nimport type { ConsoleLike, LogEntry, LogFormatter, LogReporter, LogReporterOptions } from './types.js'\n\nexport function toConsoleMethod(level: number) {\n switch (true) {\n // edge case in case none is somehow written\n case (level <= 0): return 'debug'\n case (level <= logLevels.error): return 'error'\n case (level <= logLevels.warn): return 'warn'\n case (level <= logLevels.info): return 'info'\n default: return 'debug'\n }\n}\n\n// istanbul ignore next\n/* eslint-disable no-console */\nfunction buildPolyfillConsole() {\n // old phantomjs does not have bind function\n const hasBind = !!console.log.bind as boolean\n if (hasBind) {\n return {\n // the `typeof` guards against IE where `console.log.apply()`\n // results in error `Object doesn't support property or method 'apply'`\n debug: (typeof console.info === 'function' ? console.debug : console.log).bind(console),\n info: (typeof console.info === 'function' ? console.info : console.log).bind(console),\n warn: (typeof console.warn === 'function' ? console.warn : console.log).bind(console),\n error: (typeof console.error === 'function' ? console.error : console.log).bind(console)\n }\n }\n else {\n return {\n debug: buildFn(typeof console.debug === 'function' ? 'debug' : 'log'),\n info: buildFn(typeof console.info === 'function' ? 'info' : 'log'),\n warn: buildFn(typeof console.warn === 'function' ? 'warn' : 'log'),\n error: buildFn(typeof console.error === 'function' ? 'error' : 'log'),\n }\n }\n}\n\n// istanbul ignore next\nfunction buildFn(name: 'debug' | 'info' | 'warn' | 'error' | 'log') {\n return function (...args: any[]) { console[name](...args) }\n}\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 const { id, formatter, filter } = unpartial({ id: 'console', formatter: plainLogFormatter }, options)\n if (!polyfill.console) polyfill.console = buildPolyfillConsole()\n\n return Object.freeze({\n id,\n isConsoleReporter: true,\n get formatter() { return formatter },\n get filter() { return filter },\n console: polyfill.console,\n write(entry: LogEntry) {\n if (filter && !filter(entry)) return\n const values = formatter(entry)\n const method = toConsoleMethod(entry.level)\n this.console[method](...values)\n }\n })\n}\n","import { IsoError, ModuleError } from 'iso-error'\n\nexport class StandardLogError extends ModuleError {\n constructor(description: string, options?: IsoError.Options) {\n super('standard-log', description, options)\n }\n}\nexport class InvalidId extends StandardLogError {\n constructor(public id: string, options?: IsoError.Options) {\n super(`logger id only supports alphanumeric, unicode characters, and [:_-.]. Received ${id}`, options)\n }\n}\n","import ms from 'ms'\nimport { upperCase } from 'upper-case'\nimport { toLogLevelName } from './logLevels.js'\nimport type { LogEntry } from './types.js'\n\nexport type TimestampFormat = 'none' | 'iso' | 'elapsed'\n\nexport function createTimestampFormatter(format: TimestampFormat) {\n switch (format) {\n case 'none':\n return (_timestamp: Date) => undefined\n case 'iso':\n return (timestamp: Date) => timestamp.toISOString()\n case 'elapsed': {\n let lastTick: number\n return (timestamp: Date) => {\n const newTick = timestamp.getTime()\n const result = ms(lastTick === undefined ? 0 : newTick - lastTick)\n lastTick = newTick\n return result\n }\n }\n }\n}\n\nexport function formatLogLevel(level: number) {\n return `(${upperCase(toLogLevelName(level))})`\n}\n\nexport function plainLogFormatter({ id, level, args, timestamp }: LogEntry) {\n return [timestamp.toISOString(), id, formatLogLevel(level), ...args]\n}\n","export const logLevels = {\n /**\n * none: 0\n */\n none: 0,\n /**\n * emergency: 100\n */\n emergency: 100,\n /**\n * alert: 200\n */\n alert: 200,\n /**\n * critical: 300\n */\n critical: 300,\n /**\n * error: 400\n */\n error: 400,\n /**\n * warn: 500\n */\n warn: 500,\n /**\n * notice: 600\n */\n notice: 600,\n /**\n * info: 700\n */\n info: 700,\n /**\n * debug: 800\n */\n debug: 800,\n /**\n * trace: 900\n */\n trace: 900,\n /**\n * planck: Infinity\n * `planck unit` is a very small unit <https://en.wikipedia.org/wiki/Planck_units>.\n */\n planck: Infinity,\n /**\n * all: Infinity\n */\n all: Infinity\n}\n\n/**\n * Convert default log level value to log level name.\n */\nexport function toLogLevelName(level: number) {\n if (level <= 100) return 'emergency'\n if (level <= 200) return 'alert'\n if (level <= 300) return 'critical'\n if (level <= 400) return 'error'\n if (level <= 500) return 'warn'\n if (level <= 600) return 'notice'\n if (level <= 700) return 'info'\n if (level <= 800) return 'debug'\n if (level <= 900) return 'trace'\n return 'planck'\n}\n\n/**\n * Convert default log level name to log level value.\n */\nexport function toLogLevel(name: string) {\n return (logLevels as any)[name.toLocaleLowerCase()]\n}\n","\nimport { mapKey, reduceByKey, reduceKey } from 'type-plus'\nimport { createConsoleLogReporter } from './console.js'\nimport { logLevels, toLogLevel, toLogLevelName } from './logLevels.js'\nimport type { Logger, LogLevel, LogMethodNames, LogReporter, StandardLogOptions } from './types.js'\n\nexport function createLogStore<N extends string = LogMethodNames>(options: Required<StandardLogOptions<N>>): LogStore {\n return {\n loggers: {},\n reporters: options.reporters || [createConsoleLogReporter()],\n logLevel: options.logLevel,\n logLevelStore: logLevelStore(options)\n }\n}\n\nexport interface LogStore {\n loggers: Record<string, Logger>,\n reporters: LogReporter[],\n logLevel: LogLevel,\n logLevelStore: ReturnType<typeof logLevelStore>\n}\n\nexport interface LogLevelStoreOptions {\n customLevels?: Record<string, number>\n}\n\nexport function logLevelStore(options: LogLevelStoreOptions) {\n const customLevels = options.customLevels || {}\n\n const store = {\n customLevels,\n customLevelsReverse: reduceByKey(customLevels, (p, k) => {\n p[customLevels[k]] = k\n return p\n }, {} as Record<number, string>)\n }\n return {\n getName(level: number) {\n return store.customLevelsReverse[level] ?? toLogLevelName(level)\n },\n getLevel(name: string) {\n return store.customLevels[name] ?? toLogLevel(name)\n },\n getAllLevels() {\n return reduceKey(logLevels, (result, name) => {\n if (name !== 'none' && name !== 'all') result.push({ name, level: logLevels[name] })\n\n return result\n }, mapKey(store.customLevels, name => ({ name, level: store.customLevels[name] })))\n }\n }\n}\n","import type { StackTraceMeta } from '@just-func/types'\nimport { InvalidId } from './errors.js'\nimport { logLevels } from './logLevels.js'\nimport { LogStore } from './logStore.js'\nimport type { LogEntry, LogFunction, Logger, LoggerOptions, LogMethodNames, LogReporter } from './types.js'\nimport { LogLevel } from './types.js'\n\nexport function createLogger<N extends string = LogMethodNames>(\n store: LogStore, id: string, options?: LoggerOptions\n): Logger<N | LogMethodNames> {\n validateId(id, options)\n const writeTo = options?.writeTo ?? (() => true)\n const [filter, reporters]: [(reporterId: string) => boolean, LogReporter[]] = typeof writeTo === 'string'\n ? [id => id === writeTo, store.reporters]\n : writeTo instanceof RegExp\n ? [id => writeTo.test(id), store.reporters]\n : typeof writeTo === 'function'\n ? [writeTo, store.reporters]\n : [() => true, [writeTo]]\n\n function write(entry: LogEntry) {\n writeToReporters(reporters, entry, filter)\n }\n\n const logger = {\n level: options?.level,\n write\n } as any\n\n Object.defineProperties(logger, {\n id: { value: id, writable: false },\n count: {\n writable: false,\n value: ((counter) => (...args: any[]) => {\n const level = logLevels.debug\n if (shouldLog(store, level, logger.level))\n write({\n id,\n level,\n args: [++counter, ...args],\n timestamp: new Date()\n })\n })(0)\n },\n on: {\n writable: false,\n value: (level: number | N | LogMethodNames, logFn: LogFunction) => {\n const logLevel = typeof level === 'string' ? store.logLevelStore.getLevel(level)! : level\n if (shouldLog(store, logLevel, logger.level)) {\n const methodName = store.logLevelStore.getName(logLevel)\n const bindedMethod = logger[methodName].bind(logger)\n const result = logFn(bindedMethod)\n if (result) bindedMethod(result)\n }\n }\n }\n })\n store.logLevelStore.getAllLevels().forEach(function addMethod({ name, level }) {\n Object.defineProperty(logger, name, {\n writable: false,\n value: (...args: any[]) => {\n if (shouldLog(store, level, logger.level)) write({ id, level, args, timestamp: new Date() })\n }\n })\n })\n return logger\n}\n\nfunction validateId(id: string, meta?: StackTraceMeta) {\n if (/[`~!#$%^&*()=+[\\]{},|<>?]/.test(id)) throw new InvalidId(id, meta)\n}\n\nfunction writeToReporters(reporters: LogReporter[], logEntry: LogEntry, filter: (reporterId: string) => boolean) {\n reporters.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 return targetLevel <= (loggerLevel !== undefined ? loggerLevel : store.logLevel)\n}\n","import { required } from 'type-plus'\nimport { toInspectLogEntry } from './platform.js'\nimport { formatLogLevel } from './formatter.js'\nimport type { LogEntry, LogFormatter, LogReporter, LogReporterOptions } from './types.js'\n\nexport type MemoryLogReporter = LogReporter<LogEntry> & {\n logs: LogEntry[],\n /**\n * Gets a simple log message for testing.\n * The message only contains arguments for each log entry.\n */\n getLogMessage(): string,\n getLogMessageWithLevel(): string\n}\n\nexport type MemoryLogFormatter = LogFormatter<LogEntry>\n\nexport function toMessageWithLevel(logs: LogEntry[]) {\n return logs.map(toInspectLogEntry)\n .map(log => `${formatLogLevel(log.level)} ${log.args.join(' ')}`)\n .join('\\n')\n // if it has more than this log,\n // we assume it is running under tests,\n // and remove this log to simplify testing.\n .replace(/^\\(WARN\\) already configured for test, ignoring config\\(\\) call\\n/, '')\n}\n\nexport function createMemoryLogReporter(options?: LogReporterOptions<LogEntry>): MemoryLogReporter {\n const { id, formatter, filter } = required({ id: 'memory', formatter: (e: LogEntry) => e }, options)\n const logs: LogEntry[] = []\n return Object.freeze({\n id,\n get formatter() { return formatter },\n get filter() { return filter },\n logs,\n write(entry: LogEntry) {\n if (filter && !filter(entry)) return\n logs.push(formatter(entry))\n },\n getLogMessage() {\n return logs.map(toInspectLogEntry)\n .map(log => log.args.join(' '))\n .join('\\n')\n },\n getLogMessageWithLevel() { return toMessageWithLevel(logs) }\n })\n}\n","import { inspect } from 'util'\nimport type { ConsoleLike, LogEntry } from './types.js'\n\nexport const toInspectLogEntry = (e: LogEntry) => (\n e.args = e.args.map(value => typeof value === 'object' && value !== null ? inspect(value) : value),\n e)\n\nexport const polyfill: { console?: ConsoleLike } = {}\n","import { record, required } from 'type-plus'\nimport { createLogger } from './logger.js'\nimport { logLevels } from './logLevels.js'\nimport { createLogStore, LogStore } from './logStore.js'\nimport { createMemoryLogReporter, MemoryLogReporter } from './memory.js'\nimport type { Logger, LoggerOptions, LogLevel, LogMethodNames, StandardLogOptions } from './types.js'\n\nexport interface StandardLogInstance<N extends string = LogMethodNames> {\n logLevel: number,\n toLogLevelName(level: number): string,\n toLogLevel(name: N): number,\n getLogger(id: string, options?: LoggerOptions): Logger<N | LogMethodNames>\n}\n\nexport interface StandardLog<N extends string = LogMethodNames> extends Readonly<StandardLogInstance<N>> {\n}\n\nexport function createStandardLog<N extends string = LogMethodNames>(\n options?: StandardLogOptions<N>\n): StandardLog<N> {\n const closure = createStandardLogClosure(options)\n if (!ctx.gsl) ctx.gsl = closure as any\n return closure.standardLog\n}\n\nexport function createStandardLogClosure<N extends string = LogMethodNames>(\n options?: StandardLogOptions<N>\n): { store: LogStore, standardLog: StandardLog<N> } {\n const store = createLogStore(required({ logLevel: logLevels.info }, options))\n\n return {\n store,\n standardLog: {\n get logLevel() { return store.logLevel },\n\n toLogLevelName(level: number) {\n return store.logLevelStore.getName(level)\n },\n toLogLevel(name: string) {\n return store.logLevelStore.getLevel(name)\n },\n getLogger(id: string, options?: LoggerOptions) {\n if (store.loggers[id]) return store.loggers[id] as any\n return store.loggers[id] = createLogger(store, id, { ssf: this.getLogger, ...options }) as any\n }\n }\n }\n}\n\nexport type StandardLogForTest<N extends string = LogMethodNames> = StandardLog<N> & { reporter: MemoryLogReporter }\n\nexport function createStandardLogForTest<N extends string = LogMethodNames>(\n logLevel: LogLevel = logLevels.debug\n): StandardLogForTest<N> {\n const reporter = createMemoryLogReporter()\n const standardLog = createStandardLog<N>({ reporters: [reporter], logLevel })\n return { ...standardLog, reporter }\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 const origLevels = logs.map(l => l.level)\n logs.forEach(l => l.level = logLevels.none)\n const result = block()\n logs.forEach((l, i) => l.level = origLevels[i])\n return result\n}\n\nexport function getLogger<N extends string = LogMethodNames>(id: string, options?: LoggerOptions) {\n return getGlobalSL<N>().getLogger(id, options)\n}\n\nexport const ctx: {\n configured?: boolean,\n gsl?: { store: LogStore, standardLog: StandardLogInstance<LogMethodNames> }\n} = record()\n\nfunction getGlobalSL<N extends string = LogMethodNames>(): StandardLogInstance<N> {\n if (!ctx.gsl) ctx.gsl = createStandardLogClosure()\n\n return ctx.gsl!.standardLog as StandardLogInstance<N>\n}\n\nexport function configGlobal(options: Omit<StandardLogOptions, 'customLevels'>) {\n if (ctx.configured) {\n const log = ctx.gsl?.standardLog.getLogger('standard-log')\n log?.warn('configGlobal() is being called more than once. Please make sure this is expected. Application should use `createStandardLog()` most of the time.')\n }\n\n if (ctx.gsl) {\n if (options.logLevel) {\n ctx.gsl.store.logLevel = options.logLevel\n }\n if (options.reporters) {\n const reporters = ctx.gsl.store.reporters\n while (reporters.length > 0) reporters.pop()\n reporters.push(...options.reporters)\n }\n }\n else {\n ctx.gsl = createStandardLogClosure(options)\n }\n ctx.configured = true\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.upperCase = exports.localeUpperCase = void 0;\n/**\n * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt\n */\nvar SUPPORTED_LOCALE = {\n tr: {\n regexp: /[\\u0069]/g,\n map: {\n i: \"\\u0130\",\n },\n },\n az: {\n regexp: /[\\u0069]/g,\n map: {\n i: \"\\u0130\",\n },\n },\n lt: {\n regexp: /[\\u0069\\u006A\\u012F]\\u0307|\\u0069\\u0307[\\u0300\\u0301\\u0303]/g,\n map: {\n i̇: \"\\u0049\",\n j̇: \"\\u004A\",\n į̇: \"\\u012E\",\n i̇̀: \"\\u00CC\",\n i̇́: \"\\u00CD\",\n i̇̃: \"\\u0128\",\n },\n },\n};\n/**\n * Localized upper case.\n */\nfunction localeUpperCase(str, locale) {\n var lang = SUPPORTED_LOCALE[locale.toLowerCase()];\n if (lang)\n return upperCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));\n return upperCase(str);\n}\nexports.localeUpperCase = localeUpperCase;\n/**\n * Upper case as a function.\n */\nfunction upperCase(str) {\n return str.toUpperCase();\n}\nexports.upperCase = upperCase;\n//# sourceMappingURL=index.js.map","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n","module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n // Allow for deprecating things in the process of starting up.\n if (isUndefined(global.process)) {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n if (process.noDeprecation === true) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n if (isUndefined(debugEnviron))\n debugEnviron = process.env.NODE_DEBUG || '';\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n","/* eslint-disable @typescript-eslint/unbound-method */\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) { defineStack(error, stack); },\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}\nconst serializers = [];\nconst deserializers = [];\n/**\n * Isomorphic Error that works across physical boundary.\n */\nexport class IsoError extends Error {\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 = toIsoError(options.cause);\n if (options?.ssf)\n Error.captureStackTrace(this, options.ssf);\n }\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));\n }\n /**\n * @type P Additional properties of the IsoError\n * @param text Json representation of a IsoError\n */\n static parse(text) {\n return deserialize(IsoError.parse, text);\n }\n /**\n * @type P Additional properties of the IsoError\n * @param text Json representation of a IsoError\n */\n static deserialize(text) {\n return deserialize(IsoError.deserialize, text);\n }\n static toSerializable(err) {\n return serializers.reduce((p, s) => p || s(err), undefined)\n || toSerializableError(err);\n }\n static fromSerializable(json) {\n const err = deserializeError(json);\n Error.captureStackTrace(err, IsoError.fromSerializable);\n return err;\n }\n /**\n * returns the error message including the error causes.\n */\n static trace(err) {\n return trace(err);\n }\n static addPlugin({ toSerializable, fromSerializable }) {\n serializers.unshift(toSerializable);\n deserializers.unshift(fromSerializable);\n }\n toString() { return IsoError.serialize(this); }\n trace() { return IsoError.trace(this); }\n}\nfunction deserialize(fn, text) {\n const json = JSON.parse(text);\n const err = deserializeError(json);\n Error.captureStackTrace(err, fn);\n return err;\n}\nfunction deserializeError(json) {\n let err = undefined;\n for (const d of deserializers) {\n err = d(json);\n if (err)\n break;\n }\n return err || defaultDeserializeError(json);\n}\nfunction defaultDeserializeError(json) {\n if (json.name === 'AggregateError') {\n const { message, errors, ...rest } = json;\n // @ts-ignore\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 ? 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}\nfunction toSerializableError(err) {\n if (isAggregateError(err)) {\n return {\n ...err, name: err.constructor.name, message: err.message,\n errors: err.errors.map(toSerializableError)\n };\n }\n if (err instanceof Error) {\n const { message, cause } = err;\n return cause\n ? { ...err, name: err.constructor.name, message, cause: toSerializableError(cause) }\n : { ...err, name: err.constructor.name, message };\n }\n return err;\n}\n// NOTE: In this function I have to to Object.assign to keep the err instance and its stack trace.\nfunction toIsoError(err) {\n if (err instanceof IsoError)\n return err;\n // When the error is an internal error from deserialzation,\n // the err.constructor.name is object\n return Object.assign(err, { name: err.constructor.name !== 'Object' ? err.constructor.name : err.name });\n}\nfunction 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(...trace(e).split('\\n').map(s => ' ' + s)));\n }\n if (err instanceof Error) {\n if (hasCause(err))\n messages.push(...trace(err.cause).split('\\n').map(s => ' ' + s));\n }\n else {\n messages.push(typeof err === 'string' ? err : JSON.stringify(err));\n }\n return messages.join('\\n');\n}\nfunction hasCause(x) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return !!x.cause;\n}\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","export function mapKey(subject, predicate, thisArg) {\n return Object.keys(subject).map(predicate, thisArg);\n}\n//# sourceMappingURL=mapKey.js.map","/**\n * Creates a `Record<Key, Value>`\n */\nexport function record(value) {\n const r = Object.create(null);\n return (value ? Object.assign(r, value) : r);\n}\n//# sourceMappingURL=record.js.map","export function reduceByKey(subject, callbackfn, initialValue) {\n return Object.keys(subject).reduce(callbackfn, initialValue);\n}\n/**\n * @deprecated renamed to reduceByKey\n */\nexport const reduceKey = reduceByKey;\n//# sourceMappingURL=reduceKey.js.map","/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-return */\nexport function required(source1, source2, source3) {\n return merge([source1, source2, source3], (p, e) => {\n return { ...p, ...e };\n });\n}\nexport function requiredDeep(source1, source2, source3) {\n return merge([source1, source2, source3], (p, e) => deepmerge(p, e));\n}\nfunction merge(entries, reducer) {\n if (entries[0] === undefined || entries[0] === null)\n return entries[0];\n return entries.filter(x => !!x).reduce(reducer, {});\n}\nfunction deepmerge(source1, source2) {\n if (typeof source1 !== 'object' || source1 === null)\n return source2 !== undefined ? source2 : source1;\n if (Array.isArray(source1)) {\n if (Array.isArray(source2))\n return source2;\n if (source2 === undefined)\n return [...source1];\n return [...source1, source2];\n }\n return getAllKeys(source1).concat(getAllKeys(source2)).reduce((p, k) => {\n // @ts-ignore\n p[k] = deepmerge(source1[k], source2 && source2[k]);\n return p;\n }, {});\n}\nfunction getAllKeys(subject, internal = false) {\n if (typeof subject !== 'object')\n return [];\n const propertyNames = Object.getOwnPropertyNames(subject);\n const keys = internal ? propertyNames.filter(n => n !== 'constructor') : propertyNames;\n const proto = Object.getPrototypeOf(subject);\n return proto !== Object.prototype ? keys.concat(getAllKeys(proto, true)) : keys;\n}\n//# sourceMappingURL=required.js.map","import { requiredDeep } from './required.js';\nexport function unpartialRecursively(arg1, arg2, arg3) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return requiredDeep(arg1, arg2, arg3);\n}\nexport function unpartial(s1, s2, s3) {\n // defensive check for JS\n if (s1 === undefined || s1 === null)\n return s1;\n return [s1, s2, s3]\n .filter(notNil)\n .reduce((p, s) => ({ ...p, ...trimNilProps(s) }), {});\n}\nfunction trimNilProps(value) {\n return Object.keys(value).reduce((p, k) => {\n if (notNil(value[k]))\n p[k] = value[k];\n return p;\n }, {});\n}\nfunction notNil(value) {\n return value !== null && value !== undefined;\n}\n//# sourceMappingURL=unpartial.js.map","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export * from './console.js'\nexport * from './errors.js'\nexport * from './formatter.js'\nexport * from './logLevels.js'\nexport * from './memory.js'\nexport {\n configGlobal, createStandardLog, createStandardLogForTest,\n getLogger, suppressLogs\n} from './standardLog.js'\nexport type { StandardLog, StandardLogForTest, StandardLogInstance } from './standardLog.js'\nexport * from './types.js'\n"],"names":[],"sourceRoot":""}
|
|
1
|
+
{"version":3,"file":"standard-log.esm.js","mappings":";;;;;;;;;;AAAA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,eAAe;AAC1B,WAAW,QAAQ;AACnB,YAAY,OAAO;AACnB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,YAAY;AACZ;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;;;;;ACjKqC;AACY;AACP;AACF;AAGjC,SAAS,eAAe,CAAC,KAAa;IAC3C,QAAQ,IAAI,EAAE;QACZ,4CAA4C;QAC5C,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,OAAO;QACjC,KAAK,CAAC,KAAK,IAAI,0DAAe,CAAC,CAAC,CAAC,OAAO,OAAO;QAC/C,KAAK,CAAC,KAAK,IAAI,yDAAc,CAAC,CAAC,CAAC,OAAO,MAAM;QAC7C,KAAK,CAA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AAM,GAAG,CAAC;YACpB,SAAS,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC;SACrC;KACF;SACI;QACH,GAAG,CAAC,GAAG,GAAG,wBAAwB,CAAC,OAAO,CAAC;KAC5C;IACD,GAAG,CAAC,UAAU,GAAG,IAAI;AACvB,CAAC;;;;;;;;;;;;AC1GY;AACb,8CAA6C,EAAE,aAAa,EAAC;AAC7D,iBAAiB,GAAG,uBAAuB;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iEAAiE,qBAAqB;AACtF;AACA;AACA,uBAAuB;AACvB;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;;;;;;;;;;AChDA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA,EAAE;AACF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;ACtBA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;ACLA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA,cAAc;AACd;AACA;AACA,oBAAoB,sBAAsB;AAC1C;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,UAAU;AACV;AACA;AACA;AACA;AACA;AACA,GAAG;AACH,wBAAwB,SAAS;AACjC;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA,iBAAiB;AACjB;AACA,kBAAkB,qBAAM;AACxB;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;AACA;AACA,WAAW,QAAQ;AACnB,WAAW,QAAQ;AACnB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe;;;AAGf;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA,GAAG;;AAEH;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,4CAA4C,KAAK;;AAEjD;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;AACA;;AAEA;AACA;AACA;;AAEA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;;AAEA;;AAEA;AACA;AACA;AACA,IAAI;AACJ;AACA;AACA,KAAK;AACL;;AAEA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;AACA,oCAAoC,OAAO;AAC3C;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;AACH;AACA;;;AAGA;AACA;AACA,0DAA0D;AAC1D;AACA;AACA;AACA,MAAM;AACN;AACA;AACA,IAAI;AACJ;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,QAAQ;AACR;AACA;AACA;AACA;AACA;AACA;AACA,WAAW;AACX,UAAU;AACV;AACA;AACA,WAAW;AACX;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,MAAM;AACN;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA,GAAG;;AAEH;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA,eAAe;;AAEf;AACA;AACA;AACA,iBAAiB;;AAEjB;AACA;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA,yBAAyB;;AAEzB;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA,mBAAmB;;AAEnB;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA,gBAAgB;;AAEhB;AACA;AACA;AACA,cAAc;;AAEd;AACA;AACA;AACA;AACA,eAAe;;AAEf;AACA;AACA;AACA,kBAAkB;;AAElB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,mBAAmB;;AAEnB,sHAAgD;;AAEhD;AACA;AACA;;;AAGA;AACA;AACA;;;AAGA;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;AAGA;AACA,WAAW;AACX;AACA;;;AAGA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,WAAW,UAAU;AACrB;AACA,WAAW,UAAU;AACrB;AACA,2HAAsC;;AAEtC,eAAe;AACf;AACA;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA;AACA;AACA;;;;;;;;;;;;;;;;;;ACzkBA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb,oCAAoC,4BAA4B;AAChE,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,0BAA0B;AAC1C,4CAA4C,6BAA6B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uBAAuB,kCAAkC;AACzD;AACA;AACA;AACA,iBAAiB;AACjB,cAAc;AACd;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,2BAA2B;AAC3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA,YAAY,0BAA0B;AACtC;AACA;AACA,gEAAgE,6BAA6B;AAC7F;AACA;AACA,8DAA8D,oBAAoB;AAClF;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA,gBAAgB;AAChB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gCAAgC,2EAA2E;AAC3G;AACA;AACA;AACA;AACA,yBAAyB,SAAS,GAAG,WAAW,KAAK,YAAY;AACjE;AACA;AACA,yBAAyB,SAAS,IAAI,YAAY;AAClD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACO;AACP;AACA;AACA;;;;;;;;;;;;;;;AC5NO;AACP;AACA;AACA;;;;;;;;;;;;;;;ACHA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACPO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;;;;;;;;;;;;;;;;ACPA;AACA;AACO;AACP;AACA,iBAAiB;AACjB,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACA,sDAAsD;AACtD;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,IAAI;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;;;;;;;;;;;;;;;;ACvC6C;AACtC;AACP;AACA,WAAW,0DAAY;AACvB;AACO;AACP;AACA;AACA;AACA;AACA;AACA,6BAA6B,0BAA0B,KAAK;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,IAAI;AACT;AACA;AACA;AACA;AACA;;;;;;UCvBA;UACA;;UAEA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;UACA;;UAEA;UACA;;UAEA;UACA;UACA;;;;;WCtBA;WACA;WACA;WACA,eAAe,4BAA4B;WAC3C,eAAe;WACf,iCAAiC,WAAW;WAC5C;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,yCAAyC,wCAAwC;WACjF;WACA;WACA;;;;;WCPA;WACA;WACA;WACA;WACA,GAAG;WACH;WACA;WACA,CAAC;;;;;WCPD,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACN4B;AACD;AACG;AACA;AACH;AAIF;AAEC","sources":["webpack://StandardLog/../../node_modules/ms/index.js","webpack://StandardLog/./ts/console.ts","webpack://StandardLog/./ts/errors.ts","webpack://StandardLog/./ts/formatter.ts","webpack://StandardLog/./ts/logLevels.ts","webpack://StandardLog/./ts/logStore.ts","webpack://StandardLog/./ts/logger.ts","webpack://StandardLog/./ts/memory.ts","webpack://StandardLog/./ts/platform.ts","webpack://StandardLog/./ts/standardLog.ts","webpack://StandardLog/../../node_modules/upper-case/dist/index.js","webpack://StandardLog/../../node_modules/util/node_modules/inherits/inherits_browser.js","webpack://StandardLog/../../node_modules/util/support/isBufferBrowser.js","webpack://StandardLog/../../node_modules/util/util.js","webpack://StandardLog/../../node_modules/iso-error/esm/index.js","webpack://StandardLog/../../node_modules/type-plus/esm/object/mapKey.js","webpack://StandardLog/../../node_modules/type-plus/esm/object/record.js","webpack://StandardLog/../../node_modules/type-plus/esm/object/reduceKey.js","webpack://StandardLog/../../node_modules/unpartial/esm/required.js","webpack://StandardLog/../../node_modules/unpartial/esm/unpartial.js","webpack://StandardLog/webpack/bootstrap","webpack://StandardLog/webpack/runtime/compat get default export","webpack://StandardLog/webpack/runtime/define property getters","webpack://StandardLog/webpack/runtime/global","webpack://StandardLog/webpack/runtime/hasOwnProperty shorthand","webpack://StandardLog/webpack/runtime/make namespace object","webpack://StandardLog/./ts/index.ts"],"sourcesContent":["/**\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","import { unpartial } from 'type-plus'\nimport { consoleFormatter } from './formatter.js'\nimport { logLevels } from './logLevels.js'\nimport { polyfill } from './platform.js'\nimport type { ConsoleLike, LogEntry, LogFormatter, LogReporter, LogReporterOptions } from './types.js'\n\nexport function toConsoleMethod(level: number) {\n switch (true) {\n // edge case in case none is somehow written\n case (level <= 0): return 'debug'\n case (level <= logLevels.error): return 'error'\n case (level <= logLevels.warn): return 'warn'\n case (level <= logLevels.info): return 'info'\n default: return 'debug'\n }\n}\n\n// istanbul ignore next\n/* eslint-disable no-console */\nfunction buildPolyfillConsole() {\n // old phantomjs does not have bind function\n const hasBind = !!console.log.bind as boolean\n if (hasBind) {\n return {\n // the `typeof` guards against IE where `console.log.apply()`\n // results in error `Object doesn't support property or method 'apply'`\n debug: (typeof console.info === 'function' ? console.debug : console.log).bind(console),\n info: (typeof console.info === 'function' ? console.info : console.log).bind(console),\n warn: (typeof console.warn === 'function' ? console.warn : console.log).bind(console),\n error: (typeof console.error === 'function' ? console.error : console.log).bind(console)\n }\n }\n else {\n return {\n debug: buildFn(typeof console.debug === 'function' ? 'debug' : 'log'),\n info: buildFn(typeof console.info === 'function' ? 'info' : 'log'),\n warn: buildFn(typeof console.warn === 'function' ? 'warn' : 'log'),\n error: buildFn(typeof console.error === 'function' ? 'error' : 'log'),\n }\n }\n}\n\n// istanbul ignore next\nfunction buildFn(name: 'debug' | 'info' | 'warn' | 'error' | 'log') {\n return function (...args: any[]) { console[name](...args) }\n}\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 const { id, formatter, filter } = unpartial({ id: 'console', formatter: consoleFormatter }, options)\n if (!polyfill.console) polyfill.console = buildPolyfillConsole()\n\n return Object.freeze({\n id,\n isConsoleReporter: true,\n get formatter() { return formatter },\n get filter() { return filter },\n console: polyfill.console,\n write(entry: LogEntry) {\n if (filter && !filter(entry)) return\n const values = formatter(entry)\n const method = toConsoleMethod(entry.level)\n this.console[method](...values)\n }\n })\n}\n","import { IsoError, ModuleError } from 'iso-error'\n\nexport class StandardLogError extends ModuleError {\n constructor(description: string, options?: IsoError.Options) {\n super('standard-log', description, options)\n }\n}\nexport class InvalidId extends StandardLogError {\n constructor(public id: string, options?: IsoError.Options) {\n super(`logger id only supports alphanumeric, unicode characters, and [:_-.]. Received ${id}`, options)\n }\n}\n","import ms from 'ms'\nimport { upperCase } from 'upper-case'\nimport { toLogLevelName } from './logLevels.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 switch (format) {\n case 'none':\n return (_timestamp: Date) => undefined\n case 'iso':\n return (timestamp: Date) => timestamp.toISOString()\n case 'elapsed': {\n let lastTick: number\n return (timestamp: Date) => {\n const newTick = timestamp.getTime()\n const result = ms(lastTick === undefined ? 0 : newTick - lastTick)\n lastTick = newTick\n return result\n }\n }\n }\n}\n\nexport function formatLogLevel(level: number) {\n return `(${upperCase(toLogLevelName(level))})`\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 return [timestamp.toISOString(), id, formatLogLevel(level), ...args]\n}\n\n/**\n * Formats log entry like default console log.\n */\nexport function consoleFormatter({ args }: LogEntry) {\n return args\n}\n","export const logLevels = {\n /**\n * none: 0\n */\n none: 0,\n /**\n * emergency: 100\n */\n emergency: 100,\n /**\n * alert: 200\n */\n alert: 200,\n /**\n * critical: 300\n */\n critical: 300,\n /**\n * error: 400\n */\n error: 400,\n /**\n * warn: 500\n */\n warn: 500,\n /**\n * notice: 600\n */\n notice: 600,\n /**\n * info: 700\n */\n info: 700,\n /**\n * debug: 800\n */\n debug: 800,\n /**\n * trace: 900\n */\n trace: 900,\n /**\n * planck: Infinity\n * `planck unit` is a very small unit <https://en.wikipedia.org/wiki/Planck_units>.\n */\n planck: Infinity,\n /**\n * all: Infinity\n */\n all: Infinity\n}\n\n/**\n * Convert default log level value to log level name.\n */\nexport function toLogLevelName(level: number) {\n if (level <= 100) return 'emergency'\n if (level <= 200) return 'alert'\n if (level <= 300) return 'critical'\n if (level <= 400) return 'error'\n if (level <= 500) return 'warn'\n if (level <= 600) return 'notice'\n if (level <= 700) return 'info'\n if (level <= 800) return 'debug'\n if (level <= 900) return 'trace'\n return 'planck'\n}\n\n/**\n * Convert default log level name to log level value.\n */\nexport function toLogLevel(name: string) {\n return (logLevels as any)[name.toLocaleLowerCase()]\n}\n","\nimport { mapKey, reduceByKey, reduceKey } from 'type-plus'\nimport { createConsoleLogReporter } from './console.js'\nimport { logLevels, toLogLevel, toLogLevelName } from './logLevels.js'\nimport type { Logger, LogLevel, LogMethodNames, LogReporter, StandardLogOptions } from './types.js'\n\nexport function createLogStore<N extends string = LogMethodNames>(options: Required<StandardLogOptions<N>>): LogStore {\n return {\n loggers: {},\n reporters: options.reporters || [createConsoleLogReporter()],\n logLevel: options.logLevel,\n logLevelStore: logLevelStore(options)\n }\n}\n\nexport interface LogStore {\n loggers: Record<string, Logger>,\n reporters: LogReporter[],\n logLevel: LogLevel,\n logLevelStore: ReturnType<typeof logLevelStore>\n}\n\nexport interface LogLevelStoreOptions {\n customLevels?: Record<string, number>\n}\n\nexport function logLevelStore(options: LogLevelStoreOptions) {\n const customLevels = options.customLevels || {}\n\n const store = {\n customLevels,\n customLevelsReverse: reduceByKey(customLevels, (p, k) => {\n p[customLevels[k]] = k\n return p\n }, {} as Record<number, string>)\n }\n return {\n getName(level: number) {\n return store.customLevelsReverse[level] ?? toLogLevelName(level)\n },\n getLevel(name: string) {\n return store.customLevels[name] ?? toLogLevel(name)\n },\n getAllLevels() {\n return reduceKey(logLevels, (result, name) => {\n if (name !== 'none' && name !== 'all') result.push({ name, level: logLevels[name] })\n\n return result\n }, mapKey(store.customLevels, name => ({ name, level: store.customLevels[name] })))\n }\n }\n}\n","import type { StackTraceMeta } from '@just-func/types'\nimport { InvalidId } from './errors.js'\nimport { logLevels } from './logLevels.js'\nimport { LogStore } from './logStore.js'\nimport type { LogEntry, LogFunction, Logger, LoggerOptions, LogMethodNames, LogReporter } from './types.js'\nimport { LogLevel } from './types.js'\n\nexport function createLogger<N extends string = LogMethodNames>(\n store: LogStore, id: string, options?: LoggerOptions\n): Logger<N | LogMethodNames> {\n validateId(id, options)\n const writeTo = options?.writeTo ?? (() => true)\n const [filter, reporters]: [(reporterId: string) => boolean, LogReporter[]] = typeof writeTo === 'string'\n ? [id => id === writeTo, store.reporters]\n : writeTo instanceof RegExp\n ? [id => writeTo.test(id), store.reporters]\n : typeof writeTo === 'function'\n ? [writeTo, store.reporters]\n : [() => true, [writeTo]]\n\n function write(entry: LogEntry) {\n writeToReporters(reporters, entry, filter)\n }\n\n const logger = {\n level: options?.level,\n write\n } as any\n\n Object.defineProperties(logger, {\n id: { value: id, writable: false },\n count: {\n writable: false,\n value: ((counter) => (...args: any[]) => {\n const level = logLevels.debug\n if (shouldLog(store, level, logger.level))\n write({\n id,\n level,\n args: [++counter, ...args],\n timestamp: new Date()\n })\n })(0)\n },\n on: {\n writable: false,\n value: (level: number | N | LogMethodNames, logFn: LogFunction) => {\n const logLevel = typeof level === 'string' ? store.logLevelStore.getLevel(level)! : level\n if (shouldLog(store, logLevel, logger.level)) {\n const methodName = store.logLevelStore.getName(logLevel)\n const bindedMethod = logger[methodName].bind(logger)\n const result = logFn(bindedMethod)\n if (result) bindedMethod(result)\n }\n }\n }\n })\n store.logLevelStore.getAllLevels().forEach(function addMethod({ name, level }) {\n Object.defineProperty(logger, name, {\n writable: false,\n value: (...args: any[]) => {\n if (shouldLog(store, level, logger.level)) write({ id, level, args, timestamp: new Date() })\n }\n })\n })\n return logger\n}\n\nfunction validateId(id: string, meta?: StackTraceMeta) {\n if (/[`~!#$%^&*()=+[\\]{},|<>?]/.test(id)) throw new InvalidId(id, meta)\n}\n\nfunction writeToReporters(reporters: LogReporter[], logEntry: LogEntry, filter: (reporterId: string) => boolean) {\n reporters.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 return targetLevel <= (loggerLevel !== undefined ? loggerLevel : store.logLevel)\n}\n","import { required } from 'type-plus'\nimport { toInspectLogEntry } from './platform.js'\nimport { formatLogLevel } from './formatter.js'\nimport type { LogEntry, LogFormatter, LogReporter, LogReporterOptions } from './types.js'\n\nexport type MemoryLogReporter = LogReporter<LogEntry> & {\n logs: LogEntry[],\n /**\n * Gets a simple log message for testing.\n * The message only contains arguments for each log entry.\n */\n getLogMessage(): string,\n getLogMessages(): string[],\n getLogMessageWithLevel(): string\n}\n\nexport type MemoryLogFormatter = LogFormatter<LogEntry>\n\nexport function toMessageWithLevel(logs: LogEntry[]) {\n return logs.map(toInspectLogEntry)\n .map(log => `${formatLogLevel(log.level)} ${log.args.join(' ')}`)\n .join('\\n')\n // if it has more than this log,\n // we assume it is running under tests,\n // and remove this log to simplify testing.\n .replace(/^\\(WARN\\) already configured for test, ignoring config\\(\\) call\\n/, '')\n}\n\nexport function createMemoryLogReporter(options?: LogReporterOptions<LogEntry>): MemoryLogReporter {\n const { id, formatter, filter } = required({ id: 'memory', formatter: (e: LogEntry) => e }, options)\n const logs: LogEntry[] = []\n return Object.freeze({\n id,\n get formatter() { return formatter },\n get filter() { return filter },\n logs,\n write(entry: LogEntry) {\n if (filter && !filter(entry)) return\n logs.push(formatter(entry))\n },\n getLogMessage() {\n return this.getLogMessages().join('\\n')\n },\n getLogMessages() {\n return logs.map(toInspectLogEntry)\n .map(log => log.args.join(' '))\n },\n getLogMessageWithLevel() { return toMessageWithLevel(logs) }\n })\n}\n","import { inspect } from 'util'\nimport type { ConsoleLike, LogEntry } from './types.js'\n\nexport const toInspectLogEntry = (e: LogEntry) => (\n e.args = e.args.map(value => typeof value === 'object' && value !== null ? inspect(value) : value),\n e)\n\nexport const polyfill: { console?: ConsoleLike } = {}\n","import { record, required } from 'type-plus'\nimport { createLogger } from './logger.js'\nimport { logLevels } from './logLevels.js'\nimport { createLogStore, LogStore } from './logStore.js'\nimport { createMemoryLogReporter, MemoryLogReporter } from './memory.js'\nimport type { Logger, LoggerOptions, LogLevel, LogMethodNames, StandardLogOptions } from './types.js'\n\nexport interface StandardLogInstance<N extends string = LogMethodNames> {\n logLevel: number,\n toLogLevelName(level: number): string,\n toLogLevel(name: N): number,\n getLogger(id: string, options?: LoggerOptions): Logger<N | LogMethodNames>\n}\n\nexport interface StandardLog<N extends string = LogMethodNames> extends Readonly<StandardLogInstance<N>> {\n}\n\nexport function createStandardLog<N extends string = LogMethodNames>(\n options?: StandardLogOptions<N>\n): StandardLog<N> {\n const closure = createStandardLogClosure(options)\n if (!ctx.gsl) ctx.gsl = closure as any\n return closure.standardLog\n}\n\nexport function createStandardLogClosure<N extends string = LogMethodNames>(\n options?: StandardLogOptions<N>\n): { store: LogStore, standardLog: StandardLog<N> } {\n const store = createLogStore(required({ logLevel: logLevels.info }, options))\n\n return {\n store,\n standardLog: {\n get logLevel() { return store.logLevel },\n\n toLogLevelName(level: number) {\n return store.logLevelStore.getName(level)\n },\n toLogLevel(name: string) {\n return store.logLevelStore.getLevel(name)\n },\n getLogger(id: string, options?: LoggerOptions) {\n if (store.loggers[id]) return store.loggers[id] as any\n return store.loggers[id] = createLogger(store, id, { ssf: this.getLogger, ...options }) as any\n }\n }\n }\n}\n\nexport type StandardLogForTest<N extends string = LogMethodNames> = StandardLog<N> & { reporter: MemoryLogReporter }\n\nexport function createStandardLogForTest<N extends string = LogMethodNames>(\n logLevel: LogLevel = logLevels.debug\n): StandardLogForTest<N> {\n const reporter = createMemoryLogReporter()\n const standardLog = createStandardLog<N>({ reporters: [reporter], logLevel })\n return { ...standardLog, reporter }\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 const origLevels = logs.map(l => l.level)\n logs.forEach(l => l.level = logLevels.none)\n const result = block()\n logs.forEach((l, i) => l.level = origLevels[i])\n return result\n}\n\nexport function getLogger<N extends string = LogMethodNames>(id: string, options?: LoggerOptions) {\n return getGlobalSL<N>().getLogger(id, options)\n}\n\nexport const ctx: {\n configured?: boolean,\n gsl?: { store: LogStore, standardLog: StandardLogInstance<LogMethodNames> }\n} = record()\n\nfunction getGlobalSL<N extends string = LogMethodNames>(): StandardLogInstance<N> {\n if (!ctx.gsl) ctx.gsl = createStandardLogClosure()\n\n return ctx.gsl!.standardLog as StandardLogInstance<N>\n}\n\nexport function configGlobal(options: Omit<StandardLogOptions, 'customLevels'>) {\n if (ctx.configured) {\n const log = ctx.gsl?.standardLog.getLogger('standard-log')\n log?.warn('configGlobal() is being called more than once. Please make sure this is expected. Application should use `createStandardLog()` most of the time.')\n }\n\n if (ctx.gsl) {\n if (options.logLevel) {\n ctx.gsl.store.logLevel = options.logLevel\n }\n if (options.reporters) {\n const reporters = ctx.gsl.store.reporters\n reporters.length = 0\n reporters.push(...options.reporters)\n }\n }\n else {\n ctx.gsl = createStandardLogClosure(options)\n }\n ctx.configured = true\n}\n","\"use strict\";\nObject.defineProperty(exports, \"__esModule\", { value: true });\nexports.upperCase = exports.localeUpperCase = void 0;\n/**\n * Source: ftp://ftp.unicode.org/Public/UCD/latest/ucd/SpecialCasing.txt\n */\nvar SUPPORTED_LOCALE = {\n tr: {\n regexp: /[\\u0069]/g,\n map: {\n i: \"\\u0130\",\n },\n },\n az: {\n regexp: /[\\u0069]/g,\n map: {\n i: \"\\u0130\",\n },\n },\n lt: {\n regexp: /[\\u0069\\u006A\\u012F]\\u0307|\\u0069\\u0307[\\u0300\\u0301\\u0303]/g,\n map: {\n i̇: \"\\u0049\",\n j̇: \"\\u004A\",\n į̇: \"\\u012E\",\n i̇̀: \"\\u00CC\",\n i̇́: \"\\u00CD\",\n i̇̃: \"\\u0128\",\n },\n },\n};\n/**\n * Localized upper case.\n */\nfunction localeUpperCase(str, locale) {\n var lang = SUPPORTED_LOCALE[locale.toLowerCase()];\n if (lang)\n return upperCase(str.replace(lang.regexp, function (m) { return lang.map[m]; }));\n return upperCase(str);\n}\nexports.localeUpperCase = localeUpperCase;\n/**\n * Upper case as a function.\n */\nfunction upperCase(str) {\n return str.toUpperCase();\n}\nexports.upperCase = upperCase;\n//# sourceMappingURL=index.js.map","if (typeof Object.create === 'function') {\n // implementation from standard node.js 'util' module\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n ctor.prototype = Object.create(superCtor.prototype, {\n constructor: {\n value: ctor,\n enumerable: false,\n writable: true,\n configurable: true\n }\n });\n };\n} else {\n // old school shim for old browsers\n module.exports = function inherits(ctor, superCtor) {\n ctor.super_ = superCtor\n var TempCtor = function () {}\n TempCtor.prototype = superCtor.prototype\n ctor.prototype = new TempCtor()\n ctor.prototype.constructor = ctor\n }\n}\n","module.exports = function isBuffer(arg) {\n return arg && typeof arg === 'object'\n && typeof arg.copy === 'function'\n && typeof arg.fill === 'function'\n && typeof arg.readUInt8 === 'function';\n}","// Copyright Joyent, Inc. and other Node contributors.\n//\n// Permission is hereby granted, free of charge, to any person obtaining a\n// copy of this software and associated documentation files (the\n// \"Software\"), to deal in the Software without restriction, including\n// without limitation the rights to use, copy, modify, merge, publish,\n// distribute, sublicense, and/or sell copies of the Software, and to permit\n// persons to whom the Software is furnished to do so, subject to the\n// following conditions:\n//\n// The above copyright notice and this permission notice shall be included\n// in all copies or substantial portions of the Software.\n//\n// THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\n// OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\n// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN\n// NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,\n// DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR\n// OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE\n// USE OR OTHER DEALINGS IN THE SOFTWARE.\n\nvar formatRegExp = /%[sdj%]/g;\nexports.format = function(f) {\n if (!isString(f)) {\n var objects = [];\n for (var i = 0; i < arguments.length; i++) {\n objects.push(inspect(arguments[i]));\n }\n return objects.join(' ');\n }\n\n var i = 1;\n var args = arguments;\n var len = args.length;\n var str = String(f).replace(formatRegExp, function(x) {\n if (x === '%%') return '%';\n if (i >= len) return x;\n switch (x) {\n case '%s': return String(args[i++]);\n case '%d': return Number(args[i++]);\n case '%j':\n try {\n return JSON.stringify(args[i++]);\n } catch (_) {\n return '[Circular]';\n }\n default:\n return x;\n }\n });\n for (var x = args[i]; i < len; x = args[++i]) {\n if (isNull(x) || !isObject(x)) {\n str += ' ' + x;\n } else {\n str += ' ' + inspect(x);\n }\n }\n return str;\n};\n\n\n// Mark that a method should not be used.\n// Returns a modified function which warns once by default.\n// If --no-deprecation is set, then it is a no-op.\nexports.deprecate = function(fn, msg) {\n // Allow for deprecating things in the process of starting up.\n if (isUndefined(global.process)) {\n return function() {\n return exports.deprecate(fn, msg).apply(this, arguments);\n };\n }\n\n if (process.noDeprecation === true) {\n return fn;\n }\n\n var warned = false;\n function deprecated() {\n if (!warned) {\n if (process.throwDeprecation) {\n throw new Error(msg);\n } else if (process.traceDeprecation) {\n console.trace(msg);\n } else {\n console.error(msg);\n }\n warned = true;\n }\n return fn.apply(this, arguments);\n }\n\n return deprecated;\n};\n\n\nvar debugs = {};\nvar debugEnviron;\nexports.debuglog = function(set) {\n if (isUndefined(debugEnviron))\n debugEnviron = process.env.NODE_DEBUG || '';\n set = set.toUpperCase();\n if (!debugs[set]) {\n if (new RegExp('\\\\b' + set + '\\\\b', 'i').test(debugEnviron)) {\n var pid = process.pid;\n debugs[set] = function() {\n var msg = exports.format.apply(exports, arguments);\n console.error('%s %d: %s', set, pid, msg);\n };\n } else {\n debugs[set] = function() {};\n }\n }\n return debugs[set];\n};\n\n\n/**\n * Echos the value of a value. Trys to print the value out\n * in the best way possible given the different types.\n *\n * @param {Object} obj The object to print out.\n * @param {Object} opts Optional options object that alters the output.\n */\n/* legacy: obj, showHidden, depth, colors*/\nfunction inspect(obj, opts) {\n // default options\n var ctx = {\n seen: [],\n stylize: stylizeNoColor\n };\n // legacy...\n if (arguments.length >= 3) ctx.depth = arguments[2];\n if (arguments.length >= 4) ctx.colors = arguments[3];\n if (isBoolean(opts)) {\n // legacy...\n ctx.showHidden = opts;\n } else if (opts) {\n // got an \"options\" object\n exports._extend(ctx, opts);\n }\n // set default options\n if (isUndefined(ctx.showHidden)) ctx.showHidden = false;\n if (isUndefined(ctx.depth)) ctx.depth = 2;\n if (isUndefined(ctx.colors)) ctx.colors = false;\n if (isUndefined(ctx.customInspect)) ctx.customInspect = true;\n if (ctx.colors) ctx.stylize = stylizeWithColor;\n return formatValue(ctx, obj, ctx.depth);\n}\nexports.inspect = inspect;\n\n\n// http://en.wikipedia.org/wiki/ANSI_escape_code#graphics\ninspect.colors = {\n 'bold' : [1, 22],\n 'italic' : [3, 23],\n 'underline' : [4, 24],\n 'inverse' : [7, 27],\n 'white' : [37, 39],\n 'grey' : [90, 39],\n 'black' : [30, 39],\n 'blue' : [34, 39],\n 'cyan' : [36, 39],\n 'green' : [32, 39],\n 'magenta' : [35, 39],\n 'red' : [31, 39],\n 'yellow' : [33, 39]\n};\n\n// Don't use 'blue' not visible on cmd.exe\ninspect.styles = {\n 'special': 'cyan',\n 'number': 'yellow',\n 'boolean': 'yellow',\n 'undefined': 'grey',\n 'null': 'bold',\n 'string': 'green',\n 'date': 'magenta',\n // \"name\": intentionally not styling\n 'regexp': 'red'\n};\n\n\nfunction stylizeWithColor(str, styleType) {\n var style = inspect.styles[styleType];\n\n if (style) {\n return '\\u001b[' + inspect.colors[style][0] + 'm' + str +\n '\\u001b[' + inspect.colors[style][1] + 'm';\n } else {\n return str;\n }\n}\n\n\nfunction stylizeNoColor(str, styleType) {\n return str;\n}\n\n\nfunction arrayToHash(array) {\n var hash = {};\n\n array.forEach(function(val, idx) {\n hash[val] = true;\n });\n\n return hash;\n}\n\n\nfunction formatValue(ctx, value, recurseTimes) {\n // Provide a hook for user-specified inspect functions.\n // Check that value is an object with an inspect function on it\n if (ctx.customInspect &&\n value &&\n isFunction(value.inspect) &&\n // Filter out the util module, it's inspect function is special\n value.inspect !== exports.inspect &&\n // Also filter out any prototype objects using the circular check.\n !(value.constructor && value.constructor.prototype === value)) {\n var ret = value.inspect(recurseTimes, ctx);\n if (!isString(ret)) {\n ret = formatValue(ctx, ret, recurseTimes);\n }\n return ret;\n }\n\n // Primitive types cannot have properties\n var primitive = formatPrimitive(ctx, value);\n if (primitive) {\n return primitive;\n }\n\n // Look up the keys of the object.\n var keys = Object.keys(value);\n var visibleKeys = arrayToHash(keys);\n\n if (ctx.showHidden) {\n keys = Object.getOwnPropertyNames(value);\n }\n\n // IE doesn't make error fields non-enumerable\n // http://msdn.microsoft.com/en-us/library/ie/dww52sbt(v=vs.94).aspx\n if (isError(value)\n && (keys.indexOf('message') >= 0 || keys.indexOf('description') >= 0)) {\n return formatError(value);\n }\n\n // Some type of object without properties can be shortcutted.\n if (keys.length === 0) {\n if (isFunction(value)) {\n var name = value.name ? ': ' + value.name : '';\n return ctx.stylize('[Function' + name + ']', 'special');\n }\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n }\n if (isDate(value)) {\n return ctx.stylize(Date.prototype.toString.call(value), 'date');\n }\n if (isError(value)) {\n return formatError(value);\n }\n }\n\n var base = '', array = false, braces = ['{', '}'];\n\n // Make Array say that they are Array\n if (isArray(value)) {\n array = true;\n braces = ['[', ']'];\n }\n\n // Make functions say that they are functions\n if (isFunction(value)) {\n var n = value.name ? ': ' + value.name : '';\n base = ' [Function' + n + ']';\n }\n\n // Make RegExps say that they are RegExps\n if (isRegExp(value)) {\n base = ' ' + RegExp.prototype.toString.call(value);\n }\n\n // Make dates with properties first say the date\n if (isDate(value)) {\n base = ' ' + Date.prototype.toUTCString.call(value);\n }\n\n // Make error with message first say the error\n if (isError(value)) {\n base = ' ' + formatError(value);\n }\n\n if (keys.length === 0 && (!array || value.length == 0)) {\n return braces[0] + base + braces[1];\n }\n\n if (recurseTimes < 0) {\n if (isRegExp(value)) {\n return ctx.stylize(RegExp.prototype.toString.call(value), 'regexp');\n } else {\n return ctx.stylize('[Object]', 'special');\n }\n }\n\n ctx.seen.push(value);\n\n var output;\n if (array) {\n output = formatArray(ctx, value, recurseTimes, visibleKeys, keys);\n } else {\n output = keys.map(function(key) {\n return formatProperty(ctx, value, recurseTimes, visibleKeys, key, array);\n });\n }\n\n ctx.seen.pop();\n\n return reduceToSingleString(output, base, braces);\n}\n\n\nfunction formatPrimitive(ctx, value) {\n if (isUndefined(value))\n return ctx.stylize('undefined', 'undefined');\n if (isString(value)) {\n var simple = '\\'' + JSON.stringify(value).replace(/^\"|\"$/g, '')\n .replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"') + '\\'';\n return ctx.stylize(simple, 'string');\n }\n if (isNumber(value))\n return ctx.stylize('' + value, 'number');\n if (isBoolean(value))\n return ctx.stylize('' + value, 'boolean');\n // For some reason typeof null is \"object\", so special case here.\n if (isNull(value))\n return ctx.stylize('null', 'null');\n}\n\n\nfunction formatError(value) {\n return '[' + Error.prototype.toString.call(value) + ']';\n}\n\n\nfunction formatArray(ctx, value, recurseTimes, visibleKeys, keys) {\n var output = [];\n for (var i = 0, l = value.length; i < l; ++i) {\n if (hasOwnProperty(value, String(i))) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n String(i), true));\n } else {\n output.push('');\n }\n }\n keys.forEach(function(key) {\n if (!key.match(/^\\d+$/)) {\n output.push(formatProperty(ctx, value, recurseTimes, visibleKeys,\n key, true));\n }\n });\n return output;\n}\n\n\nfunction formatProperty(ctx, value, recurseTimes, visibleKeys, key, array) {\n var name, str, desc;\n desc = Object.getOwnPropertyDescriptor(value, key) || { value: value[key] };\n if (desc.get) {\n if (desc.set) {\n str = ctx.stylize('[Getter/Setter]', 'special');\n } else {\n str = ctx.stylize('[Getter]', 'special');\n }\n } else {\n if (desc.set) {\n str = ctx.stylize('[Setter]', 'special');\n }\n }\n if (!hasOwnProperty(visibleKeys, key)) {\n name = '[' + key + ']';\n }\n if (!str) {\n if (ctx.seen.indexOf(desc.value) < 0) {\n if (isNull(recurseTimes)) {\n str = formatValue(ctx, desc.value, null);\n } else {\n str = formatValue(ctx, desc.value, recurseTimes - 1);\n }\n if (str.indexOf('\\n') > -1) {\n if (array) {\n str = str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n').substr(2);\n } else {\n str = '\\n' + str.split('\\n').map(function(line) {\n return ' ' + line;\n }).join('\\n');\n }\n }\n } else {\n str = ctx.stylize('[Circular]', 'special');\n }\n }\n if (isUndefined(name)) {\n if (array && key.match(/^\\d+$/)) {\n return str;\n }\n name = JSON.stringify('' + key);\n if (name.match(/^\"([a-zA-Z_][a-zA-Z_0-9]*)\"$/)) {\n name = name.substr(1, name.length - 2);\n name = ctx.stylize(name, 'name');\n } else {\n name = name.replace(/'/g, \"\\\\'\")\n .replace(/\\\\\"/g, '\"')\n .replace(/(^\"|\"$)/g, \"'\");\n name = ctx.stylize(name, 'string');\n }\n }\n\n return name + ': ' + str;\n}\n\n\nfunction reduceToSingleString(output, base, braces) {\n var numLinesEst = 0;\n var length = output.reduce(function(prev, cur) {\n numLinesEst++;\n if (cur.indexOf('\\n') >= 0) numLinesEst++;\n return prev + cur.replace(/\\u001b\\[\\d\\d?m/g, '').length + 1;\n }, 0);\n\n if (length > 60) {\n return braces[0] +\n (base === '' ? '' : base + '\\n ') +\n ' ' +\n output.join(',\\n ') +\n ' ' +\n braces[1];\n }\n\n return braces[0] + base + ' ' + output.join(', ') + ' ' + braces[1];\n}\n\n\n// NOTE: These type checking functions intentionally don't use `instanceof`\n// because it is fragile and can be easily faked with `Object.create()`.\nfunction isArray(ar) {\n return Array.isArray(ar);\n}\nexports.isArray = isArray;\n\nfunction isBoolean(arg) {\n return typeof arg === 'boolean';\n}\nexports.isBoolean = isBoolean;\n\nfunction isNull(arg) {\n return arg === null;\n}\nexports.isNull = isNull;\n\nfunction isNullOrUndefined(arg) {\n return arg == null;\n}\nexports.isNullOrUndefined = isNullOrUndefined;\n\nfunction isNumber(arg) {\n return typeof arg === 'number';\n}\nexports.isNumber = isNumber;\n\nfunction isString(arg) {\n return typeof arg === 'string';\n}\nexports.isString = isString;\n\nfunction isSymbol(arg) {\n return typeof arg === 'symbol';\n}\nexports.isSymbol = isSymbol;\n\nfunction isUndefined(arg) {\n return arg === void 0;\n}\nexports.isUndefined = isUndefined;\n\nfunction isRegExp(re) {\n return isObject(re) && objectToString(re) === '[object RegExp]';\n}\nexports.isRegExp = isRegExp;\n\nfunction isObject(arg) {\n return typeof arg === 'object' && arg !== null;\n}\nexports.isObject = isObject;\n\nfunction isDate(d) {\n return isObject(d) && objectToString(d) === '[object Date]';\n}\nexports.isDate = isDate;\n\nfunction isError(e) {\n return isObject(e) &&\n (objectToString(e) === '[object Error]' || e instanceof Error);\n}\nexports.isError = isError;\n\nfunction isFunction(arg) {\n return typeof arg === 'function';\n}\nexports.isFunction = isFunction;\n\nfunction isPrimitive(arg) {\n return arg === null ||\n typeof arg === 'boolean' ||\n typeof arg === 'number' ||\n typeof arg === 'string' ||\n typeof arg === 'symbol' || // ES6 symbol\n typeof arg === 'undefined';\n}\nexports.isPrimitive = isPrimitive;\n\nexports.isBuffer = require('./support/isBuffer');\n\nfunction objectToString(o) {\n return Object.prototype.toString.call(o);\n}\n\n\nfunction pad(n) {\n return n < 10 ? '0' + n.toString(10) : n.toString(10);\n}\n\n\nvar months = ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep',\n 'Oct', 'Nov', 'Dec'];\n\n// 26 Feb 16:19:34\nfunction timestamp() {\n var d = new Date();\n var time = [pad(d.getHours()),\n pad(d.getMinutes()),\n pad(d.getSeconds())].join(':');\n return [d.getDate(), months[d.getMonth()], time].join(' ');\n}\n\n\n// log is just a thin wrapper to console.log that prepends a timestamp\nexports.log = function() {\n console.log('%s - %s', timestamp(), exports.format.apply(exports, arguments));\n};\n\n\n/**\n * Inherit the prototype methods from one constructor into another.\n *\n * The Function.prototype.inherits from lang.js rewritten as a standalone\n * function (not on Function.prototype). NOTE: If this file is to be loaded\n * during bootstrapping this function needs to be rewritten using some native\n * functions as prototype setup using normal JavaScript does not work as\n * expected during bootstrapping (see mirror.js in r114903).\n *\n * @param {function} ctor Constructor function which needs to inherit the\n * prototype.\n * @param {function} superCtor Constructor function to inherit prototype from.\n */\nexports.inherits = require('inherits');\n\nexports._extend = function(origin, add) {\n // Don't do anything if add isn't an object\n if (!add || !isObject(add)) return origin;\n\n var keys = Object.keys(add);\n var i = keys.length;\n while (i--) {\n origin[keys[i]] = add[keys[i]];\n }\n return origin;\n};\n\nfunction hasOwnProperty(obj, prop) {\n return Object.prototype.hasOwnProperty.call(obj, prop);\n}\n","/* eslint-disable @typescript-eslint/unbound-method */\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) { defineStack(error, stack); },\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}\nconst serializers = [];\nconst deserializers = [];\n/**\n * Isomorphic Error that works across physical boundary.\n */\nexport class IsoError extends Error {\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 = toIsoError(options.cause);\n if (options?.ssf)\n Error.captureStackTrace(this, options.ssf);\n }\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));\n }\n /**\n * @type P Additional properties of the IsoError\n * @param text Json representation of a IsoError\n */\n static parse(text) {\n return deserialize(IsoError.parse, text);\n }\n /**\n * @type P Additional properties of the IsoError\n * @param text Json representation of a IsoError\n */\n static deserialize(text) {\n return deserialize(IsoError.deserialize, text);\n }\n static toSerializable(err) {\n return serializers.reduce((p, s) => p || s(err), undefined)\n || toSerializableError(err);\n }\n static fromSerializable(json) {\n const err = deserializeError(json);\n Error.captureStackTrace(err, IsoError.fromSerializable);\n return err;\n }\n /**\n * returns the error message including the error causes.\n */\n static trace(err) {\n return trace(err);\n }\n static addPlugin({ toSerializable, fromSerializable }) {\n serializers.unshift(toSerializable);\n deserializers.unshift(fromSerializable);\n }\n toString() { return IsoError.serialize(this); }\n trace() { return IsoError.trace(this); }\n}\nfunction deserialize(fn, text) {\n const json = JSON.parse(text);\n const err = deserializeError(json);\n Error.captureStackTrace(err, fn);\n return err;\n}\nfunction deserializeError(json) {\n let err = undefined;\n for (const d of deserializers) {\n err = d(json);\n if (err)\n break;\n }\n return err || defaultDeserializeError(json);\n}\nfunction defaultDeserializeError(json) {\n if (json.name === 'AggregateError') {\n const { message, errors, ...rest } = json;\n // @ts-ignore\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 ? 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}\nfunction toSerializableError(err) {\n if (isAggregateError(err)) {\n return {\n ...err, name: err.constructor.name, message: err.message,\n errors: err.errors.map(toSerializableError)\n };\n }\n if (err instanceof Error) {\n const { message, cause } = err;\n return cause\n ? { ...err, name: err.constructor.name, message, cause: toSerializableError(cause) }\n : { ...err, name: err.constructor.name, message };\n }\n return err;\n}\n// NOTE: In this function I have to to Object.assign to keep the err instance and its stack trace.\nfunction toIsoError(err) {\n if (err instanceof IsoError)\n return err;\n // When the error is an internal error from deserialzation,\n // the err.constructor.name is object\n return Object.assign(err, { name: err.constructor.name !== 'Object' ? err.constructor.name : err.name });\n}\nfunction 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(...trace(e).split('\\n').map(s => ' ' + s)));\n }\n if (err instanceof Error) {\n if (hasCause(err))\n messages.push(...trace(err.cause).split('\\n').map(s => ' ' + s));\n }\n else {\n messages.push(typeof err === 'string' ? err : JSON.stringify(err));\n }\n return messages.join('\\n');\n}\nfunction hasCause(x) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return !!x.cause;\n}\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","export function mapKey(subject, predicate, thisArg) {\n return Object.keys(subject).map(predicate, thisArg);\n}\n//# sourceMappingURL=mapKey.js.map","/**\n * Creates a `Record<Key, Value>`\n */\nexport function record(value) {\n const r = Object.create(null);\n return (value ? Object.assign(r, value) : r);\n}\n//# sourceMappingURL=record.js.map","export function reduceByKey(subject, callbackfn, initialValue) {\n return Object.keys(subject).reduce(callbackfn, initialValue);\n}\n/**\n * @deprecated renamed to reduceByKey\n */\nexport const reduceKey = reduceByKey;\n//# sourceMappingURL=reduceKey.js.map","/* eslint-disable @typescript-eslint/no-unsafe-assignment */\n/* eslint-disable @typescript-eslint/no-unsafe-return */\nexport function required(source1, source2, source3) {\n return merge([source1, source2, source3], (p, e) => {\n return { ...p, ...e };\n });\n}\nexport function requiredDeep(source1, source2, source3) {\n return merge([source1, source2, source3], (p, e) => deepmerge(p, e));\n}\nfunction merge(entries, reducer) {\n if (entries[0] === undefined || entries[0] === null)\n return entries[0];\n return entries.filter(x => !!x).reduce(reducer, {});\n}\nfunction deepmerge(source1, source2) {\n if (typeof source1 !== 'object' || source1 === null)\n return source2 !== undefined ? source2 : source1;\n if (Array.isArray(source1)) {\n if (Array.isArray(source2))\n return source2;\n if (source2 === undefined)\n return [...source1];\n return [...source1, source2];\n }\n return getAllKeys(source1).concat(getAllKeys(source2)).reduce((p, k) => {\n // @ts-ignore\n p[k] = deepmerge(source1[k], source2 && source2[k]);\n return p;\n }, {});\n}\nfunction getAllKeys(subject, internal = false) {\n if (typeof subject !== 'object')\n return [];\n const propertyNames = Object.getOwnPropertyNames(subject);\n const keys = internal ? propertyNames.filter(n => n !== 'constructor') : propertyNames;\n const proto = Object.getPrototypeOf(subject);\n return proto !== Object.prototype ? keys.concat(getAllKeys(proto, true)) : keys;\n}\n//# sourceMappingURL=required.js.map","import { requiredDeep } from './required.js';\nexport function unpartialRecursively(arg1, arg2, arg3) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return requiredDeep(arg1, arg2, arg3);\n}\nexport function unpartial(s1, s2, s3) {\n // defensive check for JS\n if (s1 === undefined || s1 === null)\n return s1;\n return [s1, s2, s3]\n .filter(notNil)\n .reduce((p, s) => ({ ...p, ...trimNilProps(s) }), {});\n}\nfunction trimNilProps(value) {\n return Object.keys(value).reduce((p, k) => {\n if (notNil(value[k]))\n p[k] = value[k];\n return p;\n }, {});\n}\nfunction notNil(value) {\n return value !== null && value !== undefined;\n}\n//# sourceMappingURL=unpartial.js.map","// The module cache\nvar __webpack_module_cache__ = {};\n\n// The require function\nfunction __webpack_require__(moduleId) {\n\t// Check if module is in cache\n\tvar cachedModule = __webpack_module_cache__[moduleId];\n\tif (cachedModule !== undefined) {\n\t\treturn cachedModule.exports;\n\t}\n\t// Create a new module (and put it into the cache)\n\tvar module = __webpack_module_cache__[moduleId] = {\n\t\t// no module.id needed\n\t\t// no module.loaded needed\n\t\texports: {}\n\t};\n\n\t// Execute the module function\n\t__webpack_modules__[moduleId](module, module.exports, __webpack_require__);\n\n\t// Return the exports of the module\n\treturn module.exports;\n}\n\n","// getDefaultExport function for compatibility with non-harmony modules\n__webpack_require__.n = function(module) {\n\tvar getter = module && module.__esModule ?\n\t\tfunction() { return module['default']; } :\n\t\tfunction() { return module; };\n\t__webpack_require__.d(getter, { a: getter });\n\treturn getter;\n};","// define getter functions for harmony exports\n__webpack_require__.d = function(exports, definition) {\n\tfor(var key in definition) {\n\t\tif(__webpack_require__.o(definition, key) && !__webpack_require__.o(exports, key)) {\n\t\t\tObject.defineProperty(exports, key, { enumerable: true, get: definition[key] });\n\t\t}\n\t}\n};","__webpack_require__.g = (function() {\n\tif (typeof globalThis === 'object') return globalThis;\n\ttry {\n\t\treturn this || new Function('return this')();\n\t} catch (e) {\n\t\tif (typeof window === 'object') return window;\n\t}\n})();","__webpack_require__.o = function(obj, prop) { return Object.prototype.hasOwnProperty.call(obj, prop); }","// define __esModule on exports\n__webpack_require__.r = function(exports) {\n\tif(typeof Symbol !== 'undefined' && Symbol.toStringTag) {\n\t\tObject.defineProperty(exports, Symbol.toStringTag, { value: 'Module' });\n\t}\n\tObject.defineProperty(exports, '__esModule', { value: true });\n};","export * from './console.js'\nexport * from './errors.js'\nexport * from './formatter.js'\nexport * from './logLevels.js'\nexport * from './memory.js'\nexport {\n configGlobal, createStandardLog, createStandardLogForTest,\n getLogger, suppressLogs\n} from './standardLog.js'\nexport type { StandardLog, StandardLogForTest, StandardLogInstance } from './standardLog.js'\nexport * from './types.js'\n"],"names":[],"sourceRoot":""}
|
|
Binary file
|
package/esm/console.js
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { unpartial } from 'type-plus';
|
|
2
|
-
import {
|
|
2
|
+
import { consoleFormatter } from './formatter.js';
|
|
3
3
|
import { logLevels } from './logLevels.js';
|
|
4
4
|
import { polyfill } from './platform.js';
|
|
5
5
|
export function toConsoleMethod(level) {
|
|
@@ -41,7 +41,7 @@ function buildFn(name) {
|
|
|
41
41
|
return function (...args) { console[name](...args); };
|
|
42
42
|
}
|
|
43
43
|
export function createConsoleLogReporter(options) {
|
|
44
|
-
const { id, formatter, filter } = unpartial({ id: 'console', formatter:
|
|
44
|
+
const { id, formatter, filter } = unpartial({ id: 'console', formatter: consoleFormatter }, options);
|
|
45
45
|
if (!polyfill.console)
|
|
46
46
|
polyfill.console = buildPolyfillConsole();
|
|
47
47
|
return Object.freeze({
|
package/esm/console.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.js","sourceRoot":"","sources":["../ts/console.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,
|
|
1
|
+
{"version":3,"file":"console.js","sourceRoot":"","sources":["../ts/console.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAA;AACjD,OAAO,EAAE,SAAS,EAAE,MAAM,gBAAgB,CAAA;AAC1C,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAGxC,MAAM,UAAU,eAAe,CAAC,KAAa;IAC3C,QAAQ,IAAI,EAAE;QACZ,4CAA4C;QAC5C,KAAK,CAAC,KAAK,IAAI,CAAC,CAAC,CAAC,CAAC,OAAO,OAAO,CAAA;QACjC,KAAK,CAAC,KAAK,IAAI,SAAS,CAAC,KAAK,CAAC,CAAC,CAAC,OAAO,OAAO,CAAA;QAC/C,KAAK,CAAC,KAAK,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,MAAM,CAAA;QAC7C,KAAK,CAAC,KAAK,IAAI,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,OAAO,MAAM,CAAA;QAC7C,OAAO,CAAC,CAAC,OAAO,OAAO,CAAA;KACxB;AACH,CAAC;AAED,uBAAuB;AACvB,+BAA+B;AAC/B,SAAS,oBAAoB;IAC3B,4CAA4C;IAC5C,MAAM,OA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AAC,KAAK,KAAK,UAAU,CAAC,CAAC,CAAC,OAAO,CAAC,CAAC,CAAC,KAAK,CAAC;SACtE,CAAA;KACF;AACH,CAAC;AAED,uBAAuB;AACvB,SAAS,OAAO,CAAC,IAAiD;IAChE,OAAO,UAAU,GAAG,IAAW,IAAI,OAAO,CAAC,IAAI,CAAC,CAAC,GAAG,IAAI,CAAC,CAAA,CAAC,CAAC,CAAA;AAC7D,CAAC;AAOD,MAAM,UAAU,wBAAwB,CAAC,OAAmC;IAC1E,MAAM,EAAE,EAAE,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,SAAS,CAAC,EAAE,EAAE,EAAE,SAAS,EAAE,SAAS,EAAE,gBAAgB,EAAE,EAAE,OAAO,CAAC,CAAA;IACpG,IAAI,CAAC,QAAQ,CAAC,OAAO;QAAE,QAAQ,CAAC,OAAO,GAAG,oBAAoB,EAAE,CAAA;IAEhE,OAAO,MAAM,CAAC,MAAM,CAAC;QACnB,EAAE;QACF,iBAAiB,EAAE,IAAI;QACvB,IAAI,SAAS,KAAK,OAAO,SAAS,CAAA,CAAC,CAAC;QACpC,IAAI,MAAM,KAAK,OAAO,MAAM,CAAA,CAAC,CAAC;QAC9B,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,KAAK,CAAC,KAAe;YACnB,IAAI,MAAM,IAAI,CAAC,MAAM,CAAC,KAAK,CAAC;gBAAE,OAAM;YACpC,MAAM,MAAM,GAAG,SAAS,CAAC,KAAK,CAAC,CAAA;YAC/B,MAAM,MAAM,GAAG,eAAe,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;YAC3C,IAAI,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,GAAG,MAAM,CAAC,CAAA;QACjC,CAAC;KACF,CAAC,CAAA;AACJ,CAAC","sourcesContent":["import { unpartial } from 'type-plus'\nimport { consoleFormatter } from './formatter.js'\nimport { logLevels } from './logLevels.js'\nimport { polyfill } from './platform.js'\nimport type { ConsoleLike, LogEntry, LogFormatter, LogReporter, LogReporterOptions } from './types.js'\n\nexport function toConsoleMethod(level: number) {\n switch (true) {\n // edge case in case none is somehow written\n case (level <= 0): return 'debug'\n case (level <= logLevels.error): return 'error'\n case (level <= logLevels.warn): return 'warn'\n case (level <= logLevels.info): return 'info'\n default: return 'debug'\n }\n}\n\n// istanbul ignore next\n/* eslint-disable no-console */\nfunction buildPolyfillConsole() {\n // old phantomjs does not have bind function\n const hasBind = !!console.log.bind as boolean\n if (hasBind) {\n return {\n // the `typeof` guards against IE where `console.log.apply()`\n // results in error `Object doesn't support property or method 'apply'`\n debug: (typeof console.info === 'function' ? console.debug : console.log).bind(console),\n info: (typeof console.info === 'function' ? console.info : console.log).bind(console),\n warn: (typeof console.warn === 'function' ? console.warn : console.log).bind(console),\n error: (typeof console.error === 'function' ? console.error : console.log).bind(console)\n }\n }\n else {\n return {\n debug: buildFn(typeof console.debug === 'function' ? 'debug' : 'log'),\n info: buildFn(typeof console.info === 'function' ? 'info' : 'log'),\n warn: buildFn(typeof console.warn === 'function' ? 'warn' : 'log'),\n error: buildFn(typeof console.error === 'function' ? 'error' : 'log'),\n }\n }\n}\n\n// istanbul ignore next\nfunction buildFn(name: 'debug' | 'info' | 'warn' | 'error' | 'log') {\n return function (...args: any[]) { console[name](...args) }\n}\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 const { id, formatter, filter } = unpartial({ id: 'console', formatter: consoleFormatter }, options)\n if (!polyfill.console) polyfill.console = buildPolyfillConsole()\n\n return Object.freeze({\n id,\n isConsoleReporter: true,\n get formatter() { return formatter },\n get filter() { return filter },\n console: polyfill.console,\n write(entry: LogEntry) {\n if (filter && !filter(entry)) return\n const values = formatter(entry)\n const method = toConsoleMethod(entry.level)\n this.console[method](...values)\n }\n })\n}\n"]}
|
package/esm/console.spec.js
CHANGED
|
@@ -111,12 +111,12 @@ describe('createConsoleLogReporter', () => {
|
|
|
111
111
|
reporter.write({ id, level: logLevels.emergency, args: ['emergency'], timestamp: new Date() });
|
|
112
112
|
expect(fakeConsole.errors).toEqual([['id-only']]);
|
|
113
113
|
});
|
|
114
|
-
it('uses
|
|
114
|
+
it('uses consoleFormatter if formatter is undefined', () => {
|
|
115
115
|
const reporter = createConsoleLogReporter({ formatter: undefined });
|
|
116
116
|
const entry = { id: 'no formatter', level: logLevels.emergency, args: ['emergency'], timestamp: new Date() };
|
|
117
117
|
reporter.write(entry);
|
|
118
118
|
expect(fakeConsole.errors).toEqual([
|
|
119
|
-
[
|
|
119
|
+
['emergency']
|
|
120
120
|
]);
|
|
121
121
|
});
|
|
122
122
|
});
|
package/esm/console.spec.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"console.spec.js","sourceRoot":"","sources":["../ts/console.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EACgB,wBAAwB,EAClC,SAAS,EAAE,iBAAiB,EAAE,eAAe,EACzD,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,EAAE,CAAC,+EAA+E,EAAE,GAAG,EAAE;QACvF,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QAC3C,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QAC7C,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QAE7C,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,MAAM,CAA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AErB,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;YAChC,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;SAChE,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEF,SAAS,iBAAiB;IACxB,MAAM,MAAM,GAAU,EAAE,CAAA;IACxB,MAAM,KAAK,GAAU,EAAE,CAAA;IACvB,MAAM,KAAK,GAAU,EAAE,CAAA;IACvB,MAAM,MAAM,GAAU,EAAE,CAAA;IACxB,OAAO;QACL,MAAM;QACN,KAAK;QACL,KAAK;QACL,MAAM;QACN,KAAK,CAAC,GAAG,IAAW,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAC,CAAC;QAC3C,IAAI,CAAC,GAAG,IAAW,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAC,CAAC;QACzC,IAAI,CAAC,GAAG,IAAW,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAC,CAAC;QACzC,KAAK,CAAC,GAAG,IAAW,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAC,CAAC;KAC5C,CAAA;AACH,CAAC","sourcesContent":["import { createStandardLog } from './standardLog.js'\nimport {\n ConsoleLogFormatter, createConsoleLogReporter,\n LogFilter, logLevels, plainLogFormatter, toConsoleMethod\n} from './index.js'\nimport { polyfill } from './platform.js'\n\ndescribe('toConsoleMethod()', () => {\n it('converts any level to standard console method names: debug, info, warn, error', () => {\n expect(toConsoleMethod(1)).toEqual('error')\n expect(toConsoleMethod(399)).toEqual('error')\n expect(toConsoleMethod(400)).toEqual('error')\n\n expect(toConsoleMethod(401)).toEqual('warn')\n expect(toConsoleMethod(499)).toEqual('warn')\n expect(toConsoleMethod(500)).toEqual('warn')\n\n expect(toConsoleMethod(501)).toEqual('info')\n expect(toConsoleMethod(700)).toEqual('info')\n\n expect(toConsoleMethod(701)).toEqual('debug')\n expect(toConsoleMethod(800)).toEqual('debug')\n expect(toConsoleMethod(801)).toEqual('debug')\n expect(toConsoleMethod(Infinity)).toEqual('debug')\n })\n it('converts to debug for 0 (none) or negative (not valid) level', () => {\n // these are invalid input.\n // so instead of hiding them and not logged,\n // log them so that it is easier to discover.\n expect(toConsoleMethod(-1)).toEqual('debug')\n expect(toConsoleMethod(0)).toEqual('debug')\n })\n})\ndescribe('rendering tests', () => {\n test('plain rendering', () => {\n const reporter = createConsoleLogReporter({ formatter: plainLogFormatter });\n ['emergency', 'info', 'warn', 'debug'].forEach(level => {\n reporter.write({ id: 'plain', level: (logLevels as any)[level], args: ['hello', 'world'], timestamp: new Date() })\n })\n })\n})\n\n\ndescribe('createConsoleLogReporter', () => {\n let fakeConsole = createFakeConsole()\n beforeEach(() => polyfill.console = fakeConsole = createFakeConsole())\n\n describe('id', () => {\n test('default is \"console\"', () => {\n const reporter = createConsoleLogReporter()\n expect(reporter.id).toBe('console')\n })\n test('can be overridden', () => {\n const reporter = createConsoleLogReporter({ id: 'neo-console' })\n expect(reporter.id).toBe('neo-console')\n })\n })\n\n describe('log level', () => {\n test('error, alert, critical and emergency logs are written to console.error', () => {\n const id = 'log'\n const reporter = createConsoleLogReporter()\n\n reporter.write({ id, level: logLevels.emergency, args: ['emergency'], timestamp: new Date() })\n reporter.write({ id, level: logLevels.critical, args: ['critical'], timestamp: new Date() })\n reporter.write({ id, level: logLevels.alert, args: ['alert'], timestamp: new Date() })\n reporter.write({ id, level: logLevels.error, args: ['error'], timestamp: new Date() })\n\n expect(fakeConsole.errors.length).toBe(4)\n })\n\n test('warn logs are written to console.warn', () => {\n const id = 'log'\n const reporter = createConsoleLogReporter()\n\n reporter.write({ id, level: logLevels.warn, args: ['warn'], timestamp: new Date() })\n\n expect(fakeConsole.warns.length).toBe(1)\n })\n\n test('notice and info logs are written to console.info', () => {\n const id = 'log'\n const reporter = createConsoleLogReporter()\n\n reporter.write({ id, level: logLevels.notice, args: ['notice'], timestamp: new Date() })\n reporter.write({ id, level: logLevels.info, args: ['info'], timestamp: new Date() })\n\n expect(fakeConsole.infos.length).toBe(2)\n })\n\n\n test('debug, trace, and planck logs are written to console.debug', () => {\n const id = 'log'\n const reporter = createConsoleLogReporter()\n\n reporter.write({ id, level: logLevels.debug, args: ['debug'], timestamp: new Date() })\n reporter.write({ id, level: logLevels.trace, args: ['trace'], timestamp: new Date() })\n reporter.write({ id, level: logLevels.planck, args: ['planck'], timestamp: new Date() })\n\n expect(fakeConsole.debugs.length).toBe(3)\n })\n })\n\n describe('custom logs', () => {\n test('are written according to their log level value', () => {\n const id = 'log'\n const reporter = createConsoleLogReporter()\n\n const sl = createStandardLog({\n logLevel: logLevels.all,\n customLevels: {\n 'high': 50,\n 'important': 450,\n 'interest': 650,\n 'silly': 1000\n },\n reporters: [reporter]\n })\n const log = sl.getLogger(id)\n log.high('a')\n log.important('b')\n log.interest('c')\n log.silly('d')\n\n expect(fakeConsole.errors.length).toBe(1)\n expect(fakeConsole.warns.length).toBe(1)\n expect(fakeConsole.infos.length).toBe(1)\n expect(fakeConsole.debugs.length).toBe(1)\n })\n })\n\n const idFormatter: ConsoleLogFormatter = (entry) => [entry.id]\n\n describe('formatter', () => {\n test('use specific formatter', () => {\n const id = 'id-only'\n const reporter = createConsoleLogReporter({ formatter: idFormatter })\n expect(reporter.formatter).toBe(idFormatter)\n\n reporter.write({ id, level: logLevels.emergency, args: ['emergency'], timestamp: new Date() })\n\n expect(fakeConsole.errors).toEqual([['id-only']])\n })\n it('uses plainLogFormatter if formatter is undefined', () => {\n const reporter = createConsoleLogReporter({ formatter: undefined })\n\n const entry = { id: 'no formatter', level: logLevels.emergency, args: ['emergency'], timestamp: new Date() }\n reporter.write(entry)\n\n expect(fakeConsole.errors).toEqual([\n [entry.timestamp.toISOString(), 'no formatter', '(EMERGENCY)', 'emergency']\n ])\n })\n })\n\n describe('filter', () => {\n const filter: LogFilter = (entry) => entry.id !== 'secret'\n test('use specific filter', () => {\n const reporter = createConsoleLogReporter({ formatter: idFormatter, filter })\n expect(reporter.filter).toBe(filter)\n\n reporter.write({ id: 'normal', level: logLevels.emergency, args: ['emergency'], timestamp: new Date() })\n reporter.write({ id: 'secret', level: logLevels.emergency, args: ['emergency'], timestamp: new Date() })\n\n expect(fakeConsole.errors).toEqual([['normal']])\n })\n })\n\n test('write log entry with multiple arguments', () => {\n const id = 'log'\n const reporter = createConsoleLogReporter({ formatter: plainLogFormatter })\n\n const entry = { id, level: logLevels.info, args: ['a', 'b', 'c'], timestamp: new Date() }\n\n reporter.write(entry)\n\n expect(fakeConsole.infos).toEqual([\n [entry.timestamp.toISOString(), 'log', '(INFO)', 'a', 'b', 'c']\n ])\n })\n})\n\nfunction createFakeConsole() {\n const errors: any[] = []\n const infos: any[] = []\n const warns: any[] = []\n const debugs: any[] = []\n return {\n errors,\n infos,\n warns,\n debugs,\n error(...args: any[]) { errors.push(args) },\n info(...args: any[]) { infos.push(args) },\n warn(...args: any[]) { warns.push(args) },\n debug(...args: any[]) { debugs.push(args) }\n }\n}\n"]}
|
|
1
|
+
{"version":3,"file":"console.spec.js","sourceRoot":"","sources":["../ts/console.spec.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,kBAAkB,CAAA;AACpD,OAAO,EACgB,wBAAwB,EAClC,SAAS,EAAE,iBAAiB,EAAE,eAAe,EACzD,MAAM,YAAY,CAAA;AACnB,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AAExC,QAAQ,CAAC,mBAAmB,EAAE,GAAG,EAAE;IACjC,EAAE,CAAC,+EAA+E,EAAE,GAAG,EAAE;QACvF,MAAM,CAAC,eAAe,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QAC3C,MAAM,CAAC,eAAe,CAAC,GAAG,CAAC,CAAC,CAAC,OA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G,EAAE,GAAG,CAAC,EAAE,SAAS,EAAE,IAAI,IAAI,EAAE,EAAE,CAAA;QAEzF,QAAQ,CAAC,KAAK,CAAC,KAAK,CAAC,CAAA;QAErB,MAAM,CAAC,WAAW,CAAC,KAAK,CAAC,CAAC,OAAO,CAAC;YAChC,CAAC,KAAK,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,KAAK,EAAE,QAAQ,EAAE,GAAG,EAAE,GAAG,EAAE,GAAG,CAAC;SAChE,CAAC,CAAA;IACJ,CAAC,CAAC,CAAA;AACJ,CAAC,CAAC,CAAA;AAEF,SAAS,iBAAiB;IACxB,MAAM,MAAM,GAAU,EAAE,CAAA;IACxB,MAAM,KAAK,GAAU,EAAE,CAAA;IACvB,MAAM,KAAK,GAAU,EAAE,CAAA;IACvB,MAAM,MAAM,GAAU,EAAE,CAAA;IACxB,OAAO;QACL,MAAM;QACN,KAAK;QACL,KAAK;QACL,MAAM;QACN,KAAK,CAAC,GAAG,IAAW,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAC,CAAC;QAC3C,IAAI,CAAC,GAAG,IAAW,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAC,CAAC;QACzC,IAAI,CAAC,GAAG,IAAW,IAAI,KAAK,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAC,CAAC;QACzC,KAAK,CAAC,GAAG,IAAW,IAAI,MAAM,CAAC,IAAI,CAAC,IAAI,CAAC,CAAA,CAAC,CAAC;KAC5C,CAAA;AACH,CAAC","sourcesContent":["import { createStandardLog } from './standardLog.js'\nimport {\n ConsoleLogFormatter, createConsoleLogReporter,\n LogFilter, logLevels, plainLogFormatter, toConsoleMethod\n} from './index.js'\nimport { polyfill } from './platform.js'\n\ndescribe('toConsoleMethod()', () => {\n it('converts any level to standard console method names: debug, info, warn, error', () => {\n expect(toConsoleMethod(1)).toEqual('error')\n expect(toConsoleMethod(399)).toEqual('error')\n expect(toConsoleMethod(400)).toEqual('error')\n\n expect(toConsoleMethod(401)).toEqual('warn')\n expect(toConsoleMethod(499)).toEqual('warn')\n expect(toConsoleMethod(500)).toEqual('warn')\n\n expect(toConsoleMethod(501)).toEqual('info')\n expect(toConsoleMethod(700)).toEqual('info')\n\n expect(toConsoleMethod(701)).toEqual('debug')\n expect(toConsoleMethod(800)).toEqual('debug')\n expect(toConsoleMethod(801)).toEqual('debug')\n expect(toConsoleMethod(Infinity)).toEqual('debug')\n })\n it('converts to debug for 0 (none) or negative (not valid) level', () => {\n // these are invalid input.\n // so instead of hiding them and not logged,\n // log them so that it is easier to discover.\n expect(toConsoleMethod(-1)).toEqual('debug')\n expect(toConsoleMethod(0)).toEqual('debug')\n })\n})\ndescribe('rendering tests', () => {\n test('plain rendering', () => {\n const reporter = createConsoleLogReporter({ formatter: plainLogFormatter });\n ['emergency', 'info', 'warn', 'debug'].forEach(level => {\n reporter.write({ id: 'plain', level: (logLevels as any)[level], args: ['hello', 'world'], timestamp: new Date() })\n })\n })\n})\n\n\ndescribe('createConsoleLogReporter', () => {\n let fakeConsole = createFakeConsole()\n beforeEach(() => polyfill.console = fakeConsole = createFakeConsole())\n\n describe('id', () => {\n test('default is \"console\"', () => {\n const reporter = createConsoleLogReporter()\n expect(reporter.id).toBe('console')\n })\n test('can be overridden', () => {\n const reporter = createConsoleLogReporter({ id: 'neo-console' })\n expect(reporter.id).toBe('neo-console')\n })\n })\n\n describe('log level', () => {\n test('error, alert, critical and emergency logs are written to console.error', () => {\n const id = 'log'\n const reporter = createConsoleLogReporter()\n\n reporter.write({ id, level: logLevels.emergency, args: ['emergency'], timestamp: new Date() })\n reporter.write({ id, level: logLevels.critical, args: ['critical'], timestamp: new Date() })\n reporter.write({ id, level: logLevels.alert, args: ['alert'], timestamp: new Date() })\n reporter.write({ id, level: logLevels.error, args: ['error'], timestamp: new Date() })\n\n expect(fakeConsole.errors.length).toBe(4)\n })\n\n test('warn logs are written to console.warn', () => {\n const id = 'log'\n const reporter = createConsoleLogReporter()\n\n reporter.write({ id, level: logLevels.warn, args: ['warn'], timestamp: new Date() })\n\n expect(fakeConsole.warns.length).toBe(1)\n })\n\n test('notice and info logs are written to console.info', () => {\n const id = 'log'\n const reporter = createConsoleLogReporter()\n\n reporter.write({ id, level: logLevels.notice, args: ['notice'], timestamp: new Date() })\n reporter.write({ id, level: logLevels.info, args: ['info'], timestamp: new Date() })\n\n expect(fakeConsole.infos.length).toBe(2)\n })\n\n\n test('debug, trace, and planck logs are written to console.debug', () => {\n const id = 'log'\n const reporter = createConsoleLogReporter()\n\n reporter.write({ id, level: logLevels.debug, args: ['debug'], timestamp: new Date() })\n reporter.write({ id, level: logLevels.trace, args: ['trace'], timestamp: new Date() })\n reporter.write({ id, level: logLevels.planck, args: ['planck'], timestamp: new Date() })\n\n expect(fakeConsole.debugs.length).toBe(3)\n })\n })\n\n describe('custom logs', () => {\n test('are written according to their log level value', () => {\n const id = 'log'\n const reporter = createConsoleLogReporter()\n\n const sl = createStandardLog({\n logLevel: logLevels.all,\n customLevels: {\n 'high': 50,\n 'important': 450,\n 'interest': 650,\n 'silly': 1000\n },\n reporters: [reporter]\n })\n const log = sl.getLogger(id)\n log.high('a')\n log.important('b')\n log.interest('c')\n log.silly('d')\n\n expect(fakeConsole.errors.length).toBe(1)\n expect(fakeConsole.warns.length).toBe(1)\n expect(fakeConsole.infos.length).toBe(1)\n expect(fakeConsole.debugs.length).toBe(1)\n })\n })\n\n const idFormatter: ConsoleLogFormatter = (entry) => [entry.id]\n\n describe('formatter', () => {\n test('use specific formatter', () => {\n const id = 'id-only'\n const reporter = createConsoleLogReporter({ formatter: idFormatter })\n expect(reporter.formatter).toBe(idFormatter)\n\n reporter.write({ id, level: logLevels.emergency, args: ['emergency'], timestamp: new Date() })\n\n expect(fakeConsole.errors).toEqual([['id-only']])\n })\n it('uses consoleFormatter if formatter is undefined', () => {\n const reporter = createConsoleLogReporter({ formatter: undefined })\n\n const entry = { id: 'no formatter', level: logLevels.emergency, args: ['emergency'], timestamp: new Date() }\n reporter.write(entry)\n\n expect(fakeConsole.errors).toEqual([\n ['emergency']\n ])\n })\n })\n\n describe('filter', () => {\n const filter: LogFilter = (entry) => entry.id !== 'secret'\n test('use specific filter', () => {\n const reporter = createConsoleLogReporter({ formatter: idFormatter, filter })\n expect(reporter.filter).toBe(filter)\n\n reporter.write({ id: 'normal', level: logLevels.emergency, args: ['emergency'], timestamp: new Date() })\n reporter.write({ id: 'secret', level: logLevels.emergency, args: ['emergency'], timestamp: new Date() })\n\n expect(fakeConsole.errors).toEqual([['normal']])\n })\n })\n\n test('write log entry with multiple arguments', () => {\n const id = 'log'\n const reporter = createConsoleLogReporter({ formatter: plainLogFormatter })\n\n const entry = { id, level: logLevels.info, args: ['a', 'b', 'c'], timestamp: new Date() }\n\n reporter.write(entry)\n\n expect(fakeConsole.infos).toEqual([\n [entry.timestamp.toISOString(), 'log', '(INFO)', 'a', 'b', 'c']\n ])\n })\n})\n\nfunction createFakeConsole() {\n const errors: any[] = []\n const infos: any[] = []\n const warns: any[] = []\n const debugs: any[] = []\n return {\n errors,\n infos,\n warns,\n debugs,\n error(...args: any[]) { errors.push(args) },\n info(...args: any[]) { infos.push(args) },\n warn(...args: any[]) { warns.push(args) },\n debug(...args: any[]) { debugs.push(args) }\n }\n}\n"]}
|