@utk09/ui-observability 0.12.0 → 1.0.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.
- package/CHANGELOG.md +420 -0
- package/README.md +72 -839
- package/dist/{batch-BjQUwjA6.js → batch-CXmPmTse.js} +4 -4
- package/dist/{batch-BjQUwjA6.js.map → batch-CXmPmTse.js.map} +1 -1
- package/dist/{batch-D5LlU4Q9.cjs → batch-mmPigCpi.cjs} +2 -2
- package/dist/{batch-D5LlU4Q9.cjs.map → batch-mmPigCpi.cjs.map} +1 -1
- package/dist/bus/bus.d.cts +331 -0
- package/dist/bus/bus.d.ts +60 -10
- package/dist/bus/links.d.cts +132 -0
- package/dist/bus/links.d.ts +18 -3
- package/dist/bus/validation.d.cts +16 -0
- package/dist/bus/validation.d.ts +10 -1
- package/dist/{bus-ecxUNTja.js → bus-C39wspFV.js} +308 -193
- package/dist/bus-C39wspFV.js.map +1 -0
- package/dist/bus-_EaOVPGq.cjs +2 -0
- package/dist/bus-_EaOVPGq.cjs.map +1 -0
- package/dist/capture/console.d.cts +37 -0
- package/dist/capture/console.d.ts +1 -1
- package/dist/capture/errors.d.cts +32 -0
- package/dist/capture/errors.d.ts +1 -1
- package/dist/capture/interactions.d.cts +48 -0
- package/dist/capture/interactions.d.ts +1 -1
- package/dist/capture/lifecycle.d.cts +20 -0
- package/dist/capture/lifecycle.d.ts +1 -1
- package/dist/capture/long-frames.d.cts +31 -0
- package/dist/capture/long-frames.d.ts +1 -1
- package/dist/capture/network.d.cts +57 -0
- package/dist/capture/network.d.ts +1 -1
- package/dist/capture/profiler-frames.d.cts +44 -0
- package/dist/capture/profiler-frames.d.ts +1 -1
- package/dist/capture/replay-buffer.d.cts +45 -0
- package/dist/capture/replay-buffer.d.ts +9 -10
- package/dist/capture/replay-upload.d.cts +79 -0
- package/dist/capture/replay-upload.d.ts +7 -2
- package/dist/capture/replay.d.cts +114 -0
- package/dist/capture/replay.d.ts +1 -1
- package/dist/capture/reports.d.cts +17 -0
- package/dist/capture/reports.d.ts +1 -1
- package/dist/capture/resource-timing.d.cts +14 -0
- package/dist/capture/resource-timing.d.ts +1 -1
- package/dist/capture/server-timing.d.cts +19 -0
- package/dist/capture/storm.d.cts +13 -0
- package/dist/capture/storm.d.ts +5 -5
- package/dist/capture/types.d.cts +128 -0
- package/dist/capture/types.d.ts +10 -9
- package/dist/capture/unclean-exit.d.cts +31 -0
- package/dist/capture/unclean-exit.d.ts +1 -1
- package/dist/capture/user-timing.d.cts +22 -0
- package/dist/capture/user-timing.d.ts +2 -2
- package/dist/capture/web-socket.d.cts +40 -0
- package/dist/capture/web-socket.d.ts +3 -3
- package/dist/capture/web-vitals.d.cts +40 -0
- package/dist/capture/web-vitals.d.ts +1 -1
- package/dist/{compression-lD9abCcO.cjs → compression-CvED_Jel.cjs} +2 -2
- package/dist/{compression-lD9abCcO.cjs.map → compression-CvED_Jel.cjs.map} +1 -1
- package/dist/{compression-AJJCMBOa.js → compression-tVtXwVjX.js} +2 -2
- package/dist/{compression-AJJCMBOa.js.map → compression-tVtXwVjX.js.map} +1 -1
- package/dist/config-DUs7uHHt.cjs +2 -0
- package/dist/config-DUs7uHHt.cjs.map +1 -0
- package/dist/config-SgQcCP1_.js +560 -0
- package/dist/config-SgQcCP1_.js.map +1 -0
- package/dist/console-BGgGnjSi.js +81 -0
- package/dist/console-BGgGnjSi.js.map +1 -0
- package/dist/console-CSZ5_Vx5.cjs +2 -0
- package/dist/console-CSZ5_Vx5.cjs.map +1 -0
- package/dist/constants-CUyd9cTZ.js +357 -0
- package/dist/constants-CUyd9cTZ.js.map +1 -0
- package/dist/constants-CqdJhTxH.cjs +2 -0
- package/dist/constants-CqdJhTxH.cjs.map +1 -0
- package/dist/constants.d.cts +751 -0
- package/dist/constants.d.ts +88 -20
- package/dist/core/breadcrumbs.d.cts +54 -0
- package/dist/core/breadcrumbs.d.ts +5 -0
- package/dist/core/config.d.cts +45 -0
- package/dist/core/config.d.ts +30 -2
- package/dist/core/context.d.cts +24 -0
- package/dist/core/context.d.ts +3 -8
- package/dist/core/debug-buffer.d.cts +34 -0
- package/dist/core/debug-buffer.d.ts +3 -3
- package/dist/core/debug-bundle.d.cts +12 -0
- package/dist/core/debug-bundle.d.ts +3 -3
- package/dist/core/deferred.d.cts +7 -0
- package/dist/core/deferred.d.ts +2 -2
- package/dist/core/diagnostics.d.cts +86 -0
- package/dist/core/diagnostics.d.ts +1 -1
- package/dist/core/drops.d.cts +39 -0
- package/dist/core/drops.d.ts +16 -6
- package/dist/core/hold-buffer.d.cts +36 -0
- package/dist/core/hold-buffer.d.ts +16 -7
- package/dist/core/journey.d.cts +148 -0
- package/dist/core/journey.d.ts +7 -7
- package/dist/core/logger.d.cts +141 -0
- package/dist/core/logger.d.ts +23 -30
- package/dist/core/measure.d.cts +30 -0
- package/dist/core/measure.d.ts +14 -3
- package/dist/core/meter.d.cts +78 -0
- package/dist/core/meter.d.ts +14 -8
- package/dist/core/pipeline.d.cts +227 -0
- package/dist/core/pipeline.d.ts +73 -10
- package/dist/core/profile-buckets.d.cts +31 -0
- package/dist/core/profiler.d.cts +218 -0
- package/dist/core/profiler.d.ts +2 -2
- package/dist/core/record.d.cts +190 -0
- package/dist/core/record.d.ts +44 -12
- package/dist/core/remote-rules.d.cts +17 -0
- package/dist/core/remote-rules.d.ts +3 -3
- package/dist/core/remote-sampling.d.cts +74 -0
- package/dist/core/remote-sampling.d.ts +3 -3
- package/dist/core/rotation.d.cts +75 -0
- package/dist/core/rotation.d.ts +75 -0
- package/dist/core/runtime.d.cts +765 -0
- package/dist/core/runtime.d.ts +245 -70
- package/dist/core/sampling.d.cts +86 -0
- package/dist/core/sampling.d.ts +5 -5
- package/dist/core/sender.d.cts +161 -0
- package/dist/core/sender.d.ts +59 -15
- package/dist/core/spans.d.cts +39 -0
- package/dist/core/spans.d.ts +1 -1
- package/dist/debug-bundle-BXIlwDKM.cjs +2 -0
- package/dist/debug-bundle-BXIlwDKM.cjs.map +1 -0
- package/dist/debug-bundle-CRpYV_ui.js +35 -0
- package/dist/debug-bundle-CRpYV_ui.js.map +1 -0
- package/dist/defineProperty-X1c4tIPD.cjs +1 -0
- package/dist/defineProperty-s2S8BXUc.js +35 -0
- package/dist/doctor.cjs +1 -1
- package/dist/doctor.cjs.map +1 -1
- package/dist/doctor.d.cts +36 -0
- package/dist/doctor.d.ts +5 -2
- package/dist/doctor.js +121 -89
- package/dist/doctor.js.map +1 -1
- package/dist/errors-BE_EZV7Q.js +86 -0
- package/dist/errors-BE_EZV7Q.js.map +1 -0
- package/dist/errors-CNPbesMs.cjs +3 -0
- package/dist/errors-CNPbesMs.cjs.map +1 -0
- package/dist/factory-CTi0Is3F.js +404 -0
- package/dist/factory-CTi0Is3F.js.map +1 -0
- package/dist/factory-hRrH32v5.cjs +2 -0
- package/dist/factory-hRrH32v5.cjs.map +1 -0
- package/dist/guards-BlYGRK4l.js +10 -0
- package/dist/guards-BlYGRK4l.js.map +1 -0
- package/dist/guards-EjG3ahFp.cjs +2 -0
- package/dist/guards-EjG3ahFp.cjs.map +1 -0
- package/dist/{identity-BrQp_5J5.js → identity-DdhKgrpk.js} +20 -24
- package/dist/identity-DdhKgrpk.js.map +1 -0
- package/dist/identity-DlWRIuwy.cjs +2 -0
- package/dist/identity-DlWRIuwy.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +300 -0
- package/dist/index.d.ts +89 -98
- package/dist/index.js +1173 -1506
- package/dist/index.js.map +1 -1
- package/dist/indexeddb-storage-CL9uqBCy.cjs +2 -0
- package/dist/indexeddb-storage-CL9uqBCy.cjs.map +1 -0
- package/dist/{indexeddb-storage-DLXQzAGh.js → indexeddb-storage-GHdl0t8A.js} +51 -47
- package/dist/indexeddb-storage-GHdl0t8A.js.map +1 -0
- package/dist/interactions-CUkzK8sR.cjs +2 -0
- package/dist/interactions-CUkzK8sR.cjs.map +1 -0
- package/dist/{interactions-B6z2I4tU.js → interactions-DiFvCosX.js} +41 -49
- package/dist/interactions-DiFvCosX.js.map +1 -0
- package/dist/journey-B4Adltjm.cjs +2 -0
- package/dist/journey-B4Adltjm.cjs.map +1 -0
- package/dist/{journey-35yCMNFo.js → journey-D2_sia57.js} +45 -48
- package/dist/journey-D2_sia57.js.map +1 -0
- package/dist/{library-console-Dl_Ly6DQ.js → library-console-Btrzt814.js} +2 -2
- package/dist/{library-console-Dl_Ly6DQ.js.map → library-console-Btrzt814.js.map} +1 -1
- package/dist/{library-console-BFWEuQsl.cjs → library-console-CPW6bvZH.cjs} +2 -2
- package/dist/{library-console-BFWEuQsl.cjs.map → library-console-CPW6bvZH.cjs.map} +1 -1
- package/dist/{library-request-nI6pvI6I.js → library-request-BJ9PLRaD.js} +2 -2
- package/dist/{library-request-nI6pvI6I.js.map → library-request-BJ9PLRaD.js.map} +1 -1
- package/dist/{library-request-Da-CHKzT.cjs → library-request-D7OvTxZV.cjs} +2 -2
- package/dist/{library-request-Da-CHKzT.cjs.map → library-request-D7OvTxZV.cjs.map} +1 -1
- package/dist/{lifecycle-CZ6RRXc6.js → lifecycle-22CUCrc9.js} +21 -29
- package/dist/lifecycle-22CUCrc9.js.map +1 -0
- package/dist/lifecycle-IaAm1mOC.cjs +2 -0
- package/dist/lifecycle-IaAm1mOC.cjs.map +1 -0
- package/dist/{log-record-DIA6McNr.js → log-record-BNiLfqtL.js} +8 -7
- package/dist/log-record-BNiLfqtL.js.map +1 -0
- package/dist/log-record-CkivuiEl.cjs +2 -0
- package/dist/log-record-CkivuiEl.cjs.map +1 -0
- package/dist/long-frames-BUUbXd-B.cjs +2 -0
- package/dist/long-frames-BUUbXd-B.cjs.map +1 -0
- package/dist/{long-frames-430_85Da.js → long-frames-DNFaRnC3.js} +18 -22
- package/dist/long-frames-DNFaRnC3.js.map +1 -0
- package/dist/models/batch.d.cts +57 -0
- package/dist/models/batch.d.ts +2 -2
- package/dist/models/bus.d.cts +158 -0
- package/dist/models/bus.d.ts +22 -2
- package/dist/models/config.d.cts +1540 -0
- package/dist/models/config.d.ts +360 -259
- package/dist/models/drop.d.cts +54 -0
- package/dist/models/drop.d.ts +16 -3
- package/dist/models/health.d.cts +148 -0
- package/dist/models/health.d.ts +108 -12
- package/dist/models/log-record.d.cts +61 -0
- package/dist/models/metric.d.cts +139 -0
- package/dist/models/metric.d.ts +13 -2
- package/dist/models/plugin.d.cts +47 -0
- package/dist/models/plugin.d.ts +3 -3
- package/dist/models/replay.d.cts +60 -0
- package/dist/models/serializer.d.cts +23 -0
- package/dist/models/serializer.d.ts +1 -1
- package/dist/models/storage.d.cts +95 -0
- package/dist/models/storage.d.ts +7 -5
- package/dist/network-CGMLQ-mA.cjs +2 -0
- package/dist/network-CGMLQ-mA.cjs.map +1 -0
- package/dist/{network-C7SkLf4v.js → network-on2zZT6H.js} +51 -51
- package/dist/network-on2zZT6H.js.map +1 -0
- package/dist/{otlp-2MCrC3kd.cjs → otlp-BENHf3g9.cjs} +2 -2
- package/dist/{otlp-2MCrC3kd.cjs.map → otlp-BENHf3g9.cjs.map} +1 -1
- package/dist/{otlp-COq033e3.js → otlp-DimfrRor.js} +12 -12
- package/dist/{otlp-COq033e3.js.map → otlp-DimfrRor.js.map} +1 -1
- package/dist/{platform-CVewe4wQ.js → platform-BaaFIPCU.js} +10 -10
- package/dist/{platform-CVewe4wQ.js.map → platform-BaaFIPCU.js.map} +1 -1
- package/dist/{platform-12uR7kBQ.cjs → platform-CfA3-7sJ.cjs} +2 -2
- package/dist/{platform-12uR7kBQ.cjs.map → platform-CfA3-7sJ.cjs.map} +1 -1
- package/dist/{profiler-BVWIOgnq.js → profiler-BAZoh7A4.js} +89 -107
- package/dist/profiler-BAZoh7A4.js.map +1 -0
- package/dist/profiler-D4tJpDRc.cjs +2 -0
- package/dist/profiler-D4tJpDRc.cjs.map +1 -0
- package/dist/profiler-frames-C4xr7KfH.cjs +2 -0
- package/dist/profiler-frames-C4xr7KfH.cjs.map +1 -0
- package/dist/{profiler-frames-CLXlT_xL.js → profiler-frames-cJMx9wNM.js} +29 -37
- package/dist/profiler-frames-cJMx9wNM.js.map +1 -0
- package/dist/remote-rules-Dz9MRAsB.js +95 -0
- package/dist/remote-rules-Dz9MRAsB.js.map +1 -0
- package/dist/remote-rules-_tY0zj5o.cjs +2 -0
- package/dist/remote-rules-_tY0zj5o.cjs.map +1 -0
- package/dist/replay-B3gFXIZd.cjs +2 -0
- package/dist/replay-B3gFXIZd.cjs.map +1 -0
- package/dist/replay-Ds-ANH34.js +310 -0
- package/dist/replay-Ds-ANH34.js.map +1 -0
- package/dist/reports-BDSe4dFH.cjs +2 -0
- package/dist/reports-BDSe4dFH.cjs.map +1 -0
- package/dist/{reports-BuXekPOS.js → reports-C-thq-bk.js} +25 -30
- package/dist/reports-C-thq-bk.js.map +1 -0
- package/dist/resource-timing-C576gFIQ.cjs +2 -0
- package/dist/resource-timing-C576gFIQ.cjs.map +1 -0
- package/dist/{resource-timing-CXGHwFRD.js → resource-timing-eUl2dNgC.js} +20 -23
- package/dist/resource-timing-eUl2dNgC.js.map +1 -0
- package/dist/response-body-YdNl-HkR.cjs +3 -0
- package/dist/response-body-YdNl-HkR.cjs.map +1 -0
- package/dist/response-body-eoSQpLiH.js +331 -0
- package/dist/response-body-eoSQpLiH.js.map +1 -0
- package/dist/rotation-Cwct4ckk.js +94 -0
- package/dist/rotation-Cwct4ckk.js.map +1 -0
- package/dist/rotation-D4qUAHAu.cjs +2 -0
- package/dist/rotation-D4qUAHAu.cjs.map +1 -0
- package/dist/sampling-BlrI8jor.js +63 -0
- package/dist/sampling-BlrI8jor.js.map +1 -0
- package/dist/sampling-mXt4dstx.cjs +2 -0
- package/dist/sampling-mXt4dstx.cjs.map +1 -0
- package/dist/{sanitize-CNmsD9r3.js → sanitize-Ba0KqU06.js} +2 -2
- package/dist/sanitize-Ba0KqU06.js.map +1 -0
- package/dist/{sanitize-ChLn97Ch.cjs → sanitize-DQyiI_KY.cjs} +2 -2
- package/dist/sanitize-DQyiI_KY.cjs.map +1 -0
- package/dist/sender-BdRuNVhF.cjs +2 -0
- package/dist/sender-BdRuNVhF.cjs.map +1 -0
- package/dist/sender-Dv8rAmpV.js +979 -0
- package/dist/sender-Dv8rAmpV.js.map +1 -0
- package/dist/storage/context-storage.d.cts +90 -0
- package/dist/storage/context-storage.d.ts +5 -5
- package/dist/storage/emergency-queue.d.cts +27 -0
- package/dist/storage/emergency-queue.d.ts +4 -4
- package/dist/storage/eviction.d.cts +40 -0
- package/dist/storage/eviction.d.ts +1 -1
- package/dist/storage/factory.d.cts +21 -0
- package/dist/storage/factory.d.ts +3 -3
- package/dist/storage/gap.d.cts +20 -0
- package/dist/storage/gap.d.ts +3 -3
- package/dist/storage/idb-driver.d.cts +93 -0
- package/dist/storage/idb-driver.d.ts +1 -1
- package/dist/storage/indexeddb-storage.d.cts +97 -0
- package/dist/storage/indexeddb-storage.d.ts +12 -4
- package/dist/storage/keys.d.cts +17 -0
- package/dist/storage/keys.d.ts +2 -2
- package/dist/storage/local-storage.d.cts +139 -0
- package/dist/storage/local-storage.d.ts +11 -4
- package/dist/storage/memory-storage.d.cts +73 -0
- package/dist/storage/memory-storage.d.ts +4 -3
- package/dist/storage/persistence.d.cts +8 -0
- package/dist/storage/persistence.d.ts +2 -2
- package/dist/storage/stored-context.d.cts +34 -0
- package/dist/storage/stored-context.d.ts +34 -0
- package/dist/stored-context-B2EzVuYm.js +51 -0
- package/dist/stored-context-B2EzVuYm.js.map +1 -0
- package/dist/stored-context-CXt7eHZL.cjs +2 -0
- package/dist/stored-context-CXt7eHZL.cjs.map +1 -0
- package/dist/storm-C-zYSdDX.cjs +2 -0
- package/dist/storm-C-zYSdDX.cjs.map +1 -0
- package/dist/storm-DjKetLKZ.js +9 -0
- package/dist/storm-DjKetLKZ.js.map +1 -0
- package/dist/transport/compression.d.cts +7 -0
- package/dist/transport/custom-transport.d.cts +22 -0
- package/dist/transport/custom-transport.d.ts +6 -5
- package/dist/transport/errors.d.cts +31 -0
- package/dist/transport/exit-flush.d.cts +135 -0
- package/dist/transport/exit-flush.d.ts +30 -13
- package/dist/transport/headers.d.cts +8 -0
- package/dist/transport/headers.d.ts +2 -2
- package/dist/transport/http-transport.d.cts +116 -0
- package/dist/transport/http-transport.d.ts +20 -8
- package/dist/transport/memory-transport.d.cts +30 -0
- package/dist/transport/memory-transport.d.ts +2 -2
- package/dist/transport/response-body.d.cts +49 -0
- package/dist/transport/response-body.d.ts +49 -0
- package/dist/transport/retry-engine.d.cts +129 -0
- package/dist/transport/retry-engine.d.ts +27 -9
- package/dist/transport/serializers/ecs.d.cts +3 -0
- package/dist/transport/serializers/ecs.d.ts +1 -1
- package/dist/transport/serializers/otlp-metrics.d.cts +3 -0
- package/dist/transport/serializers/otlp-metrics.d.ts +1 -1
- package/dist/transport/serializers/otlp-traces.d.cts +3 -0
- package/dist/transport/serializers/otlp-traces.d.ts +1 -1
- package/dist/transport/serializers/otlp.d.cts +47 -0
- package/dist/transport/serializers/otlp.d.ts +2 -2
- package/dist/transport/serializers/select.d.cts +38 -0
- package/dist/transport/serializers/select.d.ts +5 -5
- package/dist/transport/status-transport.d.cts +129 -0
- package/dist/transport/status-transport.d.ts +25 -8
- package/dist/transport/worker-client.d.cts +23 -0
- package/dist/transport/worker-client.d.ts +12 -3
- package/dist/transport/worker-entry.d.cts +5 -0
- package/dist/transport/worker-entry.d.ts +1 -1
- package/dist/transport/worker-protocol.d.cts +38 -0
- package/dist/transport/worker-protocol.d.ts +4 -2
- package/dist/transport/worker-server.d.cts +3 -0
- package/dist/transport/worker-server.d.ts +1 -1
- package/dist/transport/worker-transport.d.cts +10 -0
- package/dist/transport/worker-transport.d.ts +5 -4
- package/dist/types-BAerHgCq.js.map +1 -1
- package/dist/types-C7WNpnG1.cjs.map +1 -1
- package/dist/{unclean-exit-Cob_jyTv.js → unclean-exit-DQD1cT7c.js} +23 -30
- package/dist/unclean-exit-DQD1cT7c.js.map +1 -0
- package/dist/unclean-exit-py99ApzT.cjs +2 -0
- package/dist/unclean-exit-py99ApzT.cjs.map +1 -0
- package/dist/{user-timing-DgHubxCI.js → user-timing-BePqb1uN.js} +15 -17
- package/dist/user-timing-BePqb1uN.js.map +1 -0
- package/dist/user-timing-D6XTmpuM.cjs +2 -0
- package/dist/user-timing-D6XTmpuM.cjs.map +1 -0
- package/dist/utils/console.d.cts +36 -0
- package/dist/utils/console.d.ts +4 -4
- package/dist/utils/deadline.d.cts +14 -0
- package/dist/utils/error-like.d.cts +25 -0
- package/dist/utils/fixed-window.d.cts +25 -0
- package/dist/utils/global-scope.d.cts +20 -0
- package/dist/utils/guards.d.cts +14 -0
- package/dist/utils/guards.d.ts +8 -0
- package/dist/utils/identity.d.cts +109 -0
- package/dist/utils/identity.d.ts +3 -4
- package/dist/utils/library-console.d.cts +11 -0
- package/dist/utils/library-request.d.cts +24 -0
- package/dist/utils/lock.d.cts +24 -0
- package/dist/utils/lock.d.ts +1 -1
- package/dist/utils/openfin.d.cts +48 -0
- package/dist/utils/patch.d.cts +9 -0
- package/dist/utils/platform.d.cts +62 -0
- package/dist/utils/platform.d.ts +2 -2
- package/dist/utils/sanitize.d.cts +52 -0
- package/dist/utils/sanitize.d.ts +1 -1
- package/dist/utils/sequence.d.cts +10 -0
- package/dist/utils/tracing.d.cts +158 -0
- package/dist/utils/tracing.d.ts +11 -4
- package/dist/utils/unref.d.cts +9 -0
- package/dist/web-socket-CoIUBM3C.cjs +2 -0
- package/dist/{web-socket-DthJuSAg.js.map → web-socket-CoIUBM3C.cjs.map} +1 -1
- package/dist/{web-socket-DthJuSAg.js → web-socket-DSHgDiZ6.js} +23 -28
- package/dist/web-socket-DSHgDiZ6.js.map +1 -0
- package/dist/{web-vitals-CsGCWnUr.js → web-vitals-4pWACwaR.js} +15 -21
- package/dist/web-vitals-4pWACwaR.js.map +1 -0
- package/dist/web-vitals-__X7t4pj.cjs +2 -0
- package/dist/web-vitals-__X7t4pj.cjs.map +1 -0
- package/dist/worker-protocol-QbvqNazn.cjs +2 -0
- package/dist/worker-protocol-QbvqNazn.cjs.map +1 -0
- package/dist/{worker-protocol-B0_8rWy5.js → worker-protocol-x074Rpet.js} +14 -11
- package/dist/worker-protocol-x074Rpet.js.map +1 -0
- package/dist/worker-server-CFe4nvos.cjs +2 -0
- package/dist/worker-server-CFe4nvos.cjs.map +1 -0
- package/dist/worker-server-iUVSjH8L.js +94 -0
- package/dist/worker-server-iUVSjH8L.js.map +1 -0
- package/dist/worker-transport-CRAX-09c.cjs +2 -0
- package/dist/worker-transport-CRAX-09c.cjs.map +1 -0
- package/dist/worker-transport-Dy1KMA7t.js +190 -0
- package/dist/worker-transport-Dy1KMA7t.js.map +1 -0
- package/llms.txt +397 -0
- package/package.json +54 -46
- package/dist/bus-D_7pd7RN.cjs +0 -2
- package/dist/bus-D_7pd7RN.cjs.map +0 -1
- package/dist/bus-ecxUNTja.js.map +0 -1
- package/dist/console-CLz_PvFn.cjs +0 -2
- package/dist/console-CLz_PvFn.cjs.map +0 -1
- package/dist/console-cwgHKXvM.js +0 -82
- package/dist/console-cwgHKXvM.js.map +0 -1
- package/dist/constants-Bwl_YtQi.js +0 -349
- package/dist/constants-Bwl_YtQi.js.map +0 -1
- package/dist/constants-DakMxVB2.cjs +0 -2
- package/dist/constants-DakMxVB2.cjs.map +0 -1
- package/dist/context-storage-BjzeBSxH.cjs +0 -2
- package/dist/context-storage-BjzeBSxH.cjs.map +0 -1
- package/dist/context-storage-BzkoHzkQ.js +0 -51
- package/dist/context-storage-BzkoHzkQ.js.map +0 -1
- package/dist/debug-bundle-BOdYmCeV.js +0 -32
- package/dist/debug-bundle-BOdYmCeV.js.map +0 -1
- package/dist/debug-bundle-Ex4L_LSP.cjs +0 -2
- package/dist/debug-bundle-Ex4L_LSP.cjs.map +0 -1
- package/dist/emergency-queue-B9WZxanZ.js +0 -67
- package/dist/emergency-queue-B9WZxanZ.js.map +0 -1
- package/dist/emergency-queue-HBpL5r3V.cjs +0 -2
- package/dist/emergency-queue-HBpL5r3V.cjs.map +0 -1
- package/dist/errors-D6bwgJtO.js +0 -92
- package/dist/errors-D6bwgJtO.js.map +0 -1
- package/dist/errors-DCOCRdSi.cjs +0 -3
- package/dist/errors-DCOCRdSi.cjs.map +0 -1
- package/dist/factory-DLFDjdLv.cjs +0 -2
- package/dist/factory-DLFDjdLv.cjs.map +0 -1
- package/dist/factory-e9Qo3K0z.js +0 -276
- package/dist/factory-e9Qo3K0z.js.map +0 -1
- package/dist/guards-Cidk71ME.js +0 -7
- package/dist/guards-Cidk71ME.js.map +0 -1
- package/dist/guards-nJ70syPt.cjs +0 -2
- package/dist/guards-nJ70syPt.cjs.map +0 -1
- package/dist/identity-BlvlgjrU.cjs +0 -2
- package/dist/identity-BlvlgjrU.cjs.map +0 -1
- package/dist/identity-BrQp_5J5.js.map +0 -1
- package/dist/indexeddb-storage-CtLvZH1r.cjs +0 -2
- package/dist/indexeddb-storage-CtLvZH1r.cjs.map +0 -1
- package/dist/indexeddb-storage-DLXQzAGh.js.map +0 -1
- package/dist/interactions-B6z2I4tU.js.map +0 -1
- package/dist/interactions-P6pz08Jn.cjs +0 -2
- package/dist/interactions-P6pz08Jn.cjs.map +0 -1
- package/dist/journey-35yCMNFo.js.map +0 -1
- package/dist/journey-DAGh5h9k.cjs +0 -2
- package/dist/journey-DAGh5h9k.cjs.map +0 -1
- package/dist/keys-BHhw_0Wh.cjs +0 -2
- package/dist/keys-BHhw_0Wh.cjs.map +0 -1
- package/dist/keys-BU9j5YqW.js +0 -16
- package/dist/keys-BU9j5YqW.js.map +0 -1
- package/dist/lifecycle-BGGOcN4N.cjs +0 -2
- package/dist/lifecycle-BGGOcN4N.cjs.map +0 -1
- package/dist/lifecycle-CZ6RRXc6.js.map +0 -1
- package/dist/log-record-D7bA1RPb.cjs +0 -2
- package/dist/log-record-D7bA1RPb.cjs.map +0 -1
- package/dist/log-record-DIA6McNr.js.map +0 -1
- package/dist/long-frames-430_85Da.js.map +0 -1
- package/dist/long-frames-Dd8tsi2U.cjs +0 -2
- package/dist/long-frames-Dd8tsi2U.cjs.map +0 -1
- package/dist/models/stats.d.ts +0 -11
- package/dist/network-C7SkLf4v.js.map +0 -1
- package/dist/network-pEX3PAJv.cjs +0 -2
- package/dist/network-pEX3PAJv.cjs.map +0 -1
- package/dist/profiler-BVWIOgnq.js.map +0 -1
- package/dist/profiler-eVCknCzS.cjs +0 -2
- package/dist/profiler-eVCknCzS.cjs.map +0 -1
- package/dist/profiler-frames-CLXlT_xL.js.map +0 -1
- package/dist/profiler-frames-Dg2OebB2.cjs +0 -2
- package/dist/profiler-frames-Dg2OebB2.cjs.map +0 -1
- package/dist/remote-rules-BJGDJGwA.js +0 -98
- package/dist/remote-rules-BJGDJGwA.js.map +0 -1
- package/dist/remote-rules-CJD3ToVk.cjs +0 -2
- package/dist/remote-rules-CJD3ToVk.cjs.map +0 -1
- package/dist/replay-0zAJv9T3.js +0 -338
- package/dist/replay-0zAJv9T3.js.map +0 -1
- package/dist/replay-DomJpXqW.cjs +0 -2
- package/dist/replay-DomJpXqW.cjs.map +0 -1
- package/dist/reports-BsbqmP8h.cjs +0 -2
- package/dist/reports-BsbqmP8h.cjs.map +0 -1
- package/dist/reports-BuXekPOS.js.map +0 -1
- package/dist/resource-timing-CXGHwFRD.js.map +0 -1
- package/dist/resource-timing-DkycFGDa.cjs +0 -2
- package/dist/resource-timing-DkycFGDa.cjs.map +0 -1
- package/dist/sampling-Dd0wllyq.cjs +0 -2
- package/dist/sampling-Dd0wllyq.cjs.map +0 -1
- package/dist/sampling-UUDbi3K0.js +0 -60
- package/dist/sampling-UUDbi3K0.js.map +0 -1
- package/dist/sanitize-CNmsD9r3.js.map +0 -1
- package/dist/sanitize-ChLn97Ch.cjs.map +0 -1
- package/dist/select-CTk-K5mG.cjs +0 -3
- package/dist/select-CTk-K5mG.cjs.map +0 -1
- package/dist/select-DPv_j6wq.js +0 -270
- package/dist/select-DPv_j6wq.js.map +0 -1
- package/dist/sender-15zEsZpr.js +0 -857
- package/dist/sender-15zEsZpr.js.map +0 -1
- package/dist/sender-Bfpv9tad.cjs +0 -2
- package/dist/sender-Bfpv9tad.cjs.map +0 -1
- package/dist/storage-BA9RqRO-.cjs +0 -2
- package/dist/storage-BA9RqRO-.cjs.map +0 -1
- package/dist/storage-DZwed89z.js +0 -16
- package/dist/storage-DZwed89z.js.map +0 -1
- package/dist/storm-BTSNTIWI.js +0 -9
- package/dist/storm-BTSNTIWI.js.map +0 -1
- package/dist/storm-D0_qZOEg.cjs +0 -2
- package/dist/storm-D0_qZOEg.cjs.map +0 -1
- package/dist/unclean-exit-ClGzrc2A.cjs +0 -2
- package/dist/unclean-exit-ClGzrc2A.cjs.map +0 -1
- package/dist/unclean-exit-Cob_jyTv.js.map +0 -1
- package/dist/user-timing-CdYqx3PF.cjs +0 -2
- package/dist/user-timing-CdYqx3PF.cjs.map +0 -1
- package/dist/user-timing-DgHubxCI.js.map +0 -1
- package/dist/utils/timer.d.ts +0 -19
- package/dist/web-socket-BTuvYoJI.cjs +0 -2
- package/dist/web-socket-BTuvYoJI.cjs.map +0 -1
- package/dist/web-vitals-Ch5BpDmo.cjs +0 -2
- package/dist/web-vitals-Ch5BpDmo.cjs.map +0 -1
- package/dist/web-vitals-CsGCWnUr.js.map +0 -1
- package/dist/worker-protocol-B0_8rWy5.js.map +0 -1
- package/dist/worker-protocol-BjzFORfq.cjs +0 -2
- package/dist/worker-protocol-BjzFORfq.cjs.map +0 -1
- package/dist/worker-server-4en-Lt-3.cjs +0 -2
- package/dist/worker-server-4en-Lt-3.cjs.map +0 -1
- package/dist/worker-server-Cne9MX9I.js +0 -83
- package/dist/worker-server-Cne9MX9I.js.map +0 -1
- package/dist/worker-transport-B-GF4Aqn.cjs +0 -2
- package/dist/worker-transport-B-GF4Aqn.cjs.map +0 -1
- package/dist/worker-transport-C3SjJAEC.js +0 -200
- package/dist/worker-transport-C3SjJAEC.js.map +0 -1
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Diagnostics } from "../core/diagnostics";
|
|
2
|
-
import type { StorageStrategy } from "../models/config";
|
|
3
|
-
import type { GapReporter, StorageAdapter, StorageLimits } from "../models/storage";
|
|
1
|
+
import type { Diagnostics } from "../core/diagnostics.js";
|
|
2
|
+
import type { StorageStrategy } from "../models/config.js";
|
|
3
|
+
import type { GapReporter, StorageAdapter, StorageLimits } from "../models/storage.js";
|
|
4
4
|
/**
|
|
5
5
|
* Returns the database name for one application namespace. The sender and the deletion both
|
|
6
6
|
* use this one rule.
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import type { Diagnostics } from "../core/diagnostics.cjs";
|
|
2
|
+
import type { LogBatch } from "../models/batch.cjs";
|
|
3
|
+
import type { GapReporter, PruneResult } from "../models/storage.cjs";
|
|
4
|
+
/**
|
|
5
|
+
* Adds one rule's drop to the prune result.
|
|
6
|
+
* @param result The prune result across all rules.
|
|
7
|
+
* @param reason The rule that dropped the batches.
|
|
8
|
+
* @param batches Number of dropped batches.
|
|
9
|
+
* @param records Number of dropped records.
|
|
10
|
+
* @returns The counts for this rule alone, for the gap report.
|
|
11
|
+
*/
|
|
12
|
+
export declare function addDrop(result: PruneResult, reason: PruneResult["reason"], batches: number, records: number): PruneResult;
|
|
13
|
+
/**
|
|
14
|
+
* Reports dropped batches to diagnostics and to the gap handler. An empty drop reports nothing.
|
|
15
|
+
* @param diagnostics Diagnostics reporter.
|
|
16
|
+
* @param onGap The adapter's gap handler.
|
|
17
|
+
* @param gap The drop's counts and reason.
|
|
18
|
+
* @param dropped The dropped batches that the adapter could read.
|
|
19
|
+
*/
|
|
20
|
+
export declare function reportEviction(diagnostics: Diagnostics, onGap: GapReporter | undefined, gap: PruneResult, dropped: readonly LogBatch[]): void;
|
package/dist/storage/gap.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Diagnostics } from "../core/diagnostics";
|
|
2
|
-
import type { LogBatch } from "../models/batch";
|
|
3
|
-
import type { GapReporter, PruneResult } from "../models/storage";
|
|
1
|
+
import type { Diagnostics } from "../core/diagnostics.js";
|
|
2
|
+
import type { LogBatch } from "../models/batch.js";
|
|
3
|
+
import type { GapReporter, PruneResult } from "../models/storage.js";
|
|
4
4
|
/**
|
|
5
5
|
* Adds one rule's drop to the prune result.
|
|
6
6
|
* @param result The prune result across all rules.
|
|
@@ -0,0 +1,93 @@
|
|
|
1
|
+
import type { LogBatch } from "../models/batch.cjs";
|
|
2
|
+
/** Wraps one IndexedDB database that holds undelivered batches by id. */
|
|
3
|
+
export declare class IdbDriver {
|
|
4
|
+
private readonly name;
|
|
5
|
+
/** The pending or completed open. Reused for every call on this database. */
|
|
6
|
+
private connection;
|
|
7
|
+
/**
|
|
8
|
+
* @param name IndexedDB database name.
|
|
9
|
+
*/
|
|
10
|
+
constructor(name: string);
|
|
11
|
+
/**
|
|
12
|
+
* Writes a batch, replacing any stored batch with the same id.
|
|
13
|
+
* @param batch The batch to persist.
|
|
14
|
+
*/
|
|
15
|
+
put(batch: LogBatch): Promise<void>;
|
|
16
|
+
/**
|
|
17
|
+
* Reads one context's batches in creation order without removing them.
|
|
18
|
+
* @param id Delivery context id.
|
|
19
|
+
* @param limit Maximum number of batches to return.
|
|
20
|
+
* @returns This context's batches, oldest first.
|
|
21
|
+
*/
|
|
22
|
+
takeContext(id: string, limit: number): Promise<LogBatch[]>;
|
|
23
|
+
/**
|
|
24
|
+
* Counts one context's stored batches.
|
|
25
|
+
* @param id Delivery context id.
|
|
26
|
+
* @returns The number of batches in this context.
|
|
27
|
+
*/
|
|
28
|
+
countContext(id: string): Promise<number>;
|
|
29
|
+
/**
|
|
30
|
+
* Reads the oldest batches by createdAt without removing them.
|
|
31
|
+
* @param limit Maximum number of batches to return.
|
|
32
|
+
* @returns The batches in ascending createdAt order.
|
|
33
|
+
*/
|
|
34
|
+
takeOldest(limit: number): Promise<LogBatch[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Walks the batches by createdAt, oldest first, without removing them. A cursor reads one
|
|
37
|
+
* batch at a time, so the walk can stop before it has read the whole store.
|
|
38
|
+
* @param visit Receives each batch. Return false to stop the walk.
|
|
39
|
+
*/
|
|
40
|
+
walkOldest(visit: (batch: LogBatch) => boolean): Promise<void>;
|
|
41
|
+
/**
|
|
42
|
+
* Reads every batch whose createdAt is before the cutoff.
|
|
43
|
+
* @param cutoff Exclusive upper bound in epoch milliseconds.
|
|
44
|
+
* @returns The batches older than the cutoff.
|
|
45
|
+
*/
|
|
46
|
+
takeBefore(cutoff: number): Promise<LogBatch[]>;
|
|
47
|
+
/**
|
|
48
|
+
* Deletes one batch. An id that isn't stored resolves without an error.
|
|
49
|
+
* @param id Batch identifier.
|
|
50
|
+
*/
|
|
51
|
+
delete(id: string): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Deletes several batches in one transaction. If any delete fails, none of them are deleted.
|
|
54
|
+
* @param ids Batch identifiers.
|
|
55
|
+
*/
|
|
56
|
+
deleteMany(ids: string[]): Promise<void>;
|
|
57
|
+
/**
|
|
58
|
+
* Sets a stored batch's attempt count, ignoring an id that isn't stored. A batch we already
|
|
59
|
+
* delivered and deleted must not come back, so the get and the put share one transaction.
|
|
60
|
+
* With two transactions, a prune in another window could delete the batch in between and
|
|
61
|
+
* the put would restore it.
|
|
62
|
+
* @param id Batch identifier.
|
|
63
|
+
* @param attempts The new absolute attempt count.
|
|
64
|
+
*/
|
|
65
|
+
bumpAttempts(id: string, attempts: number): Promise<void>;
|
|
66
|
+
/**
|
|
67
|
+
* Counts the stored batches.
|
|
68
|
+
* @returns Total batch count.
|
|
69
|
+
*/
|
|
70
|
+
count(): Promise<number>;
|
|
71
|
+
/** Deletes every stored batch. */
|
|
72
|
+
clear(): Promise<void>;
|
|
73
|
+
/**
|
|
74
|
+
* Opens the connection. A host that defines indexedDB but rejects open() fails here, which
|
|
75
|
+
* lets the factory pick a different adapter.
|
|
76
|
+
*/
|
|
77
|
+
ready(): Promise<void>;
|
|
78
|
+
/** Closes the connection, if there is one. */
|
|
79
|
+
close(): Promise<void>;
|
|
80
|
+
/**
|
|
81
|
+
* Opens the batch store in a new transaction. A transaction is only valid until control
|
|
82
|
+
* returns to the event loop, so every call takes a fresh one.
|
|
83
|
+
* @param mode Transaction mode.
|
|
84
|
+
* @returns The batch object store.
|
|
85
|
+
*/
|
|
86
|
+
private store;
|
|
87
|
+
/**
|
|
88
|
+
* Opens the database once and hands the same connection to every later call. A failed
|
|
89
|
+
* open isn't kept, so the next call tries again.
|
|
90
|
+
* @returns The open database.
|
|
91
|
+
*/
|
|
92
|
+
private open;
|
|
93
|
+
}
|
|
@@ -0,0 +1,97 @@
|
|
|
1
|
+
import type { Diagnostics } from "../core/diagnostics.cjs";
|
|
2
|
+
import { type LogBatch } from "../models/batch.cjs";
|
|
3
|
+
import type { GapReporter, PruneResult, StorageAdapter, StorageLimits } from "../models/storage.cjs";
|
|
4
|
+
/** StorageAdapter that keeps batches in IndexedDB. */
|
|
5
|
+
export declare class IndexedDbStorage implements StorageAdapter {
|
|
6
|
+
private readonly limits;
|
|
7
|
+
private readonly diagnostics;
|
|
8
|
+
private readonly onGap?;
|
|
9
|
+
/** The storage strategy name. */
|
|
10
|
+
readonly name = "indexeddb";
|
|
11
|
+
/** Holds the IndexedDB code for the batch store. */
|
|
12
|
+
private readonly db;
|
|
13
|
+
/**
|
|
14
|
+
* @param dbName Database name.
|
|
15
|
+
* @param limits Storage capacity and retention thresholds.
|
|
16
|
+
* @param diagnostics Diagnostics reporter.
|
|
17
|
+
* @param onGap Optional callback for reporting dropped records.
|
|
18
|
+
*/
|
|
19
|
+
constructor(dbName: string, limits: StorageLimits, diagnostics: Diagnostics, onGap?: GapReporter | undefined);
|
|
20
|
+
/**
|
|
21
|
+
* Opens the database. Not guarded, because the factory needs the rejection to pick the
|
|
22
|
+
* next adapter.
|
|
23
|
+
*/
|
|
24
|
+
open(): Promise<void>;
|
|
25
|
+
/**
|
|
26
|
+
* Writes a batch to IndexedDB, then prunes the storage.
|
|
27
|
+
* @param batch The batch to store.
|
|
28
|
+
* @returns True if the batch is in the database after the prune, false if the write failed
|
|
29
|
+
* or the prune removed the batch.
|
|
30
|
+
*/
|
|
31
|
+
save(batch: LogBatch): Promise<boolean>;
|
|
32
|
+
/**
|
|
33
|
+
* Reads one context's batches in creation order without removing them.
|
|
34
|
+
* @param id Delivery context id.
|
|
35
|
+
* @param limit Maximum number of batches to return.
|
|
36
|
+
* @returns This context's batches, oldest first.
|
|
37
|
+
*/
|
|
38
|
+
takeContext(id: string, limit: number): Promise<LogBatch[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Counts one context's stored batches.
|
|
41
|
+
* @param id Delivery context id.
|
|
42
|
+
* @returns The number of batches in this context.
|
|
43
|
+
*/
|
|
44
|
+
countContext(id: string): Promise<number>;
|
|
45
|
+
/**
|
|
46
|
+
* Reads up to `limit` batches in FIFO order without deleting them.
|
|
47
|
+
* @param limit Maximum number of batches to retrieve.
|
|
48
|
+
* @returns The retrieved batches.
|
|
49
|
+
*/
|
|
50
|
+
take(limit: number): Promise<LogBatch[]>;
|
|
51
|
+
/**
|
|
52
|
+
* Deletes the batch with the given ID from IndexedDB.
|
|
53
|
+
* @param id Batch identifier to delete.
|
|
54
|
+
*/
|
|
55
|
+
remove(id: string): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Sets a stored batch's delivery attempt count.
|
|
58
|
+
* @param id Batch identifier.
|
|
59
|
+
* @param attempts The new absolute attempt count.
|
|
60
|
+
*/
|
|
61
|
+
bumpAttempts(id: string, attempts: number): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Removes expired batches, then the oldest batches above the capacity limit.
|
|
64
|
+
* @returns Prune summary metrics.
|
|
65
|
+
*/
|
|
66
|
+
prune(): Promise<PruneResult>;
|
|
67
|
+
/**
|
|
68
|
+
* Runs the prune and keeps the batches it deleted. A failed prune reports to diagnostics and
|
|
69
|
+
* returns what it deleted before the failure.
|
|
70
|
+
* @returns The prune summary and the deleted batches.
|
|
71
|
+
*/
|
|
72
|
+
private sweep;
|
|
73
|
+
/**
|
|
74
|
+
* Returns the number of stored batches.
|
|
75
|
+
* @returns The total batch count, or 0 on failure.
|
|
76
|
+
*/
|
|
77
|
+
count(): Promise<number>;
|
|
78
|
+
/** Deletes every stored batch from the database. */
|
|
79
|
+
clear(): Promise<void>;
|
|
80
|
+
/** Closes the active IndexedDB connection. */
|
|
81
|
+
close(): Promise<void>;
|
|
82
|
+
/**
|
|
83
|
+
* Adds dropped batches to the prune result and reports them under their own reason.
|
|
84
|
+
* @param result The prune result across all rules.
|
|
85
|
+
* @param reason The rule that dropped the batches.
|
|
86
|
+
* @param dropped The dropped batches.
|
|
87
|
+
*/
|
|
88
|
+
private addGap;
|
|
89
|
+
/**
|
|
90
|
+
* Deletes the given number of stored batches. Batches without an action go first, oldest
|
|
91
|
+
* first, because an action is an audit fact. Not guarded, because both callers guard it. A
|
|
92
|
+
* guard here would hide the failure and report an eviction that never happened.
|
|
93
|
+
* @param howMany Number of batches to evict.
|
|
94
|
+
* @returns The evicted batches.
|
|
95
|
+
*/
|
|
96
|
+
private evictOldest;
|
|
97
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Diagnostics } from "../core/diagnostics";
|
|
2
|
-
import { type LogBatch } from "../models/batch";
|
|
3
|
-
import type { GapReporter, PruneResult, StorageAdapter, StorageLimits } from "../models/storage";
|
|
1
|
+
import type { Diagnostics } from "../core/diagnostics.js";
|
|
2
|
+
import { type LogBatch } from "../models/batch.js";
|
|
3
|
+
import type { GapReporter, PruneResult, StorageAdapter, StorageLimits } from "../models/storage.js";
|
|
4
4
|
/** StorageAdapter that keeps batches in IndexedDB. */
|
|
5
5
|
export declare class IndexedDbStorage implements StorageAdapter {
|
|
6
6
|
private readonly limits;
|
|
@@ -25,8 +25,10 @@ export declare class IndexedDbStorage implements StorageAdapter {
|
|
|
25
25
|
/**
|
|
26
26
|
* Writes a batch to IndexedDB, then prunes the storage.
|
|
27
27
|
* @param batch The batch to store.
|
|
28
|
+
* @returns True if the batch is in the database after the prune, false if the write failed
|
|
29
|
+
* or the prune removed the batch.
|
|
28
30
|
*/
|
|
29
|
-
save(batch: LogBatch): Promise<
|
|
31
|
+
save(batch: LogBatch): Promise<boolean>;
|
|
30
32
|
/**
|
|
31
33
|
* Reads one context's batches in creation order without removing them.
|
|
32
34
|
* @param id Delivery context id.
|
|
@@ -62,6 +64,12 @@ export declare class IndexedDbStorage implements StorageAdapter {
|
|
|
62
64
|
* @returns Prune summary metrics.
|
|
63
65
|
*/
|
|
64
66
|
prune(): Promise<PruneResult>;
|
|
67
|
+
/**
|
|
68
|
+
* Runs the prune and keeps the batches it deleted. A failed prune reports to diagnostics and
|
|
69
|
+
* returns what it deleted before the failure.
|
|
70
|
+
* @returns The prune summary and the deleted batches.
|
|
71
|
+
*/
|
|
72
|
+
private sweep;
|
|
65
73
|
/**
|
|
66
74
|
* Returns the number of stored batches.
|
|
67
75
|
* @returns The total batch count, or 0 on failure.
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import type { Diagnostics } from "../core/diagnostics.cjs";
|
|
2
|
+
import type { LogBatch } from "../models/batch.cjs";
|
|
3
|
+
/**
|
|
4
|
+
* Formats a storage key with a zero-padded creation time, so the keys sort in FIFO order.
|
|
5
|
+
* Always use batch.createdAt, never Date.now(), or the key won't match the written one.
|
|
6
|
+
* @param prefix Storage key prefix.
|
|
7
|
+
* @param batch The target log batch.
|
|
8
|
+
* @returns The prefixed, timestamp-ordered storage key.
|
|
9
|
+
*/
|
|
10
|
+
export declare function batchKey(prefix: string, batch: LogBatch): string;
|
|
11
|
+
/**
|
|
12
|
+
* Returns every localStorage key that starts with the prefix, sorted.
|
|
13
|
+
* @param prefix The storage key prefix to filter by.
|
|
14
|
+
* @param diagnostics Diagnostics reporter.
|
|
15
|
+
* @returns The matching storage keys, sorted.
|
|
16
|
+
*/
|
|
17
|
+
export declare function keysWithPrefix(prefix: string, diagnostics: Diagnostics): string[];
|
package/dist/storage/keys.d.ts
CHANGED
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Diagnostics } from "../core/diagnostics";
|
|
2
|
-
import type { LogBatch } from "../models/batch";
|
|
1
|
+
import type { Diagnostics } from "../core/diagnostics.js";
|
|
2
|
+
import type { LogBatch } from "../models/batch.js";
|
|
3
3
|
/**
|
|
4
4
|
* Formats a storage key with a zero-padded creation time, so the keys sort in FIFO order.
|
|
5
5
|
* Always use batch.createdAt, never Date.now(), or the key won't match the written one.
|
|
@@ -0,0 +1,139 @@
|
|
|
1
|
+
import type { Diagnostics } from "../core/diagnostics.cjs";
|
|
2
|
+
import { type LogBatch } from "../models/batch.cjs";
|
|
3
|
+
import type { GapReporter, PruneResult, StorageAdapter, StorageLimits } from "../models/storage.cjs";
|
|
4
|
+
/** StorageAdapter that keeps batches in localStorage. */
|
|
5
|
+
export declare class LocalStorageStorage implements StorageAdapter {
|
|
6
|
+
private readonly limits;
|
|
7
|
+
private readonly diagnostics;
|
|
8
|
+
private readonly onGap?;
|
|
9
|
+
private readonly prefix;
|
|
10
|
+
/** The storage strategy name. */
|
|
11
|
+
readonly name = "localstorage";
|
|
12
|
+
/**
|
|
13
|
+
* @param limits Storage capacity and retention thresholds.
|
|
14
|
+
* @param diagnostics Diagnostics reporter.
|
|
15
|
+
* @param onGap Optional callback for reporting dropped records.
|
|
16
|
+
*/
|
|
17
|
+
constructor(limits: StorageLimits, diagnostics: Diagnostics, onGap?: GapReporter | undefined, prefix?: string);
|
|
18
|
+
/**
|
|
19
|
+
* Writes a batch to localStorage, removing the oldest entries on a quota error.
|
|
20
|
+
* @param batch The batch to store.
|
|
21
|
+
* @returns True if the batch is in localStorage after the prune, false if both writes were
|
|
22
|
+
* refused or the prune removed the batch.
|
|
23
|
+
*/
|
|
24
|
+
save(batch: LogBatch): Promise<boolean>;
|
|
25
|
+
/**
|
|
26
|
+
* Returns up to `limit` batches in FIFO order without deleting them.
|
|
27
|
+
* @param limit Maximum number of batches to retrieve.
|
|
28
|
+
* @returns A promise that resolves to the valid batches.
|
|
29
|
+
*/
|
|
30
|
+
take(limit: number): Promise<LogBatch[]>;
|
|
31
|
+
/**
|
|
32
|
+
* Returns up to `limit` batches of one context in FIFO order without deleting them. Stops
|
|
33
|
+
* at the limit, so later entries are never parsed.
|
|
34
|
+
* @param id Delivery context id.
|
|
35
|
+
* @param limit Maximum number of batches to retrieve.
|
|
36
|
+
* @returns A promise that resolves to this context's batches.
|
|
37
|
+
*/
|
|
38
|
+
takeContext(id: string, limit: number): Promise<LogBatch[]>;
|
|
39
|
+
/**
|
|
40
|
+
* Counts one context's stored batches. The context id isn't in the key, so every entry is
|
|
41
|
+
* read.
|
|
42
|
+
* @param id Delivery context id.
|
|
43
|
+
* @returns A promise that resolves to this context's batch count.
|
|
44
|
+
*/
|
|
45
|
+
countContext(id: string): Promise<number>;
|
|
46
|
+
/**
|
|
47
|
+
* Reads the valid batches one at a time, oldest first, and removes any corrupt entry.
|
|
48
|
+
* @yields Each valid batch.
|
|
49
|
+
*/
|
|
50
|
+
private batches;
|
|
51
|
+
/**
|
|
52
|
+
* Deletes the batch with the given ID from localStorage.
|
|
53
|
+
* @param id Batch identifier.
|
|
54
|
+
*/
|
|
55
|
+
remove(id: string): Promise<void>;
|
|
56
|
+
/**
|
|
57
|
+
* Sets a stored batch's delivery attempt count. The key doesn't change.
|
|
58
|
+
* @param id Batch identifier.
|
|
59
|
+
* @param attempts The new absolute attempt count.
|
|
60
|
+
*/
|
|
61
|
+
bumpAttempts(id: string, attempts: number): Promise<void>;
|
|
62
|
+
/**
|
|
63
|
+
* Deletes expired batches, then the oldest batches above the capacity limit.
|
|
64
|
+
* @returns A promise that resolves to the prune summary metrics.
|
|
65
|
+
*/
|
|
66
|
+
prune(): Promise<PruneResult>;
|
|
67
|
+
/**
|
|
68
|
+
* Runs the prune and keeps the entries it removed.
|
|
69
|
+
* @returns The prune summary and the removed entries.
|
|
70
|
+
*/
|
|
71
|
+
private sweep;
|
|
72
|
+
/**
|
|
73
|
+
* Returns the number of stored batch keys without deserializing the batches.
|
|
74
|
+
* @returns A promise that resolves to the batch count.
|
|
75
|
+
*/
|
|
76
|
+
count(): Promise<number>;
|
|
77
|
+
/** Deletes every batch key from localStorage. */
|
|
78
|
+
clear(): Promise<void>;
|
|
79
|
+
/** Does nothing. localStorage has no connection to close. */
|
|
80
|
+
close(): Promise<void>;
|
|
81
|
+
/**
|
|
82
|
+
* Writes a batch to localStorage.
|
|
83
|
+
* @param batch The batch to store.
|
|
84
|
+
* @param context The text diagnostics reports if the write fails.
|
|
85
|
+
* @returns True if the write succeeded.
|
|
86
|
+
*/
|
|
87
|
+
private write;
|
|
88
|
+
/** Removes a quarter of the store to free quota, and counts the loss. */
|
|
89
|
+
private evictForQuota;
|
|
90
|
+
/**
|
|
91
|
+
* Picks the entries to evict. Entries without an action go first, because an action is an
|
|
92
|
+
* audit fact. A corrupt entry has no action, so it goes first too.
|
|
93
|
+
* @param keys Batch keys, oldest first.
|
|
94
|
+
* @param howMany Number of entries to evict.
|
|
95
|
+
* @returns The picked entries.
|
|
96
|
+
*/
|
|
97
|
+
private evictable;
|
|
98
|
+
/**
|
|
99
|
+
* Reads the entries one at a time. The eviction walk stops early, so later entries are
|
|
100
|
+
* never parsed.
|
|
101
|
+
* @param keys Batch keys.
|
|
102
|
+
* @yields Each key with its batch.
|
|
103
|
+
*/
|
|
104
|
+
private entries;
|
|
105
|
+
/**
|
|
106
|
+
* Removes entries and reports them under their own reason.
|
|
107
|
+
* @param result The prune result across all rules.
|
|
108
|
+
* @param reason The rule that removes the entries.
|
|
109
|
+
* @param entries The entries to remove.
|
|
110
|
+
*/
|
|
111
|
+
private drop;
|
|
112
|
+
/**
|
|
113
|
+
* Reads and validates the stored batch at a key.
|
|
114
|
+
* @param key The storage key to read.
|
|
115
|
+
* @returns The validated LogBatch, or null if it is missing or malformed.
|
|
116
|
+
*/
|
|
117
|
+
private read;
|
|
118
|
+
/**
|
|
119
|
+
* Finds the storage key that ends with the batch ID.
|
|
120
|
+
* @param id Batch identifier.
|
|
121
|
+
* @returns The matching storage key, or null.
|
|
122
|
+
*/
|
|
123
|
+
private keyOf;
|
|
124
|
+
/**
|
|
125
|
+
* Deletes a list of storage keys.
|
|
126
|
+
* @param keys Keys to delete.
|
|
127
|
+
*/
|
|
128
|
+
private evict;
|
|
129
|
+
/**
|
|
130
|
+
* Deletes one storage key inside a guard.
|
|
131
|
+
* @param key Storage key to remove.
|
|
132
|
+
*/
|
|
133
|
+
private removeKey;
|
|
134
|
+
/**
|
|
135
|
+
* Returns every batch storage key, sorted.
|
|
136
|
+
* @returns The sorted storage keys.
|
|
137
|
+
*/
|
|
138
|
+
private keys;
|
|
139
|
+
}
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import type { Diagnostics } from "../core/diagnostics";
|
|
2
|
-
import { type LogBatch } from "../models/batch";
|
|
3
|
-
import type { GapReporter, PruneResult, StorageAdapter, StorageLimits } from "../models/storage";
|
|
1
|
+
import type { Diagnostics } from "../core/diagnostics.js";
|
|
2
|
+
import { type LogBatch } from "../models/batch.js";
|
|
3
|
+
import type { GapReporter, PruneResult, StorageAdapter, StorageLimits } from "../models/storage.js";
|
|
4
4
|
/** StorageAdapter that keeps batches in localStorage. */
|
|
5
5
|
export declare class LocalStorageStorage implements StorageAdapter {
|
|
6
6
|
private readonly limits;
|
|
@@ -18,8 +18,10 @@ export declare class LocalStorageStorage implements StorageAdapter {
|
|
|
18
18
|
/**
|
|
19
19
|
* Writes a batch to localStorage, removing the oldest entries on a quota error.
|
|
20
20
|
* @param batch The batch to store.
|
|
21
|
+
* @returns True if the batch is in localStorage after the prune, false if both writes were
|
|
22
|
+
* refused or the prune removed the batch.
|
|
21
23
|
*/
|
|
22
|
-
save(batch: LogBatch): Promise<
|
|
24
|
+
save(batch: LogBatch): Promise<boolean>;
|
|
23
25
|
/**
|
|
24
26
|
* Returns up to `limit` batches in FIFO order without deleting them.
|
|
25
27
|
* @param limit Maximum number of batches to retrieve.
|
|
@@ -62,6 +64,11 @@ export declare class LocalStorageStorage implements StorageAdapter {
|
|
|
62
64
|
* @returns A promise that resolves to the prune summary metrics.
|
|
63
65
|
*/
|
|
64
66
|
prune(): Promise<PruneResult>;
|
|
67
|
+
/**
|
|
68
|
+
* Runs the prune and keeps the entries it removed.
|
|
69
|
+
* @returns The prune summary and the removed entries.
|
|
70
|
+
*/
|
|
71
|
+
private sweep;
|
|
65
72
|
/**
|
|
66
73
|
* Returns the number of stored batch keys without deserializing the batches.
|
|
67
74
|
* @returns A promise that resolves to the batch count.
|
|
@@ -0,0 +1,73 @@
|
|
|
1
|
+
import { type LogBatch } from "../models/batch.cjs";
|
|
2
|
+
import type { GapReporter, PruneResult, StorageAdapter, StorageLimits } from "../models/storage.cjs";
|
|
3
|
+
/** StorageAdapter that keeps batches in volatile memory. */
|
|
4
|
+
export declare class MemoryStorage implements StorageAdapter {
|
|
5
|
+
private readonly limits;
|
|
6
|
+
private readonly onGap?;
|
|
7
|
+
/** The storage strategy name. */
|
|
8
|
+
readonly name = "memory";
|
|
9
|
+
/** The batches, in FIFO order. */
|
|
10
|
+
private batches;
|
|
11
|
+
/**
|
|
12
|
+
* @param limits Storage capacity and retention thresholds.
|
|
13
|
+
* @param onGap Optional callback for reporting dropped records.
|
|
14
|
+
*/
|
|
15
|
+
constructor(limits: StorageLimits, onGap?: GapReporter | undefined);
|
|
16
|
+
/**
|
|
17
|
+
* Appends a batch and applies retention pruning.
|
|
18
|
+
* @param batch The batch to store.
|
|
19
|
+
* @returns True if the batch is still in memory after the prune.
|
|
20
|
+
*/
|
|
21
|
+
save(batch: LogBatch): Promise<boolean>;
|
|
22
|
+
/**
|
|
23
|
+
* Returns up to `limit` batches in FIFO order without deleting them.
|
|
24
|
+
* @param limit Maximum number of batches to retrieve.
|
|
25
|
+
* @returns A promise that resolves to the batches.
|
|
26
|
+
*/
|
|
27
|
+
take(limit: number): Promise<LogBatch[]>;
|
|
28
|
+
/**
|
|
29
|
+
* Returns up to `limit` batches of one context in FIFO order without deleting them.
|
|
30
|
+
* @param id Delivery context id.
|
|
31
|
+
* @param limit Maximum number of batches to retrieve.
|
|
32
|
+
* @returns A promise that resolves to this context's batches.
|
|
33
|
+
*/
|
|
34
|
+
takeContext(id: string, limit: number): Promise<LogBatch[]>;
|
|
35
|
+
/**
|
|
36
|
+
* Counts one context's stored batches.
|
|
37
|
+
* @param id Delivery context id.
|
|
38
|
+
* @returns A promise that resolves to this context's batch count.
|
|
39
|
+
*/
|
|
40
|
+
countContext(id: string): Promise<number>;
|
|
41
|
+
/**
|
|
42
|
+
* Deletes the batch with the given ID.
|
|
43
|
+
* @param id Batch identifier.
|
|
44
|
+
*/
|
|
45
|
+
remove(id: string): Promise<void>;
|
|
46
|
+
/**
|
|
47
|
+
* Sets a stored batch's delivery attempt count.
|
|
48
|
+
* @param id Batch identifier.
|
|
49
|
+
* @param attempts The new absolute attempt count.
|
|
50
|
+
*/
|
|
51
|
+
bumpAttempts(id: string, attempts: number): Promise<void>;
|
|
52
|
+
/**
|
|
53
|
+
* Removes expired batches, then the oldest batches above the capacity limit.
|
|
54
|
+
* @returns A promise that resolves to the prune summary metrics.
|
|
55
|
+
*/
|
|
56
|
+
prune(): Promise<PruneResult>;
|
|
57
|
+
/**
|
|
58
|
+
* Adds dropped batches to the prune result and reports them under their own reason.
|
|
59
|
+
* @param result The prune result across all rules.
|
|
60
|
+
* @param reason The rule that dropped the batches.
|
|
61
|
+
* @param dropped The dropped batches.
|
|
62
|
+
*/
|
|
63
|
+
private report;
|
|
64
|
+
/**
|
|
65
|
+
* Returns the number of stored batches.
|
|
66
|
+
* @returns A promise that resolves to the batch count.
|
|
67
|
+
*/
|
|
68
|
+
count(): Promise<number>;
|
|
69
|
+
/** Deletes every stored batch. */
|
|
70
|
+
clear(): Promise<void>;
|
|
71
|
+
/** Deletes every stored batch when the storage closes. */
|
|
72
|
+
close(): Promise<void>;
|
|
73
|
+
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { type LogBatch } from "../models/batch";
|
|
2
|
-
import type { GapReporter, PruneResult, StorageAdapter, StorageLimits } from "../models/storage";
|
|
1
|
+
import { type LogBatch } from "../models/batch.js";
|
|
2
|
+
import type { GapReporter, PruneResult, StorageAdapter, StorageLimits } from "../models/storage.js";
|
|
3
3
|
/** StorageAdapter that keeps batches in volatile memory. */
|
|
4
4
|
export declare class MemoryStorage implements StorageAdapter {
|
|
5
5
|
private readonly limits;
|
|
@@ -16,8 +16,9 @@ export declare class MemoryStorage implements StorageAdapter {
|
|
|
16
16
|
/**
|
|
17
17
|
* Appends a batch and applies retention pruning.
|
|
18
18
|
* @param batch The batch to store.
|
|
19
|
+
* @returns True if the batch is still in memory after the prune.
|
|
19
20
|
*/
|
|
20
|
-
save(batch: LogBatch): Promise<
|
|
21
|
+
save(batch: LogBatch): Promise<boolean>;
|
|
21
22
|
/**
|
|
22
23
|
* Returns up to `limit` batches in FIFO order without deleting them.
|
|
23
24
|
* @param limit Maximum number of batches to retrieve.
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import type { Diagnostics } from "../core/diagnostics.cjs";
|
|
2
|
+
import type { StoragePersistence } from "../models/storage.cjs";
|
|
3
|
+
/**
|
|
4
|
+
* Asks the browser for persistent storage. Firefox can show a permission prompt.
|
|
5
|
+
* @param diagnostics Diagnostics reporter.
|
|
6
|
+
* @returns The browser's answer. Never rejects.
|
|
7
|
+
*/
|
|
8
|
+
export declare function requestPersistence(diagnostics: Diagnostics): Promise<StoragePersistence>;
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import type { Diagnostics } from "../core/diagnostics";
|
|
2
|
-
import type { StoragePersistence } from "../models/storage";
|
|
1
|
+
import type { Diagnostics } from "../core/diagnostics.js";
|
|
2
|
+
import type { StoragePersistence } from "../models/storage.js";
|
|
3
3
|
/**
|
|
4
4
|
* Asks the browser for persistent storage. Firefox can show a permission prompt.
|
|
5
5
|
* @param diagnostics Diagnostics reporter.
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Diagnostics } from "../core/diagnostics.cjs";
|
|
2
|
+
import type { LogBatch } from "../models/batch.cjs";
|
|
3
|
+
import type { ResolvedConfig } from "../models/config.cjs";
|
|
4
|
+
import type { LogRecord } from "../models/log-record.cjs";
|
|
5
|
+
import { type StorageAdapter } from "../models/storage.cjs";
|
|
6
|
+
/** What opening the store needs. The active context is the one in `config.securityContext`. */
|
|
7
|
+
export interface StoreAccess {
|
|
8
|
+
/** Active configuration instance. */
|
|
9
|
+
config: ResolvedConfig;
|
|
10
|
+
/** Diagnostics reporter. */
|
|
11
|
+
diagnostics: Diagnostics;
|
|
12
|
+
/** The memory store the runtime keeps across context changes, if it has one. */
|
|
13
|
+
memory: StorageAdapter | undefined;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Removes the active context's stored batches and its emergency entries, or the whole
|
|
17
|
+
* namespace's. A discard rotation with no sender uses it, as Sender.retire() would, and so does
|
|
18
|
+
* shutdown() with clearStorage.
|
|
19
|
+
* @param access The config, the reporter and the kept memory store.
|
|
20
|
+
* @param scope Whose stored records to remove: the context's or the namespace's.
|
|
21
|
+
* @param ids More batches to remove by id, for example the ones a carry left under an older id.
|
|
22
|
+
* @param forgetIds True to also remove the stored session id, tab id and journey.
|
|
23
|
+
* @returns Promise that resolves once the batches are removed.
|
|
24
|
+
*/
|
|
25
|
+
export declare function clearStored(access: StoreAccess, scope: "context" | "namespace", ids: readonly string[], forgetIds?: boolean): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Stores records and batches under the active context, as a retain rotation does with a sender.
|
|
28
|
+
* The records go in one batch. A batch keeps its id, so its older copy is replaced.
|
|
29
|
+
* @param access The config, the reporter and the kept memory store.
|
|
30
|
+
* @param records Records that waited in memory.
|
|
31
|
+
* @param batches Stored batches of an earlier context, for example the ones a carry left.
|
|
32
|
+
* @returns Promise that resolves once each batch is stored.
|
|
33
|
+
*/
|
|
34
|
+
export declare function keepStored(access: StoreAccess, records: readonly LogRecord[], batches: readonly LogBatch[]): Promise<void>;
|
|
@@ -0,0 +1,34 @@
|
|
|
1
|
+
import type { Diagnostics } from "../core/diagnostics.js";
|
|
2
|
+
import type { LogBatch } from "../models/batch.js";
|
|
3
|
+
import type { ResolvedConfig } from "../models/config.js";
|
|
4
|
+
import type { LogRecord } from "../models/log-record.js";
|
|
5
|
+
import { type StorageAdapter } from "../models/storage.js";
|
|
6
|
+
/** What opening the store needs. The active context is the one in `config.securityContext`. */
|
|
7
|
+
export interface StoreAccess {
|
|
8
|
+
/** Active configuration instance. */
|
|
9
|
+
config: ResolvedConfig;
|
|
10
|
+
/** Diagnostics reporter. */
|
|
11
|
+
diagnostics: Diagnostics;
|
|
12
|
+
/** The memory store the runtime keeps across context changes, if it has one. */
|
|
13
|
+
memory: StorageAdapter | undefined;
|
|
14
|
+
}
|
|
15
|
+
/**
|
|
16
|
+
* Removes the active context's stored batches and its emergency entries, or the whole
|
|
17
|
+
* namespace's. A discard rotation with no sender uses it, as Sender.retire() would, and so does
|
|
18
|
+
* shutdown() with clearStorage.
|
|
19
|
+
* @param access The config, the reporter and the kept memory store.
|
|
20
|
+
* @param scope Whose stored records to remove: the context's or the namespace's.
|
|
21
|
+
* @param ids More batches to remove by id, for example the ones a carry left under an older id.
|
|
22
|
+
* @param forgetIds True to also remove the stored session id, tab id and journey.
|
|
23
|
+
* @returns Promise that resolves once the batches are removed.
|
|
24
|
+
*/
|
|
25
|
+
export declare function clearStored(access: StoreAccess, scope: "context" | "namespace", ids: readonly string[], forgetIds?: boolean): Promise<void>;
|
|
26
|
+
/**
|
|
27
|
+
* Stores records and batches under the active context, as a retain rotation does with a sender.
|
|
28
|
+
* The records go in one batch. A batch keeps its id, so its older copy is replaced.
|
|
29
|
+
* @param access The config, the reporter and the kept memory store.
|
|
30
|
+
* @param records Records that waited in memory.
|
|
31
|
+
* @param batches Stored batches of an earlier context, for example the ones a carry left.
|
|
32
|
+
* @returns Promise that resolves once each batch is stored.
|
|
33
|
+
*/
|
|
34
|
+
export declare function keepStored(access: StoreAccess, records: readonly LogRecord[], batches: readonly LogBatch[]): Promise<void>;
|