@bazariodev/docket 1.0.0 → 1.1.0

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.
Files changed (53) hide show
  1. package/CHANGELOG.md +25 -0
  2. package/README.md +33 -2
  3. package/dist/browser/index.cjs +2 -2
  4. package/dist/browser/index.js +2 -2
  5. package/dist/{chunk-LRCHwVuE.js → chunk---OIebMz.js} +31 -3
  6. package/dist/chunk---OIebMz.js.map +1 -0
  7. package/dist/{chunk-CEhpwtwJ.cjs → chunk-BMmKUicm.cjs} +9 -3
  8. package/dist/chunk-BMmKUicm.cjs.map +1 -0
  9. package/dist/{chunk-DkvWLziD.js → chunk-CJmlBW-M.js} +67 -24
  10. package/dist/chunk-CJmlBW-M.js.map +1 -0
  11. package/dist/{chunk-DYcNnkOV.js → chunk-D1NggH6k.js} +2 -2
  12. package/dist/{chunk-DYcNnkOV.js.map → chunk-D1NggH6k.js.map} +1 -1
  13. package/dist/{chunk-ieB8yTEn.cjs → chunk-DEyTe0f4.cjs} +67 -24
  14. package/dist/chunk-DEyTe0f4.cjs.map +1 -0
  15. package/dist/{chunk-BLf-eCDO.cjs → chunk-DLnBMRjo.cjs} +3 -1
  16. package/dist/chunk-DLnBMRjo.cjs.map +1 -0
  17. package/dist/{chunk-CSS3f4_M.js → chunk-Da877R_E.js} +4 -2
  18. package/dist/chunk-Da877R_E.js.map +1 -0
  19. package/dist/{chunk-7ld72rnl.js → chunk-De6BoS1P.js} +9 -3
  20. package/dist/chunk-De6BoS1P.js.map +1 -0
  21. package/dist/{chunk-CXZYNALm.cjs → chunk-Dl2KJDqt.cjs} +31 -2
  22. package/dist/chunk-Dl2KJDqt.cjs.map +1 -0
  23. package/dist/{chunk-DqK_3eFr.cjs → chunk-DlZYLPaU.cjs} +2 -2
  24. package/dist/{chunk-DqK_3eFr.cjs.map → chunk-DlZYLPaU.cjs.map} +1 -1
  25. package/dist/client/index.cjs +4 -4
  26. package/dist/client/index.js +4 -4
  27. package/dist/core/constants.d.cts +2 -0
  28. package/dist/core/constants.d.ts +2 -0
  29. package/dist/export/index.cjs +4 -4
  30. package/dist/export/index.js +4 -4
  31. package/dist/history/index.cjs +2 -2
  32. package/dist/history/index.js +2 -2
  33. package/dist/index.cjs +5 -5
  34. package/dist/index.d.cts +7 -4
  35. package/dist/index.d.ts +7 -4
  36. package/dist/index.js +5 -5
  37. package/dist/redaction/index.cjs +4 -2
  38. package/dist/redaction/index.cjs.map +1 -1
  39. package/dist/redaction/index.js +4 -2
  40. package/dist/redaction/index.js.map +1 -1
  41. package/dist/sip/index.cjs +1 -1
  42. package/dist/sip/index.js +1 -1
  43. package/dist/upload/index.cjs +2 -2
  44. package/dist/upload/index.js +2 -2
  45. package/package.json +2 -2
  46. package/dist/chunk-7ld72rnl.js.map +0 -1
  47. package/dist/chunk-BLf-eCDO.cjs.map +0 -1
  48. package/dist/chunk-CEhpwtwJ.cjs.map +0 -1
  49. package/dist/chunk-CSS3f4_M.js.map +0 -1
  50. package/dist/chunk-CXZYNALm.cjs.map +0 -1
  51. package/dist/chunk-DkvWLziD.js.map +0 -1
  52. package/dist/chunk-LRCHwVuE.js.map +0 -1
  53. package/dist/chunk-ieB8yTEn.cjs.map +0 -1
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
- var common = require('./chunk-CXZYNALm.cjs');
4
- var constants = require('./chunk-BLf-eCDO.cjs');
5
- var conversion = require('./chunk-CEhpwtwJ.cjs');
3
+ var common = require('./chunk-Dl2KJDqt.cjs');
4
+ var constants = require('./chunk-DLnBMRjo.cjs');
5
+ var conversion = require('./chunk-BMmKUicm.cjs');
6
6
 
7
7
  const LOGGING_ERRORS = /* @__PURE__ */ Object.freeze({
8
8
  [constants.LOGGING_ERROR_CODES.RECURSIVE_LOGGING]: 'Recursive logging is rejected',
@@ -212,7 +212,16 @@ function createLogging(options) {
212
212
  for (const sink of options.sinks ?? []) addSink(sink);
213
213
  const levels = createLevels({ ...options, now, scheduler }, onError);
214
214
 
215
- function emit(area, scope, binding, level, message, data, bypass = false) {
215
+ function emit(
216
+ area,
217
+ scope,
218
+ binding,
219
+ level,
220
+ message,
221
+ data,
222
+ callOptions,
223
+ bypass = false,
224
+ ) {
216
225
  try {
217
226
  if (busy) {
218
227
  onError(
@@ -224,6 +233,7 @@ function createLogging(options) {
224
233
  if (
225
234
  closed ||
226
235
  options.isActive?.() === false ||
236
+ closed ||
227
237
  sinks.size === 0 ||
228
238
  (!bypass && !levels.enabled(area, level))
229
239
  )
@@ -268,36 +278,68 @@ function createLogging(options) {
268
278
  busy = true;
269
279
  try {
270
280
  let value;
281
+ let metadata;
271
282
  try {
283
+ if (callOptions !== undefined) {
284
+ if (
285
+ !callOptions ||
286
+ typeof callOptions !== 'object' ||
287
+ Array.isArray(callOptions)
288
+ )
289
+ throw new TypeError('Invalid log options');
290
+ const descriptor = Object.getOwnPropertyDescriptor(
291
+ callOptions,
292
+ 'metadata',
293
+ );
294
+ if (descriptor && !Object.hasOwn(descriptor, 'value'))
295
+ throw new TypeError('Invalid log options');
296
+ metadata = common.copyMetadata(descriptor?.value);
297
+ if (options.isActive?.() === false || closed || sinks.size === 0)
298
+ return;
299
+ }
272
300
  value = typeof data === 'function' ? data() : data;
273
301
  } catch (error) {
274
302
  onError(error, constants.LOGGING_ERROR_SOURCES.DATA);
275
303
  return;
276
304
  }
277
- if (options.isActive?.() === false || sinks.size === 0) return;
305
+ if (options.isActive?.() === false || closed || sinks.size === 0)
306
+ return;
278
307
  let record;
279
308
  try {
280
- record = conversion.ownRecord(
281
- redactor.redact({
282
- runId,
283
- seq: ++seq,
284
- at: now(),
285
- area,
286
- scope,
287
- level,
288
- message,
289
- context: { ...context, ...binding },
290
- data: value,
291
- }),
292
- limits,
293
- );
309
+ const draft = {
310
+ runId,
311
+ seq: ++seq,
312
+ at: now(),
313
+ area,
314
+ scope,
315
+ level,
316
+ message,
317
+ context: { ...context, ...binding },
318
+ data: value,
319
+ };
320
+ if (metadata) draft.metadata = metadata;
321
+ record = conversion.ownRecord(redactor.redact(draft), limits);
322
+ const actual = record.metadata;
323
+ const keys = metadata ? Object.keys(metadata) : [];
324
+ if (
325
+ (actual ? Object.keys(actual).length : 0) !== keys.length ||
326
+ keys.some(
327
+ (key) =>
328
+ !Object.hasOwn(actual, key) || actual[key] !== metadata[key],
329
+ )
330
+ )
331
+ throw new TypeError('Invalid redactor metadata');
294
332
  } catch (error) {
295
333
  onError(error, constants.LOGGING_ERROR_SOURCES.REDACTOR);
296
334
  return;
297
335
  }
298
- if (options.isActive?.() === false) return;
336
+ if (options.isActive?.() === false || closed) return;
299
337
  for (const registration of registrations) {
300
- if (options.isActive?.() === false || !sinks.has(registration))
338
+ if (
339
+ options.isActive?.() === false ||
340
+ closed ||
341
+ !sinks.has(registration)
342
+ )
301
343
  continue;
302
344
  try {
303
345
  registration.sink.write(record);
@@ -327,6 +369,7 @@ function createLogging(options) {
327
369
  'warn',
328
370
  'logging.suppressed',
329
371
  { scope: counter.scope, dropped },
372
+ undefined,
330
373
  true,
331
374
  );
332
375
  }
@@ -335,8 +378,8 @@ function createLogging(options) {
335
378
  function logger(area, scope, binding = {}) {
336
379
  const result = {};
337
380
  for (const level of Object.values(constants.LEVELS))
338
- result[level] = (message, data) =>
339
- emit(area, scope, binding, level, message, data);
381
+ result[level] = (message, data, callOptions) =>
382
+ emit(area, scope, binding, level, message, data, callOptions);
340
383
  result.child = ({
341
384
  scope: childScope = scope,
342
385
  context: childContext = {},
@@ -436,4 +479,4 @@ function createLogging(options) {
436
479
  }
437
480
 
438
481
  exports.createLogging = createLogging;
439
- //# sourceMappingURL=chunk-ieB8yTEn.cjs.map
482
+ //# sourceMappingURL=chunk-DEyTe0f4.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-DEyTe0f4.cjs","sources":["../src/core/errors.js","../src/core/levels.js","../src/core/hub.js"],"sourcesContent":["import { LOGGING_ERROR_CODES } from './constants.js';\n\nexport const LOGGING_ERRORS = /* @__PURE__ */ Object.freeze({\n [LOGGING_ERROR_CODES.RECURSIVE_LOGGING]: 'Recursive logging is rejected',\n [LOGGING_ERROR_CODES.ROOT_LOGGER_CACHE_LIMIT]:\n 'Root logger cache exceeds 1000 pairs',\n [LOGGING_ERROR_CODES.STOPPED]: 'Logging is stopped',\n});\n\nexport function loggingError(code) {\n return Object.assign(new Error(LOGGING_ERRORS[code]), { code });\n}\n","import { assertLevel, define, levelRank, positive } from './common.js';\nimport { LOGGING_ERROR_SOURCES, LOGGING_LIMITS } from './constants.js';\n\nexport function createLevels(options, reportError) {\n const { now, scheduler, levelStorage, areas } = options;\n const maxDuration = positive(\n options.maxOverrideMs ?? LOGGING_LIMITS.DEFAULT_LEVEL_OVERRIDE_MS,\n 'maxOverrideMs',\n );\n const states = new Map();\n let stopped = false;\n for (const { id, level = 'info' } of areas) {\n assertLevel(level);\n if (typeof id !== 'string' || !id || states.has(id))\n throw new TypeError('Areas must have unique non-empty IDs');\n states.set(id, {\n level,\n defaultLevel: level,\n rank: levelRank(level),\n until: undefined,\n timer: undefined,\n });\n }\n const requireArea = (area) => {\n const state = states.get(area);\n if (!state) throw new TypeError('Unknown log area');\n return state;\n };\n\n function save() {\n if (!levelStorage || stopped) return;\n const overrides = {};\n for (const [id, state] of states)\n if (state.until)\n define(overrides, id, { level: state.level, until: state.until });\n try {\n levelStorage.storage.setItem(levelStorage.key, JSON.stringify(overrides));\n } catch (error) {\n reportError(error, LOGGING_ERROR_SOURCES.STORAGE);\n }\n }\n\n function reset(state) {\n scheduler.clearTimeout(state.timer);\n state.timer = undefined;\n state.until = undefined;\n state.level = state.defaultLevel;\n state.rank = levelRank(state.level);\n }\n\n function apply(state, level, until) {\n reset(state);\n state.level = level;\n state.rank = levelRank(level);\n state.until = until;\n state.timer = scheduler.setTimeout(\n () => {\n if (stopped) return;\n if (until > now()) {\n apply(state, level, until);\n return;\n }\n reset(state);\n save();\n },\n Math.min(LOGGING_LIMITS.MAX_TIMER_DELAY_MS, Math.max(0, until - now())),\n );\n }\n\n function reloadLevels() {\n if (stopped) return;\n for (const state of states.values()) reset(state);\n if (!levelStorage) return;\n try {\n const saved = JSON.parse(\n levelStorage.storage.getItem(levelStorage.key) ?? '{}',\n );\n if (!saved || typeof saved !== 'object') return;\n const time = now();\n for (const [id, state] of states) {\n const override = Object.hasOwn(saved, id) && saved[id];\n if (\n override &&\n levelRank(override.level) >= 0 &&\n Number.isFinite(override.until) &&\n override.until > time\n )\n apply(\n state,\n override.level,\n Math.min(override.until, time + maxDuration),\n );\n }\n } catch (error) {\n reportError(error, LOGGING_ERROR_SOURCES.STORAGE);\n }\n }\n reloadLevels();\n return {\n requireArea,\n enabled(area, level) {\n const state = requireArea(area);\n if (state.until && state.until <= now()) {\n reset(state);\n save();\n }\n return levelRank(level) >= state.rank;\n },\n\n setLevel(area, level, { durationMs = maxDuration } = {}) {\n assertLevel(level);\n positive(durationMs, 'durationMs');\n const state = requireArea(area);\n if (stopped) return;\n apply(state, level, now() + Math.min(durationMs, maxDuration));\n save();\n },\n\n resetLevel(area) {\n if (stopped) return;\n if (area !== undefined) reset(requireArea(area));\n else for (const state of states.values()) reset(state);\n save();\n },\n reloadLevels,\n getLevels() {\n const result = {};\n for (const [id, state] of states) {\n if (state.until && state.until <= now()) {\n reset(state);\n save();\n }\n define(\n result,\n id,\n Object.freeze({\n level: state.level,\n defaultLevel: state.defaultLevel,\n ...(state.until ? { until: state.until } : {}),\n }),\n );\n }\n return Object.freeze(result);\n },\n\n stop() {\n stopped = true;\n for (const state of states.values()) scheduler.clearTimeout(state.timer);\n },\n };\n}\n","import {\n assertStormLimit,\n copyBindings,\n copyMetadata,\n scheduler as hostScheduler,\n randomHex,\n report,\n resolveLimits,\n} from './common.js';\nimport {\n LEVELS,\n LOGGING_ERROR_CODES,\n LOGGING_ERROR_SOURCES,\n LOGGING_LIMITS,\n} from './constants.js';\nimport { ownRecord } from './conversion.js';\nimport { loggingError } from './errors.js';\nimport { createLevels } from './levels.js';\n\nexport function createLogging(options) {\n if (\n !Array.isArray(options?.areas) ||\n !options.redactor ||\n typeof options.redactor.redact !== 'function'\n )\n throw new TypeError('Areas and an explicit redactor are required');\n const {\n redactor,\n now = Date.now,\n monotonicNow = () => globalThis.performance?.now() ?? Date.now(),\n scheduler = hostScheduler,\n stormLimit = LOGGING_LIMITS.DEFAULT_STORM_LIMIT,\n } = options;\n const limits = resolveLimits(redactor.limits);\n if (\n !redactor.limits ||\n Object.keys(limits).some((key) => !Object.hasOwn(redactor.limits, key))\n )\n throw new TypeError('Redactor limits are required');\n assertStormLimit(stormLimit);\n const runId = options.createRunId?.() ?? randomHex(16);\n if (typeof runId !== 'string' || !runId)\n throw new TypeError('Invalid run ID');\n const sinks = new Set();\n const roots = new Map();\n const storms = new Map();\n let context = copyBindings(options.context);\n let seq = 0;\n let closed = false;\n let busy = false;\n let scopeReported = false;\n let reporting = false;\n let stormTimer;\n let stopPromise;\n\n function onError(error, source) {\n if (reporting) return;\n reporting = true;\n const wasBusy = busy;\n busy = true;\n report(options.onError, error, source);\n busy = wasBusy;\n reporting = false;\n }\n for (const sink of options.sinks ?? []) addSink(sink);\n const levels = createLevels({ ...options, now, scheduler }, onError);\n\n function emit(\n area,\n scope,\n binding,\n level,\n message,\n data,\n callOptions,\n bypass = false,\n ) {\n try {\n if (busy) {\n onError(\n loggingError(LOGGING_ERROR_CODES.RECURSIVE_LOGGING),\n LOGGING_ERROR_SOURCES.REENTRY,\n );\n return;\n }\n if (\n closed ||\n options.isActive?.() === false ||\n closed ||\n sinks.size === 0 ||\n (!bypass && !levels.enabled(area, level))\n )\n return;\n if (!bypass && stormLimit !== false) {\n const key = JSON.stringify([area, scope]);\n let counter = storms.get(key);\n if (!counter) {\n const cacheKey =\n storms.size < LOGGING_LIMITS.STORM_SCOPE_PAIRS ? key : 'overflow';\n counter = storms.get(cacheKey);\n if (!counter) {\n counter = {\n area,\n scope,\n start: monotonicNow(),\n count: 0,\n dropped: 0,\n };\n storms.set(cacheKey, counter);\n }\n }\n const time = monotonicNow();\n if (\n time - counter.start >= LOGGING_LIMITS.STORM_WINDOW_MS ||\n time < counter.start\n ) {\n counter.start = time;\n counter.count = 0;\n }\n if (counter.count++ >= stormLimit) {\n counter.dropped++;\n if (stormTimer === undefined)\n stormTimer = scheduler.setTimeout(\n summarize,\n LOGGING_LIMITS.STORM_SUMMARY_DELAY_MS,\n );\n return;\n }\n }\n const registrations = Array.from(sinks);\n busy = true;\n try {\n let value;\n let metadata;\n try {\n if (callOptions !== undefined) {\n if (\n !callOptions ||\n typeof callOptions !== 'object' ||\n Array.isArray(callOptions)\n )\n throw new TypeError('Invalid log options');\n const descriptor = Object.getOwnPropertyDescriptor(\n callOptions,\n 'metadata',\n );\n if (descriptor && !Object.hasOwn(descriptor, 'value'))\n throw new TypeError('Invalid log options');\n metadata = copyMetadata(descriptor?.value);\n if (options.isActive?.() === false || closed || sinks.size === 0)\n return;\n }\n value = typeof data === 'function' ? data() : data;\n } catch (error) {\n onError(error, LOGGING_ERROR_SOURCES.DATA);\n return;\n }\n if (options.isActive?.() === false || closed || sinks.size === 0)\n return;\n let record;\n try {\n const draft = {\n runId,\n seq: ++seq,\n at: now(),\n area,\n scope,\n level,\n message,\n context: { ...context, ...binding },\n data: value,\n };\n if (metadata) draft.metadata = metadata;\n record = ownRecord(redactor.redact(draft), limits);\n const actual = record.metadata;\n const keys = metadata ? Object.keys(metadata) : [];\n if (\n (actual ? Object.keys(actual).length : 0) !== keys.length ||\n keys.some(\n (key) =>\n !Object.hasOwn(actual, key) || actual[key] !== metadata[key],\n )\n )\n throw new TypeError('Invalid redactor metadata');\n } catch (error) {\n onError(error, LOGGING_ERROR_SOURCES.REDACTOR);\n return;\n }\n if (options.isActive?.() === false || closed) return;\n for (const registration of registrations) {\n if (\n options.isActive?.() === false ||\n closed ||\n !sinks.has(registration)\n )\n continue;\n try {\n registration.sink.write(record);\n } catch (error) {\n onError(error, LOGGING_ERROR_SOURCES.SINK);\n }\n }\n } finally {\n busy = false;\n }\n } catch (error) {\n busy = false;\n onError(error, LOGGING_ERROR_SOURCES.DATA);\n }\n }\n\n function summarize() {\n stormTimer = undefined;\n for (const counter of storms.values()) {\n if (!counter.dropped) continue;\n const dropped = counter.dropped;\n counter.dropped = 0;\n emit(\n counter.area,\n counter.scope,\n {},\n 'warn',\n 'logging.suppressed',\n { scope: counter.scope, dropped },\n undefined,\n true,\n );\n }\n }\n\n function logger(area, scope, binding = {}) {\n const result = {};\n for (const level of Object.values(LEVELS))\n result[level] = (message, data, callOptions) =>\n emit(area, scope, binding, level, message, data, callOptions);\n result.child = ({\n scope: childScope = scope,\n context: childContext = {},\n } = {}) =>\n logger(area, childScope, { ...binding, ...copyBindings(childContext) });\n return Object.freeze(result);\n }\n\n function addSink(sink) {\n if (!sink || typeof sink.write !== 'function')\n throw new TypeError('A sink must have write');\n if (closed) throw loggingError(LOGGING_ERROR_CODES.STOPPED);\n const registration = { sink };\n sinks.add(registration);\n return () => {\n sinks.delete(registration);\n };\n }\n\n async function lifecycle(registrations, methods) {\n const failures = [];\n for (const method of methods) {\n await Promise.all(\n registrations.map(async ({ sink }) => {\n try {\n const previous = busy;\n busy = true;\n let result;\n try {\n result = sink[method]?.();\n } finally {\n busy = previous;\n }\n await result;\n } catch (error) {\n failures.push(error);\n onError(error, LOGGING_ERROR_SOURCES.SINK);\n }\n }),\n );\n }\n if (failures.length)\n throw new AggregateError(failures, 'Logging lifecycle failed');\n }\n return Object.freeze({\n runId,\n getLogger(area, scope) {\n levels.requireArea(area);\n if (typeof scope !== 'string')\n throw new TypeError('Scope must be a string');\n const key = JSON.stringify([area, scope]);\n const cached = roots.get(key);\n if (cached) return cached;\n const created = logger(area, scope);\n if (roots.size < LOGGING_LIMITS.ROOT_LOGGER_CACHE_PAIRS) {\n roots.set(key, created);\n return created;\n }\n if (!scopeReported) {\n scopeReported = true;\n onError(\n loggingError(LOGGING_ERROR_CODES.ROOT_LOGGER_CACHE_LIMIT),\n LOGGING_ERROR_SOURCES.SCOPE,\n );\n }\n return created;\n },\n\n setContext(values) {\n context = { ...context, ...copyBindings(values) };\n for (const key of Object.keys(context))\n if (context[key] === undefined) delete context[key];\n },\n setLevel: levels.setLevel,\n resetLevel: levels.resetLevel,\n reloadLevels: levels.reloadLevels,\n getLevels: levels.getLevels,\n addSink,\n flush() {\n const registrations = Array.from(sinks);\n return Promise.resolve().then(() => lifecycle(registrations, ['flush']));\n },\n\n stop() {\n if (!stopPromise) {\n closed = true;\n levels.stop();\n scheduler.clearTimeout(stormTimer);\n const registrations = Array.from(sinks);\n stopPromise = Promise.resolve().then(() =>\n lifecycle(registrations, ['flush', 'stop']),\n );\n }\n return stopPromise;\n },\n });\n}\n"],"names":["LOGGING_ERROR_CODES","positive","LOGGING_LIMITS","assertLevel","levelRank","define","LOGGING_ERROR_SOURCES","hostScheduler","resolveLimits","assertStormLimit","randomHex","copyBindings","report","copyMetadata","ownRecord","LEVELS"],"mappings":";;;;;;AAEO,MAAM,cAAc,mBAAmB,MAAM,CAAC,MAAM,CAAC;AAC5D,EAAE,CAACA,6BAAmB,CAAC,iBAAiB,GAAG,+BAA+B;AAC1E,EAAE,CAACA,6BAAmB,CAAC,uBAAuB;AAC9C,IAAI,sCAAsC;AAC1C,EAAE,CAACA,6BAAmB,CAAC,OAAO,GAAG,oBAAoB;AACrD,CAAC,CAAC;;AAEK,SAAS,YAAY,CAAC,IAAI,EAAE;AACnC,EAAE,OAAO,MAAM,CAAC,MAAM,CAAC,IAAI,KAAK,CAAC,cAAc,CAAC,IAAI,CAAC,CAAC,EAAE,EAAE,IAAI,EAAE,CAAC;AACjE;;ACRO,SAAS,YAAY,CAAC,OAAO,EAAE,WAAW,EAAE;AACnD,EAAE,MAAM,EAAE,GAAG,EAAE,SAAS,EAAE,YAAY,EAAE,KAAK,EAAE,GAAG,OAAO;AACzD,EAAE,MAAM,WAAW,GAAGC,eAAQ;AAC9B,IAAI,OAAO,CAAC,aAAa,IAAIC,wBAAc,CAAC,yBAAyB;AACrE,IAAI,eAA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C;AACrD,SAAS;AACT,MAAM;AACN,MAAM,OAAO,WAAW;AACxB,IAAI,CAAC;AACL,GAAG,CAAC;AACJ;;"}
@@ -7,6 +7,8 @@ const LEVELS = /* @__PURE__ */ Object.freeze({
7
7
  ERROR: 'error',
8
8
  });
9
9
  const LOGGING_LIMITS = /* @__PURE__ */ Object.freeze({
10
+ METADATA_KEYS: 16,
11
+ METADATA_KEY_LENGTH: 64,
10
12
  ROOT_LOGGER_CACHE_PAIRS: 1000,
11
13
  STORM_SCOPE_PAIRS: 1000,
12
14
  STORM_WINDOW_MS: 1000,
@@ -50,4 +52,4 @@ exports.LOGGING_ERROR_CODES = LOGGING_ERROR_CODES;
50
52
  exports.LOGGING_ERROR_SOURCES = LOGGING_ERROR_SOURCES;
51
53
  exports.LOGGING_LIMITS = LOGGING_LIMITS;
52
54
  exports.MARKERS = MARKERS;
53
- //# sourceMappingURL=chunk-BLf-eCDO.cjs.map
55
+ //# sourceMappingURL=chunk-DLnBMRjo.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-DLnBMRjo.cjs","sources":["../src/core/constants.js"],"sourcesContent":["export const LEVELS = /* @__PURE__ */ Object.freeze({\n DEBUG: 'debug',\n INFO: 'info',\n WARN: 'warn',\n ERROR: 'error',\n});\nexport const LOGGING_LIMITS = /* @__PURE__ */ Object.freeze({\n METADATA_KEYS: 16,\n METADATA_KEY_LENGTH: 64,\n ROOT_LOGGER_CACHE_PAIRS: 1000,\n STORM_SCOPE_PAIRS: 1000,\n STORM_WINDOW_MS: 1000,\n STORM_SUMMARY_DELAY_MS: 1000,\n DEFAULT_LEVEL_OVERRIDE_MS: 86_400_000,\n MAX_TIMER_DELAY_MS: 2_147_483_647,\n DEFAULT_STORM_LIMIT: 100,\n});\nexport const LOGGING_ERROR_CODES = /* @__PURE__ */ Object.freeze({\n RECURSIVE_LOGGING: 'recursive-logging',\n ROOT_LOGGER_CACHE_LIMIT: 'root-logger-cache-limit',\n STOPPED: 'stopped',\n});\nexport const LOGGING_ERROR_SOURCES = /* @__PURE__ */ Object.freeze({\n DATA: 'data',\n REDACTOR: 'redactor',\n SINK: 'sink',\n STORAGE: 'storage',\n SCOPE: 'scope',\n REENTRY: 'reentry',\n});\nexport const LIMITS = /* @__PURE__ */ Object.freeze({\n maxDepth: 6,\n maxStringLength: 16_384,\n maxArrayLength: 100,\n maxKeys: 100,\n maxNodes: 1000,\n maxRecordSize: 65_536,\n});\nexport const MARKERS = /* @__PURE__ */ Object.freeze({\n LIMIT: '[truncated]',\n CYCLE: '[circular]',\n ACCESSOR: '[accessor]',\n UNSUPPORTED: '[unsupported]',\n MASK: '[redacted]',\n});\n"],"names":[],"mappings":";;AAAY,MAAC,MAAM,mBAAmB,MAAM,CAAC,MAAM,CAAC;AACpD,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,KAAK,EAAE,OAAO;AAChB,CAAC;AACW,MAAC,cAAc,mBAAmB,MAAM,CAAC,MAAM,CAAC;AAC5D,EAAE,aAAa,EAAE,EAAE;AACnB,EAAE,mBAAmB,EAAE,EAAE;AACzB,EAAE,uBAAuB,EAAE,IAAI;AAC/B,EAAE,iBAAiB,EAAE,IAAI;AACzB,EAAE,eAAe,EAAE,IAAI;AACvB,EAAE,sBAAsB,EAAE,IAAI;AAC9B,EAAE,yBAAyB,EAAE,UAAU;AACvC,EAAE,kBAAkB,EAAE,aAAa;AACnC,EAAE,mBAAmB,EAAE,GAAG;AAC1B,CAAC;AACW,MAAC,mBAAmB,mBAAmB,MAAM,CAAC,MAAM,CAAC;AACjE,EAAE,iBAAiB,EAAE,mBAAmB;AACxC,EAAE,uBAAuB,EAAE,yBAAyB;AACpD,EAAE,OAAO,EAAE,SAAS;AACpB,CAAC;AACW,MAAC,qBAAqB,mBAAmB,MAAM,CAAC,MAAM,CAAC;AACnE,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,QAAQ,EAAE,UAAU;AACtB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,OAAO,EAAE,SAAS;AACpB,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,OAAO,EAAE,SAAS;AACpB,CAAC;AACW,MAAC,MAAM,mBAAmB,MAAM,CAAC,MAAM,CAAC;AACpD,EAAE,QAAQ,EAAE,CAAC;AACb,EAAE,eAAe,EAAE,MAAM;AACzB,EAAE,cAAc,EAAE,GAAG;AACrB,EAAE,OAAO,EAAE,GAAG;AACd,EAAE,QAAQ,EAAE,IAAI;AAChB,EAAE,aAAa,EAAE,MAAM;AACvB,CAAC;AACW,MAAC,OAAO,mBAAmB,MAAM,CAAC,MAAM,CAAC;AACrD,EAAE,KAAK,EAAE,aAAa;AACtB,EAAE,KAAK,EAAE,YAAY;AACrB,EAAE,QAAQ,EAAE,YAAY;AACxB,EAAE,WAAW,EAAE,eAAe;AAC9B,EAAE,IAAI,EAAE,YAAY;AACpB,CAAC;;;;;;;"}
@@ -5,6 +5,8 @@ const LEVELS = /* @__PURE__ */ Object.freeze({
5
5
  ERROR: 'error',
6
6
  });
7
7
  const LOGGING_LIMITS = /* @__PURE__ */ Object.freeze({
8
+ METADATA_KEYS: 16,
9
+ METADATA_KEY_LENGTH: 64,
8
10
  ROOT_LOGGER_CACHE_PAIRS: 1000,
9
11
  STORM_SCOPE_PAIRS: 1000,
10
12
  STORM_WINDOW_MS: 1000,
@@ -42,5 +44,5 @@ const MARKERS = /* @__PURE__ */ Object.freeze({
42
44
  MASK: '[redacted]',
43
45
  });
44
46
 
45
- export { LEVELS as L, MARKERS as M, LIMITS as a, LOGGING_ERROR_CODES as b, LOGGING_LIMITS as c, LOGGING_ERROR_SOURCES as d };
46
- //# sourceMappingURL=chunk-CSS3f4_M.js.map
47
+ export { LEVELS as L, MARKERS as M, LIMITS as a, LOGGING_LIMITS as b, LOGGING_ERROR_CODES as c, LOGGING_ERROR_SOURCES as d };
48
+ //# sourceMappingURL=chunk-Da877R_E.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-Da877R_E.js","sources":["../src/core/constants.js"],"sourcesContent":["export const LEVELS = /* @__PURE__ */ Object.freeze({\n DEBUG: 'debug',\n INFO: 'info',\n WARN: 'warn',\n ERROR: 'error',\n});\nexport const LOGGING_LIMITS = /* @__PURE__ */ Object.freeze({\n METADATA_KEYS: 16,\n METADATA_KEY_LENGTH: 64,\n ROOT_LOGGER_CACHE_PAIRS: 1000,\n STORM_SCOPE_PAIRS: 1000,\n STORM_WINDOW_MS: 1000,\n STORM_SUMMARY_DELAY_MS: 1000,\n DEFAULT_LEVEL_OVERRIDE_MS: 86_400_000,\n MAX_TIMER_DELAY_MS: 2_147_483_647,\n DEFAULT_STORM_LIMIT: 100,\n});\nexport const LOGGING_ERROR_CODES = /* @__PURE__ */ Object.freeze({\n RECURSIVE_LOGGING: 'recursive-logging',\n ROOT_LOGGER_CACHE_LIMIT: 'root-logger-cache-limit',\n STOPPED: 'stopped',\n});\nexport const LOGGING_ERROR_SOURCES = /* @__PURE__ */ Object.freeze({\n DATA: 'data',\n REDACTOR: 'redactor',\n SINK: 'sink',\n STORAGE: 'storage',\n SCOPE: 'scope',\n REENTRY: 'reentry',\n});\nexport const LIMITS = /* @__PURE__ */ Object.freeze({\n maxDepth: 6,\n maxStringLength: 16_384,\n maxArrayLength: 100,\n maxKeys: 100,\n maxNodes: 1000,\n maxRecordSize: 65_536,\n});\nexport const MARKERS = /* @__PURE__ */ Object.freeze({\n LIMIT: '[truncated]',\n CYCLE: '[circular]',\n ACCESSOR: '[accessor]',\n UNSUPPORTED: '[unsupported]',\n MASK: '[redacted]',\n});\n"],"names":[],"mappings":"AAAY,MAAC,MAAM,mBAAmB,MAAM,CAAC,MAAM,CAAC;AACpD,EAAE,KAAK,EAAE,OAAO;AAChB,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,IAAI,EAAE,MAAM;AACd,EAAE,KAAK,EAAE,OAAO;AAChB,CAAC;AACW,MAAC,cAAc,mBAAmB,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'./chunk-LRCHwVuE.js';
2
- import { M as MARKERS, L as LEVELS } from './chunk-CSS3f4_M.js';
1
+ import { c as copyMetadata, d as define, o as own } from './chunk---OIebMz.js';
2
+ import { M as MARKERS, L as LEVELS } from './chunk-Da877R_E.js';
3
3
 
4
4
  const errorKeys = ['name', 'message', 'stack', 'cause', 'errors', 'fields'];
5
5
  const recordKeys = [
@@ -15,6 +15,7 @@ const recordKeys = [
15
15
  'context',
16
16
  'error',
17
17
  'truncated',
18
+ 'metadata',
18
19
  ];
19
20
 
20
21
  function errorShape(keys, descriptors) {
@@ -315,6 +316,11 @@ function ownJson(value, limits, { record = false } = {}) {
315
316
  childDepth = depth;
316
317
  childOverflow = descriptor.value === MARKERS.LIMIT;
317
318
  }
319
+ if (kind === 'record' && key === 'metadata') {
320
+ const metadata = copyMetadata(descriptor.value);
321
+ if (metadata) define(result, key, metadata);
322
+ continue;
323
+ }
318
324
  define(
319
325
  result,
320
326
  key,
@@ -373,4 +379,4 @@ function ownRecord(record, limits) {
373
379
  }
374
380
 
375
381
  export { ownRecord as a, ownJson as o };
376
- //# sourceMappingURL=chunk-7ld72rnl.js.map
382
+ //# sourceMappingURL=chunk-De6BoS1P.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-De6BoS1P.js","sources":["../src/core/conversion.js"],"sourcesContent":["import { copyMetadata, define, own } from './common.js';\nimport { LEVELS, MARKERS } from './constants.js';\n\nconst errorKeys = ['name', 'message', 'stack', 'cause', 'errors', 'fields'];\nconst recordKeys = [\n 'runId',\n 'seq',\n 'at',\n 'level',\n 'area',\n 'scope',\n 'message',\n 'redactionVersion',\n 'fields',\n 'context',\n 'error',\n 'truncated',\n 'metadata',\n];\n\nfunction errorShape(keys, descriptors) {\n return (\n keys.every((key) => errorKeys.includes(key)) &&\n typeof descriptors.get('name')?.value === 'string' &&\n typeof descriptors.get('message')?.value === 'string' &&\n (!descriptors.has('stack') ||\n typeof descriptors.get('stack').value === 'string')\n );\n}\n\nfunction errorMarker({ array, keys, descriptors }) {\n return (\n !array &&\n keys.length === 2 &&\n descriptors.get('name')?.value === 'Error' &&\n descriptors.get('message')?.value === MARKERS.LIMIT\n );\n}\n\nfunction arrayIndex(key, length) {\n const index = typeof key === 'string' ? Number(key) : -1;\n return (\n Number.isSafeInteger(index) &&\n index >= 0 &&\n index < length &&\n String(index) === key\n );\n}\n\nexport function ownJson(value, limits, { record = false } = {}) {\n let nodes = 0;\n let classifiedNodes = 0;\n const ancestors = new Set();\n const snapshots = new WeakMap();\n const classifications = new WeakMap();\n const classifying = new Set();\n\n function inspect(value, kind = '') {\n const cached = snapshots.get(value);\n if (cached) return cached;\n const array = Array.isArray(value);\n const length = array ? own(value, 'length') : 0;\n if (\n array &&\n (!Number.isSafeInteger(length) ||\n length < 0 ||\n length > limits.maxArrayLength + 1)\n )\n throw new TypeError('Invalid redactor bounds');\n const keys = Reflect.ownKeys(value).filter(\n (key) => !(array && key === 'length'),\n );\n const ceiling =\n kind === 'marker'\n ? 2\n : kind === 'record'\n ? recordKeys.length\n : Math.max(limits.maxKeys + 1, errorKeys.length);\n if (\n (array && keys.length > limits.maxArrayLength + 1) ||\n (!array && keys.length > ceiling)\n )\n throw new TypeError('Invalid redactor bounds');\n const descriptors = new Map();\n for (const key of keys) {\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (!descriptor || !Object.hasOwn(descriptor, 'value'))\n throw new TypeError('Invalid redactor property');\n descriptors.set(key, descriptor);\n }\n const snapshot = { array, length, keys, descriptors };\n snapshots.set(value, snapshot);\n return snapshot;\n }\n\n function errorRelationships({ descriptors }, depth) {\n const fields = descriptors.get('fields');\n if (\n fields &&\n (!fields.value ||\n typeof fields.value !== 'object' ||\n Array.isArray(fields.value))\n )\n return false;\n const cause = descriptors.get('cause');\n if (cause && !canonicalError(cause.value, depth + 1)) return false;\n const errors = descriptors.get('errors');\n if (!errors) return true;\n if (!Array.isArray(errors.value)) return false;\n const { length, keys, descriptors: children } = inspect(errors.value);\n if (length !== keys.length || !keys.every((key) => arrayIndex(key, length)))\n return false;\n for (const key of keys)\n if (!canonicalError(children.get(key).value, depth + 1)) return false;\n return (\n length <= limits.maxArrayLength ||\n errorMarker(inspect(children.get(String(length - 1)).value))\n );\n }\n\n function canonicalError(value, depth) {\n if (!value || typeof value !== 'object' || Array.isArray(value))\n return false;\n const cached = classifications.get(value);\n if (cached !== undefined) return cached;\n if (classifying.has(value)) return false;\n const snapshot = inspect(\n value,\n depth > limits.maxDepth || classifiedNodes >= limits.maxNodes\n ? 'marker'\n : '',\n );\n if (!errorShape(snapshot.keys, snapshot.descriptors)) {\n classifications.set(value, false);\n return false;\n }\n if (errorMarker(snapshot)) {\n classifications.set(value, true);\n return true;\n }\n if (depth > limits.maxDepth) return false;\n if (++classifiedNodes > limits.maxNodes)\n throw new TypeError('Invalid redactor bounds');\n classifying.add(value);\n const valid = errorRelationships(snapshot, depth);\n classifying.delete(value);\n classifications.set(value, valid);\n return valid;\n }\n\n function charge(kind, marker) {\n if (\n !marker &&\n ![\n 'record',\n 'header',\n 'fixed',\n 'error-name',\n 'error-text',\n 'errors',\n 'error-fields',\n 'boxed-fields',\n ].includes(kind) &&\n ++nodes > limits.maxNodes\n )\n throw new TypeError('Invalid redactor bounds');\n }\n\n function copy(value, depth, kind = '', overflow = false) {\n const compound = value && typeof value === 'object';\n const marker = overflow && value === MARKERS.LIMIT;\n if (!compound) {\n if (\n [\n 'error',\n 'errors',\n 'error-fields',\n 'record',\n 'fields',\n 'context',\n ].includes(kind)\n )\n throw new TypeError('Invalid redactor JSON');\n charge(kind, marker);\n if (depth > limits.maxDepth && value !== MARKERS.LIMIT)\n throw new TypeError('Invalid redactor bounds');\n if (\n value === null ||\n typeof value === 'boolean' ||\n (typeof value === 'number' && Number.isFinite(value))\n )\n return value;\n if (\n typeof value === 'string' &&\n (value.length <= limits.maxStringLength ||\n Object.values(MARKERS).includes(value) ||\n (kind === 'fixed' && value.length <= 64) ||\n (kind === 'error-name' && value === 'Error'))\n )\n return value;\n throw new TypeError('Invalid redactor JSON');\n }\n if (ancestors.has(value)) throw new TypeError('Invalid redactor JSON');\n if (\n depth > limits.maxDepth &&\n kind !== 'errors' &&\n !(overflow && kind === 'error')\n )\n throw new TypeError('Invalid redactor bounds');\n const { array, length, keys, descriptors } = inspect(\n value,\n depth > limits.maxDepth && kind === 'error' ? 'marker' : kind,\n );\n if (\n (kind === 'errors' && !array) ||\n (['record', 'error', 'error-fields', 'fields', 'context'].includes(\n kind,\n ) &&\n array)\n )\n throw new TypeError('Invalid redactor JSON');\n const shapedError = !array && errorShape(keys, descriptors);\n if (kind === 'error' && !shapedError)\n throw new TypeError('Invalid serialized error');\n if (!kind && shapedError && canonicalError(value, depth)) kind = 'error';\n if (kind === 'fields' && keys.length === 1 && keys[0] === 'value')\n kind = 'boxed-fields';\n const overflowMarker =\n overflow && kind === 'error' && errorMarker({ array, keys, descriptors });\n if (overflowMarker)\n return Object.freeze({ name: 'Error', message: MARKERS.LIMIT });\n if (depth > limits.maxDepth && kind !== 'errors')\n throw new TypeError('Invalid redactor bounds');\n charge(kind, false);\n const schema = kind === 'record' || kind === 'error';\n const keyLimit = schema\n ? kind === 'record'\n ? recordKeys.length\n : errorKeys.length\n : array\n ? limits.maxArrayLength\n : limits.maxKeys;\n const lastKey = array && length ? String(length - 1) : '';\n const last = descriptors.get(lastKey)?.value;\n const markerCount = array\n ? Number(\n last === MARKERS.LIMIT ||\n (kind === 'errors' && last && typeof last === 'object'),\n )\n : Number(descriptors.get(MARKERS.LIMIT)?.value === MARKERS.LIMIT);\n if (\n keys.length > keyLimit + markerCount ||\n (array &&\n (length !== keys.length ||\n length > limits.maxArrayLength + markerCount))\n )\n throw new TypeError('Invalid redactor bounds');\n if (kind === 'record' && keys.some((key) => !recordKeys.includes(key)))\n throw new TypeError('Invalid record property');\n const result = array ? [] : {};\n ancestors.add(value);\n for (const key of keys) {\n if (array && !arrayIndex(key, length))\n throw new TypeError('Invalid redactor index');\n const descriptor = descriptors.get(key);\n if (\n typeof key !== 'string' ||\n (!schema &&\n !array &&\n kind !== 'boxed-fields' &&\n key.length > limits.maxStringLength &&\n !Object.values(MARKERS).includes(key)) ||\n !Object.hasOwn(descriptor, 'value')\n )\n throw new TypeError('Invalid redactor property');\n let childKind = '';\n let childDepth = depth + 1;\n let childOverflow =\n (array &&\n key === lastKey &&\n (last === MARKERS.LIMIT || (kind === 'errors' && markerCount))) ||\n (key === MARKERS.LIMIT && descriptor.value === MARKERS.LIMIT);\n if (kind === 'record') {\n childDepth = 0;\n childKind = 'header';\n if (key === 'context') childKind = 'context';\n if (key === 'fields') childKind = 'fields';\n if (key === 'error') {\n childKind = 'error';\n childOverflow = true;\n }\n if (['runId', 'level', 'redactionVersion'].includes(key))\n childKind = 'fixed';\n } else if (kind === 'error') {\n switch (key) {\n case 'cause':\n childKind = 'error';\n childOverflow = true;\n break;\n case 'errors':\n childKind = 'errors';\n break;\n case 'fields':\n childKind = 'error-fields';\n childDepth = depth;\n break;\n default:\n childKind = key === 'name' ? 'error-name' : 'error-text';\n childDepth = depth;\n }\n } else if (kind === 'errors') {\n childKind = 'error';\n childDepth = depth;\n if (depth > limits.maxDepth) childOverflow = true;\n } else if (kind === 'boxed-fields') {\n childDepth = depth;\n childOverflow = descriptor.value === MARKERS.LIMIT;\n }\n if (kind === 'record' && key === 'metadata') {\n const metadata = copyMetadata(descriptor.value);\n if (metadata) define(result, key, metadata);\n continue;\n }\n define(\n result,\n key,\n copy(descriptor.value, childDepth, childKind, childOverflow),\n );\n }\n\n if (array && length > limits.maxArrayLength) {\n const end = result[length - 1];\n if (\n end !== MARKERS.LIMIT &&\n !(\n kind === 'errors' &&\n end &&\n typeof end === 'object' &&\n Object.keys(end).length === 2 &&\n end.name === 'Error' &&\n end.message === MARKERS.LIMIT\n )\n )\n throw new TypeError('Invalid redactor bounds');\n }\n\n ancestors.delete(value);\n return Object.freeze(result);\n }\n const result = copy(value, 0, record ? 'record' : '');\n if (JSON.stringify(result).length > limits.maxRecordSize)\n throw new TypeError('Invalid record size');\n return result;\n}\n\nexport function ownRecord(record, limits) {\n const result = ownJson(record, limits, { record: true });\n for (const key of ['runId', 'area', 'scope', 'message', 'redactionVersion'])\n if (typeof result[key] !== 'string')\n throw new TypeError('Invalid record header');\n if (\n !Number.isSafeInteger(result.seq) ||\n result.seq < 1 ||\n !Number.isFinite(result.at) ||\n !Object.values(LEVELS).includes(result.level)\n )\n throw new TypeError('Invalid record header');\n if (\n result.context !== undefined &&\n Object.values(result.context).some(\n (value) => typeof value !== 'string' && typeof value !== 'number',\n )\n )\n throw new TypeError('Invalid record context');\n\n if (result.truncated !== undefined && result.truncated !== true)\n throw new TypeError('Invalid truncation flag');\n return result;\n}\n"],"names":[],"mappings":";;;AAGA,MAAM,SAAS,GAAG,CAAC,MAAM,EAAE,SAAS,EAAE,OAAO,EAAE,OAAO,EAAE,QAAQ,EAAE,QAAQ,CAAC;AAC3E,MAAM,UAAU,GAAG;AACnB,EAAE,OAAO;AACT,EAAE,KAAK;AACP,EAAE,IAAI;AACN,EAAE,OAAO;AACT,EAAE,MAAM;AACR,EAAE,OAAO;AACT,EAAE,SAAS;AACX,EAAE,kBAAkB;AACpB,EAAE,QAAQ;AACV,EAAE,SAAS;AACX,EAAE,OAAO;AACT,EAAE,WAAW;AACb,EAAE,UAAU;AACZ,CAAC;;AAED,SAAS,UAAU,CAAC,IAAI,EAAE,WAAW,EAAE;AACvC,EAAE;AACF,IAAI,IAAI,CAAC,KAAK,CAAC,CAAC,GAAG,KAAK,SAAS,CAAC,QAAQ,CAAC,GAAG,CAAC,CAAC;AAChD,IAAI,OAAO,WAAW,CAAC,GAAG,CAAC,MAAM,CAAC,EAAE,KAAK,KAAK,QAAQ;AACtD,IAAI,OAAO,WAAW,CAAC,GAAG,CAAC,SAAS,CAAC,EAAE,KAAK,KAAK,QAAQ;AACzD,KAAK,CAAC,WAAW,CAAC,GAAG,CAAC,OAAO,CAAC;AAC9B,MAAM,OAAO,WAAW,CAAC,GAAG,C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;AACjE,IAAI,MAAM,IAAI,SAAS,CAAC,yBAAyB,CAAC;AAClD,EAAE,OAAO,MAAM;AACf;;"}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var constants = require('./chunk-BLf-eCDO.cjs');
3
+ var constants = require('./chunk-DLnBMRjo.cjs');
4
4
 
5
5
  const levelOrder = Object.values(constants.LEVELS);
6
6
 
@@ -58,6 +58,34 @@ function own(value, key) {
58
58
  return Object.getOwnPropertyDescriptor(value, key)?.value;
59
59
  }
60
60
 
61
+ function copyMetadata(value) {
62
+ if (value === undefined) return undefined;
63
+ if (
64
+ !value ||
65
+ typeof value !== 'object' ||
66
+ ![Object.prototype, null].includes(Object.getPrototypeOf(value))
67
+ )
68
+ throw new TypeError('Invalid metadata');
69
+ const keys = Reflect.ownKeys(value);
70
+ if (keys.length > constants.LOGGING_LIMITS.METADATA_KEYS)
71
+ throw new TypeError('Invalid metadata');
72
+ const result = {};
73
+ for (const key of keys) {
74
+ const descriptor = Object.getOwnPropertyDescriptor(value, key);
75
+ if (
76
+ typeof key !== 'string' ||
77
+ !key.length ||
78
+ key.length > constants.LOGGING_LIMITS.METADATA_KEY_LENGTH ||
79
+ !descriptor?.enumerable ||
80
+ !Object.hasOwn(descriptor, 'value') ||
81
+ typeof descriptor.value !== 'boolean'
82
+ )
83
+ throw new TypeError('Invalid metadata');
84
+ define(result, key, descriptor.value);
85
+ }
86
+ return keys.length ? Object.freeze(result) : undefined;
87
+ }
88
+
61
89
  function isError(value) {
62
90
  try {
63
91
  return Error.isError?.(value) || value instanceof Error;
@@ -111,6 +139,7 @@ function validateQuery(query = {}) {
111
139
  exports.assertLevel = assertLevel;
112
140
  exports.assertStormLimit = assertStormLimit;
113
141
  exports.copyBindings = copyBindings;
142
+ exports.copyMetadata = copyMetadata;
114
143
  exports.define = define;
115
144
  exports.isError = isError;
116
145
  exports.levelRank = levelRank;
@@ -121,4 +150,4 @@ exports.report = report;
121
150
  exports.resolveLimits = resolveLimits;
122
151
  exports.scheduler = scheduler;
123
152
  exports.validateQuery = validateQuery;
124
- //# sourceMappingURL=chunk-CXZYNALm.cjs.map
153
+ //# sourceMappingURL=chunk-Dl2KJDqt.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-Dl2KJDqt.cjs","sources":["../src/core/common.js"],"sourcesContent":["import { LEVELS, LIMITS, LOGGING_LIMITS } from './constants.js';\n\nconst levelOrder = Object.values(LEVELS);\n\nexport const scheduler = Object.freeze({\n setTimeout: (callback, delay) => globalThis.setTimeout(callback, delay),\n clearTimeout: (handle) => globalThis.clearTimeout(handle),\n});\nexport const levelRank = (level) => levelOrder.indexOf(level);\n\nexport function assertLevel(level) {\n if (levelRank(level) < 0) throw new TypeError('Invalid log level');\n}\n\nexport function assertStormLimit(value) {\n if (\n value !== undefined &&\n value !== false &&\n (!Number.isSafeInteger(value) || value < 1)\n )\n throw new TypeError('Invalid storm limit');\n}\n\nexport function positive(value, name) {\n if (!Number.isSafeInteger(value) || value < 1)\n throw new TypeError(`${name} must be a positive safe integer`);\n return value;\n}\n\nexport function resolveLimits(limits = {}) {\n const result = {};\n for (const [key, fallback] of Object.entries(LIMITS))\n result[key] = positive(limits[key] ?? fallback, key);\n return Object.freeze(result);\n}\n\nexport function report(callback, ...args) {\n try {\n const result = callback?.(...args);\n if (result) Promise.resolve(result).catch(() => {});\n } catch {\n /* The reporter cannot interrupt cleanup. */\n }\n}\n\nexport function define(target, key, value) {\n Object.defineProperty(target, key, {\n value,\n enumerable: true,\n configurable: true,\n writable: true,\n });\n}\n\nexport function own(value, key) {\n return Object.getOwnPropertyDescriptor(value, key)?.value;\n}\n\nexport function copyMetadata(value) {\n if (value === undefined) return undefined;\n if (\n !value ||\n typeof value !== 'object' ||\n ![Object.prototype, null].includes(Object.getPrototypeOf(value))\n )\n throw new TypeError('Invalid metadata');\n const keys = Reflect.ownKeys(value);\n if (keys.length > LOGGING_LIMITS.METADATA_KEYS)\n throw new TypeError('Invalid metadata');\n const result = {};\n for (const key of keys) {\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (\n typeof key !== 'string' ||\n !key.length ||\n key.length > LOGGING_LIMITS.METADATA_KEY_LENGTH ||\n !descriptor?.enumerable ||\n !Object.hasOwn(descriptor, 'value') ||\n typeof descriptor.value !== 'boolean'\n )\n throw new TypeError('Invalid metadata');\n define(result, key, descriptor.value);\n }\n return keys.length ? Object.freeze(result) : undefined;\n}\n\nexport function isError(value) {\n try {\n return Error.isError?.(value) || value instanceof Error;\n } catch {\n return false;\n }\n}\n\nexport function randomHex(length) {\n if (!globalThis.crypto?.getRandomValues)\n throw new Error('Cryptographic randomness is unavailable');\n return Array.from(\n globalThis.crypto.getRandomValues(new Uint8Array(length)),\n (byte) => byte.toString(16).padStart(2, '0'),\n ).join('');\n}\n\nexport function copyBindings(value = {}) {\n const result = {};\n for (const key of Reflect.ownKeys(value)) {\n const descriptor = Object.getOwnPropertyDescriptor(value, key);\n if (\n typeof key === 'string' &&\n descriptor?.enumerable &&\n Object.hasOwn(descriptor, 'value')\n )\n Object.defineProperty(result, key, descriptor);\n }\n return result;\n}\n\nexport function validateQuery(query = {}) {\n const { from, to, areas } = query;\n if (\n (from !== undefined && !Number.isFinite(from)) ||\n (to !== undefined && !Number.isFinite(to)) ||\n (from ?? -Infinity) > (to ?? Infinity)\n )\n throw new TypeError('Invalid record time range');\n if (\n areas !== undefined &&\n (!Array.isArray(areas) || areas.some((area) => typeof area !== 'string'))\n )\n throw new TypeError('Invalid record areas');\n return (record) =>\n (!areas || areas.includes(record.area)) &&\n record.at >= (from ?? -Infinity) &&\n record.at <= (to ?? Infinity);\n}\n"],"names":["LEVELS","LIMITS","LOGGING_LIMITS"],"mappings":";;;;AAEA,MAAM,UAAU,GAAG,MAAM,CAAC,MAAM,CAACA,gBAAM,CAAC;;AAE5B,MAAC,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC;AACvC,EAAE,UAAU,EAAE,CAAC,QAAQ,EAAE,KAAK,KAAK,UAA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AAI,CAAC,CAAC,KAAK,IAAI,KAAK,CAAC,QAAQ,CAAC,MAAM,CAAC,IAAI,CAAC;AAC1C,IAAI,MAAM,CAAC,EAAE,KAAK,IAAI,IAAI,CAAC,QAAQ,CAAC;AACpC,IAAI,MAAM,CAAC,EAAE,KAAK,EAAE,IAAI,QAAQ,CAAC;AACjC;;;;;;;;;;;;;;;"}
@@ -1,6 +1,6 @@
1
1
  'use strict';
2
2
 
3
- var common = require('./chunk-CXZYNALm.cjs');
3
+ var common = require('./chunk-Dl2KJDqt.cjs');
4
4
 
5
5
  function escapeText(value) {
6
6
  return String(value).replace(
@@ -50,4 +50,4 @@ function createConsoleSink({
50
50
 
51
51
  exports.createConsoleSink = createConsoleSink;
52
52
  exports.formatRecord = formatRecord;
53
- //# sourceMappingURL=chunk-DqK_3eFr.cjs.map
53
+ //# sourceMappingURL=chunk-DlZYLPaU.cjs.map
@@ -1 +1 @@
1
- {"version":3,"file":"chunk-DqK_3eFr.cjs","sources":["../src/core/format.js"],"sourcesContent":["import { assertLevel, levelRank } from './common.js';\n\nfunction escapeText(value) {\n return String(value).replace(\n // biome-ignore lint/suspicious/noControlCharactersInRegex: Escape record control characters.\n /[\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u202a-\\u202e\\u2066-\\u2069]/g,\n (character) =>\n `\\\\u${character.charCodeAt(0).toString(16).padStart(4, '0')}`,\n );\n}\n\nfunction quote(value) {\n const text = escapeText(value);\n return /[\\s=\"\\\\]/.test(text) ? JSON.stringify(text) : text;\n}\n\nexport function formatRecord(record) {\n const { at, level, area, scope, message, runId, context, fields, error } =\n record;\n let header = `${new Date(at).toISOString()} ${level.toUpperCase()} area=${quote(area)} scope=${quote(scope)} message=${quote(message)} runId=${quote(runId)}`;\n for (const values of [context, fields])\n for (const [key, value] of Object.entries(values ?? {}))\n header += ` ${quote(key)}=${quote(typeof value === 'object' ? JSON.stringify(value) : value)}`;\n if (error)\n header += `\\n ${escapeText(error.name)}: ${escapeText(error.message)}${\n error.stack\n ? `\\n${error.stack\n .split(/\\r?\\n/)\n .map((line) => ` ${escapeText(line)}`)\n .join('\\n')}`\n : ''\n }${error.cause ? `\\n cause=${escapeText(JSON.stringify(error.cause))}` : ''}${error.errors ? `\\n errors=${escapeText(JSON.stringify(error.errors))}` : ''}${error.fields ? `\\n fields=${escapeText(JSON.stringify(error.fields))}` : ''}`;\n return header;\n}\n\nexport function createConsoleSink({\n level = 'debug',\n console: output = globalThis.console,\n} = {}) {\n assertLevel(level);\n return Object.freeze({\n write(record) {\n if (levelRank(record.level) >= levelRank(level))\n output[record.level](formatRecord(record));\n },\n });\n}\n"],"names":["assertLevel","levelRank"],"mappings":";;;;AAEA,SAAS,UAAU,CAAC,KAAK,EAAE;AAC3B,EAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO;AAC9B;AACA,IAAI,qEAAqE;AACzE,IAAI,CAAC,SAAS;AACd,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;AACnE,GAAG;AACH;;AAEA,SAAS,KAAK,CAAC,KAAK,EAAE;AACtB,EAAE,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC;AAChC,EAAE,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI;AAC5D;;AAEO,SAAS,YAAY,CAAC,MAAM,EAAE;AACrC,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE;AAC1E,IAAI,MAAM;AACV,EAAE,IAAI,MAAM,GAAG,CAAC,EAAE,IAAI,IAAI,CAAC,EAAE,CAAC,CAAC,WAAW,EAAE,CAAC,CAAC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KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,aAAa,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AACtP,EAAE,OAAO,MAAM;AACf;;AAEO,SAAS,iBAAiB,CAAC;AAClC,EAAE,KAAK,GAAG,OAAO;AACjB,EAAE,OAAO,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO;AACtC,CAAC,GAAG,EAAE,EAAE;AACR,EAAEA,kBAAW,CAAC,KAAK,CAAC;AACpB,EAAE,OAAO,MAAM,CAAC,MAAM,CAAC;AACvB,IAAI,KAAK,CAAC,MAAM,EAAE;AAClB,MAAM,IAAIC,gBAAS,CAAC,MAAM,CAAC,KAAK,CAAC,IAAIA,gBAAS,CAAC,KAAK,CAAC;AACrD,QAAQ,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AAClD,IAAI,CAAC;AACL,GAAG,CAAC;AACJ;;;"}
1
+ {"version":3,"file":"chunk-DlZYLPaU.cjs","sources":["../src/core/format.js"],"sourcesContent":["import { assertLevel, levelRank } from './common.js';\n\nfunction escapeText(value) {\n return String(value).replace(\n // biome-ignore lint/suspicious/noControlCharactersInRegex: Escape record control characters.\n /[\\u0000-\\u001f\\u007f-\\u009f\\u2028\\u2029\\u202a-\\u202e\\u2066-\\u2069]/g,\n (character) =>\n `\\\\u${character.charCodeAt(0).toString(16).padStart(4, '0')}`,\n );\n}\n\nfunction quote(value) {\n const text = escapeText(value);\n return /[\\s=\"\\\\]/.test(text) ? JSON.stringify(text) : text;\n}\n\nexport function formatRecord(record) {\n const { at, level, area, scope, message, runId, context, fields, error } =\n record;\n let header = `${new Date(at).toISOString()} ${level.toUpperCase()} area=${quote(area)} scope=${quote(scope)} message=${quote(message)} runId=${quote(runId)}`;\n for (const values of [context, fields])\n for (const [key, value] of Object.entries(values ?? {}))\n header += ` ${quote(key)}=${quote(typeof value === 'object' ? JSON.stringify(value) : value)}`;\n if (error)\n header += `\\n ${escapeText(error.name)}: ${escapeText(error.message)}${\n error.stack\n ? `\\n${error.stack\n .split(/\\r?\\n/)\n .map((line) => ` ${escapeText(line)}`)\n .join('\\n')}`\n : ''\n }${error.cause ? `\\n cause=${escapeText(JSON.stringify(error.cause))}` : ''}${error.errors ? `\\n errors=${escapeText(JSON.stringify(error.errors))}` : ''}${error.fields ? `\\n fields=${escapeText(JSON.stringify(error.fields))}` : ''}`;\n return header;\n}\n\nexport function createConsoleSink({\n level = 'debug',\n console: output = globalThis.console,\n} = {}) {\n assertLevel(level);\n return Object.freeze({\n write(record) {\n if (levelRank(record.level) >= levelRank(level))\n output[record.level](formatRecord(record));\n },\n });\n}\n"],"names":["assertLevel","levelRank"],"mappings":";;;;AAEA,SAAS,UAAU,CAAC,KAAK,EAAE;AAC3B,EAAE,OAAO,MAAM,CAAC,KAAK,CAAC,CAAC,OAAO;AAC9B;AACA,IAAI,qEAAqE;AACzE,IAAI,CAAC,SAAS;AACd,MAAM,CAAC,GAAG,EAAE,SAAS,CAAC,UAAU,CAAC,CAAC,CAAC,CAAC,QAAQ,CAAC,EAAE,CAAC,CAAC,QAAQ,CAAC,CAAC,EAAE,GAAG,CAAC,CAAC,CAAC;AACnE,GAAG;AACH;;AAEA,SAAS,KAAK,CAAC,KAAK,EAAE;AACtB,EAAE,MAAM,IAAI,GAAG,UAAU,CAAC,KAAK,CAAC;AAChC,EAAE,OAAO,UAAU,CAAC,IAAI,CAAC,IAAI,CAAC,GAAG,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,GAAG,IAAI;AAC5D;;AAEO,SAAS,YAAY,CAAC,MAAM,EAAE;AACrC,EAAE,MAAM,EAAE,EAAE,EAAE,KAAK,EAAE,IAAI,EAAE,KAAK,EAAE,OAAO,EAAE,KAAK,EAAE,OAAO,E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AC,KAAK,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,aAAa,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,EAAE,KAAK,CAAC,MAAM,GAAG,CAAC,aAAa,EAAE,UAAU,CAAC,IAAI,CAAC,SAAS,CAAC,KAAK,CAAC,MAAM,CAAC,CAAC,CAAC,CAAC,GAAG,EAAE,CAAC,CAAC;AACtP,EAAE,OAAO,MAAM;AACf;;AAEO,SAAS,iBAAiB,CAAC;AAClC,EAAE,KAAK,GAAG,OAAO;AACjB,EAAE,OAAO,EAAE,MAAM,GAAG,UAAU,CAAC,OAAO;AACtC,CAAC,GAAG,EAAE,EAAE;AACR,EAAEA,kBAAW,CAAC,KAAK,CAAC;AACpB,EAAE,OAAO,MAAM,CAAC,MAAM,CAAC;AACvB,IAAI,KAAK,CAAC,MAAM,EAAE;AAClB,MAAM,IAAIC,gBAAS,CAAC,MAAM,CAAC,KAAK,CAAC,IAAIA,gBAAS,CAAC,KAAK,CAAC;AACrD,QAAQ,MAAM,CAAC,MAAM,CAAC,KAAK,CAAC,CAAC,YAAY,CAAC,MAAM,CAAC,CAAC;AAClD,IAAI,CAAC;AACL,GAAG,CAAC;AACJ;;;"}
@@ -1,11 +1,11 @@
1
1
  'use strict';
2
2
 
3
- var hub = require('../chunk-ieB8yTEn.cjs');
3
+ var hub = require('../chunk-DEyTe0f4.cjs');
4
4
  var history_index = require('../history/index.cjs');
5
5
  var upload_index = require('../upload/index.cjs');
6
- require('../chunk-CXZYNALm.cjs');
7
- require('../chunk-BLf-eCDO.cjs');
8
- require('../chunk-CEhpwtwJ.cjs');
6
+ require('../chunk-Dl2KJDqt.cjs');
7
+ require('../chunk-DLnBMRjo.cjs');
8
+ require('../chunk-BMmKUicm.cjs');
9
9
  require('@bazariodev/coordination');
10
10
 
11
11
  const CLIENT_DEFAULTS = Object.freeze({
@@ -1,9 +1,9 @@
1
- import { c as createLogging } from '../chunk-DkvWLziD.js';
1
+ import { c as createLogging } from '../chunk-CJmlBW-M.js';
2
2
  import { createMemoryHistory } from '../history/index.js';
3
3
  import { createUploadSink } from '../upload/index.js';
4
- import '../chunk-LRCHwVuE.js';
5
- import '../chunk-CSS3f4_M.js';
6
- import '../chunk-7ld72rnl.js';
4
+ import '../chunk---OIebMz.js';
5
+ import '../chunk-Da877R_E.js';
6
+ import '../chunk-De6BoS1P.js';
7
7
  import '@bazariodev/coordination';
8
8
 
9
9
  const CLIENT_DEFAULTS = Object.freeze({
@@ -5,6 +5,8 @@ export const LEVELS: Readonly<{
5
5
  ERROR: "error";
6
6
  }>;
7
7
  export const LOGGING_LIMITS: Readonly<{
8
+ METADATA_KEYS: 16;
9
+ METADATA_KEY_LENGTH: 64;
8
10
  ROOT_LOGGER_CACHE_PAIRS: 1000;
9
11
  STORM_SCOPE_PAIRS: 1000;
10
12
  STORM_WINDOW_MS: 1000;
@@ -5,6 +5,8 @@ export const LEVELS: Readonly<{
5
5
  ERROR: "error";
6
6
  }>;
7
7
  export const LOGGING_LIMITS: Readonly<{
8
+ METADATA_KEYS: 16;
9
+ METADATA_KEY_LENGTH: 64;
8
10
  ROOT_LOGGER_CACHE_PAIRS: 1000;
9
11
  STORM_SCOPE_PAIRS: 1000;
10
12
  STORM_WINDOW_MS: 1000;
@@ -1,9 +1,9 @@
1
1
  'use strict';
2
2
 
3
- var common = require('../chunk-CXZYNALm.cjs');
4
- var conversion = require('../chunk-CEhpwtwJ.cjs');
5
- var format = require('../chunk-DqK_3eFr.cjs');
6
- require('../chunk-BLf-eCDO.cjs');
3
+ var common = require('../chunk-Dl2KJDqt.cjs');
4
+ var conversion = require('../chunk-BMmKUicm.cjs');
5
+ var format = require('../chunk-DlZYLPaU.cjs');
6
+ require('../chunk-DLnBMRjo.cjs');
7
7
 
8
8
  const EXPORT_LIMITS = /* @__PURE__ */ Object.freeze({
9
9
  YIELD_RECORDS: 100,
@@ -1,7 +1,7 @@
1
- import { s as scheduler, v as validateQuery } from '../chunk-LRCHwVuE.js';
2
- import { o as ownJson } from '../chunk-7ld72rnl.js';
3
- import { f as formatRecord } from '../chunk-DYcNnkOV.js';
4
- import '../chunk-CSS3f4_M.js';
1
+ import { s as scheduler, v as validateQuery } from '../chunk---OIebMz.js';
2
+ import { o as ownJson } from '../chunk-De6BoS1P.js';
3
+ import { f as formatRecord } from '../chunk-D1NggH6k.js';
4
+ import '../chunk-Da877R_E.js';
5
5
 
6
6
  const EXPORT_LIMITS = /* @__PURE__ */ Object.freeze({
7
7
  YIELD_RECORDS: 100,
@@ -1,8 +1,8 @@
1
1
  'use strict';
2
2
 
3
3
  var coordination = require('@bazariodev/coordination');
4
- var common = require('../chunk-CXZYNALm.cjs');
5
- require('../chunk-BLf-eCDO.cjs');
4
+ var common = require('../chunk-Dl2KJDqt.cjs');
5
+ require('../chunk-DLnBMRjo.cjs');
6
6
 
7
7
  function createMemoryHistory(options) {
8
8
  if (!options || typeof options !== 'object' || Array.isArray(options))
@@ -1,6 +1,6 @@
1
1
  import { Queue } from '@bazariodev/coordination';
2
- import { p as positive, v as validateQuery } from '../chunk-LRCHwVuE.js';
3
- import '../chunk-CSS3f4_M.js';
2
+ import { p as positive, v as validateQuery } from '../chunk---OIebMz.js';
3
+ import '../chunk-Da877R_E.js';
4
4
 
5
5
  function createMemoryHistory(options) {
6
6
  if (!options || typeof options !== 'object' || Array.isArray(options))
package/dist/index.cjs CHANGED
@@ -1,10 +1,10 @@
1
1
  'use strict';
2
2
 
3
- var format = require('./chunk-DqK_3eFr.cjs');
4
- var hub = require('./chunk-ieB8yTEn.cjs');
5
- require('./chunk-CXZYNALm.cjs');
6
- require('./chunk-BLf-eCDO.cjs');
7
- require('./chunk-CEhpwtwJ.cjs');
3
+ var format = require('./chunk-DlZYLPaU.cjs');
4
+ var hub = require('./chunk-DEyTe0f4.cjs');
5
+ require('./chunk-Dl2KJDqt.cjs');
6
+ require('./chunk-DLnBMRjo.cjs');
7
+ require('./chunk-BMmKUicm.cjs');
8
8
 
9
9
 
10
10