| import { createRequire as __bannerCrReq } from 'node:module'; |
| import __bannerPath from 'node:path'; |
| import __bannerUrl from 'node:url'; |
|
|
| globalThis.require = __bannerCrReq(import.meta.url); |
| globalThis.__filename = __bannerUrl.fileURLToPath(import.meta.url); |
| globalThis.__dirname = __bannerPath.dirname(globalThis.__filename); |
| |
| var __getOwnPropNames = Object.getOwnPropertyNames; |
| var __require = ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { |
| get: (a, b) => (typeof require !== "undefined" ? require : a)[b] |
| }) : x)(function(x) { |
| if (typeof require !== "undefined") return require.apply(this, arguments); |
| throw Error('Dynamic require of "' + x + '" is not supported'); |
| }); |
| var __commonJS = (cb, mod) => function __require2() { |
| return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; |
| }; |
|
|
| |
| var require_colorette = __commonJS({ |
| "../../node_modules/.pnpm/colorette@2.0.20/node_modules/colorette/index.cjs"(exports) { |
| "use strict"; |
| Object.defineProperty(exports, "__esModule", { value: true }); |
| var tty = __require("tty"); |
| function _interopNamespace(e) { |
| if (e && e.__esModule) return e; |
| var n = Object.create(null); |
| if (e) { |
| Object.keys(e).forEach(function(k) { |
| if (k !== "default") { |
| var d = Object.getOwnPropertyDescriptor(e, k); |
| Object.defineProperty(n, k, d.get ? d : { |
| enumerable: true, |
| get: function() { |
| return e[k]; |
| } |
| }); |
| } |
| }); |
| } |
| n["default"] = e; |
| return Object.freeze(n); |
| } |
| var tty__namespace = _interopNamespace(tty); |
| var { |
| env = {}, |
| argv = [], |
| platform = "" |
| } = typeof process === "undefined" ? {} : process; |
| var isDisabled = "NO_COLOR" in env || argv.includes("--no-color"); |
| var isForced = "FORCE_COLOR" in env || argv.includes("--color"); |
| var isWindows = platform === "win32"; |
| var isDumbTerminal = env.TERM === "dumb"; |
| var isCompatibleTerminal = tty__namespace && tty__namespace.isatty && tty__namespace.isatty(1) && env.TERM && !isDumbTerminal; |
| var isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env); |
| var isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI); |
| var replaceClose = (index, string, close, replace, head = string.substring(0, index) + replace, tail = string.substring(index + close.length), next = tail.indexOf(close)) => head + (next < 0 ? tail : replaceClose(next, tail, close, replace)); |
| var clearBleed = (index, string, open, close, replace) => index < 0 ? open + string + close : open + replaceClose(index, string, close, replace) + close; |
| var filterEmpty = (open, close, replace = open, at = open.length + 1) => (string) => string || !(string === "" || string === void 0) ? clearBleed( |
| ("" + string).indexOf(close, at), |
| string, |
| open, |
| close, |
| replace |
| ) : ""; |
| var init = (open, close, replace) => filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace); |
| var colors = { |
| reset: init(0, 0), |
| bold: init(1, 22, "\x1B[22m\x1B[1m"), |
| dim: init(2, 22, "\x1B[22m\x1B[2m"), |
| italic: init(3, 23), |
| underline: init(4, 24), |
| inverse: init(7, 27), |
| hidden: init(8, 28), |
| strikethrough: init(9, 29), |
| black: init(30, 39), |
| red: init(31, 39), |
| green: init(32, 39), |
| yellow: init(33, 39), |
| blue: init(34, 39), |
| magenta: init(35, 39), |
| cyan: init(36, 39), |
| white: init(37, 39), |
| gray: init(90, 39), |
| bgBlack: init(40, 49), |
| bgRed: init(41, 49), |
| bgGreen: init(42, 49), |
| bgYellow: init(43, 49), |
| bgBlue: init(44, 49), |
| bgMagenta: init(45, 49), |
| bgCyan: init(46, 49), |
| bgWhite: init(47, 49), |
| blackBright: init(90, 39), |
| redBright: init(91, 39), |
| greenBright: init(92, 39), |
| yellowBright: init(93, 39), |
| blueBright: init(94, 39), |
| magentaBright: init(95, 39), |
| cyanBright: init(96, 39), |
| whiteBright: init(97, 39), |
| bgBlackBright: init(100, 49), |
| bgRedBright: init(101, 49), |
| bgGreenBright: init(102, 49), |
| bgYellowBright: init(103, 49), |
| bgBlueBright: init(104, 49), |
| bgMagentaBright: init(105, 49), |
| bgCyanBright: init(106, 49), |
| bgWhiteBright: init(107, 49) |
| }; |
| var createColors = ({ useColor = isColorSupported } = {}) => useColor ? colors : Object.keys(colors).reduce( |
| (colors2, key) => ({ ...colors2, [key]: String }), |
| {} |
| ); |
| var { |
| reset, |
| bold, |
| dim, |
| italic, |
| underline, |
| inverse, |
| hidden, |
| strikethrough, |
| black, |
| red, |
| green, |
| yellow, |
| blue, |
| magenta, |
| cyan, |
| white, |
| gray, |
| bgBlack, |
| bgRed, |
| bgGreen, |
| bgYellow, |
| bgBlue, |
| bgMagenta, |
| bgCyan, |
| bgWhite, |
| blackBright, |
| redBright, |
| greenBright, |
| yellowBright, |
| blueBright, |
| magentaBright, |
| cyanBright, |
| whiteBright, |
| bgBlackBright, |
| bgRedBright, |
| bgGreenBright, |
| bgYellowBright, |
| bgBlueBright, |
| bgMagentaBright, |
| bgCyanBright, |
| bgWhiteBright |
| } = createColors(); |
| exports.bgBlack = bgBlack; |
| exports.bgBlackBright = bgBlackBright; |
| exports.bgBlue = bgBlue; |
| exports.bgBlueBright = bgBlueBright; |
| exports.bgCyan = bgCyan; |
| exports.bgCyanBright = bgCyanBright; |
| exports.bgGreen = bgGreen; |
| exports.bgGreenBright = bgGreenBright; |
| exports.bgMagenta = bgMagenta; |
| exports.bgMagentaBright = bgMagentaBright; |
| exports.bgRed = bgRed; |
| exports.bgRedBright = bgRedBright; |
| exports.bgWhite = bgWhite; |
| exports.bgWhiteBright = bgWhiteBright; |
| exports.bgYellow = bgYellow; |
| exports.bgYellowBright = bgYellowBright; |
| exports.black = black; |
| exports.blackBright = blackBright; |
| exports.blue = blue; |
| exports.blueBright = blueBright; |
| exports.bold = bold; |
| exports.createColors = createColors; |
| exports.cyan = cyan; |
| exports.cyanBright = cyanBright; |
| exports.dim = dim; |
| exports.gray = gray; |
| exports.green = green; |
| exports.greenBright = greenBright; |
| exports.hidden = hidden; |
| exports.inverse = inverse; |
| exports.isColorSupported = isColorSupported; |
| exports.italic = italic; |
| exports.magenta = magenta; |
| exports.magentaBright = magentaBright; |
| exports.red = red; |
| exports.redBright = redBright; |
| exports.reset = reset; |
| exports.strikethrough = strikethrough; |
| exports.underline = underline; |
| exports.white = white; |
| exports.whiteBright = whiteBright; |
| exports.yellow = yellow; |
| exports.yellowBright = yellowBright; |
| } |
| }); |
|
|
| |
| var require_wrappy = __commonJS({ |
| "../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js"(exports, module) { |
| module.exports = wrappy; |
| function wrappy(fn, cb) { |
| if (fn && cb) return wrappy(fn)(cb); |
| if (typeof fn !== "function") |
| throw new TypeError("need wrapper function"); |
| Object.keys(fn).forEach(function(k) { |
| wrapper[k] = fn[k]; |
| }); |
| return wrapper; |
| function wrapper() { |
| var args = new Array(arguments.length); |
| for (var i = 0; i < args.length; i++) { |
| args[i] = arguments[i]; |
| } |
| var ret = fn.apply(this, args); |
| var cb2 = args[args.length - 1]; |
| if (typeof ret === "function" && ret !== cb2) { |
| Object.keys(cb2).forEach(function(k) { |
| ret[k] = cb2[k]; |
| }); |
| } |
| return ret; |
| } |
| } |
| } |
| }); |
|
|
| |
| var require_once = __commonJS({ |
| "../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js"(exports, module) { |
| var wrappy = require_wrappy(); |
| module.exports = wrappy(once); |
| module.exports.strict = wrappy(onceStrict); |
| once.proto = once(function() { |
| Object.defineProperty(Function.prototype, "once", { |
| value: function() { |
| return once(this); |
| }, |
| configurable: true |
| }); |
| Object.defineProperty(Function.prototype, "onceStrict", { |
| value: function() { |
| return onceStrict(this); |
| }, |
| configurable: true |
| }); |
| }); |
| function once(fn) { |
| var f = function() { |
| if (f.called) return f.value; |
| f.called = true; |
| return f.value = fn.apply(this, arguments); |
| }; |
| f.called = false; |
| return f; |
| } |
| function onceStrict(fn) { |
| var f = function() { |
| if (f.called) |
| throw new Error(f.onceError); |
| f.called = true; |
| return f.value = fn.apply(this, arguments); |
| }; |
| var name = fn.name || "Function wrapped with `once`"; |
| f.onceError = name + " shouldn't be called more than once"; |
| f.called = false; |
| return f; |
| } |
| } |
| }); |
|
|
| |
| var require_end_of_stream = __commonJS({ |
| "../../node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/index.js"(exports, module) { |
| var once = require_once(); |
| var noop = function() { |
| }; |
| var qnt = global.Bare ? queueMicrotask : process.nextTick.bind(process); |
| var isRequest = function(stream) { |
| return stream.setHeader && typeof stream.abort === "function"; |
| }; |
| var isChildProcess = function(stream) { |
| return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3; |
| }; |
| var eos = function(stream, opts, callback) { |
| if (typeof opts === "function") return eos(stream, null, opts); |
| if (!opts) opts = {}; |
| callback = once(callback || noop); |
| var ws = stream._writableState; |
| var rs = stream._readableState; |
| var readable = opts.readable || opts.readable !== false && stream.readable; |
| var writable = opts.writable || opts.writable !== false && stream.writable; |
| var cancelled = false; |
| var onlegacyfinish = function() { |
| if (!stream.writable) onfinish(); |
| }; |
| var onfinish = function() { |
| writable = false; |
| if (!readable) callback.call(stream); |
| }; |
| var onend = function() { |
| readable = false; |
| if (!writable) callback.call(stream); |
| }; |
| var onexit = function(exitCode) { |
| callback.call(stream, exitCode ? new Error("exited with error code: " + exitCode) : null); |
| }; |
| var onerror = function(err) { |
| callback.call(stream, err); |
| }; |
| var onclose = function() { |
| qnt(onclosenexttick); |
| }; |
| var onclosenexttick = function() { |
| if (cancelled) return; |
| if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error("premature close")); |
| if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error("premature close")); |
| }; |
| var onrequest = function() { |
| stream.req.on("finish", onfinish); |
| }; |
| if (isRequest(stream)) { |
| stream.on("complete", onfinish); |
| stream.on("abort", onclose); |
| if (stream.req) onrequest(); |
| else stream.on("request", onrequest); |
| } else if (writable && !ws) { |
| stream.on("end", onlegacyfinish); |
| stream.on("close", onlegacyfinish); |
| } |
| if (isChildProcess(stream)) stream.on("exit", onexit); |
| stream.on("end", onend); |
| stream.on("finish", onfinish); |
| if (opts.error !== false) stream.on("error", onerror); |
| stream.on("close", onclose); |
| return function() { |
| cancelled = true; |
| stream.removeListener("complete", onfinish); |
| stream.removeListener("abort", onclose); |
| stream.removeListener("request", onrequest); |
| if (stream.req) stream.req.removeListener("finish", onfinish); |
| stream.removeListener("end", onlegacyfinish); |
| stream.removeListener("close", onlegacyfinish); |
| stream.removeListener("finish", onfinish); |
| stream.removeListener("exit", onexit); |
| stream.removeListener("end", onend); |
| stream.removeListener("error", onerror); |
| stream.removeListener("close", onclose); |
| }; |
| }; |
| module.exports = eos; |
| } |
| }); |
|
|
| |
| var require_pump = __commonJS({ |
| "../../node_modules/.pnpm/pump@3.0.4/node_modules/pump/index.js"(exports, module) { |
| var once = require_once(); |
| var eos = require_end_of_stream(); |
| var fs; |
| try { |
| fs = __require("fs"); |
| } catch (e) { |
| } |
| var noop = function() { |
| }; |
| var ancient = typeof process === "undefined" ? false : /^v?\.0/.test(process.version); |
| var isFn = function(fn) { |
| return typeof fn === "function"; |
| }; |
| var isFS = function(stream) { |
| if (!ancient) return false; |
| if (!fs) return false; |
| return (stream instanceof (fs.ReadStream || noop) || stream instanceof (fs.WriteStream || noop)) && isFn(stream.close); |
| }; |
| var isRequest = function(stream) { |
| return stream.setHeader && isFn(stream.abort); |
| }; |
| var destroyer = function(stream, reading, writing, callback) { |
| callback = once(callback); |
| var closed = false; |
| stream.on("close", function() { |
| closed = true; |
| }); |
| eos(stream, { readable: reading, writable: writing }, function(err) { |
| if (err) return callback(err); |
| closed = true; |
| callback(); |
| }); |
| var destroyed = false; |
| return function(err) { |
| if (closed) return; |
| if (destroyed) return; |
| destroyed = true; |
| if (isFS(stream)) return stream.close(noop); |
| if (isRequest(stream)) return stream.abort(); |
| if (isFn(stream.destroy)) return stream.destroy(); |
| callback(err || new Error("stream was destroyed")); |
| }; |
| }; |
| var call = function(fn) { |
| fn(); |
| }; |
| var pipe = function(from, to) { |
| return from.pipe(to); |
| }; |
| var pump = function() { |
| var streams = Array.prototype.slice.call(arguments); |
| var callback = isFn(streams[streams.length - 1] || noop) && streams.pop() || noop; |
| if (Array.isArray(streams[0])) streams = streams[0]; |
| if (streams.length < 2) throw new Error("pump requires two streams per minimum"); |
| var error; |
| var destroys = streams.map(function(stream, i) { |
| var reading = i < streams.length - 1; |
| var writing = i > 0; |
| return destroyer(stream, reading, writing, function(err) { |
| if (!error) error = err; |
| if (err) destroys.forEach(call); |
| if (reading) return; |
| destroys.forEach(call); |
| callback(error); |
| }); |
| }); |
| return streams.reduce(pipe); |
| }; |
| module.exports = pump; |
| } |
| }); |
|
|
| |
| var require_split2 = __commonJS({ |
| "../../node_modules/.pnpm/split2@4.2.0/node_modules/split2/index.js"(exports, module) { |
| "use strict"; |
| var { Transform } = __require("stream"); |
| var { StringDecoder } = __require("string_decoder"); |
| var kLast = Symbol("last"); |
| var kDecoder = Symbol("decoder"); |
| function transform(chunk, enc, cb) { |
| let list; |
| if (this.overflow) { |
| const buf = this[kDecoder].write(chunk); |
| list = buf.split(this.matcher); |
| if (list.length === 1) return cb(); |
| list.shift(); |
| this.overflow = false; |
| } else { |
| this[kLast] += this[kDecoder].write(chunk); |
| list = this[kLast].split(this.matcher); |
| } |
| this[kLast] = list.pop(); |
| for (let i = 0; i < list.length; i++) { |
| try { |
| push(this, this.mapper(list[i])); |
| } catch (error) { |
| return cb(error); |
| } |
| } |
| this.overflow = this[kLast].length > this.maxLength; |
| if (this.overflow && !this.skipOverflow) { |
| cb(new Error("maximum buffer reached")); |
| return; |
| } |
| cb(); |
| } |
| function flush(cb) { |
| this[kLast] += this[kDecoder].end(); |
| if (this[kLast]) { |
| try { |
| push(this, this.mapper(this[kLast])); |
| } catch (error) { |
| return cb(error); |
| } |
| } |
| cb(); |
| } |
| function push(self, val) { |
| if (val !== void 0) { |
| self.push(val); |
| } |
| } |
| function noop(incoming) { |
| return incoming; |
| } |
| function split(matcher, mapper, options) { |
| matcher = matcher || /\r?\n/; |
| mapper = mapper || noop; |
| options = options || {}; |
| switch (arguments.length) { |
| case 1: |
| if (typeof matcher === "function") { |
| mapper = matcher; |
| matcher = /\r?\n/; |
| } else if (typeof matcher === "object" && !(matcher instanceof RegExp) && !matcher[Symbol.split]) { |
| options = matcher; |
| matcher = /\r?\n/; |
| } |
| break; |
| case 2: |
| if (typeof matcher === "function") { |
| options = mapper; |
| mapper = matcher; |
| matcher = /\r?\n/; |
| } else if (typeof mapper === "object") { |
| options = mapper; |
| mapper = noop; |
| } |
| } |
| options = Object.assign({}, options); |
| options.autoDestroy = true; |
| options.transform = transform; |
| options.flush = flush; |
| options.readableObjectMode = true; |
| const stream = new Transform(options); |
| stream[kLast] = ""; |
| stream[kDecoder] = new StringDecoder("utf8"); |
| stream.matcher = matcher; |
| stream.mapper = mapper; |
| stream.maxLength = options.maxLength; |
| stream.skipOverflow = options.skipOverflow || false; |
| stream.overflow = false; |
| stream._destroy = function(err, cb) { |
| this._writableState.errorEmitted = false; |
| cb(err); |
| }; |
| return stream; |
| } |
| module.exports = split; |
| } |
| }); |
|
|
| |
| var require_pino_abstract_transport = __commonJS({ |
| "../../node_modules/.pnpm/pino-abstract-transport@3.0.0/node_modules/pino-abstract-transport/index.js"(exports, module) { |
| "use strict"; |
| var metadata = Symbol.for("pino.metadata"); |
| var split = require_split2(); |
| var { Duplex } = __require("stream"); |
| var { parentPort, workerData } = __require("worker_threads"); |
| function createDeferred() { |
| let resolve; |
| let reject; |
| const promise = new Promise((_resolve, _reject) => { |
| resolve = _resolve; |
| reject = _reject; |
| }); |
| promise.resolve = resolve; |
| promise.reject = reject; |
| return promise; |
| } |
| module.exports = function build(fn, opts = {}) { |
| const waitForConfig = opts.expectPinoConfig === true && workerData?.workerData?.pinoWillSendConfig === true; |
| const parseLines = opts.parse === "lines"; |
| const parseLine = typeof opts.parseLine === "function" ? opts.parseLine : JSON.parse; |
| const close = opts.close || defaultClose; |
| const stream = split(function(line) { |
| let value; |
| try { |
| value = parseLine(line); |
| } catch (error) { |
| this.emit("unknown", line, error); |
| return; |
| } |
| if (value === null) { |
| this.emit("unknown", line, "Null value ignored"); |
| return; |
| } |
| if (typeof value !== "object") { |
| value = { |
| data: value, |
| time: Date.now() |
| }; |
| } |
| if (stream[metadata]) { |
| stream.lastTime = value.time; |
| stream.lastLevel = value.level; |
| stream.lastObj = value; |
| } |
| if (parseLines) { |
| return line; |
| } |
| return value; |
| }, { autoDestroy: true }); |
| stream._destroy = function(err, cb) { |
| const promise = close(err, cb); |
| if (promise && typeof promise.then === "function") { |
| promise.then(cb, cb); |
| } |
| }; |
| if (opts.expectPinoConfig === true && workerData?.workerData?.pinoWillSendConfig !== true) { |
| setImmediate(() => { |
| stream.emit("error", new Error("This transport is not compatible with the current version of pino. Please upgrade pino to the latest version.")); |
| }); |
| } |
| if (opts.metadata !== false) { |
| stream[metadata] = true; |
| stream.lastTime = 0; |
| stream.lastLevel = 0; |
| stream.lastObj = null; |
| } |
| if (waitForConfig) { |
| let pinoConfig = {}; |
| const configReceived = createDeferred(); |
| parentPort.on("message", function handleMessage(message) { |
| if (message.code === "PINO_CONFIG") { |
| pinoConfig = message.config; |
| configReceived.resolve(); |
| parentPort.off("message", handleMessage); |
| } |
| }); |
| Object.defineProperties(stream, { |
| levels: { |
| get() { |
| return pinoConfig.levels; |
| } |
| }, |
| messageKey: { |
| get() { |
| return pinoConfig.messageKey; |
| } |
| }, |
| errorKey: { |
| get() { |
| return pinoConfig.errorKey; |
| } |
| } |
| }); |
| return configReceived.then(finish); |
| } |
| return finish(); |
| function finish() { |
| let res = fn(stream); |
| if (res && typeof res.catch === "function") { |
| res.catch((err) => { |
| stream.destroy(err); |
| }); |
| res = null; |
| } else if (opts.enablePipelining && res) { |
| return Duplex.from({ writable: stream, readable: res }); |
| } |
| return stream; |
| } |
| }; |
| function defaultClose(err, cb) { |
| process.nextTick(cb, err); |
| } |
| } |
| }); |
|
|
| |
| var require_constants = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/constants.js"(exports, module) { |
| "use strict"; |
| module.exports = { |
| DATE_FORMAT: "yyyy-mm-dd HH:MM:ss.l o", |
| DATE_FORMAT_SIMPLE: "HH:MM:ss.l", |
| |
| |
| |
| ERROR_LIKE_KEYS: ["err", "error"], |
| MESSAGE_KEY: "msg", |
| LEVEL_KEY: "level", |
| LEVEL_LABEL: "levelLabel", |
| TIMESTAMP_KEY: "time", |
| LEVELS: { |
| default: "USERLVL", |
| 60: "FATAL", |
| 50: "ERROR", |
| 40: "WARN", |
| 30: "INFO", |
| 20: "DEBUG", |
| 10: "TRACE" |
| }, |
| LEVEL_NAMES: { |
| fatal: 60, |
| error: 50, |
| warn: 40, |
| info: 30, |
| debug: 20, |
| trace: 10 |
| }, |
| |
| LOGGER_KEYS: [ |
| "pid", |
| "hostname", |
| "name", |
| "level", |
| "time", |
| "timestamp", |
| "caller" |
| ] |
| }; |
| } |
| }); |
|
|
| |
| var require_get_level_label_data = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/get-level-label-data.js"(exports, module) { |
| "use strict"; |
| module.exports = getLevelLabelData; |
| var { LEVELS, LEVEL_NAMES } = require_constants(); |
| function getLevelLabelData(useOnlyCustomProps, customLevels, customLevelNames) { |
| const levels = useOnlyCustomProps ? customLevels || LEVELS : Object.assign({}, LEVELS, customLevels); |
| const levelNames = useOnlyCustomProps ? customLevelNames || LEVEL_NAMES : Object.assign({}, LEVEL_NAMES, customLevelNames); |
| return function(level) { |
| let levelNum = "default"; |
| if (Number.isInteger(+level)) { |
| levelNum = Object.prototype.hasOwnProperty.call(levels, level) ? level : levelNum; |
| } else { |
| levelNum = Object.prototype.hasOwnProperty.call(levelNames, level.toLowerCase()) ? levelNames[level.toLowerCase()] : levelNum; |
| } |
| return [levels[levelNum], levelNum]; |
| }; |
| } |
| } |
| }); |
|
|
| |
| var require_colors = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/colors.js"(exports, module) { |
| "use strict"; |
| var nocolor = (input) => input; |
| var plain = { |
| default: nocolor, |
| 60: nocolor, |
| 50: nocolor, |
| 40: nocolor, |
| 30: nocolor, |
| 20: nocolor, |
| 10: nocolor, |
| message: nocolor, |
| greyMessage: nocolor, |
| property: nocolor |
| }; |
| var { createColors } = require_colorette(); |
| var getLevelLabelData = require_get_level_label_data(); |
| var availableColors = createColors({ useColor: true }); |
| var { white, bgRed, red, yellow, green, blue, gray, cyan, magenta } = availableColors; |
| var colored = { |
| default: white, |
| 60: bgRed, |
| 50: red, |
| 40: yellow, |
| 30: green, |
| 20: blue, |
| 10: gray, |
| message: cyan, |
| greyMessage: gray, |
| property: magenta |
| }; |
| function resolveCustomColoredColorizer(customColors) { |
| return customColors.reduce( |
| function(agg, [level, color]) { |
| agg[level] = typeof availableColors[color] === "function" ? availableColors[color] : white; |
| return agg; |
| }, |
| { default: white, message: cyan, greyMessage: gray, property: magenta } |
| ); |
| } |
| function colorizeLevel(useOnlyCustomProps) { |
| return function(level, colorizer, { customLevels, customLevelNames } = {}) { |
| const [levelStr, levelNum] = getLevelLabelData(useOnlyCustomProps, customLevels, customLevelNames)(level); |
| return Object.prototype.hasOwnProperty.call(colorizer, levelNum) ? colorizer[levelNum](levelStr) : colorizer.default(levelStr); |
| }; |
| } |
| function plainColorizer(useOnlyCustomProps) { |
| const newPlainColorizer = colorizeLevel(useOnlyCustomProps); |
| const customColoredColorizer = function(level, opts) { |
| return newPlainColorizer(level, plain, opts); |
| }; |
| customColoredColorizer.message = plain.message; |
| customColoredColorizer.greyMessage = plain.greyMessage; |
| customColoredColorizer.property = plain.property; |
| customColoredColorizer.colors = createColors({ useColor: false }); |
| return customColoredColorizer; |
| } |
| function coloredColorizer(useOnlyCustomProps) { |
| const newColoredColorizer = colorizeLevel(useOnlyCustomProps); |
| const customColoredColorizer = function(level, opts) { |
| return newColoredColorizer(level, colored, opts); |
| }; |
| customColoredColorizer.message = colored.message; |
| customColoredColorizer.property = colored.property; |
| customColoredColorizer.greyMessage = colored.greyMessage; |
| customColoredColorizer.colors = availableColors; |
| return customColoredColorizer; |
| } |
| function customColoredColorizerFactory(customColors, useOnlyCustomProps) { |
| const onlyCustomColored = resolveCustomColoredColorizer(customColors); |
| const customColored = useOnlyCustomProps ? onlyCustomColored : Object.assign({}, colored, onlyCustomColored); |
| const colorizeLevelCustom = colorizeLevel(useOnlyCustomProps); |
| const customColoredColorizer = function(level, opts) { |
| return colorizeLevelCustom(level, customColored, opts); |
| }; |
| customColoredColorizer.colors = availableColors; |
| customColoredColorizer.message = customColoredColorizer.message || customColored.message; |
| customColoredColorizer.property = customColoredColorizer.property || customColored.property; |
| customColoredColorizer.greyMessage = customColoredColorizer.greyMessage || customColored.greyMessage; |
| return customColoredColorizer; |
| } |
| module.exports = function getColorizer(useColors = false, customColors, useOnlyCustomProps) { |
| if (useColors && customColors !== void 0) { |
| return customColoredColorizerFactory(customColors, useOnlyCustomProps); |
| } else if (useColors) { |
| return coloredColorizer(useOnlyCustomProps); |
| } |
| return plainColorizer(useOnlyCustomProps); |
| }; |
| } |
| }); |
|
|
| |
| var require_atomic_sleep = __commonJS({ |
| "../../node_modules/.pnpm/atomic-sleep@1.0.0/node_modules/atomic-sleep/index.js"(exports, module) { |
| "use strict"; |
| if (typeof SharedArrayBuffer !== "undefined" && typeof Atomics !== "undefined") { |
| let sleep = function(ms) { |
| const valid = ms > 0 && ms < Infinity; |
| if (valid === false) { |
| if (typeof ms !== "number" && typeof ms !== "bigint") { |
| throw TypeError("sleep: ms must be a number"); |
| } |
| throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity"); |
| } |
| Atomics.wait(nil, 0, 0, Number(ms)); |
| }; |
| const nil = new Int32Array(new SharedArrayBuffer(4)); |
| module.exports = sleep; |
| } else { |
| let sleep = function(ms) { |
| const valid = ms > 0 && ms < Infinity; |
| if (valid === false) { |
| if (typeof ms !== "number" && typeof ms !== "bigint") { |
| throw TypeError("sleep: ms must be a number"); |
| } |
| throw RangeError("sleep: ms must be a number that is greater than 0 but less than Infinity"); |
| } |
| const target = Date.now() + Number(ms); |
| while (target > Date.now()) { |
| } |
| }; |
| module.exports = sleep; |
| } |
| } |
| }); |
|
|
| |
| var require_sonic_boom = __commonJS({ |
| "../../node_modules/.pnpm/sonic-boom@4.2.1/node_modules/sonic-boom/index.js"(exports, module) { |
| "use strict"; |
| var fs = __require("fs"); |
| var EventEmitter = __require("events"); |
| var inherits = __require("util").inherits; |
| var path = __require("path"); |
| var sleep = require_atomic_sleep(); |
| var assert = __require("assert"); |
| var BUSY_WRITE_TIMEOUT = 100; |
| var kEmptyBuffer = Buffer.allocUnsafe(0); |
| var MAX_WRITE = 16 * 1024; |
| var kContentModeBuffer = "buffer"; |
| var kContentModeUtf8 = "utf8"; |
| var [major, minor] = (process.versions.node || "0.0").split(".").map(Number); |
| var kCopyBuffer = major >= 22 && minor >= 7; |
| function openFile(file, sonic) { |
| sonic._opening = true; |
| sonic._writing = true; |
| sonic._asyncDrainScheduled = false; |
| function fileOpened(err, fd) { |
| if (err) { |
| sonic._reopening = false; |
| sonic._writing = false; |
| sonic._opening = false; |
| if (sonic.sync) { |
| process.nextTick(() => { |
| if (sonic.listenerCount("error") > 0) { |
| sonic.emit("error", err); |
| } |
| }); |
| } else { |
| sonic.emit("error", err); |
| } |
| return; |
| } |
| const reopening = sonic._reopening; |
| sonic.fd = fd; |
| sonic.file = file; |
| sonic._reopening = false; |
| sonic._opening = false; |
| sonic._writing = false; |
| if (sonic.sync) { |
| process.nextTick(() => sonic.emit("ready")); |
| } else { |
| sonic.emit("ready"); |
| } |
| if (sonic.destroyed) { |
| return; |
| } |
| if (!sonic._writing && sonic._len > sonic.minLength || sonic._flushPending) { |
| sonic._actualWrite(); |
| } else if (reopening) { |
| process.nextTick(() => sonic.emit("drain")); |
| } |
| } |
| const flags = sonic.append ? "a" : "w"; |
| const mode = sonic.mode; |
| if (sonic.sync) { |
| try { |
| if (sonic.mkdir) fs.mkdirSync(path.dirname(file), { recursive: true }); |
| const fd = fs.openSync(file, flags, mode); |
| fileOpened(null, fd); |
| } catch (err) { |
| fileOpened(err); |
| throw err; |
| } |
| } else if (sonic.mkdir) { |
| fs.mkdir(path.dirname(file), { recursive: true }, (err) => { |
| if (err) return fileOpened(err); |
| fs.open(file, flags, mode, fileOpened); |
| }); |
| } else { |
| fs.open(file, flags, mode, fileOpened); |
| } |
| } |
| function SonicBoom(opts) { |
| if (!(this instanceof SonicBoom)) { |
| return new SonicBoom(opts); |
| } |
| let { fd, dest, minLength, maxLength, maxWrite, periodicFlush, sync, append = true, mkdir, retryEAGAIN, fsync, contentMode, mode } = opts || {}; |
| fd = fd || dest; |
| this._len = 0; |
| this.fd = -1; |
| this._bufs = []; |
| this._lens = []; |
| this._writing = false; |
| this._ending = false; |
| this._reopening = false; |
| this._asyncDrainScheduled = false; |
| this._flushPending = false; |
| this._hwm = Math.max(minLength || 0, 16387); |
| this.file = null; |
| this.destroyed = false; |
| this.minLength = minLength || 0; |
| this.maxLength = maxLength || 0; |
| this.maxWrite = maxWrite || MAX_WRITE; |
| this._periodicFlush = periodicFlush || 0; |
| this._periodicFlushTimer = void 0; |
| this.sync = sync || false; |
| this.writable = true; |
| this._fsync = fsync || false; |
| this.append = append || false; |
| this.mode = mode; |
| this.retryEAGAIN = retryEAGAIN || (() => true); |
| this.mkdir = mkdir || false; |
| let fsWriteSync; |
| let fsWrite; |
| if (contentMode === kContentModeBuffer) { |
| this._writingBuf = kEmptyBuffer; |
| this.write = writeBuffer; |
| this.flush = flushBuffer; |
| this.flushSync = flushBufferSync; |
| this._actualWrite = actualWriteBuffer; |
| fsWriteSync = () => fs.writeSync(this.fd, this._writingBuf); |
| fsWrite = () => fs.write(this.fd, this._writingBuf, this.release); |
| } else if (contentMode === void 0 || contentMode === kContentModeUtf8) { |
| this._writingBuf = ""; |
| this.write = write; |
| this.flush = flush; |
| this.flushSync = flushSync; |
| this._actualWrite = actualWrite; |
| fsWriteSync = () => { |
| if (Buffer.isBuffer(this._writingBuf)) { |
| return fs.writeSync(this.fd, this._writingBuf); |
| } |
| return fs.writeSync(this.fd, this._writingBuf, "utf8"); |
| }; |
| fsWrite = () => { |
| if (Buffer.isBuffer(this._writingBuf)) { |
| return fs.write(this.fd, this._writingBuf, this.release); |
| } |
| return fs.write(this.fd, this._writingBuf, "utf8", this.release); |
| }; |
| } else { |
| throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`); |
| } |
| if (typeof fd === "number") { |
| this.fd = fd; |
| process.nextTick(() => this.emit("ready")); |
| } else if (typeof fd === "string") { |
| openFile(fd, this); |
| } else { |
| throw new Error("SonicBoom supports only file descriptors and files"); |
| } |
| if (this.minLength >= this.maxWrite) { |
| throw new Error(`minLength should be smaller than maxWrite (${this.maxWrite})`); |
| } |
| this.release = (err, n) => { |
| if (err) { |
| if ((err.code === "EAGAIN" || err.code === "EBUSY") && this.retryEAGAIN(err, this._writingBuf.length, this._len - this._writingBuf.length)) { |
| if (this.sync) { |
| try { |
| sleep(BUSY_WRITE_TIMEOUT); |
| this.release(void 0, 0); |
| } catch (err2) { |
| this.release(err2); |
| } |
| } else { |
| setTimeout(fsWrite, BUSY_WRITE_TIMEOUT); |
| } |
| } else { |
| this._writing = false; |
| this.emit("error", err); |
| } |
| return; |
| } |
| this.emit("write", n); |
| const releasedBufObj = releaseWritingBuf(this._writingBuf, this._len, n); |
| this._len = releasedBufObj.len; |
| this._writingBuf = releasedBufObj.writingBuf; |
| if (this._writingBuf.length) { |
| if (!this.sync) { |
| fsWrite(); |
| return; |
| } |
| try { |
| do { |
| const n2 = fsWriteSync(); |
| const releasedBufObj2 = releaseWritingBuf(this._writingBuf, this._len, n2); |
| this._len = releasedBufObj2.len; |
| this._writingBuf = releasedBufObj2.writingBuf; |
| } while (this._writingBuf.length); |
| } catch (err2) { |
| this.release(err2); |
| return; |
| } |
| } |
| if (this._fsync) { |
| fs.fsyncSync(this.fd); |
| } |
| const len = this._len; |
| if (this._reopening) { |
| this._writing = false; |
| this._reopening = false; |
| this.reopen(); |
| } else if (len > this.minLength) { |
| this._actualWrite(); |
| } else if (this._ending) { |
| if (len > 0) { |
| this._actualWrite(); |
| } else { |
| this._writing = false; |
| actualClose(this); |
| } |
| } else { |
| this._writing = false; |
| if (this.sync) { |
| if (!this._asyncDrainScheduled) { |
| this._asyncDrainScheduled = true; |
| process.nextTick(emitDrain, this); |
| } |
| } else { |
| this.emit("drain"); |
| } |
| } |
| }; |
| this.on("newListener", function(name) { |
| if (name === "drain") { |
| this._asyncDrainScheduled = false; |
| } |
| }); |
| if (this._periodicFlush !== 0) { |
| this._periodicFlushTimer = setInterval(() => this.flush(null), this._periodicFlush); |
| this._periodicFlushTimer.unref(); |
| } |
| } |
| function releaseWritingBuf(writingBuf, len, n) { |
| if (typeof writingBuf === "string") { |
| writingBuf = Buffer.from(writingBuf); |
| } |
| len = Math.max(len - n, 0); |
| writingBuf = writingBuf.subarray(n); |
| return { writingBuf, len }; |
| } |
| function emitDrain(sonic) { |
| const hasListeners = sonic.listenerCount("drain") > 0; |
| if (!hasListeners) return; |
| sonic._asyncDrainScheduled = false; |
| sonic.emit("drain"); |
| } |
| inherits(SonicBoom, EventEmitter); |
| function mergeBuf(bufs, len) { |
| if (bufs.length === 0) { |
| return kEmptyBuffer; |
| } |
| if (bufs.length === 1) { |
| return bufs[0]; |
| } |
| return Buffer.concat(bufs, len); |
| } |
| function write(data) { |
| if (this.destroyed) { |
| throw new Error("SonicBoom destroyed"); |
| } |
| data = "" + data; |
| const dataLen = Buffer.byteLength(data); |
| const len = this._len + dataLen; |
| const bufs = this._bufs; |
| if (this.maxLength && len > this.maxLength) { |
| this.emit("drop", data); |
| return this._len < this._hwm; |
| } |
| if (bufs.length === 0 || Buffer.byteLength(bufs[bufs.length - 1]) + dataLen > this.maxWrite) { |
| bufs.push(data); |
| } else { |
| bufs[bufs.length - 1] += data; |
| } |
| this._len = len; |
| if (!this._writing && this._len >= this.minLength) { |
| this._actualWrite(); |
| } |
| return this._len < this._hwm; |
| } |
| function writeBuffer(data) { |
| if (this.destroyed) { |
| throw new Error("SonicBoom destroyed"); |
| } |
| const len = this._len + data.length; |
| const bufs = this._bufs; |
| const lens = this._lens; |
| if (this.maxLength && len > this.maxLength) { |
| this.emit("drop", data); |
| return this._len < this._hwm; |
| } |
| if (bufs.length === 0 || lens[lens.length - 1] + data.length > this.maxWrite) { |
| bufs.push([data]); |
| lens.push(data.length); |
| } else { |
| bufs[bufs.length - 1].push(data); |
| lens[lens.length - 1] += data.length; |
| } |
| this._len = len; |
| if (!this._writing && this._len >= this.minLength) { |
| this._actualWrite(); |
| } |
| return this._len < this._hwm; |
| } |
| function callFlushCallbackOnDrain(cb) { |
| this._flushPending = true; |
| const onDrain = () => { |
| if (!this._fsync) { |
| try { |
| fs.fsync(this.fd, (err) => { |
| this._flushPending = false; |
| cb(err); |
| }); |
| } catch (err) { |
| cb(err); |
| } |
| } else { |
| this._flushPending = false; |
| cb(); |
| } |
| this.off("error", onError); |
| }; |
| const onError = (err) => { |
| this._flushPending = false; |
| cb(err); |
| this.off("drain", onDrain); |
| }; |
| this.once("drain", onDrain); |
| this.once("error", onError); |
| } |
| function flush(cb) { |
| if (cb != null && typeof cb !== "function") { |
| throw new Error("flush cb must be a function"); |
| } |
| if (this.destroyed) { |
| const error = new Error("SonicBoom destroyed"); |
| if (cb) { |
| cb(error); |
| return; |
| } |
| throw error; |
| } |
| if (this.minLength <= 0) { |
| cb?.(); |
| return; |
| } |
| if (cb) { |
| callFlushCallbackOnDrain.call(this, cb); |
| } |
| if (this._writing) { |
| return; |
| } |
| if (this._bufs.length === 0) { |
| this._bufs.push(""); |
| } |
| this._actualWrite(); |
| } |
| function flushBuffer(cb) { |
| if (cb != null && typeof cb !== "function") { |
| throw new Error("flush cb must be a function"); |
| } |
| if (this.destroyed) { |
| const error = new Error("SonicBoom destroyed"); |
| if (cb) { |
| cb(error); |
| return; |
| } |
| throw error; |
| } |
| if (this.minLength <= 0) { |
| cb?.(); |
| return; |
| } |
| if (cb) { |
| callFlushCallbackOnDrain.call(this, cb); |
| } |
| if (this._writing) { |
| return; |
| } |
| if (this._bufs.length === 0) { |
| this._bufs.push([]); |
| this._lens.push(0); |
| } |
| this._actualWrite(); |
| } |
| SonicBoom.prototype.reopen = function(file) { |
| if (this.destroyed) { |
| throw new Error("SonicBoom destroyed"); |
| } |
| if (this._opening) { |
| this.once("ready", () => { |
| this.reopen(file); |
| }); |
| return; |
| } |
| if (this._ending) { |
| return; |
| } |
| if (!this.file) { |
| throw new Error("Unable to reopen a file descriptor, you must pass a file to SonicBoom"); |
| } |
| if (file) { |
| this.file = file; |
| } |
| this._reopening = true; |
| if (this._writing) { |
| return; |
| } |
| const fd = this.fd; |
| this.once("ready", () => { |
| if (fd !== this.fd) { |
| fs.close(fd, (err) => { |
| if (err) { |
| return this.emit("error", err); |
| } |
| }); |
| } |
| }); |
| openFile(this.file, this); |
| }; |
| SonicBoom.prototype.end = function() { |
| if (this.destroyed) { |
| throw new Error("SonicBoom destroyed"); |
| } |
| if (this._opening) { |
| this.once("ready", () => { |
| this.end(); |
| }); |
| return; |
| } |
| if (this._ending) { |
| return; |
| } |
| this._ending = true; |
| if (this._writing) { |
| return; |
| } |
| if (this._len > 0 && this.fd >= 0) { |
| this._actualWrite(); |
| } else { |
| actualClose(this); |
| } |
| }; |
| function flushSync() { |
| if (this.destroyed) { |
| throw new Error("SonicBoom destroyed"); |
| } |
| if (this.fd < 0) { |
| throw new Error("sonic boom is not ready yet"); |
| } |
| if (!this._writing && this._writingBuf.length > 0) { |
| this._bufs.unshift(this._writingBuf); |
| this._writingBuf = ""; |
| } |
| let buf = ""; |
| while (this._bufs.length || buf.length) { |
| if (buf.length <= 0) { |
| buf = this._bufs[0]; |
| } |
| try { |
| const n = Buffer.isBuffer(buf) ? fs.writeSync(this.fd, buf) : fs.writeSync(this.fd, buf, "utf8"); |
| const releasedBufObj = releaseWritingBuf(buf, this._len, n); |
| buf = releasedBufObj.writingBuf; |
| this._len = releasedBufObj.len; |
| if (buf.length <= 0) { |
| this._bufs.shift(); |
| } |
| } catch (err) { |
| const shouldRetry = err.code === "EAGAIN" || err.code === "EBUSY"; |
| if (shouldRetry && !this.retryEAGAIN(err, buf.length, this._len - buf.length)) { |
| throw err; |
| } |
| sleep(BUSY_WRITE_TIMEOUT); |
| } |
| } |
| try { |
| fs.fsyncSync(this.fd); |
| } catch { |
| } |
| } |
| function flushBufferSync() { |
| if (this.destroyed) { |
| throw new Error("SonicBoom destroyed"); |
| } |
| if (this.fd < 0) { |
| throw new Error("sonic boom is not ready yet"); |
| } |
| if (!this._writing && this._writingBuf.length > 0) { |
| this._bufs.unshift([this._writingBuf]); |
| this._writingBuf = kEmptyBuffer; |
| } |
| let buf = kEmptyBuffer; |
| while (this._bufs.length || buf.length) { |
| if (buf.length <= 0) { |
| buf = mergeBuf(this._bufs[0], this._lens[0]); |
| } |
| try { |
| const n = fs.writeSync(this.fd, buf); |
| buf = buf.subarray(n); |
| this._len = Math.max(this._len - n, 0); |
| if (buf.length <= 0) { |
| this._bufs.shift(); |
| this._lens.shift(); |
| } |
| } catch (err) { |
| const shouldRetry = err.code === "EAGAIN" || err.code === "EBUSY"; |
| if (shouldRetry && !this.retryEAGAIN(err, buf.length, this._len - buf.length)) { |
| throw err; |
| } |
| sleep(BUSY_WRITE_TIMEOUT); |
| } |
| } |
| } |
| SonicBoom.prototype.destroy = function() { |
| if (this.destroyed) { |
| return; |
| } |
| actualClose(this); |
| }; |
| function actualWrite() { |
| const release = this.release; |
| this._writing = true; |
| this._writingBuf = this._writingBuf.length ? this._writingBuf : this._bufs.shift() || ""; |
| if (this.sync) { |
| try { |
| const written = Buffer.isBuffer(this._writingBuf) ? fs.writeSync(this.fd, this._writingBuf) : fs.writeSync(this.fd, this._writingBuf, "utf8"); |
| release(null, written); |
| } catch (err) { |
| release(err); |
| } |
| } else { |
| fs.write(this.fd, this._writingBuf, release); |
| } |
| } |
| function actualWriteBuffer() { |
| const release = this.release; |
| this._writing = true; |
| this._writingBuf = this._writingBuf.length ? this._writingBuf : mergeBuf(this._bufs.shift(), this._lens.shift()); |
| if (this.sync) { |
| try { |
| const written = fs.writeSync(this.fd, this._writingBuf); |
| release(null, written); |
| } catch (err) { |
| release(err); |
| } |
| } else { |
| if (kCopyBuffer) { |
| this._writingBuf = Buffer.from(this._writingBuf); |
| } |
| fs.write(this.fd, this._writingBuf, release); |
| } |
| } |
| function actualClose(sonic) { |
| if (sonic.fd === -1) { |
| sonic.once("ready", actualClose.bind(null, sonic)); |
| return; |
| } |
| if (sonic._periodicFlushTimer !== void 0) { |
| clearInterval(sonic._periodicFlushTimer); |
| } |
| sonic.destroyed = true; |
| sonic._bufs = []; |
| sonic._lens = []; |
| assert(typeof sonic.fd === "number", `sonic.fd must be a number, got ${typeof sonic.fd}`); |
| try { |
| fs.fsync(sonic.fd, closeWrapped); |
| } catch { |
| } |
| function closeWrapped() { |
| if (sonic.fd !== 1 && sonic.fd !== 2) { |
| fs.close(sonic.fd, done); |
| } else { |
| done(); |
| } |
| } |
| function done(err) { |
| if (err) { |
| sonic.emit("error", err); |
| return; |
| } |
| if (sonic._ending && !sonic._writing) { |
| sonic.emit("finish"); |
| } |
| sonic.emit("close"); |
| } |
| } |
| SonicBoom.SonicBoom = SonicBoom; |
| SonicBoom.default = SonicBoom; |
| module.exports = SonicBoom; |
| } |
| }); |
|
|
| |
| var require_noop = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/noop.js"(exports, module) { |
| "use strict"; |
| module.exports = function noop() { |
| }; |
| } |
| }); |
|
|
| |
| var require_on_exit_leak_free = __commonJS({ |
| "../../node_modules/.pnpm/on-exit-leak-free@2.1.2/node_modules/on-exit-leak-free/index.js"(exports, module) { |
| "use strict"; |
| var refs = { |
| exit: [], |
| beforeExit: [] |
| }; |
| var functions = { |
| exit: onExit, |
| beforeExit: onBeforeExit |
| }; |
| var registry; |
| function ensureRegistry() { |
| if (registry === void 0) { |
| registry = new FinalizationRegistry(clear); |
| } |
| } |
| function install(event) { |
| if (refs[event].length > 0) { |
| return; |
| } |
| process.on(event, functions[event]); |
| } |
| function uninstall(event) { |
| if (refs[event].length > 0) { |
| return; |
| } |
| process.removeListener(event, functions[event]); |
| if (refs.exit.length === 0 && refs.beforeExit.length === 0) { |
| registry = void 0; |
| } |
| } |
| function onExit() { |
| callRefs("exit"); |
| } |
| function onBeforeExit() { |
| callRefs("beforeExit"); |
| } |
| function callRefs(event) { |
| for (const ref of refs[event]) { |
| const obj = ref.deref(); |
| const fn = ref.fn; |
| if (obj !== void 0) { |
| fn(obj, event); |
| } |
| } |
| refs[event] = []; |
| } |
| function clear(ref) { |
| for (const event of ["exit", "beforeExit"]) { |
| const index = refs[event].indexOf(ref); |
| refs[event].splice(index, index + 1); |
| uninstall(event); |
| } |
| } |
| function _register(event, obj, fn) { |
| if (obj === void 0) { |
| throw new Error("the object can't be undefined"); |
| } |
| install(event); |
| const ref = new WeakRef(obj); |
| ref.fn = fn; |
| ensureRegistry(); |
| registry.register(obj, ref); |
| refs[event].push(ref); |
| } |
| function register(obj, fn) { |
| _register("exit", obj, fn); |
| } |
| function registerBeforeExit(obj, fn) { |
| _register("beforeExit", obj, fn); |
| } |
| function unregister(obj) { |
| if (registry === void 0) { |
| return; |
| } |
| registry.unregister(obj); |
| for (const event of ["exit", "beforeExit"]) { |
| refs[event] = refs[event].filter((ref) => { |
| const _obj = ref.deref(); |
| return _obj && _obj !== obj; |
| }); |
| uninstall(event); |
| } |
| } |
| module.exports = { |
| register, |
| registerBeforeExit, |
| unregister |
| }; |
| } |
| }); |
|
|
| |
| var require_build_safe_sonic_boom = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/build-safe-sonic-boom.js"(exports, module) { |
| "use strict"; |
| module.exports = buildSafeSonicBoom; |
| var { isMainThread } = __require("node:worker_threads"); |
| var SonicBoom = require_sonic_boom(); |
| var noop = require_noop(); |
| function buildSafeSonicBoom(opts) { |
| const stream = new SonicBoom(opts); |
| stream.on("error", filterBrokenPipe); |
| if (!opts.sync && isMainThread) { |
| setupOnExit(stream); |
| } |
| return stream; |
| function filterBrokenPipe(err) { |
| if (err.code === "EPIPE") { |
| stream.write = noop; |
| stream.end = noop; |
| stream.flushSync = noop; |
| stream.destroy = noop; |
| return; |
| } |
| stream.removeListener("error", filterBrokenPipe); |
| } |
| } |
| function setupOnExit(stream) { |
| if (global.WeakRef && global.WeakMap && global.FinalizationRegistry) { |
| const onExit = require_on_exit_leak_free(); |
| onExit.register(stream, autoEnd); |
| stream.on("close", function() { |
| onExit.unregister(stream); |
| }); |
| } |
| } |
| function autoEnd(stream, eventName) { |
| if (stream.destroyed) { |
| return; |
| } |
| if (eventName === "beforeExit") { |
| stream.flush(); |
| stream.on("drain", function() { |
| stream.end(); |
| }); |
| } else { |
| stream.flushSync(); |
| } |
| } |
| } |
| }); |
|
|
| |
| var require_is_valid_date = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/is-valid-date.js"(exports, module) { |
| "use strict"; |
| module.exports = isValidDate; |
| function isValidDate(date) { |
| return date instanceof Date && !Number.isNaN(date.getTime()); |
| } |
| } |
| }); |
|
|
| |
| var require_create_date = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/create-date.js"(exports, module) { |
| "use strict"; |
| module.exports = createDate; |
| var isValidDate = require_is_valid_date(); |
| function createDate(epoch) { |
| let date = new Date(epoch); |
| if (isValidDate(date)) { |
| return date; |
| } |
| date = new Date(+epoch); |
| return date; |
| } |
| } |
| }); |
|
|
| |
| var require_split_property_key = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/split-property-key.js"(exports, module) { |
| "use strict"; |
| module.exports = splitPropertyKey; |
| function splitPropertyKey(key) { |
| const result = []; |
| let backslash = false; |
| let segment = ""; |
| for (let i = 0; i < key.length; i++) { |
| const c = key.charAt(i); |
| if (c === "\\") { |
| backslash = true; |
| continue; |
| } |
| if (backslash) { |
| backslash = false; |
| segment += c; |
| continue; |
| } |
| if (c === ".") { |
| result.push(segment); |
| segment = ""; |
| continue; |
| } |
| segment += c; |
| } |
| if (segment.length) { |
| result.push(segment); |
| } |
| return result; |
| } |
| } |
| }); |
|
|
| |
| var require_get_property_value = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/get-property-value.js"(exports, module) { |
| "use strict"; |
| module.exports = getPropertyValue; |
| var splitPropertyKey = require_split_property_key(); |
| function getPropertyValue(obj, property) { |
| const props = Array.isArray(property) ? property : splitPropertyKey(property); |
| for (const prop of props) { |
| if (!Object.prototype.hasOwnProperty.call(obj, prop)) { |
| return; |
| } |
| obj = obj[prop]; |
| } |
| return obj; |
| } |
| } |
| }); |
|
|
| |
| var require_delete_log_property = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/delete-log-property.js"(exports, module) { |
| "use strict"; |
| module.exports = deleteLogProperty; |
| var getPropertyValue = require_get_property_value(); |
| var splitPropertyKey = require_split_property_key(); |
| function deleteLogProperty(log, property) { |
| const props = splitPropertyKey(property); |
| const propToDelete = props.pop(); |
| log = getPropertyValue(log, props); |
| if (log !== null && typeof log === "object" && Object.prototype.hasOwnProperty.call(log, propToDelete)) { |
| delete log[propToDelete]; |
| } |
| } |
| } |
| }); |
|
|
| |
| var require_cjs = __commonJS({ |
| "../../node_modules/.pnpm/fast-copy@4.0.2/node_modules/fast-copy/dist/cjs/index.cjs"(exports) { |
| "use strict"; |
| var toStringFunction = Function.prototype.toString; |
| var toStringObject = Object.prototype.toString; |
| function getCleanClone(prototype) { |
| if (!prototype) { |
| return Object.create(null); |
| } |
| const Constructor = prototype.constructor; |
| if (Constructor === Object) { |
| return prototype === Object.prototype ? {} : Object.create(prototype); |
| } |
| if (Constructor && ~toStringFunction.call(Constructor).indexOf("[native code]")) { |
| try { |
| return new Constructor(); |
| } catch (_a) { |
| } |
| } |
| return Object.create(prototype); |
| } |
| function getTag(value) { |
| const stringTag = value[Symbol.toStringTag]; |
| if (stringTag) { |
| return stringTag; |
| } |
| const type = toStringObject.call(value); |
| return type.substring(8, type.length - 1); |
| } |
| var { hasOwnProperty, propertyIsEnumerable } = Object.prototype; |
| function copyOwnDescriptor(original, clone, property, state) { |
| const ownDescriptor = Object.getOwnPropertyDescriptor(original, property) || { |
| configurable: true, |
| enumerable: true, |
| value: original[property], |
| writable: true |
| }; |
| const descriptor = ownDescriptor.get || ownDescriptor.set ? ownDescriptor : { |
| configurable: ownDescriptor.configurable, |
| enumerable: ownDescriptor.enumerable, |
| value: state.copier(ownDescriptor.value, state), |
| writable: ownDescriptor.writable |
| }; |
| try { |
| Object.defineProperty(clone, property, descriptor); |
| } catch (_a) { |
| clone[property] = descriptor.get ? descriptor.get() : descriptor.value; |
| } |
| } |
| function copyOwnPropertiesStrict(value, clone, state) { |
| const names = Object.getOwnPropertyNames(value); |
| for (let index = 0; index < names.length; ++index) { |
| copyOwnDescriptor(value, clone, names[index], state); |
| } |
| const symbols = Object.getOwnPropertySymbols(value); |
| for (let index = 0; index < symbols.length; ++index) { |
| copyOwnDescriptor(value, clone, symbols[index], state); |
| } |
| return clone; |
| } |
| function copyArrayLoose(array, state) { |
| const clone = new state.Constructor(); |
| state.cache.set(array, clone); |
| for (let index = 0; index < array.length; ++index) { |
| clone[index] = state.copier(array[index], state); |
| } |
| return clone; |
| } |
| function copyArrayStrict(array, state) { |
| const clone = new state.Constructor(); |
| state.cache.set(array, clone); |
| return copyOwnPropertiesStrict(array, clone, state); |
| } |
| function copyArrayBuffer(arrayBuffer, _state) { |
| return arrayBuffer.slice(0); |
| } |
| function copyBlob(blob, _state) { |
| return blob.slice(0, blob.size, blob.type); |
| } |
| function copyDataView(dataView, state) { |
| return new state.Constructor(copyArrayBuffer(dataView.buffer)); |
| } |
| function copyDate(date, state) { |
| return new state.Constructor(date.getTime()); |
| } |
| function copyMapLoose(map, state) { |
| const clone = new state.Constructor(); |
| state.cache.set(map, clone); |
| map.forEach((value, key) => { |
| clone.set(key, state.copier(value, state)); |
| }); |
| return clone; |
| } |
| function copyMapStrict(map, state) { |
| return copyOwnPropertiesStrict(map, copyMapLoose(map, state), state); |
| } |
| function copyObjectLoose(object, state) { |
| const clone = getCleanClone(state.prototype); |
| state.cache.set(object, clone); |
| for (const key in object) { |
| if (hasOwnProperty.call(object, key)) { |
| clone[key] = state.copier(object[key], state); |
| } |
| } |
| const symbols = Object.getOwnPropertySymbols(object); |
| for (let index = 0; index < symbols.length; ++index) { |
| const symbol = symbols[index]; |
| if (propertyIsEnumerable.call(object, symbol)) { |
| clone[symbol] = state.copier(object[symbol], state); |
| } |
| } |
| return clone; |
| } |
| function copyObjectStrict(object, state) { |
| const clone = getCleanClone(state.prototype); |
| state.cache.set(object, clone); |
| return copyOwnPropertiesStrict(object, clone, state); |
| } |
| function copyPrimitiveWrapper(primitiveObject, state) { |
| return new state.Constructor(primitiveObject.valueOf()); |
| } |
| function copyRegExp(regExp, state) { |
| const clone = new state.Constructor(regExp.source, regExp.flags); |
| clone.lastIndex = regExp.lastIndex; |
| return clone; |
| } |
| function copySelf(value, _state) { |
| return value; |
| } |
| function copySetLoose(set, state) { |
| const clone = new state.Constructor(); |
| state.cache.set(set, clone); |
| set.forEach((value) => { |
| clone.add(state.copier(value, state)); |
| }); |
| return clone; |
| } |
| function copySetStrict(set, state) { |
| return copyOwnPropertiesStrict(set, copySetLoose(set, state), state); |
| } |
| function createDefaultCache() { |
| return new WeakMap(); |
| } |
| function getOptions({ createCache: createCacheOverride, methods: methodsOverride, strict }) { |
| const defaultMethods = { |
| array: strict ? copyArrayStrict : copyArrayLoose, |
| arrayBuffer: copyArrayBuffer, |
| asyncGenerator: copySelf, |
| blob: copyBlob, |
| dataView: copyDataView, |
| date: copyDate, |
| error: copySelf, |
| generator: copySelf, |
| map: strict ? copyMapStrict : copyMapLoose, |
| object: strict ? copyObjectStrict : copyObjectLoose, |
| regExp: copyRegExp, |
| set: strict ? copySetStrict : copySetLoose |
| }; |
| const methods = methodsOverride ? Object.assign(defaultMethods, methodsOverride) : defaultMethods; |
| const copiers = getTagSpecificCopiers(methods); |
| const createCache = createCacheOverride || createDefaultCache; |
| if (!copiers.Object || !copiers.Array) { |
| throw new Error("An object and array copier must be provided."); |
| } |
| return { createCache, copiers, methods, strict: Boolean(strict) }; |
| } |
| function getTagSpecificCopiers(methods) { |
| return { |
| Arguments: methods.object, |
| Array: methods.array, |
| ArrayBuffer: methods.arrayBuffer, |
| AsyncGenerator: methods.asyncGenerator, |
| Blob: methods.blob, |
| Boolean: copyPrimitiveWrapper, |
| DataView: methods.dataView, |
| Date: methods.date, |
| Error: methods.error, |
| Float32Array: methods.arrayBuffer, |
| Float64Array: methods.arrayBuffer, |
| Generator: methods.generator, |
| Int8Array: methods.arrayBuffer, |
| Int16Array: methods.arrayBuffer, |
| Int32Array: methods.arrayBuffer, |
| Map: methods.map, |
| Number: copyPrimitiveWrapper, |
| Object: methods.object, |
| Promise: copySelf, |
| RegExp: methods.regExp, |
| Set: methods.set, |
| String: copyPrimitiveWrapper, |
| WeakMap: copySelf, |
| WeakSet: copySelf, |
| Uint8Array: methods.arrayBuffer, |
| Uint8ClampedArray: methods.arrayBuffer, |
| Uint16Array: methods.arrayBuffer, |
| Uint32Array: methods.arrayBuffer, |
| Uint64Array: methods.arrayBuffer |
| }; |
| } |
| function createCopier(options = {}) { |
| const { createCache, copiers } = getOptions(options); |
| const { Array: copyArray, Object: copyObject } = copiers; |
| function copier(value, state) { |
| state.prototype = state.Constructor = void 0; |
| if (!value || typeof value !== "object") { |
| return value; |
| } |
| if (state.cache.has(value)) { |
| return state.cache.get(value); |
| } |
| state.prototype = Object.getPrototypeOf(value); |
| state.Constructor = state.prototype && state.prototype.constructor; |
| if (!state.Constructor || state.Constructor === Object) { |
| return copyObject(value, state); |
| } |
| if (Array.isArray(value)) { |
| return copyArray(value, state); |
| } |
| const tagSpecificCopier = copiers[getTag(value)]; |
| if (tagSpecificCopier) { |
| return tagSpecificCopier(value, state); |
| } |
| return typeof value.then === "function" ? value : copyObject(value, state); |
| } |
| return function copy2(value) { |
| return copier(value, { |
| Constructor: void 0, |
| cache: createCache(), |
| copier, |
| prototype: void 0 |
| }); |
| }; |
| } |
| var copyStrict = createCopier({ strict: true }); |
| var copy = createCopier(); |
| exports.copy = copy; |
| exports.copyStrict = copyStrict; |
| exports.createCopier = createCopier; |
| } |
| }); |
|
|
| |
| var require_filter_log = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/filter-log.js"(exports, module) { |
| "use strict"; |
| module.exports = filterLog; |
| var { createCopier } = require_cjs(); |
| var fastCopy = createCopier({}); |
| var deleteLogProperty = require_delete_log_property(); |
| function filterLog({ log, context }) { |
| const { ignoreKeys, includeKeys } = context; |
| const logCopy = fastCopy(log); |
| if (includeKeys) { |
| const logIncluded = {}; |
| includeKeys.forEach((key) => { |
| logIncluded[key] = logCopy[key]; |
| }); |
| return logIncluded; |
| } |
| ignoreKeys.forEach((ignoreKey) => { |
| deleteLogProperty(logCopy, ignoreKey); |
| }); |
| return logCopy; |
| } |
| } |
| }); |
|
|
| |
| var require_dateformat = __commonJS({ |
| "../../node_modules/.pnpm/dateformat@4.6.3/node_modules/dateformat/lib/dateformat.js"(exports, module) { |
| "use strict"; |
| function _typeof(obj) { |
| "@babel/helpers - typeof"; |
| if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") { |
| _typeof = function _typeof2(obj2) { |
| return typeof obj2; |
| }; |
| } else { |
| _typeof = function _typeof2(obj2) { |
| return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2; |
| }; |
| } |
| return _typeof(obj); |
| } |
| (function(global2) { |
| var _arguments = arguments; |
| var dateFormat = (function() { |
| var token = /d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g; |
| var timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g; |
| var timezoneClip = /[^-+\dA-Z]/g; |
| return function(date, mask, utc, gmt) { |
| if (_arguments.length === 1 && kindOf(date) === "string" && !/\d/.test(date)) { |
| mask = date; |
| date = void 0; |
| } |
| date = date || date === 0 ? date : new Date(); |
| if (!(date instanceof Date)) { |
| date = new Date(date); |
| } |
| if (isNaN(date)) { |
| throw TypeError("Invalid date"); |
| } |
| mask = String(dateFormat.masks[mask] || mask || dateFormat.masks["default"]); |
| var maskSlice = mask.slice(0, 4); |
| if (maskSlice === "UTC:" || maskSlice === "GMT:") { |
| mask = mask.slice(4); |
| utc = true; |
| if (maskSlice === "GMT:") { |
| gmt = true; |
| } |
| } |
| var _ = function _2() { |
| return utc ? "getUTC" : "get"; |
| }; |
| var _d = function d() { |
| return date[_() + "Date"](); |
| }; |
| var D = function D2() { |
| return date[_() + "Day"](); |
| }; |
| var _m = function m() { |
| return date[_() + "Month"](); |
| }; |
| var y = function y2() { |
| return date[_() + "FullYear"](); |
| }; |
| var _H = function H() { |
| return date[_() + "Hours"](); |
| }; |
| var _M = function M() { |
| return date[_() + "Minutes"](); |
| }; |
| var _s = function s() { |
| return date[_() + "Seconds"](); |
| }; |
| var _L = function L() { |
| return date[_() + "Milliseconds"](); |
| }; |
| var _o = function o() { |
| return utc ? 0 : date.getTimezoneOffset(); |
| }; |
| var _W = function W() { |
| return getWeek(date); |
| }; |
| var _N = function N() { |
| return getDayOfWeek(date); |
| }; |
| var flags = { d: function d() { |
| return _d(); |
| }, dd: function dd() { |
| return pad(_d()); |
| }, ddd: function ddd() { |
| return dateFormat.i18n.dayNames[D()]; |
| }, DDD: function DDD() { |
| return getDayName({ y: y(), m: _m(), d: _d(), _: _(), dayName: dateFormat.i18n.dayNames[D()], short: true }); |
| }, dddd: function dddd() { |
| return dateFormat.i18n.dayNames[D() + 7]; |
| }, DDDD: function DDDD() { |
| return getDayName({ y: y(), m: _m(), d: _d(), _: _(), dayName: dateFormat.i18n.dayNames[D() + 7] }); |
| }, m: function m() { |
| return _m() + 1; |
| }, mm: function mm() { |
| return pad(_m() + 1); |
| }, mmm: function mmm() { |
| return dateFormat.i18n.monthNames[_m()]; |
| }, mmmm: function mmmm() { |
| return dateFormat.i18n.monthNames[_m() + 12]; |
| }, yy: function yy() { |
| return String(y()).slice(2); |
| }, yyyy: function yyyy() { |
| return pad(y(), 4); |
| }, h: function h() { |
| return _H() % 12 || 12; |
| }, hh: function hh() { |
| return pad(_H() % 12 || 12); |
| }, H: function H() { |
| return _H(); |
| }, HH: function HH() { |
| return pad(_H()); |
| }, M: function M() { |
| return _M(); |
| }, MM: function MM() { |
| return pad(_M()); |
| }, s: function s() { |
| return _s(); |
| }, ss: function ss() { |
| return pad(_s()); |
| }, l: function l() { |
| return pad(_L(), 3); |
| }, L: function L() { |
| return pad(Math.floor(_L() / 10)); |
| }, t: function t() { |
| return _H() < 12 ? dateFormat.i18n.timeNames[0] : dateFormat.i18n.timeNames[1]; |
| }, tt: function tt() { |
| return _H() < 12 ? dateFormat.i18n.timeNames[2] : dateFormat.i18n.timeNames[3]; |
| }, T: function T() { |
| return _H() < 12 ? dateFormat.i18n.timeNames[4] : dateFormat.i18n.timeNames[5]; |
| }, TT: function TT() { |
| return _H() < 12 ? dateFormat.i18n.timeNames[6] : dateFormat.i18n.timeNames[7]; |
| }, Z: function Z() { |
| return gmt ? "GMT" : utc ? "UTC" : (String(date).match(timezone) || [""]).pop().replace(timezoneClip, "").replace(/GMT\+0000/g, "UTC"); |
| }, o: function o() { |
| return (_o() > 0 ? "-" : "+") + pad(Math.floor(Math.abs(_o()) / 60) * 100 + Math.abs(_o()) % 60, 4); |
| }, p: function p() { |
| return (_o() > 0 ? "-" : "+") + pad(Math.floor(Math.abs(_o()) / 60), 2) + ":" + pad(Math.floor(Math.abs(_o()) % 60), 2); |
| }, S: function S() { |
| return ["th", "st", "nd", "rd"][_d() % 10 > 3 ? 0 : (_d() % 100 - _d() % 10 != 10) * _d() % 10]; |
| }, W: function W() { |
| return _W(); |
| }, WW: function WW() { |
| return pad(_W()); |
| }, N: function N() { |
| return _N(); |
| } }; |
| return mask.replace(token, function(match) { |
| if (match in flags) { |
| return flags[match](); |
| } |
| return match.slice(1, match.length - 1); |
| }); |
| }; |
| })(); |
| dateFormat.masks = { default: "ddd mmm dd yyyy HH:MM:ss", shortDate: "m/d/yy", paddedShortDate: "mm/dd/yyyy", mediumDate: "mmm d, yyyy", longDate: "mmmm d, yyyy", fullDate: "dddd, mmmm d, yyyy", shortTime: "h:MM TT", mediumTime: "h:MM:ss TT", longTime: "h:MM:ss TT Z", isoDate: "yyyy-mm-dd", isoTime: "HH:MM:ss", isoDateTime: "yyyy-mm-dd'T'HH:MM:sso", isoUtcDateTime: "UTC:yyyy-mm-dd'T'HH:MM:ss'Z'", expiresHeaderFormat: "ddd, dd mmm yyyy HH:MM:ss Z" }; |
| dateFormat.i18n = { dayNames: ["Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday", "Saturday"], monthNames: ["Jan", "Feb", "Mar", "Apr", "May", "Jun", "Jul", "Aug", "Sep", "Oct", "Nov", "Dec", "January", "February", "March", "April", "May", "June", "July", "August", "September", "October", "November", "December"], timeNames: ["a", "p", "am", "pm", "A", "P", "AM", "PM"] }; |
| var pad = function pad2(val, len) { |
| val = String(val); |
| len = len || 2; |
| while (val.length < len) { |
| val = "0" + val; |
| } |
| return val; |
| }; |
| var getDayName = function getDayName2(_ref) { |
| var y = _ref.y, m = _ref.m, d = _ref.d, _ = _ref._, dayName = _ref.dayName, _ref$short = _ref["short"], _short = _ref$short === void 0 ? false : _ref$short; |
| var today = new Date(); |
| var yesterday = new Date(); |
| yesterday.setDate(yesterday[_ + "Date"]() - 1); |
| var tomorrow = new Date(); |
| tomorrow.setDate(tomorrow[_ + "Date"]() + 1); |
| var today_d = function today_d2() { |
| return today[_ + "Date"](); |
| }; |
| var today_m = function today_m2() { |
| return today[_ + "Month"](); |
| }; |
| var today_y = function today_y2() { |
| return today[_ + "FullYear"](); |
| }; |
| var yesterday_d = function yesterday_d2() { |
| return yesterday[_ + "Date"](); |
| }; |
| var yesterday_m = function yesterday_m2() { |
| return yesterday[_ + "Month"](); |
| }; |
| var yesterday_y = function yesterday_y2() { |
| return yesterday[_ + "FullYear"](); |
| }; |
| var tomorrow_d = function tomorrow_d2() { |
| return tomorrow[_ + "Date"](); |
| }; |
| var tomorrow_m = function tomorrow_m2() { |
| return tomorrow[_ + "Month"](); |
| }; |
| var tomorrow_y = function tomorrow_y2() { |
| return tomorrow[_ + "FullYear"](); |
| }; |
| if (today_y() === y && today_m() === m && today_d() === d) { |
| return _short ? "Tdy" : "Today"; |
| } else if (yesterday_y() === y && yesterday_m() === m && yesterday_d() === d) { |
| return _short ? "Ysd" : "Yesterday"; |
| } else if (tomorrow_y() === y && tomorrow_m() === m && tomorrow_d() === d) { |
| return _short ? "Tmw" : "Tomorrow"; |
| } |
| return dayName; |
| }; |
| var getWeek = function getWeek2(date) { |
| var targetThursday = new Date(date.getFullYear(), date.getMonth(), date.getDate()); |
| targetThursday.setDate(targetThursday.getDate() - (targetThursday.getDay() + 6) % 7 + 3); |
| var firstThursday = new Date(targetThursday.getFullYear(), 0, 4); |
| firstThursday.setDate(firstThursday.getDate() - (firstThursday.getDay() + 6) % 7 + 3); |
| var ds = targetThursday.getTimezoneOffset() - firstThursday.getTimezoneOffset(); |
| targetThursday.setHours(targetThursday.getHours() - ds); |
| var weekDiff = (targetThursday - firstThursday) / (864e5 * 7); |
| return 1 + Math.floor(weekDiff); |
| }; |
| var getDayOfWeek = function getDayOfWeek2(date) { |
| var dow = date.getDay(); |
| if (dow === 0) { |
| dow = 7; |
| } |
| return dow; |
| }; |
| var kindOf = function kindOf2(val) { |
| if (val === null) { |
| return "null"; |
| } |
| if (val === void 0) { |
| return "undefined"; |
| } |
| if (_typeof(val) !== "object") { |
| return _typeof(val); |
| } |
| if (Array.isArray(val)) { |
| return "array"; |
| } |
| return {}.toString.call(val).slice(8, -1).toLowerCase(); |
| }; |
| if (typeof define === "function" && define.amd) { |
| define(function() { |
| return dateFormat; |
| }); |
| } else if ((typeof exports === "undefined" ? "undefined" : _typeof(exports)) === "object") { |
| module.exports = dateFormat; |
| } else { |
| global2.dateFormat = dateFormat; |
| } |
| })(void 0); |
| } |
| }); |
|
|
| |
| var require_format_time = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/format-time.js"(exports, module) { |
| "use strict"; |
| module.exports = formatTime; |
| var { |
| DATE_FORMAT, |
| DATE_FORMAT_SIMPLE |
| } = require_constants(); |
| var dateformat = require_dateformat(); |
| var createDate = require_create_date(); |
| var isValidDate = require_is_valid_date(); |
| function formatTime(epoch, translateTime = false) { |
| if (translateTime === false) { |
| return epoch; |
| } |
| const instant = createDate(epoch); |
| if (!isValidDate(instant)) { |
| return epoch; |
| } |
| if (translateTime === true) { |
| return dateformat(instant, DATE_FORMAT_SIMPLE); |
| } |
| const upperFormat = translateTime.toUpperCase(); |
| if (upperFormat === "SYS:STANDARD") { |
| return dateformat(instant, DATE_FORMAT); |
| } |
| const prefix = upperFormat.substr(0, 4); |
| if (prefix === "SYS:" || prefix === "UTC:") { |
| if (prefix === "UTC:") { |
| return dateformat(instant, translateTime); |
| } |
| return dateformat(instant, translateTime.slice(4)); |
| } |
| return dateformat(instant, `UTC:${translateTime}`); |
| } |
| } |
| }); |
|
|
| |
| var require_handle_custom_levels_names_opts = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/handle-custom-levels-names-opts.js"(exports, module) { |
| "use strict"; |
| module.exports = handleCustomLevelsNamesOpts; |
| function handleCustomLevelsNamesOpts(cLevels) { |
| if (!cLevels) return {}; |
| if (typeof cLevels === "string") { |
| return cLevels.split(",").reduce((agg, value, idx) => { |
| const [levelName, levelNum = idx] = value.split(":"); |
| agg[levelName.toLowerCase()] = levelNum; |
| return agg; |
| }, {}); |
| } else if (Object.prototype.toString.call(cLevels) === "[object Object]") { |
| return Object.keys(cLevels).reduce((agg, levelName) => { |
| agg[levelName.toLowerCase()] = cLevels[levelName]; |
| return agg; |
| }, {}); |
| } else { |
| return {}; |
| } |
| } |
| } |
| }); |
|
|
| |
| var require_handle_custom_levels_opts = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/handle-custom-levels-opts.js"(exports, module) { |
| "use strict"; |
| module.exports = handleCustomLevelsOpts; |
| function handleCustomLevelsOpts(cLevels) { |
| if (!cLevels) return {}; |
| if (typeof cLevels === "string") { |
| return cLevels.split(",").reduce( |
| (agg, value, idx) => { |
| const [levelName, levelNum = idx] = value.split(":"); |
| agg[levelNum] = levelName.toUpperCase(); |
| return agg; |
| }, |
| { default: "USERLVL" } |
| ); |
| } else if (Object.prototype.toString.call(cLevels) === "[object Object]") { |
| return Object.keys(cLevels).reduce((agg, levelName) => { |
| agg[cLevels[levelName]] = levelName.toUpperCase(); |
| return agg; |
| }, { default: "USERLVL" }); |
| } else { |
| return {}; |
| } |
| } |
| } |
| }); |
|
|
| |
| var require_interpret_conditionals = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/interpret-conditionals.js"(exports, module) { |
| "use strict"; |
| module.exports = interpretConditionals; |
| var getPropertyValue = require_get_property_value(); |
| function interpretConditionals(messageFormat, log) { |
| messageFormat = messageFormat.replace(/{if (.*?)}(.*?){end}/g, replacer); |
| messageFormat = messageFormat.replace(/{if (.*?)}/g, ""); |
| messageFormat = messageFormat.replace(/{end}/g, ""); |
| return messageFormat.replace(/\s+/g, " ").trim(); |
| function replacer(_, key, value) { |
| const propertyValue = getPropertyValue(log, key); |
| if (propertyValue && value.includes(key)) { |
| return value.replace(new RegExp("{" + key + "}", "g"), propertyValue); |
| } else { |
| return ""; |
| } |
| } |
| } |
| } |
| }); |
|
|
| |
| var require_is_object = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/is-object.js"(exports, module) { |
| "use strict"; |
| module.exports = isObject; |
| function isObject(input) { |
| return Object.prototype.toString.apply(input) === "[object Object]"; |
| } |
| } |
| }); |
|
|
| |
| var require_join_lines_with_indentation = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/join-lines-with-indentation.js"(exports, module) { |
| "use strict"; |
| module.exports = joinLinesWithIndentation; |
| function joinLinesWithIndentation({ input, ident = " ", eol = "\n" }) { |
| const lines = input.split(/\r?\n/); |
| for (let i = 1; i < lines.length; i += 1) { |
| lines[i] = ident + lines[i]; |
| } |
| return lines.join(eol); |
| } |
| } |
| }); |
|
|
| |
| var require_parse_factory_options = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/parse-factory-options.js"(exports, module) { |
| "use strict"; |
| module.exports = parseFactoryOptions; |
| var { |
| LEVEL_NAMES |
| } = require_constants(); |
| var colors = require_colors(); |
| var handleCustomLevelsOpts = require_handle_custom_levels_opts(); |
| var handleCustomLevelsNamesOpts = require_handle_custom_levels_names_opts(); |
| var handleLevelLabelData = require_get_level_label_data(); |
| function parseFactoryOptions(options) { |
| const EOL = options.crlf ? "\r\n" : "\n"; |
| const IDENT = " "; |
| const { |
| customPrettifiers, |
| errorLikeObjectKeys, |
| hideObject, |
| levelFirst, |
| levelKey, |
| levelLabel, |
| messageFormat, |
| messageKey, |
| minimumLevel, |
| singleLine, |
| timestampKey, |
| translateTime |
| } = options; |
| const errorProps = options.errorProps.split(","); |
| const useOnlyCustomProps = typeof options.useOnlyCustomProps === "boolean" ? options.useOnlyCustomProps : options.useOnlyCustomProps === "true"; |
| const customLevels = handleCustomLevelsOpts(options.customLevels); |
| const customLevelNames = handleCustomLevelsNamesOpts(options.customLevels); |
| const getLevelLabelData = handleLevelLabelData(useOnlyCustomProps, customLevels, customLevelNames); |
| let customColors; |
| if (options.customColors) { |
| if (typeof options.customColors === "string") { |
| customColors = options.customColors.split(",").reduce((agg, value) => { |
| const [level, color] = value.split(":"); |
| const condition = useOnlyCustomProps ? options.customLevels : customLevelNames[level] !== void 0; |
| const levelNum = condition ? customLevelNames[level] : LEVEL_NAMES[level]; |
| const colorIdx = levelNum !== void 0 ? levelNum : level; |
| agg.push([colorIdx, color]); |
| return agg; |
| }, []); |
| } else if (typeof options.customColors === "object") { |
| customColors = Object.keys(options.customColors).reduce((agg, value) => { |
| const [level, color] = [value, options.customColors[value]]; |
| const condition = useOnlyCustomProps ? options.customLevels : customLevelNames[level] !== void 0; |
| const levelNum = condition ? customLevelNames[level] : LEVEL_NAMES[level]; |
| const colorIdx = levelNum !== void 0 ? levelNum : level; |
| agg.push([colorIdx, color]); |
| return agg; |
| }, []); |
| } else { |
| throw new Error("options.customColors must be of type string or object."); |
| } |
| } |
| const customProperties = { customLevels, customLevelNames }; |
| if (useOnlyCustomProps === true && !options.customLevels) { |
| customProperties.customLevels = void 0; |
| customProperties.customLevelNames = void 0; |
| } |
| const includeKeys = options.include !== void 0 ? new Set(options.include.split(",")) : void 0; |
| const ignoreKeys = !includeKeys && options.ignore ? new Set(options.ignore.split(",")) : void 0; |
| const colorizer = colors(options.colorize, customColors, useOnlyCustomProps); |
| const objectColorizer = options.colorizeObjects ? colorizer : colors(false, [], false); |
| return { |
| EOL, |
| IDENT, |
| colorizer, |
| customColors, |
| customLevelNames, |
| customLevels, |
| customPrettifiers, |
| customProperties, |
| errorLikeObjectKeys, |
| errorProps, |
| getLevelLabelData, |
| hideObject, |
| ignoreKeys, |
| includeKeys, |
| levelFirst, |
| levelKey, |
| levelLabel, |
| messageFormat, |
| messageKey, |
| minimumLevel, |
| objectColorizer, |
| singleLine, |
| timestampKey, |
| translateTime, |
| useOnlyCustomProps |
| }; |
| } |
| } |
| }); |
|
|
| |
| var require_fast_safe_stringify = __commonJS({ |
| "../../node_modules/.pnpm/fast-safe-stringify@2.1.1/node_modules/fast-safe-stringify/index.js"(exports, module) { |
| module.exports = stringify; |
| stringify.default = stringify; |
| stringify.stable = deterministicStringify; |
| stringify.stableStringify = deterministicStringify; |
| var LIMIT_REPLACE_NODE = "[...]"; |
| var CIRCULAR_REPLACE_NODE = "[Circular]"; |
| var arr = []; |
| var replacerStack = []; |
| function defaultOptions() { |
| return { |
| depthLimit: Number.MAX_SAFE_INTEGER, |
| edgesLimit: Number.MAX_SAFE_INTEGER |
| }; |
| } |
| function stringify(obj, replacer, spacer, options) { |
| if (typeof options === "undefined") { |
| options = defaultOptions(); |
| } |
| decirc(obj, "", 0, [], void 0, 0, options); |
| var res; |
| try { |
| if (replacerStack.length === 0) { |
| res = JSON.stringify(obj, replacer, spacer); |
| } else { |
| res = JSON.stringify(obj, replaceGetterValues(replacer), spacer); |
| } |
| } catch (_) { |
| return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]"); |
| } finally { |
| while (arr.length !== 0) { |
| var part = arr.pop(); |
| if (part.length === 4) { |
| Object.defineProperty(part[0], part[1], part[3]); |
| } else { |
| part[0][part[1]] = part[2]; |
| } |
| } |
| } |
| return res; |
| } |
| function setReplace(replace, val, k, parent) { |
| var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k); |
| if (propertyDescriptor.get !== void 0) { |
| if (propertyDescriptor.configurable) { |
| Object.defineProperty(parent, k, { value: replace }); |
| arr.push([parent, k, val, propertyDescriptor]); |
| } else { |
| replacerStack.push([val, k, replace]); |
| } |
| } else { |
| parent[k] = replace; |
| arr.push([parent, k, val]); |
| } |
| } |
| function decirc(val, k, edgeIndex, stack, parent, depth, options) { |
| depth += 1; |
| var i; |
| if (typeof val === "object" && val !== null) { |
| for (i = 0; i < stack.length; i++) { |
| if (stack[i] === val) { |
| setReplace(CIRCULAR_REPLACE_NODE, val, k, parent); |
| return; |
| } |
| } |
| if (typeof options.depthLimit !== "undefined" && depth > options.depthLimit) { |
| setReplace(LIMIT_REPLACE_NODE, val, k, parent); |
| return; |
| } |
| if (typeof options.edgesLimit !== "undefined" && edgeIndex + 1 > options.edgesLimit) { |
| setReplace(LIMIT_REPLACE_NODE, val, k, parent); |
| return; |
| } |
| stack.push(val); |
| if (Array.isArray(val)) { |
| for (i = 0; i < val.length; i++) { |
| decirc(val[i], i, i, stack, val, depth, options); |
| } |
| } else { |
| var keys = Object.keys(val); |
| for (i = 0; i < keys.length; i++) { |
| var key = keys[i]; |
| decirc(val[key], key, i, stack, val, depth, options); |
| } |
| } |
| stack.pop(); |
| } |
| } |
| function compareFunction(a, b) { |
| if (a < b) { |
| return -1; |
| } |
| if (a > b) { |
| return 1; |
| } |
| return 0; |
| } |
| function deterministicStringify(obj, replacer, spacer, options) { |
| if (typeof options === "undefined") { |
| options = defaultOptions(); |
| } |
| var tmp = deterministicDecirc(obj, "", 0, [], void 0, 0, options) || obj; |
| var res; |
| try { |
| if (replacerStack.length === 0) { |
| res = JSON.stringify(tmp, replacer, spacer); |
| } else { |
| res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer); |
| } |
| } catch (_) { |
| return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]"); |
| } finally { |
| while (arr.length !== 0) { |
| var part = arr.pop(); |
| if (part.length === 4) { |
| Object.defineProperty(part[0], part[1], part[3]); |
| } else { |
| part[0][part[1]] = part[2]; |
| } |
| } |
| } |
| return res; |
| } |
| function deterministicDecirc(val, k, edgeIndex, stack, parent, depth, options) { |
| depth += 1; |
| var i; |
| if (typeof val === "object" && val !== null) { |
| for (i = 0; i < stack.length; i++) { |
| if (stack[i] === val) { |
| setReplace(CIRCULAR_REPLACE_NODE, val, k, parent); |
| return; |
| } |
| } |
| try { |
| if (typeof val.toJSON === "function") { |
| return; |
| } |
| } catch (_) { |
| return; |
| } |
| if (typeof options.depthLimit !== "undefined" && depth > options.depthLimit) { |
| setReplace(LIMIT_REPLACE_NODE, val, k, parent); |
| return; |
| } |
| if (typeof options.edgesLimit !== "undefined" && edgeIndex + 1 > options.edgesLimit) { |
| setReplace(LIMIT_REPLACE_NODE, val, k, parent); |
| return; |
| } |
| stack.push(val); |
| if (Array.isArray(val)) { |
| for (i = 0; i < val.length; i++) { |
| deterministicDecirc(val[i], i, i, stack, val, depth, options); |
| } |
| } else { |
| var tmp = {}; |
| var keys = Object.keys(val).sort(compareFunction); |
| for (i = 0; i < keys.length; i++) { |
| var key = keys[i]; |
| deterministicDecirc(val[key], key, i, stack, val, depth, options); |
| tmp[key] = val[key]; |
| } |
| if (typeof parent !== "undefined") { |
| arr.push([parent, k, val]); |
| parent[k] = tmp; |
| } else { |
| return tmp; |
| } |
| } |
| stack.pop(); |
| } |
| } |
| function replaceGetterValues(replacer) { |
| replacer = typeof replacer !== "undefined" ? replacer : function(k, v) { |
| return v; |
| }; |
| return function(key, val) { |
| if (replacerStack.length > 0) { |
| for (var i = 0; i < replacerStack.length; i++) { |
| var part = replacerStack[i]; |
| if (part[1] === key && part[0] === val) { |
| val = part[2]; |
| replacerStack.splice(i, 1); |
| break; |
| } |
| } |
| } |
| return replacer.call(this, key, val); |
| }; |
| } |
| } |
| }); |
|
|
| |
| var require_prettify_error = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/prettify-error.js"(exports, module) { |
| "use strict"; |
| module.exports = prettifyError; |
| var joinLinesWithIndentation = require_join_lines_with_indentation(); |
| function prettifyError({ keyName, lines, eol, ident }) { |
| let result = ""; |
| const joinedLines = joinLinesWithIndentation({ input: lines, ident, eol }); |
| const splitLines = `${ident}${keyName}: ${joinedLines}${eol}`.split(eol); |
| for (let j = 0; j < splitLines.length; j += 1) { |
| if (j !== 0) result += eol; |
| const line = splitLines[j]; |
| if (/^\s*"stack"/.test(line)) { |
| const matches = /^(\s*"stack":)\s*(".*"),?$/.exec(line); |
| if (matches && matches.length === 3) { |
| const indentSize = /^\s*/.exec(line)[0].length + 4; |
| const indentation = " ".repeat(indentSize); |
| const stackMessage = matches[2]; |
| result += matches[1] + eol + indentation + JSON.parse(stackMessage).replace(/\n/g, eol + indentation); |
| } else { |
| result += line; |
| } |
| } else { |
| result += line; |
| } |
| } |
| return result; |
| } |
| } |
| }); |
|
|
| |
| var require_prettify_object = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/prettify-object.js"(exports, module) { |
| "use strict"; |
| module.exports = prettifyObject; |
| var { |
| LOGGER_KEYS |
| } = require_constants(); |
| var stringifySafe = require_fast_safe_stringify(); |
| var joinLinesWithIndentation = require_join_lines_with_indentation(); |
| var prettifyError = require_prettify_error(); |
| function prettifyObject({ |
| log, |
| excludeLoggerKeys = true, |
| skipKeys = [], |
| context |
| }) { |
| const { |
| EOL: eol, |
| IDENT: ident, |
| customPrettifiers, |
| errorLikeObjectKeys: errorLikeKeys, |
| objectColorizer, |
| singleLine, |
| colorizer |
| } = context; |
| const keysToIgnore = [].concat(skipKeys); |
| if (excludeLoggerKeys === true) Array.prototype.push.apply(keysToIgnore, LOGGER_KEYS); |
| let result = ""; |
| const { plain, errors } = Object.entries(log).reduce(({ plain: plain2, errors: errors2 }, [k, v]) => { |
| if (keysToIgnore.includes(k) === false) { |
| const pretty = typeof customPrettifiers[k] === "function" ? customPrettifiers[k](v, k, log, { colors: colorizer.colors }) : v; |
| if (errorLikeKeys.includes(k)) { |
| errors2[k] = pretty; |
| } else { |
| plain2[k] = pretty; |
| } |
| } |
| return { plain: plain2, errors: errors2 }; |
| }, { plain: {}, errors: {} }); |
| if (singleLine) { |
| if (Object.keys(plain).length > 0) { |
| result += objectColorizer.greyMessage(stringifySafe(plain)); |
| } |
| result += eol; |
| result = result.replace(/\\\\/gi, "\\"); |
| } else { |
| Object.entries(plain).forEach(([keyName, keyValue]) => { |
| let lines = typeof customPrettifiers[keyName] === "function" ? keyValue : stringifySafe(keyValue, null, 2); |
| if (lines === void 0) return; |
| lines = lines.replace(/\\\\/gi, "\\"); |
| const joinedLines = joinLinesWithIndentation({ input: lines, ident, eol }); |
| result += `${ident}${objectColorizer.property(keyName)}:${joinedLines.startsWith(eol) ? "" : " "}${joinedLines}${eol}`; |
| }); |
| } |
| Object.entries(errors).forEach(([keyName, keyValue]) => { |
| const lines = typeof customPrettifiers[keyName] === "function" ? keyValue : stringifySafe(keyValue, null, 2); |
| if (lines === void 0) return; |
| result += prettifyError({ keyName, lines, eol, ident }); |
| }); |
| return result; |
| } |
| } |
| }); |
|
|
| |
| var require_prettify_error_log = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/prettify-error-log.js"(exports, module) { |
| "use strict"; |
| module.exports = prettifyErrorLog; |
| var { |
| LOGGER_KEYS |
| } = require_constants(); |
| var isObject = require_is_object(); |
| var joinLinesWithIndentation = require_join_lines_with_indentation(); |
| var prettifyObject = require_prettify_object(); |
| function prettifyErrorLog({ log, context }) { |
| const { |
| EOL: eol, |
| IDENT: ident, |
| errorProps: errorProperties, |
| messageKey |
| } = context; |
| const stack = log.stack; |
| const joinedLines = joinLinesWithIndentation({ input: stack, ident, eol }); |
| let result = `${ident}${joinedLines}${eol}`; |
| if (errorProperties.length > 0) { |
| const excludeProperties = LOGGER_KEYS.concat(messageKey, "type", "stack"); |
| let propertiesToPrint; |
| if (errorProperties[0] === "*") { |
| propertiesToPrint = Object.keys(log).filter((k) => excludeProperties.includes(k) === false); |
| } else { |
| propertiesToPrint = errorProperties.filter((k) => excludeProperties.includes(k) === false); |
| } |
| for (let i = 0; i < propertiesToPrint.length; i += 1) { |
| const key = propertiesToPrint[i]; |
| if (key in log === false) continue; |
| if (isObject(log[key])) { |
| const prettifiedObject = prettifyObject({ |
| log: log[key], |
| excludeLoggerKeys: false, |
| context: { |
| ...context, |
| IDENT: ident + ident |
| } |
| }); |
| result = `${result}${ident}${key}: {${eol}${prettifiedObject}${ident}}${eol}`; |
| continue; |
| } |
| result = `${result}${ident}${key}: ${log[key]}${eol}`; |
| } |
| } |
| return result; |
| } |
| } |
| }); |
|
|
| |
| var require_prettify_level = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/prettify-level.js"(exports, module) { |
| "use strict"; |
| module.exports = prettifyLevel; |
| var getPropertyValue = require_get_property_value(); |
| function prettifyLevel({ log, context }) { |
| const { |
| colorizer, |
| customLevels, |
| customLevelNames, |
| levelKey, |
| getLevelLabelData |
| } = context; |
| const prettifier = context.customPrettifiers?.level; |
| const output = getPropertyValue(log, levelKey); |
| if (output === void 0) return void 0; |
| const labelColorized = colorizer(output, { customLevels, customLevelNames }); |
| if (prettifier) { |
| const [label] = getLevelLabelData(output); |
| return prettifier(output, levelKey, log, { label, labelColorized, colors: colorizer.colors }); |
| } |
| return labelColorized; |
| } |
| } |
| }); |
|
|
| |
| var require_prettify_message = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/prettify-message.js"(exports, module) { |
| "use strict"; |
| module.exports = prettifyMessage; |
| var { |
| LEVELS |
| } = require_constants(); |
| var getPropertyValue = require_get_property_value(); |
| var interpretConditionals = require_interpret_conditionals(); |
| function prettifyMessage({ log, context }) { |
| const { |
| colorizer, |
| customLevels, |
| levelKey, |
| levelLabel, |
| messageFormat, |
| messageKey, |
| useOnlyCustomProps |
| } = context; |
| if (messageFormat && typeof messageFormat === "string") { |
| const parsedMessageFormat = interpretConditionals(messageFormat, log); |
| const message = String(parsedMessageFormat).replace( |
| /{([^{}]+)}/g, |
| function(match, p1) { |
| let level; |
| if (p1 === levelLabel && (level = getPropertyValue(log, levelKey)) !== void 0) { |
| const condition = useOnlyCustomProps ? customLevels === void 0 : customLevels[level] === void 0; |
| return condition ? LEVELS[level] : customLevels[level]; |
| } |
| const value = getPropertyValue(log, p1); |
| return value !== void 0 ? value : ""; |
| } |
| ); |
| return colorizer.message(message); |
| } |
| if (messageFormat && typeof messageFormat === "function") { |
| const msg = messageFormat(log, messageKey, levelLabel, { colors: colorizer.colors }); |
| return colorizer.message(msg); |
| } |
| if (messageKey in log === false) return void 0; |
| if (typeof log[messageKey] !== "string" && typeof log[messageKey] !== "number" && typeof log[messageKey] !== "boolean") return void 0; |
| return colorizer.message(log[messageKey]); |
| } |
| } |
| }); |
|
|
| |
| var require_prettify_metadata = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/prettify-metadata.js"(exports, module) { |
| "use strict"; |
| module.exports = prettifyMetadata; |
| function prettifyMetadata({ log, context }) { |
| const { customPrettifiers: prettifiers, colorizer } = context; |
| let line = ""; |
| if (log.name || log.pid || log.hostname) { |
| line += "("; |
| if (log.name) { |
| line += prettifiers.name ? prettifiers.name(log.name, "name", log, { colors: colorizer.colors }) : log.name; |
| } |
| if (log.pid) { |
| const prettyPid = prettifiers.pid ? prettifiers.pid(log.pid, "pid", log, { colors: colorizer.colors }) : log.pid; |
| if (log.name && log.pid) { |
| line += "/" + prettyPid; |
| } else { |
| line += prettyPid; |
| } |
| } |
| if (log.hostname) { |
| const prettyHostname = prettifiers.hostname ? prettifiers.hostname(log.hostname, "hostname", log, { colors: colorizer.colors }) : log.hostname; |
| line += `${line === "(" ? "on" : " on"} ${prettyHostname}`; |
| } |
| line += ")"; |
| } |
| if (log.caller) { |
| const prettyCaller = prettifiers.caller ? prettifiers.caller(log.caller, "caller", log, { colors: colorizer.colors }) : log.caller; |
| line += `${line === "" ? "" : " "}<${prettyCaller}>`; |
| } |
| if (line === "") { |
| return void 0; |
| } else { |
| return line; |
| } |
| } |
| } |
| }); |
|
|
| |
| var require_prettify_time = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/prettify-time.js"(exports, module) { |
| "use strict"; |
| module.exports = prettifyTime; |
| var formatTime = require_format_time(); |
| function prettifyTime({ log, context }) { |
| const { |
| timestampKey, |
| translateTime: translateFormat |
| } = context; |
| const prettifier = context.customPrettifiers?.time; |
| let time = null; |
| if (timestampKey in log) { |
| time = log[timestampKey]; |
| } else if ("timestamp" in log) { |
| time = log.timestamp; |
| } |
| if (time === null) return void 0; |
| const output = translateFormat ? formatTime(time, translateFormat) : time; |
| return prettifier ? prettifier(output) : `[${output}]`; |
| } |
| } |
| }); |
|
|
| |
| var require_utils = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/index.js"(exports, module) { |
| "use strict"; |
| module.exports = { |
| buildSafeSonicBoom: require_build_safe_sonic_boom(), |
| createDate: require_create_date(), |
| deleteLogProperty: require_delete_log_property(), |
| filterLog: require_filter_log(), |
| formatTime: require_format_time(), |
| getPropertyValue: require_get_property_value(), |
| handleCustomLevelsNamesOpts: require_handle_custom_levels_names_opts(), |
| handleCustomLevelsOpts: require_handle_custom_levels_opts(), |
| interpretConditionals: require_interpret_conditionals(), |
| isObject: require_is_object(), |
| isValidDate: require_is_valid_date(), |
| joinLinesWithIndentation: require_join_lines_with_indentation(), |
| noop: require_noop(), |
| parseFactoryOptions: require_parse_factory_options(), |
| prettifyErrorLog: require_prettify_error_log(), |
| prettifyError: require_prettify_error(), |
| prettifyLevel: require_prettify_level(), |
| prettifyMessage: require_prettify_message(), |
| prettifyMetadata: require_prettify_metadata(), |
| prettifyObject: require_prettify_object(), |
| prettifyTime: require_prettify_time(), |
| splitPropertyKey: require_split_property_key(), |
| getLevelLabelData: require_get_level_label_data() |
| }; |
| } |
| }); |
|
|
| |
| var require_secure_json_parse = __commonJS({ |
| "../../node_modules/.pnpm/secure-json-parse@4.1.0/node_modules/secure-json-parse/index.js"(exports, module) { |
| "use strict"; |
| var hasBuffer = typeof Buffer !== "undefined"; |
| var suspectProtoRx = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/; |
| var suspectConstructorRx = /"(?:c|\\u0063)(?:o|\\u006[Ff])(?:n|\\u006[Ee])(?:s|\\u0073)(?:t|\\u0074)(?:r|\\u0072)(?:u|\\u0075)(?:c|\\u0063)(?:t|\\u0074)(?:o|\\u006[Ff])(?:r|\\u0072)"\s*:/; |
| function _parse(text, reviver, options) { |
| if (options == null) { |
| if (reviver !== null && typeof reviver === "object") { |
| options = reviver; |
| reviver = void 0; |
| } |
| } |
| if (hasBuffer && Buffer.isBuffer(text)) { |
| text = text.toString(); |
| } |
| if (text && text.charCodeAt(0) === 65279) { |
| text = text.slice(1); |
| } |
| const obj = JSON.parse(text, reviver); |
| if (obj === null || typeof obj !== "object") { |
| return obj; |
| } |
| const protoAction = options && options.protoAction || "error"; |
| const constructorAction = options && options.constructorAction || "error"; |
| if (protoAction === "ignore" && constructorAction === "ignore") { |
| return obj; |
| } |
| if (protoAction !== "ignore" && constructorAction !== "ignore") { |
| if (suspectProtoRx.test(text) === false && suspectConstructorRx.test(text) === false) { |
| return obj; |
| } |
| } else if (protoAction !== "ignore" && constructorAction === "ignore") { |
| if (suspectProtoRx.test(text) === false) { |
| return obj; |
| } |
| } else { |
| if (suspectConstructorRx.test(text) === false) { |
| return obj; |
| } |
| } |
| return filter(obj, { protoAction, constructorAction, safe: options && options.safe }); |
| } |
| function filter(obj, { protoAction = "error", constructorAction = "error", safe } = {}) { |
| let next = [obj]; |
| while (next.length) { |
| const nodes = next; |
| next = []; |
| for (const node of nodes) { |
| if (protoAction !== "ignore" && Object.prototype.hasOwnProperty.call(node, "__proto__")) { |
| if (safe === true) { |
| return null; |
| } else if (protoAction === "error") { |
| throw new SyntaxError("Object contains forbidden prototype property"); |
| } |
| delete node.__proto__; |
| } |
| if (constructorAction !== "ignore" && Object.prototype.hasOwnProperty.call(node, "constructor") && node.constructor !== null && typeof node.constructor === "object" && Object.prototype.hasOwnProperty.call(node.constructor, "prototype")) { |
| if (safe === true) { |
| return null; |
| } else if (constructorAction === "error") { |
| throw new SyntaxError("Object contains forbidden prototype property"); |
| } |
| delete node.constructor; |
| } |
| for (const key in node) { |
| const value = node[key]; |
| if (value && typeof value === "object") { |
| next.push(value); |
| } |
| } |
| } |
| } |
| return obj; |
| } |
| function parse(text, reviver, options) { |
| const { stackTraceLimit } = Error; |
| Error.stackTraceLimit = 0; |
| try { |
| return _parse(text, reviver, options); |
| } finally { |
| Error.stackTraceLimit = stackTraceLimit; |
| } |
| } |
| function safeParse(text, reviver) { |
| const { stackTraceLimit } = Error; |
| Error.stackTraceLimit = 0; |
| try { |
| return _parse(text, reviver, { safe: true }); |
| } catch { |
| return void 0; |
| } finally { |
| Error.stackTraceLimit = stackTraceLimit; |
| } |
| } |
| module.exports = parse; |
| module.exports.default = parse; |
| module.exports.parse = parse; |
| module.exports.safeParse = safeParse; |
| module.exports.scan = filter; |
| } |
| }); |
|
|
| |
| var require_pretty = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/pretty.js"(exports, module) { |
| "use strict"; |
| module.exports = pretty; |
| var sjs = require_secure_json_parse(); |
| var isObject = require_is_object(); |
| var prettifyErrorLog = require_prettify_error_log(); |
| var prettifyLevel = require_prettify_level(); |
| var prettifyMessage = require_prettify_message(); |
| var prettifyMetadata = require_prettify_metadata(); |
| var prettifyObject = require_prettify_object(); |
| var prettifyTime = require_prettify_time(); |
| var filterLog = require_filter_log(); |
| var { |
| LEVELS, |
| LEVEL_KEY, |
| LEVEL_NAMES |
| } = require_constants(); |
| var jsonParser = (input) => { |
| try { |
| return { value: sjs.parse(input, { protoAction: "remove" }) }; |
| } catch (err) { |
| return { err }; |
| } |
| }; |
| function pretty(inputData) { |
| let log; |
| if (!isObject(inputData)) { |
| const parsed = jsonParser(inputData); |
| if (parsed.err || !isObject(parsed.value)) { |
| return inputData + this.EOL; |
| } |
| log = parsed.value; |
| } else { |
| log = inputData; |
| } |
| if (this.minimumLevel) { |
| let condition; |
| if (this.useOnlyCustomProps) { |
| condition = this.customLevels; |
| } else { |
| condition = this.customLevelNames[this.minimumLevel] !== void 0; |
| } |
| let minimum; |
| if (condition) { |
| minimum = this.customLevelNames[this.minimumLevel]; |
| } else { |
| minimum = LEVEL_NAMES[this.minimumLevel]; |
| } |
| if (!minimum) { |
| minimum = typeof this.minimumLevel === "string" ? LEVEL_NAMES[this.minimumLevel] : LEVEL_NAMES[LEVELS[this.minimumLevel].toLowerCase()]; |
| } |
| const level = log[this.levelKey === void 0 ? LEVEL_KEY : this.levelKey]; |
| if (level < minimum) return; |
| } |
| const prettifiedMessage = prettifyMessage({ log, context: this.context }); |
| if (this.ignoreKeys || this.includeKeys) { |
| log = filterLog({ log, context: this.context }); |
| } |
| const prettifiedLevel = prettifyLevel({ |
| log, |
| context: { |
| ...this.context, |
| |
| |
| |
| ...this.context.customProperties |
| } |
| }); |
| const prettifiedMetadata = prettifyMetadata({ log, context: this.context }); |
| const prettifiedTime = prettifyTime({ log, context: this.context }); |
| let line = ""; |
| if (this.levelFirst && prettifiedLevel) { |
| line = `${prettifiedLevel}`; |
| } |
| if (prettifiedTime && line === "") { |
| line = `${prettifiedTime}`; |
| } else if (prettifiedTime) { |
| line = `${line} ${prettifiedTime}`; |
| } |
| if (!this.levelFirst && prettifiedLevel) { |
| if (line.length > 0) { |
| line = `${line} ${prettifiedLevel}`; |
| } else { |
| line = prettifiedLevel; |
| } |
| } |
| if (prettifiedMetadata) { |
| if (line.length > 0) { |
| line = `${line} ${prettifiedMetadata}:`; |
| } else { |
| line = prettifiedMetadata; |
| } |
| } |
| if (line.endsWith(":") === false && line !== "") { |
| line += ":"; |
| } |
| if (prettifiedMessage !== void 0) { |
| if (line.length > 0) { |
| line = `${line} ${prettifiedMessage}`; |
| } else { |
| line = prettifiedMessage; |
| } |
| } |
| if (line.length > 0 && !this.singleLine) { |
| line += this.EOL; |
| } |
| if (log.type === "Error" && typeof log.stack === "string") { |
| const prettifiedErrorLog = prettifyErrorLog({ log, context: this.context }); |
| if (this.singleLine) line += this.EOL; |
| line += prettifiedErrorLog; |
| } else if (this.hideObject === false) { |
| const skipKeys = [ |
| this.messageKey, |
| this.levelKey, |
| this.timestampKey |
| ].map((key) => key.replaceAll(/\\/g, "")).filter((key) => { |
| return typeof log[key] === "string" || typeof log[key] === "number" || typeof log[key] === "boolean"; |
| }); |
| const prettifiedObject = prettifyObject({ |
| log, |
| skipKeys, |
| context: this.context |
| }); |
| if (this.singleLine && !/^\s$/.test(prettifiedObject)) { |
| line += " "; |
| } |
| line += prettifiedObject; |
| } |
| return line; |
| } |
| } |
| }); |
|
|
| |
| var require_pino_pretty = __commonJS({ |
| "../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/index.js"(exports, module) { |
| var { isColorSupported } = require_colorette(); |
| var pump = require_pump(); |
| var { Transform } = __require("node:stream"); |
| var abstractTransport = require_pino_abstract_transport(); |
| var colors = require_colors(); |
| var { |
| ERROR_LIKE_KEYS, |
| LEVEL_KEY, |
| LEVEL_LABEL, |
| MESSAGE_KEY, |
| TIMESTAMP_KEY |
| } = require_constants(); |
| var { |
| buildSafeSonicBoom, |
| parseFactoryOptions |
| } = require_utils(); |
| var pretty = require_pretty(); |
| var defaultOptions = { |
| colorize: isColorSupported, |
| colorizeObjects: true, |
| crlf: false, |
| customColors: null, |
| customLevels: null, |
| customPrettifiers: {}, |
| errorLikeObjectKeys: ERROR_LIKE_KEYS, |
| errorProps: "", |
| hideObject: false, |
| ignore: "hostname", |
| include: void 0, |
| levelFirst: false, |
| levelKey: LEVEL_KEY, |
| levelLabel: LEVEL_LABEL, |
| messageFormat: null, |
| messageKey: MESSAGE_KEY, |
| minimumLevel: void 0, |
| outputStream: process.stdout, |
| singleLine: false, |
| timestampKey: TIMESTAMP_KEY, |
| translateTime: true, |
| useOnlyCustomProps: true |
| }; |
| function prettyFactory(options) { |
| const context = parseFactoryOptions(Object.assign({}, defaultOptions, options)); |
| return pretty.bind({ ...context, context }); |
| } |
| function build(opts = {}) { |
| let pretty2 = prettyFactory(opts); |
| let destination; |
| return abstractTransport(function(source) { |
| source.on("message", function pinoConfigListener(message) { |
| if (!message || message.code !== "PINO_CONFIG") return; |
| Object.assign(opts, { |
| messageKey: message.config.messageKey, |
| errorLikeObjectKeys: Array.from( new Set([...opts.errorLikeObjectKeys || ERROR_LIKE_KEYS, message.config.errorKey])), |
| customLevels: message.config.levels.values |
| }); |
| pretty2 = prettyFactory(opts); |
| source.off("message", pinoConfigListener); |
| }); |
| const stream = new Transform({ |
| objectMode: true, |
| autoDestroy: true, |
| transform(chunk, enc, cb) { |
| const line = pretty2(chunk); |
| cb(null, line); |
| } |
| }); |
| if (typeof opts.destination === "object" && typeof opts.destination.write === "function") { |
| destination = opts.destination; |
| } else { |
| destination = buildSafeSonicBoom({ |
| dest: opts.destination || 1, |
| append: opts.append, |
| mkdir: opts.mkdir, |
| sync: opts.sync |
| |
| }); |
| } |
| source.on("unknown", function(line) { |
| destination.write(line + "\n"); |
| }); |
| pump(source, stream, destination); |
| return stream; |
| }, { |
| parse: "lines", |
| close(err, cb) { |
| destination.on("close", () => { |
| cb(err); |
| }); |
| } |
| }); |
| } |
| module.exports = build; |
| module.exports.build = build; |
| module.exports.PinoPretty = build; |
| module.exports.prettyFactory = prettyFactory; |
| module.exports.colorizerFactory = colors; |
| module.exports.isColorSupported = isColorSupported; |
| module.exports.default = build; |
| } |
| }); |
| export default require_pino_pretty(); |
| |
|
|