@salesforce/core-bundle 8.6.0 → 8.6.2
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/lib/index.d.ts +5 -4
- package/lib/index.js +10502 -11778
- package/lib/pino-file.js +58 -98
- package/lib/pino-pretty.js +335 -670
- package/lib/pino-worker.js +206 -394
- package/lib/thread-stream-worker.js +4 -8
- package/messages/core.md +1 -1
- package/messages/encryption.md +1 -1
- package/package.json +5 -4
package/lib/pino-worker.js
CHANGED
@@ -12,8 +12,7 @@ var require_err_helpers = __commonJS({
|
|
12
12
|
return err && typeof err.message === "string";
|
13
13
|
};
|
14
14
|
var getErrorCause = (err) => {
|
15
|
-
if (!err)
|
16
|
-
return;
|
15
|
+
if (!err) return;
|
17
16
|
const cause = err.cause;
|
18
17
|
if (typeof cause === "function") {
|
19
18
|
const causeResult = err.cause();
|
@@ -23,8 +22,7 @@ var require_err_helpers = __commonJS({
|
|
23
22
|
}
|
24
23
|
};
|
25
24
|
var _stackWithCauses = (err, seen) => {
|
26
|
-
if (!isErrorLike(err))
|
27
|
-
return "";
|
25
|
+
if (!isErrorLike(err)) return "";
|
28
26
|
const stack = err.stack || "";
|
29
27
|
if (seen.has(err)) {
|
30
28
|
return stack + "\ncauses have become circular...";
|
@@ -39,8 +37,7 @@ var require_err_helpers = __commonJS({
|
|
39
37
|
};
|
40
38
|
var stackWithCauses = (err) => _stackWithCauses(err, /* @__PURE__ */ new Set());
|
41
39
|
var _messageWithCauses = (err, seen, skip) => {
|
42
|
-
if (!isErrorLike(err))
|
43
|
-
return "";
|
40
|
+
if (!isErrorLike(err)) return "";
|
44
41
|
const message = skip ? "" : err.message || "";
|
45
42
|
if (seen.has(err)) {
|
46
43
|
return message + ": ...";
|
@@ -358,22 +355,19 @@ var require_pino_std_serializers = __commonJS({
|
|
358
355
|
req: reqSerializers.reqSerializer,
|
359
356
|
res: resSerializers.resSerializer,
|
360
357
|
wrapErrorSerializer: function wrapErrorSerializer(customSerializer) {
|
361
|
-
if (customSerializer === errSerializer)
|
362
|
-
return customSerializer;
|
358
|
+
if (customSerializer === errSerializer) return customSerializer;
|
363
359
|
return function wrapErrSerializer(err) {
|
364
360
|
return customSerializer(errSerializer(err));
|
365
361
|
};
|
366
362
|
},
|
367
363
|
wrapRequestSerializer: function wrapRequestSerializer(customSerializer) {
|
368
|
-
if (customSerializer === reqSerializers.reqSerializer)
|
369
|
-
return customSerializer;
|
364
|
+
if (customSerializer === reqSerializers.reqSerializer) return customSerializer;
|
370
365
|
return function wrappedReqSerializer(req) {
|
371
366
|
return customSerializer(reqSerializers.reqSerializer(req));
|
372
367
|
};
|
373
368
|
},
|
374
369
|
wrapResponseSerializer: function wrapResponseSerializer(customSerializer) {
|
375
|
-
if (customSerializer === resSerializers.resSerializer)
|
376
|
-
return customSerializer;
|
370
|
+
if (customSerializer === resSerializers.resSerializer) return customSerializer;
|
377
371
|
return function wrappedResSerializer(res) {
|
378
372
|
return customSerializer(resSerializers.resSerializer(res));
|
379
373
|
};
|
@@ -426,13 +420,10 @@ var require_validator = __commonJS({
|
|
426
420
|
throw Error(ERR_PATHS_MUST_BE_STRINGS());
|
427
421
|
}
|
428
422
|
try {
|
429
|
-
if (/〇/.test(s))
|
430
|
-
throw Error();
|
423
|
+
if (/〇/.test(s)) throw Error();
|
431
424
|
const expr = (s[0] === "[" ? "" : ".") + s.replace(/^\*/, "\u3007").replace(/\.\*/g, ".\u3007").replace(/\[\*\]/g, "[\u3007]");
|
432
|
-
if (/\n|\r|;/.test(expr))
|
433
|
-
|
434
|
-
if (/\/\*/.test(expr))
|
435
|
-
throw Error();
|
425
|
+
if (/\n|\r|;/.test(expr)) throw Error();
|
426
|
+
if (/\/\*/.test(expr)) throw Error();
|
436
427
|
Function(`
|
437
428
|
'use strict'
|
438
429
|
const o = new Proxy({}, { get: () => o, set: () => { throw Error() } });
|
@@ -469,10 +460,8 @@ var require_parse = __commonJS({
|
|
469
460
|
var path = strPath.match(rx).map((p) => p.replace(/'|"|`/g, ""));
|
470
461
|
const leadingBracket = strPath[0] === "[";
|
471
462
|
path = path.map((p) => {
|
472
|
-
if (p[0] === "[")
|
473
|
-
|
474
|
-
else
|
475
|
-
return p;
|
463
|
+
if (p[0] === "[") return p.substr(1, p.length - 2);
|
464
|
+
else return p;
|
476
465
|
});
|
477
466
|
const star = path.indexOf("*");
|
478
467
|
if (star > -1) {
|
@@ -544,14 +533,11 @@ var require_redactor = __commonJS({
|
|
544
533
|
while ((match = rx.exec(path)) !== null) {
|
545
534
|
const [, ix] = match;
|
546
535
|
const { index, input } = match;
|
547
|
-
if (index > skip)
|
548
|
-
hops.push(input.substring(0, index - (ix ? 0 : 1)));
|
536
|
+
if (index > skip) hops.push(input.substring(0, index - (ix ? 0 : 1)));
|
549
537
|
}
|
550
538
|
var existence = hops.map((p) => `o${delim}${p}`).join(" && ");
|
551
|
-
if (existence.length === 0)
|
552
|
-
|
553
|
-
else
|
554
|
-
existence += ` && o${delim}${path} != null`;
|
539
|
+
if (existence.length === 0) existence += `o${delim}${path} != null`;
|
540
|
+
else existence += ` && o${delim}${path} != null`;
|
555
541
|
const circularDetection = `
|
556
542
|
switch (true) {
|
557
543
|
${hops.reverse().map((p) => `
|
@@ -614,8 +600,7 @@ var require_modifiers = __commonJS({
|
|
614
600
|
nestedRestore
|
615
601
|
};
|
616
602
|
function groupRestore({ keys, values, target }) {
|
617
|
-
if (target == null || typeof target === "string")
|
618
|
-
return;
|
603
|
+
if (target == null || typeof target === "string") return;
|
619
604
|
const length = keys.length;
|
620
605
|
for (var i = 0; i < length; i++) {
|
621
606
|
const k = keys[i];
|
@@ -624,8 +609,7 @@ var require_modifiers = __commonJS({
|
|
624
609
|
}
|
625
610
|
function groupRedact(o, path, censor, isCensorFct, censorFctTakesPath) {
|
626
611
|
const target = get(o, path);
|
627
|
-
if (target == null || typeof target === "string")
|
628
|
-
return { keys: null, values: null, target, flat: true };
|
612
|
+
if (target == null || typeof target === "string") return { keys: null, values: null, target, flat: true };
|
629
613
|
const keys = Object.keys(target);
|
630
614
|
const keysLength = keys.length;
|
631
615
|
const pathLength = path.length;
|
@@ -657,8 +641,7 @@ var require_modifiers = __commonJS({
|
|
657
641
|
}
|
658
642
|
function nestedRedact(store, o, path, ns, censor, isCensorFct, censorFctTakesPath) {
|
659
643
|
const target = get(o, path);
|
660
|
-
if (target == null)
|
661
|
-
return;
|
644
|
+
if (target == null) return;
|
662
645
|
const keys = Object.keys(target);
|
663
646
|
const keysLength = keys.length;
|
664
647
|
for (var i = 0; i < keysLength; i++) {
|
@@ -687,8 +670,7 @@ var require_modifiers = __commonJS({
|
|
687
670
|
var depth = 0;
|
688
671
|
var redactPathCurrent = tree();
|
689
672
|
ov = n = o[k];
|
690
|
-
if (typeof n !== "object")
|
691
|
-
return;
|
673
|
+
if (typeof n !== "object") return;
|
692
674
|
while (n != null && ++i < afterPathLen) {
|
693
675
|
depth += 1;
|
694
676
|
k = afterPath[i];
|
@@ -754,8 +736,7 @@ var require_modifiers = __commonJS({
|
|
754
736
|
}
|
755
737
|
n = n[k];
|
756
738
|
}
|
757
|
-
if (typeof n !== "object")
|
758
|
-
break;
|
739
|
+
if (typeof n !== "object") break;
|
759
740
|
if (ov === oov || typeof ov === "undefined") {
|
760
741
|
}
|
761
742
|
}
|
@@ -907,10 +888,8 @@ var require_state = __commonJS({
|
|
907
888
|
wcLen
|
908
889
|
} = o;
|
909
890
|
const builder = [{ secret, censor, compileRestore }];
|
910
|
-
if (serialize !== false)
|
911
|
-
|
912
|
-
if (wcLen > 0)
|
913
|
-
builder.push({ groupRedact, nestedRedact, wildcards, wcLen });
|
891
|
+
if (serialize !== false) builder.push({ serialize });
|
892
|
+
if (wcLen > 0) builder.push({ groupRedact, nestedRedact, wildcards, wcLen });
|
914
893
|
return Object.assign(...builder);
|
915
894
|
}
|
916
895
|
}
|
@@ -944,8 +923,7 @@ var require_fast_redact = __commonJS({
|
|
944
923
|
const censor = remove === true ? void 0 : "censor" in opts ? opts.censor : DEFAULT_CENSOR;
|
945
924
|
const isCensorFct = typeof censor === "function";
|
946
925
|
const censorFctTakesPath = isCensorFct && censor.length > 1;
|
947
|
-
if (paths.length === 0)
|
948
|
-
return serialize || noop;
|
926
|
+
if (paths.length === 0) return serialize || noop;
|
949
927
|
validate({ paths, serialize, censor });
|
950
928
|
const { wildcards, wcLen, secret } = parse({ paths, censor });
|
951
929
|
const compileRestore = restorer();
|
@@ -1114,8 +1092,7 @@ var require_redaction = __commonJS({
|
|
1114
1092
|
if (Array.isArray(paths) === false) {
|
1115
1093
|
throw Error("pino \u2013 redact must contain an array of strings");
|
1116
1094
|
}
|
1117
|
-
if (remove === true)
|
1118
|
-
censor = void 0;
|
1095
|
+
if (remove === true) censor = void 0;
|
1119
1096
|
validate({ paths, censor });
|
1120
1097
|
return { paths, censor };
|
1121
1098
|
}
|
@@ -1152,8 +1129,7 @@ var require_quick_format_unescaped = __commonJS({
|
|
1152
1129
|
var offset = 1;
|
1153
1130
|
if (typeof f === "object" && f !== null) {
|
1154
1131
|
var len = args.length + offset;
|
1155
|
-
if (len === 1)
|
1156
|
-
return f;
|
1132
|
+
if (len === 1) return f;
|
1157
1133
|
var objects = new Array(len);
|
1158
1134
|
objects[0] = ss(f);
|
1159
1135
|
for (var index = 1; index < len; index++) {
|
@@ -1165,8 +1141,7 @@ var require_quick_format_unescaped = __commonJS({
|
|
1165
1141
|
return f;
|
1166
1142
|
}
|
1167
1143
|
var argLen = args.length;
|
1168
|
-
if (argLen === 0)
|
1169
|
-
return f;
|
1144
|
+
if (argLen === 0) return f;
|
1170
1145
|
var str = "";
|
1171
1146
|
var a = 1 - offset;
|
1172
1147
|
var lastPos = -1;
|
@@ -1176,11 +1151,11 @@ var require_quick_format_unescaped = __commonJS({
|
|
1176
1151
|
lastPos = lastPos > -1 ? lastPos : 0;
|
1177
1152
|
switch (f.charCodeAt(i + 1)) {
|
1178
1153
|
case 100:
|
1154
|
+
// 'd'
|
1179
1155
|
case 102:
|
1180
1156
|
if (a >= argLen)
|
1181
1157
|
break;
|
1182
|
-
if (args[a] == null)
|
1183
|
-
break;
|
1158
|
+
if (args[a] == null) break;
|
1184
1159
|
if (lastPos < i)
|
1185
1160
|
str += f.slice(lastPos, i);
|
1186
1161
|
str += Number(args[a]);
|
@@ -1190,8 +1165,7 @@ var require_quick_format_unescaped = __commonJS({
|
|
1190
1165
|
case 105:
|
1191
1166
|
if (a >= argLen)
|
1192
1167
|
break;
|
1193
|
-
if (args[a] == null)
|
1194
|
-
break;
|
1168
|
+
if (args[a] == null) break;
|
1195
1169
|
if (lastPos < i)
|
1196
1170
|
str += f.slice(lastPos, i);
|
1197
1171
|
str += Math.floor(Number(args[a]));
|
@@ -1199,12 +1173,13 @@ var require_quick_format_unescaped = __commonJS({
|
|
1199
1173
|
i++;
|
1200
1174
|
break;
|
1201
1175
|
case 79:
|
1176
|
+
// 'O'
|
1202
1177
|
case 111:
|
1178
|
+
// 'o'
|
1203
1179
|
case 106:
|
1204
1180
|
if (a >= argLen)
|
1205
1181
|
break;
|
1206
|
-
if (args[a] === void 0)
|
1207
|
-
break;
|
1182
|
+
if (args[a] === void 0) break;
|
1208
1183
|
if (lastPos < i)
|
1209
1184
|
str += f.slice(lastPos, i);
|
1210
1185
|
var type = typeof args[a];
|
@@ -1349,8 +1324,7 @@ var require_sonic_boom = __commonJS({
|
|
1349
1324
|
const mode = sonic.mode;
|
1350
1325
|
if (sonic.sync) {
|
1351
1326
|
try {
|
1352
|
-
if (sonic.mkdir)
|
1353
|
-
fs.mkdirSync(path.dirname(file), { recursive: true });
|
1327
|
+
if (sonic.mkdir) fs.mkdirSync(path.dirname(file), { recursive: true });
|
1354
1328
|
const fd = fs.openSync(file, flags, mode);
|
1355
1329
|
fileOpened(null, fd);
|
1356
1330
|
} catch (err) {
|
@@ -1359,8 +1333,7 @@ var require_sonic_boom = __commonJS({
|
|
1359
1333
|
}
|
1360
1334
|
} else if (sonic.mkdir) {
|
1361
1335
|
fs.mkdir(path.dirname(file), { recursive: true }, (err) => {
|
1362
|
-
if (err)
|
1363
|
-
return fileOpened(err);
|
1336
|
+
if (err) return fileOpened(err);
|
1364
1337
|
fs.open(file, flags, mode, fileOpened);
|
1365
1338
|
});
|
1366
1339
|
} else {
|
@@ -1512,8 +1485,7 @@ var require_sonic_boom = __commonJS({
|
|
1512
1485
|
}
|
1513
1486
|
function emitDrain(sonic) {
|
1514
1487
|
const hasListeners = sonic.listenerCount("drain") > 0;
|
1515
|
-
if (!hasListeners)
|
1516
|
-
return;
|
1488
|
+
if (!hasListeners) return;
|
1517
1489
|
sonic._asyncDrainScheduled = false;
|
1518
1490
|
sonic.emit("drain");
|
1519
1491
|
}
|
@@ -2026,10 +1998,8 @@ var require_wait = __commonJS({
|
|
2026
1998
|
if (current === prior) {
|
2027
1999
|
check(backoff >= MAX_TIMEOUT ? MAX_TIMEOUT : backoff * 2);
|
2028
2000
|
} else {
|
2029
|
-
if (current === expected)
|
2030
|
-
|
2031
|
-
else
|
2032
|
-
done(null, "not-equal");
|
2001
|
+
if (current === expected) done(null, "ok");
|
2002
|
+
else done(null, "not-equal");
|
2033
2003
|
}
|
2034
2004
|
}, backoff);
|
2035
2005
|
}
|
@@ -2660,8 +2630,7 @@ var require_tools = __commonJS({
|
|
2660
2630
|
function noop() {
|
2661
2631
|
}
|
2662
2632
|
function genLog(level, hook) {
|
2663
|
-
if (!hook)
|
2664
|
-
return LOG;
|
2633
|
+
if (!hook) return LOG;
|
2665
2634
|
return function hookWrappedLog(...args) {
|
2666
2635
|
hook.call(this, args, LOG, level);
|
2667
2636
|
};
|
@@ -2754,9 +2723,9 @@ var require_tools = __commonJS({
|
|
2754
2723
|
if (Number.isFinite(value) === false) {
|
2755
2724
|
value = null;
|
2756
2725
|
}
|
2726
|
+
// this case explicitly falls through to the next one
|
2757
2727
|
case "boolean":
|
2758
|
-
if (stringifier)
|
2759
|
-
value = stringifier(value);
|
2728
|
+
if (stringifier) value = stringifier(value);
|
2760
2729
|
break;
|
2761
2730
|
case "string":
|
2762
2731
|
value = (stringifier || asString)(value);
|
@@ -2764,8 +2733,7 @@ var require_tools = __commonJS({
|
|
2764
2733
|
default:
|
2765
2734
|
value = (stringifier || stringify2)(value, stringifySafe);
|
2766
2735
|
}
|
2767
|
-
if (value === void 0)
|
2768
|
-
continue;
|
2736
|
+
if (value === void 0) continue;
|
2769
2737
|
const strKey = asString(key);
|
2770
2738
|
propStr += "," + strKey + ":" + value;
|
2771
2739
|
}
|
@@ -2781,9 +2749,9 @@ var require_tools = __commonJS({
|
|
2781
2749
|
if (Number.isFinite(value) === false) {
|
2782
2750
|
value = null;
|
2783
2751
|
}
|
2752
|
+
// this case explicitly falls through to the next one
|
2784
2753
|
case "boolean":
|
2785
|
-
if (stringifier)
|
2786
|
-
value = stringifier(value);
|
2754
|
+
if (stringifier) value = stringifier(value);
|
2787
2755
|
msgStr = ',"' + messageKey + '":' + value;
|
2788
2756
|
break;
|
2789
2757
|
case "string":
|
@@ -2817,8 +2785,7 @@ var require_tools = __commonJS({
|
|
2817
2785
|
if (valid === true) {
|
2818
2786
|
value = serializers[key] ? serializers[key](value) : value;
|
2819
2787
|
value = (stringifiers[key] || wildcardStringifier || stringify2)(value, stringifySafe);
|
2820
|
-
if (value === void 0)
|
2821
|
-
continue;
|
2788
|
+
if (value === void 0) continue;
|
2822
2789
|
data += ',"' + key + '":' + value;
|
2823
2790
|
}
|
2824
2791
|
}
|
@@ -2896,10 +2863,8 @@ var require_tools = __commonJS({
|
|
2896
2863
|
throw new Error("prettyPrint option is no longer supported, see the pino-pretty package (https://github.com/pinojs/pino-pretty)");
|
2897
2864
|
}
|
2898
2865
|
const { enabled, onChild } = opts;
|
2899
|
-
if (enabled === false)
|
2900
|
-
|
2901
|
-
if (!onChild)
|
2902
|
-
opts.onChild = noop;
|
2866
|
+
if (enabled === false) opts.level = "silent";
|
2867
|
+
if (!onChild) opts.onChild = noop;
|
2903
2868
|
if (!stream) {
|
2904
2869
|
if (!hasBeenTampered(process.stdout)) {
|
2905
2870
|
stream = buildSafeSonicBoom({ fd: process.stdout.fd || 1 });
|
@@ -3048,12 +3013,10 @@ var require_levels = __commonJS({
|
|
3048
3013
|
function setLevel(level) {
|
3049
3014
|
const { labels, values } = this.levels;
|
3050
3015
|
if (typeof level === "number") {
|
3051
|
-
if (labels[level] === void 0)
|
3052
|
-
throw Error("unknown level value" + level);
|
3016
|
+
if (labels[level] === void 0) throw Error("unknown level value" + level);
|
3053
3017
|
level = labels[level];
|
3054
3018
|
}
|
3055
|
-
if (values[level] === void 0)
|
3056
|
-
throw Error("unknown level " + level);
|
3019
|
+
if (values[level] === void 0) throw Error("unknown level " + level);
|
3057
3020
|
const preLevelVal = this[levelValSym];
|
3058
3021
|
const levelVal = this[levelValSym] = values[level];
|
3059
3022
|
const useOnlyCustomLevelsVal = this[useOnlyCustomLevelsSym];
|
@@ -3287,8 +3250,7 @@ var require_proto = __commonJS({
|
|
3287
3250
|
const bks = bindingsSymbols[bi];
|
3288
3251
|
instance[serializersSym][bks] = options.serializers[bks];
|
3289
3252
|
}
|
3290
|
-
} else
|
3291
|
-
instance[serializersSym] = serializers;
|
3253
|
+
} else instance[serializersSym] = serializers;
|
3292
3254
|
if (options.hasOwnProperty("formatters")) {
|
3293
3255
|
const { level, bindings: chindings, log } = options.formatters;
|
3294
3256
|
instance[formattersSym] = buildFormatters(
|
@@ -3384,8 +3346,7 @@ var require_proto = __commonJS({
|
|
3384
3346
|
const stream = this[streamSym];
|
3385
3347
|
if (typeof stream.flush === "function") {
|
3386
3348
|
stream.flush(cb || noop);
|
3387
|
-
} else if (cb)
|
3388
|
-
cb();
|
3349
|
+
} else if (cb) cb();
|
3389
3350
|
}
|
3390
3351
|
}
|
3391
3352
|
});
|
@@ -3516,8 +3477,7 @@ var require_safe_stable_stringify = __commonJS({
|
|
3516
3477
|
if (value) {
|
3517
3478
|
return (value2) => {
|
3518
3479
|
let message = `Object can not safely be stringified. Received type ${typeof value2}`;
|
3519
|
-
if (typeof value2 !== "function")
|
3520
|
-
message += ` (${value2.toString()})`;
|
3480
|
+
if (typeof value2 !== "function") message += ` (${value2.toString()})`;
|
3521
3481
|
throw new Error(message);
|
3522
3482
|
};
|
3523
3483
|
}
|
@@ -3645,6 +3605,7 @@ ${originalIndentation}`;
|
|
3645
3605
|
if (bigint) {
|
3646
3606
|
return String(value);
|
3647
3607
|
}
|
3608
|
+
// fallthrough
|
3648
3609
|
default:
|
3649
3610
|
return fail ? fail(value) : void 0;
|
3650
3611
|
}
|
@@ -3735,6 +3696,7 @@ ${originalIndentation}`;
|
|
3735
3696
|
if (bigint) {
|
3736
3697
|
return String(value);
|
3737
3698
|
}
|
3699
|
+
// fallthrough
|
3738
3700
|
default:
|
3739
3701
|
return fail ? fail(value) : void 0;
|
3740
3702
|
}
|
@@ -3846,6 +3808,7 @@ ${originalIndentation}`;
|
|
3846
3808
|
if (bigint) {
|
3847
3809
|
return String(value);
|
3848
3810
|
}
|
3811
|
+
// fallthrough
|
3849
3812
|
default:
|
3850
3813
|
return fail ? fail(value) : void 0;
|
3851
3814
|
}
|
@@ -3940,6 +3903,7 @@ ${originalIndentation}`;
|
|
3940
3903
|
if (bigint) {
|
3941
3904
|
return String(value);
|
3942
3905
|
}
|
3906
|
+
// fallthrough
|
3943
3907
|
default:
|
3944
3908
|
return fail ? fail(value) : void 0;
|
3945
3909
|
}
|
@@ -4224,8 +4188,7 @@ var require_pino = __commonJS({
|
|
4224
4188
|
function pino2(...args) {
|
4225
4189
|
const instance = {};
|
4226
4190
|
const { opts, stream } = normalize(instance, caller(), ...args);
|
4227
|
-
if (opts.level && typeof opts.level === "string" && DEFAULT_LEVELS[opts.level.toLowerCase()] !== void 0)
|
4228
|
-
opts.level = opts.level.toLowerCase();
|
4191
|
+
if (opts.level && typeof opts.level === "string" && DEFAULT_LEVELS[opts.level.toLowerCase()] !== void 0) opts.level = opts.level.toLowerCase();
|
4229
4192
|
const {
|
4230
4193
|
redact,
|
4231
4194
|
crlf,
|
@@ -4282,12 +4245,9 @@ var require_pino = __commonJS({
|
|
4282
4245
|
}
|
4283
4246
|
const time2 = timestamp instanceof Function ? timestamp : timestamp ? epochTime : nullTime;
|
4284
4247
|
const timeSliceIndex = time2().indexOf(":") + 1;
|
4285
|
-
if (useOnlyCustomLevels && !customLevels)
|
4286
|
-
|
4287
|
-
if (
|
4288
|
-
throw Error(`Unknown mixin type "${typeof mixin}" - expected "function"`);
|
4289
|
-
if (msgPrefix && typeof msgPrefix !== "string")
|
4290
|
-
throw Error(`Unknown msgPrefix type "${typeof msgPrefix}" - expected "string"`);
|
4248
|
+
if (useOnlyCustomLevels && !customLevels) throw Error("customLevels is required if useOnlyCustomLevels is set true");
|
4249
|
+
if (mixin && typeof mixin !== "function") throw Error(`Unknown mixin type "${typeof mixin}" - expected "function"`);
|
4250
|
+
if (msgPrefix && typeof msgPrefix !== "string") throw Error(`Unknown msgPrefix type "${typeof msgPrefix}" - expected "string"`);
|
4291
4251
|
assertDefaultLevelFound(level, customLevels, useOnlyCustomLevels);
|
4292
4252
|
const levels = mappings(customLevels, useOnlyCustomLevels);
|
4293
4253
|
if (typeof stream.emit === "function") {
|
@@ -4361,8 +4321,7 @@ var require_split2 = __commonJS({
|
|
4361
4321
|
if (this.overflow) {
|
4362
4322
|
const buf = this[kDecoder].write(chunk);
|
4363
4323
|
list = buf.split(this.matcher);
|
4364
|
-
if (list.length === 1)
|
4365
|
-
return cb();
|
4324
|
+
if (list.length === 1) return cb();
|
4366
4325
|
list.shift();
|
4367
4326
|
this.overflow = false;
|
4368
4327
|
} else {
|
@@ -5245,8 +5204,7 @@ var require_util = __commonJS({
|
|
5245
5204
|
}
|
5246
5205
|
};
|
5247
5206
|
var validateFunction = (value, name) => {
|
5248
|
-
if (typeof value !== "function")
|
5249
|
-
throw new ERR_INVALID_ARG_TYPE(name, "Function", value);
|
5207
|
+
if (typeof value !== "function") throw new ERR_INVALID_ARG_TYPE(name, "Function", value);
|
5250
5208
|
};
|
5251
5209
|
var AggregateError = class extends Error {
|
5252
5210
|
constructor(errors) {
|
@@ -5777,12 +5735,9 @@ var require_validators = __commonJS({
|
|
5777
5735
|
return value;
|
5778
5736
|
}
|
5779
5737
|
var validateInteger = hideStackFrames((value, name, min = NumberMIN_SAFE_INTEGER, max = NumberMAX_SAFE_INTEGER) => {
|
5780
|
-
if (typeof value !== "number")
|
5781
|
-
|
5782
|
-
if (
|
5783
|
-
throw new ERR_OUT_OF_RANGE(name, "an integer", value);
|
5784
|
-
if (value < min || value > max)
|
5785
|
-
throw new ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value);
|
5738
|
+
if (typeof value !== "number") throw new ERR_INVALID_ARG_TYPE2(name, "number", value);
|
5739
|
+
if (!NumberIsInteger(value)) throw new ERR_OUT_OF_RANGE(name, "an integer", value);
|
5740
|
+
if (value < min || value > max) throw new ERR_OUT_OF_RANGE(name, `>= ${min} && <= ${max}`, value);
|
5786
5741
|
});
|
5787
5742
|
var validateInt32 = hideStackFrames((value, name, min = -2147483648, max = 2147483647) => {
|
5788
5743
|
if (typeof value !== "number") {
|
@@ -5809,12 +5764,10 @@ var require_validators = __commonJS({
|
|
5809
5764
|
}
|
5810
5765
|
});
|
5811
5766
|
function validateString(value, name) {
|
5812
|
-
if (typeof value !== "string")
|
5813
|
-
throw new ERR_INVALID_ARG_TYPE2(name, "string", value);
|
5767
|
+
if (typeof value !== "string") throw new ERR_INVALID_ARG_TYPE2(name, "string", value);
|
5814
5768
|
}
|
5815
5769
|
function validateNumber(value, name, min = void 0, max) {
|
5816
|
-
if (typeof value !== "number")
|
5817
|
-
throw new ERR_INVALID_ARG_TYPE2(name, "number", value);
|
5770
|
+
if (typeof value !== "number") throw new ERR_INVALID_ARG_TYPE2(name, "number", value);
|
5818
5771
|
if (min != null && value < min || max != null && value > max || (min != null || max != null) && NumberIsNaN(value)) {
|
5819
5772
|
throw new ERR_OUT_OF_RANGE(
|
5820
5773
|
name,
|
@@ -5834,8 +5787,7 @@ var require_validators = __commonJS({
|
|
5834
5787
|
}
|
5835
5788
|
});
|
5836
5789
|
function validateBoolean(value, name) {
|
5837
|
-
if (typeof value !== "boolean")
|
5838
|
-
throw new ERR_INVALID_ARG_TYPE2(name, "boolean", value);
|
5790
|
+
if (typeof value !== "boolean") throw new ERR_INVALID_ARG_TYPE2(name, "boolean", value);
|
5839
5791
|
}
|
5840
5792
|
function getOwnPropertyValueOrDefault(options, key, defaultValue) {
|
5841
5793
|
return options == null || !ObjectPrototypeHasOwnProperty(options, key) ? defaultValue : options[key];
|
@@ -5918,16 +5870,13 @@ var require_validators = __commonJS({
|
|
5918
5870
|
}
|
5919
5871
|
});
|
5920
5872
|
var validateFunction = hideStackFrames((value, name) => {
|
5921
|
-
if (typeof value !== "function")
|
5922
|
-
throw new ERR_INVALID_ARG_TYPE2(name, "Function", value);
|
5873
|
+
if (typeof value !== "function") throw new ERR_INVALID_ARG_TYPE2(name, "Function", value);
|
5923
5874
|
});
|
5924
5875
|
var validatePlainFunction = hideStackFrames((value, name) => {
|
5925
|
-
if (typeof value !== "function" || isAsyncFunction(value))
|
5926
|
-
throw new ERR_INVALID_ARG_TYPE2(name, "Function", value);
|
5876
|
+
if (typeof value !== "function" || isAsyncFunction(value)) throw new ERR_INVALID_ARG_TYPE2(name, "Function", value);
|
5927
5877
|
});
|
5928
5878
|
var validateUndefined = hideStackFrames((value, name) => {
|
5929
|
-
if (value !== void 0)
|
5930
|
-
throw new ERR_INVALID_ARG_TYPE2(name, "undefined", value);
|
5879
|
+
if (value !== void 0) throw new ERR_INVALID_ARG_TYPE2(name, "undefined", value);
|
5931
5880
|
});
|
5932
5881
|
function validateUnion(value, name, union) {
|
5933
5882
|
if (!ArrayPrototypeIncludes(union, value)) {
|
@@ -6048,84 +5997,59 @@ var require_utils = __commonJS({
|
|
6048
5997
|
return isReadableStream(obj) || isWritableStream(obj) || isTransformStream(obj);
|
6049
5998
|
}
|
6050
5999
|
function isIterable(obj, isAsync) {
|
6051
|
-
if (obj == null)
|
6052
|
-
|
6053
|
-
if (isAsync ===
|
6054
|
-
return typeof obj[SymbolAsyncIterator] === "function";
|
6055
|
-
if (isAsync === false)
|
6056
|
-
return typeof obj[SymbolIterator] === "function";
|
6000
|
+
if (obj == null) return false;
|
6001
|
+
if (isAsync === true) return typeof obj[SymbolAsyncIterator] === "function";
|
6002
|
+
if (isAsync === false) return typeof obj[SymbolIterator] === "function";
|
6057
6003
|
return typeof obj[SymbolAsyncIterator] === "function" || typeof obj[SymbolIterator] === "function";
|
6058
6004
|
}
|
6059
6005
|
function isDestroyed(stream) {
|
6060
|
-
if (!isNodeStream(stream))
|
6061
|
-
return null;
|
6006
|
+
if (!isNodeStream(stream)) return null;
|
6062
6007
|
const wState = stream._writableState;
|
6063
6008
|
const rState = stream._readableState;
|
6064
6009
|
const state = wState || rState;
|
6065
6010
|
return !!(stream.destroyed || stream[kIsDestroyed] || state !== null && state !== void 0 && state.destroyed);
|
6066
6011
|
}
|
6067
6012
|
function isWritableEnded(stream) {
|
6068
|
-
if (!isWritableNodeStream(stream))
|
6069
|
-
|
6070
|
-
if (stream.writableEnded === true)
|
6071
|
-
return true;
|
6013
|
+
if (!isWritableNodeStream(stream)) return null;
|
6014
|
+
if (stream.writableEnded === true) return true;
|
6072
6015
|
const wState = stream._writableState;
|
6073
|
-
if (wState !== null && wState !== void 0 && wState.errored)
|
6074
|
-
|
6075
|
-
if (typeof (wState === null || wState === void 0 ? void 0 : wState.ended) !== "boolean")
|
6076
|
-
return null;
|
6016
|
+
if (wState !== null && wState !== void 0 && wState.errored) return false;
|
6017
|
+
if (typeof (wState === null || wState === void 0 ? void 0 : wState.ended) !== "boolean") return null;
|
6077
6018
|
return wState.ended;
|
6078
6019
|
}
|
6079
6020
|
function isWritableFinished(stream, strict) {
|
6080
|
-
if (!isWritableNodeStream(stream))
|
6081
|
-
|
6082
|
-
if (stream.writableFinished === true)
|
6083
|
-
return true;
|
6021
|
+
if (!isWritableNodeStream(stream)) return null;
|
6022
|
+
if (stream.writableFinished === true) return true;
|
6084
6023
|
const wState = stream._writableState;
|
6085
|
-
if (wState !== null && wState !== void 0 && wState.errored)
|
6086
|
-
|
6087
|
-
if (typeof (wState === null || wState === void 0 ? void 0 : wState.finished) !== "boolean")
|
6088
|
-
return null;
|
6024
|
+
if (wState !== null && wState !== void 0 && wState.errored) return false;
|
6025
|
+
if (typeof (wState === null || wState === void 0 ? void 0 : wState.finished) !== "boolean") return null;
|
6089
6026
|
return !!(wState.finished || strict === false && wState.ended === true && wState.length === 0);
|
6090
6027
|
}
|
6091
6028
|
function isReadableEnded(stream) {
|
6092
|
-
if (!isReadableNodeStream(stream))
|
6093
|
-
|
6094
|
-
if (stream.readableEnded === true)
|
6095
|
-
return true;
|
6029
|
+
if (!isReadableNodeStream(stream)) return null;
|
6030
|
+
if (stream.readableEnded === true) return true;
|
6096
6031
|
const rState = stream._readableState;
|
6097
|
-
if (!rState || rState.errored)
|
6098
|
-
|
6099
|
-
if (typeof (rState === null || rState === void 0 ? void 0 : rState.ended) !== "boolean")
|
6100
|
-
return null;
|
6032
|
+
if (!rState || rState.errored) return false;
|
6033
|
+
if (typeof (rState === null || rState === void 0 ? void 0 : rState.ended) !== "boolean") return null;
|
6101
6034
|
return rState.ended;
|
6102
6035
|
}
|
6103
6036
|
function isReadableFinished(stream, strict) {
|
6104
|
-
if (!isReadableNodeStream(stream))
|
6105
|
-
return null;
|
6037
|
+
if (!isReadableNodeStream(stream)) return null;
|
6106
6038
|
const rState = stream._readableState;
|
6107
|
-
if (rState !== null && rState !== void 0 && rState.errored)
|
6108
|
-
|
6109
|
-
if (typeof (rState === null || rState === void 0 ? void 0 : rState.endEmitted) !== "boolean")
|
6110
|
-
return null;
|
6039
|
+
if (rState !== null && rState !== void 0 && rState.errored) return false;
|
6040
|
+
if (typeof (rState === null || rState === void 0 ? void 0 : rState.endEmitted) !== "boolean") return null;
|
6111
6041
|
return !!(rState.endEmitted || strict === false && rState.ended === true && rState.length === 0);
|
6112
6042
|
}
|
6113
6043
|
function isReadable(stream) {
|
6114
|
-
if (stream && stream[kIsReadable] != null)
|
6115
|
-
|
6116
|
-
if (
|
6117
|
-
return null;
|
6118
|
-
if (isDestroyed(stream))
|
6119
|
-
return false;
|
6044
|
+
if (stream && stream[kIsReadable] != null) return stream[kIsReadable];
|
6045
|
+
if (typeof (stream === null || stream === void 0 ? void 0 : stream.readable) !== "boolean") return null;
|
6046
|
+
if (isDestroyed(stream)) return false;
|
6120
6047
|
return isReadableNodeStream(stream) && stream.readable && !isReadableFinished(stream);
|
6121
6048
|
}
|
6122
6049
|
function isWritable(stream) {
|
6123
|
-
if (stream && stream[kIsWritable] != null)
|
6124
|
-
|
6125
|
-
if (
|
6126
|
-
return null;
|
6127
|
-
if (isDestroyed(stream))
|
6128
|
-
return false;
|
6050
|
+
if (stream && stream[kIsWritable] != null) return stream[kIsWritable];
|
6051
|
+
if (typeof (stream === null || stream === void 0 ? void 0 : stream.writable) !== "boolean") return null;
|
6052
|
+
if (isDestroyed(stream)) return false;
|
6129
6053
|
return isWritableNodeStream(stream) && stream.writable && !isWritableEnded(stream);
|
6130
6054
|
}
|
6131
6055
|
function isFinished(stream, opts) {
|
@@ -6191,8 +6115,7 @@ var require_utils = __commonJS({
|
|
6191
6115
|
return typeof stream._consuming === "boolean" && typeof stream._dumped === "boolean" && ((_stream$req = stream.req) === null || _stream$req === void 0 ? void 0 : _stream$req.upgradeOrConnect) === void 0;
|
6192
6116
|
}
|
6193
6117
|
function willEmitClose(stream) {
|
6194
|
-
if (!isNodeStream(stream))
|
6195
|
-
return null;
|
6118
|
+
if (!isNodeStream(stream)) return null;
|
6196
6119
|
const wState = stream._writableState;
|
6197
6120
|
const rState = stream._readableState;
|
6198
6121
|
const state = wState || rState;
|
@@ -6340,12 +6263,10 @@ var require_end_of_stream = __commonJS({
|
|
6340
6263
|
return callback.call(stream, errored);
|
6341
6264
|
}
|
6342
6265
|
if (readable && !readableFinished && isReadableNodeStream(stream, true)) {
|
6343
|
-
if (!isReadableFinished(stream, false))
|
6344
|
-
return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE());
|
6266
|
+
if (!isReadableFinished(stream, false)) return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE());
|
6345
6267
|
}
|
6346
6268
|
if (writable && !writableFinished) {
|
6347
|
-
if (!isWritableFinished(stream, false))
|
6348
|
-
return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE());
|
6269
|
+
if (!isWritableFinished(stream, false)) return callback.call(stream, new ERR_STREAM_PREMATURE_CLOSE());
|
6349
6270
|
}
|
6350
6271
|
callback.call(stream);
|
6351
6272
|
};
|
@@ -6402,8 +6323,7 @@ var require_end_of_stream = __commonJS({
|
|
6402
6323
|
stream.removeListener("complete", onfinish);
|
6403
6324
|
stream.removeListener("abort", onclose);
|
6404
6325
|
stream.removeListener("request", onrequest);
|
6405
|
-
if (stream.req)
|
6406
|
-
stream.req.removeListener("finish", onfinish);
|
6326
|
+
if (stream.req) stream.req.removeListener("finish", onfinish);
|
6407
6327
|
stream.removeListener("end", onlegacyfinish);
|
6408
6328
|
stream.removeListener("close", onlegacyfinish);
|
6409
6329
|
stream.removeListener("finish", onfinish);
|
@@ -6793,17 +6713,14 @@ var require_legacy = __commonJS({
|
|
6793
6713
|
}
|
6794
6714
|
let didOnEnd = false;
|
6795
6715
|
function onend() {
|
6796
|
-
if (didOnEnd)
|
6797
|
-
return;
|
6716
|
+
if (didOnEnd) return;
|
6798
6717
|
didOnEnd = true;
|
6799
6718
|
dest.end();
|
6800
6719
|
}
|
6801
6720
|
function onclose() {
|
6802
|
-
if (didOnEnd)
|
6803
|
-
return;
|
6721
|
+
if (didOnEnd) return;
|
6804
6722
|
didOnEnd = true;
|
6805
|
-
if (typeof dest.destroy === "function")
|
6806
|
-
dest.destroy();
|
6723
|
+
if (typeof dest.destroy === "function") dest.destroy();
|
6807
6724
|
}
|
6808
6725
|
function onerror(er) {
|
6809
6726
|
cleanup();
|
@@ -6831,14 +6748,10 @@ var require_legacy = __commonJS({
|
|
6831
6748
|
return dest;
|
6832
6749
|
};
|
6833
6750
|
function prependListener(emitter, event, fn) {
|
6834
|
-
if (typeof emitter.prependListener === "function")
|
6835
|
-
|
6836
|
-
if (
|
6837
|
-
|
6838
|
-
else if (ArrayIsArray(emitter._events[event]))
|
6839
|
-
emitter._events[event].unshift(fn);
|
6840
|
-
else
|
6841
|
-
emitter._events[event] = [fn, emitter._events[event]];
|
6751
|
+
if (typeof emitter.prependListener === "function") return emitter.prependListener(event, fn);
|
6752
|
+
if (!emitter._events || !emitter._events[event]) emitter.on(event, fn);
|
6753
|
+
else if (ArrayIsArray(emitter._events[event])) emitter._events[event].unshift(fn);
|
6754
|
+
else emitter._events[event] = [fn, emitter._events[event]];
|
6842
6755
|
}
|
6843
6756
|
module2.exports = {
|
6844
6757
|
Stream,
|
@@ -6916,10 +6829,8 @@ var require_buffer_list = __commonJS({
|
|
6916
6829
|
data: v,
|
6917
6830
|
next: null
|
6918
6831
|
};
|
6919
|
-
if (this.length > 0)
|
6920
|
-
|
6921
|
-
else
|
6922
|
-
this.head = entry;
|
6832
|
+
if (this.length > 0) this.tail.next = entry;
|
6833
|
+
else this.head = entry;
|
6923
6834
|
this.tail = entry;
|
6924
6835
|
++this.length;
|
6925
6836
|
}
|
@@ -6928,19 +6839,15 @@ var require_buffer_list = __commonJS({
|
|
6928
6839
|
data: v,
|
6929
6840
|
next: this.head
|
6930
6841
|
};
|
6931
|
-
if (this.length === 0)
|
6932
|
-
this.tail = entry;
|
6842
|
+
if (this.length === 0) this.tail = entry;
|
6933
6843
|
this.head = entry;
|
6934
6844
|
++this.length;
|
6935
6845
|
}
|
6936
6846
|
shift() {
|
6937
|
-
if (this.length === 0)
|
6938
|
-
return;
|
6847
|
+
if (this.length === 0) return;
|
6939
6848
|
const ret = this.head.data;
|
6940
|
-
if (this.length === 1)
|
6941
|
-
|
6942
|
-
else
|
6943
|
-
this.head = this.head.next;
|
6849
|
+
if (this.length === 1) this.head = this.tail = null;
|
6850
|
+
else this.head = this.head.next;
|
6944
6851
|
--this.length;
|
6945
6852
|
return ret;
|
6946
6853
|
}
|
@@ -6949,17 +6856,14 @@ var require_buffer_list = __commonJS({
|
|
6949
6856
|
this.length = 0;
|
6950
6857
|
}
|
6951
6858
|
join(s) {
|
6952
|
-
if (this.length === 0)
|
6953
|
-
return "";
|
6859
|
+
if (this.length === 0) return "";
|
6954
6860
|
let p = this.head;
|
6955
6861
|
let ret = "" + p.data;
|
6956
|
-
while ((p = p.next) !== null)
|
6957
|
-
ret += s + p.data;
|
6862
|
+
while ((p = p.next) !== null) ret += s + p.data;
|
6958
6863
|
return ret;
|
6959
6864
|
}
|
6960
6865
|
concat(n) {
|
6961
|
-
if (this.length === 0)
|
6962
|
-
return Buffer2.alloc(0);
|
6866
|
+
if (this.length === 0) return Buffer2.alloc(0);
|
6963
6867
|
const ret = Buffer2.allocUnsafe(n >>> 0);
|
6964
6868
|
let p = this.head;
|
6965
6869
|
let i = 0;
|
@@ -7005,10 +6909,8 @@ var require_buffer_list = __commonJS({
|
|
7005
6909
|
if (n === str.length) {
|
7006
6910
|
ret += str;
|
7007
6911
|
++c;
|
7008
|
-
if (p.next)
|
7009
|
-
|
7010
|
-
else
|
7011
|
-
this.head = this.tail = null;
|
6912
|
+
if (p.next) this.head = p.next;
|
6913
|
+
else this.head = this.tail = null;
|
7012
6914
|
} else {
|
7013
6915
|
ret += StringPrototypeSlice(str, 0, n);
|
7014
6916
|
this.head = p;
|
@@ -7036,10 +6938,8 @@ var require_buffer_list = __commonJS({
|
|
7036
6938
|
if (n === buf.length) {
|
7037
6939
|
TypedArrayPrototypeSet(ret, buf, retLen - n);
|
7038
6940
|
++c;
|
7039
|
-
if (p.next)
|
7040
|
-
|
7041
|
-
else
|
7042
|
-
this.head = this.tail = null;
|
6941
|
+
if (p.next) this.head = p.next;
|
6942
|
+
else this.head = this.tail = null;
|
7043
6943
|
} else {
|
7044
6944
|
TypedArrayPrototypeSet(ret, new Uint8Array2(buf.buffer, buf.byteOffset, n), retLen - n);
|
7045
6945
|
this.head = p;
|
@@ -7280,10 +7180,8 @@ var require_readable = __commonJS({
|
|
7280
7180
|
return (this.state & bit) !== 0;
|
7281
7181
|
},
|
7282
7182
|
set(value) {
|
7283
|
-
if (value)
|
7284
|
-
|
7285
|
-
else
|
7286
|
-
this.state &= ~bit;
|
7183
|
+
if (value) this.state |= bit;
|
7184
|
+
else this.state &= ~bit;
|
7287
7185
|
}
|
7288
7186
|
};
|
7289
7187
|
}
|
@@ -7325,23 +7223,18 @@ var require_readable = __commonJS({
|
|
7325
7223
|
dataEmitted: makeBitMapDescriptor(kDataEmitted)
|
7326
7224
|
});
|
7327
7225
|
function ReadableState(options, stream, isDuplex) {
|
7328
|
-
if (typeof isDuplex !== "boolean")
|
7329
|
-
isDuplex = stream instanceof require_duplex();
|
7226
|
+
if (typeof isDuplex !== "boolean") isDuplex = stream instanceof require_duplex();
|
7330
7227
|
this.state = kEmitClose | kAutoDestroy | kConstructed | kSync;
|
7331
|
-
if (options && options.objectMode)
|
7332
|
-
|
7333
|
-
if (isDuplex && options && options.readableObjectMode)
|
7334
|
-
this.state |= kObjectMode;
|
7228
|
+
if (options && options.objectMode) this.state |= kObjectMode;
|
7229
|
+
if (isDuplex && options && options.readableObjectMode) this.state |= kObjectMode;
|
7335
7230
|
this.highWaterMark = options ? getHighWaterMark(this, options, "readableHighWaterMark", isDuplex) : getDefaultHighWaterMark(false);
|
7336
7231
|
this.buffer = new BufferList();
|
7337
7232
|
this.length = 0;
|
7338
7233
|
this.pipes = [];
|
7339
7234
|
this.flowing = null;
|
7340
7235
|
this[kPaused] = null;
|
7341
|
-
if (options && options.emitClose === false)
|
7342
|
-
|
7343
|
-
if (options && options.autoDestroy === false)
|
7344
|
-
this.state &= ~kAutoDestroy;
|
7236
|
+
if (options && options.emitClose === false) this.state &= ~kEmitClose;
|
7237
|
+
if (options && options.autoDestroy === false) this.state &= ~kAutoDestroy;
|
7345
7238
|
this.errored = null;
|
7346
7239
|
this.defaultEncoding = options && options.defaultEncoding || "utf8";
|
7347
7240
|
this.awaitDrainWriters = null;
|
@@ -7353,19 +7246,14 @@ var require_readable = __commonJS({
|
|
7353
7246
|
}
|
7354
7247
|
}
|
7355
7248
|
function Readable(options) {
|
7356
|
-
if (!(this instanceof Readable))
|
7357
|
-
return new Readable(options);
|
7249
|
+
if (!(this instanceof Readable)) return new Readable(options);
|
7358
7250
|
const isDuplex = this instanceof require_duplex();
|
7359
7251
|
this._readableState = new ReadableState(options, this, isDuplex);
|
7360
7252
|
if (options) {
|
7361
|
-
if (typeof options.read === "function")
|
7362
|
-
|
7363
|
-
if (typeof options.
|
7364
|
-
|
7365
|
-
if (typeof options.construct === "function")
|
7366
|
-
this._construct = options.construct;
|
7367
|
-
if (options.signal && !isDuplex)
|
7368
|
-
addAbortSignal(options.signal, this);
|
7253
|
+
if (typeof options.read === "function") this._read = options.read;
|
7254
|
+
if (typeof options.destroy === "function") this._destroy = options.destroy;
|
7255
|
+
if (typeof options.construct === "function") this._construct = options.construct;
|
7256
|
+
if (options.signal && !isDuplex) addAbortSignal(options.signal, this);
|
7369
7257
|
}
|
7370
7258
|
Stream.call(this, options);
|
7371
7259
|
destroyImpl.construct(this, () => {
|
@@ -7427,12 +7315,9 @@ var require_readable = __commonJS({
|
|
7427
7315
|
onEofChunk(stream, state);
|
7428
7316
|
} else if ((state.state & kObjectMode) !== 0 || chunk && chunk.length > 0) {
|
7429
7317
|
if (addToFront) {
|
7430
|
-
if ((state.state & kEndEmitted) !== 0)
|
7431
|
-
|
7432
|
-
else
|
7433
|
-
return false;
|
7434
|
-
else
|
7435
|
-
addChunk(stream, state, chunk, true);
|
7318
|
+
if ((state.state & kEndEmitted) !== 0) errorOrDestroy(stream, new ERR_STREAM_UNSHIFT_AFTER_END_EVENT());
|
7319
|
+
else if (state.destroyed || state.errored) return false;
|
7320
|
+
else addChunk(stream, state, chunk, true);
|
7436
7321
|
} else if (state.ended) {
|
7437
7322
|
errorOrDestroy(stream, new ERR_STREAM_PUSH_AFTER_EOF());
|
7438
7323
|
} else if (state.destroyed || state.errored) {
|
@@ -7441,10 +7326,8 @@ var require_readable = __commonJS({
|
|
7441
7326
|
state.state &= ~kReading;
|
7442
7327
|
if (state.decoder && !encoding) {
|
7443
7328
|
chunk = state.decoder.write(chunk);
|
7444
|
-
if (state.objectMode || chunk.length !== 0)
|
7445
|
-
|
7446
|
-
else
|
7447
|
-
maybeReadMore(stream, state);
|
7329
|
+
if (state.objectMode || chunk.length !== 0) addChunk(stream, state, chunk, false);
|
7330
|
+
else maybeReadMore(stream, state);
|
7448
7331
|
} else {
|
7449
7332
|
addChunk(stream, state, chunk, false);
|
7450
7333
|
}
|
@@ -7466,12 +7349,9 @@ var require_readable = __commonJS({
|
|
7466
7349
|
stream.emit("data", chunk);
|
7467
7350
|
} else {
|
7468
7351
|
state.length += state.objectMode ? 1 : chunk.length;
|
7469
|
-
if (addToFront)
|
7470
|
-
|
7471
|
-
|
7472
|
-
state.buffer.push(chunk);
|
7473
|
-
if ((state.state & kNeedReadable) !== 0)
|
7474
|
-
emitReadable(stream);
|
7352
|
+
if (addToFront) state.buffer.unshift(chunk);
|
7353
|
+
else state.buffer.push(chunk);
|
7354
|
+
if ((state.state & kNeedReadable) !== 0) emitReadable(stream);
|
7475
7355
|
}
|
7476
7356
|
maybeReadMore(stream, state);
|
7477
7357
|
}
|
@@ -7489,8 +7369,7 @@ var require_readable = __commonJS({
|
|
7489
7369
|
content += decoder.write(data);
|
7490
7370
|
}
|
7491
7371
|
buffer.clear();
|
7492
|
-
if (content !== "")
|
7493
|
-
buffer.push(content);
|
7372
|
+
if (content !== "") buffer.push(content);
|
7494
7373
|
this._readableState.length = content.length;
|
7495
7374
|
return this;
|
7496
7375
|
};
|
@@ -7510,17 +7389,13 @@ var require_readable = __commonJS({
|
|
7510
7389
|
return n;
|
7511
7390
|
}
|
7512
7391
|
function howMuchToRead(n, state) {
|
7513
|
-
if (n <= 0 || state.length === 0 && state.ended)
|
7514
|
-
|
7515
|
-
if ((state.state & kObjectMode) !== 0)
|
7516
|
-
return 1;
|
7392
|
+
if (n <= 0 || state.length === 0 && state.ended) return 0;
|
7393
|
+
if ((state.state & kObjectMode) !== 0) return 1;
|
7517
7394
|
if (NumberIsNaN(n)) {
|
7518
|
-
if (state.flowing && state.length)
|
7519
|
-
return state.buffer.first().length;
|
7395
|
+
if (state.flowing && state.length) return state.buffer.first().length;
|
7520
7396
|
return state.length;
|
7521
7397
|
}
|
7522
|
-
if (n <= state.length)
|
7523
|
-
return n;
|
7398
|
+
if (n <= state.length) return n;
|
7524
7399
|
return state.ended ? state.length : 0;
|
7525
7400
|
}
|
7526
7401
|
Readable.prototype.read = function(n) {
|
@@ -7532,22 +7407,17 @@ var require_readable = __commonJS({
|
|
7532
7407
|
}
|
7533
7408
|
const state = this._readableState;
|
7534
7409
|
const nOrig = n;
|
7535
|
-
if (n > state.highWaterMark)
|
7536
|
-
|
7537
|
-
if (n !== 0)
|
7538
|
-
state.state &= ~kEmittedReadable;
|
7410
|
+
if (n > state.highWaterMark) state.highWaterMark = computeNewHighWaterMark(n);
|
7411
|
+
if (n !== 0) state.state &= ~kEmittedReadable;
|
7539
7412
|
if (n === 0 && state.needReadable && ((state.highWaterMark !== 0 ? state.length >= state.highWaterMark : state.length > 0) || state.ended)) {
|
7540
7413
|
debug("read: emitReadable", state.length, state.ended);
|
7541
|
-
if (state.length === 0 && state.ended)
|
7542
|
-
|
7543
|
-
else
|
7544
|
-
emitReadable(this);
|
7414
|
+
if (state.length === 0 && state.ended) endReadable(this);
|
7415
|
+
else emitReadable(this);
|
7545
7416
|
return null;
|
7546
7417
|
}
|
7547
7418
|
n = howMuchToRead(n, state);
|
7548
7419
|
if (n === 0 && state.ended) {
|
7549
|
-
if (state.length === 0)
|
7550
|
-
endReadable(this);
|
7420
|
+
if (state.length === 0) endReadable(this);
|
7551
7421
|
return null;
|
7552
7422
|
}
|
7553
7423
|
let doRead = (state.state & kNeedReadable) !== 0;
|
@@ -7562,22 +7432,18 @@ var require_readable = __commonJS({
|
|
7562
7432
|
} else if (doRead) {
|
7563
7433
|
debug("do read");
|
7564
7434
|
state.state |= kReading | kSync;
|
7565
|
-
if (state.length === 0)
|
7566
|
-
state.state |= kNeedReadable;
|
7435
|
+
if (state.length === 0) state.state |= kNeedReadable;
|
7567
7436
|
try {
|
7568
7437
|
this._read(state.highWaterMark);
|
7569
7438
|
} catch (err) {
|
7570
7439
|
errorOrDestroy(this, err);
|
7571
7440
|
}
|
7572
7441
|
state.state &= ~kSync;
|
7573
|
-
if (!state.reading)
|
7574
|
-
n = howMuchToRead(nOrig, state);
|
7442
|
+
if (!state.reading) n = howMuchToRead(nOrig, state);
|
7575
7443
|
}
|
7576
7444
|
let ret;
|
7577
|
-
if (n > 0)
|
7578
|
-
|
7579
|
-
else
|
7580
|
-
ret = null;
|
7445
|
+
if (n > 0) ret = fromList(n, state);
|
7446
|
+
else ret = null;
|
7581
7447
|
if (ret === null) {
|
7582
7448
|
state.needReadable = state.length <= state.highWaterMark;
|
7583
7449
|
n = 0;
|
@@ -7590,10 +7456,8 @@ var require_readable = __commonJS({
|
|
7590
7456
|
}
|
7591
7457
|
}
|
7592
7458
|
if (state.length === 0) {
|
7593
|
-
if (!state.ended)
|
7594
|
-
|
7595
|
-
if (nOrig !== n && state.ended)
|
7596
|
-
endReadable(this);
|
7459
|
+
if (!state.ended) state.needReadable = true;
|
7460
|
+
if (nOrig !== n && state.ended) endReadable(this);
|
7597
7461
|
}
|
7598
7462
|
if (ret !== null && !state.errorEmitted && !state.closeEmitted) {
|
7599
7463
|
state.dataEmitted = true;
|
@@ -7603,8 +7467,7 @@ var require_readable = __commonJS({
|
|
7603
7467
|
};
|
7604
7468
|
function onEofChunk(stream, state) {
|
7605
7469
|
debug("onEofChunk");
|
7606
|
-
if (state.ended)
|
7607
|
-
return;
|
7470
|
+
if (state.ended) return;
|
7608
7471
|
if (state.decoder) {
|
7609
7472
|
const chunk = state.decoder.end();
|
7610
7473
|
if (chunk && chunk.length) {
|
@@ -7673,10 +7536,8 @@ var require_readable = __commonJS({
|
|
7673
7536
|
debug("pipe count=%d opts=%j", state.pipes.length, pipeOpts);
|
7674
7537
|
const doEnd = (!pipeOpts || pipeOpts.end !== false) && dest !== process2.stdout && dest !== process2.stderr;
|
7675
7538
|
const endFn = doEnd ? onend : unpipe;
|
7676
|
-
if (state.endEmitted)
|
7677
|
-
|
7678
|
-
else
|
7679
|
-
src.once("end", endFn);
|
7539
|
+
if (state.endEmitted) process2.nextTick(endFn);
|
7540
|
+
else src.once("end", endFn);
|
7680
7541
|
dest.on("unpipe", onunpipe);
|
7681
7542
|
function onunpipe(readable, unpipeInfo) {
|
7682
7543
|
debug("onunpipe");
|
@@ -7706,8 +7567,7 @@ var require_readable = __commonJS({
|
|
7706
7567
|
src.removeListener("end", unpipe);
|
7707
7568
|
src.removeListener("data", ondata);
|
7708
7569
|
cleanedUp = true;
|
7709
|
-
if (ondrain && state.awaitDrainWriters && (!dest._writableState || dest._writableState.needDrain))
|
7710
|
-
ondrain();
|
7570
|
+
if (ondrain && state.awaitDrainWriters && (!dest._writableState || dest._writableState.needDrain)) ondrain();
|
7711
7571
|
}
|
7712
7572
|
function pause() {
|
7713
7573
|
if (!cleanedUp) {
|
@@ -7793,8 +7653,7 @@ var require_readable = __commonJS({
|
|
7793
7653
|
const unpipeInfo = {
|
7794
7654
|
hasUnpiped: false
|
7795
7655
|
};
|
7796
|
-
if (state.pipes.length === 0)
|
7797
|
-
return this;
|
7656
|
+
if (state.pipes.length === 0) return this;
|
7798
7657
|
if (!dest) {
|
7799
7658
|
const dests = state.pipes;
|
7800
7659
|
state.pipes = [];
|
@@ -7806,11 +7665,9 @@ var require_readable = __commonJS({
|
|
7806
7665
|
return this;
|
7807
7666
|
}
|
7808
7667
|
const index = ArrayPrototypeIndexOf(state.pipes, dest);
|
7809
|
-
if (index === -1)
|
7810
|
-
return this;
|
7668
|
+
if (index === -1) return this;
|
7811
7669
|
state.pipes.splice(index, 1);
|
7812
|
-
if (state.pipes.length === 0)
|
7813
|
-
this.pause();
|
7670
|
+
if (state.pipes.length === 0) this.pause();
|
7814
7671
|
dest.emit("unpipe", this, unpipeInfo);
|
7815
7672
|
return this;
|
7816
7673
|
};
|
@@ -7819,8 +7676,7 @@ var require_readable = __commonJS({
|
|
7819
7676
|
const state = this._readableState;
|
7820
7677
|
if (ev === "data") {
|
7821
7678
|
state.readableListening = this.listenerCount("readable") > 0;
|
7822
|
-
if (state.flowing !== false)
|
7823
|
-
this.resume();
|
7679
|
+
if (state.flowing !== false) this.resume();
|
7824
7680
|
} else if (ev === "readable") {
|
7825
7681
|
if (!state.endEmitted && !state.readableListening) {
|
7826
7682
|
state.readableListening = state.needReadable = true;
|
@@ -7891,8 +7747,7 @@ var require_readable = __commonJS({
|
|
7891
7747
|
state.resumeScheduled = false;
|
7892
7748
|
stream.emit("resume");
|
7893
7749
|
flow(stream);
|
7894
|
-
if (state.flowing && !state.reading)
|
7895
|
-
stream.read(0);
|
7750
|
+
if (state.flowing && !state.reading) stream.read(0);
|
7896
7751
|
}
|
7897
7752
|
Readable.prototype.pause = function() {
|
7898
7753
|
debug("call pause flowing=%j", this._readableState.flowing);
|
@@ -7907,8 +7762,7 @@ var require_readable = __commonJS({
|
|
7907
7762
|
function flow(stream) {
|
7908
7763
|
const state = stream._readableState;
|
7909
7764
|
debug("flow", state.flowing);
|
7910
|
-
while (state.flowing && stream.read() !== null)
|
7911
|
-
;
|
7765
|
+
while (state.flowing && stream.read() !== null) ;
|
7912
7766
|
}
|
7913
7767
|
Readable.prototype.wrap = function(stream) {
|
7914
7768
|
let paused = false;
|
@@ -8141,18 +7995,13 @@ var require_readable = __commonJS({
|
|
8141
7995
|
});
|
8142
7996
|
Readable._fromList = fromList;
|
8143
7997
|
function fromList(n, state) {
|
8144
|
-
if (state.length === 0)
|
8145
|
-
return null;
|
7998
|
+
if (state.length === 0) return null;
|
8146
7999
|
let ret;
|
8147
|
-
if (state.objectMode)
|
8148
|
-
ret = state.buffer.shift();
|
8000
|
+
if (state.objectMode) ret = state.buffer.shift();
|
8149
8001
|
else if (!n || n >= state.length) {
|
8150
|
-
if (state.decoder)
|
8151
|
-
|
8152
|
-
else
|
8153
|
-
ret = state.buffer.first();
|
8154
|
-
else
|
8155
|
-
ret = state.buffer.concat(state.length);
|
8002
|
+
if (state.decoder) ret = state.buffer.join("");
|
8003
|
+
else if (state.buffer.length === 1) ret = state.buffer.first();
|
8004
|
+
else ret = state.buffer.concat(state.length);
|
8156
8005
|
state.buffer.clear();
|
8157
8006
|
} else {
|
8158
8007
|
ret = state.buffer.consume(n, state.decoder);
|
@@ -8196,8 +8045,7 @@ var require_readable = __commonJS({
|
|
8196
8045
|
};
|
8197
8046
|
var webStreamsAdapters;
|
8198
8047
|
function lazyWebStreams() {
|
8199
|
-
if (webStreamsAdapters === void 0)
|
8200
|
-
webStreamsAdapters = {};
|
8048
|
+
if (webStreamsAdapters === void 0) webStreamsAdapters = {};
|
8201
8049
|
return webStreamsAdapters;
|
8202
8050
|
}
|
8203
8051
|
Readable.fromWeb = function(readableStream, options) {
|
@@ -8261,11 +8109,9 @@ var require_writable = __commonJS({
|
|
8261
8109
|
}
|
8262
8110
|
var kOnFinished = Symbol2("kOnFinished");
|
8263
8111
|
function WritableState(options, stream, isDuplex) {
|
8264
|
-
if (typeof isDuplex !== "boolean")
|
8265
|
-
isDuplex = stream instanceof require_duplex();
|
8112
|
+
if (typeof isDuplex !== "boolean") isDuplex = stream instanceof require_duplex();
|
8266
8113
|
this.objectMode = !!(options && options.objectMode);
|
8267
|
-
if (isDuplex)
|
8268
|
-
this.objectMode = this.objectMode || !!(options && options.writableObjectMode);
|
8114
|
+
if (isDuplex) this.objectMode = this.objectMode || !!(options && options.writableObjectMode);
|
8269
8115
|
this.highWaterMark = options ? getHighWaterMark(this, options, "writableHighWaterMark", isDuplex) : getDefaultHighWaterMark(false);
|
8270
8116
|
this.finalCalled = false;
|
8271
8117
|
this.needDrain = false;
|
@@ -8314,22 +8160,15 @@ var require_writable = __commonJS({
|
|
8314
8160
|
});
|
8315
8161
|
function Writable(options) {
|
8316
8162
|
const isDuplex = this instanceof require_duplex();
|
8317
|
-
if (!isDuplex && !FunctionPrototypeSymbolHasInstance(Writable, this))
|
8318
|
-
return new Writable(options);
|
8163
|
+
if (!isDuplex && !FunctionPrototypeSymbolHasInstance(Writable, this)) return new Writable(options);
|
8319
8164
|
this._writableState = new WritableState(options, this, isDuplex);
|
8320
8165
|
if (options) {
|
8321
|
-
if (typeof options.write === "function")
|
8322
|
-
|
8323
|
-
if (typeof options.
|
8324
|
-
|
8325
|
-
if (typeof options.
|
8326
|
-
|
8327
|
-
if (typeof options.final === "function")
|
8328
|
-
this._final = options.final;
|
8329
|
-
if (typeof options.construct === "function")
|
8330
|
-
this._construct = options.construct;
|
8331
|
-
if (options.signal)
|
8332
|
-
addAbortSignal(options.signal, this);
|
8166
|
+
if (typeof options.write === "function") this._write = options.write;
|
8167
|
+
if (typeof options.writev === "function") this._writev = options.writev;
|
8168
|
+
if (typeof options.destroy === "function") this._destroy = options.destroy;
|
8169
|
+
if (typeof options.final === "function") this._final = options.final;
|
8170
|
+
if (typeof options.construct === "function") this._construct = options.construct;
|
8171
|
+
if (options.signal) addAbortSignal(options.signal, this);
|
8333
8172
|
}
|
8334
8173
|
Stream.call(this, options);
|
8335
8174
|
destroyImpl.construct(this, () => {
|
@@ -8343,10 +8182,8 @@ var require_writable = __commonJS({
|
|
8343
8182
|
ObjectDefineProperty(Writable, SymbolHasInstance, {
|
8344
8183
|
__proto__: null,
|
8345
8184
|
value: function(object) {
|
8346
|
-
if (FunctionPrototypeSymbolHasInstance(this, object))
|
8347
|
-
|
8348
|
-
if (this !== Writable)
|
8349
|
-
return false;
|
8185
|
+
if (FunctionPrototypeSymbolHasInstance(this, object)) return true;
|
8186
|
+
if (this !== Writable) return false;
|
8350
8187
|
return object && object._writableState instanceof WritableState;
|
8351
8188
|
}
|
8352
8189
|
});
|
@@ -8359,12 +8196,9 @@ var require_writable = __commonJS({
|
|
8359
8196
|
cb = encoding;
|
8360
8197
|
encoding = state.defaultEncoding;
|
8361
8198
|
} else {
|
8362
|
-
if (!encoding)
|
8363
|
-
|
8364
|
-
|
8365
|
-
throw new ERR_UNKNOWN_ENCODING(encoding);
|
8366
|
-
if (typeof cb !== "function")
|
8367
|
-
cb = nop;
|
8199
|
+
if (!encoding) encoding = state.defaultEncoding;
|
8200
|
+
else if (encoding !== "buffer" && !Buffer2.isEncoding(encoding)) throw new ERR_UNKNOWN_ENCODING(encoding);
|
8201
|
+
if (typeof cb !== "function") cb = nop;
|
8368
8202
|
}
|
8369
8203
|
if (chunk === null) {
|
8370
8204
|
throw new ERR_STREAM_NULL_VALUES();
|
@@ -8407,15 +8241,12 @@ var require_writable = __commonJS({
|
|
8407
8241
|
const state = this._writableState;
|
8408
8242
|
if (state.corked) {
|
8409
8243
|
state.corked--;
|
8410
|
-
if (!state.writing)
|
8411
|
-
clearBuffer(this, state);
|
8244
|
+
if (!state.writing) clearBuffer(this, state);
|
8412
8245
|
}
|
8413
8246
|
};
|
8414
8247
|
Writable.prototype.setDefaultEncoding = function setDefaultEncoding(encoding) {
|
8415
|
-
if (typeof encoding === "string")
|
8416
|
-
|
8417
|
-
if (!Buffer2.isEncoding(encoding))
|
8418
|
-
throw new ERR_UNKNOWN_ENCODING(encoding);
|
8248
|
+
if (typeof encoding === "string") encoding = StringPrototypeToLowerCase(encoding);
|
8249
|
+
if (!Buffer2.isEncoding(encoding)) throw new ERR_UNKNOWN_ENCODING(encoding);
|
8419
8250
|
this._writableState.defaultEncoding = encoding;
|
8420
8251
|
return this;
|
8421
8252
|
};
|
@@ -8423,8 +8254,7 @@ var require_writable = __commonJS({
|
|
8423
8254
|
const len = state.objectMode ? 1 : chunk.length;
|
8424
8255
|
state.length += len;
|
8425
8256
|
const ret = state.length < state.highWaterMark;
|
8426
|
-
if (!ret)
|
8427
|
-
state.needDrain = true;
|
8257
|
+
if (!ret) state.needDrain = true;
|
8428
8258
|
if (state.writing || state.corked || state.errored || !state.constructed) {
|
8429
8259
|
state.buffered.push({
|
8430
8260
|
chunk,
|
@@ -8452,12 +8282,9 @@ var require_writable = __commonJS({
|
|
8452
8282
|
state.writecb = cb;
|
8453
8283
|
state.writing = true;
|
8454
8284
|
state.sync = true;
|
8455
|
-
if (state.destroyed)
|
8456
|
-
|
8457
|
-
else
|
8458
|
-
stream._writev(chunk, state.onwrite);
|
8459
|
-
else
|
8460
|
-
stream._write(chunk, encoding, state.onwrite);
|
8285
|
+
if (state.destroyed) state.onwrite(new ERR_STREAM_DESTROYED("write"));
|
8286
|
+
else if (writev) stream._writev(chunk, state.onwrite);
|
8287
|
+
else stream._write(chunk, encoding, state.onwrite);
|
8461
8288
|
state.sync = false;
|
8462
8289
|
}
|
8463
8290
|
function onwriteError(stream, state, er, cb) {
|
@@ -8794,8 +8621,7 @@ var require_writable = __commonJS({
|
|
8794
8621
|
__proto__: null,
|
8795
8622
|
get() {
|
8796
8623
|
const wState = this._writableState;
|
8797
|
-
if (!wState)
|
8798
|
-
return false;
|
8624
|
+
if (!wState) return false;
|
8799
8625
|
return !wState.destroyed && !wState.ending && wState.needDrain;
|
8800
8626
|
}
|
8801
8627
|
},
|
@@ -8850,8 +8676,7 @@ var require_writable = __commonJS({
|
|
8850
8676
|
};
|
8851
8677
|
var webStreamsAdapters;
|
8852
8678
|
function lazyWebStreams() {
|
8853
|
-
if (webStreamsAdapters === void 0)
|
8854
|
-
webStreamsAdapters = {};
|
8679
|
+
if (webStreamsAdapters === void 0) webStreamsAdapters = {};
|
8855
8680
|
return webStreamsAdapters;
|
8856
8681
|
}
|
8857
8682
|
Writable.fromWeb = function(writableStream, options) {
|
@@ -9061,8 +8886,7 @@ var require_duplexify = __commonJS({
|
|
9061
8886
|
promise = null;
|
9062
8887
|
const { chunk, done, cb } = await _promise;
|
9063
8888
|
process2.nextTick(cb);
|
9064
|
-
if (done)
|
9065
|
-
return;
|
8889
|
+
if (done) return;
|
9066
8890
|
if (signal.aborted)
|
9067
8891
|
throw new AbortError(void 0, {
|
9068
8892
|
cause: signal.reason
|
@@ -9230,13 +9054,11 @@ var require_duplex = __commonJS({
|
|
9230
9054
|
const keys = ObjectKeys(Writable.prototype);
|
9231
9055
|
for (let i = 0; i < keys.length; i++) {
|
9232
9056
|
const method = keys[i];
|
9233
|
-
if (!Duplex.prototype[method])
|
9234
|
-
Duplex.prototype[method] = Writable.prototype[method];
|
9057
|
+
if (!Duplex.prototype[method]) Duplex.prototype[method] = Writable.prototype[method];
|
9235
9058
|
}
|
9236
9059
|
}
|
9237
9060
|
function Duplex(options) {
|
9238
|
-
if (!(this instanceof Duplex))
|
9239
|
-
return new Duplex(options);
|
9061
|
+
if (!(this instanceof Duplex)) return new Duplex(options);
|
9240
9062
|
Readable.call(this, options);
|
9241
9063
|
Writable.call(this, options);
|
9242
9064
|
if (options) {
|
@@ -9311,8 +9133,7 @@ var require_duplex = __commonJS({
|
|
9311
9133
|
});
|
9312
9134
|
var webStreamsAdapters;
|
9313
9135
|
function lazyWebStreams() {
|
9314
|
-
if (webStreamsAdapters === void 0)
|
9315
|
-
webStreamsAdapters = {};
|
9136
|
+
if (webStreamsAdapters === void 0) webStreamsAdapters = {};
|
9316
9137
|
return webStreamsAdapters;
|
9317
9138
|
}
|
9318
9139
|
Duplex.fromWeb = function(pair, options) {
|
@@ -9344,8 +9165,7 @@ var require_transform = __commonJS({
|
|
9344
9165
|
ObjectSetPrototypeOf(Transform, Duplex);
|
9345
9166
|
var kCallback = Symbol2("kCallback");
|
9346
9167
|
function Transform(options) {
|
9347
|
-
if (!(this instanceof Transform))
|
9348
|
-
return new Transform(options);
|
9168
|
+
if (!(this instanceof Transform)) return new Transform(options);
|
9349
9169
|
const readableHighWaterMark = options ? getHighWaterMark(this, options, "readableHighWaterMark", true) : null;
|
9350
9170
|
if (readableHighWaterMark === 0) {
|
9351
9171
|
options = {
|
@@ -9363,10 +9183,8 @@ var require_transform = __commonJS({
|
|
9363
9183
|
this._readableState.sync = false;
|
9364
9184
|
this[kCallback] = null;
|
9365
9185
|
if (options) {
|
9366
|
-
if (typeof options.transform === "function")
|
9367
|
-
|
9368
|
-
if (typeof options.flush === "function")
|
9369
|
-
this._flush = options.flush;
|
9186
|
+
if (typeof options.transform === "function") this._transform = options.transform;
|
9187
|
+
if (typeof options.flush === "function") this._flush = options.flush;
|
9370
9188
|
}
|
9371
9189
|
this.on("prefinish", prefinish);
|
9372
9190
|
}
|
@@ -9446,8 +9264,7 @@ var require_passthrough = __commonJS({
|
|
9446
9264
|
ObjectSetPrototypeOf(PassThrough2.prototype, Transform.prototype);
|
9447
9265
|
ObjectSetPrototypeOf(PassThrough2, Transform);
|
9448
9266
|
function PassThrough2(options) {
|
9449
|
-
if (!(this instanceof PassThrough2))
|
9450
|
-
return new PassThrough2(options);
|
9267
|
+
if (!(this instanceof PassThrough2)) return new PassThrough2(options);
|
9451
9268
|
Transform.call(this, options);
|
9452
9269
|
}
|
9453
9270
|
PassThrough2.prototype._transform = function(chunk, encoding, cb) {
|
@@ -9508,8 +9325,7 @@ var require_pipeline = __commonJS({
|
|
9508
9325
|
);
|
9509
9326
|
return {
|
9510
9327
|
destroy: (err) => {
|
9511
|
-
if (finished)
|
9512
|
-
return;
|
9328
|
+
if (finished) return;
|
9513
9329
|
finished = true;
|
9514
9330
|
destroyImpl.destroyer(stream, err || new ERR_STREAM_DESTROYED("pipe"));
|
9515
9331
|
},
|
@@ -10299,8 +10115,7 @@ var require_operators = __commonJS({
|
|
10299
10115
|
await fn(value, options2);
|
10300
10116
|
return kEmpty;
|
10301
10117
|
}
|
10302
|
-
for await (const unused of map.call(this, forEachFn, options))
|
10303
|
-
;
|
10118
|
+
for await (const unused of map.call(this, forEachFn, options)) ;
|
10304
10119
|
}
|
10305
10120
|
function filter(fn, options) {
|
10306
10121
|
if (typeof fn !== "function") {
|
@@ -10877,12 +10692,9 @@ var require_transport_stream = __commonJS({
|
|
10877
10692
|
throw error;
|
10878
10693
|
}
|
10879
10694
|
}
|
10880
|
-
if (typeof fn === "object")
|
10881
|
-
|
10882
|
-
if (typeof fn
|
10883
|
-
fn = fn.default;
|
10884
|
-
if (typeof fn !== "function")
|
10885
|
-
throw Error("exported worker is not a function");
|
10695
|
+
if (typeof fn === "object") fn = fn.default;
|
10696
|
+
if (typeof fn === "object") fn = fn.default;
|
10697
|
+
if (typeof fn !== "function") throw Error("exported worker is not a function");
|
10886
10698
|
return fn;
|
10887
10699
|
}
|
10888
10700
|
}
|