@nathanclaire/edge-telemetry-sdk 4.0.0 → 5.0.1
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/LICENSE +21 -0
- package/README.md +185 -30
- package/dist/appLifecycle-DS_fEclk.cjs +2 -0
- package/dist/appLifecycle-DS_fEclk.cjs.map +1 -0
- package/dist/{appLifecycle-DQErzJIR.js → appLifecycle-PffQ4vC1.js} +5 -3
- package/dist/appLifecycle-PffQ4vC1.js.map +1 -0
- package/dist/autoTaps.native-By9I4Kr2.cjs +2 -0
- package/dist/autoTaps.native-By9I4Kr2.cjs.map +1 -0
- package/dist/autoTaps.native-DQCXevD7.js +66 -0
- package/dist/autoTaps.native-DQCXevD7.js.map +1 -0
- package/dist/crashHandler.web-6KvedEB-.cjs +2 -0
- package/dist/crashHandler.web-6KvedEB-.cjs.map +1 -0
- package/dist/crashHandler.web-BUlSXYoS.js +30 -0
- package/dist/crashHandler.web-BUlSXYoS.js.map +1 -0
- package/dist/crashHandlerNative.native-CFVQ5UcO.cjs +2 -0
- package/dist/crashHandlerNative.native-CFVQ5UcO.cjs.map +1 -0
- package/dist/{crashHandlerNative.native-FupMnr1U.js → crashHandlerNative.native-DsCRd-oN.js} +13 -13
- package/dist/crashHandlerNative.native-DsCRd-oN.js.map +1 -0
- package/dist/deviceInfo.native-D5gNBG7m.cjs +2 -0
- package/dist/{deviceInfo.native-BoeTZcD6.cjs.map → deviceInfo.native-D5gNBG7m.cjs.map} +1 -1
- package/dist/deviceInfo.native-DiiHrnI3.js +53 -0
- package/dist/{deviceInfo.native-BJ-3Jj1T.js.map → deviceInfo.native-DiiHrnI3.js.map} +1 -1
- package/dist/{deviceInfo.web-BFB1-pcA.js → deviceInfo.web-BHsjVveq.js} +3 -3
- package/dist/{deviceInfo.web-BFB1-pcA.js.map → deviceInfo.web-BHsjVveq.js.map} +1 -1
- package/dist/{deviceInfo.web-3L3IDQQA.cjs → deviceInfo.web-DGCUHAnv.cjs} +2 -2
- package/dist/{deviceInfo.web-3L3IDQQA.cjs.map → deviceInfo.web-DGCUHAnv.cjs.map} +1 -1
- package/dist/deviceState.native-BEysbZ6O.js +58 -0
- package/dist/deviceState.native-BEysbZ6O.js.map +1 -0
- package/dist/deviceState.native-CrQMy11_.cjs +2 -0
- package/dist/deviceState.native-CrQMy11_.cjs.map +1 -0
- package/dist/deviceState.web-ByaQm9Ry.js +14 -0
- package/dist/deviceState.web-ByaQm9Ry.js.map +1 -0
- package/dist/deviceState.web-CSfUgHDU.cjs +2 -0
- package/dist/deviceState.web-CSfUgHDU.cjs.map +1 -0
- package/dist/frameTracker-9j0en6Zm.cjs +2 -0
- package/dist/frameTracker-9j0en6Zm.cjs.map +1 -0
- package/dist/{frameTracker-DdB8W_kC.js → frameTracker-BzXnxSkb.js} +18 -19
- package/dist/frameTracker-BzXnxSkb.js.map +1 -0
- package/dist/{httpAttributes-BrrtM8zh.js → httpAttributes-BWXOr4eP.js} +1 -1
- package/dist/{httpAttributes-BrrtM8zh.js.map → httpAttributes-BWXOr4eP.js.map} +1 -1
- package/dist/{httpAttributes-D0m6UID7.cjs → httpAttributes-COY0_kiF.cjs} +1 -1
- package/dist/{httpAttributes-D0m6UID7.cjs.map → httpAttributes-COY0_kiF.cjs.map} +1 -1
- package/dist/index.native.cjs +1 -1
- package/dist/index.native.cjs.map +1 -1
- package/dist/index.native.d.ts +1 -1
- package/dist/index.native.js +128 -71
- package/dist/index.native.js.map +1 -1
- package/dist/index.web.cjs +1 -1
- package/dist/index.web.cjs.map +1 -1
- package/dist/index.web.d.ts +1 -1
- package/dist/index.web.js +51 -38
- package/dist/index.web.js.map +1 -1
- package/dist/{interactionWeb.web-CJAviVQ7.js → interactionWeb.web-BWBjmovb.js} +8 -8
- package/dist/{interactionWeb.web-CJAviVQ7.js.map → interactionWeb.web-BWBjmovb.js.map} +1 -1
- package/dist/interactionWeb.web-CKDJLD9r.cjs +2 -0
- package/dist/{interactionWeb.web-Bl_cZlgh.cjs.map → interactionWeb.web-CKDJLD9r.cjs.map} +1 -1
- package/dist/{interceptFetchWeb.web-UXC2Lb6X.js → interceptFetchWeb.web-DjSR_Rft.js} +18 -17
- package/dist/interceptFetchWeb.web-DjSR_Rft.js.map +1 -0
- package/dist/interceptFetchWeb.web-ZHw6IQkU.cjs +2 -0
- package/dist/{interceptFetchWeb.web-UXC2Lb6X.js.map → interceptFetchWeb.web-ZHw6IQkU.cjs.map} +1 -1
- package/dist/{interceptHttpNative.native-BVpFuoNB.cjs → interceptHttpNative.native-C5scIcgY.cjs} +2 -2
- package/dist/{interceptHttpNative.native-BVpFuoNB.cjs.map → interceptHttpNative.native-C5scIcgY.cjs.map} +1 -1
- package/dist/{interceptHttpNative.native-rX-lPNST.js → interceptHttpNative.native-vF_Fksjk.js} +2 -2
- package/dist/{interceptHttpNative.native-rX-lPNST.js.map → interceptHttpNative.native-vF_Fksjk.js.map} +1 -1
- package/dist/{loadingTime-Bhomd9qq.cjs → loadingTime-Cj5Oh8lT.cjs} +1 -1
- package/dist/{loadingTime-Bhomd9qq.cjs.map → loadingTime-Cj5Oh8lT.cjs.map} +1 -1
- package/dist/{loadingTime-ZkYvFijA.js → loadingTime-DMc0zTY8.js} +1 -1
- package/dist/{loadingTime-ZkYvFijA.js.map → loadingTime-DMc0zTY8.js.map} +1 -1
- package/dist/memoryNative.native-CK3QFVjY.cjs +2 -0
- package/dist/memoryNative.native-CK3QFVjY.cjs.map +1 -0
- package/dist/{memoryNative.native-C42h9SjK.js → memoryNative.native-DkA6f7id.js} +12 -12
- package/dist/memoryNative.native-DkA6f7id.js.map +1 -0
- package/dist/nativeSender-Dt1HLaLi.js +37 -0
- package/dist/nativeSender-Dt1HLaLi.js.map +1 -0
- package/dist/nativeSender-hCgUa7Vz.cjs +2 -0
- package/dist/nativeSender-hCgUa7Vz.cjs.map +1 -0
- package/dist/navigationRef-CVIv0aIK.js +30 -0
- package/dist/navigationRef-CVIv0aIK.js.map +1 -0
- package/dist/navigationRef-CfIbeXX8.cjs +2 -0
- package/dist/navigationRef-CfIbeXX8.cjs.map +1 -0
- package/dist/navigationWeb.web-CRHpr5zl.js +51 -0
- package/dist/navigationWeb.web-CRHpr5zl.js.map +1 -0
- package/dist/navigationWeb.web-DwWjL80b.cjs +2 -0
- package/dist/navigationWeb.web-DwWjL80b.cjs.map +1 -0
- package/dist/{networkChange-CUO1hRLj.cjs → networkChange-2FGIQM-N.cjs} +2 -2
- package/dist/networkChange-2FGIQM-N.cjs.map +1 -0
- package/dist/{networkChange-D39hdSb0.js → networkChange-QA0893vW.js} +2 -2
- package/dist/networkChange-QA0893vW.js.map +1 -0
- package/dist/networkInfo.native-CcJ3JVRF.js +31 -0
- package/dist/networkInfo.native-CcJ3JVRF.js.map +1 -0
- package/dist/networkInfo.native-whB2wf6a.cjs +2 -0
- package/dist/networkInfo.native-whB2wf6a.cjs.map +1 -0
- package/dist/{networkInfo.web-B2YlLNsI.js → networkInfo.web-CcUpXMUK.js} +2 -2
- package/dist/networkInfo.web-CcUpXMUK.js.map +1 -0
- package/dist/{networkInfo.web-PltJTHsy.cjs → networkInfo.web-DfO-BUFx.cjs} +2 -2
- package/dist/networkInfo.web-DfO-BUFx.cjs.map +1 -0
- package/dist/react-bqe7KPOf.cjs +4 -0
- package/dist/react-bqe7KPOf.cjs.map +1 -0
- package/dist/react-urNtDGTL.js +413 -0
- package/dist/react-urNtDGTL.js.map +1 -0
- package/dist/runtimeReady.native-CxFl1rQR.js +35 -0
- package/dist/runtimeReady.native-CxFl1rQR.js.map +1 -0
- package/dist/runtimeReady.native-zueSbsEv.cjs +2 -0
- package/dist/runtimeReady.native-zueSbsEv.cjs.map +1 -0
- package/dist/{runtimeReady.web-C8fdIbVR.js → runtimeReady.web-JuE239Tg.js} +2 -2
- package/dist/{runtimeReady.web-C8fdIbVR.js.map → runtimeReady.web-JuE239Tg.js.map} +1 -1
- package/dist/{runtimeReady.web-DHW682RN.cjs → runtimeReady.web-vhAJFU61.cjs} +2 -2
- package/dist/{runtimeReady.web-DHW682RN.cjs.map → runtimeReady.web-vhAJFU61.cjs.map} +1 -1
- package/dist/{seedRuntimeReady-Cz8nOKoo.js → seedRuntimeReady-BlRdf3pR.js} +2 -2
- package/dist/{seedRuntimeReady-Cz8nOKoo.js.map → seedRuntimeReady-BlRdf3pR.js.map} +1 -1
- package/dist/seedRuntimeReady-CbjqbWCd.cjs +2 -0
- package/dist/{seedRuntimeReady-BKwkBEAF.cjs.map → seedRuntimeReady-CbjqbWCd.cjs.map} +1 -1
- package/dist/src/adapters/appLifecycle.d.ts +3 -3
- package/dist/src/adapters/batch.d.ts +44 -0
- package/dist/src/adapters/crashCapture.d.ts +5 -1
- package/dist/src/adapters/deviceState.d.ts +9 -0
- package/dist/src/adapters/frameAggregate.d.ts +15 -13
- package/dist/src/adapters/frameTracker.d.ts +1 -1
- package/dist/src/adapters/hangDetector.d.ts +41 -0
- package/dist/src/adapters/manualSpans.d.ts +41 -0
- package/dist/src/adapters/native/autoTaps.native.d.ts +15 -0
- package/dist/src/adapters/native/deviceState.native.d.ts +15 -0
- package/dist/src/adapters/native/memoryNative.native.d.ts +3 -3
- package/dist/src/adapters/native/networkInfo.native.d.ts +1 -1
- package/dist/src/adapters/native/runtimeReady.native.d.ts +16 -0
- package/dist/src/adapters/navigationRef.d.ts +17 -9
- package/dist/src/adapters/networkChange.d.ts +2 -2
- package/dist/src/adapters/traceManager.d.ts +18 -5
- package/dist/src/adapters/uiInteraction.d.ts +1 -1
- package/dist/src/adapters/viewManager.d.ts +24 -8
- package/dist/src/adapters/web/deviceState.web.d.ts +10 -0
- package/dist/src/adapters/web/navigationWeb.web.d.ts +6 -10
- package/dist/src/adapters/web/webVitals.web.d.ts +7 -0
- package/dist/src/adapters/xhrIntercept.d.ts +2 -0
- package/dist/src/core/breadcrumbs.d.ts +10 -0
- package/dist/src/core/telemetry.d.ts +139 -29
- package/dist/src/core/userProfile.d.ts +7 -0
- package/dist/src/createTelemetry.native.d.ts +3 -1
- package/dist/src/createTelemetry.web.d.ts +2 -1
- package/dist/src/golden.helper.d.ts +4 -0
- package/dist/src/index.base.d.ts +80 -6
- package/dist/src/index.native.d.ts +4 -61
- package/dist/src/index.web.d.ts +4 -51
- package/dist/src/react.d.ts +45 -0
- package/dist/src/telemetryNative.native.d.ts +79 -0
- package/dist/src/telemetryWeb.web.d.ts +59 -0
- package/dist/{store.native-TPqXngmF.cjs → store.native-BbS76uWV.cjs} +1 -1
- package/dist/{store.native-TPqXngmF.cjs.map → store.native-BbS76uWV.cjs.map} +1 -1
- package/dist/{store.native-BYBJcy6o.js → store.native-MlWyGgBp.js} +1 -1
- package/dist/{store.native-BYBJcy6o.js.map → store.native-MlWyGgBp.js.map} +1 -1
- package/dist/{store.web-CvqqN-_Z.cjs → store.web-BzKaP57Z.cjs} +1 -1
- package/dist/{store.web-CvqqN-_Z.cjs.map → store.web-BzKaP57Z.cjs.map} +1 -1
- package/dist/{store.web-DJAlN0nc.js → store.web-rhh0NOfs.js} +1 -1
- package/dist/{store.web-DJAlN0nc.js.map → store.web-rhh0NOfs.js.map} +1 -1
- package/dist/telemetry-60sfWkh0.js +1754 -0
- package/dist/telemetry-60sfWkh0.js.map +1 -0
- package/dist/telemetry-CW63glwb.cjs +2 -0
- package/dist/telemetry-CW63glwb.cjs.map +1 -0
- package/dist/{uiInteraction-DAqxxz0q.js → uiInteraction-BIDOMcrL.js} +39 -34
- package/dist/{uiInteraction-DAqxxz0q.js.map → uiInteraction-BIDOMcrL.js.map} +1 -1
- package/dist/uiInteraction-DxlwCVSn.cjs +2 -0
- package/dist/{uiInteraction-CdzvEI1p.cjs.map → uiInteraction-DxlwCVSn.cjs.map} +1 -1
- package/dist/{viewport-Dd85GUNO.cjs → viewport-9JcVIXYF.cjs} +1 -1
- package/dist/{viewport-Dd85GUNO.cjs.map → viewport-9JcVIXYF.cjs.map} +1 -1
- package/dist/{viewport-Dzmt5QwK.js → viewport-GWTEBt2K.js} +1 -1
- package/dist/{viewport-Dzmt5QwK.js.map → viewport-GWTEBt2K.js.map} +1 -1
- package/dist/{web-vitals.attribution-CVCPiX-h.cjs → web-vitals.attribution-DAvBvdng.cjs} +1 -1
- package/dist/{web-vitals.attribution-CVCPiX-h.cjs.map → web-vitals.attribution-DAvBvdng.cjs.map} +1 -1
- package/dist/{web-vitals.attribution-xw9N5MKQ.js → web-vitals.attribution-DcoMtvlY.js} +1 -1
- package/dist/{web-vitals.attribution-xw9N5MKQ.js.map → web-vitals.attribution-DcoMtvlY.js.map} +1 -1
- package/dist/webSender-DA087xb5.cjs +2 -0
- package/dist/webSender-DA087xb5.cjs.map +1 -0
- package/dist/webSender-g4rs5TIg.js +44 -0
- package/dist/webSender-g4rs5TIg.js.map +1 -0
- package/dist/{webVitals.web-CNIpsKlA.js → webVitals.web-DRTDK6s5.js} +39 -24
- package/dist/webVitals.web-DRTDK6s5.js.map +1 -0
- package/dist/webVitals.web-DvScDIjX.cjs +2 -0
- package/dist/webVitals.web-DvScDIjX.cjs.map +1 -0
- package/dist/{xhrIntercept-BNiA41Mj.js → xhrIntercept-9uAkQh3N.js} +16 -14
- package/dist/xhrIntercept-9uAkQh3N.js.map +1 -0
- package/dist/xhrIntercept-xG1Yl5RI.cjs +2 -0
- package/dist/xhrIntercept-xG1Yl5RI.cjs.map +1 -0
- package/docs/migration-v4.md +1 -1
- package/docs/migration-v5.md +178 -0
- package/package.json +12 -4
- package/dist/appLifecycle-CECgRVu_.cjs +0 -2
- package/dist/appLifecycle-CECgRVu_.cjs.map +0 -1
- package/dist/appLifecycle-DQErzJIR.js.map +0 -1
- package/dist/batch-CwoO7noL.js +0 -56
- package/dist/batch-CwoO7noL.js.map +0 -1
- package/dist/batch-DNu8Xr9T.cjs +0 -2
- package/dist/batch-DNu8Xr9T.cjs.map +0 -1
- package/dist/crashCapture-BOJ8nSAZ.cjs +0 -4
- package/dist/crashCapture-BOJ8nSAZ.cjs.map +0 -1
- package/dist/crashCapture-BW8WuyaU.js +0 -70
- package/dist/crashCapture-BW8WuyaU.js.map +0 -1
- package/dist/crashHandler.web-8F_k2veo.js +0 -29
- package/dist/crashHandler.web-8F_k2veo.js.map +0 -1
- package/dist/crashHandler.web-CWmF56mJ.cjs +0 -2
- package/dist/crashHandler.web-CWmF56mJ.cjs.map +0 -1
- package/dist/crashHandlerNative.native-C2kSikDt.cjs +0 -2
- package/dist/crashHandlerNative.native-C2kSikDt.cjs.map +0 -1
- package/dist/crashHandlerNative.native-FupMnr1U.js.map +0 -1
- package/dist/deviceInfo.native-BJ-3Jj1T.js +0 -53
- package/dist/deviceInfo.native-BoeTZcD6.cjs +0 -2
- package/dist/frameTracker-CHG6sIx9.cjs +0 -2
- package/dist/frameTracker-CHG6sIx9.cjs.map +0 -1
- package/dist/frameTracker-DdB8W_kC.js.map +0 -1
- package/dist/index-BtLlV1HA.js +0 -57
- package/dist/index-BtLlV1HA.js.map +0 -1
- package/dist/index-C2XQ-EYw.js +0 -1122
- package/dist/index-C2XQ-EYw.js.map +0 -1
- package/dist/index-CXsVZY35.cjs +0 -2
- package/dist/index-CXsVZY35.cjs.map +0 -1
- package/dist/index-DLquF88M.cjs +0 -2
- package/dist/index-DLquF88M.cjs.map +0 -1
- package/dist/interactionWeb.web-Bl_cZlgh.cjs +0 -2
- package/dist/interceptFetchWeb.web-T88kO-bE.cjs +0 -2
- package/dist/interceptFetchWeb.web-T88kO-bE.cjs.map +0 -1
- package/dist/memoryNative.native-C42h9SjK.js.map +0 -1
- package/dist/memoryNative.native-CA-7w9w1.cjs +0 -2
- package/dist/memoryNative.native-CA-7w9w1.cjs.map +0 -1
- package/dist/memoryStore-BIGZmmfD.cjs +0 -2
- package/dist/memoryStore-BIGZmmfD.cjs.map +0 -1
- package/dist/memoryStore-F5I-GQKM.js +0 -193
- package/dist/memoryStore-F5I-GQKM.js.map +0 -1
- package/dist/nativeSender-CfQaRuDK.cjs +0 -2
- package/dist/nativeSender-CfQaRuDK.cjs.map +0 -1
- package/dist/nativeSender-pgVSIv-X.js +0 -59
- package/dist/nativeSender-pgVSIv-X.js.map +0 -1
- package/dist/navigationRef-BzYbs8cm.js +0 -28
- package/dist/navigationRef-BzYbs8cm.js.map +0 -1
- package/dist/navigationRef-C-_qhb43.cjs +0 -2
- package/dist/navigationRef-C-_qhb43.cjs.map +0 -1
- package/dist/navigationTracker-BmywA_Bg.js +0 -19
- package/dist/navigationTracker-BmywA_Bg.js.map +0 -1
- package/dist/navigationTracker-HkwVyywz.cjs +0 -2
- package/dist/navigationTracker-HkwVyywz.cjs.map +0 -1
- package/dist/navigationWeb.web-CW_z7Ca4.cjs +0 -2
- package/dist/navigationWeb.web-CW_z7Ca4.cjs.map +0 -1
- package/dist/navigationWeb.web-CcwgKuIZ.js +0 -55
- package/dist/navigationWeb.web-CcwgKuIZ.js.map +0 -1
- package/dist/networkChange-CUO1hRLj.cjs.map +0 -1
- package/dist/networkChange-D39hdSb0.js.map +0 -1
- package/dist/networkInfo.native-CGrx9cnH.js +0 -343
- package/dist/networkInfo.native-CGrx9cnH.js.map +0 -1
- package/dist/networkInfo.native-YVySdv3S.cjs +0 -2
- package/dist/networkInfo.native-YVySdv3S.cjs.map +0 -1
- package/dist/networkInfo.web-B2YlLNsI.js.map +0 -1
- package/dist/networkInfo.web-PltJTHsy.cjs.map +0 -1
- package/dist/runtimeReady.native-Bh7EcYmK.js +0 -14
- package/dist/runtimeReady.native-Bh7EcYmK.js.map +0 -1
- package/dist/runtimeReady.native-jUmuE1lV.cjs +0 -2
- package/dist/runtimeReady.native-jUmuE1lV.cjs.map +0 -1
- package/dist/seedRuntimeReady-BKwkBEAF.cjs +0 -2
- package/dist/src/adapters/navigationTracker.d.ts +0 -6
- package/dist/src/adapters/screenTiming.d.ts +0 -15
- package/dist/telemetry-ByDJIz_9.js +0 -1280
- package/dist/telemetry-ByDJIz_9.js.map +0 -1
- package/dist/telemetry-CrU7i1Jc.cjs +0 -2
- package/dist/telemetry-CrU7i1Jc.cjs.map +0 -1
- package/dist/uiInteraction-CdzvEI1p.cjs +0 -2
- package/dist/webSender-BIwslfpT.js +0 -63
- package/dist/webSender-BIwslfpT.js.map +0 -1
- package/dist/webSender-CVtE4sOF.cjs +0 -2
- package/dist/webSender-CVtE4sOF.cjs.map +0 -1
- package/dist/webVitals.web-CNIpsKlA.js.map +0 -1
- package/dist/webVitals.web-DpWJ-iYp.cjs +0 -2
- package/dist/webVitals.web-DpWJ-iYp.cjs.map +0 -1
- package/dist/xhrIntercept-BADex6Cq.cjs +0 -2
- package/dist/xhrIntercept-BADex6Cq.cjs.map +0 -1
- package/dist/xhrIntercept-BNiA41Mj.js.map +0 -1
|
@@ -0,0 +1,178 @@
|
|
|
1
|
+
# Migrating to v5 — @nathanclaire/edge-telemetry-sdk (React Native)
|
|
2
|
+
|
|
3
|
+
**Ships with the release, not after it.** v5 has **six breaking changes**. **Exactly one is visible
|
|
4
|
+
at compile time** — #1, the entry classes becoming type-only exports. The other five surface at
|
|
5
|
+
runtime or in a chart, which is why this note arrives with the release.
|
|
6
|
+
|
|
7
|
+
`docs/backend-wire-contract.md` is authoritative for every wire key — §12.6 for the notices below,
|
|
8
|
+
Appendix B for the sign-off asks. Where it and this note disagree, the contract wins. `CLAUDE.md`
|
|
9
|
+
explains the behaviour behind each entry. The source list is #156 §1.
|
|
10
|
+
|
|
11
|
+
---
|
|
12
|
+
|
|
13
|
+
## Read this first
|
|
14
|
+
|
|
15
|
+
- **v5 needs a backend that has signed contract Appendix B's A1–A14** — signed at the 5.0.0
|
|
16
|
+
release. Against an older collector, `task.complete` and `app.hang` rows and every new key below
|
|
17
|
+
are **dropped on ingest** behind a 2xx. See [The backend gate](#the-backend-gate-a1a14).
|
|
18
|
+
- **One change breaks a build**: `new TelemetryWeb()` / `new TelemetryNative()` no longer
|
|
19
|
+
compile. Use `createTelemetry()`, which every documented setup already does.
|
|
20
|
+
- **Five changes are runtime-only.** No compile error; the one log line any of them produces is
|
|
21
|
+
#6's dev-only rejected-batch warning.
|
|
22
|
+
- **Every one is separable only by `sdk.version`** (`5.0.0`), as in v4.
|
|
23
|
+
- **Most apps have nothing to change.** Everything v5 adds is additive; `autoTrackTaps` is opt-in, and
|
|
24
|
+
consent gating (`enabled: false`) is too.
|
|
25
|
+
|
|
26
|
+
---
|
|
27
|
+
|
|
28
|
+
## Breaking changes (6)
|
|
29
|
+
|
|
30
|
+
| # | Change | Visible | What breaks | Fix |
|
|
31
|
+
|---|---|---|---|---|
|
|
32
|
+
| 1 | `TelemetryWeb` / `TelemetryNative` are exported **as types only**; `createTelemetry()` is the only way to build one (#159) | **compile time** | `new TelemetryWeb(...)` / `new TelemetryNative(...)` — a type error, and a runtime `undefined` from untyped JS | `createTelemetry(opts)`. It is what runs the `apiKey` / `traceHostAllowlist` validation the constructor skipped. The types still import for annotations |
|
|
33
|
+
| 2 | **`navigation` and `screen.duration` are removed from the wire**; `screenEnd()` and `trackRoute()` become `@deprecated` no-ops, deleted in v6. `screenStart()` stays (#163) | chart | both tables stop receiving RN rows; calls to the two no-ops still compile and do nothing | read the `view` event — `view.time_spent` is the dwell, `view.name` the screen. Drop the two calls before v6 |
|
|
34
|
+
| 3 | **`view.name` from `attachNavigation` is the route names joined root to leaf with `/`** (#170) | chart | a dashboard keyed on a nested leaf name — `Details` is now `HomeTab/Details`. Top-level screens are unchanged | re-key the panel on the joined name. Under Expo Router you get the file-path template (`(tabs)/settings/index`) with no code beyond `attachNavigation(useNavigationContainerRef())` |
|
|
35
|
+
| 4 | **A route change is always a view boundary**, even after `screenStart()` (#169) | chart | an app that called `screenStart()` and then navigated had one long view in v4; it now has one per route, so `view` row counts rise and dwell per row falls | nothing, unless you relied on the pin. Call `screenStart()` from each screen's own effect |
|
|
36
|
+
| 5 | `react-native-device-info`, `@react-native-community/netinfo` and `react-native-get-random-values` are **externalized**, not bundled (#158) | runtime | the copy that runs is **your installed one**, not the one we built against. An old `device-info` lacks `supportedAbis` / `isLowRamDevice` / the battery reads, and those keys are then omitted | keep those packages current. Netinfo and get-random-values are still `dependencies`, so npm installs them |
|
|
37
|
+
| 6 | **§2.5 status handling and a draining `flush()`** (#162): a 4xx (except 429) drops the batch — no retry, no persist; a 429 requeues and halts until `X-RateLimit-Reset`; `flush()` drains up to 50 batches | runtime | a wrong `apiKey` used to fill the offline store and stay there; it is now dropped, with one `__DEV__` warning. `flush()` can reject on a 4xx or 429 | check the dev console for the rejected-batch warning — on a 401 it is the **only** signal you get, because the `rejected` count rides a row that never gets through |
|
|
38
|
+
|
|
39
|
+
**Plus the 4.x wire (#179).** Every event name changed to the processor's event catalogue and the
|
|
40
|
+
batch envelope changed shape. Nothing breaks in your code, but every dashboard keyed on a v4 name
|
|
41
|
+
does. The rename table is at the top of [`backend-wire-contract.md`](./backend-wire-contract.md).
|
|
42
|
+
|
|
43
|
+
---
|
|
44
|
+
|
|
45
|
+
## Notice only — what an existing series means at the boundary (B1–B5)
|
|
46
|
+
|
|
47
|
+
None needs backend work. Contract §12.6.
|
|
48
|
+
|
|
49
|
+
| # | Change | Effect |
|
|
50
|
+
|---|---|---|
|
|
51
|
+
| B1 | `navigation` / `screen.duration` removed (#2 above) | retires `navigation.from_screen`, the SDK's last explicit wire `null` — **omission is now universal** |
|
|
52
|
+
| B2 | joined `view.name` (#3 above) | nested values change; flat apps and Expo Router file paths are stable |
|
|
53
|
+
| B3 | `view.action_count` under `autoTrackTaps` | counts every `onPress`/`onLongPress` activation instead of named `trackTap()`s, so **the column's meaning is per app** |
|
|
54
|
+
| B4 | `sdk.drop_reason: rejected` gets its first producer (#6 above) | an arrival-shape change only |
|
|
55
|
+
| B5 | **consent-gated processes skip `app.start`** | `createTelemetry({ enabled: false })` never emits `app.start` for that process, so `COUNT(app.start)` undercounts launches in consent-gated apps |
|
|
56
|
+
|
|
57
|
+
Plus: **a web app that never wired `attachNavigation` now emits `view` rows per route.** v4's web
|
|
58
|
+
history path never ran, so it emitted no `view` row per route; v5 emits one per `pushState` /
|
|
59
|
+
`popstate` route, named by normalized path. More rows, not different ones.
|
|
60
|
+
|
|
61
|
+
---
|
|
62
|
+
|
|
63
|
+
## What v5 adds
|
|
64
|
+
|
|
65
|
+
All additive. Full detail in the [CHANGELOG](../CHANGELOG.md) and `CLAUDE.md`.
|
|
66
|
+
|
|
67
|
+
| Surface | What |
|
|
68
|
+
|---|---|
|
|
69
|
+
| `startSpan` / `withSpan` / `endSpan` | manual spans → one `task.complete` row per span, `completed` \| `failed` \| `abandoned` |
|
|
70
|
+
| `app.hang` | JS-thread stalls of 2–60 s, foreground only, never under `__DEV__` |
|
|
71
|
+
| `<EdgeErrorBoundary>` | a caught render error → `app.error`, `error.source: boundary`, `error.component_stack` |
|
|
72
|
+
| `markScreenReady()` / `useScreenReady()` | `view.ready_time` / `view.ready_outcome` on the `view` row; native `app.start.js_ready_ms` |
|
|
73
|
+
| `recordMetric` / `addBreadcrumb` / `startNewSession` | parity APIs; `session.reason` gains `manual` |
|
|
74
|
+
| `disable()` / `enable()` / `enabled` | consent kill-switch — while disabled nothing is sent and nothing is kept |
|
|
75
|
+
| device state | battery on native `app.crash` / `app.error` / `app.hang`; accessibility on `session.started` |
|
|
76
|
+
| `autoTrackTaps` | native, opt-in: automatic `onPress` (`tap`) and `onLongPress` (`long_press`) capture |
|
|
77
|
+
|
|
78
|
+
---
|
|
79
|
+
|
|
80
|
+
## The backend gate (A1–A14)
|
|
81
|
+
|
|
82
|
+
v5 ships two new event names and fourteen asks, each needing a sign-off line in contract Appendix B.
|
|
83
|
+
All fourteen were signed at the 5.0.0 release; a collector that predates the sign-off drops these
|
|
84
|
+
rows or keys on ingest:
|
|
85
|
+
|
|
86
|
+
| Ask | Affected until signed |
|
|
87
|
+
|---|---|
|
|
88
|
+
| A1–A3 | `task.complete` rows, `trace.root_type: custom`, `span.duration_ms` on a root |
|
|
89
|
+
| A4 | `app.hang` rows — **plus** the processor fix to read dotted `hang.duration_ms` |
|
|
90
|
+
| A5–A6 | `error.source: boundary`, `error.component_stack` |
|
|
91
|
+
| A7 | `view.ready_time`, `view.ready_outcome` dropped |
|
|
92
|
+
| A8 | nothing dropped — confirms `app.start.js_ready_ms` (already on v4's signed `app.start`) is native-only |
|
|
93
|
+
| A9 | `session.reason: manual` |
|
|
94
|
+
| A10 | `device.battery_level`, `.battery_charging`, `.power_save` |
|
|
95
|
+
| A11 | `device.reduce_motion`, `device.screen_reader`, `device.font_scale` |
|
|
96
|
+
| A12–A13 | native `ui.name_source: test_id`, `ui.type: long_press` |
|
|
97
|
+
| A14 | nothing dropped — the ladder amendment (#4 above) is semantic, no key |
|
|
98
|
+
|
|
99
|
+
Open rulings C1–C10 (Appendix C) do **not** block: v5 ships the current behaviour for each, and a
|
|
100
|
+
ruling that flips one becomes its own ticket.
|
|
101
|
+
|
|
102
|
+
---
|
|
103
|
+
|
|
104
|
+
## Departures from the sibling SDKs
|
|
105
|
+
|
|
106
|
+
New in v5, recorded so the next diff does not file a decision as drift. v4's five departures from
|
|
107
|
+
Android (contract §13) all still stand.
|
|
108
|
+
|
|
109
|
+
| Departure | Sibling | Why |
|
|
110
|
+
|---|---|---|
|
|
111
|
+
| **`addBreadcrumb(name, data?)`** — no `category`, no `level` | Android, Flutter | the shared ring is debugging context on `app.crash` / `app.hang`, not a log; ≤8 data keys, values capped 255 |
|
|
112
|
+
| **`disable()` discards the backlog** — memory queue and offline store | iOS keeps it | an opt-out means nothing sent *and nothing kept*; a backlog held through an opt-out is data kept without consent |
|
|
113
|
+
| **`app.hang` is the JS thread only** — no stack, no ANR | Android's main-thread ANR | pure JS: no native module, so by the time anything can look the frozen code has returned |
|
|
114
|
+
| ⚠ **`device.screen_reader`, `device.font_scale`, `error.component_stack`** | none — RN inventions | no sibling precedent; their sign-off lines (A6, A11) are decisions, not confirmations |
|
|
115
|
+
| **`autoTrackTaps` never reads text or accessibility labels** | — | `"Pay John Kamau KES 5,000"` is what a label rung ships; the ladder is `trackTap` > `testID` > `unnamed` |
|
|
116
|
+
|
|
117
|
+
---
|
|
118
|
+
|
|
119
|
+
## Columns RN will never write — what moved
|
|
120
|
+
|
|
121
|
+
[v4's table](./migration-v4.md#columns-rn-will-never-write) still holds, with these changes:
|
|
122
|
+
|
|
123
|
+
| Table / columns | v5 |
|
|
124
|
+
|---|---|
|
|
125
|
+
| `rum_errors.hang_duration_ms` | **now produced** — by `app.hang`'s `hang.duration_ms`, once A4's processor fix lands (NULL for every SDK until then). `anr_duration_ms`, `crash_thread`, `crash_is_main_thread` stay empty: still JS-level only |
|
|
126
|
+
| `device.battery_level` / `battery_charging` / `power_save` | **now produced**, native failure rows only (A10). Out of v4's deferred bundle — a JS read through device-info, no native module |
|
|
127
|
+
| `rum_navigations` / `rum_navigation_events`, `rum_screen_durations` | **no RN rows on either build** — both feeds are removed (#2) |
|
|
128
|
+
| `rum_ui_interactions` `ui_direction` | still empty — swipe, scroll and pinch were ruled out of v5. `ui.type` gains only `long_press` |
|
|
129
|
+
| `device.thermal_status`, `device.cpu_cores`, `app.exit`, native signal/ANR capture | still deferred as v4's native-module bundle |
|
|
130
|
+
|
|
131
|
+
---
|
|
132
|
+
|
|
133
|
+
## Deprecated, still live
|
|
134
|
+
|
|
135
|
+
- `screenEnd()` / `trackRoute()` — no-ops since v5, **deleted in v6**.
|
|
136
|
+
- The six `UserProfile` fields (`fullName`, `firstName`, `lastName`, `avatar`, `createdAt`,
|
|
137
|
+
`updatedAt`) — still `@deprecated` and still live; their removal is **deferred to v6** rather than
|
|
138
|
+
added to this release's break list. `fullName` still builds `user.name`.
|
|
139
|
+
|
|
140
|
+
---
|
|
141
|
+
|
|
142
|
+
## Known gaps
|
|
143
|
+
|
|
144
|
+
### v5 adds
|
|
145
|
+
|
|
146
|
+
Each is in `CLAUDE.md`'s Known gaps with its reasoning.
|
|
147
|
+
|
|
148
|
+
- **Manual spans** — a span outliving the 10 s root cap keeps its root's ids, but later requests mint
|
|
149
|
+
their own root, so a long journey's `rum.action.id` covers only its first ten seconds of requests.
|
|
150
|
+
A superseded span emits nothing.
|
|
151
|
+
- **`app.hang`** — no stack, ever; a stall that never ends (the OS kills it) emits nothing; only the
|
|
152
|
+
JS thread is seen; `hang.duration_ms` under-reports by up to one tick.
|
|
153
|
+
- **Error boundary** — on React ≤18 web **dev** builds, React re-throws a render error to
|
|
154
|
+
`window.onerror` before the boundary sees it, so it can also ship as `app.crash`; a thrown
|
|
155
|
+
non-object is not deduped; on React 18 with `captureConsole` on, a
|
|
156
|
+
caught error can add a `console` row beside the `boundary` one.
|
|
157
|
+
- **`view.ready_*`** — a screen's first visit in a process can't be judged `abandoned`; a mark
|
|
158
|
+
landing after a tab-away is lost.
|
|
159
|
+
- **Launch counting** — consent-gated processes skip `app.start` (B5).
|
|
160
|
+
- **Consent** — `disable()` lasts one process (the host keeps the consent record); a batch already
|
|
161
|
+
in flight still completes.
|
|
162
|
+
- **Accessibility** — a mid-session toggle is missed; a resumed session carries its launch's state.
|
|
163
|
+
- **Battery** — up to 60 s stale; coverage equals `react-native-device-info` install coverage.
|
|
164
|
+
- **`autoTrackTaps`** — non-tap `onPress` callbacks (map markers, libraries) also emit;
|
|
165
|
+
`view.action_count` changes meaning for opted-in apps (B3).
|
|
166
|
+
|
|
167
|
+
### v5 closes
|
|
168
|
+
|
|
169
|
+
- `flush()` sent one batch per call — it now drains (#162).
|
|
170
|
+
- `sdk.drop_reason: rejected` had no producer — a 4xx now books it (#162).
|
|
171
|
+
- web shipped `navigation` with the query string, and emitted `navigation` at all (#163).
|
|
172
|
+
- `screenStart()` could pin a view across route changes (#169).
|
|
173
|
+
- `apiKey` / allowlist / `sdk.platform` validation could be bypassed with `new` (#159).
|
|
174
|
+
- the vitals tracker kept running after `shutdown()` (#160).
|
|
175
|
+
- shared `trackErrors()` imported the native crash handler (#160).
|
|
176
|
+
- web tabs diverged on the shared session record (#161).
|
|
177
|
+
- a synchronously-throwing XHR `send()` left its `request` root live (#160).
|
|
178
|
+
- `app.start.js_ready_ms` was specified and not built (#171).
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@nathanclaire/edge-telemetry-sdk",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "5.0.1",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"access": "public"
|
|
@@ -32,7 +32,8 @@
|
|
|
32
32
|
},
|
|
33
33
|
"files": [
|
|
34
34
|
"dist",
|
|
35
|
-
"docs/migration-v4.md"
|
|
35
|
+
"docs/migration-v4.md",
|
|
36
|
+
"docs/migration-v5.md"
|
|
36
37
|
],
|
|
37
38
|
"peerDependencies": {
|
|
38
39
|
"@react-native-async-storage/async-storage": ">=1.21.0",
|
|
@@ -78,15 +79,19 @@
|
|
|
78
79
|
"url": "https://github.com/NCG-Africa/edge_telemetry_react_native/issues"
|
|
79
80
|
},
|
|
80
81
|
"devDependencies": {
|
|
82
|
+
"@react-navigation/core": "^7.24.0",
|
|
81
83
|
"@types/node": "^24.4.0",
|
|
82
84
|
"@types/react": "^19.1.13",
|
|
83
85
|
"@types/react-dom": "^19.1.9",
|
|
84
86
|
"@types/react-navigation": "^3.0.8",
|
|
87
|
+
"@types/react-test-renderer": "^19.3.0",
|
|
85
88
|
"@vitejs/plugin-react": "^5.0.2",
|
|
86
|
-
"
|
|
89
|
+
"react": "^19.1.1",
|
|
90
|
+
"react-test-renderer": "^19.1.1",
|
|
91
|
+
"rimraf": "^6.1.4",
|
|
87
92
|
"typescript": "^5.9.2",
|
|
88
93
|
"vite": "^7.1.5",
|
|
89
|
-
"vite-plugin-dts": "^
|
|
94
|
+
"vite-plugin-dts": "^5.1.2",
|
|
90
95
|
"vitest": "^4.1.9"
|
|
91
96
|
},
|
|
92
97
|
"dependencies": {
|
|
@@ -95,5 +100,8 @@
|
|
|
95
100
|
"react-native-device-info": "^12.0.0",
|
|
96
101
|
"react-native-get-random-values": "^1.11.0",
|
|
97
102
|
"web-vitals": "^6.2.1"
|
|
103
|
+
},
|
|
104
|
+
"overrides": {
|
|
105
|
+
"image-size": "^2.0.3"
|
|
98
106
|
}
|
|
99
107
|
}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});class r{constructor(e){this.telemetry=e}async onState(e){const t=this.active;this.active=e,!(t===void 0||t===e)&&(await this.telemetry.log("app_lifecycle",{"app_lifecycle.state":e?"foreground":"background"}),e?this.telemetry.views.foreground():(await this.telemetry.views.background(),this.telemetry.trace.clear()))}}exports.AppLifecycleEmitter=r;
|
|
2
|
-
//# sourceMappingURL=appLifecycle-CECgRVu_.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appLifecycle-CECgRVu_.cjs","sources":["../src/adapters/appLifecycle.ts"],"sourcesContent":["import { Telemetry } from \"../core/telemetry\";\n\n/**\n * Shared foreground/background emitter — the single source of truth so the native\n * (RN AppState) and web (visibilitychange) lifecycle adapters stay in lockstep on the\n * v3 `app_lifecycle` contract (#30).\n *\n * Feed it the current active state via `onState(isActive)`. It emits `app_lifecycle` only\n * on a transition, carrying the direction as `app_lifecycle.state` (foreground|background).\n */\nexport class AppLifecycleEmitter {\n private active?: boolean;\n\n constructor(private telemetry: Telemetry) {}\n\n /**\n * Returns once the transition's rows are enqueued — **await it before flushing**. The\n * background boundary's `view` row is the one most likely to be lost to an OS kill, and\n * the whole point of §4.5's background boundary is that it flushes while the app is still\n * reliably alive. A caller that fires the flush on the next line instead sends the batch\n * before the row exists.\n */\n async onState(isActive: boolean): Promise<void> {\n const previous = this.active;\n this.active = isActive;\n if (previous === undefined || previous === isActive) return;\n\n // Chained, not fired alongside, so the `app_lifecycle` row lands in the view it happened\n // in — awaited because a consumer-supplied double may return a plain value.\n await this.telemetry.log(\"app_lifecycle\", {\n \"app_lifecycle.state\": isActive ? \"foreground\" : \"background\",\n });\n // The view ends and emits, and the successor's clock starts paused so a night spent\n // backgrounded is not charged as dwell to the screen the user left open.\n if (isActive) this.telemetry.views.foreground();\n else {\n await this.telemetry.views.background();\n // Background clears the live root on both builds (§6.2), so a resumed app's first\n // fetch mints its own root rather than joining an action from before the user left.\n // *After* the view boundary, not before: the successor view is minted in there, and\n // clearing first would leave its freshly-minted `navigation` root as the carrier the\n // resumed app then joins.\n this.telemetry.trace.clear();\n }\n }\n}\n"],"names":["AppLifecycleEmitter","telemetry","isActive","previous"],"mappings":"gFAUO,MAAMA,CAAoB,CAG/B,YAAoBC,EAAsB,CAAtB,KAAA,UAAAA,CAAuB,CAS3C,MAAM,QAAQC,EAAkC,CAC9C,MAAMC,EAAW,KAAK,OACtB,KAAK,OAASD,EACV,EAAAC,IAAa,QAAaA,IAAaD,KAI3C,MAAM,KAAK,UAAU,IAAI,gBAAiB,CACxC,sBAAuBA,EAAW,aAAe,YAAA,CAClD,EAGGA,EAAU,KAAK,UAAU,MAAM,WAAA,GAEjC,MAAM,KAAK,UAAU,MAAM,WAAA,EAM3B,KAAK,UAAU,MAAM,MAAA,GAEzB,CACF"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"appLifecycle-DQErzJIR.js","sources":["../src/adapters/appLifecycle.ts"],"sourcesContent":["import { Telemetry } from \"../core/telemetry\";\n\n/**\n * Shared foreground/background emitter — the single source of truth so the native\n * (RN AppState) and web (visibilitychange) lifecycle adapters stay in lockstep on the\n * v3 `app_lifecycle` contract (#30).\n *\n * Feed it the current active state via `onState(isActive)`. It emits `app_lifecycle` only\n * on a transition, carrying the direction as `app_lifecycle.state` (foreground|background).\n */\nexport class AppLifecycleEmitter {\n private active?: boolean;\n\n constructor(private telemetry: Telemetry) {}\n\n /**\n * Returns once the transition's rows are enqueued — **await it before flushing**. The\n * background boundary's `view` row is the one most likely to be lost to an OS kill, and\n * the whole point of §4.5's background boundary is that it flushes while the app is still\n * reliably alive. A caller that fires the flush on the next line instead sends the batch\n * before the row exists.\n */\n async onState(isActive: boolean): Promise<void> {\n const previous = this.active;\n this.active = isActive;\n if (previous === undefined || previous === isActive) return;\n\n // Chained, not fired alongside, so the `app_lifecycle` row lands in the view it happened\n // in — awaited because a consumer-supplied double may return a plain value.\n await this.telemetry.log(\"app_lifecycle\", {\n \"app_lifecycle.state\": isActive ? \"foreground\" : \"background\",\n });\n // The view ends and emits, and the successor's clock starts paused so a night spent\n // backgrounded is not charged as dwell to the screen the user left open.\n if (isActive) this.telemetry.views.foreground();\n else {\n await this.telemetry.views.background();\n // Background clears the live root on both builds (§6.2), so a resumed app's first\n // fetch mints its own root rather than joining an action from before the user left.\n // *After* the view boundary, not before: the successor view is minted in there, and\n // clearing first would leave its freshly-minted `navigation` root as the carrier the\n // resumed app then joins.\n this.telemetry.trace.clear();\n }\n }\n}\n"],"names":["AppLifecycleEmitter","telemetry","isActive","previous"],"mappings":"AAUO,MAAMA,EAAoB;AAAA,EAG/B,YAAoBC,GAAsB;AAAtB,SAAA,YAAAA;AAAA,EAAuB;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,EAS3C,MAAM,QAAQC,GAAkC;AAC9C,UAAMC,IAAW,KAAK;AAEtB,IADA,KAAK,SAASD,GACV,EAAAC,MAAa,UAAaA,MAAaD,OAI3C,MAAM,KAAK,UAAU,IAAI,iBAAiB;AAAA,MACxC,uBAAuBA,IAAW,eAAe;AAAA,IAAA,CAClD,GAGGA,IAAU,KAAK,UAAU,MAAM,WAAA,KAEjC,MAAM,KAAK,UAAU,MAAM,WAAA,GAM3B,KAAK,UAAU,MAAM,MAAA;AAAA,EAEzB;AACF;"}
|
package/dist/batch-CwoO7noL.js
DELETED
|
@@ -1,56 +0,0 @@
|
|
|
1
|
-
import { evictIndex as a } from "./telemetry-ByDJIz_9.js";
|
|
2
|
-
const p = "telemetry_failed_events";
|
|
3
|
-
function y(e) {
|
|
4
|
-
if (e.status !== "hit") return [];
|
|
5
|
-
try {
|
|
6
|
-
const n = JSON.parse(e.value);
|
|
7
|
-
return Array.isArray(n) ? n : [];
|
|
8
|
-
} catch {
|
|
9
|
-
return [];
|
|
10
|
-
}
|
|
11
|
-
}
|
|
12
|
-
const l = 500, d = 1e6, u = (e) => typeof TextEncoder < "u" ? new TextEncoder().encode(e).length : e.length;
|
|
13
|
-
function g(e, n) {
|
|
14
|
-
const t = [...e, ...n];
|
|
15
|
-
let r = 0;
|
|
16
|
-
for (; t.length > l; )
|
|
17
|
-
t.splice(a(t), 1), r++;
|
|
18
|
-
const o = t.map((i) => u(JSON.stringify(i)));
|
|
19
|
-
let s = o.reduce((i, c) => i + c, 0) + Math.max(t.length - 1, 0) + 2;
|
|
20
|
-
for (; s > d && t.length > 0; ) {
|
|
21
|
-
const i = a(t);
|
|
22
|
-
s -= o[i] + (t.length > 1 ? 1 : 0), o.splice(i, 1), t.splice(i, 1), r++;
|
|
23
|
-
}
|
|
24
|
-
return { json: JSON.stringify(t), dropped: r };
|
|
25
|
-
}
|
|
26
|
-
function f(e) {
|
|
27
|
-
let n;
|
|
28
|
-
return () => n ??= e().finally(() => {
|
|
29
|
-
n = void 0;
|
|
30
|
-
});
|
|
31
|
-
}
|
|
32
|
-
function E(e) {
|
|
33
|
-
return JSON.stringify({
|
|
34
|
-
type: "telemetry_batch",
|
|
35
|
-
timestamp: (/* @__PURE__ */ new Date()).toISOString(),
|
|
36
|
-
batch_size: e.length,
|
|
37
|
-
events: e
|
|
38
|
-
});
|
|
39
|
-
}
|
|
40
|
-
function S(e) {
|
|
41
|
-
return {
|
|
42
|
-
"Content-Type": "application/json",
|
|
43
|
-
...e ? { "X-API-Key": e, Authorization: `Bearer ${e}` } : {}
|
|
44
|
-
};
|
|
45
|
-
}
|
|
46
|
-
const _ = "https://your.telemetry.endpoint/telemetry";
|
|
47
|
-
export {
|
|
48
|
-
_ as D,
|
|
49
|
-
p as F,
|
|
50
|
-
S as a,
|
|
51
|
-
E as b,
|
|
52
|
-
y as d,
|
|
53
|
-
g as e,
|
|
54
|
-
f as g
|
|
55
|
-
};
|
|
56
|
-
//# sourceMappingURL=batch-CwoO7noL.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"batch-CwoO7noL.js","sources":["../src/adapters/failedEvents.ts","../src/adapters/batch.ts"],"sourcesContent":["import type { StoreRead } from \"../core/store\";\nimport { evictIndex, type TelemetryEvent } from \"../core/telemetry\";\n\n// The offline queue's shared, platform-agnostic half (#89). Both senders keep failed\n// batches under one key; only the Store underneath them differs, so the decoding rules\n// live here once and stay in lockstep.\n\nexport const FAILED_EVENTS_KEY = \"telemetry_failed_events\";\n\n/**\n * Decode a stored batch.\n *\n * The Store port never throws, and neither does this. An unavailable store, a key that\n * was never written, a half-written payload and a non-array JSON value all mean the\n * same thing to a caller — nothing replayable — so they all return `[]`. Before the\n * port, this was a bare `JSON.parse(... || \"[]\")` that threw straight through\n * `replayFailed()` on any corrupt payload and took startup with it.\n */\nexport function decodeFailed(read: StoreRead): TelemetryEvent[] {\n if (read.status !== \"hit\") return [];\n try {\n const parsed = JSON.parse(read.value);\n return Array.isArray(parsed) ? parsed : [];\n } catch {\n return [];\n }\n}\n\n/**\n * The offline store's cap (§9.4). Real numbers, not chosen ones: Android caps AsyncStorage\n * at 6 MB for the whole app and web `localStorage` is the *host app's* ~5 MB — an\n * append-only telemetry queue inside either is a slow eviction of the consumer's own data.\n */\nexport const STORE_MAX_EVENTS = 500;\nexport const STORE_MAX_BYTES = 1_000_000;\n\n/** UTF-8 length where the runtime offers it. RN (Hermes) and every browser do; be safe anyway. */\nconst byteLength = (s: string): number =>\n typeof TextEncoder !== \"undefined\" ? new TextEncoder().encode(s).length : s.length;\n\n/**\n * Encode the queue after appending `incoming`, oldest first, capped per §9.4 and\n * reporting how many rows the cap cost.\n *\n * The caller books the count as `sdk.drop_reason = \"store_full\"`; returning it rather\n * than counting in here keeps this module free of the Telemetry instance it would\n * otherwise need a handle on.\n */\nexport function encodeFailed(\n existing: TelemetryEvent[],\n incoming: TelemetryEvent[],\n): { json: string; dropped: number } {\n const kept = [...existing, ...incoming];\n let dropped = 0;\n\n while (kept.length > STORE_MAX_EVENTS) { kept.splice(evictIndex(kept), 1); dropped++; }\n\n // Sized once per event, not once per eviction: a 500-event backlog of 100 KiB events\n // (the collector's per-event ceiling) would otherwise re-stringify ~50 MB per drop.\n // 2 for the brackets, 1 per separating comma.\n const sizes = kept.map(e => byteLength(JSON.stringify(e)));\n let total = sizes.reduce((a, b) => a + b, 0) + Math.max(kept.length - 1, 0) + 2;\n while (total > STORE_MAX_BYTES && kept.length > 0) {\n const i = evictIndex(kept);\n total -= sizes[i] + (kept.length > 1 ? 1 : 0); // no separating comma to reclaim on the last row\n sizes.splice(i, 1);\n kept.splice(i, 1);\n dropped++;\n }\n\n return { json: JSON.stringify(kept), dropped };\n}\n\n/**\n * One drain per sender, however many callers there are (#113).\n *\n * `takeFailed()` clears the key before the send is attempted, so a *single* drain can\n * never double-send. Two concurrent drains can: both read the payload before either\n * removes it, and the recovered batch goes out twice — worst exactly when the network\n * was bad, which is when the data mattered. Returning the in-flight promise makes the\n * second caller a no-op that still awaits the first, and the guard is per-sender rather\n * than per-module so two `Telemetry` instances in one process keep their own.\n */\nexport function guardedDrain(drain: () => Promise<void>): () => Promise<void> {\n let inFlight: Promise<void> | undefined;\n return () => (inFlight ??= drain().finally(() => { inFlight = undefined; }));\n}\n","import type { TelemetryEvent } from \"../core/telemetry\";\n\n// v3 wire envelope. Shared by both senders so the web and native POST bodies\n// stay byte-identical to the EdgeRum telemetry_batch contract.\nexport function buildBatch(events: TelemetryEvent[]): string {\n return JSON.stringify({\n type: \"telemetry_batch\",\n timestamp: new Date().toISOString(),\n batch_size: events.length,\n events,\n });\n}\n\n// Auth (#90, contract §11.1). The collector's credentialFromRequest reads Authorization under\n// AUTH_MODE=jwt and X-API-Key otherwise — exactly one, never both. Sending both, always, with\n// the same value makes one build work in the shared and the segmented (bank / on-prem)\n// topologies with no mode flag. Do not sniff the credential's shape to pick a header.\nexport function buildHeaders(credential: string | undefined): Record<string, string> {\n return {\n \"Content-Type\": \"application/json\",\n ...(credential ? { \"X-API-Key\": credential, \"Authorization\": `Bearer ${credential}` } : {}),\n };\n}\n\n// Placeholder host — always pass a real `endpoint`. The path is the collector's real one:\n// it terminates POST /telemetry (contract §11.1). Shared so the two senders cannot drift.\nexport const DEFAULT_ENDPOINT = \"https://your.telemetry.endpoint/telemetry\";\n"],"names":["FAILED_EVENTS_KEY","decodeFailed","read","parsed","STORE_MAX_EVENTS","STORE_MAX_BYTES","byteLength","s","encodeFailed","existing","incoming","kept","dropped","evictIndex","sizes","e","total","a","b","guardedDrain","drain","inFlight","buildBatch","events","buildHeaders","credential","DEFAULT_ENDPOINT"],"mappings":";AAOO,MAAMA,IAAoB;AAW1B,SAASC,EAAaC,GAAmC;AAC5D,MAAIA,EAAK,WAAW,MAAO,QAAO,CAAA;AAClC,MAAI;AACA,UAAMC,IAAS,KAAK,MAAMD,EAAK,KAAK;AACpC,WAAO,MAAM,QAAQC,CAAM,IAAIA,IAAS,CAAA;AAAA,EAC5C,QAAQ;AACJ,WAAO,CAAA;AAAA,EACX;AACJ;AAOO,MAAMC,IAAmB,KACnBC,IAAkB,KAGzBC,IAAa,CAACC,MAChB,OAAO,cAAgB,MAAc,IAAI,YAAA,EAAc,OAAOA,CAAC,EAAE,SAASA,EAAE;AAUzE,SAASC,EACZC,GACAC,GACiC;AACjC,QAAMC,IAAO,CAAC,GAAGF,GAAU,GAAGC,CAAQ;AACtC,MAAIE,IAAU;AAEd,SAAOD,EAAK,SAASP;AAAoB,IAAAO,EAAK,OAAOE,EAAWF,CAAI,GAAG,CAAC,GAAGC;AAK3E,QAAME,IAAQH,EAAK,IAAI,CAAAI,MAAKT,EAAW,KAAK,UAAUS,CAAC,CAAC,CAAC;AACzD,MAAIC,IAAQF,EAAM,OAAO,CAACG,GAAGC,MAAMD,IAAIC,GAAG,CAAC,IAAI,KAAK,IAAIP,EAAK,SAAS,GAAG,CAAC,IAAI;AAC9E,SAAOK,IAAQX,KAAmBM,EAAK,SAAS,KAAG;AAC/C,UAAM,IAAIE,EAAWF,CAAI;AACzB,IAAAK,KAASF,EAAM,CAAC,KAAKH,EAAK,SAAS,IAAI,IAAI,IAC3CG,EAAM,OAAO,GAAG,CAAC,GACjBH,EAAK,OAAO,GAAG,CAAC,GAChBC;AAAA,EACJ;AAEA,SAAO,EAAE,MAAM,KAAK,UAAUD,CAAI,GAAG,SAAAC,EAAA;AACzC;AAYO,SAASO,EAAaC,GAAiD;AAC1E,MAAIC;AACJ,SAAO,MAAOA,MAAaD,EAAA,EAAQ,QAAQ,MAAM;AAAE,IAAAC,IAAW;AAAA,EAAW,CAAC;AAC9E;AClFO,SAASC,EAAWC,GAAkC;AACzD,SAAO,KAAK,UAAU;AAAA,IAClB,MAAM;AAAA,IACN,YAAW,oBAAI,KAAA,GAAO,YAAA;AAAA,IACtB,YAAYA,EAAO;AAAA,IACnB,QAAAA;AAAA,EAAA,CACH;AACL;AAMO,SAASC,EAAaC,GAAwD;AACjF,SAAO;AAAA,IACH,gBAAgB;AAAA,IAChB,GAAIA,IAAa,EAAE,aAAaA,GAAY,eAAiB,UAAUA,CAAU,OAAO,CAAA;AAAA,EAAC;AAEjG;AAIO,MAAMC,IAAmB;"}
|
package/dist/batch-DNu8Xr9T.cjs
DELETED
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";const l=require("./telemetry-CrU7i1Jc.cjs"),s="telemetry_failed_events";function a(e){if(e.status!=="hit")return[];try{const n=JSON.parse(e.value);return Array.isArray(n)?n:[]}catch{return[]}}const u=500,h=1e6,E=e=>typeof TextEncoder<"u"?new TextEncoder().encode(e).length:e.length;function y(e,n){const t=[...e,...n];let r=0;for(;t.length>u;)t.splice(l.evictIndex(t),1),r++;const o=t.map(i=>E(JSON.stringify(i)));let c=o.reduce((i,d)=>i+d,0)+Math.max(t.length-1,0)+2;for(;c>h&&t.length>0;){const i=l.evictIndex(t);c-=o[i]+(t.length>1?1:0),o.splice(i,1),t.splice(i,1),r++}return{json:JSON.stringify(t),dropped:r}}function p(e){let n;return()=>n??=e().finally(()=>{n=void 0})}function g(e){return JSON.stringify({type:"telemetry_batch",timestamp:new Date().toISOString(),batch_size:e.length,events:e})}function _(e){return{"Content-Type":"application/json",...e?{"X-API-Key":e,Authorization:`Bearer ${e}`}:{}}}const f="https://your.telemetry.endpoint/telemetry";exports.DEFAULT_ENDPOINT=f;exports.FAILED_EVENTS_KEY=s;exports.buildBatch=g;exports.buildHeaders=_;exports.decodeFailed=a;exports.encodeFailed=y;exports.guardedDrain=p;
|
|
2
|
-
//# sourceMappingURL=batch-DNu8Xr9T.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"batch-DNu8Xr9T.cjs","sources":["../src/adapters/failedEvents.ts","../src/adapters/batch.ts"],"sourcesContent":["import type { StoreRead } from \"../core/store\";\nimport { evictIndex, type TelemetryEvent } from \"../core/telemetry\";\n\n// The offline queue's shared, platform-agnostic half (#89). Both senders keep failed\n// batches under one key; only the Store underneath them differs, so the decoding rules\n// live here once and stay in lockstep.\n\nexport const FAILED_EVENTS_KEY = \"telemetry_failed_events\";\n\n/**\n * Decode a stored batch.\n *\n * The Store port never throws, and neither does this. An unavailable store, a key that\n * was never written, a half-written payload and a non-array JSON value all mean the\n * same thing to a caller — nothing replayable — so they all return `[]`. Before the\n * port, this was a bare `JSON.parse(... || \"[]\")` that threw straight through\n * `replayFailed()` on any corrupt payload and took startup with it.\n */\nexport function decodeFailed(read: StoreRead): TelemetryEvent[] {\n if (read.status !== \"hit\") return [];\n try {\n const parsed = JSON.parse(read.value);\n return Array.isArray(parsed) ? parsed : [];\n } catch {\n return [];\n }\n}\n\n/**\n * The offline store's cap (§9.4). Real numbers, not chosen ones: Android caps AsyncStorage\n * at 6 MB for the whole app and web `localStorage` is the *host app's* ~5 MB — an\n * append-only telemetry queue inside either is a slow eviction of the consumer's own data.\n */\nexport const STORE_MAX_EVENTS = 500;\nexport const STORE_MAX_BYTES = 1_000_000;\n\n/** UTF-8 length where the runtime offers it. RN (Hermes) and every browser do; be safe anyway. */\nconst byteLength = (s: string): number =>\n typeof TextEncoder !== \"undefined\" ? new TextEncoder().encode(s).length : s.length;\n\n/**\n * Encode the queue after appending `incoming`, oldest first, capped per §9.4 and\n * reporting how many rows the cap cost.\n *\n * The caller books the count as `sdk.drop_reason = \"store_full\"`; returning it rather\n * than counting in here keeps this module free of the Telemetry instance it would\n * otherwise need a handle on.\n */\nexport function encodeFailed(\n existing: TelemetryEvent[],\n incoming: TelemetryEvent[],\n): { json: string; dropped: number } {\n const kept = [...existing, ...incoming];\n let dropped = 0;\n\n while (kept.length > STORE_MAX_EVENTS) { kept.splice(evictIndex(kept), 1); dropped++; }\n\n // Sized once per event, not once per eviction: a 500-event backlog of 100 KiB events\n // (the collector's per-event ceiling) would otherwise re-stringify ~50 MB per drop.\n // 2 for the brackets, 1 per separating comma.\n const sizes = kept.map(e => byteLength(JSON.stringify(e)));\n let total = sizes.reduce((a, b) => a + b, 0) + Math.max(kept.length - 1, 0) + 2;\n while (total > STORE_MAX_BYTES && kept.length > 0) {\n const i = evictIndex(kept);\n total -= sizes[i] + (kept.length > 1 ? 1 : 0); // no separating comma to reclaim on the last row\n sizes.splice(i, 1);\n kept.splice(i, 1);\n dropped++;\n }\n\n return { json: JSON.stringify(kept), dropped };\n}\n\n/**\n * One drain per sender, however many callers there are (#113).\n *\n * `takeFailed()` clears the key before the send is attempted, so a *single* drain can\n * never double-send. Two concurrent drains can: both read the payload before either\n * removes it, and the recovered batch goes out twice — worst exactly when the network\n * was bad, which is when the data mattered. Returning the in-flight promise makes the\n * second caller a no-op that still awaits the first, and the guard is per-sender rather\n * than per-module so two `Telemetry` instances in one process keep their own.\n */\nexport function guardedDrain(drain: () => Promise<void>): () => Promise<void> {\n let inFlight: Promise<void> | undefined;\n return () => (inFlight ??= drain().finally(() => { inFlight = undefined; }));\n}\n","import type { TelemetryEvent } from \"../core/telemetry\";\n\n// v3 wire envelope. Shared by both senders so the web and native POST bodies\n// stay byte-identical to the EdgeRum telemetry_batch contract.\nexport function buildBatch(events: TelemetryEvent[]): string {\n return JSON.stringify({\n type: \"telemetry_batch\",\n timestamp: new Date().toISOString(),\n batch_size: events.length,\n events,\n });\n}\n\n// Auth (#90, contract §11.1). The collector's credentialFromRequest reads Authorization under\n// AUTH_MODE=jwt and X-API-Key otherwise — exactly one, never both. Sending both, always, with\n// the same value makes one build work in the shared and the segmented (bank / on-prem)\n// topologies with no mode flag. Do not sniff the credential's shape to pick a header.\nexport function buildHeaders(credential: string | undefined): Record<string, string> {\n return {\n \"Content-Type\": \"application/json\",\n ...(credential ? { \"X-API-Key\": credential, \"Authorization\": `Bearer ${credential}` } : {}),\n };\n}\n\n// Placeholder host — always pass a real `endpoint`. The path is the collector's real one:\n// it terminates POST /telemetry (contract §11.1). Shared so the two senders cannot drift.\nexport const DEFAULT_ENDPOINT = \"https://your.telemetry.endpoint/telemetry\";\n"],"names":["FAILED_EVENTS_KEY","decodeFailed","read","parsed","STORE_MAX_EVENTS","STORE_MAX_BYTES","byteLength","s","encodeFailed","existing","incoming","kept","dropped","evictIndex","sizes","e","total","a","b","guardedDrain","drain","inFlight","buildBatch","events","buildHeaders","credential","DEFAULT_ENDPOINT"],"mappings":"yDAOaA,EAAoB,0BAW1B,SAASC,EAAaC,EAAmC,CAC5D,GAAIA,EAAK,SAAW,MAAO,MAAO,CAAA,EAClC,GAAI,CACA,MAAMC,EAAS,KAAK,MAAMD,EAAK,KAAK,EACpC,OAAO,MAAM,QAAQC,CAAM,EAAIA,EAAS,CAAA,CAC5C,MAAQ,CACJ,MAAO,CAAA,CACX,CACJ,CAOO,MAAMC,EAAmB,IACnBC,EAAkB,IAGzBC,EAAcC,GAChB,OAAO,YAAgB,IAAc,IAAI,YAAA,EAAc,OAAOA,CAAC,EAAE,OAASA,EAAE,OAUzE,SAASC,EACZC,EACAC,EACiC,CACjC,MAAMC,EAAO,CAAC,GAAGF,EAAU,GAAGC,CAAQ,EACtC,IAAIE,EAAU,EAEd,KAAOD,EAAK,OAASP,GAAoBO,EAAK,OAAOE,EAAAA,WAAWF,CAAI,EAAG,CAAC,EAAGC,IAK3E,MAAME,EAAQH,EAAK,IAAII,GAAKT,EAAW,KAAK,UAAUS,CAAC,CAAC,CAAC,EACzD,IAAIC,EAAQF,EAAM,OAAO,CAACG,EAAGC,IAAMD,EAAIC,EAAG,CAAC,EAAI,KAAK,IAAIP,EAAK,OAAS,EAAG,CAAC,EAAI,EAC9E,KAAOK,EAAQX,GAAmBM,EAAK,OAAS,GAAG,CAC/C,MAAM,EAAIE,EAAAA,WAAWF,CAAI,EACzBK,GAASF,EAAM,CAAC,GAAKH,EAAK,OAAS,EAAI,EAAI,GAC3CG,EAAM,OAAO,EAAG,CAAC,EACjBH,EAAK,OAAO,EAAG,CAAC,EAChBC,GACJ,CAEA,MAAO,CAAE,KAAM,KAAK,UAAUD,CAAI,EAAG,QAAAC,CAAA,CACzC,CAYO,SAASO,EAAaC,EAAiD,CAC1E,IAAIC,EACJ,MAAO,IAAOA,IAAaD,EAAA,EAAQ,QAAQ,IAAM,CAAEC,EAAW,MAAW,CAAC,CAC9E,CClFO,SAASC,EAAWC,EAAkC,CACzD,OAAO,KAAK,UAAU,CAClB,KAAM,kBACN,UAAW,IAAI,KAAA,EAAO,YAAA,EACtB,WAAYA,EAAO,OACnB,OAAAA,CAAA,CACH,CACL,CAMO,SAASC,EAAaC,EAAwD,CACjF,MAAO,CACH,eAAgB,mBAChB,GAAIA,EAAa,CAAE,YAAaA,EAAY,cAAiB,UAAUA,CAAU,IAAO,CAAA,CAAC,CAEjG,CAIO,MAAMC,EAAmB"}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
"use strict";const d=require("./memoryStore-BIGZmmfD.cjs"),m=255,p=1e3,y=2e3,E=200,u=`
|
|
2
|
-
… [truncated]`;function c(e,r,t=!1){if(e.length<=r)return e;let n=e.slice(0,r-u.length);if(t){const o=n.lastIndexOf(`
|
|
3
|
-
`);o>0&&(n=n.slice(0,o))}return n+u}function S(e){const r=e?.name;return typeof r=="string"&&r!==""?r:"Error"}function h(e,r){if(typeof e=="string"&&e!=="")return e;const t=e?.message;if(typeof t=="string"&&t!=="")return t;if(!(r==null||r===""))return String(r)}let f=!1;function A(){f||!d.isDev()||(f=!0,console.warn("[edge-telemetry] Error.stackTraceLimit is the engine default (10 frames on V8), which truncates crash stacks well before the SDK's 2000-char cap. Set `Error.stackTraceLimit = 50` in your app's entry file — the SDK will not set it for you."))}function g(e,r,t={}){const n={"error.type":c(S(r),m),"error.source":e},o=h(r,t.fallbackMessage);o!==void 0&&(n["error.message"]=c(o,p));const i=r?.stack;return typeof i=="string"&&i!==""&&(n["error.stacktrace"]=c(i,y,!0),A()),t.fatal!==void 0&&(n["error.fatal"]=t.fatal),n}function w(e,r=console){const t=r.error.bind(r),n=r.warn.bind(r);let o=!1;const i=(s,l)=>(...a)=>{if(!o){o=!0;try{s(a.map(String).join(" "))}finally{o=!1}}l(...a)};return r.error=i(s=>e.captureError(s,void 0,"console"),t),r.warn=i(s=>e.addBreadcrumb("console.warn",{message:c(s,E)}),n),()=>{r.error=t,r.warn=n}}exports.buildErrorAttributes=g;exports.captureConsole=w;
|
|
4
|
-
//# sourceMappingURL=crashCapture-BOJ8nSAZ.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"crashCapture-BOJ8nSAZ.cjs","sources":["../src/adapters/crashCapture.ts"],"sourcesContent":["/**\n * §4.7 — the error surface. Two event names, not one: `app.crash` is unhandled /\n * fatal-ish, `app.error` is handled or non-fatal, so\n * `COUNT(event_name='app.crash') / sessions` is a crash-free rate with no `WHERE`\n * clause anyone can forget. All five v3 `crash.*` keys are retired for dotted\n * `error.*`, and both explicit wire nulls go with them. #100\n */\n\nimport { isDev } from \"../core/debug\";\n\n/** `error.source` — a full re-cut of v3's `crash.cause`, not a rename. 5 values. */\nexport type ErrorSource =\n | \"global_handler\"\n | \"unhandled_rejection\"\n | \"cross_origin\" // web only: window.onerror with error === undefined\n | \"console\" // now on app.error\n | \"reported\"; // captureError()\n\n// §4.7 caps. The stacktrace's 2000 is a tuning knob, not a contractual constant —\n// it may be tight for Hermes, where the bytecode offset is the whole signal.\nconst TYPE_MAX = 255;\nconst MESSAGE_MAX = 1000;\nconst STACK_MAX = 2000;\n/** Breadcrumb text is not an error payload — 20 of these ride every `app.crash`. */\nconst CRUMB_MAX = 200;\n\n/** Marked inline: no key, countable with a `LIKE`, zero schema. */\nconst TRUNCATED = \"\\n… [truncated]\";\n\n/**\n * Drops the tail, never the head — the top frames *are* the grouping input.\n *\n * ⚠ `frameBoundary` is not cosmetic. On Hermes `line` is a constant 1 and the bytecode\n * offset carries the location, so a cut mid-frame turns `at p (address at bundle:1:132161)`\n * into `…bundle:1:13` — which resolves to a **different, wrong** place rather than failing.\n */\nfunction cap(value: string, max: number, frameBoundary = false): string {\n if (value.length <= max) return value;\n let cut = value.slice(0, max - TRUNCATED.length);\n if (frameBoundary) {\n const nl = cut.lastIndexOf(\"\\n\");\n if (nl > 0) cut = cut.slice(0, nl);\n }\n return cut + TRUNCATED;\n}\n\n/**\n * `error.type` is read from `error.name` **only, never `constructor.name`**: RN production\n * bundles minify class names, so `class PaymentError extends Error {}` would report as `\"a\"`\n * — not merely unreadable but *unstable across builds*, refragmenting grouping on every\n * deploy. `error.name` is a string literal in the author's source. Un-named classes report\n * `\"Error\"`: low cardinality, but honest.\n */\nexport function errorType(error: unknown): string {\n const name = (error as any)?.name;\n return typeof name === \"string\" && name !== \"\" ? name : \"Error\";\n}\n\n/**\n * Half of real `catch` blocks receive a string or an axios rejection object, not an Error, so\n * `fallbackMessage` is consulted **only** when the thrown value carries nothing usable.\n */\nfunction errorMessage(error: unknown, fallbackMessage?: unknown): string | undefined {\n if (typeof error === \"string\" && error !== \"\") return error;\n const m = (error as any)?.message;\n if (typeof m === \"string\" && m !== \"\") return m;\n if (fallbackMessage === undefined || fallbackMessage === null || fallbackMessage === \"\") return undefined;\n return String(fallbackMessage);\n}\n\n/**\n * §4.8's second consumer wiring step, said **once per process and only in dev**.\n *\n * RN 0.81.4 sets `Error.stackTraceLimit` nowhere, so V8's default of **10 frames** governs —\n * not the 2000-char cap, which holds ~26. Ten frames of an `unhandledrejection` can be\n * entirely library internals.\n *\n * ⚠ The SDK **never assigns it**. Raising it globally is an invisible mutation of the\n * consumer's runtime that makes every `new Error()` in their app more expensive and\n * unattributable to us — so this is an advisory, and the consumer's own line of code.\n *\n * Not behind `debug()`: a consumer who has not wired this up is precisely a consumer who\n * has not set `debug: true`. Same reasoning as §6.4's dev throw, one rung quieter — and the\n * one carve-out from the no-bare-console rule, recorded as such in CLAUDE.md.\n */\nlet advised = false;\nfunction adviseStackTraceLimit(): void {\n // The flag is set only when the advice is actually *said*: burning it on a call made\n // before `__DEV__` is defined would silence a dev app for the rest of the process.\n if (advised || !isDev()) return;\n advised = true;\n console.warn(\n \"[edge-telemetry] Error.stackTraceLimit is the engine default (10 frames on V8), which \" +\n \"truncates crash stacks well before the SDK's 2000-char cap. Set `Error.stackTraceLimit = 50` \" +\n \"in your app's entry file — the SDK will not set it for you.\",\n );\n}\n\n/**\n * The `error.*` block for both event names. `error.handled` does not exist — the event name\n * carries that bit, and carrying both is a denormalization that can disagree. `error.fatal`\n * is passed only by the native build (§4.7: on web nothing is fatal).\n */\nexport function buildErrorAttributes(\n source: ErrorSource,\n error: unknown,\n opts: { fallbackMessage?: unknown; fatal?: boolean } = {},\n): Record<string, any> {\n const attrs: Record<string, any> = {\n \"error.type\": cap(errorType(error), TYPE_MAX),\n \"error.source\": source,\n };\n\n const message = errorMessage(error, opts.fallbackMessage);\n if (message !== undefined) attrs[\"error.message\"] = cap(message, MESSAGE_MAX);\n\n const stack = (error as any)?.stack;\n if (typeof stack === \"string\" && stack !== \"\") {\n attrs[\"error.stacktrace\"] = cap(stack, STACK_MAX, true);\n // Here rather than at init: this is the one chokepoint every captured stack passes\n // through, so the advice arrives when a dev has a real, already-truncated stack in front\n // of them — and #23's \"construct → log → flush is silent by default\" stays intact.\n adviseStackTraceLimit();\n }\n\n if (opts.fatal !== undefined) attrs[\"error.fatal\"] = opts.fatal;\n return attrs;\n}\n\n/** What `captureConsole` needs of a `Telemetry` — structural. */\ntype ErrorSink = {\n captureError(error: unknown, context?: Record<string, any>, source?: ErrorSource): unknown;\n addBreadcrumb(name: string, data?: Record<string, any>): void;\n};\n\n/**\n * Patch console.error → `app.error` (source `console`) and console.warn → a **breadcrumb**.\n * `ConsoleWarn` is deleted outright: React's own dev-mode warnings were the dominant\n * contributor to v3's crash count, which is what made \"is my app crashing more?\"\n * unanswerable. Opt-*in* now — `captureConsole` defaults off (§4.7).\n *\n * Returns a restore fn. A reentrancy guard keeps the SDK's own console writes during\n * logging from re-capturing.\n */\nexport function captureConsole(\n telemetry: ErrorSink,\n target: Pick<Console, \"error\" | \"warn\"> = console,\n): () => void {\n const origError = target.error.bind(target);\n const origWarn = target.warn.bind(target);\n let inside = false;\n\n const guarded = (emit: (text: string) => void, orig: (...a: any[]) => void) =>\n (...args: any[]) => {\n if (!inside) {\n inside = true;\n try {\n emit(args.map(String).join(\" \"));\n } finally {\n inside = false;\n }\n }\n orig(...args);\n };\n\n // Through captureError, not log(), so the `error.fatal` platform rule stays in one place.\n target.error = guarded(\n (text) => telemetry.captureError(text, undefined, \"console\"),\n origError,\n );\n target.warn = guarded(\n // Capped here, not at the ring: 20 uncapped React warnings would put kilobytes of\n // `error.breadcrumbs` on every `app.crash`, which is the budget this split exists to protect.\n (text) => telemetry.addBreadcrumb(\"console.warn\", { message: cap(text, CRUMB_MAX) }),\n origWarn,\n );\n\n return () => { target.error = origError; target.warn = origWarn; };\n}\n"],"names":["TYPE_MAX","MESSAGE_MAX","STACK_MAX","CRUMB_MAX","TRUNCATED","cap","value","max","frameBoundary","cut","nl","errorType","error","name","errorMessage","fallbackMessage","m","advised","adviseStackTraceLimit","isDev","buildErrorAttributes","source","opts","attrs","message","stack","captureConsole","telemetry","target","origError","origWarn","inside","guarded","emit","orig","args","text"],"mappings":"2DAoBMA,EAAW,IACXC,EAAc,IACdC,EAAY,IAEZC,EAAY,IAGZC,EAAY;AAAA,eASlB,SAASC,EAAIC,EAAeC,EAAaC,EAAgB,GAAe,CACtE,GAAIF,EAAM,QAAUC,EAAK,OAAOD,EAChC,IAAIG,EAAMH,EAAM,MAAM,EAAGC,EAAMH,EAAU,MAAM,EAC/C,GAAII,EAAe,CACjB,MAAME,EAAKD,EAAI,YAAY;AAAA,CAAI,EAC3BC,EAAK,IAAGD,EAAMA,EAAI,MAAM,EAAGC,CAAE,EACnC,CACA,OAAOD,EAAML,CACf,CASO,SAASO,EAAUC,EAAwB,CAChD,MAAMC,EAAQD,GAAe,KAC7B,OAAO,OAAOC,GAAS,UAAYA,IAAS,GAAKA,EAAO,OAC1D,CAMA,SAASC,EAAaF,EAAgBG,EAA+C,CACnF,GAAI,OAAOH,GAAU,UAAYA,IAAU,GAAI,OAAOA,EACtD,MAAMI,EAAKJ,GAAe,QAC1B,GAAI,OAAOI,GAAM,UAAYA,IAAM,GAAI,OAAOA,EAC9C,GAAI,EAAiCD,GAAoB,MAAQA,IAAoB,IACrF,OAAO,OAAOA,CAAe,CAC/B,CAiBA,IAAIE,EAAU,GACd,SAASC,GAA8B,CAGjCD,GAAW,CAACE,EAAAA,UAChBF,EAAU,GACV,QAAQ,KACN,gPAAA,EAIJ,CAOO,SAASG,EACdC,EACAT,EACAU,EAAuD,CAAA,EAClC,CACrB,MAAMC,EAA6B,CACjC,aAAclB,EAAIM,EAAUC,CAAK,EAAGZ,CAAQ,EAC5C,eAAgBqB,CAAA,EAGZG,EAAUV,EAAaF,EAAOU,EAAK,eAAe,EACpDE,IAAY,SAAWD,EAAM,eAAe,EAAIlB,EAAImB,EAASvB,CAAW,GAE5E,MAAMwB,EAASb,GAAe,MAC9B,OAAI,OAAOa,GAAU,UAAYA,IAAU,KACzCF,EAAM,kBAAkB,EAAIlB,EAAIoB,EAAOvB,EAAW,EAAI,EAItDgB,EAAA,GAGEI,EAAK,QAAU,SAAWC,EAAM,aAAa,EAAID,EAAK,OACnDC,CACT,CAiBO,SAASG,EACdC,EACAC,EAA0C,QAC9B,CACZ,MAAMC,EAAYD,EAAO,MAAM,KAAKA,CAAM,EACpCE,EAAWF,EAAO,KAAK,KAAKA,CAAM,EACxC,IAAIG,EAAS,GAEb,MAAMC,EAAU,CAACC,EAA8BC,IAC7C,IAAIC,IAAgB,CAClB,GAAI,CAACJ,EAAQ,CACXA,EAAS,GACT,GAAI,CACFE,EAAKE,EAAK,IAAI,MAAM,EAAE,KAAK,GAAG,CAAC,CACjC,QAAA,CACEJ,EAAS,EACX,CACF,CACAG,EAAK,GAAGC,CAAI,CACd,EAGF,OAAAP,EAAO,MAAQI,EACZI,GAAST,EAAU,aAAaS,EAAM,OAAW,SAAS,EAC3DP,CAAA,EAEFD,EAAO,KAAOI,EAGXI,GAAST,EAAU,cAAc,eAAgB,CAAE,QAAStB,EAAI+B,EAAMjC,CAAS,EAAG,EACnF2B,CAAA,EAGK,IAAM,CAAEF,EAAO,MAAQC,EAAWD,EAAO,KAAOE,CAAU,CACnE"}
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
import { i as d } from "./memoryStore-F5I-GQKM.js";
|
|
2
|
-
const m = 255, p = 1e3, y = 2e3, E = 200, f = `
|
|
3
|
-
… [truncated]`;
|
|
4
|
-
function c(e, r, n = !1) {
|
|
5
|
-
if (e.length <= r) return e;
|
|
6
|
-
let t = e.slice(0, r - f.length);
|
|
7
|
-
if (n) {
|
|
8
|
-
const o = t.lastIndexOf(`
|
|
9
|
-
`);
|
|
10
|
-
o > 0 && (t = t.slice(0, o));
|
|
11
|
-
}
|
|
12
|
-
return t + f;
|
|
13
|
-
}
|
|
14
|
-
function h(e) {
|
|
15
|
-
const r = e?.name;
|
|
16
|
-
return typeof r == "string" && r !== "" ? r : "Error";
|
|
17
|
-
}
|
|
18
|
-
function S(e, r) {
|
|
19
|
-
if (typeof e == "string" && e !== "") return e;
|
|
20
|
-
const n = e?.message;
|
|
21
|
-
if (typeof n == "string" && n !== "") return n;
|
|
22
|
-
if (!(r == null || r === ""))
|
|
23
|
-
return String(r);
|
|
24
|
-
}
|
|
25
|
-
let u = !1;
|
|
26
|
-
function g() {
|
|
27
|
-
u || !d() || (u = !0, console.warn(
|
|
28
|
-
"[edge-telemetry] Error.stackTraceLimit is the engine default (10 frames on V8), which truncates crash stacks well before the SDK's 2000-char cap. Set `Error.stackTraceLimit = 50` in your app's entry file — the SDK will not set it for you."
|
|
29
|
-
));
|
|
30
|
-
}
|
|
31
|
-
function A(e, r, n = {}) {
|
|
32
|
-
const t = {
|
|
33
|
-
"error.type": c(h(r), m),
|
|
34
|
-
"error.source": e
|
|
35
|
-
}, o = S(r, n.fallbackMessage);
|
|
36
|
-
o !== void 0 && (t["error.message"] = c(o, p));
|
|
37
|
-
const i = r?.stack;
|
|
38
|
-
return typeof i == "string" && i !== "" && (t["error.stacktrace"] = c(i, y, !0), g()), n.fatal !== void 0 && (t["error.fatal"] = n.fatal), t;
|
|
39
|
-
}
|
|
40
|
-
function T(e, r = console) {
|
|
41
|
-
const n = r.error.bind(r), t = r.warn.bind(r);
|
|
42
|
-
let o = !1;
|
|
43
|
-
const i = (s, l) => (...a) => {
|
|
44
|
-
if (!o) {
|
|
45
|
-
o = !0;
|
|
46
|
-
try {
|
|
47
|
-
s(a.map(String).join(" "));
|
|
48
|
-
} finally {
|
|
49
|
-
o = !1;
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
l(...a);
|
|
53
|
-
};
|
|
54
|
-
return r.error = i(
|
|
55
|
-
(s) => e.captureError(s, void 0, "console"),
|
|
56
|
-
n
|
|
57
|
-
), r.warn = i(
|
|
58
|
-
// Capped here, not at the ring: 20 uncapped React warnings would put kilobytes of
|
|
59
|
-
// `error.breadcrumbs` on every `app.crash`, which is the budget this split exists to protect.
|
|
60
|
-
(s) => e.addBreadcrumb("console.warn", { message: c(s, E) }),
|
|
61
|
-
t
|
|
62
|
-
), () => {
|
|
63
|
-
r.error = n, r.warn = t;
|
|
64
|
-
};
|
|
65
|
-
}
|
|
66
|
-
export {
|
|
67
|
-
A as b,
|
|
68
|
-
T as c
|
|
69
|
-
};
|
|
70
|
-
//# sourceMappingURL=crashCapture-BW8WuyaU.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"crashCapture-BW8WuyaU.js","sources":["../src/adapters/crashCapture.ts"],"sourcesContent":["/**\n * §4.7 — the error surface. Two event names, not one: `app.crash` is unhandled /\n * fatal-ish, `app.error` is handled or non-fatal, so\n * `COUNT(event_name='app.crash') / sessions` is a crash-free rate with no `WHERE`\n * clause anyone can forget. All five v3 `crash.*` keys are retired for dotted\n * `error.*`, and both explicit wire nulls go with them. #100\n */\n\nimport { isDev } from \"../core/debug\";\n\n/** `error.source` — a full re-cut of v3's `crash.cause`, not a rename. 5 values. */\nexport type ErrorSource =\n | \"global_handler\"\n | \"unhandled_rejection\"\n | \"cross_origin\" // web only: window.onerror with error === undefined\n | \"console\" // now on app.error\n | \"reported\"; // captureError()\n\n// §4.7 caps. The stacktrace's 2000 is a tuning knob, not a contractual constant —\n// it may be tight for Hermes, where the bytecode offset is the whole signal.\nconst TYPE_MAX = 255;\nconst MESSAGE_MAX = 1000;\nconst STACK_MAX = 2000;\n/** Breadcrumb text is not an error payload — 20 of these ride every `app.crash`. */\nconst CRUMB_MAX = 200;\n\n/** Marked inline: no key, countable with a `LIKE`, zero schema. */\nconst TRUNCATED = \"\\n… [truncated]\";\n\n/**\n * Drops the tail, never the head — the top frames *are* the grouping input.\n *\n * ⚠ `frameBoundary` is not cosmetic. On Hermes `line` is a constant 1 and the bytecode\n * offset carries the location, so a cut mid-frame turns `at p (address at bundle:1:132161)`\n * into `…bundle:1:13` — which resolves to a **different, wrong** place rather than failing.\n */\nfunction cap(value: string, max: number, frameBoundary = false): string {\n if (value.length <= max) return value;\n let cut = value.slice(0, max - TRUNCATED.length);\n if (frameBoundary) {\n const nl = cut.lastIndexOf(\"\\n\");\n if (nl > 0) cut = cut.slice(0, nl);\n }\n return cut + TRUNCATED;\n}\n\n/**\n * `error.type` is read from `error.name` **only, never `constructor.name`**: RN production\n * bundles minify class names, so `class PaymentError extends Error {}` would report as `\"a\"`\n * — not merely unreadable but *unstable across builds*, refragmenting grouping on every\n * deploy. `error.name` is a string literal in the author's source. Un-named classes report\n * `\"Error\"`: low cardinality, but honest.\n */\nexport function errorType(error: unknown): string {\n const name = (error as any)?.name;\n return typeof name === \"string\" && name !== \"\" ? name : \"Error\";\n}\n\n/**\n * Half of real `catch` blocks receive a string or an axios rejection object, not an Error, so\n * `fallbackMessage` is consulted **only** when the thrown value carries nothing usable.\n */\nfunction errorMessage(error: unknown, fallbackMessage?: unknown): string | undefined {\n if (typeof error === \"string\" && error !== \"\") return error;\n const m = (error as any)?.message;\n if (typeof m === \"string\" && m !== \"\") return m;\n if (fallbackMessage === undefined || fallbackMessage === null || fallbackMessage === \"\") return undefined;\n return String(fallbackMessage);\n}\n\n/**\n * §4.8's second consumer wiring step, said **once per process and only in dev**.\n *\n * RN 0.81.4 sets `Error.stackTraceLimit` nowhere, so V8's default of **10 frames** governs —\n * not the 2000-char cap, which holds ~26. Ten frames of an `unhandledrejection` can be\n * entirely library internals.\n *\n * ⚠ The SDK **never assigns it**. Raising it globally is an invisible mutation of the\n * consumer's runtime that makes every `new Error()` in their app more expensive and\n * unattributable to us — so this is an advisory, and the consumer's own line of code.\n *\n * Not behind `debug()`: a consumer who has not wired this up is precisely a consumer who\n * has not set `debug: true`. Same reasoning as §6.4's dev throw, one rung quieter — and the\n * one carve-out from the no-bare-console rule, recorded as such in CLAUDE.md.\n */\nlet advised = false;\nfunction adviseStackTraceLimit(): void {\n // The flag is set only when the advice is actually *said*: burning it on a call made\n // before `__DEV__` is defined would silence a dev app for the rest of the process.\n if (advised || !isDev()) return;\n advised = true;\n console.warn(\n \"[edge-telemetry] Error.stackTraceLimit is the engine default (10 frames on V8), which \" +\n \"truncates crash stacks well before the SDK's 2000-char cap. Set `Error.stackTraceLimit = 50` \" +\n \"in your app's entry file — the SDK will not set it for you.\",\n );\n}\n\n/**\n * The `error.*` block for both event names. `error.handled` does not exist — the event name\n * carries that bit, and carrying both is a denormalization that can disagree. `error.fatal`\n * is passed only by the native build (§4.7: on web nothing is fatal).\n */\nexport function buildErrorAttributes(\n source: ErrorSource,\n error: unknown,\n opts: { fallbackMessage?: unknown; fatal?: boolean } = {},\n): Record<string, any> {\n const attrs: Record<string, any> = {\n \"error.type\": cap(errorType(error), TYPE_MAX),\n \"error.source\": source,\n };\n\n const message = errorMessage(error, opts.fallbackMessage);\n if (message !== undefined) attrs[\"error.message\"] = cap(message, MESSAGE_MAX);\n\n const stack = (error as any)?.stack;\n if (typeof stack === \"string\" && stack !== \"\") {\n attrs[\"error.stacktrace\"] = cap(stack, STACK_MAX, true);\n // Here rather than at init: this is the one chokepoint every captured stack passes\n // through, so the advice arrives when a dev has a real, already-truncated stack in front\n // of them — and #23's \"construct → log → flush is silent by default\" stays intact.\n adviseStackTraceLimit();\n }\n\n if (opts.fatal !== undefined) attrs[\"error.fatal\"] = opts.fatal;\n return attrs;\n}\n\n/** What `captureConsole` needs of a `Telemetry` — structural. */\ntype ErrorSink = {\n captureError(error: unknown, context?: Record<string, any>, source?: ErrorSource): unknown;\n addBreadcrumb(name: string, data?: Record<string, any>): void;\n};\n\n/**\n * Patch console.error → `app.error` (source `console`) and console.warn → a **breadcrumb**.\n * `ConsoleWarn` is deleted outright: React's own dev-mode warnings were the dominant\n * contributor to v3's crash count, which is what made \"is my app crashing more?\"\n * unanswerable. Opt-*in* now — `captureConsole` defaults off (§4.7).\n *\n * Returns a restore fn. A reentrancy guard keeps the SDK's own console writes during\n * logging from re-capturing.\n */\nexport function captureConsole(\n telemetry: ErrorSink,\n target: Pick<Console, \"error\" | \"warn\"> = console,\n): () => void {\n const origError = target.error.bind(target);\n const origWarn = target.warn.bind(target);\n let inside = false;\n\n const guarded = (emit: (text: string) => void, orig: (...a: any[]) => void) =>\n (...args: any[]) => {\n if (!inside) {\n inside = true;\n try {\n emit(args.map(String).join(\" \"));\n } finally {\n inside = false;\n }\n }\n orig(...args);\n };\n\n // Through captureError, not log(), so the `error.fatal` platform rule stays in one place.\n target.error = guarded(\n (text) => telemetry.captureError(text, undefined, \"console\"),\n origError,\n );\n target.warn = guarded(\n // Capped here, not at the ring: 20 uncapped React warnings would put kilobytes of\n // `error.breadcrumbs` on every `app.crash`, which is the budget this split exists to protect.\n (text) => telemetry.addBreadcrumb(\"console.warn\", { message: cap(text, CRUMB_MAX) }),\n origWarn,\n );\n\n return () => { target.error = origError; target.warn = origWarn; };\n}\n"],"names":["TYPE_MAX","MESSAGE_MAX","STACK_MAX","CRUMB_MAX","TRUNCATED","cap","value","max","frameBoundary","cut","nl","errorType","error","name","errorMessage","fallbackMessage","m","advised","adviseStackTraceLimit","isDev","buildErrorAttributes","source","opts","attrs","message","stack","captureConsole","telemetry","target","origError","origWarn","inside","guarded","emit","orig","args","text"],"mappings":";AAoBA,MAAMA,IAAW,KACXC,IAAc,KACdC,IAAY,KAEZC,IAAY,KAGZC,IAAY;AAAA;AASlB,SAASC,EAAIC,GAAeC,GAAaC,IAAgB,IAAe;AACtE,MAAIF,EAAM,UAAUC,EAAK,QAAOD;AAChC,MAAIG,IAAMH,EAAM,MAAM,GAAGC,IAAMH,EAAU,MAAM;AAC/C,MAAII,GAAe;AACjB,UAAME,IAAKD,EAAI,YAAY;AAAA,CAAI;AAC/B,IAAIC,IAAK,MAAGD,IAAMA,EAAI,MAAM,GAAGC,CAAE;AAAA,EACnC;AACA,SAAOD,IAAML;AACf;AASO,SAASO,EAAUC,GAAwB;AAChD,QAAMC,IAAQD,GAAe;AAC7B,SAAO,OAAOC,KAAS,YAAYA,MAAS,KAAKA,IAAO;AAC1D;AAMA,SAASC,EAAaF,GAAgBG,GAA+C;AACnF,MAAI,OAAOH,KAAU,YAAYA,MAAU,GAAI,QAAOA;AACtD,QAAMI,IAAKJ,GAAe;AAC1B,MAAI,OAAOI,KAAM,YAAYA,MAAM,GAAI,QAAOA;AAC9C,MAAI,EAAiCD,KAAoB,QAAQA,MAAoB;AACrF,WAAO,OAAOA,CAAe;AAC/B;AAiBA,IAAIE,IAAU;AACd,SAASC,IAA8B;AAGrC,EAAID,KAAW,CAACE,QAChBF,IAAU,IACV,QAAQ;AAAA,IACN;AAAA,EAAA;AAIJ;AAOO,SAASG,EACdC,GACAT,GACAU,IAAuD,CAAA,GAClC;AACrB,QAAMC,IAA6B;AAAA,IACjC,cAAclB,EAAIM,EAAUC,CAAK,GAAGZ,CAAQ;AAAA,IAC5C,gBAAgBqB;AAAA,EAAA,GAGZG,IAAUV,EAAaF,GAAOU,EAAK,eAAe;AACxD,EAAIE,MAAY,WAAWD,EAAM,eAAe,IAAIlB,EAAImB,GAASvB,CAAW;AAE5E,QAAMwB,IAASb,GAAe;AAC9B,SAAI,OAAOa,KAAU,YAAYA,MAAU,OACzCF,EAAM,kBAAkB,IAAIlB,EAAIoB,GAAOvB,GAAW,EAAI,GAItDgB,EAAA,IAGEI,EAAK,UAAU,WAAWC,EAAM,aAAa,IAAID,EAAK,QACnDC;AACT;AAiBO,SAASG,EACdC,GACAC,IAA0C,SAC9B;AACZ,QAAMC,IAAYD,EAAO,MAAM,KAAKA,CAAM,GACpCE,IAAWF,EAAO,KAAK,KAAKA,CAAM;AACxC,MAAIG,IAAS;AAEb,QAAMC,IAAU,CAACC,GAA8BC,MAC7C,IAAIC,MAAgB;AAClB,QAAI,CAACJ,GAAQ;AACX,MAAAA,IAAS;AACT,UAAI;AACF,QAAAE,EAAKE,EAAK,IAAI,MAAM,EAAE,KAAK,GAAG,CAAC;AAAA,MACjC,UAAA;AACE,QAAAJ,IAAS;AAAA,MACX;AAAA,IACF;AACA,IAAAG,EAAK,GAAGC,CAAI;AAAA,EACd;AAGF,SAAAP,EAAO,QAAQI;AAAA,IACb,CAACI,MAAST,EAAU,aAAaS,GAAM,QAAW,SAAS;AAAA,IAC3DP;AAAA,EAAA,GAEFD,EAAO,OAAOI;AAAA;AAAA;AAAA,IAGZ,CAACI,MAAST,EAAU,cAAc,gBAAgB,EAAE,SAAStB,EAAI+B,GAAMjC,CAAS,GAAG;AAAA,IACnF2B;AAAA,EAAA,GAGK,MAAM;AAAE,IAAAF,EAAO,QAAQC,GAAWD,EAAO,OAAOE;AAAA,EAAU;AACnE;"}
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
import { b as t, c } from "./crashCapture-BW8WuyaU.js";
|
|
2
|
-
class p {
|
|
3
|
-
constructor(r) {
|
|
4
|
-
this.telemetry = r;
|
|
5
|
-
}
|
|
6
|
-
// Lockstep with native: JS errors and unhandled rejections become `app.crash`;
|
|
7
|
-
// console.error becomes `app.error` and console.warn a breadcrumb, both opt-in. §4.7, #100
|
|
8
|
-
attach(r = {}) {
|
|
9
|
-
const { captureConsole: s = !1 } = r;
|
|
10
|
-
return new Promise((a, l) => {
|
|
11
|
-
try {
|
|
12
|
-
window.onerror = (e, h, d, u, o) => {
|
|
13
|
-
const n = o ? "global_handler" : "cross_origin";
|
|
14
|
-
this.telemetry.log("app.crash", t(n, o, { fallbackMessage: e }));
|
|
15
|
-
}, window.onunhandledrejection = (e) => {
|
|
16
|
-
this.telemetry.log("app.crash", t("unhandled_rejection", e.reason, {
|
|
17
|
-
fallbackMessage: "Unhandled Promise Rejection"
|
|
18
|
-
}));
|
|
19
|
-
}, s && c(this.telemetry), a();
|
|
20
|
-
} catch (e) {
|
|
21
|
-
l(e);
|
|
22
|
-
}
|
|
23
|
-
});
|
|
24
|
-
}
|
|
25
|
-
}
|
|
26
|
-
export {
|
|
27
|
-
p as CrashHandler
|
|
28
|
-
};
|
|
29
|
-
//# sourceMappingURL=crashHandler.web-8F_k2veo.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"crashHandler.web-8F_k2veo.js","sources":["../src/adapters/web/crashHandler.web.ts"],"sourcesContent":["import { Telemetry } from \"../../core/telemetry\";\nimport { buildErrorAttributes, captureConsole } from \"../crashCapture\";\n\nexport type CrashHandlerOptions = { captureConsole?: boolean };\n\nexport class CrashHandler {\n constructor(private telemetry: Telemetry) { }\n\n // Lockstep with native: JS errors and unhandled rejections become `app.crash`;\n // console.error becomes `app.error` and console.warn a breadcrumb, both opt-in. §4.7, #100\n attach(options: CrashHandlerOptions = {}): Promise<void> {\n const { captureConsole: consoleEnabled = false } = options;\n return new Promise((resolve, reject) => {\n try {\n window.onerror = (msg, _url, _line, _col, error) => {\n // ⚠ `error === undefined` is the cross-origin instrumentation gap, not a\n // mystery Error: a bundle served from a CDN without CORS headers yields the\n // classic \"Script error.\" with no stack. Naming it beats collapsing it.\n const source = error ? \"global_handler\" : \"cross_origin\";\n // No `fatal` on web — nothing here is fatal, the page keeps running (§4.7).\n this.telemetry.log(\"app.crash\", buildErrorAttributes(source, error, { fallbackMessage: msg }));\n };\n\n window.onunhandledrejection = (event) => {\n this.telemetry.log(\"app.crash\", buildErrorAttributes(\"unhandled_rejection\", event.reason, {\n fallbackMessage: \"Unhandled Promise Rejection\",\n }));\n };\n\n if (consoleEnabled) captureConsole(this.telemetry);\n\n resolve();\n } catch (error) {\n reject(error);\n }\n });\n }\n}\n"],"names":["CrashHandler","telemetry","options","consoleEnabled","resolve","reject","msg","_url","_line","_col","error","source","buildErrorAttributes","event","captureConsole"],"mappings":";AAKO,MAAMA,EAAa;AAAA,EACtB,YAAoBC,GAAsB;AAAtB,SAAA,YAAAA;AAAA,EAAwB;AAAA;AAAA;AAAA,EAI5C,OAAOC,IAA+B,IAAmB;AACrD,UAAM,EAAE,gBAAgBC,IAAiB,GAAA,IAAUD;AACnD,WAAO,IAAI,QAAQ,CAACE,GAASC,MAAW;AACpC,UAAI;AACA,eAAO,UAAU,CAACC,GAAKC,GAAMC,GAAOC,GAAMC,MAAU;AAIhD,gBAAMC,IAASD,IAAQ,mBAAmB;AAE1C,eAAK,UAAU,IAAI,aAAaE,EAAqBD,GAAQD,GAAO,EAAE,iBAAiBJ,EAAA,CAAK,CAAC;AAAA,QACjG,GAEA,OAAO,uBAAuB,CAACO,MAAU;AACrC,eAAK,UAAU,IAAI,aAAaD,EAAqB,uBAAuBC,EAAM,QAAQ;AAAA,YACtF,iBAAiB;AAAA,UAAA,CACpB,CAAC;AAAA,QACN,GAEIV,KAAgBW,EAAe,KAAK,SAAS,GAEjDV,EAAA;AAAA,MACJ,SAASM,GAAO;AACZ,QAAAL,EAAOK,CAAK;AAAA,MAChB;AAAA,IACJ,CAAC;AAAA,EACL;AACJ;"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const t=require("./crashCapture-BOJ8nSAZ.cjs");class c{constructor(r){this.telemetry=r}attach(r={}){const{captureConsole:s=!1}=r;return new Promise((a,l)=>{try{window.onerror=(e,u,d,h,o)=>{const n=o?"global_handler":"cross_origin";this.telemetry.log("app.crash",t.buildErrorAttributes(n,o,{fallbackMessage:e}))},window.onunhandledrejection=e=>{this.telemetry.log("app.crash",t.buildErrorAttributes("unhandled_rejection",e.reason,{fallbackMessage:"Unhandled Promise Rejection"}))},s&&t.captureConsole(this.telemetry),a()}catch(e){l(e)}})}}exports.CrashHandler=c;
|
|
2
|
-
//# sourceMappingURL=crashHandler.web-CWmF56mJ.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"crashHandler.web-CWmF56mJ.cjs","sources":["../src/adapters/web/crashHandler.web.ts"],"sourcesContent":["import { Telemetry } from \"../../core/telemetry\";\nimport { buildErrorAttributes, captureConsole } from \"../crashCapture\";\n\nexport type CrashHandlerOptions = { captureConsole?: boolean };\n\nexport class CrashHandler {\n constructor(private telemetry: Telemetry) { }\n\n // Lockstep with native: JS errors and unhandled rejections become `app.crash`;\n // console.error becomes `app.error` and console.warn a breadcrumb, both opt-in. §4.7, #100\n attach(options: CrashHandlerOptions = {}): Promise<void> {\n const { captureConsole: consoleEnabled = false } = options;\n return new Promise((resolve, reject) => {\n try {\n window.onerror = (msg, _url, _line, _col, error) => {\n // ⚠ `error === undefined` is the cross-origin instrumentation gap, not a\n // mystery Error: a bundle served from a CDN without CORS headers yields the\n // classic \"Script error.\" with no stack. Naming it beats collapsing it.\n const source = error ? \"global_handler\" : \"cross_origin\";\n // No `fatal` on web — nothing here is fatal, the page keeps running (§4.7).\n this.telemetry.log(\"app.crash\", buildErrorAttributes(source, error, { fallbackMessage: msg }));\n };\n\n window.onunhandledrejection = (event) => {\n this.telemetry.log(\"app.crash\", buildErrorAttributes(\"unhandled_rejection\", event.reason, {\n fallbackMessage: \"Unhandled Promise Rejection\",\n }));\n };\n\n if (consoleEnabled) captureConsole(this.telemetry);\n\n resolve();\n } catch (error) {\n reject(error);\n }\n });\n }\n}\n"],"names":["CrashHandler","telemetry","options","consoleEnabled","resolve","reject","msg","_url","_line","_col","error","source","buildErrorAttributes","event","captureConsole"],"mappings":"+HAKO,MAAMA,CAAa,CACtB,YAAoBC,EAAsB,CAAtB,KAAA,UAAAA,CAAwB,CAI5C,OAAOC,EAA+B,GAAmB,CACrD,KAAM,CAAE,eAAgBC,EAAiB,EAAA,EAAUD,EACnD,OAAO,IAAI,QAAQ,CAACE,EAASC,IAAW,CACpC,GAAI,CACA,OAAO,QAAU,CAACC,EAAKC,EAAMC,EAAOC,EAAMC,IAAU,CAIhD,MAAMC,EAASD,EAAQ,iBAAmB,eAE1C,KAAK,UAAU,IAAI,YAAaE,EAAAA,qBAAqBD,EAAQD,EAAO,CAAE,gBAAiBJ,CAAA,CAAK,CAAC,CACjG,EAEA,OAAO,qBAAwBO,GAAU,CACrC,KAAK,UAAU,IAAI,YAAaD,EAAAA,qBAAqB,sBAAuBC,EAAM,OAAQ,CACtF,gBAAiB,6BAAA,CACpB,CAAC,CACN,EAEIV,GAAgBW,EAAAA,eAAe,KAAK,SAAS,EAEjDV,EAAA,CACJ,OAASM,EAAO,CACZL,EAAOK,CAAK,CAChB,CACJ,CAAC,CACL,CACJ"}
|
|
@@ -1,2 +0,0 @@
|
|
|
1
|
-
"use strict";Object.defineProperty(exports,Symbol.toStringTag,{value:"Module"});const n=require("./crashCapture-BOJ8nSAZ.cjs");class d{constructor(l){this.telemetry=l}attach(l={}){const{captureConsole:o=!1}=l;return new Promise((s,i)=>{try{if(typeof ErrorUtils<"u"&&ErrorUtils.setGlobalHandler){const e=ErrorUtils.getGlobalHandler?.();ErrorUtils.setGlobalHandler((a,t)=>{this.telemetry.log("app.crash",n.buildErrorAttributes("global_handler",a,{fatal:!!t})),e&&e(a,t)})}const r=e=>{this.telemetry.log("app.crash",n.buildErrorAttributes("unhandled_rejection",e?.reason,{fallbackMessage:"Unhandled Promise Rejection",fatal:!1}))};globalThis.addEventListener?globalThis.addEventListener("unhandledrejection",r):require("promise/setimmediate/rejection-tracking").enable({allRejections:!0,onUnhandled:(a,t)=>r({reason:t})}),o&&n.captureConsole(this.telemetry),s()}catch(r){i(r)}})}}exports.CrashHandlerNative=d;
|
|
2
|
-
//# sourceMappingURL=crashHandlerNative.native-C2kSikDt.cjs.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"crashHandlerNative.native-C2kSikDt.cjs","sources":["../src/adapters/native/crashHandlerNative.native.ts"],"sourcesContent":["import { Telemetry } from \"../../core/telemetry\";\nimport { buildErrorAttributes, captureConsole } from \"../crashCapture\";\n\nexport type CrashHandlerOptions = { captureConsole?: boolean };\n\nexport class CrashHandlerNative {\n constructor(private telemetry: Telemetry) { }\n\n // JS errors and unhandled rejections become `app.crash`; console.error becomes\n // `app.error` and console.warn a breadcrumb, both opt-in (default off). §4.7, #100\n attach(options: CrashHandlerOptions = {}): Promise<void> {\n const { captureConsole: consoleEnabled = false } = options;\n return new Promise((resolve, reject) => {\n try {\n if (typeof ErrorUtils !== \"undefined\" && ErrorUtils.setGlobalHandler) {\n const defaultHandler = ErrorUtils.getGlobalHandler?.();\n ErrorUtils.setGlobalHandler((error: any, isFatal?: boolean) => {\n // `error.fatal` is native-only — the web build never passes it (§4.7).\n this.telemetry.log(\"app.crash\", buildErrorAttributes(\"global_handler\", error, {\n fatal: !!isFatal,\n }));\n if (defaultHandler) defaultHandler(error, isFatal); // keep RN red screen in dev\n });\n }\n\n const onRejection = (event: any) => {\n this.telemetry.log(\"app.crash\", buildErrorAttributes(\"unhandled_rejection\", event?.reason, {\n fallbackMessage: \"Unhandled Promise Rejection\",\n fatal: false,\n }));\n };\n\n if (globalThis.addEventListener) {\n globalThis.addEventListener(\"unhandledrejection\", onRejection);\n } else {\n const tracking = require(\"promise/setimmediate/rejection-tracking\");\n tracking.enable({\n allRejections: true,\n onUnhandled: (_id: any, error: any) =>\n onRejection({ reason: error }),\n });\n }\n\n if (consoleEnabled) captureConsole(this.telemetry);\n\n resolve();\n } catch (error) {\n reject(error);\n }\n });\n }\n}\n"],"names":["CrashHandlerNative","telemetry","options","consoleEnabled","resolve","reject","defaultHandler","error","isFatal","buildErrorAttributes","onRejection","event","_id","captureConsole"],"mappings":"+HAKO,MAAMA,CAAmB,CAC5B,YAAoBC,EAAsB,CAAtB,KAAA,UAAAA,CAAwB,CAI5C,OAAOC,EAA+B,GAAmB,CACrD,KAAM,CAAE,eAAgBC,EAAiB,EAAA,EAAUD,EACnD,OAAO,IAAI,QAAQ,CAACE,EAASC,IAAW,CACpC,GAAI,CACA,GAAI,OAAO,WAAe,KAAe,WAAW,iBAAkB,CAClE,MAAMC,EAAiB,WAAW,mBAAA,EAClC,WAAW,iBAAiB,CAACC,EAAYC,IAAsB,CAE3D,KAAK,UAAU,IAAI,YAAaC,EAAAA,qBAAqB,iBAAkBF,EAAO,CAC1E,MAAO,CAAC,CAACC,CAAA,CACZ,CAAC,EACEF,GAAgBA,EAAeC,EAAOC,CAAO,CACrD,CAAC,CACL,CAEA,MAAME,EAAeC,GAAe,CAChC,KAAK,UAAU,IAAI,YAAaF,EAAAA,qBAAqB,sBAAuBE,GAAO,OAAQ,CACvF,gBAAiB,8BACjB,MAAO,EAAA,CACV,CAAC,CACN,EAEI,WAAW,iBACX,WAAW,iBAAiB,qBAAsBD,CAAW,EAE5C,QAAQ,yCAAyC,EACzD,OAAO,CACZ,cAAe,GACf,YAAa,CAACE,EAAUL,IACpBG,EAAY,CAAE,OAAQH,EAAO,CAAA,CACpC,EAGDJ,GAAgBU,EAAAA,eAAe,KAAK,SAAS,EAEjDT,EAAA,CACJ,OAASG,EAAO,CACZF,EAAOE,CAAK,CAChB,CACJ,CAAC,CACL,CACJ"}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"crashHandlerNative.native-FupMnr1U.js","sources":["../src/adapters/native/crashHandlerNative.native.ts"],"sourcesContent":["import { Telemetry } from \"../../core/telemetry\";\nimport { buildErrorAttributes, captureConsole } from \"../crashCapture\";\n\nexport type CrashHandlerOptions = { captureConsole?: boolean };\n\nexport class CrashHandlerNative {\n constructor(private telemetry: Telemetry) { }\n\n // JS errors and unhandled rejections become `app.crash`; console.error becomes\n // `app.error` and console.warn a breadcrumb, both opt-in (default off). §4.7, #100\n attach(options: CrashHandlerOptions = {}): Promise<void> {\n const { captureConsole: consoleEnabled = false } = options;\n return new Promise((resolve, reject) => {\n try {\n if (typeof ErrorUtils !== \"undefined\" && ErrorUtils.setGlobalHandler) {\n const defaultHandler = ErrorUtils.getGlobalHandler?.();\n ErrorUtils.setGlobalHandler((error: any, isFatal?: boolean) => {\n // `error.fatal` is native-only — the web build never passes it (§4.7).\n this.telemetry.log(\"app.crash\", buildErrorAttributes(\"global_handler\", error, {\n fatal: !!isFatal,\n }));\n if (defaultHandler) defaultHandler(error, isFatal); // keep RN red screen in dev\n });\n }\n\n const onRejection = (event: any) => {\n this.telemetry.log(\"app.crash\", buildErrorAttributes(\"unhandled_rejection\", event?.reason, {\n fallbackMessage: \"Unhandled Promise Rejection\",\n fatal: false,\n }));\n };\n\n if (globalThis.addEventListener) {\n globalThis.addEventListener(\"unhandledrejection\", onRejection);\n } else {\n const tracking = require(\"promise/setimmediate/rejection-tracking\");\n tracking.enable({\n allRejections: true,\n onUnhandled: (_id: any, error: any) =>\n onRejection({ reason: error }),\n });\n }\n\n if (consoleEnabled) captureConsole(this.telemetry);\n\n resolve();\n } catch (error) {\n reject(error);\n }\n });\n }\n}\n"],"names":["CrashHandlerNative","telemetry","options","consoleEnabled","resolve","reject","defaultHandler","error","isFatal","buildErrorAttributes","onRejection","event","_id","captureConsole"],"mappings":";AAKO,MAAMA,EAAmB;AAAA,EAC5B,YAAoBC,GAAsB;AAAtB,SAAA,YAAAA;AAAA,EAAwB;AAAA;AAAA;AAAA,EAI5C,OAAOC,IAA+B,IAAmB;AACrD,UAAM,EAAE,gBAAgBC,IAAiB,GAAA,IAAUD;AACnD,WAAO,IAAI,QAAQ,CAACE,GAASC,MAAW;AACpC,UAAI;AACA,YAAI,OAAO,aAAe,OAAe,WAAW,kBAAkB;AAClE,gBAAMC,IAAiB,WAAW,mBAAA;AAClC,qBAAW,iBAAiB,CAACC,GAAYC,MAAsB;AAE3D,iBAAK,UAAU,IAAI,aAAaC,EAAqB,kBAAkBF,GAAO;AAAA,cAC1E,OAAO,CAAC,CAACC;AAAA,YAAA,CACZ,CAAC,GACEF,KAAgBA,EAAeC,GAAOC,CAAO;AAAA,UACrD,CAAC;AAAA,QACL;AAEA,cAAME,IAAc,CAACC,MAAe;AAChC,eAAK,UAAU,IAAI,aAAaF,EAAqB,uBAAuBE,GAAO,QAAQ;AAAA,YACvF,iBAAiB;AAAA,YACjB,OAAO;AAAA,UAAA,CACV,CAAC;AAAA,QACN;AAEA,QAAI,WAAW,mBACX,WAAW,iBAAiB,sBAAsBD,CAAW,IAE5C,QAAQ,yCAAyC,EACzD,OAAO;AAAA,UACZ,eAAe;AAAA,UACf,aAAa,CAACE,GAAUL,MACpBG,EAAY,EAAE,QAAQH,GAAO;AAAA,QAAA,CACpC,GAGDJ,KAAgBU,EAAe,KAAK,SAAS,GAEjDT,EAAA;AAAA,MACJ,SAASG,GAAO;AACZ,QAAAF,EAAOE,CAAK;AAAA,MAChB;AAAA,IACJ,CAAC;AAAA,EACL;AACJ;"}
|
|
@@ -1,53 +0,0 @@
|
|
|
1
|
-
import { Platform as t, Dimensions as _, PixelRatio as b } from "react-native";
|
|
2
|
-
import { D as a } from "./index-C2XQ-EYw.js";
|
|
3
|
-
import { v as N } from "./viewport-Dzmt5QwK.js";
|
|
4
|
-
class V {
|
|
5
|
-
// private telemetry: Telemetry;
|
|
6
|
-
// constructor(telemetry?: Telemetry) {
|
|
7
|
-
// this.telemetry = telemetry || new Telemetry();
|
|
8
|
-
// }
|
|
9
|
-
constructor() {
|
|
10
|
-
}
|
|
11
|
-
// device.id is NOT collected here (#91): it is self-minted and persisted by core.
|
|
12
|
-
// getUniqueId() carries two lifetimes on RN alone — ANDROID_ID survives reinstall,
|
|
13
|
-
// identifierForVendor does not — so one identity column would mean two things.
|
|
14
|
-
async collect() {
|
|
15
|
-
const e = await a.getApplicationName() || "UnknownApp", n = await a.getVersion() || "0.0.0", s = await a.getBuildNumber() || "0", r = await a.getBundleId() || "unknown.package", c = await a.getBrand(), d = await a.getManufacturer() || "", m = await a.getModel() || "", o = await a.getSystemVersion() || "", p = await a.getSystemName() || "", i = t.OS === "android" ? await a.getApiLevel() : void 0, w = t.OS === "android" ? await a.getHardware?.() : void 0, g = t.OS === "android" ? await a.getProduct?.() : void 0, l = t.OS === "ios" ? p : void 0, u = (await a.supportedAbis?.())?.[0], v = await a.isLowRamDevice?.(), { width: f, height: y } = _.get("window"), S = N(f, y, b.get());
|
|
16
|
-
return {
|
|
17
|
-
app: {
|
|
18
|
-
name: e,
|
|
19
|
-
version: n,
|
|
20
|
-
build_number: s,
|
|
21
|
-
package_name: r
|
|
22
|
-
},
|
|
23
|
-
device: {
|
|
24
|
-
platform: t.OS,
|
|
25
|
-
platform_version: o,
|
|
26
|
-
model: m,
|
|
27
|
-
manufacturer: d,
|
|
28
|
-
brand: c,
|
|
29
|
-
// Android fields
|
|
30
|
-
android_sdk: i ? String(i) : void 0,
|
|
31
|
-
android_release: t.OS === "android" ? o : void 0,
|
|
32
|
-
hardware: w,
|
|
33
|
-
product: g,
|
|
34
|
-
cpu_abi: u,
|
|
35
|
-
low_ram: v,
|
|
36
|
-
// iOS fields
|
|
37
|
-
ios_system_name: l,
|
|
38
|
-
// Viewport — both builds, never null (§3.3)
|
|
39
|
-
...S
|
|
40
|
-
}
|
|
41
|
-
};
|
|
42
|
-
}
|
|
43
|
-
/**
|
|
44
|
-
* Context-only adapter. collect() feeds the Context block on every event;
|
|
45
|
-
* start() emits no standalone device_info event (ADR-0002).
|
|
46
|
-
*/
|
|
47
|
-
async start(e) {
|
|
48
|
-
}
|
|
49
|
-
}
|
|
50
|
-
export {
|
|
51
|
-
V as DeviceInfoTrackerNative
|
|
52
|
-
};
|
|
53
|
-
//# sourceMappingURL=deviceInfo.native-BJ-3Jj1T.js.map
|