@utk09/ui-observability 0.12.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 (523) hide show
  1. package/CHANGELOG.md +280 -10
  2. package/README.md +70 -839
  3. package/dist/{batch-BjQUwjA6.js → batch-D3NHhF9L.js} +4 -4
  4. package/dist/{batch-BjQUwjA6.js.map → batch-D3NHhF9L.js.map} +1 -1
  5. package/dist/{batch-D5LlU4Q9.cjs → batch-DnYRJqhU.cjs} +2 -2
  6. package/dist/{batch-D5LlU4Q9.cjs.map → batch-DnYRJqhU.cjs.map} +1 -1
  7. package/dist/bus/bus.d.cts +355 -0
  8. package/dist/bus/bus.d.ts +86 -12
  9. package/dist/bus/links.d.cts +132 -0
  10. package/dist/bus/links.d.ts +18 -3
  11. package/dist/bus/validation.d.cts +16 -0
  12. package/dist/bus/validation.d.ts +10 -1
  13. package/dist/bus-B__467mL.cjs +2 -0
  14. package/dist/bus-B__467mL.cjs.map +1 -0
  15. package/dist/bus-dw7T92sO.js +788 -0
  16. package/dist/bus-dw7T92sO.js.map +1 -0
  17. package/dist/capture/console.d.cts +37 -0
  18. package/dist/capture/console.d.ts +1 -1
  19. package/dist/capture/errors.d.cts +32 -0
  20. package/dist/capture/errors.d.ts +1 -1
  21. package/dist/capture/interactions.d.cts +80 -0
  22. package/dist/capture/interactions.d.ts +36 -4
  23. package/dist/capture/lifecycle.d.cts +20 -0
  24. package/dist/capture/lifecycle.d.ts +1 -1
  25. package/dist/capture/long-frames.d.cts +31 -0
  26. package/dist/capture/long-frames.d.ts +1 -1
  27. package/dist/capture/network.d.cts +57 -0
  28. package/dist/capture/network.d.ts +1 -1
  29. package/dist/capture/observed-windows.d.cts +51 -0
  30. package/dist/capture/observed-windows.d.ts +51 -0
  31. package/dist/capture/profiler-frames.d.cts +44 -0
  32. package/dist/capture/profiler-frames.d.ts +1 -1
  33. package/dist/capture/replay-buffer.d.cts +45 -0
  34. package/dist/capture/replay-buffer.d.ts +9 -10
  35. package/dist/capture/replay-upload.d.cts +79 -0
  36. package/dist/capture/replay-upload.d.ts +7 -2
  37. package/dist/capture/replay.d.cts +114 -0
  38. package/dist/capture/replay.d.ts +1 -1
  39. package/dist/capture/reports.d.cts +17 -0
  40. package/dist/capture/reports.d.ts +1 -1
  41. package/dist/capture/resource-timing.d.cts +14 -0
  42. package/dist/capture/resource-timing.d.ts +1 -1
  43. package/dist/capture/server-timing.d.cts +19 -0
  44. package/dist/capture/storm.d.cts +13 -0
  45. package/dist/capture/storm.d.ts +5 -5
  46. package/dist/capture/types.d.cts +128 -0
  47. package/dist/capture/types.d.ts +10 -9
  48. package/dist/capture/unclean-exit.d.cts +31 -0
  49. package/dist/capture/unclean-exit.d.ts +1 -1
  50. package/dist/capture/user-timing.d.cts +22 -0
  51. package/dist/capture/user-timing.d.ts +2 -2
  52. package/dist/capture/web-socket.d.cts +40 -0
  53. package/dist/capture/web-socket.d.ts +3 -3
  54. package/dist/capture/web-vitals.d.cts +40 -0
  55. package/dist/capture/web-vitals.d.ts +1 -1
  56. package/dist/{compression-lD9abCcO.cjs → compression-C0hUHKR-.cjs} +2 -2
  57. package/dist/{compression-lD9abCcO.cjs.map → compression-C0hUHKR-.cjs.map} +1 -1
  58. package/dist/{compression-AJJCMBOa.js → compression-SHPAvS4U.js} +2 -2
  59. package/dist/{compression-AJJCMBOa.js.map → compression-SHPAvS4U.js.map} +1 -1
  60. package/dist/config-CSNcS7OZ.js +558 -0
  61. package/dist/config-CSNcS7OZ.js.map +1 -0
  62. package/dist/config-CybPP5VM.cjs +2 -0
  63. package/dist/config-CybPP5VM.cjs.map +1 -0
  64. package/dist/console-BsM-fSCQ.js +81 -0
  65. package/dist/console-BsM-fSCQ.js.map +1 -0
  66. package/dist/console-Dkxs6IVQ.cjs +2 -0
  67. package/dist/console-Dkxs6IVQ.cjs.map +1 -0
  68. package/dist/constants-BwJDXzj6.js +357 -0
  69. package/dist/constants-BwJDXzj6.js.map +1 -0
  70. package/dist/constants-CtF52hIV.cjs +2 -0
  71. package/dist/constants-CtF52hIV.cjs.map +1 -0
  72. package/dist/constants.d.cts +763 -0
  73. package/dist/constants.d.ts +100 -20
  74. package/dist/core/breadcrumbs.d.cts +54 -0
  75. package/dist/core/breadcrumbs.d.ts +5 -0
  76. package/dist/core/config.d.cts +45 -0
  77. package/dist/core/config.d.ts +30 -2
  78. package/dist/core/context.d.cts +24 -0
  79. package/dist/core/context.d.ts +3 -8
  80. package/dist/core/debug-buffer.d.cts +34 -0
  81. package/dist/core/debug-buffer.d.ts +3 -3
  82. package/dist/core/debug-bundle.d.cts +12 -0
  83. package/dist/core/debug-bundle.d.ts +3 -3
  84. package/dist/core/deferred.d.cts +7 -0
  85. package/dist/core/deferred.d.ts +2 -2
  86. package/dist/core/diagnostics.d.cts +86 -0
  87. package/dist/core/diagnostics.d.ts +1 -1
  88. package/dist/core/drops.d.cts +39 -0
  89. package/dist/core/drops.d.ts +16 -6
  90. package/dist/core/hold-buffer.d.cts +36 -0
  91. package/dist/core/hold-buffer.d.ts +16 -7
  92. package/dist/core/journey.d.cts +148 -0
  93. package/dist/core/journey.d.ts +7 -7
  94. package/dist/core/logger.d.cts +141 -0
  95. package/dist/core/logger.d.ts +23 -30
  96. package/dist/core/measure.d.cts +30 -0
  97. package/dist/core/measure.d.ts +14 -3
  98. package/dist/core/meter.d.cts +78 -0
  99. package/dist/core/meter.d.ts +14 -8
  100. package/dist/core/pipeline.d.cts +227 -0
  101. package/dist/core/pipeline.d.ts +73 -10
  102. package/dist/core/profile-buckets.d.cts +31 -0
  103. package/dist/core/profiler.d.cts +218 -0
  104. package/dist/core/profiler.d.ts +2 -2
  105. package/dist/core/record.d.cts +190 -0
  106. package/dist/core/record.d.ts +44 -12
  107. package/dist/core/remote-rules.d.cts +17 -0
  108. package/dist/core/remote-rules.d.ts +3 -3
  109. package/dist/core/remote-sampling.d.cts +74 -0
  110. package/dist/core/remote-sampling.d.ts +3 -3
  111. package/dist/core/rotation.d.cts +99 -0
  112. package/dist/core/rotation.d.ts +99 -0
  113. package/dist/core/runtime.d.cts +774 -0
  114. package/dist/core/runtime.d.ts +254 -70
  115. package/dist/core/sampling.d.cts +86 -0
  116. package/dist/core/sampling.d.ts +5 -5
  117. package/dist/core/sender.d.cts +161 -0
  118. package/dist/core/sender.d.ts +59 -15
  119. package/dist/core/spans.d.cts +39 -0
  120. package/dist/core/spans.d.ts +1 -1
  121. package/dist/debug-bundle-B2v6Cym-.cjs +2 -0
  122. package/dist/debug-bundle-B2v6Cym-.cjs.map +1 -0
  123. package/dist/debug-bundle-Cs_YWzTa.js +35 -0
  124. package/dist/debug-bundle-Cs_YWzTa.js.map +1 -0
  125. package/dist/defineProperty-X1c4tIPD.cjs +1 -0
  126. package/dist/defineProperty-s2S8BXUc.js +35 -0
  127. package/dist/doctor.cjs +1 -1
  128. package/dist/doctor.cjs.map +1 -1
  129. package/dist/doctor.d.cts +36 -0
  130. package/dist/doctor.d.ts +5 -2
  131. package/dist/doctor.js +119 -87
  132. package/dist/doctor.js.map +1 -1
  133. package/dist/errors-DP2RUm4V.cjs +3 -0
  134. package/dist/errors-DP2RUm4V.cjs.map +1 -0
  135. package/dist/errors-Q3Ng1ciC.js +86 -0
  136. package/dist/errors-Q3Ng1ciC.js.map +1 -0
  137. package/dist/factory-DV17sm2p.js +404 -0
  138. package/dist/factory-DV17sm2p.js.map +1 -0
  139. package/dist/factory-K8O6gpux.cjs +2 -0
  140. package/dist/factory-K8O6gpux.cjs.map +1 -0
  141. package/dist/guards-BlYGRK4l.js +10 -0
  142. package/dist/guards-BlYGRK4l.js.map +1 -0
  143. package/dist/guards-EjG3ahFp.cjs +2 -0
  144. package/dist/guards-EjG3ahFp.cjs.map +1 -0
  145. package/dist/{identity-BrQp_5J5.js → identity-BgtHyY4u.js} +33 -26
  146. package/dist/identity-BgtHyY4u.js.map +1 -0
  147. package/dist/identity-CvuyqZk7.cjs +2 -0
  148. package/dist/identity-CvuyqZk7.cjs.map +1 -0
  149. package/dist/index.cjs +1 -1
  150. package/dist/index.cjs.map +1 -1
  151. package/dist/index.d.cts +301 -0
  152. package/dist/index.d.ts +90 -98
  153. package/dist/index.js +1253 -1555
  154. package/dist/index.js.map +1 -1
  155. package/dist/indexeddb-storage-D4KVcqdD.cjs +2 -0
  156. package/dist/indexeddb-storage-D4KVcqdD.cjs.map +1 -0
  157. package/dist/{indexeddb-storage-DLXQzAGh.js → indexeddb-storage-e-13ZLWm.js} +61 -57
  158. package/dist/indexeddb-storage-e-13ZLWm.js.map +1 -0
  159. package/dist/interactions-Byxf1C82.js +207 -0
  160. package/dist/interactions-Byxf1C82.js.map +1 -0
  161. package/dist/interactions-OK85T-Dk.cjs +2 -0
  162. package/dist/interactions-OK85T-Dk.cjs.map +1 -0
  163. package/dist/{journey-35yCMNFo.js → journey-C93FTYcs.js} +46 -49
  164. package/dist/journey-C93FTYcs.js.map +1 -0
  165. package/dist/journey-nMbob3OB.cjs +2 -0
  166. package/dist/journey-nMbob3OB.cjs.map +1 -0
  167. package/dist/{library-console-BFWEuQsl.cjs → library-console-DJUQzcgM.cjs} +2 -2
  168. package/dist/{library-console-BFWEuQsl.cjs.map → library-console-DJUQzcgM.cjs.map} +1 -1
  169. package/dist/{library-console-Dl_Ly6DQ.js → library-console-DklSmucS.js} +2 -2
  170. package/dist/{library-console-Dl_Ly6DQ.js.map → library-console-DklSmucS.js.map} +1 -1
  171. package/dist/{library-request-nI6pvI6I.js → library-request-UGEwOHpf.js} +2 -2
  172. package/dist/{library-request-nI6pvI6I.js.map → library-request-UGEwOHpf.js.map} +1 -1
  173. package/dist/{library-request-Da-CHKzT.cjs → library-request-kY9iTpIF.cjs} +2 -2
  174. package/dist/{library-request-Da-CHKzT.cjs.map → library-request-kY9iTpIF.cjs.map} +1 -1
  175. package/dist/{lifecycle-CZ6RRXc6.js → lifecycle-B2PlIuQu.js} +21 -29
  176. package/dist/lifecycle-B2PlIuQu.js.map +1 -0
  177. package/dist/lifecycle-DaMdH_X7.cjs +2 -0
  178. package/dist/lifecycle-DaMdH_X7.cjs.map +1 -0
  179. package/dist/log-record-Bmx6etMh.cjs +2 -0
  180. package/dist/log-record-Bmx6etMh.cjs.map +1 -0
  181. package/dist/{log-record-DIA6McNr.js → log-record-DSt2P-Sr.js} +8 -7
  182. package/dist/log-record-DSt2P-Sr.js.map +1 -0
  183. package/dist/{long-frames-430_85Da.js → long-frames-Bamjs1WV.js} +18 -22
  184. package/dist/long-frames-Bamjs1WV.js.map +1 -0
  185. package/dist/long-frames-lhtONgGt.cjs +2 -0
  186. package/dist/long-frames-lhtONgGt.cjs.map +1 -0
  187. package/dist/models/batch.d.cts +57 -0
  188. package/dist/models/batch.d.ts +2 -2
  189. package/dist/models/bus.d.cts +163 -0
  190. package/dist/models/bus.d.ts +28 -3
  191. package/dist/models/config.d.cts +1555 -0
  192. package/dist/models/config.d.ts +377 -261
  193. package/dist/models/drop.d.cts +54 -0
  194. package/dist/models/drop.d.ts +16 -3
  195. package/dist/models/health.d.cts +148 -0
  196. package/dist/models/health.d.ts +108 -12
  197. package/dist/models/log-record.d.cts +61 -0
  198. package/dist/models/metric.d.cts +139 -0
  199. package/dist/models/metric.d.ts +13 -2
  200. package/dist/models/plugin.d.cts +47 -0
  201. package/dist/models/plugin.d.ts +3 -3
  202. package/dist/models/replay.d.cts +60 -0
  203. package/dist/models/serializer.d.cts +25 -0
  204. package/dist/models/serializer.d.ts +4 -2
  205. package/dist/models/storage.d.cts +95 -0
  206. package/dist/models/storage.d.ts +7 -5
  207. package/dist/network-BCn8Gn47.cjs +2 -0
  208. package/dist/network-BCn8Gn47.cjs.map +1 -0
  209. package/dist/{network-C7SkLf4v.js → network-Cg1L2w2r.js} +57 -57
  210. package/dist/network-Cg1L2w2r.js.map +1 -0
  211. package/dist/observed-windows-B3gJkdql.cjs +2 -0
  212. package/dist/observed-windows-B3gJkdql.cjs.map +1 -0
  213. package/dist/observed-windows-BrwaJNlj.js +64 -0
  214. package/dist/observed-windows-BrwaJNlj.js.map +1 -0
  215. package/dist/{otlp-2MCrC3kd.cjs → otlp-CrAWkQdO.cjs} +2 -2
  216. package/dist/{otlp-2MCrC3kd.cjs.map → otlp-CrAWkQdO.cjs.map} +1 -1
  217. package/dist/{otlp-COq033e3.js → otlp-D6dRZyB8.js} +9 -9
  218. package/dist/{otlp-COq033e3.js.map → otlp-D6dRZyB8.js.map} +1 -1
  219. package/dist/{platform-CVewe4wQ.js → platform-8DLhjddo.js} +9 -9
  220. package/dist/{platform-CVewe4wQ.js.map → platform-8DLhjddo.js.map} +1 -1
  221. package/dist/{platform-12uR7kBQ.cjs → platform-BqRc-7RO.cjs} +2 -2
  222. package/dist/{platform-12uR7kBQ.cjs.map → platform-BqRc-7RO.cjs.map} +1 -1
  223. package/dist/{profiler-BVWIOgnq.js → profiler-BaXSqCfz.js} +78 -96
  224. package/dist/profiler-BaXSqCfz.js.map +1 -0
  225. package/dist/profiler-BvWW2kNM.cjs +2 -0
  226. package/dist/profiler-BvWW2kNM.cjs.map +1 -0
  227. package/dist/{profiler-frames-CLXlT_xL.js → profiler-frames-C4ySHN0X.js} +21 -29
  228. package/dist/profiler-frames-C4ySHN0X.js.map +1 -0
  229. package/dist/profiler-frames-DeaBiB-5.cjs +2 -0
  230. package/dist/profiler-frames-DeaBiB-5.cjs.map +1 -0
  231. package/dist/remote-rules-D7L6D_D2.cjs +2 -0
  232. package/dist/remote-rules-D7L6D_D2.cjs.map +1 -0
  233. package/dist/remote-rules-Dq9xe7Qn.js +95 -0
  234. package/dist/remote-rules-Dq9xe7Qn.js.map +1 -0
  235. package/dist/replay-B0M8kWz_.js +310 -0
  236. package/dist/replay-B0M8kWz_.js.map +1 -0
  237. package/dist/replay-QOFBpAXh.cjs +2 -0
  238. package/dist/replay-QOFBpAXh.cjs.map +1 -0
  239. package/dist/{reports-BuXekPOS.js → reports--8APRLa-.js} +25 -30
  240. package/dist/reports--8APRLa-.js.map +1 -0
  241. package/dist/reports-ojuMKGO7.cjs +2 -0
  242. package/dist/reports-ojuMKGO7.cjs.map +1 -0
  243. package/dist/{resource-timing-CXGHwFRD.js → resource-timing-BzR05rE-.js} +20 -23
  244. package/dist/resource-timing-BzR05rE-.js.map +1 -0
  245. package/dist/resource-timing-pAG3ZhB5.cjs +2 -0
  246. package/dist/resource-timing-pAG3ZhB5.cjs.map +1 -0
  247. package/dist/response-body-BWvwKQ2p.js +331 -0
  248. package/dist/response-body-BWvwKQ2p.js.map +1 -0
  249. package/dist/response-body-CKEJ5itk.cjs +3 -0
  250. package/dist/response-body-CKEJ5itk.cjs.map +1 -0
  251. package/dist/rotation-BylN1B9e.js +93 -0
  252. package/dist/rotation-BylN1B9e.js.map +1 -0
  253. package/dist/rotation-E2eKClIs.cjs +2 -0
  254. package/dist/rotation-E2eKClIs.cjs.map +1 -0
  255. package/dist/sampling-B46LW0cy.cjs +2 -0
  256. package/dist/sampling-B46LW0cy.cjs.map +1 -0
  257. package/dist/sampling-zXA6r-Nw.js +63 -0
  258. package/dist/sampling-zXA6r-Nw.js.map +1 -0
  259. package/dist/{sanitize-CNmsD9r3.js → sanitize-DjnR6RXR.js} +2 -2
  260. package/dist/sanitize-DjnR6RXR.js.map +1 -0
  261. package/dist/{sanitize-ChLn97Ch.cjs → sanitize-Qj6LuZqp.cjs} +2 -2
  262. package/dist/sanitize-Qj6LuZqp.cjs.map +1 -0
  263. package/dist/sender-Bdp-TAS4.js +979 -0
  264. package/dist/sender-Bdp-TAS4.js.map +1 -0
  265. package/dist/sender-DR7ZycZY.cjs +2 -0
  266. package/dist/sender-DR7ZycZY.cjs.map +1 -0
  267. package/dist/storage/context-storage.d.cts +90 -0
  268. package/dist/storage/context-storage.d.ts +5 -5
  269. package/dist/storage/emergency-queue.d.cts +27 -0
  270. package/dist/storage/emergency-queue.d.ts +4 -4
  271. package/dist/storage/eviction.d.cts +40 -0
  272. package/dist/storage/eviction.d.ts +1 -1
  273. package/dist/storage/factory.d.cts +21 -0
  274. package/dist/storage/factory.d.ts +3 -3
  275. package/dist/storage/gap.d.cts +20 -0
  276. package/dist/storage/gap.d.ts +3 -3
  277. package/dist/storage/idb-driver.d.cts +93 -0
  278. package/dist/storage/idb-driver.d.ts +1 -1
  279. package/dist/storage/indexeddb-storage.d.cts +97 -0
  280. package/dist/storage/indexeddb-storage.d.ts +12 -4
  281. package/dist/storage/keys.d.cts +17 -0
  282. package/dist/storage/keys.d.ts +2 -2
  283. package/dist/storage/local-storage.d.cts +139 -0
  284. package/dist/storage/local-storage.d.ts +11 -4
  285. package/dist/storage/memory-storage.d.cts +73 -0
  286. package/dist/storage/memory-storage.d.ts +4 -3
  287. package/dist/storage/persistence.d.cts +8 -0
  288. package/dist/storage/persistence.d.ts +2 -2
  289. package/dist/storage/stored-context.d.cts +34 -0
  290. package/dist/storage/stored-context.d.ts +34 -0
  291. package/dist/stored-context-BOu54M8Y.cjs +2 -0
  292. package/dist/stored-context-BOu54M8Y.cjs.map +1 -0
  293. package/dist/stored-context-CSttrAsw.js +51 -0
  294. package/dist/stored-context-CSttrAsw.js.map +1 -0
  295. package/dist/storm-BHgI12iS.cjs +2 -0
  296. package/dist/storm-BHgI12iS.cjs.map +1 -0
  297. package/dist/storm-DKlpv0FL.js +9 -0
  298. package/dist/storm-DKlpv0FL.js.map +1 -0
  299. package/dist/transport/compression.d.cts +7 -0
  300. package/dist/transport/custom-transport.d.cts +22 -0
  301. package/dist/transport/custom-transport.d.ts +6 -5
  302. package/dist/transport/errors.d.cts +31 -0
  303. package/dist/transport/exit-flush.d.cts +135 -0
  304. package/dist/transport/exit-flush.d.ts +30 -13
  305. package/dist/transport/headers.d.cts +8 -0
  306. package/dist/transport/headers.d.ts +2 -2
  307. package/dist/transport/http-transport.d.cts +116 -0
  308. package/dist/transport/http-transport.d.ts +20 -8
  309. package/dist/transport/memory-transport.d.cts +30 -0
  310. package/dist/transport/memory-transport.d.ts +2 -2
  311. package/dist/transport/response-body.d.cts +49 -0
  312. package/dist/transport/response-body.d.ts +49 -0
  313. package/dist/transport/retry-engine.d.cts +129 -0
  314. package/dist/transport/retry-engine.d.ts +27 -9
  315. package/dist/transport/serializers/ecs.d.cts +3 -0
  316. package/dist/transport/serializers/ecs.d.ts +1 -1
  317. package/dist/transport/serializers/otlp-metrics.d.cts +3 -0
  318. package/dist/transport/serializers/otlp-metrics.d.ts +1 -1
  319. package/dist/transport/serializers/otlp-traces.d.cts +3 -0
  320. package/dist/transport/serializers/otlp-traces.d.ts +1 -1
  321. package/dist/transport/serializers/otlp.d.cts +47 -0
  322. package/dist/transport/serializers/otlp.d.ts +2 -2
  323. package/dist/transport/serializers/select.d.cts +38 -0
  324. package/dist/transport/serializers/select.d.ts +5 -5
  325. package/dist/transport/status-transport.d.cts +129 -0
  326. package/dist/transport/status-transport.d.ts +25 -8
  327. package/dist/transport/worker-client.d.cts +23 -0
  328. package/dist/transport/worker-client.d.ts +12 -3
  329. package/dist/transport/worker-entry.d.cts +5 -0
  330. package/dist/transport/worker-entry.d.ts +1 -1
  331. package/dist/transport/worker-protocol.d.cts +38 -0
  332. package/dist/transport/worker-protocol.d.ts +4 -2
  333. package/dist/transport/worker-server.d.cts +3 -0
  334. package/dist/transport/worker-server.d.ts +1 -1
  335. package/dist/transport/worker-transport.d.cts +10 -0
  336. package/dist/transport/worker-transport.d.ts +5 -4
  337. package/dist/types-BAerHgCq.js.map +1 -1
  338. package/dist/types-C7WNpnG1.cjs.map +1 -1
  339. package/dist/unclean-exit-BYPYYkQ5.cjs +2 -0
  340. package/dist/unclean-exit-BYPYYkQ5.cjs.map +1 -0
  341. package/dist/{unclean-exit-Cob_jyTv.js → unclean-exit-BcOB8A2e.js} +23 -30
  342. package/dist/unclean-exit-BcOB8A2e.js.map +1 -0
  343. package/dist/{user-timing-DgHubxCI.js → user-timing-4KIJ74Vi.js} +15 -17
  344. package/dist/user-timing-4KIJ74Vi.js.map +1 -0
  345. package/dist/user-timing-BsU2wQKE.cjs +2 -0
  346. package/dist/user-timing-BsU2wQKE.cjs.map +1 -0
  347. package/dist/utils/console.d.cts +36 -0
  348. package/dist/utils/console.d.ts +4 -4
  349. package/dist/utils/deadline.d.cts +14 -0
  350. package/dist/utils/error-like.d.cts +25 -0
  351. package/dist/utils/fixed-window.d.cts +25 -0
  352. package/dist/utils/global-scope.d.cts +20 -0
  353. package/dist/utils/guards.d.cts +14 -0
  354. package/dist/utils/guards.d.ts +8 -0
  355. package/dist/utils/identity.d.cts +114 -0
  356. package/dist/utils/identity.d.ts +8 -4
  357. package/dist/utils/library-console.d.cts +11 -0
  358. package/dist/utils/library-request.d.cts +24 -0
  359. package/dist/utils/lock.d.cts +24 -0
  360. package/dist/utils/lock.d.ts +1 -1
  361. package/dist/utils/openfin.d.cts +48 -0
  362. package/dist/utils/patch.d.cts +9 -0
  363. package/dist/utils/platform.d.cts +62 -0
  364. package/dist/utils/platform.d.ts +2 -2
  365. package/dist/utils/sanitize.d.cts +52 -0
  366. package/dist/utils/sanitize.d.ts +1 -1
  367. package/dist/utils/sequence.d.cts +10 -0
  368. package/dist/utils/tracing.d.cts +158 -0
  369. package/dist/utils/tracing.d.ts +11 -4
  370. package/dist/utils/unref.d.cts +9 -0
  371. package/dist/web-socket-Cs1ZbmmN.cjs +2 -0
  372. package/dist/{web-socket-DthJuSAg.js.map → web-socket-Cs1ZbmmN.cjs.map} +1 -1
  373. package/dist/{web-socket-DthJuSAg.js → web-socket-Zg0hj1LB.js} +23 -28
  374. package/dist/web-socket-Zg0hj1LB.js.map +1 -0
  375. package/dist/{web-vitals-CsGCWnUr.js → web-vitals-4pWACwaR.js} +15 -21
  376. package/dist/web-vitals-4pWACwaR.js.map +1 -0
  377. package/dist/web-vitals-__X7t4pj.cjs +2 -0
  378. package/dist/web-vitals-__X7t4pj.cjs.map +1 -0
  379. package/dist/{worker-protocol-B0_8rWy5.js → worker-protocol-CYpAbrVl.js} +14 -11
  380. package/dist/worker-protocol-CYpAbrVl.js.map +1 -0
  381. package/dist/worker-protocol-DFYXIFus.cjs +2 -0
  382. package/dist/worker-protocol-DFYXIFus.cjs.map +1 -0
  383. package/dist/worker-server--yGTadTA.cjs +2 -0
  384. package/dist/worker-server--yGTadTA.cjs.map +1 -0
  385. package/dist/worker-server-BokySIII.js +94 -0
  386. package/dist/worker-server-BokySIII.js.map +1 -0
  387. package/dist/worker-transport-BdEvh_-a.cjs +2 -0
  388. package/dist/worker-transport-BdEvh_-a.cjs.map +1 -0
  389. package/dist/worker-transport-JK-Fby9J.js +194 -0
  390. package/dist/worker-transport-JK-Fby9J.js.map +1 -0
  391. package/llms.txt +400 -0
  392. package/package.json +65 -49
  393. package/dist/bus-D_7pd7RN.cjs +0 -2
  394. package/dist/bus-D_7pd7RN.cjs.map +0 -1
  395. package/dist/bus-ecxUNTja.js +0 -660
  396. package/dist/bus-ecxUNTja.js.map +0 -1
  397. package/dist/console-CLz_PvFn.cjs +0 -2
  398. package/dist/console-CLz_PvFn.cjs.map +0 -1
  399. package/dist/console-cwgHKXvM.js +0 -82
  400. package/dist/console-cwgHKXvM.js.map +0 -1
  401. package/dist/constants-Bwl_YtQi.js +0 -349
  402. package/dist/constants-Bwl_YtQi.js.map +0 -1
  403. package/dist/constants-DakMxVB2.cjs +0 -2
  404. package/dist/constants-DakMxVB2.cjs.map +0 -1
  405. package/dist/context-storage-BjzeBSxH.cjs +0 -2
  406. package/dist/context-storage-BjzeBSxH.cjs.map +0 -1
  407. package/dist/context-storage-BzkoHzkQ.js +0 -51
  408. package/dist/context-storage-BzkoHzkQ.js.map +0 -1
  409. package/dist/debug-bundle-BOdYmCeV.js +0 -32
  410. package/dist/debug-bundle-BOdYmCeV.js.map +0 -1
  411. package/dist/debug-bundle-Ex4L_LSP.cjs +0 -2
  412. package/dist/debug-bundle-Ex4L_LSP.cjs.map +0 -1
  413. package/dist/emergency-queue-B9WZxanZ.js +0 -67
  414. package/dist/emergency-queue-B9WZxanZ.js.map +0 -1
  415. package/dist/emergency-queue-HBpL5r3V.cjs +0 -2
  416. package/dist/emergency-queue-HBpL5r3V.cjs.map +0 -1
  417. package/dist/errors-D6bwgJtO.js +0 -92
  418. package/dist/errors-D6bwgJtO.js.map +0 -1
  419. package/dist/errors-DCOCRdSi.cjs +0 -3
  420. package/dist/errors-DCOCRdSi.cjs.map +0 -1
  421. package/dist/factory-DLFDjdLv.cjs +0 -2
  422. package/dist/factory-DLFDjdLv.cjs.map +0 -1
  423. package/dist/factory-e9Qo3K0z.js +0 -276
  424. package/dist/factory-e9Qo3K0z.js.map +0 -1
  425. package/dist/guards-Cidk71ME.js +0 -7
  426. package/dist/guards-Cidk71ME.js.map +0 -1
  427. package/dist/guards-nJ70syPt.cjs +0 -2
  428. package/dist/guards-nJ70syPt.cjs.map +0 -1
  429. package/dist/identity-BlvlgjrU.cjs +0 -2
  430. package/dist/identity-BlvlgjrU.cjs.map +0 -1
  431. package/dist/identity-BrQp_5J5.js.map +0 -1
  432. package/dist/indexeddb-storage-CtLvZH1r.cjs +0 -2
  433. package/dist/indexeddb-storage-CtLvZH1r.cjs.map +0 -1
  434. package/dist/indexeddb-storage-DLXQzAGh.js.map +0 -1
  435. package/dist/interactions-B6z2I4tU.js +0 -119
  436. package/dist/interactions-B6z2I4tU.js.map +0 -1
  437. package/dist/interactions-P6pz08Jn.cjs +0 -2
  438. package/dist/interactions-P6pz08Jn.cjs.map +0 -1
  439. package/dist/journey-35yCMNFo.js.map +0 -1
  440. package/dist/journey-DAGh5h9k.cjs +0 -2
  441. package/dist/journey-DAGh5h9k.cjs.map +0 -1
  442. package/dist/keys-BHhw_0Wh.cjs +0 -2
  443. package/dist/keys-BHhw_0Wh.cjs.map +0 -1
  444. package/dist/keys-BU9j5YqW.js +0 -16
  445. package/dist/keys-BU9j5YqW.js.map +0 -1
  446. package/dist/lifecycle-BGGOcN4N.cjs +0 -2
  447. package/dist/lifecycle-BGGOcN4N.cjs.map +0 -1
  448. package/dist/lifecycle-CZ6RRXc6.js.map +0 -1
  449. package/dist/log-record-D7bA1RPb.cjs +0 -2
  450. package/dist/log-record-D7bA1RPb.cjs.map +0 -1
  451. package/dist/log-record-DIA6McNr.js.map +0 -1
  452. package/dist/long-frames-430_85Da.js.map +0 -1
  453. package/dist/long-frames-Dd8tsi2U.cjs +0 -2
  454. package/dist/long-frames-Dd8tsi2U.cjs.map +0 -1
  455. package/dist/models/stats.d.ts +0 -11
  456. package/dist/network-C7SkLf4v.js.map +0 -1
  457. package/dist/network-pEX3PAJv.cjs +0 -2
  458. package/dist/network-pEX3PAJv.cjs.map +0 -1
  459. package/dist/profiler-BVWIOgnq.js.map +0 -1
  460. package/dist/profiler-eVCknCzS.cjs +0 -2
  461. package/dist/profiler-eVCknCzS.cjs.map +0 -1
  462. package/dist/profiler-frames-CLXlT_xL.js.map +0 -1
  463. package/dist/profiler-frames-Dg2OebB2.cjs +0 -2
  464. package/dist/profiler-frames-Dg2OebB2.cjs.map +0 -1
  465. package/dist/remote-rules-BJGDJGwA.js +0 -98
  466. package/dist/remote-rules-BJGDJGwA.js.map +0 -1
  467. package/dist/remote-rules-CJD3ToVk.cjs +0 -2
  468. package/dist/remote-rules-CJD3ToVk.cjs.map +0 -1
  469. package/dist/replay-0zAJv9T3.js +0 -338
  470. package/dist/replay-0zAJv9T3.js.map +0 -1
  471. package/dist/replay-DomJpXqW.cjs +0 -2
  472. package/dist/replay-DomJpXqW.cjs.map +0 -1
  473. package/dist/reports-BsbqmP8h.cjs +0 -2
  474. package/dist/reports-BsbqmP8h.cjs.map +0 -1
  475. package/dist/reports-BuXekPOS.js.map +0 -1
  476. package/dist/resource-timing-CXGHwFRD.js.map +0 -1
  477. package/dist/resource-timing-DkycFGDa.cjs +0 -2
  478. package/dist/resource-timing-DkycFGDa.cjs.map +0 -1
  479. package/dist/sampling-Dd0wllyq.cjs +0 -2
  480. package/dist/sampling-Dd0wllyq.cjs.map +0 -1
  481. package/dist/sampling-UUDbi3K0.js +0 -60
  482. package/dist/sampling-UUDbi3K0.js.map +0 -1
  483. package/dist/sanitize-CNmsD9r3.js.map +0 -1
  484. package/dist/sanitize-ChLn97Ch.cjs.map +0 -1
  485. package/dist/select-CTk-K5mG.cjs +0 -3
  486. package/dist/select-CTk-K5mG.cjs.map +0 -1
  487. package/dist/select-DPv_j6wq.js +0 -270
  488. package/dist/select-DPv_j6wq.js.map +0 -1
  489. package/dist/sender-15zEsZpr.js +0 -857
  490. package/dist/sender-15zEsZpr.js.map +0 -1
  491. package/dist/sender-Bfpv9tad.cjs +0 -2
  492. package/dist/sender-Bfpv9tad.cjs.map +0 -1
  493. package/dist/storage-BA9RqRO-.cjs +0 -2
  494. package/dist/storage-BA9RqRO-.cjs.map +0 -1
  495. package/dist/storage-DZwed89z.js +0 -16
  496. package/dist/storage-DZwed89z.js.map +0 -1
  497. package/dist/storm-BTSNTIWI.js +0 -9
  498. package/dist/storm-BTSNTIWI.js.map +0 -1
  499. package/dist/storm-D0_qZOEg.cjs +0 -2
  500. package/dist/storm-D0_qZOEg.cjs.map +0 -1
  501. package/dist/unclean-exit-ClGzrc2A.cjs +0 -2
  502. package/dist/unclean-exit-ClGzrc2A.cjs.map +0 -1
  503. package/dist/unclean-exit-Cob_jyTv.js.map +0 -1
  504. package/dist/user-timing-CdYqx3PF.cjs +0 -2
  505. package/dist/user-timing-CdYqx3PF.cjs.map +0 -1
  506. package/dist/user-timing-DgHubxCI.js.map +0 -1
  507. package/dist/utils/timer.d.ts +0 -19
  508. package/dist/web-socket-BTuvYoJI.cjs +0 -2
  509. package/dist/web-socket-BTuvYoJI.cjs.map +0 -1
  510. package/dist/web-vitals-Ch5BpDmo.cjs +0 -2
  511. package/dist/web-vitals-Ch5BpDmo.cjs.map +0 -1
  512. package/dist/web-vitals-CsGCWnUr.js.map +0 -1
  513. package/dist/worker-protocol-B0_8rWy5.js.map +0 -1
  514. package/dist/worker-protocol-BjzFORfq.cjs +0 -2
  515. package/dist/worker-protocol-BjzFORfq.cjs.map +0 -1
  516. package/dist/worker-server-4en-Lt-3.cjs +0 -2
  517. package/dist/worker-server-4en-Lt-3.cjs.map +0 -1
  518. package/dist/worker-server-Cne9MX9I.js +0 -83
  519. package/dist/worker-server-Cne9MX9I.js.map +0 -1
  520. package/dist/worker-transport-B-GF4Aqn.cjs +0 -2
  521. package/dist/worker-transport-B-GF4Aqn.cjs.map +0 -1
  522. package/dist/worker-transport-C3SjJAEC.js +0 -200
  523. package/dist/worker-transport-C3SjJAEC.js.map +0 -1
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-timing-4KIJ74Vi.js","names":["recordedUrl","_defineProperty","USER_TIMING_DURATION","UserTimingCapture","ctx","first","once","supported","list","include","userTiming","entry","entries","matchesAny","name","fullUrls"],"sources":["../src/capture/user-timing.ts"],"sourcesContent":["// src/capture/user-timing.ts\n//\n// Records the app's marks and measures from the User Timing API. A measure goes into a\n// histogram, and a mark adds a breadcrumb.\n\nimport type { InstrumentDef } from \"../models/metric\";\nimport { recordedUrl } from \"../utils/platform\";\nimport { type Capture, type CaptureContext, matchesAny } from \"./types\";\n\n/** Histogram of the app's measures, in milliseconds. */\nconst USER_TIMING_DURATION: InstrumentDef = {\n name: \"ui.user_timing.duration\",\n kind: \"histogram\",\n unit: \"ms\",\n boundaries: [1, 5, 10, 25, 50, 100, 250, 500, 1000, 2500, 5000, 10000],\n};\n\n/** Observes the app's marks and measures. */\nexport class UserTimingCapture implements Capture {\n /** Capture module identifier. */\n readonly name = \"userTiming\";\n\n /** Observer for the mark and measure entries. */\n private observer: PerformanceObserver | undefined;\n\n /**\n * @param ctx Capture context with the config, the meter and the breadcrumbs.\n */\n constructor(private readonly ctx: CaptureContext) {}\n\n /** Observes marks and measures. Only the first install in a document reads buffered entries. */\n install(): void {\n if (this.observer) {\n return;\n }\n\n const { once } = this.ctx;\n const first = !once.userTiming;\n once.userTiming = true;\n\n // Older browsers have no supportedEntryTypes, and the capture stays off there.\n const supported: readonly string[] | undefined =\n typeof PerformanceObserver === \"undefined\"\n ? undefined\n : PerformanceObserver.supportedEntryTypes;\n if (!supported?.includes(\"measure\")) {\n if (first) {\n this.ctx.diagnostics.report(\n \"capture.install_failed\",\n \"The browser does not report User Timing entries. The user timing capture is off.\",\n );\n }\n return;\n }\n\n this.observer = new PerformanceObserver((list) => {\n // The browser calls this directly, so anything we throw is an uncaught error on the page.\n this.ctx.diagnostics.guard(\n \"capture.record_failed\",\n \"The library could not record a user timing entry.\",\n () => {\n this.record(list.getEntries());\n },\n );\n });\n // Buffered entries include the marks and measures made before this chunk loaded.\n this.observer.observe({ type: \"measure\", buffered: first });\n if (supported.includes(\"mark\")) {\n this.observer.observe({ type: \"mark\", buffered: first });\n }\n }\n\n /** Disconnects the observer. */\n uninstall(): void {\n this.observer?.disconnect();\n this.observer = undefined;\n }\n\n /**\n * Records the entries whose name `userTiming.include` selects.\n * @param entries Mark and measure entries.\n */\n private record(entries: PerformanceEntryList): void {\n if (this.ctx.isActive?.() === false) {\n return;\n }\n\n const { fullUrls, userTiming } = this.ctx.config.capture;\n const include = typeof userTiming === \"object\" ? userTiming.include : undefined;\n for (const entry of entries) {\n if (include !== undefined && include.length > 0 && !matchesAny(entry.name, include)) {\n continue;\n }\n\n // A third-party script can write any name, so a name can hold a URL with a token.\n const name = recordedUrl(entry.name, fullUrls);\n if (entry.entryType === \"measure\") {\n this.ctx.recordMetric(USER_TIMING_DURATION, entry.duration, { \"user_timing.name\": name });\n } else {\n this.ctx.breadcrumbs.push({\n // A buffered entry reaches the observer late, and the trail needs the mark's own time.\n t: Math.round(performance.timeOrigin + entry.startTime),\n category: \"event\",\n message: name.slice(0, this.ctx.config.limits.maxBodyChars),\n });\n }\n }\n }\n}\n"],"mappings":";;;;AAUA,IAAME,IAAsC;CAC1C,MAAM;CACN,MAAM;CACN,MAAM;CACN,YAAY;EAAC;EAAG;EAAG;EAAI;EAAI;EAAI;EAAK;EAAK;EAAK;EAAM;EAAM;EAAM;CAAK;AACvE,GAGaC,IAAb,MAAkD;CAUhD,YAAY,GAAsC;EAArB,AAAAF,EAAA,MAAA,OAAA,KAAA,CAAA,GAR7BA,EAAA,MAAA,QAAgB,YAAA,GAGhBA,EAAA,MAAA,YAAA,KAAA,CAAA,GAK6B,KAAA,MAAAG;CAAsB;CAGnD,UAAgB;EACd,IAAI,KAAK,UACP;EAGF,IAAM,EAAE,YAAS,KAAK,KAChBC,IAAQ,CAACC,EAAK;EACpB,EAAK,aAAa;EAGlB,IAAMC,IACJ,OAAO,sBAAwB,MAC3B,KAAA,IACA,oBAAoB;EAC1B,AAAKA,GAAW,SAAS,SAAS,KAUlC,KAAK,WAAW,IAAI,qBAAqB,MAAS;GAEhD,KAAK,IAAI,YAAY,MACnB,yBACA,2DACM;IACJ,KAAK,OAAOC,EAAK,WAAW,CAAC;GAC/B,CACF;EACF,CAAC,GAED,KAAK,SAAS,QAAQ;GAAE,MAAM;GAAW,UAAUH;EAAM,CAAC,GACtDE,EAAU,SAAS,MAAM,KAC3B,KAAK,SAAS,QAAQ;GAAE,MAAM;GAAQ,UAAUF;EAAM,CAAC,KAtBnDA,KACF,KAAK,IAAI,YAAY,OACnB,0BACA,kFACF;CAoBN;CAGA,YAAkB;EAEhB,AADA,KAAK,UAAU,WAAW,GAC1B,KAAK,WAAW,KAAA;CAClB;CAMA,OAAe,GAAqC;EAClD,IAAI,KAAK,IAAI,WAAW,MAAM,IAC5B;EAGF,IAAM,EAAE,aAAU,kBAAe,KAAK,IAAI,OAAO,SAC3CI,IAAU,OAAOC,KAAe,WAAWA,EAAW,UAAU,KAAA;EACtE,KAAK,IAAMC,KAASC,GAAS;GAC3B,IAAIH,MAAY,KAAA,KAAaA,EAAQ,SAAS,KAAK,CAACI,EAAWF,EAAM,MAAMF,CAAO,GAChF;GAIF,IAAMK,IAAOd,EAAYW,EAAM,MAAMI,CAAQ;GAC7C,AAAIJ,EAAM,cAAc,YACtB,KAAK,IAAI,aAAaT,GAAsBS,EAAM,UAAU,EAAE,oBAAoBG,EAAK,CAAC,IAExF,KAAK,IAAI,YAAY,KAAK;IAExB,GAAG,KAAK,MAAM,YAAY,aAAaH,EAAM,SAAS;IACtD,UAAU;IACV,SAASG,EAAK,MAAM,GAAG,KAAK,IAAI,OAAO,OAAO,YAAY;GAC5D,CAAC;EAEL;CACF;AACF"}
@@ -0,0 +1,2 @@
1
+ const e=require("./platform-BqRc-7RO.cjs"),t=require("./types-C7WNpnG1.cjs"),n=require("./defineProperty-X1c4tIPD.cjs");var r={name:`ui.user_timing.duration`,kind:`histogram`,unit:`ms`,boundaries:[1,5,10,25,50,100,250,500,1e3,2500,5e3,1e4]},i=class{constructor(e){n.t(this,`ctx`,void 0),n.t(this,`name`,`userTiming`),n.t(this,`observer`,void 0),this.ctx=e}install(){if(this.observer)return;let{once:e}=this.ctx,t=!e.userTiming;e.userTiming=!0;let n=typeof PerformanceObserver>`u`?void 0:PerformanceObserver.supportedEntryTypes;n?.includes(`measure`)?(this.observer=new PerformanceObserver(e=>{this.ctx.diagnostics.guard(`capture.record_failed`,`The library could not record a user timing entry.`,()=>{this.record(e.getEntries())})}),this.observer.observe({type:`measure`,buffered:t}),n.includes(`mark`)&&this.observer.observe({type:`mark`,buffered:t})):t&&this.ctx.diagnostics.report(`capture.install_failed`,`The browser does not report User Timing entries. The user timing capture is off.`)}uninstall(){this.observer?.disconnect(),this.observer=void 0}record(n){if(this.ctx.isActive?.()===!1)return;let{fullUrls:i,userTiming:a}=this.ctx.config.capture,o=typeof a==`object`?a.include:void 0;for(let a of n){if(o!==void 0&&o.length>0&&!t.t(a.name,o))continue;let n=e.i(a.name,i);a.entryType===`measure`?this.ctx.recordMetric(r,a.duration,{"user_timing.name":n}):this.ctx.breadcrumbs.push({t:Math.round(performance.timeOrigin+a.startTime),category:`event`,message:n.slice(0,this.ctx.config.limits.maxBodyChars)})}}};exports.UserTimingCapture=i;
2
+ //# sourceMappingURL=user-timing-BsU2wQKE.cjs.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"user-timing-BsU2wQKE.cjs","names":["matchesAny","recordedUrl","require_platform","require_types","require_defineProperty","USER_TIMING_DURATION","UserTimingCapture","ctx","first","once","supported","list","include","userTiming","entry","entries","name","fullUrls"],"sources":["../src/capture/user-timing.ts"],"sourcesContent":["// src/capture/user-timing.ts\n//\n// Records the app's marks and measures from the User Timing API. A measure goes into a\n// histogram, and a mark adds a breadcrumb.\n\nimport type { InstrumentDef } from \"../models/metric\";\nimport { recordedUrl } from \"../utils/platform\";\nimport { type Capture, type CaptureContext, matchesAny } from \"./types\";\n\n/** Histogram of the app's measures, in milliseconds. */\nconst USER_TIMING_DURATION: InstrumentDef = {\n name: \"ui.user_timing.duration\",\n kind: \"histogram\",\n unit: \"ms\",\n boundaries: [1, 5, 10, 25, 50, 100, 250, 500, 1000, 2500, 5000, 10000],\n};\n\n/** Observes the app's marks and measures. */\nexport class UserTimingCapture implements Capture {\n /** Capture module identifier. */\n readonly name = \"userTiming\";\n\n /** Observer for the mark and measure entries. */\n private observer: PerformanceObserver | undefined;\n\n /**\n * @param ctx Capture context with the config, the meter and the breadcrumbs.\n */\n constructor(private readonly ctx: CaptureContext) {}\n\n /** Observes marks and measures. Only the first install in a document reads buffered entries. */\n install(): void {\n if (this.observer) {\n return;\n }\n\n const { once } = this.ctx;\n const first = !once.userTiming;\n once.userTiming = true;\n\n // Older browsers have no supportedEntryTypes, and the capture stays off there.\n const supported: readonly string[] | undefined =\n typeof PerformanceObserver === \"undefined\"\n ? undefined\n : PerformanceObserver.supportedEntryTypes;\n if (!supported?.includes(\"measure\")) {\n if (first) {\n this.ctx.diagnostics.report(\n \"capture.install_failed\",\n \"The browser does not report User Timing entries. The user timing capture is off.\",\n );\n }\n return;\n }\n\n this.observer = new PerformanceObserver((list) => {\n // The browser calls this directly, so anything we throw is an uncaught error on the page.\n this.ctx.diagnostics.guard(\n \"capture.record_failed\",\n \"The library could not record a user timing entry.\",\n () => {\n this.record(list.getEntries());\n },\n );\n });\n // Buffered entries include the marks and measures made before this chunk loaded.\n this.observer.observe({ type: \"measure\", buffered: first });\n if (supported.includes(\"mark\")) {\n this.observer.observe({ type: \"mark\", buffered: first });\n }\n }\n\n /** Disconnects the observer. */\n uninstall(): void {\n this.observer?.disconnect();\n this.observer = undefined;\n }\n\n /**\n * Records the entries whose name `userTiming.include` selects.\n * @param entries Mark and measure entries.\n */\n private record(entries: PerformanceEntryList): void {\n if (this.ctx.isActive?.() === false) {\n return;\n }\n\n const { fullUrls, userTiming } = this.ctx.config.capture;\n const include = typeof userTiming === \"object\" ? userTiming.include : undefined;\n for (const entry of entries) {\n if (include !== undefined && include.length > 0 && !matchesAny(entry.name, include)) {\n continue;\n }\n\n // A third-party script can write any name, so a name can hold a URL with a token.\n const name = recordedUrl(entry.name, fullUrls);\n if (entry.entryType === \"measure\") {\n this.ctx.recordMetric(USER_TIMING_DURATION, entry.duration, { \"user_timing.name\": name });\n } else {\n this.ctx.breadcrumbs.push({\n // A buffered entry reaches the observer late, and the trail needs the mark's own time.\n t: Math.round(performance.timeOrigin + entry.startTime),\n category: \"event\",\n message: name.slice(0, this.ctx.config.limits.maxBodyChars),\n });\n }\n }\n }\n}\n"],"mappings":"A,wHAUA,IAAMK,EAAsC,CAC1C,KAAM,0BACN,KAAM,YACN,KAAM,KACN,WAAY,CAAC,EAAG,EAAG,GAAI,GAAI,GAAI,IAAK,IAAK,IAAK,IAAM,KAAM,IAAM,GAAK,CACvE,EAGaC,EAAb,KAAkD,CAUhD,YAAY,EAAsC,CAArBF,EAAA,EAAA,KAAA,MAAA,IAAA,EAAA,EAR7BA,EAAA,EAAA,KAAA,OAAgB,YAAA,EAGhBA,EAAA,EAAA,KAAA,WAAA,IAAA,EAAA,EAK6B,KAAA,IAAAG,CAAsB,CAGnD,SAAgB,CACd,GAAI,KAAK,SACP,OAGF,GAAM,CAAE,QAAS,KAAK,IAChBC,EAAQ,CAACC,EAAK,WACpB,EAAK,WAAa,GAGlB,IAAMC,EACJ,OAAO,oBAAwB,IAC3B,IAAA,GACA,oBAAoB,oBACrBA,GAAW,SAAS,SAAS,GAUlC,KAAK,SAAW,IAAI,oBAAqB,GAAS,CAEhD,KAAK,IAAI,YAAY,MACnB,wBACA,wDACM,CACJ,KAAK,OAAOC,EAAK,WAAW,CAAC,CAC/B,CACF,CACF,CAAC,EAED,KAAK,SAAS,QAAQ,CAAE,KAAM,UAAW,SAAUH,CAAM,CAAC,EACtDE,EAAU,SAAS,MAAM,GAC3B,KAAK,SAAS,QAAQ,CAAE,KAAM,OAAQ,SAAUF,CAAM,CAAC,GAtBnDA,GACF,KAAK,IAAI,YAAY,OACnB,yBACA,kFACF,CAoBN,CAGA,WAAkB,CAChB,KAAK,UAAU,WAAW,EAC1B,KAAK,SAAW,IAAA,EAClB,CAMA,OAAe,EAAqC,CAClD,GAAI,KAAK,IAAI,WAAW,IAAM,GAC5B,OAGF,GAAM,CAAE,WAAU,cAAe,KAAK,IAAI,OAAO,QAC3CI,EAAU,OAAOC,GAAe,SAAWA,EAAW,QAAU,IAAA,GACtE,IAAK,IAAMC,KAASC,EAAS,CAC3B,GAAIH,IAAY,IAAA,IAAaA,EAAQ,OAAS,GAAK,CAACZ,EAAAA,EAAWc,EAAM,KAAMF,CAAO,EAChF,SAIF,IAAMI,EAAOf,EAAAA,EAAYa,EAAM,KAAMG,CAAQ,EACzCH,EAAM,YAAc,UACtB,KAAK,IAAI,aAAaT,EAAsBS,EAAM,SAAU,CAAE,mBAAoBE,CAAK,CAAC,EAExF,KAAK,IAAI,YAAY,KAAK,CAExB,EAAG,KAAK,MAAM,YAAY,WAAaF,EAAM,SAAS,EACtD,SAAU,QACV,QAASE,EAAK,MAAM,EAAG,KAAK,IAAI,OAAO,OAAO,YAAY,CAC5D,CAAC,CAEL,CACF,CACF,E"}
@@ -0,0 +1,36 @@
1
+ import type { Diagnostics } from "../core/diagnostics.cjs";
2
+ import type { ResolvedConsole } from "../models/config.cjs";
3
+ import type { LogLevel } from "../models/log-record.cjs";
4
+ import { type SanitizeLimits } from "./sanitize.cjs";
5
+ /** Mirrors log records directly to browser or Node console methods based on severity. */
6
+ export declare class ConsoleSink {
7
+ private settings;
8
+ private diagnostics;
9
+ private readonly limits;
10
+ /**
11
+ * @param settings Console level and styles. A null level prints nothing.
12
+ * @param diagnostics Diagnostics reporter.
13
+ * @param limits Size limits for the printed payload. Same as the record limits.
14
+ */
15
+ constructor(settings: ResolvedConsole, diagnostics: Diagnostics, limits?: SanitizeLimits);
16
+ /**
17
+ * Replaces the console level and styles.
18
+ * @param settings Console level and styles. A null level prints nothing.
19
+ */
20
+ update(settings: ResolvedConsole): void;
21
+ /**
22
+ * Checks whether a level clears the console threshold.
23
+ * @param level Severity level of the record.
24
+ * @returns True if the sink prints this level.
25
+ */
26
+ accepts(level: LogLevel): boolean;
27
+ /**
28
+ * Prints a styled log line if the level clears the console threshold.
29
+ * @param namespace Logger namespace, shown in the prefix.
30
+ * @param level Severity level of the record.
31
+ * @param message Primary log message.
32
+ * @param payload Caller payload. The sink prints a sanitized copy.
33
+ * @param error Error to print before the payload.
34
+ */
35
+ write(namespace: string, level: LogLevel, message: string, payload?: Record<string, unknown>, error?: Error): void;
36
+ }
@@ -1,7 +1,7 @@
1
- import type { Diagnostics } from "../core/diagnostics";
2
- import type { ResolvedConsole } from "../models/config";
3
- import type { LogLevel } from "../models/log-record";
4
- import { type SanitizeLimits } from "./sanitize";
1
+ import type { Diagnostics } from "../core/diagnostics.js";
2
+ import type { ResolvedConsole } from "../models/config.js";
3
+ import type { LogLevel } from "../models/log-record.js";
4
+ import { type SanitizeLimits } from "./sanitize.js";
5
5
  /** Mirrors log records directly to browser or Node console methods based on severity. */
6
6
  export declare class ConsoleSink {
7
7
  private settings;
@@ -0,0 +1,14 @@
1
+ /** The error for a promise that didn't settle before its deadline. */
2
+ export declare class DeadlineError extends Error {
3
+ /**
4
+ * @param ms Deadline in milliseconds.
5
+ */
6
+ constructor(ms: number);
7
+ }
8
+ /**
9
+ * Rejects when a promise doesn't settle within a deadline.
10
+ * @param work The promise to bound.
11
+ * @param ms Deadline in milliseconds.
12
+ * @returns The promise's value, or a rejection after the deadline.
13
+ */
14
+ export declare function withDeadline<T>(work: Promise<T>, ms: number): Promise<T>;
@@ -0,0 +1,25 @@
1
+ /** The standard error fields. Any other own field is written as error data. */
2
+ export declare const ERROR_OWN_KEYS: ReadonlySet<string>;
3
+ /**
4
+ * Checks whether a value is a field that error data keeps. An object field, such as an
5
+ * AxiosError's config, holds credentials and request bodies.
6
+ * @param value Field value.
7
+ * @returns True for a string, a number or a boolean.
8
+ */
9
+ export declare function isDataField(value: unknown): boolean;
10
+ /** The error fields that the library reads. */
11
+ export interface ErrorLike {
12
+ /** Error class name, for example "TypeError". */
13
+ name: string;
14
+ /** Error message. */
15
+ message: string;
16
+ /** Stack trace text. */
17
+ stack?: string;
18
+ }
19
+ /**
20
+ * Checks whether a value has the shape of an error. A getter on a hostile value can throw, so
21
+ * call this inside a diagnostics guard.
22
+ * @param value The value to check.
23
+ * @returns True for an object with a string name, a string message and a string or no stack.
24
+ */
25
+ export declare function isErrorLike(value: unknown): value is ErrorLike;
@@ -0,0 +1,25 @@
1
+ /** State of one fixed window. Counters that share a limit share one object. */
2
+ export interface StormWindow {
3
+ /** Start of the current window, in epoch milliseconds. */
4
+ start: number;
5
+ /** Events counted in the current window. */
6
+ count: number;
7
+ }
8
+ /**
9
+ * Counts one event in a fixed window.
10
+ * @param window The window state to update.
11
+ * @param limit Maximum events per window.
12
+ * @param windowMs Window length in milliseconds.
13
+ * @returns False when the window has no allowance left. The caller must drop the event.
14
+ */
15
+ export declare function countInWindow(window: StormWindow, limit: number, windowMs: number): boolean;
16
+ /**
17
+ * Checks whether a fixed window has ended. The bus uses the same rule to expire its source
18
+ * entries.
19
+ * @param window Window state.
20
+ * @param windowMs Window length in milliseconds.
21
+ * @param now Current epoch time in milliseconds.
22
+ * @returns True once the window length has passed, or when the clock moved back. Without the
23
+ * second check, a clock that moves back would keep the window open.
24
+ */
25
+ export declare function windowEnded(window: StormWindow, windowMs: number, now: number): boolean;
@@ -0,0 +1,20 @@
1
+ /** A scope that a function runs inside. */
2
+ export interface GlobalScope {
3
+ /**
4
+ * Runs a function inside the scope. Only the synchronous part of the function is covered.
5
+ * @param fn The function to run.
6
+ * @returns The function's return value.
7
+ */
8
+ run<T>(fn: () => T): T;
9
+ /**
10
+ * Checks whether a scope is open.
11
+ * @returns True while a function is running inside the scope.
12
+ */
13
+ open(): boolean;
14
+ }
15
+ /**
16
+ * Creates a scope whose count lives on a global symbol.
17
+ * @param key The global symbol's key.
18
+ * @returns The scope.
19
+ */
20
+ export declare function globalScope(key: string): GlobalScope;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * Checks whether a value is a non-null object that isn't an array.
3
+ * @param value The value to check.
4
+ * @returns True for an object with string keys.
5
+ */
6
+ export declare function isObject(value: unknown): value is Record<string, unknown>;
7
+ /**
8
+ * Checks whether a key is the object's own property, so an inherited "toString" fails. It
9
+ * replaces Object.hasOwn, which is missing before Chrome 93, Firefox 92 and Safari 15.4.
10
+ * @param object The object to check.
11
+ * @param key The property key.
12
+ * @returns True if the object has its own property with this key.
13
+ */
14
+ export declare function hasOwn(object: object, key: PropertyKey): boolean;
@@ -4,3 +4,11 @@
4
4
  * @returns True for an object with string keys.
5
5
  */
6
6
  export declare function isObject(value: unknown): value is Record<string, unknown>;
7
+ /**
8
+ * Checks whether a key is the object's own property, so an inherited "toString" fails. It
9
+ * replaces Object.hasOwn, which is missing before Chrome 93, Firefox 92 and Safari 15.4.
10
+ * @param object The object to check.
11
+ * @param key The property key.
12
+ * @returns True if the object has its own property with this key.
13
+ */
14
+ export declare function hasOwn(object: object, key: PropertyKey): boolean;
@@ -0,0 +1,114 @@
1
+ import type { Diagnostics } from "../core/diagnostics.cjs";
2
+ /** Correlation identifiers attached to log records across session, tab, and realm scopes. */
3
+ export interface Identity {
4
+ /** Origin-wide user session identifier surviving across tabs until idle expiration. */
5
+ sessionId: string;
6
+ /** Browser tab or desktop window identifier surviving document reloads. */
7
+ tabId: string;
8
+ /** Unique execution realm identifier regenerated on every document load. */
9
+ contextId: string;
10
+ }
11
+ /** The three Storage methods that identity and journey code use. */
12
+ export interface KeyValueStore {
13
+ /**
14
+ * Reads one value.
15
+ * @param key Storage key.
16
+ * @returns Stored value, or null.
17
+ */
18
+ getItem(key: string): string | null;
19
+ /**
20
+ * Writes one value.
21
+ * @param key Storage key.
22
+ * @param value Value to write.
23
+ */
24
+ setItem(key: string, value: string): void;
25
+ /**
26
+ * Removes one value.
27
+ * @param key Storage key.
28
+ */
29
+ removeItem(key: string): void;
30
+ }
31
+ /** Stores for identity and journey keys. A getter can throw in a sandboxed frame. */
32
+ export interface IdentityStores {
33
+ /** Store that lasts across tabs and reloads. */
34
+ local(): KeyValueStore;
35
+ /** Store that lasts for one tab. */
36
+ session(): KeyValueStore;
37
+ /**
38
+ * Returns the live opener's tab store, or null without one. Memory stores leave it out,
39
+ * because they can't hold a copied tab id. A cross-origin opener throws.
40
+ */
41
+ opener?(): KeyValueStore | null;
42
+ }
43
+ /** Stores that write to the browser. Used by the `identity: "storage"` option. */
44
+ export declare const BROWSER_STORES: IdentityStores;
45
+ /**
46
+ * Creates stores that keep values in memory only. Used by the `identity: "memory"` option.
47
+ * @returns Stores that write nothing to the browser.
48
+ */
49
+ export declare function memoryStores(): IdentityStores;
50
+ /**
51
+ * Generates a random lowercase hexadecimal string of the given byte length. Uses
52
+ * crypto.getRandomValues when it is available, and Math.random otherwise.
53
+ * @param byteLength Number of random bytes to generate.
54
+ * @returns Hexadecimal string of length byteLength * 2.
55
+ */
56
+ export declare function randomHex(byteLength: number): string;
57
+ /**
58
+ * Generates a unique identifier with crypto.randomUUID, falling back to randomHex.
59
+ * @param diagnostics Diagnostics reporter. Counts a blocked crypto.randomUUID call.
60
+ * @returns A UUID or a random hex identifier.
61
+ */
62
+ export declare function newId(diagnostics: Diagnostics): string;
63
+ /**
64
+ * Resolves or initializes the session, tab, and context identifiers for the active realm.
65
+ * @param diagnostics Diagnostics reporter.
66
+ * @param stores Identity stores.
67
+ * @returns The populated Identity object.
68
+ */
69
+ export declare function resolveIdentity(diagnostics: Diagnostics, stores?: IdentityStores, idleMs?: number | null): Identity;
70
+ /**
71
+ * Writes a new tab id to the session store.
72
+ * @param tabId New tab identifier.
73
+ * @param diagnostics Diagnostics reporter.
74
+ * @param stores Identity stores.
75
+ */
76
+ export declare function persistTabId(tabId: string, diagnostics: Diagnostics, stores: IdentityStores): void;
77
+ /**
78
+ * Writes the session's last-seen timestamp, throttled by `SESSION_TOUCH_MS`. The throttle
79
+ * state lives on the instance, not the module, so two runtimes in one document don't block
80
+ * each other's session writes.
81
+ */
82
+ export declare class SessionTouch {
83
+ private diagnostics;
84
+ private readonly stores;
85
+ private readonly idleMs;
86
+ /** Epoch milliseconds of the last write this instance made. */
87
+ private lastTouchAt;
88
+ /**
89
+ * @param diagnostics Diagnostics reporter.
90
+ * @param stores Identity stores.
91
+ */
92
+ constructor(diagnostics: Diagnostics, stores?: IdentityStores, idleMs?: number | null);
93
+ /**
94
+ * Writes the session activity time to the local store, at most once per throttle window.
95
+ * @param sessionId The active session identifier.
96
+ */
97
+ touch(sessionId: string): void;
98
+ /**
99
+ * Reads the live session id from the local store.
100
+ * @returns The stored session id, or undefined if no session is live.
101
+ */
102
+ stored(): string | undefined;
103
+ /**
104
+ * Writes a new session id to the local store right away, bypassing the throttle.
105
+ * @param sessionId The new session identifier.
106
+ */
107
+ restart(sessionId: string): void;
108
+ /**
109
+ * Writes the session record and starts a new throttle window.
110
+ * @param sessionId Session identifier.
111
+ * @param now Epoch time in milliseconds.
112
+ */
113
+ private write;
114
+ }
@@ -1,4 +1,4 @@
1
- import type { Diagnostics } from "../core/diagnostics";
1
+ import type { Diagnostics } from "../core/diagnostics.js";
2
2
  /** Correlation identifiers attached to log records across session, tab, and realm scopes. */
3
3
  export interface Identity {
4
4
  /** Origin-wide user session identifier surviving across tabs until idle expiration. */
@@ -34,6 +34,11 @@ export interface IdentityStores {
34
34
  local(): KeyValueStore;
35
35
  /** Store that lasts for one tab. */
36
36
  session(): KeyValueStore;
37
+ /**
38
+ * Returns the live opener's tab store, or null without one. Memory stores leave it out,
39
+ * because they can't hold a copied tab id. A cross-origin opener throws.
40
+ */
41
+ opener?(): KeyValueStore | null;
37
42
  }
38
43
  /** Stores that write to the browser. Used by the `identity: "storage"` option. */
39
44
  export declare const BROWSER_STORES: IdentityStores;
@@ -61,7 +66,7 @@ export declare function newId(diagnostics: Diagnostics): string;
61
66
  * @param stores Identity stores.
62
67
  * @returns The populated Identity object.
63
68
  */
64
- export declare function resolveIdentity(diagnostics: Diagnostics, stores?: IdentityStores, idleMs?: number): Identity;
69
+ export declare function resolveIdentity(diagnostics: Diagnostics, stores?: IdentityStores, idleMs?: number | null): Identity;
65
70
  /**
66
71
  * Writes a new tab id to the session store.
67
72
  * @param tabId New tab identifier.
@@ -77,7 +82,6 @@ export declare function persistTabId(tabId: string, diagnostics: Diagnostics, st
77
82
  export declare class SessionTouch {
78
83
  private diagnostics;
79
84
  private readonly stores;
80
- private readonly touchMs;
81
85
  private readonly idleMs;
82
86
  /** Epoch milliseconds of the last write this instance made. */
83
87
  private lastTouchAt;
@@ -85,7 +89,7 @@ export declare class SessionTouch {
85
89
  * @param diagnostics Diagnostics reporter.
86
90
  * @param stores Identity stores.
87
91
  */
88
- constructor(diagnostics: Diagnostics, stores?: IdentityStores, touchMs?: number, idleMs?: number);
92
+ constructor(diagnostics: Diagnostics, stores?: IdentityStores, idleMs?: number | null);
89
93
  /**
90
94
  * Writes the session activity time to the local store, at most once per throttle window.
91
95
  * @param sessionId The active session identifier.
@@ -0,0 +1,11 @@
1
+ /**
2
+ * Runs a function inside the library console scope.
3
+ * @param fn The function that writes to the console.
4
+ * @returns The function's return value.
5
+ */
6
+ export declare function runAsLibraryConsole<T>(fn: () => T): T;
7
+ /**
8
+ * Checks whether a library console scope is open.
9
+ * @returns True while the library is writing to the console.
10
+ */
11
+ export declare function isLibraryConsole(): boolean;
@@ -0,0 +1,24 @@
1
+ /**
2
+ * Runs a function inside the library request scope. Only the synchronous part of the function
3
+ * is covered, so a request that starts after an await is outside the scope.
4
+ * @param fn The function that starts the request.
5
+ * @returns The function's return value.
6
+ */
7
+ export declare function runAsLibraryRequest<T>(fn: () => T): T;
8
+ /**
9
+ * Checks whether a library request scope is open.
10
+ * @returns True while the library is starting a request.
11
+ */
12
+ export declare function isLibraryRequest(): boolean;
13
+ /**
14
+ * Runs a custom transport call and counts it until it settles. The count includes the time after
15
+ * each await, which the library request scope does not cover.
16
+ * @param fn The function that calls the custom transport.
17
+ * @returns A promise that settles with the call's result.
18
+ */
19
+ export declare function trackTransportCall<T>(fn: () => T | PromiseLike<T>): Promise<T>;
20
+ /**
21
+ * Checks whether a custom transport call is still waiting for an answer.
22
+ * @returns True while a call hasn't settled.
23
+ */
24
+ export declare function isTransportPending(): boolean;
@@ -0,0 +1,24 @@
1
+ import type { Diagnostics } from "../core/diagnostics.cjs";
2
+ /**
3
+ * Runs an async function under an origin-wide Web Locks API lock. Runs the task directly when
4
+ * the Web Locks API isn't available.
5
+ * @param name Origin-scoped lock identifier.
6
+ * @param diagnostics Diagnostics reporter.
7
+ * @param fn The async task to run while holding the lock.
8
+ * @param options Lock acquisition options.
9
+ * @param options.skipIfBusy When true, the task doesn't run if another context holds the lock.
10
+ * @returns A promise of the task's result. Resolves to undefined when another context holds
11
+ * the lock. A caller that reads undefined as a task result stops rescheduling.
12
+ */
13
+ export declare function withDrainLock<T>(name: string, diagnostics: Diagnostics, fn: () => Promise<T>, { skipIfBusy }?: {
14
+ skipIfBusy?: boolean;
15
+ }): Promise<T | undefined>;
16
+ /**
17
+ * Returns the lock name for one application namespace, so two namespaces on one origin don't
18
+ * wait for each other. Otherwise one application's retry pass would be skipped while the
19
+ * other holds the lock.
20
+ * @param name Base lock name.
21
+ * @param namespace Application storage namespace. An empty value keeps the base name.
22
+ * @returns The lock name for this namespace.
23
+ */
24
+ export declare function lockName(name: string, namespace: string): string;
@@ -1,4 +1,4 @@
1
- import type { Diagnostics } from "../core/diagnostics";
1
+ import type { Diagnostics } from "../core/diagnostics.js";
2
2
  /**
3
3
  * Runs an async function under an origin-wide Web Locks API lock. Runs the task directly when
4
4
  * the Web Locks API isn't available.
@@ -0,0 +1,48 @@
1
+ /** The InterApplicationBus operations that the bus link uses. */
2
+ export interface FinIab {
3
+ /**
4
+ * Publishes a message to all topic subscribers.
5
+ * @param topic Topic name.
6
+ * @param message Message payload.
7
+ */
8
+ publish(topic: string, message: unknown): Promise<void>;
9
+ /**
10
+ * Subscribes a listener to a topic for matching application identities.
11
+ * @param identity Target application identity.
12
+ * @param topic Topic name.
13
+ * @param listener Message callback.
14
+ */
15
+ subscribe(identity: {
16
+ uuid: string;
17
+ }, topic: string, listener: (message: unknown, uuid?: string, name?: string) => void): Promise<void>;
18
+ }
19
+ /** The fin.me members that the library reads. */
20
+ export interface FinMe {
21
+ /** True in an OpenFin view. */
22
+ isView?: boolean;
23
+ /** Identity of the window or view. */
24
+ identity?: {
25
+ uuid?: string;
26
+ name?: string;
27
+ };
28
+ /** Resolves the window's creation options, including customData. */
29
+ getOptions?: () => Promise<{
30
+ customData?: Record<string, unknown>;
31
+ }>;
32
+ /** Adds a window event listener. */
33
+ on?: (event: string, listener: () => void) => void;
34
+ /** Removes a window event listener. */
35
+ removeListener?: (event: string, listener: () => void) => void;
36
+ }
37
+ /** The members of the OpenFin global that the library reads. */
38
+ export interface FinLike {
39
+ /** This document's window or view. */
40
+ me?: FinMe;
41
+ /** The OpenFin runtime's message bus. */
42
+ InterApplicationBus?: FinIab;
43
+ }
44
+ /**
45
+ * Returns the OpenFin global.
46
+ * @returns The fin global, or undefined outside OpenFin.
47
+ */
48
+ export declare function getFin(): FinLike | undefined;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Replaces `target[key]` with a wrapper around the current value.
3
+ * @param target The object that holds the function, for example `console` or `globalThis`.
4
+ * @param key The property to replace.
5
+ * @param wrap Builds the wrapper from the original value.
6
+ * @returns A restore function. It writes the original back and returns true only if the
7
+ * property still holds the wrapper. Otherwise it changes nothing and returns false.
8
+ */
9
+ export declare function patch<T extends object, K extends keyof T>(target: T, key: K, wrap: (original: T[K]) => T[K]): () => boolean;
@@ -0,0 +1,62 @@
1
+ import type { Diagnostics } from "../core/diagnostics.cjs";
2
+ /** Host runtime environment classification attached to resource attributes. */
3
+ export type PlatformType = "openfin" | "openfin_web" | "browser" | "mobile_webview" | "ionic" | "web_worker" | "shared_worker" | "service_worker" | "node";
4
+ /** Host environment and runtime container metadata resolved at startup. */
5
+ export interface PlatformMetadata {
6
+ /** Detected platform runtime classification. */
7
+ platform: PlatformType;
8
+ /** OpenFin application UUID if running inside an OpenFin container. */
9
+ openfinUuid?: string;
10
+ /** OpenFin window or view identifier. */
11
+ openfinName?: string;
12
+ /** Raw navigator user agent string or empty string if unavailable. */
13
+ userAgent: string;
14
+ /** True if the code runs in a worker realm. */
15
+ isWorker: boolean;
16
+ /** True if this context is the top-level document rather than an iframe. */
17
+ isTopLevelDocument: boolean;
18
+ }
19
+ /**
20
+ * Detects and caches host platform metadata for the active realm.
21
+ * @param diagnostics Diagnostics reporter.
22
+ * @returns Detected PlatformMetadata.
23
+ */
24
+ export declare function detectPlatform(diagnostics: Diagnostics): PlatformMetadata;
25
+ /**
26
+ * Checks whether the current window is the top-level browsing context.
27
+ * @param diagnostics Diagnostics reporter. Counts a blocked read of window.top.
28
+ * @returns True if top-level, false if framed or inaccessible due to cross-origin boundaries.
29
+ */
30
+ export declare function isTopLevel(diagnostics: Diagnostics): boolean;
31
+ /**
32
+ * Reads the current document URL without caching.
33
+ * @param diagnostics Diagnostics reporter. Counts a blocked read of location.href.
34
+ * @returns The current location.href, or an empty string.
35
+ */
36
+ export declare function currentUrl(diagnostics: Diagnostics): string;
37
+ /**
38
+ * Returns the form of a URL that the library records. A transform's result is recorded as is,
39
+ * or "" if it throws or returns no string. Without a transform, the user info is always
40
+ * removed, because it is a credential, and without fullUrls the query and the fragment go too.
41
+ * @param url Absolute or relative URL.
42
+ * @param fullUrls Value of `capture.fullUrls`.
43
+ * @param transform Value of `capture.urlTransform`. Replaces the default rule.
44
+ * @param diagnostics Diagnostics reporter for a transform that throws.
45
+ * @returns The URL to record.
46
+ */
47
+ export declare function recordedUrl(url: string, fullUrls: boolean, transform?: ((url: string) => string | null) | null, diagnostics?: Diagnostics): string;
48
+ /**
49
+ * Drops the query string and fragment from a URL. Cuts the string instead of parsing it,
50
+ * because a relative request target has no base URL.
51
+ * @param url Absolute or relative URL.
52
+ * @returns The URL up to the first "?" or "#".
53
+ */
54
+ export declare function stripUrlQuery(url: string): string;
55
+ /**
56
+ * Checks whether the browser can reach the network. A host without navigator.onLine counts as
57
+ * online.
58
+ * @returns False only when navigator.onLine is false.
59
+ */
60
+ export declare function isOnline(): boolean;
61
+ /** Resets the cached platform metadata for testing. */
62
+ export declare function resetPlatformCache(): void;
@@ -1,4 +1,4 @@
1
- import type { Diagnostics } from "../core/diagnostics";
1
+ import type { Diagnostics } from "../core/diagnostics.js";
2
2
  /** Host runtime environment classification attached to resource attributes. */
3
3
  export type PlatformType = "openfin" | "openfin_web" | "browser" | "mobile_webview" | "ionic" | "web_worker" | "shared_worker" | "service_worker" | "node";
4
4
  /** Host environment and runtime container metadata resolved at startup. */
@@ -44,7 +44,7 @@ export declare function currentUrl(diagnostics: Diagnostics): string;
44
44
  * @param diagnostics Diagnostics reporter for a transform that throws.
45
45
  * @returns The URL to record.
46
46
  */
47
- export declare function recordedUrl(url: string, fullUrls: boolean, transform?: (url: string) => string | null, diagnostics?: Diagnostics): string;
47
+ export declare function recordedUrl(url: string, fullUrls: boolean, transform?: ((url: string) => string | null) | null, diagnostics?: Diagnostics): string;
48
48
  /**
49
49
  * Drops the query string and fragment from a URL. Cuts the string instead of parsing it,
50
50
  * because a relative request target has no base URL.
@@ -0,0 +1,52 @@
1
+ import type { Diagnostics } from "../core/diagnostics.cjs";
2
+ /** Structural depth and size limits enforced during object sanitization. */
3
+ export interface SanitizeLimits {
4
+ /** Maximum recursion depth before truncating nested objects. */
5
+ maxDepth: number;
6
+ /** Maximum items retained in arrays, sets, and maps before truncating. */
7
+ maxArrayLength: number;
8
+ /** Maximum string attribute length in characters. */
9
+ maxAttributeChars: number;
10
+ /** Maximum key-value properties retained in a single object. */
11
+ maxAttributeCount: number;
12
+ /** Maximum error stack trace length in characters. */
13
+ maxStackChars: number;
14
+ /** Maximum values visited in one pass, across the whole tree. */
15
+ maxNodes: number;
16
+ }
17
+ /**
18
+ * Truncates a string to a maximum character length while preserving UTF-16 surrogate pairs.
19
+ * @param value Target string.
20
+ * @param max Maximum allowed character length.
21
+ * @returns The truncated string, with a suffix that gives the dropped character count.
22
+ */
23
+ export declare function truncate(value: string, max: number): string;
24
+ /** Sanitized JSON-safe output with estimated serialized byte size. */
25
+ export interface SanitizeResult {
26
+ /** JSON-safe sanitized structure. */
27
+ value: unknown;
28
+ /** Approximate serialized byte count. */
29
+ bytes: number;
30
+ }
31
+ /**
32
+ * Sanitizes arbitrary values into JSON-safe structures without throwing.
33
+ * @param value Raw value to sanitize.
34
+ * @param limits Configuration limits for depth, count, and character lengths.
35
+ * @param diagnostics Diagnostics reporter. Counts a value that throws during the walk.
36
+ * @returns JSON-safe sanitized value.
37
+ */
38
+ export declare function sanitize(value: unknown, limits: SanitizeLimits, diagnostics: Diagnostics): unknown;
39
+ /**
40
+ * Sanitizes arbitrary values and calculates approximate serialized byte sizes.
41
+ * @param value Raw value to sanitize.
42
+ * @param limits Configuration limits.
43
+ * @param diagnostics Diagnostics reporter. Counts a value that throws during the walk.
44
+ * @returns SanitizeResult containing sanitized value and byte count.
45
+ */
46
+ export declare function sanitizeWithSize(value: unknown, limits: SanitizeLimits, diagnostics: Diagnostics): SanitizeResult;
47
+ /**
48
+ * Estimates UTF-8 encoded byte length for a string.
49
+ * @param value Target string.
50
+ * @returns Estimated UTF-8 byte length.
51
+ */
52
+ export declare function estimateBytes(value: string): number;
@@ -1,4 +1,4 @@
1
- import type { Diagnostics } from "../core/diagnostics";
1
+ import type { Diagnostics } from "../core/diagnostics.js";
2
2
  /** Structural depth and size limits enforced during object sanitization. */
3
3
  export interface SanitizeLimits {
4
4
  /** Maximum recursion depth before truncating nested objects. */
@@ -0,0 +1,10 @@
1
+ /** Monotonic sequence counter establishing total record ordering within an execution context. */
2
+ export declare class Sequence {
3
+ /** Last emitted sequence counter value. */
4
+ private value;
5
+ /**
6
+ * Increments and returns the next monotonic sequence number starting at 1.
7
+ * @returns Next sequence number.
8
+ */
9
+ next(): number;
10
+ }