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/{chunk-VFZ5667B.js → chunk-2M222CNK.js} +3 -3
- package/dist/cli.cjs +512 -291
- package/dist/client.d.ts +87 -41
- package/dist/client.js +105 -65
- package/dist/{execa-WKZHVHC5.js → execa-Z7B33P3C.js} +494 -346
- package/dist/index.cjs +512 -291
- package/dist/index.d.cts +1 -1
- package/dist/index.d.ts +1 -1
- package/dist/index.js +1 -1
- package/dist/testing.js +1 -1
- package/package.json +21 -21
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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
|
|
1009
|
-
return
|
|
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@
|
|
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@
|
|
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
|
|
1039
|
-
return Object.fromEntries(
|
|
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
|
|
1052
|
+
const signals2 = getSignals();
|
|
1053
1053
|
const length = SIGRTMAX + 1;
|
|
1054
|
-
const signalsA = Array.from(
|
|
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,
|
|
1058
|
-
const signal = findSignalByNumber(number,
|
|
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,
|
|
1076
|
-
const signal =
|
|
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
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
1209
|
-
var
|
|
1210
|
-
|
|
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
|
-
|
|
1213
|
-
|
|
1214
|
-
"SIGALRM",
|
|
1215
|
-
"SIGHUP",
|
|
1216
|
-
"SIGINT",
|
|
1217
|
-
"SIGTERM"
|
|
1218
|
-
];
|
|
1216
|
+
signals = [];
|
|
1217
|
+
signals.push("SIGHUP", "SIGINT", "SIGTERM");
|
|
1219
1218
|
if (process.platform !== "win32") {
|
|
1220
|
-
|
|
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
|
-
|
|
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@
|
|
1247
|
-
var
|
|
1248
|
-
|
|
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
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
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
|
-
|
|
1255
|
-
|
|
1256
|
-
|
|
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
|
-
}
|
|
1260
|
-
|
|
1261
|
-
|
|
1262
|
-
|
|
1263
|
-
|
|
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
|
-
|
|
1275
|
-
emitter.setMaxListeners(Infinity);
|
|
1276
|
-
emitter.infinite = true;
|
|
1323
|
+
load() {
|
|
1277
1324
|
}
|
|
1278
|
-
|
|
1279
|
-
|
|
1280
|
-
|
|
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
|
-
|
|
1284
|
-
|
|
1285
|
-
|
|
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
|
-
|
|
1288
|
-
|
|
1289
|
-
ev = "afterexit";
|
|
1369
|
+
if (this.#loaded === false) {
|
|
1370
|
+
this.load();
|
|
1290
1371
|
}
|
|
1291
|
-
|
|
1292
|
-
|
|
1293
|
-
|
|
1294
|
-
|
|
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
|
-
|
|
1298
|
-
|
|
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 =
|
|
1305
|
-
|
|
1385
|
+
this.#loaded = true;
|
|
1386
|
+
this.#emitter.count += 1;
|
|
1387
|
+
for (const sig of signals) {
|
|
1306
1388
|
try {
|
|
1307
|
-
|
|
1308
|
-
|
|
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
|
-
|
|
1321
|
-
|
|
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
|
-
|
|
1342
|
-
|
|
1343
|
-
}
|
|
1344
|
-
|
|
1345
|
-
|
|
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 =
|
|
1350
|
-
|
|
1351
|
-
|
|
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
|
-
|
|
1354
|
-
|
|
1355
|
-
} catch (er) {
|
|
1356
|
-
return false;
|
|
1413
|
+
this.#process.removeListener(sig, listener);
|
|
1414
|
+
} catch (_) {
|
|
1357
1415
|
}
|
|
1358
1416
|
});
|
|
1359
|
-
|
|
1360
|
-
|
|
1361
|
-
|
|
1362
|
-
|
|
1363
|
-
|
|
1364
|
-
|
|
1365
|
-
|
|
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
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
|
|
1372
|
-
|
|
1373
|
-
|
|
1374
|
-
|
|
1375
|
-
|
|
1376
|
-
|
|
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
|
-
|
|
1381
|
-
emit("exit",
|
|
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
|
|
1439
|
+
return og.call(this.#process, ev, ...args);
|
|
1386
1440
|
}
|
|
1387
|
-
}
|
|
1388
|
-
}
|
|
1389
|
-
|
|
1390
|
-
|
|
1391
|
-
|
|
1392
|
-
|
|
1393
|
-
|
|
1394
|
-
|
|
1395
|
-
|
|
1396
|
-
|
|
1397
|
-
|
|
1398
|
-
|
|
1399
|
-
|
|
1400
|
-
|
|
1401
|
-
|
|
1402
|
-
|
|
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@
|
|
1407
|
-
var import_node_os3,
|
|
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@
|
|
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
|
-
|
|
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 = (
|
|
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@
|
|
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@
|
|
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@
|
|
1541
|
-
var
|
|
1542
|
-
|
|
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
|
-
|
|
1545
|
-
|
|
1546
|
-
|
|
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
|
-
|
|
1557
|
-
|
|
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
|
-
|
|
1560
|
-
|
|
1561
|
-
|
|
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@
|
|
1586
|
-
var
|
|
1587
|
-
|
|
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
|
-
|
|
1590
|
-
|
|
1591
|
-
|
|
1592
|
-
|
|
1593
|
-
|
|
1594
|
-
|
|
1595
|
-
|
|
1596
|
-
|
|
1597
|
-
|
|
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
|
-
|
|
1601
|
-
if (
|
|
1602
|
-
|
|
1749
|
+
resizeArrayBuffer = (contents, length) => {
|
|
1750
|
+
if (length <= contents.maxByteLength) {
|
|
1751
|
+
contents.resize(length);
|
|
1752
|
+
return contents;
|
|
1603
1753
|
}
|
|
1604
|
-
|
|
1605
|
-
|
|
1606
|
-
|
|
1607
|
-
|
|
1608
|
-
|
|
1609
|
-
|
|
1610
|
-
|
|
1611
|
-
|
|
1612
|
-
|
|
1613
|
-
|
|
1614
|
-
|
|
1615
|
-
|
|
1616
|
-
|
|
1617
|
-
|
|
1618
|
-
|
|
1619
|
-
|
|
1620
|
-
|
|
1621
|
-
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
|
|
1628
|
-
|
|
1629
|
-
|
|
1630
|
-
|
|
1631
|
-
|
|
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
|
-
|
|
1634
|
-
|
|
1635
|
-
|
|
1636
|
-
|
|
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@
|
|
1681
|
-
var import_node_fs2,
|
|
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@
|
|
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
|
-
|
|
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 (
|
|
1969
|
+
if (encoding === "utf8" || encoding === "utf-8") {
|
|
1970
|
+
return getStreamAsString(stream, { maxBuffer });
|
|
1756
1971
|
}
|
|
1757
|
-
|
|
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@
|
|
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@
|
|
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@
|
|
1811
|
-
var import_node_buffer, import_node_child_process2, normalizeArgs, NO_ESCAPE_REGEXP,
|
|
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@
|
|
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.
|
|
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
|
|
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
|
|
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@
|
|
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@
|
|
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@
|
|
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@
|
|
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
|
|
2733
|
-
define[
|
|
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
|
|
2839
|
-
libMode.define[
|
|
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
|
|
2873
|
-
multiPage.define[
|
|
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((
|
|
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.
|
|
4188
|
+
var version = "0.8.7";
|
|
3968
4189
|
|
|
3969
4190
|
// src/core/utils/log/printHeader.ts
|
|
3970
4191
|
var import_consola2 = require("consola");
|