@rife/logger 0.0.6-beta.15 → 0.0.6-beta.17

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.
@@ -946,19 +946,32 @@ var __webpack_modules__ = {
946
946
  return stringify;
947
947
  }
948
948
  },
949
- "../../node_modules/.pnpm/thread-stream@4.0.0/node_modules/thread-stream/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
949
+ "../../node_modules/.pnpm/thread-stream@4.2.0/node_modules/thread-stream/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
950
950
  "use strict";
951
- const { version } = __webpack_require__("../../node_modules/.pnpm/thread-stream@4.0.0/node_modules/thread-stream/package.json");
951
+ const { version } = __webpack_require__("../../node_modules/.pnpm/thread-stream@4.2.0/node_modules/thread-stream/package.json");
952
952
  const { EventEmitter } = __webpack_require__("events");
953
953
  const { Worker } = __webpack_require__("worker_threads");
954
954
  const { join } = __webpack_require__("path");
955
955
  const { pathToFileURL } = __webpack_require__("url");
956
- const { wait } = __webpack_require__("../../node_modules/.pnpm/thread-stream@4.0.0/node_modules/thread-stream/lib/wait.js");
957
- const { WRITE_INDEX, READ_INDEX } = __webpack_require__("../../node_modules/.pnpm/thread-stream@4.0.0/node_modules/thread-stream/lib/indexes.js");
956
+ const { wait } = __webpack_require__("../../node_modules/.pnpm/thread-stream@4.2.0/node_modules/thread-stream/lib/wait.js");
957
+ const { WRITE_INDEX, READ_INDEX, SEQ_INDEX } = __webpack_require__("../../node_modules/.pnpm/thread-stream@4.2.0/node_modules/thread-stream/lib/indexes.js");
958
958
  const buffer = __webpack_require__("buffer");
959
959
  const assert = __webpack_require__("assert");
960
960
  const kImpl = Symbol('kImpl');
961
961
  const MAX_STRING = buffer.constants.MAX_STRING_LENGTH;
962
+ function noop() {}
963
+ function updateState(stream, fn) {
964
+ Atomics.add(stream[kImpl].state, SEQ_INDEX, 1);
965
+ fn();
966
+ Atomics.add(stream[kImpl].state, SEQ_INDEX, 1);
967
+ Atomics.notify(stream[kImpl].state, SEQ_INDEX);
968
+ }
969
+ function resetIndexes(stream) {
970
+ updateState(stream, ()=>{
971
+ Atomics.store(stream[kImpl].state, READ_INDEX, 0);
972
+ Atomics.store(stream[kImpl].state, WRITE_INDEX, 0);
973
+ });
974
+ }
962
975
  class FakeWeakRef {
963
976
  constructor(value){
964
977
  this._value = value;
@@ -983,6 +996,7 @@ var __webpack_modules__ = {
983
996
  const toExecute = bundlerOverrides['thread-stream-worker'] || join(__dirname, 'lib', 'worker.js');
984
997
  const worker = new Worker(toExecute, {
985
998
  ...opts.workerOpts,
999
+ name: opts.workerOpts?.name || 'thread-stream',
986
1000
  trackUnmanagedFds: false,
987
1001
  workerData: {
988
1002
  filename: 0 === filename.indexOf('file://') ? filename : pathToFileURL(filename).href,
@@ -1010,42 +1024,31 @@ var __webpack_modules__ = {
1010
1024
  }
1011
1025
  }
1012
1026
  function nextFlush(stream) {
1013
- const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX);
1014
- let leftover = stream[kImpl].data.length - writeIndex;
1015
- if (leftover > 0) {
1016
- if (0 === stream[kImpl].buf.length) {
1017
- stream[kImpl].flushing = false;
1018
- if (stream[kImpl].ending) end(stream);
1019
- else if (stream[kImpl].needDrain) process.nextTick(drain, stream);
1027
+ while(true){
1028
+ const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX);
1029
+ const leftover = stream[kImpl].data.length - writeIndex;
1030
+ if (leftover > 0) {
1031
+ if (0 === stream[kImpl].bufLen) {
1032
+ stream[kImpl].flushing = false;
1033
+ if (stream[kImpl].ending) end(stream);
1034
+ else if (stream[kImpl].needDrain) process.nextTick(drain, stream);
1035
+ return;
1036
+ }
1037
+ write(stream, leftover, noop);
1038
+ continue;
1039
+ }
1040
+ if (0 === leftover) {
1041
+ if (0 === writeIndex && 0 === stream[kImpl].bufLen) return;
1042
+ waitForRead(stream, ()=>{
1043
+ if (stream.destroyed) return;
1044
+ resetIndexes(stream);
1045
+ nextFlush(stream);
1046
+ });
1020
1047
  return;
1021
1048
  }
1022
- let toWrite = stream[kImpl].buf.slice(0, leftover);
1023
- let toWriteBytes = Buffer.byteLength(toWrite);
1024
- if (toWriteBytes <= leftover) {
1025
- stream[kImpl].buf = stream[kImpl].buf.slice(leftover);
1026
- write(stream, toWrite, nextFlush.bind(null, stream));
1027
- } else stream.flush(()=>{
1028
- if (stream.destroyed) return;
1029
- Atomics.store(stream[kImpl].state, READ_INDEX, 0);
1030
- Atomics.store(stream[kImpl].state, WRITE_INDEX, 0);
1031
- Atomics.notify(stream[kImpl].state, READ_INDEX);
1032
- while(toWriteBytes > stream[kImpl].data.length){
1033
- leftover /= 2;
1034
- toWrite = stream[kImpl].buf.slice(0, leftover);
1035
- toWriteBytes = Buffer.byteLength(toWrite);
1036
- }
1037
- stream[kImpl].buf = stream[kImpl].buf.slice(leftover);
1038
- write(stream, toWrite, nextFlush.bind(null, stream));
1039
- });
1040
- } else if (0 === leftover) {
1041
- if (0 === writeIndex && 0 === stream[kImpl].buf.length) return;
1042
- stream.flush(()=>{
1043
- Atomics.store(stream[kImpl].state, READ_INDEX, 0);
1044
- Atomics.store(stream[kImpl].state, WRITE_INDEX, 0);
1045
- Atomics.notify(stream[kImpl].state, READ_INDEX);
1046
- nextFlush(stream);
1047
- });
1048
- } else destroy(stream, new Error('overwritten'));
1049
+ destroy(stream, new Error('overwritten'));
1050
+ return;
1051
+ }
1049
1052
  }
1050
1053
  function onWorkerMessage(msg) {
1051
1054
  const stream = this.stream.deref();
@@ -1054,10 +1057,11 @@ var __webpack_modules__ = {
1054
1057
  this.terminate();
1055
1058
  return;
1056
1059
  }
1060
+ if (msg?.code == null) return;
1057
1061
  switch(msg.code){
1058
1062
  case 'READY':
1059
1063
  this.stream = new WeakRef1(stream);
1060
- stream.flush(()=>{
1064
+ waitForRead(stream, ()=>{
1061
1065
  stream[kImpl].ready = true;
1062
1066
  stream.emit('ready');
1063
1067
  });
@@ -1069,6 +1073,19 @@ var __webpack_modules__ = {
1069
1073
  if (Array.isArray(msg.args)) stream.emit(msg.name, ...msg.args);
1070
1074
  else stream.emit(msg.name, msg.args);
1071
1075
  break;
1076
+ case 'FLUSHED':
1077
+ {
1078
+ if ('thread-stream' !== msg.context) {
1079
+ destroy(stream, new Error('this should not happen: ' + msg.code));
1080
+ break;
1081
+ }
1082
+ const cb = stream[kImpl].flushCallbacks.get(msg.id);
1083
+ if (cb) {
1084
+ stream[kImpl].flushCallbacks.delete(msg.id);
1085
+ process.nextTick(cb);
1086
+ }
1087
+ break;
1088
+ }
1072
1089
  case 'WARNING':
1073
1090
  process.emitWarning(msg.err);
1074
1091
  break;
@@ -1103,13 +1120,18 @@ var __webpack_modules__ = {
1103
1120
  this[kImpl].finished = false;
1104
1121
  this[kImpl].errored = null;
1105
1122
  this[kImpl].closed = false;
1106
- this[kImpl].buf = '';
1123
+ this[kImpl].buf = [];
1124
+ this[kImpl].bufHead = 0;
1125
+ this[kImpl].bufLen = 0;
1126
+ this[kImpl].flushCallbacks = new Map();
1127
+ this[kImpl].nextFlushId = 0;
1107
1128
  this.worker = createWorker(this, opts);
1108
1129
  this.on('message', (message, transferList)=>{
1109
1130
  this.worker.postMessage(message, transferList);
1110
1131
  });
1111
1132
  }
1112
1133
  write(data) {
1134
+ const dataBuf = Buffer.isBuffer(data) ? data : Buffer.from(data);
1113
1135
  if (this[kImpl].destroyed) {
1114
1136
  error(this, new Error('the worker has exited'));
1115
1137
  return false;
@@ -1118,14 +1140,15 @@ var __webpack_modules__ = {
1118
1140
  error(this, new Error('the worker is ending'));
1119
1141
  return false;
1120
1142
  }
1121
- if (this[kImpl].flushing && this[kImpl].buf.length + data.length >= MAX_STRING) try {
1143
+ if (this[kImpl].flushing && this[kImpl].bufLen + dataBuf.length >= MAX_STRING) try {
1122
1144
  writeSync(this);
1123
1145
  this[kImpl].flushing = true;
1124
1146
  } catch (err) {
1125
1147
  destroy(this, err);
1126
1148
  return false;
1127
1149
  }
1128
- this[kImpl].buf += data;
1150
+ this[kImpl].buf.push(dataBuf);
1151
+ this[kImpl].bufLen += dataBuf.length;
1129
1152
  if (this[kImpl].sync) try {
1130
1153
  writeSync(this);
1131
1154
  return true;
@@ -1137,7 +1160,7 @@ var __webpack_modules__ = {
1137
1160
  this[kImpl].flushing = true;
1138
1161
  setImmediate(nextFlush, this);
1139
1162
  }
1140
- this[kImpl].needDrain = this[kImpl].data.length - this[kImpl].buf.length - Atomics.load(this[kImpl].state, WRITE_INDEX) <= 0;
1163
+ this[kImpl].needDrain = this[kImpl].data.length - this[kImpl].bufLen - Atomics.load(this[kImpl].state, WRITE_INDEX) <= 0;
1141
1164
  return !this[kImpl].needDrain;
1142
1165
  }
1143
1166
  end() {
@@ -1146,19 +1169,10 @@ var __webpack_modules__ = {
1146
1169
  end(this);
1147
1170
  }
1148
1171
  flush(cb) {
1149
- if (this[kImpl].destroyed) {
1150
- if ('function' == typeof cb) process.nextTick(cb, new Error('the worker has exited'));
1151
- return;
1152
- }
1153
- const writeIndex = Atomics.load(this[kImpl].state, WRITE_INDEX);
1154
- wait(this[kImpl].state, READ_INDEX, writeIndex, 1 / 0, (err, res)=>{
1155
- if (err) {
1156
- destroy(this, err);
1157
- process.nextTick(cb, err);
1158
- return;
1159
- }
1160
- if ('not-equal' === res) return void this.flush(cb);
1161
- process.nextTick(cb);
1172
+ cb = 'function' == typeof cb ? cb : noop;
1173
+ flushBuffer(this, (err)=>{
1174
+ if (err) return void process.nextTick(cb, err);
1175
+ requestWorkerFlush(this, cb);
1162
1176
  });
1163
1177
  }
1164
1178
  flushSync() {
@@ -1200,6 +1214,63 @@ var __webpack_modules__ = {
1200
1214
  return this[kImpl].errored;
1201
1215
  }
1202
1216
  }
1217
+ function flushBuffer(stream, cb) {
1218
+ if (stream[kImpl].destroyed) return void process.nextTick(cb, new Error('the worker has exited'));
1219
+ if (!stream[kImpl].sync && (stream[kImpl].flushing || stream[kImpl].bufLen > 0)) return void setImmediate(flushBuffer, stream, cb);
1220
+ waitForRead(stream, cb);
1221
+ }
1222
+ function waitForRead(stream, cb) {
1223
+ const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX);
1224
+ wait(stream[kImpl].state, READ_INDEX, writeIndex, 1 / 0, (err, res)=>{
1225
+ if (err) {
1226
+ destroy(stream, err);
1227
+ cb(err);
1228
+ return;
1229
+ }
1230
+ if ('ok' !== res) return void waitForRead(stream, cb);
1231
+ cb();
1232
+ });
1233
+ }
1234
+ function requestWorkerFlush(stream, cb) {
1235
+ if (stream[kImpl].destroyed) return void process.nextTick(cb, new Error('the worker has exited'));
1236
+ if (!stream[kImpl].ready) {
1237
+ const onReady = ()=>{
1238
+ cleanup();
1239
+ requestWorkerFlush(stream, cb);
1240
+ };
1241
+ const onClose = ()=>{
1242
+ cleanup();
1243
+ process.nextTick(cb, new Error('the worker has exited'));
1244
+ };
1245
+ const cleanup = ()=>{
1246
+ stream.off('ready', onReady);
1247
+ stream.off('close', onClose);
1248
+ };
1249
+ stream.once('ready', onReady);
1250
+ stream.once('close', onClose);
1251
+ return;
1252
+ }
1253
+ const id = ++stream[kImpl].nextFlushId;
1254
+ stream[kImpl].flushCallbacks.set(id, cb);
1255
+ try {
1256
+ stream.worker.postMessage({
1257
+ code: 'FLUSH',
1258
+ context: 'thread-stream',
1259
+ id
1260
+ });
1261
+ } catch (err) {
1262
+ stream[kImpl].flushCallbacks.delete(id);
1263
+ destroy(stream, err);
1264
+ process.nextTick(cb, err);
1265
+ }
1266
+ }
1267
+ function failPendingFlushCallbacks(stream, err) {
1268
+ const callbacks = stream[kImpl].flushCallbacks;
1269
+ if (0 === callbacks.size) return;
1270
+ const flushErr = err || new Error('the worker has exited');
1271
+ for (const cb of callbacks.values())process.nextTick(cb, flushErr);
1272
+ callbacks.clear();
1273
+ }
1203
1274
  function error(stream, err) {
1204
1275
  setImmediate(()=>{
1205
1276
  stream.emit('error', err);
@@ -1208,6 +1279,7 @@ var __webpack_modules__ = {
1208
1279
  function destroy(stream, err) {
1209
1280
  if (stream[kImpl].destroyed) return;
1210
1281
  stream[kImpl].destroyed = true;
1282
+ failPendingFlushCallbacks(stream, err);
1211
1283
  if (err) {
1212
1284
  stream[kImpl].errored = err;
1213
1285
  error(stream, err);
@@ -1221,12 +1293,37 @@ var __webpack_modules__ = {
1221
1293
  stream.emit('close');
1222
1294
  });
1223
1295
  }
1224
- function write(stream, data, cb) {
1296
+ function write(stream, maxBytes, cb) {
1225
1297
  const current = Atomics.load(stream[kImpl].state, WRITE_INDEX);
1226
- const length = Buffer.byteLength(data);
1227
- stream[kImpl].data.write(data, current);
1228
- Atomics.store(stream[kImpl].state, WRITE_INDEX, current + length);
1229
- Atomics.notify(stream[kImpl].state, WRITE_INDEX);
1298
+ let offset = current;
1299
+ let remaining = maxBytes;
1300
+ while(remaining > 0 && 0 !== stream[kImpl].bufLen){
1301
+ const head = stream[kImpl].bufHead;
1302
+ const buf = stream[kImpl].buf[head];
1303
+ if (buf.length <= remaining) {
1304
+ buf.copy(stream[kImpl].data, offset);
1305
+ offset += buf.length;
1306
+ remaining -= buf.length;
1307
+ stream[kImpl].bufLen -= buf.length;
1308
+ stream[kImpl].bufHead = head + 1;
1309
+ if (stream[kImpl].bufHead === stream[kImpl].buf.length) {
1310
+ stream[kImpl].buf.length = 0;
1311
+ stream[kImpl].bufHead = 0;
1312
+ } else if (stream[kImpl].bufHead >= 1024 && 2 * stream[kImpl].bufHead >= stream[kImpl].buf.length) {
1313
+ stream[kImpl].buf.splice(0, stream[kImpl].bufHead);
1314
+ stream[kImpl].bufHead = 0;
1315
+ }
1316
+ continue;
1317
+ }
1318
+ buf.copy(stream[kImpl].data, offset, 0, remaining);
1319
+ stream[kImpl].buf[head] = buf.subarray(remaining);
1320
+ stream[kImpl].bufLen -= remaining;
1321
+ offset += remaining;
1322
+ remaining = 0;
1323
+ }
1324
+ updateState(stream, ()=>{
1325
+ Atomics.store(stream[kImpl].state, WRITE_INDEX, offset);
1326
+ });
1230
1327
  cb();
1231
1328
  return true;
1232
1329
  }
@@ -1236,8 +1333,9 @@ var __webpack_modules__ = {
1236
1333
  try {
1237
1334
  stream.flushSync();
1238
1335
  let readIndex = Atomics.load(stream[kImpl].state, READ_INDEX);
1239
- Atomics.store(stream[kImpl].state, WRITE_INDEX, -1);
1240
- Atomics.notify(stream[kImpl].state, WRITE_INDEX);
1336
+ updateState(stream, ()=>{
1337
+ Atomics.store(stream[kImpl].state, WRITE_INDEX, -1);
1338
+ });
1241
1339
  let spins = 0;
1242
1340
  while(-1 !== readIndex){
1243
1341
  Atomics.wait(stream[kImpl].state, READ_INDEX, readIndex, 1000);
@@ -1259,35 +1357,16 @@ var __webpack_modules__ = {
1259
1357
  else if (stream[kImpl].needDrain) process.nextTick(drain, stream);
1260
1358
  };
1261
1359
  stream[kImpl].flushing = false;
1262
- while(0 !== stream[kImpl].buf.length){
1360
+ while(0 !== stream[kImpl].bufLen){
1263
1361
  const writeIndex = Atomics.load(stream[kImpl].state, WRITE_INDEX);
1264
- let leftover = stream[kImpl].data.length - writeIndex;
1362
+ const leftover = stream[kImpl].data.length - writeIndex;
1265
1363
  if (0 === leftover) {
1266
1364
  flushSync(stream);
1267
- Atomics.store(stream[kImpl].state, READ_INDEX, 0);
1268
- Atomics.store(stream[kImpl].state, WRITE_INDEX, 0);
1269
- Atomics.notify(stream[kImpl].state, READ_INDEX);
1365
+ resetIndexes(stream);
1270
1366
  continue;
1271
1367
  }
1272
1368
  if (leftover < 0) throw new Error('overwritten');
1273
- let toWrite = stream[kImpl].buf.slice(0, leftover);
1274
- let toWriteBytes = Buffer.byteLength(toWrite);
1275
- if (toWriteBytes <= leftover) {
1276
- stream[kImpl].buf = stream[kImpl].buf.slice(leftover);
1277
- write(stream, toWrite, cb);
1278
- } else {
1279
- flushSync(stream);
1280
- Atomics.store(stream[kImpl].state, READ_INDEX, 0);
1281
- Atomics.store(stream[kImpl].state, WRITE_INDEX, 0);
1282
- Atomics.notify(stream[kImpl].state, READ_INDEX);
1283
- while(toWriteBytes > stream[kImpl].buf.length){
1284
- leftover /= 2;
1285
- toWrite = stream[kImpl].buf.slice(0, leftover);
1286
- toWriteBytes = Buffer.byteLength(toWrite);
1287
- }
1288
- stream[kImpl].buf = stream[kImpl].buf.slice(leftover);
1289
- write(stream, toWrite, cb);
1290
- }
1369
+ write(stream, leftover, cb);
1291
1370
  }
1292
1371
  }
1293
1372
  function flushSync(stream) {
@@ -1304,16 +1383,18 @@ var __webpack_modules__ = {
1304
1383
  }
1305
1384
  module1.exports = ThreadStream;
1306
1385
  },
1307
- "../../node_modules/.pnpm/thread-stream@4.0.0/node_modules/thread-stream/lib/indexes.js" (module1) {
1386
+ "../../node_modules/.pnpm/thread-stream@4.2.0/node_modules/thread-stream/lib/indexes.js" (module1) {
1308
1387
  "use strict";
1388
+ const SEQ_INDEX = 2;
1309
1389
  const WRITE_INDEX = 4;
1310
1390
  const READ_INDEX = 8;
1311
1391
  module1.exports = {
1312
1392
  WRITE_INDEX,
1313
- READ_INDEX
1393
+ READ_INDEX,
1394
+ SEQ_INDEX
1314
1395
  };
1315
1396
  },
1316
- "../../node_modules/.pnpm/thread-stream@4.0.0/node_modules/thread-stream/lib/wait.js" (module1) {
1397
+ "../../node_modules/.pnpm/thread-stream@4.2.0/node_modules/thread-stream/lib/wait.js" (module1) {
1317
1398
  "use strict";
1318
1399
  const WAIT_MS = 10000;
1319
1400
  function wait(state, index, expected, timeout, done) {
@@ -1337,7 +1418,10 @@ var __webpack_modules__ = {
1337
1418
  if (max !== 1 / 0 && Date.now() > max) return void done(null, 'timed-out');
1338
1419
  const remaining = max === 1 / 0 ? WAIT_MS : Math.min(WAIT_MS, Math.max(1, max - Date.now()));
1339
1420
  const result = Atomics.waitAsync(state, index, expected, remaining);
1340
- if (result.async) result.value.then(check);
1421
+ if (result.async) result.value.then((res)=>{
1422
+ if ('ok' === res) return void done(null, 'ok');
1423
+ check();
1424
+ });
1341
1425
  else setImmediate(check);
1342
1426
  };
1343
1427
  check();
@@ -2392,7 +2476,7 @@ var __webpack_modules__ = {
2392
2476
  const diagChan = __webpack_require__("node:diagnostics_channel");
2393
2477
  const format = __webpack_require__("../../node_modules/.pnpm/quick-format-unescaped@4.0.4/node_modules/quick-format-unescaped/index.js");
2394
2478
  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.0/node_modules/sonic-boom/index.js");
2479
+ const SonicBoom = __webpack_require__("../../node_modules/.pnpm/sonic-boom@4.2.1/node_modules/sonic-boom/index.js");
2396
2480
  const onExit = __webpack_require__("../../node_modules/.pnpm/on-exit-leak-free@2.1.2/node_modules/on-exit-leak-free/index.js");
2397
2481
  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
2482
  const { isMainThread } = __webpack_require__("worker_threads");
@@ -2668,7 +2752,7 @@ var __webpack_modules__ = {
2668
2752
  const { fileURLToPath } = __webpack_require__("node:url");
2669
2753
  const sleep = __webpack_require__("../../node_modules/.pnpm/atomic-sleep@1.0.0/node_modules/atomic-sleep/index.js");
2670
2754
  const onExit = __webpack_require__("../../node_modules/.pnpm/on-exit-leak-free@2.1.2/node_modules/on-exit-leak-free/index.js");
2671
- const ThreadStream = __webpack_require__("../../node_modules/.pnpm/thread-stream@4.0.0/node_modules/thread-stream/index.js");
2755
+ const ThreadStream = __webpack_require__("../../node_modules/.pnpm/thread-stream@4.2.0/node_modules/thread-stream/index.js");
2672
2756
  function setupOnExit(stream) {
2673
2757
  onExit.register(stream, autoEnd);
2674
2758
  onExit.registerBeforeExit(stream, flush);
@@ -2999,7 +3083,7 @@ var __webpack_modules__ = {
2999
3083
  module1.exports["default"] = pino;
3000
3084
  module1.exports.pino = pino;
3001
3085
  },
3002
- "../../node_modules/.pnpm/sonic-boom@4.2.0/node_modules/sonic-boom/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
3086
+ "../../node_modules/.pnpm/sonic-boom@4.2.1/node_modules/sonic-boom/index.js" (module1, __unused_rspack_exports, __webpack_require__) {
3003
3087
  "use strict";
3004
3088
  const fs = __webpack_require__("fs");
3005
3089
  const EventEmitter = __webpack_require__("events");
@@ -3105,8 +3189,14 @@ var __webpack_modules__ = {
3105
3189
  this.flush = flush;
3106
3190
  this.flushSync = flushSync;
3107
3191
  this._actualWrite = actualWrite;
3108
- fsWriteSync = ()=>fs.writeSync(this.fd, this._writingBuf, 'utf8');
3109
- fsWrite = ()=>fs.write(this.fd, this._writingBuf, 'utf8', this.release);
3192
+ fsWriteSync = ()=>{
3193
+ if (Buffer.isBuffer(this._writingBuf)) return fs.writeSync(this.fd, this._writingBuf);
3194
+ return fs.writeSync(this.fd, this._writingBuf, 'utf8');
3195
+ };
3196
+ fsWrite = ()=>{
3197
+ if (Buffer.isBuffer(this._writingBuf)) return fs.write(this.fd, this._writingBuf, this.release);
3198
+ return fs.write(this.fd, this._writingBuf, 'utf8', this.release);
3199
+ };
3110
3200
  } else throw new Error(`SonicBoom supports "${kContentModeUtf8}" and "${kContentModeBuffer}", but passed ${contentMode}`);
3111
3201
  if ('number' == typeof fd) {
3112
3202
  this.fd = fd;
@@ -3178,9 +3268,9 @@ var __webpack_modules__ = {
3178
3268
  }
3179
3269
  }
3180
3270
  function releaseWritingBuf(writingBuf, len, n1) {
3181
- if ('string' == typeof writingBuf && Buffer.byteLength(writingBuf) !== n1) n1 = Buffer.from(writingBuf).subarray(0, n1).toString().length;
3271
+ if ('string' == typeof writingBuf) writingBuf = Buffer.from(writingBuf);
3182
3272
  len = Math.max(len - n1, 0);
3183
- writingBuf = writingBuf.slice(n1);
3273
+ writingBuf = writingBuf.subarray(n1);
3184
3274
  return {
3185
3275
  writingBuf,
3186
3276
  len
@@ -3200,13 +3290,15 @@ var __webpack_modules__ = {
3200
3290
  }
3201
3291
  function write(data) {
3202
3292
  if (this.destroyed) throw new Error('SonicBoom destroyed');
3203
- const len = this._len + data.length;
3293
+ data = '' + data;
3294
+ const dataLen = Buffer.byteLength(data);
3295
+ const len = this._len + dataLen;
3204
3296
  const bufs = this._bufs;
3205
3297
  if (this.maxLength && len > this.maxLength) {
3206
3298
  this.emit('drop', data);
3207
3299
  return this._len < this._hwm;
3208
3300
  }
3209
- if (0 === bufs.length || bufs[bufs.length - 1].length + data.length > this.maxWrite) bufs.push('' + data);
3301
+ if (0 === bufs.length || Buffer.byteLength(bufs[bufs.length - 1]) + dataLen > this.maxWrite) bufs.push(data);
3210
3302
  else bufs[bufs.length - 1] += data;
3211
3303
  this._len = len;
3212
3304
  if (!this._writing && this._len >= this.minLength) this._actualWrite();
@@ -3324,10 +3416,10 @@ var __webpack_modules__ = {
3324
3416
  this._writingBuf = '';
3325
3417
  }
3326
3418
  let buf = '';
3327
- while(this._bufs.length || buf){
3419
+ while(this._bufs.length || buf.length){
3328
3420
  if (buf.length <= 0) buf = this._bufs[0];
3329
3421
  try {
3330
- const n1 = fs.writeSync(this.fd, buf, 'utf8');
3422
+ const n1 = Buffer.isBuffer(buf) ? fs.writeSync(this.fd, buf) : fs.writeSync(this.fd, buf, 'utf8');
3331
3423
  const releasedBufObj = releaseWritingBuf(buf, this._len, n1);
3332
3424
  buf = releasedBufObj.writingBuf;
3333
3425
  this._len = releasedBufObj.len;
@@ -3376,14 +3468,14 @@ var __webpack_modules__ = {
3376
3468
  function actualWrite() {
3377
3469
  const release = this.release;
3378
3470
  this._writing = true;
3379
- this._writingBuf = this._writingBuf || this._bufs.shift() || '';
3471
+ this._writingBuf = this._writingBuf.length ? this._writingBuf : this._bufs.shift() || '';
3380
3472
  if (this.sync) try {
3381
- const written = fs.writeSync(this.fd, this._writingBuf, 'utf8');
3473
+ const written = Buffer.isBuffer(this._writingBuf) ? fs.writeSync(this.fd, this._writingBuf) : fs.writeSync(this.fd, this._writingBuf, 'utf8');
3382
3474
  release(null, written);
3383
3475
  } catch (err) {
3384
3476
  release(err);
3385
3477
  }
3386
- else fs.write(this.fd, this._writingBuf, 'utf8', release);
3478
+ else fs.write(this.fd, this._writingBuf, release);
3387
3479
  }
3388
3480
  function actualWriteBuffer() {
3389
3481
  const release = this.release;
@@ -3424,10 +3516,10 @@ var __webpack_modules__ = {
3424
3516
  SonicBoom.default = SonicBoom;
3425
3517
  module1.exports = SonicBoom;
3426
3518
  },
3427
- "../../node_modules/.pnpm/thread-stream@4.0.0/node_modules/thread-stream/package.json" (module1) {
3519
+ "../../node_modules/.pnpm/thread-stream@4.2.0/node_modules/thread-stream/package.json" (module1) {
3428
3520
  "use strict";
3429
3521
  module1.exports = {
3430
- version: "4.0.0"
3522
+ version: "4.2.0"
3431
3523
  };
3432
3524
  }
3433
3525
  };