@salesforce/core-bundle 8.6.1 → 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 -2
- 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-file.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") {
|