@sentry/react-native 6.15.0 → 7.0.0-beta.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (287) hide show
  1. package/android/build.gradle +1 -1
  2. package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +11 -14
  3. package/android/src/main/java/io/sentry/react/RNSentryVersion.java +1 -1
  4. package/dist/js/NativeRNSentry.d.ts.map +1 -1
  5. package/dist/js/NativeRNSentry.js.map +1 -1
  6. package/dist/js/client.d.ts.map +1 -1
  7. package/dist/js/client.js +5 -1
  8. package/dist/js/client.js.map +1 -1
  9. package/dist/js/feedback/FeedbackButton.d.ts.map +1 -1
  10. package/dist/js/feedback/FeedbackButton.js +1 -1
  11. package/dist/js/feedback/FeedbackButton.js.map +1 -1
  12. package/dist/js/feedback/FeedbackWidget.d.ts +1 -1
  13. package/dist/js/feedback/FeedbackWidget.d.ts.map +1 -1
  14. package/dist/js/feedback/FeedbackWidget.js +60 -46
  15. package/dist/js/feedback/FeedbackWidget.js.map +1 -1
  16. package/dist/js/feedback/FeedbackWidget.styles.d.ts.map +1 -1
  17. package/dist/js/feedback/FeedbackWidget.styles.js.map +1 -1
  18. package/dist/js/feedback/FeedbackWidget.theme.d.ts.map +1 -1
  19. package/dist/js/feedback/FeedbackWidget.theme.js.map +1 -1
  20. package/dist/js/feedback/FeedbackWidget.types.d.ts +30 -30
  21. package/dist/js/feedback/FeedbackWidget.types.d.ts.map +1 -1
  22. package/dist/js/feedback/FeedbackWidget.types.js.map +1 -1
  23. package/dist/js/feedback/FeedbackWidgetManager.d.ts.map +1 -1
  24. package/dist/js/feedback/FeedbackWidgetManager.js +6 -3
  25. package/dist/js/feedback/FeedbackWidgetManager.js.map +1 -1
  26. package/dist/js/feedback/FeedbackWidgetProvider.d.ts.map +1 -1
  27. package/dist/js/feedback/FeedbackWidgetProvider.js +9 -10
  28. package/dist/js/feedback/FeedbackWidgetProvider.js.map +1 -1
  29. package/dist/js/feedback/ScreenshotButton.d.ts.map +1 -1
  30. package/dist/js/feedback/ScreenshotButton.js.map +1 -1
  31. package/dist/js/feedback/defaults.d.ts +1 -1
  32. package/dist/js/feedback/defaults.d.ts.map +1 -1
  33. package/dist/js/feedback/defaults.js.map +1 -1
  34. package/dist/js/feedback/integration.d.ts +1 -1
  35. package/dist/js/feedback/integration.d.ts.map +1 -1
  36. package/dist/js/feedback/integration.js +1 -1
  37. package/dist/js/feedback/integration.js.map +1 -1
  38. package/dist/js/feedback/lazy.d.ts.map +1 -1
  39. package/dist/js/feedback/lazy.js.map +1 -1
  40. package/dist/js/feedback/utils.d.ts.map +1 -1
  41. package/dist/js/feedback/utils.js +2 -2
  42. package/dist/js/feedback/utils.js.map +1 -1
  43. package/dist/js/index.d.ts +3 -3
  44. package/dist/js/index.d.ts.map +1 -1
  45. package/dist/js/index.js +2 -2
  46. package/dist/js/index.js.map +1 -1
  47. package/dist/js/integrations/appRegistry.d.ts.map +1 -1
  48. package/dist/js/integrations/appRegistry.js.map +1 -1
  49. package/dist/js/integrations/breadcrumbs.d.ts +47 -0
  50. package/dist/js/integrations/breadcrumbs.d.ts.map +1 -0
  51. package/dist/js/integrations/breadcrumbs.js +15 -0
  52. package/dist/js/integrations/breadcrumbs.js.map +1 -0
  53. package/dist/js/integrations/debugsymbolicator.d.ts.map +1 -1
  54. package/dist/js/integrations/debugsymbolicator.js +2 -1
  55. package/dist/js/integrations/debugsymbolicator.js.map +1 -1
  56. package/dist/js/integrations/debugsymbolicatorutils.d.ts.map +1 -1
  57. package/dist/js/integrations/debugsymbolicatorutils.js +12 -2
  58. package/dist/js/integrations/debugsymbolicatorutils.js.map +1 -1
  59. package/dist/js/integrations/default.d.ts.map +1 -1
  60. package/dist/js/integrations/default.js +9 -5
  61. package/dist/js/integrations/default.js.map +1 -1
  62. package/dist/js/integrations/devicecontext.d.ts.map +1 -1
  63. package/dist/js/integrations/devicecontext.js.map +1 -1
  64. package/dist/js/integrations/expocontext.d.ts.map +1 -1
  65. package/dist/js/integrations/expocontext.js.map +1 -1
  66. package/dist/js/integrations/exports.d.ts +2 -1
  67. package/dist/js/integrations/exports.d.ts.map +1 -1
  68. package/dist/js/integrations/exports.js +2 -1
  69. package/dist/js/integrations/exports.js.map +1 -1
  70. package/dist/js/integrations/modulesloader.d.ts.map +1 -1
  71. package/dist/js/integrations/modulesloader.js.map +1 -1
  72. package/dist/js/integrations/nativelinkederrors.d.ts.map +1 -1
  73. package/dist/js/integrations/nativelinkederrors.js +4 -3
  74. package/dist/js/integrations/nativelinkederrors.js.map +1 -1
  75. package/dist/js/integrations/reactnativeerrorhandlers.js +2 -1
  76. package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
  77. package/dist/js/integrations/reactnativeerrorhandlersutils.d.ts.map +1 -1
  78. package/dist/js/integrations/reactnativeerrorhandlersutils.js.map +1 -1
  79. package/dist/js/integrations/reactnativeinfo.d.ts.map +1 -1
  80. package/dist/js/integrations/reactnativeinfo.js.map +1 -1
  81. package/dist/js/integrations/release.d.ts.map +1 -1
  82. package/dist/js/integrations/release.js.map +1 -1
  83. package/dist/js/integrations/rewriteframes.d.ts.map +1 -1
  84. package/dist/js/integrations/rewriteframes.js.map +1 -1
  85. package/dist/js/integrations/screenshot.d.ts.map +1 -1
  86. package/dist/js/integrations/screenshot.js +3 -3
  87. package/dist/js/integrations/screenshot.js.map +1 -1
  88. package/dist/js/integrations/sdkinfo.d.ts.map +1 -1
  89. package/dist/js/integrations/sdkinfo.js.map +1 -1
  90. package/dist/js/integrations/spotlight.d.ts.map +1 -1
  91. package/dist/js/integrations/spotlight.js +8 -4
  92. package/dist/js/integrations/spotlight.js.map +1 -1
  93. package/dist/js/integrations/viewhierarchy.d.ts.map +1 -1
  94. package/dist/js/integrations/viewhierarchy.js +2 -1
  95. package/dist/js/integrations/viewhierarchy.js.map +1 -1
  96. package/dist/js/options.d.ts +8 -1
  97. package/dist/js/options.d.ts.map +1 -1
  98. package/dist/js/options.js.map +1 -1
  99. package/dist/js/profiling/cache.d.ts +1 -1
  100. package/dist/js/profiling/convertHermesProfile.d.ts.map +1 -1
  101. package/dist/js/profiling/convertHermesProfile.js +18 -5
  102. package/dist/js/profiling/convertHermesProfile.js.map +1 -1
  103. package/dist/js/profiling/debugid.d.ts.map +1 -1
  104. package/dist/js/profiling/debugid.js +9 -1
  105. package/dist/js/profiling/debugid.js.map +1 -1
  106. package/dist/js/profiling/hermes.d.ts +1 -1
  107. package/dist/js/profiling/hermes.d.ts.map +1 -1
  108. package/dist/js/profiling/hermes.js.map +1 -1
  109. package/dist/js/profiling/integration.d.ts.map +1 -1
  110. package/dist/js/profiling/integration.js +2 -1
  111. package/dist/js/profiling/integration.js.map +1 -1
  112. package/dist/js/profiling/types.d.ts.map +1 -1
  113. package/dist/js/profiling/types.js.map +1 -1
  114. package/dist/js/profiling/utils.d.ts.map +1 -1
  115. package/dist/js/profiling/utils.js +15 -17
  116. package/dist/js/profiling/utils.js.map +1 -1
  117. package/dist/js/replay/CustomMask.d.ts.map +1 -1
  118. package/dist/js/replay/CustomMask.js +1 -1
  119. package/dist/js/replay/CustomMask.js.map +1 -1
  120. package/dist/js/replay/browserReplay.d.ts +13 -1
  121. package/dist/js/replay/browserReplay.d.ts.map +1 -1
  122. package/dist/js/replay/browserReplay.js +26 -0
  123. package/dist/js/replay/browserReplay.js.map +1 -1
  124. package/dist/js/replay/mobilereplay.d.ts.map +1 -1
  125. package/dist/js/replay/mobilereplay.js +2 -7
  126. package/dist/js/replay/mobilereplay.js.map +1 -1
  127. package/dist/js/replay/networkUtils.d.ts.map +1 -1
  128. package/dist/js/replay/networkUtils.js +4 -11
  129. package/dist/js/replay/networkUtils.js.map +1 -1
  130. package/dist/js/replay/replayInterface.d.ts +52 -0
  131. package/dist/js/replay/replayInterface.d.ts.map +1 -0
  132. package/dist/js/replay/replayInterface.js +2 -0
  133. package/dist/js/replay/replayInterface.js.map +1 -0
  134. package/dist/js/replay/xhrUtils.d.ts.map +1 -1
  135. package/dist/js/replay/xhrUtils.js.map +1 -1
  136. package/dist/js/scopeSync.d.ts.map +1 -1
  137. package/dist/js/scopeSync.js +7 -1
  138. package/dist/js/scopeSync.js.map +1 -1
  139. package/dist/js/sdk.d.ts +1 -6
  140. package/dist/js/sdk.d.ts.map +1 -1
  141. package/dist/js/sdk.js +3 -16
  142. package/dist/js/sdk.js.map +1 -1
  143. package/dist/js/tools/ModulesCollector.js +1 -0
  144. package/dist/js/tools/ModulesCollector.js.map +1 -1
  145. package/dist/js/tools/collectModules.js +1 -0
  146. package/dist/js/tools/collectModules.js.map +1 -1
  147. package/dist/js/tools/enableLogger.js +1 -0
  148. package/dist/js/tools/enableLogger.js.map +1 -1
  149. package/dist/js/tools/metroMiddleware.js +2 -1
  150. package/dist/js/tools/metroMiddleware.js.map +1 -1
  151. package/dist/js/tools/metroconfig.d.ts.map +1 -1
  152. package/dist/js/tools/metroconfig.js +6 -4
  153. package/dist/js/tools/metroconfig.js.map +1 -1
  154. package/dist/js/tools/sentryBabelTransformer.js +1 -0
  155. package/dist/js/tools/sentryBabelTransformer.js.map +1 -1
  156. package/dist/js/tools/sentryBabelTransformerUtils.d.ts.map +1 -1
  157. package/dist/js/tools/sentryBabelTransformerUtils.js +2 -1
  158. package/dist/js/tools/sentryBabelTransformerUtils.js.map +1 -1
  159. package/dist/js/tools/sentryMetroSerializer.d.ts.map +1 -1
  160. package/dist/js/tools/sentryMetroSerializer.js +1 -0
  161. package/dist/js/tools/sentryMetroSerializer.js.map +1 -1
  162. package/dist/js/tools/utils.js +1 -0
  163. package/dist/js/tools/utils.js.map +1 -1
  164. package/dist/js/tools/vendor/expo/expoconfig.js +1 -0
  165. package/dist/js/tools/vendor/expo/expoconfig.js.map +1 -1
  166. package/dist/js/tools/vendor/metro/metroBabelTransformer.js +1 -0
  167. package/dist/js/tools/vendor/metro/metroBabelTransformer.js.map +1 -1
  168. package/dist/js/tools/vendor/metro/utils.d.ts.map +1 -1
  169. package/dist/js/tools/vendor/metro/utils.js +1 -0
  170. package/dist/js/tools/vendor/metro/utils.js.map +1 -1
  171. package/dist/js/touchevents.d.ts.map +1 -1
  172. package/dist/js/touchevents.js +4 -0
  173. package/dist/js/touchevents.js.map +1 -1
  174. package/dist/js/tracing/gesturetracing.d.ts.map +1 -1
  175. package/dist/js/tracing/gesturetracing.js.map +1 -1
  176. package/dist/js/tracing/integrations/appStart.d.ts +1 -1
  177. package/dist/js/tracing/integrations/appStart.d.ts.map +1 -1
  178. package/dist/js/tracing/integrations/appStart.js +10 -3
  179. package/dist/js/tracing/integrations/appStart.js.map +1 -1
  180. package/dist/js/tracing/integrations/nativeFrames.d.ts.map +1 -1
  181. package/dist/js/tracing/integrations/nativeFrames.js.map +1 -1
  182. package/dist/js/tracing/integrations/stalltracking.d.ts +1 -1
  183. package/dist/js/tracing/integrations/stalltracking.d.ts.map +1 -1
  184. package/dist/js/tracing/integrations/stalltracking.js.map +1 -1
  185. package/dist/js/tracing/integrations/timeToDisplayIntegration.d.ts.map +1 -1
  186. package/dist/js/tracing/integrations/timeToDisplayIntegration.js +14 -10
  187. package/dist/js/tracing/integrations/timeToDisplayIntegration.js.map +1 -1
  188. package/dist/js/tracing/integrations/userInteraction.d.ts.map +1 -1
  189. package/dist/js/tracing/integrations/userInteraction.js.map +1 -1
  190. package/dist/js/tracing/onSpanEndUtils.d.ts +1 -1
  191. package/dist/js/tracing/onSpanEndUtils.d.ts.map +1 -1
  192. package/dist/js/tracing/onSpanEndUtils.js +2 -1
  193. package/dist/js/tracing/onSpanEndUtils.js.map +1 -1
  194. package/dist/js/tracing/reactnativenavigation.d.ts.map +1 -1
  195. package/dist/js/tracing/reactnativenavigation.js +1 -1
  196. package/dist/js/tracing/reactnativenavigation.js.map +1 -1
  197. package/dist/js/tracing/reactnativeprofiler.d.ts +3 -1
  198. package/dist/js/tracing/reactnativeprofiler.d.ts.map +1 -1
  199. package/dist/js/tracing/reactnativeprofiler.js +2 -1
  200. package/dist/js/tracing/reactnativeprofiler.js.map +1 -1
  201. package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
  202. package/dist/js/tracing/reactnativetracing.js.map +1 -1
  203. package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
  204. package/dist/js/tracing/reactnavigation.js +5 -4
  205. package/dist/js/tracing/reactnavigation.js.map +1 -1
  206. package/dist/js/tracing/span.d.ts.map +1 -1
  207. package/dist/js/tracing/span.js +5 -5
  208. package/dist/js/tracing/span.js.map +1 -1
  209. package/dist/js/tracing/timeToDisplayFallback.d.ts +1 -1
  210. package/dist/js/tracing/timeToDisplayFallback.d.ts.map +1 -1
  211. package/dist/js/tracing/timeToDisplayFallback.js.map +1 -1
  212. package/dist/js/tracing/timetodisplay.d.ts.map +1 -1
  213. package/dist/js/tracing/timetodisplay.js +13 -13
  214. package/dist/js/tracing/timetodisplay.js.map +1 -1
  215. package/dist/js/tracing/timetodisplaynative.d.ts.map +1 -1
  216. package/dist/js/tracing/timetodisplaynative.js.map +1 -1
  217. package/dist/js/tracing/utils.d.ts.map +1 -1
  218. package/dist/js/tracing/utils.js.map +1 -1
  219. package/dist/js/transports/encodePolyfill.d.ts +4 -0
  220. package/dist/js/transports/encodePolyfill.d.ts.map +1 -1
  221. package/dist/js/transports/encodePolyfill.js +17 -3
  222. package/dist/js/transports/encodePolyfill.js.map +1 -1
  223. package/dist/js/transports/native.d.ts.map +1 -1
  224. package/dist/js/transports/native.js.map +1 -1
  225. package/dist/js/utils/AsyncExpiringMap.d.ts.map +1 -1
  226. package/dist/js/utils/AsyncExpiringMap.js +8 -4
  227. package/dist/js/utils/AsyncExpiringMap.js.map +1 -1
  228. package/dist/js/utils/carrier.d.ts +5 -0
  229. package/dist/js/utils/carrier.d.ts.map +1 -0
  230. package/dist/js/utils/carrier.js +11 -0
  231. package/dist/js/utils/carrier.js.map +1 -0
  232. package/dist/js/utils/encode.d.ts +5 -0
  233. package/dist/js/utils/encode.d.ts.map +1 -0
  234. package/dist/js/utils/encode.js +13 -0
  235. package/dist/js/utils/encode.js.map +1 -0
  236. package/dist/js/utils/envelope.d.ts.map +1 -1
  237. package/dist/js/utils/envelope.js +1 -2
  238. package/dist/js/utils/envelope.js.map +1 -1
  239. package/dist/js/utils/environment.d.ts.map +1 -1
  240. package/dist/js/utils/environment.js +5 -6
  241. package/dist/js/utils/environment.js.map +1 -1
  242. package/dist/js/utils/rnlibraries.d.ts.map +1 -1
  243. package/dist/js/utils/rnlibraries.js.map +1 -1
  244. package/dist/js/utils/safe.d.ts.map +1 -1
  245. package/dist/js/utils/safe.js.map +1 -1
  246. package/dist/js/utils/worldwide.d.ts +3 -2
  247. package/dist/js/utils/worldwide.d.ts.map +1 -1
  248. package/dist/js/utils/worldwide.js.map +1 -1
  249. package/dist/js/vendor/base64-js/fromByteArray.d.ts.map +1 -1
  250. package/dist/js/vendor/base64-js/fromByteArray.js +6 -0
  251. package/dist/js/vendor/base64-js/fromByteArray.js.map +1 -1
  252. package/dist/js/version.d.ts +1 -1
  253. package/dist/js/version.d.ts.map +1 -1
  254. package/dist/js/version.js +1 -1
  255. package/dist/js/version.js.map +1 -1
  256. package/dist/js/wrapper.d.ts.map +1 -1
  257. package/dist/js/wrapper.js +10 -8
  258. package/dist/js/wrapper.js.map +1 -1
  259. package/ios/RNSentryVersion.m +1 -1
  260. package/package.json +9 -10
  261. package/plugin/build/withSentry.js +3 -3
  262. package/plugin/build/withSentryAndroidGradlePlugin.js +3 -3
  263. package/scripts/expo-upload-sourcemaps.js +2 -2
  264. package/src/js/NativeRNSentry.ts +0 -1
  265. package/ts3.8/dist/js/feedback/FeedbackWidget.d.ts +1 -1
  266. package/ts3.8/dist/js/feedback/FeedbackWidget.types.d.ts +30 -30
  267. package/ts3.8/dist/js/feedback/defaults.d.ts +1 -1
  268. package/ts3.8/dist/js/feedback/integration.d.ts +1 -1
  269. package/ts3.8/dist/js/index.d.ts +3 -3
  270. package/ts3.8/dist/js/integrations/breadcrumbs.d.ts +47 -0
  271. package/ts3.8/dist/js/integrations/exports.d.ts +2 -1
  272. package/ts3.8/dist/js/options.d.ts +8 -1
  273. package/ts3.8/dist/js/profiling/cache.d.ts +1 -1
  274. package/ts3.8/dist/js/profiling/hermes.d.ts +1 -1
  275. package/ts3.8/dist/js/replay/browserReplay.d.ts +13 -1
  276. package/ts3.8/dist/js/replay/replayInterface.d.ts +52 -0
  277. package/ts3.8/dist/js/sdk.d.ts +1 -6
  278. package/ts3.8/dist/js/tracing/integrations/appStart.d.ts +1 -1
  279. package/ts3.8/dist/js/tracing/integrations/stalltracking.d.ts +1 -1
  280. package/ts3.8/dist/js/tracing/onSpanEndUtils.d.ts +1 -1
  281. package/ts3.8/dist/js/tracing/reactnativeprofiler.d.ts +3 -1
  282. package/ts3.8/dist/js/tracing/timeToDisplayFallback.d.ts +1 -1
  283. package/ts3.8/dist/js/transports/encodePolyfill.d.ts +4 -0
  284. package/ts3.8/dist/js/utils/carrier.d.ts +5 -0
  285. package/ts3.8/dist/js/utils/encode.d.ts +5 -0
  286. package/ts3.8/dist/js/utils/worldwide.d.ts +3 -2
  287. package/ts3.8/dist/js/version.d.ts +1 -1
@@ -1 +1 @@
1
- {"version":3,"file":"debugsymbolicatorutils.js","sourceRoot":"","sources":["../../../src/js/integrations/debugsymbolicatorutils.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGrE;;;;;GAKG;AACH,MAAM,UAAgB,kBAAkB,CAAC,MAA0B;;QACjE,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;YAC3B,IAAI;gBACF,MAAM,GAAG,GAAG,gBAAgB,EAAE,CAAC;gBAC/B,IAAI,CAAC,GAAG,EAAE;oBACR,OAAO,CAAC,MAAM,CAAC,CAAC;oBAChB,OAAO;iBACR;gBAED,GAAG,CAAC,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AAC,QAAQ,EAAE;QAClC,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;KACzD;IACD,OAAO,oBAAoB,CAAC,QAAQ,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;AACnE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CACnC,KAAoC,EACpC,SAAmC;IAEnC,IAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE;QAClC,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;KACzD;IACD,OAAO,oBAAoB,CAAC,QAAQ,CAAC,qBAAqB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AAC/E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY;;IAC1B,IAAI;QACF,OAAO,MAAA,oBAAoB,CAAC,QAAQ,0CAAE,YAAY,EAAE,CAAC;KACtD;IAAC,OAAO,GAAG,EAAE;QACZ,8BAA8B;KAC/B;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import type { StackFrame as SentryStackFrame } from '@sentry/core';\nimport { logger } from '@sentry/core';\n\nimport { ReactNativeLibraries } from '../utils/rnlibraries';\nimport { createStealthXhr, XHR_READYSTATE_DONE } from '../utils/xhr';\nimport type * as ReactNative from '../vendor/react-native';\n\n/**\n * Fetches source context for the Sentry Middleware (/__sentry/context)\n *\n * @param frame StackFrame\n * @param getDevServer function from RN to get DevServer URL\n */\nexport async function fetchSourceContext(frames: SentryStackFrame[]): Promise<SentryStackFrame[]> {\n return new Promise(resolve => {\n try {\n const xhr = createStealthXhr();\n if (!xhr) {\n resolve(frames);\n return;\n }\n\n xhr.open('POST', getSentryMetroSourceContextUrl(), true);\n xhr.setRequestHeader('Content-Type', 'application/json');\n xhr.send(JSON.stringify({ stack: frames }));\n\n xhr.onreadystatechange = (): void => {\n if (xhr.readyState === XHR_READYSTATE_DONE) {\n if (xhr.status !== 200) {\n resolve(frames);\n }\n\n try {\n const response: { stack?: SentryStackFrame[] } = JSON.parse(xhr.responseText);\n if (Array.isArray(response.stack)) {\n resolve(response.stack);\n } else {\n resolve(frames);\n }\n } catch (error) {\n resolve(frames);\n }\n }\n };\n xhr.onerror = (): void => {\n resolve(frames);\n };\n } catch (error) {\n logger.error('Could not fetch source context.', error);\n resolve(frames);\n }\n });\n}\n\nfunction getSentryMetroSourceContextUrl(): string {\n return `${getDevServer().url}__sentry/context`;\n}\n\n/**\n * Loads and calls RN Core Devtools parseErrorStack function.\n */\nexport function parseErrorStack(errorStack: string): Array<ReactNative.StackFrame> {\n if (!ReactNativeLibraries.Devtools) {\n throw new Error('React Native Devtools not available.');\n }\n return ReactNativeLibraries.Devtools.parseErrorStack(errorStack);\n}\n\n/**\n * Loads and calls RN Core Devtools symbolicateStackTrace function.\n */\nexport function symbolicateStackTrace(\n stack: Array<ReactNative.StackFrame>,\n extraData?: Record<string, unknown>,\n): Promise<ReactNative.SymbolicatedStackTrace> {\n if (!ReactNativeLibraries.Devtools) {\n throw new Error('React Native Devtools not available.');\n }\n return ReactNativeLibraries.Devtools.symbolicateStackTrace(stack, extraData);\n}\n\n/**\n * Loads and returns the RN DevServer URL.\n */\nexport function getDevServer(): ReactNative.DevServerInfo | undefined {\n try {\n return ReactNativeLibraries.Devtools?.getDevServer();\n } catch (_oO) {\n // We can't load devserver URL\n }\n return undefined;\n}\n"]}
1
+ {"version":3,"file":"debugsymbolicatorutils.js","sourceRoot":"","sources":["../../../src/js/integrations/debugsymbolicatorutils.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGrE;;;;;GAKG;AACH,MAAM,UAAgB,kBAAkB,CAAC,MAA0B;;QACjE,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;YAC3B,IAAI;gBACF,MAA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K,EAAE;gBACd,MAAM,CAAC,KAAK,CAAC,iCAAiC,EAAE,KAAK,CAAC,CAAC;gBACvD,OAAO,CAAC,MAAM,CAAC,CAAC;aACjB;QACH,CAAC,CAAC,CAAC;IACL,CAAC;CAAA;AAED,SAAS,8BAA8B;IACrC,MAAM,SAAS,GAAG,YAAY,EAAE,CAAC;IAEjC,IAAI,CAAC,SAAS,EAAE;QACd,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,GAAG,SAAS,CAAC,GAAG,kBAAkB,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,UAAkB;IAChD,IAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE;QAClC,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;KACzD;IACD,OAAO,oBAAoB,CAAC,QAAQ,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;AACnE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CACnC,KAAoC,EACpC,SAAmC;IAEnC,IAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE;QAClC,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;KACzD;IACD,OAAO,oBAAoB,CAAC,QAAQ,CAAC,qBAAqB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AAC/E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY;;IAC1B,IAAI;QACF,OAAO,MAAA,oBAAoB,CAAC,QAAQ,0CAAE,YAAY,EAAE,CAAC;KACtD;IAAC,OAAO,GAAG,EAAE;QACZ,8BAA8B;KAC/B;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import type { StackFrame as SentryStackFrame } from '@sentry/core';\nimport { logger } from '@sentry/core';\nimport { ReactNativeLibraries } from '../utils/rnlibraries';\nimport { createStealthXhr, XHR_READYSTATE_DONE } from '../utils/xhr';\nimport type * as ReactNative from '../vendor/react-native';\n\n/**\n * Fetches source context for the Sentry Middleware (/__sentry/context)\n *\n * @param frame StackFrame\n * @param getDevServer function from RN to get DevServer URL\n */\nexport async function fetchSourceContext(frames: SentryStackFrame[]): Promise<SentryStackFrame[]> {\n return new Promise(resolve => {\n try {\n const xhr = createStealthXhr();\n if (!xhr) {\n resolve(frames);\n return;\n }\n\n const url = getSentryMetroSourceContextUrl();\n if (!url) {\n logger.error('Could not fetch source context. No dev server URL found.');\n resolve(frames);\n return;\n }\n\n xhr.open('POST', url, true);\n xhr.setRequestHeader('Content-Type', 'application/json');\n xhr.send(JSON.stringify({ stack: frames }));\n\n xhr.onreadystatechange = (): void => {\n if (xhr.readyState === XHR_READYSTATE_DONE) {\n if (xhr.status !== 200) {\n resolve(frames);\n }\n\n try {\n const response: { stack?: SentryStackFrame[] } = JSON.parse(xhr.responseText);\n if (Array.isArray(response.stack)) {\n resolve(response.stack);\n } else {\n resolve(frames);\n }\n } catch (error) {\n resolve(frames);\n }\n }\n };\n xhr.onerror = (): void => {\n resolve(frames);\n };\n } catch (error) {\n logger.error('Could not fetch source context.', error);\n resolve(frames);\n }\n });\n}\n\nfunction getSentryMetroSourceContextUrl(): string | undefined {\n const devServer = getDevServer();\n\n if (!devServer) {\n return undefined;\n }\n\n return `${devServer.url}__sentry/context`;\n}\n\n/**\n * Loads and calls RN Core Devtools parseErrorStack function.\n */\nexport function parseErrorStack(errorStack: string): Array<ReactNative.StackFrame> {\n if (!ReactNativeLibraries.Devtools) {\n throw new Error('React Native Devtools not available.');\n }\n return ReactNativeLibraries.Devtools.parseErrorStack(errorStack);\n}\n\n/**\n * Loads and calls RN Core Devtools symbolicateStackTrace function.\n */\nexport function symbolicateStackTrace(\n stack: Array<ReactNative.StackFrame>,\n extraData?: Record<string, unknown>,\n): Promise<ReactNative.SymbolicatedStackTrace> {\n if (!ReactNativeLibraries.Devtools) {\n throw new Error('React Native Devtools not available.');\n }\n return ReactNativeLibraries.Devtools.symbolicateStackTrace(stack, extraData);\n}\n\n/**\n * Loads and returns the RN DevServer URL.\n */\nexport function getDevServer(): ReactNative.DevServerInfo | undefined {\n try {\n return ReactNativeLibraries.Devtools?.getDevServer();\n } catch (_oO) {\n // We can't load devserver URL\n }\n return undefined;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAEhD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAqC3D;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,wBAAwB,GAAG,WAAW,EAAE,CA4GvF"}
1
+ {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAqC3D;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,wBAAwB,GAAG,WAAW,EAAE,CA6GvF"}
@@ -1,3 +1,5 @@
1
+ /* eslint-disable complexity */
2
+ import { browserSessionIntegration } from '@sentry/browser';
1
3
  import { reactNativeTracingIntegration } from '../tracing';
2
4
  import { notWeb } from '../utils/environment';
3
5
  import { appRegistryIntegration, appStartIntegration, breadcrumbsIntegration, browserApiErrorsIntegration, browserGlobalHandlersIntegration, browserLinkedErrorsIntegration, createNativeFramesIntegrations, createReactNativeRewriteFrames, debugSymbolicatorIntegration, dedupeIntegration, deviceContextIntegration, eventOriginIntegration, expoContextIntegration, functionToStringIntegration, hermesProfilingIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, mobileReplayIntegration, modulesLoaderIntegration, nativeLinkedErrorsIntegration, nativeReleaseIntegration, reactNativeErrorHandlersIntegration, reactNativeInfoIntegration, screenshotIntegration, sdkInfoIntegration, spotlightIntegration, stallTrackingIntegration, timeToDisplayIntegration, userInteractionIntegration, viewHierarchyIntegration, } from './exports';
@@ -9,6 +11,7 @@ import { appRegistryIntegration, appStartIntegration, breadcrumbsIntegration, br
9
11
  * Web integrations are only returned when running on web.
10
12
  */
11
13
  export function getDefaultIntegrations(options) {
14
+ var _a, _b;
12
15
  const integrations = [];
13
16
  if (notWeb()) {
14
17
  integrations.push(reactNativeErrorHandlersIntegration({
@@ -20,6 +23,9 @@ export function getDefaultIntegrations(options) {
20
23
  integrations.push(browserApiErrorsIntegration());
21
24
  integrations.push(browserGlobalHandlersIntegration());
22
25
  integrations.push(browserLinkedErrorsIntegration());
26
+ if (options.enableAutoSessionTracking) {
27
+ integrations.push(browserSessionIntegration());
28
+ }
23
29
  }
24
30
  // @sentry/react default integrations
25
31
  integrations.push(inboundFiltersIntegration());
@@ -49,9 +55,7 @@ export function getDefaultIntegrations(options) {
49
55
  // hasTracingEnabled from `@sentry/core` only check if tracesSampler or tracesSampleRate keys are present
50
56
  // that's different from prev imp here and might lead misconfiguration
51
57
  // `tracesSampleRate: undefined` should not enable tracing
52
- const hasTracingEnabled = options.enableTracing ||
53
- typeof options.tracesSampleRate === 'number' ||
54
- typeof options.tracesSampler === 'function';
58
+ const hasTracingEnabled = typeof options.tracesSampleRate === 'number' || typeof options.tracesSampler === 'function';
55
59
  if (hasTracingEnabled && options.enableAppStartTracking) {
56
60
  integrations.push(appStartIntegration());
57
61
  }
@@ -85,8 +89,8 @@ export function getDefaultIntegrations(options) {
85
89
  (options._experiments && typeof options._experiments.replaysSessionSampleRate === 'number');
86
90
  if (!hasReplayOptions && hasExperimentsReplayOptions) {
87
91
  // Remove in the next major version (v7)
88
- options.replaysOnErrorSampleRate = options._experiments.replaysOnErrorSampleRate;
89
- options.replaysSessionSampleRate = options._experiments.replaysSessionSampleRate;
92
+ options.replaysOnErrorSampleRate = (_a = options._experiments) === null || _a === void 0 ? void 0 : _a.replaysOnErrorSampleRate;
93
+ options.replaysSessionSampleRate = (_b = options._experiments) === null || _b === void 0 ? void 0 : _b.replaysSessionSampleRate;
90
94
  }
91
95
  if ((hasReplayOptions || hasExperimentsReplayOptions) && notWeb()) {
92
96
  // We can't create and add browserReplayIntegration as it overrides the users supplied one
@@ -1 +1 @@
1
- {"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,4BAA4B,EAC5B,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACxB,6BAA6B,EAC7B,wBAAwB,EACxB,mCAAmC,EACnC,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,WAAW,CAAC;AAEnB;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAiC;IACtE,MAAM,YAAY,GAAkB,EAAE,CAAC;IAEvC,IAAI,MAAM,EAAE,EAAE;QACZ,YAAY,CAAC,IAAI,CACf,mCAAmC,CAAC;YAClC,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;SAC/C,CAAC,CACH,CAAC;QACF,YAAY,CAAC,IAAI,CAAC,6BAA6B,EAAE,CAAC,CAAC;KACpD;SAAM;QACL,YAAY,CAAC,IAAI,CAAC,2BAA2B,EAAE,CAAC,CAAC;QACjD,YAAY,CAAC,IAAI,CAAC,gCAAgC,EAAE,CAAC,CAA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BAAoB,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;KACzD;IAED,MAAM,gBAAgB,GACpB,OAAO,OAAO,CAAC,wBAAwB,KAAK,QAAQ,IAAI,OAAO,OAAO,CAAC,wBAAwB,KAAK,QAAQ,CAAC;IAC/G,MAAM,2BAA2B,GAC/B,CAAC,OAAO,CAAC,YAAY,IAAI,OAAO,OAAO,CAAC,YAAY,CAAC,wBAAwB,KAAK,QAAQ,CAAC;QAC3F,CAAC,OAAO,CAAC,YAAY,IAAI,OAAO,OAAO,CAAC,YAAY,CAAC,wBAAwB,KAAK,QAAQ,CAAC,CAAC;IAE9F,IAAI,CAAC,gBAAgB,IAAI,2BAA2B,EAAE;QACpD,wCAAwC;QACxC,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,YAAY,CAAC,wBAAwB,CAAC;QACjF,OAAO,CAAC,wBAAwB,GAAG,OAAO,CAAC,YAAY,CAAC,wBAAwB,CAAC;KAClF;IAED,IAAI,CAAC,gBAAgB,IAAI,2BAA2B,CAAC,IAAI,MAAM,EAAE,EAAE;QACjE,0FAA0F;QAC1F,yFAAyF;QACzF,YAAY,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC,CAAC;KAC9C;IAED,IAAI,OAAO,IAAI,MAAM,EAAE,EAAE;QACvB,YAAY,CAAC,IAAI,CAAC,4BAA4B,EAAE,CAAC,CAAC;KACnD;IAED,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["/* eslint-disable complexity */\nimport type { Integration } from '@sentry/core';\n\nimport type { ReactNativeClientOptions } from '../options';\nimport { reactNativeTracingIntegration } from '../tracing';\nimport { notWeb } from '../utils/environment';\nimport {\n appRegistryIntegration,\n appStartIntegration,\n breadcrumbsIntegration,\n browserApiErrorsIntegration,\n browserGlobalHandlersIntegration,\n browserLinkedErrorsIntegration,\n createNativeFramesIntegrations,\n createReactNativeRewriteFrames,\n debugSymbolicatorIntegration,\n dedupeIntegration,\n deviceContextIntegration,\n eventOriginIntegration,\n expoContextIntegration,\n functionToStringIntegration,\n hermesProfilingIntegration,\n httpClientIntegration,\n httpContextIntegration,\n inboundFiltersIntegration,\n mobileReplayIntegration,\n modulesLoaderIntegration,\n nativeLinkedErrorsIntegration,\n nativeReleaseIntegration,\n reactNativeErrorHandlersIntegration,\n reactNativeInfoIntegration,\n screenshotIntegration,\n sdkInfoIntegration,\n spotlightIntegration,\n stallTrackingIntegration,\n timeToDisplayIntegration,\n userInteractionIntegration,\n viewHierarchyIntegration,\n} from './exports';\n\n/**\n * Returns the default ReactNative integrations based on the current environment.\n *\n * Native integrations are only returned when native is enabled.\n *\n * Web integrations are only returned when running on web.\n */\nexport function getDefaultIntegrations(options: ReactNativeClientOptions): Integration[] {\n const integrations: Integration[] = [];\n\n if (notWeb()) {\n integrations.push(\n reactNativeErrorHandlersIntegration({\n patchGlobalPromise: options.patchGlobalPromise,\n }),\n );\n integrations.push(nativeLinkedErrorsIntegration());\n } else {\n integrations.push(browserApiErrorsIntegration());\n integrations.push(browserGlobalHandlersIntegration());\n integrations.push(browserLinkedErrorsIntegration());\n }\n\n // @sentry/react default integrations\n integrations.push(inboundFiltersIntegration());\n integrations.push(functionToStringIntegration());\n integrations.push(breadcrumbsIntegration());\n integrations.push(dedupeIntegration());\n integrations.push(httpContextIntegration());\n // end @sentry/react-native default integrations\n\n integrations.push(nativeReleaseIntegration());\n integrations.push(eventOriginIntegration());\n integrations.push(sdkInfoIntegration());\n integrations.push(reactNativeInfoIntegration());\n\n integrations.push(createReactNativeRewriteFrames());\n\n if (options.enableNative) {\n integrations.push(deviceContextIntegration());\n integrations.push(modulesLoaderIntegration());\n if (options.attachScreenshot) {\n integrations.push(screenshotIntegration());\n }\n if (options.attachViewHierarchy) {\n integrations.push(viewHierarchyIntegration());\n }\n if (typeof options.profilesSampleRate === 'number') {\n integrations.push(hermesProfilingIntegration());\n }\n }\n\n // hasTracingEnabled from `@sentry/core` only check if tracesSampler or tracesSampleRate keys are present\n // that's different from prev imp here and might lead misconfiguration\n // `tracesSampleRate: undefined` should not enable tracing\n const hasTracingEnabled =\n options.enableTracing ||\n typeof options.tracesSampleRate === 'number' ||\n typeof options.tracesSampler === 'function';\n if (hasTracingEnabled && options.enableAppStartTracking) {\n integrations.push(appStartIntegration());\n }\n const nativeFramesIntegrationInstance = createNativeFramesIntegrations(\n hasTracingEnabled && options.enableNativeFramesTracking,\n );\n if (nativeFramesIntegrationInstance) {\n integrations.push(nativeFramesIntegrationInstance);\n }\n if (hasTracingEnabled && options.enableStallTracking) {\n integrations.push(stallTrackingIntegration());\n }\n if (hasTracingEnabled && options.enableUserInteractionTracing) {\n integrations.push(userInteractionIntegration());\n }\n if (hasTracingEnabled && options.enableAutoPerformanceTracing) {\n integrations.push(appRegistryIntegration());\n integrations.push(reactNativeTracingIntegration());\n }\n if (hasTracingEnabled) {\n integrations.push(timeToDisplayIntegration());\n }\n if (options.enableCaptureFailedRequests) {\n integrations.push(httpClientIntegration());\n }\n\n integrations.push(expoContextIntegration());\n\n if (options.spotlight) {\n const sidecarUrl = typeof options.spotlight === 'string' ? options.spotlight : undefined;\n integrations.push(spotlightIntegration({ sidecarUrl }));\n }\n\n const hasReplayOptions =\n typeof options.replaysOnErrorSampleRate === 'number' || typeof options.replaysSessionSampleRate === 'number';\n const hasExperimentsReplayOptions =\n (options._experiments && typeof options._experiments.replaysOnErrorSampleRate === 'number') ||\n (options._experiments && typeof options._experiments.replaysSessionSampleRate === 'number');\n\n if (!hasReplayOptions && hasExperimentsReplayOptions) {\n // Remove in the next major version (v7)\n options.replaysOnErrorSampleRate = options._experiments.replaysOnErrorSampleRate;\n options.replaysSessionSampleRate = options._experiments.replaysSessionSampleRate;\n }\n\n if ((hasReplayOptions || hasExperimentsReplayOptions) && notWeb()) {\n // We can't create and add browserReplayIntegration as it overrides the users supplied one\n // The browser replay integration works differently than the rest of default integrations\n integrations.push(mobileReplayIntegration());\n }\n\n if (__DEV__ && notWeb()) {\n integrations.push(debugSymbolicatorIntegration());\n }\n\n return integrations;\n}\n"]}
1
+ {"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAG5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,4BAA4B,EAC5B,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACxB,6BAA6B,EAC7B,wBAAwB,EACxB,mCAAmC,EACnC,0BAA0B,EAC1B,qBAAqB,EACrB,kBAAkB,EAClB,oBAAoB,EACpB,wBAAwB,EACxB,wBAAwB,EACxB,0BAA0B,EAC1B,wBAAwB,GACzB,MAAM,WAAW,CAAC;AAEnB;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CAAC,OAAiC;;IACtE,MAAM,YAAY,GAAkB,EAAE,CAAC;IAEvC,IAAI,MAAM,EAAE,EAAE;QACZ,YAAY,CAAC,IAAI,CACf,mCAAmC,CAAC;YAClC,kBAAkB,EAAE,OAAO,CAAC,kBAAkB;SAC/C,CAAC,CACH,CAAC;QACF,YAAY,CAAC,IAAI,CAAC,6BAA6B,EAAE,CAAC,CAAC;KACpD;SAAM;QACL,YAAY,CAAC,IAAI,CAAC,2BAA2B,EAAE,CAAC,CAAC;QACjD,YAAY,CAAC,IAAI,CAAC,gCAAgC,EAAE,CAAC,CAAC;QACtD,YAAY,CAAC,IAAI,CAAC,8BAA8B,EAAE,CAAC,CAAC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AC,IAAI,CAAC,oBAAoB,CAAC,EAAE,UAAU,EAAE,CAAC,CAAC,CAAC;KACzD;IAED,MAAM,gBAAgB,GACpB,OAAO,OAAO,CAAC,wBAAwB,KAAK,QAAQ,IAAI,OAAO,OAAO,CAAC,wBAAwB,KAAK,QAAQ,CAAC;IAC/G,MAAM,2BAA2B,GAC/B,CAAC,OAAO,CAAC,YAAY,IAAI,OAAO,OAAO,CAAC,YAAY,CAAC,wBAAwB,KAAK,QAAQ,CAAC;QAC3F,CAAC,OAAO,CAAC,YAAY,IAAI,OAAO,OAAO,CAAC,YAAY,CAAC,wBAAwB,KAAK,QAAQ,CAAC,CAAC;IAE9F,IAAI,CAAC,gBAAgB,IAAI,2BAA2B,EAAE;QACpD,wCAAwC;QACxC,OAAO,CAAC,wBAAwB,GAAG,MAAA,OAAO,CAAC,YAAY,0CAAE,wBAAwB,CAAC;QAClF,OAAO,CAAC,wBAAwB,GAAG,MAAA,OAAO,CAAC,YAAY,0CAAE,wBAAwB,CAAC;KACnF;IAED,IAAI,CAAC,gBAAgB,IAAI,2BAA2B,CAAC,IAAI,MAAM,EAAE,EAAE;QACjE,0FAA0F;QAC1F,yFAAyF;QACzF,YAAY,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC,CAAC;KAC9C;IAED,IAAI,OAAO,IAAI,MAAM,EAAE,EAAE;QACvB,YAAY,CAAC,IAAI,CAAC,4BAA4B,EAAE,CAAC,CAAC;KACnD;IAED,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["/* eslint-disable complexity */\nimport { browserSessionIntegration } from '@sentry/browser';\nimport type { Integration } from '@sentry/core';\nimport type { ReactNativeClientOptions } from '../options';\nimport { reactNativeTracingIntegration } from '../tracing';\nimport { notWeb } from '../utils/environment';\nimport {\n appRegistryIntegration,\n appStartIntegration,\n breadcrumbsIntegration,\n browserApiErrorsIntegration,\n browserGlobalHandlersIntegration,\n browserLinkedErrorsIntegration,\n createNativeFramesIntegrations,\n createReactNativeRewriteFrames,\n debugSymbolicatorIntegration,\n dedupeIntegration,\n deviceContextIntegration,\n eventOriginIntegration,\n expoContextIntegration,\n functionToStringIntegration,\n hermesProfilingIntegration,\n httpClientIntegration,\n httpContextIntegration,\n inboundFiltersIntegration,\n mobileReplayIntegration,\n modulesLoaderIntegration,\n nativeLinkedErrorsIntegration,\n nativeReleaseIntegration,\n reactNativeErrorHandlersIntegration,\n reactNativeInfoIntegration,\n screenshotIntegration,\n sdkInfoIntegration,\n spotlightIntegration,\n stallTrackingIntegration,\n timeToDisplayIntegration,\n userInteractionIntegration,\n viewHierarchyIntegration,\n} from './exports';\n\n/**\n * Returns the default ReactNative integrations based on the current environment.\n *\n * Native integrations are only returned when native is enabled.\n *\n * Web integrations are only returned when running on web.\n */\nexport function getDefaultIntegrations(options: ReactNativeClientOptions): Integration[] {\n const integrations: Integration[] = [];\n\n if (notWeb()) {\n integrations.push(\n reactNativeErrorHandlersIntegration({\n patchGlobalPromise: options.patchGlobalPromise,\n }),\n );\n integrations.push(nativeLinkedErrorsIntegration());\n } else {\n integrations.push(browserApiErrorsIntegration());\n integrations.push(browserGlobalHandlersIntegration());\n integrations.push(browserLinkedErrorsIntegration());\n\n if (options.enableAutoSessionTracking) {\n integrations.push(browserSessionIntegration());\n }\n }\n\n // @sentry/react default integrations\n integrations.push(inboundFiltersIntegration());\n integrations.push(functionToStringIntegration());\n integrations.push(breadcrumbsIntegration());\n integrations.push(dedupeIntegration());\n integrations.push(httpContextIntegration());\n // end @sentry/react-native default integrations\n\n integrations.push(nativeReleaseIntegration());\n integrations.push(eventOriginIntegration());\n integrations.push(sdkInfoIntegration());\n integrations.push(reactNativeInfoIntegration());\n\n integrations.push(createReactNativeRewriteFrames());\n\n if (options.enableNative) {\n integrations.push(deviceContextIntegration());\n integrations.push(modulesLoaderIntegration());\n if (options.attachScreenshot) {\n integrations.push(screenshotIntegration());\n }\n if (options.attachViewHierarchy) {\n integrations.push(viewHierarchyIntegration());\n }\n if (typeof options.profilesSampleRate === 'number') {\n integrations.push(hermesProfilingIntegration());\n }\n }\n\n // hasTracingEnabled from `@sentry/core` only check if tracesSampler or tracesSampleRate keys are present\n // that's different from prev imp here and might lead misconfiguration\n // `tracesSampleRate: undefined` should not enable tracing\n const hasTracingEnabled = typeof options.tracesSampleRate === 'number' || typeof options.tracesSampler === 'function';\n if (hasTracingEnabled && options.enableAppStartTracking) {\n integrations.push(appStartIntegration());\n }\n const nativeFramesIntegrationInstance = createNativeFramesIntegrations(\n hasTracingEnabled && options.enableNativeFramesTracking,\n );\n if (nativeFramesIntegrationInstance) {\n integrations.push(nativeFramesIntegrationInstance);\n }\n if (hasTracingEnabled && options.enableStallTracking) {\n integrations.push(stallTrackingIntegration());\n }\n if (hasTracingEnabled && options.enableUserInteractionTracing) {\n integrations.push(userInteractionIntegration());\n }\n if (hasTracingEnabled && options.enableAutoPerformanceTracing) {\n integrations.push(appRegistryIntegration());\n integrations.push(reactNativeTracingIntegration());\n }\n if (hasTracingEnabled) {\n integrations.push(timeToDisplayIntegration());\n }\n if (options.enableCaptureFailedRequests) {\n integrations.push(httpClientIntegration());\n }\n\n integrations.push(expoContextIntegration());\n\n if (options.spotlight) {\n const sidecarUrl = typeof options.spotlight === 'string' ? options.spotlight : undefined;\n integrations.push(spotlightIntegration({ sidecarUrl }));\n }\n\n const hasReplayOptions =\n typeof options.replaysOnErrorSampleRate === 'number' || typeof options.replaysSessionSampleRate === 'number';\n const hasExperimentsReplayOptions =\n (options._experiments && typeof options._experiments.replaysOnErrorSampleRate === 'number') ||\n (options._experiments && typeof options._experiments.replaysSessionSampleRate === 'number');\n\n if (!hasReplayOptions && hasExperimentsReplayOptions) {\n // Remove in the next major version (v7)\n options.replaysOnErrorSampleRate = options._experiments?.replaysOnErrorSampleRate;\n options.replaysSessionSampleRate = options._experiments?.replaysSessionSampleRate;\n }\n\n if ((hasReplayOptions || hasExperimentsReplayOptions) && notWeb()) {\n // We can't create and add browserReplayIntegration as it overrides the users supplied one\n // The browser replay integration works differently than the rest of default integrations\n integrations.push(mobileReplayIntegration());\n }\n\n if (__DEV__ && notWeb()) {\n integrations.push(debugSymbolicatorIntegration());\n }\n\n return integrations;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"devicecontext.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/devicecontext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA4B,WAAW,EAAE,MAAM,cAAc,CAAC;AAU1E,uCAAuC;AACvC,eAAO,MAAM,wBAAwB,QAAO,WAQ3C,CAAC"}
1
+ {"version":3,"file":"devicecontext.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/devicecontext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA4B,WAAW,EAAE,MAAM,cAAc,CAAC;AAS1E,uCAAuC;AACvC,eAAO,MAAM,wBAAwB,QAAO,WAQ3C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"devicecontext.js","sourceRoot":"","sources":["../../../src/js/integrations/devicecontext.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAEzC,uCAAuC;AACvC,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAgB,EAAE;IACxD,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,GAAG,EAAE;YACd,UAAU;QACZ,CAAC;QACD,YAAY;KACb,CAAC;AACJ,CAAC,CAAC;AAEF,SAAe,YAAY,CAAC,KAAY,EAAE,KAAgB,EAAE,MAAc;;;QACxE,IAAI,MAAM,GAAwC,IAAI,CAAC;QACvD,IAAI;YACF,MAAM,GAAG,MAAM,MAAM,CAAC,yB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AAS,mCAAI,CAAC,CAAC,GAAG,CAAC,MAAA,CAAC,CAAC,SAAS,mCAAI,CAAC,CAAC,CAAA,EAAA,CAAC,CAAC,oBAAoB;iBAC5E,KAAK,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,+BAA+B;SAC3D;QAED,OAAO,KAAK,CAAC;;CACd","sourcesContent":["/* eslint-disable complexity */\nimport type { Client, Event, EventHint, Integration } from '@sentry/core';\nimport { logger, severityLevelFromString } from '@sentry/core';\nimport { AppState } from 'react-native';\n\nimport { breadcrumbFromObject } from '../breadcrumb';\nimport type { NativeDeviceContextsResponse } from '../NativeRNSentry';\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'DeviceContext';\n\n/** Load device context from native. */\nexport const deviceContextIntegration = (): Integration => {\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n /* noop */\n },\n processEvent,\n };\n};\n\nasync function processEvent(event: Event, _hint: EventHint, client: Client): Promise<Event> {\n let native: NativeDeviceContextsResponse | null = null;\n try {\n native = await NATIVE.fetchNativeDeviceContexts();\n } catch (e) {\n logger.log(`Failed to get device context from native: ${e}`);\n }\n\n if (!native) {\n return event;\n }\n\n const nativeUser = native.user;\n if (!event.user && nativeUser) {\n event.user = nativeUser;\n }\n\n let nativeContexts = native.contexts;\n if (AppState.currentState !== 'unknown') {\n nativeContexts = nativeContexts || {};\n nativeContexts.app = {\n ...nativeContexts.app,\n in_foreground: AppState.currentState === 'active',\n };\n }\n if (nativeContexts) {\n event.contexts = { ...nativeContexts, ...event.contexts };\n if (nativeContexts.app) {\n event.contexts.app = { ...nativeContexts.app, ...event.contexts.app };\n }\n }\n\n const nativeTags = native.tags;\n if (nativeTags) {\n event.tags = { ...nativeTags, ...event.tags };\n }\n\n const nativeExtra = native.extra;\n if (nativeExtra) {\n event.extra = { ...nativeExtra, ...event.extra };\n }\n\n const nativeFingerprint = native.fingerprint;\n if (nativeFingerprint) {\n event.fingerprint = (event.fingerprint ?? []).concat(\n nativeFingerprint.filter(item => (event.fingerprint ?? []).indexOf(item) < 0),\n );\n }\n\n const nativeLevel = typeof native['level'] === 'string' ? severityLevelFromString(native['level']) : undefined;\n if (!event.level && nativeLevel) {\n event.level = nativeLevel;\n }\n\n const nativeEnvironment = native['environment'];\n if (!event.environment && nativeEnvironment) {\n event.environment = nativeEnvironment;\n }\n\n const nativeBreadcrumbs = Array.isArray(native['breadcrumbs'])\n ? native['breadcrumbs'].map(breadcrumbFromObject)\n : undefined;\n if (nativeBreadcrumbs) {\n const maxBreadcrumbs = client?.getOptions().maxBreadcrumbs ?? 100; // Default is 100.\n event.breadcrumbs = nativeBreadcrumbs\n .concat(event.breadcrumbs || []) // concatenate the native and js breadcrumbs\n .sort((a, b) => (a.timestamp ?? 0) - (b.timestamp ?? 0)) // sort by timestamp\n .slice(-maxBreadcrumbs); // keep the last maxBreadcrumbs\n }\n\n return event;\n}\n"]}
1
+ {"version":3,"file":"devicecontext.js","sourceRoot":"","sources":["../../../src/js/integrations/devicecontext.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAEzC,uCAAuC;AACvC,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAgB,EAAE;IACxD,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,GAAG,EAAE;YACd,UAAU;QACZ,CAAC;QACD,YAAY;KACb,CAAC;AACJ,CAAC,CAAC;AAEF,SAAe,YAAY,CAAC,KAAY,EAAE,KAAgB,EAAE,MAAc;;;QACxE,IAAI,MAAM,GAAwC,IAAI,CAAC;QACvD,IAAI;YACF,MAAM,GAAG,MAAM,M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CAAC,CAAC,SAAS,mCAAI,CAAC,CAAC,GAAG,CAAC,MAAA,CAAC,CAAC,SAAS,mCAAI,CAAC,CAAC,CAAA,EAAA,CAAC,CAAC,oBAAoB;iBAC5E,KAAK,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,+BAA+B;SAC3D;QAED,OAAO,KAAK,CAAC;;CACd","sourcesContent":["/* eslint-disable complexity */\nimport type { Client, Event, EventHint, Integration } from '@sentry/core';\nimport { logger, severityLevelFromString } from '@sentry/core';\nimport { AppState } from 'react-native';\nimport { breadcrumbFromObject } from '../breadcrumb';\nimport type { NativeDeviceContextsResponse } from '../NativeRNSentry';\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'DeviceContext';\n\n/** Load device context from native. */\nexport const deviceContextIntegration = (): Integration => {\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n /* noop */\n },\n processEvent,\n };\n};\n\nasync function processEvent(event: Event, _hint: EventHint, client: Client): Promise<Event> {\n let native: NativeDeviceContextsResponse | null = null;\n try {\n native = await NATIVE.fetchNativeDeviceContexts();\n } catch (e) {\n logger.log(`Failed to get device context from native: ${e}`);\n }\n\n if (!native) {\n return event;\n }\n\n const nativeUser = native.user;\n if (!event.user && nativeUser) {\n event.user = nativeUser;\n }\n\n let nativeContexts = native.contexts;\n if (AppState.currentState !== 'unknown') {\n nativeContexts = nativeContexts || {};\n nativeContexts.app = {\n ...nativeContexts.app,\n in_foreground: AppState.currentState === 'active',\n };\n }\n if (nativeContexts) {\n event.contexts = { ...nativeContexts, ...event.contexts };\n if (nativeContexts.app) {\n event.contexts.app = { ...nativeContexts.app, ...event.contexts.app };\n }\n }\n\n const nativeTags = native.tags;\n if (nativeTags) {\n event.tags = { ...nativeTags, ...event.tags };\n }\n\n const nativeExtra = native.extra;\n if (nativeExtra) {\n event.extra = { ...nativeExtra, ...event.extra };\n }\n\n const nativeFingerprint = native.fingerprint;\n if (nativeFingerprint) {\n event.fingerprint = (event.fingerprint ?? []).concat(\n nativeFingerprint.filter(item => (event.fingerprint ?? []).indexOf(item) < 0),\n );\n }\n\n const nativeLevel = typeof native['level'] === 'string' ? severityLevelFromString(native['level']) : undefined;\n if (!event.level && nativeLevel) {\n event.level = nativeLevel;\n }\n\n const nativeEnvironment = native['environment'];\n if (!event.environment && nativeEnvironment) {\n event.environment = nativeEnvironment;\n }\n\n const nativeBreadcrumbs = Array.isArray(native['breadcrumbs'])\n ? native['breadcrumbs'].map(breadcrumbFromObject)\n : undefined;\n if (nativeBreadcrumbs) {\n const maxBreadcrumbs = client?.getOptions().maxBreadcrumbs ?? 100; // Default is 100.\n event.breadcrumbs = nativeBreadcrumbs\n .concat(event.breadcrumbs || []) // concatenate the native and js breadcrumbs\n .sort((a, b) => (a.timestamp ?? 0) - (b.timestamp ?? 0)) // sort by timestamp\n .slice(-maxBreadcrumbs); // keep the last maxBreadcrumbs\n }\n\n return event;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"expocontext.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/expocontext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,WAAW,EAA0B,MAAM,cAAc,CAAC;AASxG,eAAO,MAAM,uBAAuB,gBAAgB,CAAC;AAErD,6CAA6C;AAC7C,eAAO,MAAM,sBAAsB,QAAO,WA0DzC,CAAC;AAEF;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,kBAAkB,CAqC1D;AAwDD,KAAK,kBAAkB,GAAG,OAAO,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,wBAAwB,EAAE,OAAO,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uBAAuB,EAAE,MAAM,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC"}
1
+ {"version":3,"file":"expocontext.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/expocontext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,WAAW,EAA0B,MAAM,cAAc,CAAC;AAQxG,eAAO,MAAM,uBAAuB,gBAAgB,CAAC;AAErD,6CAA6C;AAC7C,eAAO,MAAM,sBAAsB,QAAO,WA0DzC,CAAC;AAEF;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,kBAAkB,CAqC1D;AAwDD,KAAK,kBAAkB,GAAG,OAAO,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,wBAAwB,EAAE,OAAO,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uBAAuB,EAAE,MAAM,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"expocontext.js","sourceRoot":"","sources":["../../../src/js/integrations/expocontext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoE,MAAM,EAAE,MAAM,cAAc,CAAC;AAGxG,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAEvC,MAAM,CAAC,MAAM,uBAAuB,GAAG,aAAa,CAAC;AAErD,6CAA6C;AAC7C,MAAM,CAAC,MAAM,sBAAsB,GAAG,GA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;;GAEG;AACH,SAAS,gBAAgB;IACvB,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IAEnC,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,SAAS,CAAC;KAClB;IAED,OAAO;QACL,KAAK,EAAE,UAAU,CAAC,SAAS;QAC3B,OAAO,EAAE,UAAU,CAAC,SAAS;QAC7B,IAAI,EAAE,UAAU,CAAC,MAAM;KACxB,CAAC;AACJ,CAAC","sourcesContent":["import { type DeviceContext, type Event, type Integration, type OsContext, logger } from '@sentry/core';\n\nimport type { ReactNativeClient } from '../client';\nimport { isExpo, isExpoGo } from '../utils/environment';\nimport { getExpoDevice, getExpoUpdates } from '../utils/expomodules';\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'ExpoContext';\n\nexport const OTA_UPDATES_CONTEXT_KEY = 'ota_updates';\n\n/** Load device context from expo modules. */\nexport const expoContextIntegration = (): Integration => {\n let _expoUpdatesContextCached: ExpoUpdatesContext | undefined;\n\n function setup(client: ReactNativeClient): void {\n client.on('afterInit', () => {\n if (!client.getOptions().enableNative) {\n return;\n }\n\n setExpoUpdatesNativeContext();\n });\n }\n\n function setExpoUpdatesNativeContext(): void {\n if (!isExpo() || isExpoGo()) {\n return;\n }\n\n const expoUpdates = getExpoUpdatesContextCached();\n\n try {\n // Ensures native errors and crashes have the same context as JS errors\n NATIVE.setContext(OTA_UPDATES_CONTEXT_KEY, expoUpdates);\n } catch (error) {\n logger.error('Error setting Expo updates context:', error);\n }\n }\n\n function processEvent(event: Event): Event {\n if (!isExpo()) {\n return event;\n }\n\n addExpoGoContext(event);\n addExpoUpdatesContext(event);\n return event;\n }\n\n function addExpoUpdatesContext(event: Event): void {\n event.contexts = event.contexts || {};\n event.contexts[OTA_UPDATES_CONTEXT_KEY] = {\n ...getExpoUpdatesContextCached(),\n };\n }\n\n function getExpoUpdatesContextCached(): ExpoUpdatesContext {\n if (_expoUpdatesContextCached) {\n return _expoUpdatesContextCached;\n }\n\n return (_expoUpdatesContextCached = getExpoUpdatesContext());\n }\n\n return {\n name: INTEGRATION_NAME,\n setup,\n processEvent,\n };\n};\n\n/**\n * @internal Exposed for testing purposes\n */\nexport function getExpoUpdatesContext(): ExpoUpdatesContext {\n const expoUpdates = getExpoUpdates();\n if (!expoUpdates) {\n return {\n is_enabled: false,\n };\n }\n\n const updatesContext: ExpoUpdatesContext = {\n is_enabled: !!expoUpdates.isEnabled,\n is_embedded_launch: !!expoUpdates.isEmbeddedLaunch,\n is_emergency_launch: !!expoUpdates.isEmergencyLaunch,\n is_using_embedded_assets: !!expoUpdates.isUsingEmbeddedAssets,\n };\n\n if (typeof expoUpdates.updateId === 'string' && expoUpdates.updateId) {\n updatesContext.update_id = expoUpdates.updateId.toLowerCase();\n }\n if (typeof expoUpdates.channel === 'string' && expoUpdates.channel) {\n updatesContext.channel = expoUpdates.channel.toLowerCase();\n }\n if (typeof expoUpdates.runtimeVersion === 'string' && expoUpdates.runtimeVersion) {\n updatesContext.runtime_version = expoUpdates.runtimeVersion.toLowerCase();\n }\n if (typeof expoUpdates.checkAutomatically === 'string' && expoUpdates.checkAutomatically) {\n updatesContext.check_automatically = expoUpdates.checkAutomatically.toLowerCase();\n }\n if (typeof expoUpdates.emergencyLaunchReason === 'string' && expoUpdates.emergencyLaunchReason) {\n updatesContext.emergency_launch_reason = expoUpdates.emergencyLaunchReason;\n }\n if (typeof expoUpdates.launchDuration === 'number') {\n updatesContext.launch_duration = expoUpdates.launchDuration;\n }\n if (expoUpdates.createdAt instanceof Date) {\n updatesContext.created_at = expoUpdates.createdAt.toISOString();\n }\n return updatesContext;\n}\n\nfunction addExpoGoContext(event: Event): void {\n if (!isExpoGo()) {\n return;\n }\n\n const expoDeviceContext = getExpoDeviceContext();\n if (expoDeviceContext) {\n event.contexts = event.contexts || {};\n event.contexts.device = { ...expoDeviceContext, ...event.contexts.device };\n }\n\n const expoOsContext = getExpoOsContext();\n if (expoOsContext) {\n event.contexts = event.contexts || {};\n event.contexts.os = { ...expoOsContext, ...event.contexts.os };\n }\n}\n\n/**\n * Returns the Expo Device context if present\n */\nfunction getExpoDeviceContext(): DeviceContext | undefined {\n const expoDevice = getExpoDevice();\n\n if (!expoDevice) {\n return undefined;\n }\n\n return {\n name: expoDevice.deviceName,\n simulator: !expoDevice?.isDevice,\n model: expoDevice.modelName,\n manufacturer: expoDevice.manufacturer,\n memory_size: expoDevice.totalMemory,\n };\n}\n\n/**\n * Returns the Expo OS context if present\n */\nfunction getExpoOsContext(): OsContext | undefined {\n const expoDevice = getExpoDevice();\n\n if (!expoDevice) {\n return undefined;\n }\n\n return {\n build: expoDevice.osBuildId,\n version: expoDevice.osVersion,\n name: expoDevice.osName,\n };\n}\n\ntype ExpoUpdatesContext = Partial<{\n is_enabled: boolean;\n is_embedded_launch: boolean;\n is_emergency_launch: boolean;\n is_using_embedded_assets: boolean;\n update_id: string;\n channel: string;\n runtime_version: string;\n check_automatically: string;\n emergency_launch_reason: string;\n launch_duration: number;\n created_at: string;\n}>;\n"]}
1
+ {"version":3,"file":"expocontext.js","sourceRoot":"","sources":["../../../src/js/integrations/expocontext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoE,MAAM,EAAE,MAAM,cAAc,CAAC;AAExG,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,aAAa,EAAE,cAAc,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,gBAAgB,GAAG,aAAa,CAAC;AAEvC,MAAM,CAAC,MAAM,uBAAuB,GAAG,aAAa,CAAC;AAErD,6CAA6C;AAC7C,MAAM,CAAC,MAAM,sBAAsB,GAAG,GAAgB,EAAE;IACtD,IAAI,yBAAyD,CAAC;IAE9D,SAAS,KAAK,CAAC,MAAyB;QACtC,MAAM,CAAC,EAAE,CAAC,WAAW,EAAE,GAAG,EAAE;YAC1B,IAAI,CAAC,MAAM,CAAC,U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,UAAU,CAAC,SAAS;QAC3B,OAAO,EAAE,UAAU,CAAC,SAAS;QAC7B,IAAI,EAAE,UAAU,CAAC,MAAM;KACxB,CAAC;AACJ,CAAC","sourcesContent":["import { type DeviceContext, type Event, type Integration, type OsContext, logger } from '@sentry/core';\nimport type { ReactNativeClient } from '../client';\nimport { isExpo, isExpoGo } from '../utils/environment';\nimport { getExpoDevice, getExpoUpdates } from '../utils/expomodules';\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'ExpoContext';\n\nexport const OTA_UPDATES_CONTEXT_KEY = 'ota_updates';\n\n/** Load device context from expo modules. */\nexport const expoContextIntegration = (): Integration => {\n let _expoUpdatesContextCached: ExpoUpdatesContext | undefined;\n\n function setup(client: ReactNativeClient): void {\n client.on('afterInit', () => {\n if (!client.getOptions().enableNative) {\n return;\n }\n\n setExpoUpdatesNativeContext();\n });\n }\n\n function setExpoUpdatesNativeContext(): void {\n if (!isExpo() || isExpoGo()) {\n return;\n }\n\n const expoUpdates = getExpoUpdatesContextCached();\n\n try {\n // Ensures native errors and crashes have the same context as JS errors\n NATIVE.setContext(OTA_UPDATES_CONTEXT_KEY, expoUpdates);\n } catch (error) {\n logger.error('Error setting Expo updates context:', error);\n }\n }\n\n function processEvent(event: Event): Event {\n if (!isExpo()) {\n return event;\n }\n\n addExpoGoContext(event);\n addExpoUpdatesContext(event);\n return event;\n }\n\n function addExpoUpdatesContext(event: Event): void {\n event.contexts = event.contexts || {};\n event.contexts[OTA_UPDATES_CONTEXT_KEY] = {\n ...getExpoUpdatesContextCached(),\n };\n }\n\n function getExpoUpdatesContextCached(): ExpoUpdatesContext {\n if (_expoUpdatesContextCached) {\n return _expoUpdatesContextCached;\n }\n\n return (_expoUpdatesContextCached = getExpoUpdatesContext());\n }\n\n return {\n name: INTEGRATION_NAME,\n setup,\n processEvent,\n };\n};\n\n/**\n * @internal Exposed for testing purposes\n */\nexport function getExpoUpdatesContext(): ExpoUpdatesContext {\n const expoUpdates = getExpoUpdates();\n if (!expoUpdates) {\n return {\n is_enabled: false,\n };\n }\n\n const updatesContext: ExpoUpdatesContext = {\n is_enabled: !!expoUpdates.isEnabled,\n is_embedded_launch: !!expoUpdates.isEmbeddedLaunch,\n is_emergency_launch: !!expoUpdates.isEmergencyLaunch,\n is_using_embedded_assets: !!expoUpdates.isUsingEmbeddedAssets,\n };\n\n if (typeof expoUpdates.updateId === 'string' && expoUpdates.updateId) {\n updatesContext.update_id = expoUpdates.updateId.toLowerCase();\n }\n if (typeof expoUpdates.channel === 'string' && expoUpdates.channel) {\n updatesContext.channel = expoUpdates.channel.toLowerCase();\n }\n if (typeof expoUpdates.runtimeVersion === 'string' && expoUpdates.runtimeVersion) {\n updatesContext.runtime_version = expoUpdates.runtimeVersion.toLowerCase();\n }\n if (typeof expoUpdates.checkAutomatically === 'string' && expoUpdates.checkAutomatically) {\n updatesContext.check_automatically = expoUpdates.checkAutomatically.toLowerCase();\n }\n if (typeof expoUpdates.emergencyLaunchReason === 'string' && expoUpdates.emergencyLaunchReason) {\n updatesContext.emergency_launch_reason = expoUpdates.emergencyLaunchReason;\n }\n if (typeof expoUpdates.launchDuration === 'number') {\n updatesContext.launch_duration = expoUpdates.launchDuration;\n }\n if (expoUpdates.createdAt instanceof Date) {\n updatesContext.created_at = expoUpdates.createdAt.toISOString();\n }\n return updatesContext;\n}\n\nfunction addExpoGoContext(event: Event): void {\n if (!isExpoGo()) {\n return;\n }\n\n const expoDeviceContext = getExpoDeviceContext();\n if (expoDeviceContext) {\n event.contexts = event.contexts || {};\n event.contexts.device = { ...expoDeviceContext, ...event.contexts.device };\n }\n\n const expoOsContext = getExpoOsContext();\n if (expoOsContext) {\n event.contexts = event.contexts || {};\n event.contexts.os = { ...expoOsContext, ...event.contexts.os };\n }\n}\n\n/**\n * Returns the Expo Device context if present\n */\nfunction getExpoDeviceContext(): DeviceContext | undefined {\n const expoDevice = getExpoDevice();\n\n if (!expoDevice) {\n return undefined;\n }\n\n return {\n name: expoDevice.deviceName,\n simulator: !expoDevice?.isDevice,\n model: expoDevice.modelName,\n manufacturer: expoDevice.manufacturer,\n memory_size: expoDevice.totalMemory,\n };\n}\n\n/**\n * Returns the Expo OS context if present\n */\nfunction getExpoOsContext(): OsContext | undefined {\n const expoDevice = getExpoDevice();\n\n if (!expoDevice) {\n return undefined;\n }\n\n return {\n build: expoDevice.osBuildId,\n version: expoDevice.osVersion,\n name: expoDevice.osName,\n };\n}\n\ntype ExpoUpdatesContext = Partial<{\n is_enabled: boolean;\n is_embedded_launch: boolean;\n is_emergency_launch: boolean;\n is_using_embedded_assets: boolean;\n update_id: string;\n channel: string;\n runtime_version: string;\n check_automatically: string;\n emergency_launch_reason: string;\n launch_duration: number;\n created_at: string;\n}>;\n"]}
@@ -22,5 +22,6 @@ export { userInteractionIntegration } from '../tracing/integrations/userInteract
22
22
  export { createReactNativeRewriteFrames } from './rewriteframes';
23
23
  export { appRegistryIntegration } from './appRegistry';
24
24
  export { timeToDisplayIntegration } from '../tracing/integrations/timeToDisplayIntegration';
25
- export { breadcrumbsIntegration, browserApiErrorsIntegration, dedupeIntegration, functionToStringIntegration, globalHandlersIntegration as browserGlobalHandlersIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, linkedErrorsIntegration as browserLinkedErrorsIntegration, rewriteFramesIntegration, extraErrorDataIntegration, } from '@sentry/react';
25
+ export { breadcrumbsIntegration } from './breadcrumbs';
26
+ export { browserApiErrorsIntegration, dedupeIntegration, functionToStringIntegration, globalHandlersIntegration as browserGlobalHandlersIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, linkedErrorsIntegration as browserLinkedErrorsIntegration, rewriteFramesIntegration, extraErrorDataIntegration, } from '@sentry/react';
26
27
  //# sourceMappingURL=exports.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,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AAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAC/G,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEvD,OAAO,EACL,2BAA2B,EAC3B,iBAAiB,EACjB,2BAA2B,EAC3B,yBAAyB,IAAI,gCAAgC,EAC7D,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,IAAI,8BAA8B,EACzD,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,eAAe,CAAC"}
@@ -22,5 +22,6 @@ export { userInteractionIntegration } from '../tracing/integrations/userInteract
22
22
  export { createReactNativeRewriteFrames } from './rewriteframes';
23
23
  export { appRegistryIntegration } from './appRegistry';
24
24
  export { timeToDisplayIntegration } from '../tracing/integrations/timeToDisplayIntegration';
25
- export { breadcrumbsIntegration, browserApiErrorsIntegration, dedupeIntegration, functionToStringIntegration, globalHandlersIntegration as browserGlobalHandlersIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, linkedErrorsIntegration as browserLinkedErrorsIntegration, rewriteFramesIntegration, extraErrorDataIntegration, } from '@sentry/react';
25
+ export { breadcrumbsIntegration } from './breadcrumbs';
26
+ export { browserApiErrorsIntegration, dedupeIntegration, functionToStringIntegration, globalHandlersIntegration as browserGlobalHandlersIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, linkedErrorsIntegration as browserLinkedErrorsIntegration, rewriteFramesIntegration, extraErrorDataIntegration, } from '@sentry/react';
26
27
  //# sourceMappingUR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AE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAE5F,OAAO,EACL,sBAAsB,EACtB,2BAA2B,EAC3B,iBAAiB,EACjB,2BAA2B,EAC3B,yBAAyB,IAAI,gCAAgC,EAC7D,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,IAAI,8BAA8B,EACzD,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,eAAe,CAAC","sourcesContent":["export { debugSymbolicatorIntegration } from './debugsymbolicator';\nexport { deviceContextIntegration } from './devicecontext';\nexport { reactNativeErrorHandlersIntegration } from './reactnativeerrorhandlers';\nexport { nativeLinkedErrorsIntegration } from './nativelinkederrors';\nexport { nativeReleaseIntegration } from './release';\nexport { eventOriginIntegration } from './eventorigin';\nexport { sdkInfoIntegration } from './sdkinfo';\nexport { reactNativeInfoIntegration } from './reactnativeinfo';\nexport { modulesLoaderIntegration } from './modulesloader';\nexport { hermesProfilingIntegration } from '../profiling/integration';\nexport { screenshotIntegration } from './screenshot';\nexport { viewHierarchyIntegration } from './viewhierarchy';\nexport { expoContextIntegration } from './expocontext';\nexport { spotlightIntegration } from './spotlight';\nexport { mobileReplayIntegration } from '../replay/mobilereplay';\nexport { feedbackIntegration } from '../feedback/integration';\nexport { browserReplayIntegration } from '../replay/browserReplay';\nexport { appStartIntegration } from '../tracing/integrations/appStart';\nexport { nativeFramesIntegration, createNativeFramesIntegrations } from '../tracing/integrations/nativeFrames';\nexport { stallTrackingIntegration } from '../tracing/integrations/stalltracking';\nexport { userInteractionIntegration } from '../tracing/integrations/userInteraction';\nexport { createReactNativeRewriteFrames } from './rewriteframes';\nexport { appRegistryIntegration } from './appRegistry';\nexport { timeToDisplayIntegration } from '../tracing/integrations/timeToDisplayIntegration';\n\nexport {\n breadcrumbsIntegration,\n browserApiErrorsIntegration,\n dedupeIntegration,\n functionToStringIntegration,\n globalHandlersIntegration as browserGlobalHandlersIntegration,\n httpClientIntegration,\n httpContextIntegration,\n inboundFiltersIntegration,\n linkedErrorsIntegration as browserLinkedErrorsIntegration,\n rewriteFramesIntegration,\n extraErrorDataIntegration,\n} from '@sentry/react';\n"]}
1
+ {"version":3,"file":"exports.js","sourceRoot":"","sources":["../../../src/js/integrations/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAC/G,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAEvD,OAAO,EACL,2BAA2B,EAC3B,iBAAiB,EACjB,2BAA2B,EAC3B,yBAAyB,IAAI,gCAAgC,EAC7D,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,IAAI,8BAA8B,EACzD,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,eAAe,CAAC","sourcesContent":["export { debugSymbolicatorIntegration } from './debugsymbolicator';\nexport { deviceContextIntegration } from './devicecontext';\nexport { reactNativeErrorHandlersIntegration } from './reactnativeerrorhandlers';\nexport { nativeLinkedErrorsIntegration } from './nativelinkederrors';\nexport { nativeReleaseIntegration } from './release';\nexport { eventOriginIntegration } from './eventorigin';\nexport { sdkInfoIntegration } from './sdkinfo';\nexport { reactNativeInfoIntegration } from './reactnativeinfo';\nexport { modulesLoaderIntegration } from './modulesloader';\nexport { hermesProfilingIntegration } from '../profiling/integration';\nexport { screenshotIntegration } from './screenshot';\nexport { viewHierarchyIntegration } from './viewhierarchy';\nexport { expoContextIntegration } from './expocontext';\nexport { spotlightIntegration } from './spotlight';\nexport { mobileReplayIntegration } from '../replay/mobilereplay';\nexport { feedbackIntegration } from '../feedback/integration';\nexport { browserReplayIntegration } from '../replay/browserReplay';\nexport { appStartIntegration } from '../tracing/integrations/appStart';\nexport { nativeFramesIntegration, createNativeFramesIntegrations } from '../tracing/integrations/nativeFrames';\nexport { stallTrackingIntegration } from '../tracing/integrations/stalltracking';\nexport { userInteractionIntegration } from '../tracing/integrations/userInteraction';\nexport { createReactNativeRewriteFrames } from './rewriteframes';\nexport { appRegistryIntegration } from './appRegistry';\nexport { timeToDisplayIntegration } from '../tracing/integrations/timeToDisplayIntegration';\nexport { breadcrumbsIntegration } from './breadcrumbs';\n\nexport {\n browserApiErrorsIntegration,\n dedupeIntegration,\n functionToStringIntegration,\n globalHandlersIntegration as browserGlobalHandlersIntegration,\n httpClientIntegration,\n httpContextIntegration,\n inboundFiltersIntegration,\n linkedErrorsIntegration as browserLinkedErrorsIntegration,\n rewriteFramesIntegration,\n extraErrorDataIntegration,\n} from '@sentry/react';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"modulesloader.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/modulesloader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,WAAW,EAAE,MAAM,cAAc,CAAC;AAOvD,mDAAmD;AACnD,eAAO,MAAM,wBAAwB,QAAO,WAQ3C,CAAC"}
1
+ {"version":3,"file":"modulesloader.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/modulesloader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,WAAW,EAAE,MAAM,cAAc,CAAC;AAMvD,mDAAmD;AACnD,eAAO,MAAM,wBAAwB,QAAO,WAQ3C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"modulesloader.js","sourceRoot":"","sources":["../../../src/js/integrations/modulesloader.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAEzC,mDAAmD;AACnD,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAgB,EAAE;IACxD,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,GAAG,EAAE;YACd,OAAO;QACT,CAAC;QACD,YAAY,EAAE,kBAAkB,EAAE;KACnC,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,kBAAkB;IACzB,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,IAAI,OAAO,GAAkC,IAAI,CAAC;IAElD,OAAO,CAAO,KAAY,EAAE,EAAE;QAC5B,IAAI,CAAC,OAAO,EAAE;YACZ,IAAI;gBACF,OAAO,GAAG,MAAM,MAAM,CAAC,YAAY,EAAE,CAAC;aACvC;YAAC,OAAO,CAAC,EAAE;gBACV,MAAM,CAAC,GAAG,CAAC,sCAAsC,CAAC,EAAE,CAAC,CAAC;aACvD;YACD,OAAO,GAAG,IAAI,CAAC;SAChB;QACD,IAAI,OAAO,EAAE;YACX,KAAK,CAAC,OAAO,mCACR,OAAO,GACP,KAAK,CAAC,OAAO,CACjB,CAAC;SACH;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAA,CAAC;AACJ,CAAC","sourcesContent":["import type { Event, Integration } from '@sentry/core';\nimport { logger } from '@sentry/core';\n\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'ModulesLoader';\n\n/** Loads runtime JS modules from prepared file. */\nexport const modulesLoaderIntegration = (): Integration => {\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n // noop\n },\n processEvent: createProcessEvent(),\n };\n};\n\nfunction createProcessEvent(): (event: Event) => Promise<Event> {\n let isSetup = false;\n let modules: Record<string, string> | null = null;\n\n return async (event: Event) => {\n if (!isSetup) {\n try {\n modules = await NATIVE.fetchModules();\n } catch (e) {\n logger.log(`Failed to get modules from native: ${e}`);\n }\n isSetup = true;\n }\n if (modules) {\n event.modules = {\n ...modules,\n ...event.modules,\n };\n }\n return event;\n };\n}\n"]}
1
+ {"version":3,"file":"modulesloader.js","sourceRoot":"","sources":["../../../src/js/integrations/modulesloader.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAEzC,mDAAmD;AACnD,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAgB,EAAE;IACxD,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,GAAG,EAAE;YACd,OAAO;QACT,CAAC;QACD,YAAY,EAAE,kBAAkB,EAAE;KACnC,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,kBAAkB;IACzB,IAAI,OAAO,GAAG,KAAK,CAAC;IACpB,IAAI,OAAO,GAAkC,IAAI,CAAC;IAElD,OAAO,CAAO,KAAY,EAAE,EAAE;QAC5B,IAAI,CAAC,OAAO,EAAE;YACZ,IAAI;gBACF,OAAO,GAAG,MAAM,MAAM,CAAC,YAAY,EAAE,CAAC;aACvC;YAAC,OAAO,CAAC,EAAE;gBACV,MAAM,CAAC,GAAG,CAAC,sCAAsC,CAAC,EAAE,CAAC,CAAC;aACvD;YACD,OAAO,GAAG,IAAI,CAAC;SAChB;QACD,IAAI,OAAO,EAAE;YACX,KAAK,CAAC,OAAO,mCACR,OAAO,GACP,KAAK,CAAC,OAAO,CACjB,CAAC;SACH;QACD,OAAO,KAAK,CAAC;IACf,CAAC,CAAA,CAAC;AACJ,CAAC","sourcesContent":["import type { Event, Integration } from '@sentry/core';\nimport { logger } from '@sentry/core';\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'ModulesLoader';\n\n/** Loads runtime JS modules from prepared file. */\nexport const modulesLoaderIntegration = (): Integration => {\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n // noop\n },\n processEvent: createProcessEvent(),\n };\n};\n\nfunction createProcessEvent(): (event: Event) => Promise<Event> {\n let isSetup = false;\n let modules: Record<string, string> | null = null;\n\n return async (event: Event) => {\n if (!isSetup) {\n try {\n modules = await NATIVE.fetchModules();\n } catch (e) {\n logger.log(`Failed to get modules from native: ${e}`);\n }\n isSetup = true;\n }\n if (modules) {\n event.modules = {\n ...modules,\n ...event.modules,\n };\n }\n return event;\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"nativelinkederrors.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/nativelinkederrors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAOV,WAAW,EAGZ,MAAM,cAAc,CAAC;AAWtB,UAAU,mBAAmB;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,eAAO,MAAM,6BAA6B,aAAa,QAAQ,mBAAmB,CAAC,KAAQ,WAY1F,CAAC"}
1
+ {"version":3,"file":"nativelinkederrors.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/nativelinkederrors.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAOV,WAAW,EAGZ,MAAM,cAAc,CAAC;AAUtB,UAAU,mBAAmB;IAC3B,GAAG,EAAE,MAAM,CAAC;IACZ,KAAK,EAAE,MAAM,CAAC;CACf;AAED;;GAEG;AACH,eAAO,MAAM,6BAA6B,aAAa,QAAQ,mBAAmB,CAAC,KAAQ,WAY1F,CAAC"}
@@ -19,7 +19,8 @@ export const nativeLinkedErrorsIntegration = (options = {}) => {
19
19
  };
20
20
  };
21
21
  function preprocessEvent(event, hint, client, limit, key) {
22
- if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {
22
+ var _a;
23
+ if (!((_a = event.exception) === null || _a === void 0 ? void 0 : _a.values) || !hint || !isInstanceOf(hint.originalException, Error)) {
23
24
  return;
24
25
  }
25
26
  const parser = client.getOptions().stackParser;
@@ -107,10 +108,10 @@ function exceptionFromAppleStackReturnAddresses(objCException) {
107
108
  type: objCException.name,
108
109
  value: objCException.message,
109
110
  stacktrace: {
110
- frames: (nativeStackFrames && nativeStackFrames.frames.reverse()) || [],
111
+ frames: (nativeStackFrames === null || nativeStackFrames === void 0 ? void 0 : nativeStackFrames.frames.reverse()) || [],
111
112
  },
112
113
  },
113
- appleDebugImages: (nativeStackFrames && nativeStackFrames.debugMetaImages) || [],
114
+ appleDebugImages: (nativeStackFrames === null || nativeStackFrames === void 0 ? void 0 : nativeStackFrames.debugMetaImages) || [],
114
115
  };
115
116
  }
116
117
  let nativePackage = null;
@@ -1 +1 @@
1
- {"version":3,"file":"nativelinkederrors.js","sourceRoot":"","sources":["../../../src/js/integrations/nativelinkederrors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAYrD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGrE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAE9C,MAAM,WAAW,GAAG,OAAO,CAAC;AAC5B,MAAM,aAAa,GAAG,CAAC,CAAC;AAOxB;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,UAAwC,EAAE,EAAe,EAAE;IACvG,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,WAAW,CAAC;IACvC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,aAAa,CAAC;IAE7C,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,GAAS,EAAE;YACpB,OAAO;QACT,CAAC;QACD,eAAe,EAAE,CAAC,KAAY,EAAE,IAAe,EAAE,MAAc,EAAQ,EAAE,CACvE,eAAe,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC;KACnD,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,eAAe,CAAC,KAAY,EAAE,IAA2B,EAAE,MAAc,EAAE,KAAa,EAAE,GAAW;IAC5G,IAAI,CAAC,KAAK,CAAC,SAAS,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,MAAM,IAAI,CAAC,IAAI,IAAI,CAAC,YAAY,CAAC,IA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AC9B,QAAQ,EAAE,YAAY,CAAC,QAAQ;gBAC/B,MAAM,EAAE,YAAY,CAAC,UAAU,IAAI,CAAC,CAAC,CAAC,CAAC,YAAY,CAAC,UAAU,CAAC,CAAC,CAAC,SAAS;gBAC1E,QAAQ,EAAE,YAAY,CAAC,UAAU;gBACjC,MAAM,EAAE,aAAa,KAAK,IAAI,IAAI,YAAY,CAAC,SAAS,CAAC,UAAU,CAAC,aAAa,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC,CAAC,CAAC,SAAS;aACtG,CAAA,CACJ;iBACA,OAAO,EAAE;SACb;KACF,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,sCAAsC,CAAC,aAI/C;IAIC,MAAM,iBAAiB,GAAG,sBAAsB,CAAC,aAAa,CAAC,oBAAoB,CAAC,CAAC;IAErF,OAAO;QACL,cAAc,EAAE;YACd,IAAI,EAAE,aAAa,CAAC,IAAI;YACxB,KAAK,EAAE,aAAa,CAAC,OAAO;YAC5B,UAAU,EAAE;gBACV,MAAM,EAAE,CAAC,iBAAiB,IAAI,iBAAiB,CAAC,MAAM,CAAC,OAAO,EAAE,CAAC,IAAI,EAAE;aACxE;SACF;QACD,gBAAgB,EAAE,CAAC,iBAAiB,IAAK,iBAAiB,CAAC,eAAgC,CAAC,IAAI,EAAE;KACnG,CAAC;AACJ,CAAC;AAED,IAAI,aAAa,GAAkB,IAAI,CAAC;AACxC;;GAEG;AACH,SAAS,kBAAkB;IACzB,IAAI,aAAa,KAAK,IAAI,EAAE;QAC1B,aAAa,GAAG,MAAM,CAAC,sBAAsB,EAAE,CAAC;KACjD;IACD,OAAO,aAAa,CAAC;AACvB,CAAC;AAED;;GAEG;AACH,SAAS,sBAAsB,CAAC,gBAA0B;IACxD,OAAO,MAAM,CAAC,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;AAC3D,CAAC","sourcesContent":["import { exceptionFromError } from '@sentry/browser';\nimport type {\n Client,\n DebugImage,\n Event,\n EventHint,\n Exception,\n ExtendedError,\n Integration,\n StackFrame,\n StackParser,\n} from '@sentry/core';\nimport { isInstanceOf, isPlainObject, isString } from '@sentry/core';\n\nimport type { NativeStackFrames } from '../NativeRNSentry';\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'NativeLinkedErrors';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\ninterface LinkedErrorsOptions {\n key: string;\n limit: number;\n}\n\n/**\n * Processes JS and RN native linked errors.\n */\nexport const nativeLinkedErrorsIntegration = (options: Partial<LinkedErrorsOptions> = {}): Integration => {\n const key = options.key || DEFAULT_KEY;\n const limit = options.limit || DEFAULT_LIMIT;\n\n return {\n name: INTEGRATION_NAME,\n setupOnce: (): void => {\n // noop\n },\n preprocessEvent: (event: Event, hint: EventHint, client: Client): void =>\n preprocessEvent(event, hint, client, limit, key),\n };\n};\n\nfunction preprocessEvent(event: Event, hint: EventHint | undefined, client: Client, limit: number, key: string): void {\n if (!event.exception || !event.exception.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n const parser = client.getOptions().stackParser;\n\n const { exceptions: linkedErrors, debugImages } = walkErrorTree(\n parser,\n limit,\n hint.originalException as ExtendedError,\n key,\n );\n event.exception.values = [...event.exception.values, ...linkedErrors];\n\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n event.debug_meta.images.push(...(debugImages || []));\n}\n\n/**\n * Walks linked errors and created Sentry exceptions chain.\n * Collects debug images from native errors stack frames.\n */\nfunction walkErrorTree(\n parser: StackParser,\n limit: number,\n error: ExtendedError,\n key: string,\n exceptions: Exception[] = [],\n debugImages: DebugImage[] = [],\n): {\n exceptions: Exception[];\n debugImages?: DebugImage[];\n} {\n const linkedError = error[key];\n if (!linkedError || exceptions.length + 1 >= limit) {\n return {\n exceptions,\n debugImages,\n };\n }\n\n let exception: Exception;\n let exceptionDebugImages: DebugImage[] | undefined;\n if (isString(linkedError)) {\n exception = {\n value: linkedError,\n };\n } else if ('stackElements' in linkedError) {\n // isJavaException\n exception = exceptionFromJavaStackElements(linkedError);\n } else if ('stackReturnAddresses' in linkedError) {\n // isObjCException\n const { appleException, appleDebugImages } = exceptionFromAppleStackReturnAddresses(linkedError);\n exception = appleException;\n exceptionDebugImages = appleDebugImages;\n } else if (isInstanceOf(linkedError, Error)) {\n exception = exceptionFromError(parser, error[key]);\n } else if (isPlainObject(linkedError)) {\n exception = {\n type: typeof linkedError.name === 'string' ? linkedError.name : undefined,\n value: typeof linkedError.message === 'string' ? linkedError.message : undefined,\n };\n } else {\n return {\n exceptions,\n debugImages,\n };\n }\n\n return walkErrorTree(\n parser,\n limit,\n linkedError,\n key,\n [...exceptions, exception],\n [...debugImages, ...(exceptionDebugImages || [])],\n );\n}\n\n/**\n * Converts a Java Throwable to an SentryException\n */\nfunction exceptionFromJavaStackElements(javaThrowable: {\n name: string;\n message: string;\n stackElements: {\n className: string;\n fileName: string;\n methodName: string;\n lineNumber: number;\n }[];\n}): Exception {\n const nativePackage = fetchNativePackage();\n return {\n type: javaThrowable.name,\n value: javaThrowable.message,\n stacktrace: {\n frames: javaThrowable.stackElements\n .map(\n stackElement =>\n <StackFrame>{\n platform: 'java',\n module: stackElement.className,\n filename: stackElement.fileName,\n lineno: stackElement.lineNumber >= 0 ? stackElement.lineNumber : undefined,\n function: stackElement.methodName,\n in_app: nativePackage !== null && stackElement.className.startsWith(nativePackage) ? true : undefined,\n },\n )\n .reverse(),\n },\n };\n}\n\n/**\n * Converts StackAddresses to a SentryException with DebugMetaImages\n */\nfunction exceptionFromAppleStackReturnAddresses(objCException: {\n name: string;\n message: string;\n stackReturnAddresses: number[];\n}): {\n appleException: Exception;\n appleDebugImages: DebugImage[];\n} {\n const nativeStackFrames = fetchNativeStackFrames(objCException.stackReturnAddresses);\n\n return {\n appleException: {\n type: objCException.name,\n value: objCException.message,\n stacktrace: {\n frames: (nativeStackFrames && nativeStackFrames.frames.reverse()) || [],\n },\n },\n appleDebugImages: (nativeStackFrames && (nativeStackFrames.debugMetaImages as DebugImage[])) || [],\n };\n}\n\nlet nativePackage: string | null = null;\n/**\n * Fetches the native package/image name from the native layer\n */\nfunction fetchNativePackage(): string | null {\n if (nativePackage === null) {\n nativePackage = NATIVE.fetchNativePackageName();\n }\n return nativePackage;\n}\n\n/**\n * Fetches native debug image information on iOS\n */\nfunction fetchNativeStackFrames(instructionsAddr: number[]): NativeStackFrames | null {\n return NATIVE.fetchNativeStackFramesBy(instructionsAddr);\n}\n"]}
1
+ {"version":3,"file":"nativelinkederrors.js","sourceRoot":"","sources":["../../../src/js/integrations/nativelinkederrors.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAYrD,OAAO,EAAE,YAAY,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAErE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,gBAAgB,GAAG,oBAAoB,CAAC;AAE9C,MAAM,WAAW,GAAG,OAAO,CAAC;AAC5B,MAAM,aAAa,GAAG,CAAC,CAAC;AAOxB;;GAEG;AACH,MAAM,CAAC,MAAM,6BAA6B,GAAG,CAAC,UAAwC,EAAE,EAAe,EAAE;IACvG,MAAM,GAAG,GAAG,OAAO,CAAC,GAAG,IAAI,WAAW,CAAC;IACvC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,IAAI,aAAa,CAAC;IAE7C,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,GAAS,EAAE;YACpB,OAAO;QACT,CAAC;QACD,eAAe,EAAE,CAAC,KAAY,EAAE,IAAe,EAAE,MAAc,EAAQ,EAAE,CACvE,eAAe,CAAC,KAAK,EAAE,IAAI,EAAE,MAAM,EAAE,KAAK,EAAE,GAAG,CAAC;KACnD,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,eAAe,CAAC,KAAY,EAAE,IAA2B,EAAE,MAAc,EAAE,KAA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0B;IACxD,OAAO,MAAM,CAAC,wBAAwB,CAAC,gBAAgB,CAAC,CAAC;AAC3D,CAAC","sourcesContent":["import { exceptionFromError } from '@sentry/browser';\nimport type {\n Client,\n DebugImage,\n Event,\n EventHint,\n Exception,\n ExtendedError,\n Integration,\n StackFrame,\n StackParser,\n} from '@sentry/core';\nimport { isInstanceOf, isPlainObject, isString } from '@sentry/core';\nimport type { NativeStackFrames } from '../NativeRNSentry';\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'NativeLinkedErrors';\n\nconst DEFAULT_KEY = 'cause';\nconst DEFAULT_LIMIT = 5;\n\ninterface LinkedErrorsOptions {\n key: string;\n limit: number;\n}\n\n/**\n * Processes JS and RN native linked errors.\n */\nexport const nativeLinkedErrorsIntegration = (options: Partial<LinkedErrorsOptions> = {}): Integration => {\n const key = options.key || DEFAULT_KEY;\n const limit = options.limit || DEFAULT_LIMIT;\n\n return {\n name: INTEGRATION_NAME,\n setupOnce: (): void => {\n // noop\n },\n preprocessEvent: (event: Event, hint: EventHint, client: Client): void =>\n preprocessEvent(event, hint, client, limit, key),\n };\n};\n\nfunction preprocessEvent(event: Event, hint: EventHint | undefined, client: Client, limit: number, key: string): void {\n if (!event.exception?.values || !hint || !isInstanceOf(hint.originalException, Error)) {\n return;\n }\n\n const parser = client.getOptions().stackParser;\n\n const { exceptions: linkedErrors, debugImages } = walkErrorTree(\n parser,\n limit,\n hint.originalException as ExtendedError,\n key,\n );\n event.exception.values = [...event.exception.values, ...linkedErrors];\n\n event.debug_meta = event.debug_meta || {};\n event.debug_meta.images = event.debug_meta.images || [];\n event.debug_meta.images.push(...(debugImages || []));\n}\n\n/**\n * Walks linked errors and created Sentry exceptions chain.\n * Collects debug images from native errors stack frames.\n */\nfunction walkErrorTree(\n parser: StackParser,\n limit: number,\n error: ExtendedError,\n key: string,\n exceptions: Exception[] = [],\n debugImages: DebugImage[] = [],\n): {\n exceptions: Exception[];\n debugImages?: DebugImage[];\n} {\n const linkedError = error[key];\n if (!linkedError || exceptions.length + 1 >= limit) {\n return {\n exceptions,\n debugImages,\n };\n }\n\n let exception: Exception;\n let exceptionDebugImages: DebugImage[] | undefined;\n if (isString(linkedError)) {\n exception = {\n value: linkedError,\n };\n } else if ('stackElements' in linkedError) {\n // isJavaException\n exception = exceptionFromJavaStackElements(linkedError);\n } else if ('stackReturnAddresses' in linkedError) {\n // isObjCException\n const { appleException, appleDebugImages } = exceptionFromAppleStackReturnAddresses(linkedError);\n exception = appleException;\n exceptionDebugImages = appleDebugImages;\n } else if (isInstanceOf(linkedError, Error)) {\n exception = exceptionFromError(parser, error[key]);\n } else if (isPlainObject(linkedError)) {\n exception = {\n type: typeof linkedError.name === 'string' ? linkedError.name : undefined,\n value: typeof linkedError.message === 'string' ? linkedError.message : undefined,\n };\n } else {\n return {\n exceptions,\n debugImages,\n };\n }\n\n return walkErrorTree(\n parser,\n limit,\n linkedError,\n key,\n [...exceptions, exception],\n [...debugImages, ...(exceptionDebugImages || [])],\n );\n}\n\n/**\n * Converts a Java Throwable to an SentryException\n */\nfunction exceptionFromJavaStackElements(javaThrowable: {\n name: string;\n message: string;\n stackElements: {\n className: string;\n fileName: string;\n methodName: string;\n lineNumber: number;\n }[];\n}): Exception {\n const nativePackage = fetchNativePackage();\n return {\n type: javaThrowable.name,\n value: javaThrowable.message,\n stacktrace: {\n frames: javaThrowable.stackElements\n .map(\n stackElement =>\n <StackFrame>{\n platform: 'java',\n module: stackElement.className,\n filename: stackElement.fileName,\n lineno: stackElement.lineNumber >= 0 ? stackElement.lineNumber : undefined,\n function: stackElement.methodName,\n in_app: nativePackage !== null && stackElement.className.startsWith(nativePackage) ? true : undefined,\n },\n )\n .reverse(),\n },\n };\n}\n\n/**\n * Converts StackAddresses to a SentryException with DebugMetaImages\n */\nfunction exceptionFromAppleStackReturnAddresses(objCException: {\n name: string;\n message: string;\n stackReturnAddresses: number[];\n}): {\n appleException: Exception;\n appleDebugImages: DebugImage[];\n} {\n const nativeStackFrames = fetchNativeStackFrames(objCException.stackReturnAddresses);\n\n return {\n appleException: {\n type: objCException.name,\n value: objCException.message,\n stacktrace: {\n frames: nativeStackFrames?.frames.reverse() || [],\n },\n },\n appleDebugImages: (nativeStackFrames?.debugMetaImages as DebugImage[]) || [],\n };\n}\n\nlet nativePackage: string | null = null;\n/**\n * Fetches the native package/image name from the native layer\n */\nfunction fetchNativePackage(): string | null {\n if (nativePackage === null) {\n nativePackage = NATIVE.fetchNativePackageName();\n }\n return nativePackage;\n}\n\n/**\n * Fetches native debug image information on iOS\n */\nfunction fetchNativeStackFrames(instructionsAddr: number[]): NativeStackFrames | null {\n return NATIVE.fetchNativeStackFramesBy(instructionsAddr);\n}\n"]}
@@ -100,13 +100,14 @@ function attachUnhandledRejectionHandler() {
100
100
  });
101
101
  }
102
102
  function setupErrorUtilsGlobalHandler() {
103
+ var _a;
103
104
  let handlingFatal = false;
104
105
  const errorUtils = RN_GLOBAL_OBJ.ErrorUtils;
105
106
  if (!errorUtils) {
106
107
  logger.warn('ErrorUtils not found. Can be caused by different environment for example react-native-web.');
107
108
  return;
108
109
  }
109
- const defaultHandler = errorUtils.getGlobalHandler && errorUtils.getGlobalHandler();
110
+ const defaultHandler = (_a = errorUtils.getGlobalHandler) === null || _a === void 0 ? void 0 : _a.call(errorUtils);
110
111
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
111
112
  errorUtils.setGlobalHandler((error, isFatal) => __awaiter(this, void 0, void 0, function* () {
112
113
  // We want to handle fatals, but only in production mode.
@@ -1 +1 @@
1
- {"version":3,"file":"reactnativeerrorhandlers.js","sourceRoot":"","sources":["../../../src/js/integrations/reactnativeerrorhandlers.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EACL,qBAAqB,EACrB,iDAAiD,EACjD,gBAAgB,EAChB,SAAS,EACT,eAAe,EACf,MAAM,GACP,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AA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AAK,EAAE,OAAO,CAAC,CAAC;YAE/B,OAAO;SACR;QAED,MAAM,IAAI,GAAc;YACtB,iBAAiB,EAAE,KAAK;YACxB,WAAW,EAAE,eAAe,EAAE,CAAC,YAAY,EAAE,CAAC,WAAW;SAC1D,CAAC;QACF,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAE3D,IAAI,OAAO,EAAE;YACX,KAAK,CAAC,KAAK,GAAG,OAAwB,CAAC;YAEvC,qBAAqB,CAAC,KAAK,EAAE;gBAC3B,OAAO,EAAE,KAAK;gBACd,IAAI,EAAE,SAAS;aAChB,CAAC,CAAC;SACJ;aAAM;YACL,KAAK,CAAC,KAAK,GAAG,OAAO,CAAC;YAEtB,qBAAqB,CAAC,KAAK,EAAE;gBAC3B,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,SAAS;aAChB,CAAC,CAAC;SACJ;QAED,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAEjC,IAAI,OAAO,EAAE;YACX,gFAAgF;YAChF,mCAAmC;YACnC,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;YAC/B,OAAO;SACR;QAED,KAAK,MAAM,CAAC,KAAK,CAAC,MAAM,CAAC,UAAU,EAAE,CAAC,eAAe,IAAI,IAAI,CAAC,CAAC,IAAI,CACjE,GAAG,EAAE;YACH,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACjC,CAAC,EACD,CAAC,MAAe,EAAE,EAAE;YAClB,MAAM,CAAC,KAAK,CAAC,uFAAuF,EAAE,MAAM,CAAC,CAAC;QAChH,CAAC,CACF,CAAC;IACJ,CAAC,CAAA,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { EventHint, Integration, SeverityLevel } from '@sentry/core';\nimport {\n addExceptionMechanism,\n addGlobalUnhandledRejectionInstrumentationHandler,\n captureException,\n getClient,\n getCurrentScope,\n logger,\n} from '@sentry/core';\n\nimport { isHermesEnabled, isWeb } from '../utils/environment';\nimport { createSyntheticError, isErrorLike } from '../utils/error';\nimport { RN_GLOBAL_OBJ } from '../utils/worldwide';\nimport { checkPromiseAndWarn, polyfillPromise, requireRejectionTracking } from './reactnativeerrorhandlersutils';\n\nconst INTEGRATION_NAME = 'ReactNativeErrorHandlers';\n\n/** ReactNativeErrorHandlers Options */\ninterface ReactNativeErrorHandlersOptions {\n onerror: boolean;\n onunhandledrejection: boolean;\n patchGlobalPromise: boolean;\n}\n\ninterface PromiseRejectionTrackingOptions {\n onUnhandled: (id: string, error: unknown) => void;\n onHandled: (id: string) => void;\n}\n\n/** ReactNativeErrorHandlers Integration */\nexport const reactNativeErrorHandlersIntegration = (\n options: Partial<ReactNativeErrorHandlersOptions> = {},\n): Integration => {\n return {\n name: INTEGRATION_NAME,\n setupOnce: () =>\n setup({\n onerror: true,\n onunhandledrejection: true,\n patchGlobalPromise: true,\n ...options,\n }),\n };\n};\n\nfunction setup(options: ReactNativeErrorHandlersOptions): void {\n options.onunhandledrejection && setupUnhandledRejectionsTracking(options.patchGlobalPromise);\n options.onerror && setupErrorUtilsGlobalHandler();\n}\n\n/**\n * Setup unhandled promise rejection tracking\n */\nfunction setupUnhandledRejectionsTracking(patchGlobalPromise: boolean): void {\n try {\n if (\n isHermesEnabled() &&\n RN_GLOBAL_OBJ.HermesInternal?.enablePromiseRejectionTracker &&\n RN_GLOBAL_OBJ?.HermesInternal?.hasPromise?.()\n ) {\n logger.log('Using Hermes native promise rejection tracking');\n\n RN_GLOBAL_OBJ.HermesInternal.enablePromiseRejectionTracker({\n allRejections: true,\n onUnhandled: promiseRejectionTrackingOptions.onUnhandled,\n onHandled: promiseRejectionTrackingOptions.onHandled,\n });\n\n logger.log('Unhandled promise rejections will be caught by Sentry.');\n } else if (isWeb()) {\n logger.log('Using Browser JS promise rejection tracking for React Native Web');\n\n // Use Sentry's built-in global unhandled rejection handler\n addGlobalUnhandledRejectionInstrumentationHandler((error: unknown) => {\n captureException(error, {\n originalException: error,\n syntheticException: isErrorLike(error) ? undefined : createSyntheticError(),\n mechanism: { handled: false, type: 'onunhandledrejection' },\n });\n });\n } else if (patchGlobalPromise) {\n // For JSC and other environments, use the existing approach\n polyfillPromise();\n attachUnhandledRejectionHandler();\n checkPromiseAndWarn();\n } else {\n // For JSC and other environments, patching was disabled by user configuration\n logger.log('Unhandled promise rejections will not be caught by Sentry.');\n }\n } catch (e) {\n logger.warn(\n 'Failed to set up promise rejection tracking. ' +\n 'Unhandled promise rejections will not be caught by Sentry.' +\n 'See https://docs.sentry.io/platforms/react-native/troubleshooting/ for more details.',\n );\n }\n}\n\nconst promiseRejectionTrackingOptions: PromiseRejectionTrackingOptions = {\n onUnhandled: (id, error: unknown, rejection = {}) => {\n if (__DEV__) {\n logger.warn(`Possible Unhandled Promise Rejection (id: ${id}):\\n${rejection}`);\n }\n\n // Marking the rejection as handled to avoid breaking crash rate calculations.\n // See: https://github.com/getsentry/sentry-react-native/issues/4141\n captureException(error, {\n data: { id },\n originalException: error,\n syntheticException: isErrorLike(error) ? undefined : createSyntheticError(),\n mechanism: { handled: true, type: 'onunhandledrejection' },\n });\n },\n onHandled: id => {\n if (__DEV__) {\n logger.warn(\n `Promise Rejection Handled (id: ${id})\\n` +\n 'This means you can ignore any previous messages of the form ' +\n `\"Possible Unhandled Promise Rejection (id: ${id}):\"`,\n );\n }\n },\n};\n\nfunction attachUnhandledRejectionHandler(): void {\n const tracking = requireRejectionTracking();\n\n tracking.enable({\n allRejections: true,\n onUnhandled: promiseRejectionTrackingOptions.onUnhandled,\n onHandled: promiseRejectionTrackingOptions.onHandled,\n });\n}\n\nfunction setupErrorUtilsGlobalHandler(): void {\n let handlingFatal = false;\n\n const errorUtils = RN_GLOBAL_OBJ.ErrorUtils;\n if (!errorUtils) {\n logger.warn('ErrorUtils not found. Can be caused by different environment for example react-native-web.');\n return;\n }\n\n const defaultHandler = errorUtils.getGlobalHandler && errorUtils.getGlobalHandler();\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n errorUtils.setGlobalHandler(async (error: any, isFatal?: boolean) => {\n // We want to handle fatals, but only in production mode.\n const shouldHandleFatal = isFatal && !__DEV__;\n if (shouldHandleFatal) {\n if (handlingFatal) {\n logger.log('Encountered multiple fatals in a row. The latest:', error);\n return;\n }\n handlingFatal = true;\n }\n\n const client = getClient();\n\n if (!client) {\n logger.error('Sentry client is missing, the error event might be lost.', error);\n\n // If there is no client something is fishy, anyway we call the default handler\n defaultHandler(error, isFatal);\n\n return;\n }\n\n const hint: EventHint = {\n originalException: error,\n attachments: getCurrentScope().getScopeData().attachments,\n };\n const event = await client.eventFromException(error, hint);\n\n if (isFatal) {\n event.level = 'fatal' as SeverityLevel;\n\n addExceptionMechanism(event, {\n handled: false,\n type: 'onerror',\n });\n } else {\n event.level = 'error';\n\n addExceptionMechanism(event, {\n handled: true,\n type: 'generic',\n });\n }\n\n client.captureEvent(event, hint);\n\n if (__DEV__) {\n // If in dev, we call the default handler anyway and hope the error will be sent\n // Just for a better dev experience\n defaultHandler(error, isFatal);\n return;\n }\n\n void client.flush(client.getOptions().shutdownTimeout || 2000).then(\n () => {\n defaultHandler(error, isFatal);\n },\n (reason: unknown) => {\n logger.error('[ReactNativeErrorHandlers] Error while flushing the event cache after uncaught error.', reason);\n },\n );\n });\n}\n"]}
1
+ {"version":3,"file":"reactnativeerrorhandlers.js","sourceRoot":"","sources":["../../../src/js/integrations/reactnativeerrorhandlers.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EACL,qBAAqB,EACrB,iDAAiD,EACjD,gBAAgB,EAChB,SAAS,EACT,eAAe,EACf,MAAM,GACP,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,eAAe,EAAE,KAAK,EAAE,MAAM,sBAAsB,CAAC;AAC9D,OAAO,EAAE,oBAAoB,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AACnE,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;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YAAY,EAAE,CAAC,WAAW;SAC1D,CAAC;QACF,MAAM,KAAK,GAAG,MAAM,MAAM,CAAC,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAE3D,IAAI,OAAO,EAAE;YACX,KAAK,CAAC,KAAK,GAAG,OAAwB,CAAC;YAEvC,qBAAqB,CAAC,KAAK,EAAE;gBAC3B,OAAO,EAAE,KAAK;gBACd,IAAI,EAAE,SAAS;aAChB,CAAC,CAAC;SACJ;aAAM;YACL,KAAK,CAAC,KAAK,GAAG,OAAO,CAAC;YAEtB,qBAAqB,CAAC,KAAK,EAAE;gBAC3B,OAAO,EAAE,IAAI;gBACb,IAAI,EAAE,SAAS;aAChB,CAAC,CAAC;SACJ;QAED,MAAM,CAAC,YAAY,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;QAEjC,IAAI,OAAO,EAAE;YACX,gFAAgF;YAChF,mCAAmC;YACnC,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;YAC/B,OAAO;SACR;QAED,KAAK,MAAM,CAAC,KAAK,CAAE,MAAM,CAAC,UAAU,EAA+B,CAAC,eAAe,IAAI,IAAI,CAAC,CAAC,IAAI,CAC/F,GAAG,EAAE;YACH,cAAc,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACjC,CAAC,EACD,CAAC,MAAe,EAAE,EAAE;YAClB,MAAM,CAAC,KAAK,CAAC,uFAAuF,EAAE,MAAM,CAAC,CAAC;QAChH,CAAC,CACF,CAAC;IACJ,CAAC,CAAA,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { EventHint, Integration, SeverityLevel } from '@sentry/core';\nimport {\n addExceptionMechanism,\n addGlobalUnhandledRejectionInstrumentationHandler,\n captureException,\n getClient,\n getCurrentScope,\n logger,\n} from '@sentry/core';\nimport type { ReactNativeClientOptions } from '../options';\nimport { isHermesEnabled, isWeb } from '../utils/environment';\nimport { createSyntheticError, isErrorLike } from '../utils/error';\nimport { RN_GLOBAL_OBJ } from '../utils/worldwide';\nimport { checkPromiseAndWarn, polyfillPromise, requireRejectionTracking } from './reactnativeerrorhandlersutils';\n\nconst INTEGRATION_NAME = 'ReactNativeErrorHandlers';\n\n/** ReactNativeErrorHandlers Options */\ninterface ReactNativeErrorHandlersOptions {\n onerror: boolean;\n onunhandledrejection: boolean;\n patchGlobalPromise: boolean;\n}\n\ninterface PromiseRejectionTrackingOptions {\n onUnhandled: (id: string, error: unknown) => void;\n onHandled: (id: string) => void;\n}\n\n/** ReactNativeErrorHandlers Integration */\nexport const reactNativeErrorHandlersIntegration = (\n options: Partial<ReactNativeErrorHandlersOptions> = {},\n): Integration => {\n return {\n name: INTEGRATION_NAME,\n setupOnce: () =>\n setup({\n onerror: true,\n onunhandledrejection: true,\n patchGlobalPromise: true,\n ...options,\n }),\n };\n};\n\nfunction setup(options: ReactNativeErrorHandlersOptions): void {\n options.onunhandledrejection && setupUnhandledRejectionsTracking(options.patchGlobalPromise);\n options.onerror && setupErrorUtilsGlobalHandler();\n}\n\n/**\n * Setup unhandled promise rejection tracking\n */\nfunction setupUnhandledRejectionsTracking(patchGlobalPromise: boolean): void {\n try {\n if (\n isHermesEnabled() &&\n RN_GLOBAL_OBJ.HermesInternal?.enablePromiseRejectionTracker &&\n RN_GLOBAL_OBJ?.HermesInternal?.hasPromise?.()\n ) {\n logger.log('Using Hermes native promise rejection tracking');\n\n RN_GLOBAL_OBJ.HermesInternal.enablePromiseRejectionTracker({\n allRejections: true,\n onUnhandled: promiseRejectionTrackingOptions.onUnhandled,\n onHandled: promiseRejectionTrackingOptions.onHandled,\n });\n\n logger.log('Unhandled promise rejections will be caught by Sentry.');\n } else if (isWeb()) {\n logger.log('Using Browser JS promise rejection tracking for React Native Web');\n\n // Use Sentry's built-in global unhandled rejection handler\n addGlobalUnhandledRejectionInstrumentationHandler((error: unknown) => {\n captureException(error, {\n originalException: error,\n syntheticException: isErrorLike(error) ? undefined : createSyntheticError(),\n mechanism: { handled: false, type: 'onunhandledrejection' },\n });\n });\n } else if (patchGlobalPromise) {\n // For JSC and other environments, use the existing approach\n polyfillPromise();\n attachUnhandledRejectionHandler();\n checkPromiseAndWarn();\n } else {\n // For JSC and other environments, patching was disabled by user configuration\n logger.log('Unhandled promise rejections will not be caught by Sentry.');\n }\n } catch (e) {\n logger.warn(\n 'Failed to set up promise rejection tracking. ' +\n 'Unhandled promise rejections will not be caught by Sentry.' +\n 'See https://docs.sentry.io/platforms/react-native/troubleshooting/ for more details.',\n );\n }\n}\n\nconst promiseRejectionTrackingOptions: PromiseRejectionTrackingOptions = {\n onUnhandled: (id, error: unknown, rejection = {}) => {\n if (__DEV__) {\n logger.warn(`Possible Unhandled Promise Rejection (id: ${id}):\\n${rejection}`);\n }\n\n // Marking the rejection as handled to avoid breaking crash rate calculations.\n // See: https://github.com/getsentry/sentry-react-native/issues/4141\n captureException(error, {\n data: { id },\n originalException: error,\n syntheticException: isErrorLike(error) ? undefined : createSyntheticError(),\n mechanism: { handled: true, type: 'onunhandledrejection' },\n });\n },\n onHandled: id => {\n if (__DEV__) {\n logger.warn(\n `Promise Rejection Handled (id: ${id})\\n` +\n 'This means you can ignore any previous messages of the form ' +\n `\"Possible Unhandled Promise Rejection (id: ${id}):\"`,\n );\n }\n },\n};\n\nfunction attachUnhandledRejectionHandler(): void {\n const tracking = requireRejectionTracking();\n\n tracking.enable({\n allRejections: true,\n onUnhandled: promiseRejectionTrackingOptions.onUnhandled,\n onHandled: promiseRejectionTrackingOptions.onHandled,\n });\n}\n\nfunction setupErrorUtilsGlobalHandler(): void {\n let handlingFatal = false;\n\n const errorUtils = RN_GLOBAL_OBJ.ErrorUtils;\n if (!errorUtils) {\n logger.warn('ErrorUtils not found. Can be caused by different environment for example react-native-web.');\n return;\n }\n\n const defaultHandler = errorUtils.getGlobalHandler?.();\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n errorUtils.setGlobalHandler(async (error: any, isFatal?: boolean) => {\n // We want to handle fatals, but only in production mode.\n const shouldHandleFatal = isFatal && !__DEV__;\n if (shouldHandleFatal) {\n if (handlingFatal) {\n logger.log('Encountered multiple fatals in a row. The latest:', error);\n return;\n }\n handlingFatal = true;\n }\n\n const client = getClient();\n\n if (!client) {\n logger.error('Sentry client is missing, the error event might be lost.', error);\n\n // If there is no client something is fishy, anyway we call the default handler\n defaultHandler(error, isFatal);\n\n return;\n }\n\n const hint: EventHint = {\n originalException: error,\n attachments: getCurrentScope().getScopeData().attachments,\n };\n const event = await client.eventFromException(error, hint);\n\n if (isFatal) {\n event.level = 'fatal' as SeverityLevel;\n\n addExceptionMechanism(event, {\n handled: false,\n type: 'onerror',\n });\n } else {\n event.level = 'error';\n\n addExceptionMechanism(event, {\n handled: true,\n type: 'generic',\n });\n }\n\n client.captureEvent(event, hint);\n\n if (__DEV__) {\n // If in dev, we call the default handler anyway and hope the error will be sent\n // Just for a better dev experience\n defaultHandler(error, isFatal);\n return;\n }\n\n void client.flush((client.getOptions() as ReactNativeClientOptions).shutdownTimeout || 2000).then(\n () => {\n defaultHandler(error, isFatal);\n },\n (reason: unknown) => {\n logger.error('[ReactNativeErrorHandlers] Error while flushing the event cache after uncaught error.', reason);\n },\n );\n });\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"reactnativeerrorhandlersutils.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/reactnativeerrorhandlersutils.ts"],"names":[],"mappings":"AAKA;;;;;;;;GAQG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAetC;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAI5C;AAED;;GAEG;AACH,wBAAgB,wBAAwB,IAAI;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;CAChC,CAGA;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAqC1C"}
1
+ {"version":3,"file":"reactnativeerrorhandlersutils.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/reactnativeerrorhandlersutils.ts"],"names":[],"mappings":"AAIA;;;;;;;;GAQG;AACH,wBAAgB,eAAe,IAAI,IAAI,CAetC;AAED;;;GAGG;AACH,wBAAgB,kBAAkB,IAAI,OAAO,CAI5C;AAED;;GAEG;AACH,wBAAgB,wBAAwB,IAAI;IAC1C,OAAO,EAAE,MAAM,IAAI,CAAC;IACpB,MAAM,EAAE,CAAC,GAAG,EAAE,OAAO,KAAK,IAAI,CAAC;CAChC,CAGA;AAED;;GAEG;AACH,wBAAgB,mBAAmB,IAAI,IAAI,CAqC1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"reactnativeerrorhandlersutils.js","sourceRoot":"","sources":["../../../src/js/integrations/reactnativeerrorhandlersutils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe;IAC7B,IAAI,CAAC,oBAAoB,CAAC,SAAS,EAAE;QACnC,MAAM,CAAC,IAAI,CAAC,yEAAyE,CAAC,CAAC;QACvF,OAAO;KACR;IAED,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IAErC,+CAA+C;IAC/C,6DAA6D;IAC7D,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACrC,6DAA6D;IAC7D,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAExC,oBAAoB,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC;AAC1E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB;IAChC,yFAAyF;IACzF,2GAA2G;IAC3G,OAAO,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACxD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB;IAItC,gGAAgG;IAChG,OAAO,OAAO,CAAC,yCAAyC,CAAC,CAAC;AAC5D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,IAAI;QACF,uFAAuF;QACvF,gFAAgF;QAChF,+CAA+C;QAC/C,+GAA+G;QAC/G,0FAA0F;QAC1F,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,OAAO,CAAC;QACxD,gGAAgG;QAChG,MAAM,qBAAqB,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;QAC7E,MAAM,mBAAmB,GAAG,kBAAkB,EAAE,CAAC;QAEjD,IAAI,kBAAkB,KAAK,qBAAqB,EAAE;YAChD,MAAM,CAAC,IAAI,CACT,2EAA2E;gBACzE,0EAA0E;gBAC1E,qGAAqG;gBACrG,sFAAsF,CACzF,CAAC;SACH;QAED,qEAAqE;QACrE,IAAI,mBAAmB,KAAK,aAAa,CAAC,OAAO,EAAE;YACjD,MAAM,CAAC,IAAI,CACT,6DAA6D;gBAC3D,sFAAsF,CACzF,CAAC;SACH;aAAM;YACL,MAAM,CAAC,GAAG,CAAC,wDAAwD,CAAC,CAAC;SACtE;KACF;IAAC,OAAO,CAAC,EAAE;QACV,aAAa;QACb,MAAM,CAAC,IAAI,CACT,6DAA6D;YAC3D,sFAAsF,CACzF,CAAC;KACH;AACH,CAAC","sourcesContent":["import { logger } from '@sentry/core';\n\nimport { ReactNativeLibraries } from '../utils/rnlibraries';\nimport { RN_GLOBAL_OBJ } from '../utils/worldwide';\n\n/**\n * Polyfill the global promise instance with one we can be sure that we can attach the tracking to.\n *\n * In newer RN versions >=0.63, the global promise is not the same reference as the one imported from the promise library.\n * This is due to a version mismatch between promise versions.\n * Originally we tried a solution where we would have you put a package resolution to ensure the promise instances match. However,\n * - Using a package resolution requires the you to manually troubleshoot.\n * - The package resolution fix no longer works with 0.67 on iOS Hermes.\n */\nexport function polyfillPromise(): void {\n if (!ReactNativeLibraries.Utilities) {\n logger.warn('Could not polyfill Promise. React Native Libraries Utilities not found.');\n return;\n }\n\n const Promise = getPromisePolyfill();\n\n // As of RN 0.67 only done and finally are used\n // eslint-disable-next-line import/no-extraneous-dependencies\n require('promise/setimmediate/done');\n // eslint-disable-next-line import/no-extraneous-dependencies\n require('promise/setimmediate/finally');\n\n ReactNativeLibraries.Utilities.polyfillGlobal('Promise', () => Promise);\n}\n\n/**\n * Single source of truth for the Promise implementation we want to use.\n * This is important for verifying that the rejected promise tracing will work as expected.\n */\nexport function getPromisePolyfill(): unknown {\n /* eslint-disable import/no-extraneous-dependencies,@typescript-eslint/no-var-requires */\n // Below, we follow the exact way React Native initializes its promise library, and we globally replace it.\n return require('promise/setimmediate/es6-extensions');\n}\n\n/**\n * Lazy require the rejection tracking module\n */\nexport function requireRejectionTracking(): {\n disable: () => void;\n enable: (arg: unknown) => void;\n} {\n // eslint-disable-next-line @typescript-eslint/no-var-requires,import/no-extraneous-dependencies\n return require('promise/setimmediate/rejection-tracking');\n}\n\n/**\n * Checks if the promise is the same one or not, if not it will warn the user\n */\nexport function checkPromiseAndWarn(): void {\n try {\n // `promise` package is a dependency of react-native, therefore it is always available.\n // but it is possible that the user has installed a different version of promise\n // or dependency that uses a different version.\n // We have to check if the React Native Promise and the `promise` package Promise are using the same reference.\n // If they are not, likely there are multiple versions of the `promise` package installed.\n const ReactNativePromise = ReactNativeLibraries.Promise;\n // eslint-disable-next-line @typescript-eslint/no-var-requires,import/no-extraneous-dependencies\n const PromisePackagePromise = require('promise/setimmediate/es6-extensions');\n const UsedPromisePolyfill = getPromisePolyfill();\n\n if (ReactNativePromise !== PromisePackagePromise) {\n logger.warn(\n 'You appear to have multiple versions of the \"promise\" package installed. ' +\n 'This may cause unexpected behavior like undefined `Promise.allSettled`. ' +\n 'Please install the `promise` package manually using the exact version as the React Native package. ' +\n 'See https://docs.sentry.io/platforms/react-native/troubleshooting/ for more details.',\n );\n }\n\n // This only make sense if the user disabled the integration Polyfill\n if (UsedPromisePolyfill !== RN_GLOBAL_OBJ.Promise) {\n logger.warn(\n 'Unhandled promise rejections will not be caught by Sentry. ' +\n 'See https://docs.sentry.io/platforms/react-native/troubleshooting/ for more details.',\n );\n } else {\n logger.log('Unhandled promise rejections will be caught by Sentry.');\n }\n } catch (e) {\n // Do Nothing\n logger.warn(\n 'Unhandled promise rejections will not be caught by Sentry. ' +\n 'See https://docs.sentry.io/platforms/react-native/troubleshooting/ for more details.',\n );\n }\n}\n"]}
1
+ {"version":3,"file":"reactnativeerrorhandlersutils.js","sourceRoot":"","sources":["../../../src/js/integrations/reactnativeerrorhandlersutils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,aAAa,EAAE,MAAM,oBAAoB,CAAC;AAEnD;;;;;;;;GAQG;AACH,MAAM,UAAU,eAAe;IAC7B,IAAI,CAAC,oBAAoB,CAAC,SAAS,EAAE;QACnC,MAAM,CAAC,IAAI,CAAC,yEAAyE,CAAC,CAAC;QACvF,OAAO;KACR;IAED,MAAM,OAAO,GAAG,kBAAkB,EAAE,CAAC;IAErC,+CAA+C;IAC/C,6DAA6D;IAC7D,OAAO,CAAC,2BAA2B,CAAC,CAAC;IACrC,6DAA6D;IAC7D,OAAO,CAAC,8BAA8B,CAAC,CAAC;IAExC,oBAAoB,CAAC,SAAS,CAAC,cAAc,CAAC,SAAS,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,CAAC;AAC1E,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,kBAAkB;IAChC,yFAAyF;IACzF,2GAA2G;IAC3G,OAAO,OAAO,CAAC,qCAAqC,CAAC,CAAC;AACxD,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,wBAAwB;IAItC,gGAAgG;IAChG,OAAO,OAAO,CAAC,yCAAyC,CAAC,CAAC;AAC5D,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,mBAAmB;IACjC,IAAI;QACF,uFAAuF;QACvF,gFAAgF;QAChF,+CAA+C;QAC/C,+GAA+G;QAC/G,0FAA0F;QAC1F,MAAM,kBAAkB,GAAG,oBAAoB,CAAC,OAAO,CAAC;QACxD,gGAAgG;QAChG,MAAM,qBAAqB,GAAG,OAAO,CAAC,qCAAqC,CAAC,CAAC;QAC7E,MAAM,mBAAmB,GAAG,kBAAkB,EAAE,CAAC;QAEjD,IAAI,kBAAkB,KAAK,qBAAqB,EAAE;YAChD,MAAM,CAAC,IAAI,CACT,2EAA2E;gBACzE,0EAA0E;gBAC1E,qGAAqG;gBACrG,sFAAsF,CACzF,CAAC;SACH;QAED,qEAAqE;QACrE,IAAI,mBAAmB,KAAK,aAAa,CAAC,OAAO,EAAE;YACjD,MAAM,CAAC,IAAI,CACT,6DAA6D;gBAC3D,sFAAsF,CACzF,CAAC;SACH;aAAM;YACL,MAAM,CAAC,GAAG,CAAC,wDAAwD,CAAC,CAAC;SACtE;KACF;IAAC,OAAO,CAAC,EAAE;QACV,aAAa;QACb,MAAM,CAAC,IAAI,CACT,6DAA6D;YAC3D,sFAAsF,CACzF,CAAC;KACH;AACH,CAAC","sourcesContent":["import { logger } from '@sentry/core';\nimport { ReactNativeLibraries } from '../utils/rnlibraries';\nimport { RN_GLOBAL_OBJ } from '../utils/worldwide';\n\n/**\n * Polyfill the global promise instance with one we can be sure that we can attach the tracking to.\n *\n * In newer RN versions >=0.63, the global promise is not the same reference as the one imported from the promise library.\n * This is due to a version mismatch between promise versions.\n * Originally we tried a solution where we would have you put a package resolution to ensure the promise instances match. However,\n * - Using a package resolution requires the you to manually troubleshoot.\n * - The package resolution fix no longer works with 0.67 on iOS Hermes.\n */\nexport function polyfillPromise(): void {\n if (!ReactNativeLibraries.Utilities) {\n logger.warn('Could not polyfill Promise. React Native Libraries Utilities not found.');\n return;\n }\n\n const Promise = getPromisePolyfill();\n\n // As of RN 0.67 only done and finally are used\n // eslint-disable-next-line import/no-extraneous-dependencies\n require('promise/setimmediate/done');\n // eslint-disable-next-line import/no-extraneous-dependencies\n require('promise/setimmediate/finally');\n\n ReactNativeLibraries.Utilities.polyfillGlobal('Promise', () => Promise);\n}\n\n/**\n * Single source of truth for the Promise implementation we want to use.\n * This is important for verifying that the rejected promise tracing will work as expected.\n */\nexport function getPromisePolyfill(): unknown {\n /* eslint-disable import/no-extraneous-dependencies,@typescript-eslint/no-var-requires */\n // Below, we follow the exact way React Native initializes its promise library, and we globally replace it.\n return require('promise/setimmediate/es6-extensions');\n}\n\n/**\n * Lazy require the rejection tracking module\n */\nexport function requireRejectionTracking(): {\n disable: () => void;\n enable: (arg: unknown) => void;\n} {\n // eslint-disable-next-line @typescript-eslint/no-var-requires,import/no-extraneous-dependencies\n return require('promise/setimmediate/rejection-tracking');\n}\n\n/**\n * Checks if the promise is the same one or not, if not it will warn the user\n */\nexport function checkPromiseAndWarn(): void {\n try {\n // `promise` package is a dependency of react-native, therefore it is always available.\n // but it is possible that the user has installed a different version of promise\n // or dependency that uses a different version.\n // We have to check if the React Native Promise and the `promise` package Promise are using the same reference.\n // If they are not, likely there are multiple versions of the `promise` package installed.\n const ReactNativePromise = ReactNativeLibraries.Promise;\n // eslint-disable-next-line @typescript-eslint/no-var-requires,import/no-extraneous-dependencies\n const PromisePackagePromise = require('promise/setimmediate/es6-extensions');\n const UsedPromisePolyfill = getPromisePolyfill();\n\n if (ReactNativePromise !== PromisePackagePromise) {\n logger.warn(\n 'You appear to have multiple versions of the \"promise\" package installed. ' +\n 'This may cause unexpected behavior like undefined `Promise.allSettled`. ' +\n 'Please install the `promise` package manually using the exact version as the React Native package. ' +\n 'See https://docs.sentry.io/platforms/react-native/troubleshooting/ for more details.',\n );\n }\n\n // This only make sense if the user disabled the integration Polyfill\n if (UsedPromisePolyfill !== RN_GLOBAL_OBJ.Promise) {\n logger.warn(\n 'Unhandled promise rejections will not be caught by Sentry. ' +\n 'See https://docs.sentry.io/platforms/react-native/troubleshooting/ for more details.',\n );\n } else {\n logger.log('Unhandled promise rejections will be caught by Sentry.');\n }\n } catch (e) {\n // Do Nothing\n logger.warn(\n 'Unhandled promise rejections will not be caught by Sentry. ' +\n 'See https://docs.sentry.io/platforms/react-native/troubleshooting/ for more details.',\n );\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"reactnativeinfo.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/reactnativeinfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAoB,WAAW,EAAE,MAAM,cAAc,CAAC;AAgB3E,MAAM,WAAW,kBAAmB,SAAQ,OAAO;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,gBAAgB,CAAC,EAAE,MAAM,CAAC;CAC3B;AAED,4CAA4C;AAC5C,eAAO,MAAM,0BAA0B,QAAO,WAQ7C,CAAC"}
1
+ {"version":3,"file":"reactnativeinfo.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/reactnativeinfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAoB,WAAW,EAAE,MAAM,cAAc,CAAC;AAe3E,MAAM,WAAW,kBAAmB,SAAQ,OAAO;IACjD,SAAS,CAAC,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,OAAO,CAAC;IACtB,MAAM,EAAE,OAAO,CAAC;IAChB,IAAI,EAAE,OAAO,CAAC;IACd,cAAc,CAAC,EAAE,MAAM,CAAC;IACxB,oBAAoB,CAAC,EAAE,MAAM,CAAC;IAC9B,eAAe,CAAC,EAAE,MAAM,CAAC;IACzB,iBAAiB,CAAC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AM,KAAK,CAAC,EAAE;gBACtD,OAAO,IAAI,CAAC;aACb;SACF;KACF;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import type { Context, Event, EventHint, Integration } from '@sentry/core';\n\nimport {\n getExpoGoVersion,\n getExpoSdkVersion,\n getHermesVersion,\n getReactNativeVersion,\n isExpo,\n isFabricEnabled,\n isHermesEnabled,\n isTurboModuleEnabled,\n} from '../utils/environment';\nimport type { ReactNativeError } from './debugsymbolicator';\n\nconst INTEGRATION_NAME = 'ReactNativeInfo';\n\nexport interface ReactNativeContext extends Context {\n js_engine?: string;\n turbo_module: boolean;\n fabric: boolean;\n expo: boolean;\n hermes_version?: string;\n react_native_version?: string;\n component_stack?: string;\n hermes_debug_info?: boolean;\n expo_go_version?: string;\n expo_sdk_version?: string;\n}\n\n/** Loads React Native context at runtime */\nexport const reactNativeInfoIntegration = (): Integration => {\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n // noop\n },\n processEvent,\n };\n};\n\nfunction processEvent(event: Event, hint: EventHint): Event {\n const reactNativeError = hint?.originalException ? (hint?.originalException as ReactNativeError) : undefined;\n\n const reactNativeContext: ReactNativeContext = {\n turbo_module: isTurboModuleEnabled(),\n fabric: isFabricEnabled(),\n react_native_version: getReactNativeVersion(),\n expo: isExpo(),\n };\n\n if (isHermesEnabled()) {\n reactNativeContext.js_engine = 'hermes';\n const hermesVersion = getHermesVersion();\n if (hermesVersion) {\n reactNativeContext.hermes_version = hermesVersion;\n }\n reactNativeContext.hermes_debug_info = !isEventWithHermesBytecodeFrames(event);\n } else if (reactNativeError?.jsEngine) {\n reactNativeContext.js_engine = reactNativeError.jsEngine;\n }\n\n if (reactNativeContext.js_engine === 'hermes') {\n event.tags = {\n hermes: 'true',\n ...event.tags,\n };\n }\n\n if (reactNativeError?.componentStack) {\n reactNativeContext.component_stack = reactNativeError.componentStack;\n }\n\n const expoGoVersion = getExpoGoVersion();\n if (expoGoVersion) {\n reactNativeContext.expo_go_version = expoGoVersion;\n }\n\n const expoSdkVersion = getExpoSdkVersion();\n if (expoSdkVersion) {\n reactNativeContext.expo_sdk_version = expoSdkVersion;\n }\n\n event.contexts = {\n react_native_context: reactNativeContext,\n ...event.contexts,\n };\n\n return event;\n}\n\n/**\n * Guess if the event contains frames with Hermes bytecode\n * (thus Hermes bundle doesn't contain debug info)\n * based on the event exception/threads frames.\n *\n * This function can be relied on only if Hermes is enabled!\n *\n * Hermes bytecode position is always line 1 and column 0-based number.\n * If Hermes bundle has debug info, the bytecode frames pos are calculated\n * back to the plain bundle source code positions and line will be > 1.\n *\n * Line 1 contains start time var, it's safe to assume it won't crash.\n * The above only applies when Hermes is enabled.\n *\n * Javascript/Hermes bytecode frames have platform === undefined.\n * Native (Java, ObjC, C++) frames have platform === 'android'/'ios'/'native'.\n */\nfunction isEventWithHermesBytecodeFrames(event: Event): boolean {\n for (const value of event.exception?.values || event.threads?.values || []) {\n for (const frame of value.stacktrace?.frames || []) {\n // platform === undefined we assume it's javascript (only native frames use the platform attribute)\n if (frame.platform === undefined && frame.lineno === 1) {\n return true;\n }\n }\n }\n return false;\n}\n"]}
1
+ {"version":3,"file":"reactnativeinfo.js","sourceRoot":"","sources":["../../../src/js/integrations/reactnativeinfo.ts"],"names":[],"mappings":"AACA,OAAO,EACL,gBAAgB,EAChB,iBAAiB,EACjB,gBAAgB,EAChB,qBAAqB,EACrB,MAAM,EACN,eAAe,EACf,eAAe,EACf,oBAAoB,GACrB,MAAM,sBAAsB,CAAC;AAG9B,MAAM,gBAAgB,GAAG,iBAAiB,CAAC;AAe3C,4CAA4C;AAC5C,MAAM,CAAC,MAAM,0BAA0B,GAAG,GAAgB,EAAE;IAC1D,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,GAAG,EAAE;YACd,OAAO;QACT,CAAC;QACD,YAAY;KACb,CAAC;AACJ,CAAC,CAAC;AAEF,SAAS,YAAY,CAAC,KAAY,EAAE,IAAe;IACjD,MAAM,gBAAgB,GAA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Ac,CAAC;KACtD;IAED,KAAK,CAAC,QAAQ,mBACZ,oBAAoB,EAAE,kBAAkB,IACrC,KAAK,CAAC,QAAQ,CAClB,CAAC;IAEF,OAAO,KAAK,CAAC;AACf,CAAC;AAED;;;;;;;;;;;;;;;;GAgBG;AACH,SAAS,+BAA+B,CAAC,KAAY;;IACnD,KAAK,MAAM,KAAK,IAAI,CAAA,MAAA,KAAK,CAAC,SAAS,0CAAE,MAAM,MAAI,MAAA,KAAK,CAAC,OAAO,0CAAE,MAAM,CAAA,IAAI,EAAE,EAAE;QAC1E,KAAK,MAAM,KAAK,IAAI,CAAA,MAAA,KAAK,CAAC,UAAU,0CAAE,MAAM,KAAI,EAAE,EAAE;YAClD,mGAAmG;YACnG,IAAI,KAAK,CAAC,QAAQ,KAAK,SAAS,IAAI,KAAK,CAAC,MAAM,KAAK,CAAC,EAAE;gBACtD,OAAO,IAAI,CAAC;aACb;SACF;KACF;IACD,OAAO,KAAK,CAAC;AACf,CAAC","sourcesContent":["import type { Context, Event, EventHint, Integration } from '@sentry/core';\nimport {\n getExpoGoVersion,\n getExpoSdkVersion,\n getHermesVersion,\n getReactNativeVersion,\n isExpo,\n isFabricEnabled,\n isHermesEnabled,\n isTurboModuleEnabled,\n} from '../utils/environment';\nimport type { ReactNativeError } from './debugsymbolicator';\n\nconst INTEGRATION_NAME = 'ReactNativeInfo';\n\nexport interface ReactNativeContext extends Context {\n js_engine?: string;\n turbo_module: boolean;\n fabric: boolean;\n expo: boolean;\n hermes_version?: string;\n react_native_version?: string;\n component_stack?: string;\n hermes_debug_info?: boolean;\n expo_go_version?: string;\n expo_sdk_version?: string;\n}\n\n/** Loads React Native context at runtime */\nexport const reactNativeInfoIntegration = (): Integration => {\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n // noop\n },\n processEvent,\n };\n};\n\nfunction processEvent(event: Event, hint: EventHint): Event {\n const reactNativeError = hint?.originalException ? (hint?.originalException as ReactNativeError) : undefined;\n\n const reactNativeContext: ReactNativeContext = {\n turbo_module: isTurboModuleEnabled(),\n fabric: isFabricEnabled(),\n react_native_version: getReactNativeVersion(),\n expo: isExpo(),\n };\n\n if (isHermesEnabled()) {\n reactNativeContext.js_engine = 'hermes';\n const hermesVersion = getHermesVersion();\n if (hermesVersion) {\n reactNativeContext.hermes_version = hermesVersion;\n }\n reactNativeContext.hermes_debug_info = !isEventWithHermesBytecodeFrames(event);\n } else if (reactNativeError?.jsEngine) {\n reactNativeContext.js_engine = reactNativeError.jsEngine;\n }\n\n if (reactNativeContext.js_engine === 'hermes') {\n event.tags = {\n hermes: 'true',\n ...event.tags,\n };\n }\n\n if (reactNativeError?.componentStack) {\n reactNativeContext.component_stack = reactNativeError.componentStack;\n }\n\n const expoGoVersion = getExpoGoVersion();\n if (expoGoVersion) {\n reactNativeContext.expo_go_version = expoGoVersion;\n }\n\n const expoSdkVersion = getExpoSdkVersion();\n if (expoSdkVersion) {\n reactNativeContext.expo_sdk_version = expoSdkVersion;\n }\n\n event.contexts = {\n react_native_context: reactNativeContext,\n ...event.contexts,\n };\n\n return event;\n}\n\n/**\n * Guess if the event contains frames with Hermes bytecode\n * (thus Hermes bundle doesn't contain debug info)\n * based on the event exception/threads frames.\n *\n * This function can be relied on only if Hermes is enabled!\n *\n * Hermes bytecode position is always line 1 and column 0-based number.\n * If Hermes bundle has debug info, the bytecode frames pos are calculated\n * back to the plain bundle source code positions and line will be > 1.\n *\n * Line 1 contains start time var, it's safe to assume it won't crash.\n * The above only applies when Hermes is enabled.\n *\n * Javascript/Hermes bytecode frames have platform === undefined.\n * Native (Java, ObjC, C++) frames have platform === 'android'/'ios'/'native'.\n */\nfunction isEventWithHermesBytecodeFrames(event: Event): boolean {\n for (const value of event.exception?.values || event.threads?.values || []) {\n for (const frame of value.stacktrace?.frames || []) {\n // platform === undefined we assume it's javascript (only native frames use the platform attribute)\n if (frame.platform === undefined && frame.lineno === 1) {\n return true;\n }\n }\n }\n return false;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/release.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiE,WAAW,EAAE,MAAM,cAAc,CAAC;AAM/G,iEAAiE;AACjE,eAAO,MAAM,wBAAwB,QAAO,WAQ3C,CAAC"}
1
+ {"version":3,"file":"release.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/release.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAiE,WAAW,EAAE,MAAM,cAAc,CAAC;AAK/G,iEAAiE;AACjE,eAAO,MAAM,wBAAwB,QAAO,WAQ3C,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"release.js","sourceRoot":"","sources":["../../../src/js/integrations/release.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAEnC,iEAAiE;AACjE,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAgB,EAAE;IACxD,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,GAAG,EAAE;YACd,OAAO;QACT,CAAC;QACD,YAAY;KACb,CAAC;AACJ,CAAC,CAAC;AAEF,SAAe,YAAY,CACzB,KAAY,EACZ,CAAY,EACZ,MAAmD;;;QAEnD,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAEpC;;;UAGE;QACF,IAAI,OAAO,CAAA,MAAA,KAAK,CAAC,KAAK,0CAAE,gBAAgB,CAAA,KAAK,QAAQ,EAAE;YACrD,KAAK,CAAC,OAAO,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC;SACnD;aAAM,IAAI,OAAO,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAA,KAAK,QAAQ,EAAE;YAC/C,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;SACjC;QAED,IAAI,OAAO,CAAA,MAAA,KAAK,CAAC,KAAK,0CAAE,aAAa,CAAA,KAAK,QAAQ,EAAE;YAClD,KAAK,CAAC,IAAI,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;SAC7C;aAAM,IAAI,OAAO,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,CAAA,KAAK,QAAQ,EAAE;YAC5C,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;SAC3B;QAED,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE;YAC/B,OAAO,KAAK,CAAC;SACd;QAED,IAAI;YACF,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,kBAAkB,EAAE,CAAC;YACxD,IAAI,aAAa,EAAE;gBACjB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;oBAClB,KAAK,CAAC,OAAO,GAAG,GAAG,aAAa,CAAC,EAAE,IAAI,aAAa,CAAC,OAAO,IAAI,aAAa,CAAC,KAAK,EAAE,CAAC;iBACvF;gBACD,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;oBACf,KAAK,CAAC,IAAI,GAAG,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC;iBACvC;aACF;SACF;QAAC,OAAO,GAAG,EAAE;YACZ,yCAAyC;SAC1C;QAED,OAAO,KAAK,CAAC;;CACd","sourcesContent":["import type { BaseTransportOptions, Client, ClientOptions, Event, EventHint, Integration } from '@sentry/core';\n\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'Release';\n\n/** Release integration responsible to load release from file. */\nexport const nativeReleaseIntegration = (): Integration => {\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n // noop\n },\n processEvent,\n };\n};\n\nasync function processEvent(\n event: Event,\n _: EventHint,\n client: Client<ClientOptions<BaseTransportOptions>>,\n): Promise<Event> {\n const options = client.getOptions();\n\n /*\n __sentry_release and __sentry_dist is set by the user with setRelease and setDist. If this is used then this is the strongest.\n Otherwise we check for the release and dist in the options passed on init, as this is stronger than the release/dist from the native build.\n */\n if (typeof event.extra?.__sentry_release === 'string') {\n event.release = `${event.extra.__sentry_release}`;\n } else if (typeof options?.release === 'string') {\n event.release = options.release;\n }\n\n if (typeof event.extra?.__sentry_dist === 'string') {\n event.dist = `${event.extra.__sentry_dist}`;\n } else if (typeof options?.dist === 'string') {\n event.dist = options.dist;\n }\n\n if (event.release && event.dist) {\n return event;\n }\n\n try {\n const nativeRelease = await NATIVE.fetchNativeRelease();\n if (nativeRelease) {\n if (!event.release) {\n event.release = `${nativeRelease.id}@${nativeRelease.version}+${nativeRelease.build}`;\n }\n if (!event.dist) {\n event.dist = `${nativeRelease.build}`;\n }\n }\n } catch (_Oo) {\n // Something went wrong, we just continue\n }\n\n return event;\n}\n"]}
1
+ {"version":3,"file":"release.js","sourceRoot":"","sources":["../../../src/js/integrations/release.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAEnC,iEAAiE;AACjE,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAgB,EAAE;IACxD,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,GAAG,EAAE;YACd,OAAO;QACT,CAAC;QACD,YAAY;KACb,CAAC;AACJ,CAAC,CAAC;AAEF,SAAe,YAAY,CACzB,KAAY,EACZ,CAAY,EACZ,MAAmD;;;QAEnD,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAEpC;;;UAGE;QACF,IAAI,OAAO,CAAA,MAAA,KAAK,CAAC,KAAK,0CAAE,gBAAgB,CAAA,KAAK,QAAQ,EAAE;YACrD,KAAK,CAAC,OAAO,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,gBAAgB,EAAE,CAAC;SACnD;aAAM,IAAI,OAAO,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,OAAO,CAAA,KAAK,QAAQ,EAAE;YAC/C,KAAK,CAAC,OAAO,GAAG,OAAO,CAAC,OAAO,CAAC;SACjC;QAED,IAAI,OAAO,CAAA,MAAA,KAAK,CAAC,KAAK,0CAAE,aAAa,CAAA,KAAK,QAAQ,EAAE;YAClD,KAAK,CAAC,IAAI,GAAG,GAAG,KAAK,CAAC,KAAK,CAAC,aAAa,EAAE,CAAC;SAC7C;aAAM,IAAI,OAAO,CAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,IAAI,CAAA,KAAK,QAAQ,EAAE;YAC5C,KAAK,CAAC,IAAI,GAAG,OAAO,CAAC,IAAI,CAAC;SAC3B;QAED,IAAI,KAAK,CAAC,OAAO,IAAI,KAAK,CAAC,IAAI,EAAE;YAC/B,OAAO,KAAK,CAAC;SACd;QAED,IAAI;YACF,MAAM,aAAa,GAAG,MAAM,MAAM,CAAC,kBAAkB,EAAE,CAAC;YACxD,IAAI,aAAa,EAAE;gBACjB,IAAI,CAAC,KAAK,CAAC,OAAO,EAAE;oBAClB,KAAK,CAAC,OAAO,GAAG,GAAG,aAAa,CAAC,EAAE,IAAI,aAAa,CAAC,OAAO,IAAI,aAAa,CAAC,KAAK,EAAE,CAAC;iBACvF;gBACD,IAAI,CAAC,KAAK,CAAC,IAAI,EAAE;oBACf,KAAK,CAAC,IAAI,GAAG,GAAG,aAAa,CAAC,KAAK,EAAE,CAAC;iBACvC;aACF;SACF;QAAC,OAAO,GAAG,EAAE;YACZ,yCAAyC;SAC1C;QAED,OAAO,KAAK,CAAC;;CACd","sourcesContent":["import type { BaseTransportOptions, Client, ClientOptions, Event, EventHint, Integration } from '@sentry/core';\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'Release';\n\n/** Release integration responsible to load release from file. */\nexport const nativeReleaseIntegration = (): Integration => {\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n // noop\n },\n processEvent,\n };\n};\n\nasync function processEvent(\n event: Event,\n _: EventHint,\n client: Client<ClientOptions<BaseTransportOptions>>,\n): Promise<Event> {\n const options = client.getOptions();\n\n /*\n __sentry_release and __sentry_dist is set by the user with setRelease and setDist. If this is used then this is the strongest.\n Otherwise we check for the release and dist in the options passed on init, as this is stronger than the release/dist from the native build.\n */\n if (typeof event.extra?.__sentry_release === 'string') {\n event.release = `${event.extra.__sentry_release}`;\n } else if (typeof options?.release === 'string') {\n event.release = options.release;\n }\n\n if (typeof event.extra?.__sentry_dist === 'string') {\n event.dist = `${event.extra.__sentry_dist}`;\n } else if (typeof options?.dist === 'string') {\n event.dist = options.dist;\n }\n\n if (event.release && event.dist) {\n return event;\n }\n\n try {\n const nativeRelease = await NATIVE.fetchNativeRelease();\n if (nativeRelease) {\n if (!event.release) {\n event.release = `${nativeRelease.id}@${nativeRelease.version}+${nativeRelease.build}`;\n }\n if (!event.dist) {\n event.dist = `${nativeRelease.build}`;\n }\n }\n } catch (_Oo) {\n // Something went wrong, we just continue\n }\n\n return event;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"rewriteframes.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/rewriteframes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,cAAc,CAAC;AAM5D,eAAO,MAAM,2BAA2B,gCAAgC,CAAC;AACzE,eAAO,MAAM,uBAAuB,yBAAyB,CAAC;AAE9D;;;;;GAKG;AACH,wBAAgB,8BAA8B,IAAI,WAAW,CAsD5D"}
1
+ {"version":3,"file":"rewriteframes.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/rewriteframes.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAc,MAAM,cAAc,CAAC;AAK5D,eAAO,MAAM,2BAA2B,gCAAgC,CAAC;AACzE,eAAO,MAAM,uBAAuB,yBAAyB,CAAC;AAE9D;;;;;GAKG;AACH,wBAAgB,8BAA8B,IAAI,WAAW,CAsD5D"}