wxt 0.8.6 → 0.8.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.
@@ -505,304 +505,6 @@ var require_cross_spawn = __commonJS({
505
505
  }
506
506
  });
507
507
 
508
- // node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js
509
- var require_signals = __commonJS({
510
- "node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js"(exports, module) {
511
- "use strict";
512
- module.exports = [
513
- "SIGABRT",
514
- "SIGALRM",
515
- "SIGHUP",
516
- "SIGINT",
517
- "SIGTERM"
518
- ];
519
- if (process.platform !== "win32") {
520
- module.exports.push(
521
- "SIGVTALRM",
522
- "SIGXCPU",
523
- "SIGXFSZ",
524
- "SIGUSR2",
525
- "SIGTRAP",
526
- "SIGSYS",
527
- "SIGQUIT",
528
- "SIGIOT"
529
- // should detect profiler and enable/disable accordingly.
530
- // see #21
531
- // 'SIGPROF'
532
- );
533
- }
534
- if (process.platform === "linux") {
535
- module.exports.push(
536
- "SIGIO",
537
- "SIGPOLL",
538
- "SIGPWR",
539
- "SIGSTKFLT",
540
- "SIGUNUSED"
541
- );
542
- }
543
- }
544
- });
545
-
546
- // node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js
547
- var require_signal_exit = __commonJS({
548
- "node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports, module) {
549
- "use strict";
550
- var process6 = global.process;
551
- var processOk = function(process7) {
552
- return process7 && typeof process7 === "object" && typeof process7.removeListener === "function" && typeof process7.emit === "function" && typeof process7.reallyExit === "function" && typeof process7.listeners === "function" && typeof process7.kill === "function" && typeof process7.pid === "number" && typeof process7.on === "function";
553
- };
554
- if (!processOk(process6)) {
555
- module.exports = function() {
556
- return function() {
557
- };
558
- };
559
- } else {
560
- assert = __require("assert");
561
- signals = require_signals();
562
- isWin = /^win/i.test(process6.platform);
563
- EE = __require("events");
564
- if (typeof EE !== "function") {
565
- EE = EE.EventEmitter;
566
- }
567
- if (process6.__signal_exit_emitter__) {
568
- emitter = process6.__signal_exit_emitter__;
569
- } else {
570
- emitter = process6.__signal_exit_emitter__ = new EE();
571
- emitter.count = 0;
572
- emitter.emitted = {};
573
- }
574
- if (!emitter.infinite) {
575
- emitter.setMaxListeners(Infinity);
576
- emitter.infinite = true;
577
- }
578
- module.exports = function(cb, opts) {
579
- if (!processOk(global.process)) {
580
- return function() {
581
- };
582
- }
583
- assert.equal(typeof cb, "function", "a callback must be provided for exit handler");
584
- if (loaded === false) {
585
- load();
586
- }
587
- var ev = "exit";
588
- if (opts && opts.alwaysLast) {
589
- ev = "afterexit";
590
- }
591
- var remove = function() {
592
- emitter.removeListener(ev, cb);
593
- if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
594
- unload();
595
- }
596
- };
597
- emitter.on(ev, cb);
598
- return remove;
599
- };
600
- unload = function unload2() {
601
- if (!loaded || !processOk(global.process)) {
602
- return;
603
- }
604
- loaded = false;
605
- signals.forEach(function(sig) {
606
- try {
607
- process6.removeListener(sig, sigListeners[sig]);
608
- } catch (er) {
609
- }
610
- });
611
- process6.emit = originalProcessEmit;
612
- process6.reallyExit = originalProcessReallyExit;
613
- emitter.count -= 1;
614
- };
615
- module.exports.unload = unload;
616
- emit = function emit2(event, code, signal) {
617
- if (emitter.emitted[event]) {
618
- return;
619
- }
620
- emitter.emitted[event] = true;
621
- emitter.emit(event, code, signal);
622
- };
623
- sigListeners = {};
624
- signals.forEach(function(sig) {
625
- sigListeners[sig] = function listener() {
626
- if (!processOk(global.process)) {
627
- return;
628
- }
629
- var listeners = process6.listeners(sig);
630
- if (listeners.length === emitter.count) {
631
- unload();
632
- emit("exit", null, sig);
633
- emit("afterexit", null, sig);
634
- if (isWin && sig === "SIGHUP") {
635
- sig = "SIGINT";
636
- }
637
- process6.kill(process6.pid, sig);
638
- }
639
- };
640
- });
641
- module.exports.signals = function() {
642
- return signals;
643
- };
644
- loaded = false;
645
- load = function load2() {
646
- if (loaded || !processOk(global.process)) {
647
- return;
648
- }
649
- loaded = true;
650
- emitter.count += 1;
651
- signals = signals.filter(function(sig) {
652
- try {
653
- process6.on(sig, sigListeners[sig]);
654
- return true;
655
- } catch (er) {
656
- return false;
657
- }
658
- });
659
- process6.emit = processEmit;
660
- process6.reallyExit = processReallyExit;
661
- };
662
- module.exports.load = load;
663
- originalProcessReallyExit = process6.reallyExit;
664
- processReallyExit = function processReallyExit2(code) {
665
- if (!processOk(global.process)) {
666
- return;
667
- }
668
- process6.exitCode = code || /* istanbul ignore next */
669
- 0;
670
- emit("exit", process6.exitCode, null);
671
- emit("afterexit", process6.exitCode, null);
672
- originalProcessReallyExit.call(process6, process6.exitCode);
673
- };
674
- originalProcessEmit = process6.emit;
675
- processEmit = function processEmit2(ev, arg) {
676
- if (ev === "exit" && processOk(global.process)) {
677
- if (arg !== void 0) {
678
- process6.exitCode = arg;
679
- }
680
- var ret = originalProcessEmit.apply(this, arguments);
681
- emit("exit", process6.exitCode, null);
682
- emit("afterexit", process6.exitCode, null);
683
- return ret;
684
- } else {
685
- return originalProcessEmit.apply(this, arguments);
686
- }
687
- };
688
- }
689
- var assert;
690
- var signals;
691
- var isWin;
692
- var EE;
693
- var emitter;
694
- var unload;
695
- var emit;
696
- var sigListeners;
697
- var loaded;
698
- var load;
699
- var originalProcessReallyExit;
700
- var processReallyExit;
701
- var originalProcessEmit;
702
- var processEmit;
703
- }
704
- });
705
-
706
- // node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js
707
- var require_buffer_stream = __commonJS({
708
- "node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js"(exports, module) {
709
- "use strict";
710
- var { PassThrough: PassThroughStream } = __require("stream");
711
- module.exports = (options) => {
712
- options = { ...options };
713
- const { array } = options;
714
- let { encoding } = options;
715
- const isBuffer = encoding === "buffer";
716
- let objectMode = false;
717
- if (array) {
718
- objectMode = !(encoding || isBuffer);
719
- } else {
720
- encoding = encoding || "utf8";
721
- }
722
- if (isBuffer) {
723
- encoding = null;
724
- }
725
- const stream = new PassThroughStream({ objectMode });
726
- if (encoding) {
727
- stream.setEncoding(encoding);
728
- }
729
- let length = 0;
730
- const chunks = [];
731
- stream.on("data", (chunk) => {
732
- chunks.push(chunk);
733
- if (objectMode) {
734
- length = chunks.length;
735
- } else {
736
- length += chunk.length;
737
- }
738
- });
739
- stream.getBufferedValue = () => {
740
- if (array) {
741
- return chunks;
742
- }
743
- return isBuffer ? Buffer.concat(chunks, length) : chunks.join("");
744
- };
745
- stream.getBufferedLength = () => length;
746
- return stream;
747
- };
748
- }
749
- });
750
-
751
- // node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js
752
- var require_get_stream = __commonJS({
753
- "node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js"(exports, module) {
754
- "use strict";
755
- var { constants: BufferConstants } = __require("buffer");
756
- var stream = __require("stream");
757
- var { promisify } = __require("util");
758
- var bufferStream = require_buffer_stream();
759
- var streamPipelinePromisified = promisify(stream.pipeline);
760
- var MaxBufferError = class extends Error {
761
- constructor() {
762
- super("maxBuffer exceeded");
763
- this.name = "MaxBufferError";
764
- }
765
- };
766
- async function getStream2(inputStream, options) {
767
- if (!inputStream) {
768
- throw new Error("Expected a stream");
769
- }
770
- options = {
771
- maxBuffer: Infinity,
772
- ...options
773
- };
774
- const { maxBuffer } = options;
775
- const stream2 = bufferStream(options);
776
- await new Promise((resolve, reject) => {
777
- const rejectPromise = (error) => {
778
- if (error && stream2.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
779
- error.bufferedData = stream2.getBufferedValue();
780
- }
781
- reject(error);
782
- };
783
- (async () => {
784
- try {
785
- await streamPipelinePromisified(inputStream, stream2);
786
- resolve();
787
- } catch (error) {
788
- rejectPromise(error);
789
- }
790
- })();
791
- stream2.on("data", () => {
792
- if (stream2.getBufferedLength() > maxBuffer) {
793
- rejectPromise(new MaxBufferError());
794
- }
795
- });
796
- });
797
- return stream2.getBufferedValue();
798
- }
799
- module.exports = getStream2;
800
- module.exports.buffer = (stream2, options) => getStream2(stream2, { ...options, encoding: "buffer" });
801
- module.exports.array = (stream2, options) => getStream2(stream2, { ...options, array: true });
802
- module.exports.MaxBufferError = MaxBufferError;
803
- }
804
- });
805
-
806
508
  // node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js
807
509
  var require_merge_stream = __commonJS({
808
510
  "node_modules/.pnpm/merge-stream@2.0.0/node_modules/merge-stream/index.js"(exports, module) {
@@ -843,12 +545,12 @@ var require_merge_stream = __commonJS({
843
545
  }
844
546
  });
845
547
 
846
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/index.js
548
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/index.js
847
549
  var import_cross_spawn = __toESM(require_cross_spawn(), 1);
848
550
  import { Buffer as Buffer3 } from "node:buffer";
849
551
  import path2 from "node:path";
850
552
  import childProcess from "node:child_process";
851
- import process5 from "node:process";
553
+ import process6 from "node:process";
852
554
 
853
555
  // node_modules/.pnpm/strip-final-newline@3.0.0/node_modules/strip-final-newline/index.js
854
556
  function stripFinalNewline(input) {
@@ -983,13 +685,13 @@ onetime.callCount = (function_) => {
983
685
  };
984
686
  var onetime_default = onetime;
985
687
 
986
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/error.js
688
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/error.js
987
689
  import process3 from "node:process";
988
690
 
989
- // node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/main.js
691
+ // node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/main.js
990
692
  import { constants as constants2 } from "node:os";
991
693
 
992
- // node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/realtime.js
694
+ // node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/realtime.js
993
695
  var getRealtimeSignals = () => {
994
696
  const length = SIGRTMAX - SIGRTMIN + 1;
995
697
  return Array.from({ length }, getRealtimeSignal);
@@ -1004,10 +706,10 @@ var getRealtimeSignal = (value, index) => ({
1004
706
  var SIGRTMIN = 34;
1005
707
  var SIGRTMAX = 64;
1006
708
 
1007
- // node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/signals.js
709
+ // node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/signals.js
1008
710
  import { constants } from "node:os";
1009
711
 
1010
- // node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/core.js
712
+ // node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/core.js
1011
713
  var SIGNALS = [
1012
714
  {
1013
715
  name: "SIGHUP",
@@ -1280,11 +982,11 @@ var SIGNALS = [
1280
982
  }
1281
983
  ];
1282
984
 
1283
- // node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/signals.js
985
+ // node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/signals.js
1284
986
  var getSignals = () => {
1285
987
  const realtimeSignals = getRealtimeSignals();
1286
- const signals = [...SIGNALS, ...realtimeSignals].map(normalizeSignal);
1287
- return signals;
988
+ const signals2 = [...SIGNALS, ...realtimeSignals].map(normalizeSignal);
989
+ return signals2;
1288
990
  };
1289
991
  var normalizeSignal = ({
1290
992
  name,
@@ -1302,10 +1004,10 @@ var normalizeSignal = ({
1302
1004
  return { name, number, description, supported, action, forced, standard };
1303
1005
  };
1304
1006
 
1305
- // node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/main.js
1007
+ // node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/main.js
1306
1008
  var getSignalsByName = () => {
1307
- const signals = getSignals();
1308
- return Object.fromEntries(signals.map(getSignalByName));
1009
+ const signals2 = getSignals();
1010
+ return Object.fromEntries(signals2.map(getSignalByName));
1309
1011
  };
1310
1012
  var getSignalByName = ({
1311
1013
  name,
@@ -1318,13 +1020,16 @@ var getSignalByName = ({
1318
1020
  }) => [name, { name, number, description, supported, action, forced, standard }];
1319
1021
  var signalsByName = getSignalsByName();
1320
1022
  var getSignalsByNumber = () => {
1321
- const signals = getSignals();
1023
+ const signals2 = getSignals();
1322
1024
  const length = SIGRTMAX + 1;
1323
- const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals));
1025
+ const signalsA = Array.from(
1026
+ { length },
1027
+ (value, number) => getSignalByNumber(number, signals2)
1028
+ );
1324
1029
  return Object.assign({}, ...signalsA);
1325
1030
  };
1326
- var getSignalByNumber = (number, signals) => {
1327
- const signal = findSignalByNumber(number, signals);
1031
+ var getSignalByNumber = (number, signals2) => {
1032
+ const signal = findSignalByNumber(number, signals2);
1328
1033
  if (signal === void 0) {
1329
1034
  return {};
1330
1035
  }
@@ -1341,16 +1046,16 @@ var getSignalByNumber = (number, signals) => {
1341
1046
  }
1342
1047
  };
1343
1048
  };
1344
- var findSignalByNumber = (number, signals) => {
1345
- const signal = signals.find(({ name }) => constants2.signals[name] === number);
1049
+ var findSignalByNumber = (number, signals2) => {
1050
+ const signal = signals2.find(({ name }) => constants2.signals[name] === number);
1346
1051
  if (signal !== void 0) {
1347
1052
  return signal;
1348
1053
  }
1349
- return signals.find((signalA) => signalA.number === number);
1054
+ return signals2.find((signalA) => signalA.number === number);
1350
1055
  };
1351
1056
  var signalsByNumber = getSignalsByNumber();
1352
1057
 
1353
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/error.js
1058
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/error.js
1354
1059
  var getErrorPrefix = ({ timedOut, timeout, errorCode, signal, signalDescription, exitCode, isCanceled }) => {
1355
1060
  if (timedOut) {
1356
1061
  return `timed out after ${timeout} milliseconds`;
@@ -1421,7 +1126,7 @@ ${error.message}` : execaMessage;
1421
1126
  return error;
1422
1127
  };
1423
1128
 
1424
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/stdio.js
1129
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stdio.js
1425
1130
  var aliases = ["stdin", "stdout", "stderr"];
1426
1131
  var hasAlias = (options) => aliases.some((alias) => options[alias] !== void 0);
1427
1132
  var normalizeStdio = (options) => {
@@ -1458,9 +1163,261 @@ var normalizeStdioNode = (options) => {
1458
1163
  return [...stdio, "ipc"];
1459
1164
  };
1460
1165
 
1461
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/kill.js
1462
- var import_signal_exit = __toESM(require_signal_exit(), 1);
1166
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/kill.js
1463
1167
  import os from "node:os";
1168
+
1169
+ // node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
1170
+ var signals = [];
1171
+ signals.push("SIGHUP", "SIGINT", "SIGTERM");
1172
+ if (process.platform !== "win32") {
1173
+ signals.push(
1174
+ "SIGALRM",
1175
+ "SIGABRT",
1176
+ "SIGVTALRM",
1177
+ "SIGXCPU",
1178
+ "SIGXFSZ",
1179
+ "SIGUSR2",
1180
+ "SIGTRAP",
1181
+ "SIGSYS",
1182
+ "SIGQUIT",
1183
+ "SIGIOT"
1184
+ // should detect profiler and enable/disable accordingly.
1185
+ // see #21
1186
+ // 'SIGPROF'
1187
+ );
1188
+ }
1189
+ if (process.platform === "linux") {
1190
+ signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
1191
+ }
1192
+
1193
+ // node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
1194
+ var processOk = (process7) => !!process7 && typeof process7 === "object" && typeof process7.removeListener === "function" && typeof process7.emit === "function" && typeof process7.reallyExit === "function" && typeof process7.listeners === "function" && typeof process7.kill === "function" && typeof process7.pid === "number" && typeof process7.on === "function";
1195
+ var kExitEmitter = Symbol.for("signal-exit emitter");
1196
+ var global2 = globalThis;
1197
+ var ObjectDefineProperty = Object.defineProperty.bind(Object);
1198
+ var Emitter = class {
1199
+ emitted = {
1200
+ afterExit: false,
1201
+ exit: false
1202
+ };
1203
+ listeners = {
1204
+ afterExit: [],
1205
+ exit: []
1206
+ };
1207
+ count = 0;
1208
+ id = Math.random();
1209
+ constructor() {
1210
+ if (global2[kExitEmitter]) {
1211
+ return global2[kExitEmitter];
1212
+ }
1213
+ ObjectDefineProperty(global2, kExitEmitter, {
1214
+ value: this,
1215
+ writable: false,
1216
+ enumerable: false,
1217
+ configurable: false
1218
+ });
1219
+ }
1220
+ on(ev, fn) {
1221
+ this.listeners[ev].push(fn);
1222
+ }
1223
+ removeListener(ev, fn) {
1224
+ const list = this.listeners[ev];
1225
+ const i = list.indexOf(fn);
1226
+ if (i === -1) {
1227
+ return;
1228
+ }
1229
+ if (i === 0 && list.length === 1) {
1230
+ list.length = 0;
1231
+ } else {
1232
+ list.splice(i, 1);
1233
+ }
1234
+ }
1235
+ emit(ev, code, signal) {
1236
+ if (this.emitted[ev]) {
1237
+ return false;
1238
+ }
1239
+ this.emitted[ev] = true;
1240
+ let ret = false;
1241
+ for (const fn of this.listeners[ev]) {
1242
+ ret = fn(code, signal) === true || ret;
1243
+ }
1244
+ if (ev === "exit") {
1245
+ ret = this.emit("afterExit", code, signal) || ret;
1246
+ }
1247
+ return ret;
1248
+ }
1249
+ };
1250
+ var SignalExitBase = class {
1251
+ };
1252
+ var signalExitWrap = (handler) => {
1253
+ return {
1254
+ onExit(cb, opts) {
1255
+ return handler.onExit(cb, opts);
1256
+ },
1257
+ load() {
1258
+ return handler.load();
1259
+ },
1260
+ unload() {
1261
+ return handler.unload();
1262
+ }
1263
+ };
1264
+ };
1265
+ var SignalExitFallback = class extends SignalExitBase {
1266
+ onExit() {
1267
+ return () => {
1268
+ };
1269
+ }
1270
+ load() {
1271
+ }
1272
+ unload() {
1273
+ }
1274
+ };
1275
+ var SignalExit = class extends SignalExitBase {
1276
+ // "SIGHUP" throws an `ENOSYS` error on Windows,
1277
+ // so use a supported signal instead
1278
+ /* c8 ignore start */
1279
+ #hupSig = process4.platform === "win32" ? "SIGINT" : "SIGHUP";
1280
+ /* c8 ignore stop */
1281
+ #emitter = new Emitter();
1282
+ #process;
1283
+ #originalProcessEmit;
1284
+ #originalProcessReallyExit;
1285
+ #sigListeners = {};
1286
+ #loaded = false;
1287
+ constructor(process7) {
1288
+ super();
1289
+ this.#process = process7;
1290
+ this.#sigListeners = {};
1291
+ for (const sig of signals) {
1292
+ this.#sigListeners[sig] = () => {
1293
+ const listeners = this.#process.listeners(sig);
1294
+ let { count } = this.#emitter;
1295
+ const p = process7;
1296
+ if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
1297
+ count += p.__signal_exit_emitter__.count;
1298
+ }
1299
+ if (listeners.length === count) {
1300
+ this.unload();
1301
+ const ret = this.#emitter.emit("exit", null, sig);
1302
+ const s = sig === "SIGHUP" ? this.#hupSig : sig;
1303
+ if (!ret)
1304
+ process7.kill(process7.pid, s);
1305
+ }
1306
+ };
1307
+ }
1308
+ this.#originalProcessReallyExit = process7.reallyExit;
1309
+ this.#originalProcessEmit = process7.emit;
1310
+ }
1311
+ onExit(cb, opts) {
1312
+ if (!processOk(this.#process)) {
1313
+ return () => {
1314
+ };
1315
+ }
1316
+ if (this.#loaded === false) {
1317
+ this.load();
1318
+ }
1319
+ const ev = opts?.alwaysLast ? "afterExit" : "exit";
1320
+ this.#emitter.on(ev, cb);
1321
+ return () => {
1322
+ this.#emitter.removeListener(ev, cb);
1323
+ if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
1324
+ this.unload();
1325
+ }
1326
+ };
1327
+ }
1328
+ load() {
1329
+ if (this.#loaded) {
1330
+ return;
1331
+ }
1332
+ this.#loaded = true;
1333
+ this.#emitter.count += 1;
1334
+ for (const sig of signals) {
1335
+ try {
1336
+ const fn = this.#sigListeners[sig];
1337
+ if (fn)
1338
+ this.#process.on(sig, fn);
1339
+ } catch (_) {
1340
+ }
1341
+ }
1342
+ this.#process.emit = (ev, ...a) => {
1343
+ return this.#processEmit(ev, ...a);
1344
+ };
1345
+ this.#process.reallyExit = (code) => {
1346
+ return this.#processReallyExit(code);
1347
+ };
1348
+ }
1349
+ unload() {
1350
+ if (!this.#loaded) {
1351
+ return;
1352
+ }
1353
+ this.#loaded = false;
1354
+ signals.forEach((sig) => {
1355
+ const listener = this.#sigListeners[sig];
1356
+ if (!listener) {
1357
+ throw new Error("Listener not defined for signal: " + sig);
1358
+ }
1359
+ try {
1360
+ this.#process.removeListener(sig, listener);
1361
+ } catch (_) {
1362
+ }
1363
+ });
1364
+ this.#process.emit = this.#originalProcessEmit;
1365
+ this.#process.reallyExit = this.#originalProcessReallyExit;
1366
+ this.#emitter.count -= 1;
1367
+ }
1368
+ #processReallyExit(code) {
1369
+ if (!processOk(this.#process)) {
1370
+ return 0;
1371
+ }
1372
+ this.#process.exitCode = code || 0;
1373
+ this.#emitter.emit("exit", this.#process.exitCode, null);
1374
+ return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
1375
+ }
1376
+ #processEmit(ev, ...args) {
1377
+ const og = this.#originalProcessEmit;
1378
+ if (ev === "exit" && processOk(this.#process)) {
1379
+ if (typeof args[0] === "number") {
1380
+ this.#process.exitCode = args[0];
1381
+ }
1382
+ const ret = og.call(this.#process, ev, ...args);
1383
+ this.#emitter.emit("exit", this.#process.exitCode, null);
1384
+ return ret;
1385
+ } else {
1386
+ return og.call(this.#process, ev, ...args);
1387
+ }
1388
+ }
1389
+ };
1390
+ var process4 = globalThis.process;
1391
+ var {
1392
+ /**
1393
+ * Called when the process is exiting, whether via signal, explicit
1394
+ * exit, or running out of stuff to do.
1395
+ *
1396
+ * If the global process object is not suitable for instrumentation,
1397
+ * then this will be a no-op.
1398
+ *
1399
+ * Returns a function that may be used to unload signal-exit.
1400
+ */
1401
+ onExit,
1402
+ /**
1403
+ * Load the listeners. Likely you never need to call this, unless
1404
+ * doing a rather deep integration with signal-exit functionality.
1405
+ * Mostly exposed for the benefit of testing.
1406
+ *
1407
+ * @internal
1408
+ */
1409
+ load,
1410
+ /**
1411
+ * Unload the listeners. Likely you never need to call this, unless
1412
+ * doing a rather deep integration with signal-exit functionality.
1413
+ * Mostly exposed for the benefit of testing.
1414
+ *
1415
+ * @internal
1416
+ */
1417
+ unload
1418
+ } = signalExitWrap(processOk(process4) ? new SignalExit(process4) : new SignalExitFallback());
1419
+
1420
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/kill.js
1464
1421
  var DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
1465
1422
  var spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
1466
1423
  const killResult = kill(signal);
@@ -1524,7 +1481,7 @@ var setExitHandler = async (spawned, { cleanup, detached }, timedPromise) => {
1524
1481
  if (!cleanup || detached) {
1525
1482
  return timedPromise;
1526
1483
  }
1527
- const removeExitHandler = (0, import_signal_exit.default)(() => {
1484
+ const removeExitHandler = onExit(() => {
1528
1485
  spawned.kill();
1529
1486
  });
1530
1487
  return timedPromise.finally(() => {
@@ -1532,7 +1489,7 @@ var setExitHandler = async (spawned, { cleanup, detached }, timedPromise) => {
1532
1489
  });
1533
1490
  };
1534
1491
 
1535
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/pipe.js
1492
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/pipe.js
1536
1493
  import { createWriteStream } from "node:fs";
1537
1494
  import { ChildProcess } from "node:child_process";
1538
1495
 
@@ -1544,7 +1501,7 @@ function isWritableStream(stream) {
1544
1501
  return isStream(stream) && stream.writable !== false && typeof stream._write === "function" && typeof stream._writableState === "object";
1545
1502
  }
1546
1503
 
1547
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/pipe.js
1504
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/pipe.js
1548
1505
  var isExecaChildProcess = (target) => target instanceof ChildProcess && typeof target.then === "function";
1549
1506
  var pipeToTarget = (spawned, streamName, target) => {
1550
1507
  if (typeof target === "string") {
@@ -1576,9 +1533,193 @@ var addPipeMethods = (spawned) => {
1576
1533
  }
1577
1534
  };
1578
1535
 
1579
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/stream.js
1536
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stream.js
1580
1537
  import { createReadStream, readFileSync } from "node:fs";
1581
- var import_get_stream = __toESM(require_get_stream(), 1);
1538
+ import { setTimeout as setTimeout2 } from "node:timers/promises";
1539
+
1540
+ // node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/contents.js
1541
+ var getStreamContents = async (stream, { init, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize }, { maxBuffer = Number.POSITIVE_INFINITY } = {}) => {
1542
+ if (!isAsyncIterable(stream)) {
1543
+ throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");
1544
+ }
1545
+ const state = init();
1546
+ state.length = 0;
1547
+ try {
1548
+ for await (const chunk of stream) {
1549
+ const chunkType = getChunkType(chunk);
1550
+ const convertedChunk = convertChunk[chunkType](chunk, state);
1551
+ appendChunk({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer });
1552
+ }
1553
+ appendFinalChunk({ state, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer });
1554
+ return finalize(state);
1555
+ } catch (error) {
1556
+ error.bufferedData = finalize(state);
1557
+ throw error;
1558
+ }
1559
+ };
1560
+ var appendFinalChunk = ({ state, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer }) => {
1561
+ const convertedChunk = getFinalChunk(state);
1562
+ if (convertedChunk !== void 0) {
1563
+ appendChunk({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer });
1564
+ }
1565
+ };
1566
+ var appendChunk = ({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer }) => {
1567
+ const chunkSize = getSize(convertedChunk);
1568
+ const newLength = state.length + chunkSize;
1569
+ if (newLength <= maxBuffer) {
1570
+ addNewChunk(convertedChunk, state, addChunk, newLength);
1571
+ return;
1572
+ }
1573
+ const truncatedChunk = truncateChunk(convertedChunk, maxBuffer - state.length);
1574
+ if (truncatedChunk !== void 0) {
1575
+ addNewChunk(truncatedChunk, state, addChunk, maxBuffer);
1576
+ }
1577
+ throw new MaxBufferError();
1578
+ };
1579
+ var addNewChunk = (convertedChunk, state, addChunk, newLength) => {
1580
+ state.contents = addChunk(convertedChunk, state, newLength);
1581
+ state.length = newLength;
1582
+ };
1583
+ var isAsyncIterable = (stream) => typeof stream === "object" && stream !== null && typeof stream[Symbol.asyncIterator] === "function";
1584
+ var getChunkType = (chunk) => {
1585
+ const typeOfChunk = typeof chunk;
1586
+ if (typeOfChunk === "string") {
1587
+ return "string";
1588
+ }
1589
+ if (typeOfChunk !== "object" || chunk === null) {
1590
+ return "others";
1591
+ }
1592
+ if (globalThis.Buffer?.isBuffer(chunk)) {
1593
+ return "buffer";
1594
+ }
1595
+ const prototypeName = objectToString.call(chunk);
1596
+ if (prototypeName === "[object ArrayBuffer]") {
1597
+ return "arrayBuffer";
1598
+ }
1599
+ if (prototypeName === "[object DataView]") {
1600
+ return "dataView";
1601
+ }
1602
+ if (Number.isInteger(chunk.byteLength) && Number.isInteger(chunk.byteOffset) && objectToString.call(chunk.buffer) === "[object ArrayBuffer]") {
1603
+ return "typedArray";
1604
+ }
1605
+ return "others";
1606
+ };
1607
+ var { toString: objectToString } = Object.prototype;
1608
+ var MaxBufferError = class extends Error {
1609
+ name = "MaxBufferError";
1610
+ constructor() {
1611
+ super("maxBuffer exceeded");
1612
+ }
1613
+ };
1614
+
1615
+ // node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/utils.js
1616
+ var identity = (value) => value;
1617
+ var noop = () => void 0;
1618
+ var getContentsProp = ({ contents }) => contents;
1619
+ var throwObjectStream = (chunk) => {
1620
+ throw new Error(`Streams in object mode are not supported: ${String(chunk)}`);
1621
+ };
1622
+ var getLengthProp = (convertedChunk) => convertedChunk.length;
1623
+
1624
+ // node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array-buffer.js
1625
+ async function getStreamAsArrayBuffer(stream, options) {
1626
+ return getStreamContents(stream, arrayBufferMethods, options);
1627
+ }
1628
+ var initArrayBuffer = () => ({ contents: new ArrayBuffer(0) });
1629
+ var useTextEncoder = (chunk) => textEncoder.encode(chunk);
1630
+ var textEncoder = new TextEncoder();
1631
+ var useUint8Array = (chunk) => new Uint8Array(chunk);
1632
+ var useUint8ArrayWithOffset = (chunk) => new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength);
1633
+ var truncateArrayBufferChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);
1634
+ var addArrayBufferChunk = (convertedChunk, { contents, length: previousLength }, length) => {
1635
+ const newContents = hasArrayBufferResize() ? resizeArrayBuffer(contents, length) : resizeArrayBufferSlow(contents, length);
1636
+ new Uint8Array(newContents).set(convertedChunk, previousLength);
1637
+ return newContents;
1638
+ };
1639
+ var resizeArrayBufferSlow = (contents, length) => {
1640
+ if (length <= contents.byteLength) {
1641
+ return contents;
1642
+ }
1643
+ const arrayBuffer = new ArrayBuffer(getNewContentsLength(length));
1644
+ new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);
1645
+ return arrayBuffer;
1646
+ };
1647
+ var resizeArrayBuffer = (contents, length) => {
1648
+ if (length <= contents.maxByteLength) {
1649
+ contents.resize(length);
1650
+ return contents;
1651
+ }
1652
+ const arrayBuffer = new ArrayBuffer(length, { maxByteLength: getNewContentsLength(length) });
1653
+ new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);
1654
+ return arrayBuffer;
1655
+ };
1656
+ var getNewContentsLength = (length) => SCALE_FACTOR ** Math.ceil(Math.log(length) / Math.log(SCALE_FACTOR));
1657
+ var SCALE_FACTOR = 2;
1658
+ var finalizeArrayBuffer = ({ contents, length }) => hasArrayBufferResize() ? contents : contents.slice(0, length);
1659
+ var hasArrayBufferResize = () => "resize" in ArrayBuffer.prototype;
1660
+ var arrayBufferMethods = {
1661
+ init: initArrayBuffer,
1662
+ convertChunk: {
1663
+ string: useTextEncoder,
1664
+ buffer: useUint8Array,
1665
+ arrayBuffer: useUint8Array,
1666
+ dataView: useUint8ArrayWithOffset,
1667
+ typedArray: useUint8ArrayWithOffset,
1668
+ others: throwObjectStream
1669
+ },
1670
+ getSize: getLengthProp,
1671
+ truncateChunk: truncateArrayBufferChunk,
1672
+ addChunk: addArrayBufferChunk,
1673
+ getFinalChunk: noop,
1674
+ finalize: finalizeArrayBuffer
1675
+ };
1676
+
1677
+ // node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/buffer.js
1678
+ async function getStreamAsBuffer(stream, options) {
1679
+ if (!("Buffer" in globalThis)) {
1680
+ throw new Error("getStreamAsBuffer() is only supported in Node.js");
1681
+ }
1682
+ try {
1683
+ return arrayBufferToNodeBuffer(await getStreamAsArrayBuffer(stream, options));
1684
+ } catch (error) {
1685
+ if (error.bufferedData !== void 0) {
1686
+ error.bufferedData = arrayBufferToNodeBuffer(error.bufferedData);
1687
+ }
1688
+ throw error;
1689
+ }
1690
+ }
1691
+ var arrayBufferToNodeBuffer = (arrayBuffer) => globalThis.Buffer.from(arrayBuffer);
1692
+
1693
+ // node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/string.js
1694
+ async function getStreamAsString(stream, options) {
1695
+ return getStreamContents(stream, stringMethods, options);
1696
+ }
1697
+ var initString = () => ({ contents: "", textDecoder: new TextDecoder() });
1698
+ var useTextDecoder = (chunk, { textDecoder }) => textDecoder.decode(chunk, { stream: true });
1699
+ var addStringChunk = (convertedChunk, { contents }) => contents + convertedChunk;
1700
+ var truncateStringChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);
1701
+ var getFinalStringChunk = ({ textDecoder }) => {
1702
+ const finalChunk = textDecoder.decode();
1703
+ return finalChunk === "" ? void 0 : finalChunk;
1704
+ };
1705
+ var stringMethods = {
1706
+ init: initString,
1707
+ convertChunk: {
1708
+ string: identity,
1709
+ buffer: useTextDecoder,
1710
+ arrayBuffer: useTextDecoder,
1711
+ dataView: useTextDecoder,
1712
+ typedArray: useTextDecoder,
1713
+ others: throwObjectStream
1714
+ },
1715
+ getSize: getLengthProp,
1716
+ truncateChunk: truncateStringChunk,
1717
+ addChunk: addStringChunk,
1718
+ getFinalChunk: getFinalStringChunk,
1719
+ finalize: getContentsProp
1720
+ };
1721
+
1722
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stream.js
1582
1723
  var import_merge_stream = __toESM(require_merge_stream(), 1);
1583
1724
  var validateInputOptions = (input) => {
1584
1725
  if (input !== void 0) {
@@ -1634,6 +1775,7 @@ var getBufferedData = async (stream, streamPromise) => {
1634
1775
  if (!stream || streamPromise === void 0) {
1635
1776
  return;
1636
1777
  }
1778
+ await setTimeout2(0);
1637
1779
  stream.destroy();
1638
1780
  try {
1639
1781
  return await streamPromise;
@@ -1645,10 +1787,17 @@ var getStreamPromise = (stream, { encoding, buffer, maxBuffer }) => {
1645
1787
  if (!stream || !buffer) {
1646
1788
  return;
1647
1789
  }
1648
- if (encoding) {
1649
- return (0, import_get_stream.default)(stream, { encoding, maxBuffer });
1790
+ if (encoding === "utf8" || encoding === "utf-8") {
1791
+ return getStreamAsString(stream, { maxBuffer });
1792
+ }
1793
+ if (encoding === null || encoding === "buffer") {
1794
+ return getStreamAsBuffer(stream, { maxBuffer });
1650
1795
  }
1651
- return import_get_stream.default.buffer(stream, { maxBuffer });
1796
+ return applyEncoding(stream, maxBuffer, encoding);
1797
+ };
1798
+ var applyEncoding = async (stream, maxBuffer, encoding) => {
1799
+ const buffer = await getStreamAsBuffer(stream, { maxBuffer });
1800
+ return buffer.toString(encoding);
1652
1801
  };
1653
1802
  var getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => {
1654
1803
  const stdoutPromise = getStreamPromise(stdout, { encoding, buffer, maxBuffer });
@@ -1666,7 +1815,7 @@ var getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBu
1666
1815
  }
1667
1816
  };
1668
1817
 
1669
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/promise.js
1818
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/promise.js
1670
1819
  var nativePromisePrototype = (/* @__PURE__ */ (async () => {
1671
1820
  })()).constructor.prototype;
1672
1821
  var descriptors = ["then", "catch", "finally"].map((property) => [
@@ -1693,7 +1842,7 @@ var getSpawnedPromise = (spawned) => new Promise((resolve, reject) => {
1693
1842
  }
1694
1843
  });
1695
1844
 
1696
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/command.js
1845
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/command.js
1697
1846
  import { Buffer as Buffer2 } from "node:buffer";
1698
1847
  import { ChildProcess as ChildProcess2 } from "node:child_process";
1699
1848
  var normalizeArgs = (file, args = []) => {
@@ -1703,12 +1852,11 @@ var normalizeArgs = (file, args = []) => {
1703
1852
  return [file, ...args];
1704
1853
  };
1705
1854
  var NO_ESCAPE_REGEXP = /^[\w.-]+$/;
1706
- var DOUBLE_QUOTES_REGEXP = /"/g;
1707
1855
  var escapeArg = (arg) => {
1708
1856
  if (typeof arg !== "string" || NO_ESCAPE_REGEXP.test(arg)) {
1709
1857
  return arg;
1710
1858
  }
1711
- return `"${arg.replace(DOUBLE_QUOTES_REGEXP, '\\"')}"`;
1859
+ return `"${arg.replaceAll('"', '\\"')}"`;
1712
1860
  };
1713
1861
  var joinCommand = (file, args) => normalizeArgs(file, args).join(" ");
1714
1862
  var getEscapedCommand = (file, args) => normalizeArgs(file, args).map((arg) => escapeArg(arg)).join(" ");
@@ -1716,7 +1864,7 @@ var SPACES_REGEXP = / +/g;
1716
1864
  var parseCommand = (command) => {
1717
1865
  const tokens = [];
1718
1866
  for (const token of command.trim().split(SPACES_REGEXP)) {
1719
- const previousToken = tokens[tokens.length - 1];
1867
+ const previousToken = tokens.at(-1);
1720
1868
  if (previousToken && previousToken.endsWith("\\")) {
1721
1869
  tokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`;
1722
1870
  } else {
@@ -1747,7 +1895,7 @@ var parseExpression = (expression) => {
1747
1895
  };
1748
1896
  var concatTokens = (tokens, nextTokens, isNew) => isNew || tokens.length === 0 || nextTokens.length === 0 ? [...tokens, ...nextTokens] : [
1749
1897
  ...tokens.slice(0, -1),
1750
- `${tokens[tokens.length - 1]}${nextTokens[0]}`,
1898
+ `${tokens.at(-1)}${nextTokens[0]}`,
1751
1899
  ...nextTokens.slice(1)
1752
1900
  ];
1753
1901
  var parseTemplate = ({ templates, expressions, tokens, index, template }) => {
@@ -1777,9 +1925,9 @@ var parseTemplates = (templates, expressions) => {
1777
1925
  return tokens;
1778
1926
  };
1779
1927
 
1780
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/verbose.js
1928
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/verbose.js
1781
1929
  import { debuglog } from "node:util";
1782
- import process4 from "node:process";
1930
+ import process5 from "node:process";
1783
1931
  var verboseDefault = debuglog("execa").enabled;
1784
1932
  var padField = (field, padding) => String(field).padStart(padding, "0");
1785
1933
  var getTimestamp = () => {
@@ -1790,14 +1938,14 @@ var logCommand = (escapedCommand, { verbose }) => {
1790
1938
  if (!verbose) {
1791
1939
  return;
1792
1940
  }
1793
- process4.stderr.write(`[${getTimestamp()}] ${escapedCommand}
1941
+ process5.stderr.write(`[${getTimestamp()}] ${escapedCommand}
1794
1942
  `);
1795
1943
  };
1796
1944
 
1797
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/index.js
1945
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/index.js
1798
1946
  var DEFAULT_MAX_BUFFER = 1e3 * 1e3 * 100;
1799
1947
  var getEnv = ({ env: envOption, extendEnv, preferLocal, localDir, execPath }) => {
1800
- const env = extendEnv ? { ...process5.env, ...envOption } : envOption;
1948
+ const env = extendEnv ? { ...process6.env, ...envOption } : envOption;
1801
1949
  if (preferLocal) {
1802
1950
  return npmRunPathEnv({ env, cwd: localDir, execPath });
1803
1951
  }
@@ -1814,8 +1962,8 @@ var handleArguments = (file, args, options = {}) => {
1814
1962
  stripFinalNewline: true,
1815
1963
  extendEnv: true,
1816
1964
  preferLocal: false,
1817
- localDir: options.cwd || process5.cwd(),
1818
- execPath: process5.execPath,
1965
+ localDir: options.cwd || process6.cwd(),
1966
+ execPath: process6.execPath,
1819
1967
  encoding: "utf8",
1820
1968
  reject: true,
1821
1969
  cleanup: true,
@@ -1826,7 +1974,7 @@ var handleArguments = (file, args, options = {}) => {
1826
1974
  };
1827
1975
  options.env = getEnv(options);
1828
1976
  options.stdio = normalizeStdio(options);
1829
- if (process5.platform === "win32" && path2.basename(file, ".exe") === "cmd") {
1977
+ if (process6.platform === "win32" && path2.basename(file, ".exe") === "cmd") {
1830
1978
  args.unshift("/q");
1831
1979
  }
1832
1980
  return { file, args, options, parsed };
@@ -2011,9 +2159,9 @@ function execaNode(scriptPath, args, options = {}) {
2011
2159
  args = [];
2012
2160
  }
2013
2161
  const stdio = normalizeStdioNode(options);
2014
- const defaultExecArgv = process5.execArgv.filter((arg) => !arg.startsWith("--inspect"));
2162
+ const defaultExecArgv = process6.execArgv.filter((arg) => !arg.startsWith("--inspect"));
2015
2163
  const {
2016
- nodePath = process5.execPath,
2164
+ nodePath = process6.execPath,
2017
2165
  nodeOptions = defaultExecArgv
2018
2166
  } = options;
2019
2167
  return execa(