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