@wix/dev-machine-monitor 1.0.5 → 1.0.7

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/build/run.cjs CHANGED
@@ -26,9 +26,9 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge
26
26
  mod
27
27
  ));
28
28
 
29
- // node_modules/commander/lib/error.js
29
+ // ../../node_modules/commander/lib/error.js
30
30
  var require_error = __commonJS({
31
- "node_modules/commander/lib/error.js"(exports2) {
31
+ "../../node_modules/commander/lib/error.js"(exports2) {
32
32
  "use strict";
33
33
  var CommanderError2 = class extends Error {
34
34
  /**
@@ -62,9 +62,9 @@ var require_error = __commonJS({
62
62
  }
63
63
  });
64
64
 
65
- // node_modules/commander/lib/argument.js
65
+ // ../../node_modules/commander/lib/argument.js
66
66
  var require_argument = __commonJS({
67
- "node_modules/commander/lib/argument.js"(exports2) {
67
+ "../../node_modules/commander/lib/argument.js"(exports2) {
68
68
  "use strict";
69
69
  var { InvalidArgumentError: InvalidArgumentError2 } = require_error();
70
70
  var Argument2 = class {
@@ -191,9 +191,9 @@ var require_argument = __commonJS({
191
191
  }
192
192
  });
193
193
 
194
- // node_modules/commander/lib/help.js
194
+ // ../../node_modules/commander/lib/help.js
195
195
  var require_help = __commonJS({
196
- "node_modules/commander/lib/help.js"(exports2) {
196
+ "../../node_modules/commander/lib/help.js"(exports2) {
197
197
  "use strict";
198
198
  var { humanReadableArgName } = require_argument();
199
199
  var Help2 = class {
@@ -794,9 +794,9 @@ ${itemIndentStr}`);
794
794
  }
795
795
  });
796
796
 
797
- // node_modules/commander/lib/option.js
797
+ // ../../node_modules/commander/lib/option.js
798
798
  var require_option = __commonJS({
799
- "node_modules/commander/lib/option.js"(exports2) {
799
+ "../../node_modules/commander/lib/option.js"(exports2) {
800
800
  "use strict";
801
801
  var { InvalidArgumentError: InvalidArgumentError2 } = require_error();
802
802
  var Option2 = class {
@@ -1108,9 +1108,9 @@ var require_option = __commonJS({
1108
1108
  }
1109
1109
  });
1110
1110
 
1111
- // node_modules/commander/lib/suggestSimilar.js
1111
+ // ../../node_modules/commander/lib/suggestSimilar.js
1112
1112
  var require_suggestSimilar = __commonJS({
1113
- "node_modules/commander/lib/suggestSimilar.js"(exports2) {
1113
+ "../../node_modules/commander/lib/suggestSimilar.js"(exports2) {
1114
1114
  "use strict";
1115
1115
  var maxDistance = 3;
1116
1116
  function editDistance(a2, b) {
@@ -1189,9 +1189,9 @@ var require_suggestSimilar = __commonJS({
1189
1189
  }
1190
1190
  });
1191
1191
 
1192
- // node_modules/commander/lib/command.js
1192
+ // ../../node_modules/commander/lib/command.js
1193
1193
  var require_command = __commonJS({
1194
- "node_modules/commander/lib/command.js"(exports2) {
1194
+ "../../node_modules/commander/lib/command.js"(exports2) {
1195
1195
  "use strict";
1196
1196
  var EventEmitter2 = require("node:events").EventEmitter;
1197
1197
  var childProcess = require("node:child_process");
@@ -3436,9 +3436,9 @@ Expecting one of '${allowedValues.join("', '")}'`);
3436
3436
  }
3437
3437
  });
3438
3438
 
3439
- // node_modules/commander/index.js
3439
+ // ../../node_modules/commander/index.js
3440
3440
  var require_commander = __commonJS({
3441
- "node_modules/commander/index.js"(exports2) {
3441
+ "../../node_modules/commander/index.js"(exports2) {
3442
3442
  "use strict";
3443
3443
  var { Argument: Argument2 } = require_argument();
3444
3444
  var { Command: Command2 } = require_command();
@@ -3459,1009 +3459,673 @@ var require_commander = __commonJS({
3459
3459
  }
3460
3460
  });
3461
3461
 
3462
- // node_modules/http-proxy-3/dist/lib/http-proxy/common.js
3463
- var require_common = __commonJS({
3464
- "node_modules/http-proxy-3/dist/lib/http-proxy/common.js"(exports2) {
3462
+ // ../../node_modules/ms/index.js
3463
+ var require_ms = __commonJS({
3464
+ "../../node_modules/ms/index.js"(exports2, module2) {
3465
3465
  "use strict";
3466
- Object.defineProperty(exports2, "__esModule", { value: true });
3467
- exports2.isSSL = void 0;
3468
- exports2.setupOutgoing = setupOutgoing;
3469
- exports2.setupSocket = setupSocket;
3470
- exports2.getPort = getPort;
3471
- exports2.hasEncryptedConnection = hasEncryptedConnection;
3472
- exports2.urlJoin = urlJoin;
3473
- exports2.rewriteCookieProperty = rewriteCookieProperty;
3474
- exports2.toURL = toURL;
3475
- var node_tls_1 = require("node:tls");
3476
- var upgradeHeader = /(^|,)\s*upgrade\s*($|,)/i;
3477
- exports2.isSSL = /^https|wss/;
3478
- var HEADER_BLACKLIST = "trailer";
3479
- var HTTP2_HEADER_BLACKLIST = [
3480
- ":method",
3481
- ":path",
3482
- ":scheme",
3483
- ":authority"
3484
- ];
3485
- function setupOutgoing(outgoing, options, req, forward) {
3486
- const target = options[forward || "target"];
3487
- outgoing.port = +(target.port ?? (target.protocol !== void 0 && exports2.isSSL.test(target.protocol) ? 443 : 80));
3488
- for (const e of [
3489
- "host",
3490
- "hostname",
3491
- "socketPath",
3492
- "pfx",
3493
- "key",
3494
- "passphrase",
3495
- "cert",
3496
- "ca",
3497
- "ciphers",
3498
- "secureProtocol"
3499
- ]) {
3500
- outgoing[e] = target[e];
3501
- }
3502
- outgoing.method = options.method || req.method;
3503
- outgoing.headers = { ...req.headers };
3504
- if (options.headers) {
3505
- outgoing.headers = { ...outgoing.headers, ...options.headers };
3466
+ var s = 1e3;
3467
+ var m = s * 60;
3468
+ var h2 = m * 60;
3469
+ var d = h2 * 24;
3470
+ var w = d * 7;
3471
+ var y = d * 365.25;
3472
+ module2.exports = function(val, options) {
3473
+ options = options || {};
3474
+ var type = typeof val;
3475
+ if (type === "string" && val.length > 0) {
3476
+ return parse(val);
3477
+ } else if (type === "number" && isFinite(val)) {
3478
+ return options.long ? fmtLong(val) : fmtShort(val);
3506
3479
  }
3507
- for (const header in outgoing.headers) {
3508
- if (HEADER_BLACKLIST == header.toLowerCase()) {
3509
- delete outgoing.headers[header];
3510
- break;
3511
- }
3480
+ throw new Error(
3481
+ "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
3482
+ );
3483
+ };
3484
+ function parse(str) {
3485
+ str = String(str);
3486
+ if (str.length > 100) {
3487
+ return;
3512
3488
  }
3513
- if (req.httpVersionMajor > 1) {
3514
- for (const header of HTTP2_HEADER_BLACKLIST) {
3515
- delete outgoing.headers[header];
3516
- }
3489
+ var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
3490
+ str
3491
+ );
3492
+ if (!match) {
3493
+ return;
3517
3494
  }
3518
- if (options.auth) {
3519
- delete outgoing.headers.authorization;
3520
- outgoing.auth = options.auth;
3495
+ var n2 = parseFloat(match[1]);
3496
+ var type = (match[2] || "ms").toLowerCase();
3497
+ switch (type) {
3498
+ case "years":
3499
+ case "year":
3500
+ case "yrs":
3501
+ case "yr":
3502
+ case "y":
3503
+ return n2 * y;
3504
+ case "weeks":
3505
+ case "week":
3506
+ case "w":
3507
+ return n2 * w;
3508
+ case "days":
3509
+ case "day":
3510
+ case "d":
3511
+ return n2 * d;
3512
+ case "hours":
3513
+ case "hour":
3514
+ case "hrs":
3515
+ case "hr":
3516
+ case "h":
3517
+ return n2 * h2;
3518
+ case "minutes":
3519
+ case "minute":
3520
+ case "mins":
3521
+ case "min":
3522
+ case "m":
3523
+ return n2 * m;
3524
+ case "seconds":
3525
+ case "second":
3526
+ case "secs":
3527
+ case "sec":
3528
+ case "s":
3529
+ return n2 * s;
3530
+ case "milliseconds":
3531
+ case "millisecond":
3532
+ case "msecs":
3533
+ case "msec":
3534
+ case "ms":
3535
+ return n2;
3536
+ default:
3537
+ return void 0;
3521
3538
  }
3522
- if (options.ca) {
3523
- outgoing.ca = options.ca;
3539
+ }
3540
+ function fmtShort(ms) {
3541
+ var msAbs = Math.abs(ms);
3542
+ if (msAbs >= d) {
3543
+ return Math.round(ms / d) + "d";
3524
3544
  }
3525
- if (target.protocol !== void 0 && exports2.isSSL.test(target.protocol)) {
3526
- outgoing.rejectUnauthorized = typeof options.secure === "undefined" ? true : options.secure;
3545
+ if (msAbs >= h2) {
3546
+ return Math.round(ms / h2) + "h";
3527
3547
  }
3528
- outgoing.agent = options.agent || false;
3529
- outgoing.localAddress = options.localAddress;
3530
- if (!outgoing.agent) {
3531
- outgoing.headers = outgoing.headers || {};
3532
- if (typeof outgoing.headers.connection !== "string" || !upgradeHeader.test(outgoing.headers.connection)) {
3533
- outgoing.headers.connection = "close";
3534
- }
3548
+ if (msAbs >= m) {
3549
+ return Math.round(ms / m) + "m";
3535
3550
  }
3536
- const targetPath = target && options.prependPath !== false && "pathname" in target ? getPath(`${target.pathname}${target.search ?? ""}`) : "/";
3537
- let outgoingPath = options.toProxy ? req.url : getPath(req.url);
3538
- outgoingPath = !options.ignorePath ? outgoingPath : "";
3539
- outgoing.path = urlJoin(targetPath, outgoingPath ?? "");
3540
- if (options.changeOrigin) {
3541
- outgoing.headers.host = target.protocol !== void 0 && required(outgoing.port, target.protocol) && !hasPort(outgoing.host) ? outgoing.host + ":" + outgoing.port : outgoing.host;
3551
+ if (msAbs >= s) {
3552
+ return Math.round(ms / s) + "s";
3542
3553
  }
3543
- return outgoing;
3544
- }
3545
- function setupSocket(socket) {
3546
- socket.setTimeout(0);
3547
- socket.setNoDelay(true);
3548
- socket.setKeepAlive(true, 0);
3549
- return socket;
3554
+ return ms + "ms";
3550
3555
  }
3551
- function getPort(req) {
3552
- const res = req.headers.host ? req.headers.host.match(/:(\d+)/) : "";
3553
- return res ? res[1] : hasEncryptedConnection(req) ? "443" : "80";
3556
+ function fmtLong(ms) {
3557
+ var msAbs = Math.abs(ms);
3558
+ if (msAbs >= d) {
3559
+ return plural(ms, msAbs, d, "day");
3560
+ }
3561
+ if (msAbs >= h2) {
3562
+ return plural(ms, msAbs, h2, "hour");
3563
+ }
3564
+ if (msAbs >= m) {
3565
+ return plural(ms, msAbs, m, "minute");
3566
+ }
3567
+ if (msAbs >= s) {
3568
+ return plural(ms, msAbs, s, "second");
3569
+ }
3570
+ return ms + " ms";
3554
3571
  }
3555
- function hasEncryptedConnection(req) {
3556
- const conn = req.connection;
3557
- return conn instanceof node_tls_1.TLSSocket && conn.encrypted || Boolean(conn.pair);
3572
+ function plural(ms, msAbs, n2, name) {
3573
+ var isPlural = msAbs >= n2 * 1.5;
3574
+ return Math.round(ms / n2) + " " + name + (isPlural ? "s" : "");
3558
3575
  }
3559
- function urlJoin(...args) {
3560
- const queryParams = [];
3561
- let queryParamRaw = "";
3562
- args.forEach((url, index) => {
3563
- const qpStart = url.indexOf("?");
3564
- if (qpStart !== -1) {
3565
- queryParams.push(url.substring(qpStart + 1));
3566
- args[index] = url.substring(0, qpStart);
3567
- }
3576
+ }
3577
+ });
3578
+
3579
+ // ../../node_modules/debug/src/common.js
3580
+ var require_common = __commonJS({
3581
+ "../../node_modules/debug/src/common.js"(exports2, module2) {
3582
+ "use strict";
3583
+ function setup(env2) {
3584
+ createDebug.debug = createDebug;
3585
+ createDebug.default = createDebug;
3586
+ createDebug.coerce = coerce;
3587
+ createDebug.disable = disable;
3588
+ createDebug.enable = enable;
3589
+ createDebug.enabled = enabled;
3590
+ createDebug.humanize = require_ms();
3591
+ createDebug.destroy = destroy;
3592
+ Object.keys(env2).forEach((key) => {
3593
+ createDebug[key] = env2[key];
3568
3594
  });
3569
- queryParamRaw = queryParams.filter(Boolean).join("&");
3570
- let retSegs = "";
3571
- for (const seg of args) {
3572
- if (!seg) {
3573
- continue;
3595
+ createDebug.names = [];
3596
+ createDebug.skips = [];
3597
+ createDebug.formatters = {};
3598
+ function selectColor(namespace) {
3599
+ let hash = 0;
3600
+ for (let i2 = 0; i2 < namespace.length; i2++) {
3601
+ hash = (hash << 5) - hash + namespace.charCodeAt(i2);
3602
+ hash |= 0;
3574
3603
  }
3575
- if (retSegs.endsWith("/")) {
3576
- if (seg.startsWith("/")) {
3577
- retSegs += seg.slice(1);
3578
- } else {
3579
- retSegs += seg;
3604
+ return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
3605
+ }
3606
+ createDebug.selectColor = selectColor;
3607
+ function createDebug(namespace) {
3608
+ let prevTime;
3609
+ let enableOverride = null;
3610
+ let namespacesCache;
3611
+ let enabledCache;
3612
+ function debug(...args) {
3613
+ if (!debug.enabled) {
3614
+ return;
3580
3615
  }
3581
- } else {
3582
- if (seg.startsWith("/")) {
3583
- retSegs += seg;
3584
- } else {
3585
- retSegs += "/" + seg;
3616
+ const self = debug;
3617
+ const curr = Number(/* @__PURE__ */ new Date());
3618
+ const ms = curr - (prevTime || curr);
3619
+ self.diff = ms;
3620
+ self.prev = prevTime;
3621
+ self.curr = curr;
3622
+ prevTime = curr;
3623
+ args[0] = createDebug.coerce(args[0]);
3624
+ if (typeof args[0] !== "string") {
3625
+ args.unshift("%O");
3586
3626
  }
3627
+ let index = 0;
3628
+ args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format2) => {
3629
+ if (match === "%%") {
3630
+ return "%";
3631
+ }
3632
+ index++;
3633
+ const formatter = createDebug.formatters[format2];
3634
+ if (typeof formatter === "function") {
3635
+ const val = args[index];
3636
+ match = formatter.call(self, val);
3637
+ args.splice(index, 1);
3638
+ index--;
3639
+ }
3640
+ return match;
3641
+ });
3642
+ createDebug.formatArgs.call(self, args);
3643
+ const logFn = self.log || createDebug.log;
3644
+ logFn.apply(self, args);
3587
3645
  }
3588
- }
3589
- return queryParamRaw ? retSegs + "?" + queryParamRaw : retSegs;
3590
- }
3591
- function rewriteCookieProperty(header, config, property) {
3592
- if (Array.isArray(header)) {
3593
- return header.map((headerElement) => {
3594
- return rewriteCookieProperty(headerElement, config, property);
3595
- });
3596
- }
3597
- return header.replace(new RegExp("(;\\s*" + property + "=)([^;]+)", "i"), (match, prefix, previousValue) => {
3598
- let newValue;
3599
- if (previousValue in config) {
3600
- newValue = config[previousValue];
3601
- } else if ("*" in config) {
3602
- newValue = config["*"];
3603
- } else {
3604
- return match;
3605
- }
3606
- if (newValue) {
3607
- return prefix + newValue;
3608
- } else {
3609
- return "";
3646
+ debug.namespace = namespace;
3647
+ debug.useColors = createDebug.useColors();
3648
+ debug.color = createDebug.selectColor(namespace);
3649
+ debug.extend = extend;
3650
+ debug.destroy = createDebug.destroy;
3651
+ Object.defineProperty(debug, "enabled", {
3652
+ enumerable: true,
3653
+ configurable: false,
3654
+ get: () => {
3655
+ if (enableOverride !== null) {
3656
+ return enableOverride;
3657
+ }
3658
+ if (namespacesCache !== createDebug.namespaces) {
3659
+ namespacesCache = createDebug.namespaces;
3660
+ enabledCache = createDebug.enabled(namespace);
3661
+ }
3662
+ return enabledCache;
3663
+ },
3664
+ set: (v) => {
3665
+ enableOverride = v;
3666
+ }
3667
+ });
3668
+ if (typeof createDebug.init === "function") {
3669
+ createDebug.init(debug);
3610
3670
  }
3611
- });
3612
- }
3613
- function hasPort(host) {
3614
- return !!~host.indexOf(":");
3615
- }
3616
- function getPath(url) {
3617
- if (url === "" || url?.startsWith("?")) {
3618
- return url;
3671
+ return debug;
3619
3672
  }
3620
- const u2 = toURL(url);
3621
- return `${u2.pathname ?? ""}${u2.search ?? ""}`;
3622
- }
3623
- function toURL(url) {
3624
- if (url instanceof URL) {
3625
- return url;
3626
- } else if (typeof url === "object" && "href" in url && typeof url.href === "string") {
3627
- url = url.href;
3673
+ function extend(namespace, delimiter) {
3674
+ const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
3675
+ newDebug.log = this.log;
3676
+ return newDebug;
3628
3677
  }
3629
- if (!url) {
3630
- url = "";
3678
+ function enable(namespaces) {
3679
+ createDebug.save(namespaces);
3680
+ createDebug.namespaces = namespaces;
3681
+ createDebug.names = [];
3682
+ createDebug.skips = [];
3683
+ const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
3684
+ for (const ns of split) {
3685
+ if (ns[0] === "-") {
3686
+ createDebug.skips.push(ns.slice(1));
3687
+ } else {
3688
+ createDebug.names.push(ns);
3689
+ }
3690
+ }
3631
3691
  }
3632
- if (typeof url != "string") {
3633
- url = `${url}`;
3692
+ function matchesTemplate(search, template) {
3693
+ let searchIndex = 0;
3694
+ let templateIndex = 0;
3695
+ let starIndex = -1;
3696
+ let matchIndex = 0;
3697
+ while (searchIndex < search.length) {
3698
+ if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
3699
+ if (template[templateIndex] === "*") {
3700
+ starIndex = templateIndex;
3701
+ matchIndex = searchIndex;
3702
+ templateIndex++;
3703
+ } else {
3704
+ searchIndex++;
3705
+ templateIndex++;
3706
+ }
3707
+ } else if (starIndex !== -1) {
3708
+ templateIndex = starIndex + 1;
3709
+ matchIndex++;
3710
+ searchIndex = matchIndex;
3711
+ } else {
3712
+ return false;
3713
+ }
3714
+ }
3715
+ while (templateIndex < template.length && template[templateIndex] === "*") {
3716
+ templateIndex++;
3717
+ }
3718
+ return templateIndex === template.length;
3634
3719
  }
3635
- if (url.startsWith("//")) {
3636
- url = `http://base.invalid${url}`;
3720
+ function disable() {
3721
+ const namespaces = [
3722
+ ...createDebug.names,
3723
+ ...createDebug.skips.map((namespace) => "-" + namespace)
3724
+ ].join(",");
3725
+ createDebug.enable("");
3726
+ return namespaces;
3637
3727
  }
3638
- return new URL(url, "http://base.invalid");
3639
- }
3640
- function required(port, protocol) {
3641
- protocol = protocol.split(":")[0];
3642
- port = +port;
3643
- if (!port)
3728
+ function enabled(name) {
3729
+ for (const skip of createDebug.skips) {
3730
+ if (matchesTemplate(name, skip)) {
3731
+ return false;
3732
+ }
3733
+ }
3734
+ for (const ns of createDebug.names) {
3735
+ if (matchesTemplate(name, ns)) {
3736
+ return true;
3737
+ }
3738
+ }
3644
3739
  return false;
3645
- switch (protocol) {
3646
- case "http":
3647
- case "ws":
3648
- return port !== 80;
3649
- case "https":
3650
- case "wss":
3651
- return port !== 443;
3652
3740
  }
3653
- return port !== 0;
3741
+ function coerce(val) {
3742
+ if (val instanceof Error) {
3743
+ return val.stack || val.message;
3744
+ }
3745
+ return val;
3746
+ }
3747
+ function destroy() {
3748
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
3749
+ }
3750
+ createDebug.enable(createDebug.load());
3751
+ return createDebug;
3654
3752
  }
3753
+ module2.exports = setup;
3655
3754
  }
3656
3755
  });
3657
3756
 
3658
- // node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-outgoing.js
3659
- var require_web_outgoing = __commonJS({
3660
- "node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-outgoing.js"(exports2) {
3757
+ // ../../node_modules/debug/src/browser.js
3758
+ var require_browser = __commonJS({
3759
+ "../../node_modules/debug/src/browser.js"(exports2, module2) {
3661
3760
  "use strict";
3662
- var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o2, m, k, k2) {
3663
- if (k2 === void 0) k2 = k;
3664
- var desc = Object.getOwnPropertyDescriptor(m, k);
3665
- if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
3666
- desc = { enumerable: true, get: function() {
3667
- return m[k];
3668
- } };
3669
- }
3670
- Object.defineProperty(o2, k2, desc);
3671
- }) : (function(o2, m, k, k2) {
3672
- if (k2 === void 0) k2 = k;
3673
- o2[k2] = m[k];
3674
- }));
3675
- var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o2, v) {
3676
- Object.defineProperty(o2, "default", { enumerable: true, value: v });
3677
- }) : function(o2, v) {
3678
- o2["default"] = v;
3679
- });
3680
- var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
3681
- var ownKeys = function(o2) {
3682
- ownKeys = Object.getOwnPropertyNames || function(o3) {
3683
- var ar = [];
3684
- for (var k in o3) if (Object.prototype.hasOwnProperty.call(o3, k)) ar[ar.length] = k;
3685
- return ar;
3686
- };
3687
- return ownKeys(o2);
3688
- };
3689
- return function(mod) {
3690
- if (mod && mod.__esModule) return mod;
3691
- var result = {};
3692
- if (mod != null) {
3693
- for (var k = ownKeys(mod), i2 = 0; i2 < k.length; i2++) if (k[i2] !== "default") __createBinding(result, mod, k[i2]);
3761
+ exports2.formatArgs = formatArgs;
3762
+ exports2.save = save;
3763
+ exports2.load = load2;
3764
+ exports2.useColors = useColors;
3765
+ exports2.storage = localstorage();
3766
+ exports2.destroy = /* @__PURE__ */ (() => {
3767
+ let warned = false;
3768
+ return () => {
3769
+ if (!warned) {
3770
+ warned = true;
3771
+ console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
3694
3772
  }
3695
- __setModuleDefault(result, mod);
3696
- return result;
3697
3773
  };
3698
3774
  })();
3699
- Object.defineProperty(exports2, "__esModule", { value: true });
3700
- exports2.OUTGOING_PASSES = void 0;
3701
- exports2.removeChunked = removeChunked;
3702
- exports2.setConnection = setConnection;
3703
- exports2.setRedirectHostRewrite = setRedirectHostRewrite;
3704
- exports2.writeHeaders = writeHeaders;
3705
- exports2.writeStatusCode = writeStatusCode;
3706
- var common2 = __importStar(require_common());
3707
- var redirectRegex = /^201|30(1|2|7|8)$/;
3708
- function removeChunked(_req, _res, proxyRes) {
3709
- delete proxyRes.headers["transfer-encoding"];
3710
- }
3711
- function setConnection(req, _res, proxyRes) {
3712
- if (req.httpVersion === "1.0") {
3713
- proxyRes.headers["connection"] = req.headers["connection"] || "close";
3714
- } else if (req.httpVersion !== "2.0" && !proxyRes.headers["connection"]) {
3715
- proxyRes.headers["connection"] = req.headers["connection"] || "keep-alive";
3716
- }
3717
- }
3718
- function setRedirectHostRewrite(req, _res, proxyRes, options) {
3719
- if ((options.hostRewrite || options.autoRewrite || options.protocolRewrite) && proxyRes.headers["location"] && redirectRegex.test(`${proxyRes.statusCode}`)) {
3720
- const target = common2.toURL(options.target);
3721
- const location = proxyRes.headers["location"];
3722
- if (typeof location != "string") {
3723
- return;
3724
- }
3725
- const u2 = common2.toURL(location);
3726
- if (target.host != u2.host) {
3727
- return;
3728
- }
3729
- if (options.hostRewrite) {
3730
- u2.host = options.hostRewrite;
3731
- } else if (options.autoRewrite) {
3732
- u2.host = req.headers["host"] ?? "";
3733
- }
3734
- if (options.protocolRewrite) {
3735
- u2.protocol = options.protocolRewrite;
3736
- }
3737
- proxyRes.headers["location"] = u2.toString();
3738
- }
3775
+ exports2.colors = [
3776
+ "#0000CC",
3777
+ "#0000FF",
3778
+ "#0033CC",
3779
+ "#0033FF",
3780
+ "#0066CC",
3781
+ "#0066FF",
3782
+ "#0099CC",
3783
+ "#0099FF",
3784
+ "#00CC00",
3785
+ "#00CC33",
3786
+ "#00CC66",
3787
+ "#00CC99",
3788
+ "#00CCCC",
3789
+ "#00CCFF",
3790
+ "#3300CC",
3791
+ "#3300FF",
3792
+ "#3333CC",
3793
+ "#3333FF",
3794
+ "#3366CC",
3795
+ "#3366FF",
3796
+ "#3399CC",
3797
+ "#3399FF",
3798
+ "#33CC00",
3799
+ "#33CC33",
3800
+ "#33CC66",
3801
+ "#33CC99",
3802
+ "#33CCCC",
3803
+ "#33CCFF",
3804
+ "#6600CC",
3805
+ "#6600FF",
3806
+ "#6633CC",
3807
+ "#6633FF",
3808
+ "#66CC00",
3809
+ "#66CC33",
3810
+ "#9900CC",
3811
+ "#9900FF",
3812
+ "#9933CC",
3813
+ "#9933FF",
3814
+ "#99CC00",
3815
+ "#99CC33",
3816
+ "#CC0000",
3817
+ "#CC0033",
3818
+ "#CC0066",
3819
+ "#CC0099",
3820
+ "#CC00CC",
3821
+ "#CC00FF",
3822
+ "#CC3300",
3823
+ "#CC3333",
3824
+ "#CC3366",
3825
+ "#CC3399",
3826
+ "#CC33CC",
3827
+ "#CC33FF",
3828
+ "#CC6600",
3829
+ "#CC6633",
3830
+ "#CC9900",
3831
+ "#CC9933",
3832
+ "#CCCC00",
3833
+ "#CCCC33",
3834
+ "#FF0000",
3835
+ "#FF0033",
3836
+ "#FF0066",
3837
+ "#FF0099",
3838
+ "#FF00CC",
3839
+ "#FF00FF",
3840
+ "#FF3300",
3841
+ "#FF3333",
3842
+ "#FF3366",
3843
+ "#FF3399",
3844
+ "#FF33CC",
3845
+ "#FF33FF",
3846
+ "#FF6600",
3847
+ "#FF6633",
3848
+ "#FF9900",
3849
+ "#FF9933",
3850
+ "#FFCC00",
3851
+ "#FFCC33"
3852
+ ];
3853
+ function useColors() {
3854
+ if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
3855
+ return true;
3856
+ }
3857
+ if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
3858
+ return false;
3859
+ }
3860
+ let m;
3861
+ return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
3862
+ typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
3863
+ // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
3864
+ typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
3865
+ typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
3739
3866
  }
3740
- function writeHeaders(_req, res, proxyRes, options) {
3741
- const rewriteCookieDomainConfig = typeof options.cookieDomainRewrite === "string" ? (
3742
- // also test for ''
3743
- { "*": options.cookieDomainRewrite }
3744
- ) : options.cookieDomainRewrite;
3745
- const rewriteCookiePathConfig = typeof options.cookiePathRewrite === "string" ? (
3746
- // also test for ''
3747
- { "*": options.cookiePathRewrite }
3748
- ) : options.cookiePathRewrite;
3749
- const preserveHeaderKeyCase = options.preserveHeaderKeyCase;
3750
- const setHeader = (key, header) => {
3751
- if (header == void 0) {
3867
+ function formatArgs(args) {
3868
+ args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff);
3869
+ if (!this.useColors) {
3870
+ return;
3871
+ }
3872
+ const c3 = "color: " + this.color;
3873
+ args.splice(1, 0, c3, "color: inherit");
3874
+ let index = 0;
3875
+ let lastC = 0;
3876
+ args[0].replace(/%[a-zA-Z%]/g, (match) => {
3877
+ if (match === "%%") {
3752
3878
  return;
3753
3879
  }
3754
- if (rewriteCookieDomainConfig && key.toLowerCase() === "set-cookie") {
3755
- header = common2.rewriteCookieProperty(header, rewriteCookieDomainConfig, "domain");
3756
- }
3757
- if (rewriteCookiePathConfig && key.toLowerCase() === "set-cookie") {
3758
- header = common2.rewriteCookieProperty(header, rewriteCookiePathConfig, "path");
3880
+ index++;
3881
+ if (match === "%c") {
3882
+ lastC = index;
3759
3883
  }
3760
- res.setHeader(String(key).trim(), header);
3761
- };
3762
- let rawHeaderKeyMap;
3763
- if (preserveHeaderKeyCase && proxyRes.rawHeaders != void 0) {
3764
- rawHeaderKeyMap = {};
3765
- for (let i2 = 0; i2 < proxyRes.rawHeaders.length; i2 += 2) {
3766
- const key = proxyRes.rawHeaders[i2];
3767
- rawHeaderKeyMap[key.toLowerCase()] = key;
3884
+ });
3885
+ args.splice(lastC, 0, c3);
3886
+ }
3887
+ exports2.log = console.debug || console.log || (() => {
3888
+ });
3889
+ function save(namespaces) {
3890
+ try {
3891
+ if (namespaces) {
3892
+ exports2.storage.setItem("debug", namespaces);
3893
+ } else {
3894
+ exports2.storage.removeItem("debug");
3768
3895
  }
3896
+ } catch (error) {
3769
3897
  }
3770
- for (const key0 in proxyRes.headers) {
3771
- let key = key0;
3772
- if (_req.httpVersionMajor > 1 && key === "connection") {
3773
- continue;
3774
- }
3775
- const header = proxyRes.headers[key];
3776
- if (preserveHeaderKeyCase && rawHeaderKeyMap) {
3777
- key = rawHeaderKeyMap[key] ?? key;
3778
- }
3779
- setHeader(key, header);
3898
+ }
3899
+ function load2() {
3900
+ let r;
3901
+ try {
3902
+ r = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
3903
+ } catch (error) {
3904
+ }
3905
+ if (!r && typeof process !== "undefined" && "env" in process) {
3906
+ r = process.env.DEBUG;
3780
3907
  }
3908
+ return r;
3781
3909
  }
3782
- function writeStatusCode(_req, res, proxyRes) {
3783
- res.statusCode = proxyRes.statusCode;
3784
- if (proxyRes.statusMessage && _req.httpVersionMajor === 1) {
3785
- res.statusMessage = proxyRes.statusMessage;
3910
+ function localstorage() {
3911
+ try {
3912
+ return localStorage;
3913
+ } catch (error) {
3786
3914
  }
3787
3915
  }
3788
- exports2.OUTGOING_PASSES = {
3789
- removeChunked,
3790
- setConnection,
3791
- setRedirectHostRewrite,
3792
- writeHeaders,
3793
- writeStatusCode
3916
+ module2.exports = require_common()(exports2);
3917
+ var { formatters } = module2.exports;
3918
+ formatters.j = function(v) {
3919
+ try {
3920
+ return JSON.stringify(v);
3921
+ } catch (error) {
3922
+ return "[UnexpectedJSONParseError]: " + error.message;
3923
+ }
3794
3924
  };
3795
3925
  }
3796
3926
  });
3797
3927
 
3798
- // node_modules/ms/index.js
3799
- var require_ms = __commonJS({
3800
- "node_modules/ms/index.js"(exports2, module2) {
3928
+ // ../../node_modules/debug/src/node.js
3929
+ var require_node = __commonJS({
3930
+ "../../node_modules/debug/src/node.js"(exports2, module2) {
3801
3931
  "use strict";
3802
- var s = 1e3;
3803
- var m = s * 60;
3804
- var h2 = m * 60;
3805
- var d = h2 * 24;
3806
- var w = d * 7;
3807
- var y = d * 365.25;
3808
- module2.exports = function(val, options) {
3809
- options = options || {};
3810
- var type = typeof val;
3811
- if (type === "string" && val.length > 0) {
3812
- return parse(val);
3813
- } else if (type === "number" && isFinite(val)) {
3814
- return options.long ? fmtLong(val) : fmtShort(val);
3815
- }
3816
- throw new Error(
3817
- "val is not a non-empty string or a valid number. val=" + JSON.stringify(val)
3818
- );
3819
- };
3820
- function parse(str) {
3821
- str = String(str);
3822
- if (str.length > 100) {
3823
- return;
3824
- }
3825
- var match = /^(-?(?:\d+)?\.?\d+) *(milliseconds?|msecs?|ms|seconds?|secs?|s|minutes?|mins?|m|hours?|hrs?|h|days?|d|weeks?|w|years?|yrs?|y)?$/i.exec(
3826
- str
3827
- );
3828
- if (!match) {
3829
- return;
3830
- }
3831
- var n2 = parseFloat(match[1]);
3832
- var type = (match[2] || "ms").toLowerCase();
3833
- switch (type) {
3834
- case "years":
3835
- case "year":
3836
- case "yrs":
3837
- case "yr":
3838
- case "y":
3839
- return n2 * y;
3840
- case "weeks":
3841
- case "week":
3842
- case "w":
3843
- return n2 * w;
3844
- case "days":
3845
- case "day":
3846
- case "d":
3847
- return n2 * d;
3848
- case "hours":
3849
- case "hour":
3850
- case "hrs":
3851
- case "hr":
3852
- case "h":
3853
- return n2 * h2;
3854
- case "minutes":
3855
- case "minute":
3856
- case "mins":
3857
- case "min":
3858
- case "m":
3859
- return n2 * m;
3860
- case "seconds":
3861
- case "second":
3862
- case "secs":
3863
- case "sec":
3864
- case "s":
3865
- return n2 * s;
3866
- case "milliseconds":
3867
- case "millisecond":
3868
- case "msecs":
3869
- case "msec":
3870
- case "ms":
3871
- return n2;
3872
- default:
3873
- return void 0;
3932
+ var tty4 = require("tty");
3933
+ var util = require("util");
3934
+ exports2.init = init;
3935
+ exports2.log = log;
3936
+ exports2.formatArgs = formatArgs;
3937
+ exports2.save = save;
3938
+ exports2.load = load2;
3939
+ exports2.useColors = useColors;
3940
+ exports2.destroy = util.deprecate(
3941
+ () => {
3942
+ },
3943
+ "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
3944
+ );
3945
+ exports2.colors = [6, 2, 3, 4, 5, 1];
3946
+ try {
3947
+ const supportsColor2 = require("supports-color");
3948
+ if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
3949
+ exports2.colors = [
3950
+ 20,
3951
+ 21,
3952
+ 26,
3953
+ 27,
3954
+ 32,
3955
+ 33,
3956
+ 38,
3957
+ 39,
3958
+ 40,
3959
+ 41,
3960
+ 42,
3961
+ 43,
3962
+ 44,
3963
+ 45,
3964
+ 56,
3965
+ 57,
3966
+ 62,
3967
+ 63,
3968
+ 68,
3969
+ 69,
3970
+ 74,
3971
+ 75,
3972
+ 76,
3973
+ 77,
3974
+ 78,
3975
+ 79,
3976
+ 80,
3977
+ 81,
3978
+ 92,
3979
+ 93,
3980
+ 98,
3981
+ 99,
3982
+ 112,
3983
+ 113,
3984
+ 128,
3985
+ 129,
3986
+ 134,
3987
+ 135,
3988
+ 148,
3989
+ 149,
3990
+ 160,
3991
+ 161,
3992
+ 162,
3993
+ 163,
3994
+ 164,
3995
+ 165,
3996
+ 166,
3997
+ 167,
3998
+ 168,
3999
+ 169,
4000
+ 170,
4001
+ 171,
4002
+ 172,
4003
+ 173,
4004
+ 178,
4005
+ 179,
4006
+ 184,
4007
+ 185,
4008
+ 196,
4009
+ 197,
4010
+ 198,
4011
+ 199,
4012
+ 200,
4013
+ 201,
4014
+ 202,
4015
+ 203,
4016
+ 204,
4017
+ 205,
4018
+ 206,
4019
+ 207,
4020
+ 208,
4021
+ 209,
4022
+ 214,
4023
+ 215,
4024
+ 220,
4025
+ 221
4026
+ ];
3874
4027
  }
4028
+ } catch (error) {
3875
4029
  }
3876
- function fmtShort(ms) {
3877
- var msAbs = Math.abs(ms);
3878
- if (msAbs >= d) {
3879
- return Math.round(ms / d) + "d";
3880
- }
3881
- if (msAbs >= h2) {
3882
- return Math.round(ms / h2) + "h";
3883
- }
3884
- if (msAbs >= m) {
3885
- return Math.round(ms / m) + "m";
3886
- }
3887
- if (msAbs >= s) {
3888
- return Math.round(ms / s) + "s";
4030
+ exports2.inspectOpts = Object.keys(process.env).filter((key) => {
4031
+ return /^debug_/i.test(key);
4032
+ }).reduce((obj, key) => {
4033
+ const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
4034
+ return k.toUpperCase();
4035
+ });
4036
+ let val = process.env[key];
4037
+ if (/^(yes|on|true|enabled)$/i.test(val)) {
4038
+ val = true;
4039
+ } else if (/^(no|off|false|disabled)$/i.test(val)) {
4040
+ val = false;
4041
+ } else if (val === "null") {
4042
+ val = null;
4043
+ } else {
4044
+ val = Number(val);
3889
4045
  }
3890
- return ms + "ms";
4046
+ obj[prop] = val;
4047
+ return obj;
4048
+ }, {});
4049
+ function useColors() {
4050
+ return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty4.isatty(process.stderr.fd);
3891
4051
  }
3892
- function fmtLong(ms) {
3893
- var msAbs = Math.abs(ms);
3894
- if (msAbs >= d) {
3895
- return plural(ms, msAbs, d, "day");
4052
+ function formatArgs(args) {
4053
+ const { namespace: name, useColors: useColors2 } = this;
4054
+ if (useColors2) {
4055
+ const c3 = this.color;
4056
+ const colorCode = "\x1B[3" + (c3 < 8 ? c3 : "8;5;" + c3);
4057
+ const prefix = ` ${colorCode};1m${name} \x1B[0m`;
4058
+ args[0] = prefix + args[0].split("\n").join("\n" + prefix);
4059
+ args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
4060
+ } else {
4061
+ args[0] = getDate() + name + " " + args[0];
3896
4062
  }
3897
- if (msAbs >= h2) {
3898
- return plural(ms, msAbs, h2, "hour");
4063
+ }
4064
+ function getDate() {
4065
+ if (exports2.inspectOpts.hideDate) {
4066
+ return "";
3899
4067
  }
3900
- if (msAbs >= m) {
3901
- return plural(ms, msAbs, m, "minute");
4068
+ return (/* @__PURE__ */ new Date()).toISOString() + " ";
4069
+ }
4070
+ function log(...args) {
4071
+ return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
4072
+ }
4073
+ function save(namespaces) {
4074
+ if (namespaces) {
4075
+ process.env.DEBUG = namespaces;
4076
+ } else {
4077
+ delete process.env.DEBUG;
3902
4078
  }
3903
- if (msAbs >= s) {
3904
- return plural(ms, msAbs, s, "second");
4079
+ }
4080
+ function load2() {
4081
+ return process.env.DEBUG;
4082
+ }
4083
+ function init(debug) {
4084
+ debug.inspectOpts = {};
4085
+ const keys = Object.keys(exports2.inspectOpts);
4086
+ for (let i2 = 0; i2 < keys.length; i2++) {
4087
+ debug.inspectOpts[keys[i2]] = exports2.inspectOpts[keys[i2]];
3905
4088
  }
3906
- return ms + " ms";
3907
4089
  }
3908
- function plural(ms, msAbs, n2, name) {
3909
- var isPlural = msAbs >= n2 * 1.5;
3910
- return Math.round(ms / n2) + " " + name + (isPlural ? "s" : "");
4090
+ module2.exports = require_common()(exports2);
4091
+ var { formatters } = module2.exports;
4092
+ formatters.o = function(v) {
4093
+ this.inspectOpts.colors = this.useColors;
4094
+ return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
4095
+ };
4096
+ formatters.O = function(v) {
4097
+ this.inspectOpts.colors = this.useColors;
4098
+ return util.inspect(v, this.inspectOpts);
4099
+ };
4100
+ }
4101
+ });
4102
+
4103
+ // ../../node_modules/debug/src/index.js
4104
+ var require_src = __commonJS({
4105
+ "../../node_modules/debug/src/index.js"(exports2, module2) {
4106
+ "use strict";
4107
+ if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
4108
+ module2.exports = require_browser();
4109
+ } else {
4110
+ module2.exports = require_node();
3911
4111
  }
3912
4112
  }
3913
4113
  });
3914
4114
 
3915
- // node_modules/debug/src/common.js
3916
- var require_common2 = __commonJS({
3917
- "node_modules/debug/src/common.js"(exports2, module2) {
4115
+ // ../../node_modules/follow-redirects/debug.js
4116
+ var require_debug = __commonJS({
4117
+ "../../node_modules/follow-redirects/debug.js"(exports2, module2) {
3918
4118
  "use strict";
3919
- function setup(env2) {
3920
- createDebug.debug = createDebug;
3921
- createDebug.default = createDebug;
3922
- createDebug.coerce = coerce;
3923
- createDebug.disable = disable;
3924
- createDebug.enable = enable;
3925
- createDebug.enabled = enabled;
3926
- createDebug.humanize = require_ms();
3927
- createDebug.destroy = destroy;
3928
- Object.keys(env2).forEach((key) => {
3929
- createDebug[key] = env2[key];
3930
- });
3931
- createDebug.names = [];
3932
- createDebug.skips = [];
3933
- createDebug.formatters = {};
3934
- function selectColor(namespace) {
3935
- let hash = 0;
3936
- for (let i2 = 0; i2 < namespace.length; i2++) {
3937
- hash = (hash << 5) - hash + namespace.charCodeAt(i2);
3938
- hash |= 0;
3939
- }
3940
- return createDebug.colors[Math.abs(hash) % createDebug.colors.length];
3941
- }
3942
- createDebug.selectColor = selectColor;
3943
- function createDebug(namespace) {
3944
- let prevTime;
3945
- let enableOverride = null;
3946
- let namespacesCache;
3947
- let enabledCache;
3948
- function debug(...args) {
3949
- if (!debug.enabled) {
3950
- return;
3951
- }
3952
- const self = debug;
3953
- const curr = Number(/* @__PURE__ */ new Date());
3954
- const ms = curr - (prevTime || curr);
3955
- self.diff = ms;
3956
- self.prev = prevTime;
3957
- self.curr = curr;
3958
- prevTime = curr;
3959
- args[0] = createDebug.coerce(args[0]);
3960
- if (typeof args[0] !== "string") {
3961
- args.unshift("%O");
3962
- }
3963
- let index = 0;
3964
- args[0] = args[0].replace(/%([a-zA-Z%])/g, (match, format2) => {
3965
- if (match === "%%") {
3966
- return "%";
3967
- }
3968
- index++;
3969
- const formatter = createDebug.formatters[format2];
3970
- if (typeof formatter === "function") {
3971
- const val = args[index];
3972
- match = formatter.call(self, val);
3973
- args.splice(index, 1);
3974
- index--;
3975
- }
3976
- return match;
3977
- });
3978
- createDebug.formatArgs.call(self, args);
3979
- const logFn = self.log || createDebug.log;
3980
- logFn.apply(self, args);
3981
- }
3982
- debug.namespace = namespace;
3983
- debug.useColors = createDebug.useColors();
3984
- debug.color = createDebug.selectColor(namespace);
3985
- debug.extend = extend;
3986
- debug.destroy = createDebug.destroy;
3987
- Object.defineProperty(debug, "enabled", {
3988
- enumerable: true,
3989
- configurable: false,
3990
- get: () => {
3991
- if (enableOverride !== null) {
3992
- return enableOverride;
3993
- }
3994
- if (namespacesCache !== createDebug.namespaces) {
3995
- namespacesCache = createDebug.namespaces;
3996
- enabledCache = createDebug.enabled(namespace);
3997
- }
3998
- return enabledCache;
3999
- },
4000
- set: (v) => {
4001
- enableOverride = v;
4002
- }
4003
- });
4004
- if (typeof createDebug.init === "function") {
4005
- createDebug.init(debug);
4006
- }
4007
- return debug;
4008
- }
4009
- function extend(namespace, delimiter) {
4010
- const newDebug = createDebug(this.namespace + (typeof delimiter === "undefined" ? ":" : delimiter) + namespace);
4011
- newDebug.log = this.log;
4012
- return newDebug;
4013
- }
4014
- function enable(namespaces) {
4015
- createDebug.save(namespaces);
4016
- createDebug.namespaces = namespaces;
4017
- createDebug.names = [];
4018
- createDebug.skips = [];
4019
- const split = (typeof namespaces === "string" ? namespaces : "").trim().replace(/\s+/g, ",").split(",").filter(Boolean);
4020
- for (const ns of split) {
4021
- if (ns[0] === "-") {
4022
- createDebug.skips.push(ns.slice(1));
4023
- } else {
4024
- createDebug.names.push(ns);
4025
- }
4026
- }
4027
- }
4028
- function matchesTemplate(search, template) {
4029
- let searchIndex = 0;
4030
- let templateIndex = 0;
4031
- let starIndex = -1;
4032
- let matchIndex = 0;
4033
- while (searchIndex < search.length) {
4034
- if (templateIndex < template.length && (template[templateIndex] === search[searchIndex] || template[templateIndex] === "*")) {
4035
- if (template[templateIndex] === "*") {
4036
- starIndex = templateIndex;
4037
- matchIndex = searchIndex;
4038
- templateIndex++;
4039
- } else {
4040
- searchIndex++;
4041
- templateIndex++;
4042
- }
4043
- } else if (starIndex !== -1) {
4044
- templateIndex = starIndex + 1;
4045
- matchIndex++;
4046
- searchIndex = matchIndex;
4047
- } else {
4048
- return false;
4049
- }
4050
- }
4051
- while (templateIndex < template.length && template[templateIndex] === "*") {
4052
- templateIndex++;
4053
- }
4054
- return templateIndex === template.length;
4055
- }
4056
- function disable() {
4057
- const namespaces = [
4058
- ...createDebug.names,
4059
- ...createDebug.skips.map((namespace) => "-" + namespace)
4060
- ].join(",");
4061
- createDebug.enable("");
4062
- return namespaces;
4063
- }
4064
- function enabled(name) {
4065
- for (const skip of createDebug.skips) {
4066
- if (matchesTemplate(name, skip)) {
4067
- return false;
4068
- }
4069
- }
4070
- for (const ns of createDebug.names) {
4071
- if (matchesTemplate(name, ns)) {
4072
- return true;
4073
- }
4074
- }
4075
- return false;
4076
- }
4077
- function coerce(val) {
4078
- if (val instanceof Error) {
4079
- return val.stack || val.message;
4080
- }
4081
- return val;
4082
- }
4083
- function destroy() {
4084
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
4085
- }
4086
- createDebug.enable(createDebug.load());
4087
- return createDebug;
4088
- }
4089
- module2.exports = setup;
4090
- }
4091
- });
4092
-
4093
- // node_modules/debug/src/browser.js
4094
- var require_browser = __commonJS({
4095
- "node_modules/debug/src/browser.js"(exports2, module2) {
4096
- "use strict";
4097
- exports2.formatArgs = formatArgs;
4098
- exports2.save = save;
4099
- exports2.load = load2;
4100
- exports2.useColors = useColors;
4101
- exports2.storage = localstorage();
4102
- exports2.destroy = /* @__PURE__ */ (() => {
4103
- let warned = false;
4104
- return () => {
4105
- if (!warned) {
4106
- warned = true;
4107
- console.warn("Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`.");
4108
- }
4109
- };
4110
- })();
4111
- exports2.colors = [
4112
- "#0000CC",
4113
- "#0000FF",
4114
- "#0033CC",
4115
- "#0033FF",
4116
- "#0066CC",
4117
- "#0066FF",
4118
- "#0099CC",
4119
- "#0099FF",
4120
- "#00CC00",
4121
- "#00CC33",
4122
- "#00CC66",
4123
- "#00CC99",
4124
- "#00CCCC",
4125
- "#00CCFF",
4126
- "#3300CC",
4127
- "#3300FF",
4128
- "#3333CC",
4129
- "#3333FF",
4130
- "#3366CC",
4131
- "#3366FF",
4132
- "#3399CC",
4133
- "#3399FF",
4134
- "#33CC00",
4135
- "#33CC33",
4136
- "#33CC66",
4137
- "#33CC99",
4138
- "#33CCCC",
4139
- "#33CCFF",
4140
- "#6600CC",
4141
- "#6600FF",
4142
- "#6633CC",
4143
- "#6633FF",
4144
- "#66CC00",
4145
- "#66CC33",
4146
- "#9900CC",
4147
- "#9900FF",
4148
- "#9933CC",
4149
- "#9933FF",
4150
- "#99CC00",
4151
- "#99CC33",
4152
- "#CC0000",
4153
- "#CC0033",
4154
- "#CC0066",
4155
- "#CC0099",
4156
- "#CC00CC",
4157
- "#CC00FF",
4158
- "#CC3300",
4159
- "#CC3333",
4160
- "#CC3366",
4161
- "#CC3399",
4162
- "#CC33CC",
4163
- "#CC33FF",
4164
- "#CC6600",
4165
- "#CC6633",
4166
- "#CC9900",
4167
- "#CC9933",
4168
- "#CCCC00",
4169
- "#CCCC33",
4170
- "#FF0000",
4171
- "#FF0033",
4172
- "#FF0066",
4173
- "#FF0099",
4174
- "#FF00CC",
4175
- "#FF00FF",
4176
- "#FF3300",
4177
- "#FF3333",
4178
- "#FF3366",
4179
- "#FF3399",
4180
- "#FF33CC",
4181
- "#FF33FF",
4182
- "#FF6600",
4183
- "#FF6633",
4184
- "#FF9900",
4185
- "#FF9933",
4186
- "#FFCC00",
4187
- "#FFCC33"
4188
- ];
4189
- function useColors() {
4190
- if (typeof window !== "undefined" && window.process && (window.process.type === "renderer" || window.process.__nwjs)) {
4191
- return true;
4192
- }
4193
- if (typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/(edge|trident)\/(\d+)/)) {
4194
- return false;
4195
- }
4196
- let m;
4197
- return typeof document !== "undefined" && document.documentElement && document.documentElement.style && document.documentElement.style.WebkitAppearance || // Is firebug? http://stackoverflow.com/a/398120/376773
4198
- typeof window !== "undefined" && window.console && (window.console.firebug || window.console.exception && window.console.table) || // Is firefox >= v31?
4199
- // https://developer.mozilla.org/en-US/docs/Tools/Web_Console#Styling_messages
4200
- typeof navigator !== "undefined" && navigator.userAgent && (m = navigator.userAgent.toLowerCase().match(/firefox\/(\d+)/)) && parseInt(m[1], 10) >= 31 || // Double check webkit in userAgent just in case we are in a worker
4201
- typeof navigator !== "undefined" && navigator.userAgent && navigator.userAgent.toLowerCase().match(/applewebkit\/(\d+)/);
4202
- }
4203
- function formatArgs(args) {
4204
- args[0] = (this.useColors ? "%c" : "") + this.namespace + (this.useColors ? " %c" : " ") + args[0] + (this.useColors ? "%c " : " ") + "+" + module2.exports.humanize(this.diff);
4205
- if (!this.useColors) {
4206
- return;
4207
- }
4208
- const c3 = "color: " + this.color;
4209
- args.splice(1, 0, c3, "color: inherit");
4210
- let index = 0;
4211
- let lastC = 0;
4212
- args[0].replace(/%[a-zA-Z%]/g, (match) => {
4213
- if (match === "%%") {
4214
- return;
4215
- }
4216
- index++;
4217
- if (match === "%c") {
4218
- lastC = index;
4219
- }
4220
- });
4221
- args.splice(lastC, 0, c3);
4222
- }
4223
- exports2.log = console.debug || console.log || (() => {
4224
- });
4225
- function save(namespaces) {
4226
- try {
4227
- if (namespaces) {
4228
- exports2.storage.setItem("debug", namespaces);
4229
- } else {
4230
- exports2.storage.removeItem("debug");
4231
- }
4232
- } catch (error) {
4233
- }
4234
- }
4235
- function load2() {
4236
- let r;
4237
- try {
4238
- r = exports2.storage.getItem("debug") || exports2.storage.getItem("DEBUG");
4239
- } catch (error) {
4240
- }
4241
- if (!r && typeof process !== "undefined" && "env" in process) {
4242
- r = process.env.DEBUG;
4243
- }
4244
- return r;
4245
- }
4246
- function localstorage() {
4247
- try {
4248
- return localStorage;
4249
- } catch (error) {
4250
- }
4251
- }
4252
- module2.exports = require_common2()(exports2);
4253
- var { formatters } = module2.exports;
4254
- formatters.j = function(v) {
4255
- try {
4256
- return JSON.stringify(v);
4257
- } catch (error) {
4258
- return "[UnexpectedJSONParseError]: " + error.message;
4259
- }
4260
- };
4261
- }
4262
- });
4263
-
4264
- // node_modules/debug/src/node.js
4265
- var require_node = __commonJS({
4266
- "node_modules/debug/src/node.js"(exports2, module2) {
4267
- "use strict";
4268
- var tty4 = require("tty");
4269
- var util = require("util");
4270
- exports2.init = init;
4271
- exports2.log = log;
4272
- exports2.formatArgs = formatArgs;
4273
- exports2.save = save;
4274
- exports2.load = load2;
4275
- exports2.useColors = useColors;
4276
- exports2.destroy = util.deprecate(
4277
- () => {
4278
- },
4279
- "Instance method `debug.destroy()` is deprecated and no longer does anything. It will be removed in the next major version of `debug`."
4280
- );
4281
- exports2.colors = [6, 2, 3, 4, 5, 1];
4282
- try {
4283
- const supportsColor2 = require("supports-color");
4284
- if (supportsColor2 && (supportsColor2.stderr || supportsColor2).level >= 2) {
4285
- exports2.colors = [
4286
- 20,
4287
- 21,
4288
- 26,
4289
- 27,
4290
- 32,
4291
- 33,
4292
- 38,
4293
- 39,
4294
- 40,
4295
- 41,
4296
- 42,
4297
- 43,
4298
- 44,
4299
- 45,
4300
- 56,
4301
- 57,
4302
- 62,
4303
- 63,
4304
- 68,
4305
- 69,
4306
- 74,
4307
- 75,
4308
- 76,
4309
- 77,
4310
- 78,
4311
- 79,
4312
- 80,
4313
- 81,
4314
- 92,
4315
- 93,
4316
- 98,
4317
- 99,
4318
- 112,
4319
- 113,
4320
- 128,
4321
- 129,
4322
- 134,
4323
- 135,
4324
- 148,
4325
- 149,
4326
- 160,
4327
- 161,
4328
- 162,
4329
- 163,
4330
- 164,
4331
- 165,
4332
- 166,
4333
- 167,
4334
- 168,
4335
- 169,
4336
- 170,
4337
- 171,
4338
- 172,
4339
- 173,
4340
- 178,
4341
- 179,
4342
- 184,
4343
- 185,
4344
- 196,
4345
- 197,
4346
- 198,
4347
- 199,
4348
- 200,
4349
- 201,
4350
- 202,
4351
- 203,
4352
- 204,
4353
- 205,
4354
- 206,
4355
- 207,
4356
- 208,
4357
- 209,
4358
- 214,
4359
- 215,
4360
- 220,
4361
- 221
4362
- ];
4363
- }
4364
- } catch (error) {
4365
- }
4366
- exports2.inspectOpts = Object.keys(process.env).filter((key) => {
4367
- return /^debug_/i.test(key);
4368
- }).reduce((obj, key) => {
4369
- const prop = key.substring(6).toLowerCase().replace(/_([a-z])/g, (_, k) => {
4370
- return k.toUpperCase();
4371
- });
4372
- let val = process.env[key];
4373
- if (/^(yes|on|true|enabled)$/i.test(val)) {
4374
- val = true;
4375
- } else if (/^(no|off|false|disabled)$/i.test(val)) {
4376
- val = false;
4377
- } else if (val === "null") {
4378
- val = null;
4379
- } else {
4380
- val = Number(val);
4381
- }
4382
- obj[prop] = val;
4383
- return obj;
4384
- }, {});
4385
- function useColors() {
4386
- return "colors" in exports2.inspectOpts ? Boolean(exports2.inspectOpts.colors) : tty4.isatty(process.stderr.fd);
4387
- }
4388
- function formatArgs(args) {
4389
- const { namespace: name, useColors: useColors2 } = this;
4390
- if (useColors2) {
4391
- const c3 = this.color;
4392
- const colorCode = "\x1B[3" + (c3 < 8 ? c3 : "8;5;" + c3);
4393
- const prefix = ` ${colorCode};1m${name} \x1B[0m`;
4394
- args[0] = prefix + args[0].split("\n").join("\n" + prefix);
4395
- args.push(colorCode + "m+" + module2.exports.humanize(this.diff) + "\x1B[0m");
4396
- } else {
4397
- args[0] = getDate() + name + " " + args[0];
4398
- }
4399
- }
4400
- function getDate() {
4401
- if (exports2.inspectOpts.hideDate) {
4402
- return "";
4403
- }
4404
- return (/* @__PURE__ */ new Date()).toISOString() + " ";
4405
- }
4406
- function log(...args) {
4407
- return process.stderr.write(util.formatWithOptions(exports2.inspectOpts, ...args) + "\n");
4408
- }
4409
- function save(namespaces) {
4410
- if (namespaces) {
4411
- process.env.DEBUG = namespaces;
4412
- } else {
4413
- delete process.env.DEBUG;
4414
- }
4415
- }
4416
- function load2() {
4417
- return process.env.DEBUG;
4418
- }
4419
- function init(debug) {
4420
- debug.inspectOpts = {};
4421
- const keys = Object.keys(exports2.inspectOpts);
4422
- for (let i2 = 0; i2 < keys.length; i2++) {
4423
- debug.inspectOpts[keys[i2]] = exports2.inspectOpts[keys[i2]];
4424
- }
4425
- }
4426
- module2.exports = require_common2()(exports2);
4427
- var { formatters } = module2.exports;
4428
- formatters.o = function(v) {
4429
- this.inspectOpts.colors = this.useColors;
4430
- return util.inspect(v, this.inspectOpts).split("\n").map((str) => str.trim()).join(" ");
4431
- };
4432
- formatters.O = function(v) {
4433
- this.inspectOpts.colors = this.useColors;
4434
- return util.inspect(v, this.inspectOpts);
4435
- };
4436
- }
4437
- });
4438
-
4439
- // node_modules/debug/src/index.js
4440
- var require_src = __commonJS({
4441
- "node_modules/debug/src/index.js"(exports2, module2) {
4442
- "use strict";
4443
- if (typeof process === "undefined" || process.type === "renderer" || process.browser === true || process.__nwjs) {
4444
- module2.exports = require_browser();
4445
- } else {
4446
- module2.exports = require_node();
4447
- }
4448
- }
4449
- });
4450
-
4451
- // node_modules/follow-redirects/debug.js
4452
- var require_debug = __commonJS({
4453
- "node_modules/follow-redirects/debug.js"(exports2, module2) {
4454
- "use strict";
4455
- var debug;
4456
- module2.exports = function() {
4457
- if (!debug) {
4458
- try {
4459
- debug = require_src()("follow-redirects");
4460
- } catch (error) {
4461
- }
4462
- if (typeof debug !== "function") {
4463
- debug = function() {
4464
- };
4119
+ var debug;
4120
+ module2.exports = function() {
4121
+ if (!debug) {
4122
+ try {
4123
+ debug = require_src()("follow-redirects");
4124
+ } catch (error) {
4125
+ }
4126
+ if (typeof debug !== "function") {
4127
+ debug = function() {
4128
+ };
4465
4129
  }
4466
4130
  }
4467
4131
  debug.apply(null, arguments);
@@ -4469,9 +4133,9 @@ var require_debug = __commonJS({
4469
4133
  }
4470
4134
  });
4471
4135
 
4472
- // node_modules/follow-redirects/index.js
4136
+ // ../../node_modules/follow-redirects/index.js
4473
4137
  var require_follow_redirects = __commonJS({
4474
- "node_modules/follow-redirects/index.js"(exports2, module2) {
4138
+ "../../node_modules/follow-redirects/index.js"(exports2, module2) {
4475
4139
  "use strict";
4476
4140
  var url = require("url");
4477
4141
  var URL2 = url.URL;
@@ -4615,360 +4279,704 @@ var require_follow_redirects = __commonJS({
4615
4279
  self._ended = true;
4616
4280
  currentRequest.end(null, null, callback);
4617
4281
  });
4618
- this._ending = true;
4282
+ this._ending = true;
4283
+ }
4284
+ };
4285
+ RedirectableRequest.prototype.setHeader = function(name, value) {
4286
+ this._options.headers[name] = value;
4287
+ this._currentRequest.setHeader(name, value);
4288
+ };
4289
+ RedirectableRequest.prototype.removeHeader = function(name) {
4290
+ delete this._options.headers[name];
4291
+ this._currentRequest.removeHeader(name);
4292
+ };
4293
+ RedirectableRequest.prototype.setTimeout = function(msecs, callback) {
4294
+ var self = this;
4295
+ function destroyOnTimeout(socket) {
4296
+ socket.setTimeout(msecs);
4297
+ socket.removeListener("timeout", socket.destroy);
4298
+ socket.addListener("timeout", socket.destroy);
4299
+ }
4300
+ function startTimer(socket) {
4301
+ if (self._timeout) {
4302
+ clearTimeout(self._timeout);
4303
+ }
4304
+ self._timeout = setTimeout(function() {
4305
+ self.emit("timeout");
4306
+ clearTimer();
4307
+ }, msecs);
4308
+ destroyOnTimeout(socket);
4309
+ }
4310
+ function clearTimer() {
4311
+ if (self._timeout) {
4312
+ clearTimeout(self._timeout);
4313
+ self._timeout = null;
4314
+ }
4315
+ self.removeListener("abort", clearTimer);
4316
+ self.removeListener("error", clearTimer);
4317
+ self.removeListener("response", clearTimer);
4318
+ self.removeListener("close", clearTimer);
4319
+ if (callback) {
4320
+ self.removeListener("timeout", callback);
4321
+ }
4322
+ if (!self.socket) {
4323
+ self._currentRequest.removeListener("socket", startTimer);
4324
+ }
4325
+ }
4326
+ if (callback) {
4327
+ this.on("timeout", callback);
4328
+ }
4329
+ if (this.socket) {
4330
+ startTimer(this.socket);
4331
+ } else {
4332
+ this._currentRequest.once("socket", startTimer);
4333
+ }
4334
+ this.on("socket", destroyOnTimeout);
4335
+ this.on("abort", clearTimer);
4336
+ this.on("error", clearTimer);
4337
+ this.on("response", clearTimer);
4338
+ this.on("close", clearTimer);
4339
+ return this;
4340
+ };
4341
+ [
4342
+ "flushHeaders",
4343
+ "getHeader",
4344
+ "setNoDelay",
4345
+ "setSocketKeepAlive"
4346
+ ].forEach(function(method) {
4347
+ RedirectableRequest.prototype[method] = function(a2, b) {
4348
+ return this._currentRequest[method](a2, b);
4349
+ };
4350
+ });
4351
+ ["aborted", "connection", "socket"].forEach(function(property) {
4352
+ Object.defineProperty(RedirectableRequest.prototype, property, {
4353
+ get: function() {
4354
+ return this._currentRequest[property];
4355
+ }
4356
+ });
4357
+ });
4358
+ RedirectableRequest.prototype._sanitizeOptions = function(options) {
4359
+ if (!options.headers) {
4360
+ options.headers = {};
4361
+ }
4362
+ if (options.host) {
4363
+ if (!options.hostname) {
4364
+ options.hostname = options.host;
4365
+ }
4366
+ delete options.host;
4367
+ }
4368
+ if (!options.pathname && options.path) {
4369
+ var searchPos = options.path.indexOf("?");
4370
+ if (searchPos < 0) {
4371
+ options.pathname = options.path;
4372
+ } else {
4373
+ options.pathname = options.path.substring(0, searchPos);
4374
+ options.search = options.path.substring(searchPos);
4375
+ }
4376
+ }
4377
+ };
4378
+ RedirectableRequest.prototype._performRequest = function() {
4379
+ var protocol = this._options.protocol;
4380
+ var nativeProtocol = this._options.nativeProtocols[protocol];
4381
+ if (!nativeProtocol) {
4382
+ throw new TypeError("Unsupported protocol " + protocol);
4383
+ }
4384
+ if (this._options.agents) {
4385
+ var scheme = protocol.slice(0, -1);
4386
+ this._options.agent = this._options.agents[scheme];
4387
+ }
4388
+ var request = this._currentRequest = nativeProtocol.request(this._options, this._onNativeResponse);
4389
+ request._redirectable = this;
4390
+ for (var event of events) {
4391
+ request.on(event, eventHandlers[event]);
4392
+ }
4393
+ this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : (
4394
+ // When making a request to a proxy, […]
4395
+ // a client MUST send the target URI in absolute-form […].
4396
+ this._options.path
4397
+ );
4398
+ if (this._isRedirect) {
4399
+ var i2 = 0;
4400
+ var self = this;
4401
+ var buffers = this._requestBodyBuffers;
4402
+ (function writeNext(error) {
4403
+ if (request === self._currentRequest) {
4404
+ if (error) {
4405
+ self.emit("error", error);
4406
+ } else if (i2 < buffers.length) {
4407
+ var buffer = buffers[i2++];
4408
+ if (!request.finished) {
4409
+ request.write(buffer.data, buffer.encoding, writeNext);
4410
+ }
4411
+ } else if (self._ended) {
4412
+ request.end();
4413
+ }
4414
+ }
4415
+ })();
4416
+ }
4417
+ };
4418
+ RedirectableRequest.prototype._processResponse = function(response) {
4419
+ var statusCode = response.statusCode;
4420
+ if (this._options.trackRedirects) {
4421
+ this._redirects.push({
4422
+ url: this._currentUrl,
4423
+ headers: response.headers,
4424
+ statusCode
4425
+ });
4426
+ }
4427
+ var location = response.headers.location;
4428
+ if (!location || this._options.followRedirects === false || statusCode < 300 || statusCode >= 400) {
4429
+ response.responseUrl = this._currentUrl;
4430
+ response.redirects = this._redirects;
4431
+ this.emit("response", response);
4432
+ this._requestBodyBuffers = [];
4433
+ return;
4434
+ }
4435
+ destroyRequest(this._currentRequest);
4436
+ response.destroy();
4437
+ if (++this._redirectCount > this._options.maxRedirects) {
4438
+ throw new TooManyRedirectsError();
4439
+ }
4440
+ var requestHeaders;
4441
+ var beforeRedirect = this._options.beforeRedirect;
4442
+ if (beforeRedirect) {
4443
+ requestHeaders = Object.assign({
4444
+ // The Host header was set by nativeProtocol.request
4445
+ Host: response.req.getHeader("host")
4446
+ }, this._options.headers);
4447
+ }
4448
+ var method = this._options.method;
4449
+ if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || // RFC7231§6.4.4: The 303 (See Other) status code indicates that
4450
+ // the server is redirecting the user agent to a different resource […]
4451
+ // A user agent can perform a retrieval request targeting that URI
4452
+ // (a GET or HEAD request if using HTTP) […]
4453
+ statusCode === 303 && !/^(?:GET|HEAD)$/.test(this._options.method)) {
4454
+ this._options.method = "GET";
4455
+ this._requestBodyBuffers = [];
4456
+ removeMatchingHeaders(/^content-/i, this._options.headers);
4457
+ }
4458
+ var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
4459
+ var currentUrlParts = parseUrl(this._currentUrl);
4460
+ var currentHost = currentHostHeader || currentUrlParts.host;
4461
+ var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url.format(Object.assign(currentUrlParts, { host: currentHost }));
4462
+ var redirectUrl = resolveUrl(location, currentUrl);
4463
+ debug("redirecting to", redirectUrl.href);
4464
+ this._isRedirect = true;
4465
+ spreadUrlObject(redirectUrl, this._options);
4466
+ if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
4467
+ removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
4468
+ }
4469
+ if (isFunction(beforeRedirect)) {
4470
+ var responseDetails = {
4471
+ headers: response.headers,
4472
+ statusCode
4473
+ };
4474
+ var requestDetails = {
4475
+ url: currentUrl,
4476
+ method,
4477
+ headers: requestHeaders
4478
+ };
4479
+ beforeRedirect(this._options, responseDetails, requestDetails);
4480
+ this._sanitizeOptions(this._options);
4481
+ }
4482
+ this._performRequest();
4483
+ };
4484
+ function wrap(protocols) {
4485
+ var exports3 = {
4486
+ maxRedirects: 21,
4487
+ maxBodyLength: 10 * 1024 * 1024
4488
+ };
4489
+ var nativeProtocols = {};
4490
+ Object.keys(protocols).forEach(function(scheme) {
4491
+ var protocol = scheme + ":";
4492
+ var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
4493
+ var wrappedProtocol = exports3[scheme] = Object.create(nativeProtocol);
4494
+ function request(input, options, callback) {
4495
+ if (isURL(input)) {
4496
+ input = spreadUrlObject(input);
4497
+ } else if (isString(input)) {
4498
+ input = spreadUrlObject(parseUrl(input));
4499
+ } else {
4500
+ callback = options;
4501
+ options = validateUrl(input);
4502
+ input = { protocol };
4503
+ }
4504
+ if (isFunction(options)) {
4505
+ callback = options;
4506
+ options = null;
4507
+ }
4508
+ options = Object.assign({
4509
+ maxRedirects: exports3.maxRedirects,
4510
+ maxBodyLength: exports3.maxBodyLength
4511
+ }, input, options);
4512
+ options.nativeProtocols = nativeProtocols;
4513
+ if (!isString(options.host) && !isString(options.hostname)) {
4514
+ options.hostname = "::1";
4515
+ }
4516
+ assert.equal(options.protocol, protocol, "protocol mismatch");
4517
+ debug("options", options);
4518
+ return new RedirectableRequest(options, callback);
4519
+ }
4520
+ function get(input, options, callback) {
4521
+ var wrappedRequest = wrappedProtocol.request(input, options, callback);
4522
+ wrappedRequest.end();
4523
+ return wrappedRequest;
4524
+ }
4525
+ Object.defineProperties(wrappedProtocol, {
4526
+ request: { value: request, configurable: true, enumerable: true, writable: true },
4527
+ get: { value: get, configurable: true, enumerable: true, writable: true }
4528
+ });
4529
+ });
4530
+ return exports3;
4531
+ }
4532
+ function noop3() {
4533
+ }
4534
+ function parseUrl(input) {
4535
+ var parsed;
4536
+ if (useNativeURL) {
4537
+ parsed = new URL2(input);
4538
+ } else {
4539
+ parsed = validateUrl(url.parse(input));
4540
+ if (!isString(parsed.protocol)) {
4541
+ throw new InvalidUrlError({ input });
4542
+ }
4619
4543
  }
4620
- };
4621
- RedirectableRequest.prototype.setHeader = function(name, value) {
4622
- this._options.headers[name] = value;
4623
- this._currentRequest.setHeader(name, value);
4624
- };
4625
- RedirectableRequest.prototype.removeHeader = function(name) {
4626
- delete this._options.headers[name];
4627
- this._currentRequest.removeHeader(name);
4628
- };
4629
- RedirectableRequest.prototype.setTimeout = function(msecs, callback) {
4630
- var self = this;
4631
- function destroyOnTimeout(socket) {
4632
- socket.setTimeout(msecs);
4633
- socket.removeListener("timeout", socket.destroy);
4634
- socket.addListener("timeout", socket.destroy);
4544
+ return parsed;
4545
+ }
4546
+ function resolveUrl(relative, base) {
4547
+ return useNativeURL ? new URL2(relative, base) : parseUrl(url.resolve(base, relative));
4548
+ }
4549
+ function validateUrl(input) {
4550
+ if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
4551
+ throw new InvalidUrlError({ input: input.href || input });
4635
4552
  }
4636
- function startTimer(socket) {
4637
- if (self._timeout) {
4638
- clearTimeout(self._timeout);
4639
- }
4640
- self._timeout = setTimeout(function() {
4641
- self.emit("timeout");
4642
- clearTimer();
4643
- }, msecs);
4644
- destroyOnTimeout(socket);
4553
+ if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) {
4554
+ throw new InvalidUrlError({ input: input.href || input });
4645
4555
  }
4646
- function clearTimer() {
4647
- if (self._timeout) {
4648
- clearTimeout(self._timeout);
4649
- self._timeout = null;
4650
- }
4651
- self.removeListener("abort", clearTimer);
4652
- self.removeListener("error", clearTimer);
4653
- self.removeListener("response", clearTimer);
4654
- self.removeListener("close", clearTimer);
4655
- if (callback) {
4656
- self.removeListener("timeout", callback);
4657
- }
4658
- if (!self.socket) {
4659
- self._currentRequest.removeListener("socket", startTimer);
4660
- }
4556
+ return input;
4557
+ }
4558
+ function spreadUrlObject(urlObject, target) {
4559
+ var spread = target || {};
4560
+ for (var key of preservedUrlFields) {
4561
+ spread[key] = urlObject[key];
4661
4562
  }
4662
- if (callback) {
4663
- this.on("timeout", callback);
4563
+ if (spread.hostname.startsWith("[")) {
4564
+ spread.hostname = spread.hostname.slice(1, -1);
4664
4565
  }
4665
- if (this.socket) {
4666
- startTimer(this.socket);
4667
- } else {
4668
- this._currentRequest.once("socket", startTimer);
4566
+ if (spread.port !== "") {
4567
+ spread.port = Number(spread.port);
4669
4568
  }
4670
- this.on("socket", destroyOnTimeout);
4671
- this.on("abort", clearTimer);
4672
- this.on("error", clearTimer);
4673
- this.on("response", clearTimer);
4674
- this.on("close", clearTimer);
4675
- return this;
4676
- };
4677
- [
4678
- "flushHeaders",
4679
- "getHeader",
4680
- "setNoDelay",
4681
- "setSocketKeepAlive"
4682
- ].forEach(function(method) {
4683
- RedirectableRequest.prototype[method] = function(a2, b) {
4684
- return this._currentRequest[method](a2, b);
4685
- };
4686
- });
4687
- ["aborted", "connection", "socket"].forEach(function(property) {
4688
- Object.defineProperty(RedirectableRequest.prototype, property, {
4689
- get: function() {
4690
- return this._currentRequest[property];
4569
+ spread.path = spread.search ? spread.pathname + spread.search : spread.pathname;
4570
+ return spread;
4571
+ }
4572
+ function removeMatchingHeaders(regex, headers) {
4573
+ var lastValue;
4574
+ for (var header in headers) {
4575
+ if (regex.test(header)) {
4576
+ lastValue = headers[header];
4577
+ delete headers[header];
4691
4578
  }
4692
- });
4693
- });
4694
- RedirectableRequest.prototype._sanitizeOptions = function(options) {
4695
- if (!options.headers) {
4696
- options.headers = {};
4697
4579
  }
4698
- if (options.host) {
4699
- if (!options.hostname) {
4700
- options.hostname = options.host;
4580
+ return lastValue === null || typeof lastValue === "undefined" ? void 0 : String(lastValue).trim();
4581
+ }
4582
+ function createErrorType(code, message, baseClass) {
4583
+ function CustomError(properties) {
4584
+ if (isFunction(Error.captureStackTrace)) {
4585
+ Error.captureStackTrace(this, this.constructor);
4701
4586
  }
4702
- delete options.host;
4587
+ Object.assign(this, properties || {});
4588
+ this.code = code;
4589
+ this.message = this.cause ? message + ": " + this.cause.message : message;
4703
4590
  }
4704
- if (!options.pathname && options.path) {
4705
- var searchPos = options.path.indexOf("?");
4706
- if (searchPos < 0) {
4707
- options.pathname = options.path;
4708
- } else {
4709
- options.pathname = options.path.substring(0, searchPos);
4710
- options.search = options.path.substring(searchPos);
4591
+ CustomError.prototype = new (baseClass || Error)();
4592
+ Object.defineProperties(CustomError.prototype, {
4593
+ constructor: {
4594
+ value: CustomError,
4595
+ enumerable: false
4596
+ },
4597
+ name: {
4598
+ value: "Error [" + code + "]",
4599
+ enumerable: false
4711
4600
  }
4712
- }
4713
- };
4714
- RedirectableRequest.prototype._performRequest = function() {
4715
- var protocol = this._options.protocol;
4716
- var nativeProtocol = this._options.nativeProtocols[protocol];
4717
- if (!nativeProtocol) {
4718
- throw new TypeError("Unsupported protocol " + protocol);
4719
- }
4720
- if (this._options.agents) {
4721
- var scheme = protocol.slice(0, -1);
4722
- this._options.agent = this._options.agents[scheme];
4723
- }
4724
- var request = this._currentRequest = nativeProtocol.request(this._options, this._onNativeResponse);
4725
- request._redirectable = this;
4601
+ });
4602
+ return CustomError;
4603
+ }
4604
+ function destroyRequest(request, error) {
4726
4605
  for (var event of events) {
4727
- request.on(event, eventHandlers[event]);
4606
+ request.removeListener(event, eventHandlers[event]);
4728
4607
  }
4729
- this._currentUrl = /^\//.test(this._options.path) ? url.format(this._options) : (
4730
- // When making a request to a proxy, […]
4731
- // a client MUST send the target URI in absolute-form […].
4732
- this._options.path
4733
- );
4734
- if (this._isRedirect) {
4735
- var i2 = 0;
4736
- var self = this;
4737
- var buffers = this._requestBodyBuffers;
4738
- (function writeNext(error) {
4739
- if (request === self._currentRequest) {
4740
- if (error) {
4741
- self.emit("error", error);
4742
- } else if (i2 < buffers.length) {
4743
- var buffer = buffers[i2++];
4744
- if (!request.finished) {
4745
- request.write(buffer.data, buffer.encoding, writeNext);
4746
- }
4747
- } else if (self._ended) {
4748
- request.end();
4749
- }
4750
- }
4751
- })();
4608
+ request.on("error", noop3);
4609
+ request.destroy(error);
4610
+ }
4611
+ function isSubdomain(subdomain, domain) {
4612
+ assert(isString(subdomain) && isString(domain));
4613
+ var dot = subdomain.length - domain.length - 1;
4614
+ return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
4615
+ }
4616
+ function isString(value) {
4617
+ return typeof value === "string" || value instanceof String;
4618
+ }
4619
+ function isFunction(value) {
4620
+ return typeof value === "function";
4621
+ }
4622
+ function isBuffer(value) {
4623
+ return typeof value === "object" && "length" in value;
4624
+ }
4625
+ function isURL(value) {
4626
+ return URL2 && value instanceof URL2;
4627
+ }
4628
+ module2.exports = wrap({ http: http2, https });
4629
+ module2.exports.wrap = wrap;
4630
+ }
4631
+ });
4632
+
4633
+ // ../../node_modules/http-proxy-3/dist/lib/http-proxy/common.js
4634
+ var require_common2 = __commonJS({
4635
+ "../../node_modules/http-proxy-3/dist/lib/http-proxy/common.js"(exports2) {
4636
+ "use strict";
4637
+ Object.defineProperty(exports2, "__esModule", { value: true });
4638
+ exports2.isSSL = void 0;
4639
+ exports2.setupOutgoing = setupOutgoing;
4640
+ exports2.setupSocket = setupSocket;
4641
+ exports2.getPort = getPort;
4642
+ exports2.hasEncryptedConnection = hasEncryptedConnection;
4643
+ exports2.urlJoin = urlJoin;
4644
+ exports2.rewriteCookieProperty = rewriteCookieProperty;
4645
+ exports2.toURL = toURL;
4646
+ var node_tls_1 = require("node:tls");
4647
+ var upgradeHeader = /(^|,)\s*upgrade\s*($|,)/i;
4648
+ exports2.isSSL = /^https|wss/;
4649
+ var HEADER_BLACKLIST = "trailer";
4650
+ var HTTP2_HEADER_BLACKLIST = [
4651
+ ":method",
4652
+ ":path",
4653
+ ":scheme",
4654
+ ":authority",
4655
+ "connection",
4656
+ "keep-alive"
4657
+ ];
4658
+ function setupOutgoing(outgoing, options, req, forward) {
4659
+ const target = options[forward || "target"];
4660
+ outgoing.port = +(target.port ?? (target.protocol !== void 0 && exports2.isSSL.test(target.protocol) ? 443 : 80));
4661
+ for (const e of [
4662
+ "host",
4663
+ "hostname",
4664
+ "socketPath",
4665
+ "pfx",
4666
+ "key",
4667
+ "passphrase",
4668
+ "cert",
4669
+ "ca",
4670
+ "ciphers",
4671
+ "secureProtocol"
4672
+ ]) {
4673
+ outgoing[e] = target[e];
4674
+ }
4675
+ outgoing.method = options.method || req.method;
4676
+ outgoing.headers = { ...req.headers };
4677
+ if (options.headers) {
4678
+ outgoing.headers = { ...outgoing.headers, ...options.headers };
4752
4679
  }
4753
- };
4754
- RedirectableRequest.prototype._processResponse = function(response) {
4755
- var statusCode = response.statusCode;
4756
- if (this._options.trackRedirects) {
4757
- this._redirects.push({
4758
- url: this._currentUrl,
4759
- headers: response.headers,
4760
- statusCode
4761
- });
4680
+ for (const header in outgoing.headers) {
4681
+ if (HEADER_BLACKLIST == header.toLowerCase()) {
4682
+ delete outgoing.headers[header];
4683
+ break;
4684
+ }
4762
4685
  }
4763
- var location = response.headers.location;
4764
- if (!location || this._options.followRedirects === false || statusCode < 300 || statusCode >= 400) {
4765
- response.responseUrl = this._currentUrl;
4766
- response.redirects = this._redirects;
4767
- this.emit("response", response);
4768
- this._requestBodyBuffers = [];
4769
- return;
4686
+ if (req.httpVersionMajor > 1) {
4687
+ for (const header of HTTP2_HEADER_BLACKLIST) {
4688
+ delete outgoing.headers[header];
4689
+ }
4770
4690
  }
4771
- destroyRequest(this._currentRequest);
4772
- response.destroy();
4773
- if (++this._redirectCount > this._options.maxRedirects) {
4774
- throw new TooManyRedirectsError();
4691
+ if (options.auth) {
4692
+ delete outgoing.headers.authorization;
4693
+ outgoing.auth = options.auth;
4775
4694
  }
4776
- var requestHeaders;
4777
- var beforeRedirect = this._options.beforeRedirect;
4778
- if (beforeRedirect) {
4779
- requestHeaders = Object.assign({
4780
- // The Host header was set by nativeProtocol.request
4781
- Host: response.req.getHeader("host")
4782
- }, this._options.headers);
4695
+ if (options.ca) {
4696
+ outgoing.ca = options.ca;
4783
4697
  }
4784
- var method = this._options.method;
4785
- if ((statusCode === 301 || statusCode === 302) && this._options.method === "POST" || // RFC7231§6.4.4: The 303 (See Other) status code indicates that
4786
- // the server is redirecting the user agent to a different resource […]
4787
- // A user agent can perform a retrieval request targeting that URI
4788
- // (a GET or HEAD request if using HTTP) […]
4789
- statusCode === 303 && !/^(?:GET|HEAD)$/.test(this._options.method)) {
4790
- this._options.method = "GET";
4791
- this._requestBodyBuffers = [];
4792
- removeMatchingHeaders(/^content-/i, this._options.headers);
4698
+ if (target.protocol !== void 0 && exports2.isSSL.test(target.protocol)) {
4699
+ outgoing.rejectUnauthorized = typeof options.secure === "undefined" ? true : options.secure;
4793
4700
  }
4794
- var currentHostHeader = removeMatchingHeaders(/^host$/i, this._options.headers);
4795
- var currentUrlParts = parseUrl(this._currentUrl);
4796
- var currentHost = currentHostHeader || currentUrlParts.host;
4797
- var currentUrl = /^\w+:/.test(location) ? this._currentUrl : url.format(Object.assign(currentUrlParts, { host: currentHost }));
4798
- var redirectUrl = resolveUrl(location, currentUrl);
4799
- debug("redirecting to", redirectUrl.href);
4800
- this._isRedirect = true;
4801
- spreadUrlObject(redirectUrl, this._options);
4802
- if (redirectUrl.protocol !== currentUrlParts.protocol && redirectUrl.protocol !== "https:" || redirectUrl.host !== currentHost && !isSubdomain(redirectUrl.host, currentHost)) {
4803
- removeMatchingHeaders(/^(?:(?:proxy-)?authorization|cookie)$/i, this._options.headers);
4701
+ outgoing.agent = options.agent || false;
4702
+ outgoing.localAddress = options.localAddress;
4703
+ if (!outgoing.agent) {
4704
+ outgoing.headers = outgoing.headers || {};
4705
+ if (typeof outgoing.headers.connection !== "string" || !upgradeHeader.test(outgoing.headers.connection)) {
4706
+ outgoing.headers.connection = "close";
4707
+ }
4804
4708
  }
4805
- if (isFunction(beforeRedirect)) {
4806
- var responseDetails = {
4807
- headers: response.headers,
4808
- statusCode
4809
- };
4810
- var requestDetails = {
4811
- url: currentUrl,
4812
- method,
4813
- headers: requestHeaders
4814
- };
4815
- beforeRedirect(this._options, responseDetails, requestDetails);
4816
- this._sanitizeOptions(this._options);
4709
+ const targetPath = target && options.prependPath !== false && "pathname" in target ? getPath(`${target.pathname}${target.search ?? ""}`) : "/";
4710
+ let outgoingPath = options.toProxy ? req.url : getPath(req.url);
4711
+ outgoingPath = !options.ignorePath ? outgoingPath : "";
4712
+ outgoing.path = urlJoin(targetPath, outgoingPath ?? "");
4713
+ if (options.changeOrigin) {
4714
+ outgoing.headers.host = target.protocol !== void 0 && required(outgoing.port, target.protocol) && !hasPort(outgoing.host) ? outgoing.host + ":" + outgoing.port : outgoing.host;
4817
4715
  }
4818
- this._performRequest();
4819
- };
4820
- function wrap(protocols) {
4821
- var exports3 = {
4822
- maxRedirects: 21,
4823
- maxBodyLength: 10 * 1024 * 1024
4824
- };
4825
- var nativeProtocols = {};
4826
- Object.keys(protocols).forEach(function(scheme) {
4827
- var protocol = scheme + ":";
4828
- var nativeProtocol = nativeProtocols[protocol] = protocols[scheme];
4829
- var wrappedProtocol = exports3[scheme] = Object.create(nativeProtocol);
4830
- function request(input, options, callback) {
4831
- if (isURL(input)) {
4832
- input = spreadUrlObject(input);
4833
- } else if (isString(input)) {
4834
- input = spreadUrlObject(parseUrl(input));
4716
+ outgoing.url = "href" in target && target.href || (target.protocol === "https" ? "https" : "http") + "://" + outgoing.host + (outgoing.port ? ":" + outgoing.port : "");
4717
+ if (req.httpVersionMajor > 1) {
4718
+ for (const header of HTTP2_HEADER_BLACKLIST) {
4719
+ delete outgoing.headers[header];
4720
+ }
4721
+ }
4722
+ return outgoing;
4723
+ }
4724
+ function setupSocket(socket) {
4725
+ socket.setTimeout(0);
4726
+ socket.setNoDelay(true);
4727
+ socket.setKeepAlive(true, 0);
4728
+ return socket;
4729
+ }
4730
+ function getPort(req) {
4731
+ const res = req.headers.host ? req.headers.host.match(/:(\d+)/) : "";
4732
+ return res ? res[1] : hasEncryptedConnection(req) ? "443" : "80";
4733
+ }
4734
+ function hasEncryptedConnection(req) {
4735
+ const conn = req.connection;
4736
+ return conn instanceof node_tls_1.TLSSocket && conn.encrypted || Boolean(conn.pair);
4737
+ }
4738
+ function urlJoin(...args) {
4739
+ const queryParams = [];
4740
+ let queryParamRaw = "";
4741
+ args.forEach((url, index) => {
4742
+ const qpStart = url.indexOf("?");
4743
+ if (qpStart !== -1) {
4744
+ queryParams.push(url.substring(qpStart + 1));
4745
+ args[index] = url.substring(0, qpStart);
4746
+ }
4747
+ });
4748
+ queryParamRaw = queryParams.filter(Boolean).join("&");
4749
+ let retSegs = "";
4750
+ for (const seg of args) {
4751
+ if (!seg) {
4752
+ continue;
4753
+ }
4754
+ if (retSegs.endsWith("/")) {
4755
+ if (seg.startsWith("/")) {
4756
+ retSegs += seg.slice(1);
4835
4757
  } else {
4836
- callback = options;
4837
- options = validateUrl(input);
4838
- input = { protocol };
4839
- }
4840
- if (isFunction(options)) {
4841
- callback = options;
4842
- options = null;
4758
+ retSegs += seg;
4843
4759
  }
4844
- options = Object.assign({
4845
- maxRedirects: exports3.maxRedirects,
4846
- maxBodyLength: exports3.maxBodyLength
4847
- }, input, options);
4848
- options.nativeProtocols = nativeProtocols;
4849
- if (!isString(options.host) && !isString(options.hostname)) {
4850
- options.hostname = "::1";
4760
+ } else {
4761
+ if (seg.startsWith("/")) {
4762
+ retSegs += seg;
4763
+ } else {
4764
+ retSegs += "/" + seg;
4851
4765
  }
4852
- assert.equal(options.protocol, protocol, "protocol mismatch");
4853
- debug("options", options);
4854
- return new RedirectableRequest(options, callback);
4855
4766
  }
4856
- function get(input, options, callback) {
4857
- var wrappedRequest = wrappedProtocol.request(input, options, callback);
4858
- wrappedRequest.end();
4859
- return wrappedRequest;
4860
- }
4861
- Object.defineProperties(wrappedProtocol, {
4862
- request: { value: request, configurable: true, enumerable: true, writable: true },
4863
- get: { value: get, configurable: true, enumerable: true, writable: true }
4767
+ }
4768
+ return queryParamRaw ? retSegs + "?" + queryParamRaw : retSegs;
4769
+ }
4770
+ function rewriteCookieProperty(header, config, property) {
4771
+ if (Array.isArray(header)) {
4772
+ return header.map((headerElement) => {
4773
+ return rewriteCookieProperty(headerElement, config, property);
4864
4774
  });
4775
+ }
4776
+ return header.replace(new RegExp("(;\\s*" + property + "=)([^;]+)", "i"), (match, prefix, previousValue) => {
4777
+ let newValue;
4778
+ if (previousValue in config) {
4779
+ newValue = config[previousValue];
4780
+ } else if ("*" in config) {
4781
+ newValue = config["*"];
4782
+ } else {
4783
+ return match;
4784
+ }
4785
+ if (newValue) {
4786
+ return prefix + newValue;
4787
+ } else {
4788
+ return "";
4789
+ }
4865
4790
  });
4866
- return exports3;
4867
4791
  }
4868
- function noop3() {
4792
+ function hasPort(host) {
4793
+ return !!~host.indexOf(":");
4869
4794
  }
4870
- function parseUrl(input) {
4871
- var parsed;
4872
- if (useNativeURL) {
4873
- parsed = new URL2(input);
4874
- } else {
4875
- parsed = validateUrl(url.parse(input));
4876
- if (!isString(parsed.protocol)) {
4877
- throw new InvalidUrlError({ input });
4878
- }
4795
+ function getPath(url) {
4796
+ if (url === "" || url?.startsWith("?")) {
4797
+ return url;
4879
4798
  }
4880
- return parsed;
4881
- }
4882
- function resolveUrl(relative, base) {
4883
- return useNativeURL ? new URL2(relative, base) : parseUrl(url.resolve(base, relative));
4799
+ const u2 = toURL(url);
4800
+ return `${u2.pathname ?? ""}${u2.search ?? ""}`;
4884
4801
  }
4885
- function validateUrl(input) {
4886
- if (/^\[/.test(input.hostname) && !/^\[[:0-9a-f]+\]$/i.test(input.hostname)) {
4887
- throw new InvalidUrlError({ input: input.href || input });
4802
+ function toURL(url) {
4803
+ if (url instanceof URL) {
4804
+ return url;
4805
+ } else if (typeof url === "object" && "href" in url && typeof url.href === "string") {
4806
+ url = url.href;
4888
4807
  }
4889
- if (/^\[/.test(input.host) && !/^\[[:0-9a-f]+\](:\d+)?$/i.test(input.host)) {
4890
- throw new InvalidUrlError({ input: input.href || input });
4808
+ if (!url) {
4809
+ url = "";
4891
4810
  }
4892
- return input;
4811
+ if (typeof url != "string") {
4812
+ url = `${url}`;
4813
+ }
4814
+ if (url.startsWith("//")) {
4815
+ url = `http://base.invalid${url}`;
4816
+ }
4817
+ return new URL(url, "http://base.invalid");
4893
4818
  }
4894
- function spreadUrlObject(urlObject, target) {
4895
- var spread = target || {};
4896
- for (var key of preservedUrlFields) {
4897
- spread[key] = urlObject[key];
4819
+ function required(port, protocol) {
4820
+ protocol = protocol.split(":")[0];
4821
+ port = +port;
4822
+ if (!port)
4823
+ return false;
4824
+ switch (protocol) {
4825
+ case "http":
4826
+ case "ws":
4827
+ return port !== 80;
4828
+ case "https":
4829
+ case "wss":
4830
+ return port !== 443;
4898
4831
  }
4899
- if (spread.hostname.startsWith("[")) {
4900
- spread.hostname = spread.hostname.slice(1, -1);
4832
+ return port !== 0;
4833
+ }
4834
+ }
4835
+ });
4836
+
4837
+ // ../../node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-outgoing.js
4838
+ var require_web_outgoing = __commonJS({
4839
+ "../../node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-outgoing.js"(exports2) {
4840
+ "use strict";
4841
+ var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o2, m, k, k2) {
4842
+ if (k2 === void 0) k2 = k;
4843
+ var desc = Object.getOwnPropertyDescriptor(m, k);
4844
+ if (!desc || ("get" in desc ? !m.__esModule : desc.writable || desc.configurable)) {
4845
+ desc = { enumerable: true, get: function() {
4846
+ return m[k];
4847
+ } };
4901
4848
  }
4902
- if (spread.port !== "") {
4903
- spread.port = Number(spread.port);
4849
+ Object.defineProperty(o2, k2, desc);
4850
+ }) : (function(o2, m, k, k2) {
4851
+ if (k2 === void 0) k2 = k;
4852
+ o2[k2] = m[k];
4853
+ }));
4854
+ var __setModuleDefault = exports2 && exports2.__setModuleDefault || (Object.create ? (function(o2, v) {
4855
+ Object.defineProperty(o2, "default", { enumerable: true, value: v });
4856
+ }) : function(o2, v) {
4857
+ o2["default"] = v;
4858
+ });
4859
+ var __importStar = exports2 && exports2.__importStar || /* @__PURE__ */ (function() {
4860
+ var ownKeys = function(o2) {
4861
+ ownKeys = Object.getOwnPropertyNames || function(o3) {
4862
+ var ar = [];
4863
+ for (var k in o3) if (Object.prototype.hasOwnProperty.call(o3, k)) ar[ar.length] = k;
4864
+ return ar;
4865
+ };
4866
+ return ownKeys(o2);
4867
+ };
4868
+ return function(mod) {
4869
+ if (mod && mod.__esModule) return mod;
4870
+ var result = {};
4871
+ if (mod != null) {
4872
+ for (var k = ownKeys(mod), i2 = 0; i2 < k.length; i2++) if (k[i2] !== "default") __createBinding(result, mod, k[i2]);
4873
+ }
4874
+ __setModuleDefault(result, mod);
4875
+ return result;
4876
+ };
4877
+ })();
4878
+ Object.defineProperty(exports2, "__esModule", { value: true });
4879
+ exports2.OUTGOING_PASSES = void 0;
4880
+ exports2.removeChunked = removeChunked;
4881
+ exports2.setConnection = setConnection;
4882
+ exports2.setRedirectHostRewrite = setRedirectHostRewrite;
4883
+ exports2.writeHeaders = writeHeaders;
4884
+ exports2.writeStatusCode = writeStatusCode;
4885
+ var common2 = __importStar(require_common2());
4886
+ var redirectRegex = /^201|30(1|2|7|8)$/;
4887
+ function removeChunked(_req, _res, proxyRes) {
4888
+ delete proxyRes.headers["transfer-encoding"];
4889
+ }
4890
+ function setConnection(req, _res, proxyRes) {
4891
+ if (req.httpVersion === "1.0") {
4892
+ proxyRes.headers["connection"] = req.headers["connection"] || "close";
4893
+ } else if (req.httpVersion !== "2.0" && !proxyRes.headers["connection"]) {
4894
+ proxyRes.headers["connection"] = req.headers["connection"] || "keep-alive";
4904
4895
  }
4905
- spread.path = spread.search ? spread.pathname + spread.search : spread.pathname;
4906
- return spread;
4907
4896
  }
4908
- function removeMatchingHeaders(regex, headers) {
4909
- var lastValue;
4910
- for (var header in headers) {
4911
- if (regex.test(header)) {
4912
- lastValue = headers[header];
4913
- delete headers[header];
4897
+ function setRedirectHostRewrite(req, _res, proxyRes, options) {
4898
+ if ((options.hostRewrite || options.autoRewrite || options.protocolRewrite) && proxyRes.headers["location"] && redirectRegex.test(`${proxyRes.statusCode}`)) {
4899
+ const target = common2.toURL(options.target);
4900
+ const location = proxyRes.headers["location"];
4901
+ if (typeof location != "string") {
4902
+ return;
4903
+ }
4904
+ const u2 = common2.toURL(location);
4905
+ if (target.host != u2.host) {
4906
+ return;
4907
+ }
4908
+ if (options.hostRewrite) {
4909
+ u2.host = options.hostRewrite;
4910
+ } else if (options.autoRewrite) {
4911
+ u2.host = req.headers["host"] ?? "";
4912
+ }
4913
+ if (options.protocolRewrite) {
4914
+ u2.protocol = options.protocolRewrite;
4914
4915
  }
4916
+ proxyRes.headers["location"] = u2.toString();
4915
4917
  }
4916
- return lastValue === null || typeof lastValue === "undefined" ? void 0 : String(lastValue).trim();
4917
4918
  }
4918
- function createErrorType(code, message, baseClass) {
4919
- function CustomError(properties) {
4920
- if (isFunction(Error.captureStackTrace)) {
4921
- Error.captureStackTrace(this, this.constructor);
4919
+ function writeHeaders(_req, res, proxyRes, options) {
4920
+ const rewriteCookieDomainConfig = typeof options.cookieDomainRewrite === "string" ? (
4921
+ // also test for ''
4922
+ { "*": options.cookieDomainRewrite }
4923
+ ) : options.cookieDomainRewrite;
4924
+ const rewriteCookiePathConfig = typeof options.cookiePathRewrite === "string" ? (
4925
+ // also test for ''
4926
+ { "*": options.cookiePathRewrite }
4927
+ ) : options.cookiePathRewrite;
4928
+ const preserveHeaderKeyCase = options.preserveHeaderKeyCase;
4929
+ const setHeader = (key, header) => {
4930
+ if (header == void 0) {
4931
+ return;
4932
+ }
4933
+ if (rewriteCookieDomainConfig && key.toLowerCase() === "set-cookie") {
4934
+ header = common2.rewriteCookieProperty(header, rewriteCookieDomainConfig, "domain");
4935
+ }
4936
+ if (rewriteCookiePathConfig && key.toLowerCase() === "set-cookie") {
4937
+ header = common2.rewriteCookieProperty(header, rewriteCookiePathConfig, "path");
4938
+ }
4939
+ res.setHeader(String(key).trim(), header);
4940
+ };
4941
+ let rawHeaderKeyMap;
4942
+ if (preserveHeaderKeyCase && proxyRes.rawHeaders != void 0) {
4943
+ rawHeaderKeyMap = {};
4944
+ for (let i2 = 0; i2 < proxyRes.rawHeaders.length; i2 += 2) {
4945
+ const key = proxyRes.rawHeaders[i2];
4946
+ rawHeaderKeyMap[key.toLowerCase()] = key;
4922
4947
  }
4923
- Object.assign(this, properties || {});
4924
- this.code = code;
4925
- this.message = this.cause ? message + ": " + this.cause.message : message;
4926
4948
  }
4927
- CustomError.prototype = new (baseClass || Error)();
4928
- Object.defineProperties(CustomError.prototype, {
4929
- constructor: {
4930
- value: CustomError,
4931
- enumerable: false
4932
- },
4933
- name: {
4934
- value: "Error [" + code + "]",
4935
- enumerable: false
4949
+ for (const key0 in proxyRes.headers) {
4950
+ let key = key0;
4951
+ if (_req.httpVersionMajor > 1 && (key === "connection" || key === "keep-alive")) {
4952
+ continue;
4936
4953
  }
4937
- });
4938
- return CustomError;
4939
- }
4940
- function destroyRequest(request, error) {
4941
- for (var event of events) {
4942
- request.removeListener(event, eventHandlers[event]);
4954
+ const header = proxyRes.headers[key];
4955
+ if (preserveHeaderKeyCase && rawHeaderKeyMap) {
4956
+ key = rawHeaderKeyMap[key] ?? key;
4957
+ }
4958
+ setHeader(key, header);
4943
4959
  }
4944
- request.on("error", noop3);
4945
- request.destroy(error);
4946
- }
4947
- function isSubdomain(subdomain, domain) {
4948
- assert(isString(subdomain) && isString(domain));
4949
- var dot = subdomain.length - domain.length - 1;
4950
- return dot > 0 && subdomain[dot] === "." && subdomain.endsWith(domain);
4951
- }
4952
- function isString(value) {
4953
- return typeof value === "string" || value instanceof String;
4954
- }
4955
- function isFunction(value) {
4956
- return typeof value === "function";
4957
- }
4958
- function isBuffer(value) {
4959
- return typeof value === "object" && "length" in value;
4960
4960
  }
4961
- function isURL(value) {
4962
- return URL2 && value instanceof URL2;
4961
+ function writeStatusCode(_req, res, proxyRes) {
4962
+ res.statusCode = proxyRes.statusCode;
4963
+ if (proxyRes.statusMessage && _req.httpVersionMajor === 1) {
4964
+ res.statusMessage = proxyRes.statusMessage;
4965
+ }
4963
4966
  }
4964
- module2.exports = wrap({ http: http2, https });
4965
- module2.exports.wrap = wrap;
4967
+ exports2.OUTGOING_PASSES = {
4968
+ removeChunked,
4969
+ setConnection,
4970
+ setRedirectHostRewrite,
4971
+ writeHeaders,
4972
+ writeStatusCode
4973
+ };
4966
4974
  }
4967
4975
  });
4968
4976
 
4969
- // node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-incoming.js
4977
+ // ../../node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-incoming.js
4970
4978
  var require_web_incoming = __commonJS({
4971
- "node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-incoming.js"(exports2) {
4979
+ "../../node_modules/http-proxy-3/dist/lib/http-proxy/passes/web-incoming.js"(exports2) {
4972
4980
  "use strict";
4973
4981
  var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o2, m, k, k2) {
4974
4982
  if (k2 === void 0) k2 = k;
@@ -5015,9 +5023,10 @@ var require_web_incoming = __commonJS({
5015
5023
  exports2.stream = stream;
5016
5024
  var http2 = __importStar(require("node:http"));
5017
5025
  var https = __importStar(require("node:https"));
5018
- var web_outgoing_1 = require_web_outgoing();
5019
- var common2 = __importStar(require_common());
5020
5026
  var followRedirects = __importStar(require_follow_redirects());
5027
+ var common2 = __importStar(require_common2());
5028
+ var web_outgoing_1 = require_web_outgoing();
5029
+ var node_stream_1 = require("node:stream");
5021
5030
  var web_o = Object.values(web_outgoing_1.OUTGOING_PASSES);
5022
5031
  var nativeAgents = { http: http2, https };
5023
5032
  function deleteLength(req) {
@@ -5048,6 +5057,9 @@ var require_web_incoming = __commonJS({
5048
5057
  }
5049
5058
  function stream(req, res, options, _, server, cb) {
5050
5059
  server.emit("start", req, res, options.target || options.forward);
5060
+ if (options.fetch || process.env.FORCE_FETCH_PATH === "true") {
5061
+ return stream2(req, res, options, _, server, cb);
5062
+ }
5051
5063
  const agents = options.followRedirects ? followRedirects : nativeAgents;
5052
5064
  const http3 = agents.http;
5053
5065
  const https2 = agents.https;
@@ -5119,13 +5131,156 @@ var require_web_incoming = __commonJS({
5119
5131
  }
5120
5132
  });
5121
5133
  }
5134
+ async function stream2(req, res, options, _, server, cb) {
5135
+ const handleError = (err, target) => {
5136
+ if (cb) {
5137
+ cb(err, req, res, target);
5138
+ } else {
5139
+ server.emit("error", err, req, res, target);
5140
+ }
5141
+ };
5142
+ req.on("error", (err) => {
5143
+ if (req.socket.destroyed && err.code === "ECONNRESET") {
5144
+ const target = options.target || options.forward;
5145
+ if (target) {
5146
+ server.emit("econnreset", err, req, res, target);
5147
+ }
5148
+ return;
5149
+ }
5150
+ handleError(err);
5151
+ });
5152
+ const fetchOptions = options.fetch === true ? {} : options.fetch;
5153
+ if (!fetchOptions) {
5154
+ throw new Error("stream2 called without fetch options");
5155
+ }
5156
+ if (options.forward) {
5157
+ const outgoingOptions2 = common2.setupOutgoing(options.ssl || {}, options, req, "forward");
5158
+ const requestOptions2 = {
5159
+ method: outgoingOptions2.method
5160
+ };
5161
+ if (fetchOptions.dispatcher) {
5162
+ requestOptions2.dispatcher = fetchOptions.dispatcher;
5163
+ }
5164
+ if (options.buffer) {
5165
+ requestOptions2.body = options.buffer;
5166
+ } else if (req.method !== "GET" && req.method !== "HEAD") {
5167
+ requestOptions2.body = req;
5168
+ requestOptions2.duplex = "half";
5169
+ }
5170
+ if (fetchOptions.onBeforeRequest) {
5171
+ try {
5172
+ await fetchOptions.onBeforeRequest(requestOptions2, req, res, options);
5173
+ } catch (err) {
5174
+ handleError(err, options.forward);
5175
+ return;
5176
+ }
5177
+ }
5178
+ try {
5179
+ const result = await fetch(new URL(outgoingOptions2.url).origin + outgoingOptions2.path, requestOptions2);
5180
+ if (fetchOptions.onAfterResponse) {
5181
+ try {
5182
+ await fetchOptions.onAfterResponse(result, req, res, options);
5183
+ } catch (err) {
5184
+ handleError(err, options.forward);
5185
+ return;
5186
+ }
5187
+ }
5188
+ } catch (err) {
5189
+ handleError(err, options.forward);
5190
+ }
5191
+ if (!options.target) {
5192
+ return res.end();
5193
+ }
5194
+ }
5195
+ const outgoingOptions = common2.setupOutgoing(options.ssl || {}, options, req);
5196
+ const requestOptions = {
5197
+ method: outgoingOptions.method,
5198
+ headers: Object.fromEntries(Object.entries(outgoingOptions.headers || {}).filter(([key, _value]) => {
5199
+ return typeof key === "string";
5200
+ })),
5201
+ ...fetchOptions.requestOptions
5202
+ };
5203
+ if (fetchOptions.dispatcher) {
5204
+ requestOptions.dispatcher = fetchOptions.dispatcher;
5205
+ }
5206
+ if (options.auth) {
5207
+ requestOptions.headers = {
5208
+ ...requestOptions.headers,
5209
+ authorization: `Basic ${Buffer.from(options.auth).toString("base64")}`
5210
+ };
5211
+ }
5212
+ if (options.buffer) {
5213
+ requestOptions.body = options.buffer;
5214
+ } else if (req.method !== "GET" && req.method !== "HEAD") {
5215
+ requestOptions.body = req;
5216
+ requestOptions.duplex = "half";
5217
+ }
5218
+ if (fetchOptions.onBeforeRequest) {
5219
+ try {
5220
+ await fetchOptions.onBeforeRequest(requestOptions, req, res, options);
5221
+ } catch (err) {
5222
+ handleError(err, options.target);
5223
+ return;
5224
+ }
5225
+ }
5226
+ try {
5227
+ const response = await fetch(new URL(outgoingOptions.url).origin + outgoingOptions.path, requestOptions);
5228
+ if (fetchOptions.onAfterResponse) {
5229
+ try {
5230
+ await fetchOptions.onAfterResponse(response, req, res, options);
5231
+ } catch (err) {
5232
+ handleError(err, options.target);
5233
+ return;
5234
+ }
5235
+ }
5236
+ const fakeProxyRes = {
5237
+ statusCode: response.status,
5238
+ statusMessage: response.statusText,
5239
+ headers: Object.fromEntries(response.headers.entries()),
5240
+ rawHeaders: Object.entries(response.headers).flatMap(([key, value]) => {
5241
+ if (Array.isArray(value)) {
5242
+ return value.flatMap((v) => v != null ? [key, v] : []);
5243
+ }
5244
+ return value != null ? [key, value] : [];
5245
+ })
5246
+ };
5247
+ server?.emit("proxyRes", fakeProxyRes, req, res);
5248
+ if (!res.headersSent && !options.selfHandleResponse) {
5249
+ for (const pass of web_o) {
5250
+ pass(req, res, fakeProxyRes, options);
5251
+ }
5252
+ }
5253
+ if (!res.writableEnded) {
5254
+ const nodeStream = response.body ? node_stream_1.Readable.from(response.body) : null;
5255
+ if (nodeStream) {
5256
+ nodeStream.on("error", (err) => {
5257
+ handleError(err, options.target);
5258
+ });
5259
+ nodeStream.on("end", () => {
5260
+ server?.emit("end", req, res, fakeProxyRes);
5261
+ });
5262
+ if (!options.selfHandleResponse) {
5263
+ nodeStream.pipe(res, { end: true });
5264
+ } else {
5265
+ nodeStream.resume();
5266
+ }
5267
+ } else {
5268
+ server?.emit("end", req, res, fakeProxyRes);
5269
+ }
5270
+ } else {
5271
+ server?.emit("end", req, res, fakeProxyRes);
5272
+ }
5273
+ } catch (err) {
5274
+ handleError(err, options.target);
5275
+ }
5276
+ }
5122
5277
  exports2.WEB_PASSES = { deleteLength, timeout, XHeaders, stream };
5123
5278
  }
5124
5279
  });
5125
5280
 
5126
- // node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.js
5281
+ // ../../node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.js
5127
5282
  var require_ws_incoming = __commonJS({
5128
- "node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.js"(exports2) {
5283
+ "../../node_modules/http-proxy-3/dist/lib/http-proxy/passes/ws-incoming.js"(exports2) {
5129
5284
  "use strict";
5130
5285
  var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o2, m, k, k2) {
5131
5286
  if (k2 === void 0) k2 = k;
@@ -5175,7 +5330,7 @@ var require_ws_incoming = __commonJS({
5175
5330
  exports2.stream = stream;
5176
5331
  var http2 = __importStar(require("node:http"));
5177
5332
  var https = __importStar(require("node:https"));
5178
- var common2 = __importStar(require_common());
5333
+ var common2 = __importStar(require_common2());
5179
5334
  var web_outgoing_1 = require_web_outgoing();
5180
5335
  var debug_1 = __importDefault(require_src());
5181
5336
  var log = (0, debug_1.default)("http-proxy-3:ws-incoming");
@@ -5352,9 +5507,9 @@ var require_ws_incoming = __commonJS({
5352
5507
  }
5353
5508
  });
5354
5509
 
5355
- // node_modules/http-proxy-3/dist/lib/http-proxy/index.js
5510
+ // ../../node_modules/http-proxy-3/dist/lib/http-proxy/index.js
5356
5511
  var require_http_proxy = __commonJS({
5357
- "node_modules/http-proxy-3/dist/lib/http-proxy/index.js"(exports2) {
5512
+ "../../node_modules/http-proxy-3/dist/lib/http-proxy/index.js"(exports2) {
5358
5513
  "use strict";
5359
5514
  var __createBinding = exports2 && exports2.__createBinding || (Object.create ? (function(o2, m, k, k2) {
5360
5515
  if (k2 === void 0) k2 = k;
@@ -5404,7 +5559,7 @@ var require_http_proxy = __commonJS({
5404
5559
  var ws_incoming_1 = require_ws_incoming();
5405
5560
  var node_events_1 = require("node:events");
5406
5561
  var debug_1 = __importDefault(require_src());
5407
- var common_1 = require_common();
5562
+ var common_1 = require_common2();
5408
5563
  var log = (0, debug_1.default)("http-proxy-3");
5409
5564
  var ProxyServer = class _ProxyServer extends node_events_1.EventEmitter {
5410
5565
  /**
@@ -5525,7 +5680,7 @@ var require_http_proxy = __commonJS({
5525
5680
  passes.splice(i2++, 0, cb);
5526
5681
  };
5527
5682
  log("creating a ProxyServer", options);
5528
- options.prependPath = options.prependPath === false ? false : true;
5683
+ options.prependPath = options.prependPath !== false;
5529
5684
  this.options = options;
5530
5685
  this.web = this.createRightProxy("web")(options);
5531
5686
  this.ws = this.createRightProxy("ws")(options);
@@ -5562,9 +5717,9 @@ var require_http_proxy = __commonJS({
5562
5717
  }
5563
5718
  });
5564
5719
 
5565
- // node_modules/http-proxy-3/dist/lib/index.js
5720
+ // ../../node_modules/http-proxy-3/dist/lib/index.js
5566
5721
  var require_lib = __commonJS({
5567
- "node_modules/http-proxy-3/dist/lib/index.js"(exports2) {
5722
+ "../../node_modules/http-proxy-3/dist/lib/index.js"(exports2) {
5568
5723
  "use strict";
5569
5724
  Object.defineProperty(exports2, "__esModule", { value: true });
5570
5725
  exports2.numOpenSockets = exports2.ProxyServer = void 0;
@@ -5586,9 +5741,9 @@ var require_lib = __commonJS({
5586
5741
  }
5587
5742
  });
5588
5743
 
5589
- // node_modules/isexe/windows.js
5744
+ // ../../node_modules/isexe/windows.js
5590
5745
  var require_windows = __commonJS({
5591
- "node_modules/isexe/windows.js"(exports2, module2) {
5746
+ "../../node_modules/isexe/windows.js"(exports2, module2) {
5592
5747
  "use strict";
5593
5748
  module2.exports = isexe;
5594
5749
  isexe.sync = sync;
@@ -5627,9 +5782,9 @@ var require_windows = __commonJS({
5627
5782
  }
5628
5783
  });
5629
5784
 
5630
- // node_modules/isexe/mode.js
5785
+ // ../../node_modules/isexe/mode.js
5631
5786
  var require_mode = __commonJS({
5632
- "node_modules/isexe/mode.js"(exports2, module2) {
5787
+ "../../node_modules/isexe/mode.js"(exports2, module2) {
5633
5788
  "use strict";
5634
5789
  module2.exports = isexe;
5635
5790
  isexe.sync = sync;
@@ -5661,9 +5816,9 @@ var require_mode = __commonJS({
5661
5816
  }
5662
5817
  });
5663
5818
 
5664
- // node_modules/isexe/index.js
5819
+ // ../../node_modules/isexe/index.js
5665
5820
  var require_isexe = __commonJS({
5666
- "node_modules/isexe/index.js"(exports2, module2) {
5821
+ "../../node_modules/isexe/index.js"(exports2, module2) {
5667
5822
  "use strict";
5668
5823
  var fs = require("fs");
5669
5824
  var core;
@@ -5717,9 +5872,9 @@ var require_isexe = __commonJS({
5717
5872
  }
5718
5873
  });
5719
5874
 
5720
- // node_modules/which/which.js
5875
+ // ../../node_modules/which/which.js
5721
5876
  var require_which = __commonJS({
5722
- "node_modules/which/which.js"(exports2, module2) {
5877
+ "../../node_modules/which/which.js"(exports2, module2) {
5723
5878
  "use strict";
5724
5879
  var isWindows = process.platform === "win32" || process.env.OSTYPE === "cygwin" || process.env.OSTYPE === "msys";
5725
5880
  var path6 = require("path");
@@ -5814,9 +5969,9 @@ var require_which = __commonJS({
5814
5969
  }
5815
5970
  });
5816
5971
 
5817
- // node_modules/path-key/index.js
5972
+ // ../../node_modules/path-key/index.js
5818
5973
  var require_path_key = __commonJS({
5819
- "node_modules/path-key/index.js"(exports2, module2) {
5974
+ "../../node_modules/path-key/index.js"(exports2, module2) {
5820
5975
  "use strict";
5821
5976
  var pathKey2 = (options = {}) => {
5822
5977
  const environment = options.env || process.env;
@@ -5831,9 +5986,9 @@ var require_path_key = __commonJS({
5831
5986
  }
5832
5987
  });
5833
5988
 
5834
- // node_modules/cross-spawn/lib/util/resolveCommand.js
5989
+ // ../../node_modules/cross-spawn/lib/util/resolveCommand.js
5835
5990
  var require_resolveCommand = __commonJS({
5836
- "node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
5991
+ "../../node_modules/cross-spawn/lib/util/resolveCommand.js"(exports2, module2) {
5837
5992
  "use strict";
5838
5993
  var path6 = require("path");
5839
5994
  var which = require_which();
@@ -5873,9 +6028,9 @@ var require_resolveCommand = __commonJS({
5873
6028
  }
5874
6029
  });
5875
6030
 
5876
- // node_modules/cross-spawn/lib/util/escape.js
6031
+ // ../../node_modules/cross-spawn/lib/util/escape.js
5877
6032
  var require_escape = __commonJS({
5878
- "node_modules/cross-spawn/lib/util/escape.js"(exports2, module2) {
6033
+ "../../node_modules/cross-spawn/lib/util/escape.js"(exports2, module2) {
5879
6034
  "use strict";
5880
6035
  var metaCharsRegExp = /([()\][%!^"`<>&|;, *?])/g;
5881
6036
  function escapeCommand(arg) {
@@ -5898,17 +6053,17 @@ var require_escape = __commonJS({
5898
6053
  }
5899
6054
  });
5900
6055
 
5901
- // node_modules/shebang-regex/index.js
6056
+ // ../../node_modules/shebang-regex/index.js
5902
6057
  var require_shebang_regex = __commonJS({
5903
- "node_modules/shebang-regex/index.js"(exports2, module2) {
6058
+ "../../node_modules/shebang-regex/index.js"(exports2, module2) {
5904
6059
  "use strict";
5905
6060
  module2.exports = /^#!(.*)/;
5906
6061
  }
5907
6062
  });
5908
6063
 
5909
- // node_modules/shebang-command/index.js
6064
+ // ../../node_modules/shebang-command/index.js
5910
6065
  var require_shebang_command = __commonJS({
5911
- "node_modules/shebang-command/index.js"(exports2, module2) {
6066
+ "../../node_modules/shebang-command/index.js"(exports2, module2) {
5912
6067
  "use strict";
5913
6068
  var shebangRegex = require_shebang_regex();
5914
6069
  module2.exports = (string = "") => {
@@ -5926,9 +6081,9 @@ var require_shebang_command = __commonJS({
5926
6081
  }
5927
6082
  });
5928
6083
 
5929
- // node_modules/cross-spawn/lib/util/readShebang.js
6084
+ // ../../node_modules/cross-spawn/lib/util/readShebang.js
5930
6085
  var require_readShebang = __commonJS({
5931
- "node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
6086
+ "../../node_modules/cross-spawn/lib/util/readShebang.js"(exports2, module2) {
5932
6087
  "use strict";
5933
6088
  var fs = require("fs");
5934
6089
  var shebangCommand = require_shebang_command();
@@ -5948,9 +6103,9 @@ var require_readShebang = __commonJS({
5948
6103
  }
5949
6104
  });
5950
6105
 
5951
- // node_modules/cross-spawn/lib/parse.js
6106
+ // ../../node_modules/cross-spawn/lib/parse.js
5952
6107
  var require_parse = __commonJS({
5953
- "node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
6108
+ "../../node_modules/cross-spawn/lib/parse.js"(exports2, module2) {
5954
6109
  "use strict";
5955
6110
  var path6 = require("path");
5956
6111
  var resolveCommand = require_resolveCommand();
@@ -6010,9 +6165,9 @@ var require_parse = __commonJS({
6010
6165
  }
6011
6166
  });
6012
6167
 
6013
- // node_modules/cross-spawn/lib/enoent.js
6168
+ // ../../node_modules/cross-spawn/lib/enoent.js
6014
6169
  var require_enoent = __commonJS({
6015
- "node_modules/cross-spawn/lib/enoent.js"(exports2, module2) {
6170
+ "../../node_modules/cross-spawn/lib/enoent.js"(exports2, module2) {
6016
6171
  "use strict";
6017
6172
  var isWin = process.platform === "win32";
6018
6173
  function notFoundError(original, syscall) {
@@ -6060,9 +6215,9 @@ var require_enoent = __commonJS({
6060
6215
  }
6061
6216
  });
6062
6217
 
6063
- // node_modules/cross-spawn/index.js
6218
+ // ../../node_modules/cross-spawn/index.js
6064
6219
  var require_cross_spawn = __commonJS({
6065
- "node_modules/cross-spawn/index.js"(exports2, module2) {
6220
+ "../../node_modules/cross-spawn/index.js"(exports2, module2) {
6066
6221
  "use strict";
6067
6222
  var cp = require("child_process");
6068
6223
  var parse = require_parse();
@@ -6091,7 +6246,7 @@ var require_cross_spawn = __commonJS({
6091
6246
  var import_node_process13 = __toESM(require("node:process"), 1);
6092
6247
  var import_strict5 = require("node:assert/strict");
6093
6248
 
6094
- // node_modules/commander/esm.mjs
6249
+ // ../../node_modules/commander/esm.mjs
6095
6250
  var import_index = __toESM(require_commander(), 1);
6096
6251
  var {
6097
6252
  program,
@@ -6108,7 +6263,7 @@ var {
6108
6263
  Help
6109
6264
  } = import_index.default;
6110
6265
 
6111
- // node_modules/chalk/source/vendor/ansi-styles/index.js
6266
+ // ../../node_modules/chalk/source/vendor/ansi-styles/index.js
6112
6267
  var ANSI_BACKGROUND_OFFSET = 10;
6113
6268
  var wrapAnsi16 = (offset = 0) => (code) => `\x1B[${code + offset}m`;
6114
6269
  var wrapAnsi256 = (offset = 0) => (code) => `\x1B[${38 + offset};5;${code}m`;
@@ -6294,7 +6449,7 @@ function assembleStyles() {
6294
6449
  var ansiStyles = assembleStyles();
6295
6450
  var ansi_styles_default = ansiStyles;
6296
6451
 
6297
- // node_modules/chalk/source/vendor/supports-color/index.js
6452
+ // ../../node_modules/chalk/source/vendor/supports-color/index.js
6298
6453
  var import_node_process = __toESM(require("node:process"), 1);
6299
6454
  var import_node_os = __toESM(require("node:os"), 1);
6300
6455
  var import_node_tty = __toESM(require("node:tty"), 1);
@@ -6426,7 +6581,7 @@ var supportsColor = {
6426
6581
  };
6427
6582
  var supports_color_default = supportsColor;
6428
6583
 
6429
- // node_modules/chalk/source/utilities.js
6584
+ // ../../node_modules/chalk/source/utilities.js
6430
6585
  function stringReplaceAll(string, substring, replacer) {
6431
6586
  let index = string.indexOf(substring);
6432
6587
  if (index === -1) {
@@ -6456,7 +6611,7 @@ function stringEncaseCRLFWithFirstIndex(string, prefix, postfix, index) {
6456
6611
  return returnValue;
6457
6612
  }
6458
6613
 
6459
- // node_modules/chalk/source/index.js
6614
+ // ../../node_modules/chalk/source/index.js
6460
6615
  var { stdout: stdoutColor, stderr: stderrColor } = supports_color_default;
6461
6616
  var GENERATOR = Symbol("GENERATOR");
6462
6617
  var STYLER = Symbol("STYLER");
@@ -6618,7 +6773,7 @@ async function runProxy(proxyFrom, proxyTo, stdio) {
6618
6773
  const httpServer = http.createServer((req, res) => {
6619
6774
  if (req.url?.startsWith(RESTART_URL) && req.method === "POST") {
6620
6775
  onRestart();
6621
- res.writeHead(200, {
6776
+ res.writeHead(500, {
6622
6777
  "Content-Type": "text/html"
6623
6778
  }).end(`
6624
6779
  <!doctype html>
@@ -6714,8 +6869,29 @@ async function runProxy(proxyFrom, proxyTo, stdio) {
6714
6869
  <section>
6715
6870
  <span class="code" id="err-code">Restarting the services...</span>
6716
6871
  <h1 id="err-title">Please wait...</h1>
6717
- <p class="lead">Will reload in 5 seconds</p>
6718
- <script>setTimeout(() => window.location.href = "/", 5_000);</script>
6872
+ <script>
6873
+ function checkIfSiteIsAlive(counter = 0) {
6874
+ if (counter === 10) {
6875
+ window.location.href = "/";
6876
+ return;
6877
+ }
6878
+
6879
+ fetch('/')
6880
+ .then((response) => {
6881
+ if (response.ok) {
6882
+ window.location.href = "/";
6883
+ return;
6884
+ }
6885
+ return Promise.reject();
6886
+ })
6887
+ .catch((error) => {
6888
+ console.error('monitor:error', 'server is not yet reachable', error);
6889
+ setTimeout(() => checkIfSiteIsAlive(counter + 1), 2_000);
6890
+ });
6891
+ }
6892
+ checkIfSiteIsAlive();
6893
+ </script>
6894
+ <p class="lead">Waiting for server to restart</p>
6719
6895
  </section>
6720
6896
  </main>
6721
6897
  </body>
@@ -6736,7 +6912,7 @@ async function runProxy(proxyFrom, proxyTo, stdio) {
6736
6912
  proxy.on("error", (_err, _req, res) => {
6737
6913
  if ("req" in res) {
6738
6914
  if (!res.headersSent && !res.writableEnded) {
6739
- res.writeHead(200, {
6915
+ res.writeHead(500, {
6740
6916
  "Content-Type": "text/html"
6741
6917
  }).end(`
6742
6918
  <!doctype html>
@@ -6744,8 +6920,7 @@ async function runProxy(proxyFrom, proxyTo, stdio) {
6744
6920
  <head>
6745
6921
  <meta charset="utf-8" />
6746
6922
  <meta name="viewport" content="width=device-width,initial-scale=1" />
6747
- <title>Something went wrong \u2014 Error</title>
6748
- <meta name="description" content="Friendly error page with suggestions and retry button." />
6923
+ <title>Development Server Crashed</title>
6749
6924
  <style>
6750
6925
  :root{
6751
6926
  --bg:#0f1724; /* deep navy */
@@ -6815,11 +6990,10 @@ async function runProxy(proxyFrom, proxyTo, stdio) {
6815
6990
  </style>
6816
6991
  </head>
6817
6992
  <body>
6818
- <main class="card" role="main" aria-labelledby="err-title">
6993
+ <main class="card">
6819
6994
  <div class="illustration">
6820
- <div class="badge" aria-hidden="true">
6821
- <!-- friendly robot / broken plug SVG -->
6822
- <svg width="160" height="160" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg" class="wobble" role="img" aria-hidden="true">
6995
+ <div class="badge">
6996
+ <svg width="160" height="160" viewBox="0 0 64 64" fill="none" xmlns="http://www.w3.org/2000/svg" class="wobble">
6823
6997
  <rect x="6" y="10" width="52" height="36" rx="6" fill="rgba(125,211,252,0.06)" stroke="rgba(125,211,252,0.12)"/>
6824
6998
  <circle cx="20" cy="28" r="4" fill="rgba(125,211,252,0.18)"/>
6825
6999
  <rect x="32" y="24" width="16" height="6" rx="2" fill="rgba(125,211,252,0.22)"/>
@@ -6830,13 +7004,14 @@ async function runProxy(proxyFrom, proxyTo, stdio) {
6830
7004
  </div>
6831
7005
 
6832
7006
  <section>
6833
- <span class="code" id="err-code">500</span>
6834
- <h1 id="err-title">Uh-oh \u2014 something went wrong.</h1>
7007
+ <span class="code" id="err-code">Development Server Down</span>
7008
+ <h1 id="err-title">For unknown reasons development server has crashed and is not reachable.</h1>
6835
7009
  <p class="lead">We hit an unexpected error while trying to load the page. This usually clears up quickly \u2014 here are a few options.</p>
6836
7010
 
6837
- <div class="actions" role="group" aria-label="error actions">
7011
+ <div class="actions">
6838
7012
  <form action=${RESTART_URL} method="POST">
6839
7013
  <button class="btn primary" id="retryBtn" type="submit">Retry</button>
7014
+ <a class="btn" id="homeBtn" onClick="fixWithAI()">Fix with AI</a>
6840
7015
  </form>
6841
7016
  <script type="text/javascript">
6842
7017
  function fixWithAI() {
@@ -6850,15 +7025,9 @@ async function runProxy(proxyFrom, proxyTo, stdio) {
6850
7025
  }, '*');
6851
7026
  }
6852
7027
  </script>
6853
- <a class="btn" id="homeBtn" onClick="fixWithAI()">Fix with AI</a>
6854
- </div>
6855
-
6856
- <div class="details" id="details" hidden>
6857
- <strong>Technical details</strong>
6858
- <div id="debugText" style="margin-top:8px;color:var(--muted);">No additional information available.</div>
6859
7028
  </div>
6860
7029
 
6861
- <div class="suggestions" aria-hidden="false">
7030
+ <div class="suggestions">
6862
7031
  <div class="suggestion"><span class="dot"></span><div>Try refreshing the page or press <kbd>Ctrl</kbd> + <kbd>R</kbd>.</div></div>
6863
7032
  <div class="suggestion"><span class="dot"></span><div>Check your connection or try again in a few minutes.</div></div>
6864
7033
  <div class="suggestion"><span class="dot"></span><div>If the problem persists, open an issue or contact support.</div></div>
@@ -6894,7 +7063,7 @@ async function runProxy(proxyFrom, proxyTo, stdio) {
6894
7063
  var import_strict4 = require("node:assert/strict");
6895
7064
  var import_node_process12 = __toESM(require("node:process"), 1);
6896
7065
 
6897
- // node_modules/is-plain-obj/index.js
7066
+ // ../../node_modules/is-plain-obj/index.js
6898
7067
  function isPlainObject(value) {
6899
7068
  if (typeof value !== "object" || value === null) {
6900
7069
  return false;
@@ -6903,7 +7072,7 @@ function isPlainObject(value) {
6903
7072
  return (prototype === null || prototype === Object.prototype || Object.getPrototypeOf(prototype) === null) && !(Symbol.toStringTag in value) && !(Symbol.iterator in value);
6904
7073
  }
6905
7074
 
6906
- // node_modules/execa/lib/arguments/file-url.js
7075
+ // ../../node_modules/execa/lib/arguments/file-url.js
6907
7076
  var import_node_url = require("node:url");
6908
7077
  var safeNormalizeFileUrl = (file, name) => {
6909
7078
  const fileString = normalizeFileUrl(normalizeDenoExecPath(file));
@@ -6916,7 +7085,7 @@ var normalizeDenoExecPath = (file) => isDenoExecPath(file) ? file.toString() : f
6916
7085
  var isDenoExecPath = (file) => typeof file !== "string" && file && Object.getPrototypeOf(file) === String.prototype;
6917
7086
  var normalizeFileUrl = (file) => file instanceof URL ? (0, import_node_url.fileURLToPath)(file) : file;
6918
7087
 
6919
- // node_modules/execa/lib/methods/parameters.js
7088
+ // ../../node_modules/execa/lib/methods/parameters.js
6920
7089
  var normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
6921
7090
  const filePath = safeNormalizeFileUrl(rawFile, "First argument");
6922
7091
  const [commandArguments, options] = isPlainObject(rawArguments) ? [[], rawArguments] : [rawArguments, rawOptions];
@@ -6937,10 +7106,10 @@ var normalizeParameters = (rawFile, rawArguments = [], rawOptions = {}) => {
6937
7106
  return [filePath, normalizedArguments, options];
6938
7107
  };
6939
7108
 
6940
- // node_modules/execa/lib/methods/template.js
7109
+ // ../../node_modules/execa/lib/methods/template.js
6941
7110
  var import_node_child_process = require("node:child_process");
6942
7111
 
6943
- // node_modules/execa/lib/utils/uint-array.js
7112
+ // ../../node_modules/execa/lib/utils/uint-array.js
6944
7113
  var import_node_string_decoder = require("node:string_decoder");
6945
7114
  var { toString: objectToString } = Object.prototype;
6946
7115
  var isArrayBuffer = (value) => objectToString.call(value) === "[object ArrayBuffer]";
@@ -6987,7 +7156,7 @@ var getJoinLength = (uint8Arrays) => {
6987
7156
  return joinLength;
6988
7157
  };
6989
7158
 
6990
- // node_modules/execa/lib/methods/template.js
7159
+ // ../../node_modules/execa/lib/methods/template.js
6991
7160
  var isTemplateString = (templates) => Array.isArray(templates) && Array.isArray(templates.raw);
6992
7161
  var parseTemplates = (templates, expressions) => {
6993
7162
  let tokens = [];
@@ -7087,20 +7256,20 @@ var getSubprocessResult = ({ stdout }) => {
7087
7256
  throw new TypeError(`Unexpected "${typeof stdout}" stdout in template expression`);
7088
7257
  };
7089
7258
 
7090
- // node_modules/execa/lib/methods/main-sync.js
7259
+ // ../../node_modules/execa/lib/methods/main-sync.js
7091
7260
  var import_node_child_process3 = require("node:child_process");
7092
7261
 
7093
- // node_modules/execa/lib/arguments/specific.js
7262
+ // ../../node_modules/execa/lib/arguments/specific.js
7094
7263
  var import_node_util = require("node:util");
7095
7264
 
7096
- // node_modules/execa/lib/utils/standard-stream.js
7265
+ // ../../node_modules/execa/lib/utils/standard-stream.js
7097
7266
  var import_node_process2 = __toESM(require("node:process"), 1);
7098
7267
  var isStandardStream = (stream) => STANDARD_STREAMS.includes(stream);
7099
7268
  var STANDARD_STREAMS = [import_node_process2.default.stdin, import_node_process2.default.stdout, import_node_process2.default.stderr];
7100
7269
  var STANDARD_STREAMS_ALIASES = ["stdin", "stdout", "stderr"];
7101
7270
  var getStreamName = (fdNumber) => STANDARD_STREAMS_ALIASES[fdNumber] ?? `stdio[${fdNumber}]`;
7102
7271
 
7103
- // node_modules/execa/lib/arguments/specific.js
7272
+ // ../../node_modules/execa/lib/arguments/specific.js
7104
7273
  var normalizeFdSpecificOptions = (options) => {
7105
7274
  const optionsCopy = { ...options };
7106
7275
  for (const optionName of FD_SPECIFIC_OPTIONS) {
@@ -7170,7 +7339,7 @@ var DEFAULT_OPTIONS = {
7170
7339
  var FD_SPECIFIC_OPTIONS = ["lines", "buffer", "maxBuffer", "verbose", "stripFinalNewline"];
7171
7340
  var getFdSpecificValue = (optionArray, fdNumber) => fdNumber === "ipc" ? optionArray.at(-1) : optionArray[fdNumber];
7172
7341
 
7173
- // node_modules/execa/lib/verbose/values.js
7342
+ // ../../node_modules/execa/lib/verbose/values.js
7174
7343
  var isVerbose = ({ verbose }, fdNumber) => getFdVerbose(verbose, fdNumber) !== "none";
7175
7344
  var isFullVerbose = ({ verbose }, fdNumber) => !["none", "short"].includes(getFdVerbose(verbose, fdNumber));
7176
7345
  var getVerboseFunction = ({ verbose }, fdNumber) => {
@@ -7182,10 +7351,10 @@ var getFdGenericVerbose = (verbose) => verbose.find((fdVerbose) => isVerboseFunc
7182
7351
  var isVerboseFunction = (fdVerbose) => typeof fdVerbose === "function";
7183
7352
  var VERBOSE_VALUES = ["none", "short", "full"];
7184
7353
 
7185
- // node_modules/execa/lib/verbose/log.js
7354
+ // ../../node_modules/execa/lib/verbose/log.js
7186
7355
  var import_node_util3 = require("node:util");
7187
7356
 
7188
- // node_modules/execa/lib/arguments/escape.js
7357
+ // ../../node_modules/execa/lib/arguments/escape.js
7189
7358
  var import_node_process3 = require("node:process");
7190
7359
  var import_node_util2 = require("node:util");
7191
7360
  var joinCommand = (filePath, rawArguments) => {
@@ -7230,7 +7399,7 @@ var quoteString = (escapedArgument) => {
7230
7399
  };
7231
7400
  var NO_ESCAPE_REGEXP = /^[\w./-]+$/;
7232
7401
 
7233
- // node_modules/is-unicode-supported/index.js
7402
+ // ../../node_modules/is-unicode-supported/index.js
7234
7403
  var import_node_process4 = __toESM(require("node:process"), 1);
7235
7404
  function isUnicodeSupported() {
7236
7405
  const { env: env2 } = import_node_process4.default;
@@ -7241,7 +7410,7 @@ function isUnicodeSupported() {
7241
7410
  return Boolean(env2.WT_SESSION) || Boolean(env2.TERMINUS_SUBLIME) || env2.ConEmuTask === "{cmd::Cmder}" || TERM_PROGRAM === "Terminus-Sublime" || TERM_PROGRAM === "vscode" || TERM === "xterm-256color" || TERM === "alacritty" || TERM === "rxvt-unicode" || TERM === "rxvt-unicode-256color" || env2.TERMINAL_EMULATOR === "JetBrains-JediTerm";
7242
7411
  }
7243
7412
 
7244
- // node_modules/figures/index.js
7413
+ // ../../node_modules/figures/index.js
7245
7414
  var common = {
7246
7415
  circleQuestionMark: "(?)",
7247
7416
  questionMarkPrefix: "(?)",
@@ -7517,7 +7686,7 @@ var figures = shouldUseMain ? mainSymbols : fallbackSymbols;
7517
7686
  var figures_default = figures;
7518
7687
  var replacements = Object.entries(specialMainSymbols);
7519
7688
 
7520
- // node_modules/yoctocolors/base.js
7689
+ // ../../node_modules/yoctocolors/base.js
7521
7690
  var import_node_tty2 = __toESM(require("node:tty"), 1);
7522
7691
  var hasColors = import_node_tty2.default?.WriteStream?.prototype?.hasColors?.() ?? false;
7523
7692
  var format = (open, close) => {
@@ -7587,7 +7756,7 @@ var bgMagentaBright = format(105, 49);
7587
7756
  var bgCyanBright = format(106, 49);
7588
7757
  var bgWhiteBright = format(107, 49);
7589
7758
 
7590
- // node_modules/execa/lib/verbose/default.js
7759
+ // ../../node_modules/execa/lib/verbose/default.js
7591
7760
  var defaultVerboseFunction = ({
7592
7761
  type,
7593
7762
  message,
@@ -7626,7 +7795,7 @@ var COLORS = {
7626
7795
  duration: () => gray
7627
7796
  };
7628
7797
 
7629
- // node_modules/execa/lib/verbose/custom.js
7798
+ // ../../node_modules/execa/lib/verbose/custom.js
7630
7799
  var applyVerboseOnLines = (printedLines, verboseInfo, fdNumber) => {
7631
7800
  const verboseFunction = getVerboseFunction(verboseInfo, fdNumber);
7632
7801
  return printedLines.map(({ verboseLine, verboseObject }) => applyVerboseFunction(verboseLine, verboseObject, verboseFunction)).filter((printedLine) => printedLine !== void 0).map((printedLine) => appendNewline(printedLine)).join("");
@@ -7643,7 +7812,7 @@ var applyVerboseFunction = (verboseLine, verboseObject, verboseFunction) => {
7643
7812
  var appendNewline = (printedLine) => printedLine.endsWith("\n") ? printedLine : `${printedLine}
7644
7813
  `;
7645
7814
 
7646
- // node_modules/execa/lib/verbose/log.js
7815
+ // ../../node_modules/execa/lib/verbose/log.js
7647
7816
  var verboseLog = ({ type, verboseMessage, fdNumber, verboseInfo, result }) => {
7648
7817
  const verboseObject = getVerboseObject({ type, result, verboseInfo });
7649
7818
  const printedLines = getPrintedLines(verboseMessage, verboseObject);
@@ -7677,7 +7846,7 @@ var serializeVerboseMessage = (message) => {
7677
7846
  };
7678
7847
  var TAB_SIZE = 2;
7679
7848
 
7680
- // node_modules/execa/lib/verbose/start.js
7849
+ // ../../node_modules/execa/lib/verbose/start.js
7681
7850
  var logCommand = (escapedCommand, verboseInfo) => {
7682
7851
  if (!isVerbose(verboseInfo)) {
7683
7852
  return;
@@ -7689,7 +7858,7 @@ var logCommand = (escapedCommand, verboseInfo) => {
7689
7858
  });
7690
7859
  };
7691
7860
 
7692
- // node_modules/execa/lib/verbose/info.js
7861
+ // ../../node_modules/execa/lib/verbose/info.js
7693
7862
  var getVerboseInfo = (verbose, escapedCommand, rawOptions) => {
7694
7863
  validateVerbose(verbose);
7695
7864
  const commandId = getCommandId(verbose);
@@ -7717,12 +7886,12 @@ var validateVerbose = (verbose) => {
7717
7886
  }
7718
7887
  };
7719
7888
 
7720
- // node_modules/execa/lib/return/duration.js
7889
+ // ../../node_modules/execa/lib/return/duration.js
7721
7890
  var import_node_process5 = require("node:process");
7722
7891
  var getStartTime = () => import_node_process5.hrtime.bigint();
7723
7892
  var getDurationMs = (startTime) => Number(import_node_process5.hrtime.bigint() - startTime) / 1e6;
7724
7893
 
7725
- // node_modules/execa/lib/arguments/command.js
7894
+ // ../../node_modules/execa/lib/arguments/command.js
7726
7895
  var handleCommand = (filePath, rawArguments, rawOptions) => {
7727
7896
  const startTime = getStartTime();
7728
7897
  const { command, escapedCommand } = joinCommand(filePath, rawArguments);
@@ -7737,16 +7906,16 @@ var handleCommand = (filePath, rawArguments, rawOptions) => {
7737
7906
  };
7738
7907
  };
7739
7908
 
7740
- // node_modules/execa/lib/arguments/options.js
7909
+ // ../../node_modules/execa/lib/arguments/options.js
7741
7910
  var import_node_path5 = __toESM(require("node:path"), 1);
7742
7911
  var import_node_process9 = __toESM(require("node:process"), 1);
7743
7912
  var import_cross_spawn = __toESM(require_cross_spawn(), 1);
7744
7913
 
7745
- // node_modules/npm-run-path/index.js
7914
+ // ../../node_modules/npm-run-path/index.js
7746
7915
  var import_node_process6 = __toESM(require("node:process"), 1);
7747
7916
  var import_node_path2 = __toESM(require("node:path"), 1);
7748
7917
 
7749
- // node_modules/npm-run-path/node_modules/path-key/index.js
7918
+ // ../../node_modules/npm-run-path/node_modules/path-key/index.js
7750
7919
  function pathKey(options = {}) {
7751
7920
  const {
7752
7921
  env: env2 = process.env,
@@ -7758,7 +7927,7 @@ function pathKey(options = {}) {
7758
7927
  return Object.keys(env2).reverse().find((key) => key.toUpperCase() === "PATH") || "Path";
7759
7928
  }
7760
7929
 
7761
- // node_modules/unicorn-magic/node.js
7930
+ // ../../node_modules/unicorn-magic/node.js
7762
7931
  var import_node_util4 = require("node:util");
7763
7932
  var import_node_child_process2 = require("node:child_process");
7764
7933
  var import_node_path = __toESM(require("node:path"), 1);
@@ -7782,7 +7951,7 @@ function traversePathUp(startPath) {
7782
7951
  }
7783
7952
  var TEN_MEGABYTES_IN_BYTES = 10 * 1024 * 1024;
7784
7953
 
7785
- // node_modules/npm-run-path/index.js
7954
+ // ../../node_modules/npm-run-path/index.js
7786
7955
  var npmRunPath = ({
7787
7956
  cwd = import_node_process6.default.cwd(),
7788
7957
  path: pathOption = import_node_process6.default.env[pathKey()],
@@ -7823,10 +7992,10 @@ var npmRunPathEnv = ({ env: env2 = import_node_process6.default.env, ...options
7823
7992
  return env2;
7824
7993
  };
7825
7994
 
7826
- // node_modules/execa/lib/terminate/kill.js
7995
+ // ../../node_modules/execa/lib/terminate/kill.js
7827
7996
  var import_promises = require("node:timers/promises");
7828
7997
 
7829
- // node_modules/execa/lib/return/final-error.js
7998
+ // ../../node_modules/execa/lib/return/final-error.js
7830
7999
  var getFinalError = (originalError, message, isSync) => {
7831
8000
  const ErrorClass = isSync ? ExecaSyncError : ExecaError;
7832
8001
  const options = originalError instanceof DiscardedError ? {} : { cause: originalError };
@@ -7858,13 +8027,13 @@ var ExecaSyncError = class extends Error {
7858
8027
  };
7859
8028
  setErrorName(ExecaSyncError, ExecaSyncError.name);
7860
8029
 
7861
- // node_modules/execa/lib/terminate/signal.js
8030
+ // ../../node_modules/execa/lib/terminate/signal.js
7862
8031
  var import_node_os4 = require("node:os");
7863
8032
 
7864
- // node_modules/human-signals/build/src/main.js
8033
+ // ../../node_modules/human-signals/build/src/main.js
7865
8034
  var import_node_os3 = require("node:os");
7866
8035
 
7867
- // node_modules/human-signals/build/src/realtime.js
8036
+ // ../../node_modules/human-signals/build/src/realtime.js
7868
8037
  var getRealtimeSignals = () => {
7869
8038
  const length = SIGRTMAX - SIGRTMIN + 1;
7870
8039
  return Array.from({ length }, getRealtimeSignal);
@@ -7879,10 +8048,10 @@ var getRealtimeSignal = (value, index) => ({
7879
8048
  var SIGRTMIN = 34;
7880
8049
  var SIGRTMAX = 64;
7881
8050
 
7882
- // node_modules/human-signals/build/src/signals.js
8051
+ // ../../node_modules/human-signals/build/src/signals.js
7883
8052
  var import_node_os2 = require("node:os");
7884
8053
 
7885
- // node_modules/human-signals/build/src/core.js
8054
+ // ../../node_modules/human-signals/build/src/core.js
7886
8055
  var SIGNALS = [
7887
8056
  {
7888
8057
  name: "SIGHUP",
@@ -8155,7 +8324,7 @@ var SIGNALS = [
8155
8324
  }
8156
8325
  ];
8157
8326
 
8158
- // node_modules/human-signals/build/src/signals.js
8327
+ // ../../node_modules/human-signals/build/src/signals.js
8159
8328
  var getSignals = () => {
8160
8329
  const realtimeSignals = getRealtimeSignals();
8161
8330
  const signals2 = [...SIGNALS, ...realtimeSignals].map(normalizeSignal);
@@ -8177,7 +8346,7 @@ var normalizeSignal = ({
8177
8346
  return { name, number, description, supported, action, forced, standard };
8178
8347
  };
8179
8348
 
8180
- // node_modules/human-signals/build/src/main.js
8349
+ // ../../node_modules/human-signals/build/src/main.js
8181
8350
  var getSignalsByName = () => {
8182
8351
  const signals2 = getSignals();
8183
8352
  return Object.fromEntries(signals2.map(getSignalByName));
@@ -8228,7 +8397,7 @@ var findSignalByNumber = (number, signals2) => {
8228
8397
  };
8229
8398
  var signalsByNumber = getSignalsByNumber();
8230
8399
 
8231
- // node_modules/execa/lib/terminate/signal.js
8400
+ // ../../node_modules/execa/lib/terminate/signal.js
8232
8401
  var normalizeKillSignal = (killSignal) => {
8233
8402
  const optionName = "option `killSignal`";
8234
8403
  if (killSignal === 0) {
@@ -8272,7 +8441,7 @@ var getAvailableSignalNames = () => Object.keys(import_node_os4.constants.signal
8272
8441
  var getAvailableSignalIntegers = () => [...new Set(Object.values(import_node_os4.constants.signals).sort((signalInteger, signalIntegerTwo) => signalInteger - signalIntegerTwo))].join(", ");
8273
8442
  var getSignalDescription = (signal) => signalsByName[signal].description;
8274
8443
 
8275
- // node_modules/execa/lib/terminate/kill.js
8444
+ // ../../node_modules/execa/lib/terminate/kill.js
8276
8445
  var normalizeForceKillAfterDelay = (forceKillAfterDelay) => {
8277
8446
  if (forceKillAfterDelay === false) {
8278
8447
  return forceKillAfterDelay;
@@ -8339,7 +8508,7 @@ var killOnTimeout = async ({ kill, forceKillAfterDelay, context, controllerSigna
8339
8508
  }
8340
8509
  };
8341
8510
 
8342
- // node_modules/execa/lib/utils/abort-signal.js
8511
+ // ../../node_modules/execa/lib/utils/abort-signal.js
8343
8512
  var import_node_events = require("node:events");
8344
8513
  var onAbortedSignal = async (mainSignal, stopSignal) => {
8345
8514
  if (!mainSignal.aborted) {
@@ -8347,7 +8516,7 @@ var onAbortedSignal = async (mainSignal, stopSignal) => {
8347
8516
  }
8348
8517
  };
8349
8518
 
8350
- // node_modules/execa/lib/terminate/cancel.js
8519
+ // ../../node_modules/execa/lib/terminate/cancel.js
8351
8520
  var validateCancelSignal = ({ cancelSignal }) => {
8352
8521
  if (cancelSignal !== void 0 && Object.prototype.toString.call(cancelSignal) !== "[object AbortSignal]") {
8353
8522
  throw new Error(`The \`cancelSignal\` option must be an AbortSignal: ${String(cancelSignal)}`);
@@ -8361,13 +8530,13 @@ var terminateOnCancel = async (subprocess, cancelSignal, context, { signal }) =>
8361
8530
  throw cancelSignal.reason;
8362
8531
  };
8363
8532
 
8364
- // node_modules/execa/lib/ipc/graceful.js
8533
+ // ../../node_modules/execa/lib/ipc/graceful.js
8365
8534
  var import_promises3 = require("node:timers/promises");
8366
8535
 
8367
- // node_modules/execa/lib/ipc/send.js
8536
+ // ../../node_modules/execa/lib/ipc/send.js
8368
8537
  var import_node_util5 = require("node:util");
8369
8538
 
8370
- // node_modules/execa/lib/ipc/validation.js
8539
+ // ../../node_modules/execa/lib/ipc/validation.js
8371
8540
  var validateIpcMethod = ({ methodName, isSubprocess, ipc, isConnected: isConnected2 }) => {
8372
8541
  validateIpcOption(methodName, isSubprocess, ipc);
8373
8542
  validateConnection(methodName, isSubprocess, isConnected2);
@@ -8439,7 +8608,7 @@ var disconnect = (anyProcess) => {
8439
8608
  }
8440
8609
  };
8441
8610
 
8442
- // node_modules/execa/lib/utils/deferred.js
8611
+ // ../../node_modules/execa/lib/utils/deferred.js
8443
8612
  var createDeferred = () => {
8444
8613
  const methods = {};
8445
8614
  const promise = new Promise((resolve, reject) => {
@@ -8448,7 +8617,7 @@ var createDeferred = () => {
8448
8617
  return Object.assign(promise, methods);
8449
8618
  };
8450
8619
 
8451
- // node_modules/execa/lib/arguments/fd-options.js
8620
+ // ../../node_modules/execa/lib/arguments/fd-options.js
8452
8621
  var getToStream = (destination, to = "stdin") => {
8453
8622
  const isWritable = true;
8454
8623
  const { options, fileDescriptors } = SUBPROCESS_OPTIONS.get(destination);
@@ -8528,10 +8697,10 @@ var serializeOptionValue = (value) => {
8528
8697
  return typeof value === "number" ? `${value}` : "Stream";
8529
8698
  };
8530
8699
 
8531
- // node_modules/execa/lib/ipc/strict.js
8700
+ // ../../node_modules/execa/lib/ipc/strict.js
8532
8701
  var import_node_events5 = require("node:events");
8533
8702
 
8534
- // node_modules/execa/lib/utils/max-listeners.js
8703
+ // ../../node_modules/execa/lib/utils/max-listeners.js
8535
8704
  var import_node_events2 = require("node:events");
8536
8705
  var incrementMaxListeners = (eventEmitter, maxListenersIncrement, signal) => {
8537
8706
  const maxListeners = eventEmitter.getMaxListeners();
@@ -8544,14 +8713,14 @@ var incrementMaxListeners = (eventEmitter, maxListenersIncrement, signal) => {
8544
8713
  });
8545
8714
  };
8546
8715
 
8547
- // node_modules/execa/lib/ipc/forward.js
8716
+ // ../../node_modules/execa/lib/ipc/forward.js
8548
8717
  var import_node_events4 = require("node:events");
8549
8718
 
8550
- // node_modules/execa/lib/ipc/incoming.js
8719
+ // ../../node_modules/execa/lib/ipc/incoming.js
8551
8720
  var import_node_events3 = require("node:events");
8552
8721
  var import_promises2 = require("node:timers/promises");
8553
8722
 
8554
- // node_modules/execa/lib/ipc/reference.js
8723
+ // ../../node_modules/execa/lib/ipc/reference.js
8555
8724
  var addReference = (channel, reference) => {
8556
8725
  if (reference) {
8557
8726
  addReferenceCount(channel);
@@ -8581,7 +8750,7 @@ var redoAddedReferences = (channel, isSubprocess) => {
8581
8750
  }
8582
8751
  };
8583
8752
 
8584
- // node_modules/execa/lib/ipc/incoming.js
8753
+ // ../../node_modules/execa/lib/ipc/incoming.js
8585
8754
  var onMessage = async ({ anyProcess, channel, isSubprocess, ipcEmitter }, wrappedMessage) => {
8586
8755
  if (handleStrictResponse(wrappedMessage) || handleAbort(wrappedMessage)) {
8587
8756
  return;
@@ -8622,7 +8791,7 @@ var onDisconnect = async ({ anyProcess, channel, isSubprocess, ipcEmitter, bound
8622
8791
  };
8623
8792
  var INCOMING_MESSAGES = /* @__PURE__ */ new WeakMap();
8624
8793
 
8625
- // node_modules/execa/lib/ipc/forward.js
8794
+ // ../../node_modules/execa/lib/ipc/forward.js
8626
8795
  var getIpcEmitter = (anyProcess, channel, isSubprocess) => {
8627
8796
  if (IPC_EMITTERS.has(anyProcess)) {
8628
8797
  return IPC_EMITTERS.get(anyProcess);
@@ -8661,7 +8830,7 @@ var isConnected = (anyProcess) => {
8661
8830
  return ipcEmitter === void 0 ? anyProcess.channel !== null : ipcEmitter.connected;
8662
8831
  };
8663
8832
 
8664
- // node_modules/execa/lib/ipc/strict.js
8833
+ // ../../node_modules/execa/lib/ipc/strict.js
8665
8834
  var handleSendStrict = ({ anyProcess, channel, isSubprocess, message, strict }) => {
8666
8835
  if (!strict) {
8667
8836
  return message;
@@ -8744,7 +8913,7 @@ var throwOnDisconnect = async (anyProcess, isSubprocess, { signal }) => {
8744
8913
  var REQUEST_TYPE = "execa:ipc:request";
8745
8914
  var RESPONSE_TYPE = "execa:ipc:response";
8746
8915
 
8747
- // node_modules/execa/lib/ipc/outgoing.js
8916
+ // ../../node_modules/execa/lib/ipc/outgoing.js
8748
8917
  var startSendMessage = (anyProcess, wrappedMessage, strict) => {
8749
8918
  if (!OUTGOING_MESSAGES.has(anyProcess)) {
8750
8919
  OUTGOING_MESSAGES.set(anyProcess, /* @__PURE__ */ new Set());
@@ -8771,7 +8940,7 @@ var OUTGOING_MESSAGES = /* @__PURE__ */ new WeakMap();
8771
8940
  var hasMessageListeners = (anyProcess, ipcEmitter) => ipcEmitter.listenerCount("message") > getMinListenerCount(anyProcess);
8772
8941
  var getMinListenerCount = (anyProcess) => SUBPROCESS_OPTIONS.has(anyProcess) && !getFdSpecificValue(SUBPROCESS_OPTIONS.get(anyProcess).options.buffer, "ipc") ? 1 : 0;
8773
8942
 
8774
- // node_modules/execa/lib/ipc/send.js
8943
+ // ../../node_modules/execa/lib/ipc/send.js
8775
8944
  var sendMessage = ({ anyProcess, channel, isSubprocess, ipc }, message, { strict = false } = {}) => {
8776
8945
  const methodName = "sendMessage";
8777
8946
  validateIpcMethod({
@@ -8841,7 +9010,7 @@ var getSendMethod = (anyProcess) => {
8841
9010
  };
8842
9011
  var PROCESS_SEND_METHODS = /* @__PURE__ */ new WeakMap();
8843
9012
 
8844
- // node_modules/execa/lib/ipc/graceful.js
9013
+ // ../../node_modules/execa/lib/ipc/graceful.js
8845
9014
  var sendAbort = (subprocess, message) => {
8846
9015
  const methodName = "cancelSignal";
8847
9016
  validateConnection(methodName, false, subprocess.connected);
@@ -8892,7 +9061,7 @@ var abortOnDisconnect = () => {
8892
9061
  };
8893
9062
  var cancelController = new AbortController();
8894
9063
 
8895
- // node_modules/execa/lib/terminate/graceful.js
9064
+ // ../../node_modules/execa/lib/terminate/graceful.js
8896
9065
  var validateGracefulCancel = ({ gracefulCancel, cancelSignal, ipc, serialization }) => {
8897
9066
  if (!gracefulCancel) {
8898
9067
  return;
@@ -8948,7 +9117,7 @@ var getReason = ({ reason }) => {
8948
9117
  return error;
8949
9118
  };
8950
9119
 
8951
- // node_modules/execa/lib/terminate/timeout.js
9120
+ // ../../node_modules/execa/lib/terminate/timeout.js
8952
9121
  var import_promises4 = require("node:timers/promises");
8953
9122
  var validateTimeout = ({ timeout }) => {
8954
9123
  if (timeout !== void 0 && (!Number.isFinite(timeout) || timeout < 0)) {
@@ -8963,7 +9132,7 @@ var killAfterTimeout = async (subprocess, timeout, context, { signal }) => {
8963
9132
  throw new DiscardedError();
8964
9133
  };
8965
9134
 
8966
- // node_modules/execa/lib/methods/node.js
9135
+ // ../../node_modules/execa/lib/methods/node.js
8967
9136
  var import_node_process7 = require("node:process");
8968
9137
  var import_node_path3 = __toESM(require("node:path"), 1);
8969
9138
  var mapNode = ({ options }) => {
@@ -9004,7 +9173,7 @@ var handleNodeOption = (file, commandArguments, {
9004
9173
  ];
9005
9174
  };
9006
9175
 
9007
- // node_modules/execa/lib/ipc/ipc-input.js
9176
+ // ../../node_modules/execa/lib/ipc/ipc-input.js
9008
9177
  var import_node_v8 = require("node:v8");
9009
9178
  var validateIpcInputOption = ({ ipcInput, ipc, serialization }) => {
9010
9179
  if (ipcInput === void 0) {
@@ -9040,7 +9209,7 @@ var sendIpcInput = async (subprocess, ipcInput) => {
9040
9209
  await subprocess.sendMessage(ipcInput);
9041
9210
  };
9042
9211
 
9043
- // node_modules/execa/lib/arguments/encoding-option.js
9212
+ // ../../node_modules/execa/lib/arguments/encoding-option.js
9044
9213
  var validateEncoding = ({ encoding }) => {
9045
9214
  if (ENCODINGS.has(encoding)) {
9046
9215
  return;
@@ -9082,7 +9251,7 @@ var ENCODING_ALIASES = {
9082
9251
  };
9083
9252
  var serializeEncoding = (encoding) => typeof encoding === "string" ? `"${encoding}"` : String(encoding);
9084
9253
 
9085
- // node_modules/execa/lib/arguments/cwd.js
9254
+ // ../../node_modules/execa/lib/arguments/cwd.js
9086
9255
  var import_node_fs = require("node:fs");
9087
9256
  var import_node_path4 = __toESM(require("node:path"), 1);
9088
9257
  var import_node_process8 = __toESM(require("node:process"), 1);
@@ -9118,7 +9287,7 @@ ${originalMessage}`;
9118
9287
  return originalMessage;
9119
9288
  };
9120
9289
 
9121
- // node_modules/execa/lib/arguments/options.js
9290
+ // ../../node_modules/execa/lib/arguments/options.js
9122
9291
  var normalizeOptions = (filePath, rawArguments, rawOptions) => {
9123
9292
  rawOptions.cwd = normalizeCwd(rawOptions.cwd);
9124
9293
  const [processedFile, processedArguments, processedOptions] = handleNodeOption(filePath, rawArguments, rawOptions);
@@ -9189,13 +9358,13 @@ var getEnv = ({ env: envOption, extendEnv, preferLocal, node, localDirectory, no
9189
9358
  return env2;
9190
9359
  };
9191
9360
 
9192
- // node_modules/execa/lib/arguments/shell.js
9361
+ // ../../node_modules/execa/lib/arguments/shell.js
9193
9362
  var concatenateShell = (file, commandArguments, options) => options.shell && commandArguments.length > 0 ? [[file, ...commandArguments].join(" "), [], options] : [file, commandArguments, options];
9194
9363
 
9195
- // node_modules/execa/lib/return/message.js
9364
+ // ../../node_modules/execa/lib/return/message.js
9196
9365
  var import_node_util6 = require("node:util");
9197
9366
 
9198
- // node_modules/strip-final-newline/index.js
9367
+ // ../../node_modules/strip-final-newline/index.js
9199
9368
  function stripFinalNewline(input) {
9200
9369
  if (typeof input === "string") {
9201
9370
  return stripFinalNewlineString(input);
@@ -9212,11 +9381,11 @@ var LF_BINARY = LF.codePointAt(0);
9212
9381
  var CR = "\r";
9213
9382
  var CR_BINARY = CR.codePointAt(0);
9214
9383
 
9215
- // node_modules/get-stream/source/index.js
9384
+ // ../../node_modules/get-stream/source/index.js
9216
9385
  var import_node_events6 = require("node:events");
9217
9386
  var import_promises5 = require("node:stream/promises");
9218
9387
 
9219
- // node_modules/is-stream/index.js
9388
+ // ../../node_modules/is-stream/index.js
9220
9389
  function isStream(stream, { checkOpen = true } = {}) {
9221
9390
  return stream !== null && typeof stream === "object" && (stream.writable || stream.readable || !checkOpen || stream.writable === void 0 && stream.readable === void 0) && typeof stream.pipe === "function";
9222
9391
  }
@@ -9230,7 +9399,7 @@ function isDuplexStream(stream, options) {
9230
9399
  return isWritableStream(stream, options) && isReadableStream(stream, options);
9231
9400
  }
9232
9401
 
9233
- // node_modules/@sec-ant/readable-stream/dist/ponyfill/asyncIterator.js
9402
+ // ../../node_modules/@sec-ant/readable-stream/dist/ponyfill/asyncIterator.js
9234
9403
  var a = Object.getPrototypeOf(
9235
9404
  Object.getPrototypeOf(
9236
9405
  /* istanbul ignore next */
@@ -9318,7 +9487,7 @@ function h({ preventCancel: r = false } = {}) {
9318
9487
  return s[n] = t, s;
9319
9488
  }
9320
9489
 
9321
- // node_modules/get-stream/source/stream.js
9490
+ // ../../node_modules/get-stream/source/stream.js
9322
9491
  var getAsyncIterable = (stream) => {
9323
9492
  if (isReadableStream(stream, { checkOpen: false }) && nodeImports.on !== void 0) {
9324
9493
  return getStreamIterable(stream);
@@ -9366,7 +9535,7 @@ var handleStreamEnd = async (stream, controller, state) => {
9366
9535
  };
9367
9536
  var nodeImports = {};
9368
9537
 
9369
- // node_modules/get-stream/source/contents.js
9538
+ // ../../node_modules/get-stream/source/contents.js
9370
9539
  var getStreamContents = async (stream, { init, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize }, { maxBuffer = Number.POSITIVE_INFINITY } = {}) => {
9371
9540
  const asyncIterable = getAsyncIterable(stream);
9372
9541
  const state = init();
@@ -9461,7 +9630,7 @@ var MaxBufferError = class extends Error {
9461
9630
  }
9462
9631
  };
9463
9632
 
9464
- // node_modules/get-stream/source/utils.js
9633
+ // ../../node_modules/get-stream/source/utils.js
9465
9634
  var identity2 = (value) => value;
9466
9635
  var noop = () => void 0;
9467
9636
  var getContentsProperty = ({ contents }) => contents;
@@ -9470,7 +9639,7 @@ var throwObjectStream = (chunk) => {
9470
9639
  };
9471
9640
  var getLengthProperty = (convertedChunk) => convertedChunk.length;
9472
9641
 
9473
- // node_modules/get-stream/source/array.js
9642
+ // ../../node_modules/get-stream/source/array.js
9474
9643
  async function getStreamAsArray(stream, options) {
9475
9644
  return getStreamContents(stream, arrayMethods, options);
9476
9645
  }
@@ -9497,7 +9666,7 @@ var arrayMethods = {
9497
9666
  finalize: getContentsProperty
9498
9667
  };
9499
9668
 
9500
- // node_modules/get-stream/source/array-buffer.js
9669
+ // ../../node_modules/get-stream/source/array-buffer.js
9501
9670
  async function getStreamAsArrayBuffer(stream, options) {
9502
9671
  return getStreamContents(stream, arrayBufferMethods, options);
9503
9672
  }
@@ -9550,7 +9719,7 @@ var arrayBufferMethods = {
9550
9719
  finalize: finalizeArrayBuffer
9551
9720
  };
9552
9721
 
9553
- // node_modules/get-stream/source/string.js
9722
+ // ../../node_modules/get-stream/source/string.js
9554
9723
  async function getStreamAsString(stream, options) {
9555
9724
  return getStreamContents(stream, stringMethods, options);
9556
9725
  }
@@ -9579,10 +9748,10 @@ var stringMethods = {
9579
9748
  finalize: getContentsProperty
9580
9749
  };
9581
9750
 
9582
- // node_modules/get-stream/source/index.js
9751
+ // ../../node_modules/get-stream/source/index.js
9583
9752
  Object.assign(nodeImports, { on: import_node_events6.on, finished: import_promises5.finished });
9584
9753
 
9585
- // node_modules/execa/lib/io/max-buffer.js
9754
+ // ../../node_modules/execa/lib/io/max-buffer.js
9586
9755
  var handleMaxBuffer = ({ error, stream, readableObjectMode, lines, encoding, fdNumber }) => {
9587
9756
  if (!(error instanceof MaxBufferError)) {
9588
9757
  throw error;
@@ -9641,7 +9810,7 @@ var truncateMaxBufferSync = (result, isMaxBuffer, maxBuffer) => {
9641
9810
  };
9642
9811
  var getMaxBufferSync = ([, stdoutMaxBuffer]) => stdoutMaxBuffer;
9643
9812
 
9644
- // node_modules/execa/lib/return/message.js
9813
+ // ../../node_modules/execa/lib/return/message.js
9645
9814
  var createMessages = ({
9646
9815
  stdio,
9647
9816
  all,
@@ -9759,7 +9928,7 @@ var serializeMessageItem = (messageItem) => {
9759
9928
  return "";
9760
9929
  };
9761
9930
 
9762
- // node_modules/execa/lib/return/result.js
9931
+ // ../../node_modules/execa/lib/return/result.js
9763
9932
  var makeSuccessResult = ({
9764
9933
  command,
9765
9934
  escapedCommand,
@@ -9932,7 +10101,7 @@ var normalizeExitPayload = (rawExitCode, rawSignal) => {
9932
10101
  return { exitCode, signal, signalDescription };
9933
10102
  };
9934
10103
 
9935
- // node_modules/parse-ms/index.js
10104
+ // ../../node_modules/parse-ms/index.js
9936
10105
  var toZeroIfInfinity = (value) => Number.isFinite(value) ? value : 0;
9937
10106
  function parseNumber(milliseconds) {
9938
10107
  return {
@@ -9971,7 +10140,7 @@ function parseMilliseconds(milliseconds) {
9971
10140
  throw new TypeError("Expected a finite number or bigint");
9972
10141
  }
9973
10142
 
9974
- // node_modules/pretty-ms/index.js
10143
+ // ../../node_modules/pretty-ms/index.js
9975
10144
  var isZero = (value) => value === 0 || value === 0n;
9976
10145
  var pluralize = (word, count2) => count2 === 1 || count2 === 1n ? word : `${word}s`;
9977
10146
  var SECOND_ROUNDING_EPSILON = 1e-7;
@@ -10070,7 +10239,7 @@ function prettyMilliseconds(milliseconds, options) {
10070
10239
  return sign + result.join(separator);
10071
10240
  }
10072
10241
 
10073
- // node_modules/execa/lib/verbose/error.js
10242
+ // ../../node_modules/execa/lib/verbose/error.js
10074
10243
  var logError = (result, verboseInfo) => {
10075
10244
  if (result.failed) {
10076
10245
  verboseLog({
@@ -10082,7 +10251,7 @@ var logError = (result, verboseInfo) => {
10082
10251
  }
10083
10252
  };
10084
10253
 
10085
- // node_modules/execa/lib/verbose/complete.js
10254
+ // ../../node_modules/execa/lib/verbose/complete.js
10086
10255
  var logResult = (result, verboseInfo) => {
10087
10256
  if (!isVerbose(verboseInfo)) {
10088
10257
  return;
@@ -10100,7 +10269,7 @@ var logDuration = (result, verboseInfo) => {
10100
10269
  });
10101
10270
  };
10102
10271
 
10103
- // node_modules/execa/lib/return/reject.js
10272
+ // ../../node_modules/execa/lib/return/reject.js
10104
10273
  var handleResult = (result, verboseInfo, { reject }) => {
10105
10274
  logResult(result, verboseInfo);
10106
10275
  if (result.failed && reject) {
@@ -10109,10 +10278,10 @@ var handleResult = (result, verboseInfo, { reject }) => {
10109
10278
  return result;
10110
10279
  };
10111
10280
 
10112
- // node_modules/execa/lib/stdio/handle-sync.js
10281
+ // ../../node_modules/execa/lib/stdio/handle-sync.js
10113
10282
  var import_node_fs3 = require("node:fs");
10114
10283
 
10115
- // node_modules/execa/lib/stdio/type.js
10284
+ // ../../node_modules/execa/lib/stdio/type.js
10116
10285
  var getStdioItemType = (value, optionName) => {
10117
10286
  if (isAsyncGenerator(value)) {
10118
10287
  return "asyncGenerator";
@@ -10238,7 +10407,7 @@ var TYPE_TO_MESSAGE = {
10238
10407
  uint8Array: "a Uint8Array"
10239
10408
  };
10240
10409
 
10241
- // node_modules/execa/lib/transform/object-mode.js
10410
+ // ../../node_modules/execa/lib/transform/object-mode.js
10242
10411
  var getTransformObjectModes = (objectMode, index, newTransforms, direction) => direction === "output" ? getOutputObjectModes(objectMode, index, newTransforms) : getInputObjectModes(objectMode, index, newTransforms);
10243
10412
  var getOutputObjectModes = (objectMode, index, newTransforms) => {
10244
10413
  const writableObjectMode = index !== 0 && newTransforms[index - 1].value.readableObjectMode;
@@ -10258,7 +10427,7 @@ var getFdObjectMode = (stdioItems, direction) => {
10258
10427
  return direction === "input" ? lastTransform.value.writableObjectMode : lastTransform.value.readableObjectMode;
10259
10428
  };
10260
10429
 
10261
- // node_modules/execa/lib/transform/normalize.js
10430
+ // ../../node_modules/execa/lib/transform/normalize.js
10262
10431
  var normalizeTransforms = (stdioItems, optionName, direction, options) => [
10263
10432
  ...stdioItems.filter(({ type }) => !TRANSFORM_TYPES.has(type)),
10264
10433
  ...getTransforms(stdioItems, optionName, direction, options)
@@ -10352,7 +10521,7 @@ var normalizeGenerator = ({ stdioItem, stdioItem: { value }, index, newTransform
10352
10521
  };
10353
10522
  var sortTransforms = (newTransforms, direction) => direction === "input" ? newTransforms.reverse() : newTransforms;
10354
10523
 
10355
- // node_modules/execa/lib/stdio/direction.js
10524
+ // ../../node_modules/execa/lib/stdio/direction.js
10356
10525
  var import_node_process10 = __toESM(require("node:process"), 1);
10357
10526
  var getStreamDirection = (stdioItems, fdNumber, optionName) => {
10358
10527
  const directions = stdioItems.map((stdioItem) => getStdioItemDirection(stdioItem, fdNumber));
@@ -10402,10 +10571,10 @@ var getStandardStreamDirection = (value) => {
10402
10571
  };
10403
10572
  var DEFAULT_DIRECTION = "output";
10404
10573
 
10405
- // node_modules/execa/lib/ipc/array.js
10574
+ // ../../node_modules/execa/lib/ipc/array.js
10406
10575
  var normalizeIpcStdioArray = (stdioArray, ipc) => ipc && !stdioArray.includes("ipc") ? [...stdioArray, "ipc"] : stdioArray;
10407
10576
 
10408
- // node_modules/execa/lib/stdio/stdio-option.js
10577
+ // ../../node_modules/execa/lib/stdio/stdio-option.js
10409
10578
  var normalizeStdioOption = ({ stdio, ipc, buffer, ...options }, verboseInfo, isSync) => {
10410
10579
  const stdioArray = getStdioArray(stdio, options).map((stdioOption, fdNumber) => addDefaultValue2(stdioOption, fdNumber));
10411
10580
  return isSync ? normalizeStdioSync(stdioArray, buffer, verboseInfo) : normalizeIpcStdioArray(stdioArray, ipc);
@@ -10439,7 +10608,7 @@ var addDefaultValue2 = (stdioOption, fdNumber) => {
10439
10608
  var normalizeStdioSync = (stdioArray, buffer, verboseInfo) => stdioArray.map((stdioOption, fdNumber) => !buffer[fdNumber] && fdNumber !== 0 && !isFullVerbose(verboseInfo, fdNumber) && isOutputPipeOnly(stdioOption) ? "ignore" : stdioOption);
10440
10609
  var isOutputPipeOnly = (stdioOption) => stdioOption === "pipe" || Array.isArray(stdioOption) && stdioOption.every((item) => item === "pipe");
10441
10610
 
10442
- // node_modules/execa/lib/stdio/native.js
10611
+ // ../../node_modules/execa/lib/stdio/native.js
10443
10612
  var import_node_fs2 = require("node:fs");
10444
10613
  var import_node_tty3 = __toESM(require("node:tty"), 1);
10445
10614
  var handleNativeStream = ({ stdioItem, stdioItem: { type }, isStdioArray, fdNumber, direction, isSync }) => {
@@ -10508,7 +10677,7 @@ var getStandardStream = (fdNumber, value, optionName) => {
10508
10677
  return standardStream;
10509
10678
  };
10510
10679
 
10511
- // node_modules/execa/lib/stdio/input-option.js
10680
+ // ../../node_modules/execa/lib/stdio/input-option.js
10512
10681
  var handleInputOptions = ({ input, inputFile }, fdNumber) => fdNumber === 0 ? [
10513
10682
  ...handleInputOption(input),
10514
10683
  ...handleInputFileOption(inputFile)
@@ -10544,7 +10713,7 @@ var getInputFileType = (inputFile) => {
10544
10713
  throw new Error("The `inputFile` option must be a file path string or a file URL.");
10545
10714
  };
10546
10715
 
10547
- // node_modules/execa/lib/stdio/duplicate.js
10716
+ // ../../node_modules/execa/lib/stdio/duplicate.js
10548
10717
  var filterDuplicates = (stdioItems) => stdioItems.filter((stdioItemOne, indexOne) => stdioItems.every((stdioItemTwo, indexTwo) => stdioItemOne.value !== stdioItemTwo.value || indexOne >= indexTwo || stdioItemOne.type === "generator" || stdioItemOne.type === "asyncGenerator"));
10549
10718
  var getDuplicateStream = ({ stdioItem: { type, value, optionName }, direction, fileDescriptors, isSync }) => {
10550
10719
  const otherStdioItems = getOtherStdioItems(fileDescriptors, type);
@@ -10619,7 +10788,7 @@ var throwOnDuplicateStream = (stdioItem, optionName, type) => {
10619
10788
  }
10620
10789
  };
10621
10790
 
10622
- // node_modules/execa/lib/stdio/handle.js
10791
+ // ../../node_modules/execa/lib/stdio/handle.js
10623
10792
  var handleStdio = (addProperties3, options, verboseInfo, isSync) => {
10624
10793
  const stdio = normalizeStdioOption(options, verboseInfo, isSync);
10625
10794
  const initialFileDescriptors = stdio.map((stdioOption, fdNumber) => getFileDescriptor({
@@ -10779,7 +10948,7 @@ var forwardStdio = (stdioItems) => {
10779
10948
  return type === "native" ? value : "pipe";
10780
10949
  };
10781
10950
 
10782
- // node_modules/execa/lib/stdio/handle-sync.js
10951
+ // ../../node_modules/execa/lib/stdio/handle-sync.js
10783
10952
  var handleStdioSync = (options, verboseInfo) => handleStdio(addPropertiesSync, options, verboseInfo, true);
10784
10953
  var forbiddenIfSync = ({ type, optionName }) => {
10785
10954
  throwInvalidSyncValue(optionName, TYPE_TO_MESSAGE[type]);
@@ -10825,14 +10994,14 @@ var addPropertiesSync = {
10825
10994
  }
10826
10995
  };
10827
10996
 
10828
- // node_modules/execa/lib/io/strip-newline.js
10997
+ // ../../node_modules/execa/lib/io/strip-newline.js
10829
10998
  var stripNewline = (value, { stripFinalNewline: stripFinalNewline2 }, fdNumber) => getStripFinalNewline(stripFinalNewline2, fdNumber) && value !== void 0 && !Array.isArray(value) ? stripFinalNewline(value) : value;
10830
10999
  var getStripFinalNewline = (stripFinalNewline2, fdNumber) => fdNumber === "all" ? stripFinalNewline2[1] || stripFinalNewline2[2] : stripFinalNewline2[fdNumber];
10831
11000
 
10832
- // node_modules/execa/lib/transform/generator.js
11001
+ // ../../node_modules/execa/lib/transform/generator.js
10833
11002
  var import_node_stream = require("node:stream");
10834
11003
 
10835
- // node_modules/execa/lib/transform/split.js
11004
+ // ../../node_modules/execa/lib/transform/split.js
10836
11005
  var getSplitLinesGenerator = (binary, preserveNewlines, skipped, state) => binary || skipped ? void 0 : initializeSplitLines(preserveNewlines, state);
10837
11006
  var splitLinesSync = (chunk, preserveNewlines, objectMode) => objectMode ? chunk.flatMap((item) => splitLinesItemSync(item, preserveNewlines)) : splitLinesItemSync(chunk, preserveNewlines);
10838
11007
  var splitLinesItemSync = (chunk, preserveNewlines) => {
@@ -10912,7 +11081,7 @@ var linesUint8ArrayInfo = {
10912
11081
  concatBytes: concatUint8Array
10913
11082
  };
10914
11083
 
10915
- // node_modules/execa/lib/transform/validate.js
11084
+ // ../../node_modules/execa/lib/transform/validate.js
10916
11085
  var import_node_buffer = require("node:buffer");
10917
11086
  var getValidateTransformInput = (writableObjectMode, optionName) => writableObjectMode ? void 0 : validateStringTransformInput.bind(void 0, optionName);
10918
11087
  var validateStringTransformInput = function* (optionName, chunk) {
@@ -10941,7 +11110,7 @@ Instead, \`yield\` should either be called with a value, or not be called at all
10941
11110
  }
10942
11111
  };
10943
11112
 
10944
- // node_modules/execa/lib/transform/encoding-transform.js
11113
+ // ../../node_modules/execa/lib/transform/encoding-transform.js
10945
11114
  var import_node_buffer2 = require("node:buffer");
10946
11115
  var import_node_string_decoder2 = require("node:string_decoder");
10947
11116
  var getEncodingTransformGenerator = (binary, encoding, skipped) => {
@@ -10976,7 +11145,7 @@ var encodingStringFinal = function* (stringDecoder) {
10976
11145
  }
10977
11146
  };
10978
11147
 
10979
- // node_modules/execa/lib/transform/run-async.js
11148
+ // ../../node_modules/execa/lib/transform/run-async.js
10980
11149
  var import_node_util7 = require("node:util");
10981
11150
  var pushChunks = (0, import_node_util7.callbackify)(async (getChunks, state, getChunksArguments, transformStream) => {
10982
11151
  state.currentIterable = getChunks(...getChunksArguments);
@@ -11024,7 +11193,7 @@ var identityGenerator = function* (chunk) {
11024
11193
  yield chunk;
11025
11194
  };
11026
11195
 
11027
- // node_modules/execa/lib/transform/run-sync.js
11196
+ // ../../node_modules/execa/lib/transform/run-sync.js
11028
11197
  var pushChunksSync = (getChunksSync, getChunksArguments, transformStream, done) => {
11029
11198
  try {
11030
11199
  for (const chunk of getChunksSync(...getChunksArguments)) {
@@ -11066,7 +11235,7 @@ var identityGenerator2 = function* (chunk) {
11066
11235
  yield chunk;
11067
11236
  };
11068
11237
 
11069
- // node_modules/execa/lib/transform/generator.js
11238
+ // ../../node_modules/execa/lib/transform/generator.js
11070
11239
  var generatorToStream = ({
11071
11240
  value,
11072
11241
  value: { transform, final, writableObjectMode, readableObjectMode },
@@ -11120,7 +11289,7 @@ var addInternalGenerators = ({ transform, final, binary, writableObjectMode, rea
11120
11289
  ].filter(Boolean);
11121
11290
  };
11122
11291
 
11123
- // node_modules/execa/lib/io/input-sync.js
11292
+ // ../../node_modules/execa/lib/io/input-sync.js
11124
11293
  var addInputOptionsSync = (fileDescriptors, options) => {
11125
11294
  for (const fdNumber of getInputFdNumbers(fileDescriptors)) {
11126
11295
  addInputOptionSync(fileDescriptors, fdNumber, options);
@@ -11153,10 +11322,10 @@ var validateSerializable = (newContents) => {
11153
11322
  }
11154
11323
  };
11155
11324
 
11156
- // node_modules/execa/lib/io/output-sync.js
11325
+ // ../../node_modules/execa/lib/io/output-sync.js
11157
11326
  var import_node_fs4 = require("node:fs");
11158
11327
 
11159
- // node_modules/execa/lib/verbose/output.js
11328
+ // ../../node_modules/execa/lib/verbose/output.js
11160
11329
  var shouldLogOutput = ({ stdioItems, encoding, verboseInfo, fdNumber }) => fdNumber !== "all" && isFullVerbose(verboseInfo, fdNumber) && !BINARY_ENCODINGS.has(encoding) && fdUsesVerbose(fdNumber) && (stdioItems.some(({ type, value }) => type === "native" && PIPED_STDIO_VALUES.has(value)) || stdioItems.every(({ type }) => TRANSFORM_TYPES.has(type)));
11161
11330
  var fdUsesVerbose = (fdNumber) => fdNumber === 1 || fdNumber === 2;
11162
11331
  var PIPED_STDIO_VALUES = /* @__PURE__ */ new Set(["pipe", "overlapped"]);
@@ -11183,7 +11352,7 @@ var logLine = (line, fdNumber, verboseInfo) => {
11183
11352
  });
11184
11353
  };
11185
11354
 
11186
- // node_modules/execa/lib/io/output-sync.js
11355
+ // ../../node_modules/execa/lib/io/output-sync.js
11187
11356
  var transformOutputSync = ({ fileDescriptors, syncResult: { output }, options, isMaxBuffer, verboseInfo }) => {
11188
11357
  if (output === null) {
11189
11358
  return { output: Array.from({ length: 3 }) };
@@ -11286,7 +11455,7 @@ var writeToFiles = (serializedResult, stdioItems, outputFiles) => {
11286
11455
  }
11287
11456
  };
11288
11457
 
11289
- // node_modules/execa/lib/resolve/all-sync.js
11458
+ // ../../node_modules/execa/lib/resolve/all-sync.js
11290
11459
  var getAllSync = ([, stdout, stderr], options) => {
11291
11460
  if (!options.all) {
11292
11461
  return;
@@ -11309,7 +11478,7 @@ var getAllSync = ([, stdout, stderr], options) => {
11309
11478
  return `${stdout}${stderr}`;
11310
11479
  };
11311
11480
 
11312
- // node_modules/execa/lib/resolve/exit-async.js
11481
+ // ../../node_modules/execa/lib/resolve/exit-async.js
11313
11482
  var import_node_events7 = require("node:events");
11314
11483
  var waitForExit = async (subprocess, context) => {
11315
11484
  const [exitCode, signal] = await waitForExitOrError(subprocess);
@@ -11343,7 +11512,7 @@ var waitForSuccessfulExit = async (exitPromise) => {
11343
11512
  var isSubprocessErrorExit = (exitCode, signal) => exitCode === void 0 && signal === void 0;
11344
11513
  var isFailedExit = (exitCode, signal) => exitCode !== 0 || signal !== null;
11345
11514
 
11346
- // node_modules/execa/lib/resolve/exit-sync.js
11515
+ // ../../node_modules/execa/lib/resolve/exit-sync.js
11347
11516
  var getExitResultSync = ({ error, status: exitCode, signal, output }, { maxBuffer }) => {
11348
11517
  const resultError = getResultError(error, exitCode, signal);
11349
11518
  const timedOut = resultError?.code === "ETIMEDOUT";
@@ -11363,7 +11532,7 @@ var getResultError = (error, exitCode, signal) => {
11363
11532
  return isFailedExit(exitCode, signal) ? new DiscardedError() : void 0;
11364
11533
  };
11365
11534
 
11366
- // node_modules/execa/lib/methods/main-sync.js
11535
+ // ../../node_modules/execa/lib/methods/main-sync.js
11367
11536
  var execaCoreSync = (rawFile, rawArguments, rawOptions) => {
11368
11537
  const { file, commandArguments, command, escapedCommand, startTime, verboseInfo, options, fileDescriptors } = handleSyncArguments(rawFile, rawArguments, rawOptions);
11369
11538
  const result = spawnSubprocessSync({
@@ -11495,14 +11664,14 @@ var getSyncResult = ({ error, exitCode, signal, timedOut, isMaxBuffer, stdio, al
11495
11664
  isSync: true
11496
11665
  });
11497
11666
 
11498
- // node_modules/execa/lib/methods/main-async.js
11667
+ // ../../node_modules/execa/lib/methods/main-async.js
11499
11668
  var import_node_events14 = require("node:events");
11500
11669
  var import_node_child_process5 = require("node:child_process");
11501
11670
 
11502
- // node_modules/execa/lib/ipc/methods.js
11671
+ // ../../node_modules/execa/lib/ipc/methods.js
11503
11672
  var import_node_process11 = __toESM(require("node:process"), 1);
11504
11673
 
11505
- // node_modules/execa/lib/ipc/get-one.js
11674
+ // ../../node_modules/execa/lib/ipc/get-one.js
11506
11675
  var import_node_events8 = require("node:events");
11507
11676
  var getOneMessage = ({ anyProcess, channel, isSubprocess, ipc }, { reference = true, filter } = {}) => {
11508
11677
  validateIpcMethod({
@@ -11557,7 +11726,7 @@ var throwOnStrictError = async (ipcEmitter, isSubprocess, { signal }) => {
11557
11726
  throw getStrictResponseError(error, isSubprocess);
11558
11727
  };
11559
11728
 
11560
- // node_modules/execa/lib/ipc/get-each.js
11729
+ // ../../node_modules/execa/lib/ipc/get-each.js
11561
11730
  var import_node_events9 = require("node:events");
11562
11731
  var getEachMessage = ({ anyProcess, channel, isSubprocess, ipc }, { reference = true } = {}) => loopOnMessages({
11563
11732
  anyProcess,
@@ -11636,7 +11805,7 @@ var throwIfStrictError = ({ error }) => {
11636
11805
  }
11637
11806
  };
11638
11807
 
11639
- // node_modules/execa/lib/ipc/methods.js
11808
+ // ../../node_modules/execa/lib/ipc/methods.js
11640
11809
  var addIpcMethods = (subprocess, { ipc }) => {
11641
11810
  Object.assign(subprocess, getIpcMethods(subprocess, false, ipc));
11642
11811
  };
@@ -11675,7 +11844,7 @@ var getIpcMethods = (anyProcess, isSubprocess, ipc) => ({
11675
11844
  })
11676
11845
  });
11677
11846
 
11678
- // node_modules/execa/lib/return/early-error.js
11847
+ // ../../node_modules/execa/lib/return/early-error.js
11679
11848
  var import_node_child_process4 = require("node:child_process");
11680
11849
  var import_node_stream2 = require("node:stream");
11681
11850
  var handleEarlyError = ({ error, command, escapedCommand, fileDescriptors, options, startTime, verboseInfo }) => {
@@ -11724,7 +11893,7 @@ var duplex = () => new import_node_stream2.Duplex({ read() {
11724
11893
  } });
11725
11894
  var handleDummyPromise = async (error, verboseInfo, options) => handleResult(error, verboseInfo, options);
11726
11895
 
11727
- // node_modules/execa/lib/stdio/handle-async.js
11896
+ // ../../node_modules/execa/lib/stdio/handle-async.js
11728
11897
  var import_node_fs5 = require("node:fs");
11729
11898
  var import_node_buffer3 = require("node:buffer");
11730
11899
  var import_node_stream3 = require("node:stream");
@@ -11769,7 +11938,7 @@ var addPropertiesAsync = {
11769
11938
  }
11770
11939
  };
11771
11940
 
11772
- // node_modules/@sindresorhus/merge-streams/index.js
11941
+ // ../../node_modules/execa/node_modules/@sindresorhus/merge-streams/index.js
11773
11942
  var import_node_events10 = require("node:events");
11774
11943
  var import_node_stream4 = require("node:stream");
11775
11944
  var import_promises6 = require("node:stream/promises");
@@ -11986,7 +12155,7 @@ var updateMaxListeners = (passThroughStream, increment2) => {
11986
12155
  var PASSTHROUGH_LISTENERS_COUNT = 2;
11987
12156
  var PASSTHROUGH_LISTENERS_PER_STREAM = 1;
11988
12157
 
11989
- // node_modules/execa/lib/io/pipeline.js
12158
+ // ../../node_modules/execa/lib/io/pipeline.js
11990
12159
  var import_promises7 = require("node:stream/promises");
11991
12160
  var pipeStreams = (source, destination) => {
11992
12161
  source.pipe(destination);
@@ -12024,7 +12193,7 @@ var abortSourceStream = (source) => {
12024
12193
  }
12025
12194
  };
12026
12195
 
12027
- // node_modules/execa/lib/io/output-async.js
12196
+ // ../../node_modules/execa/lib/io/output-async.js
12028
12197
  var pipeOutputAsync = (subprocess, fileDescriptors, controller) => {
12029
12198
  const pipeGroups = /* @__PURE__ */ new Map();
12030
12199
  for (const [fdNumber, { stdioItems, direction }] of Object.entries(fileDescriptors)) {
@@ -12076,10 +12245,10 @@ var setStandardStreamMaxListeners = (stream, { signal }) => {
12076
12245
  };
12077
12246
  var MAX_LISTENERS_INCREMENT = 2;
12078
12247
 
12079
- // node_modules/execa/lib/terminate/cleanup.js
12248
+ // ../../node_modules/execa/lib/terminate/cleanup.js
12080
12249
  var import_node_events11 = require("node:events");
12081
12250
 
12082
- // node_modules/signal-exit/dist/mjs/signals.js
12251
+ // ../../node_modules/signal-exit/dist/mjs/signals.js
12083
12252
  var signals = [];
12084
12253
  signals.push("SIGHUP", "SIGINT", "SIGTERM");
12085
12254
  if (process.platform !== "win32") {
@@ -12103,7 +12272,7 @@ if (process.platform === "linux") {
12103
12272
  signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
12104
12273
  }
12105
12274
 
12106
- // node_modules/signal-exit/dist/mjs/index.js
12275
+ // ../../node_modules/signal-exit/dist/mjs/index.js
12107
12276
  var processOk = (process13) => !!process13 && typeof process13 === "object" && typeof process13.removeListener === "function" && typeof process13.emit === "function" && typeof process13.reallyExit === "function" && typeof process13.listeners === "function" && typeof process13.kill === "function" && typeof process13.pid === "number" && typeof process13.on === "function";
12108
12277
  var kExitEmitter = Symbol.for("signal-exit emitter");
12109
12278
  var global2 = globalThis;
@@ -12330,7 +12499,7 @@ var {
12330
12499
  unload
12331
12500
  } = signalExitWrap(processOk(process10) ? new SignalExit(process10) : new SignalExitFallback());
12332
12501
 
12333
- // node_modules/execa/lib/terminate/cleanup.js
12502
+ // ../../node_modules/execa/lib/terminate/cleanup.js
12334
12503
  var cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
12335
12504
  if (!cleanup || detached) {
12336
12505
  return;
@@ -12343,7 +12512,7 @@ var cleanupOnExit = (subprocess, { cleanup, detached }, { signal }) => {
12343
12512
  });
12344
12513
  };
12345
12514
 
12346
- // node_modules/execa/lib/pipe/pipe-arguments.js
12515
+ // ../../node_modules/execa/lib/pipe/pipe-arguments.js
12347
12516
  var normalizePipeArguments = ({ source, sourcePromise, boundOptions, createNested }, ...pipeArguments) => {
12348
12517
  const startTime = getStartTime();
12349
12518
  const {
@@ -12416,7 +12585,7 @@ var getSourceStream = (source, from) => {
12416
12585
  }
12417
12586
  };
12418
12587
 
12419
- // node_modules/execa/lib/pipe/throw.js
12588
+ // ../../node_modules/execa/lib/pipe/throw.js
12420
12589
  var handlePipeArgumentsError = ({
12421
12590
  sourceStream,
12422
12591
  sourceError,
@@ -12465,7 +12634,7 @@ var createNonCommandError = ({ error, fileDescriptors, sourceOptions, startTime
12465
12634
  });
12466
12635
  var PIPE_COMMAND_MESSAGE = "source.pipe(destination)";
12467
12636
 
12468
- // node_modules/execa/lib/pipe/sequence.js
12637
+ // ../../node_modules/execa/lib/pipe/sequence.js
12469
12638
  var waitForBothSubprocesses = async (subprocessPromises) => {
12470
12639
  const [
12471
12640
  { status: sourceStatus, reason: sourceReason, value: sourceResult = sourceReason },
@@ -12483,7 +12652,7 @@ var waitForBothSubprocesses = async (subprocessPromises) => {
12483
12652
  return destinationResult;
12484
12653
  };
12485
12654
 
12486
- // node_modules/execa/lib/pipe/streaming.js
12655
+ // ../../node_modules/execa/lib/pipe/streaming.js
12487
12656
  var import_promises8 = require("node:stream/promises");
12488
12657
  var pipeSubprocessStream = (sourceStream, destinationStream, maxListenersController) => {
12489
12658
  const mergedStream = MERGED_STREAMS.has(destinationStream) ? pipeMoreSubprocessStream(sourceStream, destinationStream) : pipeFirstSubprocessStream(sourceStream, destinationStream);
@@ -12514,7 +12683,7 @@ var MERGED_STREAMS = /* @__PURE__ */ new WeakMap();
12514
12683
  var SOURCE_LISTENERS_PER_PIPE = 2;
12515
12684
  var DESTINATION_LISTENERS_PER_PIPE = 1;
12516
12685
 
12517
- // node_modules/execa/lib/pipe/abort.js
12686
+ // ../../node_modules/execa/lib/pipe/abort.js
12518
12687
  var import_node_util8 = require("node:util");
12519
12688
  var unpipeOnAbort = (unpipeSignal, unpipeContext) => unpipeSignal === void 0 ? [] : [unpipeOnSignalAbort(unpipeSignal, unpipeContext)];
12520
12689
  var unpipeOnSignalAbort = async (unpipeSignal, { sourceStream, mergedStream, fileDescriptors, sourceOptions, startTime }) => {
@@ -12529,7 +12698,7 @@ var unpipeOnSignalAbort = async (unpipeSignal, { sourceStream, mergedStream, fil
12529
12698
  });
12530
12699
  };
12531
12700
 
12532
- // node_modules/execa/lib/pipe/setup.js
12701
+ // ../../node_modules/execa/lib/pipe/setup.js
12533
12702
  var pipeToSubprocess = (sourceInfo, ...pipeArguments) => {
12534
12703
  if (isPlainObject(pipeArguments[0])) {
12535
12704
  return pipeToSubprocess.bind(void 0, {
@@ -12588,10 +12757,10 @@ var handlePipePromise = async ({
12588
12757
  };
12589
12758
  var getSubprocessPromises = (sourcePromise, destination) => Promise.allSettled([sourcePromise, destination]);
12590
12759
 
12591
- // node_modules/execa/lib/io/contents.js
12760
+ // ../../node_modules/execa/lib/io/contents.js
12592
12761
  var import_promises9 = require("node:timers/promises");
12593
12762
 
12594
- // node_modules/execa/lib/io/iterate.js
12763
+ // ../../node_modules/execa/lib/io/iterate.js
12595
12764
  var import_node_events12 = require("node:events");
12596
12765
  var import_node_stream5 = require("node:stream");
12597
12766
  var iterateOnSubprocessStream = ({ subprocessStdout, subprocess, binary, shouldEncode, encoding, preserveNewlines }) => {
@@ -12684,7 +12853,7 @@ var getGenerators = ({ binary, shouldEncode, encoding, shouldSplit, preserveNewl
12684
12853
  getSplitLinesGenerator(binary, preserveNewlines, !shouldSplit, {})
12685
12854
  ].filter(Boolean);
12686
12855
 
12687
- // node_modules/execa/lib/io/contents.js
12856
+ // ../../node_modules/execa/lib/io/contents.js
12688
12857
  var getStreamOutput = async ({ stream, onStreamEnd, fdNumber, encoding, buffer, maxBuffer, lines, allMixed, stripFinalNewline: stripFinalNewline2, verboseInfo, streamInfo }) => {
12689
12858
  const logPromise = logOutputAsync({
12690
12859
  stream,
@@ -12775,7 +12944,7 @@ var getBufferedData = async (streamPromise) => {
12775
12944
  };
12776
12945
  var handleBufferedData = ({ bufferedData }) => isArrayBuffer(bufferedData) ? new Uint8Array(bufferedData) : bufferedData;
12777
12946
 
12778
- // node_modules/execa/lib/resolve/wait-stream.js
12947
+ // ../../node_modules/execa/lib/resolve/wait-stream.js
12779
12948
  var import_promises10 = require("node:stream/promises");
12780
12949
  var waitForStream = async (stream, fdNumber, streamInfo, { isSameDirection, stopOnExit = false } = {}) => {
12781
12950
  const state = handleStdinDestroy(stream, streamInfo);
@@ -12828,7 +12997,7 @@ var isInputFileDescriptor = ({ fileDescriptors }, fdNumber) => fdNumber !== "all
12828
12997
  var isStreamAbort = (error) => error?.code === "ERR_STREAM_PREMATURE_CLOSE";
12829
12998
  var isStreamEpipe = (error) => error?.code === "EPIPE";
12830
12999
 
12831
- // node_modules/execa/lib/resolve/stdio.js
13000
+ // ../../node_modules/execa/lib/resolve/stdio.js
12832
13001
  var waitForStdioStreams = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline: stripFinalNewline2, verboseInfo, streamInfo }) => subprocess.stdio.map((stream, fdNumber) => waitForSubprocessStream({
12833
13002
  stream,
12834
13003
  fdNumber,
@@ -12869,7 +13038,7 @@ var waitForSubprocessStream = async ({ stream, fdNumber, encoding, buffer, maxBu
12869
13038
  return output;
12870
13039
  };
12871
13040
 
12872
- // node_modules/execa/lib/resolve/all-async.js
13041
+ // ../../node_modules/execa/lib/resolve/all-async.js
12873
13042
  var makeAllStream = ({ stdout, stderr }, { all }) => all && (stdout || stderr) ? mergeStreams([stdout, stderr].filter(Boolean)) : void 0;
12874
13043
  var waitForAllStream = ({ subprocess, encoding, buffer, maxBuffer, lines, stripFinalNewline: stripFinalNewline2, verboseInfo, streamInfo }) => waitForSubprocessStream({
12875
13044
  ...getAllStream(subprocess, buffer),
@@ -12897,10 +13066,10 @@ var getAllStream = ({ stdout, stderr, all }, [, bufferStdout, bufferStderr]) =>
12897
13066
  };
12898
13067
  var getAllMixed = ({ all, stdout, stderr }) => all && stdout && stderr && stdout.readableObjectMode !== stderr.readableObjectMode;
12899
13068
 
12900
- // node_modules/execa/lib/resolve/wait-subprocess.js
13069
+ // ../../node_modules/execa/lib/resolve/wait-subprocess.js
12901
13070
  var import_node_events13 = require("node:events");
12902
13071
 
12903
- // node_modules/execa/lib/verbose/ipc.js
13072
+ // ../../node_modules/execa/lib/verbose/ipc.js
12904
13073
  var shouldLogIpc = (verboseInfo) => isFullVerbose(verboseInfo, "ipc");
12905
13074
  var logIpcOutput = (message, verboseInfo) => {
12906
13075
  const verboseMessage = serializeVerboseMessage(message);
@@ -12912,7 +13081,7 @@ var logIpcOutput = (message, verboseInfo) => {
12912
13081
  });
12913
13082
  };
12914
13083
 
12915
- // node_modules/execa/lib/ipc/buffer-messages.js
13084
+ // ../../node_modules/execa/lib/ipc/buffer-messages.js
12916
13085
  var waitForIpcOutput = async ({
12917
13086
  subprocess,
12918
13087
  buffer: bufferArray,
@@ -12950,7 +13119,7 @@ var getBufferedIpcOutput = async (ipcOutputPromise, ipcOutput) => {
12950
13119
  return ipcOutput;
12951
13120
  };
12952
13121
 
12953
- // node_modules/execa/lib/resolve/wait-subprocess.js
13122
+ // ../../node_modules/execa/lib/resolve/wait-subprocess.js
12954
13123
  var waitForSubprocessResult = async ({
12955
13124
  subprocess,
12956
13125
  options: {
@@ -13066,7 +13235,7 @@ var throwOnSubprocessError = async (subprocess, { signal }) => {
13066
13235
  throw error;
13067
13236
  };
13068
13237
 
13069
- // node_modules/execa/lib/convert/concurrent.js
13238
+ // ../../node_modules/execa/lib/convert/concurrent.js
13070
13239
  var initializeConcurrentStreams = () => ({
13071
13240
  readableDestroy: /* @__PURE__ */ new WeakMap(),
13072
13241
  writableFinal: /* @__PURE__ */ new WeakMap(),
@@ -13092,11 +13261,11 @@ var waitForConcurrentStreams = async ({ resolve, promises }, subprocess) => {
13092
13261
  return !isSubprocessExit;
13093
13262
  };
13094
13263
 
13095
- // node_modules/execa/lib/convert/readable.js
13264
+ // ../../node_modules/execa/lib/convert/readable.js
13096
13265
  var import_node_stream6 = require("node:stream");
13097
13266
  var import_node_util9 = require("node:util");
13098
13267
 
13099
- // node_modules/execa/lib/convert/shared.js
13268
+ // ../../node_modules/execa/lib/convert/shared.js
13100
13269
  var import_promises11 = require("node:stream/promises");
13101
13270
  var safeWaitForSubprocessStdin = async (subprocessStdin) => {
13102
13271
  if (subprocessStdin === void 0) {
@@ -13136,7 +13305,7 @@ var destroyOtherStream = (stream, isOpen, error) => {
13136
13305
  }
13137
13306
  };
13138
13307
 
13139
- // node_modules/execa/lib/convert/readable.js
13308
+ // ../../node_modules/execa/lib/convert/readable.js
13140
13309
  var createReadable = ({ subprocess, concurrentStreams, encoding }, { from, binary: binaryOption = true, preserveNewlines = true } = {}) => {
13141
13310
  const binary = binaryOption || BINARY_ENCODINGS.has(encoding);
13142
13311
  const { subprocessStdout, waitReadableDestroy } = getSubprocessStdout(subprocess, from, concurrentStreams);
@@ -13221,7 +13390,7 @@ var destroyOtherReadable = (stream, error) => {
13221
13390
  destroyOtherStream(stream, stream.readable, error);
13222
13391
  };
13223
13392
 
13224
- // node_modules/execa/lib/convert/writable.js
13393
+ // ../../node_modules/execa/lib/convert/writable.js
13225
13394
  var import_node_stream7 = require("node:stream");
13226
13395
  var import_node_util10 = require("node:util");
13227
13396
  var createWritable = ({ subprocess, concurrentStreams }, { to } = {}) => {
@@ -13287,7 +13456,7 @@ var destroyOtherWritable = (stream, error) => {
13287
13456
  destroyOtherStream(stream, stream.writable, error);
13288
13457
  };
13289
13458
 
13290
- // node_modules/execa/lib/convert/duplex.js
13459
+ // ../../node_modules/execa/lib/convert/duplex.js
13291
13460
  var import_node_stream8 = require("node:stream");
13292
13461
  var import_node_util11 = require("node:util");
13293
13462
  var createDuplex = ({ subprocess, concurrentStreams, encoding }, { from, to, binary: binaryOption = true, preserveNewlines = true } = {}) => {
@@ -13341,7 +13510,7 @@ var onDuplexDestroy = async ({ subprocessStdout, subprocessStdin, subprocess, wa
13341
13510
  ]);
13342
13511
  };
13343
13512
 
13344
- // node_modules/execa/lib/convert/iterable.js
13513
+ // ../../node_modules/execa/lib/convert/iterable.js
13345
13514
  var createIterable = (subprocess, encoding, {
13346
13515
  from,
13347
13516
  binary: binaryOption = false,
@@ -13370,7 +13539,7 @@ var iterateOnStdoutData = async function* (onStdoutData, subprocessStdout, subpr
13370
13539
  }
13371
13540
  };
13372
13541
 
13373
- // node_modules/execa/lib/convert/add.js
13542
+ // ../../node_modules/execa/lib/convert/add.js
13374
13543
  var addConvertedStreams = (subprocess, { encoding }) => {
13375
13544
  const concurrentStreams = initializeConcurrentStreams();
13376
13545
  subprocess.readable = createReadable.bind(void 0, { subprocess, concurrentStreams, encoding });
@@ -13380,7 +13549,7 @@ var addConvertedStreams = (subprocess, { encoding }) => {
13380
13549
  subprocess[Symbol.asyncIterator] = createIterable.bind(void 0, subprocess, encoding, {});
13381
13550
  };
13382
13551
 
13383
- // node_modules/execa/lib/methods/promise.js
13552
+ // ../../node_modules/execa/lib/methods/promise.js
13384
13553
  var mergePromise = (subprocess, promise) => {
13385
13554
  for (const [property, descriptor] of descriptors) {
13386
13555
  const value = descriptor.value.bind(promise);
@@ -13394,7 +13563,7 @@ var descriptors = ["then", "catch", "finally"].map((property) => [
13394
13563
  Reflect.getOwnPropertyDescriptor(nativePromisePrototype, property)
13395
13564
  ]);
13396
13565
 
13397
- // node_modules/execa/lib/methods/main-async.js
13566
+ // ../../node_modules/execa/lib/methods/main-async.js
13398
13567
  var execaCoreAsync = (rawFile, rawArguments, rawOptions, createNested) => {
13399
13568
  const { file, commandArguments, command, escapedCommand, startTime, verboseInfo, options, fileDescriptors } = handleAsyncArguments(rawFile, rawArguments, rawOptions);
13400
13569
  const { subprocess, promise } = spawnSubprocessAsync({
@@ -13549,7 +13718,7 @@ var getAsyncResult = ({ errorInfo, exitCode, signal, stdio, all, ipcOutput, cont
13549
13718
  startTime
13550
13719
  });
13551
13720
 
13552
- // node_modules/execa/lib/methods/bind.js
13721
+ // ../../node_modules/execa/lib/methods/bind.js
13553
13722
  var mergeOptions = (boundOptions, options) => {
13554
13723
  const newOptions = Object.fromEntries(
13555
13724
  Object.entries(options).map(([optionName, optionValue]) => [
@@ -13567,7 +13736,7 @@ var mergeOption = (optionName, boundOptionValue, optionValue) => {
13567
13736
  };
13568
13737
  var DEEP_OPTIONS = /* @__PURE__ */ new Set(["env", ...FD_SPECIFIC_OPTIONS]);
13569
13738
 
13570
- // node_modules/execa/lib/methods/create.js
13739
+ // ../../node_modules/execa/lib/methods/create.js
13571
13740
  var createExeca = (mapArguments, boundOptions, deepOptions, setBoundExeca) => {
13572
13741
  const createNested = (mapArguments2, boundOptions2, setBoundExeca2) => createExeca(mapArguments2, boundOptions2, deepOptions, setBoundExeca2);
13573
13742
  const boundExeca = (...execaArguments) => callBoundExeca({
@@ -13613,7 +13782,7 @@ var parseArguments = ({ mapArguments, firstArgument, nextArguments, deepOptions,
13613
13782
  };
13614
13783
  };
13615
13784
 
13616
- // node_modules/execa/lib/methods/command.js
13785
+ // ../../node_modules/execa/lib/methods/command.js
13617
13786
  var mapCommandAsync = ({ file, commandArguments }) => parseCommand(file, commandArguments);
13618
13787
  var mapCommandSync = ({ file, commandArguments }) => ({ ...parseCommand(file, commandArguments), isSync: true });
13619
13788
  var parseCommand = (command, unusedArguments) => {
@@ -13644,7 +13813,7 @@ var parseCommandString = (command) => {
13644
13813
  };
13645
13814
  var SPACES_REGEXP = / +/g;
13646
13815
 
13647
- // node_modules/execa/lib/methods/script.js
13816
+ // ../../node_modules/execa/lib/methods/script.js
13648
13817
  var setScriptSync = (boundExeca, createNested, boundOptions) => {
13649
13818
  boundExeca.sync = createNested(mapScriptSync, boundOptions);
13650
13819
  boundExeca.s = boundExeca.sync;
@@ -13655,7 +13824,7 @@ var getScriptOptions = (options) => ({ options: { ...getScriptStdinOption(option
13655
13824
  var getScriptStdinOption = ({ input, inputFile, stdio }) => input === void 0 && inputFile === void 0 && stdio === void 0 ? { stdin: "inherit" } : {};
13656
13825
  var deepScriptOptions = { preferLocal: true };
13657
13826
 
13658
- // node_modules/execa/index.js
13827
+ // ../../node_modules/execa/index.js
13659
13828
  var execa = createExeca(() => ({}));
13660
13829
  var execaSync = createExeca(() => ({ isSync: true }));
13661
13830
  var execaCommand = createExeca(mapCommandAsync);