@rife/logger 0.0.6-beta.10 → 0.0.6-beta.11

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.
@@ -1,4 +1,302 @@
1
1
  var __webpack_modules__ = {
2
+ "../../node_modules/.pnpm/@pinojs+redact@0.4.0/node_modules/@pinojs/redact/index.js": function(module1) {
3
+ "use strict";
4
+ function deepClone(obj) {
5
+ if (null === obj || 'object' != typeof obj) return obj;
6
+ if (obj instanceof Date) return new Date(obj.getTime());
7
+ if (obj instanceof Array) {
8
+ const cloned = [];
9
+ for(let i = 0; i < obj.length; i++)cloned[i] = deepClone(obj[i]);
10
+ return cloned;
11
+ }
12
+ if ('object' == typeof obj) {
13
+ const cloned = Object.create(Object.getPrototypeOf(obj));
14
+ for(const key in obj)if (Object.prototype.hasOwnProperty.call(obj, key)) cloned[key] = deepClone(obj[key]);
15
+ return cloned;
16
+ }
17
+ return obj;
18
+ }
19
+ function parsePath(path) {
20
+ const parts = [];
21
+ let current = '';
22
+ let inBrackets = false;
23
+ let inQuotes = false;
24
+ let quoteChar = '';
25
+ for(let i = 0; i < path.length; i++){
26
+ const char = path[i];
27
+ if (inBrackets || '.' !== char) if ('[' === char) {
28
+ if (current) {
29
+ parts.push(current);
30
+ current = '';
31
+ }
32
+ inBrackets = true;
33
+ } else if (']' === char && inBrackets) {
34
+ parts.push(current);
35
+ current = '';
36
+ inBrackets = false;
37
+ inQuotes = false;
38
+ } else if (('"' === char || "'" === char) && inBrackets) if (inQuotes) if (char === quoteChar) {
39
+ inQuotes = false;
40
+ quoteChar = '';
41
+ } else current += char;
42
+ else {
43
+ inQuotes = true;
44
+ quoteChar = char;
45
+ }
46
+ else current += char;
47
+ else if (current) {
48
+ parts.push(current);
49
+ current = '';
50
+ }
51
+ }
52
+ if (current) parts.push(current);
53
+ return parts;
54
+ }
55
+ function setValue(obj, parts, value) {
56
+ let current = obj;
57
+ for(let i = 0; i < parts.length - 1; i++){
58
+ const key = parts[i];
59
+ if ('object' != typeof current || null === current || !(key in current)) return false;
60
+ if ('object' != typeof current[key] || null === current[key]) return false;
61
+ current = current[key];
62
+ }
63
+ const lastKey = parts[parts.length - 1];
64
+ if ('*' === lastKey) {
65
+ if (Array.isArray(current)) for(let i = 0; i < current.length; i++)current[i] = value;
66
+ else if ('object' == typeof current && null !== current) {
67
+ for(const key in current)if (Object.prototype.hasOwnProperty.call(current, key)) current[key] = value;
68
+ }
69
+ } else if ('object' == typeof current && null !== current && lastKey in current && Object.prototype.hasOwnProperty.call(current, lastKey)) current[lastKey] = value;
70
+ return true;
71
+ }
72
+ function removeKey(obj, parts) {
73
+ let current = obj;
74
+ for(let i = 0; i < parts.length - 1; i++){
75
+ const key = parts[i];
76
+ if ('object' != typeof current || null === current || !(key in current)) return false;
77
+ if ('object' != typeof current[key] || null === current[key]) return false;
78
+ current = current[key];
79
+ }
80
+ const lastKey = parts[parts.length - 1];
81
+ if ('*' === lastKey) {
82
+ if (Array.isArray(current)) for(let i = 0; i < current.length; i++)current[i] = void 0;
83
+ else if ('object' == typeof current && null !== current) {
84
+ for(const key in current)if (Object.prototype.hasOwnProperty.call(current, key)) delete current[key];
85
+ }
86
+ } else if ('object' == typeof current && null !== current && lastKey in current && Object.prototype.hasOwnProperty.call(current, lastKey)) delete current[lastKey];
87
+ return true;
88
+ }
89
+ const PATH_NOT_FOUND = Symbol('PATH_NOT_FOUND');
90
+ function getValueIfExists(obj, parts) {
91
+ let current = obj;
92
+ for (const part of parts){
93
+ if (null == current) return PATH_NOT_FOUND;
94
+ if ('object' != typeof current || null === current) return PATH_NOT_FOUND;
95
+ if (!(part in current)) return PATH_NOT_FOUND;
96
+ current = current[part];
97
+ }
98
+ return current;
99
+ }
100
+ function getValue(obj, parts) {
101
+ let current = obj;
102
+ for (const part of parts){
103
+ if (null == current) return;
104
+ if ('object' != typeof current || null === current) return;
105
+ current = current[part];
106
+ }
107
+ return current;
108
+ }
109
+ function redactPaths(obj, paths, censor, remove = false) {
110
+ for (const path of paths){
111
+ const parts = parsePath(path);
112
+ if (parts.includes('*')) redactWildcardPath(obj, parts, censor, path, remove);
113
+ else if (remove) removeKey(obj, parts);
114
+ else {
115
+ const value = getValueIfExists(obj, parts);
116
+ if (value === PATH_NOT_FOUND) continue;
117
+ const actualCensor = 'function' == typeof censor ? censor(value, parts) : censor;
118
+ setValue(obj, parts, actualCensor);
119
+ }
120
+ }
121
+ }
122
+ function redactWildcardPath(obj, parts, censor, originalPath, remove = false) {
123
+ const wildcardIndex = parts.indexOf('*');
124
+ if (wildcardIndex === parts.length - 1) {
125
+ const parentParts = parts.slice(0, -1);
126
+ let current = obj;
127
+ for (const part of parentParts){
128
+ if (null == current) return;
129
+ if ('object' != typeof current || null === current) return;
130
+ current = current[part];
131
+ }
132
+ if (Array.isArray(current)) if (remove) for(let i = 0; i < current.length; i++)current[i] = void 0;
133
+ else for(let i = 0; i < current.length; i++){
134
+ const indexPath = [
135
+ ...parentParts,
136
+ i.toString()
137
+ ];
138
+ const actualCensor = 'function' == typeof censor ? censor(current[i], indexPath) : censor;
139
+ current[i] = actualCensor;
140
+ }
141
+ else if ('object' == typeof current && null !== current) if (remove) {
142
+ const keysToDelete = [];
143
+ for(const key in current)if (Object.prototype.hasOwnProperty.call(current, key)) keysToDelete.push(key);
144
+ for (const key of keysToDelete)delete current[key];
145
+ } else for(const key in current){
146
+ const keyPath = [
147
+ ...parentParts,
148
+ key
149
+ ];
150
+ const actualCensor = 'function' == typeof censor ? censor(current[key], keyPath) : censor;
151
+ current[key] = actualCensor;
152
+ }
153
+ } else redactIntermediateWildcard(obj, parts, censor, wildcardIndex, originalPath, remove);
154
+ }
155
+ function redactIntermediateWildcard(obj, parts, censor, wildcardIndex, originalPath, remove = false) {
156
+ const beforeWildcard = parts.slice(0, wildcardIndex);
157
+ const afterWildcard = parts.slice(wildcardIndex + 1);
158
+ const pathArray = [];
159
+ function traverse(current, pathLength) {
160
+ if (pathLength === beforeWildcard.length) {
161
+ if (Array.isArray(current)) for(let i = 0; i < current.length; i++){
162
+ pathArray[pathLength] = i.toString();
163
+ traverse(current[i], pathLength + 1);
164
+ }
165
+ else if ('object' == typeof current && null !== current) for(const key in current){
166
+ pathArray[pathLength] = key;
167
+ traverse(current[key], pathLength + 1);
168
+ }
169
+ } else if (pathLength < beforeWildcard.length) {
170
+ const nextKey = beforeWildcard[pathLength];
171
+ if (current && 'object' == typeof current && null !== current && nextKey in current) {
172
+ pathArray[pathLength] = nextKey;
173
+ traverse(current[nextKey], pathLength + 1);
174
+ }
175
+ } else if (afterWildcard.includes('*')) {
176
+ const wrappedCensor = 'function' == typeof censor ? (value, path)=>{
177
+ const fullPath = [
178
+ ...pathArray.slice(0, pathLength),
179
+ ...path
180
+ ];
181
+ return censor(value, fullPath);
182
+ } : censor;
183
+ redactWildcardPath(current, afterWildcard, wrappedCensor, originalPath, remove);
184
+ } else if (remove) removeKey(current, afterWildcard);
185
+ else {
186
+ const actualCensor = 'function' == typeof censor ? censor(getValue(current, afterWildcard), [
187
+ ...pathArray.slice(0, pathLength),
188
+ ...afterWildcard
189
+ ]) : censor;
190
+ setValue(current, afterWildcard, actualCensor);
191
+ }
192
+ }
193
+ if (0 === beforeWildcard.length) traverse(obj, 0);
194
+ else {
195
+ let current = obj;
196
+ for(let i = 0; i < beforeWildcard.length; i++){
197
+ const part = beforeWildcard[i];
198
+ if (null == current) return;
199
+ if ('object' != typeof current || null === current) return;
200
+ current = current[part];
201
+ pathArray[i] = part;
202
+ }
203
+ if (null != current) traverse(current, beforeWildcard.length);
204
+ }
205
+ }
206
+ function buildPathStructure(pathsToClone) {
207
+ if (0 === pathsToClone.length) return null;
208
+ const pathStructure = new Map();
209
+ for (const path of pathsToClone){
210
+ const parts = parsePath(path);
211
+ let current = pathStructure;
212
+ for(let i = 0; i < parts.length; i++){
213
+ const part = parts[i];
214
+ if (!current.has(part)) current.set(part, new Map());
215
+ current = current.get(part);
216
+ }
217
+ }
218
+ return pathStructure;
219
+ }
220
+ function selectiveClone(obj, pathStructure) {
221
+ if (!pathStructure) return obj;
222
+ function cloneSelectively(source, pathMap, depth = 0) {
223
+ if (!pathMap || 0 === pathMap.size) return source;
224
+ if (null === source || 'object' != typeof source) return source;
225
+ if (source instanceof Date) return new Date(source.getTime());
226
+ if (Array.isArray(source)) {
227
+ const cloned = [];
228
+ for(let i = 0; i < source.length; i++){
229
+ const indexStr = i.toString();
230
+ if (pathMap.has(indexStr) || pathMap.has('*')) cloned[i] = cloneSelectively(source[i], pathMap.get(indexStr) || pathMap.get('*'));
231
+ else cloned[i] = source[i];
232
+ }
233
+ return cloned;
234
+ }
235
+ const cloned = Object.create(Object.getPrototypeOf(source));
236
+ 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('*'));
237
+ else cloned[key] = source[key];
238
+ return cloned;
239
+ }
240
+ return cloneSelectively(obj, pathStructure);
241
+ }
242
+ function validatePath(path) {
243
+ if ('string' != typeof path) throw new Error('Paths must be (non-empty) strings');
244
+ if ('' === path) throw new Error('Invalid redaction path ()');
245
+ if (path.includes('..')) throw new Error(`Invalid redaction path (${path})`);
246
+ if (path.includes(',')) throw new Error(`Invalid redaction path (${path})`);
247
+ let bracketCount = 0;
248
+ let inQuotes = false;
249
+ let quoteChar = '';
250
+ for(let i = 0; i < path.length; i++){
251
+ const char = path[i];
252
+ if (('"' === char || "'" === char) && bracketCount > 0) if (inQuotes) {
253
+ if (char === quoteChar) {
254
+ inQuotes = false;
255
+ quoteChar = '';
256
+ }
257
+ } else {
258
+ inQuotes = true;
259
+ quoteChar = char;
260
+ }
261
+ else if ('[' !== char || inQuotes) {
262
+ if (']' === char && !inQuotes) {
263
+ bracketCount--;
264
+ if (bracketCount < 0) throw new Error(`Invalid redaction path (${path})`);
265
+ }
266
+ } else bracketCount++;
267
+ }
268
+ if (0 !== bracketCount) throw new Error(`Invalid redaction path (${path})`);
269
+ }
270
+ function validatePaths(paths) {
271
+ if (!Array.isArray(paths)) throw new TypeError('paths must be an array');
272
+ for (const path of paths)validatePath(path);
273
+ }
274
+ function slowRedact(options = {}) {
275
+ const { paths = [], censor = '[REDACTED]', serialize = JSON.stringify, strict = true, remove = false } = options;
276
+ validatePaths(paths);
277
+ const pathStructure = buildPathStructure(paths);
278
+ return function(obj) {
279
+ if (strict && (null === obj || 'object' != typeof obj)) {
280
+ if (null == obj) return serialize ? serialize(obj) : obj;
281
+ if ('object' != typeof obj) return serialize ? serialize(obj) : obj;
282
+ }
283
+ const cloned = selectiveClone(obj, pathStructure);
284
+ const original = obj;
285
+ let actualCensor = censor;
286
+ if ('function' == typeof censor) actualCensor = censor;
287
+ redactPaths(cloned, paths, actualCensor, remove);
288
+ if (false === serialize) {
289
+ cloned.restore = function() {
290
+ return deepClone(original);
291
+ };
292
+ return cloned;
293
+ }
294
+ if ('function' == typeof serialize) return serialize(cloned);
295
+ return JSON.stringify(cloned);
296
+ };
297
+ }
298
+ module1.exports = slowRedact;
299
+ },
2
300
  "../../node_modules/.pnpm/atomic-sleep@1.0.0/node_modules/atomic-sleep/index.js": function(module1) {
3
301
  "use strict";
4
302
  if ('undefined' != typeof SharedArrayBuffer && 'undefined' != typeof Atomics) {
@@ -25,524 +323,6 @@ var __webpack_modules__ = {
25
323
  module1.exports = sleep1;
26
324
  }
27
325
  },
28
- "../../node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/index.js": function(module1, __unused_webpack_exports, __webpack_require__) {
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
326
  "../../node_modules/.pnpm/on-exit-leak-free@2.1.2/node_modules/on-exit-leak-free/index.js": function(module1) {
547
327
  "use strict";
548
328
  const refs = {
@@ -1586,6 +1366,10 @@ var __webpack_modules__ = {
1586
1366
  "use strict";
1587
1367
  module1.exports = require("module");
1588
1368
  },
1369
+ "node:diagnostics_channel": function(module1) {
1370
+ "use strict";
1371
+ module1.exports = require("node:diagnostics_channel");
1372
+ },
1589
1373
  "node:events": function(module1) {
1590
1374
  "use strict";
1591
1375
  module1.exports = require("node:events");
@@ -1614,6 +1398,21 @@ var __webpack_modules__ = {
1614
1398
  "use strict";
1615
1399
  module1.exports = require("worker_threads");
1616
1400
  },
1401
+ "../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/file.js": function(module1, __unused_webpack_exports, __webpack_require__) {
1402
+ "use strict";
1403
+ const pino = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/pino.js");
1404
+ const { once } = __webpack_require__("node:events");
1405
+ module1.exports = async function(opts = {}) {
1406
+ const destOpts = Object.assign({}, opts, {
1407
+ dest: opts.destination || 1,
1408
+ sync: false
1409
+ });
1410
+ delete destOpts.destination;
1411
+ const destination = pino.destination(destOpts);
1412
+ await once(destination, 'ready');
1413
+ return destination;
1414
+ };
1415
+ },
1617
1416
  "../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/index.js": function(module1, __unused_webpack_exports, __webpack_require__) {
1618
1417
  "use strict";
1619
1418
  const errSerializer = __webpack_require__("../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err.js");
@@ -1920,7 +1719,7 @@ var __webpack_modules__ = {
1920
1719
  };
1921
1720
  }
1922
1721
  },
1923
- "../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/caller.js": function(module1) {
1722
+ "../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/caller.js": function(module1) {
1924
1723
  "use strict";
1925
1724
  function noOpPrepareStackTrace(_, stack) {
1926
1725
  return stack;
@@ -1937,7 +1736,7 @@ var __webpack_modules__ = {
1937
1736
  return fileNames;
1938
1737
  };
1939
1738
  },
1940
- "../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/constants.js": function(module1) {
1739
+ "../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/constants.js": function(module1) {
1941
1740
  const DEFAULT_LEVELS = {
1942
1741
  trace: 10,
1943
1742
  debug: 20,
@@ -1955,11 +1754,11 @@ var __webpack_modules__ = {
1955
1754
  SORTING_ORDER
1956
1755
  };
1957
1756
  },
1958
- "../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/levels.js": function(module1, __unused_webpack_exports, __webpack_require__) {
1757
+ "../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/levels.js": function(module1, __unused_webpack_exports, __webpack_require__) {
1959
1758
  "use strict";
1960
- const { lsCacheSym, levelValSym, useOnlyCustomLevelsSym, streamSym, formattersSym, hooksSym, levelCompSym } = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/symbols.js");
1961
- const { noop, genLog } = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/tools.js");
1962
- const { DEFAULT_LEVELS, SORTING_ORDER } = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/constants.js");
1759
+ const { lsCacheSym, levelValSym, useOnlyCustomLevelsSym, streamSym, formattersSym, hooksSym, levelCompSym } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/symbols.js");
1760
+ const { noop, genLog } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/tools.js");
1761
+ const { DEFAULT_LEVELS, SORTING_ORDER } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/constants.js");
1963
1762
  const levelMethods = {
1964
1763
  fatal: (hook)=>{
1965
1764
  const logFatal = genLog(DEFAULT_LEVELS.fatal, hook);
@@ -2107,19 +1906,18 @@ var __webpack_modules__ = {
2107
1906
  assertLevelComparison
2108
1907
  };
2109
1908
  },
2110
- "../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/meta.js": function(module1) {
1909
+ "../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/meta.js": function(module1) {
2111
1910
  "use strict";
2112
1911
  module1.exports = {
2113
- version: '9.7.0'
1912
+ version: '10.1.0'
2114
1913
  };
2115
1914
  },
2116
- "../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/multistream.js": function(module1, __unused_webpack_exports, __webpack_require__) {
1915
+ "../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/multistream.js": function(module1, __unused_webpack_exports, __webpack_require__) {
2117
1916
  "use strict";
2118
1917
  const metadata = Symbol.for('pino.metadata');
2119
- const { DEFAULT_LEVELS } = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/constants.js");
1918
+ const { DEFAULT_LEVELS } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/constants.js");
2120
1919
  const DEFAULT_INFO_LEVEL = DEFAULT_LEVELS.info;
2121
1920
  function multistream(streamsArray, opts) {
2122
- let counter = 0;
2123
1921
  streamsArray = streamsArray || [];
2124
1922
  opts = opts || {
2125
1923
  dedupe: false
@@ -2132,10 +1930,12 @@ var __webpack_modules__ = {
2132
1930
  const res = {
2133
1931
  write,
2134
1932
  add,
1933
+ remove,
2135
1934
  emit,
2136
1935
  flushSync,
2137
1936
  end,
2138
1937
  minLevel: 0,
1938
+ lastId: 0,
2139
1939
  streams: [],
2140
1940
  clone,
2141
1941
  [metadata]: true,
@@ -2187,13 +1987,23 @@ var __webpack_modules__ = {
2187
1987
  stream: stream_,
2188
1988
  level,
2189
1989
  levelVal: void 0,
2190
- id: counter++
1990
+ id: ++res.lastId
2191
1991
  };
2192
1992
  streams.unshift(dest_);
2193
1993
  streams.sort(compareByLevel);
2194
1994
  this.minLevel = streams[0].level;
2195
1995
  return res;
2196
1996
  }
1997
+ function remove(id) {
1998
+ const { streams } = this;
1999
+ const index = streams.findIndex((s)=>s.id === id);
2000
+ if (index >= 0) {
2001
+ streams.splice(index, 1);
2002
+ streams.sort(compareByLevel);
2003
+ this.minLevel = streams.length > 0 ? streams[0].level : -1;
2004
+ }
2005
+ return res;
2006
+ }
2197
2007
  function end() {
2198
2008
  for (const { stream } of this.streams){
2199
2009
  if ('function' == typeof stream.flushSync) stream.flushSync();
@@ -2209,6 +2019,7 @@ var __webpack_modules__ = {
2209
2019
  return {
2210
2020
  write,
2211
2021
  add,
2022
+ remove,
2212
2023
  minLevel: level,
2213
2024
  streams,
2214
2025
  clone,
@@ -2232,14 +2043,14 @@ var __webpack_modules__ = {
2232
2043
  }
2233
2044
  module1.exports = multistream;
2234
2045
  },
2235
- "../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/proto.js": function(module1, __unused_webpack_exports, __webpack_require__) {
2046
+ "../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/proto.js": function(module1, __unused_webpack_exports, __webpack_require__) {
2236
2047
  "use strict";
2237
2048
  const { EventEmitter } = __webpack_require__("node:events");
2238
- const { lsCacheSym, levelValSym, setLevelSym, getLevelSym, chindingsSym, parsedChindingsSym, 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@9.7.0/node_modules/pino/lib/symbols.js");
2239
- const { getLevel, setLevel, isLevelEnabled, mappings, initialLsCache, genLsCache, assertNoLevelCollisions } = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/levels.js");
2240
- const { asChindings, asJson, buildFormatters, stringify } = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/tools.js");
2241
- const { version } = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/meta.js");
2242
- const redaction = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/redaction.js");
2049
+ 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");
2050
+ const { getLevel, setLevel, isLevelEnabled, mappings, initialLsCache, genLsCache, assertNoLevelCollisions } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/levels.js");
2051
+ const { asChindings, asJson, buildFormatters, stringify, noop } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/tools.js");
2052
+ const { version } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/meta.js");
2053
+ const redaction = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/redaction.js");
2243
2054
  const constructor = class {
2244
2055
  };
2245
2056
  const prototype = {
@@ -2262,6 +2073,12 @@ var __webpack_modules__ = {
2262
2073
  set levelVal (n){
2263
2074
  throw Error('levelVal is read-only');
2264
2075
  },
2076
+ get msgPrefix () {
2077
+ return this[msgPrefixSym];
2078
+ },
2079
+ get [Symbol.toStringTag] () {
2080
+ return 'Pino';
2081
+ },
2265
2082
  [lsCacheSym]: initialLsCache,
2266
2083
  [writeSym]: write,
2267
2084
  [asJsonSym]: asJson,
@@ -2275,10 +2092,15 @@ var __webpack_modules__ = {
2275
2092
  const resetChildingsFormatter = (bindings)=>bindings;
2276
2093
  function child(bindings, options) {
2277
2094
  if (!bindings) throw Error('missing bindings for child Pino');
2278
- options = options || {};
2279
2095
  const serializers = this[serializersSym];
2280
2096
  const formatters = this[formattersSym];
2281
2097
  const instance = Object.create(this);
2098
+ if (null == options) {
2099
+ if (instance[formattersSym].bindings !== resetChildingsFormatter) instance[formattersSym] = buildFormatters(formatters.level, resetChildingsFormatter, formatters.log);
2100
+ instance[chindingsSym] = asChindings(instance, bindings);
2101
+ if (this.onChild !== noop) this.onChild(instance);
2102
+ return instance;
2103
+ }
2282
2104
  if (true === options.hasOwnProperty('serializers')) {
2283
2105
  instance[serializersSym] = Object.create(null);
2284
2106
  for(const k in serializers)instance[serializersSym][k] = serializers[k];
@@ -2315,8 +2137,10 @@ var __webpack_modules__ = {
2315
2137
  }
2316
2138
  if ('string' == typeof options.msgPrefix) instance[msgPrefixSym] = (this[msgPrefixSym] || '') + options.msgPrefix;
2317
2139
  instance[chindingsSym] = asChindings(instance, bindings);
2318
- const childLevel = options.level || this.level;
2319
- instance[setLevelSym](childLevel);
2140
+ if (void 0 !== options.level && options.level !== this.level || options.hasOwnProperty('customLevels')) {
2141
+ const childLevel = options.level || this.level;
2142
+ instance[setLevelSym](childLevel);
2143
+ }
2320
2144
  this.onChild(instance);
2321
2145
  return instance;
2322
2146
  }
@@ -2331,7 +2155,6 @@ var __webpack_modules__ = {
2331
2155
  function setBindings(newBindings) {
2332
2156
  const chindings = asChindings(this, newBindings);
2333
2157
  this[chindingsSym] = chindings;
2334
- delete this[parsedChindingsSym];
2335
2158
  }
2336
2159
  function defaultMixinMergeStrategy(mergeObject, mixinObject) {
2337
2160
  return Object.assign(mixinObject, mergeObject);
@@ -2366,7 +2189,6 @@ var __webpack_modules__ = {
2366
2189
  }
2367
2190
  stream.write(streamWriteHook ? streamWriteHook(s) : s);
2368
2191
  }
2369
- function noop() {}
2370
2192
  function flush(cb) {
2371
2193
  if (null != cb && 'function' != typeof cb) throw Error('callback must be a function');
2372
2194
  const stream = this[streamSym];
@@ -2374,19 +2196,15 @@ var __webpack_modules__ = {
2374
2196
  else if (cb) cb();
2375
2197
  }
2376
2198
  },
2377
- "../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/redaction.js": function(module1, __unused_webpack_exports, __webpack_require__) {
2199
+ "../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/redaction.js": function(module1, __unused_webpack_exports, __webpack_require__) {
2378
2200
  "use strict";
2379
- const fastRedact = __webpack_require__("../../node_modules/.pnpm/fast-redact@3.5.0/node_modules/fast-redact/index.js");
2380
- const { redactFmtSym, wildcardFirstSym } = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/symbols.js");
2381
- const { rx, validator } = fastRedact;
2382
- const validate = validator({
2383
- ERR_PATHS_MUST_BE_STRINGS: ()=>'pino – redacted paths must be strings',
2384
- ERR_INVALID_PATH: (s)=>`pino – redact paths array contains an invalid path (${s})`
2385
- });
2201
+ const Redact = __webpack_require__("../../node_modules/.pnpm/@pinojs+redact@0.4.0/node_modules/@pinojs/redact/index.js");
2202
+ const { redactFmtSym, wildcardFirstSym } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/symbols.js");
2203
+ const rx = /[^.[\]]+|\[([^[\]]*?)\]/g;
2386
2204
  const CENSOR = '[Redacted]';
2387
2205
  const strict = false;
2388
2206
  function redaction(opts, serialize) {
2389
- const { paths, censor } = handle(opts);
2207
+ const { paths, censor, remove } = handle(opts);
2390
2208
  const shape = paths.reduce((o, str)=>{
2391
2209
  rx.lastIndex = 0;
2392
2210
  const first = rx.exec(str);
@@ -2409,11 +2227,12 @@ var __webpack_modules__ = {
2409
2227
  return o;
2410
2228
  }, {});
2411
2229
  const result = {
2412
- [redactFmtSym]: fastRedact({
2230
+ [redactFmtSym]: Redact({
2413
2231
  paths,
2414
2232
  censor,
2415
2233
  serialize,
2416
- strict
2234
+ strict,
2235
+ remove
2417
2236
  })
2418
2237
  };
2419
2238
  const topCensor = (...args)=>'function' == typeof censor ? serialize(censor(...args)) : serialize(censor);
@@ -2429,11 +2248,12 @@ var __webpack_modules__ = {
2429
2248
  k,
2430
2249
  ...path
2431
2250
  ]) : censor;
2432
- o[k] = fastRedact({
2251
+ o[k] = Redact({
2433
2252
  paths: shape[k],
2434
2253
  censor: wrappedCensor,
2435
2254
  serialize,
2436
- strict
2255
+ strict,
2256
+ remove
2437
2257
  });
2438
2258
  }
2439
2259
  return o;
@@ -2445,24 +2265,20 @@ var __webpack_modules__ = {
2445
2265
  paths: opts,
2446
2266
  censor: CENSOR
2447
2267
  };
2448
- validate(opts);
2449
2268
  return opts;
2450
2269
  }
2451
2270
  let { paths, censor = CENSOR, remove } = opts;
2452
2271
  if (false === Array.isArray(paths)) throw Error('pino – redact must contain an array of strings');
2453
2272
  if (true === remove) censor = void 0;
2454
- validate({
2455
- paths,
2456
- censor
2457
- });
2458
2273
  return {
2459
2274
  paths,
2460
- censor
2275
+ censor,
2276
+ remove
2461
2277
  };
2462
2278
  }
2463
2279
  module1.exports = redaction;
2464
2280
  },
2465
- "../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/symbols.js": function(module1) {
2281
+ "../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/symbols.js": function(module1) {
2466
2282
  "use strict";
2467
2283
  const setLevelSym = Symbol('pino.setLevel');
2468
2284
  const getLevelSym = Symbol('pino.getLevel');
@@ -2529,28 +2345,50 @@ var __webpack_modules__ = {
2529
2345
  msgPrefixSym
2530
2346
  };
2531
2347
  },
2532
- "../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/time.js": function(module1) {
2348
+ "../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/time.js": function(module1) {
2533
2349
  "use strict";
2534
2350
  const nullTime = ()=>'';
2535
2351
  const epochTime = ()=>`,"time":${Date.now()}`;
2536
2352
  const unixTime = ()=>`,"time":${Math.round(Date.now() / 1000.0)}`;
2537
2353
  const isoTime = ()=>`,"time":"${new Date(Date.now()).toISOString()}"`;
2354
+ const NS_PER_MS = 1000000n;
2355
+ const NS_PER_SEC = 1000000000n;
2356
+ const startWallTimeNs = BigInt(Date.now()) * NS_PER_MS;
2357
+ const startHrTime = process.hrtime.bigint();
2358
+ const isoTimeNano = ()=>{
2359
+ const elapsedNs = process.hrtime.bigint() - startHrTime;
2360
+ const currentTimeNs = startWallTimeNs + elapsedNs;
2361
+ const secondsSinceEpoch = currentTimeNs / NS_PER_SEC;
2362
+ const nanosWithinSecond = currentTimeNs % NS_PER_SEC;
2363
+ const msSinceEpoch = Number(1000n * secondsSinceEpoch + nanosWithinSecond / 1000000n);
2364
+ const date = new Date(msSinceEpoch);
2365
+ const year = date.getUTCFullYear();
2366
+ const month = (date.getUTCMonth() + 1).toString().padStart(2, '0');
2367
+ const day = date.getUTCDate().toString().padStart(2, '0');
2368
+ const hours = date.getUTCHours().toString().padStart(2, '0');
2369
+ const minutes = date.getUTCMinutes().toString().padStart(2, '0');
2370
+ const seconds = date.getUTCSeconds().toString().padStart(2, '0');
2371
+ return `,"time":"${year}-${month}-${day}T${hours}:${minutes}:${seconds}.${nanosWithinSecond.toString().padStart(9, '0')}Z"`;
2372
+ };
2538
2373
  module1.exports = {
2539
2374
  nullTime,
2540
2375
  epochTime,
2541
2376
  unixTime,
2542
- isoTime
2377
+ isoTime,
2378
+ isoTimeNano
2543
2379
  };
2544
2380
  },
2545
- "../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/tools.js": function(module1, __unused_webpack_exports, __webpack_require__) {
2381
+ "../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/tools.js": function(module1, __unused_webpack_exports, __webpack_require__) {
2546
2382
  "use strict";
2383
+ const diagChan = __webpack_require__("node:diagnostics_channel");
2547
2384
  const format = __webpack_require__("../../node_modules/.pnpm/quick-format-unescaped@4.0.4/node_modules/quick-format-unescaped/index.js");
2548
2385
  const { mapHttpRequest, mapHttpResponse } = __webpack_require__("../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/index.js");
2549
2386
  const SonicBoom = __webpack_require__("../../node_modules/.pnpm/sonic-boom@4.2.0/node_modules/sonic-boom/index.js");
2550
2387
  const onExit = __webpack_require__("../../node_modules/.pnpm/on-exit-leak-free@2.1.2/node_modules/on-exit-leak-free/index.js");
2551
- const { lsCacheSym, chindingsSym, writeSym, serializersSym, formatOptsSym, endSym, stringifiersSym, stringifySym, stringifySafeSym, wildcardFirstSym, nestedKeySym, formattersSym, messageKeySym, errorKeySym, nestedKeyStrSym, msgPrefixSym } = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/symbols.js");
2388
+ 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");
2552
2389
  const { isMainThread } = __webpack_require__("worker_threads");
2553
- const transport = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/transport.js");
2390
+ const transport = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/transport.js");
2391
+ const asJsonChan = diagChan.tracingChannel('pino_asJson');
2554
2392
  function noop() {}
2555
2393
  function genLog(level, hook) {
2556
2394
  if (!hook) return LOG;
@@ -2601,6 +2439,14 @@ var __webpack_modules__ = {
2601
2439
  return point < 32 ? JSON.stringify(str) : '"' + result + '"';
2602
2440
  }
2603
2441
  function asJson(obj, msg, num, time) {
2442
+ if (false === asJsonChan.hasSubscribers) return _asJson.call(this, obj, msg, num, time);
2443
+ const store = {
2444
+ instance: this,
2445
+ arguments
2446
+ };
2447
+ return asJsonChan.traceSync(_asJson, store, this, obj, msg, num, time);
2448
+ }
2449
+ function _asJson(obj, msg, num, time) {
2604
2450
  const stringify = this[stringifySym];
2605
2451
  const stringifySafe = this[stringifySafeSym];
2606
2452
  const stringifiers = this[stringifiersSym];
@@ -2679,7 +2525,7 @@ var __webpack_modules__ = {
2679
2525
  bindings = formatter(bindings);
2680
2526
  for(const key in bindings){
2681
2527
  value = bindings[key];
2682
- const valid = 'level' !== key && 'serializers' !== key && 'formatters' !== key && 'customLevels' !== key && bindings.hasOwnProperty(key) && void 0 !== value;
2528
+ const valid = (key.length < 5 || 'level' !== key && 'serializers' !== key && 'formatters' !== key && 'customLevels' !== key) && bindings.hasOwnProperty(key) && void 0 !== value;
2683
2529
  if (true === valid) {
2684
2530
  value = serializers[key] ? serializers[key](value) : value;
2685
2531
  value = (stringifiers[key] || wildcardStringifier || stringify)(value, stringifySafe);
@@ -2802,10 +2648,10 @@ var __webpack_modules__ = {
2802
2648
  normalizeDestFileDescriptor
2803
2649
  };
2804
2650
  },
2805
- "../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/transport.js": function(module1, __unused_webpack_exports, __webpack_require__) {
2651
+ "../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/transport.js": function(module1, __unused_webpack_exports, __webpack_require__) {
2806
2652
  "use strict";
2807
2653
  const { createRequire } = __webpack_require__("module");
2808
- const getCallers = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/caller.js");
2654
+ const getCallers = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/caller.js");
2809
2655
  const { join, isAbsolute, sep } = __webpack_require__("node:path");
2810
2656
  const sleep = __webpack_require__("../../node_modules/.pnpm/atomic-sleep@1.0.0/node_modules/atomic-sleep/index.js");
2811
2657
  const onExit = __webpack_require__("../../node_modules/.pnpm/on-exit-leak-free@2.1.2/node_modules/on-exit-leak-free/index.js");
@@ -2906,20 +2752,20 @@ var __webpack_modules__ = {
2906
2752
  }
2907
2753
  module1.exports = transport;
2908
2754
  },
2909
- "../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/pino.js": function(module1, __unused_webpack_exports, __webpack_require__) {
2755
+ "../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/pino.js": function(module1, __unused_webpack_exports, __webpack_require__) {
2910
2756
  "use strict";
2911
2757
  const os = __webpack_require__("node:os");
2912
2758
  const stdSerializers = __webpack_require__("../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/index.js");
2913
- const caller = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/caller.js");
2914
- const redaction = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/redaction.js");
2915
- const time = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/time.js");
2916
- const proto = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/proto.js");
2917
- const symbols = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/symbols.js");
2759
+ const caller = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/caller.js");
2760
+ const redaction = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/redaction.js");
2761
+ const time = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/time.js");
2762
+ const proto = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/proto.js");
2763
+ const symbols = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/symbols.js");
2918
2764
  const { configure } = __webpack_require__("../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/index.js");
2919
- const { assertDefaultLevelFound, mappings, genLsCache, genLevelComparison, assertLevelComparison } = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/levels.js");
2920
- const { DEFAULT_LEVELS, SORTING_ORDER } = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/constants.js");
2921
- const { createArgsNormalizer, asChindings, buildSafeSonicBoom, buildFormatters, stringify, normalizeDestFileDescriptor, noop } = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/tools.js");
2922
- const { version } = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/meta.js");
2765
+ const { assertDefaultLevelFound, mappings, genLsCache, genLevelComparison, assertLevelComparison } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/levels.js");
2766
+ const { DEFAULT_LEVELS, SORTING_ORDER } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/constants.js");
2767
+ const { createArgsNormalizer, asChindings, buildSafeSonicBoom, buildFormatters, stringify, normalizeDestFileDescriptor, noop } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/tools.js");
2768
+ const { version } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/meta.js");
2923
2769
  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;
2924
2770
  const { epochTime, nullTime } = time;
2925
2771
  const { pid } = process;
@@ -3053,8 +2899,8 @@ var __webpack_modules__ = {
3053
2899
  dest.dest = normalizeDestFileDescriptor(dest.dest || process.stdout.fd);
3054
2900
  return buildSafeSonicBoom(dest);
3055
2901
  };
3056
- module1.exports.transport = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/transport.js");
3057
- module1.exports.multistream = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/lib/multistream.js");
2902
+ module1.exports.transport = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/transport.js");
2903
+ module1.exports.multistream = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/multistream.js");
3058
2904
  module1.exports.levels = mappings();
3059
2905
  module1.exports.stdSerializers = serializers;
3060
2906
  module1.exports.stdTimeFunctions = Object.assign({}, time);
@@ -3488,21 +3334,6 @@ var __webpack_modules__ = {
3488
3334
  SonicBoom.default = SonicBoom;
3489
3335
  module1.exports = SonicBoom;
3490
3336
  },
3491
- "../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/file.js": function(module1, __unused_webpack_exports, __webpack_require__) {
3492
- "use strict";
3493
- const pino = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/pino.js");
3494
- const { once } = __webpack_require__("node:events");
3495
- module1.exports = async function(opts = {}) {
3496
- const destOpts = Object.assign({}, opts, {
3497
- dest: opts.destination || 1,
3498
- sync: false
3499
- });
3500
- delete destOpts.destination;
3501
- const destination = pino.destination(destOpts);
3502
- await once(destination, 'ready');
3503
- return destination;
3504
- };
3505
- },
3506
3337
  "../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/package.json": function(module1) {
3507
3338
  "use strict";
3508
3339
  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"}');
@@ -3518,5 +3349,5 @@ function __webpack_require__(moduleId) {
3518
3349
  __webpack_modules__[moduleId](module1, module1.exports, __webpack_require__);
3519
3350
  return module1.exports;
3520
3351
  }
3521
- var __webpack_exports__ = __webpack_require__("../../node_modules/.pnpm/pino@9.7.0/node_modules/pino/file.js");
3352
+ var __webpack_exports__ = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/file.js");
3522
3353
  module.exports = __webpack_exports__;