@utk09/ui-observability 1.0.0 → 1.2.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 +111 -219
- package/README.md +24 -26
- package/dist/{batch-CXmPmTse.js → batch-120Kc9jr.js} +3 -3
- package/dist/{batch-CXmPmTse.js.map → batch-120Kc9jr.js.map} +1 -1
- package/dist/{batch-mmPigCpi.cjs → batch-C3uNp5kU.cjs} +2 -2
- package/dist/{batch-mmPigCpi.cjs.map → batch-C3uNp5kU.cjs.map} +1 -1
- package/dist/bus/bus.d.cts +31 -2
- package/dist/bus/bus.d.ts +31 -2
- package/dist/bus-Dj8IEVcC.cjs +2 -0
- package/dist/bus-Dj8IEVcC.cjs.map +1 -0
- package/dist/{bus-C39wspFV.js → bus-DyNafxZN.js} +127 -104
- package/dist/bus-DyNafxZN.js.map +1 -0
- package/dist/capture/errors.d.cts +10 -0
- package/dist/capture/errors.d.ts +10 -0
- package/dist/capture/interactions.d.cts +35 -3
- package/dist/capture/interactions.d.ts +35 -3
- package/dist/capture/observed-windows.d.cts +51 -0
- package/dist/capture/observed-windows.d.ts +51 -0
- package/dist/capture/replay.d.cts +1 -1
- package/dist/capture/replay.d.ts +1 -1
- package/dist/capture/types.d.cts +5 -0
- package/dist/capture/types.d.ts +5 -0
- package/dist/capture/web-vitals.d.cts +1 -0
- package/dist/capture/web-vitals.d.ts +1 -0
- package/dist/{compression-tVtXwVjX.js → compression-BWkDWY3v.js} +2 -2
- package/dist/{compression-tVtXwVjX.js.map → compression-BWkDWY3v.js.map} +1 -1
- package/dist/{compression-CvED_Jel.cjs → compression-CEVe7NPX.cjs} +2 -2
- package/dist/{compression-CvED_Jel.cjs.map → compression-CEVe7NPX.cjs.map} +1 -1
- package/dist/config-C0PtemvC.cjs +2 -0
- package/dist/config-C0PtemvC.cjs.map +1 -0
- package/dist/config-DK1Zf7jn.js +556 -0
- package/dist/config-DK1Zf7jn.js.map +1 -0
- package/dist/{console-BGgGnjSi.js → console-CAyCQOpm.js} +5 -5
- package/dist/{console-BGgGnjSi.js.map → console-CAyCQOpm.js.map} +1 -1
- package/dist/{console-CSZ5_Vx5.cjs → console-Dk6GH4yj.cjs} +2 -2
- package/dist/{console-CSZ5_Vx5.cjs.map → console-Dk6GH4yj.cjs.map} +1 -1
- package/dist/{constants-CUyd9cTZ.js → constants-CEHN6KuY.js} +46 -25
- package/dist/constants-CEHN6KuY.js.map +1 -0
- package/dist/constants-NtiQDWL_.cjs +2 -0
- package/dist/constants-NtiQDWL_.cjs.map +1 -0
- package/dist/constants.d.cts +23 -0
- package/dist/constants.d.ts +23 -0
- package/dist/core/config.d.cts +9 -3
- package/dist/core/config.d.ts +9 -3
- package/dist/core/diagnostics.d.cts +1 -1
- package/dist/core/diagnostics.d.ts +1 -1
- package/dist/core/pipeline.d.cts +11 -0
- package/dist/core/pipeline.d.ts +11 -0
- package/dist/core/record.d.cts +2 -2
- package/dist/core/record.d.ts +2 -2
- package/dist/core/rotation.d.cts +26 -2
- package/dist/core/rotation.d.ts +26 -2
- package/dist/core/runtime.d.cts +9 -0
- package/dist/core/runtime.d.ts +9 -0
- package/dist/core/sender.d.cts +3 -2
- package/dist/core/sender.d.ts +3 -2
- package/dist/{debug-bundle-BXIlwDKM.cjs → debug-bundle-DMzUfiQc.cjs} +2 -2
- package/dist/{debug-bundle-BXIlwDKM.cjs.map → debug-bundle-DMzUfiQc.cjs.map} +1 -1
- package/dist/{debug-bundle-CRpYV_ui.js → debug-bundle-w78W46zr.js} +4 -4
- package/dist/{debug-bundle-CRpYV_ui.js.map → debug-bundle-w78W46zr.js.map} +1 -1
- package/dist/doctor.cjs +1 -1
- package/dist/doctor.js +36 -36
- package/dist/doctor.js.map +1 -1
- package/dist/errors-07pmZ7VY.cjs +3 -0
- package/dist/errors-07pmZ7VY.cjs.map +1 -0
- package/dist/{errors-BE_EZV7Q.js → errors-C-LYbqyB.js} +27 -24
- package/dist/errors-C-LYbqyB.js.map +1 -0
- package/dist/{factory-CTi0Is3F.js → factory-BHYrcSaU.js} +39 -28
- package/dist/factory-BHYrcSaU.js.map +1 -0
- package/dist/factory-DsaNdcXp.cjs +2 -0
- package/dist/factory-DsaNdcXp.cjs.map +1 -0
- package/dist/{identity-DdhKgrpk.js → identity-Byh3gCdT.js} +35 -24
- package/dist/identity-Byh3gCdT.js.map +1 -0
- package/dist/identity-BzAzdQyv.cjs +2 -0
- package/dist/identity-BzAzdQyv.cjs.map +1 -0
- package/dist/index.cjs +1 -1
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.js +453 -417
- package/dist/index.js.map +1 -1
- package/dist/{indexeddb-storage-GHdl0t8A.js → indexeddb-storage-BYywz-v6.js} +17 -17
- package/dist/{indexeddb-storage-GHdl0t8A.js.map → indexeddb-storage-BYywz-v6.js.map} +1 -1
- package/dist/{indexeddb-storage-CL9uqBCy.cjs → indexeddb-storage-BfqGkLFe.cjs} +2 -2
- package/dist/{indexeddb-storage-CL9uqBCy.cjs.map → indexeddb-storage-BfqGkLFe.cjs.map} +1 -1
- package/dist/interactions-BXzEel4F.cjs +2 -0
- package/dist/interactions-BXzEel4F.cjs.map +1 -0
- package/dist/interactions-DdKPMWIN.js +207 -0
- package/dist/interactions-DdKPMWIN.js.map +1 -0
- package/dist/{journey-B4Adltjm.cjs → journey-BUmsrgaw.cjs} +2 -2
- package/dist/{journey-B4Adltjm.cjs.map → journey-BUmsrgaw.cjs.map} +1 -1
- package/dist/{journey-D2_sia57.js → journey-Nu655gEO.js} +14 -14
- package/dist/{journey-D2_sia57.js.map → journey-Nu655gEO.js.map} +1 -1
- package/dist/{library-console-CPW6bvZH.cjs → library-console-DdIlzzph.cjs} +2 -2
- package/dist/{library-console-CPW6bvZH.cjs.map → library-console-DdIlzzph.cjs.map} +1 -1
- package/dist/{library-console-Btrzt814.js → library-console-amePMnP8.js} +2 -2
- package/dist/{library-console-Btrzt814.js.map → library-console-amePMnP8.js.map} +1 -1
- package/dist/{library-request-BJ9PLRaD.js → library-request-Cv7C05jf.js} +2 -2
- package/dist/{library-request-BJ9PLRaD.js.map → library-request-Cv7C05jf.js.map} +1 -1
- package/dist/{library-request-D7OvTxZV.cjs → library-request-DO3Ec7KE.cjs} +2 -2
- package/dist/{library-request-D7OvTxZV.cjs.map → library-request-DO3Ec7KE.cjs.map} +1 -1
- package/dist/{lifecycle-IaAm1mOC.cjs → lifecycle-B5yfH5is.cjs} +2 -2
- package/dist/{lifecycle-IaAm1mOC.cjs.map → lifecycle-B5yfH5is.cjs.map} +1 -1
- package/dist/{lifecycle-22CUCrc9.js → lifecycle-CMHz2Zbs.js} +2 -2
- package/dist/{lifecycle-22CUCrc9.js.map → lifecycle-CMHz2Zbs.js.map} +1 -1
- package/dist/{log-record-BNiLfqtL.js → log-record-B_nSqxoe.js} +2 -2
- package/dist/{log-record-BNiLfqtL.js.map → log-record-B_nSqxoe.js.map} +1 -1
- package/dist/{log-record-CkivuiEl.cjs → log-record-Bdywwg0k.cjs} +2 -2
- package/dist/{log-record-CkivuiEl.cjs.map → log-record-Bdywwg0k.cjs.map} +1 -1
- package/dist/{long-frames-DNFaRnC3.js → long-frames-6NGl1-uN.js} +3 -3
- package/dist/{long-frames-DNFaRnC3.js.map → long-frames-6NGl1-uN.js.map} +1 -1
- package/dist/{long-frames-BUUbXd-B.cjs → long-frames-D9DfSWqv.cjs} +2 -2
- package/dist/{long-frames-BUUbXd-B.cjs.map → long-frames-D9DfSWqv.cjs.map} +1 -1
- package/dist/models/bus.d.cts +6 -1
- package/dist/models/bus.d.ts +6 -1
- package/dist/models/config.d.cts +27 -11
- package/dist/models/config.d.ts +27 -11
- package/dist/models/serializer.d.cts +3 -1
- package/dist/models/serializer.d.ts +3 -1
- package/dist/{network-CGMLQ-mA.cjs → network-BNHBI0Fc.cjs} +2 -2
- package/dist/{network-CGMLQ-mA.cjs.map → network-BNHBI0Fc.cjs.map} +1 -1
- package/dist/{network-on2zZT6H.js → network-Cc3tSB7e.js} +5 -5
- package/dist/{network-on2zZT6H.js.map → network-Cc3tSB7e.js.map} +1 -1
- package/dist/observed-windows-8JtCsIr1.js +64 -0
- package/dist/observed-windows-8JtCsIr1.js.map +1 -0
- package/dist/observed-windows-BlE25nrn.cjs +2 -0
- package/dist/observed-windows-BlE25nrn.cjs.map +1 -0
- package/dist/openfin-Bxelt0yg.js.map +1 -1
- package/dist/openfin-DtH2f7zX.cjs.map +1 -1
- package/dist/{otlp-DimfrRor.js → otlp-Btix3EBa.js} +7 -7
- package/dist/{otlp-DimfrRor.js.map → otlp-Btix3EBa.js.map} +1 -1
- package/dist/{otlp-BENHf3g9.cjs → otlp-CFSW-Dno.cjs} +2 -2
- package/dist/{otlp-BENHf3g9.cjs.map → otlp-CFSW-Dno.cjs.map} +1 -1
- package/dist/patch-DlcKzIi-.cjs +2 -0
- package/dist/patch-DlcKzIi-.cjs.map +1 -0
- package/dist/patch-Sr1wKg7W.js +9 -0
- package/dist/patch-Sr1wKg7W.js.map +1 -0
- package/dist/platform-BZjp9wp1.cjs +2 -0
- package/dist/platform-BZjp9wp1.cjs.map +1 -0
- package/dist/platform-Dba6R3Hp.js +75 -0
- package/dist/platform-Dba6R3Hp.js.map +1 -0
- package/dist/{profiler-BAZoh7A4.js → profiler-DNKcqu09.js} +60 -60
- package/dist/{profiler-BAZoh7A4.js.map → profiler-DNKcqu09.js.map} +1 -1
- package/dist/{profiler-D4tJpDRc.cjs → profiler-DpoPi1hH.cjs} +2 -2
- package/dist/{profiler-D4tJpDRc.cjs.map → profiler-DpoPi1hH.cjs.map} +1 -1
- package/dist/{profiler-frames-C4xr7KfH.cjs → profiler-frames-C9zJNd8_.cjs} +2 -2
- package/dist/{profiler-frames-C4xr7KfH.cjs.map → profiler-frames-C9zJNd8_.cjs.map} +1 -1
- package/dist/{profiler-frames-cJMx9wNM.js → profiler-frames-CGXZeZ_3.js} +16 -16
- package/dist/{profiler-frames-cJMx9wNM.js.map → profiler-frames-CGXZeZ_3.js.map} +1 -1
- package/dist/{remote-rules-Dz9MRAsB.js → remote-rules-DNK96vLa.js} +25 -25
- package/dist/{remote-rules-Dz9MRAsB.js.map → remote-rules-DNK96vLa.js.map} +1 -1
- package/dist/{remote-rules-_tY0zj5o.cjs → remote-rules-DuMFRlit.cjs} +2 -2
- package/dist/{remote-rules-_tY0zj5o.cjs.map → remote-rules-DuMFRlit.cjs.map} +1 -1
- package/dist/replay-Cab-lSit.cjs +2 -0
- package/dist/replay-Cab-lSit.cjs.map +1 -0
- package/dist/{replay-Ds-ANH34.js → replay-Dy6OiaOZ.js} +104 -77
- package/dist/replay-Dy6OiaOZ.js.map +1 -0
- package/dist/{reports-BDSe4dFH.cjs → reports-CGK9YQch.cjs} +2 -2
- package/dist/{reports-BDSe4dFH.cjs.map → reports-CGK9YQch.cjs.map} +1 -1
- package/dist/{reports-C-thq-bk.js → reports-CX57-S9s.js} +3 -3
- package/dist/{reports-C-thq-bk.js.map → reports-CX57-S9s.js.map} +1 -1
- package/dist/{resource-timing-eUl2dNgC.js → resource-timing-CWVDCbrY.js} +4 -4
- package/dist/{resource-timing-eUl2dNgC.js.map → resource-timing-CWVDCbrY.js.map} +1 -1
- package/dist/{resource-timing-C576gFIQ.cjs → resource-timing-DalulXiR.cjs} +2 -2
- package/dist/{resource-timing-C576gFIQ.cjs.map → resource-timing-DalulXiR.cjs.map} +1 -1
- package/dist/response-body-Cpz5__4g.cjs +3 -0
- package/dist/response-body-Cpz5__4g.cjs.map +1 -0
- package/dist/{response-body-eoSQpLiH.js → response-body-yi92Rpvo.js} +109 -109
- package/dist/response-body-yi92Rpvo.js.map +1 -0
- package/dist/{rotation-Cwct4ckk.js → rotation-ChBbNDE2.js} +27 -28
- package/dist/rotation-ChBbNDE2.js.map +1 -0
- package/dist/rotation-fTnNJcfH.cjs +2 -0
- package/dist/rotation-fTnNJcfH.cjs.map +1 -0
- package/dist/{sampling-BlrI8jor.js → sampling-DZTOD28D.js} +16 -16
- package/dist/{sampling-BlrI8jor.js.map → sampling-DZTOD28D.js.map} +1 -1
- package/dist/{sampling-mXt4dstx.cjs → sampling-wAVJIZXp.cjs} +2 -2
- package/dist/{sampling-mXt4dstx.cjs.map → sampling-wAVJIZXp.cjs.map} +1 -1
- package/dist/{sanitize-Ba0KqU06.js → sanitize-B2GKlSFp.js} +2 -2
- package/dist/{sanitize-Ba0KqU06.js.map → sanitize-B2GKlSFp.js.map} +1 -1
- package/dist/{sanitize-DQyiI_KY.cjs → sanitize-BZdhoghq.cjs} +2 -2
- package/dist/{sanitize-DQyiI_KY.cjs.map → sanitize-BZdhoghq.cjs.map} +1 -1
- package/dist/{sender-Dv8rAmpV.js → sender-BRSpc7R8.js} +192 -178
- package/dist/sender-BRSpc7R8.js.map +1 -0
- package/dist/sender-CFu98DAB.cjs +2 -0
- package/dist/sender-CFu98DAB.cjs.map +1 -0
- package/dist/storage/emergency-queue.d.cts +3 -1
- package/dist/storage/emergency-queue.d.ts +3 -1
- package/dist/storage/stored-context.d.cts +3 -2
- package/dist/storage/stored-context.d.ts +3 -2
- package/dist/stored-context-CPLlzgpm.cjs +2 -0
- package/dist/stored-context-CPLlzgpm.cjs.map +1 -0
- package/dist/{stored-context-B2EzVuYm.js → stored-context-df1dEnht.js} +12 -10
- package/dist/stored-context-df1dEnht.js.map +1 -0
- package/dist/{storm-DjKetLKZ.js → storm-U3_ek1nA.js} +2 -2
- package/dist/{storm-DjKetLKZ.js.map → storm-U3_ek1nA.js.map} +1 -1
- package/dist/{storm-C-zYSdDX.cjs → storm-qiE_AMC7.cjs} +2 -2
- package/dist/{storm-C-zYSdDX.cjs.map → storm-qiE_AMC7.cjs.map} +1 -1
- package/dist/transport/exit-flush.d.cts +23 -0
- package/dist/transport/exit-flush.d.ts +23 -0
- package/dist/transport/http-transport.d.cts +3 -2
- package/dist/transport/http-transport.d.ts +3 -2
- package/dist/transport/retry-engine.d.cts +11 -3
- package/dist/transport/retry-engine.d.ts +11 -3
- package/dist/types-BAerHgCq.js.map +1 -1
- package/dist/types-C7WNpnG1.cjs.map +1 -1
- package/dist/{unclean-exit-DQD1cT7c.js → unclean-exit-Bj6gYHeL.js} +2 -2
- package/dist/{unclean-exit-DQD1cT7c.js.map → unclean-exit-Bj6gYHeL.js.map} +1 -1
- package/dist/{unclean-exit-py99ApzT.cjs → unclean-exit-CuBh-ee5.cjs} +2 -2
- package/dist/{unclean-exit-py99ApzT.cjs.map → unclean-exit-CuBh-ee5.cjs.map} +1 -1
- package/dist/{user-timing-D6XTmpuM.cjs → user-timing-BWqzYF2Q.cjs} +2 -2
- package/dist/{user-timing-D6XTmpuM.cjs.map → user-timing-BWqzYF2Q.cjs.map} +1 -1
- package/dist/{user-timing-BePqb1uN.js → user-timing-Duz0d-OA.js} +2 -2
- package/dist/{user-timing-BePqb1uN.js.map → user-timing-Duz0d-OA.js.map} +1 -1
- package/dist/utils/identity.d.cts +5 -0
- package/dist/utils/identity.d.ts +5 -0
- package/dist/utils/lock.d.cts +3 -2
- package/dist/utils/lock.d.ts +3 -2
- package/dist/utils/openfin.d.cts +18 -6
- package/dist/utils/openfin.d.ts +18 -6
- package/dist/utils/patch.d.cts +1 -1
- package/dist/utils/patch.d.ts +1 -1
- package/dist/utils/platform.d.cts +6 -0
- package/dist/utils/platform.d.ts +6 -0
- package/dist/{web-socket-DSHgDiZ6.js → web-socket-CE_9Q22z.js} +5 -5
- package/dist/{web-socket-DSHgDiZ6.js.map → web-socket-CE_9Q22z.js.map} +1 -1
- package/dist/{web-socket-CoIUBM3C.cjs → web-socket-sm3rD-A_.cjs} +2 -2
- package/dist/{web-socket-CoIUBM3C.cjs.map → web-socket-sm3rD-A_.cjs.map} +1 -1
- package/dist/{web-vitals-4pWACwaR.js → web-vitals-CGwXGF-M.js} +4 -4
- package/dist/web-vitals-CGwXGF-M.js.map +1 -0
- package/dist/web-vitals-Df4Wsfx9.cjs +2 -0
- package/dist/web-vitals-Df4Wsfx9.cjs.map +1 -0
- package/dist/{worker-protocol-QbvqNazn.cjs → worker-protocol-D5VnCdWY.cjs} +2 -2
- package/dist/{worker-protocol-QbvqNazn.cjs.map → worker-protocol-D5VnCdWY.cjs.map} +1 -1
- package/dist/{worker-protocol-x074Rpet.js → worker-protocol-h4-tRWqy.js} +6 -6
- package/dist/{worker-protocol-x074Rpet.js.map → worker-protocol-h4-tRWqy.js.map} +1 -1
- package/dist/{worker-server-CFe4nvos.cjs → worker-server-CF1yatXq.cjs} +2 -2
- package/dist/{worker-server-CFe4nvos.cjs.map → worker-server-CF1yatXq.cjs.map} +1 -1
- package/dist/worker-server-FYfKHQhJ.js +94 -0
- package/dist/{worker-server-iUVSjH8L.js.map → worker-server-FYfKHQhJ.js.map} +1 -1
- package/dist/worker-transport-COgY4RX8.cjs +2 -0
- package/dist/worker-transport-COgY4RX8.cjs.map +1 -0
- package/dist/{worker-transport-Dy1KMA7t.js → worker-transport-jzX1IusG.js} +49 -45
- package/dist/worker-transport-jzX1IusG.js.map +1 -0
- package/llms.txt +14 -12
- package/package.json +13 -5
- package/dist/bus-C39wspFV.js.map +0 -1
- package/dist/bus-_EaOVPGq.cjs +0 -2
- package/dist/bus-_EaOVPGq.cjs.map +0 -1
- package/dist/config-DUs7uHHt.cjs +0 -2
- package/dist/config-DUs7uHHt.cjs.map +0 -1
- package/dist/config-SgQcCP1_.js +0 -560
- package/dist/config-SgQcCP1_.js.map +0 -1
- package/dist/constants-CUyd9cTZ.js.map +0 -1
- package/dist/constants-CqdJhTxH.cjs +0 -2
- package/dist/constants-CqdJhTxH.cjs.map +0 -1
- package/dist/errors-BE_EZV7Q.js.map +0 -1
- package/dist/errors-CNPbesMs.cjs +0 -3
- package/dist/errors-CNPbesMs.cjs.map +0 -1
- package/dist/factory-CTi0Is3F.js.map +0 -1
- package/dist/factory-hRrH32v5.cjs +0 -2
- package/dist/factory-hRrH32v5.cjs.map +0 -1
- package/dist/identity-DdhKgrpk.js.map +0 -1
- package/dist/identity-DlWRIuwy.cjs +0 -2
- package/dist/identity-DlWRIuwy.cjs.map +0 -1
- package/dist/interactions-CUkzK8sR.cjs +0 -2
- package/dist/interactions-CUkzK8sR.cjs.map +0 -1
- package/dist/interactions-DiFvCosX.js +0 -111
- package/dist/interactions-DiFvCosX.js.map +0 -1
- package/dist/patch-BX8KrPCT.cjs +0 -2
- package/dist/patch-BX8KrPCT.cjs.map +0 -1
- package/dist/patch-UdPz1ea8.js +0 -8
- package/dist/patch-UdPz1ea8.js.map +0 -1
- package/dist/platform-BaaFIPCU.js +0 -62
- package/dist/platform-BaaFIPCU.js.map +0 -1
- package/dist/platform-CfA3-7sJ.cjs +0 -2
- package/dist/platform-CfA3-7sJ.cjs.map +0 -1
- package/dist/replay-B3gFXIZd.cjs +0 -2
- package/dist/replay-B3gFXIZd.cjs.map +0 -1
- package/dist/replay-Ds-ANH34.js.map +0 -1
- package/dist/response-body-YdNl-HkR.cjs +0 -3
- package/dist/response-body-YdNl-HkR.cjs.map +0 -1
- package/dist/response-body-eoSQpLiH.js.map +0 -1
- package/dist/rotation-Cwct4ckk.js.map +0 -1
- package/dist/rotation-D4qUAHAu.cjs +0 -2
- package/dist/rotation-D4qUAHAu.cjs.map +0 -1
- package/dist/sender-BdRuNVhF.cjs +0 -2
- package/dist/sender-BdRuNVhF.cjs.map +0 -1
- package/dist/sender-Dv8rAmpV.js.map +0 -1
- package/dist/stored-context-B2EzVuYm.js.map +0 -1
- package/dist/stored-context-CXt7eHZL.cjs +0 -2
- package/dist/stored-context-CXt7eHZL.cjs.map +0 -1
- package/dist/web-vitals-4pWACwaR.js.map +0 -1
- package/dist/web-vitals-__X7t4pj.cjs +0 -2
- package/dist/web-vitals-__X7t4pj.cjs.map +0 -1
- package/dist/worker-server-iUVSjH8L.js +0 -94
- package/dist/worker-transport-CRAX-09c.cjs +0 -2
- package/dist/worker-transport-CRAX-09c.cjs.map +0 -1
- package/dist/worker-transport-Dy1KMA7t.js.map +0 -1
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { A as e,
|
|
2
|
-
import { r as l } from "./journey-
|
|
3
|
-
import { n as u, t as d } from "./remote-rules-
|
|
4
|
-
import { n as f, t as p } from "./log-record-
|
|
1
|
+
import { A as e, Gn as t, In as n, M as r, N as i, O as a, at as o, k as s, mn as c } from "./constants-CEHN6KuY.js";
|
|
2
|
+
import { r as l } from "./journey-Nu655gEO.js";
|
|
3
|
+
import { n as u, t as d } from "./remote-rules-DNK96vLa.js";
|
|
4
|
+
import { n as f, t as p } from "./log-record-B_nSqxoe.js";
|
|
5
5
|
import { n as m } from "./guards-BlYGRK4l.js";
|
|
6
|
-
import { i as h } from "./identity-
|
|
6
|
+
import { i as h } from "./identity-Byh3gCdT.js";
|
|
7
7
|
import { t as g } from "./openfin-Bxelt0yg.js";
|
|
8
8
|
import { n as _, t as v } from "./fixed-window-Dq3MLUUv.js";
|
|
9
9
|
import { t as y } from "./unref-DgHPQeWv.js";
|
|
@@ -16,21 +16,21 @@ var x = [
|
|
|
16
16
|
];
|
|
17
17
|
function S(e) {
|
|
18
18
|
if (typeof e != "object" || !e) return !1;
|
|
19
|
-
let
|
|
20
|
-
if (typeof
|
|
21
|
-
let
|
|
22
|
-
switch (
|
|
23
|
-
case
|
|
24
|
-
case
|
|
25
|
-
case
|
|
26
|
-
case
|
|
27
|
-
case
|
|
28
|
-
case
|
|
29
|
-
case
|
|
30
|
-
case
|
|
31
|
-
case
|
|
32
|
-
case
|
|
33
|
-
case
|
|
19
|
+
let n = e;
|
|
20
|
+
if (typeof n.from != "string" || !n.from || typeof n.t != "string") return !1;
|
|
21
|
+
let r = (e) => typeof n[e] == "string";
|
|
22
|
+
switch (n.t) {
|
|
23
|
+
case i.hello: return r("tabId");
|
|
24
|
+
case i.tab: return r("tabId") && (n.since === void 0 || Number.isFinite(n.since));
|
|
25
|
+
case i.welcome: return r("to") && r("tabId") && (n.routingContextId === void 0 || r("routingContextId"));
|
|
26
|
+
case i.journeyRequest:
|
|
27
|
+
case i.samplingRequest: return !0;
|
|
28
|
+
case i.securityContext: return r("id") && n.id !== "";
|
|
29
|
+
case i.journey: return (n.to === void 0 || r("to")) && "journey" in n;
|
|
30
|
+
case i.sampling: return r("to") && "rules" in n;
|
|
31
|
+
case i.flushRequest: return r("id") && typeof n.timeoutMs == "number";
|
|
32
|
+
case i.flushResult: return r("id") && "result" in n;
|
|
33
|
+
case i.records: return Array.isArray(n.records) && (n.routingContextId === void 0 || r("routingContextId")) && n.records.every((e) => !f(e) || !p(e.severityText) ? !1 : !Array.isArray(e.attributes) && !Array.isArray(e.resource) && /^\d+$/.test(e.timeUnixNano) && (e.observedTimeUnixNano === void 0 || /^\d+$/.test(e.observedTimeUnixNano)) && typeof e.traceId == "string" && /^(?:[a-f\d]{32})?$/.test(e.traceId) && typeof e.spanId == "string" && /^(?:[a-f\d]{16})?$/.test(e.spanId) && Number.isInteger(e.traceFlags) && e.traceFlags >= 0 && e.traceFlags <= 255 && e.severityNumber === t[e.severityText]);
|
|
34
34
|
default: return !1;
|
|
35
35
|
}
|
|
36
36
|
}
|
|
@@ -55,7 +55,7 @@ function C(e) {
|
|
|
55
55
|
// src/models/bus.ts
|
|
56
56
|
function w(e) {
|
|
57
57
|
return {
|
|
58
|
-
p:
|
|
58
|
+
p: r,
|
|
59
59
|
m: e
|
|
60
60
|
};
|
|
61
61
|
}
|
|
@@ -98,31 +98,31 @@ function N() {
|
|
|
98
98
|
let e = globalThis.origin;
|
|
99
99
|
return typeof e == "string" ? e : D;
|
|
100
100
|
}
|
|
101
|
-
function P(e,
|
|
101
|
+
function P(e, t) {
|
|
102
102
|
if (typeof window > "u" || window.parent === window) return null;
|
|
103
|
-
let
|
|
103
|
+
let n;
|
|
104
104
|
try {
|
|
105
|
-
|
|
105
|
+
n = window.parent[E];
|
|
106
106
|
} catch {
|
|
107
107
|
return null;
|
|
108
108
|
}
|
|
109
|
-
if (typeof
|
|
110
|
-
let i =
|
|
109
|
+
if (typeof n?.busAccept != "function") return null;
|
|
110
|
+
let i = n.protocol, a = n.busCanAccept, o = typeof a == "function", s = i === void 0 && o ? O : i;
|
|
111
111
|
if (s !== "ui-observability/2") {
|
|
112
112
|
let e = typeof s == "string" ? s.slice(0, 48) : "none";
|
|
113
|
-
return
|
|
113
|
+
return t.report("bus.protocol_mismatch", "The same-origin parent runtime uses another bus protocol. This context tries a message link instead of a direct call.", {
|
|
114
114
|
found: e,
|
|
115
|
-
own:
|
|
115
|
+
own: r
|
|
116
116
|
}), null;
|
|
117
117
|
}
|
|
118
118
|
let c = N();
|
|
119
|
-
if (o && !a.call(
|
|
120
|
-
let l =
|
|
119
|
+
if (o && !a.call(n, window, c)) return null;
|
|
120
|
+
let l = n, u = !0;
|
|
121
121
|
return {
|
|
122
122
|
kind: "direct",
|
|
123
|
-
post(
|
|
124
|
-
u &&
|
|
125
|
-
l.busAccept(
|
|
123
|
+
post(n) {
|
|
124
|
+
u && t.guard("bus.send_failed", "The direct call into the parent runtime failed.", () => {
|
|
125
|
+
l.busAccept(n, e, window);
|
|
126
126
|
});
|
|
127
127
|
},
|
|
128
128
|
close() {
|
|
@@ -238,39 +238,47 @@ function R(e, t, n, r) {
|
|
|
238
238
|
let i = g()?.InterApplicationBus;
|
|
239
239
|
if (!i) return null;
|
|
240
240
|
if (!t) return r.report("openfin.unavailable", "OpenFin gives no application uuid. The InterApplicationBus link stays closed."), null;
|
|
241
|
-
let a = `${e}.${t}
|
|
242
|
-
return r.guardAsync("bus.send_failed", "The InterApplicationBus.subscribe call failed.", () => i.subscribe({ uuid: t }, a, (e, t, r) => {
|
|
241
|
+
let a = `${e}.${t}`, o = { uuid: t }, s = (e, t, r) => {
|
|
243
242
|
let i = T(e);
|
|
244
243
|
i && n(i, {
|
|
245
244
|
link: "openfin",
|
|
246
245
|
origin: "openfin",
|
|
247
246
|
peer: t && r ? `${t}:${r}` : void 0
|
|
248
247
|
});
|
|
249
|
-
}
|
|
248
|
+
};
|
|
249
|
+
return r.guardAsync("bus.send_failed", "The InterApplicationBus.subscribe call failed.", () => i.subscribe(o, a, s)), {
|
|
250
250
|
kind: "openfin",
|
|
251
251
|
post(e) {
|
|
252
|
-
r.guardAsync("bus.send_failed", "The InterApplicationBus.
|
|
252
|
+
r.guardAsync("bus.send_failed", "The InterApplicationBus.send call failed.", () => i.send(o, a, w(e)));
|
|
253
253
|
},
|
|
254
|
-
close() {
|
|
254
|
+
close() {
|
|
255
|
+
r.guardAsync("bus.send_failed", "The InterApplicationBus.unsubscribe call failed.", async () => {
|
|
256
|
+
await i.unsubscribe?.(o, a, s);
|
|
257
|
+
});
|
|
258
|
+
}
|
|
255
259
|
};
|
|
256
260
|
}
|
|
257
261
|
function z(e, t) {
|
|
258
262
|
let n = globalThis, r = n.postMessage;
|
|
259
|
-
|
|
263
|
+
if (n.WorkerGlobalScope === void 0 || !r) return null;
|
|
264
|
+
let i = (t) => {
|
|
260
265
|
let n = T(t.data);
|
|
261
266
|
n && e(n, {
|
|
262
267
|
link: "owner",
|
|
263
268
|
origin: "same-origin"
|
|
264
269
|
});
|
|
265
|
-
}
|
|
270
|
+
};
|
|
271
|
+
return n.addEventListener?.("message", i), {
|
|
266
272
|
kind: "owner",
|
|
267
273
|
post(e) {
|
|
268
274
|
t.guard("bus.send_failed", "The postMessage call of the worker failed.", () => {
|
|
269
275
|
r(w(e));
|
|
270
276
|
});
|
|
271
277
|
},
|
|
272
|
-
close() {
|
|
273
|
-
|
|
278
|
+
close() {
|
|
279
|
+
n.removeEventListener?.("message", i);
|
|
280
|
+
}
|
|
281
|
+
};
|
|
274
282
|
}
|
|
275
283
|
function B(e, t, n) {
|
|
276
284
|
let r = (n) => {
|
|
@@ -304,7 +312,7 @@ var V = {
|
|
|
304
312
|
], U = class {
|
|
305
313
|
mayPost(e, t) {
|
|
306
314
|
let n = this.sources.get(t)?.permissions;
|
|
307
|
-
return n ? e.t ===
|
|
315
|
+
return n ? e.t === i.journey ? n.includes("journey:read") : e.t === i.journeyRequest ? n.includes("journey:write") : e.t !== i.sampling || n.includes("sampling:read") : this.config.bus.sourcePolicy === "trusted-origin";
|
|
308
316
|
}
|
|
309
317
|
registerFrame(e, t) {
|
|
310
318
|
let n = typeof HTMLIFrameElement > "u" ? void 0 : HTMLIFrameElement, r = n && e instanceof n ? e.contentWindow : e;
|
|
@@ -325,9 +333,12 @@ var V = {
|
|
|
325
333
|
rotateContext() {
|
|
326
334
|
this.passContext(this.role === "sender");
|
|
327
335
|
}
|
|
336
|
+
setTabId(e) {
|
|
337
|
+
this.tabId = e;
|
|
338
|
+
}
|
|
328
339
|
passContext(e) {
|
|
329
340
|
let t = {
|
|
330
|
-
t:
|
|
341
|
+
t: i.securityContext,
|
|
331
342
|
from: this.contextId,
|
|
332
343
|
id: this.config.securityContext.id
|
|
333
344
|
};
|
|
@@ -351,10 +362,12 @@ var V = {
|
|
|
351
362
|
this.directReplies.set(e, new WeakRef(t));
|
|
352
363
|
}
|
|
353
364
|
constructor(e, t, n, r, i, a, o = V) {
|
|
354
|
-
b(this, "config", void 0), b(this, "diagnostics", void 0), b(this, "platform", void 0), b(this, "contextId", void 0), b(this, "tabId", void 0), b(this, "handlers", void 0), b(this, "handshakeOptions", void 0), b(this, "sources", /* @__PURE__ */ new Map()), b(this, "rates", /* @__PURE__ */ new WeakMap()), b(this, "channelRates", /* @__PURE__ */ new Map()), b(this, "directReplies", /* @__PURE__ */ new Map()), b(this, "role", "sender"), b(this, "upstream", null), b(this, "links", []), b(this, "openFinLink", null), b(this, "isOpenFinProvider", !1), b(this, "rulesPoll", void 0), b(this, "destroyed", !1), b(this, "ownerId", null), b(this, "ownerPeer", void 0), b(this, "awaitingWelcome", null), b(this, "flushAnswers", /* @__PURE__ */ new Map()), b(this, "flushQueue", []), b(this, "flushing", !1), b(this, "flushedAt", 0), b(this, "receive", (e, t) => {
|
|
365
|
+
b(this, "config", void 0), b(this, "diagnostics", void 0), b(this, "platform", void 0), b(this, "contextId", void 0), b(this, "tabId", void 0), b(this, "handlers", void 0), b(this, "handshakeOptions", void 0), b(this, "sources", /* @__PURE__ */ new Map()), b(this, "rates", /* @__PURE__ */ new WeakMap()), b(this, "channelRates", /* @__PURE__ */ new Map()), b(this, "directReplies", /* @__PURE__ */ new Map()), b(this, "role", "sender"), b(this, "upstream", null), b(this, "links", []), b(this, "openFinLink", null), b(this, "isOpenFinProvider", !1), b(this, "rulesPoll", void 0), b(this, "destroyed", !1), b(this, "ownerId", null), b(this, "ownerPeer", void 0), b(this, "handshakeLink", null), b(this, "awaitingWelcome", null), b(this, "flushAnswers", /* @__PURE__ */ new Map()), b(this, "flushQueue", []), b(this, "flushing", !1), b(this, "flushedAt", 0), b(this, "since", void 0), b(this, "receive", (e, t) => {
|
|
355
366
|
let n = t.link === "children" || t.link === "worker";
|
|
356
367
|
this.acceptsMessage(e, t, n) && this.routeMessage(e, t);
|
|
357
368
|
}), this.config = e, this.diagnostics = t, this.platform = n, this.contextId = r, this.tabId = i, this.handlers = a, this.handshakeOptions = o;
|
|
369
|
+
let s = performance.timeOrigin;
|
|
370
|
+
this.since = Number.isFinite(s) ? s : void 0;
|
|
358
371
|
}
|
|
359
372
|
getRole() {
|
|
360
373
|
return this.role;
|
|
@@ -371,19 +384,21 @@ var V = {
|
|
|
371
384
|
}), this.announce(), this.role;
|
|
372
385
|
let n = this.candidateUpstream();
|
|
373
386
|
if (!n) return this.role = "sender", this.diagnostics.report("bus.role_resolved", "No owner exists. This context sends its own records.", { role: "sender" }), this.announce(), this.role;
|
|
374
|
-
let r = this.orphanPolicy() === "retry" ? this.handshakeOptions.maxAttempts : 1
|
|
375
|
-
|
|
376
|
-
|
|
387
|
+
let r = this.orphanPolicy() === "retry" ? this.handshakeOptions.maxAttempts : 1;
|
|
388
|
+
this.handshakeLink = n;
|
|
389
|
+
let i = !1;
|
|
390
|
+
for (let e = 0; e < r && !i && !this.destroyed; e++) i = await this.handshake(n);
|
|
391
|
+
return this.handshakeLink = null, this.destroyed || (this.role = i ? "forwarder" : "sender", this.upstream = i ? n : null, i || (n !== this.openFinLink && n.close(), this.diagnostics.report("bus.handshake_timeout", `No owner answered after ${String(r)} attempt(s) of ${String(this.handshakeOptions.timeoutMs)} ms. This context becomes the sender.`, {
|
|
377
392
|
via: n.kind,
|
|
378
393
|
crossOrigin: this.isCrossOriginFrame()
|
|
379
394
|
})), this.diagnostics.report("bus.role_resolved", `The bus role is ${this.role}.`, {
|
|
380
395
|
role: this.role,
|
|
381
396
|
via: i ? n.kind : "none"
|
|
382
|
-
}), this.announce(), this.role;
|
|
397
|
+
}), this.announce()), this.role;
|
|
383
398
|
}
|
|
384
399
|
sendRecords(e) {
|
|
385
|
-
let { maxRecordsPerMessage: t, maxMessageBytes: n } = this.config.bus,
|
|
386
|
-
t:
|
|
400
|
+
let { maxRecordsPerMessage: t, maxMessageBytes: n } = this.config.bus, r = new TextEncoder(), a = (e) => n === null ? 0 : r.encode(JSON.stringify(e)).length, o = (e) => ({
|
|
401
|
+
t: i.records,
|
|
387
402
|
from: this.contextId,
|
|
388
403
|
records: e,
|
|
389
404
|
routingContextId: this.config.securityContext.id || void 0
|
|
@@ -402,37 +417,37 @@ var V = {
|
|
|
402
417
|
async requestFlush(e, t) {
|
|
403
418
|
let { upstream: n } = this;
|
|
404
419
|
if (!n) return null;
|
|
405
|
-
let
|
|
420
|
+
let r = h(this.diagnostics), a, o = new Promise((e) => {
|
|
406
421
|
a = e;
|
|
407
422
|
});
|
|
408
|
-
this.flushAnswers.set(
|
|
409
|
-
t:
|
|
423
|
+
this.flushAnswers.set(r, a), n.post({
|
|
424
|
+
t: i.flushRequest,
|
|
410
425
|
from: this.contextId,
|
|
411
|
-
id:
|
|
426
|
+
id: r,
|
|
412
427
|
timeoutMs: e
|
|
413
428
|
});
|
|
414
429
|
try {
|
|
415
430
|
return await Promise.race([o, t.then(() => null)]);
|
|
416
431
|
} finally {
|
|
417
|
-
this.flushAnswers.delete(
|
|
432
|
+
this.flushAnswers.delete(r);
|
|
418
433
|
}
|
|
419
434
|
}
|
|
420
435
|
acceptDirect(e, t, n) {
|
|
421
|
-
let
|
|
436
|
+
let r = {
|
|
422
437
|
link: "direct",
|
|
423
438
|
origin: "same-origin",
|
|
424
439
|
peer: n
|
|
425
440
|
}, a = {
|
|
426
|
-
...
|
|
441
|
+
...r,
|
|
427
442
|
reply: (e) => {
|
|
428
|
-
t(e,
|
|
443
|
+
t(e, r);
|
|
429
444
|
}
|
|
430
445
|
};
|
|
431
|
-
this.acceptsMessage(e, a, !0) && e.from !== this.contextId && (n && this.keepDirectReply(n, t), e.t ===
|
|
432
|
-
t:
|
|
446
|
+
this.acceptsMessage(e, a, !0) && e.from !== this.contextId && (n && this.keepDirectReply(n, t), e.t === i.samplingRequest ? t(this.rulesAnswer(e.from), r) : (e.t === i.records && !this.awaitingWelcome && e.routingContextId !== this.config.securityContext.id && t({
|
|
447
|
+
t: i.securityContext,
|
|
433
448
|
from: this.contextId,
|
|
434
449
|
id: this.config.securityContext.id
|
|
435
|
-
},
|
|
450
|
+
}, r), this.routeMessage(e, a)));
|
|
436
451
|
}
|
|
437
452
|
attachWorker(e, t = {}) {
|
|
438
453
|
let n = {
|
|
@@ -461,7 +476,7 @@ var V = {
|
|
|
461
476
|
}
|
|
462
477
|
broadcastJourney(e) {
|
|
463
478
|
this.postJourney({
|
|
464
|
-
t:
|
|
479
|
+
t: i.journey,
|
|
465
480
|
from: this.contextId,
|
|
466
481
|
journey: e
|
|
467
482
|
});
|
|
@@ -469,7 +484,7 @@ var V = {
|
|
|
469
484
|
destroy() {
|
|
470
485
|
this.sources.clear(), this.directReplies.clear(), this.flushQueue = [], this.destroyed = !0, clearInterval(this.rulesPoll), this.rulesPoll = void 0;
|
|
471
486
|
for (let e of this.allLinks()) e.close();
|
|
472
|
-
this.links.length = 0, this.upstream = null, this.ownerId = null, this.openFinLink = null;
|
|
487
|
+
this.handshakeLink && this.handshakeLink !== this.openFinLink && this.handshakeLink.close(), this.awaitingWelcome?.settle(!1), this.links.length = 0, this.upstream = null, this.ownerId = null, this.openFinLink = null;
|
|
473
488
|
}
|
|
474
489
|
allLinks() {
|
|
475
490
|
return !this.upstream || this.links.includes(this.upstream) ? this.links : [...this.links, this.upstream];
|
|
@@ -488,11 +503,11 @@ var V = {
|
|
|
488
503
|
} catch {
|
|
489
504
|
r = !1;
|
|
490
505
|
}
|
|
491
|
-
return r || this.diagnostics.count("bus.rejected_message"), r;
|
|
506
|
+
return r === "journey_denied" ? (this.diagnostics.count("bus.journey_denied"), !1) : (r || this.diagnostics.count("bus.rejected_message"), r);
|
|
492
507
|
}
|
|
493
508
|
passesChecks(e, t, n) {
|
|
494
|
-
let { bus:
|
|
495
|
-
if (n &&
|
|
509
|
+
let { bus: r } = this.config, a = typeof t.peer == "object" ? this.sources.get(t.peer) : void 0;
|
|
510
|
+
if (n && r.sourcePolicy === "registered" && !a) return !1;
|
|
496
511
|
let o = typeof t.peer == "object" ? t.peer : void 0, s = typeof t.peer == "string" ? t.peer : t.link, c = Date.now(), l = (o ? this.rates.get(o) : this.channelRates.get(s)) ?? {
|
|
497
512
|
start: c,
|
|
498
513
|
count: 0
|
|
@@ -503,30 +518,30 @@ var V = {
|
|
|
503
518
|
if (this.channelRates.size >= 256 && !this.channelRates.has(s)) return !1;
|
|
504
519
|
this.channelRates.set(s, l);
|
|
505
520
|
}
|
|
506
|
-
if (!v(l,
|
|
521
|
+
if (!v(l, r.maxMessagesPerSecond ?? Infinity, 1e3)) return !1;
|
|
507
522
|
let u = JSON.stringify(e, (e, t) => {
|
|
508
523
|
if (typeof t == "number" && !Number.isFinite(t)) throw Error("Non-finite value");
|
|
509
524
|
return t;
|
|
510
525
|
});
|
|
511
|
-
if (
|
|
526
|
+
if (r.maxMessageBytes !== null && new TextEncoder().encode(u).length > r.maxMessageBytes || !S(e) || e.t === i.records && r.maxRecordsPerMessage !== null && e.records.length > r.maxRecordsPerMessage) return !1;
|
|
512
527
|
if (a) {
|
|
513
|
-
let t = e.t ===
|
|
514
|
-
if (t && !a.permissions?.includes(t)) return
|
|
528
|
+
let t = e.t === i.records || e.t === i.flushRequest ? "records" : e.t === i.journey ? "journey:write" : e.t === i.journeyRequest ? "journey:read" : e.t === i.samplingRequest ? "sampling:read" : void 0;
|
|
529
|
+
if (t && !a.permissions?.includes(t)) return t === "journey:read" && "journey_denied";
|
|
515
530
|
}
|
|
516
|
-
return n && (e.t ===
|
|
531
|
+
return n && (e.t === i.sampling || e.t === i.securityContext || e.t === i.flushResult) || t.link === "broadcast" && e.t === i.flushRequest ? !1 : r.sourcePolicy !== "registered" || t.link !== "broadcast" || e.t !== i.records;
|
|
517
532
|
}
|
|
518
533
|
routeMessage(e, t) {
|
|
519
534
|
if (e.from !== this.contextId) switch (e.t) {
|
|
520
|
-
case
|
|
535
|
+
case i.hello:
|
|
521
536
|
this.canOwn(t.link) && this.answer(t, {
|
|
522
|
-
t:
|
|
537
|
+
t: i.welcome,
|
|
523
538
|
from: this.contextId,
|
|
524
539
|
to: e.from,
|
|
525
540
|
tabId: this.tabId,
|
|
526
541
|
routingContextId: this.awaitingWelcome ? void 0 : this.config.securityContext.id || void 0
|
|
527
542
|
});
|
|
528
543
|
break;
|
|
529
|
-
case
|
|
544
|
+
case i.welcome:
|
|
530
545
|
if (e.to !== this.contextId) break;
|
|
531
546
|
if (this.awaitingWelcome?.link === t.link || this.upstream?.kind === t.link && this.ownerId === null) {
|
|
532
547
|
this.ownerId = e.from, this.ownerPeer = t.peer;
|
|
@@ -535,47 +550,51 @@ var V = {
|
|
|
535
550
|
this.config.securityContext.id !== n && this.passContext(!1), this.awaitingWelcome?.settle(!0);
|
|
536
551
|
}
|
|
537
552
|
break;
|
|
538
|
-
case
|
|
553
|
+
case i.records:
|
|
539
554
|
if (this.config.securityContext.isolation && this.config.securityContext.id && e.routingContextId !== this.config.securityContext.id) {
|
|
540
555
|
this.diagnostics.count("security.context_mismatch");
|
|
541
556
|
break;
|
|
542
557
|
}
|
|
543
558
|
this.role === "sender" || this.handlers.paused?.() && this.canRelay(t.link) ? this.handlers.onRecords(e.records) : this.upstream && this.canRelay(t.link) && this.upstream.post(e);
|
|
544
559
|
break;
|
|
545
|
-
case
|
|
560
|
+
case i.securityContext:
|
|
546
561
|
t.link === this.upstream?.kind && this.ownerId === e.from && this.ownerPeer === t.peer && this.handlers.onSecurityContext?.(e.id) !== !1 && this.rotateContext();
|
|
547
562
|
break;
|
|
548
|
-
case
|
|
563
|
+
case i.journey:
|
|
549
564
|
this.acceptsJourney(e, t) && this.applyJourney(e.journey);
|
|
550
565
|
break;
|
|
551
|
-
case
|
|
566
|
+
case i.journeyRequest: {
|
|
552
567
|
let n = this.handlers.onJourneyRequest();
|
|
553
568
|
n && this.journeyLink(t.link) && this.answer(t, {
|
|
554
|
-
t:
|
|
569
|
+
t: i.journey,
|
|
555
570
|
from: this.contextId,
|
|
556
571
|
to: e.from,
|
|
557
572
|
journey: n
|
|
558
573
|
});
|
|
559
574
|
break;
|
|
560
575
|
}
|
|
561
|
-
case
|
|
576
|
+
case i.samplingRequest:
|
|
562
577
|
(this.role === "forwarder" ? t.link !== this.upstream?.kind : this.canOwn(t.link)) && this.answer(t, this.rulesAnswer(e.from));
|
|
563
578
|
break;
|
|
564
|
-
case
|
|
579
|
+
case i.sampling:
|
|
565
580
|
this.acceptsRules(e.to, t) && this.applyRules(e.rules);
|
|
566
581
|
break;
|
|
567
|
-
case
|
|
582
|
+
case i.flushRequest:
|
|
568
583
|
(this.role === "sender" || this.canRelay(t.link)) && this.queueFlush(e, t);
|
|
569
584
|
break;
|
|
570
|
-
case
|
|
585
|
+
case i.flushResult:
|
|
571
586
|
this.settleFlush(e, t);
|
|
572
587
|
break;
|
|
573
|
-
case
|
|
588
|
+
case i.tab: t.link === "broadcast" && e.tabId === this.tabId && this.settleTabClaim(e);
|
|
574
589
|
}
|
|
575
590
|
}
|
|
591
|
+
settleTabClaim(e) {
|
|
592
|
+
let { since: t } = e;
|
|
593
|
+
t === void 0 || this.since === void 0 || t === this.since ? this.contextId > e.from && this.handlers.onTabConflict() : t < this.since ? this.handlers.onTabConflict() : this.postOver("broadcast", this.tabClaim());
|
|
594
|
+
}
|
|
576
595
|
queueFlush(e, t) {
|
|
577
|
-
let n = t.peer ?? t.link,
|
|
578
|
-
if (this.flushQueue.length >= 100 ||
|
|
596
|
+
let n = t.peer ?? t.link, r = this.flushQueue.filter((e) => e.source === n).length;
|
|
597
|
+
if (this.flushQueue.length >= 100 || r >= 4) {
|
|
579
598
|
this.diagnostics.count("bus.rejected_message");
|
|
580
599
|
return;
|
|
581
600
|
}
|
|
@@ -585,7 +604,7 @@ var V = {
|
|
|
585
604
|
ends: Date.now() + a,
|
|
586
605
|
answer: (n) => {
|
|
587
606
|
this.answer(t, {
|
|
588
|
-
t:
|
|
607
|
+
t: i.flushResult,
|
|
589
608
|
from: this.contextId,
|
|
590
609
|
id: e.id,
|
|
591
610
|
result: n
|
|
@@ -658,7 +677,7 @@ var V = {
|
|
|
658
677
|
let e = (e) => {
|
|
659
678
|
e && this.links.push(e);
|
|
660
679
|
};
|
|
661
|
-
this.platform.isWorker || this.ensureChildrenLink(), this.platform.isTopLevelDocument && e(L(
|
|
680
|
+
this.platform.isWorker || this.ensureChildrenLink(), this.platform.isTopLevelDocument && e(L(a, this.receive, this.diagnostics)), (this.platform.platform === "openfin" || this.platform.platform === "openfin_web") && e(this.ensureOpenFinLink());
|
|
662
681
|
}
|
|
663
682
|
ensureChildrenLink() {
|
|
664
683
|
if (this.links.some((e) => e.kind === "children")) return;
|
|
@@ -674,38 +693,42 @@ var V = {
|
|
|
674
693
|
e && this.links.push(e);
|
|
675
694
|
}
|
|
676
695
|
ensureOpenFinLink() {
|
|
677
|
-
return this.openFinLink ??= R(
|
|
696
|
+
return this.openFinLink ??= R(a, this.platform.openfinUuid, this.receive, this.diagnostics), this.openFinLink;
|
|
678
697
|
}
|
|
679
698
|
handshake(e) {
|
|
680
699
|
return new Promise((t) => {
|
|
681
|
-
let n = !1,
|
|
700
|
+
let n = !1, r = (e) => {
|
|
682
701
|
n || (n = !0, this.awaitingWelcome = null, clearTimeout(a), t(e));
|
|
683
702
|
};
|
|
684
703
|
this.awaitingWelcome = {
|
|
685
704
|
link: e.kind,
|
|
686
|
-
settle:
|
|
705
|
+
settle: r
|
|
687
706
|
};
|
|
688
707
|
let a = setTimeout(() => {
|
|
689
|
-
|
|
708
|
+
r(!1);
|
|
690
709
|
}, this.handshakeOptions.timeoutMs);
|
|
691
710
|
y(a), e.post({
|
|
692
|
-
t:
|
|
711
|
+
t: i.hello,
|
|
693
712
|
from: this.contextId,
|
|
694
713
|
tabId: this.tabId
|
|
695
714
|
});
|
|
696
715
|
});
|
|
697
716
|
}
|
|
698
|
-
|
|
699
|
-
|
|
700
|
-
t:
|
|
717
|
+
tabClaim() {
|
|
718
|
+
return {
|
|
719
|
+
t: i.tab,
|
|
701
720
|
from: this.contextId,
|
|
702
|
-
tabId: this.tabId
|
|
703
|
-
|
|
704
|
-
|
|
721
|
+
tabId: this.tabId,
|
|
722
|
+
...this.since === void 0 ? {} : { since: this.since }
|
|
723
|
+
};
|
|
724
|
+
}
|
|
725
|
+
announce() {
|
|
726
|
+
this.postOver("broadcast", this.tabClaim()), this.upstream && this.ownerId === null && this.upstream.post({
|
|
727
|
+
t: i.hello,
|
|
705
728
|
from: this.contextId,
|
|
706
729
|
tabId: this.tabId
|
|
707
730
|
}), this.postJourney({
|
|
708
|
-
t:
|
|
731
|
+
t: i.journeyRequest,
|
|
709
732
|
from: this.contextId
|
|
710
733
|
}), this.pollRules(), this.passContext(!1);
|
|
711
734
|
}
|
|
@@ -736,7 +759,7 @@ var V = {
|
|
|
736
759
|
rulesAnswer(e) {
|
|
737
760
|
let t = this.handlers.remote.sampling?.wire() ?? null;
|
|
738
761
|
return {
|
|
739
|
-
t:
|
|
762
|
+
t: i.sampling,
|
|
740
763
|
from: this.contextId,
|
|
741
764
|
to: e,
|
|
742
765
|
rules: t
|
|
@@ -763,7 +786,7 @@ var V = {
|
|
|
763
786
|
if (this.destroyed || this.role !== "forwarder" || !e) return;
|
|
764
787
|
let t = () => {
|
|
765
788
|
this.config.sampling.remote && e.post({
|
|
766
|
-
t:
|
|
789
|
+
t: i.samplingRequest,
|
|
767
790
|
from: this.contextId
|
|
768
791
|
});
|
|
769
792
|
};
|
|
@@ -772,4 +795,4 @@ var V = {
|
|
|
772
795
|
};
|
|
773
796
|
export { U as Bus };
|
|
774
797
|
|
|
775
|
-
//# sourceMappingURL=bus-
|
|
798
|
+
//# sourceMappingURL=bus-DyNafxZN.js.map
|