@rife/logger 0.0.6-beta.11 → 0.0.6-beta.12
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cjs/common.cjs +3 -3
- package/dist/cjs/env.cjs +3 -3
- package/dist/cjs/index.cjs +7 -9
- package/dist/cjs/pino/index.cjs +11 -7
- package/dist/cjs/pino/rotate.cjs +6 -6
- package/dist/cjs/pino/worker/pino-file.cjs +59 -58
- package/dist/cjs/pino/worker/pino-pretty.cjs +328 -375
- package/dist/cjs/pino/worker/pino-rotate.cjs +12 -12
- package/dist/cjs/pino/worker/pino-worker.cjs +134 -133
- package/dist/cjs/pino/worker/thread-stream.cjs +39 -37
- package/dist/cjs/test.cjs +6 -2
- package/dist/cjs/trace.cjs +3 -3
- package/dist/esm/common.mjs +2 -2
- package/dist/esm/pino/index.mjs +14 -10
- package/dist/esm/pino/rotate.mjs +3 -3
- package/dist/esm/pino/worker/pino-file.cjs +59 -58
- package/dist/esm/pino/worker/pino-pretty.cjs +328 -375
- package/dist/esm/pino/worker/pino-rotate.cjs +12 -12
- package/dist/esm/pino/worker/pino-worker.cjs +134 -133
- package/dist/esm/pino/worker/thread-stream.cjs +39 -37
- package/dist/esm/test.mjs +6 -2
- package/dist/worker/pino-file.cjs +59 -58
- package/dist/worker/pino-pretty.cjs +328 -375
- package/dist/worker/pino-rotate.cjs +12 -12
- package/dist/worker/pino-worker.cjs +134 -133
- package/dist/worker/thread-stream.cjs +39 -37
- package/package.json +5 -5
- package/src/pino/index.ts +4 -2
- package/src/test.ts +5 -2
|
@@ -1,30 +1,30 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
var __webpack_modules__ = {
|
|
3
|
-
child_process
|
|
3
|
+
child_process (module1) {
|
|
4
4
|
module1.exports = require("child_process");
|
|
5
5
|
},
|
|
6
|
-
fs
|
|
6
|
+
fs (module1) {
|
|
7
7
|
module1.exports = require("fs");
|
|
8
8
|
},
|
|
9
|
-
"fs/promises"
|
|
9
|
+
"fs/promises" (module1) {
|
|
10
10
|
module1.exports = require("fs/promises");
|
|
11
11
|
},
|
|
12
|
-
path
|
|
12
|
+
path (module1) {
|
|
13
13
|
module1.exports = require("path");
|
|
14
14
|
},
|
|
15
|
-
stream
|
|
15
|
+
stream (module1) {
|
|
16
16
|
module1.exports = require("stream");
|
|
17
17
|
},
|
|
18
|
-
timers
|
|
18
|
+
timers (module1) {
|
|
19
19
|
module1.exports = require("timers");
|
|
20
20
|
},
|
|
21
|
-
util
|
|
21
|
+
util (module1) {
|
|
22
22
|
module1.exports = require("util");
|
|
23
23
|
},
|
|
24
|
-
zlib
|
|
24
|
+
zlib (module1) {
|
|
25
25
|
module1.exports = require("zlib");
|
|
26
26
|
},
|
|
27
|
-
"../../node_modules/.pnpm/rotating-file-stream@3.2.7/node_modules/rotating-file-stream/dist/cjs/index.js"
|
|
27
|
+
"../../node_modules/.pnpm/rotating-file-stream@3.2.7/node_modules/rotating-file-stream/dist/cjs/index.js" (__unused_rspack_module, exports, __webpack_require__) {
|
|
28
28
|
Object.defineProperty(exports, "__esModule", {
|
|
29
29
|
value: true
|
|
30
30
|
});
|
|
@@ -565,7 +565,7 @@ function __webpack_require__(moduleId) {
|
|
|
565
565
|
})();
|
|
566
566
|
(()=>{
|
|
567
567
|
__webpack_require__.r = (exports)=>{
|
|
568
|
-
if (
|
|
568
|
+
if ("u" > typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports, Symbol.toStringTag, {
|
|
569
569
|
value: 'Module'
|
|
570
570
|
});
|
|
571
571
|
Object.defineProperty(exports, '__esModule', {
|
|
@@ -577,7 +577,7 @@ var __webpack_exports__ = {};
|
|
|
577
577
|
(()=>{
|
|
578
578
|
__webpack_require__.r(__webpack_exports__);
|
|
579
579
|
__webpack_require__.d(__webpack_exports__, {
|
|
580
|
-
default: ()=>
|
|
580
|
+
default: ()=>__rspack_default_export
|
|
581
581
|
});
|
|
582
582
|
const generator = (time, index)=>{
|
|
583
583
|
if (!time) return 'server.log';
|
|
@@ -590,7 +590,7 @@ var __webpack_exports__ = {};
|
|
|
590
590
|
}
|
|
591
591
|
return `server.${time.getFullYear()}${month}${day}.log`;
|
|
592
592
|
};
|
|
593
|
-
const
|
|
593
|
+
const __rspack_default_export = (options)=>{
|
|
594
594
|
const { createStream } = __webpack_require__("../../node_modules/.pnpm/rotating-file-stream@3.2.7/node_modules/rotating-file-stream/dist/cjs/index.js");
|
|
595
595
|
const { path } = options;
|
|
596
596
|
return createStream(generator, {
|
|
@@ -1,5 +1,6 @@
|
|
|
1
|
+
"use strict";
|
|
1
2
|
var __webpack_modules__ = {
|
|
2
|
-
"../../node_modules/.pnpm/@pinojs+redact@0.4.0/node_modules/@pinojs/redact/index.js"
|
|
3
|
+
"../../node_modules/.pnpm/@pinojs+redact@0.4.0/node_modules/@pinojs/redact/index.js" (module1) {
|
|
3
4
|
"use strict";
|
|
4
5
|
function deepClone(obj) {
|
|
5
6
|
if (null === obj || 'object' != typeof obj) return obj;
|
|
@@ -297,9 +298,9 @@ var __webpack_modules__ = {
|
|
|
297
298
|
}
|
|
298
299
|
module1.exports = slowRedact;
|
|
299
300
|
},
|
|
300
|
-
"../../node_modules/.pnpm/atomic-sleep@1.0.0/node_modules/atomic-sleep/index.js"
|
|
301
|
+
"../../node_modules/.pnpm/atomic-sleep@1.0.0/node_modules/atomic-sleep/index.js" (module1) {
|
|
301
302
|
"use strict";
|
|
302
|
-
if (
|
|
303
|
+
if ("u" > typeof SharedArrayBuffer && "u" > typeof Atomics) {
|
|
303
304
|
const nil = new Int32Array(new SharedArrayBuffer(4));
|
|
304
305
|
function sleep(ms) {
|
|
305
306
|
const valid = ms > 0 && ms < 1 / 0;
|
|
@@ -323,7 +324,7 @@ var __webpack_modules__ = {
|
|
|
323
324
|
module1.exports = sleep1;
|
|
324
325
|
}
|
|
325
326
|
},
|
|
326
|
-
"../../node_modules/.pnpm/on-exit-leak-free@2.1.2/node_modules/on-exit-leak-free/index.js"
|
|
327
|
+
"../../node_modules/.pnpm/on-exit-leak-free@2.1.2/node_modules/on-exit-leak-free/index.js" (module1) {
|
|
327
328
|
"use strict";
|
|
328
329
|
const refs = {
|
|
329
330
|
exit: [],
|
|
@@ -405,7 +406,7 @@ var __webpack_modules__ = {
|
|
|
405
406
|
unregister
|
|
406
407
|
};
|
|
407
408
|
},
|
|
408
|
-
"../../node_modules/.pnpm/pino-abstract-transport@2.0.0/node_modules/pino-abstract-transport/index.js"
|
|
409
|
+
"../../node_modules/.pnpm/pino-abstract-transport@2.0.0/node_modules/pino-abstract-transport/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
409
410
|
"use strict";
|
|
410
411
|
const metadata = Symbol.for('pino.metadata');
|
|
411
412
|
const split = __webpack_require__("../../node_modules/.pnpm/split2@4.2.0/node_modules/split2/index.js");
|
|
@@ -511,7 +512,7 @@ var __webpack_modules__ = {
|
|
|
511
512
|
process.nextTick(cb, err);
|
|
512
513
|
}
|
|
513
514
|
},
|
|
514
|
-
"../../node_modules/.pnpm/quick-format-unescaped@4.0.4/node_modules/quick-format-unescaped/index.js"
|
|
515
|
+
"../../node_modules/.pnpm/quick-format-unescaped@4.0.4/node_modules/quick-format-unescaped/index.js" (module1) {
|
|
515
516
|
"use strict";
|
|
516
517
|
function tryStringify(o) {
|
|
517
518
|
try {
|
|
@@ -607,7 +608,7 @@ var __webpack_modules__ = {
|
|
|
607
608
|
return str;
|
|
608
609
|
}
|
|
609
610
|
},
|
|
610
|
-
"../../node_modules/.pnpm/real-require@0.2.0/node_modules/real-require/src/index.js"
|
|
611
|
+
"../../node_modules/.pnpm/real-require@0.2.0/node_modules/real-require/src/index.js" (module1) {
|
|
611
612
|
const realImport = new Function('modulePath', 'return import(modulePath)');
|
|
612
613
|
function realRequire(modulePath) {
|
|
613
614
|
if ('function' == typeof __non_webpack__require__) return __non_webpack__require__(modulePath);
|
|
@@ -618,7 +619,7 @@ var __webpack_modules__ = {
|
|
|
618
619
|
realRequire
|
|
619
620
|
};
|
|
620
621
|
},
|
|
621
|
-
"../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/index.js"
|
|
622
|
+
"../../node_modules/.pnpm/safe-stable-stringify@2.5.0/node_modules/safe-stable-stringify/index.js" (module1, exports) {
|
|
622
623
|
"use strict";
|
|
623
624
|
const { hasOwnProperty } = Object.prototype;
|
|
624
625
|
const stringify = configure();
|
|
@@ -1062,7 +1063,7 @@ var __webpack_modules__ = {
|
|
|
1062
1063
|
return stringify;
|
|
1063
1064
|
}
|
|
1064
1065
|
},
|
|
1065
|
-
"../../node_modules/.pnpm/split2@4.2.0/node_modules/split2/index.js"
|
|
1066
|
+
"../../node_modules/.pnpm/split2@4.2.0/node_modules/split2/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
1066
1067
|
"use strict";
|
|
1067
1068
|
const { Transform } = __webpack_require__("stream");
|
|
1068
1069
|
const { StringDecoder } = __webpack_require__("string_decoder");
|
|
@@ -1150,7 +1151,7 @@ var __webpack_modules__ = {
|
|
|
1150
1151
|
}
|
|
1151
1152
|
module1.exports = split;
|
|
1152
1153
|
},
|
|
1153
|
-
"../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/index.js"
|
|
1154
|
+
"../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
1154
1155
|
"use strict";
|
|
1155
1156
|
const { version } = __webpack_require__("../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/package.json");
|
|
1156
1157
|
const { EventEmitter } = __webpack_require__("events");
|
|
@@ -1504,7 +1505,7 @@ var __webpack_modules__ = {
|
|
|
1504
1505
|
}
|
|
1505
1506
|
module1.exports = ThreadStream;
|
|
1506
1507
|
},
|
|
1507
|
-
"../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/lib/indexes.js"
|
|
1508
|
+
"../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/lib/indexes.js" (module1) {
|
|
1508
1509
|
"use strict";
|
|
1509
1510
|
const WRITE_INDEX = 4;
|
|
1510
1511
|
const READ_INDEX = 8;
|
|
@@ -1513,7 +1514,7 @@ var __webpack_modules__ = {
|
|
|
1513
1514
|
READ_INDEX
|
|
1514
1515
|
};
|
|
1515
1516
|
},
|
|
1516
|
-
"../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/lib/wait.js"
|
|
1517
|
+
"../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/lib/wait.js" (module1) {
|
|
1517
1518
|
"use strict";
|
|
1518
1519
|
const MAX_TIMEOUT = 1000;
|
|
1519
1520
|
function wait(state, index, expected, timeout, done) {
|
|
@@ -1551,154 +1552,71 @@ var __webpack_modules__ = {
|
|
|
1551
1552
|
waitDiff
|
|
1552
1553
|
};
|
|
1553
1554
|
},
|
|
1554
|
-
assert
|
|
1555
|
+
assert (module1) {
|
|
1555
1556
|
"use strict";
|
|
1556
1557
|
module1.exports = require("assert");
|
|
1557
1558
|
},
|
|
1558
|
-
buffer
|
|
1559
|
+
buffer (module1) {
|
|
1559
1560
|
"use strict";
|
|
1560
1561
|
module1.exports = require("buffer");
|
|
1561
1562
|
},
|
|
1562
|
-
events
|
|
1563
|
+
events (module1) {
|
|
1563
1564
|
"use strict";
|
|
1564
1565
|
module1.exports = require("events");
|
|
1565
1566
|
},
|
|
1566
|
-
fs
|
|
1567
|
+
fs (module1) {
|
|
1567
1568
|
"use strict";
|
|
1568
1569
|
module1.exports = require("fs");
|
|
1569
1570
|
},
|
|
1570
|
-
module
|
|
1571
|
+
module (module1) {
|
|
1571
1572
|
"use strict";
|
|
1572
1573
|
module1.exports = require("module");
|
|
1573
1574
|
},
|
|
1574
|
-
"node:diagnostics_channel"
|
|
1575
|
+
"node:diagnostics_channel" (module1) {
|
|
1575
1576
|
"use strict";
|
|
1576
1577
|
module1.exports = require("node:diagnostics_channel");
|
|
1577
1578
|
},
|
|
1578
|
-
"node:events"
|
|
1579
|
+
"node:events" (module1) {
|
|
1579
1580
|
"use strict";
|
|
1580
1581
|
module1.exports = require("node:events");
|
|
1581
1582
|
},
|
|
1582
|
-
"node:os"
|
|
1583
|
+
"node:os" (module1) {
|
|
1583
1584
|
"use strict";
|
|
1584
1585
|
module1.exports = require("node:os");
|
|
1585
1586
|
},
|
|
1586
|
-
"node:path"
|
|
1587
|
+
"node:path" (module1) {
|
|
1587
1588
|
"use strict";
|
|
1588
1589
|
module1.exports = require("node:path");
|
|
1589
1590
|
},
|
|
1590
|
-
"node:stream"
|
|
1591
|
+
"node:stream" (module1) {
|
|
1591
1592
|
"use strict";
|
|
1592
1593
|
module1.exports = require("node:stream");
|
|
1593
1594
|
},
|
|
1594
|
-
path
|
|
1595
|
+
path (module1) {
|
|
1595
1596
|
"use strict";
|
|
1596
1597
|
module1.exports = require("path");
|
|
1597
1598
|
},
|
|
1598
|
-
stream
|
|
1599
|
+
stream (module1) {
|
|
1599
1600
|
"use strict";
|
|
1600
1601
|
module1.exports = require("stream");
|
|
1601
1602
|
},
|
|
1602
|
-
string_decoder
|
|
1603
|
+
string_decoder (module1) {
|
|
1603
1604
|
"use strict";
|
|
1604
1605
|
module1.exports = require("string_decoder");
|
|
1605
1606
|
},
|
|
1606
|
-
url
|
|
1607
|
+
url (module1) {
|
|
1607
1608
|
"use strict";
|
|
1608
1609
|
module1.exports = require("url");
|
|
1609
1610
|
},
|
|
1610
|
-
util
|
|
1611
|
+
util (module1) {
|
|
1611
1612
|
"use strict";
|
|
1612
1613
|
module1.exports = require("util");
|
|
1613
1614
|
},
|
|
1614
|
-
worker_threads
|
|
1615
|
+
worker_threads (module1) {
|
|
1615
1616
|
"use strict";
|
|
1616
1617
|
module1.exports = require("worker_threads");
|
|
1617
1618
|
},
|
|
1618
|
-
"../../node_modules/.pnpm/pino@
|
|
1619
|
-
"use strict";
|
|
1620
|
-
const EE = __webpack_require__("node:events");
|
|
1621
|
-
const { pipeline, PassThrough } = __webpack_require__("node:stream");
|
|
1622
|
-
const pino = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/pino.js");
|
|
1623
|
-
const build = __webpack_require__("../../node_modules/.pnpm/pino-abstract-transport@2.0.0/node_modules/pino-abstract-transport/index.js");
|
|
1624
|
-
const loadTransportStreamBuilder = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/transport-stream.js");
|
|
1625
|
-
module1.exports = async function({ targets, pipelines, levels, dedupe }) {
|
|
1626
|
-
const targetStreams = [];
|
|
1627
|
-
if (targets && targets.length) {
|
|
1628
|
-
targets = await Promise.all(targets.map(async (t)=>{
|
|
1629
|
-
const fn = await loadTransportStreamBuilder(t.target);
|
|
1630
|
-
const stream = await fn(t.options);
|
|
1631
|
-
return {
|
|
1632
|
-
level: t.level,
|
|
1633
|
-
stream
|
|
1634
|
-
};
|
|
1635
|
-
}));
|
|
1636
|
-
targetStreams.push(...targets);
|
|
1637
|
-
}
|
|
1638
|
-
if (pipelines && pipelines.length) {
|
|
1639
|
-
pipelines = await Promise.all(pipelines.map(async (p)=>{
|
|
1640
|
-
let level;
|
|
1641
|
-
const pipeDests = await Promise.all(p.map(async (t)=>{
|
|
1642
|
-
level = t.level;
|
|
1643
|
-
const fn = await loadTransportStreamBuilder(t.target);
|
|
1644
|
-
const stream = await fn(t.options);
|
|
1645
|
-
return stream;
|
|
1646
|
-
}));
|
|
1647
|
-
return {
|
|
1648
|
-
level,
|
|
1649
|
-
stream: createPipeline(pipeDests)
|
|
1650
|
-
};
|
|
1651
|
-
}));
|
|
1652
|
-
targetStreams.push(...pipelines);
|
|
1653
|
-
}
|
|
1654
|
-
if (1 === targetStreams.length) return targetStreams[0].stream;
|
|
1655
|
-
return build(process1, {
|
|
1656
|
-
parse: 'lines',
|
|
1657
|
-
metadata: true,
|
|
1658
|
-
close (err, cb) {
|
|
1659
|
-
let expected = 0;
|
|
1660
|
-
for (const transport of targetStreams){
|
|
1661
|
-
expected++;
|
|
1662
|
-
transport.stream.on('close', closeCb);
|
|
1663
|
-
transport.stream.end();
|
|
1664
|
-
}
|
|
1665
|
-
function closeCb() {
|
|
1666
|
-
if (0 === --expected) cb(err);
|
|
1667
|
-
}
|
|
1668
|
-
}
|
|
1669
|
-
});
|
|
1670
|
-
function process1(stream) {
|
|
1671
|
-
const multi = pino.multistream(targetStreams, {
|
|
1672
|
-
levels,
|
|
1673
|
-
dedupe
|
|
1674
|
-
});
|
|
1675
|
-
stream.on('data', function(chunk) {
|
|
1676
|
-
const { lastTime, lastMsg, lastObj, lastLevel } = this;
|
|
1677
|
-
multi.lastLevel = lastLevel;
|
|
1678
|
-
multi.lastTime = lastTime;
|
|
1679
|
-
multi.lastMsg = lastMsg;
|
|
1680
|
-
multi.lastObj = lastObj;
|
|
1681
|
-
multi.write(chunk + '\n');
|
|
1682
|
-
});
|
|
1683
|
-
}
|
|
1684
|
-
function createPipeline(streams) {
|
|
1685
|
-
const ee = new EE();
|
|
1686
|
-
const stream = new PassThrough({
|
|
1687
|
-
autoDestroy: true,
|
|
1688
|
-
destroy (_, cb) {
|
|
1689
|
-
ee.on('error', cb);
|
|
1690
|
-
ee.on('closed', cb);
|
|
1691
|
-
}
|
|
1692
|
-
});
|
|
1693
|
-
pipeline(stream, ...streams, function(err) {
|
|
1694
|
-
if (err && 'ERR_STREAM_PREMATURE_CLOSE' !== err.code) return void ee.emit('error', err);
|
|
1695
|
-
ee.emit('closed');
|
|
1696
|
-
});
|
|
1697
|
-
return stream;
|
|
1698
|
-
}
|
|
1699
|
-
};
|
|
1700
|
-
},
|
|
1701
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/index.js": function(module1, __unused_webpack_exports, __webpack_require__) {
|
|
1619
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
1702
1620
|
"use strict";
|
|
1703
1621
|
const errSerializer = __webpack_require__("../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err.js");
|
|
1704
1622
|
const errWithCauseSerializer = __webpack_require__("../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-with-cause.js");
|
|
@@ -1731,7 +1649,7 @@ var __webpack_modules__ = {
|
|
|
1731
1649
|
}
|
|
1732
1650
|
};
|
|
1733
1651
|
},
|
|
1734
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-helpers.js"
|
|
1652
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-helpers.js" (module1) {
|
|
1735
1653
|
"use strict";
|
|
1736
1654
|
const isErrorLike = (err)=>err && 'string' == typeof err.message;
|
|
1737
1655
|
const getErrorCause = (err)=>{
|
|
@@ -1773,7 +1691,7 @@ var __webpack_modules__ = {
|
|
|
1773
1691
|
messageWithCauses
|
|
1774
1692
|
};
|
|
1775
1693
|
},
|
|
1776
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-proto.js"
|
|
1694
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-proto.js" (module1) {
|
|
1777
1695
|
"use strict";
|
|
1778
1696
|
const seen = Symbol('circular-ref-tag');
|
|
1779
1697
|
const rawSymbol = Symbol('pino-raw-err-ref');
|
|
@@ -1820,7 +1738,7 @@ var __webpack_modules__ = {
|
|
|
1820
1738
|
}
|
|
1821
1739
|
};
|
|
1822
1740
|
},
|
|
1823
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-with-cause.js"
|
|
1741
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-with-cause.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
1824
1742
|
"use strict";
|
|
1825
1743
|
module1.exports = errWithCauseSerializer;
|
|
1826
1744
|
const { isErrorLike } = __webpack_require__("../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-helpers.js");
|
|
@@ -1847,7 +1765,7 @@ var __webpack_modules__ = {
|
|
|
1847
1765
|
return _err;
|
|
1848
1766
|
}
|
|
1849
1767
|
},
|
|
1850
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err.js"
|
|
1768
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
1851
1769
|
"use strict";
|
|
1852
1770
|
module1.exports = errSerializer;
|
|
1853
1771
|
const { messageWithCauses, stackWithCauses, isErrorLike } = __webpack_require__("../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/err-helpers.js");
|
|
@@ -1873,7 +1791,7 @@ var __webpack_modules__ = {
|
|
|
1873
1791
|
return _err;
|
|
1874
1792
|
}
|
|
1875
1793
|
},
|
|
1876
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/req.js"
|
|
1794
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/req.js" (module1) {
|
|
1877
1795
|
"use strict";
|
|
1878
1796
|
module1.exports = {
|
|
1879
1797
|
mapHttpRequest,
|
|
@@ -1959,7 +1877,7 @@ var __webpack_modules__ = {
|
|
|
1959
1877
|
};
|
|
1960
1878
|
}
|
|
1961
1879
|
},
|
|
1962
|
-
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/res.js"
|
|
1880
|
+
"../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/lib/res.js" (module1) {
|
|
1963
1881
|
"use strict";
|
|
1964
1882
|
module1.exports = {
|
|
1965
1883
|
mapHttpResponse,
|
|
@@ -2004,7 +1922,7 @@ var __webpack_modules__ = {
|
|
|
2004
1922
|
};
|
|
2005
1923
|
}
|
|
2006
1924
|
},
|
|
2007
|
-
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/caller.js"
|
|
1925
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/caller.js" (module1) {
|
|
2008
1926
|
"use strict";
|
|
2009
1927
|
function noOpPrepareStackTrace(_, stack) {
|
|
2010
1928
|
return stack;
|
|
@@ -2021,7 +1939,7 @@ var __webpack_modules__ = {
|
|
|
2021
1939
|
return fileNames;
|
|
2022
1940
|
};
|
|
2023
1941
|
},
|
|
2024
|
-
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/constants.js"
|
|
1942
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/constants.js" (module1) {
|
|
2025
1943
|
const DEFAULT_LEVELS = {
|
|
2026
1944
|
trace: 10,
|
|
2027
1945
|
debug: 20,
|
|
@@ -2039,7 +1957,7 @@ var __webpack_modules__ = {
|
|
|
2039
1957
|
SORTING_ORDER
|
|
2040
1958
|
};
|
|
2041
1959
|
},
|
|
2042
|
-
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/levels.js"
|
|
1960
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/levels.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
2043
1961
|
"use strict";
|
|
2044
1962
|
const { lsCacheSym, levelValSym, useOnlyCustomLevelsSym, streamSym, formattersSym, hooksSym, levelCompSym } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/symbols.js");
|
|
2045
1963
|
const { noop, genLog } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/tools.js");
|
|
@@ -2191,13 +2109,13 @@ var __webpack_modules__ = {
|
|
|
2191
2109
|
assertLevelComparison
|
|
2192
2110
|
};
|
|
2193
2111
|
},
|
|
2194
|
-
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/meta.js"
|
|
2112
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/meta.js" (module1) {
|
|
2195
2113
|
"use strict";
|
|
2196
2114
|
module1.exports = {
|
|
2197
2115
|
version: '10.1.0'
|
|
2198
2116
|
};
|
|
2199
2117
|
},
|
|
2200
|
-
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/multistream.js"
|
|
2118
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/multistream.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
2201
2119
|
"use strict";
|
|
2202
2120
|
const metadata = Symbol.for('pino.metadata');
|
|
2203
2121
|
const { DEFAULT_LEVELS } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/constants.js");
|
|
@@ -2328,7 +2246,7 @@ var __webpack_modules__ = {
|
|
|
2328
2246
|
}
|
|
2329
2247
|
module1.exports = multistream;
|
|
2330
2248
|
},
|
|
2331
|
-
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/proto.js"
|
|
2249
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/proto.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
2332
2250
|
"use strict";
|
|
2333
2251
|
const { EventEmitter } = __webpack_require__("node:events");
|
|
2334
2252
|
const { lsCacheSym, levelValSym, setLevelSym, getLevelSym, chindingsSym, mixinSym, asJsonSym, writeSym, mixinMergeStrategySym, timeSym, timeSliceIndexSym, streamSym, serializersSym, formattersSym, errorKeySym, messageKeySym, useOnlyCustomLevelsSym, needsMetadataGsym, redactFmtSym, stringifySym, formatOptsSym, stringifiersSym, msgPrefixSym, hooksSym } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/symbols.js");
|
|
@@ -2481,7 +2399,7 @@ var __webpack_modules__ = {
|
|
|
2481
2399
|
else if (cb) cb();
|
|
2482
2400
|
}
|
|
2483
2401
|
},
|
|
2484
|
-
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/redaction.js"
|
|
2402
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/redaction.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
2485
2403
|
"use strict";
|
|
2486
2404
|
const Redact = __webpack_require__("../../node_modules/.pnpm/@pinojs+redact@0.4.0/node_modules/@pinojs/redact/index.js");
|
|
2487
2405
|
const { redactFmtSym, wildcardFirstSym } = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/symbols.js");
|
|
@@ -2563,7 +2481,7 @@ var __webpack_modules__ = {
|
|
|
2563
2481
|
}
|
|
2564
2482
|
module1.exports = redaction;
|
|
2565
2483
|
},
|
|
2566
|
-
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/symbols.js"
|
|
2484
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/symbols.js" (module1) {
|
|
2567
2485
|
"use strict";
|
|
2568
2486
|
const setLevelSym = Symbol('pino.setLevel');
|
|
2569
2487
|
const getLevelSym = Symbol('pino.getLevel');
|
|
@@ -2630,7 +2548,7 @@ var __webpack_modules__ = {
|
|
|
2630
2548
|
msgPrefixSym
|
|
2631
2549
|
};
|
|
2632
2550
|
},
|
|
2633
|
-
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/time.js"
|
|
2551
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/time.js" (module1) {
|
|
2634
2552
|
"use strict";
|
|
2635
2553
|
const nullTime = ()=>'';
|
|
2636
2554
|
const epochTime = ()=>`,"time":${Date.now()}`;
|
|
@@ -2663,7 +2581,7 @@ var __webpack_modules__ = {
|
|
|
2663
2581
|
isoTimeNano
|
|
2664
2582
|
};
|
|
2665
2583
|
},
|
|
2666
|
-
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/tools.js"
|
|
2584
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/tools.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
2667
2585
|
"use strict";
|
|
2668
2586
|
const diagChan = __webpack_require__("node:diagnostics_channel");
|
|
2669
2587
|
const format = __webpack_require__("../../node_modules/.pnpm/quick-format-unescaped@4.0.4/node_modules/quick-format-unescaped/index.js");
|
|
@@ -2933,7 +2851,7 @@ var __webpack_modules__ = {
|
|
|
2933
2851
|
normalizeDestFileDescriptor
|
|
2934
2852
|
};
|
|
2935
2853
|
},
|
|
2936
|
-
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/transport-stream.js"
|
|
2854
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/transport-stream.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
2937
2855
|
"use strict";
|
|
2938
2856
|
const { realImport, realRequire } = __webpack_require__("../../node_modules/.pnpm/real-require@0.2.0/node_modules/real-require/src/index.js");
|
|
2939
2857
|
module1.exports = loadTransportStreamBuilder;
|
|
@@ -2961,7 +2879,7 @@ var __webpack_modules__ = {
|
|
|
2961
2879
|
return fn;
|
|
2962
2880
|
}
|
|
2963
2881
|
},
|
|
2964
|
-
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/transport.js"
|
|
2882
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/transport.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
2965
2883
|
"use strict";
|
|
2966
2884
|
const { createRequire } = __webpack_require__("module");
|
|
2967
2885
|
const getCallers = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/caller.js");
|
|
@@ -3065,7 +2983,90 @@ var __webpack_modules__ = {
|
|
|
3065
2983
|
}
|
|
3066
2984
|
module1.exports = transport;
|
|
3067
2985
|
},
|
|
3068
|
-
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/
|
|
2986
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/worker.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
2987
|
+
"use strict";
|
|
2988
|
+
const EE = __webpack_require__("node:events");
|
|
2989
|
+
const { pipeline, PassThrough } = __webpack_require__("node:stream");
|
|
2990
|
+
const pino = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/pino.js");
|
|
2991
|
+
const build = __webpack_require__("../../node_modules/.pnpm/pino-abstract-transport@2.0.0/node_modules/pino-abstract-transport/index.js");
|
|
2992
|
+
const loadTransportStreamBuilder = __webpack_require__("../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/lib/transport-stream.js");
|
|
2993
|
+
module1.exports = async function({ targets, pipelines, levels, dedupe }) {
|
|
2994
|
+
const targetStreams = [];
|
|
2995
|
+
if (targets && targets.length) {
|
|
2996
|
+
targets = await Promise.all(targets.map(async (t)=>{
|
|
2997
|
+
const fn = await loadTransportStreamBuilder(t.target);
|
|
2998
|
+
const stream = await fn(t.options);
|
|
2999
|
+
return {
|
|
3000
|
+
level: t.level,
|
|
3001
|
+
stream
|
|
3002
|
+
};
|
|
3003
|
+
}));
|
|
3004
|
+
targetStreams.push(...targets);
|
|
3005
|
+
}
|
|
3006
|
+
if (pipelines && pipelines.length) {
|
|
3007
|
+
pipelines = await Promise.all(pipelines.map(async (p)=>{
|
|
3008
|
+
let level;
|
|
3009
|
+
const pipeDests = await Promise.all(p.map(async (t)=>{
|
|
3010
|
+
level = t.level;
|
|
3011
|
+
const fn = await loadTransportStreamBuilder(t.target);
|
|
3012
|
+
const stream = await fn(t.options);
|
|
3013
|
+
return stream;
|
|
3014
|
+
}));
|
|
3015
|
+
return {
|
|
3016
|
+
level,
|
|
3017
|
+
stream: createPipeline(pipeDests)
|
|
3018
|
+
};
|
|
3019
|
+
}));
|
|
3020
|
+
targetStreams.push(...pipelines);
|
|
3021
|
+
}
|
|
3022
|
+
if (1 === targetStreams.length) return targetStreams[0].stream;
|
|
3023
|
+
return build(process1, {
|
|
3024
|
+
parse: 'lines',
|
|
3025
|
+
metadata: true,
|
|
3026
|
+
close (err, cb) {
|
|
3027
|
+
let expected = 0;
|
|
3028
|
+
for (const transport of targetStreams){
|
|
3029
|
+
expected++;
|
|
3030
|
+
transport.stream.on('close', closeCb);
|
|
3031
|
+
transport.stream.end();
|
|
3032
|
+
}
|
|
3033
|
+
function closeCb() {
|
|
3034
|
+
if (0 === --expected) cb(err);
|
|
3035
|
+
}
|
|
3036
|
+
}
|
|
3037
|
+
});
|
|
3038
|
+
function process1(stream) {
|
|
3039
|
+
const multi = pino.multistream(targetStreams, {
|
|
3040
|
+
levels,
|
|
3041
|
+
dedupe
|
|
3042
|
+
});
|
|
3043
|
+
stream.on('data', function(chunk) {
|
|
3044
|
+
const { lastTime, lastMsg, lastObj, lastLevel } = this;
|
|
3045
|
+
multi.lastLevel = lastLevel;
|
|
3046
|
+
multi.lastTime = lastTime;
|
|
3047
|
+
multi.lastMsg = lastMsg;
|
|
3048
|
+
multi.lastObj = lastObj;
|
|
3049
|
+
multi.write(chunk + '\n');
|
|
3050
|
+
});
|
|
3051
|
+
}
|
|
3052
|
+
function createPipeline(streams) {
|
|
3053
|
+
const ee = new EE();
|
|
3054
|
+
const stream = new PassThrough({
|
|
3055
|
+
autoDestroy: true,
|
|
3056
|
+
destroy (_, cb) {
|
|
3057
|
+
ee.on('error', cb);
|
|
3058
|
+
ee.on('closed', cb);
|
|
3059
|
+
}
|
|
3060
|
+
});
|
|
3061
|
+
pipeline(stream, ...streams, function(err) {
|
|
3062
|
+
if (err && 'ERR_STREAM_PREMATURE_CLOSE' !== err.code) return void ee.emit('error', err);
|
|
3063
|
+
ee.emit('closed');
|
|
3064
|
+
});
|
|
3065
|
+
return stream;
|
|
3066
|
+
}
|
|
3067
|
+
};
|
|
3068
|
+
},
|
|
3069
|
+
"../../node_modules/.pnpm/pino@10.1.0/node_modules/pino/pino.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
3069
3070
|
"use strict";
|
|
3070
3071
|
const os = __webpack_require__("node:os");
|
|
3071
3072
|
const stdSerializers = __webpack_require__("../../node_modules/.pnpm/pino-std-serializers@7.0.0/node_modules/pino-std-serializers/index.js");
|
|
@@ -3222,7 +3223,7 @@ var __webpack_modules__ = {
|
|
|
3222
3223
|
module1.exports["default"] = pino;
|
|
3223
3224
|
module1.exports.pino = pino;
|
|
3224
3225
|
},
|
|
3225
|
-
"../../node_modules/.pnpm/sonic-boom@4.2.0/node_modules/sonic-boom/index.js"
|
|
3226
|
+
"../../node_modules/.pnpm/sonic-boom@4.2.0/node_modules/sonic-boom/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
|
|
3226
3227
|
"use strict";
|
|
3227
3228
|
const fs = __webpack_require__("fs");
|
|
3228
3229
|
const EventEmitter = __webpack_require__("events");
|
|
@@ -3647,7 +3648,7 @@ var __webpack_modules__ = {
|
|
|
3647
3648
|
SonicBoom.default = SonicBoom;
|
|
3648
3649
|
module1.exports = SonicBoom;
|
|
3649
3650
|
},
|
|
3650
|
-
"../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/package.json"
|
|
3651
|
+
"../../node_modules/.pnpm/thread-stream@3.1.0/node_modules/thread-stream/package.json" (module1) {
|
|
3651
3652
|
"use strict";
|
|
3652
3653
|
module1.exports = JSON.parse('{"name":"thread-stream","version":"3.1.0","description":"A streaming way to send data to a Node.js Worker Thread","main":"index.js","types":"index.d.ts","dependencies":{"real-require":"^0.2.0"},"devDependencies":{"@types/node":"^20.1.0","@types/tap":"^15.0.0","@yao-pkg/pkg":"^5.11.5","desm":"^1.3.0","fastbench":"^1.0.1","husky":"^9.0.6","pino-elasticsearch":"^8.0.0","sonic-boom":"^4.0.1","standard":"^17.0.0","tap":"^16.2.0","ts-node":"^10.8.0","typescript":"^5.3.2","why-is-node-running":"^2.2.2"},"scripts":{"build":"tsc --noEmit","test":"standard && npm run build && npm run transpile && tap \\"test/**/*.test.*js\\" && tap --ts test/*.test.*ts","test:ci":"standard && npm run transpile && npm run test:ci:js && npm run test:ci:ts","test:ci:js":"tap --no-check-coverage --timeout=120 --coverage-report=lcovonly \\"test/**/*.test.*js\\"","test:ci:ts":"tap --ts --no-check-coverage --coverage-report=lcovonly \\"test/**/*.test.*ts\\"","test:yarn":"npm run transpile && tap \\"test/**/*.test.js\\" --no-check-coverage","transpile":"sh ./test/ts/transpile.sh","prepare":"husky install"},"standard":{"ignore":["test/ts/**/*","test/syntax-error.mjs"]},"repository":{"type":"git","url":"git+https://github.com/mcollina/thread-stream.git"},"keywords":["worker","thread","threads","stream"],"author":"Matteo Collina <hello@matteocollina.com>","license":"MIT","bugs":{"url":"https://github.com/mcollina/thread-stream/issues"},"homepage":"https://github.com/mcollina/thread-stream#readme"}');
|
|
3653
3654
|
}
|