@rife/logger 0.0.6-beta.10 → 0.0.6-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/common.cjs +3 -3
- package/dist/cjs/env.cjs +3 -3
- package/dist/cjs/index.cjs +7 -9
- package/dist/cjs/pino/index.cjs +125 -70
- package/dist/cjs/pino/rotate.cjs +6 -6
- package/dist/cjs/pino/worker/pino-file.cjs +3354 -0
- package/dist/cjs/pino/worker/pino-pretty.cjs +2823 -0
- package/dist/cjs/pino/worker/pino-rotate.cjs +604 -0
- package/dist/cjs/pino/worker/pino-worker.cjs +3667 -0
- package/dist/cjs/pino/worker/thread-stream.cjs +174 -0
- package/dist/cjs/test.cjs +10 -6
- package/dist/cjs/trace.cjs +4 -4
- package/dist/esm/common.mjs +2 -2
- package/dist/esm/pino/index.mjs +70 -17
- package/dist/esm/pino/rotate.mjs +3 -3
- package/dist/esm/pino/worker/pino-file.cjs +3354 -0
- package/dist/esm/pino/worker/pino-pretty.cjs +2823 -0
- package/dist/esm/pino/worker/pino-rotate.cjs +604 -0
- package/dist/esm/pino/worker/pino-worker.cjs +3667 -0
- package/dist/esm/pino/worker/thread-stream.cjs +174 -0
- package/dist/esm/test.mjs +10 -6
- package/dist/worker/pino-file.cjs +458 -626
- package/dist/worker/pino-pretty.cjs +430 -463
- package/dist/worker/pino-rotate.cjs +13 -13
- package/dist/worker/pino-worker.cjs +533 -701
- package/dist/worker/thread-stream.cjs +39 -37
- package/package.json +7 -7
- package/src/common.ts +4 -4
- package/src/pino/index.ts +122 -102
- package/src/pino/rotate.ts +32 -32
- package/src/test.ts +22 -19
- package/src/trace.ts +15 -15
- package/tsconfig.json +12 -12
|
@@ -1,7 +1,306 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __webpack_modules__ = {
|
|
2
|
-
"../../node_modules/.pnpm
|
|
3
|
+
"../../node_modules/.pnpm/@pinojs+redact@0.4.0/node_modules/@pinojs/redact/index.js" (module1) {
|
|
3
4
|
"use strict";
|
|
4
|
-
|
|
5
|
+
function deepClone(obj) {
|
|
6
|
+
if (null === obj || 'object' != typeof obj) return obj;
|
|
7
|
+
if (obj instanceof Date) return new Date(obj.getTime());
|
|
8
|
+
if (obj instanceof Array) {
|
|
9
|
+
const cloned = [];
|
|
10
|
+
for(let i = 0; i < obj.length; i++)cloned[i] = deepClone(obj[i]);
|
|
11
|
+
return cloned;
|
|
12
|
+
}
|
|
13
|
+
if ('object' == typeof obj) {
|
|
14
|
+
const cloned = Object.create(Object.getPrototypeOf(obj));
|
|
15
|
+
for(const key in obj)if (Object.prototype.hasOwnProperty.call(obj, key)) cloned[key] = deepClone(obj[key]);
|
|
16
|
+
return cloned;
|
|
17
|
+
}
|
|
18
|
+
return obj;
|
|
19
|
+
}
|
|
20
|
+
function parsePath(path) {
|
|
21
|
+
const parts = [];
|
|
22
|
+
let current = '';
|
|
23
|
+
let inBrackets = false;
|
|
24
|
+
let inQuotes = false;
|
|
25
|
+
let quoteChar = '';
|
|
26
|
+
for(let i = 0; i < path.length; i++){
|
|
27
|
+
const char = path[i];
|
|
28
|
+
if (inBrackets || '.' !== char) if ('[' === char) {
|
|
29
|
+
if (current) {
|
|
30
|
+
parts.push(current);
|
|
31
|
+
current = '';
|
|
32
|
+
}
|
|
33
|
+
inBrackets = true;
|
|
34
|
+
} else if (']' === char && inBrackets) {
|
|
35
|
+
parts.push(current);
|
|
36
|
+
current = '';
|
|
37
|
+
inBrackets = false;
|
|
38
|
+
inQuotes = false;
|
|
39
|
+
} else if (('"' === char || "'" === char) && inBrackets) if (inQuotes) if (char === quoteChar) {
|
|
40
|
+
inQuotes = false;
|
|
41
|
+
quoteChar = '';
|
|
42
|
+
} else current += char;
|
|
43
|
+
else {
|
|
44
|
+
inQuotes = true;
|
|
45
|
+
quoteChar = char;
|
|
46
|
+
}
|
|
47
|
+
else current += char;
|
|
48
|
+
else if (current) {
|
|
49
|
+
parts.push(current);
|
|
50
|
+
current = '';
|
|
51
|
+
}
|
|
52
|
+
}
|
|
53
|
+
if (current) parts.push(current);
|
|
54
|
+
return parts;
|
|
55
|
+
}
|
|
56
|
+
function setValue(obj, parts, value) {
|
|
57
|
+
let current = obj;
|
|
58
|
+
for(let i = 0; i < parts.length - 1; i++){
|
|
59
|
+
const key = parts[i];
|
|
60
|
+
if ('object' != typeof current || null === current || !(key in current)) return false;
|
|
61
|
+
if ('object' != typeof current[key] || null === current[key]) return false;
|
|
62
|
+
current = current[key];
|
|
63
|
+
}
|
|
64
|
+
const lastKey = parts[parts.length - 1];
|
|
65
|
+
if ('*' === lastKey) {
|
|
66
|
+
if (Array.isArray(current)) for(let i = 0; i < current.length; i++)current[i] = value;
|
|
67
|
+
else if ('object' == typeof current && null !== current) {
|
|
68
|
+
for(const key in current)if (Object.prototype.hasOwnProperty.call(current, key)) current[key] = value;
|
|
69
|
+
}
|
|
70
|
+
} else if ('object' == typeof current && null !== current && lastKey in current && Object.prototype.hasOwnProperty.call(current, lastKey)) current[lastKey] = value;
|
|
71
|
+
return true;
|
|
72
|
+
}
|
|
73
|
+
function removeKey(obj, parts) {
|
|
74
|
+
let current = obj;
|
|
75
|
+
for(let i = 0; i < parts.length - 1; i++){
|
|
76
|
+
const key = parts[i];
|
|
77
|
+
if ('object' != typeof current || null === current || !(key in current)) return false;
|
|
78
|
+
if ('object' != typeof current[key] || null === current[key]) return false;
|
|
79
|
+
current = current[key];
|
|
80
|
+
}
|
|
81
|
+
const lastKey = parts[parts.length - 1];
|
|
82
|
+
if ('*' === lastKey) {
|
|
83
|
+
if (Array.isArray(current)) for(let i = 0; i < current.length; i++)current[i] = void 0;
|
|
84
|
+
else if ('object' == typeof current && null !== current) {
|
|
85
|
+
for(const key in current)if (Object.prototype.hasOwnProperty.call(current, key)) delete current[key];
|
|
86
|
+
}
|
|
87
|
+
} else if ('object' == typeof current && null !== current && lastKey in current && Object.prototype.hasOwnProperty.call(current, lastKey)) delete current[lastKey];
|
|
88
|
+
return true;
|
|
89
|
+
}
|
|
90
|
+
const PATH_NOT_FOUND = Symbol('PATH_NOT_FOUND');
|
|
91
|
+
function getValueIfExists(obj, parts) {
|
|
92
|
+
let current = obj;
|
|
93
|
+
for (const part of parts){
|
|
94
|
+
if (null == current) return PATH_NOT_FOUND;
|
|
95
|
+
if ('object' != typeof current || null === current) return PATH_NOT_FOUND;
|
|
96
|
+
if (!(part in current)) return PATH_NOT_FOUND;
|
|
97
|
+
current = current[part];
|
|
98
|
+
}
|
|
99
|
+
return current;
|
|
100
|
+
}
|
|
101
|
+
function getValue(obj, parts) {
|
|
102
|
+
let current = obj;
|
|
103
|
+
for (const part of parts){
|
|
104
|
+
if (null == current) return;
|
|
105
|
+
if ('object' != typeof current || null === current) return;
|
|
106
|
+
current = current[part];
|
|
107
|
+
}
|
|
108
|
+
return current;
|
|
109
|
+
}
|
|
110
|
+
function redactPaths(obj, paths, censor, remove = false) {
|
|
111
|
+
for (const path of paths){
|
|
112
|
+
const parts = parsePath(path);
|
|
113
|
+
if (parts.includes('*')) redactWildcardPath(obj, parts, censor, path, remove);
|
|
114
|
+
else if (remove) removeKey(obj, parts);
|
|
115
|
+
else {
|
|
116
|
+
const value = getValueIfExists(obj, parts);
|
|
117
|
+
if (value === PATH_NOT_FOUND) continue;
|
|
118
|
+
const actualCensor = 'function' == typeof censor ? censor(value, parts) : censor;
|
|
119
|
+
setValue(obj, parts, actualCensor);
|
|
120
|
+
}
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
function redactWildcardPath(obj, parts, censor, originalPath, remove = false) {
|
|
124
|
+
const wildcardIndex = parts.indexOf('*');
|
|
125
|
+
if (wildcardIndex === parts.length - 1) {
|
|
126
|
+
const parentParts = parts.slice(0, -1);
|
|
127
|
+
let current = obj;
|
|
128
|
+
for (const part of parentParts){
|
|
129
|
+
if (null == current) return;
|
|
130
|
+
if ('object' != typeof current || null === current) return;
|
|
131
|
+
current = current[part];
|
|
132
|
+
}
|
|
133
|
+
if (Array.isArray(current)) if (remove) for(let i = 0; i < current.length; i++)current[i] = void 0;
|
|
134
|
+
else for(let i = 0; i < current.length; i++){
|
|
135
|
+
const indexPath = [
|
|
136
|
+
...parentParts,
|
|
137
|
+
i.toString()
|
|
138
|
+
];
|
|
139
|
+
const actualCensor = 'function' == typeof censor ? censor(current[i], indexPath) : censor;
|
|
140
|
+
current[i] = actualCensor;
|
|
141
|
+
}
|
|
142
|
+
else if ('object' == typeof current && null !== current) if (remove) {
|
|
143
|
+
const keysToDelete = [];
|
|
144
|
+
for(const key in current)if (Object.prototype.hasOwnProperty.call(current, key)) keysToDelete.push(key);
|
|
145
|
+
for (const key of keysToDelete)delete current[key];
|
|
146
|
+
} else for(const key in current){
|
|
147
|
+
const keyPath = [
|
|
148
|
+
...parentParts,
|
|
149
|
+
key
|
|
150
|
+
];
|
|
151
|
+
const actualCensor = 'function' == typeof censor ? censor(current[key], keyPath) : censor;
|
|
152
|
+
current[key] = actualCensor;
|
|
153
|
+
}
|
|
154
|
+
} else redactIntermediateWildcard(obj, parts, censor, wildcardIndex, originalPath, remove);
|
|
155
|
+
}
|
|
156
|
+
function redactIntermediateWildcard(obj, parts, censor, wildcardIndex, originalPath, remove = false) {
|
|
157
|
+
const beforeWildcard = parts.slice(0, wildcardIndex);
|
|
158
|
+
const afterWildcard = parts.slice(wildcardIndex + 1);
|
|
159
|
+
const pathArray = [];
|
|
160
|
+
function traverse(current, pathLength) {
|
|
161
|
+
if (pathLength === beforeWildcard.length) {
|
|
162
|
+
if (Array.isArray(current)) for(let i = 0; i < current.length; i++){
|
|
163
|
+
pathArray[pathLength] = i.toString();
|
|
164
|
+
traverse(current[i], pathLength + 1);
|
|
165
|
+
}
|
|
166
|
+
else if ('object' == typeof current && null !== current) for(const key in current){
|
|
167
|
+
pathArray[pathLength] = key;
|
|
168
|
+
traverse(current[key], pathLength + 1);
|
|
169
|
+
}
|
|
170
|
+
} else if (pathLength < beforeWildcard.length) {
|
|
171
|
+
const nextKey = beforeWildcard[pathLength];
|
|
172
|
+
if (current && 'object' == typeof current && null !== current && nextKey in current) {
|
|
173
|
+
pathArray[pathLength] = nextKey;
|
|
174
|
+
traverse(current[nextKey], pathLength + 1);
|
|
175
|
+
}
|
|
176
|
+
} else if (afterWildcard.includes('*')) {
|
|
177
|
+
const wrappedCensor = 'function' == typeof censor ? (value, path)=>{
|
|
178
|
+
const fullPath = [
|
|
179
|
+
...pathArray.slice(0, pathLength),
|
|
180
|
+
...path
|
|
181
|
+
];
|
|
182
|
+
return censor(value, fullPath);
|
|
183
|
+
} : censor;
|
|
184
|
+
redactWildcardPath(current, afterWildcard, wrappedCensor, originalPath, remove);
|
|
185
|
+
} else if (remove) removeKey(current, afterWildcard);
|
|
186
|
+
else {
|
|
187
|
+
const actualCensor = 'function' == typeof censor ? censor(getValue(current, afterWildcard), [
|
|
188
|
+
...pathArray.slice(0, pathLength),
|
|
189
|
+
...afterWildcard
|
|
190
|
+
]) : censor;
|
|
191
|
+
setValue(current, afterWildcard, actualCensor);
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
if (0 === beforeWildcard.length) traverse(obj, 0);
|
|
195
|
+
else {
|
|
196
|
+
let current = obj;
|
|
197
|
+
for(let i = 0; i < beforeWildcard.length; i++){
|
|
198
|
+
const part = beforeWildcard[i];
|
|
199
|
+
if (null == current) return;
|
|
200
|
+
if ('object' != typeof current || null === current) return;
|
|
201
|
+
current = current[part];
|
|
202
|
+
pathArray[i] = part;
|
|
203
|
+
}
|
|
204
|
+
if (null != current) traverse(current, beforeWildcard.length);
|
|
205
|
+
}
|
|
206
|
+
}
|
|
207
|
+
function buildPathStructure(pathsToClone) {
|
|
208
|
+
if (0 === pathsToClone.length) return null;
|
|
209
|
+
const pathStructure = new Map();
|
|
210
|
+
for (const path of pathsToClone){
|
|
211
|
+
const parts = parsePath(path);
|
|
212
|
+
let current = pathStructure;
|
|
213
|
+
for(let i = 0; i < parts.length; i++){
|
|
214
|
+
const part = parts[i];
|
|
215
|
+
if (!current.has(part)) current.set(part, new Map());
|
|
216
|
+
current = current.get(part);
|
|
217
|
+
}
|
|
218
|
+
}
|
|
219
|
+
return pathStructure;
|
|
220
|
+
}
|
|
221
|
+
function selectiveClone(obj, pathStructure) {
|
|
222
|
+
if (!pathStructure) return obj;
|
|
223
|
+
function cloneSelectively(source, pathMap, depth = 0) {
|
|
224
|
+
if (!pathMap || 0 === pathMap.size) return source;
|
|
225
|
+
if (null === source || 'object' != typeof source) return source;
|
|
226
|
+
if (source instanceof Date) return new Date(source.getTime());
|
|
227
|
+
if (Array.isArray(source)) {
|
|
228
|
+
const cloned = [];
|
|
229
|
+
for(let i = 0; i < source.length; i++){
|
|
230
|
+
const indexStr = i.toString();
|
|
231
|
+
if (pathMap.has(indexStr) || pathMap.has('*')) cloned[i] = cloneSelectively(source[i], pathMap.get(indexStr) || pathMap.get('*'));
|
|
232
|
+
else cloned[i] = source[i];
|
|
233
|
+
}
|
|
234
|
+
return cloned;
|
|
235
|
+
}
|
|
236
|
+
const cloned = Object.create(Object.getPrototypeOf(source));
|
|
237
|
+
for(const key in source)if (Object.prototype.hasOwnProperty.call(source, key)) if (pathMap.has(key) || pathMap.has('*')) cloned[key] = cloneSelectively(source[key], pathMap.get(key) || pathMap.get('*'));
|
|
238
|
+
else cloned[key] = source[key];
|
|
239
|
+
return cloned;
|
|
240
|
+
}
|
|
241
|
+
return cloneSelectively(obj, pathStructure);
|
|
242
|
+
}
|
|
243
|
+
function validatePath(path) {
|
|
244
|
+
if ('string' != typeof path) throw new Error('Paths must be (non-empty) strings');
|
|
245
|
+
if ('' === path) throw new Error('Invalid redaction path ()');
|
|
246
|
+
if (path.includes('..')) throw new Error(`Invalid redaction path (${path})`);
|
|
247
|
+
if (path.includes(',')) throw new Error(`Invalid redaction path (${path})`);
|
|
248
|
+
let bracketCount = 0;
|
|
249
|
+
let inQuotes = false;
|
|
250
|
+
let quoteChar = '';
|
|
251
|
+
for(let i = 0; i < path.length; i++){
|
|
252
|
+
const char = path[i];
|
|
253
|
+
if (('"' === char || "'" === char) && bracketCount > 0) if (inQuotes) {
|
|
254
|
+
if (char === quoteChar) {
|
|
255
|
+
inQuotes = false;
|
|
256
|
+
quoteChar = '';
|
|
257
|
+
}
|
|
258
|
+
} else {
|
|
259
|
+
inQuotes = true;
|
|
260
|
+
quoteChar = char;
|
|
261
|
+
}
|
|
262
|
+
else if ('[' !== char || inQuotes) {
|
|
263
|
+
if (']' === char && !inQuotes) {
|
|
264
|
+
bracketCount--;
|
|
265
|
+
if (bracketCount < 0) throw new Error(`Invalid redaction path (${path})`);
|
|
266
|
+
}
|
|
267
|
+
} else bracketCount++;
|
|
268
|
+
}
|
|
269
|
+
if (0 !== bracketCount) throw new Error(`Invalid redaction path (${path})`);
|
|
270
|
+
}
|
|
271
|
+
function validatePaths(paths) {
|
|
272
|
+
if (!Array.isArray(paths)) throw new TypeError('paths must be an array');
|
|
273
|
+
for (const path of paths)validatePath(path);
|
|
274
|
+
}
|
|
275
|
+
function slowRedact(options = {}) {
|
|
276
|
+
const { paths = [], censor = '[REDACTED]', serialize = JSON.stringify, strict = true, remove = false } = options;
|
|
277
|
+
validatePaths(paths);
|
|
278
|
+
const pathStructure = buildPathStructure(paths);
|
|
279
|
+
return function(obj) {
|
|
280
|
+
if (strict && (null === obj || 'object' != typeof obj)) {
|
|
281
|
+
if (null == obj) return serialize ? serialize(obj) : obj;
|
|
282
|
+
if ('object' != typeof obj) return serialize ? serialize(obj) : obj;
|
|
283
|
+
}
|
|
284
|
+
const cloned = selectiveClone(obj, pathStructure);
|
|
285
|
+
const original = obj;
|
|
286
|
+
let actualCensor = censor;
|
|
287
|
+
if ('function' == typeof censor) actualCensor = censor;
|
|
288
|
+
redactPaths(cloned, paths, actualCensor, remove);
|
|
289
|
+
if (false === serialize) {
|
|
290
|
+
cloned.restore = function() {
|
|
291
|
+
return deepClone(original);
|
|
292
|
+
};
|
|
293
|
+
return cloned;
|
|
294
|
+
}
|
|
295
|
+
if ('function' == typeof serialize) return serialize(cloned);
|
|
296
|
+
return JSON.stringify(cloned);
|
|
297
|
+
};
|
|
298
|
+
}
|
|
299
|
+
module1.exports = slowRedact;
|
|
300
|
+
},
|
|
301
|
+
"../../node_modules/.pnpm/atomic-sleep@1.0.0/node_modules/atomic-sleep/index.js" (module1) {
|
|
302
|
+
"use strict";
|
|
303
|
+
if ("u" > typeof SharedArrayBuffer && "u" > typeof Atomics) {
|
|
5
304
|
const nil = new Int32Array(new SharedArrayBuffer(4));
|
|
6
305
|
function sleep(ms) {
|
|
7
306
|
const valid = ms > 0 && ms < 1 / 0;
|
|
@@ -25,525 +324,7 @@ var __webpack_modules__ = {
|
|
|
25
324
|
module1.exports = sleep1;
|
|
26
325
|
}
|
|
27
326
|
},
|
|
28
|
-
"../../node_modules/.pnpm/
|
|
29
|
-
"use strict";
|
|
30
|
-
const validator = __webpack_require__("../../node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/validator.js");
|
|
31
|
-
const parse = __webpack_require__("../../node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/parse.js");
|
|
32
|
-
const redactor = __webpack_require__("../../node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/redactor.js");
|
|
33
|
-
const restorer = __webpack_require__("../../node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/restorer.js");
|
|
34
|
-
const { groupRedact, nestedRedact } = __webpack_require__("../../node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/modifiers.js");
|
|
35
|
-
const state = __webpack_require__("../../node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/state.js");
|
|
36
|
-
const rx = __webpack_require__("../../node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/rx.js");
|
|
37
|
-
const validate = validator();
|
|
38
|
-
const noop = (o)=>o;
|
|
39
|
-
noop.restore = noop;
|
|
40
|
-
const DEFAULT_CENSOR = '[REDACTED]';
|
|
41
|
-
fastRedact.rx = rx;
|
|
42
|
-
fastRedact.validator = validator;
|
|
43
|
-
module1.exports = fastRedact;
|
|
44
|
-
function fastRedact(opts = {}) {
|
|
45
|
-
const paths = Array.from(new Set(opts.paths || []));
|
|
46
|
-
const serialize = 'serialize' in opts ? false === opts.serialize ? opts.serialize : 'function' == typeof opts.serialize ? opts.serialize : JSON.stringify : JSON.stringify;
|
|
47
|
-
const remove = opts.remove;
|
|
48
|
-
if (true === remove && serialize !== JSON.stringify) throw Error('fast-redact – remove option may only be set when serializer is JSON.stringify');
|
|
49
|
-
const censor = true === remove ? void 0 : 'censor' in opts ? opts.censor : DEFAULT_CENSOR;
|
|
50
|
-
const isCensorFct = 'function' == typeof censor;
|
|
51
|
-
const censorFctTakesPath = isCensorFct && censor.length > 1;
|
|
52
|
-
if (0 === paths.length) return serialize || noop;
|
|
53
|
-
validate({
|
|
54
|
-
paths,
|
|
55
|
-
serialize,
|
|
56
|
-
censor
|
|
57
|
-
});
|
|
58
|
-
const { wildcards, wcLen, secret } = parse({
|
|
59
|
-
paths,
|
|
60
|
-
censor
|
|
61
|
-
});
|
|
62
|
-
const compileRestore = restorer();
|
|
63
|
-
const strict = 'strict' in opts ? opts.strict : true;
|
|
64
|
-
return redactor({
|
|
65
|
-
secret,
|
|
66
|
-
wcLen,
|
|
67
|
-
serialize,
|
|
68
|
-
strict,
|
|
69
|
-
isCensorFct,
|
|
70
|
-
censorFctTakesPath
|
|
71
|
-
}, state({
|
|
72
|
-
secret,
|
|
73
|
-
censor,
|
|
74
|
-
compileRestore,
|
|
75
|
-
serialize,
|
|
76
|
-
groupRedact,
|
|
77
|
-
nestedRedact,
|
|
78
|
-
wildcards,
|
|
79
|
-
wcLen
|
|
80
|
-
}));
|
|
81
|
-
}
|
|
82
|
-
},
|
|
83
|
-
"../../node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/modifiers.js": function(module1) {
|
|
84
|
-
"use strict";
|
|
85
|
-
module1.exports = {
|
|
86
|
-
groupRedact,
|
|
87
|
-
groupRestore,
|
|
88
|
-
nestedRedact,
|
|
89
|
-
nestedRestore
|
|
90
|
-
};
|
|
91
|
-
function groupRestore({ keys, values, target }) {
|
|
92
|
-
if (null == target || 'string' == typeof target) return;
|
|
93
|
-
const length = keys.length;
|
|
94
|
-
for(var i = 0; i < length; i++){
|
|
95
|
-
const k = keys[i];
|
|
96
|
-
target[k] = values[i];
|
|
97
|
-
}
|
|
98
|
-
}
|
|
99
|
-
function groupRedact(o, path, censor, isCensorFct, censorFctTakesPath) {
|
|
100
|
-
const target = get(o, path);
|
|
101
|
-
if (null == target || 'string' == typeof target) return {
|
|
102
|
-
keys: null,
|
|
103
|
-
values: null,
|
|
104
|
-
target,
|
|
105
|
-
flat: true
|
|
106
|
-
};
|
|
107
|
-
const keys = Object.keys(target);
|
|
108
|
-
const keysLength = keys.length;
|
|
109
|
-
const pathLength = path.length;
|
|
110
|
-
const pathWithKey = censorFctTakesPath ? [
|
|
111
|
-
...path
|
|
112
|
-
] : void 0;
|
|
113
|
-
const values = new Array(keysLength);
|
|
114
|
-
for(var i = 0; i < keysLength; i++){
|
|
115
|
-
const key = keys[i];
|
|
116
|
-
values[i] = target[key];
|
|
117
|
-
if (censorFctTakesPath) {
|
|
118
|
-
pathWithKey[pathLength] = key;
|
|
119
|
-
target[key] = censor(target[key], pathWithKey);
|
|
120
|
-
} else if (isCensorFct) target[key] = censor(target[key]);
|
|
121
|
-
else target[key] = censor;
|
|
122
|
-
}
|
|
123
|
-
return {
|
|
124
|
-
keys,
|
|
125
|
-
values,
|
|
126
|
-
target,
|
|
127
|
-
flat: true
|
|
128
|
-
};
|
|
129
|
-
}
|
|
130
|
-
function nestedRestore(instructions) {
|
|
131
|
-
for(let i = 0; i < instructions.length; i++){
|
|
132
|
-
const { target, path, value } = instructions[i];
|
|
133
|
-
let current = target;
|
|
134
|
-
for(let i = path.length - 1; i > 0; i--)current = current[path[i]];
|
|
135
|
-
current[path[0]] = value;
|
|
136
|
-
}
|
|
137
|
-
}
|
|
138
|
-
function nestedRedact(store, o, path, ns, censor, isCensorFct, censorFctTakesPath) {
|
|
139
|
-
const target = get(o, path);
|
|
140
|
-
if (null == target) return;
|
|
141
|
-
const keys = Object.keys(target);
|
|
142
|
-
const keysLength = keys.length;
|
|
143
|
-
for(var i = 0; i < keysLength; i++){
|
|
144
|
-
const key = keys[i];
|
|
145
|
-
specialSet(store, target, key, path, ns, censor, isCensorFct, censorFctTakesPath);
|
|
146
|
-
}
|
|
147
|
-
return store;
|
|
148
|
-
}
|
|
149
|
-
function has(obj, prop) {
|
|
150
|
-
return null != obj ? 'hasOwn' in Object ? Object.hasOwn(obj, prop) : Object.prototype.hasOwnProperty.call(obj, prop) : false;
|
|
151
|
-
}
|
|
152
|
-
function specialSet(store, o, k, path, afterPath, censor, isCensorFct, censorFctTakesPath) {
|
|
153
|
-
const afterPathLen = afterPath.length;
|
|
154
|
-
const lastPathIndex = afterPathLen - 1;
|
|
155
|
-
const originalKey = k;
|
|
156
|
-
var i = -1;
|
|
157
|
-
var n1;
|
|
158
|
-
var nv;
|
|
159
|
-
var ov;
|
|
160
|
-
var oov = null;
|
|
161
|
-
var wc = null;
|
|
162
|
-
var kIsWc;
|
|
163
|
-
var wcov;
|
|
164
|
-
var consecutive = false;
|
|
165
|
-
var level = 0;
|
|
166
|
-
var depth = 0;
|
|
167
|
-
var redactPathCurrent = tree();
|
|
168
|
-
ov = n1 = o[k];
|
|
169
|
-
if ('object' != typeof n1) return;
|
|
170
|
-
while(null != n1 && ++i < afterPathLen){
|
|
171
|
-
depth += 1;
|
|
172
|
-
k = afterPath[i];
|
|
173
|
-
if ('*' !== k && !wc && !('object' == typeof n1 && k in n1)) break;
|
|
174
|
-
if ('*' === k) {
|
|
175
|
-
if ('*' === wc) consecutive = true;
|
|
176
|
-
wc = k;
|
|
177
|
-
if (i !== lastPathIndex) continue;
|
|
178
|
-
}
|
|
179
|
-
if (wc) {
|
|
180
|
-
const wcKeys = Object.keys(n1);
|
|
181
|
-
for(var j = 0; j < wcKeys.length; j++){
|
|
182
|
-
const wck = wcKeys[j];
|
|
183
|
-
wcov = n1[wck];
|
|
184
|
-
kIsWc = '*' === k;
|
|
185
|
-
if (consecutive) {
|
|
186
|
-
redactPathCurrent = node(redactPathCurrent, wck, depth);
|
|
187
|
-
level = i;
|
|
188
|
-
ov = iterateNthLevel(wcov, level - 1, k, path, afterPath, censor, isCensorFct, censorFctTakesPath, originalKey, n1, nv, ov, kIsWc, wck, i, lastPathIndex, redactPathCurrent, store, o[originalKey], depth + 1);
|
|
189
|
-
} else if (kIsWc || 'object' == typeof wcov && null !== wcov && k in wcov) {
|
|
190
|
-
ov = kIsWc ? wcov : wcov[k];
|
|
191
|
-
nv = i !== lastPathIndex ? ov : isCensorFct ? censorFctTakesPath ? censor(ov, [
|
|
192
|
-
...path,
|
|
193
|
-
originalKey,
|
|
194
|
-
...afterPath
|
|
195
|
-
]) : censor(ov) : censor;
|
|
196
|
-
if (kIsWc) {
|
|
197
|
-
const rv = restoreInstr(node(redactPathCurrent, wck, depth), ov, o[originalKey]);
|
|
198
|
-
store.push(rv);
|
|
199
|
-
n1[wck] = nv;
|
|
200
|
-
} else if (wcov[k] === nv) ;
|
|
201
|
-
else if (void 0 === nv && void 0 !== censor || has(wcov, k) && nv === ov) redactPathCurrent = node(redactPathCurrent, wck, depth);
|
|
202
|
-
else {
|
|
203
|
-
redactPathCurrent = node(redactPathCurrent, wck, depth);
|
|
204
|
-
const rv = restoreInstr(node(redactPathCurrent, k, depth + 1), ov, o[originalKey]);
|
|
205
|
-
store.push(rv);
|
|
206
|
-
wcov[k] = nv;
|
|
207
|
-
}
|
|
208
|
-
}
|
|
209
|
-
}
|
|
210
|
-
wc = null;
|
|
211
|
-
} else {
|
|
212
|
-
ov = n1[k];
|
|
213
|
-
redactPathCurrent = node(redactPathCurrent, k, depth);
|
|
214
|
-
nv = i !== lastPathIndex ? ov : isCensorFct ? censorFctTakesPath ? censor(ov, [
|
|
215
|
-
...path,
|
|
216
|
-
originalKey,
|
|
217
|
-
...afterPath
|
|
218
|
-
]) : censor(ov) : censor;
|
|
219
|
-
if (has(n1, k) && nv === ov || void 0 === nv && void 0 !== censor) ;
|
|
220
|
-
else {
|
|
221
|
-
const rv = restoreInstr(redactPathCurrent, ov, o[originalKey]);
|
|
222
|
-
store.push(rv);
|
|
223
|
-
n1[k] = nv;
|
|
224
|
-
}
|
|
225
|
-
n1 = n1[k];
|
|
226
|
-
}
|
|
227
|
-
if ('object' != typeof n1) break;
|
|
228
|
-
}
|
|
229
|
-
}
|
|
230
|
-
function get(o, p) {
|
|
231
|
-
var i = -1;
|
|
232
|
-
var l = p.length;
|
|
233
|
-
var n1 = o;
|
|
234
|
-
while(null != n1 && ++i < l)n1 = n1[p[i]];
|
|
235
|
-
return n1;
|
|
236
|
-
}
|
|
237
|
-
function iterateNthLevel(wcov, level, k, path, afterPath, censor, isCensorFct, censorFctTakesPath, originalKey, n1, nv, ov, kIsWc, wck, i, lastPathIndex, redactPathCurrent, store, parent, depth) {
|
|
238
|
-
if (0 === level) {
|
|
239
|
-
if (kIsWc || 'object' == typeof wcov && null !== wcov && k in wcov) {
|
|
240
|
-
ov = kIsWc ? wcov : wcov[k];
|
|
241
|
-
nv = i !== lastPathIndex ? ov : isCensorFct ? censorFctTakesPath ? censor(ov, [
|
|
242
|
-
...path,
|
|
243
|
-
originalKey,
|
|
244
|
-
...afterPath
|
|
245
|
-
]) : censor(ov) : censor;
|
|
246
|
-
if (kIsWc) {
|
|
247
|
-
const rv = restoreInstr(redactPathCurrent, ov, parent);
|
|
248
|
-
store.push(rv);
|
|
249
|
-
n1[wck] = nv;
|
|
250
|
-
} else if (wcov[k] === nv) ;
|
|
251
|
-
else if (void 0 === nv && void 0 !== censor || has(wcov, k) && nv === ov) ;
|
|
252
|
-
else {
|
|
253
|
-
const rv = restoreInstr(node(redactPathCurrent, k, depth + 1), ov, parent);
|
|
254
|
-
store.push(rv);
|
|
255
|
-
wcov[k] = nv;
|
|
256
|
-
}
|
|
257
|
-
}
|
|
258
|
-
}
|
|
259
|
-
for(const key in wcov)if ('object' == typeof wcov[key]) {
|
|
260
|
-
redactPathCurrent = node(redactPathCurrent, key, depth);
|
|
261
|
-
iterateNthLevel(wcov[key], level - 1, k, path, afterPath, censor, isCensorFct, censorFctTakesPath, originalKey, n1, nv, ov, kIsWc, wck, i, lastPathIndex, redactPathCurrent, store, parent, depth + 1);
|
|
262
|
-
}
|
|
263
|
-
}
|
|
264
|
-
function tree() {
|
|
265
|
-
return {
|
|
266
|
-
parent: null,
|
|
267
|
-
key: null,
|
|
268
|
-
children: [],
|
|
269
|
-
depth: 0
|
|
270
|
-
};
|
|
271
|
-
}
|
|
272
|
-
function node(parent, key, depth) {
|
|
273
|
-
if (parent.depth === depth) return node(parent.parent, key, depth);
|
|
274
|
-
var child = {
|
|
275
|
-
parent,
|
|
276
|
-
key,
|
|
277
|
-
depth,
|
|
278
|
-
children: []
|
|
279
|
-
};
|
|
280
|
-
parent.children.push(child);
|
|
281
|
-
return child;
|
|
282
|
-
}
|
|
283
|
-
function restoreInstr(node, value, target) {
|
|
284
|
-
let current = node;
|
|
285
|
-
const path = [];
|
|
286
|
-
do {
|
|
287
|
-
path.push(current.key);
|
|
288
|
-
current = current.parent;
|
|
289
|
-
}while (null != current.parent);
|
|
290
|
-
return {
|
|
291
|
-
path,
|
|
292
|
-
value,
|
|
293
|
-
target
|
|
294
|
-
};
|
|
295
|
-
}
|
|
296
|
-
},
|
|
297
|
-
"../../node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/parse.js": function(module1, __unused_webpack_exports, __webpack_require__) {
|
|
298
|
-
"use strict";
|
|
299
|
-
const rx = __webpack_require__("../../node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/rx.js");
|
|
300
|
-
module1.exports = parse;
|
|
301
|
-
function parse({ paths }) {
|
|
302
|
-
const wildcards = [];
|
|
303
|
-
var wcLen = 0;
|
|
304
|
-
const secret = paths.reduce(function(o, strPath, ix) {
|
|
305
|
-
var path = strPath.match(rx).map((p)=>p.replace(/'|"|`/g, ''));
|
|
306
|
-
const leadingBracket = '[' === strPath[0];
|
|
307
|
-
path = path.map((p)=>{
|
|
308
|
-
if ('[' === p[0]) return p.substr(1, p.length - 2);
|
|
309
|
-
return p;
|
|
310
|
-
});
|
|
311
|
-
const star = path.indexOf('*');
|
|
312
|
-
if (star > -1) {
|
|
313
|
-
const before = path.slice(0, star);
|
|
314
|
-
const beforeStr = before.join('.');
|
|
315
|
-
const after = path.slice(star + 1, path.length);
|
|
316
|
-
const nested = after.length > 0;
|
|
317
|
-
wcLen++;
|
|
318
|
-
wildcards.push({
|
|
319
|
-
before,
|
|
320
|
-
beforeStr,
|
|
321
|
-
after,
|
|
322
|
-
nested
|
|
323
|
-
});
|
|
324
|
-
} else o[strPath] = {
|
|
325
|
-
path: path,
|
|
326
|
-
val: void 0,
|
|
327
|
-
precensored: false,
|
|
328
|
-
circle: '',
|
|
329
|
-
escPath: JSON.stringify(strPath),
|
|
330
|
-
leadingBracket: leadingBracket
|
|
331
|
-
};
|
|
332
|
-
return o;
|
|
333
|
-
}, {});
|
|
334
|
-
return {
|
|
335
|
-
wildcards,
|
|
336
|
-
wcLen,
|
|
337
|
-
secret
|
|
338
|
-
};
|
|
339
|
-
}
|
|
340
|
-
},
|
|
341
|
-
"../../node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/redactor.js": function(module1, __unused_webpack_exports, __webpack_require__) {
|
|
342
|
-
"use strict";
|
|
343
|
-
const rx = __webpack_require__("../../node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/rx.js");
|
|
344
|
-
module1.exports = redactor;
|
|
345
|
-
function redactor({ secret, serialize, wcLen, strict, isCensorFct, censorFctTakesPath }, state) {
|
|
346
|
-
const redact = Function('o', `
|
|
347
|
-
if (typeof o !== 'object' || o == null) {
|
|
348
|
-
${strictImpl(strict, serialize)}
|
|
349
|
-
}
|
|
350
|
-
const { censor, secret } = this
|
|
351
|
-
const originalSecret = {}
|
|
352
|
-
const secretKeys = Object.keys(secret)
|
|
353
|
-
for (var i = 0; i < secretKeys.length; i++) {
|
|
354
|
-
originalSecret[secretKeys[i]] = secret[secretKeys[i]]
|
|
355
|
-
}
|
|
356
|
-
|
|
357
|
-
${redactTmpl(secret, isCensorFct, censorFctTakesPath)}
|
|
358
|
-
this.compileRestore()
|
|
359
|
-
${dynamicRedactTmpl(wcLen > 0, isCensorFct, censorFctTakesPath)}
|
|
360
|
-
this.secret = originalSecret
|
|
361
|
-
${resultTmpl(serialize)}
|
|
362
|
-
`).bind(state);
|
|
363
|
-
redact.state = state;
|
|
364
|
-
if (false === serialize) redact.restore = (o)=>state.restore(o);
|
|
365
|
-
return redact;
|
|
366
|
-
}
|
|
367
|
-
function redactTmpl(secret, isCensorFct, censorFctTakesPath) {
|
|
368
|
-
return Object.keys(secret).map((path)=>{
|
|
369
|
-
const { escPath, leadingBracket, path: arrPath } = secret[path];
|
|
370
|
-
const skip = leadingBracket ? 1 : 0;
|
|
371
|
-
const delim = leadingBracket ? '' : '.';
|
|
372
|
-
const hops = [];
|
|
373
|
-
var match;
|
|
374
|
-
while(null !== (match = rx.exec(path))){
|
|
375
|
-
const [, ix] = match;
|
|
376
|
-
const { index, input } = match;
|
|
377
|
-
if (index > skip) hops.push(input.substring(0, index - (ix ? 0 : 1)));
|
|
378
|
-
}
|
|
379
|
-
var existence = hops.map((p)=>`o${delim}${p}`).join(' && ');
|
|
380
|
-
if (0 === existence.length) existence += `o${delim}${path} != null`;
|
|
381
|
-
else existence += ` && o${delim}${path} != null`;
|
|
382
|
-
const circularDetection = `
|
|
383
|
-
switch (true) {
|
|
384
|
-
${hops.reverse().map((p)=>`
|
|
385
|
-
case o${delim}${p} === censor:
|
|
386
|
-
secret[${escPath}].circle = ${JSON.stringify(p)}
|
|
387
|
-
break
|
|
388
|
-
`).join('\n')}
|
|
389
|
-
}
|
|
390
|
-
`;
|
|
391
|
-
const censorArgs = censorFctTakesPath ? `val, ${JSON.stringify(arrPath)}` : "val";
|
|
392
|
-
return `
|
|
393
|
-
if (${existence}) {
|
|
394
|
-
const val = o${delim}${path}
|
|
395
|
-
if (val === censor) {
|
|
396
|
-
secret[${escPath}].precensored = true
|
|
397
|
-
} else {
|
|
398
|
-
secret[${escPath}].val = val
|
|
399
|
-
o${delim}${path} = ${isCensorFct ? `censor(${censorArgs})` : 'censor'}
|
|
400
|
-
${circularDetection}
|
|
401
|
-
}
|
|
402
|
-
}
|
|
403
|
-
`;
|
|
404
|
-
}).join('\n');
|
|
405
|
-
}
|
|
406
|
-
function dynamicRedactTmpl(hasWildcards, isCensorFct, censorFctTakesPath) {
|
|
407
|
-
return true === hasWildcards ? `
|
|
408
|
-
{
|
|
409
|
-
const { wildcards, wcLen, groupRedact, nestedRedact } = this
|
|
410
|
-
for (var i = 0; i < wcLen; i++) {
|
|
411
|
-
const { before, beforeStr, after, nested } = wildcards[i]
|
|
412
|
-
if (nested === true) {
|
|
413
|
-
secret[beforeStr] = secret[beforeStr] || []
|
|
414
|
-
nestedRedact(secret[beforeStr], o, before, after, censor, ${isCensorFct}, ${censorFctTakesPath})
|
|
415
|
-
} else secret[beforeStr] = groupRedact(o, before, censor, ${isCensorFct}, ${censorFctTakesPath})
|
|
416
|
-
}
|
|
417
|
-
}
|
|
418
|
-
` : '';
|
|
419
|
-
}
|
|
420
|
-
function resultTmpl(serialize) {
|
|
421
|
-
return false === serialize ? "return o" : `
|
|
422
|
-
var s = this.serialize(o)
|
|
423
|
-
this.restore(o)
|
|
424
|
-
return s
|
|
425
|
-
`;
|
|
426
|
-
}
|
|
427
|
-
function strictImpl(strict, serialize) {
|
|
428
|
-
return true === strict ? "throw Error('fast-redact: primitives cannot be redacted')" : false === serialize ? "return o" : "return this.serialize(o)";
|
|
429
|
-
}
|
|
430
|
-
},
|
|
431
|
-
"../../node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/restorer.js": function(module1, __unused_webpack_exports, __webpack_require__) {
|
|
432
|
-
"use strict";
|
|
433
|
-
const { groupRestore, nestedRestore } = __webpack_require__("../../node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/modifiers.js");
|
|
434
|
-
module1.exports = restorer;
|
|
435
|
-
function restorer() {
|
|
436
|
-
return function() {
|
|
437
|
-
if (this.restore) {
|
|
438
|
-
this.restore.state.secret = this.secret;
|
|
439
|
-
return;
|
|
440
|
-
}
|
|
441
|
-
const { secret, wcLen } = this;
|
|
442
|
-
const paths = Object.keys(secret);
|
|
443
|
-
const resetters = resetTmpl(secret, paths);
|
|
444
|
-
const hasWildcards = wcLen > 0;
|
|
445
|
-
const state = hasWildcards ? {
|
|
446
|
-
secret,
|
|
447
|
-
groupRestore,
|
|
448
|
-
nestedRestore
|
|
449
|
-
} : {
|
|
450
|
-
secret
|
|
451
|
-
};
|
|
452
|
-
this.restore = Function('o', restoreTmpl(resetters, paths, hasWildcards)).bind(state);
|
|
453
|
-
this.restore.state = state;
|
|
454
|
-
};
|
|
455
|
-
}
|
|
456
|
-
function resetTmpl(secret, paths) {
|
|
457
|
-
return paths.map((path)=>{
|
|
458
|
-
const { circle, escPath, leadingBracket } = secret[path];
|
|
459
|
-
const delim = leadingBracket ? '' : '.';
|
|
460
|
-
const reset = circle ? `o.${circle} = secret[${escPath}].val` : `o${delim}${path} = secret[${escPath}].val`;
|
|
461
|
-
const clear = `secret[${escPath}].val = undefined`;
|
|
462
|
-
return `
|
|
463
|
-
if (secret[${escPath}].val !== undefined) {
|
|
464
|
-
try { ${reset} } catch (e) {}
|
|
465
|
-
${clear}
|
|
466
|
-
}
|
|
467
|
-
`;
|
|
468
|
-
}).join('');
|
|
469
|
-
}
|
|
470
|
-
function restoreTmpl(resetters, paths, hasWildcards) {
|
|
471
|
-
const dynamicReset = true === hasWildcards ? `
|
|
472
|
-
const keys = Object.keys(secret)
|
|
473
|
-
const len = keys.length
|
|
474
|
-
for (var i = len - 1; i >= ${paths.length}; i--) {
|
|
475
|
-
const k = keys[i]
|
|
476
|
-
const o = secret[k]
|
|
477
|
-
if (o) {
|
|
478
|
-
if (o.flat === true) this.groupRestore(o)
|
|
479
|
-
else this.nestedRestore(o)
|
|
480
|
-
secret[k] = null
|
|
481
|
-
}
|
|
482
|
-
}
|
|
483
|
-
` : '';
|
|
484
|
-
return `
|
|
485
|
-
const secret = this.secret
|
|
486
|
-
${dynamicReset}
|
|
487
|
-
${resetters}
|
|
488
|
-
return o
|
|
489
|
-
`;
|
|
490
|
-
}
|
|
491
|
-
},
|
|
492
|
-
"../../node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/rx.js": function(module1) {
|
|
493
|
-
"use strict";
|
|
494
|
-
module1.exports = /[^.[\]]+|\[((?:.)*?)\]/g;
|
|
495
|
-
},
|
|
496
|
-
"../../node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/state.js": function(module1) {
|
|
497
|
-
"use strict";
|
|
498
|
-
module1.exports = state;
|
|
499
|
-
function state(o) {
|
|
500
|
-
const { secret, censor, compileRestore, serialize, groupRedact, nestedRedact, wildcards, wcLen } = o;
|
|
501
|
-
const builder = [
|
|
502
|
-
{
|
|
503
|
-
secret,
|
|
504
|
-
censor,
|
|
505
|
-
compileRestore
|
|
506
|
-
}
|
|
507
|
-
];
|
|
508
|
-
if (false !== serialize) builder.push({
|
|
509
|
-
serialize
|
|
510
|
-
});
|
|
511
|
-
if (wcLen > 0) builder.push({
|
|
512
|
-
groupRedact,
|
|
513
|
-
nestedRedact,
|
|
514
|
-
wildcards,
|
|
515
|
-
wcLen
|
|
516
|
-
});
|
|
517
|
-
return Object.assign(...builder);
|
|
518
|
-
}
|
|
519
|
-
},
|
|
520
|
-
"../../node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/lib/validator.js": function(module1) {
|
|
521
|
-
"use strict";
|
|
522
|
-
module1.exports = validator;
|
|
523
|
-
function validator(opts = {}) {
|
|
524
|
-
const { ERR_PATHS_MUST_BE_STRINGS = ()=>'fast-redact - Paths must be (non-empty) strings', ERR_INVALID_PATH = (s)=>`fast-redact – Invalid path (${s})` } = opts;
|
|
525
|
-
return function({ paths }) {
|
|
526
|
-
paths.forEach((s)=>{
|
|
527
|
-
if ('string' != typeof s) throw Error(ERR_PATHS_MUST_BE_STRINGS());
|
|
528
|
-
try {
|
|
529
|
-
if (/〇/.test(s)) throw Error();
|
|
530
|
-
const expr = ('[' === s[0] ? '' : '.') + s.replace(/^\*/, '〇').replace(/\.\*/g, '.〇').replace(/\[\*\]/g, '[〇]');
|
|
531
|
-
if (/\n|\r|;/.test(expr)) throw Error();
|
|
532
|
-
if (/\/\*/.test(expr)) throw Error();
|
|
533
|
-
Function(`
|
|
534
|
-
'use strict'
|
|
535
|
-
const o = new Proxy({}, { get: () => o, set: () => { throw Error() } });
|
|
536
|
-
const 〇 = null;
|
|
537
|
-
o${expr}
|
|
538
|
-
if ([o${expr}].length !== 1) throw Error()`)();
|
|
539
|
-
} catch (e) {
|
|
540
|
-
throw Error(ERR_INVALID_PATH(s));
|
|
541
|
-
}
|
|
542
|
-
});
|
|
543
|
-
};
|
|
544
|
-
}
|
|
545
|
-
},
|
|
546
|
-
"../../node_modules/.pnpm/on-exit-leak-free@2.1.2/node_modules/on-exit-leak-free/index.js": function(module1) {
|
|
327
|
+
"../../node_modules/.pnpm/on-exit-leak-free@2.1.2/node_modules/on-exit-leak-free/index.js" (module1) {
|
|
547
328
|
"use strict";
|
|
548
329
|
const refs = {
|
|
549
330
|
exit: [],
|
|
@@ -625,7 +406,7 @@ var __webpack_modules__ = {
|
|
|
625
406
|
unregister
|
|
626
407
|
};
|
|
627
408
|
},
|
|
628
|
-
"../../node_modules/.pnpm/pino-abstract-transport@2.0.0/node_modules/pino-abstract-transport/index.js"
|
|
409
|
+
"../../node_modules/.pnpm/pino-abstract-transport@2.0.0/node_modules/pino-abstract-transport/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
629
410
|
"use strict";
|
|
630
411
|
const metadata = Symbol.for('pino.metadata');
|
|
631
412
|
const split = __webpack_require__("../../node_modules/.pnpm/split2@4.2.0/node_modules/split2/index.js");
|
|
@@ -731,7 +512,7 @@ var __webpack_modules__ = {
|
|
|
731
512
|
process.nextTick(cb, err);
|
|
732
513
|
}
|
|
733
514
|
},
|
|
734
|
-
"../../node_modules/.pnpm/quick-format-unescaped@4.0.4/node_modules/quick-format-unescaped/index.js"
|
|
515
|
+
"../../node_modules/.pnpm/quick-format-unescaped@4.0.4/node_modules/quick-format-unescaped/index.js" (module1) {
|
|
735
516
|
"use strict";
|
|
736
517
|
function tryStringify(o) {
|
|
737
518
|
try {
|
|
@@ -827,7 +608,7 @@ var __webpack_modules__ = {
|
|
|
827
608
|
return str;
|
|
828
609
|
}
|
|
829
610
|
},
|
|
830
|
-
"../../node_modules/.pnpm/real-require@0.2.0/node_modules/real-require/src/index.js"
|
|
611
|
+
"../../node_modules/.pnpm/real-require@0.2.0/node_modules/real-require/src/index.js" (module1) {
|
|
831
612
|
const realImport = new Function('modulePath', 'return import(modulePath)');
|
|
832
613
|
function realRequire(modulePath) {
|
|
833
614
|
if ('function' == typeof __non_webpack__require__) return __non_webpack__require__(modulePath);
|
|
@@ -838,7 +619,7 @@ var __webpack_modules__ = {
|
|
|
838
619
|
realRequire
|
|
839
620
|
};
|
|
840
621
|
},
|
|
841
|
-
"../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/index.js"
|
|
622
|
+
"../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/index.js" (module1, exports) {
|
|
842
623
|
"use strict";
|
|
843
624
|
const { hasOwnProperty } = Object.prototype;
|
|
844
625
|
const stringify = configure();
|
|
@@ -1282,7 +1063,7 @@ var __webpack_modules__ = {
|
|
|
1282
1063
|
return stringify;
|
|
1283
1064
|
}
|
|
1284
1065
|
},
|
|
1285
|
-
"../../node_modules/.pnpm/split2@4.2.0/node_modules/split2/index.js"
|
|
1066
|
+
"../../node_modules/.pnpm/split2@4.2.0/node_modules/split2/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
1286
1067
|
"use strict";
|
|
1287
1068
|
const { Transform } = __webpack_require__("stream");
|
|
1288
1069
|
const { StringDecoder } = __webpack_require__("string_decoder");
|
|
@@ -1370,7 +1151,7 @@ var __webpack_modules__ = {
|
|
|
1370
1151
|
}
|
|
1371
1152
|
module1.exports = split;
|
|
1372
1153
|
},
|
|
1373
|
-
"../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/index.js"
|
|
1154
|
+
"../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
1374
1155
|
"use strict";
|
|
1375
1156
|
const { version } = __webpack_require__("../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/package.json");
|
|
1376
1157
|
const { EventEmitter } = __webpack_require__("events");
|
|
@@ -1724,7 +1505,7 @@ var __webpack_modules__ = {
|
|
|
1724
1505
|
}
|
|
1725
1506
|
module1.exports = ThreadStream;
|
|
1726
1507
|
},
|
|
1727
|
-
"../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/lib/indexes.js"
|
|
1508
|
+
"../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/lib/indexes.js" (module1) {
|
|
1728
1509
|
"use strict";
|
|
1729
1510
|
const WRITE_INDEX = 4;
|
|
1730
1511
|
const READ_INDEX = 8;
|
|
@@ -1733,7 +1514,7 @@ var __webpack_modules__ = {
|
|
|
1733
1514
|
READ_INDEX
|
|
1734
1515
|
};
|
|
1735
1516
|
},
|
|
1736
|
-
"../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/lib/wait.js"
|
|
1517
|
+
"../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/lib/wait.js" (module1) {
|
|
1737
1518
|
"use strict";
|
|
1738
1519
|
const MAX_TIMEOUT = 1000;
|
|
1739
1520
|
function wait(state, index, expected, timeout, done) {
|
|
@@ -1771,67 +1552,71 @@ var __webpack_modules__ = {
|
|
|
1771
1552
|
waitDiff
|
|
1772
1553
|
};
|
|
1773
1554
|
},
|
|
1774
|
-
assert
|
|
1555
|
+
assert (module1) {
|
|
1775
1556
|
"use strict";
|
|
1776
1557
|
module1.exports = require("assert");
|
|
1777
1558
|
},
|
|
1778
|
-
buffer
|
|
1559
|
+
buffer (module1) {
|
|
1779
1560
|
"use strict";
|
|
1780
1561
|
module1.exports = require("buffer");
|
|
1781
1562
|
},
|
|
1782
|
-
events
|
|
1563
|
+
events (module1) {
|
|
1783
1564
|
"use strict";
|
|
1784
1565
|
module1.exports = require("events");
|
|
1785
1566
|
},
|
|
1786
|
-
fs
|
|
1567
|
+
fs (module1) {
|
|
1787
1568
|
"use strict";
|
|
1788
1569
|
module1.exports = require("fs");
|
|
1789
1570
|
},
|
|
1790
|
-
module
|
|
1571
|
+
module (module1) {
|
|
1791
1572
|
"use strict";
|
|
1792
1573
|
module1.exports = require("module");
|
|
1793
1574
|
},
|
|
1794
|
-
"node:
|
|
1575
|
+
"node:diagnostics_channel" (module1) {
|
|
1576
|
+
"use strict";
|
|
1577
|
+
module1.exports = require("node:diagnostics_channel");
|
|
1578
|
+
},
|
|
1579
|
+
"node:events" (module1) {
|
|
1795
1580
|
"use strict";
|
|
1796
1581
|
module1.exports = require("node:events");
|
|
1797
1582
|
},
|
|
1798
|
-
"node:os"
|
|
1583
|
+
"node:os" (module1) {
|
|
1799
1584
|
"use strict";
|
|
1800
1585
|
module1.exports = require("node:os");
|
|
1801
1586
|
},
|
|
1802
|
-
"node:path"
|
|
1587
|
+
"node:path" (module1) {
|
|
1803
1588
|
"use strict";
|
|
1804
1589
|
module1.exports = require("node:path");
|
|
1805
1590
|
},
|
|
1806
|
-
"node:stream"
|
|
1591
|
+
"node:stream" (module1) {
|
|
1807
1592
|
"use strict";
|
|
1808
1593
|
module1.exports = require("node:stream");
|
|
1809
1594
|
},
|
|
1810
|
-
path
|
|
1595
|
+
path (module1) {
|
|
1811
1596
|
"use strict";
|
|
1812
1597
|
module1.exports = require("path");
|
|
1813
1598
|
},
|
|
1814
|
-
stream
|
|
1599
|
+
stream (module1) {
|
|
1815
1600
|
"use strict";
|
|
1816
1601
|
module1.exports = require("stream");
|
|
1817
1602
|
},
|
|
1818
|
-
string_decoder
|
|
1603
|
+
string_decoder (module1) {
|
|
1819
1604
|
"use strict";
|
|
1820
1605
|
module1.exports = require("string_decoder");
|
|
1821
1606
|
},
|
|
1822
|
-
url
|
|
1607
|
+
url (module1) {
|
|
1823
1608
|
"use strict";
|
|
1824
1609
|
module1.exports = require("url");
|
|
1825
1610
|
},
|
|
1826
|
-
util
|
|
1611
|
+
util (module1) {
|
|
1827
1612
|
"use strict";
|
|
1828
1613
|
module1.exports = require("util");
|
|
1829
1614
|
},
|
|
1830
|
-
worker_threads
|
|
1615
|
+
worker_threads (module1) {
|
|
1831
1616
|
"use strict";
|
|
1832
1617
|
module1.exports = require("worker_threads");
|
|
1833
1618
|
},
|
|
1834
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/index.js"
|
|
1619
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
1835
1620
|
"use strict";
|
|
1836
1621
|
const errSerializer = __webpack_require__("../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err.js");
|
|
1837
1622
|
const errWithCauseSerializer = __webpack_require__("../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-with-cause.js");
|
|
@@ -1864,7 +1649,7 @@ var __webpack_modules__ = {
|
|
|
1864
1649
|
}
|
|
1865
1650
|
};
|
|
1866
1651
|
},
|
|
1867
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-helpers.js"
|
|
1652
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-helpers.js" (module1) {
|
|
1868
1653
|
"use strict";
|
|
1869
1654
|
const isErrorLike = (err)=>err && 'string' == typeof err.message;
|
|
1870
1655
|
const getErrorCause = (err)=>{
|
|
@@ -1906,7 +1691,7 @@ var __webpack_modules__ = {
|
|
|
1906
1691
|
messageWithCauses
|
|
1907
1692
|
};
|
|
1908
1693
|
},
|
|
1909
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-proto.js"
|
|
1694
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-proto.js" (module1) {
|
|
1910
1695
|
"use strict";
|
|
1911
1696
|
const seen = Symbol('circular-ref-tag');
|
|
1912
1697
|
const rawSymbol = Symbol('pino-raw-err-ref');
|
|
@@ -1953,7 +1738,7 @@ var __webpack_modules__ = {
|
|
|
1953
1738
|
}
|
|
1954
1739
|
};
|
|
1955
1740
|
},
|
|
1956
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-with-cause.js"
|
|
1741
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-with-cause.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
1957
1742
|
"use strict";
|
|
1958
1743
|
module1.exports = errWithCauseSerializer;
|
|
1959
1744
|
const { isErrorLike } = __webpack_require__("../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-helpers.js");
|
|
@@ -1980,7 +1765,7 @@ var __webpack_modules__ = {
|
|
|
1980
1765
|
return _err;
|
|
1981
1766
|
}
|
|
1982
1767
|
},
|
|
1983
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err.js"
|
|
1768
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
1984
1769
|
"use strict";
|
|
1985
1770
|
module1.exports = errSerializer;
|
|
1986
1771
|
const { messageWithCauses, stackWithCauses, isErrorLike } = __webpack_require__("../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-helpers.js");
|
|
@@ -2006,7 +1791,7 @@ var __webpack_modules__ = {
|
|
|
2006
1791
|
return _err;
|
|
2007
1792
|
}
|
|
2008
1793
|
},
|
|
2009
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/req.js"
|
|
1794
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/req.js" (module1) {
|
|
2010
1795
|
"use strict";
|
|
2011
1796
|
module1.exports = {
|
|
2012
1797
|
mapHttpRequest,
|
|
@@ -2092,7 +1877,7 @@ var __webpack_modules__ = {
|
|
|
2092
1877
|
};
|
|
2093
1878
|
}
|
|
2094
1879
|
},
|
|
2095
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/res.js"
|
|
1880
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/res.js" (module1) {
|
|
2096
1881
|
"use strict";
|
|
2097
1882
|
module1.exports = {
|
|
2098
1883
|
mapHttpResponse,
|
|
@@ -2137,7 +1922,7 @@ var __webpack_modules__ = {
|
|
|
2137
1922
|
};
|
|
2138
1923
|
}
|
|
2139
1924
|
},
|
|
2140
|
-
"../../node_modules/.pnpm/pino@
|
|
1925
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/caller.js" (module1) {
|
|
2141
1926
|
"use strict";
|
|
2142
1927
|
function noOpPrepareStackTrace(_, stack) {
|
|
2143
1928
|
return stack;
|
|
@@ -2154,7 +1939,7 @@ var __webpack_modules__ = {
|
|
|
2154
1939
|
return fileNames;
|
|
2155
1940
|
};
|
|
2156
1941
|
},
|
|
2157
|
-
"../../node_modules/.pnpm/pino@
|
|
1942
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/constants.js" (module1) {
|
|
2158
1943
|
const DEFAULT_LEVELS = {
|
|
2159
1944
|
trace: 10,
|
|
2160
1945
|
debug: 20,
|
|
@@ -2172,11 +1957,11 @@ var __webpack_modules__ = {
|
|
|
2172
1957
|
SORTING_ORDER
|
|
2173
1958
|
};
|
|
2174
1959
|
},
|
|
2175
|
-
"../../node_modules/.pnpm/pino@
|
|
1960
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/levels.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
2176
1961
|
"use strict";
|
|
2177
|
-
const { lsCacheSym, levelValSym, useOnlyCustomLevelsSym, streamSym, formattersSym, hooksSym, levelCompSym } = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
2178
|
-
const { noop, genLog } = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
2179
|
-
const { DEFAULT_LEVELS, SORTING_ORDER } = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
1962
|
+
const { lsCacheSym, levelValSym, useOnlyCustomLevelsSym, streamSym, formattersSym, hooksSym, levelCompSym } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/symbols.js");
|
|
1963
|
+
const { noop, genLog } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/tools.js");
|
|
1964
|
+
const { DEFAULT_LEVELS, SORTING_ORDER } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/constants.js");
|
|
2180
1965
|
const levelMethods = {
|
|
2181
1966
|
fatal: (hook)=>{
|
|
2182
1967
|
const logFatal = genLog(DEFAULT_LEVELS.fatal, hook);
|
|
@@ -2324,19 +2109,18 @@ var __webpack_modules__ = {
|
|
|
2324
2109
|
assertLevelComparison
|
|
2325
2110
|
};
|
|
2326
2111
|
},
|
|
2327
|
-
"../../node_modules/.pnpm/pino@
|
|
2112
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/meta.js" (module1) {
|
|
2328
2113
|
"use strict";
|
|
2329
2114
|
module1.exports = {
|
|
2330
|
-
version: '
|
|
2115
|
+
version: '10.1.0'
|
|
2331
2116
|
};
|
|
2332
2117
|
},
|
|
2333
|
-
"../../node_modules/.pnpm/pino@
|
|
2118
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/multistream.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
2334
2119
|
"use strict";
|
|
2335
2120
|
const metadata = Symbol.for('pino.metadata');
|
|
2336
|
-
const { DEFAULT_LEVELS } = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
2121
|
+
const { DEFAULT_LEVELS } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/constants.js");
|
|
2337
2122
|
const DEFAULT_INFO_LEVEL = DEFAULT_LEVELS.info;
|
|
2338
2123
|
function multistream(streamsArray, opts) {
|
|
2339
|
-
let counter = 0;
|
|
2340
2124
|
streamsArray = streamsArray || [];
|
|
2341
2125
|
opts = opts || {
|
|
2342
2126
|
dedupe: false
|
|
@@ -2349,10 +2133,12 @@ var __webpack_modules__ = {
|
|
|
2349
2133
|
const res = {
|
|
2350
2134
|
write,
|
|
2351
2135
|
add,
|
|
2136
|
+
remove,
|
|
2352
2137
|
emit,
|
|
2353
2138
|
flushSync,
|
|
2354
2139
|
end,
|
|
2355
2140
|
minLevel: 0,
|
|
2141
|
+
lastId: 0,
|
|
2356
2142
|
streams: [],
|
|
2357
2143
|
clone,
|
|
2358
2144
|
[metadata]: true,
|
|
@@ -2404,13 +2190,23 @@ var __webpack_modules__ = {
|
|
|
2404
2190
|
stream: stream_,
|
|
2405
2191
|
level,
|
|
2406
2192
|
levelVal: void 0,
|
|
2407
|
-
id:
|
|
2193
|
+
id: ++res.lastId
|
|
2408
2194
|
};
|
|
2409
2195
|
streams.unshift(dest_);
|
|
2410
2196
|
streams.sort(compareByLevel);
|
|
2411
2197
|
this.minLevel = streams[0].level;
|
|
2412
2198
|
return res;
|
|
2413
2199
|
}
|
|
2200
|
+
function remove(id) {
|
|
2201
|
+
const { streams } = this;
|
|
2202
|
+
const index = streams.findIndex((s)=>s.id === id);
|
|
2203
|
+
if (index >= 0) {
|
|
2204
|
+
streams.splice(index, 1);
|
|
2205
|
+
streams.sort(compareByLevel);
|
|
2206
|
+
this.minLevel = streams.length > 0 ? streams[0].level : -1;
|
|
2207
|
+
}
|
|
2208
|
+
return res;
|
|
2209
|
+
}
|
|
2414
2210
|
function end() {
|
|
2415
2211
|
for (const { stream } of this.streams){
|
|
2416
2212
|
if ('function' == typeof stream.flushSync) stream.flushSync();
|
|
@@ -2426,6 +2222,7 @@ var __webpack_modules__ = {
|
|
|
2426
2222
|
return {
|
|
2427
2223
|
write,
|
|
2428
2224
|
add,
|
|
2225
|
+
remove,
|
|
2429
2226
|
minLevel: level,
|
|
2430
2227
|
streams,
|
|
2431
2228
|
clone,
|
|
@@ -2449,14 +2246,14 @@ var __webpack_modules__ = {
|
|
|
2449
2246
|
}
|
|
2450
2247
|
module1.exports = multistream;
|
|
2451
2248
|
},
|
|
2452
|
-
"../../node_modules/.pnpm/pino@
|
|
2249
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/proto.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
2453
2250
|
"use strict";
|
|
2454
2251
|
const { EventEmitter } = __webpack_require__("node:events");
|
|
2455
|
-
const { lsCacheSym, levelValSym, setLevelSym, getLevelSym, chindingsSym,
|
|
2456
|
-
const { getLevel, setLevel, isLevelEnabled, mappings, initialLsCache, genLsCache, assertNoLevelCollisions } = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
2457
|
-
const { asChindings, asJson, buildFormatters, stringify } = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
2458
|
-
const { version } = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
2459
|
-
const redaction = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
2252
|
+
const { lsCacheSym, levelValSym, setLevelSym, getLevelSym, chindingsSym, mixinSym, asJsonSym, writeSym, mixinMergeStrategySym, timeSym, timeSliceIndexSym, streamSym, serializersSym, formattersSym, errorKeySym, messageKeySym, useOnlyCustomLevelsSym, needsMetadataGsym, redactFmtSym, stringifySym, formatOptsSym, stringifiersSym, msgPrefixSym, hooksSym } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/symbols.js");
|
|
2253
|
+
const { getLevel, setLevel, isLevelEnabled, mappings, initialLsCache, genLsCache, assertNoLevelCollisions } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/levels.js");
|
|
2254
|
+
const { asChindings, asJson, buildFormatters, stringify, noop } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/tools.js");
|
|
2255
|
+
const { version } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/meta.js");
|
|
2256
|
+
const redaction = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/redaction.js");
|
|
2460
2257
|
const constructor = class {
|
|
2461
2258
|
};
|
|
2462
2259
|
const prototype = {
|
|
@@ -2479,6 +2276,12 @@ var __webpack_modules__ = {
|
|
|
2479
2276
|
set levelVal (n){
|
|
2480
2277
|
throw Error('levelVal is read-only');
|
|
2481
2278
|
},
|
|
2279
|
+
get msgPrefix () {
|
|
2280
|
+
return this[msgPrefixSym];
|
|
2281
|
+
},
|
|
2282
|
+
get [Symbol.toStringTag] () {
|
|
2283
|
+
return 'Pino';
|
|
2284
|
+
},
|
|
2482
2285
|
[lsCacheSym]: initialLsCache,
|
|
2483
2286
|
[writeSym]: write,
|
|
2484
2287
|
[asJsonSym]: asJson,
|
|
@@ -2492,10 +2295,15 @@ var __webpack_modules__ = {
|
|
|
2492
2295
|
const resetChildingsFormatter = (bindings)=>bindings;
|
|
2493
2296
|
function child(bindings, options) {
|
|
2494
2297
|
if (!bindings) throw Error('missing bindings for child Pino');
|
|
2495
|
-
options = options || {};
|
|
2496
2298
|
const serializers = this[serializersSym];
|
|
2497
2299
|
const formatters = this[formattersSym];
|
|
2498
2300
|
const instance = Object.create(this);
|
|
2301
|
+
if (null == options) {
|
|
2302
|
+
if (instance[formattersSym].bindings !== resetChildingsFormatter) instance[formattersSym] = buildFormatters(formatters.level, resetChildingsFormatter, formatters.log);
|
|
2303
|
+
instance[chindingsSym] = asChindings(instance, bindings);
|
|
2304
|
+
if (this.onChild !== noop) this.onChild(instance);
|
|
2305
|
+
return instance;
|
|
2306
|
+
}
|
|
2499
2307
|
if (true === options.hasOwnProperty('serializers')) {
|
|
2500
2308
|
instance[serializersSym] = Object.create(null);
|
|
2501
2309
|
for(const k in serializers)instance[serializersSym][k] = serializers[k];
|
|
@@ -2532,8 +2340,10 @@ var __webpack_modules__ = {
|
|
|
2532
2340
|
}
|
|
2533
2341
|
if ('string' == typeof options.msgPrefix) instance[msgPrefixSym] = (this[msgPrefixSym] || '') + options.msgPrefix;
|
|
2534
2342
|
instance[chindingsSym] = asChindings(instance, bindings);
|
|
2535
|
-
|
|
2536
|
-
|
|
2343
|
+
if (void 0 !== options.level && options.level !== this.level || options.hasOwnProperty('customLevels')) {
|
|
2344
|
+
const childLevel = options.level || this.level;
|
|
2345
|
+
instance[setLevelSym](childLevel);
|
|
2346
|
+
}
|
|
2537
2347
|
this.onChild(instance);
|
|
2538
2348
|
return instance;
|
|
2539
2349
|
}
|
|
@@ -2548,7 +2358,6 @@ var __webpack_modules__ = {
|
|
|
2548
2358
|
function setBindings(newBindings) {
|
|
2549
2359
|
const chindings = asChindings(this, newBindings);
|
|
2550
2360
|
this[chindingsSym] = chindings;
|
|
2551
|
-
delete this[parsedChindingsSym];
|
|
2552
2361
|
}
|
|
2553
2362
|
function defaultMixinMergeStrategy(mergeObject, mixinObject) {
|
|
2554
2363
|
return Object.assign(mixinObject, mergeObject);
|
|
@@ -2583,7 +2392,6 @@ var __webpack_modules__ = {
|
|
|
2583
2392
|
}
|
|
2584
2393
|
stream.write(streamWriteHook ? streamWriteHook(s) : s);
|
|
2585
2394
|
}
|
|
2586
|
-
function noop() {}
|
|
2587
2395
|
function flush(cb) {
|
|
2588
2396
|
if (null != cb && 'function' != typeof cb) throw Error('callback must be a function');
|
|
2589
2397
|
const stream = this[streamSym];
|
|
@@ -2591,19 +2399,15 @@ var __webpack_modules__ = {
|
|
|
2591
2399
|
else if (cb) cb();
|
|
2592
2400
|
}
|
|
2593
2401
|
},
|
|
2594
|
-
"../../node_modules/.pnpm/pino@
|
|
2402
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/redaction.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
2595
2403
|
"use strict";
|
|
2596
|
-
const
|
|
2597
|
-
const { redactFmtSym, wildcardFirstSym } = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
2598
|
-
const
|
|
2599
|
-
const validate = validator({
|
|
2600
|
-
ERR_PATHS_MUST_BE_STRINGS: ()=>'pino – redacted paths must be strings',
|
|
2601
|
-
ERR_INVALID_PATH: (s)=>`pino – redact paths array contains an invalid path (${s})`
|
|
2602
|
-
});
|
|
2404
|
+
const Redact = __webpack_require__("../../node_modules/.pnpm/@pinojs+redact@0.4.0/node_modules/@pinojs/redact/index.js");
|
|
2405
|
+
const { redactFmtSym, wildcardFirstSym } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/symbols.js");
|
|
2406
|
+
const rx = /[^.[\]]+|\[([^[\]]*?)\]/g;
|
|
2603
2407
|
const CENSOR = '[Redacted]';
|
|
2604
2408
|
const strict = false;
|
|
2605
2409
|
function redaction(opts, serialize) {
|
|
2606
|
-
const { paths, censor } = handle(opts);
|
|
2410
|
+
const { paths, censor, remove } = handle(opts);
|
|
2607
2411
|
const shape = paths.reduce((o, str)=>{
|
|
2608
2412
|
rx.lastIndex = 0;
|
|
2609
2413
|
const first = rx.exec(str);
|
|
@@ -2626,11 +2430,12 @@ var __webpack_modules__ = {
|
|
|
2626
2430
|
return o;
|
|
2627
2431
|
}, {});
|
|
2628
2432
|
const result = {
|
|
2629
|
-
[redactFmtSym]:
|
|
2433
|
+
[redactFmtSym]: Redact({
|
|
2630
2434
|
paths,
|
|
2631
2435
|
censor,
|
|
2632
2436
|
serialize,
|
|
2633
|
-
strict
|
|
2437
|
+
strict,
|
|
2438
|
+
remove
|
|
2634
2439
|
})
|
|
2635
2440
|
};
|
|
2636
2441
|
const topCensor = (...args)=>'function' == typeof censor ? serialize(censor(...args)) : serialize(censor);
|
|
@@ -2646,11 +2451,12 @@ var __webpack_modules__ = {
|
|
|
2646
2451
|
k,
|
|
2647
2452
|
...path
|
|
2648
2453
|
]) : censor;
|
|
2649
|
-
o[k] =
|
|
2454
|
+
o[k] = Redact({
|
|
2650
2455
|
paths: shape[k],
|
|
2651
2456
|
censor: wrappedCensor,
|
|
2652
2457
|
serialize,
|
|
2653
|
-
strict
|
|
2458
|
+
strict,
|
|
2459
|
+
remove
|
|
2654
2460
|
});
|
|
2655
2461
|
}
|
|
2656
2462
|
return o;
|
|
@@ -2662,24 +2468,20 @@ var __webpack_modules__ = {
|
|
|
2662
2468
|
paths: opts,
|
|
2663
2469
|
censor: CENSOR
|
|
2664
2470
|
};
|
|
2665
|
-
validate(opts);
|
|
2666
2471
|
return opts;
|
|
2667
2472
|
}
|
|
2668
2473
|
let { paths, censor = CENSOR, remove } = opts;
|
|
2669
2474
|
if (false === Array.isArray(paths)) throw Error('pino – redact must contain an array of strings');
|
|
2670
2475
|
if (true === remove) censor = void 0;
|
|
2671
|
-
validate({
|
|
2672
|
-
paths,
|
|
2673
|
-
censor
|
|
2674
|
-
});
|
|
2675
2476
|
return {
|
|
2676
2477
|
paths,
|
|
2677
|
-
censor
|
|
2478
|
+
censor,
|
|
2479
|
+
remove
|
|
2678
2480
|
};
|
|
2679
2481
|
}
|
|
2680
2482
|
module1.exports = redaction;
|
|
2681
2483
|
},
|
|
2682
|
-
"../../node_modules/.pnpm/pino@
|
|
2484
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/symbols.js" (module1) {
|
|
2683
2485
|
"use strict";
|
|
2684
2486
|
const setLevelSym = Symbol('pino.setLevel');
|
|
2685
2487
|
const getLevelSym = Symbol('pino.getLevel');
|
|
@@ -2746,28 +2548,50 @@ var __webpack_modules__ = {
|
|
|
2746
2548
|
msgPrefixSym
|
|
2747
2549
|
};
|
|
2748
2550
|
},
|
|
2749
|
-
"../../node_modules/.pnpm/pino@
|
|
2551
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/time.js" (module1) {
|
|
2750
2552
|
"use strict";
|
|
2751
2553
|
const nullTime = ()=>'';
|
|
2752
2554
|
const epochTime = ()=>`,"time":${Date.now()}`;
|
|
2753
2555
|
const unixTime = ()=>`,"time":${Math.round(Date.now() / 1000.0)}`;
|
|
2754
2556
|
const isoTime = ()=>`,"time":"${new Date(Date.now()).toISOString()}"`;
|
|
2557
|
+
const NS_PER_MS = 1000000n;
|
|
2558
|
+
const NS_PER_SEC = 1000000000n;
|
|
2559
|
+
const startWallTimeNs = BigInt(Date.now()) * NS_PER_MS;
|
|
2560
|
+
const startHrTime = process.hrtime.bigint();
|
|
2561
|
+
const isoTimeNano = ()=>{
|
|
2562
|
+
const elapsedNs = process.hrtime.bigint() - startHrTime;
|
|
2563
|
+
const currentTimeNs = startWallTimeNs + elapsedNs;
|
|
2564
|
+
const secondsSinceEpoch = currentTimeNs / NS_PER_SEC;
|
|
2565
|
+
const nanosWithinSecond = currentTimeNs % NS_PER_SEC;
|
|
2566
|
+
const msSinceEpoch = Number(1000n * secondsSinceEpoch + nanosWithinSecond / 1000000n);
|
|
2567
|
+
const date = new Date(msSinceEpoch);
|
|
2568
|
+
const year = date.getUTCFullYear();
|
|
2569
|
+
const month = (date.getUTCMonth() + 1).toString().padStart(2, '0');
|
|
2570
|
+
const day = date.getUTCDate().toString().padStart(2, '0');
|
|
2571
|
+
const hours = date.getUTCHours().toString().padStart(2, '0');
|
|
2572
|
+
const minutes = date.getUTCMinutes().toString().padStart(2, '0');
|
|
2573
|
+
const seconds = date.getUTCSeconds().toString().padStart(2, '0');
|
|
2574
|
+
return `,"time":"${year}-${month}-${day}T${hours}:${minutes}:${seconds}.${nanosWithinSecond.toString().padStart(9, '0')}Z"`;
|
|
2575
|
+
};
|
|
2755
2576
|
module1.exports = {
|
|
2756
2577
|
nullTime,
|
|
2757
2578
|
epochTime,
|
|
2758
2579
|
unixTime,
|
|
2759
|
-
isoTime
|
|
2580
|
+
isoTime,
|
|
2581
|
+
isoTimeNano
|
|
2760
2582
|
};
|
|
2761
2583
|
},
|
|
2762
|
-
"../../node_modules/.pnpm/pino@
|
|
2584
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/tools.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
2763
2585
|
"use strict";
|
|
2586
|
+
const diagChan = __webpack_require__("node:diagnostics_channel");
|
|
2764
2587
|
const format = __webpack_require__("../../node_modules/.pnpm/quick-format-unescaped@4.0.4/node_modules/quick-format-unescaped/index.js");
|
|
2765
2588
|
const { mapHttpRequest, mapHttpResponse } = __webpack_require__("../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/index.js");
|
|
2766
2589
|
const SonicBoom = __webpack_require__("../../node_modules/.pnpm/sonic-boom@4.2.0/node_modules/sonic-boom/index.js");
|
|
2767
2590
|
const onExit = __webpack_require__("../../node_modules/.pnpm/on-exit-leak-free@2.1.2/node_modules/on-exit-leak-free/index.js");
|
|
2768
|
-
const { lsCacheSym, chindingsSym, writeSym, serializersSym, formatOptsSym, endSym, stringifiersSym, stringifySym, stringifySafeSym, wildcardFirstSym, nestedKeySym, formattersSym, messageKeySym, errorKeySym, nestedKeyStrSym, msgPrefixSym } = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
2591
|
+
const { lsCacheSym, chindingsSym, writeSym, serializersSym, formatOptsSym, endSym, stringifiersSym, stringifySym, stringifySafeSym, wildcardFirstSym, nestedKeySym, formattersSym, messageKeySym, errorKeySym, nestedKeyStrSym, msgPrefixSym } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/symbols.js");
|
|
2769
2592
|
const { isMainThread } = __webpack_require__("worker_threads");
|
|
2770
|
-
const transport = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
2593
|
+
const transport = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/transport.js");
|
|
2594
|
+
const asJsonChan = diagChan.tracingChannel('pino_asJson');
|
|
2771
2595
|
function noop() {}
|
|
2772
2596
|
function genLog(level, hook) {
|
|
2773
2597
|
if (!hook) return LOG;
|
|
@@ -2818,6 +2642,14 @@ var __webpack_modules__ = {
|
|
|
2818
2642
|
return point < 32 ? JSON.stringify(str) : '"' + result + '"';
|
|
2819
2643
|
}
|
|
2820
2644
|
function asJson(obj, msg, num, time) {
|
|
2645
|
+
if (false === asJsonChan.hasSubscribers) return _asJson.call(this, obj, msg, num, time);
|
|
2646
|
+
const store = {
|
|
2647
|
+
instance: this,
|
|
2648
|
+
arguments
|
|
2649
|
+
};
|
|
2650
|
+
return asJsonChan.traceSync(_asJson, store, this, obj, msg, num, time);
|
|
2651
|
+
}
|
|
2652
|
+
function _asJson(obj, msg, num, time) {
|
|
2821
2653
|
const stringify = this[stringifySym];
|
|
2822
2654
|
const stringifySafe = this[stringifySafeSym];
|
|
2823
2655
|
const stringifiers = this[stringifiersSym];
|
|
@@ -2896,7 +2728,7 @@ var __webpack_modules__ = {
|
|
|
2896
2728
|
bindings = formatter(bindings);
|
|
2897
2729
|
for(const key in bindings){
|
|
2898
2730
|
value = bindings[key];
|
|
2899
|
-
const valid = 'level' !== key && 'serializers' !== key && 'formatters' !== key && 'customLevels' !== key && bindings.hasOwnProperty(key) && void 0 !== value;
|
|
2731
|
+
const valid = (key.length < 5 || 'level' !== key && 'serializers' !== key && 'formatters' !== key && 'customLevels' !== key) && bindings.hasOwnProperty(key) && void 0 !== value;
|
|
2900
2732
|
if (true === valid) {
|
|
2901
2733
|
value = serializers[key] ? serializers[key](value) : value;
|
|
2902
2734
|
value = (stringifiers[key] || wildcardStringifier || stringify)(value, stringifySafe);
|
|
@@ -3019,7 +2851,7 @@ var __webpack_modules__ = {
|
|
|
3019
2851
|
normalizeDestFileDescriptor
|
|
3020
2852
|
};
|
|
3021
2853
|
},
|
|
3022
|
-
"../../node_modules/.pnpm/pino@
|
|
2854
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/transport-stream.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
3023
2855
|
"use strict";
|
|
3024
2856
|
const { realImport, realRequire } = __webpack_require__("../../node_modules/.pnpm/real-require@0.2.0/node_modules/real-require/src/index.js");
|
|
3025
2857
|
module1.exports = loadTransportStreamBuilder;
|
|
@@ -3047,10 +2879,10 @@ var __webpack_modules__ = {
|
|
|
3047
2879
|
return fn;
|
|
3048
2880
|
}
|
|
3049
2881
|
},
|
|
3050
|
-
"../../node_modules/.pnpm/pino@
|
|
2882
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/transport.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
3051
2883
|
"use strict";
|
|
3052
2884
|
const { createRequire } = __webpack_require__("module");
|
|
3053
|
-
const getCallers = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
2885
|
+
const getCallers = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/caller.js");
|
|
3054
2886
|
const { join, isAbsolute, sep } = __webpack_require__("node:path");
|
|
3055
2887
|
const sleep = __webpack_require__("../../node_modules/.pnpm/atomic-sleep@1.0.0/node_modules/atomic-sleep/index.js");
|
|
3056
2888
|
const onExit = __webpack_require__("../../node_modules/.pnpm/on-exit-leak-free@2.1.2/node_modules/on-exit-leak-free/index.js");
|
|
@@ -3151,20 +2983,103 @@ var __webpack_modules__ = {
|
|
|
3151
2983
|
}
|
|
3152
2984
|
module1.exports = transport;
|
|
3153
2985
|
},
|
|
3154
|
-
"../../node_modules/.pnpm/pino@
|
|
2986
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/worker.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
2987
|
+
"use strict";
|
|
2988
|
+
const EE = __webpack_require__("node:events");
|
|
2989
|
+
const { pipeline, PassThrough } = __webpack_require__("node:stream");
|
|
2990
|
+
const pino = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/pino.js");
|
|
2991
|
+
const build = __webpack_require__("../../node_modules/.pnpm/pino-abstract-transport@2.0.0/node_modules/pino-abstract-transport/index.js");
|
|
2992
|
+
const loadTransportStreamBuilder = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/transport-stream.js");
|
|
2993
|
+
module1.exports = async function({ targets, pipelines, levels, dedupe }) {
|
|
2994
|
+
const targetStreams = [];
|
|
2995
|
+
if (targets && targets.length) {
|
|
2996
|
+
targets = await Promise.all(targets.map(async (t)=>{
|
|
2997
|
+
const fn = await loadTransportStreamBuilder(t.target);
|
|
2998
|
+
const stream = await fn(t.options);
|
|
2999
|
+
return {
|
|
3000
|
+
level: t.level,
|
|
3001
|
+
stream
|
|
3002
|
+
};
|
|
3003
|
+
}));
|
|
3004
|
+
targetStreams.push(...targets);
|
|
3005
|
+
}
|
|
3006
|
+
if (pipelines && pipelines.length) {
|
|
3007
|
+
pipelines = await Promise.all(pipelines.map(async (p)=>{
|
|
3008
|
+
let level;
|
|
3009
|
+
const pipeDests = await Promise.all(p.map(async (t)=>{
|
|
3010
|
+
level = t.level;
|
|
3011
|
+
const fn = await loadTransportStreamBuilder(t.target);
|
|
3012
|
+
const stream = await fn(t.options);
|
|
3013
|
+
return stream;
|
|
3014
|
+
}));
|
|
3015
|
+
return {
|
|
3016
|
+
level,
|
|
3017
|
+
stream: createPipeline(pipeDests)
|
|
3018
|
+
};
|
|
3019
|
+
}));
|
|
3020
|
+
targetStreams.push(...pipelines);
|
|
3021
|
+
}
|
|
3022
|
+
if (1 === targetStreams.length) return targetStreams[0].stream;
|
|
3023
|
+
return build(process1, {
|
|
3024
|
+
parse: 'lines',
|
|
3025
|
+
metadata: true,
|
|
3026
|
+
close (err, cb) {
|
|
3027
|
+
let expected = 0;
|
|
3028
|
+
for (const transport of targetStreams){
|
|
3029
|
+
expected++;
|
|
3030
|
+
transport.stream.on('close', closeCb);
|
|
3031
|
+
transport.stream.end();
|
|
3032
|
+
}
|
|
3033
|
+
function closeCb() {
|
|
3034
|
+
if (0 === --expected) cb(err);
|
|
3035
|
+
}
|
|
3036
|
+
}
|
|
3037
|
+
});
|
|
3038
|
+
function process1(stream) {
|
|
3039
|
+
const multi = pino.multistream(targetStreams, {
|
|
3040
|
+
levels,
|
|
3041
|
+
dedupe
|
|
3042
|
+
});
|
|
3043
|
+
stream.on('data', function(chunk) {
|
|
3044
|
+
const { lastTime, lastMsg, lastObj, lastLevel } = this;
|
|
3045
|
+
multi.lastLevel = lastLevel;
|
|
3046
|
+
multi.lastTime = lastTime;
|
|
3047
|
+
multi.lastMsg = lastMsg;
|
|
3048
|
+
multi.lastObj = lastObj;
|
|
3049
|
+
multi.write(chunk + '\n');
|
|
3050
|
+
});
|
|
3051
|
+
}
|
|
3052
|
+
function createPipeline(streams) {
|
|
3053
|
+
const ee = new EE();
|
|
3054
|
+
const stream = new PassThrough({
|
|
3055
|
+
autoDestroy: true,
|
|
3056
|
+
destroy (_, cb) {
|
|
3057
|
+
ee.on('error', cb);
|
|
3058
|
+
ee.on('closed', cb);
|
|
3059
|
+
}
|
|
3060
|
+
});
|
|
3061
|
+
pipeline(stream, ...streams, function(err) {
|
|
3062
|
+
if (err && 'ERR_STREAM_PREMATURE_CLOSE' !== err.code) return void ee.emit('error', err);
|
|
3063
|
+
ee.emit('closed');
|
|
3064
|
+
});
|
|
3065
|
+
return stream;
|
|
3066
|
+
}
|
|
3067
|
+
};
|
|
3068
|
+
},
|
|
3069
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/pino.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
3155
3070
|
"use strict";
|
|
3156
3071
|
const os = __webpack_require__("node:os");
|
|
3157
3072
|
const stdSerializers = __webpack_require__("../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/index.js");
|
|
3158
|
-
const caller = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
3159
|
-
const redaction = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
3160
|
-
const time = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
3161
|
-
const proto = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
3162
|
-
const symbols = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
3073
|
+
const caller = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/caller.js");
|
|
3074
|
+
const redaction = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/redaction.js");
|
|
3075
|
+
const time = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/time.js");
|
|
3076
|
+
const proto = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/proto.js");
|
|
3077
|
+
const symbols = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/symbols.js");
|
|
3163
3078
|
const { configure } = __webpack_require__("../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/index.js");
|
|
3164
|
-
const { assertDefaultLevelFound, mappings, genLsCache, genLevelComparison, assertLevelComparison } = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
3165
|
-
const { DEFAULT_LEVELS, SORTING_ORDER } = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
3166
|
-
const { createArgsNormalizer, asChindings, buildSafeSonicBoom, buildFormatters, stringify, normalizeDestFileDescriptor, noop } = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
3167
|
-
const { version } = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
3079
|
+
const { assertDefaultLevelFound, mappings, genLsCache, genLevelComparison, assertLevelComparison } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/levels.js");
|
|
3080
|
+
const { DEFAULT_LEVELS, SORTING_ORDER } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/constants.js");
|
|
3081
|
+
const { createArgsNormalizer, asChindings, buildSafeSonicBoom, buildFormatters, stringify, normalizeDestFileDescriptor, noop } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/tools.js");
|
|
3082
|
+
const { version } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/meta.js");
|
|
3168
3083
|
const { chindingsSym, redactFmtSym, serializersSym, timeSym, timeSliceIndexSym, streamSym, stringifySym, stringifySafeSym, stringifiersSym, setLevelSym, endSym, formatOptsSym, messageKeySym, errorKeySym, nestedKeySym, mixinSym, levelCompSym, useOnlyCustomLevelsSym, formattersSym, hooksSym, nestedKeyStrSym, mixinMergeStrategySym, msgPrefixSym } = symbols;
|
|
3169
3084
|
const { epochTime, nullTime } = time;
|
|
3170
3085
|
const { pid } = process;
|
|
@@ -3298,8 +3213,8 @@ var __webpack_modules__ = {
|
|
|
3298
3213
|
dest.dest = normalizeDestFileDescriptor(dest.dest || process.stdout.fd);
|
|
3299
3214
|
return buildSafeSonicBoom(dest);
|
|
3300
3215
|
};
|
|
3301
|
-
module1.exports.transport = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
3302
|
-
module1.exports.multistream = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
3216
|
+
module1.exports.transport = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/transport.js");
|
|
3217
|
+
module1.exports.multistream = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/multistream.js");
|
|
3303
3218
|
module1.exports.levels = mappings();
|
|
3304
3219
|
module1.exports.stdSerializers = serializers;
|
|
3305
3220
|
module1.exports.stdTimeFunctions = Object.assign({}, time);
|
|
@@ -3308,7 +3223,7 @@ var __webpack_modules__ = {
|
|
|
3308
3223
|
module1.exports["default"] = pino;
|
|
3309
3224
|
module1.exports.pino = pino;
|
|
3310
3225
|
},
|
|
3311
|
-
"../../node_modules/.pnpm/sonic-boom@4.2.0/node_modules/sonic-boom/index.js"
|
|
3226
|
+
"../../node_modules/.pnpm/sonic-boom@4.2.0/node_modules/sonic-boom/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
3312
3227
|
"use strict";
|
|
3313
3228
|
const fs = __webpack_require__("fs");
|
|
3314
3229
|
const EventEmitter = __webpack_require__("events");
|
|
@@ -3733,90 +3648,7 @@ var __webpack_modules__ = {
|
|
|
3733
3648
|
SonicBoom.default = SonicBoom;
|
|
3734
3649
|
module1.exports = SonicBoom;
|
|
3735
3650
|
},
|
|
3736
|
-
"../../node_modules/.pnpm/
|
|
3737
|
-
"use strict";
|
|
3738
|
-
const EE = __webpack_require__("node:events");
|
|
3739
|
-
const { pipeline, PassThrough } = __webpack_require__("node:stream");
|
|
3740
|
-
const pino = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/pino.js");
|
|
3741
|
-
const build = __webpack_require__("../../node_modules/.pnpm/pino-abstract-transport@2.0.0/node_modules/pino-abstract-transport/index.js");
|
|
3742
|
-
const loadTransportStreamBuilder = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/transport-stream.js");
|
|
3743
|
-
module1.exports = async function({ targets, pipelines, levels, dedupe }) {
|
|
3744
|
-
const targetStreams = [];
|
|
3745
|
-
if (targets && targets.length) {
|
|
3746
|
-
targets = await Promise.all(targets.map(async (t)=>{
|
|
3747
|
-
const fn = await loadTransportStreamBuilder(t.target);
|
|
3748
|
-
const stream = await fn(t.options);
|
|
3749
|
-
return {
|
|
3750
|
-
level: t.level,
|
|
3751
|
-
stream
|
|
3752
|
-
};
|
|
3753
|
-
}));
|
|
3754
|
-
targetStreams.push(...targets);
|
|
3755
|
-
}
|
|
3756
|
-
if (pipelines && pipelines.length) {
|
|
3757
|
-
pipelines = await Promise.all(pipelines.map(async (p)=>{
|
|
3758
|
-
let level;
|
|
3759
|
-
const pipeDests = await Promise.all(p.map(async (t)=>{
|
|
3760
|
-
level = t.level;
|
|
3761
|
-
const fn = await loadTransportStreamBuilder(t.target);
|
|
3762
|
-
const stream = await fn(t.options);
|
|
3763
|
-
return stream;
|
|
3764
|
-
}));
|
|
3765
|
-
return {
|
|
3766
|
-
level,
|
|
3767
|
-
stream: createPipeline(pipeDests)
|
|
3768
|
-
};
|
|
3769
|
-
}));
|
|
3770
|
-
targetStreams.push(...pipelines);
|
|
3771
|
-
}
|
|
3772
|
-
if (1 === targetStreams.length) return targetStreams[0].stream;
|
|
3773
|
-
return build(process1, {
|
|
3774
|
-
parse: 'lines',
|
|
3775
|
-
metadata: true,
|
|
3776
|
-
close (err, cb) {
|
|
3777
|
-
let expected = 0;
|
|
3778
|
-
for (const transport of targetStreams){
|
|
3779
|
-
expected++;
|
|
3780
|
-
transport.stream.on('close', closeCb);
|
|
3781
|
-
transport.stream.end();
|
|
3782
|
-
}
|
|
3783
|
-
function closeCb() {
|
|
3784
|
-
if (0 === --expected) cb(err);
|
|
3785
|
-
}
|
|
3786
|
-
}
|
|
3787
|
-
});
|
|
3788
|
-
function process1(stream) {
|
|
3789
|
-
const multi = pino.multistream(targetStreams, {
|
|
3790
|
-
levels,
|
|
3791
|
-
dedupe
|
|
3792
|
-
});
|
|
3793
|
-
stream.on('data', function(chunk) {
|
|
3794
|
-
const { lastTime, lastMsg, lastObj, lastLevel } = this;
|
|
3795
|
-
multi.lastLevel = lastLevel;
|
|
3796
|
-
multi.lastTime = lastTime;
|
|
3797
|
-
multi.lastMsg = lastMsg;
|
|
3798
|
-
multi.lastObj = lastObj;
|
|
3799
|
-
multi.write(chunk + '\n');
|
|
3800
|
-
});
|
|
3801
|
-
}
|
|
3802
|
-
function createPipeline(streams) {
|
|
3803
|
-
const ee = new EE();
|
|
3804
|
-
const stream = new PassThrough({
|
|
3805
|
-
autoDestroy: true,
|
|
3806
|
-
destroy (_, cb) {
|
|
3807
|
-
ee.on('error', cb);
|
|
3808
|
-
ee.on('closed', cb);
|
|
3809
|
-
}
|
|
3810
|
-
});
|
|
3811
|
-
pipeline(stream, ...streams, function(err) {
|
|
3812
|
-
if (err && 'ERR_STREAM_PREMATURE_CLOSE' !== err.code) return void ee.emit('error', err);
|
|
3813
|
-
ee.emit('closed');
|
|
3814
|
-
});
|
|
3815
|
-
return stream;
|
|
3816
|
-
}
|
|
3817
|
-
};
|
|
3818
|
-
},
|
|
3819
|
-
"../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/package.json": function(module1) {
|
|
3651
|
+
"../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/package.json" (module1) {
|
|
3820
3652
|
"use strict";
|
|
3821
3653
|
module1.exports = JSON.parse('{"name":"thread-stream","version":"3.1.0","description":"A streaming way to send data to a Node.js Worker Thread","main":"index.js","types":"index.d.ts","dependencies":{"real-require":"^0.2.0"},"devDependencies":{"@types/node":"^20.1.0","@types/tap":"^15.0.0","@yao-pkg/pkg":"^5.11.5","desm":"^1.3.0","fastbench":"^1.0.1","husky":"^9.0.6","pino-elasticsearch":"^8.0.0","sonic-boom":"^4.0.1","standard":"^17.0.0","tap":"^16.2.0","ts-node":"^10.8.0","typescript":"^5.3.2","why-is-node-running":"^2.2.2"},"scripts":{"build":"tsc --noEmit","test":"standard && npm run build && npm run transpile && tap \\"test/**/*.test.*js\\" && tap --ts test/*.test.*ts","test:ci":"standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts","test:ci:js":"tap --no-check-coverage --timeout=120 --coverage-report=lcovonly \\"test/**/*.test.*js\\"","test:ci:ts":"tap --ts --no-check-coverage --coverage-report=lcovonly \\"test/**/*.test.*ts\\"","test:yarn":"npm run transpile && tap \\"test/**/*.test.js\\" --no-check-coverage","transpile":"sh ./test/ts/transpile.sh","prepare":"husky install"},"standard":{"ignore":["test/ts/**/*","test/syntax-error.mjs"]},"repository":{"type":"git","url":"git+https://github.com/mcollina/thread-stream.git"},"keywords":["worker","thread","threads","stream"],"author":"Matteo Collina <hello@matteocollina.com>","license":"MIT","bugs":{"url":"https://github.com/mcollina/thread-stream/issues"},"homepage":"https://github.com/mcollina/thread-stream#readme"}');
|
|
3822
3654
|
}
|
|
@@ -3831,5 +3663,5 @@ function __webpack_require__(moduleId) {
|
|
|
3831
3663
|
__webpack_modules__[moduleId](module1, module1.exports, __webpack_require__);
|
|
3832
3664
|
return module1.exports;
|
|
3833
3665
|
}
|
|
3834
|
-
var __webpack_exports__ = __webpack_require__("../../node_modules/.pnpm/pino@
|
|
3666
|
+
var __webpack_exports__ = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/worker.js");
|
|
3835
3667
|
module.exports = __webpack_exports__;
|