@mestreyoda/fabrica 0.2.16 → 0.2.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -1,12 +1,3 @@
1
- import { createRequire as __oc_createRequire } from "module";
2
- import { fileURLToPath as __oc_fileURLToPath } from "url";
3
- import { dirname as __oc_dirname, join as __oc_join } from "path";
4
- const __oc_filename = __oc_fileURLToPath(import.meta.url);
5
- const __oc_dirnameVal = __oc_dirname(__oc_filename);
6
- globalThis.__bundlerPathsOverrides = {
7
- "thread-stream-worker": __oc_join(__oc_dirnameVal, "lib", "worker.cjs"),
8
- "pino-worker": __oc_join(__oc_dirnameVal, "worker.cjs"),
9
- };
10
1
  var __create = Object.create;
11
2
  var __defProp = Object.defineProperty;
12
3
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -94160,7 +94151,7 @@ var require_thread_stream = __commonJS({
94160
94151
  var require_transport2 = __commonJS({
94161
94152
  "node_modules/pino/lib/transport.js"(exports2, module2) {
94162
94153
  "use strict";
94163
- var { createRequire: createRequire5 } = __require("module");
94154
+ var { createRequire: createRequire4 } = __require("module");
94164
94155
  var { existsSync: existsSync2 } = __require("node:fs");
94165
94156
  var getCallers = require_caller();
94166
94157
  var { join: join7, isAbsolute, sep } = __require("node:path");
@@ -94363,7 +94354,7 @@ var require_transport2 = __commonJS({
94363
94354
  for (const filePath of callers) {
94364
94355
  try {
94365
94356
  const context2 = filePath === "node:repl" ? process.cwd() + sep : filePath;
94366
- fixTarget2 = createRequire5(context2).resolve(origin);
94357
+ fixTarget2 = createRequire4(context2).resolve(origin);
94367
94358
  break;
94368
94359
  } catch (err) {
94369
94360
  continue;
@@ -96135,31 +96126,2597 @@ var require_pino = __commonJS({
96135
96126
  }
96136
96127
  });
96137
96128
 
96129
+ // node_modules/colorette/index.cjs
96130
+ var require_colorette = __commonJS({
96131
+ "node_modules/colorette/index.cjs"(exports2) {
96132
+ "use strict";
96133
+ Object.defineProperty(exports2, "__esModule", { value: true });
96134
+ var tty = __require("tty");
96135
+ function _interopNamespace(e2) {
96136
+ if (e2 && e2.__esModule) return e2;
96137
+ var n = /* @__PURE__ */ Object.create(null);
96138
+ if (e2) {
96139
+ Object.keys(e2).forEach(function(k) {
96140
+ if (k !== "default") {
96141
+ var d = Object.getOwnPropertyDescriptor(e2, k);
96142
+ Object.defineProperty(n, k, d.get ? d : {
96143
+ enumerable: true,
96144
+ get: function() {
96145
+ return e2[k];
96146
+ }
96147
+ });
96148
+ }
96149
+ });
96150
+ }
96151
+ n["default"] = e2;
96152
+ return Object.freeze(n);
96153
+ }
96154
+ var tty__namespace = /* @__PURE__ */ _interopNamespace(tty);
96155
+ var {
96156
+ env = {},
96157
+ argv = [],
96158
+ platform = ""
96159
+ } = typeof process === "undefined" ? {} : process;
96160
+ var isDisabled = "NO_COLOR" in env || argv.includes("--no-color");
96161
+ var isForced = "FORCE_COLOR" in env || argv.includes("--color");
96162
+ var isWindows = platform === "win32";
96163
+ var isDumbTerminal = env.TERM === "dumb";
96164
+ var isCompatibleTerminal = tty__namespace && tty__namespace.isatty && tty__namespace.isatty(1) && env.TERM && !isDumbTerminal;
96165
+ var isCI = "CI" in env && ("GITHUB_ACTIONS" in env || "GITLAB_CI" in env || "CIRCLECI" in env);
96166
+ var isColorSupported = !isDisabled && (isForced || isWindows && !isDumbTerminal || isCompatibleTerminal || isCI);
96167
+ var replaceClose = (index, string4, close, replace, head = string4.substring(0, index) + replace, tail = string4.substring(index + close.length), next = tail.indexOf(close)) => head + (next < 0 ? tail : replaceClose(next, tail, close, replace));
96168
+ var clearBleed = (index, string4, open, close, replace) => index < 0 ? open + string4 + close : open + replaceClose(index, string4, close, replace) + close;
96169
+ var filterEmpty = (open, close, replace = open, at = open.length + 1) => (string4) => string4 || !(string4 === "" || string4 === void 0) ? clearBleed(
96170
+ ("" + string4).indexOf(close, at),
96171
+ string4,
96172
+ open,
96173
+ close,
96174
+ replace
96175
+ ) : "";
96176
+ var init = (open, close, replace) => filterEmpty(`\x1B[${open}m`, `\x1B[${close}m`, replace);
96177
+ var colors = {
96178
+ reset: init(0, 0),
96179
+ bold: init(1, 22, "\x1B[22m\x1B[1m"),
96180
+ dim: init(2, 22, "\x1B[22m\x1B[2m"),
96181
+ italic: init(3, 23),
96182
+ underline: init(4, 24),
96183
+ inverse: init(7, 27),
96184
+ hidden: init(8, 28),
96185
+ strikethrough: init(9, 29),
96186
+ black: init(30, 39),
96187
+ red: init(31, 39),
96188
+ green: init(32, 39),
96189
+ yellow: init(33, 39),
96190
+ blue: init(34, 39),
96191
+ magenta: init(35, 39),
96192
+ cyan: init(36, 39),
96193
+ white: init(37, 39),
96194
+ gray: init(90, 39),
96195
+ bgBlack: init(40, 49),
96196
+ bgRed: init(41, 49),
96197
+ bgGreen: init(42, 49),
96198
+ bgYellow: init(43, 49),
96199
+ bgBlue: init(44, 49),
96200
+ bgMagenta: init(45, 49),
96201
+ bgCyan: init(46, 49),
96202
+ bgWhite: init(47, 49),
96203
+ blackBright: init(90, 39),
96204
+ redBright: init(91, 39),
96205
+ greenBright: init(92, 39),
96206
+ yellowBright: init(93, 39),
96207
+ blueBright: init(94, 39),
96208
+ magentaBright: init(95, 39),
96209
+ cyanBright: init(96, 39),
96210
+ whiteBright: init(97, 39),
96211
+ bgBlackBright: init(100, 49),
96212
+ bgRedBright: init(101, 49),
96213
+ bgGreenBright: init(102, 49),
96214
+ bgYellowBright: init(103, 49),
96215
+ bgBlueBright: init(104, 49),
96216
+ bgMagentaBright: init(105, 49),
96217
+ bgCyanBright: init(106, 49),
96218
+ bgWhiteBright: init(107, 49)
96219
+ };
96220
+ var createColors = ({ useColor = isColorSupported } = {}) => useColor ? colors : Object.keys(colors).reduce(
96221
+ (colors2, key) => ({ ...colors2, [key]: String }),
96222
+ {}
96223
+ );
96224
+ var {
96225
+ reset,
96226
+ bold,
96227
+ dim,
96228
+ italic,
96229
+ underline,
96230
+ inverse,
96231
+ hidden,
96232
+ strikethrough,
96233
+ black,
96234
+ red,
96235
+ green,
96236
+ yellow,
96237
+ blue,
96238
+ magenta,
96239
+ cyan,
96240
+ white,
96241
+ gray,
96242
+ bgBlack,
96243
+ bgRed,
96244
+ bgGreen,
96245
+ bgYellow,
96246
+ bgBlue,
96247
+ bgMagenta,
96248
+ bgCyan,
96249
+ bgWhite,
96250
+ blackBright,
96251
+ redBright,
96252
+ greenBright,
96253
+ yellowBright,
96254
+ blueBright,
96255
+ magentaBright,
96256
+ cyanBright,
96257
+ whiteBright,
96258
+ bgBlackBright,
96259
+ bgRedBright,
96260
+ bgGreenBright,
96261
+ bgYellowBright,
96262
+ bgBlueBright,
96263
+ bgMagentaBright,
96264
+ bgCyanBright,
96265
+ bgWhiteBright
96266
+ } = createColors();
96267
+ exports2.bgBlack = bgBlack;
96268
+ exports2.bgBlackBright = bgBlackBright;
96269
+ exports2.bgBlue = bgBlue;
96270
+ exports2.bgBlueBright = bgBlueBright;
96271
+ exports2.bgCyan = bgCyan;
96272
+ exports2.bgCyanBright = bgCyanBright;
96273
+ exports2.bgGreen = bgGreen;
96274
+ exports2.bgGreenBright = bgGreenBright;
96275
+ exports2.bgMagenta = bgMagenta;
96276
+ exports2.bgMagentaBright = bgMagentaBright;
96277
+ exports2.bgRed = bgRed;
96278
+ exports2.bgRedBright = bgRedBright;
96279
+ exports2.bgWhite = bgWhite;
96280
+ exports2.bgWhiteBright = bgWhiteBright;
96281
+ exports2.bgYellow = bgYellow;
96282
+ exports2.bgYellowBright = bgYellowBright;
96283
+ exports2.black = black;
96284
+ exports2.blackBright = blackBright;
96285
+ exports2.blue = blue;
96286
+ exports2.blueBright = blueBright;
96287
+ exports2.bold = bold;
96288
+ exports2.createColors = createColors;
96289
+ exports2.cyan = cyan;
96290
+ exports2.cyanBright = cyanBright;
96291
+ exports2.dim = dim;
96292
+ exports2.gray = gray;
96293
+ exports2.green = green;
96294
+ exports2.greenBright = greenBright;
96295
+ exports2.hidden = hidden;
96296
+ exports2.inverse = inverse;
96297
+ exports2.isColorSupported = isColorSupported;
96298
+ exports2.italic = italic;
96299
+ exports2.magenta = magenta;
96300
+ exports2.magentaBright = magentaBright;
96301
+ exports2.red = red;
96302
+ exports2.redBright = redBright;
96303
+ exports2.reset = reset;
96304
+ exports2.strikethrough = strikethrough;
96305
+ exports2.underline = underline;
96306
+ exports2.white = white;
96307
+ exports2.whiteBright = whiteBright;
96308
+ exports2.yellow = yellow;
96309
+ exports2.yellowBright = yellowBright;
96310
+ }
96311
+ });
96312
+
96313
+ // node_modules/wrappy/wrappy.js
96314
+ var require_wrappy = __commonJS({
96315
+ "node_modules/wrappy/wrappy.js"(exports2, module2) {
96316
+ module2.exports = wrappy;
96317
+ function wrappy(fn, cb) {
96318
+ if (fn && cb) return wrappy(fn)(cb);
96319
+ if (typeof fn !== "function")
96320
+ throw new TypeError("need wrapper function");
96321
+ Object.keys(fn).forEach(function(k) {
96322
+ wrapper[k] = fn[k];
96323
+ });
96324
+ return wrapper;
96325
+ function wrapper() {
96326
+ var args = new Array(arguments.length);
96327
+ for (var i2 = 0; i2 < args.length; i2++) {
96328
+ args[i2] = arguments[i2];
96329
+ }
96330
+ var ret = fn.apply(this, args);
96331
+ var cb2 = args[args.length - 1];
96332
+ if (typeof ret === "function" && ret !== cb2) {
96333
+ Object.keys(cb2).forEach(function(k) {
96334
+ ret[k] = cb2[k];
96335
+ });
96336
+ }
96337
+ return ret;
96338
+ }
96339
+ }
96340
+ }
96341
+ });
96342
+
96343
+ // node_modules/once/once.js
96344
+ var require_once = __commonJS({
96345
+ "node_modules/once/once.js"(exports2, module2) {
96346
+ var wrappy = require_wrappy();
96347
+ module2.exports = wrappy(once);
96348
+ module2.exports.strict = wrappy(onceStrict);
96349
+ once.proto = once(function() {
96350
+ Object.defineProperty(Function.prototype, "once", {
96351
+ value: function() {
96352
+ return once(this);
96353
+ },
96354
+ configurable: true
96355
+ });
96356
+ Object.defineProperty(Function.prototype, "onceStrict", {
96357
+ value: function() {
96358
+ return onceStrict(this);
96359
+ },
96360
+ configurable: true
96361
+ });
96362
+ });
96363
+ function once(fn) {
96364
+ var f3 = function() {
96365
+ if (f3.called) return f3.value;
96366
+ f3.called = true;
96367
+ return f3.value = fn.apply(this, arguments);
96368
+ };
96369
+ f3.called = false;
96370
+ return f3;
96371
+ }
96372
+ function onceStrict(fn) {
96373
+ var f3 = function() {
96374
+ if (f3.called)
96375
+ throw new Error(f3.onceError);
96376
+ f3.called = true;
96377
+ return f3.value = fn.apply(this, arguments);
96378
+ };
96379
+ var name = fn.name || "Function wrapped with `once`";
96380
+ f3.onceError = name + " shouldn't be called more than once";
96381
+ f3.called = false;
96382
+ return f3;
96383
+ }
96384
+ }
96385
+ });
96386
+
96387
+ // node_modules/end-of-stream/index.js
96388
+ var require_end_of_stream = __commonJS({
96389
+ "node_modules/end-of-stream/index.js"(exports2, module2) {
96390
+ var once = require_once();
96391
+ var noop2 = function() {
96392
+ };
96393
+ var qnt = global.Bare ? queueMicrotask : process.nextTick.bind(process);
96394
+ var isRequest2 = function(stream) {
96395
+ return stream.setHeader && typeof stream.abort === "function";
96396
+ };
96397
+ var isChildProcess = function(stream) {
96398
+ return stream.stdio && Array.isArray(stream.stdio) && stream.stdio.length === 3;
96399
+ };
96400
+ var eos = function(stream, opts, callback) {
96401
+ if (typeof opts === "function") return eos(stream, null, opts);
96402
+ if (!opts) opts = {};
96403
+ callback = once(callback || noop2);
96404
+ var ws = stream._writableState;
96405
+ var rs = stream._readableState;
96406
+ var readable = opts.readable || opts.readable !== false && stream.readable;
96407
+ var writable = opts.writable || opts.writable !== false && stream.writable;
96408
+ var cancelled = false;
96409
+ var onlegacyfinish = function() {
96410
+ if (!stream.writable) onfinish();
96411
+ };
96412
+ var onfinish = function() {
96413
+ writable = false;
96414
+ if (!readable) callback.call(stream);
96415
+ };
96416
+ var onend = function() {
96417
+ readable = false;
96418
+ if (!writable) callback.call(stream);
96419
+ };
96420
+ var onexit = function(exitCode) {
96421
+ callback.call(stream, exitCode ? new Error("exited with error code: " + exitCode) : null);
96422
+ };
96423
+ var onerror = function(err) {
96424
+ callback.call(stream, err);
96425
+ };
96426
+ var onclose = function() {
96427
+ qnt(onclosenexttick);
96428
+ };
96429
+ var onclosenexttick = function() {
96430
+ if (cancelled) return;
96431
+ if (readable && !(rs && (rs.ended && !rs.destroyed))) return callback.call(stream, new Error("premature close"));
96432
+ if (writable && !(ws && (ws.ended && !ws.destroyed))) return callback.call(stream, new Error("premature close"));
96433
+ };
96434
+ var onrequest = function() {
96435
+ stream.req.on("finish", onfinish);
96436
+ };
96437
+ if (isRequest2(stream)) {
96438
+ stream.on("complete", onfinish);
96439
+ stream.on("abort", onclose);
96440
+ if (stream.req) onrequest();
96441
+ else stream.on("request", onrequest);
96442
+ } else if (writable && !ws) {
96443
+ stream.on("end", onlegacyfinish);
96444
+ stream.on("close", onlegacyfinish);
96445
+ }
96446
+ if (isChildProcess(stream)) stream.on("exit", onexit);
96447
+ stream.on("end", onend);
96448
+ stream.on("finish", onfinish);
96449
+ if (opts.error !== false) stream.on("error", onerror);
96450
+ stream.on("close", onclose);
96451
+ return function() {
96452
+ cancelled = true;
96453
+ stream.removeListener("complete", onfinish);
96454
+ stream.removeListener("abort", onclose);
96455
+ stream.removeListener("request", onrequest);
96456
+ if (stream.req) stream.req.removeListener("finish", onfinish);
96457
+ stream.removeListener("end", onlegacyfinish);
96458
+ stream.removeListener("close", onlegacyfinish);
96459
+ stream.removeListener("finish", onfinish);
96460
+ stream.removeListener("exit", onexit);
96461
+ stream.removeListener("end", onend);
96462
+ stream.removeListener("error", onerror);
96463
+ stream.removeListener("close", onclose);
96464
+ };
96465
+ };
96466
+ module2.exports = eos;
96467
+ }
96468
+ });
96469
+
96470
+ // node_modules/pump/index.js
96471
+ var require_pump = __commonJS({
96472
+ "node_modules/pump/index.js"(exports2, module2) {
96473
+ var once = require_once();
96474
+ var eos = require_end_of_stream();
96475
+ var fs45;
96476
+ try {
96477
+ fs45 = __require("fs");
96478
+ } catch (e2) {
96479
+ }
96480
+ var noop2 = function() {
96481
+ };
96482
+ var ancient = typeof process === "undefined" ? false : /^v?\.0/.test(process.version);
96483
+ var isFn = function(fn) {
96484
+ return typeof fn === "function";
96485
+ };
96486
+ var isFS = function(stream) {
96487
+ if (!ancient) return false;
96488
+ if (!fs45) return false;
96489
+ return (stream instanceof (fs45.ReadStream || noop2) || stream instanceof (fs45.WriteStream || noop2)) && isFn(stream.close);
96490
+ };
96491
+ var isRequest2 = function(stream) {
96492
+ return stream.setHeader && isFn(stream.abort);
96493
+ };
96494
+ var destroyer = function(stream, reading, writing, callback) {
96495
+ callback = once(callback);
96496
+ var closed = false;
96497
+ stream.on("close", function() {
96498
+ closed = true;
96499
+ });
96500
+ eos(stream, { readable: reading, writable: writing }, function(err) {
96501
+ if (err) return callback(err);
96502
+ closed = true;
96503
+ callback();
96504
+ });
96505
+ var destroyed = false;
96506
+ return function(err) {
96507
+ if (closed) return;
96508
+ if (destroyed) return;
96509
+ destroyed = true;
96510
+ if (isFS(stream)) return stream.close(noop2);
96511
+ if (isRequest2(stream)) return stream.abort();
96512
+ if (isFn(stream.destroy)) return stream.destroy();
96513
+ callback(err || new Error("stream was destroyed"));
96514
+ };
96515
+ };
96516
+ var call = function(fn) {
96517
+ fn();
96518
+ };
96519
+ var pipe2 = function(from, to) {
96520
+ return from.pipe(to);
96521
+ };
96522
+ var pump2 = function() {
96523
+ var streams = Array.prototype.slice.call(arguments);
96524
+ var callback = isFn(streams[streams.length - 1] || noop2) && streams.pop() || noop2;
96525
+ if (Array.isArray(streams[0])) streams = streams[0];
96526
+ if (streams.length < 2) throw new Error("pump requires two streams per minimum");
96527
+ var error48;
96528
+ var destroys = streams.map(function(stream, i2) {
96529
+ var reading = i2 < streams.length - 1;
96530
+ var writing = i2 > 0;
96531
+ return destroyer(stream, reading, writing, function(err) {
96532
+ if (!error48) error48 = err;
96533
+ if (err) destroys.forEach(call);
96534
+ if (reading) return;
96535
+ destroys.forEach(call);
96536
+ callback(error48);
96537
+ });
96538
+ });
96539
+ return streams.reduce(pipe2);
96540
+ };
96541
+ module2.exports = pump2;
96542
+ }
96543
+ });
96544
+
96545
+ // node_modules/split2/index.js
96546
+ var require_split2 = __commonJS({
96547
+ "node_modules/split2/index.js"(exports2, module2) {
96548
+ "use strict";
96549
+ var { Transform } = __require("stream");
96550
+ var { StringDecoder } = __require("string_decoder");
96551
+ var kLast = Symbol("last");
96552
+ var kDecoder = Symbol("decoder");
96553
+ function transform2(chunk, enc, cb) {
96554
+ let list;
96555
+ if (this.overflow) {
96556
+ const buf = this[kDecoder].write(chunk);
96557
+ list = buf.split(this.matcher);
96558
+ if (list.length === 1) return cb();
96559
+ list.shift();
96560
+ this.overflow = false;
96561
+ } else {
96562
+ this[kLast] += this[kDecoder].write(chunk);
96563
+ list = this[kLast].split(this.matcher);
96564
+ }
96565
+ this[kLast] = list.pop();
96566
+ for (let i2 = 0; i2 < list.length; i2++) {
96567
+ try {
96568
+ push(this, this.mapper(list[i2]));
96569
+ } catch (error48) {
96570
+ return cb(error48);
96571
+ }
96572
+ }
96573
+ this.overflow = this[kLast].length > this.maxLength;
96574
+ if (this.overflow && !this.skipOverflow) {
96575
+ cb(new Error("maximum buffer reached"));
96576
+ return;
96577
+ }
96578
+ cb();
96579
+ }
96580
+ function flush(cb) {
96581
+ this[kLast] += this[kDecoder].end();
96582
+ if (this[kLast]) {
96583
+ try {
96584
+ push(this, this.mapper(this[kLast]));
96585
+ } catch (error48) {
96586
+ return cb(error48);
96587
+ }
96588
+ }
96589
+ cb();
96590
+ }
96591
+ function push(self2, val) {
96592
+ if (val !== void 0) {
96593
+ self2.push(val);
96594
+ }
96595
+ }
96596
+ function noop2(incoming) {
96597
+ return incoming;
96598
+ }
96599
+ function split(matcher, mapper, options) {
96600
+ matcher = matcher || /\r?\n/;
96601
+ mapper = mapper || noop2;
96602
+ options = options || {};
96603
+ switch (arguments.length) {
96604
+ case 1:
96605
+ if (typeof matcher === "function") {
96606
+ mapper = matcher;
96607
+ matcher = /\r?\n/;
96608
+ } else if (typeof matcher === "object" && !(matcher instanceof RegExp) && !matcher[Symbol.split]) {
96609
+ options = matcher;
96610
+ matcher = /\r?\n/;
96611
+ }
96612
+ break;
96613
+ case 2:
96614
+ if (typeof matcher === "function") {
96615
+ options = mapper;
96616
+ mapper = matcher;
96617
+ matcher = /\r?\n/;
96618
+ } else if (typeof mapper === "object") {
96619
+ options = mapper;
96620
+ mapper = noop2;
96621
+ }
96622
+ }
96623
+ options = Object.assign({}, options);
96624
+ options.autoDestroy = true;
96625
+ options.transform = transform2;
96626
+ options.flush = flush;
96627
+ options.readableObjectMode = true;
96628
+ const stream = new Transform(options);
96629
+ stream[kLast] = "";
96630
+ stream[kDecoder] = new StringDecoder("utf8");
96631
+ stream.matcher = matcher;
96632
+ stream.mapper = mapper;
96633
+ stream.maxLength = options.maxLength;
96634
+ stream.skipOverflow = options.skipOverflow || false;
96635
+ stream.overflow = false;
96636
+ stream._destroy = function(err, cb) {
96637
+ this._writableState.errorEmitted = false;
96638
+ cb(err);
96639
+ };
96640
+ return stream;
96641
+ }
96642
+ module2.exports = split;
96643
+ }
96644
+ });
96645
+
96646
+ // node_modules/pino-abstract-transport/index.js
96647
+ var require_pino_abstract_transport = __commonJS({
96648
+ "node_modules/pino-abstract-transport/index.js"(exports2, module2) {
96649
+ "use strict";
96650
+ var metadata = Symbol.for("pino.metadata");
96651
+ var split = require_split2();
96652
+ var { Duplex } = __require("stream");
96653
+ var { parentPort, workerData } = __require("worker_threads");
96654
+ function createDeferred() {
96655
+ let resolve3;
96656
+ let reject;
96657
+ const promise2 = new Promise((_resolve, _reject) => {
96658
+ resolve3 = _resolve;
96659
+ reject = _reject;
96660
+ });
96661
+ promise2.resolve = resolve3;
96662
+ promise2.reject = reject;
96663
+ return promise2;
96664
+ }
96665
+ module2.exports = function build(fn, opts = {}) {
96666
+ const waitForConfig = opts.expectPinoConfig === true && workerData?.workerData?.pinoWillSendConfig === true;
96667
+ const parseLines = opts.parse === "lines";
96668
+ const parseLine = typeof opts.parseLine === "function" ? opts.parseLine : JSON.parse;
96669
+ const close = opts.close || defaultClose;
96670
+ const stream = split(function(line) {
96671
+ let value;
96672
+ try {
96673
+ value = parseLine(line);
96674
+ } catch (error48) {
96675
+ this.emit("unknown", line, error48);
96676
+ return;
96677
+ }
96678
+ if (value === null) {
96679
+ this.emit("unknown", line, "Null value ignored");
96680
+ return;
96681
+ }
96682
+ if (typeof value !== "object") {
96683
+ value = {
96684
+ data: value,
96685
+ time: Date.now()
96686
+ };
96687
+ }
96688
+ if (stream[metadata]) {
96689
+ stream.lastTime = value.time;
96690
+ stream.lastLevel = value.level;
96691
+ stream.lastObj = value;
96692
+ }
96693
+ if (parseLines) {
96694
+ return line;
96695
+ }
96696
+ return value;
96697
+ }, { autoDestroy: true });
96698
+ stream._destroy = function(err, cb) {
96699
+ const promise2 = close(err, cb);
96700
+ if (promise2 && typeof promise2.then === "function") {
96701
+ promise2.then(cb, cb);
96702
+ }
96703
+ };
96704
+ if (opts.expectPinoConfig === true && workerData?.workerData?.pinoWillSendConfig !== true) {
96705
+ setImmediate(() => {
96706
+ stream.emit("error", new Error("This transport is not compatible with the current version of pino. Please upgrade pino to the latest version."));
96707
+ });
96708
+ }
96709
+ if (opts.metadata !== false) {
96710
+ stream[metadata] = true;
96711
+ stream.lastTime = 0;
96712
+ stream.lastLevel = 0;
96713
+ stream.lastObj = null;
96714
+ }
96715
+ if (waitForConfig) {
96716
+ let pinoConfig = {};
96717
+ const configReceived = createDeferred();
96718
+ parentPort.on("message", function handleMessage(message) {
96719
+ if (message.code === "PINO_CONFIG") {
96720
+ pinoConfig = message.config;
96721
+ configReceived.resolve();
96722
+ parentPort.off("message", handleMessage);
96723
+ }
96724
+ });
96725
+ Object.defineProperties(stream, {
96726
+ levels: {
96727
+ get() {
96728
+ return pinoConfig.levels;
96729
+ }
96730
+ },
96731
+ messageKey: {
96732
+ get() {
96733
+ return pinoConfig.messageKey;
96734
+ }
96735
+ },
96736
+ errorKey: {
96737
+ get() {
96738
+ return pinoConfig.errorKey;
96739
+ }
96740
+ }
96741
+ });
96742
+ return configReceived.then(finish);
96743
+ }
96744
+ return finish();
96745
+ function finish() {
96746
+ let res = fn(stream);
96747
+ if (res && typeof res.catch === "function") {
96748
+ res.catch((err) => {
96749
+ stream.destroy(err);
96750
+ });
96751
+ res = null;
96752
+ } else if (opts.enablePipelining && res) {
96753
+ return Duplex.from({ writable: stream, readable: res });
96754
+ }
96755
+ return stream;
96756
+ }
96757
+ };
96758
+ function defaultClose(err, cb) {
96759
+ process.nextTick(cb, err);
96760
+ }
96761
+ }
96762
+ });
96763
+
96764
+ // node_modules/pino-pretty/lib/constants.js
96765
+ var require_constants11 = __commonJS({
96766
+ "node_modules/pino-pretty/lib/constants.js"(exports2, module2) {
96767
+ "use strict";
96768
+ module2.exports = {
96769
+ DATE_FORMAT: "yyyy-mm-dd HH:MM:ss.l o",
96770
+ DATE_FORMAT_SIMPLE: "HH:MM:ss.l",
96771
+ /**
96772
+ * @type {K_ERROR_LIKE_KEYS}
96773
+ */
96774
+ ERROR_LIKE_KEYS: ["err", "error"],
96775
+ MESSAGE_KEY: "msg",
96776
+ LEVEL_KEY: "level",
96777
+ LEVEL_LABEL: "levelLabel",
96778
+ TIMESTAMP_KEY: "time",
96779
+ LEVELS: {
96780
+ default: "USERLVL",
96781
+ 60: "FATAL",
96782
+ 50: "ERROR",
96783
+ 40: "WARN",
96784
+ 30: "INFO",
96785
+ 20: "DEBUG",
96786
+ 10: "TRACE"
96787
+ },
96788
+ LEVEL_NAMES: {
96789
+ fatal: 60,
96790
+ error: 50,
96791
+ warn: 40,
96792
+ info: 30,
96793
+ debug: 20,
96794
+ trace: 10
96795
+ },
96796
+ // Object keys that probably came from a logger like Pino or Bunyan.
96797
+ LOGGER_KEYS: [
96798
+ "pid",
96799
+ "hostname",
96800
+ "name",
96801
+ "level",
96802
+ "time",
96803
+ "timestamp",
96804
+ "caller"
96805
+ ]
96806
+ };
96807
+ }
96808
+ });
96809
+
96810
+ // node_modules/pino-pretty/lib/utils/get-level-label-data.js
96811
+ var require_get_level_label_data = __commonJS({
96812
+ "node_modules/pino-pretty/lib/utils/get-level-label-data.js"(exports2, module2) {
96813
+ "use strict";
96814
+ module2.exports = getLevelLabelData;
96815
+ var { LEVELS, LEVEL_NAMES } = require_constants11();
96816
+ function getLevelLabelData(useOnlyCustomProps, customLevels, customLevelNames) {
96817
+ const levels = useOnlyCustomProps ? customLevels || LEVELS : Object.assign({}, LEVELS, customLevels);
96818
+ const levelNames = useOnlyCustomProps ? customLevelNames || LEVEL_NAMES : Object.assign({}, LEVEL_NAMES, customLevelNames);
96819
+ return function(level) {
96820
+ let levelNum = "default";
96821
+ if (Number.isInteger(+level)) {
96822
+ levelNum = Object.prototype.hasOwnProperty.call(levels, level) ? level : levelNum;
96823
+ } else {
96824
+ levelNum = Object.prototype.hasOwnProperty.call(levelNames, level.toLowerCase()) ? levelNames[level.toLowerCase()] : levelNum;
96825
+ }
96826
+ return [levels[levelNum], levelNum];
96827
+ };
96828
+ }
96829
+ }
96830
+ });
96831
+
96832
+ // node_modules/pino-pretty/lib/colors.js
96833
+ var require_colors = __commonJS({
96834
+ "node_modules/pino-pretty/lib/colors.js"(exports2, module2) {
96835
+ "use strict";
96836
+ var nocolor = (input) => input;
96837
+ var plain = {
96838
+ default: nocolor,
96839
+ 60: nocolor,
96840
+ 50: nocolor,
96841
+ 40: nocolor,
96842
+ 30: nocolor,
96843
+ 20: nocolor,
96844
+ 10: nocolor,
96845
+ message: nocolor,
96846
+ greyMessage: nocolor,
96847
+ property: nocolor
96848
+ };
96849
+ var { createColors } = require_colorette();
96850
+ var getLevelLabelData = require_get_level_label_data();
96851
+ var availableColors = createColors({ useColor: true });
96852
+ var { white, bgRed, red, yellow, green, blue, gray, cyan, magenta } = availableColors;
96853
+ var colored = {
96854
+ default: white,
96855
+ 60: bgRed,
96856
+ 50: red,
96857
+ 40: yellow,
96858
+ 30: green,
96859
+ 20: blue,
96860
+ 10: gray,
96861
+ message: cyan,
96862
+ greyMessage: gray,
96863
+ property: magenta
96864
+ };
96865
+ function resolveCustomColoredColorizer(customColors) {
96866
+ return customColors.reduce(
96867
+ function(agg, [level, color]) {
96868
+ agg[level] = typeof availableColors[color] === "function" ? availableColors[color] : white;
96869
+ return agg;
96870
+ },
96871
+ { default: white, message: cyan, greyMessage: gray, property: magenta }
96872
+ );
96873
+ }
96874
+ function colorizeLevel(useOnlyCustomProps) {
96875
+ return function(level, colorizer, { customLevels, customLevelNames } = {}) {
96876
+ const [levelStr, levelNum] = getLevelLabelData(useOnlyCustomProps, customLevels, customLevelNames)(level);
96877
+ return Object.prototype.hasOwnProperty.call(colorizer, levelNum) ? colorizer[levelNum](levelStr) : colorizer.default(levelStr);
96878
+ };
96879
+ }
96880
+ function plainColorizer(useOnlyCustomProps) {
96881
+ const newPlainColorizer = colorizeLevel(useOnlyCustomProps);
96882
+ const customColoredColorizer = function(level, opts) {
96883
+ return newPlainColorizer(level, plain, opts);
96884
+ };
96885
+ customColoredColorizer.message = plain.message;
96886
+ customColoredColorizer.greyMessage = plain.greyMessage;
96887
+ customColoredColorizer.property = plain.property;
96888
+ customColoredColorizer.colors = createColors({ useColor: false });
96889
+ return customColoredColorizer;
96890
+ }
96891
+ function coloredColorizer(useOnlyCustomProps) {
96892
+ const newColoredColorizer = colorizeLevel(useOnlyCustomProps);
96893
+ const customColoredColorizer = function(level, opts) {
96894
+ return newColoredColorizer(level, colored, opts);
96895
+ };
96896
+ customColoredColorizer.message = colored.message;
96897
+ customColoredColorizer.property = colored.property;
96898
+ customColoredColorizer.greyMessage = colored.greyMessage;
96899
+ customColoredColorizer.colors = availableColors;
96900
+ return customColoredColorizer;
96901
+ }
96902
+ function customColoredColorizerFactory(customColors, useOnlyCustomProps) {
96903
+ const onlyCustomColored = resolveCustomColoredColorizer(customColors);
96904
+ const customColored = useOnlyCustomProps ? onlyCustomColored : Object.assign({}, colored, onlyCustomColored);
96905
+ const colorizeLevelCustom = colorizeLevel(useOnlyCustomProps);
96906
+ const customColoredColorizer = function(level, opts) {
96907
+ return colorizeLevelCustom(level, customColored, opts);
96908
+ };
96909
+ customColoredColorizer.colors = availableColors;
96910
+ customColoredColorizer.message = customColoredColorizer.message || customColored.message;
96911
+ customColoredColorizer.property = customColoredColorizer.property || customColored.property;
96912
+ customColoredColorizer.greyMessage = customColoredColorizer.greyMessage || customColored.greyMessage;
96913
+ return customColoredColorizer;
96914
+ }
96915
+ module2.exports = function getColorizer(useColors = false, customColors, useOnlyCustomProps) {
96916
+ if (useColors && customColors !== void 0) {
96917
+ return customColoredColorizerFactory(customColors, useOnlyCustomProps);
96918
+ } else if (useColors) {
96919
+ return coloredColorizer(useOnlyCustomProps);
96920
+ }
96921
+ return plainColorizer(useOnlyCustomProps);
96922
+ };
96923
+ }
96924
+ });
96925
+
96926
+ // node_modules/pino-pretty/lib/utils/noop.js
96927
+ var require_noop = __commonJS({
96928
+ "node_modules/pino-pretty/lib/utils/noop.js"(exports2, module2) {
96929
+ "use strict";
96930
+ module2.exports = function noop2() {
96931
+ };
96932
+ }
96933
+ });
96934
+
96935
+ // node_modules/pino-pretty/lib/utils/build-safe-sonic-boom.js
96936
+ var require_build_safe_sonic_boom = __commonJS({
96937
+ "node_modules/pino-pretty/lib/utils/build-safe-sonic-boom.js"(exports2, module2) {
96938
+ "use strict";
96939
+ module2.exports = buildSafeSonicBoom;
96940
+ var { isMainThread } = __require("node:worker_threads");
96941
+ var SonicBoom = require_sonic_boom();
96942
+ var noop2 = require_noop();
96943
+ function buildSafeSonicBoom(opts) {
96944
+ const stream = new SonicBoom(opts);
96945
+ stream.on("error", filterBrokenPipe);
96946
+ if (!opts.sync && isMainThread) {
96947
+ setupOnExit(stream);
96948
+ }
96949
+ return stream;
96950
+ function filterBrokenPipe(err) {
96951
+ if (err.code === "EPIPE") {
96952
+ stream.write = noop2;
96953
+ stream.end = noop2;
96954
+ stream.flushSync = noop2;
96955
+ stream.destroy = noop2;
96956
+ return;
96957
+ }
96958
+ stream.removeListener("error", filterBrokenPipe);
96959
+ }
96960
+ }
96961
+ function setupOnExit(stream) {
96962
+ if (global.WeakRef && global.WeakMap && global.FinalizationRegistry) {
96963
+ const onExit = require_on_exit_leak_free();
96964
+ onExit.register(stream, autoEnd);
96965
+ stream.on("close", function() {
96966
+ onExit.unregister(stream);
96967
+ });
96968
+ }
96969
+ }
96970
+ function autoEnd(stream, eventName) {
96971
+ if (stream.destroyed) {
96972
+ return;
96973
+ }
96974
+ if (eventName === "beforeExit") {
96975
+ stream.flush();
96976
+ stream.on("drain", function() {
96977
+ stream.end();
96978
+ });
96979
+ } else {
96980
+ stream.flushSync();
96981
+ }
96982
+ }
96983
+ }
96984
+ });
96985
+
96986
+ // node_modules/pino-pretty/lib/utils/is-valid-date.js
96987
+ var require_is_valid_date = __commonJS({
96988
+ "node_modules/pino-pretty/lib/utils/is-valid-date.js"(exports2, module2) {
96989
+ "use strict";
96990
+ module2.exports = isValidDate;
96991
+ function isValidDate(date5) {
96992
+ return date5 instanceof Date && !Number.isNaN(date5.getTime());
96993
+ }
96994
+ }
96995
+ });
96996
+
96997
+ // node_modules/pino-pretty/lib/utils/create-date.js
96998
+ var require_create_date = __commonJS({
96999
+ "node_modules/pino-pretty/lib/utils/create-date.js"(exports2, module2) {
97000
+ "use strict";
97001
+ module2.exports = createDate;
97002
+ var isValidDate = require_is_valid_date();
97003
+ function createDate(epoch) {
97004
+ let date5 = new Date(epoch);
97005
+ if (isValidDate(date5)) {
97006
+ return date5;
97007
+ }
97008
+ date5 = /* @__PURE__ */ new Date(+epoch);
97009
+ return date5;
97010
+ }
97011
+ }
97012
+ });
97013
+
97014
+ // node_modules/pino-pretty/lib/utils/split-property-key.js
97015
+ var require_split_property_key = __commonJS({
97016
+ "node_modules/pino-pretty/lib/utils/split-property-key.js"(exports2, module2) {
97017
+ "use strict";
97018
+ module2.exports = splitPropertyKey;
97019
+ function splitPropertyKey(key) {
97020
+ const result = [];
97021
+ let backslash = false;
97022
+ let segment = "";
97023
+ for (let i2 = 0; i2 < key.length; i2++) {
97024
+ const c = key.charAt(i2);
97025
+ if (c === "\\") {
97026
+ backslash = true;
97027
+ continue;
97028
+ }
97029
+ if (backslash) {
97030
+ backslash = false;
97031
+ segment += c;
97032
+ continue;
97033
+ }
97034
+ if (c === ".") {
97035
+ result.push(segment);
97036
+ segment = "";
97037
+ continue;
97038
+ }
97039
+ segment += c;
97040
+ }
97041
+ if (segment.length) {
97042
+ result.push(segment);
97043
+ }
97044
+ return result;
97045
+ }
97046
+ }
97047
+ });
97048
+
97049
+ // node_modules/pino-pretty/lib/utils/get-property-value.js
97050
+ var require_get_property_value = __commonJS({
97051
+ "node_modules/pino-pretty/lib/utils/get-property-value.js"(exports2, module2) {
97052
+ "use strict";
97053
+ module2.exports = getPropertyValue;
97054
+ var splitPropertyKey = require_split_property_key();
97055
+ function getPropertyValue(obj, property) {
97056
+ const props = Array.isArray(property) ? property : splitPropertyKey(property);
97057
+ for (const prop of props) {
97058
+ if (!Object.prototype.hasOwnProperty.call(obj, prop)) {
97059
+ return;
97060
+ }
97061
+ obj = obj[prop];
97062
+ }
97063
+ return obj;
97064
+ }
97065
+ }
97066
+ });
97067
+
97068
+ // node_modules/pino-pretty/lib/utils/delete-log-property.js
97069
+ var require_delete_log_property = __commonJS({
97070
+ "node_modules/pino-pretty/lib/utils/delete-log-property.js"(exports2, module2) {
97071
+ "use strict";
97072
+ module2.exports = deleteLogProperty;
97073
+ var getPropertyValue = require_get_property_value();
97074
+ var splitPropertyKey = require_split_property_key();
97075
+ function deleteLogProperty(log3, property) {
97076
+ const props = splitPropertyKey(property);
97077
+ const propToDelete = props.pop();
97078
+ log3 = getPropertyValue(log3, props);
97079
+ if (log3 !== null && typeof log3 === "object" && Object.prototype.hasOwnProperty.call(log3, propToDelete)) {
97080
+ delete log3[propToDelete];
97081
+ }
97082
+ }
97083
+ }
97084
+ });
97085
+
97086
+ // node_modules/fast-copy/dist/cjs/index.cjs
97087
+ var require_cjs2 = __commonJS({
97088
+ "node_modules/fast-copy/dist/cjs/index.cjs"(exports2) {
97089
+ "use strict";
97090
+ var toStringFunction = Function.prototype.toString;
97091
+ var toStringObject = Object.prototype.toString;
97092
+ function getCleanClone(prototype) {
97093
+ if (!prototype) {
97094
+ return /* @__PURE__ */ Object.create(null);
97095
+ }
97096
+ const Constructor = prototype.constructor;
97097
+ if (Constructor === Object) {
97098
+ return prototype === Object.prototype ? {} : Object.create(prototype);
97099
+ }
97100
+ if (Constructor && ~toStringFunction.call(Constructor).indexOf("[native code]")) {
97101
+ try {
97102
+ return new Constructor();
97103
+ } catch (_a2) {
97104
+ }
97105
+ }
97106
+ return Object.create(prototype);
97107
+ }
97108
+ function getTag(value) {
97109
+ const stringTag = value[Symbol.toStringTag];
97110
+ if (stringTag) {
97111
+ return stringTag;
97112
+ }
97113
+ const type = toStringObject.call(value);
97114
+ return type.substring(8, type.length - 1);
97115
+ }
97116
+ var { hasOwnProperty, propertyIsEnumerable } = Object.prototype;
97117
+ function copyOwnDescriptor(original, clone3, property, state) {
97118
+ const ownDescriptor = Object.getOwnPropertyDescriptor(original, property) || {
97119
+ configurable: true,
97120
+ enumerable: true,
97121
+ value: original[property],
97122
+ writable: true
97123
+ };
97124
+ const descriptor = ownDescriptor.get || ownDescriptor.set ? ownDescriptor : {
97125
+ configurable: ownDescriptor.configurable,
97126
+ enumerable: ownDescriptor.enumerable,
97127
+ value: state.copier(ownDescriptor.value, state),
97128
+ writable: ownDescriptor.writable
97129
+ };
97130
+ try {
97131
+ Object.defineProperty(clone3, property, descriptor);
97132
+ } catch (_a2) {
97133
+ clone3[property] = descriptor.get ? descriptor.get() : descriptor.value;
97134
+ }
97135
+ }
97136
+ function copyOwnPropertiesStrict(value, clone3, state) {
97137
+ const names = Object.getOwnPropertyNames(value);
97138
+ for (let index = 0; index < names.length; ++index) {
97139
+ copyOwnDescriptor(value, clone3, names[index], state);
97140
+ }
97141
+ const symbols = Object.getOwnPropertySymbols(value);
97142
+ for (let index = 0; index < symbols.length; ++index) {
97143
+ copyOwnDescriptor(value, clone3, symbols[index], state);
97144
+ }
97145
+ return clone3;
97146
+ }
97147
+ function copyArrayLoose(array2, state) {
97148
+ const clone3 = new state.Constructor();
97149
+ state.cache.set(array2, clone3);
97150
+ for (let index = 0; index < array2.length; ++index) {
97151
+ clone3[index] = state.copier(array2[index], state);
97152
+ }
97153
+ return clone3;
97154
+ }
97155
+ function copyArrayStrict(array2, state) {
97156
+ const clone3 = new state.Constructor();
97157
+ state.cache.set(array2, clone3);
97158
+ return copyOwnPropertiesStrict(array2, clone3, state);
97159
+ }
97160
+ function copyArrayBuffer(arrayBuffer, _state) {
97161
+ return arrayBuffer.slice(0);
97162
+ }
97163
+ function copyBlob(blob, _state) {
97164
+ return blob.slice(0, blob.size, blob.type);
97165
+ }
97166
+ function copyDataView(dataView, state) {
97167
+ return new state.Constructor(copyArrayBuffer(dataView.buffer));
97168
+ }
97169
+ function copyDate(date5, state) {
97170
+ return new state.Constructor(date5.getTime());
97171
+ }
97172
+ function copyMapLoose(map2, state) {
97173
+ const clone3 = new state.Constructor();
97174
+ state.cache.set(map2, clone3);
97175
+ map2.forEach((value, key) => {
97176
+ clone3.set(key, state.copier(value, state));
97177
+ });
97178
+ return clone3;
97179
+ }
97180
+ function copyMapStrict(map2, state) {
97181
+ return copyOwnPropertiesStrict(map2, copyMapLoose(map2, state), state);
97182
+ }
97183
+ function copyObjectLoose(object2, state) {
97184
+ const clone3 = getCleanClone(state.prototype);
97185
+ state.cache.set(object2, clone3);
97186
+ for (const key in object2) {
97187
+ if (hasOwnProperty.call(object2, key)) {
97188
+ clone3[key] = state.copier(object2[key], state);
97189
+ }
97190
+ }
97191
+ const symbols = Object.getOwnPropertySymbols(object2);
97192
+ for (let index = 0; index < symbols.length; ++index) {
97193
+ const symbol2 = symbols[index];
97194
+ if (propertyIsEnumerable.call(object2, symbol2)) {
97195
+ clone3[symbol2] = state.copier(object2[symbol2], state);
97196
+ }
97197
+ }
97198
+ return clone3;
97199
+ }
97200
+ function copyObjectStrict(object2, state) {
97201
+ const clone3 = getCleanClone(state.prototype);
97202
+ state.cache.set(object2, clone3);
97203
+ return copyOwnPropertiesStrict(object2, clone3, state);
97204
+ }
97205
+ function copyPrimitiveWrapper(primitiveObject, state) {
97206
+ return new state.Constructor(primitiveObject.valueOf());
97207
+ }
97208
+ function copyRegExp(regExp, state) {
97209
+ const clone3 = new state.Constructor(regExp.source, regExp.flags);
97210
+ clone3.lastIndex = regExp.lastIndex;
97211
+ return clone3;
97212
+ }
97213
+ function copySelf(value, _state) {
97214
+ return value;
97215
+ }
97216
+ function copySetLoose(set2, state) {
97217
+ const clone3 = new state.Constructor();
97218
+ state.cache.set(set2, clone3);
97219
+ set2.forEach((value) => {
97220
+ clone3.add(state.copier(value, state));
97221
+ });
97222
+ return clone3;
97223
+ }
97224
+ function copySetStrict(set2, state) {
97225
+ return copyOwnPropertiesStrict(set2, copySetLoose(set2, state), state);
97226
+ }
97227
+ function createDefaultCache() {
97228
+ return /* @__PURE__ */ new WeakMap();
97229
+ }
97230
+ function getOptions({ createCache: createCacheOverride, methods: methodsOverride, strict }) {
97231
+ const defaultMethods = {
97232
+ array: strict ? copyArrayStrict : copyArrayLoose,
97233
+ arrayBuffer: copyArrayBuffer,
97234
+ asyncGenerator: copySelf,
97235
+ blob: copyBlob,
97236
+ dataView: copyDataView,
97237
+ date: copyDate,
97238
+ error: copySelf,
97239
+ generator: copySelf,
97240
+ map: strict ? copyMapStrict : copyMapLoose,
97241
+ object: strict ? copyObjectStrict : copyObjectLoose,
97242
+ regExp: copyRegExp,
97243
+ set: strict ? copySetStrict : copySetLoose
97244
+ };
97245
+ const methods = methodsOverride ? Object.assign(defaultMethods, methodsOverride) : defaultMethods;
97246
+ const copiers = getTagSpecificCopiers(methods);
97247
+ const createCache = createCacheOverride || createDefaultCache;
97248
+ if (!copiers.Object || !copiers.Array) {
97249
+ throw new Error("An object and array copier must be provided.");
97250
+ }
97251
+ return { createCache, copiers, methods, strict: Boolean(strict) };
97252
+ }
97253
+ function getTagSpecificCopiers(methods) {
97254
+ return {
97255
+ Arguments: methods.object,
97256
+ Array: methods.array,
97257
+ ArrayBuffer: methods.arrayBuffer,
97258
+ AsyncGenerator: methods.asyncGenerator,
97259
+ Blob: methods.blob,
97260
+ Boolean: copyPrimitiveWrapper,
97261
+ DataView: methods.dataView,
97262
+ Date: methods.date,
97263
+ Error: methods.error,
97264
+ Float32Array: methods.arrayBuffer,
97265
+ Float64Array: methods.arrayBuffer,
97266
+ Generator: methods.generator,
97267
+ Int8Array: methods.arrayBuffer,
97268
+ Int16Array: methods.arrayBuffer,
97269
+ Int32Array: methods.arrayBuffer,
97270
+ Map: methods.map,
97271
+ Number: copyPrimitiveWrapper,
97272
+ Object: methods.object,
97273
+ Promise: copySelf,
97274
+ RegExp: methods.regExp,
97275
+ Set: methods.set,
97276
+ String: copyPrimitiveWrapper,
97277
+ WeakMap: copySelf,
97278
+ WeakSet: copySelf,
97279
+ Uint8Array: methods.arrayBuffer,
97280
+ Uint8ClampedArray: methods.arrayBuffer,
97281
+ Uint16Array: methods.arrayBuffer,
97282
+ Uint32Array: methods.arrayBuffer,
97283
+ Uint64Array: methods.arrayBuffer
97284
+ };
97285
+ }
97286
+ function createCopier(options = {}) {
97287
+ const { createCache, copiers } = getOptions(options);
97288
+ const { Array: copyArray, Object: copyObject } = copiers;
97289
+ function copier(value, state) {
97290
+ state.prototype = state.Constructor = void 0;
97291
+ if (!value || typeof value !== "object") {
97292
+ return value;
97293
+ }
97294
+ if (state.cache.has(value)) {
97295
+ return state.cache.get(value);
97296
+ }
97297
+ state.prototype = Object.getPrototypeOf(value);
97298
+ state.Constructor = state.prototype && state.prototype.constructor;
97299
+ if (!state.Constructor || state.Constructor === Object) {
97300
+ return copyObject(value, state);
97301
+ }
97302
+ if (Array.isArray(value)) {
97303
+ return copyArray(value, state);
97304
+ }
97305
+ const tagSpecificCopier = copiers[getTag(value)];
97306
+ if (tagSpecificCopier) {
97307
+ return tagSpecificCopier(value, state);
97308
+ }
97309
+ return typeof value.then === "function" ? value : copyObject(value, state);
97310
+ }
97311
+ return function copy2(value) {
97312
+ return copier(value, {
97313
+ Constructor: void 0,
97314
+ cache: createCache(),
97315
+ copier,
97316
+ prototype: void 0
97317
+ });
97318
+ };
97319
+ }
97320
+ var copyStrict = createCopier({ strict: true });
97321
+ var copy = createCopier();
97322
+ exports2.copy = copy;
97323
+ exports2.copyStrict = copyStrict;
97324
+ exports2.createCopier = createCopier;
97325
+ }
97326
+ });
97327
+
97328
+ // node_modules/pino-pretty/lib/utils/filter-log.js
97329
+ var require_filter_log = __commonJS({
97330
+ "node_modules/pino-pretty/lib/utils/filter-log.js"(exports2, module2) {
97331
+ "use strict";
97332
+ module2.exports = filterLog;
97333
+ var { createCopier } = require_cjs2();
97334
+ var fastCopy = createCopier({});
97335
+ var deleteLogProperty = require_delete_log_property();
97336
+ function filterLog({ log: log3, context: context2 }) {
97337
+ const { ignoreKeys, includeKeys } = context2;
97338
+ const logCopy = fastCopy(log3);
97339
+ if (includeKeys) {
97340
+ const logIncluded = {};
97341
+ includeKeys.forEach((key) => {
97342
+ logIncluded[key] = logCopy[key];
97343
+ });
97344
+ return logIncluded;
97345
+ }
97346
+ ignoreKeys.forEach((ignoreKey) => {
97347
+ deleteLogProperty(logCopy, ignoreKey);
97348
+ });
97349
+ return logCopy;
97350
+ }
97351
+ }
97352
+ });
97353
+
97354
+ // node_modules/dateformat/lib/dateformat.js
97355
+ var require_dateformat = __commonJS({
97356
+ "node_modules/dateformat/lib/dateformat.js"(exports2, module2) {
97357
+ "use strict";
97358
+ function _typeof(obj) {
97359
+ "@babel/helpers - typeof";
97360
+ if (typeof Symbol === "function" && typeof Symbol.iterator === "symbol") {
97361
+ _typeof = function _typeof2(obj2) {
97362
+ return typeof obj2;
97363
+ };
97364
+ } else {
97365
+ _typeof = function _typeof2(obj2) {
97366
+ return obj2 && typeof Symbol === "function" && obj2.constructor === Symbol && obj2 !== Symbol.prototype ? "symbol" : typeof obj2;
97367
+ };
97368
+ }
97369
+ return _typeof(obj);
97370
+ }
97371
+ (function(global2) {
97372
+ var _arguments = arguments;
97373
+ var dateFormat = /* @__PURE__ */ (function() {
97374
+ var token = /d{1,4}|D{3,4}|m{1,4}|yy(?:yy)?|([HhMsTt])\1?|W{1,2}|[LlopSZN]|"[^"]*"|'[^']*'/g;
97375
+ var timezone = /\b(?:[PMCEA][SDP]T|(?:Pacific|Mountain|Central|Eastern|Atlantic) (?:Standard|Daylight|Prevailing) Time|(?:GMT|UTC)(?:[-+]\d{4})?)\b/g;
97376
+ var timezoneClip = /[^-+\dA-Z]/g;
97377
+ return function(date5, mask, utc, gmt) {
97378
+ if (_arguments.length === 1 && kindOf(date5) === "string" && !/\d/.test(date5)) {
97379
+ mask = date5;
97380
+ date5 = void 0;
97381
+ }
97382
+ date5 = date5 || date5 === 0 ? date5 : /* @__PURE__ */ new Date();
97383
+ if (!(date5 instanceof Date)) {
97384
+ date5 = new Date(date5);
97385
+ }
97386
+ if (isNaN(date5)) {
97387
+ throw TypeError("Invalid date");
97388
+ }
97389
+ mask = String(dateFormat.masks[mask] || mask || dateFormat.masks["default"]);
97390
+ var maskSlice = mask.slice(0, 4);
97391
+ if (maskSlice === "UTC:" || maskSlice === "GMT:") {
97392
+ mask = mask.slice(4);
97393
+ utc = true;
97394
+ if (maskSlice === "GMT:") {
97395
+ gmt = true;
97396
+ }
97397
+ }
97398
+ var _ = function _2() {
97399
+ return utc ? "getUTC" : "get";
97400
+ };
97401
+ var _d = function d() {
97402
+ return date5[_() + "Date"]();
97403
+ };
97404
+ var D = function D2() {
97405
+ return date5[_() + "Day"]();
97406
+ };
97407
+ var _m = function m2() {
97408
+ return date5[_() + "Month"]();
97409
+ };
97410
+ var y = function y2() {
97411
+ return date5[_() + "FullYear"]();
97412
+ };
97413
+ var _H = function H() {
97414
+ return date5[_() + "Hours"]();
97415
+ };
97416
+ var _M = function M() {
97417
+ return date5[_() + "Minutes"]();
97418
+ };
97419
+ var _s = function s2() {
97420
+ return date5[_() + "Seconds"]();
97421
+ };
97422
+ var _L = function L() {
97423
+ return date5[_() + "Milliseconds"]();
97424
+ };
97425
+ var _o = function o() {
97426
+ return utc ? 0 : date5.getTimezoneOffset();
97427
+ };
97428
+ var _W = function W() {
97429
+ return getWeek(date5);
97430
+ };
97431
+ var _N = function N() {
97432
+ return getDayOfWeek(date5);
97433
+ };
97434
+ var flags = { d: function d() {
97435
+ return _d();
97436
+ }, dd: function dd() {
97437
+ return pad(_d());
97438
+ }, ddd: function ddd() {
97439
+ return dateFormat.i18n.dayNames[D()];
97440
+ }, DDD: function DDD() {
97441
+ return getDayName({ y: y(), m: _m(), d: _d(), _: _(), dayName: dateFormat.i18n.dayNames[D()], short: true });
97442
+ }, dddd: function dddd() {
97443
+ return dateFormat.i18n.dayNames[D() + 7];
97444
+ }, DDDD: function DDDD() {
97445
+ return getDayName({ y: y(), m: _m(), d: _d(), _: _(), dayName: dateFormat.i18n.dayNames[D() + 7] });
97446
+ }, m: function m2() {
97447
+ return _m() + 1;
97448
+ }, mm: function mm() {
97449
+ return pad(_m() + 1);
97450
+ }, mmm: function mmm() {
97451
+ return dateFormat.i18n.monthNames[_m()];
97452
+ }, mmmm: function mmmm() {
97453
+ return dateFormat.i18n.monthNames[_m() + 12];
97454
+ }, yy: function yy() {
97455
+ return String(y()).slice(2);
97456
+ }, yyyy: function yyyy() {
97457
+ return pad(y(), 4);
97458
+ }, h: function h2() {
97459
+ return _H() % 12 || 12;
97460
+ }, hh: function hh() {
97461
+ return pad(_H() % 12 || 12);
97462
+ }, H: function H() {
97463
+ return _H();
97464
+ }, HH: function HH() {
97465
+ return pad(_H());
97466
+ }, M: function M() {
97467
+ return _M();
97468
+ }, MM: function MM() {
97469
+ return pad(_M());
97470
+ }, s: function s2() {
97471
+ return _s();
97472
+ }, ss: function ss() {
97473
+ return pad(_s());
97474
+ }, l: function l() {
97475
+ return pad(_L(), 3);
97476
+ }, L: function L() {
97477
+ return pad(Math.floor(_L() / 10));
97478
+ }, t: function t2() {
97479
+ return _H() < 12 ? dateFormat.i18n.timeNames[0] : dateFormat.i18n.timeNames[1];
97480
+ }, tt: function tt() {
97481
+ return _H() < 12 ? dateFormat.i18n.timeNames[2] : dateFormat.i18n.timeNames[3];
97482
+ }, T: function T() {
97483
+ return _H() < 12 ? dateFormat.i18n.timeNames[4] : dateFormat.i18n.timeNames[5];
97484
+ }, TT: function TT() {
97485
+ return _H() < 12 ? dateFormat.i18n.timeNames[6] : dateFormat.i18n.timeNames[7];
97486
+ }, Z: function Z2() {
97487
+ return gmt ? "GMT" : utc ? "UTC" : (String(date5).match(timezone) || [""]).pop().replace(timezoneClip, "").replace(/GMT\+0000/g, "UTC");
97488
+ }, o: function o() {
97489
+ return (_o() > 0 ? "-" : "+") + pad(Math.floor(Math.abs(_o()) / 60) * 100 + Math.abs(_o()) % 60, 4);
97490
+ }, p: function p() {
97491
+ return (_o() > 0 ? "-" : "+") + pad(Math.floor(Math.abs(_o()) / 60), 2) + ":" + pad(Math.floor(Math.abs(_o()) % 60), 2);
97492
+ }, S: function S2() {
97493
+ return ["th", "st", "nd", "rd"][_d() % 10 > 3 ? 0 : (_d() % 100 - _d() % 10 != 10) * _d() % 10];
97494
+ }, W: function W() {
97495
+ return _W();
97496
+ }, WW: function WW() {
97497
+ return pad(_W());
97498
+ }, N: function N() {
97499
+ return _N();
97500
+ } };
97501
+ return mask.replace(token, function(match) {
97502
+ if (match in flags) {
97503
+ return flags[match]();
97504
+ }
97505
+ return match.slice(1, match.length - 1);
97506
+ });
97507
+ };
97508
+ })();
97509
+ 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" };
97510
+ 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"] };
97511
+ var pad = function pad2(val, len) {
97512
+ val = String(val);
97513
+ len = len || 2;
97514
+ while (val.length < len) {
97515
+ val = "0" + val;
97516
+ }
97517
+ return val;
97518
+ };
97519
+ var getDayName = function getDayName2(_ref) {
97520
+ var y = _ref.y, m2 = _ref.m, d = _ref.d, _ = _ref._, dayName = _ref.dayName, _ref$short = _ref["short"], _short = _ref$short === void 0 ? false : _ref$short;
97521
+ var today = /* @__PURE__ */ new Date();
97522
+ var yesterday = /* @__PURE__ */ new Date();
97523
+ yesterday.setDate(yesterday[_ + "Date"]() - 1);
97524
+ var tomorrow = /* @__PURE__ */ new Date();
97525
+ tomorrow.setDate(tomorrow[_ + "Date"]() + 1);
97526
+ var today_d = function today_d2() {
97527
+ return today[_ + "Date"]();
97528
+ };
97529
+ var today_m = function today_m2() {
97530
+ return today[_ + "Month"]();
97531
+ };
97532
+ var today_y = function today_y2() {
97533
+ return today[_ + "FullYear"]();
97534
+ };
97535
+ var yesterday_d = function yesterday_d2() {
97536
+ return yesterday[_ + "Date"]();
97537
+ };
97538
+ var yesterday_m = function yesterday_m2() {
97539
+ return yesterday[_ + "Month"]();
97540
+ };
97541
+ var yesterday_y = function yesterday_y2() {
97542
+ return yesterday[_ + "FullYear"]();
97543
+ };
97544
+ var tomorrow_d = function tomorrow_d2() {
97545
+ return tomorrow[_ + "Date"]();
97546
+ };
97547
+ var tomorrow_m = function tomorrow_m2() {
97548
+ return tomorrow[_ + "Month"]();
97549
+ };
97550
+ var tomorrow_y = function tomorrow_y2() {
97551
+ return tomorrow[_ + "FullYear"]();
97552
+ };
97553
+ if (today_y() === y && today_m() === m2 && today_d() === d) {
97554
+ return _short ? "Tdy" : "Today";
97555
+ } else if (yesterday_y() === y && yesterday_m() === m2 && yesterday_d() === d) {
97556
+ return _short ? "Ysd" : "Yesterday";
97557
+ } else if (tomorrow_y() === y && tomorrow_m() === m2 && tomorrow_d() === d) {
97558
+ return _short ? "Tmw" : "Tomorrow";
97559
+ }
97560
+ return dayName;
97561
+ };
97562
+ var getWeek = function getWeek2(date5) {
97563
+ var targetThursday = new Date(date5.getFullYear(), date5.getMonth(), date5.getDate());
97564
+ targetThursday.setDate(targetThursday.getDate() - (targetThursday.getDay() + 6) % 7 + 3);
97565
+ var firstThursday = new Date(targetThursday.getFullYear(), 0, 4);
97566
+ firstThursday.setDate(firstThursday.getDate() - (firstThursday.getDay() + 6) % 7 + 3);
97567
+ var ds = targetThursday.getTimezoneOffset() - firstThursday.getTimezoneOffset();
97568
+ targetThursday.setHours(targetThursday.getHours() - ds);
97569
+ var weekDiff = (targetThursday - firstThursday) / (864e5 * 7);
97570
+ return 1 + Math.floor(weekDiff);
97571
+ };
97572
+ var getDayOfWeek = function getDayOfWeek2(date5) {
97573
+ var dow = date5.getDay();
97574
+ if (dow === 0) {
97575
+ dow = 7;
97576
+ }
97577
+ return dow;
97578
+ };
97579
+ var kindOf = function kindOf2(val) {
97580
+ if (val === null) {
97581
+ return "null";
97582
+ }
97583
+ if (val === void 0) {
97584
+ return "undefined";
97585
+ }
97586
+ if (_typeof(val) !== "object") {
97587
+ return _typeof(val);
97588
+ }
97589
+ if (Array.isArray(val)) {
97590
+ return "array";
97591
+ }
97592
+ return {}.toString.call(val).slice(8, -1).toLowerCase();
97593
+ };
97594
+ if (typeof define === "function" && define.amd) {
97595
+ define(function() {
97596
+ return dateFormat;
97597
+ });
97598
+ } else if ((typeof exports2 === "undefined" ? "undefined" : _typeof(exports2)) === "object") {
97599
+ module2.exports = dateFormat;
97600
+ } else {
97601
+ global2.dateFormat = dateFormat;
97602
+ }
97603
+ })(void 0);
97604
+ }
97605
+ });
97606
+
97607
+ // node_modules/pino-pretty/lib/utils/format-time.js
97608
+ var require_format_time = __commonJS({
97609
+ "node_modules/pino-pretty/lib/utils/format-time.js"(exports2, module2) {
97610
+ "use strict";
97611
+ module2.exports = formatTime;
97612
+ var {
97613
+ DATE_FORMAT,
97614
+ DATE_FORMAT_SIMPLE
97615
+ } = require_constants11();
97616
+ var dateformat = require_dateformat();
97617
+ var createDate = require_create_date();
97618
+ var isValidDate = require_is_valid_date();
97619
+ function formatTime(epoch, translateTime = false) {
97620
+ if (translateTime === false) {
97621
+ return epoch;
97622
+ }
97623
+ const instant = createDate(epoch);
97624
+ if (!isValidDate(instant)) {
97625
+ return epoch;
97626
+ }
97627
+ if (translateTime === true) {
97628
+ return dateformat(instant, DATE_FORMAT_SIMPLE);
97629
+ }
97630
+ const upperFormat = translateTime.toUpperCase();
97631
+ if (upperFormat === "SYS:STANDARD") {
97632
+ return dateformat(instant, DATE_FORMAT);
97633
+ }
97634
+ const prefix = upperFormat.substr(0, 4);
97635
+ if (prefix === "SYS:" || prefix === "UTC:") {
97636
+ if (prefix === "UTC:") {
97637
+ return dateformat(instant, translateTime);
97638
+ }
97639
+ return dateformat(instant, translateTime.slice(4));
97640
+ }
97641
+ return dateformat(instant, `UTC:${translateTime}`);
97642
+ }
97643
+ }
97644
+ });
97645
+
97646
+ // node_modules/pino-pretty/lib/utils/handle-custom-levels-names-opts.js
97647
+ var require_handle_custom_levels_names_opts = __commonJS({
97648
+ "node_modules/pino-pretty/lib/utils/handle-custom-levels-names-opts.js"(exports2, module2) {
97649
+ "use strict";
97650
+ module2.exports = handleCustomLevelsNamesOpts;
97651
+ function handleCustomLevelsNamesOpts(cLevels) {
97652
+ if (!cLevels) return {};
97653
+ if (typeof cLevels === "string") {
97654
+ return cLevels.split(",").reduce((agg, value, idx) => {
97655
+ const [levelName, levelNum = idx] = value.split(":");
97656
+ agg[levelName.toLowerCase()] = levelNum;
97657
+ return agg;
97658
+ }, {});
97659
+ } else if (Object.prototype.toString.call(cLevels) === "[object Object]") {
97660
+ return Object.keys(cLevels).reduce((agg, levelName) => {
97661
+ agg[levelName.toLowerCase()] = cLevels[levelName];
97662
+ return agg;
97663
+ }, {});
97664
+ } else {
97665
+ return {};
97666
+ }
97667
+ }
97668
+ }
97669
+ });
97670
+
97671
+ // node_modules/pino-pretty/lib/utils/handle-custom-levels-opts.js
97672
+ var require_handle_custom_levels_opts = __commonJS({
97673
+ "node_modules/pino-pretty/lib/utils/handle-custom-levels-opts.js"(exports2, module2) {
97674
+ "use strict";
97675
+ module2.exports = handleCustomLevelsOpts;
97676
+ function handleCustomLevelsOpts(cLevels) {
97677
+ if (!cLevels) return {};
97678
+ if (typeof cLevels === "string") {
97679
+ return cLevels.split(",").reduce(
97680
+ (agg, value, idx) => {
97681
+ const [levelName, levelNum = idx] = value.split(":");
97682
+ agg[levelNum] = levelName.toUpperCase();
97683
+ return agg;
97684
+ },
97685
+ { default: "USERLVL" }
97686
+ );
97687
+ } else if (Object.prototype.toString.call(cLevels) === "[object Object]") {
97688
+ return Object.keys(cLevels).reduce((agg, levelName) => {
97689
+ agg[cLevels[levelName]] = levelName.toUpperCase();
97690
+ return agg;
97691
+ }, { default: "USERLVL" });
97692
+ } else {
97693
+ return {};
97694
+ }
97695
+ }
97696
+ }
97697
+ });
97698
+
97699
+ // node_modules/pino-pretty/lib/utils/interpret-conditionals.js
97700
+ var require_interpret_conditionals = __commonJS({
97701
+ "node_modules/pino-pretty/lib/utils/interpret-conditionals.js"(exports2, module2) {
97702
+ "use strict";
97703
+ module2.exports = interpretConditionals;
97704
+ var getPropertyValue = require_get_property_value();
97705
+ function interpretConditionals(messageFormat, log3) {
97706
+ messageFormat = messageFormat.replace(/{if (.*?)}(.*?){end}/g, replacer);
97707
+ messageFormat = messageFormat.replace(/{if (.*?)}/g, "");
97708
+ messageFormat = messageFormat.replace(/{end}/g, "");
97709
+ return messageFormat.replace(/\s+/g, " ").trim();
97710
+ function replacer(_, key, value) {
97711
+ const propertyValue = getPropertyValue(log3, key);
97712
+ if (propertyValue && value.includes(key)) {
97713
+ return value.replace(new RegExp("{" + key + "}", "g"), propertyValue);
97714
+ } else {
97715
+ return "";
97716
+ }
97717
+ }
97718
+ }
97719
+ }
97720
+ });
97721
+
97722
+ // node_modules/pino-pretty/lib/utils/is-object.js
97723
+ var require_is_object = __commonJS({
97724
+ "node_modules/pino-pretty/lib/utils/is-object.js"(exports2, module2) {
97725
+ "use strict";
97726
+ module2.exports = isObject2;
97727
+ function isObject2(input) {
97728
+ return Object.prototype.toString.apply(input) === "[object Object]";
97729
+ }
97730
+ }
97731
+ });
97732
+
97733
+ // node_modules/pino-pretty/lib/utils/join-lines-with-indentation.js
97734
+ var require_join_lines_with_indentation = __commonJS({
97735
+ "node_modules/pino-pretty/lib/utils/join-lines-with-indentation.js"(exports2, module2) {
97736
+ "use strict";
97737
+ module2.exports = joinLinesWithIndentation;
97738
+ function joinLinesWithIndentation({ input, ident = " ", eol = "\n" }) {
97739
+ const lines = input.split(/\r?\n/);
97740
+ for (let i2 = 1; i2 < lines.length; i2 += 1) {
97741
+ lines[i2] = ident + lines[i2];
97742
+ }
97743
+ return lines.join(eol);
97744
+ }
97745
+ }
97746
+ });
97747
+
97748
+ // node_modules/pino-pretty/lib/utils/parse-factory-options.js
97749
+ var require_parse_factory_options = __commonJS({
97750
+ "node_modules/pino-pretty/lib/utils/parse-factory-options.js"(exports2, module2) {
97751
+ "use strict";
97752
+ module2.exports = parseFactoryOptions;
97753
+ var {
97754
+ LEVEL_NAMES
97755
+ } = require_constants11();
97756
+ var colors = require_colors();
97757
+ var handleCustomLevelsOpts = require_handle_custom_levels_opts();
97758
+ var handleCustomLevelsNamesOpts = require_handle_custom_levels_names_opts();
97759
+ var handleLevelLabelData = require_get_level_label_data();
97760
+ function parseFactoryOptions(options) {
97761
+ const EOL = options.crlf ? "\r\n" : "\n";
97762
+ const IDENT = " ";
97763
+ const {
97764
+ customPrettifiers,
97765
+ errorLikeObjectKeys,
97766
+ hideObject,
97767
+ levelFirst,
97768
+ levelKey,
97769
+ levelLabel,
97770
+ messageFormat,
97771
+ messageKey,
97772
+ minimumLevel,
97773
+ singleLine,
97774
+ timestampKey,
97775
+ translateTime
97776
+ } = options;
97777
+ const errorProps = options.errorProps.split(",");
97778
+ const useOnlyCustomProps = typeof options.useOnlyCustomProps === "boolean" ? options.useOnlyCustomProps : options.useOnlyCustomProps === "true";
97779
+ const customLevels = handleCustomLevelsOpts(options.customLevels);
97780
+ const customLevelNames = handleCustomLevelsNamesOpts(options.customLevels);
97781
+ const getLevelLabelData = handleLevelLabelData(useOnlyCustomProps, customLevels, customLevelNames);
97782
+ let customColors;
97783
+ if (options.customColors) {
97784
+ if (typeof options.customColors === "string") {
97785
+ customColors = options.customColors.split(",").reduce((agg, value) => {
97786
+ const [level, color] = value.split(":");
97787
+ const condition = useOnlyCustomProps ? options.customLevels : customLevelNames[level] !== void 0;
97788
+ const levelNum = condition ? customLevelNames[level] : LEVEL_NAMES[level];
97789
+ const colorIdx = levelNum !== void 0 ? levelNum : level;
97790
+ agg.push([colorIdx, color]);
97791
+ return agg;
97792
+ }, []);
97793
+ } else if (typeof options.customColors === "object") {
97794
+ customColors = Object.keys(options.customColors).reduce((agg, value) => {
97795
+ const [level, color] = [value, options.customColors[value]];
97796
+ const condition = useOnlyCustomProps ? options.customLevels : customLevelNames[level] !== void 0;
97797
+ const levelNum = condition ? customLevelNames[level] : LEVEL_NAMES[level];
97798
+ const colorIdx = levelNum !== void 0 ? levelNum : level;
97799
+ agg.push([colorIdx, color]);
97800
+ return agg;
97801
+ }, []);
97802
+ } else {
97803
+ throw new Error("options.customColors must be of type string or object.");
97804
+ }
97805
+ }
97806
+ const customProperties = { customLevels, customLevelNames };
97807
+ if (useOnlyCustomProps === true && !options.customLevels) {
97808
+ customProperties.customLevels = void 0;
97809
+ customProperties.customLevelNames = void 0;
97810
+ }
97811
+ const includeKeys = options.include !== void 0 ? new Set(options.include.split(",")) : void 0;
97812
+ const ignoreKeys = !includeKeys && options.ignore ? new Set(options.ignore.split(",")) : void 0;
97813
+ const colorizer = colors(options.colorize, customColors, useOnlyCustomProps);
97814
+ const objectColorizer = options.colorizeObjects ? colorizer : colors(false, [], false);
97815
+ return {
97816
+ EOL,
97817
+ IDENT,
97818
+ colorizer,
97819
+ customColors,
97820
+ customLevelNames,
97821
+ customLevels,
97822
+ customPrettifiers,
97823
+ customProperties,
97824
+ errorLikeObjectKeys,
97825
+ errorProps,
97826
+ getLevelLabelData,
97827
+ hideObject,
97828
+ ignoreKeys,
97829
+ includeKeys,
97830
+ levelFirst,
97831
+ levelKey,
97832
+ levelLabel,
97833
+ messageFormat,
97834
+ messageKey,
97835
+ minimumLevel,
97836
+ objectColorizer,
97837
+ singleLine,
97838
+ timestampKey,
97839
+ translateTime,
97840
+ useOnlyCustomProps
97841
+ };
97842
+ }
97843
+ }
97844
+ });
97845
+
97846
+ // node_modules/fast-safe-stringify/index.js
97847
+ var require_fast_safe_stringify = __commonJS({
97848
+ "node_modules/fast-safe-stringify/index.js"(exports2, module2) {
97849
+ module2.exports = stringify;
97850
+ stringify.default = stringify;
97851
+ stringify.stable = deterministicStringify;
97852
+ stringify.stableStringify = deterministicStringify;
97853
+ var LIMIT_REPLACE_NODE = "[...]";
97854
+ var CIRCULAR_REPLACE_NODE = "[Circular]";
97855
+ var arr = [];
97856
+ var replacerStack = [];
97857
+ function defaultOptions2() {
97858
+ return {
97859
+ depthLimit: Number.MAX_SAFE_INTEGER,
97860
+ edgesLimit: Number.MAX_SAFE_INTEGER
97861
+ };
97862
+ }
97863
+ function stringify(obj, replacer, spacer, options) {
97864
+ if (typeof options === "undefined") {
97865
+ options = defaultOptions2();
97866
+ }
97867
+ decirc(obj, "", 0, [], void 0, 0, options);
97868
+ var res;
97869
+ try {
97870
+ if (replacerStack.length === 0) {
97871
+ res = JSON.stringify(obj, replacer, spacer);
97872
+ } else {
97873
+ res = JSON.stringify(obj, replaceGetterValues(replacer), spacer);
97874
+ }
97875
+ } catch (_) {
97876
+ return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]");
97877
+ } finally {
97878
+ while (arr.length !== 0) {
97879
+ var part = arr.pop();
97880
+ if (part.length === 4) {
97881
+ Object.defineProperty(part[0], part[1], part[3]);
97882
+ } else {
97883
+ part[0][part[1]] = part[2];
97884
+ }
97885
+ }
97886
+ }
97887
+ return res;
97888
+ }
97889
+ function setReplace(replace, val, k, parent) {
97890
+ var propertyDescriptor = Object.getOwnPropertyDescriptor(parent, k);
97891
+ if (propertyDescriptor.get !== void 0) {
97892
+ if (propertyDescriptor.configurable) {
97893
+ Object.defineProperty(parent, k, { value: replace });
97894
+ arr.push([parent, k, val, propertyDescriptor]);
97895
+ } else {
97896
+ replacerStack.push([val, k, replace]);
97897
+ }
97898
+ } else {
97899
+ parent[k] = replace;
97900
+ arr.push([parent, k, val]);
97901
+ }
97902
+ }
97903
+ function decirc(val, k, edgeIndex, stack, parent, depth, options) {
97904
+ depth += 1;
97905
+ var i2;
97906
+ if (typeof val === "object" && val !== null) {
97907
+ for (i2 = 0; i2 < stack.length; i2++) {
97908
+ if (stack[i2] === val) {
97909
+ setReplace(CIRCULAR_REPLACE_NODE, val, k, parent);
97910
+ return;
97911
+ }
97912
+ }
97913
+ if (typeof options.depthLimit !== "undefined" && depth > options.depthLimit) {
97914
+ setReplace(LIMIT_REPLACE_NODE, val, k, parent);
97915
+ return;
97916
+ }
97917
+ if (typeof options.edgesLimit !== "undefined" && edgeIndex + 1 > options.edgesLimit) {
97918
+ setReplace(LIMIT_REPLACE_NODE, val, k, parent);
97919
+ return;
97920
+ }
97921
+ stack.push(val);
97922
+ if (Array.isArray(val)) {
97923
+ for (i2 = 0; i2 < val.length; i2++) {
97924
+ decirc(val[i2], i2, i2, stack, val, depth, options);
97925
+ }
97926
+ } else {
97927
+ var keys = Object.keys(val);
97928
+ for (i2 = 0; i2 < keys.length; i2++) {
97929
+ var key = keys[i2];
97930
+ decirc(val[key], key, i2, stack, val, depth, options);
97931
+ }
97932
+ }
97933
+ stack.pop();
97934
+ }
97935
+ }
97936
+ function compareFunction(a, b) {
97937
+ if (a < b) {
97938
+ return -1;
97939
+ }
97940
+ if (a > b) {
97941
+ return 1;
97942
+ }
97943
+ return 0;
97944
+ }
97945
+ function deterministicStringify(obj, replacer, spacer, options) {
97946
+ if (typeof options === "undefined") {
97947
+ options = defaultOptions2();
97948
+ }
97949
+ var tmp = deterministicDecirc(obj, "", 0, [], void 0, 0, options) || obj;
97950
+ var res;
97951
+ try {
97952
+ if (replacerStack.length === 0) {
97953
+ res = JSON.stringify(tmp, replacer, spacer);
97954
+ } else {
97955
+ res = JSON.stringify(tmp, replaceGetterValues(replacer), spacer);
97956
+ }
97957
+ } catch (_) {
97958
+ return JSON.stringify("[unable to serialize, circular reference is too complex to analyze]");
97959
+ } finally {
97960
+ while (arr.length !== 0) {
97961
+ var part = arr.pop();
97962
+ if (part.length === 4) {
97963
+ Object.defineProperty(part[0], part[1], part[3]);
97964
+ } else {
97965
+ part[0][part[1]] = part[2];
97966
+ }
97967
+ }
97968
+ }
97969
+ return res;
97970
+ }
97971
+ function deterministicDecirc(val, k, edgeIndex, stack, parent, depth, options) {
97972
+ depth += 1;
97973
+ var i2;
97974
+ if (typeof val === "object" && val !== null) {
97975
+ for (i2 = 0; i2 < stack.length; i2++) {
97976
+ if (stack[i2] === val) {
97977
+ setReplace(CIRCULAR_REPLACE_NODE, val, k, parent);
97978
+ return;
97979
+ }
97980
+ }
97981
+ try {
97982
+ if (typeof val.toJSON === "function") {
97983
+ return;
97984
+ }
97985
+ } catch (_) {
97986
+ return;
97987
+ }
97988
+ if (typeof options.depthLimit !== "undefined" && depth > options.depthLimit) {
97989
+ setReplace(LIMIT_REPLACE_NODE, val, k, parent);
97990
+ return;
97991
+ }
97992
+ if (typeof options.edgesLimit !== "undefined" && edgeIndex + 1 > options.edgesLimit) {
97993
+ setReplace(LIMIT_REPLACE_NODE, val, k, parent);
97994
+ return;
97995
+ }
97996
+ stack.push(val);
97997
+ if (Array.isArray(val)) {
97998
+ for (i2 = 0; i2 < val.length; i2++) {
97999
+ deterministicDecirc(val[i2], i2, i2, stack, val, depth, options);
98000
+ }
98001
+ } else {
98002
+ var tmp = {};
98003
+ var keys = Object.keys(val).sort(compareFunction);
98004
+ for (i2 = 0; i2 < keys.length; i2++) {
98005
+ var key = keys[i2];
98006
+ deterministicDecirc(val[key], key, i2, stack, val, depth, options);
98007
+ tmp[key] = val[key];
98008
+ }
98009
+ if (typeof parent !== "undefined") {
98010
+ arr.push([parent, k, val]);
98011
+ parent[k] = tmp;
98012
+ } else {
98013
+ return tmp;
98014
+ }
98015
+ }
98016
+ stack.pop();
98017
+ }
98018
+ }
98019
+ function replaceGetterValues(replacer) {
98020
+ replacer = typeof replacer !== "undefined" ? replacer : function(k, v) {
98021
+ return v;
98022
+ };
98023
+ return function(key, val) {
98024
+ if (replacerStack.length > 0) {
98025
+ for (var i2 = 0; i2 < replacerStack.length; i2++) {
98026
+ var part = replacerStack[i2];
98027
+ if (part[1] === key && part[0] === val) {
98028
+ val = part[2];
98029
+ replacerStack.splice(i2, 1);
98030
+ break;
98031
+ }
98032
+ }
98033
+ }
98034
+ return replacer.call(this, key, val);
98035
+ };
98036
+ }
98037
+ }
98038
+ });
98039
+
98040
+ // node_modules/pino-pretty/lib/utils/prettify-error.js
98041
+ var require_prettify_error = __commonJS({
98042
+ "node_modules/pino-pretty/lib/utils/prettify-error.js"(exports2, module2) {
98043
+ "use strict";
98044
+ module2.exports = prettifyError2;
98045
+ var joinLinesWithIndentation = require_join_lines_with_indentation();
98046
+ function prettifyError2({ keyName, lines, eol, ident }) {
98047
+ let result = "";
98048
+ const joinedLines = joinLinesWithIndentation({ input: lines, ident, eol });
98049
+ const splitLines = `${ident}${keyName}: ${joinedLines}${eol}`.split(eol);
98050
+ for (let j = 0; j < splitLines.length; j += 1) {
98051
+ if (j !== 0) result += eol;
98052
+ const line = splitLines[j];
98053
+ if (/^\s*"stack"/.test(line)) {
98054
+ const matches2 = /^(\s*"stack":)\s*(".*"),?$/.exec(line);
98055
+ if (matches2 && matches2.length === 3) {
98056
+ const indentSize = /^\s*/.exec(line)[0].length + 4;
98057
+ const indentation = " ".repeat(indentSize);
98058
+ const stackMessage = matches2[2];
98059
+ result += matches2[1] + eol + indentation + JSON.parse(stackMessage).replace(/\n/g, eol + indentation);
98060
+ } else {
98061
+ result += line;
98062
+ }
98063
+ } else {
98064
+ result += line;
98065
+ }
98066
+ }
98067
+ return result;
98068
+ }
98069
+ }
98070
+ });
98071
+
98072
+ // node_modules/pino-pretty/lib/utils/prettify-object.js
98073
+ var require_prettify_object = __commonJS({
98074
+ "node_modules/pino-pretty/lib/utils/prettify-object.js"(exports2, module2) {
98075
+ "use strict";
98076
+ module2.exports = prettifyObject;
98077
+ var {
98078
+ LOGGER_KEYS
98079
+ } = require_constants11();
98080
+ var stringifySafe = require_fast_safe_stringify();
98081
+ var joinLinesWithIndentation = require_join_lines_with_indentation();
98082
+ var prettifyError2 = require_prettify_error();
98083
+ function prettifyObject({
98084
+ log: log3,
98085
+ excludeLoggerKeys = true,
98086
+ skipKeys = [],
98087
+ context: context2
98088
+ }) {
98089
+ const {
98090
+ EOL: eol,
98091
+ IDENT: ident,
98092
+ customPrettifiers,
98093
+ errorLikeObjectKeys: errorLikeKeys,
98094
+ objectColorizer,
98095
+ singleLine,
98096
+ colorizer
98097
+ } = context2;
98098
+ const keysToIgnore = [].concat(skipKeys);
98099
+ if (excludeLoggerKeys === true) Array.prototype.push.apply(keysToIgnore, LOGGER_KEYS);
98100
+ let result = "";
98101
+ const { plain, errors } = Object.entries(log3).reduce(({ plain: plain2, errors: errors2 }, [k, v]) => {
98102
+ if (keysToIgnore.includes(k) === false) {
98103
+ const pretty = typeof customPrettifiers[k] === "function" ? customPrettifiers[k](v, k, log3, { colors: colorizer.colors }) : v;
98104
+ if (errorLikeKeys.includes(k)) {
98105
+ errors2[k] = pretty;
98106
+ } else {
98107
+ plain2[k] = pretty;
98108
+ }
98109
+ }
98110
+ return { plain: plain2, errors: errors2 };
98111
+ }, { plain: {}, errors: {} });
98112
+ if (singleLine) {
98113
+ if (Object.keys(plain).length > 0) {
98114
+ result += objectColorizer.greyMessage(stringifySafe(plain));
98115
+ }
98116
+ result += eol;
98117
+ result = result.replace(/\\\\/gi, "\\");
98118
+ } else {
98119
+ Object.entries(plain).forEach(([keyName, keyValue]) => {
98120
+ let lines = typeof customPrettifiers[keyName] === "function" ? keyValue : stringifySafe(keyValue, null, 2);
98121
+ if (lines === void 0) return;
98122
+ lines = lines.replace(/\\\\/gi, "\\");
98123
+ const joinedLines = joinLinesWithIndentation({ input: lines, ident, eol });
98124
+ result += `${ident}${objectColorizer.property(keyName)}:${joinedLines.startsWith(eol) ? "" : " "}${joinedLines}${eol}`;
98125
+ });
98126
+ }
98127
+ Object.entries(errors).forEach(([keyName, keyValue]) => {
98128
+ const lines = typeof customPrettifiers[keyName] === "function" ? keyValue : stringifySafe(keyValue, null, 2);
98129
+ if (lines === void 0) return;
98130
+ result += prettifyError2({ keyName, lines, eol, ident });
98131
+ });
98132
+ return result;
98133
+ }
98134
+ }
98135
+ });
98136
+
98137
+ // node_modules/pino-pretty/lib/utils/prettify-error-log.js
98138
+ var require_prettify_error_log = __commonJS({
98139
+ "node_modules/pino-pretty/lib/utils/prettify-error-log.js"(exports2, module2) {
98140
+ "use strict";
98141
+ module2.exports = prettifyErrorLog;
98142
+ var {
98143
+ LOGGER_KEYS
98144
+ } = require_constants11();
98145
+ var isObject2 = require_is_object();
98146
+ var joinLinesWithIndentation = require_join_lines_with_indentation();
98147
+ var prettifyObject = require_prettify_object();
98148
+ function prettifyErrorLog({ log: log3, context: context2 }) {
98149
+ const {
98150
+ EOL: eol,
98151
+ IDENT: ident,
98152
+ errorProps: errorProperties,
98153
+ messageKey
98154
+ } = context2;
98155
+ const stack = log3.stack;
98156
+ const joinedLines = joinLinesWithIndentation({ input: stack, ident, eol });
98157
+ let result = `${ident}${joinedLines}${eol}`;
98158
+ if (errorProperties.length > 0) {
98159
+ const excludeProperties = LOGGER_KEYS.concat(messageKey, "type", "stack");
98160
+ let propertiesToPrint;
98161
+ if (errorProperties[0] === "*") {
98162
+ propertiesToPrint = Object.keys(log3).filter((k) => excludeProperties.includes(k) === false);
98163
+ } else {
98164
+ propertiesToPrint = errorProperties.filter((k) => excludeProperties.includes(k) === false);
98165
+ }
98166
+ for (let i2 = 0; i2 < propertiesToPrint.length; i2 += 1) {
98167
+ const key = propertiesToPrint[i2];
98168
+ if (key in log3 === false) continue;
98169
+ if (isObject2(log3[key])) {
98170
+ const prettifiedObject = prettifyObject({
98171
+ log: log3[key],
98172
+ excludeLoggerKeys: false,
98173
+ context: {
98174
+ ...context2,
98175
+ IDENT: ident + ident
98176
+ }
98177
+ });
98178
+ result = `${result}${ident}${key}: {${eol}${prettifiedObject}${ident}}${eol}`;
98179
+ continue;
98180
+ }
98181
+ result = `${result}${ident}${key}: ${log3[key]}${eol}`;
98182
+ }
98183
+ }
98184
+ return result;
98185
+ }
98186
+ }
98187
+ });
98188
+
98189
+ // node_modules/pino-pretty/lib/utils/prettify-level.js
98190
+ var require_prettify_level = __commonJS({
98191
+ "node_modules/pino-pretty/lib/utils/prettify-level.js"(exports2, module2) {
98192
+ "use strict";
98193
+ module2.exports = prettifyLevel;
98194
+ var getPropertyValue = require_get_property_value();
98195
+ function prettifyLevel({ log: log3, context: context2 }) {
98196
+ const {
98197
+ colorizer,
98198
+ customLevels,
98199
+ customLevelNames,
98200
+ levelKey,
98201
+ getLevelLabelData
98202
+ } = context2;
98203
+ const prettifier = context2.customPrettifiers?.level;
98204
+ const output = getPropertyValue(log3, levelKey);
98205
+ if (output === void 0) return void 0;
98206
+ const labelColorized = colorizer(output, { customLevels, customLevelNames });
98207
+ if (prettifier) {
98208
+ const [label] = getLevelLabelData(output);
98209
+ return prettifier(output, levelKey, log3, { label, labelColorized, colors: colorizer.colors });
98210
+ }
98211
+ return labelColorized;
98212
+ }
98213
+ }
98214
+ });
98215
+
98216
+ // node_modules/pino-pretty/lib/utils/prettify-message.js
98217
+ var require_prettify_message = __commonJS({
98218
+ "node_modules/pino-pretty/lib/utils/prettify-message.js"(exports2, module2) {
98219
+ "use strict";
98220
+ module2.exports = prettifyMessage;
98221
+ var {
98222
+ LEVELS
98223
+ } = require_constants11();
98224
+ var getPropertyValue = require_get_property_value();
98225
+ var interpretConditionals = require_interpret_conditionals();
98226
+ function prettifyMessage({ log: log3, context: context2 }) {
98227
+ const {
98228
+ colorizer,
98229
+ customLevels,
98230
+ levelKey,
98231
+ levelLabel,
98232
+ messageFormat,
98233
+ messageKey,
98234
+ useOnlyCustomProps
98235
+ } = context2;
98236
+ if (messageFormat && typeof messageFormat === "string") {
98237
+ const parsedMessageFormat = interpretConditionals(messageFormat, log3);
98238
+ const message = String(parsedMessageFormat).replace(
98239
+ /{([^{}]+)}/g,
98240
+ function(match, p1) {
98241
+ let level;
98242
+ if (p1 === levelLabel && (level = getPropertyValue(log3, levelKey)) !== void 0) {
98243
+ const condition = useOnlyCustomProps ? customLevels === void 0 : customLevels[level] === void 0;
98244
+ return condition ? LEVELS[level] : customLevels[level];
98245
+ }
98246
+ const value = getPropertyValue(log3, p1);
98247
+ return value !== void 0 ? value : "";
98248
+ }
98249
+ );
98250
+ return colorizer.message(message);
98251
+ }
98252
+ if (messageFormat && typeof messageFormat === "function") {
98253
+ const msg = messageFormat(log3, messageKey, levelLabel, { colors: colorizer.colors });
98254
+ return colorizer.message(msg);
98255
+ }
98256
+ if (messageKey in log3 === false) return void 0;
98257
+ if (typeof log3[messageKey] !== "string" && typeof log3[messageKey] !== "number" && typeof log3[messageKey] !== "boolean") return void 0;
98258
+ return colorizer.message(log3[messageKey]);
98259
+ }
98260
+ }
98261
+ });
98262
+
98263
+ // node_modules/pino-pretty/lib/utils/prettify-metadata.js
98264
+ var require_prettify_metadata = __commonJS({
98265
+ "node_modules/pino-pretty/lib/utils/prettify-metadata.js"(exports2, module2) {
98266
+ "use strict";
98267
+ module2.exports = prettifyMetadata;
98268
+ function prettifyMetadata({ log: log3, context: context2 }) {
98269
+ const { customPrettifiers: prettifiers, colorizer } = context2;
98270
+ let line = "";
98271
+ if (log3.name || log3.pid || log3.hostname) {
98272
+ line += "(";
98273
+ if (log3.name) {
98274
+ line += prettifiers.name ? prettifiers.name(log3.name, "name", log3, { colors: colorizer.colors }) : log3.name;
98275
+ }
98276
+ if (log3.pid) {
98277
+ const prettyPid = prettifiers.pid ? prettifiers.pid(log3.pid, "pid", log3, { colors: colorizer.colors }) : log3.pid;
98278
+ if (log3.name && log3.pid) {
98279
+ line += "/" + prettyPid;
98280
+ } else {
98281
+ line += prettyPid;
98282
+ }
98283
+ }
98284
+ if (log3.hostname) {
98285
+ const prettyHostname = prettifiers.hostname ? prettifiers.hostname(log3.hostname, "hostname", log3, { colors: colorizer.colors }) : log3.hostname;
98286
+ line += `${line === "(" ? "on" : " on"} ${prettyHostname}`;
98287
+ }
98288
+ line += ")";
98289
+ }
98290
+ if (log3.caller) {
98291
+ const prettyCaller = prettifiers.caller ? prettifiers.caller(log3.caller, "caller", log3, { colors: colorizer.colors }) : log3.caller;
98292
+ line += `${line === "" ? "" : " "}<${prettyCaller}>`;
98293
+ }
98294
+ if (line === "") {
98295
+ return void 0;
98296
+ } else {
98297
+ return line;
98298
+ }
98299
+ }
98300
+ }
98301
+ });
98302
+
98303
+ // node_modules/pino-pretty/lib/utils/prettify-time.js
98304
+ var require_prettify_time = __commonJS({
98305
+ "node_modules/pino-pretty/lib/utils/prettify-time.js"(exports2, module2) {
98306
+ "use strict";
98307
+ module2.exports = prettifyTime;
98308
+ var formatTime = require_format_time();
98309
+ function prettifyTime({ log: log3, context: context2 }) {
98310
+ const {
98311
+ timestampKey,
98312
+ translateTime: translateFormat
98313
+ } = context2;
98314
+ const prettifier = context2.customPrettifiers?.time;
98315
+ let time3 = null;
98316
+ if (timestampKey in log3) {
98317
+ time3 = log3[timestampKey];
98318
+ } else if ("timestamp" in log3) {
98319
+ time3 = log3.timestamp;
98320
+ }
98321
+ if (time3 === null) return void 0;
98322
+ const output = translateFormat ? formatTime(time3, translateFormat) : time3;
98323
+ return prettifier ? prettifier(output) : `[${output}]`;
98324
+ }
98325
+ }
98326
+ });
98327
+
98328
+ // node_modules/pino-pretty/lib/utils/index.js
98329
+ var require_utils41 = __commonJS({
98330
+ "node_modules/pino-pretty/lib/utils/index.js"(exports2, module2) {
98331
+ "use strict";
98332
+ module2.exports = {
98333
+ buildSafeSonicBoom: require_build_safe_sonic_boom(),
98334
+ createDate: require_create_date(),
98335
+ deleteLogProperty: require_delete_log_property(),
98336
+ filterLog: require_filter_log(),
98337
+ formatTime: require_format_time(),
98338
+ getPropertyValue: require_get_property_value(),
98339
+ handleCustomLevelsNamesOpts: require_handle_custom_levels_names_opts(),
98340
+ handleCustomLevelsOpts: require_handle_custom_levels_opts(),
98341
+ interpretConditionals: require_interpret_conditionals(),
98342
+ isObject: require_is_object(),
98343
+ isValidDate: require_is_valid_date(),
98344
+ joinLinesWithIndentation: require_join_lines_with_indentation(),
98345
+ noop: require_noop(),
98346
+ parseFactoryOptions: require_parse_factory_options(),
98347
+ prettifyErrorLog: require_prettify_error_log(),
98348
+ prettifyError: require_prettify_error(),
98349
+ prettifyLevel: require_prettify_level(),
98350
+ prettifyMessage: require_prettify_message(),
98351
+ prettifyMetadata: require_prettify_metadata(),
98352
+ prettifyObject: require_prettify_object(),
98353
+ prettifyTime: require_prettify_time(),
98354
+ splitPropertyKey: require_split_property_key(),
98355
+ getLevelLabelData: require_get_level_label_data()
98356
+ };
98357
+ }
98358
+ });
98359
+
98360
+ // node_modules/secure-json-parse/index.js
98361
+ var require_secure_json_parse = __commonJS({
98362
+ "node_modules/secure-json-parse/index.js"(exports2, module2) {
98363
+ "use strict";
98364
+ var hasBuffer = typeof Buffer !== "undefined";
98365
+ var suspectProtoRx = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/;
98366
+ 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*:/;
98367
+ function _parse2(text, reviver, options) {
98368
+ if (options == null) {
98369
+ if (reviver !== null && typeof reviver === "object") {
98370
+ options = reviver;
98371
+ reviver = void 0;
98372
+ }
98373
+ }
98374
+ if (hasBuffer && Buffer.isBuffer(text)) {
98375
+ text = text.toString();
98376
+ }
98377
+ if (text && text.charCodeAt(0) === 65279) {
98378
+ text = text.slice(1);
98379
+ }
98380
+ const obj = JSON.parse(text, reviver);
98381
+ if (obj === null || typeof obj !== "object") {
98382
+ return obj;
98383
+ }
98384
+ const protoAction = options && options.protoAction || "error";
98385
+ const constructorAction = options && options.constructorAction || "error";
98386
+ if (protoAction === "ignore" && constructorAction === "ignore") {
98387
+ return obj;
98388
+ }
98389
+ if (protoAction !== "ignore" && constructorAction !== "ignore") {
98390
+ if (suspectProtoRx.test(text) === false && suspectConstructorRx.test(text) === false) {
98391
+ return obj;
98392
+ }
98393
+ } else if (protoAction !== "ignore" && constructorAction === "ignore") {
98394
+ if (suspectProtoRx.test(text) === false) {
98395
+ return obj;
98396
+ }
98397
+ } else {
98398
+ if (suspectConstructorRx.test(text) === false) {
98399
+ return obj;
98400
+ }
98401
+ }
98402
+ return filter(obj, { protoAction, constructorAction, safe: options && options.safe });
98403
+ }
98404
+ function filter(obj, { protoAction = "error", constructorAction = "error", safe } = {}) {
98405
+ let next = [obj];
98406
+ while (next.length) {
98407
+ const nodes = next;
98408
+ next = [];
98409
+ for (const node of nodes) {
98410
+ if (protoAction !== "ignore" && Object.prototype.hasOwnProperty.call(node, "__proto__")) {
98411
+ if (safe === true) {
98412
+ return null;
98413
+ } else if (protoAction === "error") {
98414
+ throw new SyntaxError("Object contains forbidden prototype property");
98415
+ }
98416
+ delete node.__proto__;
98417
+ }
98418
+ if (constructorAction !== "ignore" && Object.prototype.hasOwnProperty.call(node, "constructor") && node.constructor !== null && typeof node.constructor === "object" && Object.prototype.hasOwnProperty.call(node.constructor, "prototype")) {
98419
+ if (safe === true) {
98420
+ return null;
98421
+ } else if (constructorAction === "error") {
98422
+ throw new SyntaxError("Object contains forbidden prototype property");
98423
+ }
98424
+ delete node.constructor;
98425
+ }
98426
+ for (const key in node) {
98427
+ const value = node[key];
98428
+ if (value && typeof value === "object") {
98429
+ next.push(value);
98430
+ }
98431
+ }
98432
+ }
98433
+ }
98434
+ return obj;
98435
+ }
98436
+ function parse3(text, reviver, options) {
98437
+ const { stackTraceLimit } = Error;
98438
+ Error.stackTraceLimit = 0;
98439
+ try {
98440
+ return _parse2(text, reviver, options);
98441
+ } finally {
98442
+ Error.stackTraceLimit = stackTraceLimit;
98443
+ }
98444
+ }
98445
+ function safeParse3(text, reviver) {
98446
+ const { stackTraceLimit } = Error;
98447
+ Error.stackTraceLimit = 0;
98448
+ try {
98449
+ return _parse2(text, reviver, { safe: true });
98450
+ } catch {
98451
+ return void 0;
98452
+ } finally {
98453
+ Error.stackTraceLimit = stackTraceLimit;
98454
+ }
98455
+ }
98456
+ module2.exports = parse3;
98457
+ module2.exports.default = parse3;
98458
+ module2.exports.parse = parse3;
98459
+ module2.exports.safeParse = safeParse3;
98460
+ module2.exports.scan = filter;
98461
+ }
98462
+ });
98463
+
98464
+ // node_modules/pino-pretty/lib/pretty.js
98465
+ var require_pretty = __commonJS({
98466
+ "node_modules/pino-pretty/lib/pretty.js"(exports2, module2) {
98467
+ "use strict";
98468
+ module2.exports = pretty;
98469
+ var sjs = require_secure_json_parse();
98470
+ var isObject2 = require_is_object();
98471
+ var prettifyErrorLog = require_prettify_error_log();
98472
+ var prettifyLevel = require_prettify_level();
98473
+ var prettifyMessage = require_prettify_message();
98474
+ var prettifyMetadata = require_prettify_metadata();
98475
+ var prettifyObject = require_prettify_object();
98476
+ var prettifyTime = require_prettify_time();
98477
+ var filterLog = require_filter_log();
98478
+ var {
98479
+ LEVELS,
98480
+ LEVEL_KEY,
98481
+ LEVEL_NAMES
98482
+ } = require_constants11();
98483
+ var jsonParser = (input) => {
98484
+ try {
98485
+ return { value: sjs.parse(input, { protoAction: "remove" }) };
98486
+ } catch (err) {
98487
+ return { err };
98488
+ }
98489
+ };
98490
+ function pretty(inputData) {
98491
+ let log3;
98492
+ if (!isObject2(inputData)) {
98493
+ const parsed = jsonParser(inputData);
98494
+ if (parsed.err || !isObject2(parsed.value)) {
98495
+ return inputData + this.EOL;
98496
+ }
98497
+ log3 = parsed.value;
98498
+ } else {
98499
+ log3 = inputData;
98500
+ }
98501
+ if (this.minimumLevel) {
98502
+ let condition;
98503
+ if (this.useOnlyCustomProps) {
98504
+ condition = this.customLevels;
98505
+ } else {
98506
+ condition = this.customLevelNames[this.minimumLevel] !== void 0;
98507
+ }
98508
+ let minimum;
98509
+ if (condition) {
98510
+ minimum = this.customLevelNames[this.minimumLevel];
98511
+ } else {
98512
+ minimum = LEVEL_NAMES[this.minimumLevel];
98513
+ }
98514
+ if (!minimum) {
98515
+ minimum = typeof this.minimumLevel === "string" ? LEVEL_NAMES[this.minimumLevel] : LEVEL_NAMES[LEVELS[this.minimumLevel].toLowerCase()];
98516
+ }
98517
+ const level = log3[this.levelKey === void 0 ? LEVEL_KEY : this.levelKey];
98518
+ if (level < minimum) return;
98519
+ }
98520
+ const prettifiedMessage = prettifyMessage({ log: log3, context: this.context });
98521
+ if (this.ignoreKeys || this.includeKeys) {
98522
+ log3 = filterLog({ log: log3, context: this.context });
98523
+ }
98524
+ const prettifiedLevel = prettifyLevel({
98525
+ log: log3,
98526
+ context: {
98527
+ ...this.context,
98528
+ // This is odd. The colorizer ends up relying on the value of
98529
+ // `customProperties` instead of the original `customLevels` and
98530
+ // `customLevelNames`.
98531
+ ...this.context.customProperties
98532
+ }
98533
+ });
98534
+ const prettifiedMetadata = prettifyMetadata({ log: log3, context: this.context });
98535
+ const prettifiedTime = prettifyTime({ log: log3, context: this.context });
98536
+ let line = "";
98537
+ if (this.levelFirst && prettifiedLevel) {
98538
+ line = `${prettifiedLevel}`;
98539
+ }
98540
+ if (prettifiedTime && line === "") {
98541
+ line = `${prettifiedTime}`;
98542
+ } else if (prettifiedTime) {
98543
+ line = `${line} ${prettifiedTime}`;
98544
+ }
98545
+ if (!this.levelFirst && prettifiedLevel) {
98546
+ if (line.length > 0) {
98547
+ line = `${line} ${prettifiedLevel}`;
98548
+ } else {
98549
+ line = prettifiedLevel;
98550
+ }
98551
+ }
98552
+ if (prettifiedMetadata) {
98553
+ if (line.length > 0) {
98554
+ line = `${line} ${prettifiedMetadata}:`;
98555
+ } else {
98556
+ line = prettifiedMetadata;
98557
+ }
98558
+ }
98559
+ if (line.endsWith(":") === false && line !== "") {
98560
+ line += ":";
98561
+ }
98562
+ if (prettifiedMessage !== void 0) {
98563
+ if (line.length > 0) {
98564
+ line = `${line} ${prettifiedMessage}`;
98565
+ } else {
98566
+ line = prettifiedMessage;
98567
+ }
98568
+ }
98569
+ if (line.length > 0 && !this.singleLine) {
98570
+ line += this.EOL;
98571
+ }
98572
+ if (log3.type === "Error" && typeof log3.stack === "string") {
98573
+ const prettifiedErrorLog = prettifyErrorLog({ log: log3, context: this.context });
98574
+ if (this.singleLine) line += this.EOL;
98575
+ line += prettifiedErrorLog;
98576
+ } else if (this.hideObject === false) {
98577
+ const skipKeys = [
98578
+ this.messageKey,
98579
+ this.levelKey,
98580
+ this.timestampKey
98581
+ ].map((key) => key.replaceAll(/\\/g, "")).filter((key) => {
98582
+ return typeof log3[key] === "string" || typeof log3[key] === "number" || typeof log3[key] === "boolean";
98583
+ });
98584
+ const prettifiedObject = prettifyObject({
98585
+ log: log3,
98586
+ skipKeys,
98587
+ context: this.context
98588
+ });
98589
+ if (this.singleLine && !/^\s$/.test(prettifiedObject)) {
98590
+ line += " ";
98591
+ }
98592
+ line += prettifiedObject;
98593
+ }
98594
+ return line;
98595
+ }
98596
+ }
98597
+ });
98598
+
98599
+ // node_modules/pino-pretty/index.js
98600
+ var require_pino_pretty = __commonJS({
98601
+ "node_modules/pino-pretty/index.js"(exports2, module2) {
98602
+ "use strict";
98603
+ var { isColorSupported } = require_colorette();
98604
+ var pump2 = require_pump();
98605
+ var { Transform } = __require("node:stream");
98606
+ var abstractTransport = require_pino_abstract_transport();
98607
+ var colors = require_colors();
98608
+ var {
98609
+ ERROR_LIKE_KEYS,
98610
+ LEVEL_KEY,
98611
+ LEVEL_LABEL,
98612
+ MESSAGE_KEY,
98613
+ TIMESTAMP_KEY
98614
+ } = require_constants11();
98615
+ var {
98616
+ buildSafeSonicBoom,
98617
+ parseFactoryOptions
98618
+ } = require_utils41();
98619
+ var pretty = require_pretty();
98620
+ var defaultOptions2 = {
98621
+ colorize: isColorSupported,
98622
+ colorizeObjects: true,
98623
+ crlf: false,
98624
+ customColors: null,
98625
+ customLevels: null,
98626
+ customPrettifiers: {},
98627
+ errorLikeObjectKeys: ERROR_LIKE_KEYS,
98628
+ errorProps: "",
98629
+ hideObject: false,
98630
+ ignore: "hostname",
98631
+ include: void 0,
98632
+ levelFirst: false,
98633
+ levelKey: LEVEL_KEY,
98634
+ levelLabel: LEVEL_LABEL,
98635
+ messageFormat: null,
98636
+ messageKey: MESSAGE_KEY,
98637
+ minimumLevel: void 0,
98638
+ outputStream: process.stdout,
98639
+ singleLine: false,
98640
+ timestampKey: TIMESTAMP_KEY,
98641
+ translateTime: true,
98642
+ useOnlyCustomProps: true
98643
+ };
98644
+ function prettyFactory(options) {
98645
+ const context2 = parseFactoryOptions(Object.assign({}, defaultOptions2, options));
98646
+ return pretty.bind({ ...context2, context: context2 });
98647
+ }
98648
+ function build(opts = {}) {
98649
+ let pretty2 = prettyFactory(opts);
98650
+ let destination;
98651
+ return abstractTransport(function(source) {
98652
+ source.on("message", function pinoConfigListener(message) {
98653
+ if (!message || message.code !== "PINO_CONFIG") return;
98654
+ Object.assign(opts, {
98655
+ messageKey: message.config.messageKey,
98656
+ errorLikeObjectKeys: Array.from(/* @__PURE__ */ new Set([...opts.errorLikeObjectKeys || ERROR_LIKE_KEYS, message.config.errorKey])),
98657
+ customLevels: message.config.levels.values
98658
+ });
98659
+ pretty2 = prettyFactory(opts);
98660
+ source.off("message", pinoConfigListener);
98661
+ });
98662
+ const stream = new Transform({
98663
+ objectMode: true,
98664
+ autoDestroy: true,
98665
+ transform(chunk, enc, cb) {
98666
+ const line = pretty2(chunk);
98667
+ cb(null, line);
98668
+ }
98669
+ });
98670
+ if (typeof opts.destination === "object" && typeof opts.destination.write === "function") {
98671
+ destination = opts.destination;
98672
+ } else {
98673
+ destination = buildSafeSonicBoom({
98674
+ dest: opts.destination || 1,
98675
+ append: opts.append,
98676
+ mkdir: opts.mkdir,
98677
+ sync: opts.sync
98678
+ // by default sonic will be async
98679
+ });
98680
+ }
98681
+ source.on("unknown", function(line) {
98682
+ destination.write(line + "\n");
98683
+ });
98684
+ pump2(source, stream, destination);
98685
+ return stream;
98686
+ }, {
98687
+ parse: "lines",
98688
+ close(err, cb) {
98689
+ destination.on("close", () => {
98690
+ cb(err);
98691
+ });
98692
+ }
98693
+ });
98694
+ }
98695
+ module2.exports = build;
98696
+ module2.exports.build = build;
98697
+ module2.exports.PinoPretty = build;
98698
+ module2.exports.prettyFactory = prettyFactory;
98699
+ module2.exports.colorizerFactory = colors;
98700
+ module2.exports.isColorSupported = isColorSupported;
98701
+ module2.exports.default = build;
98702
+ }
98703
+ });
98704
+
96138
98705
  // lib/observability/logger.ts
96139
- import { createRequire } from "node:module";
96140
98706
  function warnPrettyFallback(error48) {
96141
98707
  if (prettyFallbackWarned) return;
96142
98708
  prettyFallbackWarned = true;
96143
98709
  const reason = error48 instanceof Error ? error48.message : String(error48);
96144
98710
  console.warn(`[fabrica] pretty logging unavailable, falling back to structured logs: ${reason}`);
96145
98711
  }
96146
- function createTransport() {
98712
+ function createDestination(destination) {
98713
+ if (destination) return destination;
96147
98714
  if (process.env.LOG_PRETTY !== "1") return void 0;
96148
- let target;
96149
98715
  try {
96150
- target = require2.resolve("pino-pretty");
96151
- } catch (error48) {
96152
- warnPrettyFallback(error48);
96153
- return void 0;
96154
- }
96155
- try {
96156
- return import_pino.default.transport({
96157
- target,
96158
- options: {
96159
- colorize: true,
96160
- translateTime: "SYS:standard",
96161
- ignore: "pid,hostname"
96162
- }
98716
+ return (0, import_pino_pretty.default)({
98717
+ colorize: true,
98718
+ translateTime: "SYS:standard",
98719
+ ignore: "pid,hostname"
96163
98720
  });
96164
98721
  } catch (error48) {
96165
98722
  warnPrettyFallback(error48);
@@ -96167,6 +98724,7 @@ function createTransport() {
96167
98724
  }
96168
98725
  }
96169
98726
  function createFabricaLogger(destination) {
98727
+ const resolvedDestination = createDestination(destination);
96170
98728
  return (0, import_pino.default)({
96171
98729
  name: "fabrica",
96172
98730
  level: process.env.LOG_LEVEL ?? "info",
@@ -96215,7 +98773,7 @@ function createFabricaLogger(destination) {
96215
98773
  spanId: spanContext?.spanId
96216
98774
  };
96217
98775
  }
96218
- }, destination ?? createTransport());
98776
+ }, resolvedDestination);
96219
98777
  }
96220
98778
  function getRootLogger() {
96221
98779
  return rootLogger;
@@ -96223,14 +98781,14 @@ function getRootLogger() {
96223
98781
  function getLogger(bindings) {
96224
98782
  return bindings ? rootLogger.child(bindings) : rootLogger;
96225
98783
  }
96226
- var import_pino, require2, prettyFallbackWarned, rootLogger;
98784
+ var import_pino, import_pino_pretty, prettyFallbackWarned, rootLogger;
96227
98785
  var init_logger = __esm({
96228
98786
  "lib/observability/logger.ts"() {
96229
98787
  "use strict";
96230
98788
  import_pino = __toESM(require_pino(), 1);
98789
+ import_pino_pretty = __toESM(require_pino_pretty(), 1);
96231
98790
  init_esm();
96232
98791
  init_context3();
96233
- require2 = createRequire(import.meta.url);
96234
98792
  prettyFallbackWarned = false;
96235
98793
  rootLogger = createFabricaLogger();
96236
98794
  }
@@ -111347,8 +113905,8 @@ import fsSync from "node:fs";
111347
113905
  import path5 from "node:path";
111348
113906
  import { fileURLToPath as fileURLToPath3 } from "node:url";
111349
113907
  function getCurrentVersion() {
111350
- if ("0.2.16") {
111351
- return "0.2.16";
113908
+ if ("0.2.17") {
113909
+ return "0.2.17";
111352
113910
  }
111353
113911
  try {
111354
113912
  const pkgPath = path5.join(THIS_DIR, "..", "..", "package.json");
@@ -115811,7 +118369,7 @@ var classify_exports = {};
115811
118369
  __export(classify_exports, {
115812
118370
  classifyStep: () => classifyStep
115813
118371
  });
115814
- import { createRequire as createRequire2 } from "node:module";
118372
+ import { createRequire } from "node:module";
115815
118373
  function loadRules() {
115816
118374
  if (cachedRules) return cachedRules;
115817
118375
  cachedRules = _require("../configs/classification-rules.json");
@@ -115864,7 +118422,7 @@ var init_classify = __esm({
115864
118422
  init_runtime_paths();
115865
118423
  init_llm_retry();
115866
118424
  init_zod();
115867
- _require = createRequire2(import.meta.url);
118425
+ _require = createRequire(import.meta.url);
115868
118426
  LlmResponseSchema = external_exports.object({
115869
118427
  payloads: external_exports.array(external_exports.object({ text: external_exports.string() })).min(1)
115870
118428
  }).passthrough();
@@ -115959,7 +118517,7 @@ var interview_exports = {};
115959
118517
  __export(interview_exports, {
115960
118518
  interviewStep: () => interviewStep
115961
118519
  });
115962
- import { createRequire as createRequire3 } from "node:module";
118520
+ import { createRequire as createRequire2 } from "node:module";
115963
118521
  function loadTemplates() {
115964
118522
  if (cachedTemplates) return cachedTemplates;
115965
118523
  cachedTemplates = _require2("../configs/interview-templates.json");
@@ -115969,7 +118527,7 @@ var _require2, cachedTemplates, interviewStep;
115969
118527
  var init_interview = __esm({
115970
118528
  "lib/intake/steps/interview.ts"() {
115971
118529
  "use strict";
115972
- _require2 = createRequire3(import.meta.url);
118530
+ _require2 = createRequire2(import.meta.url);
115973
118531
  cachedTemplates = null;
115974
118532
  interviewStep = {
115975
118533
  name: "interview",
@@ -137151,8 +139709,8 @@ function validateSpecQuality(input) {
137151
139709
  }
137152
139710
 
137153
139711
  // lib/intake/steps/triage.ts
137154
- import { createRequire as createRequire4 } from "node:module";
137155
- var _require3 = createRequire4(import.meta.url);
139712
+ import { createRequire as createRequire3 } from "node:module";
139713
+ var _require3 = createRequire3(import.meta.url);
137156
139714
  var cachedMatrix = null;
137157
139715
  function loadMatrix() {
137158
139716
  if (cachedMatrix) return cachedMatrix;