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.
package/dist/index.cjs CHANGED
@@ -695,10 +695,10 @@ var init_onetime = __esm({
695
695
  }
696
696
  });
697
697
 
698
- // node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/realtime.js
698
+ // node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/realtime.js
699
699
  var getRealtimeSignals, getRealtimeSignal, SIGRTMIN, SIGRTMAX;
700
700
  var init_realtime = __esm({
701
- "node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/realtime.js"() {
701
+ "node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/realtime.js"() {
702
702
  "use strict";
703
703
  getRealtimeSignals = () => {
704
704
  const length = SIGRTMAX - SIGRTMIN + 1;
@@ -716,10 +716,10 @@ var init_realtime = __esm({
716
716
  }
717
717
  });
718
718
 
719
- // node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/core.js
719
+ // node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/core.js
720
720
  var SIGNALS;
721
721
  var init_core = __esm({
722
- "node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/core.js"() {
722
+ "node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/core.js"() {
723
723
  "use strict";
724
724
  SIGNALS = [
725
725
  {
@@ -995,18 +995,18 @@ var init_core = __esm({
995
995
  }
996
996
  });
997
997
 
998
- // node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/signals.js
998
+ // node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/signals.js
999
999
  var import_node_os, getSignals, normalizeSignal;
1000
1000
  var init_signals = __esm({
1001
- "node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/signals.js"() {
1001
+ "node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/signals.js"() {
1002
1002
  "use strict";
1003
1003
  import_node_os = require("os");
1004
1004
  init_core();
1005
1005
  init_realtime();
1006
1006
  getSignals = () => {
1007
1007
  const realtimeSignals = getRealtimeSignals();
1008
- const signals = [...SIGNALS, ...realtimeSignals].map(normalizeSignal);
1009
- return signals;
1008
+ const signals2 = [...SIGNALS, ...realtimeSignals].map(normalizeSignal);
1009
+ return signals2;
1010
1010
  };
1011
1011
  normalizeSignal = ({
1012
1012
  name,
@@ -1026,17 +1026,17 @@ var init_signals = __esm({
1026
1026
  }
1027
1027
  });
1028
1028
 
1029
- // node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/main.js
1029
+ // node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/main.js
1030
1030
  var import_node_os2, getSignalsByName, getSignalByName, signalsByName, getSignalsByNumber, getSignalByNumber, findSignalByNumber, signalsByNumber;
1031
1031
  var init_main = __esm({
1032
- "node_modules/.pnpm/human-signals@4.3.1/node_modules/human-signals/build/src/main.js"() {
1032
+ "node_modules/.pnpm/human-signals@5.0.0/node_modules/human-signals/build/src/main.js"() {
1033
1033
  "use strict";
1034
1034
  import_node_os2 = require("os");
1035
1035
  init_realtime();
1036
1036
  init_signals();
1037
1037
  getSignalsByName = () => {
1038
- const signals = getSignals();
1039
- return Object.fromEntries(signals.map(getSignalByName));
1038
+ const signals2 = getSignals();
1039
+ return Object.fromEntries(signals2.map(getSignalByName));
1040
1040
  };
1041
1041
  getSignalByName = ({
1042
1042
  name,
@@ -1049,13 +1049,16 @@ var init_main = __esm({
1049
1049
  }) => [name, { name, number, description, supported, action, forced, standard }];
1050
1050
  signalsByName = getSignalsByName();
1051
1051
  getSignalsByNumber = () => {
1052
- const signals = getSignals();
1052
+ const signals2 = getSignals();
1053
1053
  const length = SIGRTMAX + 1;
1054
- const signalsA = Array.from({ length }, (value, number) => getSignalByNumber(number, signals));
1054
+ const signalsA = Array.from(
1055
+ { length },
1056
+ (value, number) => getSignalByNumber(number, signals2)
1057
+ );
1055
1058
  return Object.assign({}, ...signalsA);
1056
1059
  };
1057
- getSignalByNumber = (number, signals) => {
1058
- const signal = findSignalByNumber(number, signals);
1060
+ getSignalByNumber = (number, signals2) => {
1061
+ const signal = findSignalByNumber(number, signals2);
1059
1062
  if (signal === void 0) {
1060
1063
  return {};
1061
1064
  }
@@ -1072,21 +1075,21 @@ var init_main = __esm({
1072
1075
  }
1073
1076
  };
1074
1077
  };
1075
- findSignalByNumber = (number, signals) => {
1076
- const signal = signals.find(({ name }) => import_node_os2.constants.signals[name] === number);
1078
+ findSignalByNumber = (number, signals2) => {
1079
+ const signal = signals2.find(({ name }) => import_node_os2.constants.signals[name] === number);
1077
1080
  if (signal !== void 0) {
1078
1081
  return signal;
1079
1082
  }
1080
- return signals.find((signalA) => signalA.number === number);
1083
+ return signals2.find((signalA) => signalA.number === number);
1081
1084
  };
1082
1085
  signalsByNumber = getSignalsByNumber();
1083
1086
  }
1084
1087
  });
1085
1088
 
1086
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/error.js
1089
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/error.js
1087
1090
  var import_node_process2, getErrorPrefix, makeError;
1088
1091
  var init_error = __esm({
1089
- "node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/error.js"() {
1092
+ "node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/error.js"() {
1090
1093
  "use strict";
1091
1094
  import_node_process2 = __toESM(require("process"), 1);
1092
1095
  init_main();
@@ -1162,10 +1165,10 @@ ${error.message}` : execaMessage;
1162
1165
  }
1163
1166
  });
1164
1167
 
1165
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/stdio.js
1168
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stdio.js
1166
1169
  var aliases, hasAlias, normalizeStdio, normalizeStdioNode;
1167
1170
  var init_stdio = __esm({
1168
- "node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/stdio.js"() {
1171
+ "node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stdio.js"() {
1169
1172
  "use strict";
1170
1173
  aliases = ["stdin", "stdout", "stderr"];
1171
1174
  hasAlias = (options) => aliases.some((alias) => options[alias] !== void 0);
@@ -1205,19 +1208,17 @@ var init_stdio = __esm({
1205
1208
  }
1206
1209
  });
1207
1210
 
1208
- // node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js
1209
- var require_signals = __commonJS({
1210
- "node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/signals.js"(exports, module2) {
1211
+ // node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
1212
+ var signals;
1213
+ var init_signals2 = __esm({
1214
+ "node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js"() {
1211
1215
  "use strict";
1212
- module2.exports = [
1213
- "SIGABRT",
1214
- "SIGALRM",
1215
- "SIGHUP",
1216
- "SIGINT",
1217
- "SIGTERM"
1218
- ];
1216
+ signals = [];
1217
+ signals.push("SIGHUP", "SIGINT", "SIGTERM");
1219
1218
  if (process.platform !== "win32") {
1220
- module2.exports.push(
1219
+ signals.push(
1220
+ "SIGALRM",
1221
+ "SIGABRT",
1221
1222
  "SIGVTALRM",
1222
1223
  "SIGXCPU",
1223
1224
  "SIGXFSZ",
@@ -1232,184 +1233,258 @@ var require_signals = __commonJS({
1232
1233
  );
1233
1234
  }
1234
1235
  if (process.platform === "linux") {
1235
- module2.exports.push(
1236
- "SIGIO",
1237
- "SIGPOLL",
1238
- "SIGPWR",
1239
- "SIGSTKFLT",
1240
- "SIGUNUSED"
1241
- );
1236
+ signals.push("SIGIO", "SIGPOLL", "SIGPWR", "SIGSTKFLT");
1242
1237
  }
1243
1238
  }
1244
1239
  });
1245
1240
 
1246
- // node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js
1247
- var require_signal_exit = __commonJS({
1248
- "node_modules/.pnpm/signal-exit@3.0.7/node_modules/signal-exit/index.js"(exports, module2) {
1241
+ // node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js
1242
+ var processOk, kExitEmitter, global2, ObjectDefineProperty, Emitter, SignalExitBase, signalExitWrap, SignalExitFallback, SignalExit, process4, onExit, load, unload;
1243
+ var init_mjs = __esm({
1244
+ "node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/index.js"() {
1249
1245
  "use strict";
1250
- var process6 = global.process;
1251
- var processOk = function(process7) {
1252
- 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";
1246
+ init_signals2();
1247
+ 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";
1248
+ kExitEmitter = Symbol.for("signal-exit emitter");
1249
+ global2 = globalThis;
1250
+ ObjectDefineProperty = Object.defineProperty.bind(Object);
1251
+ Emitter = class {
1252
+ emitted = {
1253
+ afterExit: false,
1254
+ exit: false
1255
+ };
1256
+ listeners = {
1257
+ afterExit: [],
1258
+ exit: []
1259
+ };
1260
+ count = 0;
1261
+ id = Math.random();
1262
+ constructor() {
1263
+ if (global2[kExitEmitter]) {
1264
+ return global2[kExitEmitter];
1265
+ }
1266
+ ObjectDefineProperty(global2, kExitEmitter, {
1267
+ value: this,
1268
+ writable: false,
1269
+ enumerable: false,
1270
+ configurable: false
1271
+ });
1272
+ }
1273
+ on(ev, fn) {
1274
+ this.listeners[ev].push(fn);
1275
+ }
1276
+ removeListener(ev, fn) {
1277
+ const list = this.listeners[ev];
1278
+ const i = list.indexOf(fn);
1279
+ if (i === -1) {
1280
+ return;
1281
+ }
1282
+ if (i === 0 && list.length === 1) {
1283
+ list.length = 0;
1284
+ } else {
1285
+ list.splice(i, 1);
1286
+ }
1287
+ }
1288
+ emit(ev, code, signal) {
1289
+ if (this.emitted[ev]) {
1290
+ return false;
1291
+ }
1292
+ this.emitted[ev] = true;
1293
+ let ret = false;
1294
+ for (const fn of this.listeners[ev]) {
1295
+ ret = fn(code, signal) === true || ret;
1296
+ }
1297
+ if (ev === "exit") {
1298
+ ret = this.emit("afterExit", code, signal) || ret;
1299
+ }
1300
+ return ret;
1301
+ }
1253
1302
  };
1254
- if (!processOk(process6)) {
1255
- module2.exports = function() {
1256
- return function() {
1257
- };
1303
+ SignalExitBase = class {
1304
+ };
1305
+ signalExitWrap = (handler) => {
1306
+ return {
1307
+ onExit(cb, opts) {
1308
+ return handler.onExit(cb, opts);
1309
+ },
1310
+ load() {
1311
+ return handler.load();
1312
+ },
1313
+ unload() {
1314
+ return handler.unload();
1315
+ }
1258
1316
  };
1259
- } else {
1260
- assert = require("assert");
1261
- signals = require_signals();
1262
- isWin = /^win/i.test(process6.platform);
1263
- EE = require("events");
1264
- if (typeof EE !== "function") {
1265
- EE = EE.EventEmitter;
1266
- }
1267
- if (process6.__signal_exit_emitter__) {
1268
- emitter = process6.__signal_exit_emitter__;
1269
- } else {
1270
- emitter = process6.__signal_exit_emitter__ = new EE();
1271
- emitter.count = 0;
1272
- emitter.emitted = {};
1317
+ };
1318
+ SignalExitFallback = class extends SignalExitBase {
1319
+ onExit() {
1320
+ return () => {
1321
+ };
1273
1322
  }
1274
- if (!emitter.infinite) {
1275
- emitter.setMaxListeners(Infinity);
1276
- emitter.infinite = true;
1323
+ load() {
1277
1324
  }
1278
- module2.exports = function(cb, opts) {
1279
- if (!processOk(global.process)) {
1280
- return function() {
1325
+ unload() {
1326
+ }
1327
+ };
1328
+ SignalExit = class extends SignalExitBase {
1329
+ // "SIGHUP" throws an `ENOSYS` error on Windows,
1330
+ // so use a supported signal instead
1331
+ /* c8 ignore start */
1332
+ #hupSig = process4.platform === "win32" ? "SIGINT" : "SIGHUP";
1333
+ /* c8 ignore stop */
1334
+ #emitter = new Emitter();
1335
+ #process;
1336
+ #originalProcessEmit;
1337
+ #originalProcessReallyExit;
1338
+ #sigListeners = {};
1339
+ #loaded = false;
1340
+ constructor(process7) {
1341
+ super();
1342
+ this.#process = process7;
1343
+ this.#sigListeners = {};
1344
+ for (const sig of signals) {
1345
+ this.#sigListeners[sig] = () => {
1346
+ const listeners = this.#process.listeners(sig);
1347
+ let { count } = this.#emitter;
1348
+ const p = process7;
1349
+ if (typeof p.__signal_exit_emitter__ === "object" && typeof p.__signal_exit_emitter__.count === "number") {
1350
+ count += p.__signal_exit_emitter__.count;
1351
+ }
1352
+ if (listeners.length === count) {
1353
+ this.unload();
1354
+ const ret = this.#emitter.emit("exit", null, sig);
1355
+ const s = sig === "SIGHUP" ? this.#hupSig : sig;
1356
+ if (!ret)
1357
+ process7.kill(process7.pid, s);
1358
+ }
1281
1359
  };
1282
1360
  }
1283
- assert.equal(typeof cb, "function", "a callback must be provided for exit handler");
1284
- if (loaded === false) {
1285
- load();
1361
+ this.#originalProcessReallyExit = process7.reallyExit;
1362
+ this.#originalProcessEmit = process7.emit;
1363
+ }
1364
+ onExit(cb, opts) {
1365
+ if (!processOk(this.#process)) {
1366
+ return () => {
1367
+ };
1286
1368
  }
1287
- var ev = "exit";
1288
- if (opts && opts.alwaysLast) {
1289
- ev = "afterexit";
1369
+ if (this.#loaded === false) {
1370
+ this.load();
1290
1371
  }
1291
- var remove = function() {
1292
- emitter.removeListener(ev, cb);
1293
- if (emitter.listeners("exit").length === 0 && emitter.listeners("afterexit").length === 0) {
1294
- unload();
1372
+ const ev = opts?.alwaysLast ? "afterExit" : "exit";
1373
+ this.#emitter.on(ev, cb);
1374
+ return () => {
1375
+ this.#emitter.removeListener(ev, cb);
1376
+ if (this.#emitter.listeners["exit"].length === 0 && this.#emitter.listeners["afterExit"].length === 0) {
1377
+ this.unload();
1295
1378
  }
1296
1379
  };
1297
- emitter.on(ev, cb);
1298
- return remove;
1299
- };
1300
- unload = function unload2() {
1301
- if (!loaded || !processOk(global.process)) {
1380
+ }
1381
+ load() {
1382
+ if (this.#loaded) {
1302
1383
  return;
1303
1384
  }
1304
- loaded = false;
1305
- signals.forEach(function(sig) {
1385
+ this.#loaded = true;
1386
+ this.#emitter.count += 1;
1387
+ for (const sig of signals) {
1306
1388
  try {
1307
- process6.removeListener(sig, sigListeners[sig]);
1308
- } catch (er) {
1389
+ const fn = this.#sigListeners[sig];
1390
+ if (fn)
1391
+ this.#process.on(sig, fn);
1392
+ } catch (_) {
1309
1393
  }
1310
- });
1311
- process6.emit = originalProcessEmit;
1312
- process6.reallyExit = originalProcessReallyExit;
1313
- emitter.count -= 1;
1314
- };
1315
- module2.exports.unload = unload;
1316
- emit = function emit2(event, code, signal) {
1317
- if (emitter.emitted[event]) {
1318
- return;
1319
1394
  }
1320
- emitter.emitted[event] = true;
1321
- emitter.emit(event, code, signal);
1322
- };
1323
- sigListeners = {};
1324
- signals.forEach(function(sig) {
1325
- sigListeners[sig] = function listener() {
1326
- if (!processOk(global.process)) {
1327
- return;
1328
- }
1329
- var listeners = process6.listeners(sig);
1330
- if (listeners.length === emitter.count) {
1331
- unload();
1332
- emit("exit", null, sig);
1333
- emit("afterexit", null, sig);
1334
- if (isWin && sig === "SIGHUP") {
1335
- sig = "SIGINT";
1336
- }
1337
- process6.kill(process6.pid, sig);
1338
- }
1395
+ this.#process.emit = (ev, ...a) => {
1396
+ return this.#processEmit(ev, ...a);
1339
1397
  };
1340
- });
1341
- module2.exports.signals = function() {
1342
- return signals;
1343
- };
1344
- loaded = false;
1345
- load = function load2() {
1346
- if (loaded || !processOk(global.process)) {
1398
+ this.#process.reallyExit = (code) => {
1399
+ return this.#processReallyExit(code);
1400
+ };
1401
+ }
1402
+ unload() {
1403
+ if (!this.#loaded) {
1347
1404
  return;
1348
1405
  }
1349
- loaded = true;
1350
- emitter.count += 1;
1351
- signals = signals.filter(function(sig) {
1406
+ this.#loaded = false;
1407
+ signals.forEach((sig) => {
1408
+ const listener = this.#sigListeners[sig];
1409
+ if (!listener) {
1410
+ throw new Error("Listener not defined for signal: " + sig);
1411
+ }
1352
1412
  try {
1353
- process6.on(sig, sigListeners[sig]);
1354
- return true;
1355
- } catch (er) {
1356
- return false;
1413
+ this.#process.removeListener(sig, listener);
1414
+ } catch (_) {
1357
1415
  }
1358
1416
  });
1359
- process6.emit = processEmit;
1360
- process6.reallyExit = processReallyExit;
1361
- };
1362
- module2.exports.load = load;
1363
- originalProcessReallyExit = process6.reallyExit;
1364
- processReallyExit = function processReallyExit2(code) {
1365
- if (!processOk(global.process)) {
1366
- return;
1417
+ this.#process.emit = this.#originalProcessEmit;
1418
+ this.#process.reallyExit = this.#originalProcessReallyExit;
1419
+ this.#emitter.count -= 1;
1420
+ }
1421
+ #processReallyExit(code) {
1422
+ if (!processOk(this.#process)) {
1423
+ return 0;
1367
1424
  }
1368
- process6.exitCode = code || /* istanbul ignore next */
1369
- 0;
1370
- emit("exit", process6.exitCode, null);
1371
- emit("afterexit", process6.exitCode, null);
1372
- originalProcessReallyExit.call(process6, process6.exitCode);
1373
- };
1374
- originalProcessEmit = process6.emit;
1375
- processEmit = function processEmit2(ev, arg) {
1376
- if (ev === "exit" && processOk(global.process)) {
1377
- if (arg !== void 0) {
1378
- process6.exitCode = arg;
1425
+ this.#process.exitCode = code || 0;
1426
+ this.#emitter.emit("exit", this.#process.exitCode, null);
1427
+ return this.#originalProcessReallyExit.call(this.#process, this.#process.exitCode);
1428
+ }
1429
+ #processEmit(ev, ...args) {
1430
+ const og = this.#originalProcessEmit;
1431
+ if (ev === "exit" && processOk(this.#process)) {
1432
+ if (typeof args[0] === "number") {
1433
+ this.#process.exitCode = args[0];
1379
1434
  }
1380
- var ret = originalProcessEmit.apply(this, arguments);
1381
- emit("exit", process6.exitCode, null);
1382
- emit("afterexit", process6.exitCode, null);
1435
+ const ret = og.call(this.#process, ev, ...args);
1436
+ this.#emitter.emit("exit", this.#process.exitCode, null);
1383
1437
  return ret;
1384
1438
  } else {
1385
- return originalProcessEmit.apply(this, arguments);
1439
+ return og.call(this.#process, ev, ...args);
1386
1440
  }
1387
- };
1388
- }
1389
- var assert;
1390
- var signals;
1391
- var isWin;
1392
- var EE;
1393
- var emitter;
1394
- var unload;
1395
- var emit;
1396
- var sigListeners;
1397
- var loaded;
1398
- var load;
1399
- var originalProcessReallyExit;
1400
- var processReallyExit;
1401
- var originalProcessEmit;
1402
- var processEmit;
1441
+ }
1442
+ };
1443
+ process4 = globalThis.process;
1444
+ ({
1445
+ onExit: (
1446
+ /**
1447
+ * Called when the process is exiting, whether via signal, explicit
1448
+ * exit, or running out of stuff to do.
1449
+ *
1450
+ * If the global process object is not suitable for instrumentation,
1451
+ * then this will be a no-op.
1452
+ *
1453
+ * Returns a function that may be used to unload signal-exit.
1454
+ */
1455
+ onExit
1456
+ ),
1457
+ load: (
1458
+ /**
1459
+ * Load the listeners. Likely you never need to call this, unless
1460
+ * doing a rather deep integration with signal-exit functionality.
1461
+ * Mostly exposed for the benefit of testing.
1462
+ *
1463
+ * @internal
1464
+ */
1465
+ load
1466
+ ),
1467
+ unload: (
1468
+ /**
1469
+ * Unload the listeners. Likely you never need to call this, unless
1470
+ * doing a rather deep integration with signal-exit functionality.
1471
+ * Mostly exposed for the benefit of testing.
1472
+ *
1473
+ * @internal
1474
+ */
1475
+ unload
1476
+ )
1477
+ } = signalExitWrap(processOk(process4) ? new SignalExit(process4) : new SignalExitFallback()));
1403
1478
  }
1404
1479
  });
1405
1480
 
1406
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/kill.js
1407
- var import_node_os3, import_signal_exit, DEFAULT_FORCE_KILL_TIMEOUT, spawnedKill, setKillTimeout, shouldForceKill, isSigterm, getForceKillAfterTimeout, spawnedCancel, timeoutKill, setupTimeout, validateTimeout, setExitHandler;
1481
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/kill.js
1482
+ var import_node_os3, DEFAULT_FORCE_KILL_TIMEOUT, spawnedKill, setKillTimeout, shouldForceKill, isSigterm, getForceKillAfterTimeout, spawnedCancel, timeoutKill, setupTimeout, validateTimeout, setExitHandler;
1408
1483
  var init_kill = __esm({
1409
- "node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/kill.js"() {
1484
+ "node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/kill.js"() {
1410
1485
  "use strict";
1411
1486
  import_node_os3 = __toESM(require("os"), 1);
1412
- import_signal_exit = __toESM(require_signal_exit(), 1);
1487
+ init_mjs();
1413
1488
  DEFAULT_FORCE_KILL_TIMEOUT = 1e3 * 5;
1414
1489
  spawnedKill = (kill, signal = "SIGTERM", options = {}) => {
1415
1490
  const killResult = kill(signal);
@@ -1473,7 +1548,7 @@ var init_kill = __esm({
1473
1548
  if (!cleanup || detached) {
1474
1549
  return timedPromise;
1475
1550
  }
1476
- const removeExitHandler = (0, import_signal_exit.default)(() => {
1551
+ const removeExitHandler = onExit(() => {
1477
1552
  spawned.kill();
1478
1553
  });
1479
1554
  return timedPromise.finally(() => {
@@ -1496,10 +1571,10 @@ var init_is_stream = __esm({
1496
1571
  }
1497
1572
  });
1498
1573
 
1499
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/pipe.js
1574
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/pipe.js
1500
1575
  var import_node_fs, import_node_child_process, isExecaChildProcess, pipeToTarget, addPipeMethods;
1501
1576
  var init_pipe = __esm({
1502
- "node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/pipe.js"() {
1577
+ "node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/pipe.js"() {
1503
1578
  "use strict";
1504
1579
  import_node_fs = require("fs");
1505
1580
  import_node_child_process = require("child_process");
@@ -1537,103 +1612,241 @@ var init_pipe = __esm({
1537
1612
  }
1538
1613
  });
1539
1614
 
1540
- // node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js
1541
- var require_buffer_stream = __commonJS({
1542
- "node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/buffer-stream.js"(exports, module2) {
1615
+ // node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/contents.js
1616
+ var getStreamContents, appendFinalChunk, appendChunk, addNewChunk, isAsyncIterable, getChunkType, objectToString, MaxBufferError;
1617
+ var init_contents = __esm({
1618
+ "node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/contents.js"() {
1543
1619
  "use strict";
1544
- var { PassThrough: PassThroughStream } = require("stream");
1545
- module2.exports = (options) => {
1546
- options = { ...options };
1547
- const { array } = options;
1548
- let { encoding } = options;
1549
- const isBuffer = encoding === "buffer";
1550
- let objectMode = false;
1551
- if (array) {
1552
- objectMode = !(encoding || isBuffer);
1553
- } else {
1554
- encoding = encoding || "utf8";
1620
+ getStreamContents = async (stream, { init, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, finalize }, { maxBuffer = Number.POSITIVE_INFINITY } = {}) => {
1621
+ if (!isAsyncIterable(stream)) {
1622
+ throw new Error("The first argument must be a Readable, a ReadableStream, or an async iterable.");
1555
1623
  }
1556
- if (isBuffer) {
1557
- encoding = null;
1624
+ const state = init();
1625
+ state.length = 0;
1626
+ try {
1627
+ for await (const chunk of stream) {
1628
+ const chunkType = getChunkType(chunk);
1629
+ const convertedChunk = convertChunk[chunkType](chunk, state);
1630
+ appendChunk({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer });
1631
+ }
1632
+ appendFinalChunk({ state, convertChunk, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer });
1633
+ return finalize(state);
1634
+ } catch (error) {
1635
+ error.bufferedData = finalize(state);
1636
+ throw error;
1558
1637
  }
1559
- const stream = new PassThroughStream({ objectMode });
1560
- if (encoding) {
1561
- stream.setEncoding(encoding);
1638
+ };
1639
+ appendFinalChunk = ({ state, getSize, truncateChunk, addChunk, getFinalChunk, maxBuffer }) => {
1640
+ const convertedChunk = getFinalChunk(state);
1641
+ if (convertedChunk !== void 0) {
1642
+ appendChunk({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer });
1643
+ }
1644
+ };
1645
+ appendChunk = ({ convertedChunk, state, getSize, truncateChunk, addChunk, maxBuffer }) => {
1646
+ const chunkSize = getSize(convertedChunk);
1647
+ const newLength = state.length + chunkSize;
1648
+ if (newLength <= maxBuffer) {
1649
+ addNewChunk(convertedChunk, state, addChunk, newLength);
1650
+ return;
1651
+ }
1652
+ const truncatedChunk = truncateChunk(convertedChunk, maxBuffer - state.length);
1653
+ if (truncatedChunk !== void 0) {
1654
+ addNewChunk(truncatedChunk, state, addChunk, maxBuffer);
1655
+ }
1656
+ throw new MaxBufferError();
1657
+ };
1658
+ addNewChunk = (convertedChunk, state, addChunk, newLength) => {
1659
+ state.contents = addChunk(convertedChunk, state, newLength);
1660
+ state.length = newLength;
1661
+ };
1662
+ isAsyncIterable = (stream) => typeof stream === "object" && stream !== null && typeof stream[Symbol.asyncIterator] === "function";
1663
+ getChunkType = (chunk) => {
1664
+ const typeOfChunk = typeof chunk;
1665
+ if (typeOfChunk === "string") {
1666
+ return "string";
1667
+ }
1668
+ if (typeOfChunk !== "object" || chunk === null) {
1669
+ return "others";
1670
+ }
1671
+ if (globalThis.Buffer?.isBuffer(chunk)) {
1672
+ return "buffer";
1673
+ }
1674
+ const prototypeName = objectToString.call(chunk);
1675
+ if (prototypeName === "[object ArrayBuffer]") {
1676
+ return "arrayBuffer";
1677
+ }
1678
+ if (prototypeName === "[object DataView]") {
1679
+ return "dataView";
1680
+ }
1681
+ if (Number.isInteger(chunk.byteLength) && Number.isInteger(chunk.byteOffset) && objectToString.call(chunk.buffer) === "[object ArrayBuffer]") {
1682
+ return "typedArray";
1683
+ }
1684
+ return "others";
1685
+ };
1686
+ ({ toString: objectToString } = Object.prototype);
1687
+ MaxBufferError = class extends Error {
1688
+ name = "MaxBufferError";
1689
+ constructor() {
1690
+ super("maxBuffer exceeded");
1562
1691
  }
1563
- let length = 0;
1564
- const chunks = [];
1565
- stream.on("data", (chunk) => {
1566
- chunks.push(chunk);
1567
- if (objectMode) {
1568
- length = chunks.length;
1569
- } else {
1570
- length += chunk.length;
1571
- }
1572
- });
1573
- stream.getBufferedValue = () => {
1574
- if (array) {
1575
- return chunks;
1576
- }
1577
- return isBuffer ? Buffer.concat(chunks, length) : chunks.join("");
1578
- };
1579
- stream.getBufferedLength = () => length;
1580
- return stream;
1581
1692
  };
1582
1693
  }
1583
1694
  });
1584
1695
 
1585
- // node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js
1586
- var require_get_stream = __commonJS({
1587
- "node_modules/.pnpm/get-stream@6.0.1/node_modules/get-stream/index.js"(exports, module2) {
1696
+ // node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/utils.js
1697
+ var identity, noop, getContentsProp, throwObjectStream, getLengthProp;
1698
+ var init_utils = __esm({
1699
+ "node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/utils.js"() {
1588
1700
  "use strict";
1589
- var { constants: BufferConstants } = require("buffer");
1590
- var stream = require("stream");
1591
- var { promisify } = require("util");
1592
- var bufferStream = require_buffer_stream();
1593
- var streamPipelinePromisified = promisify(stream.pipeline);
1594
- var MaxBufferError = class extends Error {
1595
- constructor() {
1596
- super("maxBuffer exceeded");
1597
- this.name = "MaxBufferError";
1701
+ identity = (value) => value;
1702
+ noop = () => void 0;
1703
+ getContentsProp = ({ contents }) => contents;
1704
+ throwObjectStream = (chunk) => {
1705
+ throw new Error(`Streams in object mode are not supported: ${String(chunk)}`);
1706
+ };
1707
+ getLengthProp = (convertedChunk) => convertedChunk.length;
1708
+ }
1709
+ });
1710
+
1711
+ // node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array.js
1712
+ var init_array = __esm({
1713
+ "node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array.js"() {
1714
+ "use strict";
1715
+ init_contents();
1716
+ init_utils();
1717
+ }
1718
+ });
1719
+
1720
+ // node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array-buffer.js
1721
+ async function getStreamAsArrayBuffer(stream, options) {
1722
+ return getStreamContents(stream, arrayBufferMethods, options);
1723
+ }
1724
+ var initArrayBuffer, useTextEncoder, textEncoder, useUint8Array, useUint8ArrayWithOffset, truncateArrayBufferChunk, addArrayBufferChunk, resizeArrayBufferSlow, resizeArrayBuffer, getNewContentsLength, SCALE_FACTOR, finalizeArrayBuffer, hasArrayBufferResize, arrayBufferMethods;
1725
+ var init_array_buffer = __esm({
1726
+ "node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/array-buffer.js"() {
1727
+ "use strict";
1728
+ init_contents();
1729
+ init_utils();
1730
+ initArrayBuffer = () => ({ contents: new ArrayBuffer(0) });
1731
+ useTextEncoder = (chunk) => textEncoder.encode(chunk);
1732
+ textEncoder = new TextEncoder();
1733
+ useUint8Array = (chunk) => new Uint8Array(chunk);
1734
+ useUint8ArrayWithOffset = (chunk) => new Uint8Array(chunk.buffer, chunk.byteOffset, chunk.byteLength);
1735
+ truncateArrayBufferChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);
1736
+ addArrayBufferChunk = (convertedChunk, { contents, length: previousLength }, length) => {
1737
+ const newContents = hasArrayBufferResize() ? resizeArrayBuffer(contents, length) : resizeArrayBufferSlow(contents, length);
1738
+ new Uint8Array(newContents).set(convertedChunk, previousLength);
1739
+ return newContents;
1740
+ };
1741
+ resizeArrayBufferSlow = (contents, length) => {
1742
+ if (length <= contents.byteLength) {
1743
+ return contents;
1598
1744
  }
1745
+ const arrayBuffer = new ArrayBuffer(getNewContentsLength(length));
1746
+ new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);
1747
+ return arrayBuffer;
1599
1748
  };
1600
- async function getStream2(inputStream, options) {
1601
- if (!inputStream) {
1602
- throw new Error("Expected a stream");
1749
+ resizeArrayBuffer = (contents, length) => {
1750
+ if (length <= contents.maxByteLength) {
1751
+ contents.resize(length);
1752
+ return contents;
1603
1753
  }
1604
- options = {
1605
- maxBuffer: Infinity,
1606
- ...options
1607
- };
1608
- const { maxBuffer } = options;
1609
- const stream2 = bufferStream(options);
1610
- await new Promise((resolve14, reject) => {
1611
- const rejectPromise = (error) => {
1612
- if (error && stream2.getBufferedLength() <= BufferConstants.MAX_LENGTH) {
1613
- error.bufferedData = stream2.getBufferedValue();
1614
- }
1615
- reject(error);
1616
- };
1617
- (async () => {
1618
- try {
1619
- await streamPipelinePromisified(inputStream, stream2);
1620
- resolve14();
1621
- } catch (error) {
1622
- rejectPromise(error);
1623
- }
1624
- })();
1625
- stream2.on("data", () => {
1626
- if (stream2.getBufferedLength() > maxBuffer) {
1627
- rejectPromise(new MaxBufferError());
1628
- }
1629
- });
1630
- });
1631
- return stream2.getBufferedValue();
1754
+ const arrayBuffer = new ArrayBuffer(length, { maxByteLength: getNewContentsLength(length) });
1755
+ new Uint8Array(arrayBuffer).set(new Uint8Array(contents), 0);
1756
+ return arrayBuffer;
1757
+ };
1758
+ getNewContentsLength = (length) => SCALE_FACTOR ** Math.ceil(Math.log(length) / Math.log(SCALE_FACTOR));
1759
+ SCALE_FACTOR = 2;
1760
+ finalizeArrayBuffer = ({ contents, length }) => hasArrayBufferResize() ? contents : contents.slice(0, length);
1761
+ hasArrayBufferResize = () => "resize" in ArrayBuffer.prototype;
1762
+ arrayBufferMethods = {
1763
+ init: initArrayBuffer,
1764
+ convertChunk: {
1765
+ string: useTextEncoder,
1766
+ buffer: useUint8Array,
1767
+ arrayBuffer: useUint8Array,
1768
+ dataView: useUint8ArrayWithOffset,
1769
+ typedArray: useUint8ArrayWithOffset,
1770
+ others: throwObjectStream
1771
+ },
1772
+ getSize: getLengthProp,
1773
+ truncateChunk: truncateArrayBufferChunk,
1774
+ addChunk: addArrayBufferChunk,
1775
+ getFinalChunk: noop,
1776
+ finalize: finalizeArrayBuffer
1777
+ };
1778
+ }
1779
+ });
1780
+
1781
+ // node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/buffer.js
1782
+ async function getStreamAsBuffer(stream, options) {
1783
+ if (!("Buffer" in globalThis)) {
1784
+ throw new Error("getStreamAsBuffer() is only supported in Node.js");
1785
+ }
1786
+ try {
1787
+ return arrayBufferToNodeBuffer(await getStreamAsArrayBuffer(stream, options));
1788
+ } catch (error) {
1789
+ if (error.bufferedData !== void 0) {
1790
+ error.bufferedData = arrayBufferToNodeBuffer(error.bufferedData);
1632
1791
  }
1633
- module2.exports = getStream2;
1634
- module2.exports.buffer = (stream2, options) => getStream2(stream2, { ...options, encoding: "buffer" });
1635
- module2.exports.array = (stream2, options) => getStream2(stream2, { ...options, array: true });
1636
- module2.exports.MaxBufferError = MaxBufferError;
1792
+ throw error;
1793
+ }
1794
+ }
1795
+ var arrayBufferToNodeBuffer;
1796
+ var init_buffer = __esm({
1797
+ "node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/buffer.js"() {
1798
+ "use strict";
1799
+ init_array_buffer();
1800
+ arrayBufferToNodeBuffer = (arrayBuffer) => globalThis.Buffer.from(arrayBuffer);
1801
+ }
1802
+ });
1803
+
1804
+ // node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/string.js
1805
+ async function getStreamAsString(stream, options) {
1806
+ return getStreamContents(stream, stringMethods, options);
1807
+ }
1808
+ var initString, useTextDecoder, addStringChunk, truncateStringChunk, getFinalStringChunk, stringMethods;
1809
+ var init_string = __esm({
1810
+ "node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/string.js"() {
1811
+ "use strict";
1812
+ init_contents();
1813
+ init_utils();
1814
+ initString = () => ({ contents: "", textDecoder: new TextDecoder() });
1815
+ useTextDecoder = (chunk, { textDecoder }) => textDecoder.decode(chunk, { stream: true });
1816
+ addStringChunk = (convertedChunk, { contents }) => contents + convertedChunk;
1817
+ truncateStringChunk = (convertedChunk, chunkSize) => convertedChunk.slice(0, chunkSize);
1818
+ getFinalStringChunk = ({ textDecoder }) => {
1819
+ const finalChunk = textDecoder.decode();
1820
+ return finalChunk === "" ? void 0 : finalChunk;
1821
+ };
1822
+ stringMethods = {
1823
+ init: initString,
1824
+ convertChunk: {
1825
+ string: identity,
1826
+ buffer: useTextDecoder,
1827
+ arrayBuffer: useTextDecoder,
1828
+ dataView: useTextDecoder,
1829
+ typedArray: useTextDecoder,
1830
+ others: throwObjectStream
1831
+ },
1832
+ getSize: getLengthProp,
1833
+ truncateChunk: truncateStringChunk,
1834
+ addChunk: addStringChunk,
1835
+ getFinalChunk: getFinalStringChunk,
1836
+ finalize: getContentsProp
1837
+ };
1838
+ }
1839
+ });
1840
+
1841
+ // node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/index.js
1842
+ var init_source = __esm({
1843
+ "node_modules/.pnpm/get-stream@8.0.1/node_modules/get-stream/source/index.js"() {
1844
+ "use strict";
1845
+ init_array();
1846
+ init_array_buffer();
1847
+ init_buffer();
1848
+ init_string();
1849
+ init_contents();
1637
1850
  }
1638
1851
  });
1639
1852
 
@@ -1677,14 +1890,15 @@ var require_merge_stream = __commonJS({
1677
1890
  }
1678
1891
  });
1679
1892
 
1680
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/stream.js
1681
- var import_node_fs2, import_get_stream, import_merge_stream, validateInputOptions, getInputSync, handleInputSync, getInput, handleInput, makeAllStream, getBufferedData, getStreamPromise, getSpawnedResult;
1893
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stream.js
1894
+ var import_node_fs2, import_promises, import_merge_stream, validateInputOptions, getInputSync, handleInputSync, getInput, handleInput, makeAllStream, getBufferedData, getStreamPromise, applyEncoding, getSpawnedResult;
1682
1895
  var init_stream = __esm({
1683
- "node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/stream.js"() {
1896
+ "node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/stream.js"() {
1684
1897
  "use strict";
1685
1898
  import_node_fs2 = require("fs");
1899
+ import_promises = require("timers/promises");
1686
1900
  init_is_stream();
1687
- import_get_stream = __toESM(require_get_stream(), 1);
1901
+ init_source();
1688
1902
  import_merge_stream = __toESM(require_merge_stream(), 1);
1689
1903
  validateInputOptions = (input) => {
1690
1904
  if (input !== void 0) {
@@ -1740,6 +1954,7 @@ var init_stream = __esm({
1740
1954
  if (!stream || streamPromise === void 0) {
1741
1955
  return;
1742
1956
  }
1957
+ await (0, import_promises.setTimeout)(0);
1743
1958
  stream.destroy();
1744
1959
  try {
1745
1960
  return await streamPromise;
@@ -1751,10 +1966,17 @@ var init_stream = __esm({
1751
1966
  if (!stream || !buffer) {
1752
1967
  return;
1753
1968
  }
1754
- if (encoding) {
1755
- return (0, import_get_stream.default)(stream, { encoding, maxBuffer });
1969
+ if (encoding === "utf8" || encoding === "utf-8") {
1970
+ return getStreamAsString(stream, { maxBuffer });
1756
1971
  }
1757
- return import_get_stream.default.buffer(stream, { maxBuffer });
1972
+ if (encoding === null || encoding === "buffer") {
1973
+ return getStreamAsBuffer(stream, { maxBuffer });
1974
+ }
1975
+ return applyEncoding(stream, maxBuffer, encoding);
1976
+ };
1977
+ applyEncoding = async (stream, maxBuffer, encoding) => {
1978
+ const buffer = await getStreamAsBuffer(stream, { maxBuffer });
1979
+ return buffer.toString(encoding);
1758
1980
  };
1759
1981
  getSpawnedResult = async ({ stdout, stderr, all }, { encoding, buffer, maxBuffer }, processDone) => {
1760
1982
  const stdoutPromise = getStreamPromise(stdout, { encoding, buffer, maxBuffer });
@@ -1774,10 +1996,10 @@ var init_stream = __esm({
1774
1996
  }
1775
1997
  });
1776
1998
 
1777
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/promise.js
1999
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/promise.js
1778
2000
  var nativePromisePrototype, descriptors, mergePromise, getSpawnedPromise;
1779
2001
  var init_promise = __esm({
1780
- "node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/promise.js"() {
2002
+ "node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/promise.js"() {
1781
2003
  "use strict";
1782
2004
  nativePromisePrototype = (/* @__PURE__ */ (async () => {
1783
2005
  })()).constructor.prototype;
@@ -1807,10 +2029,10 @@ var init_promise = __esm({
1807
2029
  }
1808
2030
  });
1809
2031
 
1810
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/command.js
1811
- var import_node_buffer, import_node_child_process2, normalizeArgs, NO_ESCAPE_REGEXP, DOUBLE_QUOTES_REGEXP, escapeArg, joinCommand, getEscapedCommand, SPACES_REGEXP, parseCommand, parseExpression, concatTokens, parseTemplate, parseTemplates;
2032
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/command.js
2033
+ var import_node_buffer, import_node_child_process2, normalizeArgs, NO_ESCAPE_REGEXP, escapeArg, joinCommand, getEscapedCommand, SPACES_REGEXP, parseCommand, parseExpression, concatTokens, parseTemplate, parseTemplates;
1812
2034
  var init_command = __esm({
1813
- "node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/command.js"() {
2035
+ "node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/command.js"() {
1814
2036
  "use strict";
1815
2037
  import_node_buffer = require("buffer");
1816
2038
  import_node_child_process2 = require("child_process");
@@ -1821,12 +2043,11 @@ var init_command = __esm({
1821
2043
  return [file, ...args];
1822
2044
  };
1823
2045
  NO_ESCAPE_REGEXP = /^[\w.-]+$/;
1824
- DOUBLE_QUOTES_REGEXP = /"/g;
1825
2046
  escapeArg = (arg) => {
1826
2047
  if (typeof arg !== "string" || NO_ESCAPE_REGEXP.test(arg)) {
1827
2048
  return arg;
1828
2049
  }
1829
- return `"${arg.replace(DOUBLE_QUOTES_REGEXP, '\\"')}"`;
2050
+ return `"${arg.replaceAll('"', '\\"')}"`;
1830
2051
  };
1831
2052
  joinCommand = (file, args) => normalizeArgs(file, args).join(" ");
1832
2053
  getEscapedCommand = (file, args) => normalizeArgs(file, args).map((arg) => escapeArg(arg)).join(" ");
@@ -1834,7 +2055,7 @@ var init_command = __esm({
1834
2055
  parseCommand = (command) => {
1835
2056
  const tokens = [];
1836
2057
  for (const token of command.trim().split(SPACES_REGEXP)) {
1837
- const previousToken = tokens[tokens.length - 1];
2058
+ const previousToken = tokens.at(-1);
1838
2059
  if (previousToken && previousToken.endsWith("\\")) {
1839
2060
  tokens[tokens.length - 1] = `${previousToken.slice(0, -1)} ${token}`;
1840
2061
  } else {
@@ -1865,7 +2086,7 @@ var init_command = __esm({
1865
2086
  };
1866
2087
  concatTokens = (tokens, nextTokens, isNew) => isNew || tokens.length === 0 || nextTokens.length === 0 ? [...tokens, ...nextTokens] : [
1867
2088
  ...tokens.slice(0, -1),
1868
- `${tokens[tokens.length - 1]}${nextTokens[0]}`,
2089
+ `${tokens.at(-1)}${nextTokens[0]}`,
1869
2090
  ...nextTokens.slice(1)
1870
2091
  ];
1871
2092
  parseTemplate = ({ templates, expressions, tokens, index, template }) => {
@@ -1897,10 +2118,10 @@ var init_command = __esm({
1897
2118
  }
1898
2119
  });
1899
2120
 
1900
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/verbose.js
2121
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/verbose.js
1901
2122
  var import_node_util, import_node_process3, verboseDefault, padField, getTimestamp, logCommand;
1902
2123
  var init_verbose = __esm({
1903
- "node_modules/.pnpm/execa@7.2.0/node_modules/execa/lib/verbose.js"() {
2124
+ "node_modules/.pnpm/execa@8.0.1/node_modules/execa/lib/verbose.js"() {
1904
2125
  "use strict";
1905
2126
  import_node_util = require("util");
1906
2127
  import_node_process3 = __toESM(require("process"), 1);
@@ -1920,7 +2141,7 @@ var init_verbose = __esm({
1920
2141
  }
1921
2142
  });
1922
2143
 
1923
- // node_modules/.pnpm/execa@7.2.0/node_modules/execa/index.js
2144
+ // node_modules/.pnpm/execa@8.0.1/node_modules/execa/index.js
1924
2145
  var execa_exports = {};
1925
2146
  __export(execa_exports, {
1926
2147
  $: () => $,
@@ -2118,7 +2339,7 @@ function execaNode(scriptPath, args, options = {}) {
2118
2339
  }
2119
2340
  var import_node_buffer2, import_node_path11, import_node_child_process3, import_node_process4, import_cross_spawn, DEFAULT_MAX_BUFFER, getEnv, handleArguments, handleOutput, normalizeScriptStdin, normalizeScriptOptions, $;
2120
2341
  var init_execa = __esm({
2121
- "node_modules/.pnpm/execa@7.2.0/node_modules/execa/index.js"() {
2342
+ "node_modules/.pnpm/execa@8.0.1/node_modules/execa/index.js"() {
2122
2343
  "use strict";
2123
2344
  import_node_buffer2 = require("buffer");
2124
2345
  import_node_path11 = __toESM(require("path"), 1);
@@ -2729,8 +2950,8 @@ function globals(config) {
2729
2950
  name: "wxt:globals",
2730
2951
  config() {
2731
2952
  const define = {};
2732
- for (const global2 of getGlobals(config)) {
2733
- define[global2.name] = JSON.stringify(global2.value);
2953
+ for (const global3 of getGlobals(config)) {
2954
+ define[global3.name] = JSON.stringify(global3.value);
2734
2955
  }
2735
2956
  return {
2736
2957
  define
@@ -2835,8 +3056,8 @@ async function buildSingleEntrypoint(entrypoint, config) {
2835
3056
  "process.env.NODE_ENV": JSON.stringify(config.mode)
2836
3057
  }
2837
3058
  };
2838
- for (const global2 of getEntrypointGlobals(config, entrypoint.name)) {
2839
- libMode.define[global2.name] = JSON.stringify(global2.value);
3059
+ for (const global3 of getEntrypointGlobals(config, entrypoint.name)) {
3060
+ libMode.define[global3.name] = JSON.stringify(global3.value);
2840
3061
  }
2841
3062
  const entryConfig = vite2.mergeConfig(
2842
3063
  libMode,
@@ -2869,8 +3090,8 @@ async function buildMultipleEntrypoints(entrypoints, config) {
2869
3090
  },
2870
3091
  define: {}
2871
3092
  };
2872
- for (const global2 of getEntrypointGlobals(config, "html")) {
2873
- multiPage.define[global2.name] = JSON.stringify(global2.value);
3093
+ for (const global3 of getEntrypointGlobals(config, "html")) {
3094
+ multiPage.define[global3.name] = JSON.stringify(global3.value);
2874
3095
  }
2875
3096
  const entryConfig = vite2.mergeConfig(
2876
3097
  multiPage,
@@ -3387,7 +3608,7 @@ async function writePathsDeclarationFile(entrypoints, config) {
3387
3608
  import "wxt/browser";
3388
3609
 
3389
3610
  declare module "wxt/browser" {
3390
- type PublicPath =
3611
+ export type PublicPath =
3391
3612
  {{ union }}
3392
3613
  export interface WxtRuntime extends Runtime.Static {
3393
3614
  getURL(path: PublicPath): string;
@@ -3462,7 +3683,7 @@ async function writeGlobalsDeclarationFile(config) {
3462
3683
  "// Generated by wxt",
3463
3684
  "export {}",
3464
3685
  "declare global {",
3465
- ...globals2.map((global2) => ` const ${global2.name}: ${global2.type};`),
3686
+ ...globals2.map((global3) => ` const ${global3.name}: ${global3.type};`),
3466
3687
  "}"
3467
3688
  ].join("\n") + "\n"
3468
3689
  );
@@ -3964,7 +4185,7 @@ function getChunkSortWeight(filename) {
3964
4185
  var import_picocolors3 = __toESM(require("picocolors"), 1);
3965
4186
 
3966
4187
  // package.json
3967
- var version = "0.8.6";
4188
+ var version = "0.8.7";
3968
4189
 
3969
4190
  // src/core/utils/log/printHeader.ts
3970
4191
  var import_consola2 = require("consola");