@rife/logger 0.0.6-beta.15 → 0.0.6-beta.16
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/pino/index.cjs +25 -8
- package/dist/cjs/pino/worker/pino-file.cjs +21 -13
- package/dist/cjs/pino/worker/pino-pretty.cjs +40 -26
- package/dist/cjs/pino/worker/pino-worker.cjs +21 -13
- package/dist/cjs/trace.cjs +2 -2
- package/dist/esm/pino/index.mjs +23 -6
- package/dist/esm/pino/worker/pino-file.cjs +21 -13
- package/dist/esm/pino/worker/pino-pretty.cjs +40 -26
- package/dist/esm/pino/worker/pino-worker.cjs +21 -13
- package/dist/worker/pino-file.cjs +21 -13
- package/dist/worker/pino-pretty.cjs +40 -26
- package/dist/worker/pino-worker.cjs +21 -13
- package/package.json +1 -1
- package/src/pino/index.ts +16 -5
- package/dist/cjs/worker/index.cjs +0 -5
- package/dist/esm/worker/index.mjs +0 -1
- package/src/worker/index.ts +0 -3
package/dist/cjs/pino/index.cjs
CHANGED
|
@@ -49,8 +49,8 @@ var __webpack_exports__ = {};
|
|
|
49
49
|
__webpack_require__.r(__webpack_exports__);
|
|
50
50
|
__webpack_require__.d(__webpack_exports__, {
|
|
51
51
|
createLogger: ()=>createLogger,
|
|
52
|
-
|
|
53
|
-
|
|
52
|
+
pino: ()=>external_pino_default(),
|
|
53
|
+
useExpress: ()=>useExpress
|
|
54
54
|
});
|
|
55
55
|
const external_path_namespaceObject = require("path");
|
|
56
56
|
var external_path_default = /*#__PURE__*/ __webpack_require__.n(external_path_namespaceObject);
|
|
@@ -93,7 +93,6 @@ var __webpack_exports__ = {};
|
|
|
93
93
|
delete data.level;
|
|
94
94
|
delete data.time;
|
|
95
95
|
delete data.pid;
|
|
96
|
-
delete data.name;
|
|
97
96
|
delete data.hostname;
|
|
98
97
|
if (!traceId) return {
|
|
99
98
|
traceId: (0, external_trace_cjs_namespaceObject.getTraceId)()
|
|
@@ -103,12 +102,30 @@ var __webpack_exports__ = {};
|
|
|
103
102
|
};
|
|
104
103
|
},
|
|
105
104
|
browser: {
|
|
105
|
+
serialize: true,
|
|
106
106
|
write: (o)=>{
|
|
107
|
-
const {
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
111
|
-
|
|
107
|
+
const { fn, time, level, ...rest } = o;
|
|
108
|
+
const clone = {
|
|
109
|
+
...o
|
|
110
|
+
};
|
|
111
|
+
if (fn) rest.message = rest.message ? `[${fn}] ${rest.message}` : `[${fn}]`;
|
|
112
|
+
if (!rest.traceId) {
|
|
113
|
+
rest.traceId = (0, external_trace_cjs_namespaceObject.getTraceId)();
|
|
114
|
+
clone.traceId = (0, external_trace_cjs_namespaceObject.getTraceId)();
|
|
115
|
+
}
|
|
116
|
+
if (level >= 50) {
|
|
117
|
+
const keys = [
|
|
118
|
+
'fn',
|
|
119
|
+
'time',
|
|
120
|
+
'level'
|
|
121
|
+
];
|
|
122
|
+
keys.forEach((k)=>delete clone[k]);
|
|
123
|
+
if (clone.msg) {
|
|
124
|
+
clone.msg = `${clone.name || 'Error'}: ${clone.msg}`;
|
|
125
|
+
if (fn) clone.msg = `[${fn}] ${clone.msg}`;
|
|
126
|
+
}
|
|
127
|
+
console.error(clone);
|
|
128
|
+
} else if (level >= 40) console.warn(rest);
|
|
112
129
|
else console.log(rest);
|
|
113
130
|
}
|
|
114
131
|
}
|
|
@@ -2392,7 +2392,7 @@ var __webpack_modules__ = {
|
|
|
2392
2392
|
const diagChan = __webpack_require__("node:diagnostics_channel");
|
|
2393
2393
|
const format = __webpack_require__("../../node_modules/.pnpm/quick-format-unescaped@4.0.4/node_modules/quick-format-unescaped/index.js");
|
|
2394
2394
|
const { mapHttpRequest, mapHttpResponse } = __webpack_require__("../../node_modules/.pnpm/pino-std-serializers@7.1.0/node_modules/pino-std-serializers/index.js");
|
|
2395
|
-
const SonicBoom = __webpack_require__("../../node_modules/.pnpm/sonic-boom@4.2.
|
|
2395
|
+
const SonicBoom = __webpack_require__("../../node_modules/.pnpm/sonic-boom@4.2.1/node_modules/sonic-boom/index.js");
|
|
2396
2396
|
const onExit = __webpack_require__("../../node_modules/.pnpm/on-exit-leak-free@2.1.2/node_modules/on-exit-leak-free/index.js");
|
|
2397
2397
|
const { lsCacheSym, chindingsSym, writeSym, serializersSym, formatOptsSym, endSym, stringifiersSym, stringifySym, stringifySafeSym, wildcardFirstSym, nestedKeySym, formattersSym, messageKeySym, errorKeySym, nestedKeyStrSym, msgPrefixSym } = __webpack_require__("../../node_modules/.pnpm/pino@10.3.1/node_modules/pino/lib/symbols.js");
|
|
2398
2398
|
const { isMainThread } = __webpack_require__("worker_threads");
|
|
@@ -2999,7 +2999,7 @@ var __webpack_modules__ = {
|
|
|
2999
2999
|
module1.exports["default"] = pino;
|
|
3000
3000
|
module1.exports.pino = pino;
|
|
3001
3001
|
},
|
|
3002
|
-
"../../node_modules/.pnpm/sonic-boom@4.2.
|
|
3002
|
+
"../../node_modules/.pnpm/sonic-boom@4.2.1/node_modules/sonic-boom/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
3003
3003
|
"use strict";
|
|
3004
3004
|
const fs = __webpack_require__("fs");
|
|
3005
3005
|
const EventEmitter = __webpack_require__("events");
|
|
@@ -3105,8 +3105,14 @@ var __webpack_modules__ = {
|
|
|
3105
3105
|
this.flush = flush;
|
|
3106
3106
|
this.flushSync = flushSync;
|
|
3107
3107
|
this._actualWrite = actualWrite;
|
|
3108
|
-
fsWriteSync = ()=>
|
|
3109
|
-
|
|
3108
|
+
fsWriteSync = ()=>{
|
|
3109
|
+
if (Buffer.isBuffer(this._writingBuf)) return fs.writeSync(this.fd, this._writingBuf);
|
|
3110
|
+
return fs.writeSync(this.fd, this._writingBuf, 'utf8');
|
|
3111
|
+
};
|
|
3112
|
+
fsWrite = ()=>{
|
|
3113
|
+
if (Buffer.isBuffer(this._writingBuf)) return fs.write(this.fd, this._writingBuf, this.release);
|
|
3114
|
+
return fs.write(this.fd, this._writingBuf, 'utf8', this.release);
|
|
3115
|
+
};
|
|
3110
3116
|
} else throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`);
|
|
3111
3117
|
if ('number' == typeof fd) {
|
|
3112
3118
|
this.fd = fd;
|
|
@@ -3178,9 +3184,9 @@ var __webpack_modules__ = {
|
|
|
3178
3184
|
}
|
|
3179
3185
|
}
|
|
3180
3186
|
function releaseWritingBuf(writingBuf, len, n1) {
|
|
3181
|
-
if ('string' == typeof writingBuf
|
|
3187
|
+
if ('string' == typeof writingBuf) writingBuf = Buffer.from(writingBuf);
|
|
3182
3188
|
len = Math.max(len - n1, 0);
|
|
3183
|
-
writingBuf = writingBuf.
|
|
3189
|
+
writingBuf = writingBuf.subarray(n1);
|
|
3184
3190
|
return {
|
|
3185
3191
|
writingBuf,
|
|
3186
3192
|
len
|
|
@@ -3200,13 +3206,15 @@ var __webpack_modules__ = {
|
|
|
3200
3206
|
}
|
|
3201
3207
|
function write(data) {
|
|
3202
3208
|
if (this.destroyed) throw new Error('SonicBoom destroyed');
|
|
3203
|
-
|
|
3209
|
+
data = '' + data;
|
|
3210
|
+
const dataLen = Buffer.byteLength(data);
|
|
3211
|
+
const len = this._len + dataLen;
|
|
3204
3212
|
const bufs = this._bufs;
|
|
3205
3213
|
if (this.maxLength && len > this.maxLength) {
|
|
3206
3214
|
this.emit('drop', data);
|
|
3207
3215
|
return this._len < this._hwm;
|
|
3208
3216
|
}
|
|
3209
|
-
if (0 === bufs.length || bufs[bufs.length - 1]
|
|
3217
|
+
if (0 === bufs.length || Buffer.byteLength(bufs[bufs.length - 1]) + dataLen > this.maxWrite) bufs.push(data);
|
|
3210
3218
|
else bufs[bufs.length - 1] += data;
|
|
3211
3219
|
this._len = len;
|
|
3212
3220
|
if (!this._writing && this._len >= this.minLength) this._actualWrite();
|
|
@@ -3324,10 +3332,10 @@ var __webpack_modules__ = {
|
|
|
3324
3332
|
this._writingBuf = '';
|
|
3325
3333
|
}
|
|
3326
3334
|
let buf = '';
|
|
3327
|
-
while(this._bufs.length || buf){
|
|
3335
|
+
while(this._bufs.length || buf.length){
|
|
3328
3336
|
if (buf.length <= 0) buf = this._bufs[0];
|
|
3329
3337
|
try {
|
|
3330
|
-
const n1 = fs.writeSync(this.fd, buf, 'utf8');
|
|
3338
|
+
const n1 = Buffer.isBuffer(buf) ? fs.writeSync(this.fd, buf) : fs.writeSync(this.fd, buf, 'utf8');
|
|
3331
3339
|
const releasedBufObj = releaseWritingBuf(buf, this._len, n1);
|
|
3332
3340
|
buf = releasedBufObj.writingBuf;
|
|
3333
3341
|
this._len = releasedBufObj.len;
|
|
@@ -3376,14 +3384,14 @@ var __webpack_modules__ = {
|
|
|
3376
3384
|
function actualWrite() {
|
|
3377
3385
|
const release = this.release;
|
|
3378
3386
|
this._writing = true;
|
|
3379
|
-
this._writingBuf = this._writingBuf
|
|
3387
|
+
this._writingBuf = this._writingBuf.length ? this._writingBuf : this._bufs.shift() || '';
|
|
3380
3388
|
if (this.sync) try {
|
|
3381
|
-
const written = fs.writeSync(this.fd, this._writingBuf, 'utf8');
|
|
3389
|
+
const written = Buffer.isBuffer(this._writingBuf) ? fs.writeSync(this.fd, this._writingBuf) : fs.writeSync(this.fd, this._writingBuf, 'utf8');
|
|
3382
3390
|
release(null, written);
|
|
3383
3391
|
} catch (err) {
|
|
3384
3392
|
release(err);
|
|
3385
3393
|
}
|
|
3386
|
-
else fs.write(this.fd, this._writingBuf,
|
|
3394
|
+
else fs.write(this.fd, this._writingBuf, release);
|
|
3387
3395
|
}
|
|
3388
3396
|
function actualWriteBuffer() {
|
|
3389
3397
|
const release = this.release;
|
|
@@ -364,9 +364,10 @@ var __webpack_modules__ = {
|
|
|
364
364
|
else global1.dateFormat = dateFormat;
|
|
365
365
|
})(void 0);
|
|
366
366
|
},
|
|
367
|
-
"../../node_modules/.pnpm/end-of-stream@1.4.
|
|
367
|
+
"../../node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
368
368
|
var once = __webpack_require__("../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js");
|
|
369
369
|
var noop = function() {};
|
|
370
|
+
var qnt = global.Bare ? queueMicrotask : process.nextTick.bind(process);
|
|
370
371
|
var isRequest = function(stream) {
|
|
371
372
|
return stream.setHeader && 'function' == typeof stream.abort;
|
|
372
373
|
};
|
|
@@ -400,7 +401,7 @@ var __webpack_modules__ = {
|
|
|
400
401
|
callback.call(stream, err);
|
|
401
402
|
};
|
|
402
403
|
var onclose = function() {
|
|
403
|
-
|
|
404
|
+
qnt(onclosenexttick);
|
|
404
405
|
};
|
|
405
406
|
var onclosenexttick = function() {
|
|
406
407
|
if (cancelled) return;
|
|
@@ -817,15 +818,15 @@ var __webpack_modules__ = {
|
|
|
817
818
|
process.nextTick(cb, err);
|
|
818
819
|
}
|
|
819
820
|
},
|
|
820
|
-
"../../node_modules/.pnpm/pump@3.0.
|
|
821
|
+
"../../node_modules/.pnpm/pump@3.0.4/node_modules/pump/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
821
822
|
var once = __webpack_require__("../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js");
|
|
822
|
-
var eos = __webpack_require__("../../node_modules/.pnpm/end-of-stream@1.4.
|
|
823
|
+
var eos = __webpack_require__("../../node_modules/.pnpm/end-of-stream@1.4.5/node_modules/end-of-stream/index.js");
|
|
823
824
|
var fs;
|
|
824
825
|
try {
|
|
825
826
|
fs = __webpack_require__("fs");
|
|
826
827
|
} catch (e) {}
|
|
827
828
|
var noop = function() {};
|
|
828
|
-
var ancient = /^v?\.0/.test(process.version);
|
|
829
|
+
var ancient = "u" < typeof process ? false : /^v?\.0/.test(process.version);
|
|
829
830
|
var isFn = function(fn) {
|
|
830
831
|
return 'function' == typeof fn;
|
|
831
832
|
};
|
|
@@ -1126,7 +1127,7 @@ var __webpack_modules__ = {
|
|
|
1126
1127
|
exports.createColors = createColors;
|
|
1127
1128
|
exports.isColorSupported = isColorSupported;
|
|
1128
1129
|
},
|
|
1129
|
-
"../../node_modules/.pnpm/fast-copy@4.0.
|
|
1130
|
+
"../../node_modules/.pnpm/fast-copy@4.0.3/node_modules/fast-copy/dist/cjs/index.cjs" (__unused_rspack_module, exports) {
|
|
1130
1131
|
"use strict";
|
|
1131
1132
|
const toStringFunction = Function.prototype.toString;
|
|
1132
1133
|
const toStringObject = Object.prototype.toString;
|
|
@@ -1251,10 +1252,12 @@ var __webpack_modules__ = {
|
|
|
1251
1252
|
const defaultMethods = {
|
|
1252
1253
|
array: strict ? copyArrayStrict : copyArrayLoose,
|
|
1253
1254
|
arrayBuffer: copyArrayBuffer,
|
|
1255
|
+
asyncGenerator: copySelf,
|
|
1254
1256
|
blob: copyBlob,
|
|
1255
1257
|
dataView: copyDataView,
|
|
1256
1258
|
date: copyDate,
|
|
1257
1259
|
error: copySelf,
|
|
1260
|
+
generator: copySelf,
|
|
1258
1261
|
map: strict ? copyMapStrict : copyMapLoose,
|
|
1259
1262
|
object: strict ? copyObjectStrict : copyObjectLoose,
|
|
1260
1263
|
regExp: copyRegExp,
|
|
@@ -1276,6 +1279,9 @@ var __webpack_modules__ = {
|
|
|
1276
1279
|
Arguments: methods.object,
|
|
1277
1280
|
Array: methods.array,
|
|
1278
1281
|
ArrayBuffer: methods.arrayBuffer,
|
|
1282
|
+
AsyncGenerator: methods.asyncGenerator,
|
|
1283
|
+
BigInt64Array: methods.arrayBuffer,
|
|
1284
|
+
BigUint64Array: methods.arrayBuffer,
|
|
1279
1285
|
Blob: methods.blob,
|
|
1280
1286
|
Boolean: copyPrimitiveWrapper,
|
|
1281
1287
|
DataView: methods.dataView,
|
|
@@ -1283,6 +1289,7 @@ var __webpack_modules__ = {
|
|
|
1283
1289
|
Error: methods.error,
|
|
1284
1290
|
Float32Array: methods.arrayBuffer,
|
|
1285
1291
|
Float64Array: methods.arrayBuffer,
|
|
1292
|
+
Generator: methods.generator,
|
|
1286
1293
|
Int8Array: methods.arrayBuffer,
|
|
1287
1294
|
Int16Array: methods.arrayBuffer,
|
|
1288
1295
|
Int32Array: methods.arrayBuffer,
|
|
@@ -1298,8 +1305,7 @@ var __webpack_modules__ = {
|
|
|
1298
1305
|
Uint8Array: methods.arrayBuffer,
|
|
1299
1306
|
Uint8ClampedArray: methods.arrayBuffer,
|
|
1300
1307
|
Uint16Array: methods.arrayBuffer,
|
|
1301
|
-
Uint32Array: methods.arrayBuffer
|
|
1302
|
-
Uint64Array: methods.arrayBuffer
|
|
1308
|
+
Uint32Array: methods.arrayBuffer
|
|
1303
1309
|
};
|
|
1304
1310
|
}
|
|
1305
1311
|
function createCopier(options = {}) {
|
|
@@ -1335,7 +1341,7 @@ var __webpack_modules__ = {
|
|
|
1335
1341
|
"../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
1336
1342
|
"use strict";
|
|
1337
1343
|
const { isColorSupported } = __webpack_require__("../../node_modules/.pnpm/colorette@2.0.20/node_modules/colorette/index.cjs");
|
|
1338
|
-
const pump = __webpack_require__("../../node_modules/.pnpm/pump@3.0.
|
|
1344
|
+
const pump = __webpack_require__("../../node_modules/.pnpm/pump@3.0.4/node_modules/pump/index.js");
|
|
1339
1345
|
const { Transform } = __webpack_require__("node:stream");
|
|
1340
1346
|
const abstractTransport = __webpack_require__("../../node_modules/.pnpm/pino-abstract-transport@3.0.0/node_modules/pino-abstract-transport/index.js");
|
|
1341
1347
|
const colors = __webpack_require__("../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/colors.js");
|
|
@@ -1563,7 +1569,7 @@ var __webpack_modules__ = {
|
|
|
1563
1569
|
"../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/pretty.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
1564
1570
|
"use strict";
|
|
1565
1571
|
module1.exports = pretty;
|
|
1566
|
-
const sjs = __webpack_require__("../../node_modules/.pnpm/secure-json-parse@4.
|
|
1572
|
+
const sjs = __webpack_require__("../../node_modules/.pnpm/secure-json-parse@4.1.0/node_modules/secure-json-parse/index.js");
|
|
1567
1573
|
const isObject = __webpack_require__("../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/is-object.js");
|
|
1568
1574
|
const prettifyErrorLog = __webpack_require__("../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/prettify-error-log.js");
|
|
1569
1575
|
const prettifyLevel = __webpack_require__("../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/prettify-level.js");
|
|
@@ -1663,7 +1669,7 @@ var __webpack_modules__ = {
|
|
|
1663
1669
|
"use strict";
|
|
1664
1670
|
module1.exports = buildSafeSonicBoom;
|
|
1665
1671
|
const { isMainThread } = __webpack_require__("node:worker_threads");
|
|
1666
|
-
const SonicBoom = __webpack_require__("../../node_modules/.pnpm/sonic-boom@4.2.
|
|
1672
|
+
const SonicBoom = __webpack_require__("../../node_modules/.pnpm/sonic-boom@4.2.1/node_modules/sonic-boom/index.js");
|
|
1667
1673
|
const noop = __webpack_require__("../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/noop.js");
|
|
1668
1674
|
function buildSafeSonicBoom(opts) {
|
|
1669
1675
|
const stream = new SonicBoom(opts);
|
|
@@ -1726,7 +1732,7 @@ var __webpack_modules__ = {
|
|
|
1726
1732
|
"../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/filter-log.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
1727
1733
|
"use strict";
|
|
1728
1734
|
module1.exports = filterLog;
|
|
1729
|
-
const { createCopier } = __webpack_require__("../../node_modules/.pnpm/fast-copy@4.0.
|
|
1735
|
+
const { createCopier } = __webpack_require__("../../node_modules/.pnpm/fast-copy@4.0.3/node_modules/fast-copy/dist/cjs/index.cjs");
|
|
1730
1736
|
const fastCopy = createCopier({});
|
|
1731
1737
|
const deleteLogProperty = __webpack_require__("../../node_modules/.pnpm/pino-pretty@13.1.3/node_modules/pino-pretty/lib/utils/delete-log-property.js");
|
|
1732
1738
|
function filterLog({ log, context }) {
|
|
@@ -2253,7 +2259,7 @@ var __webpack_modules__ = {
|
|
|
2253
2259
|
return result;
|
|
2254
2260
|
}
|
|
2255
2261
|
},
|
|
2256
|
-
"../../node_modules/.pnpm/secure-json-parse@4.
|
|
2262
|
+
"../../node_modules/.pnpm/secure-json-parse@4.1.0/node_modules/secure-json-parse/index.js" (module1) {
|
|
2257
2263
|
"use strict";
|
|
2258
2264
|
const hasBuffer = "u" > typeof Buffer;
|
|
2259
2265
|
const suspectProtoRx = /"(?:_|\\u005[Ff])(?:_|\\u005[Ff])(?:p|\\u0070)(?:r|\\u0072)(?:o|\\u006[Ff])(?:t|\\u0074)(?:o|\\u006[Ff])(?:_|\\u005[Ff])(?:_|\\u005[Ff])"\s*:/;
|
|
@@ -2296,7 +2302,7 @@ var __webpack_modules__ = {
|
|
|
2296
2302
|
if ('error' === protoAction) throw new SyntaxError('Object contains forbidden prototype property');
|
|
2297
2303
|
delete node.__proto__;
|
|
2298
2304
|
}
|
|
2299
|
-
if ('ignore' !== constructorAction && Object.prototype.hasOwnProperty.call(node, 'constructor') && Object.prototype.hasOwnProperty.call(node.constructor, 'prototype')) {
|
|
2305
|
+
if ('ignore' !== constructorAction && Object.prototype.hasOwnProperty.call(node, 'constructor') && null !== node.constructor && 'object' == typeof node.constructor && Object.prototype.hasOwnProperty.call(node.constructor, 'prototype')) {
|
|
2300
2306
|
if (true === safe) return null;
|
|
2301
2307
|
if ('error' === constructorAction) throw new SyntaxError('Object contains forbidden prototype property');
|
|
2302
2308
|
delete node.constructor;
|
|
@@ -2337,7 +2343,7 @@ var __webpack_modules__ = {
|
|
|
2337
2343
|
module1.exports.safeParse = safeParse;
|
|
2338
2344
|
module1.exports.scan = filter;
|
|
2339
2345
|
},
|
|
2340
|
-
"../../node_modules/.pnpm/sonic-boom@4.2.
|
|
2346
|
+
"../../node_modules/.pnpm/sonic-boom@4.2.1/node_modules/sonic-boom/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
2341
2347
|
"use strict";
|
|
2342
2348
|
const fs = __webpack_require__("fs");
|
|
2343
2349
|
const EventEmitter = __webpack_require__("events");
|
|
@@ -2443,8 +2449,14 @@ var __webpack_modules__ = {
|
|
|
2443
2449
|
this.flush = flush;
|
|
2444
2450
|
this.flushSync = flushSync;
|
|
2445
2451
|
this._actualWrite = actualWrite;
|
|
2446
|
-
fsWriteSync = ()=>
|
|
2447
|
-
|
|
2452
|
+
fsWriteSync = ()=>{
|
|
2453
|
+
if (Buffer.isBuffer(this._writingBuf)) return fs.writeSync(this.fd, this._writingBuf);
|
|
2454
|
+
return fs.writeSync(this.fd, this._writingBuf, 'utf8');
|
|
2455
|
+
};
|
|
2456
|
+
fsWrite = ()=>{
|
|
2457
|
+
if (Buffer.isBuffer(this._writingBuf)) return fs.write(this.fd, this._writingBuf, this.release);
|
|
2458
|
+
return fs.write(this.fd, this._writingBuf, 'utf8', this.release);
|
|
2459
|
+
};
|
|
2448
2460
|
} else throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`);
|
|
2449
2461
|
if ('number' == typeof fd) {
|
|
2450
2462
|
this.fd = fd;
|
|
@@ -2516,9 +2528,9 @@ var __webpack_modules__ = {
|
|
|
2516
2528
|
}
|
|
2517
2529
|
}
|
|
2518
2530
|
function releaseWritingBuf(writingBuf, len, n) {
|
|
2519
|
-
if ('string' == typeof writingBuf
|
|
2531
|
+
if ('string' == typeof writingBuf) writingBuf = Buffer.from(writingBuf);
|
|
2520
2532
|
len = Math.max(len - n, 0);
|
|
2521
|
-
writingBuf = writingBuf.
|
|
2533
|
+
writingBuf = writingBuf.subarray(n);
|
|
2522
2534
|
return {
|
|
2523
2535
|
writingBuf,
|
|
2524
2536
|
len
|
|
@@ -2538,13 +2550,15 @@ var __webpack_modules__ = {
|
|
|
2538
2550
|
}
|
|
2539
2551
|
function write(data) {
|
|
2540
2552
|
if (this.destroyed) throw new Error('SonicBoom destroyed');
|
|
2541
|
-
|
|
2553
|
+
data = '' + data;
|
|
2554
|
+
const dataLen = Buffer.byteLength(data);
|
|
2555
|
+
const len = this._len + dataLen;
|
|
2542
2556
|
const bufs = this._bufs;
|
|
2543
2557
|
if (this.maxLength && len > this.maxLength) {
|
|
2544
2558
|
this.emit('drop', data);
|
|
2545
2559
|
return this._len < this._hwm;
|
|
2546
2560
|
}
|
|
2547
|
-
if (0 === bufs.length || bufs[bufs.length - 1]
|
|
2561
|
+
if (0 === bufs.length || Buffer.byteLength(bufs[bufs.length - 1]) + dataLen > this.maxWrite) bufs.push(data);
|
|
2548
2562
|
else bufs[bufs.length - 1] += data;
|
|
2549
2563
|
this._len = len;
|
|
2550
2564
|
if (!this._writing && this._len >= this.minLength) this._actualWrite();
|
|
@@ -2662,10 +2676,10 @@ var __webpack_modules__ = {
|
|
|
2662
2676
|
this._writingBuf = '';
|
|
2663
2677
|
}
|
|
2664
2678
|
let buf = '';
|
|
2665
|
-
while(this._bufs.length || buf){
|
|
2679
|
+
while(this._bufs.length || buf.length){
|
|
2666
2680
|
if (buf.length <= 0) buf = this._bufs[0];
|
|
2667
2681
|
try {
|
|
2668
|
-
const n = fs.writeSync(this.fd, buf, 'utf8');
|
|
2682
|
+
const n = Buffer.isBuffer(buf) ? fs.writeSync(this.fd, buf) : fs.writeSync(this.fd, buf, 'utf8');
|
|
2669
2683
|
const releasedBufObj = releaseWritingBuf(buf, this._len, n);
|
|
2670
2684
|
buf = releasedBufObj.writingBuf;
|
|
2671
2685
|
this._len = releasedBufObj.len;
|
|
@@ -2714,14 +2728,14 @@ var __webpack_modules__ = {
|
|
|
2714
2728
|
function actualWrite() {
|
|
2715
2729
|
const release = this.release;
|
|
2716
2730
|
this._writing = true;
|
|
2717
|
-
this._writingBuf = this._writingBuf
|
|
2731
|
+
this._writingBuf = this._writingBuf.length ? this._writingBuf : this._bufs.shift() || '';
|
|
2718
2732
|
if (this.sync) try {
|
|
2719
|
-
const written = fs.writeSync(this.fd, this._writingBuf, 'utf8');
|
|
2733
|
+
const written = Buffer.isBuffer(this._writingBuf) ? fs.writeSync(this.fd, this._writingBuf) : fs.writeSync(this.fd, this._writingBuf, 'utf8');
|
|
2720
2734
|
release(null, written);
|
|
2721
2735
|
} catch (err) {
|
|
2722
2736
|
release(err);
|
|
2723
2737
|
}
|
|
2724
|
-
else fs.write(this.fd, this._writingBuf,
|
|
2738
|
+
else fs.write(this.fd, this._writingBuf, release);
|
|
2725
2739
|
}
|
|
2726
2740
|
function actualWriteBuffer() {
|
|
2727
2741
|
const release = this.release;
|
|
@@ -2594,7 +2594,7 @@ var __webpack_modules__ = {
|
|
|
2594
2594
|
const diagChan = __webpack_require__("node:diagnostics_channel");
|
|
2595
2595
|
const format = __webpack_require__("../../node_modules/.pnpm/quick-format-unescaped@4.0.4/node_modules/quick-format-unescaped/index.js");
|
|
2596
2596
|
const { mapHttpRequest, mapHttpResponse } = __webpack_require__("../../node_modules/.pnpm/pino-std-serializers@7.1.0/node_modules/pino-std-serializers/index.js");
|
|
2597
|
-
const SonicBoom = __webpack_require__("../../node_modules/.pnpm/sonic-boom@4.2.
|
|
2597
|
+
const SonicBoom = __webpack_require__("../../node_modules/.pnpm/sonic-boom@4.2.1/node_modules/sonic-boom/index.js");
|
|
2598
2598
|
const onExit = __webpack_require__("../../node_modules/.pnpm/on-exit-leak-free@2.1.2/node_modules/on-exit-leak-free/index.js");
|
|
2599
2599
|
const { lsCacheSym, chindingsSym, writeSym, serializersSym, formatOptsSym, endSym, stringifiersSym, stringifySym, stringifySafeSym, wildcardFirstSym, nestedKeySym, formattersSym, messageKeySym, errorKeySym, nestedKeyStrSym, msgPrefixSym } = __webpack_require__("../../node_modules/.pnpm/pino@10.3.1/node_modules/pino/lib/symbols.js");
|
|
2600
2600
|
const { isMainThread } = __webpack_require__("worker_threads");
|
|
@@ -3312,7 +3312,7 @@ var __webpack_modules__ = {
|
|
|
3312
3312
|
module1.exports["default"] = pino;
|
|
3313
3313
|
module1.exports.pino = pino;
|
|
3314
3314
|
},
|
|
3315
|
-
"../../node_modules/.pnpm/sonic-boom@4.2.
|
|
3315
|
+
"../../node_modules/.pnpm/sonic-boom@4.2.1/node_modules/sonic-boom/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
3316
3316
|
"use strict";
|
|
3317
3317
|
const fs = __webpack_require__("fs");
|
|
3318
3318
|
const EventEmitter = __webpack_require__("events");
|
|
@@ -3418,8 +3418,14 @@ var __webpack_modules__ = {
|
|
|
3418
3418
|
this.flush = flush;
|
|
3419
3419
|
this.flushSync = flushSync;
|
|
3420
3420
|
this._actualWrite = actualWrite;
|
|
3421
|
-
fsWriteSync = ()=>
|
|
3422
|
-
|
|
3421
|
+
fsWriteSync = ()=>{
|
|
3422
|
+
if (Buffer.isBuffer(this._writingBuf)) return fs.writeSync(this.fd, this._writingBuf);
|
|
3423
|
+
return fs.writeSync(this.fd, this._writingBuf, 'utf8');
|
|
3424
|
+
};
|
|
3425
|
+
fsWrite = ()=>{
|
|
3426
|
+
if (Buffer.isBuffer(this._writingBuf)) return fs.write(this.fd, this._writingBuf, this.release);
|
|
3427
|
+
return fs.write(this.fd, this._writingBuf, 'utf8', this.release);
|
|
3428
|
+
};
|
|
3423
3429
|
} else throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`);
|
|
3424
3430
|
if ('number' == typeof fd) {
|
|
3425
3431
|
this.fd = fd;
|
|
@@ -3491,9 +3497,9 @@ var __webpack_modules__ = {
|
|
|
3491
3497
|
}
|
|
3492
3498
|
}
|
|
3493
3499
|
function releaseWritingBuf(writingBuf, len, n1) {
|
|
3494
|
-
if ('string' == typeof writingBuf
|
|
3500
|
+
if ('string' == typeof writingBuf) writingBuf = Buffer.from(writingBuf);
|
|
3495
3501
|
len = Math.max(len - n1, 0);
|
|
3496
|
-
writingBuf = writingBuf.
|
|
3502
|
+
writingBuf = writingBuf.subarray(n1);
|
|
3497
3503
|
return {
|
|
3498
3504
|
writingBuf,
|
|
3499
3505
|
len
|
|
@@ -3513,13 +3519,15 @@ var __webpack_modules__ = {
|
|
|
3513
3519
|
}
|
|
3514
3520
|
function write(data) {
|
|
3515
3521
|
if (this.destroyed) throw new Error('SonicBoom destroyed');
|
|
3516
|
-
|
|
3522
|
+
data = '' + data;
|
|
3523
|
+
const dataLen = Buffer.byteLength(data);
|
|
3524
|
+
const len = this._len + dataLen;
|
|
3517
3525
|
const bufs = this._bufs;
|
|
3518
3526
|
if (this.maxLength && len > this.maxLength) {
|
|
3519
3527
|
this.emit('drop', data);
|
|
3520
3528
|
return this._len < this._hwm;
|
|
3521
3529
|
}
|
|
3522
|
-
if (0 === bufs.length || bufs[bufs.length - 1]
|
|
3530
|
+
if (0 === bufs.length || Buffer.byteLength(bufs[bufs.length - 1]) + dataLen > this.maxWrite) bufs.push(data);
|
|
3523
3531
|
else bufs[bufs.length - 1] += data;
|
|
3524
3532
|
this._len = len;
|
|
3525
3533
|
if (!this._writing && this._len >= this.minLength) this._actualWrite();
|
|
@@ -3637,10 +3645,10 @@ var __webpack_modules__ = {
|
|
|
3637
3645
|
this._writingBuf = '';
|
|
3638
3646
|
}
|
|
3639
3647
|
let buf = '';
|
|
3640
|
-
while(this._bufs.length || buf){
|
|
3648
|
+
while(this._bufs.length || buf.length){
|
|
3641
3649
|
if (buf.length <= 0) buf = this._bufs[0];
|
|
3642
3650
|
try {
|
|
3643
|
-
const n1 = fs.writeSync(this.fd, buf, 'utf8');
|
|
3651
|
+
const n1 = Buffer.isBuffer(buf) ? fs.writeSync(this.fd, buf) : fs.writeSync(this.fd, buf, 'utf8');
|
|
3644
3652
|
const releasedBufObj = releaseWritingBuf(buf, this._len, n1);
|
|
3645
3653
|
buf = releasedBufObj.writingBuf;
|
|
3646
3654
|
this._len = releasedBufObj.len;
|
|
@@ -3689,14 +3697,14 @@ var __webpack_modules__ = {
|
|
|
3689
3697
|
function actualWrite() {
|
|
3690
3698
|
const release = this.release;
|
|
3691
3699
|
this._writing = true;
|
|
3692
|
-
this._writingBuf = this._writingBuf
|
|
3700
|
+
this._writingBuf = this._writingBuf.length ? this._writingBuf : this._bufs.shift() || '';
|
|
3693
3701
|
if (this.sync) try {
|
|
3694
|
-
const written = fs.writeSync(this.fd, this._writingBuf, 'utf8');
|
|
3702
|
+
const written = Buffer.isBuffer(this._writingBuf) ? fs.writeSync(this.fd, this._writingBuf) : fs.writeSync(this.fd, this._writingBuf, 'utf8');
|
|
3695
3703
|
release(null, written);
|
|
3696
3704
|
} catch (err) {
|
|
3697
3705
|
release(err);
|
|
3698
3706
|
}
|
|
3699
|
-
else fs.write(this.fd, this._writingBuf,
|
|
3707
|
+
else fs.write(this.fd, this._writingBuf, release);
|
|
3700
3708
|
}
|
|
3701
3709
|
function actualWriteBuffer() {
|
|
3702
3710
|
const release = this.release;
|
package/dist/cjs/trace.cjs
CHANGED
|
@@ -24,9 +24,9 @@ var __webpack_require__ = {};
|
|
|
24
24
|
var __webpack_exports__ = {};
|
|
25
25
|
__webpack_require__.r(__webpack_exports__);
|
|
26
26
|
__webpack_require__.d(__webpack_exports__, {
|
|
27
|
-
|
|
27
|
+
genTraceId: ()=>genTraceId,
|
|
28
28
|
getTraceId: ()=>getTraceId,
|
|
29
|
-
|
|
29
|
+
runInTrace: ()=>runInTrace
|
|
30
30
|
});
|
|
31
31
|
const external_async_hooks_namespaceObject = require("async_hooks");
|
|
32
32
|
const als = new external_async_hooks_namespaceObject.AsyncLocalStorage();
|
package/dist/esm/pino/index.mjs
CHANGED
|
@@ -49,7 +49,6 @@ function getPinoConfig() {
|
|
|
49
49
|
delete data.level;
|
|
50
50
|
delete data.time;
|
|
51
51
|
delete data.pid;
|
|
52
|
-
delete data.name;
|
|
53
52
|
delete data.hostname;
|
|
54
53
|
if (!traceId) return {
|
|
55
54
|
traceId: getTraceId()
|
|
@@ -59,12 +58,30 @@ function getPinoConfig() {
|
|
|
59
58
|
};
|
|
60
59
|
},
|
|
61
60
|
browser: {
|
|
61
|
+
serialize: true,
|
|
62
62
|
write: (o)=>{
|
|
63
|
-
const {
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
63
|
+
const { fn, time, level, ...rest } = o;
|
|
64
|
+
const clone = {
|
|
65
|
+
...o
|
|
66
|
+
};
|
|
67
|
+
if (fn) rest.message = rest.message ? `[${fn}] ${rest.message}` : `[${fn}]`;
|
|
68
|
+
if (!rest.traceId) {
|
|
69
|
+
rest.traceId = getTraceId();
|
|
70
|
+
clone.traceId = getTraceId();
|
|
71
|
+
}
|
|
72
|
+
if (level >= 50) {
|
|
73
|
+
const keys = [
|
|
74
|
+
'fn',
|
|
75
|
+
'time',
|
|
76
|
+
'level'
|
|
77
|
+
];
|
|
78
|
+
keys.forEach((k)=>delete clone[k]);
|
|
79
|
+
if (clone.msg) {
|
|
80
|
+
clone.msg = `${clone.name || 'Error'}: ${clone.msg}`;
|
|
81
|
+
if (fn) clone.msg = `[${fn}] ${clone.msg}`;
|
|
82
|
+
}
|
|
83
|
+
console.error(clone);
|
|
84
|
+
} else if (level >= 40) console.warn(rest);
|
|
68
85
|
else console.log(rest);
|
|
69
86
|
}
|
|
70
87
|
}
|
|
@@ -2392,7 +2392,7 @@ var __webpack_modules__ = {
|
|
|
2392
2392
|
const diagChan = __webpack_require__("node:diagnostics_channel");
|
|
2393
2393
|
const format = __webpack_require__("../../node_modules/.pnpm/quick-format-unescaped@4.0.4/node_modules/quick-format-unescaped/index.js");
|
|
2394
2394
|
const { mapHttpRequest, mapHttpResponse } = __webpack_require__("../../node_modules/.pnpm/pino-std-serializers@7.1.0/node_modules/pino-std-serializers/index.js");
|
|
2395
|
-
const SonicBoom = __webpack_require__("../../node_modules/.pnpm/sonic-boom@4.2.
|
|
2395
|
+
const SonicBoom = __webpack_require__("../../node_modules/.pnpm/sonic-boom@4.2.1/node_modules/sonic-boom/index.js");
|
|
2396
2396
|
const onExit = __webpack_require__("../../node_modules/.pnpm/on-exit-leak-free@2.1.2/node_modules/on-exit-leak-free/index.js");
|
|
2397
2397
|
const { lsCacheSym, chindingsSym, writeSym, serializersSym, formatOptsSym, endSym, stringifiersSym, stringifySym, stringifySafeSym, wildcardFirstSym, nestedKeySym, formattersSym, messageKeySym, errorKeySym, nestedKeyStrSym, msgPrefixSym } = __webpack_require__("../../node_modules/.pnpm/pino@10.3.1/node_modules/pino/lib/symbols.js");
|
|
2398
2398
|
const { isMainThread } = __webpack_require__("worker_threads");
|
|
@@ -2999,7 +2999,7 @@ var __webpack_modules__ = {
|
|
|
2999
2999
|
module1.exports["default"] = pino;
|
|
3000
3000
|
module1.exports.pino = pino;
|
|
3001
3001
|
},
|
|
3002
|
-
"../../node_modules/.pnpm/sonic-boom@4.2.
|
|
3002
|
+
"../../node_modules/.pnpm/sonic-boom@4.2.1/node_modules/sonic-boom/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
3003
3003
|
"use strict";
|
|
3004
3004
|
const fs = __webpack_require__("fs");
|
|
3005
3005
|
const EventEmitter = __webpack_require__("events");
|
|
@@ -3105,8 +3105,14 @@ var __webpack_modules__ = {
|
|
|
3105
3105
|
this.flush = flush;
|
|
3106
3106
|
this.flushSync = flushSync;
|
|
3107
3107
|
this._actualWrite = actualWrite;
|
|
3108
|
-
fsWriteSync = ()=>
|
|
3109
|
-
|
|
3108
|
+
fsWriteSync = ()=>{
|
|
3109
|
+
if (Buffer.isBuffer(this._writingBuf)) return fs.writeSync(this.fd, this._writingBuf);
|
|
3110
|
+
return fs.writeSync(this.fd, this._writingBuf, 'utf8');
|
|
3111
|
+
};
|
|
3112
|
+
fsWrite = ()=>{
|
|
3113
|
+
if (Buffer.isBuffer(this._writingBuf)) return fs.write(this.fd, this._writingBuf, this.release);
|
|
3114
|
+
return fs.write(this.fd, this._writingBuf, 'utf8', this.release);
|
|
3115
|
+
};
|
|
3110
3116
|
} else throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`);
|
|
3111
3117
|
if ('number' == typeof fd) {
|
|
3112
3118
|
this.fd = fd;
|
|
@@ -3178,9 +3184,9 @@ var __webpack_modules__ = {
|
|
|
3178
3184
|
}
|
|
3179
3185
|
}
|
|
3180
3186
|
function releaseWritingBuf(writingBuf, len, n1) {
|
|
3181
|
-
if ('string' == typeof writingBuf
|
|
3187
|
+
if ('string' == typeof writingBuf) writingBuf = Buffer.from(writingBuf);
|
|
3182
3188
|
len = Math.max(len - n1, 0);
|
|
3183
|
-
writingBuf = writingBuf.
|
|
3189
|
+
writingBuf = writingBuf.subarray(n1);
|
|
3184
3190
|
return {
|
|
3185
3191
|
writingBuf,
|
|
3186
3192
|
len
|
|
@@ -3200,13 +3206,15 @@ var __webpack_modules__ = {
|
|
|
3200
3206
|
}
|
|
3201
3207
|
function write(data) {
|
|
3202
3208
|
if (this.destroyed) throw new Error('SonicBoom destroyed');
|
|
3203
|
-
|
|
3209
|
+
data = '' + data;
|
|
3210
|
+
const dataLen = Buffer.byteLength(data);
|
|
3211
|
+
const len = this._len + dataLen;
|
|
3204
3212
|
const bufs = this._bufs;
|
|
3205
3213
|
if (this.maxLength && len > this.maxLength) {
|
|
3206
3214
|
this.emit('drop', data);
|
|
3207
3215
|
return this._len < this._hwm;
|
|
3208
3216
|
}
|
|
3209
|
-
if (0 === bufs.length || bufs[bufs.length - 1]
|
|
3217
|
+
if (0 === bufs.length || Buffer.byteLength(bufs[bufs.length - 1]) + dataLen > this.maxWrite) bufs.push(data);
|
|
3210
3218
|
else bufs[bufs.length - 1] += data;
|
|
3211
3219
|
this._len = len;
|
|
3212
3220
|
if (!this._writing && this._len >= this.minLength) this._actualWrite();
|
|
@@ -3324,10 +3332,10 @@ var __webpack_modules__ = {
|
|
|
3324
3332
|
this._writingBuf = '';
|
|
3325
3333
|
}
|
|
3326
3334
|
let buf = '';
|
|
3327
|
-
while(this._bufs.length || buf){
|
|
3335
|
+
while(this._bufs.length || buf.length){
|
|
3328
3336
|
if (buf.length <= 0) buf = this._bufs[0];
|
|
3329
3337
|
try {
|
|
3330
|
-
const n1 = fs.writeSync(this.fd, buf, 'utf8');
|
|
3338
|
+
const n1 = Buffer.isBuffer(buf) ? fs.writeSync(this.fd, buf) : fs.writeSync(this.fd, buf, 'utf8');
|
|
3331
3339
|
const releasedBufObj = releaseWritingBuf(buf, this._len, n1);
|
|
3332
3340
|
buf = releasedBufObj.writingBuf;
|
|
3333
3341
|
this._len = releasedBufObj.len;
|
|
@@ -3376,14 +3384,14 @@ var __webpack_modules__ = {
|
|
|
3376
3384
|
function actualWrite() {
|
|
3377
3385
|
const release = this.release;
|
|
3378
3386
|
this._writing = true;
|
|
3379
|
-
this._writingBuf = this._writingBuf
|
|
3387
|
+
this._writingBuf = this._writingBuf.length ? this._writingBuf : this._bufs.shift() || '';
|
|
3380
3388
|
if (this.sync) try {
|
|
3381
|
-
const written = fs.writeSync(this.fd, this._writingBuf, 'utf8');
|
|
3389
|
+
const written = Buffer.isBuffer(this._writingBuf) ? fs.writeSync(this.fd, this._writingBuf) : fs.writeSync(this.fd, this._writingBuf, 'utf8');
|
|
3382
3390
|
release(null, written);
|
|
3383
3391
|
} catch (err) {
|
|
3384
3392
|
release(err);
|
|
3385
3393
|
}
|
|
3386
|
-
else fs.write(this.fd, this._writingBuf,
|
|
3394
|
+
else fs.write(this.fd, this._writingBuf, release);
|
|
3387
3395
|
}
|
|
3388
3396
|
function actualWriteBuffer() {
|
|
3389
3397
|
const release = this.release;
|