brsh 3.10.2 → 3.10.4
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/CHANGELOG.md +14 -0
- package/dist/shell.es.js +604 -535
- package/dist/shell.es.js.map +1 -1
- package/dist/shell.min.js +15 -14
- package/dist/shell.min.js.map +1 -1
- package/dist/wbt.es.js +188 -88
- package/dist/wbt.es.js.map +1 -1
- package/dist/wbt.min.js +26 -12
- package/dist/wbt.min.js.map +1 -1
- package/index.js +21 -4
- package/lib/Command.js +3 -2
- package/lib/ScriptCommand.js +28 -10
- package/lib/WasmCommand.js +79 -12
- package/lib/wbt/index.js +43 -13
- package/lib/wbt/registry.js +18 -1
- package/package.json +1 -1
- package/test/devices-signals.test.js +194 -0
- package/test/doom.test.js +62 -3
- package/test/fixtures/nano.wasm +0 -0
- package/test/wbt.test.js +123 -4
package/dist/shell.es.js
CHANGED
|
@@ -96,7 +96,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
96
96
|
if (typeof e == "string") return g(e, t);
|
|
97
97
|
if (o.isView(e)) return y(e);
|
|
98
98
|
if (e == null) throw TypeError("The first argument must be one of type string, Buffer, ArrayBuffer, Array, or Array-like Object. Received type " + typeof e);
|
|
99
|
-
if (
|
|
99
|
+
if (X(e, o) || e && X(e.buffer, o) || s !== void 0 && (X(e, s) || e && X(e.buffer, s))) return b(e, t, n);
|
|
100
100
|
if (typeof e == "number") throw TypeError("The \"value\" argument must not be of type number. Received type number");
|
|
101
101
|
let r = e.valueOf && e.valueOf();
|
|
102
102
|
if (r != null && r !== e) return u.from(r, t, n);
|
|
@@ -137,7 +137,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
137
137
|
return n;
|
|
138
138
|
}
|
|
139
139
|
function y(e) {
|
|
140
|
-
if (
|
|
140
|
+
if (X(e, a)) {
|
|
141
141
|
let t = new a(e);
|
|
142
142
|
return b(t.buffer, t.byteOffset, t.byteLength);
|
|
143
143
|
}
|
|
@@ -154,7 +154,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
154
154
|
let t = S(e.length) | 0, n = l(t);
|
|
155
155
|
return n.length === 0 || e.copy(n, 0, 0, t), n;
|
|
156
156
|
}
|
|
157
|
-
if (e.length !== void 0) return typeof e.length != "number" ||
|
|
157
|
+
if (e.length !== void 0) return typeof e.length != "number" || pe(e.length) ? l(0) : _(e);
|
|
158
158
|
if (e.type === "Buffer" && Array.isArray(e.data)) return _(e.data);
|
|
159
159
|
}
|
|
160
160
|
function S(e) {
|
|
@@ -167,7 +167,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
167
167
|
u.isBuffer = function(e) {
|
|
168
168
|
return e != null && e._isBuffer === !0 && e !== u.prototype;
|
|
169
169
|
}, u.compare = function(e, t) {
|
|
170
|
-
if (
|
|
170
|
+
if (X(e, a) && (e = u.from(e, e.offset, e.byteLength)), X(t, a) && (t = u.from(t, t.offset, t.byteLength)), !u.isBuffer(e) || !u.isBuffer(t)) throw TypeError("The \"buf1\", \"buf2\" arguments must be one of type Buffer or Uint8Array");
|
|
171
171
|
if (e === t) return 0;
|
|
172
172
|
let n = e.length, r = t.length;
|
|
173
173
|
for (let i = 0, a = Math.min(n, r); i < a; ++i) if (e[i] !== t[i]) {
|
|
@@ -198,7 +198,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
198
198
|
let r = u.allocUnsafe(t), i = 0;
|
|
199
199
|
for (n = 0; n < e.length; ++n) {
|
|
200
200
|
let t = e[n];
|
|
201
|
-
if (
|
|
201
|
+
if (X(t, a)) i + t.length > r.length ? (u.isBuffer(t) || (t = u.from(t)), t.copy(r, i)) : a.prototype.set.call(r, t, i);
|
|
202
202
|
else if (u.isBuffer(t)) t.copy(r, i);
|
|
203
203
|
else throw TypeError("\"list\" argument must be an Array of Buffers");
|
|
204
204
|
i += t.length;
|
|
@@ -207,7 +207,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
207
207
|
};
|
|
208
208
|
function w(e, t) {
|
|
209
209
|
if (u.isBuffer(e)) return e.length;
|
|
210
|
-
if (o.isView(e) ||
|
|
210
|
+
if (o.isView(e) || X(e, o)) return e.byteLength;
|
|
211
211
|
if (typeof e != "string") throw TypeError("The \"string\" argument must be one of type string, Buffer, or ArrayBuffer. Received type " + typeof e);
|
|
212
212
|
let n = e.length, r = arguments.length > 2 && arguments[2] === !0;
|
|
213
213
|
if (!r && n === 0) return 0;
|
|
@@ -217,15 +217,15 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
217
217
|
case "latin1":
|
|
218
218
|
case "binary": return n;
|
|
219
219
|
case "utf8":
|
|
220
|
-
case "utf-8": return
|
|
220
|
+
case "utf-8": return ce(e).length;
|
|
221
221
|
case "ucs2":
|
|
222
222
|
case "ucs-2":
|
|
223
223
|
case "utf16le":
|
|
224
224
|
case "utf-16le": return n * 2;
|
|
225
225
|
case "hex": return n >>> 1;
|
|
226
|
-
case "base64": return
|
|
226
|
+
case "base64": return de(e).length;
|
|
227
227
|
default:
|
|
228
|
-
if (i) return r ? -1 :
|
|
228
|
+
if (i) return r ? -1 : ce(e).length;
|
|
229
229
|
t = ("" + t).toLowerCase(), i = !0;
|
|
230
230
|
}
|
|
231
231
|
}
|
|
@@ -234,17 +234,17 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
234
234
|
let r = !1;
|
|
235
235
|
if ((t === void 0 || t < 0) && (t = 0), t > this.length || ((n === void 0 || n > this.length) && (n = this.length), n <= 0) || (n >>>= 0, t >>>= 0, n <= t)) return "";
|
|
236
236
|
for (e ||= "utf8";;) switch (e) {
|
|
237
|
-
case "hex": return
|
|
237
|
+
case "hex": return L(this, t, n);
|
|
238
238
|
case "utf8":
|
|
239
239
|
case "utf-8": return F(this, t, n);
|
|
240
|
-
case "ascii": return
|
|
240
|
+
case "ascii": return te(this, t, n);
|
|
241
241
|
case "latin1":
|
|
242
|
-
case "binary": return
|
|
242
|
+
case "binary": return ne(this, t, n);
|
|
243
243
|
case "base64": return P(this, t, n);
|
|
244
244
|
case "ucs2":
|
|
245
245
|
case "ucs-2":
|
|
246
246
|
case "utf16le":
|
|
247
|
-
case "utf-16le": return
|
|
247
|
+
case "utf-16le": return R(this, t, n);
|
|
248
248
|
default:
|
|
249
249
|
if (r) throw TypeError("Unknown encoding: " + e);
|
|
250
250
|
e = (e + "").toLowerCase(), r = !0;
|
|
@@ -280,7 +280,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
280
280
|
let t = "", n = e.INSPECT_MAX_BYTES;
|
|
281
281
|
return t = this.toString("hex", 0, n).replace(/(.{2})/g, "$1 ").trim(), this.length > n && (t += " ... "), "<Buffer " + t + ">";
|
|
282
282
|
}, r && (u.prototype[r] = u.prototype.inspect), u.prototype.compare = function(e, t, n, r, i) {
|
|
283
|
-
if (
|
|
283
|
+
if (X(e, a) && (e = u.from(e, e.offset, e.byteLength)), !u.isBuffer(e)) throw TypeError("The \"target\" argument must be one of type Buffer or Uint8Array. Received type " + typeof e);
|
|
284
284
|
if (t === void 0 && (t = 0), n === void 0 && (n = e ? e.length : 0), r === void 0 && (r = 0), i === void 0 && (i = this.length), t < 0 || n > e.length || r < 0 || i > this.length) throw RangeError("out of range index");
|
|
285
285
|
if (r >= i && t >= n) return 0;
|
|
286
286
|
if (r >= i) return -1;
|
|
@@ -295,7 +295,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
295
295
|
};
|
|
296
296
|
function D(e, t, n, r, i) {
|
|
297
297
|
if (e.length === 0) return -1;
|
|
298
|
-
if (typeof n == "string" ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n,
|
|
298
|
+
if (typeof n == "string" ? (r = n, n = 0) : n > 2147483647 ? n = 2147483647 : n < -2147483648 && (n = -2147483648), n = +n, pe(n) && (n = i ? 0 : e.length - 1), n < 0 && (n = e.length + n), n >= e.length) {
|
|
299
299
|
if (i) return -1;
|
|
300
300
|
n = e.length - 1;
|
|
301
301
|
} else if (n < 0) if (i) n = 0;
|
|
@@ -345,22 +345,22 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
345
345
|
let o;
|
|
346
346
|
for (o = 0; o < r; ++o) {
|
|
347
347
|
let r = parseInt(t.substr(o * 2, 2), 16);
|
|
348
|
-
if (
|
|
348
|
+
if (pe(r)) return o;
|
|
349
349
|
e[n + o] = r;
|
|
350
350
|
}
|
|
351
351
|
return o;
|
|
352
352
|
}
|
|
353
353
|
function A(e, t, n, r) {
|
|
354
|
-
return
|
|
354
|
+
return fe(ce(t, e.length - n), e, n, r);
|
|
355
355
|
}
|
|
356
356
|
function j(e, t, n, r) {
|
|
357
|
-
return
|
|
357
|
+
return fe(le(t), e, n, r);
|
|
358
358
|
}
|
|
359
359
|
function M(e, t, n, r) {
|
|
360
|
-
return de(
|
|
360
|
+
return fe(de(t), e, n, r);
|
|
361
361
|
}
|
|
362
362
|
function N(e, t, n, r) {
|
|
363
|
-
return
|
|
363
|
+
return fe(ue(t, e.length - n), e, n, r);
|
|
364
364
|
}
|
|
365
365
|
u.prototype.write = function(e, t, n, r) {
|
|
366
366
|
if (t === void 0) r = "utf8", n = this.length, t = 0;
|
|
@@ -418,36 +418,36 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
418
418
|
}
|
|
419
419
|
a === null ? (a = 65533, o = 1) : a > 65535 && (a -= 65536, r.push(a >>> 10 & 1023 | 55296), a = 56320 | a & 1023), r.push(a), i += o;
|
|
420
420
|
}
|
|
421
|
-
return
|
|
421
|
+
return ee(r);
|
|
422
422
|
}
|
|
423
423
|
let I = 4096;
|
|
424
|
-
function
|
|
424
|
+
function ee(e) {
|
|
425
425
|
let t = e.length;
|
|
426
426
|
if (t <= I) return String.fromCharCode.apply(String, e);
|
|
427
427
|
let n = "", r = 0;
|
|
428
428
|
for (; r < t;) n += String.fromCharCode.apply(String, e.slice(r, r += I));
|
|
429
429
|
return n;
|
|
430
430
|
}
|
|
431
|
-
function
|
|
431
|
+
function te(e, t, n) {
|
|
432
432
|
let r = "";
|
|
433
433
|
n = Math.min(e.length, n);
|
|
434
434
|
for (let i = t; i < n; ++i) r += String.fromCharCode(e[i] & 127);
|
|
435
435
|
return r;
|
|
436
436
|
}
|
|
437
|
-
function
|
|
437
|
+
function ne(e, t, n) {
|
|
438
438
|
let r = "";
|
|
439
439
|
n = Math.min(e.length, n);
|
|
440
440
|
for (let i = t; i < n; ++i) r += String.fromCharCode(e[i]);
|
|
441
441
|
return r;
|
|
442
442
|
}
|
|
443
|
-
function
|
|
443
|
+
function L(e, t, n) {
|
|
444
444
|
let r = e.length;
|
|
445
445
|
(!t || t < 0) && (t = 0), (!n || n < 0 || n > r) && (n = r);
|
|
446
446
|
let i = "";
|
|
447
|
-
for (let r = t; r < n; ++r) i +=
|
|
447
|
+
for (let r = t; r < n; ++r) i += me[e[r]];
|
|
448
448
|
return i;
|
|
449
449
|
}
|
|
450
|
-
function
|
|
450
|
+
function R(e, t, n) {
|
|
451
451
|
let r = e.slice(t, n), i = "";
|
|
452
452
|
for (let e = 0; e < r.length - 1; e += 2) i += String.fromCharCode(r[e] + r[e + 1] * 256);
|
|
453
453
|
return i;
|
|
@@ -458,88 +458,88 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
458
458
|
let r = this.subarray(e, t);
|
|
459
459
|
return Object.setPrototypeOf(r, u.prototype), r;
|
|
460
460
|
};
|
|
461
|
-
function
|
|
461
|
+
function z(e, t, n) {
|
|
462
462
|
if (e % 1 != 0 || e < 0) throw RangeError("offset is not uint");
|
|
463
463
|
if (e + t > n) throw RangeError("Trying to access beyond buffer length");
|
|
464
464
|
}
|
|
465
465
|
u.prototype.readUintLE = u.prototype.readUIntLE = function(e, t, n) {
|
|
466
|
-
e >>>= 0, t >>>= 0, n ||
|
|
466
|
+
e >>>= 0, t >>>= 0, n || z(e, t, this.length);
|
|
467
467
|
let r = this[e], i = 1, a = 0;
|
|
468
468
|
for (; ++a < t && (i *= 256);) r += this[e + a] * i;
|
|
469
469
|
return r;
|
|
470
470
|
}, u.prototype.readUintBE = u.prototype.readUIntBE = function(e, t, n) {
|
|
471
|
-
e >>>= 0, t >>>= 0, n ||
|
|
471
|
+
e >>>= 0, t >>>= 0, n || z(e, t, this.length);
|
|
472
472
|
let r = this[e + --t], i = 1;
|
|
473
473
|
for (; t > 0 && (i *= 256);) r += this[e + --t] * i;
|
|
474
474
|
return r;
|
|
475
475
|
}, u.prototype.readUint8 = u.prototype.readUInt8 = function(e, t) {
|
|
476
|
-
return e >>>= 0, t ||
|
|
476
|
+
return e >>>= 0, t || z(e, 1, this.length), this[e];
|
|
477
477
|
}, u.prototype.readUint16LE = u.prototype.readUInt16LE = function(e, t) {
|
|
478
|
-
return e >>>= 0, t ||
|
|
478
|
+
return e >>>= 0, t || z(e, 2, this.length), this[e] | this[e + 1] << 8;
|
|
479
479
|
}, u.prototype.readUint16BE = u.prototype.readUInt16BE = function(e, t) {
|
|
480
|
-
return e >>>= 0, t ||
|
|
480
|
+
return e >>>= 0, t || z(e, 2, this.length), this[e] << 8 | this[e + 1];
|
|
481
481
|
}, u.prototype.readUint32LE = u.prototype.readUInt32LE = function(e, t) {
|
|
482
|
-
return e >>>= 0, t ||
|
|
482
|
+
return e >>>= 0, t || z(e, 4, this.length), (this[e] | this[e + 1] << 8 | this[e + 2] << 16) + this[e + 3] * 16777216;
|
|
483
483
|
}, u.prototype.readUint32BE = u.prototype.readUInt32BE = function(e, t) {
|
|
484
|
-
return e >>>= 0, t ||
|
|
485
|
-
}, u.prototype.readBigUInt64LE =
|
|
486
|
-
e >>>= 0,
|
|
484
|
+
return e >>>= 0, t || z(e, 4, this.length), this[e] * 16777216 + (this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3]);
|
|
485
|
+
}, u.prototype.readBigUInt64LE = Z(function(e) {
|
|
486
|
+
e >>>= 0, J(e, "offset");
|
|
487
487
|
let t = this[e], n = this[e + 7];
|
|
488
|
-
(t === void 0 || n === void 0) &&
|
|
488
|
+
(t === void 0 || n === void 0) && Y(e, this.length - 8);
|
|
489
489
|
let r = t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24, i = this[++e] + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + n * 2 ** 24;
|
|
490
490
|
return BigInt(r) + (BigInt(i) << BigInt(32));
|
|
491
|
-
}), u.prototype.readBigUInt64BE =
|
|
492
|
-
e >>>= 0,
|
|
491
|
+
}), u.prototype.readBigUInt64BE = Z(function(e) {
|
|
492
|
+
e >>>= 0, J(e, "offset");
|
|
493
493
|
let t = this[e], n = this[e + 7];
|
|
494
|
-
(t === void 0 || n === void 0) &&
|
|
494
|
+
(t === void 0 || n === void 0) && Y(e, this.length - 8);
|
|
495
495
|
let r = t * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e], i = this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + n;
|
|
496
496
|
return (BigInt(r) << BigInt(32)) + BigInt(i);
|
|
497
497
|
}), u.prototype.readIntLE = function(e, t, n) {
|
|
498
|
-
e >>>= 0, t >>>= 0, n ||
|
|
498
|
+
e >>>= 0, t >>>= 0, n || z(e, t, this.length);
|
|
499
499
|
let r = this[e], i = 1, a = 0;
|
|
500
500
|
for (; ++a < t && (i *= 256);) r += this[e + a] * i;
|
|
501
501
|
return i *= 128, r >= i && (r -= 2 ** (8 * t)), r;
|
|
502
502
|
}, u.prototype.readIntBE = function(e, t, n) {
|
|
503
|
-
e >>>= 0, t >>>= 0, n ||
|
|
503
|
+
e >>>= 0, t >>>= 0, n || z(e, t, this.length);
|
|
504
504
|
let r = t, i = 1, a = this[e + --r];
|
|
505
505
|
for (; r > 0 && (i *= 256);) a += this[e + --r] * i;
|
|
506
506
|
return i *= 128, a >= i && (a -= 2 ** (8 * t)), a;
|
|
507
507
|
}, u.prototype.readInt8 = function(e, t) {
|
|
508
|
-
return e >>>= 0, t ||
|
|
508
|
+
return e >>>= 0, t || z(e, 1, this.length), this[e] & 128 ? (255 - this[e] + 1) * -1 : this[e];
|
|
509
509
|
}, u.prototype.readInt16LE = function(e, t) {
|
|
510
|
-
e >>>= 0, t ||
|
|
510
|
+
e >>>= 0, t || z(e, 2, this.length);
|
|
511
511
|
let n = this[e] | this[e + 1] << 8;
|
|
512
512
|
return n & 32768 ? n | 4294901760 : n;
|
|
513
513
|
}, u.prototype.readInt16BE = function(e, t) {
|
|
514
|
-
e >>>= 0, t ||
|
|
514
|
+
e >>>= 0, t || z(e, 2, this.length);
|
|
515
515
|
let n = this[e + 1] | this[e] << 8;
|
|
516
516
|
return n & 32768 ? n | 4294901760 : n;
|
|
517
517
|
}, u.prototype.readInt32LE = function(e, t) {
|
|
518
|
-
return e >>>= 0, t ||
|
|
518
|
+
return e >>>= 0, t || z(e, 4, this.length), this[e] | this[e + 1] << 8 | this[e + 2] << 16 | this[e + 3] << 24;
|
|
519
519
|
}, u.prototype.readInt32BE = function(e, t) {
|
|
520
|
-
return e >>>= 0, t ||
|
|
521
|
-
}, u.prototype.readBigInt64LE =
|
|
522
|
-
e >>>= 0,
|
|
520
|
+
return e >>>= 0, t || z(e, 4, this.length), this[e] << 24 | this[e + 1] << 16 | this[e + 2] << 8 | this[e + 3];
|
|
521
|
+
}, u.prototype.readBigInt64LE = Z(function(e) {
|
|
522
|
+
e >>>= 0, J(e, "offset");
|
|
523
523
|
let t = this[e], n = this[e + 7];
|
|
524
|
-
(t === void 0 || n === void 0) &&
|
|
524
|
+
(t === void 0 || n === void 0) && Y(e, this.length - 8);
|
|
525
525
|
let r = this[e + 4] + this[e + 5] * 2 ** 8 + this[e + 6] * 2 ** 16 + (n << 24);
|
|
526
526
|
return (BigInt(r) << BigInt(32)) + BigInt(t + this[++e] * 2 ** 8 + this[++e] * 2 ** 16 + this[++e] * 2 ** 24);
|
|
527
|
-
}), u.prototype.readBigInt64BE =
|
|
528
|
-
e >>>= 0,
|
|
527
|
+
}), u.prototype.readBigInt64BE = Z(function(e) {
|
|
528
|
+
e >>>= 0, J(e, "offset");
|
|
529
529
|
let t = this[e], n = this[e + 7];
|
|
530
|
-
(t === void 0 || n === void 0) &&
|
|
530
|
+
(t === void 0 || n === void 0) && Y(e, this.length - 8);
|
|
531
531
|
let r = (t << 24) + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + this[++e];
|
|
532
532
|
return (BigInt(r) << BigInt(32)) + BigInt(this[++e] * 2 ** 24 + this[++e] * 2 ** 16 + this[++e] * 2 ** 8 + n);
|
|
533
533
|
}), u.prototype.readFloatLE = function(e, t) {
|
|
534
|
-
return e >>>= 0, t ||
|
|
534
|
+
return e >>>= 0, t || z(e, 4, this.length), n.read(this, e, !0, 23, 4);
|
|
535
535
|
}, u.prototype.readFloatBE = function(e, t) {
|
|
536
|
-
return e >>>= 0, t ||
|
|
536
|
+
return e >>>= 0, t || z(e, 4, this.length), n.read(this, e, !1, 23, 4);
|
|
537
537
|
}, u.prototype.readDoubleLE = function(e, t) {
|
|
538
|
-
return e >>>= 0, t ||
|
|
538
|
+
return e >>>= 0, t || z(e, 8, this.length), n.read(this, e, !0, 52, 8);
|
|
539
539
|
}, u.prototype.readDoubleBE = function(e, t) {
|
|
540
|
-
return e >>>= 0, t ||
|
|
540
|
+
return e >>>= 0, t || z(e, 8, this.length), n.read(this, e, !1, 52, 8);
|
|
541
541
|
};
|
|
542
|
-
function
|
|
542
|
+
function B(e, t, n, r, i, a) {
|
|
543
543
|
if (!u.isBuffer(e)) throw TypeError("\"buffer\" argument must be a Buffer instance");
|
|
544
544
|
if (t > i || t < a) throw RangeError("\"value\" argument is out of bounds");
|
|
545
545
|
if (n + r > e.length) throw RangeError("Index out of range");
|
|
@@ -547,7 +547,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
547
547
|
u.prototype.writeUintLE = u.prototype.writeUIntLE = function(e, t, n, r) {
|
|
548
548
|
if (e = +e, t >>>= 0, n >>>= 0, !r) {
|
|
549
549
|
let r = 2 ** (8 * n) - 1;
|
|
550
|
-
|
|
550
|
+
B(this, e, t, n, r, 0);
|
|
551
551
|
}
|
|
552
552
|
let i = 1, a = 0;
|
|
553
553
|
for (this[t] = e & 255; ++a < n && (i *= 256);) this[t + a] = e / i & 255;
|
|
@@ -555,44 +555,44 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
555
555
|
}, u.prototype.writeUintBE = u.prototype.writeUIntBE = function(e, t, n, r) {
|
|
556
556
|
if (e = +e, t >>>= 0, n >>>= 0, !r) {
|
|
557
557
|
let r = 2 ** (8 * n) - 1;
|
|
558
|
-
|
|
558
|
+
B(this, e, t, n, r, 0);
|
|
559
559
|
}
|
|
560
560
|
let i = n - 1, a = 1;
|
|
561
561
|
for (this[t + i] = e & 255; --i >= 0 && (a *= 256);) this[t + i] = e / a & 255;
|
|
562
562
|
return t + n;
|
|
563
563
|
}, u.prototype.writeUint8 = u.prototype.writeUInt8 = function(e, t, n) {
|
|
564
|
-
return e = +e, t >>>= 0, n ||
|
|
564
|
+
return e = +e, t >>>= 0, n || B(this, e, t, 1, 255, 0), this[t] = e & 255, t + 1;
|
|
565
565
|
}, u.prototype.writeUint16LE = u.prototype.writeUInt16LE = function(e, t, n) {
|
|
566
|
-
return e = +e, t >>>= 0, n ||
|
|
566
|
+
return e = +e, t >>>= 0, n || B(this, e, t, 2, 65535, 0), this[t] = e & 255, this[t + 1] = e >>> 8, t + 2;
|
|
567
567
|
}, u.prototype.writeUint16BE = u.prototype.writeUInt16BE = function(e, t, n) {
|
|
568
|
-
return e = +e, t >>>= 0, n ||
|
|
568
|
+
return e = +e, t >>>= 0, n || B(this, e, t, 2, 65535, 0), this[t] = e >>> 8, this[t + 1] = e & 255, t + 2;
|
|
569
569
|
}, u.prototype.writeUint32LE = u.prototype.writeUInt32LE = function(e, t, n) {
|
|
570
|
-
return e = +e, t >>>= 0, n ||
|
|
570
|
+
return e = +e, t >>>= 0, n || B(this, e, t, 4, 4294967295, 0), this[t + 3] = e >>> 24, this[t + 2] = e >>> 16, this[t + 1] = e >>> 8, this[t] = e & 255, t + 4;
|
|
571
571
|
}, u.prototype.writeUint32BE = u.prototype.writeUInt32BE = function(e, t, n) {
|
|
572
|
-
return e = +e, t >>>= 0, n ||
|
|
572
|
+
return e = +e, t >>>= 0, n || B(this, e, t, 4, 4294967295, 0), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
|
|
573
573
|
};
|
|
574
|
-
function
|
|
575
|
-
|
|
574
|
+
function V(e, t, n, r, i) {
|
|
575
|
+
q(t, r, i, e, n, 7);
|
|
576
576
|
let a = Number(t & BigInt(4294967295));
|
|
577
577
|
e[n++] = a, a >>= 8, e[n++] = a, a >>= 8, e[n++] = a, a >>= 8, e[n++] = a;
|
|
578
578
|
let o = Number(t >> BigInt(32) & BigInt(4294967295));
|
|
579
579
|
return e[n++] = o, o >>= 8, e[n++] = o, o >>= 8, e[n++] = o, o >>= 8, e[n++] = o, n;
|
|
580
580
|
}
|
|
581
|
-
function
|
|
582
|
-
|
|
581
|
+
function re(e, t, n, r, i) {
|
|
582
|
+
q(t, r, i, e, n, 7);
|
|
583
583
|
let a = Number(t & BigInt(4294967295));
|
|
584
584
|
e[n + 7] = a, a >>= 8, e[n + 6] = a, a >>= 8, e[n + 5] = a, a >>= 8, e[n + 4] = a;
|
|
585
585
|
let o = Number(t >> BigInt(32) & BigInt(4294967295));
|
|
586
586
|
return e[n + 3] = o, o >>= 8, e[n + 2] = o, o >>= 8, e[n + 1] = o, o >>= 8, e[n] = o, n + 8;
|
|
587
587
|
}
|
|
588
|
-
u.prototype.writeBigUInt64LE =
|
|
589
|
-
return
|
|
590
|
-
}), u.prototype.writeBigUInt64BE =
|
|
591
|
-
return
|
|
588
|
+
u.prototype.writeBigUInt64LE = Z(function(e, t = 0) {
|
|
589
|
+
return V(this, e, t, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
590
|
+
}), u.prototype.writeBigUInt64BE = Z(function(e, t = 0) {
|
|
591
|
+
return re(this, e, t, BigInt(0), BigInt("0xffffffffffffffff"));
|
|
592
592
|
}), u.prototype.writeIntLE = function(e, t, n, r) {
|
|
593
593
|
if (e = +e, t >>>= 0, !r) {
|
|
594
594
|
let r = 2 ** (8 * n - 1);
|
|
595
|
-
|
|
595
|
+
B(this, e, t, n, r - 1, -r);
|
|
596
596
|
}
|
|
597
597
|
let i = 0, a = 1, o = 0;
|
|
598
598
|
for (this[t] = e & 255; ++i < n && (a *= 256);) e < 0 && o === 0 && this[t + i - 1] !== 0 && (o = 1), this[t + i] = (e / a >> 0) - o & 255;
|
|
@@ -600,44 +600,44 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
600
600
|
}, u.prototype.writeIntBE = function(e, t, n, r) {
|
|
601
601
|
if (e = +e, t >>>= 0, !r) {
|
|
602
602
|
let r = 2 ** (8 * n - 1);
|
|
603
|
-
|
|
603
|
+
B(this, e, t, n, r - 1, -r);
|
|
604
604
|
}
|
|
605
605
|
let i = n - 1, a = 1, o = 0;
|
|
606
606
|
for (this[t + i] = e & 255; --i >= 0 && (a *= 256);) e < 0 && o === 0 && this[t + i + 1] !== 0 && (o = 1), this[t + i] = (e / a >> 0) - o & 255;
|
|
607
607
|
return t + n;
|
|
608
608
|
}, u.prototype.writeInt8 = function(e, t, n) {
|
|
609
|
-
return e = +e, t >>>= 0, n ||
|
|
609
|
+
return e = +e, t >>>= 0, n || B(this, e, t, 1, 127, -128), e < 0 && (e = 255 + e + 1), this[t] = e & 255, t + 1;
|
|
610
610
|
}, u.prototype.writeInt16LE = function(e, t, n) {
|
|
611
|
-
return e = +e, t >>>= 0, n ||
|
|
611
|
+
return e = +e, t >>>= 0, n || B(this, e, t, 2, 32767, -32768), this[t] = e & 255, this[t + 1] = e >>> 8, t + 2;
|
|
612
612
|
}, u.prototype.writeInt16BE = function(e, t, n) {
|
|
613
|
-
return e = +e, t >>>= 0, n ||
|
|
613
|
+
return e = +e, t >>>= 0, n || B(this, e, t, 2, 32767, -32768), this[t] = e >>> 8, this[t + 1] = e & 255, t + 2;
|
|
614
614
|
}, u.prototype.writeInt32LE = function(e, t, n) {
|
|
615
|
-
return e = +e, t >>>= 0, n ||
|
|
615
|
+
return e = +e, t >>>= 0, n || B(this, e, t, 4, 2147483647, -2147483648), this[t] = e & 255, this[t + 1] = e >>> 8, this[t + 2] = e >>> 16, this[t + 3] = e >>> 24, t + 4;
|
|
616
616
|
}, u.prototype.writeInt32BE = function(e, t, n) {
|
|
617
|
-
return e = +e, t >>>= 0, n ||
|
|
618
|
-
}, u.prototype.writeBigInt64LE =
|
|
619
|
-
return
|
|
620
|
-
}), u.prototype.writeBigInt64BE =
|
|
621
|
-
return
|
|
617
|
+
return e = +e, t >>>= 0, n || B(this, e, t, 4, 2147483647, -2147483648), e < 0 && (e = 4294967295 + e + 1), this[t] = e >>> 24, this[t + 1] = e >>> 16, this[t + 2] = e >>> 8, this[t + 3] = e & 255, t + 4;
|
|
618
|
+
}, u.prototype.writeBigInt64LE = Z(function(e, t = 0) {
|
|
619
|
+
return V(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
620
|
+
}), u.prototype.writeBigInt64BE = Z(function(e, t = 0) {
|
|
621
|
+
return re(this, e, t, -BigInt("0x8000000000000000"), BigInt("0x7fffffffffffffff"));
|
|
622
622
|
});
|
|
623
|
-
function
|
|
623
|
+
function H(e, t, n, r, i, a) {
|
|
624
624
|
if (n + r > e.length || n < 0) throw RangeError("Index out of range");
|
|
625
625
|
}
|
|
626
|
-
function
|
|
627
|
-
return t = +t, r >>>= 0, a ||
|
|
626
|
+
function ie(e, t, r, i, a) {
|
|
627
|
+
return t = +t, r >>>= 0, a || H(e, t, r, 4), n.write(e, t, r, i, 23, 4), r + 4;
|
|
628
628
|
}
|
|
629
629
|
u.prototype.writeFloatLE = function(e, t, n) {
|
|
630
|
-
return
|
|
630
|
+
return ie(this, e, t, !0, n);
|
|
631
631
|
}, u.prototype.writeFloatBE = function(e, t, n) {
|
|
632
|
-
return
|
|
632
|
+
return ie(this, e, t, !1, n);
|
|
633
633
|
};
|
|
634
|
-
function
|
|
635
|
-
return t = +t, r >>>= 0, a ||
|
|
634
|
+
function ae(e, t, r, i, a) {
|
|
635
|
+
return t = +t, r >>>= 0, a || H(e, t, r, 8), n.write(e, t, r, i, 52, 8), r + 8;
|
|
636
636
|
}
|
|
637
637
|
u.prototype.writeDoubleLE = function(e, t, n) {
|
|
638
|
-
return
|
|
638
|
+
return ae(this, e, t, !0, n);
|
|
639
639
|
}, u.prototype.writeDoubleBE = function(e, t, n) {
|
|
640
|
-
return
|
|
640
|
+
return ae(this, e, t, !1, n);
|
|
641
641
|
}, u.prototype.copy = function(e, t, n, r) {
|
|
642
642
|
if (!u.isBuffer(e)) throw TypeError("argument should be a Buffer");
|
|
643
643
|
if (n ||= 0, !r && r !== 0 && (r = this.length), t >= e.length && (t = e.length), t ||= 0, r > 0 && r < n && (r = n), r === n || e.length === 0 || this.length === 0) return 0;
|
|
@@ -668,9 +668,9 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
668
668
|
}
|
|
669
669
|
return this;
|
|
670
670
|
};
|
|
671
|
-
let
|
|
672
|
-
function
|
|
673
|
-
|
|
671
|
+
let U = {};
|
|
672
|
+
function W(e, t, n) {
|
|
673
|
+
U[e] = class extends n {
|
|
674
674
|
constructor() {
|
|
675
675
|
super(), Object.defineProperty(this, "message", {
|
|
676
676
|
value: t.apply(this, arguments),
|
|
@@ -694,42 +694,42 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
694
694
|
}
|
|
695
695
|
};
|
|
696
696
|
}
|
|
697
|
-
|
|
697
|
+
W("ERR_BUFFER_OUT_OF_BOUNDS", function(e) {
|
|
698
698
|
return e ? `${e} is outside of buffer bounds` : "Attempt to access memory outside buffer bounds";
|
|
699
|
-
}, RangeError),
|
|
699
|
+
}, RangeError), W("ERR_INVALID_ARG_TYPE", function(e, t) {
|
|
700
700
|
return `The "${e}" argument must be of type number. Received type ${typeof t}`;
|
|
701
|
-
}, TypeError),
|
|
701
|
+
}, TypeError), W("ERR_OUT_OF_RANGE", function(e, t, n) {
|
|
702
702
|
let r = `The value of "${e}" is out of range.`, i = n;
|
|
703
|
-
return Number.isInteger(n) && Math.abs(n) > 2 ** 32 ? i =
|
|
703
|
+
return Number.isInteger(n) && Math.abs(n) > 2 ** 32 ? i = G(String(n)) : typeof n == "bigint" && (i = String(n), (n > BigInt(2) ** BigInt(32) || n < -(BigInt(2) ** BigInt(32))) && (i = G(i)), i += "n"), r += ` It must be ${t}. Received ${i}`, r;
|
|
704
704
|
}, RangeError);
|
|
705
|
-
function
|
|
705
|
+
function G(e) {
|
|
706
706
|
let t = "", n = e.length, r = +(e[0] === "-");
|
|
707
707
|
for (; n >= r + 4; n -= 3) t = `_${e.slice(n - 3, n)}${t}`;
|
|
708
708
|
return `${e.slice(0, n)}${t}`;
|
|
709
709
|
}
|
|
710
|
-
function
|
|
711
|
-
|
|
710
|
+
function K(e, t, n) {
|
|
711
|
+
J(t, "offset"), (e[t] === void 0 || e[t + n] === void 0) && Y(t, e.length - (n + 1));
|
|
712
712
|
}
|
|
713
|
-
function
|
|
713
|
+
function q(e, t, n, r, i, a) {
|
|
714
714
|
if (e > n || e < t) {
|
|
715
715
|
let r = typeof t == "bigint" ? "n" : "", i;
|
|
716
|
-
throw i = a > 3 ? t === 0 || t === BigInt(0) ? `>= 0${r} and < 2${r} ** ${(a + 1) * 8}${r}` : `>= -(2${r} ** ${(a + 1) * 8 - 1}${r}) and < 2 ** ${(a + 1) * 8 - 1}${r}` : `>= ${t}${r} and <= ${n}${r}`, new
|
|
716
|
+
throw i = a > 3 ? t === 0 || t === BigInt(0) ? `>= 0${r} and < 2${r} ** ${(a + 1) * 8}${r}` : `>= -(2${r} ** ${(a + 1) * 8 - 1}${r}) and < 2 ** ${(a + 1) * 8 - 1}${r}` : `>= ${t}${r} and <= ${n}${r}`, new U.ERR_OUT_OF_RANGE("value", i, e);
|
|
717
717
|
}
|
|
718
|
-
|
|
718
|
+
K(r, i, a);
|
|
719
719
|
}
|
|
720
|
-
function
|
|
721
|
-
if (typeof e != "number") throw new
|
|
720
|
+
function J(e, t) {
|
|
721
|
+
if (typeof e != "number") throw new U.ERR_INVALID_ARG_TYPE(t, "number", e);
|
|
722
722
|
}
|
|
723
|
-
function
|
|
724
|
-
throw Math.floor(e) === e ? t < 0 ? new
|
|
723
|
+
function Y(e, t, n) {
|
|
724
|
+
throw Math.floor(e) === e ? t < 0 ? new U.ERR_BUFFER_OUT_OF_BOUNDS() : new U.ERR_OUT_OF_RANGE(n || "offset", `>= ${+!!n} and <= ${t}`, e) : (J(e, n), new U.ERR_OUT_OF_RANGE(n || "offset", "an integer", e));
|
|
725
725
|
}
|
|
726
|
-
let
|
|
727
|
-
function
|
|
728
|
-
if (e = e.split("=")[0], e = e.trim().replace(
|
|
726
|
+
let oe = /[^+/0-9A-Za-z-_]/g;
|
|
727
|
+
function se(e) {
|
|
728
|
+
if (e = e.split("=")[0], e = e.trim().replace(oe, ""), e.length < 2) return "";
|
|
729
729
|
for (; e.length % 4 != 0;) e += "=";
|
|
730
730
|
return e;
|
|
731
731
|
}
|
|
732
|
-
function
|
|
732
|
+
function ce(e, t) {
|
|
733
733
|
t ||= Infinity;
|
|
734
734
|
let n, r = e.length, i = null, a = [];
|
|
735
735
|
for (let o = 0; o < r; ++o) {
|
|
@@ -767,31 +767,31 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
767
767
|
}
|
|
768
768
|
return a;
|
|
769
769
|
}
|
|
770
|
-
function
|
|
770
|
+
function le(e) {
|
|
771
771
|
let t = [];
|
|
772
772
|
for (let n = 0; n < e.length; ++n) t.push(e.charCodeAt(n) & 255);
|
|
773
773
|
return t;
|
|
774
774
|
}
|
|
775
|
-
function
|
|
775
|
+
function ue(e, t) {
|
|
776
776
|
let n, r, i, a = [];
|
|
777
777
|
for (let o = 0; o < e.length && !((t -= 2) < 0); ++o) n = e.charCodeAt(o), r = n >> 8, i = n % 256, a.push(i), a.push(r);
|
|
778
778
|
return a;
|
|
779
779
|
}
|
|
780
|
-
function
|
|
781
|
-
return t.toByteArray(
|
|
780
|
+
function de(e) {
|
|
781
|
+
return t.toByteArray(se(e));
|
|
782
782
|
}
|
|
783
|
-
function
|
|
783
|
+
function fe(e, t, n, r) {
|
|
784
784
|
let i;
|
|
785
785
|
for (i = 0; i < r && !(i + n >= t.length || i >= e.length); ++i) t[i + n] = e[i];
|
|
786
786
|
return i;
|
|
787
787
|
}
|
|
788
|
-
function
|
|
788
|
+
function X(e, t) {
|
|
789
789
|
return e instanceof t || e != null && e.constructor != null && e.constructor.name != null && e.constructor.name === t.name;
|
|
790
790
|
}
|
|
791
|
-
function
|
|
791
|
+
function pe(e) {
|
|
792
792
|
return e !== e;
|
|
793
793
|
}
|
|
794
|
-
let
|
|
794
|
+
let me = (function() {
|
|
795
795
|
let e = "0123456789abcdef", t = Array(256);
|
|
796
796
|
for (let n = 0; n < 16; ++n) {
|
|
797
797
|
let r = n * 16;
|
|
@@ -799,7 +799,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
799
799
|
}
|
|
800
800
|
return t;
|
|
801
801
|
})();
|
|
802
|
-
function
|
|
802
|
+
function Z(e) {
|
|
803
803
|
return typeof BigInt > "u" ? he : e;
|
|
804
804
|
}
|
|
805
805
|
function he() {
|
|
@@ -1187,11 +1187,12 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
1187
1187
|
if (!this.captureInput) return;
|
|
1188
1188
|
let t = a(e);
|
|
1189
1189
|
for (let e of t) {
|
|
1190
|
-
|
|
1190
|
+
let t = !!(this.isRaw || this.stdinStream && this.stdinStream.isRaw);
|
|
1191
|
+
if (e === "^C" && !t) {
|
|
1191
1192
|
this.kill("SIGINT");
|
|
1192
1193
|
return;
|
|
1193
1194
|
}
|
|
1194
|
-
!this.interactive && !
|
|
1195
|
+
!this.interactive && !t && (e === "Enter" ? this.stdout.write("\r\n") : e === "Backspace" ? this.stdout.write("\b \b") : e.length === 1 && this.stdout.write(e)), this.onInput(e);
|
|
1195
1196
|
}
|
|
1196
1197
|
}, this.stdinStream.on("data", this._onStdinStreamData);
|
|
1197
1198
|
}
|
|
@@ -1249,6 +1250,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
1249
1250
|
}
|
|
1250
1251
|
};
|
|
1251
1252
|
})), D = /* @__PURE__ */ t(((e, t) => {
|
|
1253
|
+
b();
|
|
1252
1254
|
var n = E(), { parseVtKeys: r, hasCustomStdinListener: i } = w();
|
|
1253
1255
|
function a(e) {
|
|
1254
1256
|
return /^#!\/(sh\.js|bin\/(sh|brsh))/.test(e);
|
|
@@ -1266,7 +1268,11 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
1266
1268
|
return !!(this.sandbox && this.sandbox.runningCommand && this.sandbox.runningCommand.interactive);
|
|
1267
1269
|
}
|
|
1268
1270
|
get isRaw() {
|
|
1269
|
-
|
|
1271
|
+
if (this.sandbox && this.sandbox.runningCommand) {
|
|
1272
|
+
let e = this.sandbox.runningCommand;
|
|
1273
|
+
return !!(e.isRaw || e.stdinStream && e.stdinStream.isRaw);
|
|
1274
|
+
}
|
|
1275
|
+
return !!(this.stdinStream && this.stdinStream.isRaw);
|
|
1270
1276
|
}
|
|
1271
1277
|
get _inAltScreen() {
|
|
1272
1278
|
return !!(this.__inAltScreen || this.sandbox && this.sandbox.runningCommand && this.sandbox.runningCommand._inAltScreen);
|
|
@@ -1275,10 +1281,14 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
1275
1281
|
this.__inAltScreen = !!e;
|
|
1276
1282
|
}
|
|
1277
1283
|
onInput(e) {
|
|
1284
|
+
if ((e === "^C" || e === "") && !this.isRaw) {
|
|
1285
|
+
this.kill("SIGINT");
|
|
1286
|
+
return;
|
|
1287
|
+
}
|
|
1278
1288
|
this.sandbox && this.sandbox.onInput(e);
|
|
1279
1289
|
}
|
|
1280
1290
|
kill(e = "SIGINT") {
|
|
1281
|
-
this.sandbox && this.sandbox.runningCommand && typeof this.sandbox.runningCommand.kill == "function" && this.sandbox.runningCommand.kill(e), this.sandbox && typeof this.sandbox.destroy == "function" && this.sandbox.destroy(130), super.kill(e);
|
|
1291
|
+
this._killed = !0, this.sandbox && this.sandbox.runningCommand && typeof this.sandbox.runningCommand.kill == "function" && this.sandbox.runningCommand.kill(e), this.sandbox && typeof this.sandbox.destroy == "function" && this.sandbox.destroy(130), super.kill(e);
|
|
1282
1292
|
}
|
|
1283
1293
|
run() {
|
|
1284
1294
|
this._managesOwnStdinCapture = !0;
|
|
@@ -1295,20 +1305,22 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
1295
1305
|
typeof this.sandbox.setTerminalSize == "function" && this.sandbox.setTerminalSize(o, s), Array.isArray(this.arguments) && (this.arguments.forEach((e, t) => this.sandbox.context.setVar(String(t + 1), e)), this.sandbox.context.setVar("#", String(this.arguments.length)), this.sandbox.context.setVar("@", this.arguments.join(" ")), this.sandbox.context.setVar("*", this.arguments.join(" "))), this._onStdinStreamData && this.stdinStream && typeof this.stdinStream.off == "function" && this.stdinStream.off("data", this._onStdinStreamData);
|
|
1296
1306
|
let c = (e) => {
|
|
1297
1307
|
if (!this.sandbox || !this.sandbox.runningCommand) return;
|
|
1298
|
-
let t = this.sandbox.runningCommand, n =
|
|
1299
|
-
if (
|
|
1308
|
+
let t = this.sandbox.runningCommand, n = !!(t.isRaw || t.stdinStream && t.stdinStream.isRaw);
|
|
1309
|
+
if ((typeof e == "string" && e === "" || e instanceof Uint8Array && e.length === 1 && e[0] === 3 || y !== void 0 && y.isBuffer(e) && e.length === 1 && e[0] === 3) && !n) {
|
|
1310
|
+
this.kill("SIGINT");
|
|
1311
|
+
return;
|
|
1312
|
+
}
|
|
1313
|
+
let a = i(t);
|
|
1314
|
+
if (t.interactive || t._inAltScreen || a) {
|
|
1300
1315
|
t.stdinStream && t.stdinStream.pushData(e);
|
|
1301
1316
|
return;
|
|
1302
1317
|
}
|
|
1303
|
-
if (t.captureInput && typeof t.onInput == "function") {
|
|
1304
|
-
|
|
1305
|
-
|
|
1306
|
-
|
|
1307
|
-
this.kill("SIGINT");
|
|
1308
|
-
return;
|
|
1309
|
-
}
|
|
1310
|
-
n || (i === "Enter" ? this.stdout.write("\r\n") : i === "Backspace" ? this.stdout.write("\b \b") : i.length === 1 && this.stdout.write(i)), t.onInput(i);
|
|
1318
|
+
if (t.captureInput && typeof t.onInput == "function") for (let i of r(e)) {
|
|
1319
|
+
if (i === "^C" && !n) {
|
|
1320
|
+
this.kill("SIGINT");
|
|
1321
|
+
return;
|
|
1311
1322
|
}
|
|
1323
|
+
n || (i === "Enter" ? this.stdout.write("\r\n") : i === "Backspace" ? this.stdout.write("\b \b") : i.length === 1 && this.stdout.write(i)), t.onInput(i);
|
|
1312
1324
|
}
|
|
1313
1325
|
}, l = () => {
|
|
1314
1326
|
this.sandbox && typeof this.sandbox.setTerminalSize == "function" && this.stdinStream && this.sandbox.setTerminalSize(this.stdinStream.columns, this.stdinStream.rows);
|
|
@@ -1488,9 +1500,13 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
1488
1500
|
};
|
|
1489
1501
|
}
|
|
1490
1502
|
async _executeNodes(e) {
|
|
1491
|
-
for (let t of e)
|
|
1503
|
+
for (let t of e) {
|
|
1504
|
+
if (this._killed || this.sandbox && this.sandbox.destroyed) break;
|
|
1505
|
+
await this._executeNode(t);
|
|
1506
|
+
}
|
|
1492
1507
|
}
|
|
1493
1508
|
_executeNode(e) {
|
|
1509
|
+
if (this._killed || this.sandbox && this.sandbox.destroyed) return Promise.resolve();
|
|
1494
1510
|
if (e.type === "function") {
|
|
1495
1511
|
let t = e.name, n = e.bodyLines, r = this, i = E(), a = class extends i {
|
|
1496
1512
|
static get name() {
|
|
@@ -1560,11 +1576,14 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
1560
1576
|
return e.type === "if" ? this._executeIf(e) : e.type === "while" ? this._executeWhile(e) : e.type === "for" ? this._executeFor(e) : e.type === "case" ? this._executeCase(e) : Promise.resolve();
|
|
1561
1577
|
}
|
|
1562
1578
|
async _executeIf(e) {
|
|
1563
|
-
for (let t of e.clauses)
|
|
1564
|
-
|
|
1579
|
+
for (let t of e.clauses) {
|
|
1580
|
+
if (this._killed || this.sandbox && this.sandbox.destroyed || (await this.sandbox.onCommand(t.condition, !1), this._killed || this.sandbox && this.sandbox.destroyed)) return;
|
|
1581
|
+
if (this.sandbox.lastCode === 0) return this._executeNodes(this._parseLines(t.bodyLines));
|
|
1582
|
+
}
|
|
1583
|
+
if (e.elseLines.length > 0 && !this._killed && !(this.sandbox && this.sandbox.destroyed)) return this._executeNodes(this._parseLines(e.elseLines));
|
|
1565
1584
|
}
|
|
1566
1585
|
async _executeWhile(e) {
|
|
1567
|
-
for (; await this.sandbox.onCommand(e.condition, !1), this.sandbox.lastCode
|
|
1586
|
+
for (; !this._killed && !(this.sandbox && this.sandbox.destroyed) && (await this.sandbox.onCommand(e.condition, !1), !(this._killed || this.sandbox && this.sandbox.destroyed || this.sandbox.lastCode !== 0));) try {
|
|
1568
1587
|
await this._executeNodes(this._parseLines(e.bodyLines));
|
|
1569
1588
|
} catch (e) {
|
|
1570
1589
|
if (e && e.__type === "break") {
|
|
@@ -1592,6 +1611,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
1592
1611
|
for (let n = 1; n <= e; n++) t.push(this.sandbox.context.getVar(String(n)) || "");
|
|
1593
1612
|
} else t = (await this.sandbox._replaceVariables(e.list)).split(/\s+/).filter(Boolean);
|
|
1594
1613
|
for (let n of t) {
|
|
1614
|
+
if (this._killed || this.sandbox && this.sandbox.destroyed) break;
|
|
1595
1615
|
this.sandbox.context.setVar(e.variable, n);
|
|
1596
1616
|
try {
|
|
1597
1617
|
await this._executeNodes(this._parseLines(e.bodyLines));
|
|
@@ -1713,14 +1733,14 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
1713
1733
|
t.exports = null;
|
|
1714
1734
|
})), k = /* @__PURE__ */ t(((e, t) => {
|
|
1715
1735
|
b();
|
|
1716
|
-
var n = D(), { BinaryFile: r } =
|
|
1736
|
+
var n = D(), { BinaryFile: r } = Y(), i = 0, a = 6, o = 8, s = 20, c = 27, l = 28, u = 31, d = 44, f = 54, p = 70, m = 0, h = 2, g = 3, _ = 4, v = 1, x = 2, S = 4, C = 8, w = 1, E = 4, k = 1, A = class extends n {
|
|
1717
1737
|
constructor(e, t, n) {
|
|
1718
1738
|
super(e, t, n), this._ensurePkgMeta();
|
|
1719
1739
|
}
|
|
1720
1740
|
_ensurePkgMeta() {
|
|
1721
1741
|
if (this._pkgMeta === void 0 && this.script) {
|
|
1722
1742
|
let e = this.context && this.context.fs || this.fs;
|
|
1723
|
-
e && (this._pkgMeta =
|
|
1743
|
+
e && (this._pkgMeta = L(e, this.script));
|
|
1724
1744
|
}
|
|
1725
1745
|
return this._pkgMeta || null;
|
|
1726
1746
|
}
|
|
@@ -1740,6 +1760,32 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
1740
1760
|
get captureInput() {
|
|
1741
1761
|
return this.interactive;
|
|
1742
1762
|
}
|
|
1763
|
+
get isRaw() {
|
|
1764
|
+
if (typeof this._getTermiosLflag == "function") try {
|
|
1765
|
+
let e = (this._getTermiosLflag() >>> 0 & k) == 0;
|
|
1766
|
+
return this._inAltScreen && this.stdinStream && typeof this.stdinStream.setRawMode == "function" && this.stdinStream.isRaw !== e && this.stdinStream.setRawMode(e), e;
|
|
1767
|
+
} catch {}
|
|
1768
|
+
let e = this._ensurePkgMeta();
|
|
1769
|
+
return e && (e.raw !== void 0 || e.wasm?.raw !== void 0) ? !!(e.raw ?? e.wasm?.raw) : !!(this.stdinStream && this.stdinStream.isRaw);
|
|
1770
|
+
}
|
|
1771
|
+
_syncRawMode() {
|
|
1772
|
+
if (!this.stdinStream || typeof this.stdinStream.setRawMode != "function") return;
|
|
1773
|
+
if (!this._inAltScreen && !this._isInteractive) {
|
|
1774
|
+
this.stdinStream.isRaw && this.stdinStream.setRawMode(!1);
|
|
1775
|
+
return;
|
|
1776
|
+
}
|
|
1777
|
+
if (typeof this._getTermiosLflag == "function") try {
|
|
1778
|
+
let e = (this._getTermiosLflag() >>> 0 & k) == 0;
|
|
1779
|
+
this.stdinStream.setRawMode(e);
|
|
1780
|
+
return;
|
|
1781
|
+
} catch {}
|
|
1782
|
+
let e = this._ensurePkgMeta();
|
|
1783
|
+
if (e && (e.raw !== void 0 || e.wasm?.raw !== void 0)) {
|
|
1784
|
+
this.stdinStream.setRawMode(!!(e.raw ?? e.wasm?.raw));
|
|
1785
|
+
return;
|
|
1786
|
+
}
|
|
1787
|
+
this.stdinStream.setRawMode(!1);
|
|
1788
|
+
}
|
|
1743
1789
|
kill(e = "SIGINT") {
|
|
1744
1790
|
if (this._killed = !0, this.exitCode = 130, this._exitAltScreen(), this._asyncifyReject) {
|
|
1745
1791
|
try {
|
|
@@ -1757,7 +1803,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
1757
1803
|
super.kill(e);
|
|
1758
1804
|
}
|
|
1759
1805
|
_enterAltScreen() {
|
|
1760
|
-
this._inAltScreen || (this._inAltScreen = !0, this.
|
|
1806
|
+
this._inAltScreen || (this._inAltScreen = !0, this._syncRawMode(), this.stdout && typeof this.stdout.write == "function" && this.stdout.write("\x1B[?1049h\x1B[2J\x1B[H"));
|
|
1761
1807
|
}
|
|
1762
1808
|
_exitAltScreen() {
|
|
1763
1809
|
this._inAltScreen && (this._inAltScreen = !1, this.stdinStream && typeof this.stdinStream.setRawMode == "function" && this.stdinStream.setRawMode(!1), this.stdout && typeof this.stdout.write == "function" && this.stdout.write("\x1B[0m\x1B[?1l\x1B[?1000l\x1B[?1002l\x1B[?1003l\x1B[?1006l\x1B[?1049l\x1B[?25h"));
|
|
@@ -1869,7 +1915,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
1869
1915
|
isWat: this._isWat(e, i)
|
|
1870
1916
|
});
|
|
1871
1917
|
}
|
|
1872
|
-
return r.then((e) => (!e.isWat && e.bytes && (this._inspectedWasm =
|
|
1918
|
+
return r.then((e) => (!e.isWat && e.bytes && (this._inspectedWasm = I(e.bytes), this._inspectedWasm.isInteractive && (this._isInteractive = !0)), e));
|
|
1873
1919
|
}
|
|
1874
1920
|
_isWat(e, t) {
|
|
1875
1921
|
return e.endsWith(".wat") ? !0 : t.length > 0 && t[0] === 40;
|
|
@@ -1910,12 +1956,12 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
1910
1956
|
let t = {
|
|
1911
1957
|
1: "",
|
|
1912
1958
|
2: ""
|
|
1913
|
-
}, n = new TextDecoder(), b = new TextEncoder(), T = null, D = null, O = !1, k = 0, A = null, j = null, M = null, N = !1, P = !1,
|
|
1914
|
-
|
|
1915
|
-
let
|
|
1916
|
-
|
|
1917
|
-
},
|
|
1918
|
-
if (
|
|
1959
|
+
}, n = new TextDecoder(), b = new TextEncoder(), T = null, D = null, O = !1, k = 0, A = null, j = null, M = null, N = !1, P = !1, F = !1, te = null, ne = null, L = null, R = this.stdin === void 0 || this.stdin === null || this.stdin === this.stdinStream || this.stdin && this.stdin.isTTY, z = !!(this.interactive && R);
|
|
1960
|
+
z && (this.emit("interactive"), this.context && typeof this.context.emit == "function" && this.context.emit("interactive"));
|
|
1961
|
+
let B = () => {
|
|
1962
|
+
z || !R || (z = !0, this._isInteractive = !0, this.emit("interactive"), this.context && typeof this.context.emit == "function" && this.context.emit("interactive"), this._enterAltScreen(), t[1] &&= (this.stdout && typeof this.stdout.write == "function" && this.stdout.write(t[1]), ""), t[2] &&= (this.stderr && typeof this.stderr.write == "function" && this.stderr.write(t[2]), ""), this._syncRawMode());
|
|
1963
|
+
}, V = (e, n) => {
|
|
1964
|
+
if (z && (e === 1 || e === 2)) {
|
|
1919
1965
|
if (e === 1 && this.stdout) {
|
|
1920
1966
|
this.stdout.write(n);
|
|
1921
1967
|
return;
|
|
@@ -1929,63 +1975,69 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
1929
1975
|
let r = t[e].split("\n");
|
|
1930
1976
|
t[e] = r.pop();
|
|
1931
1977
|
for (let t of r) e === 1 ? this.stdOut = t : this.stdErr = t;
|
|
1932
|
-
},
|
|
1933
|
-
t[1] &&= (
|
|
1934
|
-
},
|
|
1935
|
-
if (!
|
|
1936
|
-
|
|
1937
|
-
|
|
1938
|
-
|
|
1939
|
-
|
|
1978
|
+
}, re = () => {
|
|
1979
|
+
t[1] &&= (z && this.stdout ? this.stdout.write(t[1]) : this.stdOut = t[1], ""), t[2] &&= (z && this.stderr ? this.stderr.write(t[2]) : this.stdErr = t[2], "");
|
|
1980
|
+
}, H = [], ie = (e) => {
|
|
1981
|
+
if (!e || e.length === 0) return;
|
|
1982
|
+
let t = this.isRaw;
|
|
1983
|
+
for (let n = 0; n < e.length; n++) {
|
|
1984
|
+
if (e[n] === 3 && !t) {
|
|
1985
|
+
this.kill("SIGINT");
|
|
1986
|
+
return;
|
|
1940
1987
|
}
|
|
1988
|
+
H.push(e[n]);
|
|
1989
|
+
}
|
|
1990
|
+
if (j) {
|
|
1991
|
+
let e = j;
|
|
1992
|
+
j = null, e();
|
|
1941
1993
|
}
|
|
1942
1994
|
};
|
|
1943
|
-
|
|
1995
|
+
L = (e) => {
|
|
1944
1996
|
this._handlingStreamData = !0;
|
|
1945
1997
|
try {
|
|
1946
|
-
|
|
1998
|
+
ie(typeof e == "string" ? b.encode(e) : e instanceof Uint8Array ? e : y !== void 0 && y.isBuffer(e) ? new Uint8Array(e) : b.encode(String(e ?? "")));
|
|
1947
1999
|
} finally {
|
|
1948
2000
|
this._handlingStreamData = !1;
|
|
1949
2001
|
}
|
|
1950
2002
|
}, this._externalKeyHandler = (e) => {
|
|
1951
2003
|
if (this._handlingStreamData) return;
|
|
1952
2004
|
let t = this._keyToBytes(e);
|
|
1953
|
-
t &&
|
|
2005
|
+
t && ie(t);
|
|
1954
2006
|
};
|
|
1955
|
-
let
|
|
1956
|
-
|
|
1957
|
-
let
|
|
2007
|
+
let ae = !!(this._onStdinStreamData && this.stdinStream && typeof this.stdinStream.listeners == "function" && this.stdinStream.listeners("data").includes(this._onStdinStreamData));
|
|
2008
|
+
ae && typeof this.stdinStream.off == "function" && this.stdinStream.off("data", this._onStdinStreamData), R && this.stdinStream && typeof this.stdinStream.on == "function" && this.stdinStream.on("data", L), R && this.stdin && this.stdin !== this.stdinStream && typeof this.stdin.on == "function" && this.stdin.on("data", L);
|
|
2009
|
+
let U = !R && typeof this.stdin == "string" ? b.encode(this.stdin) : !R && this.stdin instanceof Uint8Array ? this.stdin : !R && y !== void 0 && y.isBuffer(this.stdin) ? new Uint8Array(this.stdin) : new Uint8Array(), W = 0, G = this.context && this.context.fs ? this.context.fs : this.fs, K = this.context && this.context.fs && this.context.fs.cwd || this.fs && this.fs.cwd || this.context && typeof this.context.getVar == "function" && this.context.getVar("PWD") || G && G.cwd || "/", q = K.length > 1 && K.endsWith("/") ? K.slice(0, -1) : K, J = 5, Y = new Map([[3, {
|
|
1958
2010
|
type: "preopen",
|
|
1959
2011
|
path: "/",
|
|
1960
2012
|
guestName: "/"
|
|
1961
2013
|
}], [4, {
|
|
1962
2014
|
type: "preopen",
|
|
1963
|
-
path:
|
|
2015
|
+
path: q,
|
|
1964
2016
|
guestName: "."
|
|
1965
|
-
}]]),
|
|
2017
|
+
}]]), oe = new Map([
|
|
1966
2018
|
[0, 0],
|
|
1967
2019
|
[1, 0],
|
|
1968
2020
|
[2, 0]
|
|
1969
|
-
]),
|
|
2021
|
+
]), se = (e) => {
|
|
1970
2022
|
let t = e.split("/").filter(Boolean);
|
|
1971
2023
|
return t.pop(), "/" + t.join("/");
|
|
1972
|
-
},
|
|
1973
|
-
let n =
|
|
2024
|
+
}, ce = (e, t) => {
|
|
2025
|
+
let n = Y.get(e);
|
|
1974
2026
|
if (!n || n.type !== "preopen" && n.type !== "dir") return null;
|
|
1975
|
-
if (t.startsWith("/")) return
|
|
1976
|
-
if (!t || t === ".") return
|
|
1977
|
-
let r = n.path.endsWith("/") ? n.path : n.path + "/", i =
|
|
2027
|
+
if (t.startsWith("/")) return G.absolutePath(t);
|
|
2028
|
+
if (!t || t === ".") return G.absolutePath(n.path);
|
|
2029
|
+
let r = n.path.endsWith("/") ? n.path : n.path + "/", i = G.absolutePath(r + t), a = G.absolutePath("/" + t);
|
|
1978
2030
|
if (n.path !== "/") {
|
|
1979
|
-
if (
|
|
1980
|
-
if (
|
|
1981
|
-
let e =
|
|
1982
|
-
return
|
|
1983
|
-
}
|
|
1984
|
-
if (
|
|
1985
|
-
let o =
|
|
1986
|
-
return
|
|
1987
|
-
},
|
|
1988
|
-
if (!(!e || e.type !== "file" || !e.dirty || !
|
|
2031
|
+
if (G.exists(i)) return i;
|
|
2032
|
+
if (G.exists(a)) return a;
|
|
2033
|
+
let e = G.exists(se(i));
|
|
2034
|
+
return G.exists(se(a)) && !e ? a : i;
|
|
2035
|
+
}
|
|
2036
|
+
if (G.exists(i)) return i;
|
|
2037
|
+
let o = G.absolutePath(t);
|
|
2038
|
+
return G.exists(o) ? o : i;
|
|
2039
|
+
}, le = (e) => {
|
|
2040
|
+
if (!(!e || e.type !== "file" || !e.dirty || !G)) try {
|
|
1989
2041
|
let t = !0;
|
|
1990
2042
|
for (let n = 0; n < e.bytes.length; n++) if (e.bytes[n] === 0) {
|
|
1991
2043
|
t = !1;
|
|
@@ -1993,20 +2045,20 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
1993
2045
|
}
|
|
1994
2046
|
if (t) {
|
|
1995
2047
|
let t = n.decode(e.bytes);
|
|
1996
|
-
|
|
2048
|
+
G.setFileByPath(e.path, t, !0);
|
|
1997
2049
|
} else {
|
|
1998
2050
|
let t = new Uint8Array(e.bytes.length);
|
|
1999
|
-
t.set(e.bytes),
|
|
2051
|
+
t.set(e.bytes), G.setFileByPath(e.path, new r(t.buffer, "application/octet-stream"), !0);
|
|
2000
2052
|
}
|
|
2001
2053
|
e.dirty = !1;
|
|
2002
2054
|
} catch {}
|
|
2003
|
-
},
|
|
2055
|
+
}, ue = this.stdout && this.stdout.columns || this.stdinStream && this.stdinStream.columns || this.context && typeof this.context.getVar == "function" && parseInt(this.context.getVar("COLUMNS"), 10) || 80, de = this.stdout && this.stdout.rows || this.stdinStream && this.stdinStream.rows || this.context && typeof this.context.getVar == "function" && parseInt(this.context.getVar("LINES"), 10) || 24, fe = {
|
|
2004
2056
|
TERM: "xterm-256color",
|
|
2005
2057
|
COLORTERM: "truecolor",
|
|
2006
2058
|
...this.context && this.context.vars || {},
|
|
2007
|
-
COLUMNS: String(
|
|
2008
|
-
LINES: String(
|
|
2009
|
-
},
|
|
2059
|
+
COLUMNS: String(ue),
|
|
2060
|
+
LINES: String(de)
|
|
2061
|
+
}, X = Object.entries(fe).map(([e, t]) => `${e}=${t}`), pe = new Proxy({
|
|
2010
2062
|
fd_write: (e, t, r, a) => {
|
|
2011
2063
|
if (!T) return o;
|
|
2012
2064
|
let s = new DataView(T.buffer);
|
|
@@ -2014,11 +2066,11 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2014
2066
|
let o = 0;
|
|
2015
2067
|
for (let i = 0; i < r; i++) {
|
|
2016
2068
|
let r = s.getUint32(t + i * 8, !0), a = s.getUint32(t + i * 8 + 4, !0);
|
|
2017
|
-
a > 0 &&
|
|
2069
|
+
a > 0 && V(e, n.decode(new Uint8Array(T.buffer, r, a))), o += a;
|
|
2018
2070
|
}
|
|
2019
2071
|
return s.setUint32(a, o, !0), i;
|
|
2020
2072
|
}
|
|
2021
|
-
let c =
|
|
2073
|
+
let c = Y.get(e);
|
|
2022
2074
|
if (!c) return o;
|
|
2023
2075
|
if (c.type === "dev_null" || c.type === "dev_zero") {
|
|
2024
2076
|
let e = 0;
|
|
@@ -2029,7 +2081,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2029
2081
|
let e = 0;
|
|
2030
2082
|
for (let i = 0; i < r; i++) {
|
|
2031
2083
|
let r = s.getUint32(t + i * 8, !0), a = s.getUint32(t + i * 8 + 4, !0);
|
|
2032
|
-
a > 0 &&
|
|
2084
|
+
a > 0 && V(1, n.decode(new Uint8Array(T.buffer, r, a))), e += a;
|
|
2033
2085
|
}
|
|
2034
2086
|
return s.setUint32(a, e, !0), i;
|
|
2035
2087
|
}
|
|
@@ -2050,52 +2102,52 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2050
2102
|
},
|
|
2051
2103
|
fd_read: (e, t, n, r) => {
|
|
2052
2104
|
if (!T) return o;
|
|
2053
|
-
let s = new DataView(T.buffer), l =
|
|
2054
|
-
if (e === 0 ||
|
|
2055
|
-
(u || e === 2) &&
|
|
2056
|
-
let o = !!((
|
|
2105
|
+
let s = new DataView(T.buffer), l = Y.get(e), u = !!(l && l.type === "dev_tty");
|
|
2106
|
+
if (e === 0 || z && e === 2 || u) {
|
|
2107
|
+
(u || e === 2) && B(), this._syncRawMode();
|
|
2108
|
+
let o = !!((oe.get(e) || 0) & E);
|
|
2057
2109
|
if (O) {
|
|
2058
2110
|
if ((typeof D?.exports?.asyncify_get_state == "function" ? D.exports.asyncify_get_state() : 0) === 2) {
|
|
2059
|
-
if (D.exports.asyncify_stop_rewind(),
|
|
2060
|
-
|
|
2111
|
+
if (D.exports.asyncify_stop_rewind(), F && H.length === 0) return F = !1, s.setUint32(r, 0, !0), c;
|
|
2112
|
+
F = !1;
|
|
2061
2113
|
let e = 0;
|
|
2062
|
-
for (let r = 0; r < n &&
|
|
2063
|
-
let n = s.getUint32(t + r * 8, !0), i = s.getUint32(t + r * 8 + 4, !0), a = Math.min(i,
|
|
2114
|
+
for (let r = 0; r < n && H.length > 0; r++) {
|
|
2115
|
+
let n = s.getUint32(t + r * 8, !0), i = s.getUint32(t + r * 8 + 4, !0), a = Math.min(i, H.length), o = H.splice(0, a);
|
|
2064
2116
|
new Uint8Array(T.buffer).set(o, n), e += a;
|
|
2065
2117
|
}
|
|
2066
2118
|
return s.setUint32(r, e, !0), i;
|
|
2067
2119
|
}
|
|
2068
|
-
if (
|
|
2120
|
+
if (H.length > 0) {
|
|
2069
2121
|
let e = 0;
|
|
2070
|
-
for (let r = 0; r < n &&
|
|
2071
|
-
let n = s.getUint32(t + r * 8, !0), i = s.getUint32(t + r * 8 + 4, !0), a = Math.min(i,
|
|
2122
|
+
for (let r = 0; r < n && H.length > 0; r++) {
|
|
2123
|
+
let n = s.getUint32(t + r * 8, !0), i = s.getUint32(t + r * 8 + 4, !0), a = Math.min(i, H.length), o = H.splice(0, a);
|
|
2072
2124
|
new Uint8Array(T.buffer).set(o, n), e += a;
|
|
2073
2125
|
}
|
|
2074
2126
|
return s.setUint32(r, e, !0), i;
|
|
2075
2127
|
}
|
|
2076
|
-
return o ? (s.setUint32(r, 0, !0), a) : (
|
|
2128
|
+
return o ? (s.setUint32(r, 0, !0), a) : (F = !1, D.exports.asyncify_start_unwind(k), A = new Promise((e, t) => {
|
|
2077
2129
|
let n = () => {
|
|
2078
|
-
|
|
2130
|
+
F = !1, j = null, M = null, this._pendingReadResolve = null, this._asyncifyReject = null, e();
|
|
2079
2131
|
};
|
|
2080
2132
|
j = n, this._pendingReadResolve = n, M = () => {
|
|
2081
|
-
|
|
2133
|
+
F = !0, j = null, M = null, this._pendingReadResolve = null, this._asyncifyReject = null, e();
|
|
2082
2134
|
}, this._asyncifyReject = t;
|
|
2083
2135
|
}), s.setUint32(r, 0, !0), i);
|
|
2084
2136
|
}
|
|
2085
|
-
if (
|
|
2137
|
+
if (H.length > 0) {
|
|
2086
2138
|
let e = 0;
|
|
2087
|
-
for (let r = 0; r < n &&
|
|
2088
|
-
let n = s.getUint32(t + r * 8, !0), i = s.getUint32(t + r * 8 + 4, !0), a = Math.min(i,
|
|
2139
|
+
for (let r = 0; r < n && H.length > 0; r++) {
|
|
2140
|
+
let n = s.getUint32(t + r * 8, !0), i = s.getUint32(t + r * 8 + 4, !0), a = Math.min(i, H.length), o = H.splice(0, a);
|
|
2089
2141
|
new Uint8Array(T.buffer).set(o, n), e += a;
|
|
2090
2142
|
}
|
|
2091
2143
|
return s.setUint32(r, e, !0), i;
|
|
2092
2144
|
}
|
|
2093
2145
|
let l = 0;
|
|
2094
|
-
for (let e = 0; e < n &&
|
|
2095
|
-
let n = s.getUint32(t + e * 8, !0), r = s.getUint32(t + e * 8 + 4, !0), i = Math.min(r,
|
|
2096
|
-
new Uint8Array(T.buffer).set(
|
|
2146
|
+
for (let e = 0; e < n && W < U.length; e++) {
|
|
2147
|
+
let n = s.getUint32(t + e * 8, !0), r = s.getUint32(t + e * 8 + 4, !0), i = Math.min(r, U.length - W);
|
|
2148
|
+
new Uint8Array(T.buffer).set(U.slice(W, W + i), n), W += i, l += i;
|
|
2097
2149
|
}
|
|
2098
|
-
return l === 0 && o &&
|
|
2150
|
+
return l === 0 && o && W >= U.length ? (s.setUint32(r, 0, !0), a) : (s.setUint32(r, l, !0), i);
|
|
2099
2151
|
}
|
|
2100
2152
|
if (!l) return o;
|
|
2101
2153
|
if (l.type === "dev_null") return s.setUint32(r, 0, !0), i;
|
|
@@ -2128,7 +2180,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2128
2180
|
fd_seek: (e, t, n, r, a) => {
|
|
2129
2181
|
if (!T) return o;
|
|
2130
2182
|
if (e <= 2) return p;
|
|
2131
|
-
let s =
|
|
2183
|
+
let s = Y.get(e);
|
|
2132
2184
|
if (!s) return o;
|
|
2133
2185
|
if (s.type === "dev_tty" || s.type === "dev_null" || s.type === "dev_zero" || s.type === "dev_urandom") return p;
|
|
2134
2186
|
if (s.type !== "file") return o;
|
|
@@ -2143,32 +2195,32 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2143
2195
|
},
|
|
2144
2196
|
fd_tell: (e, t) => {
|
|
2145
2197
|
if (!T) return o;
|
|
2146
|
-
let n =
|
|
2198
|
+
let n = Y.get(e);
|
|
2147
2199
|
return !n || n.type !== "file" ? o : (new DataView(T.buffer).setBigUint64(t, BigInt(n.pos), !0), i);
|
|
2148
2200
|
},
|
|
2149
2201
|
fd_close: (e) => {
|
|
2150
2202
|
if (e <= 2) return i;
|
|
2151
|
-
let t =
|
|
2152
|
-
return t ? (t.type === "file" &&
|
|
2203
|
+
let t = Y.get(e);
|
|
2204
|
+
return t ? (t.type === "file" && le(t), Y.delete(e), oe.delete(e), i) : o;
|
|
2153
2205
|
},
|
|
2154
2206
|
fd_sync: (e) => {
|
|
2155
|
-
let t =
|
|
2156
|
-
return t &&
|
|
2207
|
+
let t = Y.get(e);
|
|
2208
|
+
return t && le(t), i;
|
|
2157
2209
|
},
|
|
2158
2210
|
fd_datasync: (e) => {
|
|
2159
|
-
let t =
|
|
2160
|
-
return t &&
|
|
2211
|
+
let t = Y.get(e);
|
|
2212
|
+
return t && le(t), i;
|
|
2161
2213
|
},
|
|
2162
2214
|
fd_prestat_get: (e, t) => {
|
|
2163
2215
|
if (!T) return o;
|
|
2164
|
-
let n =
|
|
2216
|
+
let n = Y.get(e);
|
|
2165
2217
|
if (!n || n.type !== "preopen") return o;
|
|
2166
2218
|
let r = new DataView(T.buffer), a = b.encode(n.guestName);
|
|
2167
2219
|
return r.setUint8(t, 0), r.setUint32(t + 4, a.length, !0), i;
|
|
2168
2220
|
},
|
|
2169
2221
|
fd_prestat_dir_name: (e, t, n) => {
|
|
2170
2222
|
if (!T) return o;
|
|
2171
|
-
let r =
|
|
2223
|
+
let r = Y.get(e);
|
|
2172
2224
|
if (!r || r.type !== "preopen") return o;
|
|
2173
2225
|
let a = b.encode(r.guestName);
|
|
2174
2226
|
return new Uint8Array(T.buffer, t, Math.min(n, a.length)).set(a.subarray(0, n)), i;
|
|
@@ -2178,75 +2230,75 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2178
2230
|
let n = new DataView(T.buffer), r = m;
|
|
2179
2231
|
if (e <= 2) r = h;
|
|
2180
2232
|
else {
|
|
2181
|
-
let t =
|
|
2233
|
+
let t = Y.get(e);
|
|
2182
2234
|
if (!t) return o;
|
|
2183
2235
|
r = t.type === "dev_null" || t.type === "dev_zero" || t.type === "dev_urandom" || t.type === "dev_tty" ? h : t.type === "preopen" || t.type === "dir" ? g : _;
|
|
2184
2236
|
}
|
|
2185
2237
|
for (let e = 0; e < 24; e++) n.setUint8(t + e, 0);
|
|
2186
2238
|
n.setUint8(t, r);
|
|
2187
|
-
let a =
|
|
2239
|
+
let a = oe.get(e) || (Y.get(e)?.append ? w : 0);
|
|
2188
2240
|
return n.setUint16(t + 2, a, !0), n.setBigUint64(t + 8, 18446744073709551615n, !0), n.setBigUint64(t + 16, 18446744073709551615n, !0), i;
|
|
2189
2241
|
},
|
|
2190
2242
|
fd_fdstat_set_flags: (e, t) => {
|
|
2191
|
-
if (!T || e > 2 && !
|
|
2192
|
-
|
|
2193
|
-
let n =
|
|
2194
|
-
return n && (n.append = !!(t & w)), (e === 0 || e === 2 || n && n.type === "dev_tty") && t & E &&
|
|
2243
|
+
if (!T || e > 2 && !Y.has(e)) return o;
|
|
2244
|
+
oe.set(e, t);
|
|
2245
|
+
let n = Y.get(e);
|
|
2246
|
+
return n && (n.append = !!(t & w)), (e === 0 || e === 2 || n && n.type === "dev_tty") && t & E && B(), i;
|
|
2195
2247
|
},
|
|
2196
2248
|
fd_filestat_get: (e, t) => {
|
|
2197
2249
|
if (!T) return o;
|
|
2198
2250
|
let n = new DataView(T.buffer);
|
|
2199
2251
|
for (let e = 0; e < 64; e++) n.setUint8(t + e, 0);
|
|
2200
2252
|
if (e <= 2) return n.setUint8(t + 16, h), i;
|
|
2201
|
-
let r =
|
|
2253
|
+
let r = Y.get(e);
|
|
2202
2254
|
if (!r) return o;
|
|
2203
2255
|
if (r.type === "dev_null" || r.type === "dev_zero" || r.type === "dev_urandom" || r.type === "dev_tty") return n.setUint8(t + 16, h), n.setBigUint64(t + 24, 1n, !0), i;
|
|
2204
2256
|
let a = r.type === "preopen" || r.type === "dir";
|
|
2205
2257
|
return n.setUint8(t + 16, a ? g : _), n.setBigUint64(t + 24, 1n, !0), n.setBigUint64(t + 32, BigInt(r.bytes ? r.bytes.length : 0), !0), i;
|
|
2206
2258
|
},
|
|
2207
2259
|
path_open: (e, t, r, a, c, l, p, m, h) => {
|
|
2208
|
-
if (!T || !
|
|
2209
|
-
let g =
|
|
2260
|
+
if (!T || !G) return o;
|
|
2261
|
+
let g = ce(e, n.decode(new Uint8Array(T.buffer, r, a)));
|
|
2210
2262
|
if (!g) return o;
|
|
2211
2263
|
let _ = g.replace(/\/+/g, "/").replace(/\/$/, "") || "/";
|
|
2212
2264
|
if (_ === "/dev/null") {
|
|
2213
|
-
let e =
|
|
2214
|
-
return
|
|
2265
|
+
let e = J++;
|
|
2266
|
+
return Y.set(e, {
|
|
2215
2267
|
type: "dev_null",
|
|
2216
2268
|
path: "/dev/null"
|
|
2217
2269
|
}), new DataView(T.buffer).setUint32(h, e, !0), i;
|
|
2218
2270
|
}
|
|
2219
2271
|
if (_ === "/dev/zero") {
|
|
2220
|
-
let e =
|
|
2221
|
-
return
|
|
2272
|
+
let e = J++;
|
|
2273
|
+
return Y.set(e, {
|
|
2222
2274
|
type: "dev_zero",
|
|
2223
2275
|
path: "/dev/zero"
|
|
2224
2276
|
}), new DataView(T.buffer).setUint32(h, e, !0), i;
|
|
2225
2277
|
}
|
|
2226
2278
|
if (_ === "/dev/urandom" || _ === "/dev/random") {
|
|
2227
|
-
let e =
|
|
2228
|
-
return
|
|
2279
|
+
let e = J++;
|
|
2280
|
+
return Y.set(e, {
|
|
2229
2281
|
type: "dev_urandom",
|
|
2230
2282
|
path: _
|
|
2231
2283
|
}), new DataView(T.buffer).setUint32(h, e, !0), i;
|
|
2232
2284
|
}
|
|
2233
2285
|
if (_ === "/dev/tty" || _ === "/dev/stdin") {
|
|
2234
|
-
|
|
2235
|
-
let e =
|
|
2236
|
-
return
|
|
2286
|
+
B();
|
|
2287
|
+
let e = J++;
|
|
2288
|
+
return Y.set(e, {
|
|
2237
2289
|
type: "dev_tty",
|
|
2238
2290
|
path: _
|
|
2239
2291
|
}), new DataView(T.buffer).setUint32(h, e, !0), i;
|
|
2240
2292
|
}
|
|
2241
2293
|
if (_ === "/dev/stdout") return new DataView(T.buffer).setUint32(h, 1, !0), i;
|
|
2242
2294
|
if (_ === "/dev/stderr") return new DataView(T.buffer).setUint32(h, 2, !0), i;
|
|
2243
|
-
let y =
|
|
2295
|
+
let y = G.stat(g), E = y !== null;
|
|
2244
2296
|
if (c & S && c & v && E) return s;
|
|
2245
2297
|
if (c & x) {
|
|
2246
2298
|
if (!E) return d;
|
|
2247
2299
|
if (!y.isDirectory) return f;
|
|
2248
|
-
let e =
|
|
2249
|
-
return
|
|
2300
|
+
let e = J++;
|
|
2301
|
+
return Y.set(e, {
|
|
2250
2302
|
type: "dir",
|
|
2251
2303
|
path: g
|
|
2252
2304
|
}), new DataView(T.buffer).setUint32(h, e, !0), i;
|
|
@@ -2255,11 +2307,11 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2255
2307
|
if (!E && !(c & v)) return d;
|
|
2256
2308
|
let D = new Uint8Array(), O = !1;
|
|
2257
2309
|
if (E && !(c & C)) {
|
|
2258
|
-
let e =
|
|
2310
|
+
let e = G.getFileByPath(g);
|
|
2259
2311
|
e != null && (D = typeof e == "string" ? b.encode(e) : new Uint8Array(this._contentToBytes(e)));
|
|
2260
2312
|
} else O = !0;
|
|
2261
|
-
let k =
|
|
2262
|
-
return
|
|
2313
|
+
let k = J++;
|
|
2314
|
+
return Y.set(k, {
|
|
2263
2315
|
type: "file",
|
|
2264
2316
|
path: g,
|
|
2265
2317
|
bytes: D,
|
|
@@ -2269,10 +2321,10 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2269
2321
|
}), new DataView(T.buffer).setUint32(h, k, !0), i;
|
|
2270
2322
|
},
|
|
2271
2323
|
path_filestat_get: (e, t, r, a, s) => {
|
|
2272
|
-
if (!T || !
|
|
2273
|
-
let c =
|
|
2324
|
+
if (!T || !G) return o;
|
|
2325
|
+
let c = ce(e, n.decode(new Uint8Array(T.buffer, r, a)));
|
|
2274
2326
|
if (!c) return o;
|
|
2275
|
-
let l = c.replace(/\/+/g, "/").replace(/\/$/, "") || "/", u =
|
|
2327
|
+
let l = c.replace(/\/+/g, "/").replace(/\/$/, "") || "/", u = G.stat(c);
|
|
2276
2328
|
if (l === "/dev/null" || l === "/dev/zero" || l === "/dev/urandom" || l === "/dev/random" || l === "/dev/tty" || l === "/dev/stdin" || l === "/dev/stdout" || l === "/dev/stderr" || u && (u.isDevice || u.isCharacterDevice)) {
|
|
2277
2329
|
let e = new DataView(T.buffer);
|
|
2278
2330
|
for (let t = 0; t < 64; t++) e.setUint8(s + t, 0);
|
|
@@ -2281,48 +2333,48 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2281
2333
|
if (!u) return d;
|
|
2282
2334
|
let f = new DataView(T.buffer);
|
|
2283
2335
|
for (let e = 0; e < 64; e++) f.setUint8(s + e, 0);
|
|
2284
|
-
return f.setUint8(s + 16, u.isDirectory ? g : _), f.setBigUint64(s + 24, 1n, !0), f.setBigUint64(s + 32, BigInt(
|
|
2336
|
+
return f.setUint8(s + 16, u.isDirectory ? g : _), f.setBigUint64(s + 24, 1n, !0), f.setBigUint64(s + 32, BigInt(G.getSize(c) || 0), !0), i;
|
|
2285
2337
|
},
|
|
2286
2338
|
path_create_directory: (e, t, r) => {
|
|
2287
|
-
if (!T || !
|
|
2288
|
-
let a =
|
|
2339
|
+
if (!T || !G) return o;
|
|
2340
|
+
let a = ce(e, n.decode(new Uint8Array(T.buffer, t, r)));
|
|
2289
2341
|
if (!a) return o;
|
|
2290
|
-
if (
|
|
2342
|
+
if (G.exists(a)) return s;
|
|
2291
2343
|
try {
|
|
2292
|
-
return
|
|
2344
|
+
return G.setFileByPath(a, {}, !0), i;
|
|
2293
2345
|
} catch {
|
|
2294
2346
|
return l;
|
|
2295
2347
|
}
|
|
2296
2348
|
},
|
|
2297
2349
|
path_unlink_file: (e, t, r) => {
|
|
2298
|
-
if (!T || !
|
|
2299
|
-
let a =
|
|
2300
|
-
if (!a || !
|
|
2350
|
+
if (!T || !G) return o;
|
|
2351
|
+
let a = ce(e, n.decode(new Uint8Array(T.buffer, t, r)));
|
|
2352
|
+
if (!a || !G.exists(a)) return d;
|
|
2301
2353
|
try {
|
|
2302
|
-
return
|
|
2354
|
+
return G.deleteFileByPath(a), i;
|
|
2303
2355
|
} catch {
|
|
2304
2356
|
return l;
|
|
2305
2357
|
}
|
|
2306
2358
|
},
|
|
2307
2359
|
path_remove_directory: (e, t, r) => {
|
|
2308
|
-
if (!T || !
|
|
2309
|
-
let a =
|
|
2310
|
-
if (!a || !
|
|
2360
|
+
if (!T || !G) return o;
|
|
2361
|
+
let a = ce(e, n.decode(new Uint8Array(T.buffer, t, r)));
|
|
2362
|
+
if (!a || !G.exists(a)) return d;
|
|
2311
2363
|
try {
|
|
2312
|
-
return
|
|
2364
|
+
return G.deleteFileByPath(a), i;
|
|
2313
2365
|
} catch {
|
|
2314
2366
|
return l;
|
|
2315
2367
|
}
|
|
2316
2368
|
},
|
|
2317
2369
|
path_rename: (e, t, r, a, s, c) => {
|
|
2318
|
-
if (!T || !
|
|
2319
|
-
let u = n.decode(new Uint8Array(T.buffer, t, r)), f = n.decode(new Uint8Array(T.buffer, s, c)), p =
|
|
2370
|
+
if (!T || !G) return o;
|
|
2371
|
+
let u = n.decode(new Uint8Array(T.buffer, t, r)), f = n.decode(new Uint8Array(T.buffer, s, c)), p = ce(e, u), m = ce(a, f);
|
|
2320
2372
|
if (!p || !m) return o;
|
|
2321
|
-
if (!
|
|
2322
|
-
for (let e of
|
|
2373
|
+
if (!G.exists(p)) return d;
|
|
2374
|
+
for (let e of Y.values()) e.path === p && (le(e), e.path = m);
|
|
2323
2375
|
try {
|
|
2324
|
-
let e =
|
|
2325
|
-
return
|
|
2376
|
+
let e = G.getFileByPath(p);
|
|
2377
|
+
return G.setFileByPath(m, e, !0), G.deleteFileByPath(p), i;
|
|
2326
2378
|
} catch {
|
|
2327
2379
|
return l;
|
|
2328
2380
|
}
|
|
@@ -2351,16 +2403,16 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2351
2403
|
environ_sizes_get: (e, t) => {
|
|
2352
2404
|
if (!T) return l;
|
|
2353
2405
|
let n = new DataView(T.buffer);
|
|
2354
|
-
n.setUint32(e,
|
|
2355
|
-
let r =
|
|
2406
|
+
n.setUint32(e, X.length, !0);
|
|
2407
|
+
let r = X.reduce((e, t) => e + b.encode(t).length + 1, 0);
|
|
2356
2408
|
return n.setUint32(t, r, !0), i;
|
|
2357
2409
|
},
|
|
2358
2410
|
environ_get: (e, t) => {
|
|
2359
2411
|
if (!T) return l;
|
|
2360
2412
|
let n = new DataView(T.buffer), r = t;
|
|
2361
|
-
for (let t = 0; t <
|
|
2413
|
+
for (let t = 0; t < X.length; t++) {
|
|
2362
2414
|
n.setUint32(e + t * 4, r, !0);
|
|
2363
|
-
let i = b.encode(
|
|
2415
|
+
let i = b.encode(X[t] + "\0");
|
|
2364
2416
|
new Uint8Array(T.buffer).set(i, r), r += i.length;
|
|
2365
2417
|
}
|
|
2366
2418
|
return i;
|
|
@@ -2386,28 +2438,35 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2386
2438
|
let e = BigInt(Date.now()) * 1000000n;
|
|
2387
2439
|
c = s > e ? Number((s - e) / 1000000n) : 0;
|
|
2388
2440
|
} else c = Number(s / 1000000n);
|
|
2389
|
-
return O && c > 0 ? (typeof D?.exports?.asyncify_get_state == "function" ? D.exports.asyncify_get_state() : 0) === 2 ? (D.exports.asyncify_stop_rewind(), i) : (D.exports.asyncify_start_unwind(k), A = new Promise((e
|
|
2441
|
+
return O && c > 0 ? (typeof D?.exports?.asyncify_get_state == "function" ? D.exports.asyncify_get_state() : 0) === 2 ? (D.exports.asyncify_stop_rewind(), i) : (D.exports.asyncify_start_unwind(k), A = new Promise((e, t) => {
|
|
2442
|
+
let n = setTimeout(() => {
|
|
2443
|
+
this._asyncifyReject = null, e();
|
|
2444
|
+
}, Math.max(1, c));
|
|
2445
|
+
this._asyncifyReject = (e) => {
|
|
2446
|
+
clearTimeout(n), this._asyncifyReject = null, t(e);
|
|
2447
|
+
};
|
|
2448
|
+
}), i) : i;
|
|
2390
2449
|
},
|
|
2391
2450
|
poll_oneoff: (e, t, n, r) => {
|
|
2392
2451
|
if (!T) return o;
|
|
2393
2452
|
let a = new DataView(T.buffer);
|
|
2394
|
-
if (O) {
|
|
2453
|
+
if (this._syncRawMode(), O) {
|
|
2395
2454
|
if ((typeof D?.exports?.asyncify_get_state == "function" ? D.exports.asyncify_get_state() : 0) === 2) {
|
|
2396
|
-
if (D.exports.asyncify_stop_rewind(), P &&
|
|
2455
|
+
if (D.exports.asyncify_stop_rewind(), P && H.length === 0) return P = !1, a.setUint32(r, 0, !0), c;
|
|
2397
2456
|
P = !1;
|
|
2398
2457
|
let o = 0;
|
|
2399
2458
|
for (let r = 0; r < n; r++) {
|
|
2400
2459
|
let n = e + r * 48, s = a.getBigUint64(n, !0), c = a.getUint8(n + 8), l = !1;
|
|
2401
2460
|
if (c === 0) l = N;
|
|
2402
2461
|
else if (c === 1) {
|
|
2403
|
-
let e = a.getUint32(n + 16, !0), t =
|
|
2404
|
-
(e === 0 ||
|
|
2462
|
+
let e = a.getUint32(n + 16, !0), t = Y.get(e), r = !!(t && t.type === "dev_tty");
|
|
2463
|
+
(e === 0 || z && e === 2 || r) && H.length > 0 && (l = !0);
|
|
2405
2464
|
} else c === 2 && (l = !0);
|
|
2406
2465
|
if (l) {
|
|
2407
2466
|
let e = t + o * 32;
|
|
2408
2467
|
a.setBigUint64(e, s, !0), a.setUint16(e + 8, i, !0), a.setUint8(e + 10, c);
|
|
2409
2468
|
for (let t = 11; t < 32; t++) a.setUint8(e + t, 0);
|
|
2410
|
-
c === 1 && a.setBigUint64(e + 16, BigInt(
|
|
2469
|
+
c === 1 && a.setBigUint64(e + 16, BigInt(H.length), !0), o++;
|
|
2411
2470
|
}
|
|
2412
2471
|
}
|
|
2413
2472
|
return a.setUint32(r, o, !0), i;
|
|
@@ -2424,8 +2483,8 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2424
2483
|
r < l && (l = r);
|
|
2425
2484
|
} else if (r === 1) {
|
|
2426
2485
|
s = !0;
|
|
2427
|
-
let e = a.getUint32(n + 16, !0), t =
|
|
2428
|
-
(e === 0 || e === 2 || r) &&
|
|
2486
|
+
let e = a.getUint32(n + 16, !0), t = Y.get(e), r = !!(t && t.type === "dev_tty");
|
|
2487
|
+
(e === 0 || e === 2 || r) && B(), (e === 0 || z && e === 2 || r) && H.length > 0 && o++;
|
|
2429
2488
|
} else r === 2 && o++;
|
|
2430
2489
|
}
|
|
2431
2490
|
if (o > 0 || l === 0) {
|
|
@@ -2434,21 +2493,23 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2434
2493
|
let n = e + r * 48, s = a.getBigUint64(n, !0), c = a.getUint8(n + 8), u = !1;
|
|
2435
2494
|
if (c === 0 && l === 0) u = !0;
|
|
2436
2495
|
else if (c === 1) {
|
|
2437
|
-
let e = a.getUint32(n + 16, !0), t =
|
|
2438
|
-
(e === 0 ||
|
|
2496
|
+
let e = a.getUint32(n + 16, !0), t = Y.get(e), r = !!(t && t.type === "dev_tty");
|
|
2497
|
+
(e === 0 || z && e === 2 || r) && H.length > 0 && (u = !0);
|
|
2439
2498
|
} else c === 2 && (u = !0);
|
|
2440
2499
|
if (u) {
|
|
2441
2500
|
let e = t + o * 32;
|
|
2442
2501
|
a.setBigUint64(e, s, !0), a.setUint16(e + 8, i, !0), a.setUint8(e + 10, c);
|
|
2443
2502
|
for (let t = 11; t < 32; t++) a.setUint8(e + t, 0);
|
|
2444
|
-
c === 1 && a.setBigUint64(e + 16, BigInt(
|
|
2503
|
+
c === 1 && a.setBigUint64(e + 16, BigInt(H.length), !0), o++;
|
|
2445
2504
|
}
|
|
2446
2505
|
}
|
|
2447
2506
|
return a.setUint32(r, o, !0), i;
|
|
2448
2507
|
}
|
|
2449
2508
|
return N = !1, P = !1, D.exports.asyncify_start_unwind(k), A = new Promise((e, t) => {
|
|
2450
2509
|
let n = null;
|
|
2451
|
-
this._asyncifyReject =
|
|
2510
|
+
this._asyncifyReject = (e) => {
|
|
2511
|
+
n && clearTimeout(n), j = null, M = null, this._pendingReadResolve = null, this._asyncifyReject = null, t(e);
|
|
2512
|
+
};
|
|
2452
2513
|
let r = () => {
|
|
2453
2514
|
n && clearTimeout(n), N = !1, P = !1, j = null, M = null, this._pendingReadResolve = null, this._asyncifyReject = null, e();
|
|
2454
2515
|
};
|
|
@@ -2463,7 +2524,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2463
2524
|
}
|
|
2464
2525
|
}, { get(e, t) {
|
|
2465
2526
|
return t in e ? e[t] : () => 0;
|
|
2466
|
-
} }),
|
|
2527
|
+
} }), me = (e) => {
|
|
2467
2528
|
if (!T || !e) return "";
|
|
2468
2529
|
try {
|
|
2469
2530
|
let t = new DataView(T.buffer).getUint32(e - 4, !0), n = new Uint16Array(T.buffer, e, t >>> 1);
|
|
@@ -2471,33 +2532,33 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2471
2532
|
} catch {
|
|
2472
2533
|
return "";
|
|
2473
2534
|
}
|
|
2474
|
-
},
|
|
2475
|
-
wasi_snapshot_preview1:
|
|
2476
|
-
wasi_unstable:
|
|
2535
|
+
}, Z = {
|
|
2536
|
+
wasi_snapshot_preview1: pe,
|
|
2537
|
+
wasi_unstable: pe,
|
|
2477
2538
|
env: new Proxy({
|
|
2478
2539
|
print: (e, t) => {
|
|
2479
|
-
T &&
|
|
2540
|
+
T && V(1, n.decode(new Uint8Array(T.buffer, e, t)));
|
|
2480
2541
|
},
|
|
2481
2542
|
eprint: (e, t) => {
|
|
2482
|
-
T &&
|
|
2543
|
+
T && V(2, n.decode(new Uint8Array(T.buffer, e, t)));
|
|
2483
2544
|
},
|
|
2484
2545
|
log: (e) => {
|
|
2485
|
-
|
|
2546
|
+
V(1, me(e) + "\n");
|
|
2486
2547
|
},
|
|
2487
2548
|
logi: (e) => {
|
|
2488
|
-
|
|
2549
|
+
V(1, String(e) + "\n");
|
|
2489
2550
|
},
|
|
2490
2551
|
logf: (e) => {
|
|
2491
|
-
|
|
2552
|
+
V(1, String(e) + "\n");
|
|
2492
2553
|
},
|
|
2493
2554
|
trace: (e, t, ...n) => {
|
|
2494
2555
|
let r = t > 0 ? " " + n.slice(0, t).join(", ") : "";
|
|
2495
|
-
|
|
2556
|
+
V(1, `trace: ${me(e)}${r}\n`);
|
|
2496
2557
|
},
|
|
2497
2558
|
seed: () => Date.now() * Math.random(),
|
|
2498
2559
|
abort: (e, t, n, r) => {
|
|
2499
|
-
let i =
|
|
2500
|
-
throw (i || a) &&
|
|
2560
|
+
let i = me(e), a = me(t);
|
|
2561
|
+
throw (i || a) && V(2, `abort: ${i || "aborted"} at ${a || this.script}:${n || 0}:${r || 0}\n`), this.exitCode = 134, {
|
|
2501
2562
|
_wasmExit: !0,
|
|
2502
2563
|
code: 134
|
|
2503
2564
|
};
|
|
@@ -2513,9 +2574,9 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2513
2574
|
initial: 1,
|
|
2514
2575
|
maximum: 256
|
|
2515
2576
|
});
|
|
2516
|
-
T = t,
|
|
2577
|
+
T = t, Z[e.module] || (Z[e.module] = {}), Z[e.module][e.name] = t;
|
|
2517
2578
|
}
|
|
2518
|
-
if (D = await WebAssembly.instantiate(t,
|
|
2579
|
+
if (D = await WebAssembly.instantiate(t, Z), D.exports.memory && (T = D.exports.memory), this._getTermiosLflag = typeof D.exports.get_termios_lflag == "function" ? D.exports.get_termios_lflag : null, O = !!(D.exports.asyncify_start_unwind && D.exports.asyncify_stop_unwind), O && T) {
|
|
2519
2580
|
try {
|
|
2520
2581
|
k = T.grow(1) * 65536;
|
|
2521
2582
|
} catch {
|
|
@@ -2524,7 +2585,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2524
2585
|
let e = k + 8, t = k + 65536 - 8;
|
|
2525
2586
|
new Int32Array(T.buffer, k, 2).set([e, t]);
|
|
2526
2587
|
}
|
|
2527
|
-
typeof D.exports.set_terminal_size == "function" &&
|
|
2588
|
+
typeof D.exports.set_terminal_size == "function" && B(), z && (this._enterAltScreen(), this._syncRawMode());
|
|
2528
2589
|
let n = this.stdout && this.stdout.columns || this.stdinStream && this.stdinStream.columns || this.context && typeof this.context.getVar == "function" && parseInt(this.context.getVar("COLUMNS"), 10) || 80, r = this.stdout && this.stdout.rows || this.stdinStream && this.stdinStream.rows || this.context && typeof this.context.getVar == "function" && parseInt(this.context.getVar("LINES"), 10) || 24;
|
|
2529
2590
|
if (typeof D.exports.set_terminal_size == "function") try {
|
|
2530
2591
|
D.exports.set_terminal_size(n, r);
|
|
@@ -2545,11 +2606,11 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2545
2606
|
}
|
|
2546
2607
|
}
|
|
2547
2608
|
};
|
|
2548
|
-
|
|
2609
|
+
te = () => {
|
|
2549
2610
|
o(this.stdout && this.stdout.columns || this.context && typeof this.context.getVar == "function" && parseInt(this.context.getVar("COLUMNS"), 10) || 80, this.stdout && this.stdout.rows || this.context && typeof this.context.getVar == "function" && parseInt(this.context.getVar("LINES"), 10) || 24);
|
|
2550
|
-
},
|
|
2611
|
+
}, ne = () => {
|
|
2551
2612
|
o(this.stdinStream && this.stdinStream.columns || this.stdout && this.stdout.columns || this.context && typeof this.context.getVar == "function" && parseInt(this.context.getVar("COLUMNS"), 10) || 80, this.stdinStream && this.stdinStream.rows || this.stdout && this.stdout.rows || this.context && typeof this.context.getVar == "function" && parseInt(this.context.getVar("LINES"), 10) || 24);
|
|
2552
|
-
}, this.stdout && typeof this.stdout.on == "function" && this.stdout.on("resize",
|
|
2613
|
+
}, this.stdout && typeof this.stdout.on == "function" && this.stdout.on("resize", te), this.stdinStream && this.stdinStream !== this.stdout && typeof this.stdinStream.on == "function" && this.stdinStream.on("resize", ne);
|
|
2553
2614
|
let s = D.exports._start || D.exports.__wasi_command || D.exports.main || D.exports.run;
|
|
2554
2615
|
if (s) try {
|
|
2555
2616
|
let e = s();
|
|
@@ -2585,10 +2646,10 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2585
2646
|
} catch (e) {
|
|
2586
2647
|
this._killed ? this.exitCode = 130 : (!e || !e._wasmExit) && (this.stdErr = `${this.script}: ${e?.message || String(e)}`, this.exitCode = 1);
|
|
2587
2648
|
} finally {
|
|
2588
|
-
|
|
2589
|
-
for (let e of
|
|
2649
|
+
z && this._exitAltScreen(), L && (this.stdinStream && typeof this.stdinStream.off == "function" && this.stdinStream.off("data", L), this.stdin && typeof this.stdin.off == "function" && this.stdin.off("data", L)), ae && this._onStdinStreamData && this.stdinStream && typeof this.stdinStream.on == "function" && this.stdinStream.on("data", this._onStdinStreamData), te && this.stdout && typeof this.stdout.off == "function" && this.stdout.off("resize", te), ne && this.stdinStream && typeof this.stdinStream.off == "function" && this.stdinStream.off("resize", ne), this._externalKeyHandler = null, this._getTermiosLflag = null;
|
|
2650
|
+
for (let e of Y.values()) le(e);
|
|
2590
2651
|
}
|
|
2591
|
-
|
|
2652
|
+
re();
|
|
2592
2653
|
let he = this.arguments || [];
|
|
2593
2654
|
if (!(this.result && this.result.getStdOutput && this.result.getStdOutput().length > 0) && (this.exitCode === 0 || this.exitCode === void 0)) {
|
|
2594
2655
|
let t = this._ensurePkgMeta(), n = t && t.bin || (this.script || "wasm").split("/").pop(), r = Object.assign({
|
|
@@ -2597,13 +2658,13 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2597
2658
|
description: `WebAssembly WASI binary (${this.script})`
|
|
2598
2659
|
}, t || {});
|
|
2599
2660
|
if (he.includes("--help") || he.includes("-h")) {
|
|
2600
|
-
let t =
|
|
2601
|
-
for (let e of
|
|
2661
|
+
let t = I(e);
|
|
2662
|
+
for (let e of ee(n, r, t)) this.stdOut = e;
|
|
2602
2663
|
} else (he.includes("--version") || he.includes("-V") || he.includes("-v")) && (this.stdOut = `${n} (${r.name} ${r.version} wasm)`);
|
|
2603
2664
|
}
|
|
2604
2665
|
}
|
|
2605
|
-
},
|
|
2606
|
-
function
|
|
2666
|
+
}, j = /* @__PURE__ */ new Map();
|
|
2667
|
+
function M(e, t) {
|
|
2607
2668
|
if (!e || !e.exists(t)) return null;
|
|
2608
2669
|
if (e.isRealFilesystem) try {
|
|
2609
2670
|
let n = O();
|
|
@@ -2630,7 +2691,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2630
2691
|
}
|
|
2631
2692
|
return null;
|
|
2632
2693
|
}
|
|
2633
|
-
function
|
|
2694
|
+
function N(e, t, n, i = "application/octet-stream") {
|
|
2634
2695
|
let a = n instanceof Uint8Array ? n : new Uint8Array(n);
|
|
2635
2696
|
if (e && e.isRealFilesystem) {
|
|
2636
2697
|
e.setFileByPath(t, a, !0);
|
|
@@ -2645,7 +2706,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2645
2706
|
}
|
|
2646
2707
|
e.setFileByPath(t, s, !0);
|
|
2647
2708
|
}
|
|
2648
|
-
async function
|
|
2709
|
+
async function P(e, t, n = null) {
|
|
2649
2710
|
if (typeof n == "function") {
|
|
2650
2711
|
let r = await n(e, t);
|
|
2651
2712
|
if (r) return r;
|
|
@@ -2673,7 +2734,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2673
2734
|
}
|
|
2674
2735
|
throw Error(`Package '${e}' could not be loaded`);
|
|
2675
2736
|
}
|
|
2676
|
-
function
|
|
2737
|
+
function F(e, t = !1) {
|
|
2677
2738
|
let n = {
|
|
2678
2739
|
usage: null,
|
|
2679
2740
|
options: []
|
|
@@ -2690,7 +2751,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2690
2751
|
}
|
|
2691
2752
|
return n;
|
|
2692
2753
|
}
|
|
2693
|
-
function
|
|
2754
|
+
function I(e) {
|
|
2694
2755
|
let t = {
|
|
2695
2756
|
usage: null,
|
|
2696
2757
|
options: [],
|
|
@@ -2715,12 +2776,12 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2715
2776
|
r.length >= 4 && n.push(r);
|
|
2716
2777
|
let i = n.join("\n");
|
|
2717
2778
|
t.isInteractive || (i.includes("/dev/tty") || i.includes("\x1B[?1049h") || i.includes("smcup") || i.includes("xterm")) && (t.isInteractive = !0);
|
|
2718
|
-
let a =
|
|
2779
|
+
let a = F(i, !0);
|
|
2719
2780
|
t.usage = a.usage, t.options = a.options;
|
|
2720
2781
|
} catch {}
|
|
2721
2782
|
return t;
|
|
2722
2783
|
}
|
|
2723
|
-
function
|
|
2784
|
+
function ee(e, t = {}, n = null) {
|
|
2724
2785
|
let r = t.name || e, i = t.version || "wasm", a = t.description || "WebAssembly binary", o = t && typeof t.repl == "object" ? t.repl : t.repl ? {} : null, s = n && n.usage || t.usage, c = s ? s.replace(/%s/g, e) : null, l = o ? `${e} [options] ${o.evalFlag ? `[${o.evalFlag} <code>] ` : ""}[file] [args...]` : `${e} [options] [args...]`, u = [`${e} (${r} ${i} wasm) — ${a}`, `Usage: ${c || l}`];
|
|
2725
2786
|
t.details && u.push("", t.details), u.push("", "Options:");
|
|
2726
2787
|
let d = n && n.options && n.options.length > 0 ? n.options : Array.isArray(t.options) ? t.options : [];
|
|
@@ -2728,7 +2789,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2728
2789
|
else o && (o.evalFlag && u.push(` ${o.evalFlag.padEnd(20)}Evaluate inline code and print result`), u.push(` (no arguments) Start interactive ${e} REPL shell`));
|
|
2729
2790
|
return u.push(" -h, --help Show this help message and exit"), u.push(" -V, --version Show WebAssembly binary version and exit"), n && n.exports && n.exports.length > 0 && u.push("", `WASM Exports: ${n.exports.join(", ")}`), Array.isArray(t.aliases) && t.aliases.length > 0 && u.push("", `Aliases: ${t.aliases.join(", ")}`), (t.homepage || t.cdnUrl || t.wasmUrl) && u.push(`Source: ${t.homepage || t.cdnUrl || t.wasmUrl}`), u;
|
|
2730
2791
|
}
|
|
2731
|
-
function
|
|
2792
|
+
function te(e, t = {}, n = null) {
|
|
2732
2793
|
let r = T(), i = (n || e.bin || e.name).toLowerCase();
|
|
2733
2794
|
class a extends r {
|
|
2734
2795
|
static get name() {
|
|
@@ -2747,7 +2808,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2747
2808
|
return this._subCommand ? !!this._subCommand.captureInput : this.interactive;
|
|
2748
2809
|
}
|
|
2749
2810
|
get isRaw() {
|
|
2750
|
-
return
|
|
2811
|
+
return this._subCommand ? !!(this._subCommand.isRaw || this._subCommand.stdinStream && this._subCommand.stdinStream.isRaw) : !!(this.stdinStream && this.stdinStream.isRaw);
|
|
2751
2812
|
}
|
|
2752
2813
|
get _inAltScreen() {
|
|
2753
2814
|
return !!(this.__inAltScreen || this._subCommand && this._subCommand._inAltScreen);
|
|
@@ -2763,7 +2824,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2763
2824
|
}
|
|
2764
2825
|
async run() {
|
|
2765
2826
|
let n = [...this.arguments || []], r = n.includes("--help") || n.includes("-h"), a = !r && (n.includes("--version") || n.includes("-V") || n.includes("-v")), o = this.fs || this.context && this.context.fs;
|
|
2766
|
-
this._inspectedWasm = null, this._persistedWasmBytes = e.wasmPath ?
|
|
2827
|
+
this._inspectedWasm = null, this._persistedWasmBytes = e.wasmPath ? M(o, e.wasmPath) : null, r && this._persistedWasmBytes && this._persistedWasmBytes.byteLength > 0 && (this._inspectedWasm = I(this._persistedWasmBytes));
|
|
2767
2828
|
try {
|
|
2768
2829
|
if ((e.type === "wasm" || e.type === "custom-wasm") && (this._persistedWasmBytes || e.wasmUrl)) {
|
|
2769
2830
|
let i = this._persistedWasmBytes;
|
|
@@ -2772,7 +2833,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2772
2833
|
n instanceof Uint8Array || n instanceof ArrayBuffer ? i = n instanceof Uint8Array ? n : new Uint8Array(n) : n && (n.wasmBytes || n.wasm || n.wasmBinary) && (i = n.wasmBytes || n.wasm || n.wasmBinary);
|
|
2773
2834
|
} catch {}
|
|
2774
2835
|
if (!i && e.wasmUrl && (i = await this._fetchWasmBytes(e.wasmUrl)), i) {
|
|
2775
|
-
r && (this._inspectedWasm =
|
|
2836
|
+
r && (this._inspectedWasm = I(i)), await this._runRawWasmBytes(i, n);
|
|
2776
2837
|
return;
|
|
2777
2838
|
}
|
|
2778
2839
|
} else {
|
|
@@ -2789,19 +2850,19 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2789
2850
|
}
|
|
2790
2851
|
let c, l;
|
|
2791
2852
|
try {
|
|
2792
|
-
c = await
|
|
2853
|
+
c = await P(e.name, o, t.moduleLoader), l = c && c.default !== void 0 ? c.default : c, l && typeof l.then == "function" && (l = await l);
|
|
2793
2854
|
} finally {
|
|
2794
2855
|
s && (globalThis.fetch = s);
|
|
2795
2856
|
}
|
|
2796
2857
|
if (l instanceof Uint8Array || l instanceof ArrayBuffer) {
|
|
2797
2858
|
let e = l instanceof Uint8Array ? l : new Uint8Array(l);
|
|
2798
|
-
r && (this._inspectedWasm =
|
|
2859
|
+
r && (this._inspectedWasm = I(e)), await this._runRawWasmBytes(e, n);
|
|
2799
2860
|
} else if (l && (l.wasmBytes instanceof Uint8Array || l.wasm instanceof Uint8Array)) {
|
|
2800
2861
|
let e = l.wasmBytes || l.wasm;
|
|
2801
|
-
r && (this._inspectedWasm =
|
|
2862
|
+
r && (this._inspectedWasm = I(e)), await this._runRawWasmBytes(e, n);
|
|
2802
2863
|
} else if (typeof l == "function") await this._runFunctionOrEmscripten(l, n, r, a);
|
|
2803
2864
|
else if (l && typeof l == "object") {
|
|
2804
|
-
l.ready && await l.ready, r && (l.HEAPU8 instanceof Uint8Array || l.wasmBinary instanceof Uint8Array) && (this._inspectedWasm =
|
|
2865
|
+
l.ready && await l.ready, r && (l.HEAPU8 instanceof Uint8Array || l.wasmBinary instanceof Uint8Array) && (this._inspectedWasm = I(l.wasmBinary || l.HEAPU8));
|
|
2805
2866
|
let t = l.main || l.run || l.callMain || l.exec;
|
|
2806
2867
|
if (typeof t == "function") await this._invokeCliFunction(t.bind(l), n);
|
|
2807
2868
|
else if (l.promised || typeof l.raw == "function" || typeof l.json == "function") {
|
|
@@ -2829,29 +2890,29 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2829
2890
|
}
|
|
2830
2891
|
}
|
|
2831
2892
|
if (r || a) {
|
|
2832
|
-
let t = this.result && this.result.getStdOutput ? this.result.getStdOutput() : [], n = t.map((e) => e.string).join("\n"), o = r ?
|
|
2893
|
+
let t = this.result && this.result.getStdOutput ? this.result.getStdOutput() : [], n = t.map((e) => e.string).join("\n"), o = r ? F(n) : null, s = r && !!(o && (o.usage || o.options.length > 0) || t.some((e) => /\b(usage|options):/i.test(e.string))), c = t.filter((e) => e.type === "out").map((e) => e.string), l = a && c.length > 0 && (this.exitCode === 0 || this.exitCode === void 0);
|
|
2833
2894
|
if (r) if (s) {
|
|
2834
2895
|
let e = t.map((e) => e.string);
|
|
2835
2896
|
this.result && Array.isArray(this.result.std) && (this.result.std.length = 0), this.exitCode = 0;
|
|
2836
2897
|
for (let t of e) this.stdOut = t;
|
|
2837
2898
|
} else {
|
|
2838
2899
|
this.result && Array.isArray(this.result.std) && (this.result.std.length = 0), this.exitCode = 0;
|
|
2839
|
-
for (let t of
|
|
2900
|
+
for (let t of ee(i, e, this._inspectedWasm)) this.stdOut = t;
|
|
2840
2901
|
}
|
|
2841
2902
|
else a && !l ? (this.result && Array.isArray(this.result.std) && (this.result.std.length = 0), this.exitCode = 0, this.stdOut = `${i} (${e.name} ${e.version || "wasm"} wasm)`) : this.exitCode = 0;
|
|
2842
2903
|
}
|
|
2843
2904
|
}
|
|
2844
2905
|
async _fetchWasmBytes(e) {
|
|
2845
|
-
if (
|
|
2906
|
+
if (j.has(e)) return j.get(e);
|
|
2846
2907
|
let n = t.fetch || (typeof fetch == "function" ? fetch : null);
|
|
2847
2908
|
if (!n) throw Error("fetch is not available in this environment");
|
|
2848
2909
|
let r = await n(e);
|
|
2849
2910
|
if (!r || !r.ok) throw Error(`HTTP ${r ? r.status : "error"} fetching ${e}`);
|
|
2850
2911
|
let i = new Uint8Array(await r.arrayBuffer());
|
|
2851
|
-
return
|
|
2912
|
+
return j.set(e, i), i;
|
|
2852
2913
|
}
|
|
2853
2914
|
async _runRawWasmBytes(t, n) {
|
|
2854
|
-
let r = new
|
|
2915
|
+
let r = new A(i, n, this.context);
|
|
2855
2916
|
r.script = i, r.arguments = n, r.context = this.context, r.fs = this.fs, r._pkgMeta = e, r.stdinStream = this.stdinStream, r.stdout = this.stdout, r.stderr = this.stderr, r.stdin = this.stdin && !this.stdin.isTTY ? this.stdin : this.stdinStream, this._onStdinStreamData && this.stdinStream && typeof this.stdinStream.off == "function" && this.stdinStream.off("data", this._onStdinStreamData);
|
|
2856
2917
|
let a = () => {
|
|
2857
2918
|
this.emit("interactive"), this.context && typeof this.context.emit == "function" && this.context.emit("interactive");
|
|
@@ -2884,13 +2945,13 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2884
2945
|
let n = t && t !== "." && !e.startsWith("/") ? `${t.replace(/\/+$/, "")}/${e}` : e, r = this.fs.getFileByPath(n) ?? this.fs.getFileByPath(e);
|
|
2885
2946
|
return r == null ? null : typeof r == "string" ? r : new TextDecoder().decode(r);
|
|
2886
2947
|
},
|
|
2887
|
-
readBytes: (e) =>
|
|
2948
|
+
readBytes: (e) => M(this.fs, e),
|
|
2888
2949
|
writeFile: (e, t, n) => {
|
|
2889
2950
|
if (!this.fs) return;
|
|
2890
2951
|
let r = n && n !== "." && !e.startsWith("/") ? `${n.replace(/\/+$/, "")}/${e}` : e;
|
|
2891
2952
|
if (t instanceof Uint8Array || ArrayBuffer.isView(t)) {
|
|
2892
2953
|
let e = r.endsWith(".wasm") ? "application/wasm" : "application/octet-stream";
|
|
2893
|
-
|
|
2954
|
+
N(this.fs, r, t, e);
|
|
2894
2955
|
} else this.fs.setFileByPath(r, String(t), !0);
|
|
2895
2956
|
if (r.endsWith(".wasm") || r.endsWith(".wat")) try {
|
|
2896
2957
|
this.fs.setMode(r, 493);
|
|
@@ -2926,7 +2987,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2926
2987
|
if (e && typeof e.status == "number") this.exitCode = e.status;
|
|
2927
2988
|
else throw e;
|
|
2928
2989
|
}
|
|
2929
|
-
if (f && typeof f == "object") if (r && (f.wasmBinary instanceof Uint8Array || f.HEAPU8 instanceof Uint8Array) && (this._inspectedWasm =
|
|
2990
|
+
if (f && typeof f == "object") if (r && (f.wasmBinary instanceof Uint8Array || f.HEAPU8 instanceof Uint8Array) && (this._inspectedWasm = I(f.wasmBinary || f.HEAPU8)), typeof f.callMain == "function") {
|
|
2930
2991
|
f.FS && l.size === 0 && (l = this._syncBrshToEmscriptenFs(f.FS, n));
|
|
2931
2992
|
try {
|
|
2932
2993
|
let e = await f.callMain(n);
|
|
@@ -2989,14 +3050,14 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
2989
3050
|
}), !t.loaded && typeof t.load == "function" && await t.load(e.coreUrl ? { coreURL: e.coreUrl } : void 0);
|
|
2990
3051
|
let a = /* @__PURE__ */ new Set(), o = [];
|
|
2991
3052
|
for (let e of n) if (!e.startsWith("-") && (o.push(e), this.fs.exists(e))) {
|
|
2992
|
-
let n =
|
|
3053
|
+
let n = M(this.fs, e);
|
|
2993
3054
|
n && (await t.writeFile(e, n), a.add(e));
|
|
2994
3055
|
}
|
|
2995
3056
|
let s = await t.exec(n);
|
|
2996
3057
|
for (let e of o) if (!a.has(e)) try {
|
|
2997
3058
|
if (typeof t.readFile == "function") {
|
|
2998
3059
|
let n = await t.readFile(e);
|
|
2999
|
-
n &&
|
|
3060
|
+
n && N(this.fs, e, n);
|
|
3000
3061
|
}
|
|
3001
3062
|
} catch {}
|
|
3002
3063
|
typeof s == "number" && s !== 0 && (this.exitCode = s, i.length === 0 && r.length > 0 && i.push(...r.splice(0, r.length)));
|
|
@@ -3013,7 +3074,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
3013
3074
|
let n = /* @__PURE__ */ new Set();
|
|
3014
3075
|
if (!this.fs || !e || typeof e.writeFile != "function") return n;
|
|
3015
3076
|
for (let r of t) if (!r.startsWith("-") && this.fs.exists(r)) {
|
|
3016
|
-
let t =
|
|
3077
|
+
let t = M(this.fs, r);
|
|
3017
3078
|
if (t) try {
|
|
3018
3079
|
e.writeFile(r, t), n.add(r);
|
|
3019
3080
|
} catch {}
|
|
@@ -3026,7 +3087,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
3026
3087
|
let t = e.readFile(r);
|
|
3027
3088
|
if (t) {
|
|
3028
3089
|
let e = r.endsWith(".wasm") ? "application/wasm" : "application/octet-stream";
|
|
3029
|
-
if (
|
|
3090
|
+
if (N(this.fs, r, t, e), r.endsWith(".wasm") || r.endsWith(".wat")) try {
|
|
3030
3091
|
this.fs.setMode(r, 493);
|
|
3031
3092
|
} catch {}
|
|
3032
3093
|
}
|
|
@@ -3036,10 +3097,10 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
3036
3097
|
}
|
|
3037
3098
|
return a;
|
|
3038
3099
|
}
|
|
3039
|
-
function
|
|
3100
|
+
function ne(e, t) {
|
|
3040
3101
|
return e && (e.endsWith(".wasm") || e.endsWith(".wat")) ? !0 : t instanceof Uint8Array ? t.length >= 4 && t[0] === 0 && t[1] === 97 && t[2] === 115 && t[3] === 109 : typeof t == "string" ? t.charCodeAt(0) === 0 && t.slice(1, 4) === "asm" ? !0 : t.trimStart().startsWith("(module") : !1;
|
|
3041
3102
|
}
|
|
3042
|
-
function
|
|
3103
|
+
function L(e, t) {
|
|
3043
3104
|
if (!e || !t || typeof e.exists != "function" || typeof e.getFileByPath != "function") return null;
|
|
3044
3105
|
try {
|
|
3045
3106
|
let n = t.split("/").filter(Boolean);
|
|
@@ -3052,7 +3113,7 @@ var u, d, f, p, m, h, g, _, v, y, b = e((() => {
|
|
|
3052
3113
|
} catch {}
|
|
3053
3114
|
return null;
|
|
3054
3115
|
}
|
|
3055
|
-
|
|
3116
|
+
A.isWasmFile = ne, A.readSiblingPkgMeta = L, A.readBytesFromFs = M, A.writeBytesToFs = N, A.loadModule = P, A.extractHelpFromText = F, A.inspectWasmBytes = I, A.formatWasmHelp = ee, A.createGenericWasmCommand = te, A.createCommand = te, t.exports = A;
|
|
3056
3117
|
})), A = /* @__PURE__ */ t(((e, t) => {
|
|
3057
3118
|
var n = T();
|
|
3058
3119
|
t.exports = class extends n {
|
|
@@ -3492,81 +3553,81 @@ function F() {
|
|
|
3492
3553
|
function I() {
|
|
3493
3554
|
throw Error("clearTimeout has not been defined");
|
|
3494
3555
|
}
|
|
3495
|
-
function
|
|
3496
|
-
if (
|
|
3497
|
-
if ((
|
|
3556
|
+
function ee(e) {
|
|
3557
|
+
if (re === setTimeout) return setTimeout(e, 0);
|
|
3558
|
+
if ((re === F || !re) && setTimeout) return re = setTimeout, setTimeout(e, 0);
|
|
3498
3559
|
try {
|
|
3499
|
-
return
|
|
3560
|
+
return re(e, 0);
|
|
3500
3561
|
} catch {
|
|
3501
3562
|
try {
|
|
3502
|
-
return
|
|
3563
|
+
return re.call(null, e, 0);
|
|
3503
3564
|
} catch {
|
|
3504
|
-
return
|
|
3565
|
+
return re.call(this, e, 0);
|
|
3505
3566
|
}
|
|
3506
3567
|
}
|
|
3507
3568
|
}
|
|
3508
|
-
function
|
|
3509
|
-
if (
|
|
3510
|
-
if ((
|
|
3569
|
+
function te(e) {
|
|
3570
|
+
if (H === clearTimeout) return clearTimeout(e);
|
|
3571
|
+
if ((H === I || !H) && clearTimeout) return H = clearTimeout, clearTimeout(e);
|
|
3511
3572
|
try {
|
|
3512
|
-
return
|
|
3573
|
+
return H(e);
|
|
3513
3574
|
} catch {
|
|
3514
3575
|
try {
|
|
3515
|
-
return
|
|
3576
|
+
return H.call(null, e);
|
|
3516
3577
|
} catch {
|
|
3517
|
-
return
|
|
3578
|
+
return H.call(this, e);
|
|
3518
3579
|
}
|
|
3519
3580
|
}
|
|
3520
3581
|
}
|
|
3521
|
-
function
|
|
3522
|
-
!
|
|
3582
|
+
function ne() {
|
|
3583
|
+
!ae || !U || (ae = !1, U.length ? ie = U.concat(ie) : W = -1, ie.length && L());
|
|
3523
3584
|
}
|
|
3524
|
-
function
|
|
3525
|
-
if (!
|
|
3526
|
-
var e =
|
|
3527
|
-
|
|
3528
|
-
for (var t =
|
|
3529
|
-
for (
|
|
3530
|
-
|
|
3585
|
+
function L() {
|
|
3586
|
+
if (!ae) {
|
|
3587
|
+
var e = ee(ne);
|
|
3588
|
+
ae = !0;
|
|
3589
|
+
for (var t = ie.length; t;) {
|
|
3590
|
+
for (U = ie, ie = []; ++W < t;) U && U[W].run();
|
|
3591
|
+
W = -1, t = ie.length;
|
|
3531
3592
|
}
|
|
3532
|
-
|
|
3593
|
+
U = null, ae = !1, te(e);
|
|
3533
3594
|
}
|
|
3534
3595
|
}
|
|
3535
|
-
function
|
|
3596
|
+
function R(e, t) {
|
|
3536
3597
|
this.fun = e, this.array = t;
|
|
3537
3598
|
}
|
|
3538
|
-
function
|
|
3539
|
-
var V,
|
|
3540
|
-
|
|
3599
|
+
function z() {}
|
|
3600
|
+
var B, V, re, H, ie, ae, U, W, G, K, q = e((() => {
|
|
3601
|
+
B = { exports: {} }, V = B.exports = {}, (function() {
|
|
3541
3602
|
try {
|
|
3542
|
-
|
|
3603
|
+
re = typeof setTimeout == "function" ? setTimeout : F;
|
|
3543
3604
|
} catch {
|
|
3544
|
-
|
|
3605
|
+
re = F;
|
|
3545
3606
|
}
|
|
3546
3607
|
try {
|
|
3547
|
-
|
|
3608
|
+
H = typeof clearTimeout == "function" ? clearTimeout : I;
|
|
3548
3609
|
} catch {
|
|
3549
|
-
|
|
3610
|
+
H = I;
|
|
3550
3611
|
}
|
|
3551
|
-
})(),
|
|
3612
|
+
})(), ie = [], ae = !1, W = -1, V.nextTick = function(e) {
|
|
3552
3613
|
var t = Array(arguments.length - 1);
|
|
3553
3614
|
if (arguments.length > 1) for (var n = 1; n < arguments.length; n++) t[n - 1] = arguments[n];
|
|
3554
|
-
|
|
3555
|
-
},
|
|
3615
|
+
ie.push(new R(e, t)), ie.length === 1 && !ae && ee(L);
|
|
3616
|
+
}, R.prototype.run = function() {
|
|
3556
3617
|
this.fun.apply(null, this.array);
|
|
3557
|
-
},
|
|
3618
|
+
}, V.title = "browser", V.browser = !0, V.env = {}, V.argv = [], V.version = "", V.versions = {}, V.on = z, V.addListener = z, V.once = z, V.off = z, V.removeListener = z, V.removeAllListeners = z, V.emit = z, V.prependListener = z, V.prependOnceListener = z, V.listeners = function(e) {
|
|
3558
3619
|
return [];
|
|
3559
|
-
},
|
|
3620
|
+
}, V.binding = function(e) {
|
|
3560
3621
|
throw Error("process.binding is not supported");
|
|
3561
|
-
},
|
|
3622
|
+
}, V.cwd = function() {
|
|
3562
3623
|
return "/";
|
|
3563
|
-
},
|
|
3624
|
+
}, V.chdir = function(e) {
|
|
3564
3625
|
throw Error("process.chdir is not supported");
|
|
3565
|
-
},
|
|
3626
|
+
}, V.umask = function() {
|
|
3566
3627
|
return 0;
|
|
3567
|
-
},
|
|
3568
|
-
})),
|
|
3569
|
-
b(),
|
|
3628
|
+
}, G = B.exports, K = /* @__PURE__ */ P(G);
|
|
3629
|
+
})), J = /* @__PURE__ */ t(((e, t) => {
|
|
3630
|
+
b(), q();
|
|
3570
3631
|
var { BinaryFile: n, SymlinkRef: r, DeviceFile: i } = N(), a = new Uint8Array([
|
|
3571
3632
|
66,
|
|
3572
3633
|
82,
|
|
@@ -3705,8 +3766,8 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
3705
3766
|
let t = new DecompressionStream("gzip"), n = new Blob([e]).stream().pipeThrough(t), r = await new Response(n).arrayBuffer();
|
|
3706
3767
|
return new Uint8Array(r);
|
|
3707
3768
|
}
|
|
3708
|
-
if (
|
|
3709
|
-
let t =
|
|
3769
|
+
if (K !== void 0 && typeof K.getBuiltinModule == "function") {
|
|
3770
|
+
let t = K.getBuiltinModule("zlib");
|
|
3710
3771
|
if (t) return new Uint8Array(t.gunzipSync(y.from(e.buffer, e.byteOffset, e.byteLength)));
|
|
3711
3772
|
}
|
|
3712
3773
|
throw Error("Gzip decompression is not supported in this environment");
|
|
@@ -3725,8 +3786,8 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
3725
3786
|
return p(new Uint8Array(n), t);
|
|
3726
3787
|
}
|
|
3727
3788
|
if (typeof e == "string") {
|
|
3728
|
-
if (!/^https?:\/\//i.test(e) &&
|
|
3729
|
-
let n =
|
|
3789
|
+
if (!/^https?:\/\//i.test(e) && K !== void 0 && typeof K.getBuiltinModule == "function" && typeof window > "u") try {
|
|
3790
|
+
let n = K.getBuiltinModule("fs");
|
|
3730
3791
|
if (n && n.existsSync(e)) {
|
|
3731
3792
|
let r = await n.promises.readFile(e);
|
|
3732
3793
|
return p(new Uint8Array(r.buffer, r.byteOffset, r.byteLength), t);
|
|
@@ -3838,7 +3899,7 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
3838
3899
|
}
|
|
3839
3900
|
}
|
|
3840
3901
|
};
|
|
3841
|
-
})),
|
|
3902
|
+
})), Y = /* @__PURE__ */ t(((e, t) => {
|
|
3842
3903
|
b();
|
|
3843
3904
|
var n = N(), { BinaryFile: r, SymlinkRef: i, DeviceFile: a } = n;
|
|
3844
3905
|
function o(e) {
|
|
@@ -3864,10 +3925,10 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
3864
3925
|
t.exports = class extends n {
|
|
3865
3926
|
constructor(e = "/", t = {}, n = {}, r = null) {
|
|
3866
3927
|
if (super(), t instanceof Uint8Array || t instanceof ArrayBuffer) {
|
|
3867
|
-
let { deserializeBinaryFilesystem: e } =
|
|
3928
|
+
let { deserializeBinaryFilesystem: e } = J(), r = e(t);
|
|
3868
3929
|
t = r.filesystem, n = Object.assign({}, r.permissions, n);
|
|
3869
3930
|
} else if (t && typeof t == "object" && t.filesystem && (t.filesystem instanceof Uint8Array || typeof t.filesystem == "object") && (n = Object.assign({}, t.permissions || {}, n), t = t.filesystem, t instanceof Uint8Array || t instanceof ArrayBuffer)) {
|
|
3870
|
-
let { deserializeBinaryFilesystem: e } =
|
|
3931
|
+
let { deserializeBinaryFilesystem: e } = J(), r = e(t);
|
|
3871
3932
|
t = r.filesystem, n = Object.assign({}, r.permissions, n);
|
|
3872
3933
|
}
|
|
3873
3934
|
o(t), this.fileSystem = t, this.permissions = Object.assign({}, n), this.cwd = e.endsWith("/") ? e : e + "/", this._onChange = r, this._changeScheduled = !1, this._initDevices();
|
|
@@ -3909,11 +3970,11 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
3909
3970
|
}), this._devices.stdin = new i("/dev/tty"), this._devices.stdout = new i("/dev/tty"), this._devices.stderr = new i("/dev/tty");
|
|
3910
3971
|
}
|
|
3911
3972
|
toBinaryContainer(e = {}) {
|
|
3912
|
-
let { serializeBinaryFilesystem: t } =
|
|
3973
|
+
let { serializeBinaryFilesystem: t } = J();
|
|
3913
3974
|
return t(this.fileSystem, this.permissions, e);
|
|
3914
3975
|
}
|
|
3915
3976
|
static fromBinaryContainer(e, t = {}) {
|
|
3916
|
-
let { deserializeBinaryFilesystem: n } =
|
|
3977
|
+
let { deserializeBinaryFilesystem: n } = J();
|
|
3917
3978
|
return n(e, t);
|
|
3918
3979
|
}
|
|
3919
3980
|
getFileByPath(e) {
|
|
@@ -4158,8 +4219,8 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
4158
4219
|
return null;
|
|
4159
4220
|
}
|
|
4160
4221
|
}, t.exports.BinaryFile = r, t.exports.SymlinkRef = i;
|
|
4161
|
-
})),
|
|
4162
|
-
|
|
4222
|
+
})), oe = /* @__PURE__ */ t(((e, t) => {
|
|
4223
|
+
q();
|
|
4163
4224
|
function n(e) {
|
|
4164
4225
|
if (typeof e != "string") throw TypeError("Path must be a string. Received " + JSON.stringify(e));
|
|
4165
4226
|
}
|
|
@@ -4197,7 +4258,7 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
4197
4258
|
resolve: function() {
|
|
4198
4259
|
for (var e = "", t = !1, i, a = arguments.length - 1; a >= -1 && !t; a--) {
|
|
4199
4260
|
var o;
|
|
4200
|
-
a >= 0 ? o = arguments[a] : (i === void 0 && (i =
|
|
4261
|
+
a >= 0 ? o = arguments[a] : (i === void 0 && (i = K.cwd()), o = i), n(o), o.length !== 0 && (e = o + "/" + e, t = o.charCodeAt(0) === 47);
|
|
4201
4262
|
}
|
|
4202
4263
|
return e = r(e, !t), t ? e.length > 0 ? "/" + e : "/" : e.length > 0 ? e : ".";
|
|
4203
4264
|
},
|
|
@@ -4326,12 +4387,12 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
4326
4387
|
posix: null
|
|
4327
4388
|
};
|
|
4328
4389
|
a.posix = a, t.exports = a;
|
|
4329
|
-
})),
|
|
4330
|
-
b(),
|
|
4331
|
-
var r = O(), i =
|
|
4390
|
+
})), se = /* @__PURE__ */ t(((e, t) => {
|
|
4391
|
+
b(), q();
|
|
4392
|
+
var r = O(), i = oe(), a = N(), { BinaryFile: o, SymlinkRef: s, isUtf8Text: c } = a;
|
|
4332
4393
|
t.exports = class extends a {
|
|
4333
4394
|
constructor(e = "/", t = null, n = {}) {
|
|
4334
|
-
super(), this._onChange = t, this._changeScheduled = !1, this._virtualFiles = {}, this._rootDir = n && n.rootDir ? i.resolve(n.rootDir) : null, this.cwd = this._normalizeCwd(e || (this._rootDir ? "/" :
|
|
4395
|
+
super(), this._onChange = t, this._changeScheduled = !1, this._virtualFiles = {}, this._rootDir = n && n.rootDir ? i.resolve(n.rootDir) : null, this.cwd = this._normalizeCwd(e || (this._rootDir ? "/" : K.cwd()));
|
|
4335
4396
|
}
|
|
4336
4397
|
get isRealFilesystem() {
|
|
4337
4398
|
return !0;
|
|
@@ -4614,8 +4675,8 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
4614
4675
|
}
|
|
4615
4676
|
}
|
|
4616
4677
|
};
|
|
4617
|
-
})),
|
|
4618
|
-
var n =
|
|
4678
|
+
})), ce = /* @__PURE__ */ t(((e, t) => {
|
|
4679
|
+
var n = Y();
|
|
4619
4680
|
t.exports = class {
|
|
4620
4681
|
constructor(e) {
|
|
4621
4682
|
this.options = e;
|
|
@@ -4649,7 +4710,7 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
4649
4710
|
return this.fs._getFileRaw(t) || null;
|
|
4650
4711
|
}
|
|
4651
4712
|
setNodeFilesystem(e) {
|
|
4652
|
-
let t =
|
|
4713
|
+
let t = se(), n = this.fs._onChange;
|
|
4653
4714
|
this.fs = new t(e, n);
|
|
4654
4715
|
}
|
|
4655
4716
|
setFilesystem(e, t = {}) {
|
|
@@ -4669,7 +4730,7 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
4669
4730
|
typeof this._destroyFn == "function" && this._destroyFn(e);
|
|
4670
4731
|
}
|
|
4671
4732
|
};
|
|
4672
|
-
})),
|
|
4733
|
+
})), le = /* @__PURE__ */ t(((e, t) => {
|
|
4673
4734
|
var r = k();
|
|
4674
4735
|
t.exports = class e {
|
|
4675
4736
|
static isCommandClass(e) {
|
|
@@ -4718,7 +4779,7 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
4718
4779
|
return r.createGenericWasmCommand(c, { moduleLoader: async () => n }, i);
|
|
4719
4780
|
}
|
|
4720
4781
|
};
|
|
4721
|
-
})),
|
|
4782
|
+
})), ue = /* @__PURE__ */ t(((e, t) => {
|
|
4722
4783
|
var n = T(), r = class extends n {
|
|
4723
4784
|
static get name() {
|
|
4724
4785
|
return "test";
|
|
@@ -4803,7 +4864,7 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
4803
4864
|
}
|
|
4804
4865
|
}
|
|
4805
4866
|
};
|
|
4806
|
-
})),
|
|
4867
|
+
})), de = /* @__PURE__ */ t(((e, t) => {
|
|
4807
4868
|
var n = T();
|
|
4808
4869
|
t.exports = class extends n {
|
|
4809
4870
|
static get name() {
|
|
@@ -4844,7 +4905,7 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
4844
4905
|
return o.forEach((e) => this.stdOut = e), Promise.resolve();
|
|
4845
4906
|
}
|
|
4846
4907
|
};
|
|
4847
|
-
})),
|
|
4908
|
+
})), fe = /* @__PURE__ */ t(((e, t) => {
|
|
4848
4909
|
function n(e) {
|
|
4849
4910
|
return typeof e == "object" && !!e;
|
|
4850
4911
|
}
|
|
@@ -4855,7 +4916,7 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
4855
4916
|
return Array.isArray(e) ? e : e === void 0 ? [] : r(e) || e instanceof Set ? Array.from(e) : [e];
|
|
4856
4917
|
}
|
|
4857
4918
|
t.exports = i;
|
|
4858
|
-
})),
|
|
4919
|
+
})), X = /* @__PURE__ */ t(((e, t) => {
|
|
4859
4920
|
function n(e, t, ...n) {
|
|
4860
4921
|
let r = [];
|
|
4861
4922
|
if (!Array.isArray(e)) throw Error("Input must be an array");
|
|
@@ -4875,7 +4936,7 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
4875
4936
|
return e;
|
|
4876
4937
|
}
|
|
4877
4938
|
t.exports = n;
|
|
4878
|
-
})),
|
|
4939
|
+
})), pe = /* @__PURE__ */ t(((e) => {
|
|
4879
4940
|
Object.defineProperty(e, "__esModule", { value: !0 });
|
|
4880
4941
|
function t(e) {
|
|
4881
4942
|
return !isNaN(parseFloat(e));
|
|
@@ -4954,25 +5015,25 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
4954
5015
|
isFunction: h,
|
|
4955
5016
|
isAsyncFunction: g
|
|
4956
5017
|
}, e.isArrayLike = i, e.isAsyncFunction = g, e.isClass = u, e.isDefined = o, e.isDefinedValue = l, e.isFiniteNumber = n, e.isFunction = h, e.isIterable = p, e.isNull = c, e.isNumber = t, e.isObject = a, e.isPlainObject = r, e.isPrimitive = d, e.isPromise = f, e.isString = m, e.isUndefined = s;
|
|
4957
|
-
})),
|
|
4958
|
-
|
|
5018
|
+
})), me, Z = e((() => {
|
|
5019
|
+
me = globalThis || self;
|
|
4959
5020
|
})), he = /* @__PURE__ */ t(((e, t) => {
|
|
4960
|
-
|
|
4961
|
-
var n = Infinity, r = "[object Symbol]", i = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, a = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, o = "\\ud800-\\udfff", s = "\\u0300-\\u036f\\ufe20-\\ufe23", c = "\\u20d0-\\u20f0", l = "\\u2700-\\u27bf", u = "a-z\\xdf-\\xf6\\xf8-\\xff", d = "\\xac\\xb1\\xd7\\xf7", f = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", p = "\\u2000-\\u206f", m = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", h = "A-Z\\xc0-\\xd6\\xd8-\\xde", g = "\\ufe0e\\ufe0f", _ = d + f + p + m, v = "['’]", y = "[" + o + "]", b = "[" + _ + "]", x = "[" + s + c + "]", S = "\\d+", C = "[" + l + "]", w = "[" + u + "]", T = "[^" + o + _ + S + l + u + h + "]", E = "\\ud83c[\\udffb-\\udfff]", D = "(?:" + x + "|" + E + ")", O = "[^" + o + "]", k = "(?:\\ud83c[\\udde6-\\uddff]){2}", A = "[\\ud800-\\udbff][\\udc00-\\udfff]", j = "[" + h + "]", M = "\\u200d", N = "(?:" + w + "|" + T + ")", P = "(?:" + j + "|" + T + ")", F = "(?:" + v + "(?:d|ll|m|re|s|t|ve))?", I = "(?:" + v + "(?:D|LL|M|RE|S|T|VE))?",
|
|
5021
|
+
Z();
|
|
5022
|
+
var n = Infinity, r = "[object Symbol]", i = /[^\x00-\x2f\x3a-\x40\x5b-\x60\x7b-\x7f]+/g, a = /[\xc0-\xd6\xd8-\xf6\xf8-\xff\u0100-\u017f]/g, o = "\\ud800-\\udfff", s = "\\u0300-\\u036f\\ufe20-\\ufe23", c = "\\u20d0-\\u20f0", l = "\\u2700-\\u27bf", u = "a-z\\xdf-\\xf6\\xf8-\\xff", d = "\\xac\\xb1\\xd7\\xf7", f = "\\x00-\\x2f\\x3a-\\x40\\x5b-\\x60\\x7b-\\xbf", p = "\\u2000-\\u206f", m = " \\t\\x0b\\f\\xa0\\ufeff\\n\\r\\u2028\\u2029\\u1680\\u180e\\u2000\\u2001\\u2002\\u2003\\u2004\\u2005\\u2006\\u2007\\u2008\\u2009\\u200a\\u202f\\u205f\\u3000", h = "A-Z\\xc0-\\xd6\\xd8-\\xde", g = "\\ufe0e\\ufe0f", _ = d + f + p + m, v = "['’]", y = "[" + o + "]", b = "[" + _ + "]", x = "[" + s + c + "]", S = "\\d+", C = "[" + l + "]", w = "[" + u + "]", T = "[^" + o + _ + S + l + u + h + "]", E = "\\ud83c[\\udffb-\\udfff]", D = "(?:" + x + "|" + E + ")", O = "[^" + o + "]", k = "(?:\\ud83c[\\udde6-\\uddff]){2}", A = "[\\ud800-\\udbff][\\udc00-\\udfff]", j = "[" + h + "]", M = "\\u200d", N = "(?:" + w + "|" + T + ")", P = "(?:" + j + "|" + T + ")", F = "(?:" + v + "(?:d|ll|m|re|s|t|ve))?", I = "(?:" + v + "(?:D|LL|M|RE|S|T|VE))?", ee = D + "?", te = "[" + g + "]?", ne = "(?:" + M + "(?:" + [
|
|
4962
5023
|
O,
|
|
4963
5024
|
k,
|
|
4964
5025
|
A
|
|
4965
|
-
].join("|") + ")" +
|
|
5026
|
+
].join("|") + ")" + te + ee + ")*", L = te + ee + ne, R = "(?:" + [
|
|
4966
5027
|
C,
|
|
4967
5028
|
k,
|
|
4968
5029
|
A
|
|
4969
|
-
].join("|") + ")" +
|
|
5030
|
+
].join("|") + ")" + L, z = "(?:" + [
|
|
4970
5031
|
O + x + "?",
|
|
4971
5032
|
x,
|
|
4972
5033
|
k,
|
|
4973
5034
|
A,
|
|
4974
5035
|
y
|
|
4975
|
-
].join("|") + ")",
|
|
5036
|
+
].join("|") + ")", B = RegExp(v, "g"), V = RegExp(x, "g"), re = RegExp(E + "(?=" + E + ")|" + z + L, "g"), H = RegExp([
|
|
4976
5037
|
j + "?" + w + "+" + F + "(?=" + [
|
|
4977
5038
|
b,
|
|
4978
5039
|
j,
|
|
@@ -4986,8 +5047,8 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
4986
5047
|
j + "?" + N + "+" + F,
|
|
4987
5048
|
j + "+" + I,
|
|
4988
5049
|
S,
|
|
4989
|
-
|
|
4990
|
-
].join("|"), "g"),
|
|
5050
|
+
R
|
|
5051
|
+
].join("|"), "g"), ie = RegExp("[" + M + o + s + c + g + "]"), ae = /[a-z][A-Z]|[A-Z]{2,}[a-z]|[0-9][a-zA-Z]|[a-zA-Z][0-9]|[^a-zA-Z0-9 ]/, U = {
|
|
4991
5052
|
À: "A",
|
|
4992
5053
|
Á: "A",
|
|
4993
5054
|
Â: "A",
|
|
@@ -5178,40 +5239,40 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
5178
5239
|
œ: "oe",
|
|
5179
5240
|
ʼn: "'n",
|
|
5180
5241
|
ſ: "ss"
|
|
5181
|
-
},
|
|
5182
|
-
function
|
|
5242
|
+
}, W = typeof me == "object" && me && me.Object === Object && me, G = typeof self == "object" && self && self.Object === Object && self, K = W || G || Function("return this")();
|
|
5243
|
+
function q(e, t, n, r) {
|
|
5183
5244
|
var i = -1, a = e ? e.length : 0;
|
|
5184
5245
|
for (r && a && (n = e[++i]); ++i < a;) n = t(n, e[i], i, e);
|
|
5185
5246
|
return n;
|
|
5186
5247
|
}
|
|
5187
|
-
function
|
|
5248
|
+
function J(e) {
|
|
5188
5249
|
return e.split("");
|
|
5189
5250
|
}
|
|
5190
|
-
function
|
|
5251
|
+
function Y(e) {
|
|
5191
5252
|
return e.match(i) || [];
|
|
5192
5253
|
}
|
|
5193
|
-
function
|
|
5254
|
+
function oe(e) {
|
|
5194
5255
|
return function(t) {
|
|
5195
5256
|
return e?.[t];
|
|
5196
5257
|
};
|
|
5197
5258
|
}
|
|
5198
|
-
var
|
|
5199
|
-
function se(e) {
|
|
5200
|
-
return re.test(e);
|
|
5201
|
-
}
|
|
5259
|
+
var se = oe(U);
|
|
5202
5260
|
function ce(e) {
|
|
5203
5261
|
return ie.test(e);
|
|
5204
5262
|
}
|
|
5205
5263
|
function le(e) {
|
|
5206
|
-
return
|
|
5264
|
+
return ae.test(e);
|
|
5207
5265
|
}
|
|
5208
5266
|
function ue(e) {
|
|
5209
|
-
return e
|
|
5267
|
+
return ce(e) ? de(e) : J(e);
|
|
5210
5268
|
}
|
|
5211
5269
|
function de(e) {
|
|
5212
|
-
return e.match(
|
|
5270
|
+
return e.match(re) || [];
|
|
5213
5271
|
}
|
|
5214
|
-
|
|
5272
|
+
function fe(e) {
|
|
5273
|
+
return e.match(H) || [];
|
|
5274
|
+
}
|
|
5275
|
+
var X = Object.prototype.toString, pe = K.Symbol, he = pe ? pe.prototype : void 0, ge = he ? he.toString : void 0;
|
|
5215
5276
|
function _e(e, t, n) {
|
|
5216
5277
|
var r = -1, i = e.length;
|
|
5217
5278
|
t < 0 && (t = -t > i ? 0 : i + t), n = n > i ? i : n, n < 0 && (n += i), i = t > n ? 0 : n - t >>> 0, t >>>= 0;
|
|
@@ -5231,20 +5292,20 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
5231
5292
|
function be(e) {
|
|
5232
5293
|
return function(t) {
|
|
5233
5294
|
t = we(t);
|
|
5234
|
-
var n =
|
|
5295
|
+
var n = ce(t) ? ue(t) : void 0, r = n ? n[0] : t.charAt(0), i = n ? ye(n, 1).join("") : t.slice(1);
|
|
5235
5296
|
return r[e]() + i;
|
|
5236
5297
|
};
|
|
5237
5298
|
}
|
|
5238
5299
|
function xe(e) {
|
|
5239
5300
|
return function(t) {
|
|
5240
|
-
return
|
|
5301
|
+
return q(ke(De(t).replace(B, "")), e, "");
|
|
5241
5302
|
};
|
|
5242
5303
|
}
|
|
5243
5304
|
function Se(e) {
|
|
5244
5305
|
return !!e && typeof e == "object";
|
|
5245
5306
|
}
|
|
5246
5307
|
function Ce(e) {
|
|
5247
|
-
return typeof e == "symbol" || Se(e) &&
|
|
5308
|
+
return typeof e == "symbol" || Se(e) && X.call(e) == r;
|
|
5248
5309
|
}
|
|
5249
5310
|
function we(e) {
|
|
5250
5311
|
return e == null ? "" : ve(e);
|
|
@@ -5256,26 +5317,26 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
5256
5317
|
return Oe(we(e).toLowerCase());
|
|
5257
5318
|
}
|
|
5258
5319
|
function De(e) {
|
|
5259
|
-
return e = we(e), e && e.replace(a,
|
|
5320
|
+
return e = we(e), e && e.replace(a, se).replace(V, "");
|
|
5260
5321
|
}
|
|
5261
5322
|
var Oe = be("toUpperCase");
|
|
5262
5323
|
function ke(e, t, n) {
|
|
5263
|
-
return e = we(e), t = n ? void 0 : t, t === void 0 ?
|
|
5324
|
+
return e = we(e), t = n ? void 0 : t, t === void 0 ? le(e) ? fe(e) : Y(e) : e.match(t) || [];
|
|
5264
5325
|
}
|
|
5265
5326
|
t.exports = Te;
|
|
5266
5327
|
})), ge = /* @__PURE__ */ t(((e, t) => {
|
|
5267
|
-
|
|
5268
|
-
var n =
|
|
5328
|
+
q();
|
|
5329
|
+
var n = fe(), r = X(), i = pe(), a = he(), o = {
|
|
5269
5330
|
short: /^-([^\d-])$/,
|
|
5270
5331
|
long: /^--(\S+)/,
|
|
5271
5332
|
combinedShort: /^-[^\d-]{2,}$/,
|
|
5272
5333
|
optEquals: /^(--\S+?)=(.*)/
|
|
5273
5334
|
}, s = class extends Array {
|
|
5274
5335
|
load(e) {
|
|
5275
|
-
if (this.clear(), e && e !==
|
|
5336
|
+
if (this.clear(), e && e !== K.argv) e = n(e);
|
|
5276
5337
|
else {
|
|
5277
|
-
e =
|
|
5278
|
-
let t =
|
|
5338
|
+
e = K.argv.slice(0);
|
|
5339
|
+
let t = K.execArgv.some(m) ? 1 : 2;
|
|
5279
5340
|
e.splice(0, t);
|
|
5280
5341
|
}
|
|
5281
5342
|
e.forEach((e) => this.push(String(e)));
|
|
@@ -5885,9 +5946,9 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
5885
5946
|
}
|
|
5886
5947
|
};
|
|
5887
5948
|
})), Ce = /* @__PURE__ */ t(((e, t) => {
|
|
5888
|
-
var { Test: n, TestBracket: r } =
|
|
5949
|
+
var { Test: n, TestBracket: r } = ue();
|
|
5889
5950
|
t.exports = [
|
|
5890
|
-
|
|
5951
|
+
de(),
|
|
5891
5952
|
_e(),
|
|
5892
5953
|
ve(),
|
|
5893
5954
|
ye(),
|
|
@@ -6230,7 +6291,7 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
6230
6291
|
continue;
|
|
6231
6292
|
}
|
|
6232
6293
|
try {
|
|
6233
|
-
let e =
|
|
6294
|
+
let e = oe();
|
|
6234
6295
|
r.mkdirSync(e.dirname(i), { recursive: !0 }), r.renameSync(n, i);
|
|
6235
6296
|
} catch (n) {
|
|
6236
6297
|
this.stdErr = `mv: cannot move '${e}' to '${t}': ${n.message}`, this.exitCode = 1;
|
|
@@ -6695,7 +6756,7 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
6695
6756
|
let e = new TextDecoder().decode(t);
|
|
6696
6757
|
this.fs.setFileByPath(s, e, !0);
|
|
6697
6758
|
} else {
|
|
6698
|
-
let { BinaryFile: e } =
|
|
6759
|
+
let { BinaryFile: e } = Y(), r = e ? new e(t.buffer, n || "application/octet-stream") : t;
|
|
6699
6760
|
this.fs.setFileByPath(s, r, !0);
|
|
6700
6761
|
}
|
|
6701
6762
|
} catch (e) {
|
|
@@ -7163,15 +7224,15 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
7163
7224
|
"%URIErrorPrototype%": ["URIError", "prototype"],
|
|
7164
7225
|
"%WeakMapPrototype%": ["WeakMap", "prototype"],
|
|
7165
7226
|
"%WeakSetPrototype%": ["WeakSet", "prototype"]
|
|
7166
|
-
}, F = ht(), I = Ct(),
|
|
7167
|
-
var t =
|
|
7227
|
+
}, F = ht(), I = Ct(), ee = F.call(k, Array.prototype.concat), te = F.call(O, Array.prototype.splice), ne = F.call(k, String.prototype.replace), L = F.call(k, String.prototype.slice), R = F.call(k, RegExp.prototype.exec), z = /[^%.[\]]+|\[(?:(-?\d+(?:\.\d+)?)|(["'])((?:(?!\2)[^\\]|\\.)*?)\2)\]|(?=(?:\.|\[\])(?:\.|\[\]|%$))/g, B = /\\(\\)?/g, V = function(e) {
|
|
7228
|
+
var t = L(e, 0, 1), n = L(e, -1);
|
|
7168
7229
|
if (t === "%" && n !== "%") throw new c("invalid intrinsic syntax, expected closing `%`");
|
|
7169
7230
|
if (n === "%" && t !== "%") throw new c("invalid intrinsic syntax, expected opening `%`");
|
|
7170
7231
|
var r = [];
|
|
7171
|
-
return
|
|
7172
|
-
r[r.length] = n ?
|
|
7232
|
+
return ne(e, z, function(e, t, n, i) {
|
|
7233
|
+
r[r.length] = n ? ne(i, B, "$1") : t || e;
|
|
7173
7234
|
}), r;
|
|
7174
|
-
},
|
|
7235
|
+
}, re = function(e, t) {
|
|
7175
7236
|
var n = e, r;
|
|
7176
7237
|
if (I(P, n) && (r = P[n], n = "%" + r[0] + "%"), I(M, n)) {
|
|
7177
7238
|
var i = M[n];
|
|
@@ -7187,11 +7248,11 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
7187
7248
|
t.exports = function(e, t) {
|
|
7188
7249
|
if (typeof e != "string" || e.length === 0) throw new l("intrinsic name must be a non-empty string");
|
|
7189
7250
|
if (arguments.length > 1 && typeof t != "boolean") throw new l("\"allowMissing\" argument must be a boolean");
|
|
7190
|
-
if (
|
|
7191
|
-
var n =
|
|
7192
|
-
u && (r = u[0],
|
|
7251
|
+
if (R(/^%?[^%]*%?$/, e) === null) throw new c("`%` may not be present anywhere but at the beginning and end of the intrinsic name");
|
|
7252
|
+
var n = V(e), r = n.length > 0 ? n[0] : "", i = re("%" + r + "%", t), a = i.name, o = i.value, s = !1, u = i.alias;
|
|
7253
|
+
u && (r = u[0], te(n, ee([0, 1], u)));
|
|
7193
7254
|
for (var d = 1, f = !0; d < n.length; d += 1) {
|
|
7194
|
-
var p = n[d], m =
|
|
7255
|
+
var p = n[d], m = L(p, 0, 1), h = L(p, -1);
|
|
7195
7256
|
if ((m === "\"" || m === "'" || m === "`" || h === "\"" || h === "'" || h === "`") && m !== h) throw new c("property names with quotes must have matching quotes");
|
|
7196
7257
|
if ((p === "constructor" || !f) && (s = !0), r += "." + p, a = "%" + r + "%", I(M, a)) o = M[a];
|
|
7197
7258
|
else if (o != null) {
|
|
@@ -7389,7 +7450,7 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
7389
7450
|
})), Lt = /* @__PURE__ */ t(((e, t) => {
|
|
7390
7451
|
t.exports = {};
|
|
7391
7452
|
})), Rt = /* @__PURE__ */ t(((e, t) => {
|
|
7392
|
-
|
|
7453
|
+
Z();
|
|
7393
7454
|
var n = typeof Map == "function" && Map.prototype, r = Object.getOwnPropertyDescriptor && n ? Object.getOwnPropertyDescriptor(Map.prototype, "size") : null, i = n && r && typeof r.get == "function" ? r.get : null, a = n && Map.prototype.forEach, o = typeof Set == "function" && Set.prototype, s = Object.getOwnPropertyDescriptor && o ? Object.getOwnPropertyDescriptor(Set.prototype, "size") : null, c = o && s && typeof s.get == "function" ? s.get : null, l = o && Set.prototype.forEach, u = typeof WeakMap == "function" && WeakMap.prototype ? WeakMap.prototype.has : null, d = typeof WeakSet == "function" && WeakSet.prototype ? WeakSet.prototype.has : null, f = typeof WeakRef == "function" && WeakRef.prototype ? WeakRef.prototype.deref : null, p = Boolean.prototype.valueOf, m = Object.prototype.toString, h = Function.prototype.toString, g = String.prototype.match, _ = String.prototype.slice, v = String.prototype.replace, y = String.prototype.toUpperCase, b = String.prototype.toLowerCase, x = RegExp.prototype.test, S = Array.prototype.concat, C = Array.prototype.join, w = Array.prototype.slice, T = Math.floor, E = typeof BigInt == "function" ? BigInt.prototype.valueOf : null, D = Object.getOwnPropertySymbols, O = typeof Symbol == "function" && typeof Symbol.iterator == "symbol" ? Symbol.prototype.toString : null, k = typeof Symbol == "function" && typeof Symbol.iterator == "object", A = typeof Symbol == "function" && Symbol.toStringTag ? Symbol.toStringTag : null, j = Object.prototype.propertyIsEnumerable, M = (typeof Reflect == "function" ? Reflect.getPrototypeOf : Object.getPrototypeOf) || ([].__proto__ === Array.prototype ? function(e) {
|
|
7394
7455
|
return e.__proto__;
|
|
7395
7456
|
} : null);
|
|
@@ -7405,28 +7466,28 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
7405
7466
|
}
|
|
7406
7467
|
return v.call(t, n, "$&_");
|
|
7407
7468
|
}
|
|
7408
|
-
var P = Lt(), F = P.custom, I =
|
|
7469
|
+
var P = Lt(), F = P.custom, I = U(F) ? F : null, ee = {
|
|
7409
7470
|
__proto__: null,
|
|
7410
7471
|
double: "\"",
|
|
7411
7472
|
single: "'"
|
|
7412
|
-
},
|
|
7473
|
+
}, te = {
|
|
7413
7474
|
__proto__: null,
|
|
7414
7475
|
double: /(["\\])/g,
|
|
7415
7476
|
single: /(['\\])/g
|
|
7416
7477
|
};
|
|
7417
7478
|
t.exports = function e(t, n, r, o) {
|
|
7418
7479
|
var s = n || {};
|
|
7419
|
-
if (
|
|
7420
|
-
if (
|
|
7421
|
-
var u =
|
|
7480
|
+
if (K(s, "quoteStyle") && !K(ee, s.quoteStyle)) throw TypeError("option \"quoteStyle\" must be \"single\" or \"double\"");
|
|
7481
|
+
if (K(s, "maxStringLength") && (typeof s.maxStringLength == "number" ? s.maxStringLength < 0 && s.maxStringLength !== Infinity : s.maxStringLength !== null)) throw TypeError("option \"maxStringLength\", if provided, must be a positive integer, Infinity, or `null`");
|
|
7482
|
+
var u = K(s, "customInspect") ? s.customInspect : !0;
|
|
7422
7483
|
if (typeof u != "boolean" && u !== "symbol") throw TypeError("option \"customInspect\", if provided, must be `true`, `false`, or `'symbol'`");
|
|
7423
|
-
if (
|
|
7424
|
-
if (
|
|
7484
|
+
if (K(s, "indent") && s.indent !== null && s.indent !== " " && !(parseInt(s.indent, 10) === s.indent && s.indent > 0)) throw TypeError("option \"indent\" must be \"\\t\", an integer > 0, or `null`");
|
|
7485
|
+
if (K(s, "numericSeparator") && typeof s.numericSeparator != "boolean") throw TypeError("option \"numericSeparator\", if provided, must be `true` or `false`");
|
|
7425
7486
|
var d = s.numericSeparator;
|
|
7426
7487
|
if (t === void 0) return "undefined";
|
|
7427
7488
|
if (t === null) return "null";
|
|
7428
7489
|
if (typeof t == "boolean") return t ? "true" : "false";
|
|
7429
|
-
if (typeof t == "string") return
|
|
7490
|
+
if (typeof t == "string") return fe(t, s);
|
|
7430
7491
|
if (typeof t == "number") {
|
|
7431
7492
|
if (t === 0) return Infinity / t > 0 ? "0" : "-0";
|
|
7432
7493
|
var f = String(t);
|
|
@@ -7437,101 +7498,101 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
7437
7498
|
return d ? N(t, m) : m;
|
|
7438
7499
|
}
|
|
7439
7500
|
var h = s.depth === void 0 ? 5 : s.depth;
|
|
7440
|
-
if (r === void 0 && (r = 0), r >= h && h > 0 && typeof t == "object") return
|
|
7501
|
+
if (r === void 0 && (r = 0), r >= h && h > 0 && typeof t == "object") return z(t) ? "[Array]" : "[Object]";
|
|
7441
7502
|
var g = ve(s, r);
|
|
7442
7503
|
if (o === void 0) o = [];
|
|
7443
|
-
else if (
|
|
7504
|
+
else if (Y(o, t) >= 0) return "[Circular]";
|
|
7444
7505
|
function y(t, n, i) {
|
|
7445
7506
|
if (n && (o = w.call(o), o.push(n)), i) {
|
|
7446
7507
|
var a = { depth: s.depth };
|
|
7447
|
-
return
|
|
7508
|
+
return K(s, "quoteStyle") && (a.quoteStyle = s.quoteStyle), e(t, a, r + 1, o);
|
|
7448
7509
|
}
|
|
7449
7510
|
return e(t, s, r + 1, o);
|
|
7450
7511
|
}
|
|
7451
|
-
if (typeof t == "function" && !
|
|
7452
|
-
var x =
|
|
7512
|
+
if (typeof t == "function" && !V(t)) {
|
|
7513
|
+
var x = J(t), T = be(t, y);
|
|
7453
7514
|
return "[Function" + (x ? ": " + x : " (anonymous)") + "]" + (T.length > 0 ? " { " + C.call(T, ", ") + " }" : "");
|
|
7454
7515
|
}
|
|
7455
|
-
if (
|
|
7516
|
+
if (U(t)) {
|
|
7456
7517
|
var D = k ? v.call(String(t), /^(Symbol\(.*\))_[^)]*$/, "$1") : O.call(t);
|
|
7457
|
-
return typeof t == "object" && !k ?
|
|
7518
|
+
return typeof t == "object" && !k ? pe(D) : D;
|
|
7458
7519
|
}
|
|
7459
|
-
if (
|
|
7460
|
-
for (var F = "<" + b.call(String(t.nodeName)),
|
|
7520
|
+
if (de(t)) {
|
|
7521
|
+
for (var F = "<" + b.call(String(t.nodeName)), te = t.attributes || [], R = 0; R < te.length; R++) F += " " + te[R].name + "=" + ne(L(te[R].value), "double", s);
|
|
7461
7522
|
return F += ">", t.childNodes && t.childNodes.length && (F += "..."), F += "</" + b.call(String(t.nodeName)) + ">", F;
|
|
7462
7523
|
}
|
|
7463
|
-
if (
|
|
7524
|
+
if (z(t)) {
|
|
7464
7525
|
if (t.length === 0) return "[]";
|
|
7465
|
-
var
|
|
7466
|
-
return g && !_e(
|
|
7526
|
+
var G = be(t, y);
|
|
7527
|
+
return g && !_e(G) ? "[" + ye(G, g) + "]" : "[ " + C.call(G, ", ") + " ]";
|
|
7467
7528
|
}
|
|
7468
|
-
if (
|
|
7469
|
-
var
|
|
7470
|
-
return !("cause" in Error.prototype) && "cause" in t && !j.call(t, "cause") ? "{ [" + String(t) + "] " + C.call(S.call("[cause]: " + y(t.cause),
|
|
7529
|
+
if (re(t)) {
|
|
7530
|
+
var X = be(t, y);
|
|
7531
|
+
return !("cause" in Error.prototype) && "cause" in t && !j.call(t, "cause") ? "{ [" + String(t) + "] " + C.call(S.call("[cause]: " + y(t.cause), X), ", ") + " }" : X.length === 0 ? "[" + String(t) + "]" : "{ [" + String(t) + "] " + C.call(X, ", ") + " }";
|
|
7471
7532
|
}
|
|
7472
7533
|
if (typeof t == "object" && u) {
|
|
7473
7534
|
if (I && typeof t[I] == "function" && P) return P(t, { depth: h - r });
|
|
7474
7535
|
if (u !== "symbol" && typeof t.inspect == "function") return t.inspect();
|
|
7475
7536
|
}
|
|
7476
|
-
if (
|
|
7477
|
-
var
|
|
7537
|
+
if (oe(t)) {
|
|
7538
|
+
var Z = [];
|
|
7478
7539
|
return a && a.call(t, function(e, n) {
|
|
7479
|
-
|
|
7480
|
-
}), ge("Map", i.call(t),
|
|
7540
|
+
Z.push(y(n, t, !0) + " => " + y(e, t));
|
|
7541
|
+
}), ge("Map", i.call(t), Z, g);
|
|
7481
7542
|
}
|
|
7482
|
-
if (
|
|
7543
|
+
if (le(t)) {
|
|
7483
7544
|
var xe = [];
|
|
7484
7545
|
return l && l.call(t, function(e) {
|
|
7485
7546
|
xe.push(y(e, t));
|
|
7486
7547
|
}), ge("Set", c.call(t), xe, g);
|
|
7487
7548
|
}
|
|
7488
|
-
if (
|
|
7489
|
-
if (
|
|
7490
|
-
if (
|
|
7491
|
-
if (
|
|
7492
|
-
if (
|
|
7493
|
-
if (
|
|
7494
|
-
if (
|
|
7549
|
+
if (se(t)) return he("WeakMap");
|
|
7550
|
+
if (ue(t)) return he("WeakSet");
|
|
7551
|
+
if (ce(t)) return he("WeakRef");
|
|
7552
|
+
if (ie(t)) return pe(y(Number(t)));
|
|
7553
|
+
if (W(t)) return pe(y(E.call(t)));
|
|
7554
|
+
if (ae(t)) return pe(p.call(t));
|
|
7555
|
+
if (H(t)) return pe(y(String(t)));
|
|
7495
7556
|
if (typeof window < "u" && t === window) return "{ [object Window] }";
|
|
7496
|
-
if (typeof globalThis < "u" && t === globalThis ||
|
|
7497
|
-
if (!
|
|
7498
|
-
var Se = be(t, y), Ce = M ? M(t) === Object.prototype : t instanceof Object || t.constructor === Object, we = t instanceof Object ? "" : "null prototype", Te = !Ce && A && Object(t) === t && A in t ? _.call(
|
|
7557
|
+
if (typeof globalThis < "u" && t === globalThis || me !== void 0 && t === me) return "{ [object globalThis] }";
|
|
7558
|
+
if (!B(t) && !V(t)) {
|
|
7559
|
+
var Se = be(t, y), Ce = M ? M(t) === Object.prototype : t instanceof Object || t.constructor === Object, we = t instanceof Object ? "" : "null prototype", Te = !Ce && A && Object(t) === t && A in t ? _.call(q(t), 8, -1) : we ? "Object" : "", Ee = (Ce || typeof t.constructor != "function" ? "" : t.constructor.name ? t.constructor.name + " " : "") + (Te || we ? "[" + C.call(S.call([], Te || [], we || []), ": ") + "] " : "");
|
|
7499
7560
|
return Se.length === 0 ? Ee + "{}" : g ? Ee + "{" + ye(Se, g) + "}" : Ee + "{ " + C.call(Se, ", ") + " }";
|
|
7500
7561
|
}
|
|
7501
7562
|
return String(t);
|
|
7502
7563
|
};
|
|
7503
|
-
function
|
|
7504
|
-
var r =
|
|
7564
|
+
function ne(e, t, n) {
|
|
7565
|
+
var r = ee[n.quoteStyle || t];
|
|
7505
7566
|
return r + e + r;
|
|
7506
7567
|
}
|
|
7507
|
-
function
|
|
7568
|
+
function L(e) {
|
|
7508
7569
|
return v.call(String(e), /"/g, """);
|
|
7509
7570
|
}
|
|
7510
|
-
function
|
|
7571
|
+
function R(e) {
|
|
7511
7572
|
return !A || !(typeof e == "object" && (A in e || e[A] !== void 0));
|
|
7512
7573
|
}
|
|
7574
|
+
function z(e) {
|
|
7575
|
+
return q(e) === "[object Array]" && R(e);
|
|
7576
|
+
}
|
|
7513
7577
|
function B(e) {
|
|
7514
|
-
return
|
|
7578
|
+
return q(e) === "[object Date]" && R(e);
|
|
7515
7579
|
}
|
|
7516
7580
|
function V(e) {
|
|
7517
|
-
return
|
|
7518
|
-
}
|
|
7519
|
-
function H(e) {
|
|
7520
|
-
return J(e) === "[object RegExp]" && z(e);
|
|
7521
|
-
}
|
|
7522
|
-
function ne(e) {
|
|
7523
|
-
return J(e) === "[object Error]" && z(e);
|
|
7524
|
-
}
|
|
7525
|
-
function U(e) {
|
|
7526
|
-
return J(e) === "[object String]" && z(e);
|
|
7581
|
+
return q(e) === "[object RegExp]" && R(e);
|
|
7527
7582
|
}
|
|
7528
7583
|
function re(e) {
|
|
7529
|
-
return
|
|
7584
|
+
return q(e) === "[object Error]" && R(e);
|
|
7585
|
+
}
|
|
7586
|
+
function H(e) {
|
|
7587
|
+
return q(e) === "[object String]" && R(e);
|
|
7530
7588
|
}
|
|
7531
7589
|
function ie(e) {
|
|
7532
|
-
return
|
|
7590
|
+
return q(e) === "[object Number]" && R(e);
|
|
7533
7591
|
}
|
|
7534
|
-
function
|
|
7592
|
+
function ae(e) {
|
|
7593
|
+
return q(e) === "[object Boolean]" && R(e);
|
|
7594
|
+
}
|
|
7595
|
+
function U(e) {
|
|
7535
7596
|
if (k) return e && typeof e == "object" && e instanceof Symbol;
|
|
7536
7597
|
if (typeof e == "symbol") return !0;
|
|
7537
7598
|
if (!e || typeof e != "object" || !O) return !1;
|
|
@@ -7540,33 +7601,33 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
7540
7601
|
} catch {}
|
|
7541
7602
|
return !1;
|
|
7542
7603
|
}
|
|
7543
|
-
function
|
|
7604
|
+
function W(e) {
|
|
7544
7605
|
if (!e || typeof e != "object" || !E) return !1;
|
|
7545
7606
|
try {
|
|
7546
7607
|
return E.call(e), !0;
|
|
7547
7608
|
} catch {}
|
|
7548
7609
|
return !1;
|
|
7549
7610
|
}
|
|
7550
|
-
var
|
|
7611
|
+
var G = Object.prototype.hasOwnProperty || function(e) {
|
|
7551
7612
|
return e in this;
|
|
7552
7613
|
};
|
|
7553
|
-
function
|
|
7554
|
-
return
|
|
7614
|
+
function K(e, t) {
|
|
7615
|
+
return G.call(e, t);
|
|
7555
7616
|
}
|
|
7556
|
-
function
|
|
7617
|
+
function q(e) {
|
|
7557
7618
|
return m.call(e);
|
|
7558
7619
|
}
|
|
7559
|
-
function
|
|
7620
|
+
function J(e) {
|
|
7560
7621
|
if (e.name) return e.name;
|
|
7561
7622
|
var t = g.call(h.call(e), /^function\s*([\w$]+)/);
|
|
7562
7623
|
return t ? t[1] : null;
|
|
7563
7624
|
}
|
|
7564
|
-
function
|
|
7625
|
+
function Y(e, t) {
|
|
7565
7626
|
if (e.indexOf) return e.indexOf(t);
|
|
7566
7627
|
for (var n = 0, r = e.length; n < r; n++) if (e[n] === t) return n;
|
|
7567
7628
|
return -1;
|
|
7568
7629
|
}
|
|
7569
|
-
function
|
|
7630
|
+
function oe(e) {
|
|
7570
7631
|
if (!i || !e || typeof e != "object") return !1;
|
|
7571
7632
|
try {
|
|
7572
7633
|
i.call(e);
|
|
@@ -7579,7 +7640,7 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
7579
7640
|
} catch {}
|
|
7580
7641
|
return !1;
|
|
7581
7642
|
}
|
|
7582
|
-
function
|
|
7643
|
+
function se(e) {
|
|
7583
7644
|
if (!u || !e || typeof e != "object") return !1;
|
|
7584
7645
|
try {
|
|
7585
7646
|
u.call(e, u);
|
|
@@ -7592,14 +7653,14 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
7592
7653
|
} catch {}
|
|
7593
7654
|
return !1;
|
|
7594
7655
|
}
|
|
7595
|
-
function
|
|
7656
|
+
function ce(e) {
|
|
7596
7657
|
if (!f || !e || typeof e != "object") return !1;
|
|
7597
7658
|
try {
|
|
7598
7659
|
return f.call(e), !0;
|
|
7599
7660
|
} catch {}
|
|
7600
7661
|
return !1;
|
|
7601
7662
|
}
|
|
7602
|
-
function
|
|
7663
|
+
function le(e) {
|
|
7603
7664
|
if (!c || !e || typeof e != "object") return !1;
|
|
7604
7665
|
try {
|
|
7605
7666
|
c.call(e);
|
|
@@ -7612,7 +7673,7 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
7612
7673
|
} catch {}
|
|
7613
7674
|
return !1;
|
|
7614
7675
|
}
|
|
7615
|
-
function
|
|
7676
|
+
function ue(e) {
|
|
7616
7677
|
if (!d || !e || typeof e != "object") return !1;
|
|
7617
7678
|
try {
|
|
7618
7679
|
d.call(e, d);
|
|
@@ -7625,18 +7686,18 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
7625
7686
|
} catch {}
|
|
7626
7687
|
return !1;
|
|
7627
7688
|
}
|
|
7628
|
-
function
|
|
7689
|
+
function de(e) {
|
|
7629
7690
|
return !e || typeof e != "object" ? !1 : typeof HTMLElement < "u" && e instanceof HTMLElement ? !0 : typeof e.nodeName == "string" && typeof e.getAttribute == "function";
|
|
7630
7691
|
}
|
|
7631
|
-
function
|
|
7692
|
+
function fe(e, t) {
|
|
7632
7693
|
if (e.length > t.maxStringLength) {
|
|
7633
7694
|
var n = e.length - t.maxStringLength, r = "... " + n + " more character" + (n > 1 ? "s" : "");
|
|
7634
|
-
return
|
|
7695
|
+
return fe(_.call(e, 0, t.maxStringLength), t) + r;
|
|
7635
7696
|
}
|
|
7636
|
-
var i =
|
|
7637
|
-
return i.lastIndex = 0,
|
|
7697
|
+
var i = te[t.quoteStyle || "single"];
|
|
7698
|
+
return i.lastIndex = 0, ne(v.call(v.call(e, i, "\\$1"), /[\x00-\x1f]/g, X), "single", t);
|
|
7638
7699
|
}
|
|
7639
|
-
function
|
|
7700
|
+
function X(e) {
|
|
7640
7701
|
var t = e.charCodeAt(0), n = {
|
|
7641
7702
|
8: "b",
|
|
7642
7703
|
9: "t",
|
|
@@ -7646,7 +7707,7 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
7646
7707
|
}[t];
|
|
7647
7708
|
return n ? "\\" + n : "\\x" + (t < 16 ? "0" : "") + y.call(t.toString(16));
|
|
7648
7709
|
}
|
|
7649
|
-
function
|
|
7710
|
+
function pe(e) {
|
|
7650
7711
|
return "Object(" + e + ")";
|
|
7651
7712
|
}
|
|
7652
7713
|
function he(e) {
|
|
@@ -7657,7 +7718,7 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
7657
7718
|
return e + " (" + t + ") {" + i + "}";
|
|
7658
7719
|
}
|
|
7659
7720
|
function _e(e) {
|
|
7660
|
-
for (var t = 0; t < e.length; t++) if (
|
|
7721
|
+
for (var t = 0; t < e.length; t++) if (Y(e[t], "\n") >= 0) return !1;
|
|
7661
7722
|
return !0;
|
|
7662
7723
|
}
|
|
7663
7724
|
function ve(e, t) {
|
|
@@ -7676,17 +7737,17 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
7676
7737
|
return n + C.call(e, "," + n) + "\n" + t.prev;
|
|
7677
7738
|
}
|
|
7678
7739
|
function be(e, t) {
|
|
7679
|
-
var n =
|
|
7740
|
+
var n = z(e), r = [];
|
|
7680
7741
|
if (n) {
|
|
7681
7742
|
r.length = e.length;
|
|
7682
|
-
for (var i = 0; i < e.length; i++) r[i] =
|
|
7743
|
+
for (var i = 0; i < e.length; i++) r[i] = K(e, i) ? t(e[i], e) : "";
|
|
7683
7744
|
}
|
|
7684
7745
|
var a = typeof D == "function" ? D(e) : [], o;
|
|
7685
7746
|
if (k) {
|
|
7686
7747
|
o = {};
|
|
7687
7748
|
for (var s = 0; s < a.length; s++) o["$" + a[s]] = a[s];
|
|
7688
7749
|
}
|
|
7689
|
-
for (var c in e)
|
|
7750
|
+
for (var c in e) K(e, c) && (n && String(Number(c)) === c && c < e.length || k && o["$" + c] instanceof Symbol || (x.call(/[^\w$]/, c) ? r.push(t(c, e) + ": " + t(e[c], e)) : r.push(c + ": " + t(e[c], e))));
|
|
7690
7751
|
if (typeof D == "function") for (var l = 0; l < a.length; l++) j.call(e, a[l]) && r.push("[" + t(a[l]) + "]: " + t(e[a[l]], e));
|
|
7691
7752
|
return r;
|
|
7692
7753
|
}
|
|
@@ -8600,7 +8661,7 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
8600
8661
|
}), t.exports = s;
|
|
8601
8662
|
})), ur = /* @__PURE__ */ t(((e, t) => {
|
|
8602
8663
|
b();
|
|
8603
|
-
var n =
|
|
8664
|
+
var n = ce(), r = E(), i = D(), a = k(), o = le(), s = T(), c = A(), { TtyStream: l, hasCustomStdinListener: u } = w(), d = "/.brsh_history", f = Ce(), p = Ge(), m = x(), h = N(), { isAsyncFilesystemSource: g, resolveFilesystemSource: _ } = J(), v = /\$(?:\{([\w\d?#@*-]+)\}|([\w\d]+|[?#@*-]))/g, S = m.EventEmitter || m.default || m;
|
|
8604
8665
|
String.prototype.regexIndexOf = function(e, t) {
|
|
8605
8666
|
let n = this.substring(t || 0).search(e);
|
|
8606
8667
|
return n >= 0 ? n + (t || 0) : n;
|
|
@@ -8700,7 +8761,14 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
8700
8761
|
this.setTerminalSize(e, t);
|
|
8701
8762
|
}
|
|
8702
8763
|
onInput(e) {
|
|
8703
|
-
if (this.runningCommand
|
|
8764
|
+
if (this.runningCommand) {
|
|
8765
|
+
let t = this.runningCommand;
|
|
8766
|
+
if ((e === "^C" || e === "") && !(t.isRaw || t.stdinStream && t.stdinStream.isRaw)) {
|
|
8767
|
+
let e = !!(t.interactive || t._inAltScreen);
|
|
8768
|
+
return typeof t.kill == "function" && t.kill("SIGINT"), e || this.stdout.write("^C\r\n"), !0;
|
|
8769
|
+
}
|
|
8770
|
+
if (t.onInput && t.captureInput) return t.onInput(e), !0;
|
|
8771
|
+
}
|
|
8704
8772
|
}
|
|
8705
8773
|
setTerminalSize(e, t) {
|
|
8706
8774
|
this._terminalSize = {
|
|
@@ -9173,7 +9241,8 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
9173
9241
|
if (this.runningCommand) {
|
|
9174
9242
|
let t = this.runningCommand, n = typeof e == "string" && e === "" || e instanceof Uint8Array && e.length === 1 && e[0] === 3 || y !== void 0 && y.isBuffer(e) && e.length === 1 && e[0] === 3, r = !!(t.isRaw || t.stdinStream && t.stdinStream.isRaw);
|
|
9175
9243
|
if (n && !r) {
|
|
9176
|
-
|
|
9244
|
+
let e = !!(t.interactive || t._inAltScreen);
|
|
9245
|
+
typeof t.kill == "function" && t.kill("SIGINT"), e || this.stdout.write("^C\r\n");
|
|
9177
9246
|
return;
|
|
9178
9247
|
}
|
|
9179
9248
|
let i = u(t);
|
|
@@ -9549,7 +9618,7 @@ var V, H, ne, U, re, ie, W, G, K, q, J = e((() => {
|
|
|
9549
9618
|
return e.create(Object.assign({}, n, { filesystem: t }));
|
|
9550
9619
|
}
|
|
9551
9620
|
};
|
|
9552
|
-
C.STATUS_READY = "READY", C.STATUS_WORKING = "WORKING", C.STATUS_DESTROYED = "DESTROYED", C.Command = s, C.InteractiveCommand = c, C.WasmCommand = a, C.createWasmCommand = a.createGenericWasmCommand || a.createCommand, C.ReplCommand = j(), C.JsCommand = o, C.FS = h, C.BinaryContainer =
|
|
9621
|
+
C.STATUS_READY = "READY", C.STATUS_WORKING = "WORKING", C.STATUS_DESTROYED = "DESTROYED", C.Command = s, C.InteractiveCommand = c, C.WasmCommand = a, C.createWasmCommand = a.createGenericWasmCommand || a.createCommand, C.ReplCommand = j(), C.JsCommand = o, C.FS = h, C.BinaryContainer = J(), C.Storage = C.BinaryContainer.FilesystemStorage, globalThis.shell = C, globalThis.Shell = C, t.exports = C;
|
|
9553
9622
|
}));
|
|
9554
9623
|
//#endregion
|
|
9555
9624
|
export default ur();
|