standard-log 11.5.0 → 11.5.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/cjs/console.d.ts +3 -3
  2. package/cjs/console.d.ts.map +1 -1
  3. package/cjs/console.js +17 -8
  4. package/cjs/console.js.map +1 -1
  5. package/cjs/errors.d.ts.map +1 -1
  6. package/cjs/errors.js.map +1 -1
  7. package/cjs/formatter.d.ts +1 -1
  8. package/cjs/formatter.d.ts.map +1 -1
  9. package/cjs/formatter.js.map +1 -1
  10. package/cjs/index.d.ts.map +1 -1
  11. package/cjs/index.js.map +1 -1
  12. package/cjs/logLevels.d.ts.map +1 -1
  13. package/cjs/logLevels.js.map +1 -1
  14. package/cjs/logStore.d.ts.map +1 -1
  15. package/cjs/logStore.js.map +1 -1
  16. package/cjs/logger.d.ts.map +1 -1
  17. package/cjs/logger.js +15 -13
  18. package/cjs/logger.js.map +1 -1
  19. package/cjs/memory.d.ts +2 -2
  20. package/cjs/memory.d.ts.map +1 -1
  21. package/cjs/memory.js +15 -8
  22. package/cjs/memory.js.map +1 -1
  23. package/cjs/platform.d.ts.map +1 -1
  24. package/cjs/platform.js +1 -2
  25. package/cjs/platform.js.map +1 -1
  26. package/cjs/standardLog.ctx.d.ts.map +1 -1
  27. package/cjs/standardLog.ctx.js.map +1 -1
  28. package/cjs/standardLog.d.ts +2 -2
  29. package/cjs/standardLog.d.ts.map +1 -1
  30. package/cjs/standardLog.js +19 -14
  31. package/cjs/standardLog.js.map +1 -1
  32. package/cjs/types.d.ts +12 -12
  33. package/cjs/types.d.ts.map +1 -1
  34. package/cjs/types.js.map +1 -1
  35. package/dist/standard-log.es5.js +1190 -801
  36. package/dist/standard-log.es5.js.gz +0 -0
  37. package/dist/standard-log.es5.js.map +1 -1
  38. package/dist/standard-log.es5.js.map.gz +0 -0
  39. package/dist/standard-log.esm.js +173 -119
  40. package/dist/standard-log.esm.js.gz +0 -0
  41. package/dist/standard-log.esm.js.map +1 -1
  42. package/dist/standard-log.esm.js.map.gz +0 -0
  43. package/esm/console.d.ts +3 -3
  44. package/esm/console.d.ts.map +1 -1
  45. package/esm/console.js +20 -9
  46. package/esm/console.js.map +1 -1
  47. package/esm/errors.d.ts.map +1 -1
  48. package/esm/errors.js.map +1 -1
  49. package/esm/formatter.d.ts +1 -1
  50. package/esm/formatter.d.ts.map +1 -1
  51. package/esm/formatter.js.map +1 -1
  52. package/esm/index.d.ts.map +1 -1
  53. package/esm/index.js.map +1 -1
  54. package/esm/logLevels.d.ts.map +1 -1
  55. package/esm/logLevels.js.map +1 -1
  56. package/esm/logStore.d.ts.map +1 -1
  57. package/esm/logStore.js.map +1 -1
  58. package/esm/logger.d.ts.map +1 -1
  59. package/esm/logger.js +1 -1
  60. package/esm/logger.js.map +1 -1
  61. package/esm/memory.d.ts +2 -2
  62. package/esm/memory.d.ts.map +1 -1
  63. package/esm/memory.js +15 -8
  64. package/esm/memory.js.map +1 -1
  65. package/esm/platform.d.ts.map +1 -1
  66. package/esm/platform.js +1 -2
  67. package/esm/platform.js.map +1 -1
  68. package/esm/standardLog.ctx.d.ts.map +1 -1
  69. package/esm/standardLog.ctx.js.map +1 -1
  70. package/esm/standardLog.d.ts +2 -2
  71. package/esm/standardLog.d.ts.map +1 -1
  72. package/esm/standardLog.js +23 -18
  73. package/esm/standardLog.js.map +1 -1
  74. package/esm/types.d.ts +12 -12
  75. package/esm/types.d.ts.map +1 -1
  76. package/esm/types.js.map +1 -1
  77. package/package.json +17 -9
  78. package/ts/console.ts +54 -45
  79. package/ts/errors.ts +6 -6
  80. package/ts/formatter.ts +18 -18
  81. package/ts/index.ts +21 -6
  82. package/ts/logLevels.ts +90 -91
  83. package/ts/logStore.ts +46 -37
  84. package/ts/logger.ts +67 -57
  85. package/ts/memory.ts +66 -54
  86. package/ts/platform.ts +2 -2
  87. package/ts/standardLog.ctx.ts +2 -2
  88. package/ts/standardLog.ts +113 -94
  89. package/ts/types.ts +72 -62
@@ -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;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,C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I,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC;SACrC;KACF;SACI;QACH,wDAAO,GAAG,wBAAwB,CAAC,OAAO,CAAC;KAC5C;IACD,+DAAc,GAAG,IAAI;AACvB,CAAC;;;;;;;;;;;;ACtIY;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,8BAA8B,SAAI,IAAI,SAAI;AAC1C;AACA;AACA;AACA;AACA;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;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;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;AACA,aAAa;AACb;AACA;AACA,YAAY,0BAA0B;AACtC;AACA;AACA,gEAAgE,6BAA6B;AAC7F;AACA;AACA,8DAA8D,oBAAoB;AAClF,CAAC;AACD;AACA,iBAAiB,mBAAmB;AACpC;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA;AACA;AACA;AACA,gBAAgB,iBAAiB;AACjC;AACA,gBAAgB;AAChB,gBAAgB;AAChB;AACA;AACA;AACA;AACA;AACA;AACO;AACP;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,uDAAuD,qBAAqB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,2BAA2B;AAClF;AACA;AACA,uDAAuD,gCAAgC;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,SAAS,GAAG,WAAW,KAAK,YAAY;AACrE;AACA;AACA,6BAA6B,SAAS,IAAI,YAAY;AACtD;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,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,iBAAiB;AACjB,cAAc;AACd;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA;AACA,gCAAgC,2EAA2E;AAC3G;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACO;AACP;AACA;AACA;;;;;;;;;;;;;;;AC/OO;AACP;AACA;AACA;;;;;;;;;;;;;;;ACHO;AACP;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACJO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;;;;;;;;;;;;;;;;;;ACPO;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;AACO;AACP;AACA;AACA;AACA;AACA;AACA,6BAA6B,0BAA0B,KAAK;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,IAAI;AACT;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;;;;;;UC3DA;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,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACN4B;AACD;AACG;AACA;AACH;AAIF","sources":["webpack://StandardLog/../../node_modules/.pnpm/ms@2.1.3/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.browser.ts","webpack://StandardLog/./ts/standardLog.ctx.ts","webpack://StandardLog/./ts/standardLog.ts","webpack://StandardLog/../../node_modules/.pnpm/upper-case@2.0.2/node_modules/upper-case/dist/index.js","webpack://StandardLog/../../node_modules/.pnpm/iso-error@5.0.0/node_modules/iso-error/esm/index.js","webpack://StandardLog/../../node_modules/.pnpm/type-plus@4.16.0/node_modules/type-plus/esm/object/mapKey.js","webpack://StandardLog/../../node_modules/.pnpm/type-plus@4.16.0/node_modules/type-plus/esm/object/record.js","webpack://StandardLog/../../node_modules/.pnpm/type-plus@4.16.0/node_modules/type-plus/esm/object/reduceKey.js","webpack://StandardLog/../../node_modules/.pnpm/unpartial@1.0.4/node_modules/unpartial/esm/index.js","webpack://StandardLog/webpack/bootstrap","webpack://StandardLog/webpack/runtime/compat get default export","webpack://StandardLog/webpack/runtime/define property getters","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\n/**\n * @deprecated No longer used since 11.2.0\n */\nexport class StandardLogError extends ModuleError {\n constructor(description: string, options?: IsoError.Options) {\n super('standard-log', description, options)\n }\n}\n\n/**\n * @deprecated no longer used since 11.2.0\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","\nexport const logLevels = {\n /**\n * none: 0\n */\n none: 0 as const,\n /**\n * emergency: 100\n *\n * emergency -> alert\n */\n emergency: 100 as const,\n /**\n * alert: 200\n *\n * emergency -> alert -> critical\n */\n alert: 200 as const,\n /**\n * critical: 300\n *\n * alert -> critical -> error\n */\n critical: 300 as const,\n /**\n * error: 400\n *\n * critical -> error -> warn\n */\n error: 400 as const,\n /**\n * warn: 500\n *\n * error -> warn -> notice\n */\n warn: 500 as const,\n /**\n * notice: 600\n *\n * warn -> notice -> info\n */\n notice: 600 as const,\n /**\n * info: 700\n *\n * notice -> info -> debug\n */\n info: 700 as const,\n /**\n * debug: 800\n *\n * info -> debug -> trace\n */\n debug: 800 as const,\n /**\n * trace: 900\n *\n * debug -> trace -> planck\n */\n trace: 900 as const,\n /**\n * planck: Infinity\n * `planck unit` is a very small unit <https://en.wikipedia.org/wiki/Planck_units>.\n *\n * trace -> planck\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): number | undefined {\n return (logLevels as any)[name.toLocaleLowerCase()]\n}\n\nexport const DEFAULT_LOG_METHOD_NAMES: string[] = [\n 'emergency',\n 'alert',\n 'critical',\n 'error',\n 'warn',\n 'notice',\n 'info',\n 'debug',\n 'trace',\n 'planck'\n]\n","\nimport { mapKey, record, 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: record(),\n nonConsoleLoggers: record(),\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 nonConsoleLoggers: 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 || record()\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 { 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 id = sanitizeId(id)\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 if (shouldLog(store, logLevels.debug, logger.level))\n write({\n id,\n level: logLevels.debug,\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, logger.level ?? store.logLevel)\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 sanitizeId(id: string) {\n return id.replace(/[`~!#$%^&*()=+[\\]{},|<>?]/g, '-')\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, unpartial } from 'type-plus'\nimport { toInspectLogEntry } from './platform.js'\nimport { formatLogLevel } from './formatter.js'\nimport type { LogEntry, LogFormatter, LogReporter, LogReporterOptions } from './types.js'\nimport { createConsoleLogReporter } from './console.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 getLogMessagesWithIdAndLevel(): string[],\n emit(): void\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 return Object.freeze(buildMemoryReporter(unpartial({ id: 'memory' }, options)))\n}\n\nfunction buildMemoryReporter(options?: LogReporterOptions<LogEntry>) {\n const { id, formatter, filter } = required({ id: 'memory', formatter: (e: LogEntry) => e }, options)\n const logs: LogEntry[] = []\n return {\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 getLogMessagesWithIdAndLevel() {\n return logs.map(toInspectLogEntry)\n .map(log => `${log.id} ${formatLogLevel(log.level)} ${log.args.join(' ')}`)\n },\n getLogMessageWithLevel() { return toMessageWithLevel(logs) },\n /**\n * emit the saved log to console for easy debugging\n */\n emit() {\n const reporter = createConsoleLogReporter()\n logs.forEach(l => reporter.write(l))\n }\n }\n}\n\nexport function createMemoryWithConsoleLogReporter(options?: LogReporterOptions<LogEntry>): MemoryLogReporter {\n return Object.freeze(\n Object.assign(buildMemoryReporter(unpartial({ id: 'memory-with-console' }, options)), {\n isConsoleReporter: true\n }))\n}\n","import { record } from 'type-plus'\nimport type { ConsoleLike, LogEntry } from './types.js'\n\nexport const toInspectLogEntry = (e: LogEntry) => e\n\nexport const polyfill: { console?: ConsoleLike } = record()\n","import { record } from 'type-plus'\nimport type { LogStore } from './logStore.js'\nimport type { LogMethodNames, StandardLogInstance } from './types.js'\n\nexport const ctx: {\n configured?: boolean,\n gsl?: { store: LogStore, standardLog: StandardLogInstance<LogMethodNames> }\n} = record()\n","import { record, required } from 'type-plus'\nimport { createLogger } from './logger.js'\nimport { DEFAULT_LOG_METHOD_NAMES, logLevels } from './logLevels.js'\nimport { createLogStore, LogStore } from './logStore.js'\nimport { createMemoryLogReporter, MemoryLogReporter } from './memory.js'\nimport { ctx } from './standardLog.ctx.js'\nimport type { Logger, LoggerOptions, LogLevel, LogMethodNames, StandardLogInstance, StandardLogOptions } from './types.js'\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 (options?.reporters?.some(r => !r.id)) {\n const log = closure.standardLog.getLogger('standard-log')\n log.critical(`Detected reporter with empty id. This is not allowed as it will create problems with feature like 'getNonConsoleLogger()'. Please add an id to your reporter.`)\n }\n\n if (!ctx.gsl) ctx.gsl = closure as any\n return closure.standardLog\n}\n\nfunction noop() { }\n\nexport function createStandardLogClosure<N extends string = LogMethodNames>(\n options?: StandardLogOptions<N>\n): { store: LogStore, standardLog: StandardLog<N> } {\n // TODO reporter.id must not be empty\n const store = createLogStore(required({ logLevel: logLevels.info }, options))\n const nonConsoleReporters = options?.reporters?.filter(r => !r.isConsoleReporter).map(r => r.id) ?? []\n const logMethods = DEFAULT_LOG_METHOD_NAMES\n .concat(Object.keys(options?.customLevels ?? {}))\n .concat(['on', 'count', 'write'])\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 getNonConsoleLogger(id, options?) {\n if (store.nonConsoleLoggers[id]) return store.nonConsoleLoggers[id] as any\n\n if (store.loggers[id]) {\n const log = this.getLogger('standard-log')\n log.warn(`attempt to create a non-console logger with existing id ('${id}'), ignoring`)\n return store.nonConsoleLoggers[id] = createDummyLogger(logMethods)\n }\n\n return store.nonConsoleLoggers[id] = nonConsoleReporters.length === 0\n ? createDummyLogger(logMethods)\n : createLogger(store, id, {\n ssf: this.getNonConsoleLogger,\n ...options,\n writeTo(reporterId) {\n return nonConsoleReporters.indexOf(reporterId) >= 0\n }\n })\n },\n }\n }\n}\n\nfunction createDummyLogger(logMethods: string[]) {\n return logMethods.reduce((p, m) => {\n p[m] = noop\n return p\n }, record()) as Logger\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 closure = createStandardLogClosure<N>({ reporters: [reporter], logLevel })\n return { ...closure.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 type GetLogger<N extends string = LogMethodNames> = (id: string, options?: LoggerOptions) => Logger<LogMethodNames | N>\n\nexport function getLogger<N extends string = LogMethodNames>(id: string, options?: LoggerOptions) {\n return getGlobalSL<N>().getLogger(id, options)\n}\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","/* eslint-disable @typescript-eslint/unbound-method */\nvar __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _SerializableConverter_instances, _SerializableConverter_plugins, _SerializableConverter_fromSerializable, _SerializableConverter_deserializeError, _SerializableConverter_toSerializable, _a, _IsoError_hasCause, _IsoError_toIsoError;\n//#region captureStackTrace polyfill\n// istanbul ignore next\nif (!Error.captureStackTrace) {\n Error.captureStackTrace = function (error) {\n const container = new Error();\n Object.defineProperty(error, 'stack', {\n configurable: true,\n get: function () {\n // Replace property with value for faster future accesses.\n defineStack(this, container.stack);\n return container.stack;\n },\n set: function (stack) { 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}\nexport class SerializableConverter {\n constructor() {\n _SerializableConverter_instances.add(this);\n _SerializableConverter_plugins.set(this, []);\n }\n addPlugin(plugin) {\n __classPrivateFieldGet(this, _SerializableConverter_plugins, \"f\").unshift(plugin);\n }\n /**\n * Deserialize an `Error` from `Serializable`\n */\n fromSerializable(json, options) {\n const err = __classPrivateFieldGet(this, _SerializableConverter_instances, \"m\", _SerializableConverter_deserializeError).call(this, json);\n Error.captureStackTrace(err, options?.ssf);\n return err;\n }\n /**\n * Serialize `Error` to `Serializable`\n */\n toSerializable(err) {\n return __classPrivateFieldGet(this, _SerializableConverter_plugins, \"f\").reduce((p, s) => p || s.toSerializable(err), undefined) || __classPrivateFieldGet(this, _SerializableConverter_instances, \"m\", _SerializableConverter_toSerializable).call(this, err);\n }\n}\n_SerializableConverter_plugins = new WeakMap(), _SerializableConverter_instances = new WeakSet(), _SerializableConverter_fromSerializable = function _SerializableConverter_fromSerializable(json) {\n if (json.name === 'AggregateError') {\n const { message, errors, ...rest } = json;\n // @ts-ignore\n // istanbul ignore next\n if (global.AggregateError) {\n return Object.assign(new AggregateError(errors, message), rest);\n }\n else {\n return Object.assign(new Error(message), {\n ...rest,\n errors\n });\n }\n }\n const { message, cause, ...rest } = json;\n const causeError = cause ? __classPrivateFieldGet(this, _SerializableConverter_instances, \"m\", _SerializableConverter_deserializeError).call(this, 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}, _SerializableConverter_deserializeError = function _SerializableConverter_deserializeError(json) {\n let err = undefined;\n for (const { fromSerializable } of __classPrivateFieldGet(this, _SerializableConverter_plugins, \"f\")) {\n err = fromSerializable(json);\n if (err)\n break;\n }\n return err || __classPrivateFieldGet(this, _SerializableConverter_instances, \"m\", _SerializableConverter_fromSerializable).call(this, json);\n}, _SerializableConverter_toSerializable = function _SerializableConverter_toSerializable(err) {\n if (isAggregateError(err)) {\n return {\n ...err, name: err.constructor.name, message: err.message,\n errors: err.errors.map(__classPrivateFieldGet(this, _SerializableConverter_instances, \"m\", _SerializableConverter_toSerializable))\n };\n }\n if (err instanceof Error) {\n const { message, cause } = err;\n return cause\n ? { ...err, name: err.constructor.name, message, cause: __classPrivateFieldGet(this, _SerializableConverter_instances, \"m\", _SerializableConverter_toSerializable).call(this, cause) }\n : { ...err, name: err.constructor.name, message };\n }\n return err;\n};\n/**\n * Isomorphic Error that works across physical boundary.\n */\nexport class IsoError extends Error {\n /**\n * Create an IsoError with additional properties without the need to create a new class.\n * @param props properties of the IsoError\n */\n static create(props) {\n const { message, cause, ...rest } = props;\n const err = new IsoError(message, { cause, ssf: IsoError.create });\n return Object.assign(err, rest);\n }\n static stringify(err) {\n return this.serialize(err);\n }\n static serialize(err) {\n return JSON.stringify(this.toSerializable(err));\n }\n static toSerializable(err) {\n return this.converter.toSerializable(err);\n }\n /**\n * @type P Additional properties of the IsoError\n * @param text Json representation of a IsoError\n */\n static parse(text) {\n const json = JSON.parse(text);\n return this.converter.fromSerializable(json, { ssf: IsoError.parse });\n }\n /**\n * @type P Additional properties of the IsoError\n * @param text Json representation of a IsoError\n */\n static deserialize(text) {\n const json = JSON.parse(text);\n return this.converter.fromSerializable(json, { ssf: IsoError.deserialize });\n }\n static fromSerializable(json) {\n return this.converter.fromSerializable(json, { ssf: IsoError.fromSerializable });\n }\n /**\n * returns the error message including the error causes.\n */\n static trace(err) {\n const messages = [];\n if (err instanceof ModuleError) {\n messages.push(`${err.name}(${err.module}): ${err.message}`);\n }\n else if (err instanceof Error) {\n messages.push(`${err.name}: ${err.message}`);\n }\n if (isAggregateError(err)) {\n err.errors.forEach(e => messages.push(...this.trace(e).split('\\n').map(s => ' ' + s)));\n }\n if (err instanceof Error) {\n if (__classPrivateFieldGet(this, _a, \"m\", _IsoError_hasCause).call(this, err))\n messages.push(...this.trace(err.cause).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 }\n static addPlugin(plugin) {\n this.converter.addPlugin(plugin);\n }\n constructor(message, options) {\n super(message);\n /**\n * Name of the error\n */\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * Error cause\n */\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n // restore prototype chain\n const actualProto = new.target.prototype;\n this.name = actualProto.constructor.name;\n // istanbul ignore next\n if (Object.setPrototypeOf)\n Object.setPrototypeOf(this, actualProto);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n else\n this.__proto__ = actualProto;\n if (options?.cause)\n this.cause = __classPrivateFieldGet(IsoError, _a, \"m\", _IsoError_toIsoError).call(IsoError, options.cause);\n if (options?.ssf)\n Error.captureStackTrace(this, options.ssf);\n }\n toString() { return IsoError.serialize(this); }\n trace() { return IsoError.trace(this); }\n}\n_a = IsoError, _IsoError_hasCause = function _IsoError_hasCause(x) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n return !!x.cause;\n}, _IsoError_toIsoError = function _IsoError_toIsoError(err) {\n if (err instanceof IsoError)\n return err;\n // When the error is an internal error from deserialization,\n // the err.constructor.name is object\n return Object.assign(err, { name: err.constructor.name !== 'Object' ? err.constructor.name : err.name });\n};\nObject.defineProperty(IsoError, \"converter\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new SerializableConverter()\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","export 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","export 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}\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}\nexport function unpartialRecursively(arg1, arg2, arg3) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return requiredDeep(arg1, arg2, arg3);\n}\n//# sourceMappingURL=index.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__.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 { GetLogger, StandardLog, StandardLogForTest } from './standardLog.js'\nexport type {\n ConsoleLike, LogEntry, LogFilter, LogFormatter, LogFunction, Logger, LoggerOptions, LogLevel,\n LogLevelEntry, LogMethod, LogMethodNames, LogReporter, LogReporterOptions, ReporterFilter,\n StandardLogInstance, StandardLogOptions\n} from './types.js'\n\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;IAC5C,QAAQ,IAAI,EAAE;QACb,4CAA4C;QAC5C,KAAK,KAAK,IAAI,CAAC;YACd,OAAO,OAAO;QACf,KAAK,KAAK,IAAI,0DAA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C,SAAS,CAAC,MAAM,GAAG,CAAC;YACpB,SAAS,CAAC,IAAI,CAAC,GAAG,OAAO,CAAC,SAAS,CAAC;SACpC;KACD;SAAM;QACN,wDAAO,GAAG,wBAAwB,CAAC,OAAO,CAAC;KAC3C;IACD,+DAAc,GAAG,IAAI;AACtB,CAAC;;;;;;;;;;;;ACzJY;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,8BAA8B,SAAI,IAAI,SAAI;AAC1C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,aAAa;AACb;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,KAAK;AACL;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,2BAA2B;AAC/C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,iBAAiB;AACjB;AACA;AACA,gBAAgB,0BAA0B;AAC1C;AACA;AACA,oEAAoE,6BAA6B;AACjG;AACA;AACA,kEAAkE,oBAAoB;AACtF;AACA;AACA;AACA,qBAAqB,mBAAmB;AACxC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,oBAAoB,iBAAiB;AACrC;AACA,oBAAoB;AACpB,oBAAoB;AACpB;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,gBAAgB,0BAA0B;AAC1C,4CAA4C,6BAA6B;AACzE;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,qBAAqB;AAC5E;AACA;AACA;AACA;AACA;AACA;AACA;AACA,uDAAuD,2BAA2B;AAClF;AACA;AACA,uDAAuD,gCAAgC;AACvF;AACA;AACA;AACA;AACA;AACA;AACA;AACA,6BAA6B,SAAS,GAAG,WAAW,KAAK,YAAY;AACrE;AACA;AACA,6BAA6B,SAAS,IAAI,YAAY;AACtD;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,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;AACA;AACA;AACA;AACA,CAAC;AACD;AACA;AACA;AACA,gCAAgC,wCAAwC;AACxE;AACA;AACA;AACA;AACA;AACA;AACA,CAAC;AACmB;AACpB;AACA;AACA;AACO;AACP;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,SAAS;AACT;AACA;AACO;AACP;AACA;AACA;;;;;;;;;;;;;;;AC3QO;AACP;AACA;AACA,KAAK;AACL;AACA;;;;;;;;;;;;;;;ACLO;AACP;AACA;AACA;AACA;;;;;;;;;;;;;;;;ACJO;AACP;AACA;AACA;AACA;AACA;AACO;AACP;;;;;;;;;;;;;;;;;;ACPO;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;AACO;AACP;AACA;AACA;AACA;AACA;AACA,6BAA6B,0BAA0B,KAAK;AAC5D;AACA;AACA;AACA;AACA;AACA;AACA,KAAK,IAAI;AACT;AACA;AACA;AACA;AACO;AACP;AACA;AACA;AACA;;;;;;UC3DA;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,8CAA8C;;;;;WCA9C;WACA;WACA;WACA,uDAAuD,iBAAiB;WACxE;WACA,gDAAgD,aAAa;WAC7D;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;ACN4B;AACD;AACG;AACA;AACH;AAOF","sources":["webpack://StandardLog/../../node_modules/.pnpm/ms@2.1.3/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.browser.ts","webpack://StandardLog/./ts/standardLog.ctx.ts","webpack://StandardLog/./ts/standardLog.ts","webpack://StandardLog/../../node_modules/.pnpm/upper-case@2.0.2/node_modules/upper-case/dist/index.js","webpack://StandardLog/../../node_modules/.pnpm/iso-error@6.0.1/node_modules/iso-error/esm/index.js","webpack://StandardLog/../../node_modules/.pnpm/type-plus@6.5.0/node_modules/type-plus/esm/object/mapKey.js","webpack://StandardLog/../../node_modules/.pnpm/type-plus@6.5.0/node_modules/type-plus/esm/object/record.js","webpack://StandardLog/../../node_modules/.pnpm/type-plus@6.5.0/node_modules/type-plus/esm/object/reduceKey.js","webpack://StandardLog/../../node_modules/.pnpm/unpartial@1.0.4/node_modules/unpartial/esm/index.js","webpack://StandardLog/webpack/bootstrap","webpack://StandardLog/webpack/runtime/compat get default export","webpack://StandardLog/webpack/runtime/define property getters","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\tswitch (true) {\n\t\t// edge case in case none is somehow written\n\t\tcase level <= 0:\n\t\t\treturn 'debug'\n\t\tcase level <= logLevels.error:\n\t\t\treturn 'error'\n\t\tcase level <= logLevels.warn:\n\t\t\treturn 'warn'\n\t\tcase level <= logLevels.info:\n\t\t\treturn 'info'\n\t\tdefault:\n\t\t\treturn 'debug'\n\t}\n}\n\n// istanbul ignore next\n/* eslint-disable no-console */\nfunction buildPolyfillConsole() {\n\t// old phantomjs does not have bind function\n\tconst hasBind = !!console.log.bind as boolean\n\tif (hasBind) {\n\t\treturn {\n\t\t\t// the `typeof` guards against IE where `console.log.apply()`\n\t\t\t// results in error `Object doesn't support property or method 'apply'`\n\t\t\tdebug: (typeof console.info === 'function' ? console.debug : console.log).bind(console),\n\t\t\tinfo: (typeof console.info === 'function' ? console.info : console.log).bind(console),\n\t\t\twarn: (typeof console.warn === 'function' ? console.warn : console.log).bind(console),\n\t\t\terror: (typeof console.error === 'function' ? console.error : console.log).bind(console)\n\t\t}\n\t} else {\n\t\treturn {\n\t\t\tdebug: buildFn(typeof console.debug === 'function' ? 'debug' : 'log'),\n\t\t\tinfo: buildFn(typeof console.info === 'function' ? 'info' : 'log'),\n\t\t\twarn: buildFn(typeof console.warn === 'function' ? 'warn' : 'log'),\n\t\t\terror: buildFn(typeof console.error === 'function' ? 'error' : 'log')\n\t\t}\n\t}\n}\n\n// istanbul ignore next\nfunction buildFn(name: 'debug' | 'info' | 'warn' | 'error' | 'log') {\n\treturn function (...args: any[]) {\n\t\tconsole[name](...args)\n\t}\n}\n\nexport type ConsoleLogFormatter = LogFormatter<any[]>\nexport type ConsoleLogReporter = LogReporter<any[]> & { console: ConsoleLike }\nexport type ConsoleLogReporterOptions = LogReporterOptions<any[]>\n\nexport function createConsoleLogReporter(options?: ConsoleLogReporterOptions): ConsoleLogReporter {\n\tconst { id, formatter, filter } = unpartial({ id: 'console', formatter: consoleFormatter }, options)\n\tif (!polyfill.console) polyfill.console = buildPolyfillConsole()\n\n\treturn Object.freeze({\n\t\tid,\n\t\tisConsoleReporter: true,\n\t\tget formatter() {\n\t\t\treturn formatter\n\t\t},\n\t\tget filter() {\n\t\t\treturn filter\n\t\t},\n\t\tconsole: polyfill.console,\n\t\twrite(entry: LogEntry) {\n\t\t\tif (filter && !filter(entry)) return\n\t\t\tconst values = formatter(entry)\n\t\t\tconst method = toConsoleMethod(entry.level)\n\t\t\tthis.console[method](...values)\n\t\t}\n\t})\n}\n","import { IsoError, ModuleError } from 'iso-error'\n\n/**\n * @deprecated No longer used since 11.2.0\n */\nexport class StandardLogError extends ModuleError {\n\tconstructor(description: string, options?: IsoError.Options) {\n\t\tsuper('standard-log', description, options)\n\t}\n}\n\n/**\n * @deprecated no longer used since 11.2.0\n */\nexport class InvalidId extends StandardLogError {\n\tconstructor(public id: string, options?: IsoError.Options) {\n\t\tsuper(`logger id only supports alphanumeric, unicode characters, and [:_-.]. Received ${id}`, options)\n\t}\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\tswitch (format) {\n\t\tcase 'none':\n\t\t\treturn (_timestamp: Date) => undefined\n\t\tcase 'iso':\n\t\t\treturn (timestamp: Date) => timestamp.toISOString()\n\t\tcase 'elapsed': {\n\t\t\tlet lastTick: number\n\t\t\treturn (timestamp: Date) => {\n\t\t\t\tconst newTick = timestamp.getTime()\n\t\t\t\tconst result = ms(lastTick === undefined ? 0 : newTick - lastTick)\n\t\t\t\tlastTick = newTick\n\t\t\t\treturn result\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport function formatLogLevel(level: number) {\n\treturn `(${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\treturn [timestamp.toISOString(), id, formatLogLevel(level), ...args]\n}\n\n/**\n * Formats log entry like default console log.\n */\nexport function consoleFormatter({ args }: LogEntry) {\n\treturn args\n}\n","export const logLevels = {\n\t/**\n\t * none: 0\n\t */\n\tnone: 0 as const,\n\t/**\n\t * emergency: 100\n\t *\n\t * emergency -> alert\n\t */\n\temergency: 100 as const,\n\t/**\n\t * alert: 200\n\t *\n\t * emergency -> alert -> critical\n\t */\n\talert: 200 as const,\n\t/**\n\t * critical: 300\n\t *\n\t * alert -> critical -> error\n\t */\n\tcritical: 300 as const,\n\t/**\n\t * error: 400\n\t *\n\t * critical -> error -> warn\n\t */\n\terror: 400 as const,\n\t/**\n\t * warn: 500\n\t *\n\t * error -> warn -> notice\n\t */\n\twarn: 500 as const,\n\t/**\n\t * notice: 600\n\t *\n\t * warn -> notice -> info\n\t */\n\tnotice: 600 as const,\n\t/**\n\t * info: 700\n\t *\n\t * notice -> info -> debug\n\t */\n\tinfo: 700 as const,\n\t/**\n\t * debug: 800\n\t *\n\t * info -> debug -> trace\n\t */\n\tdebug: 800 as const,\n\t/**\n\t * trace: 900\n\t *\n\t * debug -> trace -> planck\n\t */\n\ttrace: 900 as const,\n\t/**\n\t * planck: Infinity\n\t * `planck unit` is a very small unit <https://en.wikipedia.org/wiki/Planck_units>.\n\t *\n\t * trace -> planck\n\t */\n\tplanck: Infinity,\n\t/**\n\t * all: Infinity\n\t */\n\tall: Infinity\n}\n\n/**\n * Convert default log level value to log level name.\n */\nexport function toLogLevelName(level: number) {\n\tif (level <= 100) return 'emergency'\n\tif (level <= 200) return 'alert'\n\tif (level <= 300) return 'critical'\n\tif (level <= 400) return 'error'\n\tif (level <= 500) return 'warn'\n\tif (level <= 600) return 'notice'\n\tif (level <= 700) return 'info'\n\tif (level <= 800) return 'debug'\n\tif (level <= 900) return 'trace'\n\treturn 'planck'\n}\n\n/**\n * Convert default log level name to log level value.\n */\nexport function toLogLevel(name: string): number | undefined {\n\treturn (logLevels as any)[name.toLocaleLowerCase()]\n}\n\nexport const DEFAULT_LOG_METHOD_NAMES: string[] = [\n\t'emergency',\n\t'alert',\n\t'critical',\n\t'error',\n\t'warn',\n\t'notice',\n\t'info',\n\t'debug',\n\t'trace',\n\t'planck'\n]\n","import { mapKey, record, 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>(\n\toptions: Required<StandardLogOptions<N>>\n): LogStore {\n\treturn {\n\t\tloggers: record(),\n\t\tnonConsoleLoggers: record(),\n\t\treporters: options.reporters || [createConsoleLogReporter()],\n\t\tlogLevel: options.logLevel,\n\t\tlogLevelStore: logLevelStore(options)\n\t}\n}\n\nexport interface LogStore {\n\tloggers: Record<string, Logger>\n\tnonConsoleLoggers: Record<string, Logger>\n\treporters: LogReporter[]\n\tlogLevel: LogLevel\n\tlogLevelStore: ReturnType<typeof logLevelStore>\n}\n\nexport interface LogLevelStoreOptions {\n\tcustomLevels?: Record<string, number>\n}\n\nexport function logLevelStore(options: LogLevelStoreOptions) {\n\tconst customLevels = options.customLevels || record()\n\n\tconst store = {\n\t\tcustomLevels,\n\t\tcustomLevelsReverse: reduceByKey(\n\t\t\tcustomLevels,\n\t\t\t(p, k) => {\n\t\t\t\tp[customLevels[k]] = k\n\t\t\t\treturn p\n\t\t\t},\n\t\t\t{} as Record<number, string>\n\t\t)\n\t}\n\treturn {\n\t\tgetName(level: number) {\n\t\t\treturn store.customLevelsReverse[level] ?? toLogLevelName(level)\n\t\t},\n\t\tgetLevel(name: string) {\n\t\t\treturn store.customLevels[name] ?? toLogLevel(name)\n\t\t},\n\t\tgetAllLevels() {\n\t\t\treturn reduceKey(\n\t\t\t\tlogLevels,\n\t\t\t\t(result, name) => {\n\t\t\t\t\tif (name !== 'none' && name !== 'all') result.push({ name, level: logLevels[name] })\n\n\t\t\t\t\treturn result\n\t\t\t\t},\n\t\t\t\tmapKey(store.customLevels, name => ({ name, level: store.customLevels[name] }))\n\t\t\t)\n\t\t}\n\t}\n}\n","import { logLevels } from './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\tstore: LogStore,\n\tid: string,\n\toptions?: LoggerOptions\n): Logger<N | LogMethodNames> {\n\tid = sanitizeId(id)\n\tconst writeTo = options?.writeTo ?? (() => true)\n\tconst [filter, reporters]: [(reporterId: string) => boolean, LogReporter[]] =\n\t\ttypeof writeTo === 'string'\n\t\t\t? [id => id === writeTo, store.reporters]\n\t\t\t: writeTo instanceof RegExp\n\t\t\t? [id => writeTo.test(id), store.reporters]\n\t\t\t: typeof writeTo === 'function'\n\t\t\t? [writeTo, store.reporters]\n\t\t\t: [() => true, [writeTo]]\n\n\tfunction write(entry: LogEntry) {\n\t\twriteToReporters(reporters, entry, filter)\n\t}\n\n\tconst logger = {\n\t\tlevel: options?.level,\n\t\twrite\n\t} as any\n\n\tObject.defineProperties(logger, {\n\t\tid: { value: id, writable: false },\n\t\tcount: {\n\t\t\twritable: false,\n\t\t\tvalue: (\n\t\t\t\tcounter =>\n\t\t\t\t(...args: any[]) => {\n\t\t\t\t\tif (shouldLog(store, logLevels.debug, logger.level))\n\t\t\t\t\t\twrite({\n\t\t\t\t\t\t\tid,\n\t\t\t\t\t\t\tlevel: logLevels.debug,\n\t\t\t\t\t\t\targs: [++counter, ...args],\n\t\t\t\t\t\t\ttimestamp: new Date()\n\t\t\t\t\t\t})\n\t\t\t\t}\n\t\t\t)(0)\n\t\t},\n\t\ton: {\n\t\t\twritable: false,\n\t\t\tvalue: (level: number | N | LogMethodNames, logFn: LogFunction) => {\n\t\t\t\tconst logLevel = typeof level === 'string' ? store.logLevelStore.getLevel(level)! : level\n\t\t\t\tif (shouldLog(store, logLevel, logger.level)) {\n\t\t\t\t\tconst methodName = store.logLevelStore.getName(logLevel)\n\t\t\t\t\tconst bindedMethod = logger[methodName].bind(logger)\n\t\t\t\t\tconst result = logFn(bindedMethod, logger.level ?? store.logLevel)\n\t\t\t\t\tif (result) bindedMethod(result)\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t})\n\tstore.logLevelStore.getAllLevels().forEach(function addMethod({ name, level }) {\n\t\tObject.defineProperty(logger, name, {\n\t\t\twritable: false,\n\t\t\tvalue: (...args: any[]) => {\n\t\t\t\tif (shouldLog(store, level, logger.level)) write({ id, level, args, timestamp: new Date() })\n\t\t\t}\n\t\t})\n\t})\n\treturn logger\n}\n\nfunction sanitizeId(id: string) {\n\treturn id.replace(/[`~!#$%^&*()=+[\\]{},|<>?]/g, '-')\n}\n\nfunction writeToReporters(\n\treporters: LogReporter[],\n\tlogEntry: LogEntry,\n\tfilter: (reporterId: string) => boolean\n) {\n\treporters.filter(r => filter(r.id)).forEach(r => r.write(logEntry!))\n}\n\n/**\n * Determines should you log.\n * @param loggerLevel Log level of the logger.\n * It can be undefined which the global log level will be used.\n */\nfunction shouldLog(store: LogStore, targetLevel: LogLevel, loggerLevel: LogLevel | undefined) {\n\treturn targetLevel <= (loggerLevel !== undefined ? loggerLevel : store.logLevel)\n}\n","import { required, unpartial } from 'type-plus'\nimport { toInspectLogEntry } from './platform.js'\nimport { formatLogLevel } from './formatter.js'\nimport type { LogEntry, LogFormatter, LogReporter, LogReporterOptions } from './types.js'\nimport { createConsoleLogReporter } from './console.js'\n\nexport type MemoryLogReporter = LogReporter<LogEntry> & {\n\tlogs: LogEntry[]\n\t/**\n\t * Gets a simple log message for testing.\n\t * The message only contains arguments for each log entry.\n\t */\n\tgetLogMessage(): string\n\tgetLogMessages(): string[]\n\tgetLogMessageWithLevel(): string\n\tgetLogMessagesWithIdAndLevel(): string[]\n\temit(): void\n}\n\nexport type MemoryLogFormatter = LogFormatter<LogEntry>\n\nexport function toMessageWithLevel(logs: LogEntry[]) {\n\treturn (\n\t\tlogs\n\t\t\t.map(toInspectLogEntry)\n\t\t\t.map(log => `${formatLogLevel(log.level)} ${log.args.join(' ')}`)\n\t\t\t.join('\\n')\n\t\t\t// if it has more than this log,\n\t\t\t// we assume it is running under tests,\n\t\t\t// and remove this log to simplify testing.\n\t\t\t.replace(/^\\(WARN\\) already configured for test, ignoring config\\(\\) call\\n/, '')\n\t)\n}\n\nexport function createMemoryLogReporter(options?: LogReporterOptions<LogEntry>): MemoryLogReporter {\n\treturn Object.freeze(buildMemoryReporter(unpartial({ id: 'memory' }, options)))\n}\n\nfunction buildMemoryReporter(options?: LogReporterOptions<LogEntry>) {\n\tconst { id, formatter, filter } = required({ id: 'memory', formatter: (e: LogEntry) => e }, options)\n\tconst logs: LogEntry[] = []\n\treturn {\n\t\tid,\n\t\tget formatter() {\n\t\t\treturn formatter\n\t\t},\n\t\tget filter() {\n\t\t\treturn filter\n\t\t},\n\t\tlogs,\n\t\twrite(entry: LogEntry) {\n\t\t\tif (filter && !filter(entry)) return\n\t\t\tlogs.push(formatter(entry))\n\t\t},\n\t\tgetLogMessage() {\n\t\t\treturn this.getLogMessages().join('\\n')\n\t\t},\n\t\tgetLogMessages() {\n\t\t\treturn logs.map(toInspectLogEntry).map(log => log.args.join(' '))\n\t\t},\n\t\tgetLogMessagesWithIdAndLevel() {\n\t\t\treturn logs\n\t\t\t\t.map(toInspectLogEntry)\n\t\t\t\t.map(log => `${log.id} ${formatLogLevel(log.level)} ${log.args.join(' ')}`)\n\t\t},\n\t\tgetLogMessageWithLevel() {\n\t\t\treturn toMessageWithLevel(logs)\n\t\t},\n\t\t/**\n\t\t * emit the saved log to console for easy debugging\n\t\t */\n\t\temit() {\n\t\t\tconst reporter = createConsoleLogReporter()\n\t\t\tlogs.forEach(l => reporter.write(l))\n\t\t}\n\t}\n}\n\nexport function createMemoryWithConsoleLogReporter(\n\toptions?: LogReporterOptions<LogEntry>\n): MemoryLogReporter {\n\treturn Object.freeze(\n\t\tObject.assign(buildMemoryReporter(unpartial({ id: 'memory-with-console' }, options)), {\n\t\t\tisConsoleReporter: true\n\t\t})\n\t)\n}\n","import { record } from 'type-plus'\nimport type { ConsoleLike, LogEntry } from './types.js'\n\nexport const toInspectLogEntry = (e: LogEntry) => e\n\nexport const polyfill: { console?: ConsoleLike } = record()\n","import { record } from 'type-plus'\nimport type { LogStore } from './logStore.js'\nimport type { LogMethodNames, StandardLogInstance } from './types.js'\n\nexport const ctx: {\n\tconfigured?: boolean\n\tgsl?: { store: LogStore; standardLog: StandardLogInstance<LogMethodNames> }\n} = record()\n","import { record, required } from 'type-plus'\nimport { createLogger } from './logger.js'\nimport { DEFAULT_LOG_METHOD_NAMES, logLevels } from './logLevels.js'\nimport { createLogStore, LogStore } from './logStore.js'\nimport { createMemoryLogReporter, MemoryLogReporter } from './memory.js'\nimport { ctx } from './standardLog.ctx.js'\nimport type {\n\tLogger,\n\tLoggerOptions,\n\tLogLevel,\n\tLogMethodNames,\n\tStandardLogInstance,\n\tStandardLogOptions\n} from './types.js'\n\nexport interface StandardLog<N extends string = LogMethodNames> extends Readonly<StandardLogInstance<N>> {}\n\nexport function createStandardLog<N extends string = LogMethodNames>(\n\toptions?: StandardLogOptions<N>\n): StandardLog<N> {\n\tconst closure = createStandardLogClosure(options)\n\tif (options?.reporters?.some(r => !r.id)) {\n\t\tconst log = closure.standardLog.getLogger('standard-log')\n\t\tlog.critical(\n\t\t\t`Detected reporter with empty id. This is not allowed as it will create problems with feature like 'getNonConsoleLogger()'. Please add an id to your reporter.`\n\t\t)\n\t}\n\n\tif (!ctx.gsl) ctx.gsl = closure as any\n\treturn closure.standardLog\n}\n\nfunction noop() {}\n\nexport function createStandardLogClosure<N extends string = LogMethodNames>(\n\toptions?: StandardLogOptions<N>\n): { store: LogStore; standardLog: StandardLog<N> } {\n\t// TODO reporter.id must not be empty\n\tconst store = createLogStore(required({ logLevel: logLevels.info }, options))\n\tconst nonConsoleReporters = options?.reporters?.filter(r => !r.isConsoleReporter).map(r => r.id) ?? []\n\tconst logMethods = DEFAULT_LOG_METHOD_NAMES.concat(Object.keys(options?.customLevels ?? {})).concat([\n\t\t'on',\n\t\t'count',\n\t\t'write'\n\t])\n\treturn {\n\t\tstore,\n\t\tstandardLog: {\n\t\t\tget logLevel() {\n\t\t\t\treturn store.logLevel\n\t\t\t},\n\n\t\t\ttoLogLevelName(level: number) {\n\t\t\t\treturn store.logLevelStore.getName(level)\n\t\t\t},\n\t\t\ttoLogLevel(name: string) {\n\t\t\t\treturn store.logLevelStore.getLevel(name)\n\t\t\t},\n\t\t\tgetLogger(id: string, options?: LoggerOptions) {\n\t\t\t\tif (store.loggers[id]) return store.loggers[id] as any\n\t\t\t\treturn (store.loggers[id] = createLogger(store, id, { ssf: this.getLogger, ...options }) as any)\n\t\t\t},\n\t\t\tgetNonConsoleLogger(id, options?) {\n\t\t\t\tif (store.nonConsoleLoggers[id]) return store.nonConsoleLoggers[id] as any\n\n\t\t\t\tif (store.loggers[id]) {\n\t\t\t\t\tconst log = this.getLogger('standard-log')\n\t\t\t\t\tlog.warn(`attempt to create a non-console logger with existing id ('${id}'), ignoring`)\n\t\t\t\t\treturn (store.nonConsoleLoggers[id] = createDummyLogger(logMethods))\n\t\t\t\t}\n\n\t\t\t\treturn (store.nonConsoleLoggers[id] =\n\t\t\t\t\tnonConsoleReporters.length === 0\n\t\t\t\t\t\t? createDummyLogger(logMethods)\n\t\t\t\t\t\t: createLogger(store, id, {\n\t\t\t\t\t\t\t\tssf: this.getNonConsoleLogger,\n\t\t\t\t\t\t\t\t...options,\n\t\t\t\t\t\t\t\twriteTo(reporterId) {\n\t\t\t\t\t\t\t\t\treturn nonConsoleReporters.indexOf(reporterId) >= 0\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t }))\n\t\t\t}\n\t\t}\n\t}\n}\n\nfunction createDummyLogger(logMethods: string[]) {\n\treturn logMethods.reduce((p, m) => {\n\t\tp[m] = noop\n\t\treturn p\n\t}, record()) as Logger\n}\n\nexport type StandardLogForTest<N extends string = LogMethodNames> = StandardLog<N> & {\n\treporter: MemoryLogReporter\n}\n\nexport function createStandardLogForTest<N extends string = LogMethodNames>(\n\tlogLevel: LogLevel = logLevels.debug\n): StandardLogForTest<N> {\n\tconst reporter = createMemoryLogReporter()\n\tconst closure = createStandardLogClosure<N>({ reporters: [reporter], logLevel })\n\treturn { ...closure.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\tconst origLevels = logs.map(l => l.level)\n\tlogs.forEach(l => (l.level = logLevels.none))\n\tconst result = block()\n\tlogs.forEach((l, i) => (l.level = origLevels[i]))\n\treturn result\n}\n\nexport type GetLogger<N extends string = LogMethodNames> = (\n\tid: string,\n\toptions?: LoggerOptions\n) => Logger<LogMethodNames | N>\n\nexport function getLogger<N extends string = LogMethodNames>(id: string, options?: LoggerOptions) {\n\treturn getGlobalSL<N>().getLogger(id, options)\n}\n\nfunction getGlobalSL<N extends string = LogMethodNames>(): StandardLogInstance<N> {\n\tif (!ctx.gsl) ctx.gsl = createStandardLogClosure()\n\n\treturn ctx.gsl!.standardLog as StandardLogInstance<N>\n}\n\nexport function configGlobal(options: Omit<StandardLogOptions, 'customLevels'>) {\n\tif (ctx.configured) {\n\t\tconst log = ctx.gsl!.standardLog.getLogger('standard-log')\n\t\tlog.warn(\n\t\t\t'configGlobal() is being called more than once. Please make sure this is expected. Application should use `createStandardLog()` most of the time.'\n\t\t)\n\t}\n\n\tif (ctx.gsl) {\n\t\tif (options.logLevel) {\n\t\t\tctx.gsl.store.logLevel = options.logLevel\n\t\t}\n\t\tif (options.reporters) {\n\t\t\tconst reporters = ctx.gsl.store.reporters\n\t\t\treporters.length = 0\n\t\t\treporters.push(...options.reporters)\n\t\t}\n\t} else {\n\t\tctx.gsl = createStandardLogClosure(options)\n\t}\n\tctx.configured = true\n}\n","\"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","var __classPrivateFieldGet = (this && this.__classPrivateFieldGet) || function (receiver, state, kind, f) {\n if (kind === \"a\" && !f) throw new TypeError(\"Private accessor was defined without a getter\");\n if (typeof state === \"function\" ? receiver !== state || !f : !state.has(receiver)) throw new TypeError(\"Cannot read private member from an object whose class did not declare it\");\n return kind === \"m\" ? f : kind === \"a\" ? f.call(receiver) : f ? f.value : state.get(receiver);\n};\nvar _a, _IsoError_hasCause, _IsoError_toIsoError;\n//#region captureStackTrace polyfill\n// istanbul ignore next\nif (!Error.captureStackTrace) {\n Error.captureStackTrace = function (error) {\n const container = new Error();\n Object.defineProperty(error, 'stack', {\n configurable: true,\n get: function () {\n // Replace property with value for faster future accesses.\n defineStack(this, container.stack);\n return container.stack;\n },\n set: function (stack) {\n defineStack(error, stack);\n }\n });\n };\n}\n// istanbul ignore next\nfunction defineStack(target, value) {\n Object.defineProperty(target, 'stack', {\n configurable: true,\n value,\n writable: true\n });\n}\nexport class SerializableConverter {\n constructor() {\n Object.defineProperty(this, \"plugins\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: []\n });\n }\n addPlugin(plugin) {\n this.plugins.unshift(plugin);\n }\n /**\n * Deserialize an `Error` from `Serializable`\n */\n fromSerializable(json, options) {\n const err = this.deserializeError(json);\n Error.captureStackTrace(err, options?.ssf);\n return err;\n }\n fromSerializableImpl(json) {\n if (json.name === 'AggregateError') {\n const { message, errors, ...rest } = json;\n // @ts-ignore\n // istanbul ignore next\n if (global.AggregateError) {\n return Object.assign(new AggregateError(errors, message), rest);\n }\n else {\n return Object.assign(new Error(message), {\n ...rest,\n errors\n });\n }\n }\n const { message, cause, ...rest } = json;\n const causeError = cause ? this.deserializeError(cause) : undefined;\n if (json.name === 'Error') {\n return Object.assign(new Error(message), causeError ? { ...rest, cause: causeError } : rest);\n }\n // @ts-ignore\n return Object.assign(new IsoError(message, causeError ? { cause: causeError } : undefined), rest);\n }\n deserializeError(json) {\n let err = undefined;\n for (const { fromSerializable } of this.plugins) {\n err = fromSerializable(json);\n if (err)\n break;\n }\n return err || this.fromSerializableImpl(json);\n }\n /**\n * Serialize `Error` to `Serializable`\n */\n toSerializable(err) {\n return (this.plugins.reduce((p, s) => p || s.toSerializable(err), undefined) || this.toSerializableImpl(err));\n }\n toSerializableImpl(err) {\n if (isAggregateError(err)) {\n return {\n ...err,\n name: err.constructor.name,\n message: err.message,\n errors: err.errors.map(this.toSerializableImpl)\n };\n }\n if (err instanceof Error) {\n const { message, cause } = err;\n return cause\n ? { ...err, name: err.constructor.name, message, cause: this.toSerializableImpl(cause) }\n : { ...err, name: err.constructor.name, message };\n }\n return err;\n }\n}\nconst getCircularReplacer = () => {\n const seen = new WeakSet();\n return (_, value) => {\n if (typeof value === 'object' && value !== null) {\n if (seen.has(value)) {\n return;\n }\n seen.add(value);\n }\n return value;\n };\n};\n/**\n * Isomorphic Error that works across physical boundary.\n */\nclass IsoError extends Error {\n /**\n * Create an IsoError with additional properties without the need to create a new class.\n * @param props properties of the IsoError\n */\n static create(props) {\n const { message, cause, ...rest } = props;\n const err = new IsoError(message, { cause, ssf: IsoError.create });\n return Object.assign(err, rest);\n }\n static stringify(err) {\n return this.serialize(err);\n }\n static serialize(err) {\n return JSON.stringify(this.toSerializable(err), getCircularReplacer());\n }\n static toSerializable(err) {\n return this.converter.toSerializable(err);\n }\n /**\n * @type P Additional properties of the IsoError\n * @param text Json representation of a IsoError\n */\n static parse(text) {\n const json = JSON.parse(text);\n return this.converter.fromSerializable(json, { ssf: IsoError.parse });\n }\n /**\n * @type P Additional properties of the IsoError\n * @param text Json representation of a IsoError\n */\n static deserialize(text) {\n const json = JSON.parse(text);\n return this.converter.fromSerializable(json, { ssf: IsoError.deserialize });\n }\n static fromSerializable(json) {\n return this.converter.fromSerializable(json, { ssf: IsoError.fromSerializable });\n }\n /**\n * returns the error message including the error causes.\n */\n static trace(err) {\n const messages = [];\n if (err instanceof ModuleError) {\n messages.push(`${err.name}(${err.module}): ${err.message}`);\n }\n else if (err instanceof Error) {\n messages.push(`${err.name}: ${err.message}`);\n }\n if (isAggregateError(err)) {\n err.errors.forEach(e => messages.push(...this.trace(e)\n .split('\\n')\n .map(s => ' ' + s)));\n }\n if (err instanceof Error) {\n if (__classPrivateFieldGet(this, _a, \"m\", _IsoError_hasCause).call(this, err))\n messages.push(...this.trace(err.cause)\n .split('\\n')\n .map(s => ' ' + s));\n }\n else {\n messages.push(typeof err === 'string' ? err : JSON.stringify(err));\n }\n return messages.join('\\n');\n }\n static addPlugin(plugin) {\n this.converter.addPlugin(plugin);\n }\n constructor(message, options) {\n super(message);\n /**\n * Name of the error\n */\n Object.defineProperty(this, \"name\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n /**\n * Error cause\n */\n Object.defineProperty(this, \"cause\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: void 0\n });\n // restore prototype chain\n const actualProto = new.target.prototype;\n this.name = actualProto.constructor.name;\n // istanbul ignore next\n if (Object.setPrototypeOf)\n Object.setPrototypeOf(this, actualProto);\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n else\n this.__proto__ = actualProto;\n if (options?.cause)\n this.cause = __classPrivateFieldGet(IsoError, _a, \"m\", _IsoError_toIsoError).call(IsoError, options.cause);\n if (options?.ssf)\n Error.captureStackTrace(this, options.ssf);\n }\n toString() {\n return IsoError.serialize(this);\n }\n trace() {\n return IsoError.trace(this);\n }\n}\n_a = IsoError, _IsoError_hasCause = function _IsoError_hasCause(x) {\n return !!x.cause;\n}, _IsoError_toIsoError = function _IsoError_toIsoError(err) {\n // When the error is an internal error from deserialization,\n // the err.constructor.name is object.\n // I have to to Object.assign to keep the err instance and its stack trace.\n return Object.assign(err, { name: err.name ?? err.constructor.name });\n};\nObject.defineProperty(IsoError, \"converter\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: new SerializableConverter()\n});\nexport { IsoError };\n/**\n * An IsoError with a module property.\n */\nexport class ModuleError extends IsoError {\n /**\n * @param module The module that defines this error.\n */\n constructor(module, message, options) {\n super(message, options);\n Object.defineProperty(this, \"module\", {\n enumerable: true,\n configurable: true,\n writable: true,\n value: module\n });\n }\n}\nexport function isAggregateError(error) {\n return error instanceof Error && Array.isArray(error.errors);\n}\n//# sourceMappingURL=index.js.map","export function mapKey(subject, predicate, thisArg) {\n return Object.keys(subject).map(function (k, i, a) {\n return predicate.apply(this, [k, i, a, subject]);\n }, thisArg);\n}\n//# sourceMappingURL=mapKey.js.map","export function 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((p, k, i, a) => callbackfn(p, k, i, a, subject), initialValue);\n}\n/**\n * @deprecated renamed to reduceByKey\n */\nexport const reduceKey = reduceByKey;\n//# sourceMappingURL=reduceKey.js.map","export function 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}\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}\nexport function unpartialRecursively(arg1, arg2, arg3) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-argument\n return requiredDeep(arg1, arg2, arg3);\n}\n//# sourceMappingURL=index.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__.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\tconfigGlobal,\n\tcreateStandardLog,\n\tcreateStandardLogForTest,\n\tgetLogger,\n\tsuppressLogs\n} from './standardLog.js'\nexport type { GetLogger, StandardLog, StandardLogForTest } from './standardLog.js'\nexport type {\n\tConsoleLike,\n\tLogEntry,\n\tLogFilter,\n\tLogFormatter,\n\tLogFunction,\n\tLogger,\n\tLoggerOptions,\n\tLogLevel,\n\tLogLevelEntry,\n\tLogMethod,\n\tLogMethodNames,\n\tLogReporter,\n\tLogReporterOptions,\n\tReporterFilter,\n\tStandardLogInstance,\n\tStandardLogOptions\n} from './types.js'\n"],"names":[],"sourceRoot":""}
Binary file
package/esm/console.d.ts CHANGED
@@ -1,9 +1,9 @@
1
1
  import type { ConsoleLike, LogFormatter, LogReporter, LogReporterOptions } from './types.js';
2
2
  export declare function toConsoleMethod(level: number): "error" | "warn" | "info" | "debug";
3
- export declare type ConsoleLogFormatter = LogFormatter<any[]>;
4
- export declare type ConsoleLogReporter = LogReporter<any[]> & {
3
+ export type ConsoleLogFormatter = LogFormatter<any[]>;
4
+ export type ConsoleLogReporter = LogReporter<any[]> & {
5
5
  console: ConsoleLike;
6
6
  };
7
- export declare type ConsoleLogReporterOptions = LogReporterOptions<any[]>;
7
+ export type ConsoleLogReporterOptions = LogReporterOptions<any[]>;
8
8
  export declare function createConsoleLogReporter(options?: ConsoleLogReporterOptions): ConsoleLogReporter;
9
9
  //# sourceMappingURL=console.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../ts/console.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAY,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAEtG,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,uCAS5C;AAiCD,oBAAY,mBAAmB,GAAG,YAAY,CAAC,GAAG,EAAE,CAAC,CAAA;AACrD,oBAAY,kBAAkB,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,GAAG;IAAE,OAAO,EAAE,WAAW,CAAA;CAAE,CAAA;AAC9E,oBAAY,yBAAyB,GAAG,kBAAkB,CAAC,GAAG,EAAE,CAAC,CAAA;AAEjE,wBAAgB,wBAAwB,CAAC,OAAO,CAAC,EAAE,yBAAyB,GAAG,kBAAkB,CAiBhG"}
1
+ {"version":3,"file":"console.d.ts","sourceRoot":"","sources":["../ts/console.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,WAAW,EAAY,YAAY,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAEtG,wBAAgB,eAAe,CAAC,KAAK,EAAE,MAAM,uCAc5C;AAiCD,MAAM,MAAM,mBAAmB,GAAG,YAAY,CAAC,GAAG,EAAE,CAAC,CAAA;AACrD,MAAM,MAAM,kBAAkB,GAAG,WAAW,CAAC,GAAG,EAAE,CAAC,GAAG;IAAE,OAAO,EAAE,WAAW,CAAA;CAAE,CAAA;AAC9E,MAAM,MAAM,yBAAyB,GAAG,kBAAkB,CAAC,GAAG,EAAE,CAAC,CAAA;AAEjE,wBAAgB,wBAAwB,CAAC,OAAO,CAAC,EAAE,yBAAyB,GAAG,kBAAkB,CAqBhG"}
package/esm/console.js CHANGED
@@ -5,11 +5,16 @@ import { polyfill } from './platform.js';
5
5
  export function toConsoleMethod(level) {
6
6
  switch (true) {
7
7
  // edge case in case none is somehow written
8
- case (level <= 0): return 'debug';
9
- case (level <= logLevels.error): return 'error';
10
- case (level <= logLevels.warn): return 'warn';
11
- case (level <= logLevels.info): return 'info';
12
- default: return 'debug';
8
+ case level <= 0:
9
+ return 'debug';
10
+ case level <= logLevels.error:
11
+ return 'error';
12
+ case level <= logLevels.warn:
13
+ return 'warn';
14
+ case level <= logLevels.info:
15
+ return 'info';
16
+ default:
17
+ return 'debug';
13
18
  }
14
19
  }
15
20
  // istanbul ignore next
@@ -32,13 +37,15 @@ function buildPolyfillConsole() {
32
37
  debug: buildFn(typeof console.debug === 'function' ? 'debug' : 'log'),
33
38
  info: buildFn(typeof console.info === 'function' ? 'info' : 'log'),
34
39
  warn: buildFn(typeof console.warn === 'function' ? 'warn' : 'log'),
35
- error: buildFn(typeof console.error === 'function' ? 'error' : 'log'),
40
+ error: buildFn(typeof console.error === 'function' ? 'error' : 'log')
36
41
  };
37
42
  }
38
43
  }
39
44
  // istanbul ignore next
40
45
  function buildFn(name) {
41
- return function (...args) { console[name](...args); };
46
+ return function (...args) {
47
+ console[name](...args);
48
+ };
42
49
  }
43
50
  export function createConsoleLogReporter(options) {
44
51
  const { id, formatter, filter } = unpartial({ id: 'console', formatter: consoleFormatter }, options);
@@ -47,8 +54,12 @@ export function createConsoleLogReporter(options) {
47
54
  return Object.freeze({
48
55
  id,
49
56
  isConsoleReporter: true,
50
- get formatter() { return formatter; },
51
- get filter() { return filter; },
57
+ get formatter() {
58
+ return formatter;
59
+ },
60
+ get filter() {
61
+ return filter;
62
+ },
52
63
  console: polyfill.console,
53
64
  write(entry) {
54
65
  if (filter && !filter(entry))
@@ -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,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,OAAO,GAAG,CAAC,CAAC,OAAO,CAAC,GAAG,CAAC,IAAe,CAAA;IAC7C,IAAI,OAAO,EAAE;QACX,OAAO;YACL,6DAA6D;YAC7D,uEAAuE;YACvE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S,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"]}
1
+ {"version":3,"file":"console.js","sourceRoot":"","sources":["../ts/console.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AACrC,OAAO,EA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I,SAAS;YACZ,OAAO,SAAS,CAAA;QACjB,CAAC;QACD,IAAI,MAAM;YACT,OAAO,MAAM,CAAA;QACd,CAAC;QACD,OAAO,EAAE,QAAQ,CAAC,OAAO;QACzB,KAAK,CAAC,KAAe;YACpB,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;QAChC,CAAC;KACD,CAAC,CAAA;AACH,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\tswitch (true) {\n\t\t// edge case in case none is somehow written\n\t\tcase level <= 0:\n\t\t\treturn 'debug'\n\t\tcase level <= logLevels.error:\n\t\t\treturn 'error'\n\t\tcase level <= logLevels.warn:\n\t\t\treturn 'warn'\n\t\tcase level <= logLevels.info:\n\t\t\treturn 'info'\n\t\tdefault:\n\t\t\treturn 'debug'\n\t}\n}\n\n// istanbul ignore next\n/* eslint-disable no-console */\nfunction buildPolyfillConsole() {\n\t// old phantomjs does not have bind function\n\tconst hasBind = !!console.log.bind as boolean\n\tif (hasBind) {\n\t\treturn {\n\t\t\t// the `typeof` guards against IE where `console.log.apply()`\n\t\t\t// results in error `Object doesn't support property or method 'apply'`\n\t\t\tdebug: (typeof console.info === 'function' ? console.debug : console.log).bind(console),\n\t\t\tinfo: (typeof console.info === 'function' ? console.info : console.log).bind(console),\n\t\t\twarn: (typeof console.warn === 'function' ? console.warn : console.log).bind(console),\n\t\t\terror: (typeof console.error === 'function' ? console.error : console.log).bind(console)\n\t\t}\n\t} else {\n\t\treturn {\n\t\t\tdebug: buildFn(typeof console.debug === 'function' ? 'debug' : 'log'),\n\t\t\tinfo: buildFn(typeof console.info === 'function' ? 'info' : 'log'),\n\t\t\twarn: buildFn(typeof console.warn === 'function' ? 'warn' : 'log'),\n\t\t\terror: buildFn(typeof console.error === 'function' ? 'error' : 'log')\n\t\t}\n\t}\n}\n\n// istanbul ignore next\nfunction buildFn(name: 'debug' | 'info' | 'warn' | 'error' | 'log') {\n\treturn function (...args: any[]) {\n\t\tconsole[name](...args)\n\t}\n}\n\nexport type ConsoleLogFormatter = LogFormatter<any[]>\nexport type ConsoleLogReporter = LogReporter<any[]> & { console: ConsoleLike }\nexport type ConsoleLogReporterOptions = LogReporterOptions<any[]>\n\nexport function createConsoleLogReporter(options?: ConsoleLogReporterOptions): ConsoleLogReporter {\n\tconst { id, formatter, filter } = unpartial({ id: 'console', formatter: consoleFormatter }, options)\n\tif (!polyfill.console) polyfill.console = buildPolyfillConsole()\n\n\treturn Object.freeze({\n\t\tid,\n\t\tisConsoleReporter: true,\n\t\tget formatter() {\n\t\t\treturn formatter\n\t\t},\n\t\tget filter() {\n\t\t\treturn filter\n\t\t},\n\t\tconsole: polyfill.console,\n\t\twrite(entry: LogEntry) {\n\t\t\tif (filter && !filter(entry)) return\n\t\t\tconst values = formatter(entry)\n\t\t\tconst method = toConsoleMethod(entry.level)\n\t\t\tthis.console[method](...values)\n\t\t}\n\t})\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../ts/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEjD;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;gBACnC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO;CAG5D;AAED;;GAEG;AACH,qBAAa,SAAU,SAAQ,gBAAgB;IAC1B,EAAE,EAAE,MAAM;gBAAV,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO;CAG1D"}
1
+ {"version":3,"file":"errors.d.ts","sourceRoot":"","sources":["../ts/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAA;AAEjD;;GAEG;AACH,qBAAa,gBAAiB,SAAQ,WAAW;gBACpC,WAAW,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO;CAG3D;AAED;;GAEG;AACH,qBAAa,SAAU,SAAQ,gBAAgB;IAC3B,EAAE,EAAE,MAAM;gBAAV,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,QAAQ,CAAC,OAAO;CAGzD"}
package/esm/errors.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"errors.js","sourceRoot":"","sources":["../ts/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,WAAW,EAAE,MAAM,WAAW,CAAA;AAEjD;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAC/C,YAAY,WAAmB,EAAE,OAA0B;QACzD,KAAK,CAAC,cAAc,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA;IAC7C,CAAC;CACF;AAED;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,gBAAgB;IAC7C,YAAmB,EAAU,EAAE,OAA0B;QACvD,KAAK,CAAC,kFAAkF,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;;;;;mBADrF;;IAEnB,CAAC;CACF","sourcesContent":["import { IsoError, ModuleError } from 'iso-error'\n\n/**\n * @deprecated No longer used since 11.2.0\n */\nexport class StandardLogError extends ModuleError {\n constructor(description: string, options?: IsoError.Options) {\n super('standard-log', description, options)\n }\n}\n\n/**\n * @deprecated no longer used since 11.2.0\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"]}
1
+ {"version":3,"file":"errors.js","sourceRoot":"","sources":["../ts/errors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAY,WAAW,EAAE,MAAM,WAAW,CAAA;AAEjD;;GAEG;AACH,MAAM,OAAO,gBAAiB,SAAQ,WAAW;IAChD,YAAY,WAAmB,EAAE,OAA0B;QAC1D,KAAK,CAAC,cAAc,EAAE,WAAW,EAAE,OAAO,CAAC,CAAA;IAC5C,CAAC;CACD;AAED;;GAEG;AACH,MAAM,OAAO,SAAU,SAAQ,gBAAgB;IAC9C,YAAmB,EAAU,EAAE,OAA0B;QACxD,KAAK,CAAC,kFAAkF,EAAE,EAAE,EAAE,OAAO,CAAC,CAAA;QAD3F;;;;mBAAO,EAAE;WAAQ;IAE7B,CAAC;CACD","sourcesContent":["import { IsoError, ModuleError } from 'iso-error'\n\n/**\n * @deprecated No longer used since 11.2.0\n */\nexport class StandardLogError extends ModuleError {\n\tconstructor(description: string, options?: IsoError.Options) {\n\t\tsuper('standard-log', description, options)\n\t}\n}\n\n/**\n * @deprecated no longer used since 11.2.0\n */\nexport class InvalidId extends StandardLogError {\n\tconstructor(public id: string, options?: IsoError.Options) {\n\t\tsuper(`logger id only supports alphanumeric, unicode characters, and [:_-.]. Received ${id}`, options)\n\t}\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { LogEntry } from './types.js';
2
- export declare type TimestampFormat = 'none' | 'iso' | 'elapsed';
2
+ export type TimestampFormat = 'none' | 'iso' | 'elapsed';
3
3
  export declare function createTimestampFormatter(format: TimestampFormat): (timestamp: Date) => string | undefined;
4
4
  export declare function formatLogLevel(level: number): string;
5
5
  /**
@@ -1 +1 @@
1
- {"version":3,"file":"formatter.d.ts","sourceRoot":"","sources":["../ts/formatter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAE1C,oBAAY,eAAe,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,CAAA;AAExD,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,eAAe,GAAG,CAAC,SAAS,EAAE,IAAI,KAAK,MAAM,GAAG,SAAS,CAgBzG;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,UAE3C;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,QAAQ,SAEzE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,EAAE,QAAQ,SAElD"}
1
+ {"version":3,"file":"formatter.d.ts","sourceRoot":"","sources":["../ts/formatter.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,YAAY,CAAA;AAE1C,MAAM,MAAM,eAAe,GAAG,MAAM,GAAG,KAAK,GAAG,SAAS,CAAA;AAExD,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,eAAe,GAAG,CAAC,SAAS,EAAE,IAAI,KAAK,MAAM,GAAG,SAAS,CAgBzG;AAED,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,UAE3C;AAED;;;;;GAKG;AACH,wBAAgB,iBAAiB,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAE,EAAE,QAAQ,SAEzE;AAED;;GAEG;AACH,wBAAgB,gBAAgB,CAAC,EAAE,IAAI,EAAE,EAAE,QAAQ,SAElD"}
@@ -1 +1 @@
1
- {"version":3,"file":"formatter.js","sourceRoot":"","sources":["../ts/formatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAK/C,MAAM,UAAU,wBAAwB,CAAC,MAAuB;IAC9D,QAAQ,MAAM,EAAE;QACd,KAAK,MAAM;YACT,OAAO,CAAC,UAAgB,EAAE,EAAE,CAAC,SAAS,CAAA;QACxC,KAAK,KAAK;YACR,OAAO,CAAC,SAAe,EAAE,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE,CAAA;QACrD,KAAK,SAAS,CAAC,CAAC;YACd,IAAI,QAAgB,CAAA;YACpB,OAAO,CAAC,SAAe,EAAE,EAAE;gBACzB,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,EAAE,CAAA;gBACnC,MAAM,MAAM,GAAG,EAAE,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,QAAQ,CAAC,CAAA;gBAClE,QAAQ,GAAG,OAAO,CAAA;gBAClB,OAAO,MAAM,CAAA;YACf,CAAC,CAAA;SACF;KACF;AACH,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,KAAa;IAC1C,OAAO,IAAI,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,GAAG,CAAA;AAChD,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAY;IACxE,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,CAAA;AACtE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAAE,IAAI,EAAY;IACjD,OAAO,IAAI,CAAA;AACb,CAAC","sourcesContent":["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"]}
1
+ {"version":3,"file":"formatter.js","sourceRoot":"","sources":["../ts/formatter.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,IAAI,CAAA;AACnB,OAAO,EAAE,SAAS,EAAE,MAAM,YAAY,CAAA;AACtC,OAAO,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAK/C,MAAM,UAAU,wBAAwB,CAAC,MAAuB;IAC/D,QAAQ,MAAM,EAAE;QACf,KAAK,MAAM;YACV,OAAO,CAAC,UAAgB,EAAE,EAAE,CAAC,SAAS,CAAA;QACvC,KAAK,KAAK;YACT,OAAO,CAAC,SAAe,EAAE,EAAE,CAAC,SAAS,CAAC,WAAW,EAAE,CAAA;QACpD,KAAK,SAAS,CAAC,CAAC;YACf,IAAI,QAAgB,CAAA;YACpB,OAAO,CAAC,SAAe,EAAE,EAAE;gBAC1B,MAAM,OAAO,GAAG,SAAS,CAAC,OAAO,EAAE,CAAA;gBACnC,MAAM,MAAM,GAAG,EAAE,CAAC,QAAQ,KAAK,SAAS,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,CAAC,OAAO,GAAG,QAAQ,CAAC,CAAA;gBAClE,QAAQ,GAAG,OAAO,CAAA;gBAClB,OAAO,MAAM,CAAA;YACd,CAAC,CAAA;SACD;KACD;AACF,CAAC;AAED,MAAM,UAAU,cAAc,CAAC,KAAa;IAC3C,OAAO,IAAI,SAAS,CAAC,cAAc,CAAC,KAAK,CAAC,CAAC,GAAG,CAAA;AAC/C,CAAC;AAED;;;;;GAKG;AACH,MAAM,UAAU,iBAAiB,CAAC,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,EAAY;IACzE,OAAO,CAAC,SAAS,CAAC,WAAW,EAAE,EAAE,EAAE,EAAE,cAAc,CAAC,KAAK,CAAC,EAAE,GAAG,IAAI,CAAC,CAAA;AACrE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,gBAAgB,CAAC,EAAE,IAAI,EAAY;IAClD,OAAO,IAAI,CAAA;AACZ,CAAC","sourcesContent":["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\tswitch (format) {\n\t\tcase 'none':\n\t\t\treturn (_timestamp: Date) => undefined\n\t\tcase 'iso':\n\t\t\treturn (timestamp: Date) => timestamp.toISOString()\n\t\tcase 'elapsed': {\n\t\t\tlet lastTick: number\n\t\t\treturn (timestamp: Date) => {\n\t\t\t\tconst newTick = timestamp.getTime()\n\t\t\t\tconst result = ms(lastTick === undefined ? 0 : newTick - lastTick)\n\t\t\t\tlastTick = newTick\n\t\t\t\treturn result\n\t\t\t}\n\t\t}\n\t}\n}\n\nexport function formatLogLevel(level: number) {\n\treturn `(${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\treturn [timestamp.toISOString(), id, formatLogLevel(level), ...args]\n}\n\n/**\n * Formats log entry like default console log.\n */\nexport function consoleFormatter({ args }: LogEntry) {\n\treturn args\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,OAAO,EACL,YAAY,EAAE,iBAAiB,EAAE,wBAAwB,EACzD,SAAS,EAAE,YAAY,EACxB,MAAM,kBAAkB,CAAA;AACzB,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAClF,YAAY,EACV,WAAW,EAAE,QAAQ,EAAE,SAAS,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,EAAE,aAAa,EAAE,QAAQ,EAC5F,aAAa,EAAE,SAAS,EAAE,cAAc,EAAE,WAAW,EAAE,kBAAkB,EAAE,cAAc,EACzF,mBAAmB,EAAE,kBAAkB,EACxC,MAAM,YAAY,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,OAAO,EACN,YAAY,EACZ,iBAAiB,EACjB,wBAAwB,EACxB,SAAS,EACT,YAAY,EACZ,MAAM,kBAAkB,CAAA;AACzB,YAAY,EAAE,SAAS,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,kBAAkB,CAAA;AAClF,YAAY,EACX,WAAW,EACX,QAAQ,EACR,SAAS,EACT,YAAY,EACZ,WAAW,EACX,MAAM,EACN,aAAa,EACb,QAAQ,EACR,aAAa,EACb,SAAS,EACT,cAAc,EACd,WAAW,EACX,kBAAkB,EAClB,cAAc,EACd,mBAAmB,EACnB,kBAAkB,EAClB,MAAM,YAAY,CAAA"}
package/esm/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,OAAO,EACL,YAAY,EAAE,iBAAiB,EAAE,wBAAwB,EACzD,SAAS,EAAE,YAAY,EACxB,MAAM,kBAAkB,CAAA","sourcesContent":["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 { GetLogger, StandardLog, StandardLogForTest } from './standardLog.js'\nexport type {\n ConsoleLike, LogEntry, LogFilter, LogFormatter, LogFunction, Logger, LoggerOptions, LogLevel,\n LogLevelEntry, LogMethod, LogMethodNames, LogReporter, LogReporterOptions, ReporterFilter,\n StandardLogInstance, StandardLogOptions\n} from './types.js'\n\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../ts/index.ts"],"names":[],"mappings":"AAAA,cAAc,cAAc,CAAA;AAC5B,cAAc,aAAa,CAAA;AAC3B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,gBAAgB,CAAA;AAC9B,cAAc,aAAa,CAAA;AAC3B,OAAO,EACN,YAAY,EACZ,iBAAiB,EACjB,wBAAwB,EACxB,SAAS,EACT,YAAY,EACZ,MAAM,kBAAkB,CAAA","sourcesContent":["export * from './console.js'\nexport * from './errors.js'\nexport * from './formatter.js'\nexport * from './logLevels.js'\nexport * from './memory.js'\nexport {\n\tconfigGlobal,\n\tcreateStandardLog,\n\tcreateStandardLogForTest,\n\tgetLogger,\n\tsuppressLogs\n} from './standardLog.js'\nexport type { GetLogger, StandardLog, StandardLogForTest } from './standardLog.js'\nexport type {\n\tConsoleLike,\n\tLogEntry,\n\tLogFilter,\n\tLogFormatter,\n\tLogFunction,\n\tLogger,\n\tLoggerOptions,\n\tLogLevel,\n\tLogLevelEntry,\n\tLogMethod,\n\tLogMethodNames,\n\tLogReporter,\n\tLogReporterOptions,\n\tReporterFilter,\n\tStandardLogInstance,\n\tStandardLogOptions\n} from './types.js'\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"logLevels.d.ts","sourceRoot":"","sources":["../ts/logLevels.ts"],"names":[],"mappings":"AACA,eAAO,MAAM,SAAS;IACpB;;OAEG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;;OAKG;;IAEH;;OAEG;;CAEJ,CAAA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,4GAW3C;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE3D;AAED,eAAO,MAAM,wBAAwB,EAAE,MAAM,EAW5C,CAAA"}
1
+ {"version":3,"file":"logLevels.d.ts","sourceRoot":"","sources":["../ts/logLevels.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,SAAS;IACrB;;OAEG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;OAIG;;IAEH;;;;;OAKG;;IAEH;;OAEG;;CAEH,CAAA;AAED;;GAEG;AACH,wBAAgB,cAAc,CAAC,KAAK,EAAE,MAAM,4GAW3C;AAED;;GAEG;AACH,wBAAgB,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,GAAG,SAAS,CAE3D;AAED,eAAO,MAAM,wBAAwB,EAAE,MAAM,EAW5C,CAAA"}
@@ -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AC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAA;AACrD,CAAC;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAa;IAChD,WAAW;IACX,OAAO;IACP,UAAU;IACV,OAAO;IACP,MAAM;IACN,QAAQ;IACR,MAAM;IACN,OAAO;IACP,OAAO;IACP,QAAQ;CACT,CAAA","sourcesContent":["\nexport const logLevels = {\n /**\n * none: 0\n */\n none: 0 as const,\n /**\n * emergency: 100\n *\n * emergency -> alert\n */\n emergency: 100 as const,\n /**\n * alert: 200\n *\n * emergency -> alert -> critical\n */\n alert: 200 as const,\n /**\n * critical: 300\n *\n * alert -> critical -> error\n */\n critical: 300 as const,\n /**\n * error: 400\n *\n * critical -> error -> warn\n */\n error: 400 as const,\n /**\n * warn: 500\n *\n * error -> warn -> notice\n */\n warn: 500 as const,\n /**\n * notice: 600\n *\n * warn -> notice -> info\n */\n notice: 600 as const,\n /**\n * info: 700\n *\n * notice -> info -> debug\n */\n info: 700 as const,\n /**\n * debug: 800\n *\n * info -> debug -> trace\n */\n debug: 800 as const,\n /**\n * trace: 900\n *\n * debug -> trace -> planck\n */\n trace: 900 as const,\n /**\n * planck: Infinity\n * `planck unit` is a very small unit <https://en.wikipedia.org/wiki/Planck_units>.\n *\n * trace -> planck\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): number | undefined {\n return (logLevels as any)[name.toLocaleLowerCase()]\n}\n\nexport const DEFAULT_LOG_METHOD_NAMES: string[] = [\n 'emergency',\n 'alert',\n 'critical',\n 'error',\n 'warn',\n 'notice',\n 'info',\n 'debug',\n 'trace',\n 'planck'\n]\n"]}
1
+ {"version":3,"file":"logLevels.js","sourceRoot":"","sources":["../ts/logLevels.ts"],"names":[],"mappings":"AAAA,MAAM,CAAC,MAAM,SAAS,GAAG;IACxB;;OAEG;IACH,IAAI,EAAE,CAAU;IAChB;;;;OAIG;IACH,SAAS,EAAE,GAAY;IACvB;;;;OAIG;IACH,KAAK,EAAE,GAAY;IACnB;;;;OAIG;IACH,QAAQ,EAAE,GAAY;IACtB;;;;OAIG;IACH,KAAK,EAAE,GAAY;IACnB;;;;OAIG;IACH,IAAI,EAAE,GAAY;IAClB;;;;OAIG;IACH,MAAM,EAAE,GAAY;IACpB;;;;OAIG;IACH,IAAI,EAAE,GAAY;IAClB;;;;OAIG;IACH,KAAK,EAAE,GAAY;IACnB;;;;OAIG;IACH,KAAK,EAAE,GAAY;IACnB;;;;;OAKG;IACH,MAAM,EAAE,QAAQ;IAChB;;OAEG;IACH,GAAG,EAAE,QAAQ;CACb,CAAA;AAED;;GAEG;AACH,MAAM,UAAU,cAAc,CAAC,KAAa;IAC3C,IAAI,KAAK,IAAI,GAAG;QAAE,OAAO,WAAW,CAAA;IACpC,IAAI,KAAK,IAAI,GAAG;QAAE,OAAO,OAAO,CAAA;IAChC,IAAI,KAAK,IAAI,GAAG;QAAE,OAAO,UAAU,CAAA;IACnC,IAAI,KAAK,IAAI,GAAG;QAAE,OAAO,OAAO,CAAA;IAChC,IAAI,KAAK,IAAI,GAAG;QAAE,OAAO,MAAM,CAAA;IAC/B,IAAI,KAAK,IAAI,GAAG;QAAE,OAAO,QAAQ,CAAA;IACjC,IAAI,KAAK,IAAI,GAAG;QAAE,OAAO,MAAM,CAAA;IAC/B,IAAI,KAAK,IAAI,GAAG;QAAE,OAAO,OAAO,CAAA;IAChC,IAAI,KAAK,IAAI,GAAG;QAAE,OAAO,OAAO,CAAA;IAChC,OAAO,QAAQ,CAAA;AAChB,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,UAAU,CAAC,IAAY;IACtC,OAAQ,SAAiB,CAAC,IAAI,CAAC,iBAAiB,EAAE,CAAC,CAAA;AACpD,CAAC;AAED,MAAM,CAAC,MAAM,wBAAwB,GAAa;IACjD,WAAW;IACX,OAAO;IACP,UAAU;IACV,OAAO;IACP,MAAM;IACN,QAAQ;IACR,MAAM;IACN,OAAO;IACP,OAAO;IACP,QAAQ;CACR,CAAA","sourcesContent":["export const logLevels = {\n\t/**\n\t * none: 0\n\t */\n\tnone: 0 as const,\n\t/**\n\t * emergency: 100\n\t *\n\t * emergency -> alert\n\t */\n\temergency: 100 as const,\n\t/**\n\t * alert: 200\n\t *\n\t * emergency -> alert -> critical\n\t */\n\talert: 200 as const,\n\t/**\n\t * critical: 300\n\t *\n\t * alert -> critical -> error\n\t */\n\tcritical: 300 as const,\n\t/**\n\t * error: 400\n\t *\n\t * critical -> error -> warn\n\t */\n\terror: 400 as const,\n\t/**\n\t * warn: 500\n\t *\n\t * error -> warn -> notice\n\t */\n\twarn: 500 as const,\n\t/**\n\t * notice: 600\n\t *\n\t * warn -> notice -> info\n\t */\n\tnotice: 600 as const,\n\t/**\n\t * info: 700\n\t *\n\t * notice -> info -> debug\n\t */\n\tinfo: 700 as const,\n\t/**\n\t * debug: 800\n\t *\n\t * info -> debug -> trace\n\t */\n\tdebug: 800 as const,\n\t/**\n\t * trace: 900\n\t *\n\t * debug -> trace -> planck\n\t */\n\ttrace: 900 as const,\n\t/**\n\t * planck: Infinity\n\t * `planck unit` is a very small unit <https://en.wikipedia.org/wiki/Planck_units>.\n\t *\n\t * trace -> planck\n\t */\n\tplanck: Infinity,\n\t/**\n\t * all: Infinity\n\t */\n\tall: Infinity\n}\n\n/**\n * Convert default log level value to log level name.\n */\nexport function toLogLevelName(level: number) {\n\tif (level <= 100) return 'emergency'\n\tif (level <= 200) return 'alert'\n\tif (level <= 300) return 'critical'\n\tif (level <= 400) return 'error'\n\tif (level <= 500) return 'warn'\n\tif (level <= 600) return 'notice'\n\tif (level <= 700) return 'info'\n\tif (level <= 800) return 'debug'\n\tif (level <= 900) return 'trace'\n\treturn 'planck'\n}\n\n/**\n * Convert default log level name to log level value.\n */\nexport function toLogLevel(name: string): number | undefined {\n\treturn (logLevels as any)[name.toLocaleLowerCase()]\n}\n\nexport const DEFAULT_LOG_METHOD_NAMES: string[] = [\n\t'emergency',\n\t'alert',\n\t'critical',\n\t'error',\n\t'warn',\n\t'notice',\n\t'info',\n\t'debug',\n\t'trace',\n\t'planck'\n]\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"logStore.d.ts","sourceRoot":"","sources":["../ts/logStore.ts"],"names":[],"mappings":"AAIA,OAAO,KAAK,EAAE,MAAM,EAAE,QAAQ,EAAE,cAAc,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAA;AAEnG,wBAAgB,cAAc,CAAC,CAAC,SAAS,MAAM,GAAG,cAAc,EAAE,OAAO,EAAE,QAAQ,CAAC,kBAAkB,CAAC,CAAC,CAAC,CAAC,GAAG,QAAQ,CAQpH;AAED,MAAM,WAAW,QAAQ;IACvB,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAChC,iBAAiB,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAC;IAC1C,SAAS,EAAE,WAAW,EAAE,CAAC;IACzB,QAAQ,EAAE,QAAQ,CAAC;IACnB,aAAa,EAAE,UAAU,CAAC,OAAO,aAAa,CAAC,CAAA;CAChD;AAED,MAAM,WAAW,oBAAoB;IACnC,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,MAAM,CAAC,CAAA;CACtC;AAED,wBAAgB,aAAa,CAAC,OAAO,EAAE,oBAAoB;mBAWxC,MAAM;mBAGN,MAAM;;;;;EAWxB"}
1
+ {"version":3,"file":"logStore.d.ts","sourceRoot":"","sources":["../ts/logStore.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,MAAM,EAAE,QA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CAAA;AACH,CAAC;AAcD,MAAM,UAAU,aAAa,CAAC,OAA6B;IACzD,MAAM,YAAY,GAAG,OAAO,CAAC,YAAY,IAAI,MAAM,EAAE,CAAA;IAErD,MAAM,KAAK,GAAG;QACZ,YAAY;QACZ,mBAAmB,EAAE,WAAW,CAAC,YAAY,EAAE,CAAC,CAAC,EAAE,CAAC,EAAE,EAAE;YACtD,CAAC,CAAC,YAAY,CAAC,CAAC,CAAC,CAAC,GAAG,CAAC,CAAA;YACtB,OAAO,CAAC,CAAA;QACV,CAAC,EAAE,EAA4B,CAAC;KACjC,CAAA;IACD,OAAO;QACL,OAAO,CAAC,KAAa;;YACnB,OAAO,MAAA,KAAK,CAAC,mBAAmB,CAAC,KAAK,CAAC,mCAAI,cAAc,CAAC,KAAK,CAAC,CAAA;QAClE,CAAC;QACD,QAAQ,CAAC,IAAY;;YACnB,OAAO,MAAA,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,mCAAI,UAAU,CAAC,IAAI,CAAC,CAAA;QACrD,CAAC;QACD,YAAY;YACV,OAAO,SAAS,CAAC,SAAS,EAAE,CAAC,MAAM,EAAE,IAAI,EAAE,EAAE;gBAC3C,IAAI,IAAI,KAAK,MAAM,IAAI,IAAI,KAAK,KAAK;oBAAE,MAAM,CAAC,IAAI,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,SAAS,CAAC,IAAI,CAAC,EAAE,CAAC,CAAA;gBAEpF,OAAO,MAAM,CAAA;YACf,CAAC,EAAE,MAAM,CAAC,KAAK,CAAC,YAAY,EAAE,IAAI,CAAC,EAAE,CAAC,CAAC,EAAE,IAAI,EAAE,KAAK,EAAE,KAAK,CAAC,YAAY,CAAC,IAAI,CAAC,EAAE,CAAC,CAAC,CAAC,CAAA;QACrF,CAAC;KACF,CAAA;AACH,CAAC","sourcesContent":["\nimport { mapKey, record, 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: record(),\n nonConsoleLoggers: record(),\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 nonConsoleLoggers: 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 || record()\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"]}
1
+ {"version":3,"file":"logStore.js","sourceRoot":"","sources":["../ts/logStore.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,EAAE,WAAW,EAAE,SAAS,EAAE,MAAM,WAAW,CAAA;AAClE,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAA;AACvD,OAAO,EAAE,SAAS,EAAE,UAAU,EAAE,cAAc,EAAE,MAAM,gBAAgB,CAAA;AAGtE,MAAM,UAAU,cAAc,CAC7B,OAAwC;IAExC,OAAO;QACN,OAAO,EAAE,MAAM,EAAE;QACjB,iBAAiB,EAAE,MAAM,EAAE;QAC3B,SAAS,EAAE,OAAO,CAAC,SAA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CAAC","sourcesContent":["import { mapKey, record, 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>(\n\toptions: Required<StandardLogOptions<N>>\n): LogStore {\n\treturn {\n\t\tloggers: record(),\n\t\tnonConsoleLoggers: record(),\n\t\treporters: options.reporters || [createConsoleLogReporter()],\n\t\tlogLevel: options.logLevel,\n\t\tlogLevelStore: logLevelStore(options)\n\t}\n}\n\nexport interface LogStore {\n\tloggers: Record<string, Logger>\n\tnonConsoleLoggers: Record<string, Logger>\n\treporters: LogReporter[]\n\tlogLevel: LogLevel\n\tlogLevelStore: ReturnType<typeof logLevelStore>\n}\n\nexport interface LogLevelStoreOptions {\n\tcustomLevels?: Record<string, number>\n}\n\nexport function logLevelStore(options: LogLevelStoreOptions) {\n\tconst customLevels = options.customLevels || record()\n\n\tconst store = {\n\t\tcustomLevels,\n\t\tcustomLevelsReverse: reduceByKey(\n\t\t\tcustomLevels,\n\t\t\t(p, k) => {\n\t\t\t\tp[customLevels[k]] = k\n\t\t\t\treturn p\n\t\t\t},\n\t\t\t{} as Record<number, string>\n\t\t)\n\t}\n\treturn {\n\t\tgetName(level: number) {\n\t\t\treturn store.customLevelsReverse[level] ?? toLogLevelName(level)\n\t\t},\n\t\tgetLevel(name: string) {\n\t\t\treturn store.customLevels[name] ?? toLogLevel(name)\n\t\t},\n\t\tgetAllLevels() {\n\t\t\treturn reduceKey(\n\t\t\t\tlogLevels,\n\t\t\t\t(result, name) => {\n\t\t\t\t\tif (name !== 'none' && name !== 'all') result.push({ name, level: logLevels[name] })\n\n\t\t\t\t\treturn result\n\t\t\t\t},\n\t\t\t\tmapKey(store.customLevels, name => ({ name, level: store.customLevels[name] }))\n\t\t\t)\n\t\t}\n\t}\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../ts/logger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,KAAK,EAAyB,MAAM,EAAE,aAAa,EAAE,cAAc,EAAe,MAAM,YAAY,CAAA;AAG3G,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,cAAc,EAC5D,KAAK,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,OAAO,CAAC,EAAE,aAAa,GACnD,MAAM,CAAC,CAAC,GAAG,cAAc,CAAC,CAwD5B"}
1
+ {"version":3,"file":"logger.d.ts","sourceRoot":"","sources":["../ts/logger.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,QAAQ,EAAE,MAAM,eAAe,CAAA;AACxC,OAAO,KAAK,EAAyB,MAAM,EAAE,aAAa,EAAE,cAAc,EAAe,MAAM,YAAY,CAAA;AAG3G,wBAAgB,YAAY,CAAC,CAAC,SAAS,MAAM,GAAG,cAAc,EAC7D,KAAK,EAAE,QAAQ,EACf,EAAE,EAAE,MAAM,EACV,OAAO,CAAC,EAAE,aAAa,GACrB,MAAM,CAAC,CAAC,GAAG,cAAc,CAAC,CA4D5B"}
package/esm/logger.js CHANGED
@@ -21,7 +21,7 @@ export function createLogger(store, id, options) {
21
21
  id: { value: id, writable: false },
22
22
  count: {
23
23
  writable: false,
24
- value: ((counter) => (...args) => {
24
+ value: (counter => (...args) => {
25
25
  if (shouldLog(store, logLevels.debug, logger.level))
26
26
  write({
27
27
  id,