@sentry/react-native 8.5.0 → 8.7.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 (408) hide show
  1. package/RNSentry.podspec +1 -1
  2. package/android/build.gradle +2 -2
  3. package/android/expo-handler/build.gradle +20 -0
  4. package/android/expo-handler/src/main/java/io/sentry/react/expo/SentryExpoPackage.java +22 -0
  5. package/android/expo-handler/src/main/java/io/sentry/react/expo/SentryReactNativeHostHandler.java +48 -0
  6. package/android/expo-stubs/README.md +7 -0
  7. package/android/expo-stubs/build.gradle +23 -0
  8. package/android/expo-stubs/gradle/wrapper/gradle-wrapper.jar +0 -0
  9. package/android/expo-stubs/gradle/wrapper/gradle-wrapper.properties +7 -0
  10. package/android/expo-stubs/gradlew +251 -0
  11. package/android/expo-stubs/gradlew.bat +94 -0
  12. package/android/expo-stubs/settings.gradle +1 -0
  13. package/android/expo-stubs/src/main/java/expo/modules/core/interfaces/Package.java +11 -0
  14. package/android/expo-stubs/src/main/java/expo/modules/core/interfaces/ReactNativeHostHandler.java +7 -0
  15. package/android/libs/expo-stubs.jar +0 -0
  16. package/android/libs/replay-stubs.jar +0 -0
  17. package/android/replay-stubs/build.gradle +1 -1
  18. package/android/src/main/java/io/sentry/react/RNSentryFrameDelayCollector.java +128 -0
  19. package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +63 -11
  20. package/android/src/main/java/io/sentry/react/RNSentryVersion.java +1 -1
  21. package/android/src/newarch/java/io/sentry/react/RNSentryModule.java +6 -0
  22. package/android/src/oldarch/java/io/sentry/react/RNSentryModule.java +6 -0
  23. package/dist/js/NativeLogListener.d.ts.map +1 -1
  24. package/dist/js/NativeLogListener.js.map +1 -1
  25. package/dist/js/NativeRNSentry.d.ts +1 -0
  26. package/dist/js/NativeRNSentry.d.ts.map +1 -1
  27. package/dist/js/NativeRNSentry.js.map +1 -1
  28. package/dist/js/RNSentryReplayMaskNativeComponent.d.ts.map +1 -1
  29. package/dist/js/RNSentryReplayMaskNativeComponent.js +1 -2
  30. package/dist/js/RNSentryReplayMaskNativeComponent.js.map +1 -1
  31. package/dist/js/RNSentryReplayUnmaskNativeComponent.d.ts.map +1 -1
  32. package/dist/js/RNSentryReplayUnmaskNativeComponent.js +1 -2
  33. package/dist/js/RNSentryReplayUnmaskNativeComponent.js.map +1 -1
  34. package/dist/js/breadcrumb.d.ts.map +1 -1
  35. package/dist/js/breadcrumb.js.map +1 -1
  36. package/dist/js/client.d.ts.map +1 -1
  37. package/dist/js/client.js +1 -1
  38. package/dist/js/client.js.map +1 -1
  39. package/dist/js/feedback/FeedbackButton.d.ts +2 -1
  40. package/dist/js/feedback/FeedbackButton.d.ts.map +1 -1
  41. package/dist/js/feedback/FeedbackButton.js +5 -4
  42. package/dist/js/feedback/FeedbackButton.js.map +1 -1
  43. package/dist/js/feedback/{FeedbackWidget.d.ts → FeedbackForm.d.ts} +5 -5
  44. package/dist/js/feedback/FeedbackForm.d.ts.map +1 -0
  45. package/dist/js/feedback/{FeedbackWidget.js → FeedbackForm.js} +32 -30
  46. package/dist/js/feedback/FeedbackForm.js.map +1 -0
  47. package/dist/js/feedback/FeedbackForm.styles.d.ts +11 -0
  48. package/dist/js/feedback/FeedbackForm.styles.d.ts.map +1 -0
  49. package/dist/js/feedback/{FeedbackWidget.styles.js → FeedbackForm.styles.js} +1 -1
  50. package/dist/js/feedback/FeedbackForm.styles.js.map +1 -0
  51. package/dist/js/feedback/{FeedbackWidget.theme.d.ts → FeedbackForm.theme.d.ts} +7 -5
  52. package/dist/js/feedback/FeedbackForm.theme.d.ts.map +1 -0
  53. package/dist/js/feedback/{FeedbackWidget.theme.js → FeedbackForm.theme.js} +1 -1
  54. package/dist/js/feedback/FeedbackForm.theme.js.map +1 -0
  55. package/{ts3.8/dist/js/feedback/FeedbackWidget.types.d.ts → dist/js/feedback/FeedbackForm.types.d.ts} +305 -299
  56. package/dist/js/feedback/FeedbackForm.types.d.ts.map +1 -0
  57. package/dist/js/feedback/FeedbackForm.types.js +2 -0
  58. package/dist/js/feedback/FeedbackForm.types.js.map +1 -0
  59. package/dist/js/feedback/{FeedbackWidgetManager.d.ts → FeedbackFormManager.d.ts} +12 -4
  60. package/dist/js/feedback/FeedbackFormManager.d.ts.map +1 -0
  61. package/dist/js/feedback/{FeedbackWidgetManager.js → FeedbackFormManager.js} +22 -13
  62. package/dist/js/feedback/FeedbackFormManager.js.map +1 -0
  63. package/dist/js/feedback/{FeedbackWidgetProvider.d.ts → FeedbackFormProvider.d.ts} +10 -10
  64. package/dist/js/feedback/FeedbackFormProvider.d.ts.map +1 -0
  65. package/dist/js/feedback/{FeedbackWidgetProvider.js → FeedbackFormProvider.js} +18 -15
  66. package/dist/js/feedback/FeedbackFormProvider.js.map +1 -0
  67. package/dist/js/feedback/ScreenshotButton.d.ts +2 -2
  68. package/dist/js/feedback/ScreenshotButton.d.ts.map +1 -1
  69. package/dist/js/feedback/ScreenshotButton.js +6 -5
  70. package/dist/js/feedback/ScreenshotButton.js.map +1 -1
  71. package/dist/js/feedback/ShakeToReportBug.d.ts.map +1 -1
  72. package/dist/js/feedback/ShakeToReportBug.js.map +1 -1
  73. package/dist/js/feedback/defaults.d.ts +2 -2
  74. package/dist/js/feedback/defaults.d.ts.map +1 -1
  75. package/dist/js/feedback/defaults.js.map +1 -1
  76. package/dist/js/feedback/integration.d.ts +13 -13
  77. package/dist/js/feedback/integration.d.ts.map +1 -1
  78. package/dist/js/feedback/integration.js.map +1 -1
  79. package/dist/js/feedback/lazy.d.ts +5 -0
  80. package/dist/js/feedback/lazy.d.ts.map +1 -1
  81. package/dist/js/feedback/lazy.js +12 -0
  82. package/dist/js/feedback/lazy.js.map +1 -1
  83. package/dist/js/feedback/utils.d.ts.map +1 -1
  84. package/dist/js/feedback/utils.js +1 -0
  85. package/dist/js/feedback/utils.js.map +1 -1
  86. package/dist/js/index.d.ts +12 -3
  87. package/dist/js/index.d.ts.map +1 -1
  88. package/dist/js/index.js +12 -3
  89. package/dist/js/index.js.map +1 -1
  90. package/dist/js/integrations/appRegistry.d.ts.map +1 -1
  91. package/dist/js/integrations/appRegistry.js.map +1 -1
  92. package/dist/js/integrations/breadcrumbs.d.ts.map +1 -1
  93. package/dist/js/integrations/breadcrumbs.js +1 -1
  94. package/dist/js/integrations/breadcrumbs.js.map +1 -1
  95. package/dist/js/integrations/debugsymbolicator.d.ts.map +1 -1
  96. package/dist/js/integrations/debugsymbolicator.js +4 -5
  97. package/dist/js/integrations/debugsymbolicator.js.map +1 -1
  98. package/dist/js/integrations/debugsymbolicatorutils.d.ts.map +1 -1
  99. package/dist/js/integrations/debugsymbolicatorutils.js.map +1 -1
  100. package/dist/js/integrations/default.d.ts.map +1 -1
  101. package/dist/js/integrations/default.js +1 -2
  102. package/dist/js/integrations/default.js.map +1 -1
  103. package/dist/js/integrations/devicecontext.d.ts.map +1 -1
  104. package/dist/js/integrations/devicecontext.js +1 -1
  105. package/dist/js/integrations/devicecontext.js.map +1 -1
  106. package/dist/js/integrations/expoconstants.d.ts.map +1 -1
  107. package/dist/js/integrations/expoconstants.js.map +1 -1
  108. package/dist/js/integrations/expocontext.d.ts.map +1 -1
  109. package/dist/js/integrations/expocontext.js.map +1 -1
  110. package/dist/js/integrations/expoupdateslistener.d.ts.map +1 -1
  111. package/dist/js/integrations/expoupdateslistener.js +0 -1
  112. package/dist/js/integrations/expoupdateslistener.js.map +1 -1
  113. package/dist/js/integrations/graphql.d.ts.map +1 -1
  114. package/dist/js/integrations/graphql.js.map +1 -1
  115. package/dist/js/integrations/logEnricherIntegration.d.ts.map +1 -1
  116. package/dist/js/integrations/logEnricherIntegration.js +1 -1
  117. package/dist/js/integrations/logEnricherIntegration.js.map +1 -1
  118. package/dist/js/integrations/modulesloader.d.ts.map +1 -1
  119. package/dist/js/integrations/modulesloader.js.map +1 -1
  120. package/dist/js/integrations/nativelinkederrors.d.ts.map +1 -1
  121. package/dist/js/integrations/nativelinkederrors.js +1 -0
  122. package/dist/js/integrations/nativelinkederrors.js.map +1 -1
  123. package/dist/js/integrations/primitiveTagIntegration.d.ts.map +1 -1
  124. package/dist/js/integrations/primitiveTagIntegration.js.map +1 -1
  125. package/dist/js/integrations/reactnativeerrorhandlers.d.ts.map +1 -1
  126. package/dist/js/integrations/reactnativeerrorhandlers.js +2 -1
  127. package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
  128. package/dist/js/integrations/reactnativeerrorhandlersutils.d.ts.map +1 -1
  129. package/dist/js/integrations/reactnativeerrorhandlersutils.js +0 -5
  130. package/dist/js/integrations/reactnativeerrorhandlersutils.js.map +1 -1
  131. package/dist/js/integrations/reactnativeinfo.d.ts.map +1 -1
  132. package/dist/js/integrations/reactnativeinfo.js.map +1 -1
  133. package/dist/js/integrations/release.d.ts.map +1 -1
  134. package/dist/js/integrations/release.js +1 -1
  135. package/dist/js/integrations/release.js.map +1 -1
  136. package/dist/js/integrations/rewriteframes.d.ts.map +1 -1
  137. package/dist/js/integrations/rewriteframes.js.map +1 -1
  138. package/dist/js/integrations/screenshot.d.ts.map +1 -1
  139. package/dist/js/integrations/screenshot.js +1 -1
  140. package/dist/js/integrations/screenshot.js.map +1 -1
  141. package/dist/js/integrations/sdkinfo.d.ts.map +1 -1
  142. package/dist/js/integrations/sdkinfo.js.map +1 -1
  143. package/dist/js/integrations/spotlight.d.ts.map +1 -1
  144. package/dist/js/integrations/spotlight.js.map +1 -1
  145. package/dist/js/integrations/supabase.d.ts.map +1 -1
  146. package/dist/js/integrations/supabase.js.map +1 -1
  147. package/dist/js/integrations/viewhierarchy.d.ts.map +1 -1
  148. package/dist/js/integrations/viewhierarchy.js +1 -1
  149. package/dist/js/integrations/viewhierarchy.js.map +1 -1
  150. package/dist/js/misc.js.map +1 -1
  151. package/dist/js/options.d.ts +1 -1
  152. package/dist/js/options.d.ts.map +1 -1
  153. package/dist/js/options.js.map +1 -1
  154. package/dist/js/playground/examples.d.ts.map +1 -1
  155. package/dist/js/playground/examples.js.map +1 -1
  156. package/dist/js/playground/modal.d.ts +2 -2
  157. package/dist/js/playground/modal.d.ts.map +1 -1
  158. package/dist/js/playground/modal.js +5 -103
  159. package/dist/js/playground/modal.js.map +1 -1
  160. package/dist/js/playground/modal.styles.d.ts +100 -0
  161. package/dist/js/playground/modal.styles.d.ts.map +1 -0
  162. package/dist/js/playground/modal.styles.js +98 -0
  163. package/dist/js/playground/modal.styles.js.map +1 -0
  164. package/dist/js/profiling/cache.js +2 -2
  165. package/dist/js/profiling/cache.js.map +1 -1
  166. package/dist/js/profiling/convertHermesProfile.d.ts.map +1 -1
  167. package/dist/js/profiling/convertHermesProfile.js.map +1 -1
  168. package/dist/js/profiling/debugid.d.ts.map +1 -1
  169. package/dist/js/profiling/debugid.js.map +1 -1
  170. package/dist/js/profiling/hermes.d.ts.map +1 -1
  171. package/dist/js/profiling/hermes.js.map +1 -1
  172. package/dist/js/profiling/integration.d.ts.map +1 -1
  173. package/dist/js/profiling/integration.js.map +1 -1
  174. package/dist/js/profiling/types.d.ts.map +1 -1
  175. package/dist/js/profiling/types.js.map +1 -1
  176. package/dist/js/profiling/utils.d.ts.map +1 -1
  177. package/dist/js/profiling/utils.js +1 -1
  178. package/dist/js/profiling/utils.js.map +1 -1
  179. package/dist/js/replay/CustomMask.d.ts +1 -1
  180. package/dist/js/replay/CustomMask.d.ts.map +1 -1
  181. package/dist/js/replay/CustomMask.js +1 -1
  182. package/dist/js/replay/CustomMask.js.map +1 -1
  183. package/dist/js/replay/CustomMask.web.d.ts +1 -1
  184. package/dist/js/replay/CustomMask.web.d.ts.map +1 -1
  185. package/dist/js/replay/CustomMask.web.js +2 -2
  186. package/dist/js/replay/CustomMask.web.js.map +1 -1
  187. package/dist/js/replay/browserReplay.d.ts.map +1 -1
  188. package/dist/js/replay/browserReplay.js +0 -2
  189. package/dist/js/replay/browserReplay.js.map +1 -1
  190. package/dist/js/replay/mobilereplay.d.ts.map +1 -1
  191. package/dist/js/replay/mobilereplay.js +21 -2
  192. package/dist/js/replay/mobilereplay.js.map +1 -1
  193. package/dist/js/replay/networkUtils.d.ts +0 -1
  194. package/dist/js/replay/networkUtils.d.ts.map +1 -1
  195. package/dist/js/replay/networkUtils.js.map +1 -1
  196. package/dist/js/replay/xhrUtils.d.ts.map +1 -1
  197. package/dist/js/replay/xhrUtils.js.map +1 -1
  198. package/dist/js/scopeSync.d.ts.map +1 -1
  199. package/dist/js/scopeSync.js +1 -1
  200. package/dist/js/scopeSync.js.map +1 -1
  201. package/dist/js/sdk.d.ts +21 -0
  202. package/dist/js/sdk.d.ts.map +1 -1
  203. package/dist/js/sdk.js +42 -18
  204. package/dist/js/sdk.js.map +1 -1
  205. package/dist/js/tools/ModulesCollector.js +1 -1
  206. package/dist/js/tools/ModulesCollector.js.map +1 -1
  207. package/dist/js/tools/collectModules.js +0 -1
  208. package/dist/js/tools/collectModules.js.map +1 -1
  209. package/dist/js/tools/easBuildHooks.d.ts.map +1 -1
  210. package/dist/js/tools/easBuildHooks.js +13 -14
  211. package/dist/js/tools/easBuildHooks.js.map +1 -1
  212. package/dist/js/tools/enableLogger.js +1 -2
  213. package/dist/js/tools/enableLogger.js.map +1 -1
  214. package/dist/js/tools/metroMiddleware.d.ts.map +1 -1
  215. package/dist/js/tools/metroMiddleware.js.map +1 -1
  216. package/dist/js/tools/metroconfig.d.ts.map +1 -1
  217. package/dist/js/tools/metroconfig.js +10 -12
  218. package/dist/js/tools/metroconfig.js.map +1 -1
  219. package/dist/js/tools/sentryBabelTransformerUtils.d.ts.map +1 -1
  220. package/dist/js/tools/sentryBabelTransformerUtils.js +9 -10
  221. package/dist/js/tools/sentryBabelTransformerUtils.js.map +1 -1
  222. package/dist/js/tools/sentryMetroSerializer.d.ts.map +1 -1
  223. package/dist/js/tools/sentryMetroSerializer.js +6 -7
  224. package/dist/js/tools/sentryMetroSerializer.js.map +1 -1
  225. package/dist/js/tools/sentryOptionsSerializer.d.ts.map +1 -1
  226. package/dist/js/tools/sentryOptionsSerializer.js +3 -5
  227. package/dist/js/tools/sentryOptionsSerializer.js.map +1 -1
  228. package/dist/js/tools/sentryReleaseInjector.d.ts +1 -1
  229. package/dist/js/tools/sentryReleaseInjector.d.ts.map +1 -1
  230. package/dist/js/tools/sentryReleaseInjector.js.map +1 -1
  231. package/dist/js/tools/utils.d.ts.map +1 -1
  232. package/dist/js/tools/utils.js +7 -10
  233. package/dist/js/tools/utils.js.map +1 -1
  234. package/dist/js/tools/vendor/metro/countLines.d.ts.map +1 -1
  235. package/dist/js/tools/vendor/metro/utils.d.ts.map +1 -1
  236. package/dist/js/tools/vendor/metro/utils.js +5 -5
  237. package/dist/js/tools/vendor/metro/utils.js.map +1 -1
  238. package/dist/js/touchevents.d.ts.map +1 -1
  239. package/dist/js/touchevents.js +19 -19
  240. package/dist/js/touchevents.js.map +1 -1
  241. package/dist/js/tracing/expoAsset.js.map +1 -1
  242. package/dist/js/tracing/expoImage.d.ts.map +1 -1
  243. package/dist/js/tracing/expoImage.js +1 -1
  244. package/dist/js/tracing/expoImage.js.map +1 -1
  245. package/dist/js/tracing/expoRouter.d.ts.map +1 -1
  246. package/dist/js/tracing/expoRouter.js.map +1 -1
  247. package/dist/js/tracing/gesturetracing.d.ts.map +1 -1
  248. package/dist/js/tracing/gesturetracing.js.map +1 -1
  249. package/dist/js/tracing/integrations/appStart.d.ts +19 -1
  250. package/dist/js/tracing/integrations/appStart.d.ts.map +1 -1
  251. package/dist/js/tracing/integrations/appStart.js +144 -9
  252. package/dist/js/tracing/integrations/appStart.js.map +1 -1
  253. package/dist/js/tracing/integrations/nativeFrames.d.ts.map +1 -1
  254. package/dist/js/tracing/integrations/nativeFrames.js +47 -1
  255. package/dist/js/tracing/integrations/nativeFrames.js.map +1 -1
  256. package/dist/js/tracing/integrations/stalltracking.d.ts +1 -1
  257. package/dist/js/tracing/integrations/stalltracking.d.ts.map +1 -1
  258. package/dist/js/tracing/integrations/stalltracking.js +4 -2
  259. package/dist/js/tracing/integrations/stalltracking.js.map +1 -1
  260. package/dist/js/tracing/integrations/timeToDisplayIntegration.d.ts.map +1 -1
  261. package/dist/js/tracing/integrations/timeToDisplayIntegration.js +15 -15
  262. package/dist/js/tracing/integrations/timeToDisplayIntegration.js.map +1 -1
  263. package/dist/js/tracing/integrations/userInteraction.d.ts.map +1 -1
  264. package/dist/js/tracing/integrations/userInteraction.js.map +1 -1
  265. package/dist/js/tracing/onSpanEndUtils.d.ts.map +1 -1
  266. package/dist/js/tracing/onSpanEndUtils.js +43 -14
  267. package/dist/js/tracing/onSpanEndUtils.js.map +1 -1
  268. package/dist/js/tracing/reactnativenavigation.d.ts.map +1 -1
  269. package/dist/js/tracing/reactnativenavigation.js.map +1 -1
  270. package/dist/js/tracing/reactnativeprofiler.d.ts.map +1 -1
  271. package/dist/js/tracing/reactnativeprofiler.js +2 -2
  272. package/dist/js/tracing/reactnativeprofiler.js.map +1 -1
  273. package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
  274. package/dist/js/tracing/reactnativetracing.js +0 -1
  275. package/dist/js/tracing/reactnativetracing.js.map +1 -1
  276. package/dist/js/tracing/reactnavigation.d.ts +3 -0
  277. package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
  278. package/dist/js/tracing/reactnavigation.js +6 -4
  279. package/dist/js/tracing/reactnavigation.js.map +1 -1
  280. package/dist/js/tracing/span.d.ts +2 -17
  281. package/dist/js/tracing/span.d.ts.map +1 -1
  282. package/dist/js/tracing/span.js +1 -1
  283. package/dist/js/tracing/span.js.map +1 -1
  284. package/dist/js/tracing/timeToDisplayFallback.d.ts.map +1 -1
  285. package/dist/js/tracing/timetodisplay.d.ts.map +1 -1
  286. package/dist/js/tracing/timetodisplay.js +42 -19
  287. package/dist/js/tracing/timetodisplay.js.map +1 -1
  288. package/dist/js/tracing/timetodisplaynative.d.ts +1 -1
  289. package/dist/js/tracing/timetodisplaynative.d.ts.map +1 -1
  290. package/dist/js/tracing/timetodisplaynative.js +5 -4
  291. package/dist/js/tracing/timetodisplaynative.js.map +1 -1
  292. package/dist/js/tracing/types.js.map +1 -1
  293. package/dist/js/tracing/utils.d.ts.map +1 -1
  294. package/dist/js/tracing/utils.js.map +1 -1
  295. package/dist/js/transports/encodePolyfill.d.ts +1 -1
  296. package/dist/js/transports/encodePolyfill.d.ts.map +1 -1
  297. package/dist/js/transports/encodePolyfill.js.map +1 -1
  298. package/dist/js/transports/native.d.ts.map +1 -1
  299. package/dist/js/transports/native.js.map +1 -1
  300. package/dist/js/utils/AsyncExpiringMap.js.map +1 -1
  301. package/dist/js/utils/encode.js.map +1 -1
  302. package/dist/js/utils/envelope.d.ts.map +1 -1
  303. package/dist/js/utils/envelope.js.map +1 -1
  304. package/dist/js/utils/environment.d.ts.map +1 -1
  305. package/dist/js/utils/environment.js.map +1 -1
  306. package/dist/js/utils/expomodules.d.ts.map +1 -1
  307. package/dist/js/utils/expomodules.js.map +1 -1
  308. package/dist/js/utils/fill.js +1 -1
  309. package/dist/js/utils/fill.js.map +1 -1
  310. package/dist/js/utils/ignorerequirecyclelogs.js.map +1 -1
  311. package/dist/js/utils/normalize.js +2 -2
  312. package/dist/js/utils/normalize.js.map +1 -1
  313. package/dist/js/utils/outcome.js.map +1 -1
  314. package/dist/js/utils/primitiveConverter.js.map +1 -1
  315. package/dist/js/utils/release.js.map +1 -1
  316. package/dist/js/utils/rnlibraries.d.ts.map +1 -1
  317. package/dist/js/utils/rnlibraries.js +1 -7
  318. package/dist/js/utils/rnlibraries.js.map +1 -1
  319. package/dist/js/utils/safe.d.ts.map +1 -1
  320. package/dist/js/utils/safe.js.map +1 -1
  321. package/dist/js/utils/span.d.ts.map +1 -1
  322. package/dist/js/utils/span.js.map +1 -1
  323. package/dist/js/utils/worldwide.d.ts +0 -1
  324. package/dist/js/utils/worldwide.d.ts.map +1 -1
  325. package/dist/js/utils/worldwide.js.map +1 -1
  326. package/dist/js/utils/xhr.d.ts +0 -1
  327. package/dist/js/utils/xhr.d.ts.map +1 -1
  328. package/dist/js/utils/xhr.js.map +1 -1
  329. package/dist/js/vendor/base64-js/fromByteArray.js +1 -1
  330. package/dist/js/vendor/base64-js/fromByteArray.js.map +1 -1
  331. package/dist/js/vendor/buffer/utf8ToBytes.js +1 -1
  332. package/dist/js/vendor/buffer/utf8ToBytes.js.map +1 -1
  333. package/dist/js/vendor/react-native/index.d.ts.map +1 -1
  334. package/dist/js/vendor/react-native/index.js.map +1 -1
  335. package/dist/js/version.d.ts +1 -1
  336. package/dist/js/version.js +1 -1
  337. package/dist/js/version.js.map +1 -1
  338. package/dist/js/wrapper.d.ts +1 -0
  339. package/dist/js/wrapper.d.ts.map +1 -1
  340. package/dist/js/wrapper.js +20 -9
  341. package/dist/js/wrapper.js.map +1 -1
  342. package/expo-module.config.json +7 -0
  343. package/ios/RNSentry.mm +18 -1
  344. package/ios/RNSentryReplay.mm +1 -1
  345. package/ios/RNSentrySDK.m +1 -1
  346. package/ios/RNSentryStart.m +4 -1
  347. package/ios/RNSentryTimeToDisplay.m +48 -32
  348. package/ios/RNSentryVersion.m +1 -1
  349. package/ios/SentryScreenFramesWrapper.h +2 -0
  350. package/ios/SentryScreenFramesWrapper.m +35 -0
  351. package/package.json +18 -22
  352. package/plugin/build/logger.js +1 -1
  353. package/plugin/build/utils.js +2 -0
  354. package/plugin/build/withSentry.js +1 -2
  355. package/plugin/build/withSentryAndroid.js +2 -0
  356. package/plugin/build/withSentryAndroidGradlePlugin.d.ts +1 -1
  357. package/plugin/build/withSentryAndroidGradlePlugin.js +1 -1
  358. package/plugin/build/withSentryIOS.js +1 -3
  359. package/scripts/eas-build-hook.js +0 -2
  360. package/scripts/expo-upload-sourcemaps.js +0 -1
  361. package/src/js/NativeRNSentry.ts +3 -0
  362. package/src/js/RNSentryReplayMaskNativeComponent.ts +2 -3
  363. package/src/js/RNSentryReplayUnmaskNativeComponent.ts +2 -3
  364. package/ts3.8/dist/js/NativeRNSentry.d.ts +1 -0
  365. package/ts3.8/dist/js/feedback/FeedbackButton.d.ts +2 -1
  366. package/ts3.8/dist/js/feedback/{FeedbackWidget.d.ts → FeedbackForm.d.ts} +5 -5
  367. package/ts3.8/dist/js/feedback/FeedbackForm.styles.d.ts +11 -0
  368. package/ts3.8/dist/js/feedback/{FeedbackWidget.theme.d.ts → FeedbackForm.theme.d.ts} +7 -5
  369. package/{dist/js/feedback/FeedbackWidget.types.d.ts → ts3.8/dist/js/feedback/FeedbackForm.types.d.ts} +305 -299
  370. package/ts3.8/dist/js/feedback/{FeedbackWidgetManager.d.ts → FeedbackFormManager.d.ts} +12 -4
  371. package/ts3.8/dist/js/feedback/{FeedbackWidgetProvider.d.ts → FeedbackFormProvider.d.ts} +10 -10
  372. package/ts3.8/dist/js/feedback/ScreenshotButton.d.ts +2 -2
  373. package/ts3.8/dist/js/feedback/defaults.d.ts +2 -2
  374. package/ts3.8/dist/js/feedback/integration.d.ts +13 -13
  375. package/ts3.8/dist/js/feedback/lazy.d.ts +5 -0
  376. package/ts3.8/dist/js/index.d.ts +12 -3
  377. package/ts3.8/dist/js/options.d.ts +1 -1
  378. package/ts3.8/dist/js/playground/modal.d.ts +2 -2
  379. package/ts3.8/dist/js/playground/modal.styles.d.ts +100 -0
  380. package/ts3.8/dist/js/replay/CustomMask.d.ts +1 -1
  381. package/ts3.8/dist/js/replay/CustomMask.web.d.ts +1 -1
  382. package/ts3.8/dist/js/replay/networkUtils.d.ts +0 -1
  383. package/ts3.8/dist/js/sdk.d.ts +21 -0
  384. package/ts3.8/dist/js/tracing/integrations/appStart.d.ts +19 -1
  385. package/ts3.8/dist/js/tracing/integrations/stalltracking.d.ts +1 -1
  386. package/ts3.8/dist/js/tracing/reactnavigation.d.ts +3 -0
  387. package/ts3.8/dist/js/tracing/span.d.ts +2 -17
  388. package/ts3.8/dist/js/tracing/timetodisplaynative.d.ts +1 -1
  389. package/ts3.8/dist/js/transports/encodePolyfill.d.ts +1 -1
  390. package/ts3.8/dist/js/utils/worldwide.d.ts +0 -1
  391. package/ts3.8/dist/js/utils/xhr.d.ts +0 -1
  392. package/ts3.8/dist/js/version.d.ts +1 -1
  393. package/ts3.8/dist/js/wrapper.d.ts +1 -0
  394. package/dist/js/feedback/FeedbackWidget.d.ts.map +0 -1
  395. package/dist/js/feedback/FeedbackWidget.js.map +0 -1
  396. package/dist/js/feedback/FeedbackWidget.styles.d.ts +0 -11
  397. package/dist/js/feedback/FeedbackWidget.styles.d.ts.map +0 -1
  398. package/dist/js/feedback/FeedbackWidget.styles.js.map +0 -1
  399. package/dist/js/feedback/FeedbackWidget.theme.d.ts.map +0 -1
  400. package/dist/js/feedback/FeedbackWidget.theme.js.map +0 -1
  401. package/dist/js/feedback/FeedbackWidget.types.d.ts.map +0 -1
  402. package/dist/js/feedback/FeedbackWidget.types.js +0 -2
  403. package/dist/js/feedback/FeedbackWidget.types.js.map +0 -1
  404. package/dist/js/feedback/FeedbackWidgetManager.d.ts.map +0 -1
  405. package/dist/js/feedback/FeedbackWidgetManager.js.map +0 -1
  406. package/dist/js/feedback/FeedbackWidgetProvider.d.ts.map +0 -1
  407. package/dist/js/feedback/FeedbackWidgetProvider.js.map +0 -1
  408. package/ts3.8/dist/js/feedback/FeedbackWidget.styles.d.ts +0 -11
@@ -1 +1 @@
1
- {"version":3,"file":"CustomMask.js","sourceRoot":"","sources":["../../../src/js/replay/CustomMask.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,MAAM,uBAAuB,GAGzB,OAAO,CAAC,gEAAgE,CAAC,CAAC;AAE9E,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AACrD,MAAM,yBAAyB,GAAG,sBAAsB,CAAC;AAEzD,MAAM,WAAW,GAAG,CAAC,SAAiB,EAAU,EAAE,CAAC,yBAAyB,SAAS,2DAA2D,SAAS,+EAA+E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,CAAC,oCAAoC,yBAAyB,GAAG,CAAC,CAAC;QAC7E,OAAO,cAAc,CAAC;KACvB;IAED,qDAAqD;IACrD,8KAA8K;IAC9K,OAAO,uBAAuB,CAAC,GAAG,CAAC,yBAAyB,EAAE,GAAG,EAAE,CAAC,CAAC;QACnE,eAAe,EAAE,yBAAyB;KAC3C,CAAC,CAAC,CAAC;AACN,CAAC,CAAC,EAAE,CAAC;AAEL,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC","sourcesContent":["import { debug } from '@sentry/core';\nimport * as React from 'react';\nimport type { HostComponent, ViewProps } from 'react-native';\nimport { UIManager, View } from 'react-native';\nimport { isExpoGo } from '../utils/environment';\n\nconst NativeComponentRegistry: {\n get<T, C extends Record<string, unknown>>(componentName: string, createViewConfig: () => C): HostComponent<T>;\n// eslint-disable-next-line @typescript-eslint/no-var-requires\n} = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');\n\nconst MaskNativeComponentName = 'RNSentryReplayMask';\nconst UnmaskNativeComponentName = 'RNSentryReplayUnmask';\n\nconst warnMessage = (component: string): string => `[SentrySessionReplay] ${component} component is not supported on the current platform. If ${component} should be supported, please ensure that the application build is up to date.`;\n\nconst warn = (component: string): void => {\n setTimeout(() => {\n // Missing mask component could cause leaking PII, we have to ensure that the warning is visible\n // even if the app is running without debug.\n // eslint-disable-next-line no-console\n console.warn(warnMessage(component));\n }, 0);\n};\n\nconst MaskFallback = (viewProps: ViewProps): React.ReactElement => {\n warn('Mask');\n return <View {...viewProps} />;\n};\n\nconst UnmaskFallback = (viewProps: ViewProps): React.ReactElement => {\n warn('Unmask');\n return <View {...viewProps} />;\n};\n\nconst hasViewManagerConfig = (nativeComponentName: string): boolean => UIManager.hasViewManagerConfig?.(nativeComponentName);\n\nconst Mask = ((): HostComponent<ViewProps> | React.ComponentType<ViewProps> => {\n if (isExpoGo() || !hasViewManagerConfig(MaskNativeComponentName)) {\n debug.warn(`[SentrySessionReplay] Can't load ${MaskNativeComponentName}.`);\n return MaskFallback;\n }\n\n // Based on @react-native/babel-plugin-codegen output\n // https://github.com/facebook/react-native/blob/b32c6c2cc1bc566a85a883901dbf5e23b5a75b61/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js#L139\n return NativeComponentRegistry.get(MaskNativeComponentName, () => ({\n uiViewClassName: MaskNativeComponentName,\n }));\n})()\n\nconst Unmask = ((): HostComponent<ViewProps> | React.ComponentType<ViewProps> => {\n if (isExpoGo() || !hasViewManagerConfig(UnmaskNativeComponentName)) {\n debug.warn(`[SentrySessionReplay] Can't load ${UnmaskNativeComponentName}.`);\n return UnmaskFallback;\n }\n\n // Based on @react-native/babel-plugin-codegen output\n // https://github.com/facebook/react-native/blob/b32c6c2cc1bc566a85a883901dbf5e23b5a75b61/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js#L139\n return NativeComponentRegistry.get(UnmaskNativeComponentName, () => ({\n uiViewClassName: UnmaskNativeComponentName,\n }));\n})();\n\nexport { Mask, Unmask, MaskFallback, UnmaskFallback };\n"]}
1
+ {"version":3,"file":"CustomMask.js","sourceRoot":"","sources":["../../../src/js/replay/CustomMask.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,SAAS,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAE/C,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAEhD,MAAM,uBAAuB,GAEzB,OAAO,CAAC,gEAAgE,CAAC,CAAC;AAE9E,MAAM,uBAAuB,GAAG,oBAAoB,CAAC;AACrD,MAAM,yBAAyB,GAAG,sBAAsB,CAAC;AAEzD,MAAM,WAAW,GAAG,CAAC,SAAiB,EAAU,EAAE,CAChD,yBAAyB,SAAS,2DAA2D,SAAS,+EAA+E,CAAC;AAExL,MAAM,IAAI,GAAG,CAAC,SAAiB,E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CAAC,CAAC;QAC7E,OAAO,cAAc,CAAC;IACxB,CAAC;IAED,qDAAqD;IACrD,8KAA8K;IAC9K,OAAO,uBAAuB,CAAC,GAAG,CAAC,yBAAyB,EAAE,GAAG,EAAE,CAAC,CAAC;QACnE,eAAe,EAAE,yBAAyB;KAC3C,CAAC,CAAC,CAAC;AACN,CAAC,CAAC,EAAE,CAAC;AAEL,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,YAAY,EAAE,cAAc,EAAE,CAAC","sourcesContent":["import type { HostComponent, ViewProps } from 'react-native';\n\nimport { debug } from '@sentry/core';\nimport * as React from 'react';\nimport { UIManager, View } from 'react-native';\n\nimport { isExpoGo } from '../utils/environment';\n\nconst NativeComponentRegistry: {\n get<T, C extends Record<string, unknown>>(componentName: string, createViewConfig: () => C): HostComponent<T>;\n} = require('react-native/Libraries/NativeComponent/NativeComponentRegistry');\n\nconst MaskNativeComponentName = 'RNSentryReplayMask';\nconst UnmaskNativeComponentName = 'RNSentryReplayUnmask';\n\nconst warnMessage = (component: string): string =>\n `[SentrySessionReplay] ${component} component is not supported on the current platform. If ${component} should be supported, please ensure that the application build is up to date.`;\n\nconst warn = (component: string): void => {\n setTimeout(() => {\n // Missing mask component could cause leaking PII, we have to ensure that the warning is visible\n // even if the app is running without debug.\n // oxlint-disable-next-line eslint(no-console)\n console.warn(warnMessage(component));\n }, 0);\n};\n\nconst MaskFallback = (viewProps: ViewProps): React.ReactElement => {\n warn('Mask');\n return <View {...viewProps} />;\n};\n\nconst UnmaskFallback = (viewProps: ViewProps): React.ReactElement => {\n warn('Unmask');\n return <View {...viewProps} />;\n};\n\nconst hasViewManagerConfig = (nativeComponentName: string): boolean =>\n UIManager.hasViewManagerConfig?.(nativeComponentName);\n\nconst Mask = ((): HostComponent<ViewProps> | React.ComponentType<ViewProps> => {\n if (isExpoGo() || !hasViewManagerConfig(MaskNativeComponentName)) {\n debug.warn(`[SentrySessionReplay] Can't load ${MaskNativeComponentName}.`);\n return MaskFallback;\n }\n\n // Based on @react-native/babel-plugin-codegen output\n // https://github.com/facebook/react-native/blob/b32c6c2cc1bc566a85a883901dbf5e23b5a75b61/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js#L139\n return NativeComponentRegistry.get(MaskNativeComponentName, () => ({\n uiViewClassName: MaskNativeComponentName,\n }));\n})();\n\nconst Unmask = ((): HostComponent<ViewProps> | React.ComponentType<ViewProps> => {\n if (isExpoGo() || !hasViewManagerConfig(UnmaskNativeComponentName)) {\n debug.warn(`[SentrySessionReplay] Can't load ${UnmaskNativeComponentName}.`);\n return UnmaskFallback;\n }\n\n // Based on @react-native/babel-plugin-codegen output\n // https://github.com/facebook/react-native/blob/b32c6c2cc1bc566a85a883901dbf5e23b5a75b61/packages/react-native-codegen/src/generators/components/GenerateViewConfigJs.js#L139\n return NativeComponentRegistry.get(UnmaskNativeComponentName, () => ({\n uiViewClassName: UnmaskNativeComponentName,\n }));\n})();\n\nexport { Mask, Unmask, MaskFallback, UnmaskFallback };\n"]}
@@ -1,5 +1,5 @@
1
- import * as React from 'react';
2
1
  import type { ViewProps } from 'react-native';
2
+ import * as React from 'react';
3
3
  declare const Mask: (props: ViewProps) => React.ReactElement;
4
4
  declare const Unmask: (props: ViewProps) => React.ReactElement;
5
5
  export { Mask, Unmask };
@@ -1 +1 @@
1
- {"version":3,"file":"CustomMask.web.d.ts","sourceRoot":"","sources":["../../../src/js/replay/CustomMask.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAc9C,QAAA,MAAM,IAAI,UAAW,SAAS,KAAG,MAAM,YAQtC,CAAC;AAEF,QAAA,MAAM,MAAM,UAAW,SAAS,KAAG,MAAM,YAQxC,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC"}
1
+ {"version":3,"file":"CustomMask.web.d.ts","sourceRoot":"","sources":["../../../src/js/replay/CustomMask.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAE9C,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAc/B,QAAA,MAAM,IAAI,GAAI,OAAO,SAAS,KAAG,KAAK,CAAC,YAMtC,CAAC;AAEF,QAAA,MAAM,MAAM,GAAI,OAAO,SAAS,KAAG,KAAK,CAAC,YAMxC,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC"}
@@ -12,11 +12,11 @@ import { View } from 'react-native';
12
12
  // allow for easier CSS styling adjustments.
13
13
  const Mask = (props) => {
14
14
  return (React.createElement(View, Object.assign({}, props),
15
- React.createElement("div", { className: 'sentry-react-native-mask' }, props.children)));
15
+ React.createElement("div", { className: "sentry-react-native-mask" }, props.children)));
16
16
  };
17
17
  const Unmask = (props) => {
18
18
  return (React.createElement(View, Object.assign({}, props),
19
- React.createElement("div", { className: 'sentry-react-native-unmask' }, props.children)));
19
+ React.createElement("div", { className: "sentry-react-native-unmask" }, props.children)));
20
20
  };
21
21
  export { Mask, Unmask };
22
22
  //# sourceMappingURL=CustomMask.web.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"CustomMask.web.js","sourceRoot":"","sources":["../../../src/js/replay/CustomMask.web.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,+DAA+D;AAC/D,0DAA0D;AAC1D,qBAAqB;AACrB,EAAE;AACF,gEAAgE;AAChE,oJAAoJ;AACpJ,EAAE;AACF,sDAAsD;AACtD,sDAAsD;AACtD,4CAA4C;AAE5C,MAAM,IAAI,GAAG,CAAC,KAAgB,EAAsB,EAAE;IACpD,OAAO,CACL,oBAAC,IAAI,oBAAK,KAAK;QACb,6BAAK,SAAS,EAAC,0BAA0B,IACtC,KAAK,CAAC,QAAQ,CACX,CACD,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,CAAC,KAAgB,EAAsB,EAAE;IACtD,OAAO,CACL,oBAAC,IAAI,oBAAK,KAAK;QACb,6BAAK,SAAS,EAAC,4BAA4B,IACxC,KAAK,CAAC,QAAQ,CACX,CACD,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["import * as React from 'react';\nimport type { ViewProps } from 'react-native';\nimport { View } from 'react-native';\n\n// Wrapping children in a View and div can cause styling issues\n// but with the current implementation of react-native-web\n// we can't avoid it.\n//\n// <View unknown-prop /> the prop is dropped by react-native-web\n// https://github.com/necolas/react-native-web/blob/a5ba27c6226aa182979a9cff8cc23c0f5caa4d88/packages/react-native-web/src/exports/View/index.js#L47\n//\n// So we need to wrap the children in a react-dom div.\n// We are using className instead of data-attribute to\n// allow for easier CSS styling adjustments.\n\nconst Mask = (props: ViewProps): React.ReactElement => {\n return (\n <View {...props}>\n <div className='sentry-react-native-mask'>\n {props.children}\n </div>\n </View>\n );\n};\n\nconst Unmask = (props: ViewProps): React.ReactElement => {\n return (\n <View {...props}>\n <div className='sentry-react-native-unmask'>\n {props.children}\n </div>\n </View>\n );\n};\n\nexport { Mask, Unmask };\n"]}
1
+ {"version":3,"file":"CustomMask.web.js","sourceRoot":"","sources":["../../../src/js/replay/CustomMask.web.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AAEpC,+DAA+D;AAC/D,0DAA0D;AAC1D,qBAAqB;AACrB,EAAE;AACF,gEAAgE;AAChE,oJAAoJ;AACpJ,EAAE;AACF,sDAAsD;AACtD,sDAAsD;AACtD,4CAA4C;AAE5C,MAAM,IAAI,GAAG,CAAC,KAAgB,EAAsB,EAAE;IACpD,OAAO,CACL,oBAAC,IAAI,oBAAK,KAAK;QACb,6BAAK,SAAS,EAAC,0BAA0B,IAAE,KAAK,CAAC,QAAQ,CAAO,CAC3D,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,MAAM,GAAG,CAAC,KAAgB,EAAsB,EAAE;IACtD,OAAO,CACL,oBAAC,IAAI,oBAAK,KAAK;QACb,6BAAK,SAAS,EAAC,4BAA4B,IAAE,KAAK,CAAC,QAAQ,CAAO,CAC7D,CACR,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,IAAI,EAAE,MAAM,EAAE,CAAC","sourcesContent":["import type { ViewProps } from 'react-native';\n\nimport * as React from 'react';\nimport { View } from 'react-native';\n\n// Wrapping children in a View and div can cause styling issues\n// but with the current implementation of react-native-web\n// we can't avoid it.\n//\n// <View unknown-prop /> the prop is dropped by react-native-web\n// https://github.com/necolas/react-native-web/blob/a5ba27c6226aa182979a9cff8cc23c0f5caa4d88/packages/react-native-web/src/exports/View/index.js#L47\n//\n// So we need to wrap the children in a react-dom div.\n// We are using className instead of data-attribute to\n// allow for easier CSS styling adjustments.\n\nconst Mask = (props: ViewProps): React.ReactElement => {\n return (\n <View {...props}>\n <div className=\"sentry-react-native-mask\">{props.children}</div>\n </View>\n );\n};\n\nconst Unmask = (props: ViewProps): React.ReactElement => {\n return (\n <View {...props}>\n <div className=\"sentry-react-native-unmask\">{props.children}</div>\n </View>\n );\n};\n\nexport { Mask, Unmask };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"browserReplay.d.ts","sourceRoot":"","sources":["../../../src/js/replay/browserReplay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAEhD;;;;GAIG;AACH,KAAK,mBAAmB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;AAKnE;;;;GAIG;AACH,QAAA,MAAM,wBAAwB,aAAa,mBAAmB,KAAQ,MAYrE,CAAC;AAgBF,OAAO,EAAE,wBAAwB,EAAE,CAAC"}
1
+ {"version":3,"file":"browserReplay.d.ts","sourceRoot":"","sources":["../../../src/js/replay/browserReplay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAElD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,mBAAmB,CAAC;AAIhD;;;;GAIG;AACH,KAAK,mBAAmB,GAAG,UAAU,CAAC,OAAO,iBAAiB,CAAC,CAAC,CAAC,CAAC,CAAC;AAKnE;;;;GAIG;AACH,QAAA,MAAM,wBAAwB,GAAI,UAAS,mBAAwB,KAAG,MAYrE,CAAC;AAcF,OAAO,EAAE,wBAAwB,EAAE,CAAC"}
@@ -18,9 +18,7 @@ const browserReplayIntegration = (options = {}) => {
18
18
  const browserReplayIntegrationNoop = () => {
19
19
  return {
20
20
  name: INTEGRATION_NAME,
21
- // eslint-disable-next-line @typescript-eslint/no-empty-function
22
21
  start: () => { },
23
- // eslint-disable-next-line @typescript-eslint/no-empty-function
24
22
  startBuffering: () => { },
25
23
  stop: () => Promise.resolve(),
26
24
  flush: () => Promise.resolve(),
@@ -1 +1 @@
1
- {"version":3,"file":"browserReplay.js","sourceRoot":"","sources":["../../../src/js/replay/browserReplay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAClD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAU9C,gJAAgJ;AAChJ,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAElC;;;;GAIG;AACH,MAAM,wBAAwB,GAAG,CAAC,UAA+B,EAAE,EAAU,EAAE;IAC7E,IAAI,MAAM,EAAE,EAAE;QACZ,qEAAqE;QACrE,yBAAyB;QACzB,OAAO,4BAA4B,EAAE,CAAC;KACvC;IAED,OAAO,iBAAiB,iCACnB,OAAO,KACV,IAAI,EAAE,CAAC,2BAA2B,EAAE,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,EAC5D,MAAM,EAAE,CAAC,kEAAkE,EAAE,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,IACvG,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,4BAA4B,GAAG,GAAW,EAAE;IAChD,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,gEAAgE;QAChE,KAAK,EAAE,GAAG,EAAE,GAAE,CAAC;QACf,gEAAgE;QAChE,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;QACxB,IAAI,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE;QAC7B,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE;QAC9B,WAAW,EAAE,GAAG,EAAE,CAAC,SAAS;QAC5B,gBAAgB,EAAE,GAAG,EAAE,CAAC,SAAS;KAClC,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,wBAAwB,EAAE,CAAC","sourcesContent":["import { replayIntegration } from '@sentry/react';\nimport { notWeb } from '../utils/environment';\nimport type { Replay } from './replayInterface';\n\n/**\n * ReplayConfiguration for browser replay integration.\n *\n * See the [Configuration documentation](https://docs.sentry.io/platforms/javascript/session-replay/configuration/) for more information.\n */\ntype ReplayConfiguration = Parameters<typeof replayIntegration>[0];\n\n// https://github.com/getsentry/sentry-javascript/blob/e00cb04f1bbf494067cd8475d392266ba296987a/packages/replay-internal/src/integration.ts#L109\nconst INTEGRATION_NAME = 'Replay';\n\n/**\n * Browser Replay integration for React Native.\n *\n * See the [Browser Replay documentation](https://docs.sentry.io/platforms/javascript/session-replay/) for more information.\n */\nconst browserReplayIntegration = (options: ReplayConfiguration = {}): Replay => {\n if (notWeb()) {\n // This is required because `replayIntegration` browser check doesn't\n // work for React Native.\n return browserReplayIntegrationNoop();\n }\n\n return replayIntegration({\n ...options,\n mask: ['.sentry-react-native-mask', ...(options.mask || [])],\n unmask: ['.sentry-react-native-unmask:not(.sentry-react-native-mask *) > *', ...(options.unmask || [])],\n });\n};\n\nconst browserReplayIntegrationNoop = (): Replay => {\n return {\n name: INTEGRATION_NAME,\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n start: () => {},\n // eslint-disable-next-line @typescript-eslint/no-empty-function\n startBuffering: () => {},\n stop: () => Promise.resolve(),\n flush: () => Promise.resolve(),\n getReplayId: () => undefined,\n getRecordingMode: () => undefined,\n };\n};\n\nexport { browserReplayIntegration };\n"]}
1
+ {"version":3,"file":"browserReplay.js","sourceRoot":"","sources":["../../../src/js/replay/browserReplay.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAIlD,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAS9C,gJAAgJ;AAChJ,MAAM,gBAAgB,GAAG,QAAQ,CAAC;AAElC;;;;GAIG;AACH,MAAM,wBAAwB,GAAG,CAAC,UAA+B,EAAE,EAAU,EAAE;IAC7E,IAAI,MAAM,EAAE,EAAE,CAAC;QACb,qEAAqE;QACrE,yBAAyB;QACzB,OAAO,4BAA4B,EAAE,CAAC;IACxC,CAAC;IAED,OAAO,iBAAiB,iCACnB,OAAO,KACV,IAAI,EAAE,CAAC,2BAA2B,EAAE,GAAG,CAAC,OAAO,CAAC,IAAI,IAAI,EAAE,CAAC,CAAC,EAC5D,MAAM,EAAE,CAAC,kEAAkE,EAAE,GAAG,CAAC,OAAO,CAAC,MAAM,IAAI,EAAE,CAAC,CAAC,IACvG,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,4BAA4B,GAAG,GAAW,EAAE;IAChD,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,KAAK,EAAE,GAAG,EAAE,GAAE,CAAC;QACf,cAAc,EAAE,GAAG,EAAE,GAAE,CAAC;QACxB,IAAI,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE;QAC7B,KAAK,EAAE,GAAG,EAAE,CAAC,OAAO,CAAC,OAAO,EAAE;QAC9B,WAAW,EAAE,GAAG,EAAE,CAAC,SAAS;QAC5B,gBAAgB,EAAE,GAAG,EAAE,CAAC,SAAS;KAClC,CAAC;AACJ,CAAC,CAAC;AAEF,OAAO,EAAE,wBAAwB,EAAE,CAAC","sourcesContent":["import { replayIntegration } from '@sentry/react';\n\nimport type { Replay } from './replayInterface';\n\nimport { notWeb } from '../utils/environment';\n\n/**\n * ReplayConfiguration for browser replay integration.\n *\n * See the [Configuration documentation](https://docs.sentry.io/platforms/javascript/session-replay/configuration/) for more information.\n */\ntype ReplayConfiguration = Parameters<typeof replayIntegration>[0];\n\n// https://github.com/getsentry/sentry-javascript/blob/e00cb04f1bbf494067cd8475d392266ba296987a/packages/replay-internal/src/integration.ts#L109\nconst INTEGRATION_NAME = 'Replay';\n\n/**\n * Browser Replay integration for React Native.\n *\n * See the [Browser Replay documentation](https://docs.sentry.io/platforms/javascript/session-replay/) for more information.\n */\nconst browserReplayIntegration = (options: ReplayConfiguration = {}): Replay => {\n if (notWeb()) {\n // This is required because `replayIntegration` browser check doesn't\n // work for React Native.\n return browserReplayIntegrationNoop();\n }\n\n return replayIntegration({\n ...options,\n mask: ['.sentry-react-native-mask', ...(options.mask || [])],\n unmask: ['.sentry-react-native-unmask:not(.sentry-react-native-mask *) > *', ...(options.unmask || [])],\n });\n};\n\nconst browserReplayIntegrationNoop = (): Replay => {\n return {\n name: INTEGRATION_NAME,\n start: () => {},\n startBuffering: () => {},\n stop: () => Promise.resolve(),\n flush: () => Promise.resolve(),\n getReplayId: () => undefined,\n getRecordingMode: () => undefined,\n };\n};\n\nexport { browserReplayIntegration };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"mobilereplay.d.ts","sourceRoot":"","sources":["../../../src/js/replay/mobilereplay.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAkC,KAAK,EAAE,SAAS,EAAE,WAAW,EAAU,MAAM,cAAc,CAAC;AAQ1G,eAAO,MAAM,8BAA8B,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ACH,MAAM,MAAM,kBAAkB,GAAG,QAAQ,GAAG,WAAW,CAAC;AAExD,MAAM,WAAW,mBAAmB;IAClC;;;;OAIG;IACH,WAAW,CAAC,EAAE,OAAO,CAAC;IAEtB;;;;OAIG;IACH,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB;;;;;OAKG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;;;;;;OAUG;IACH,8BAA8B,CAAC,EAAE,OAAO,CAAC;IAEzC;;;;;;;;;;;;OAYG;IACH,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAE/B;;;;;;;;;;;OAWG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAAC;IAElC;;;;;;;;;;;OAWG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE/B;;;;;;;;;;;OAWG;IACH,mBAAmB,CAAC,EAAE,MAAM,EAAE,CAAC;IAE/B;;;;;;;;;;OAUG;IACH,kBAAkB,CAAC,EAAE,kBAAkB,CAAC;IAExC;;;;;;;;OAQG;IACH,mBAAmB,CAAC,EAAE,CAAC,KAAK,EAAE,KAAK,EAAE,IAAI,EAAE,SAAS,KAAK,OAAO,CAAC;CAClE;AAyBD,KAAK,uBAAuB,GAAG,WAAW,GAAG;IAC3C,OAAO,EAAE,mBAAmB,CAAC;IAC7B,WAAW,EAAE,MAAM,MAAM,GAAG,IAAI,CAAC;CAClC,CAAC;AAEF;;;;;;;;;;;;;;;GAeG;AACH,eAAO,MAAM,uBAAuB,GAAI,cAAa,mBAAoC,KAAG,uBA+J3F,CAAC"}
@@ -74,8 +74,8 @@ export const mobileReplayIntegration = (initOptions = defaultOptions) => {
74
74
  return nativeReplayId;
75
75
  }
76
76
  function processEvent(event, hint) {
77
- var _a;
78
77
  return __awaiter(this, void 0, void 0, function* () {
78
+ var _a;
79
79
  const hasException = ((_a = event.exception) === null || _a === void 0 ? void 0 : _a.values) && event.exception.values.length > 0;
80
80
  if (!hasException) {
81
81
  // Event is not an error, will not capture replay
@@ -145,6 +145,26 @@ export const mobileReplayIntegration = (initOptions = defaultOptions) => {
145
145
  }
146
146
  });
147
147
  client.on('beforeAddBreadcrumb', enrichXhrBreadcrumbsForMobileReplay);
148
+ // Wrap beforeSend to run processEvent after user's beforeSend
149
+ const clientOptions = client.getOptions();
150
+ const originalBeforeSend = clientOptions.beforeSend;
151
+ clientOptions.beforeSend = (event, hint) => __awaiter(this, void 0, void 0, function* () {
152
+ let result = event;
153
+ if (originalBeforeSend) {
154
+ result = yield originalBeforeSend(event, hint);
155
+ if (result === null) {
156
+ // Event was dropped by user's beforeSend, don't capture replay
157
+ return null;
158
+ }
159
+ }
160
+ try {
161
+ return yield processEvent(result, hint);
162
+ }
163
+ catch (error) {
164
+ debug.error(`[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} Failed to process event for replay`, error);
165
+ return result;
166
+ }
167
+ });
148
168
  }
149
169
  function getReplayId() {
150
170
  return getCachedReplayId();
@@ -154,7 +174,6 @@ export const mobileReplayIntegration = (initOptions = defaultOptions) => {
154
174
  return {
155
175
  name: MOBILE_REPLAY_INTEGRATION_NAME,
156
176
  setup,
157
- processEvent,
158
177
  options: options,
159
178
  getReplayId: getReplayId,
160
179
  };
@@ -1 +1 @@
1
- {"version":3,"file":"mobilereplay.js","sourceRoot":"","sources":["../../../src/js/replay/mobilereplay.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,mCAAmC,EAAE,MAAM,YAAY,CAAC;AAEjE,MAAM,CAAC,MAAM,8BAA8B,GAAG,cAAc,CAAC;AAgI7D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AG,MAAM,CAAC,UAAU,IAAI,EAAE,CAAC;gBAC5C,MAAM,CAAC,UAAU,CAAC,SAAS,GAAG,eAAe,CAAC;aAC/C;QACH,CAAC,CAAC,CAAC;QAEH,MAAM,CAAC,EAAE,CAAC,qBAAqB,EAAE,mCAAmC,CAAC,CAAC;IACxE,CAAC;IAED,SAAS,WAAW;QAClB,OAAO,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAED,iHAAiH;IACjH,8GAA8G;IAC9G,OAAO;QACL,IAAI,EAAE,8BAA8B;QACpC,KAAK;QACL,YAAY;QACZ,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,WAAW;KACzB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,2BAA2B,GAAG,GAA4B,EAAE;IAChE,OAAO;QACL,IAAI,EAAE,8BAA8B;QACpC,OAAO,EAAE,cAAc;QACvB,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,uCAAuC;KACjE,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import type { Client, DynamicSamplingContext, Event, EventHint, Integration, Metric } from '@sentry/core';\nimport { debug } from '@sentry/core';\nimport { isHardCrash } from '../misc';\nimport { hasHooks } from '../utils/clientutils';\nimport { isExpoGo, notMobileOs } from '../utils/environment';\nimport { NATIVE } from '../wrapper';\nimport { enrichXhrBreadcrumbsForMobileReplay } from './xhrUtils';\n\nexport const MOBILE_REPLAY_INTEGRATION_NAME = 'MobileReplay';\n\n/**\n * Screenshot strategy type for Android Session Replay.\n *\n * - `'canvas'`: Canvas-based screenshot strategy. This strategy does **not** support any masking options, it always masks text and images. Use this if your application has strict PII requirements.\n * - `'pixelCopy'`: Pixel copy screenshot strategy (default). Supports all masking options.\n */\nexport type ScreenshotStrategy = 'canvas' | 'pixelCopy';\n\nexport interface MobileReplayOptions {\n /**\n * Mask all text in recordings\n *\n * @default true\n */\n maskAllText?: boolean;\n\n /**\n * Mask all images in recordings\n *\n * @default true\n */\n maskAllImages?: boolean;\n\n /**\n * Mask all vector graphics in recordings\n * Supports `react-native-svg`\n *\n * @default true\n */\n maskAllVectors?: boolean;\n\n /**\n * Enables the up to 5x faster experimental view renderer used by the Session Replay integration on iOS.\n *\n * Enabling this flag will reduce the amount of time it takes to render each frame of the session replay on the main thread, therefore reducing\n * interruptions and visual lag.\n *\n * - Experiment: This is an experimental feature and is therefore disabled by default.\n *\n * @deprecated Use `enableViewRendererV2` instead.\n * @platform ios\n */\n enableExperimentalViewRenderer?: boolean;\n\n /**\n * Enables up to 5x faster new view renderer used by the Session Replay integration on iOS.\n *\n * Enabling this flag will reduce the amount of time it takes to render each frame of the session replay on the main thread, therefore reducing\n * interruptions and visual lag. [Our benchmarks](https://github.com/getsentry/sentry-cocoa/pull/4940) have shown a significant improvement of\n * **up to 4-5x faster rendering** (reducing `~160ms` to `~36ms` per frame) on older devices.\n *\n * - Experiment: In case you are noticing issues with the new view renderer, please report the issue on [GitHub](https://github.com/getsentry/sentry-cocoa).\n * Eventually, we will remove this feature flag and use the new view renderer by default.\n *\n * @default true\n * @platform ios\n */\n enableViewRendererV2?: boolean;\n\n /**\n * Enables up to 5x faster but incomplete view rendering used by the Session Replay integration on iOS.\n *\n * Enabling this flag will reduce the amount of time it takes to render each frame of the session replay on the main thread, therefore reducing\n * interruptions and visual lag.\n *\n * - Note: This flag can only be used together with `enableExperimentalViewRenderer` with up to 20% faster render times.\n * - Experiment: This is an experimental feature and is therefore disabled by default.\n *\n * @default false\n * @platform ios\n */\n enableFastViewRendering?: boolean;\n\n /**\n * Array of view class names to include in subtree traversal during session replay and screenshot capture on iOS.\n *\n * Only views that are instances of these classes (or subclasses) will be traversed.\n * This helps prevent crashes when traversing problematic view hierarchies by allowing you to explicitly include only safe view classes.\n *\n * If both `includedViewClasses` and `excludedViewClasses` are set, `excludedViewClasses` takes precedence:\n * views matching excluded classes won't be traversed even if they match an included class.\n *\n * @default undefined\n * @platform ios\n */\n includedViewClasses?: string[];\n\n /**\n * Array of view class names to exclude from subtree traversal during session replay and screenshot capture on iOS.\n *\n * Views of these classes (or subclasses) will be skipped entirely, including all their children.\n * This helps prevent crashes when traversing problematic view hierarchies by allowing you to explicitly exclude problematic view classes.\n *\n * If both `includedViewClasses` and `excludedViewClasses` are set, `excludedViewClasses` takes precedence:\n * views matching excluded classes won't be traversed even if they match an included class.\n *\n * @default undefined\n * @platform ios\n */\n excludedViewClasses?: string[];\n\n /**\n * Sets the screenshot strategy used by the Session Replay integration on Android.\n *\n * If your application has strict PII requirements we recommend using `'canvas'`.\n * This strategy does **not** support any masking options, it always masks text and images.\n *\n * - Experiment: In case you are noticing issues with the canvas screenshot strategy, please report the issue on [GitHub](https://github.com/getsentry/sentry-java).\n *\n * @default 'pixelCopy'\n * @platform android\n */\n screenshotStrategy?: ScreenshotStrategy;\n\n /**\n * Callback to determine if a replay should be captured for a specific error.\n * When this callback returns `false`, no replay will be captured for the error.\n * This callback is only called when an error occurs and `replaysOnErrorSampleRate` is set.\n *\n * @param event The error event\n * @param hint Additional event information\n * @returns `false` to skip capturing a replay for this error, `true` or `undefined` to proceed with sampling\n */\n beforeErrorSampling?: (event: Event, hint: EventHint) => boolean;\n}\n\nconst defaultOptions: MobileReplayOptions = {\n maskAllText: true,\n maskAllImages: true,\n maskAllVectors: true,\n enableExperimentalViewRenderer: false,\n enableViewRendererV2: true,\n enableFastViewRendering: false,\n screenshotStrategy: 'pixelCopy',\n};\n\nfunction mergeOptions(initOptions: Partial<MobileReplayOptions>): MobileReplayOptions {\n const merged = {\n ...defaultOptions,\n ...initOptions,\n };\n\n if (initOptions.enableViewRendererV2 === undefined && initOptions.enableExperimentalViewRenderer !== undefined) {\n merged.enableViewRendererV2 = initOptions.enableExperimentalViewRenderer;\n }\n\n return merged;\n}\n\ntype MobileReplayIntegration = Integration & {\n options: MobileReplayOptions;\n getReplayId: () => string | null;\n};\n\n/**\n * The Mobile Replay Integration, let's you adjust the default mobile replay options.\n * To be passed to `Sentry.init` with `replaysOnErrorSampleRate` or `replaysSessionSampleRate`.\n *\n * ```javascript\n * Sentry.init({\n * replaysOnErrorSampleRate: 1.0,\n * replaysSessionSampleRate: 1.0,\n * integrations: [mobileReplayIntegration({\n * // Adjust the default options\n * })],\n * });\n * ```\n *\n * @experimental\n */\nexport const mobileReplayIntegration = (initOptions: MobileReplayOptions = defaultOptions): MobileReplayIntegration => {\n if (isExpoGo()) {\n debug.warn(\n `[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} is not supported in Expo Go. Use EAS Build or \\`expo prebuild\\` to enable it.`,\n );\n }\n if (notMobileOs()) {\n debug.warn(`[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} is not supported on this platform.`);\n }\n\n if (isExpoGo() || notMobileOs()) {\n return mobileReplayIntegrationNoop();\n }\n\n const options = mergeOptions(initOptions);\n\n // Cache the replay ID in JavaScript to avoid excessive bridge calls\n // This will be updated when we know the replay ID changes (e.g., after captureReplay)\n let cachedReplayId: string | null = null;\n\n function updateCachedReplayId(replayId: string | null): void {\n cachedReplayId = replayId;\n }\n\n function getCachedReplayId(): string | null {\n if (cachedReplayId !== null) {\n return cachedReplayId;\n }\n const nativeReplayId = NATIVE.getCurrentReplayId();\n if (nativeReplayId) {\n cachedReplayId = nativeReplayId;\n }\n return nativeReplayId;\n }\n\n async function processEvent(event: Event, hint: EventHint): Promise<Event> {\n const hasException = event.exception?.values && event.exception.values.length > 0;\n if (!hasException) {\n // Event is not an error, will not capture replay\n return event;\n }\n\n // Check if beforeErrorSampling callback filters out this error\n if (initOptions.beforeErrorSampling) {\n try {\n if (initOptions.beforeErrorSampling(event, hint) === false) {\n debug.log(\n `[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} not sent; beforeErrorSampling conditions not met for event ${event.event_id}.`,\n );\n return event;\n }\n } catch (error) {\n debug.error(\n `[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} beforeErrorSampling callback threw an error, proceeding with replay capture`,\n error,\n );\n // Continue with replay capture if callback throws\n }\n }\n\n const replayId = await NATIVE.captureReplay(isHardCrash(event));\n if (replayId) {\n updateCachedReplayId(replayId);\n debug.log(\n `[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} Captured recording replay ${replayId} for event ${event.event_id}.`,\n );\n // Add replay_id to error event contexts to link replays to events/traces\n event.contexts = event.contexts || {};\n event.contexts.replay = {\n ...event.contexts.replay,\n replay_id: replayId,\n };\n } else {\n // Check if there's an ongoing recording and update cache if found\n const recordingReplayId = NATIVE.getCurrentReplayId();\n if (recordingReplayId) {\n updateCachedReplayId(recordingReplayId);\n debug.log(\n `[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} assign already recording replay ${recordingReplayId} for event ${event.event_id}.`,\n );\n // Add replay_id to error event contexts to link replays to events/traces\n event.contexts = event.contexts || {};\n event.contexts.replay = {\n ...event.contexts.replay,\n replay_id: recordingReplayId,\n };\n } else {\n updateCachedReplayId(null);\n debug.log(`[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} not sampled for event ${event.event_id}.`);\n }\n }\n\n return event;\n }\n\n function setup(client: Client): void {\n if (!hasHooks(client)) {\n return;\n }\n\n // Initialize the cached replay ID on setup\n cachedReplayId = NATIVE.getCurrentReplayId();\n\n client.on('createDsc', (dsc: DynamicSamplingContext) => {\n if (dsc.replay_id) {\n return;\n }\n\n // Use cached replay ID to avoid bridge calls\n const currentReplayId = getCachedReplayId();\n if (currentReplayId) {\n dsc.replay_id = currentReplayId;\n }\n });\n\n client.on('processMetric', (metric: Metric) => {\n // Add replay_id to metric attributes to link metrics to replays\n const currentReplayId = getCachedReplayId();\n if (currentReplayId) {\n metric.attributes = metric.attributes || {};\n metric.attributes.replay_id = currentReplayId;\n }\n });\n\n client.on('beforeAddBreadcrumb', enrichXhrBreadcrumbsForMobileReplay);\n }\n\n function getReplayId(): string | null {\n return getCachedReplayId();\n }\n\n // TODO: When adding manual API, ensure overlap with the web replay so users can use the same API interchangeably\n // https://github.com/getsentry/sentry-javascript/blob/develop/packages/replay-internal/src/integration.ts#L45\n return {\n name: MOBILE_REPLAY_INTEGRATION_NAME,\n setup,\n processEvent,\n options: options,\n getReplayId: getReplayId,\n };\n};\n\nconst mobileReplayIntegrationNoop = (): MobileReplayIntegration => {\n return {\n name: MOBILE_REPLAY_INTEGRATION_NAME,\n options: defaultOptions,\n getReplayId: () => null, // Mock implementation for noop version\n };\n};\n"]}
1
+ {"version":3,"file":"mobilereplay.js","sourceRoot":"","sources":["../../../src/js/replay/mobilereplay.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,WAAW,EAAE,MAAM,SAAS,CAAC;AACtC,OAAO,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AAChD,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AAC7D,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AACpC,OAAO,EAAE,mCAAmC,EAAE,MAAM,YAAY,CAAC;AAEjE,MAAM,CAAC,MAAM,8BAA8B,GAAG,cAAc,CAAC;AAgI7D,MAAM,cAAc,GAAwB;IAC1C,WAAW,EAAE,IAAI;IACjB,aAAa,EAAE,IAAI;IACnB,cAAc,EAAE,IAAI;IACpB,8BAA8B,EAAE,KAAK;IACrC,oBAAoB,EAAE,IAAI;IAC1B,uBAAuB,EAAE,KAAK;IAC9B,kBAAkB,EAAE,WAAW;CAChC,CAAC;AAEF,SAAS,YAAY,CAAC,WAAyC;IAC7D,MAAM,MAAM,mCACP,cAAc,GACd,WAAW,CACf,CAAC;IAEF,IAAI,WAAW,CAAC,oBAAoB,KAAK,SAAS,IAAI,WAAW,CAAC,8BAA8B,KAAK,SAAS,EAAE,CAAC;QAC/G,MAAM,CAAC,oBAAoB,GAAG,WAAW,CAAC,8BAA8B,CAAC;IAC3E,CAAC;IAED,OAAO,MAAM,CAAC;AAChB,CAAC;AAOD;;;;;;;;;;;;;;;GAeG;AACH,MAAM,CAAC,MAAM,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C;QACpD,aAAa,CAAC,UAAU,GAAG,CAAO,KAAiB,EAAE,IAAe,EAA8B,EAAE;YAClG,IAAI,MAAM,GAAsB,KAAK,CAAC;YACtC,IAAI,kBAAkB,EAAE,CAAC;gBACvB,MAAM,GAAG,MAAM,kBAAkB,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;gBAC/C,IAAI,MAAM,KAAK,IAAI,EAAE,CAAC;oBACpB,+DAA+D;oBAC/D,OAAO,IAAI,CAAC;gBACd,CAAC;YACH,CAAC;YACD,IAAI,CAAC;gBACH,OAAO,MAAM,YAAY,CAAC,MAAM,EAAE,IAAI,CAAC,CAAC;YAC1C,CAAC;YAAC,OAAO,KAAK,EAAE,CAAC;gBACf,KAAK,CAAC,KAAK,CAAC,YAAY,8BAA8B,qCAAqC,EAAE,KAAK,CAAC,CAAC;gBACpG,OAAO,MAAM,CAAC;YAChB,CAAC;QACH,CAAC,CAAA,CAAC;IACJ,CAAC;IAED,SAAS,WAAW;QAClB,OAAO,iBAAiB,EAAE,CAAC;IAC7B,CAAC;IAED,iHAAiH;IACjH,8GAA8G;IAC9G,OAAO;QACL,IAAI,EAAE,8BAA8B;QACpC,KAAK;QACL,OAAO,EAAE,OAAO;QAChB,WAAW,EAAE,WAAW;KACzB,CAAC;AACJ,CAAC,CAAC;AAEF,MAAM,2BAA2B,GAAG,GAA4B,EAAE;IAChE,OAAO;QACL,IAAI,EAAE,8BAA8B;QACpC,OAAO,EAAE,cAAc;QACvB,WAAW,EAAE,GAAG,EAAE,CAAC,IAAI,EAAE,uCAAuC;KACjE,CAAC;AACJ,CAAC,CAAC","sourcesContent":["import type { Client, DynamicSamplingContext, ErrorEvent, Event, EventHint, Integration, Metric } from '@sentry/core';\n\nimport { debug } from '@sentry/core';\n\nimport { isHardCrash } from '../misc';\nimport { hasHooks } from '../utils/clientutils';\nimport { isExpoGo, notMobileOs } from '../utils/environment';\nimport { NATIVE } from '../wrapper';\nimport { enrichXhrBreadcrumbsForMobileReplay } from './xhrUtils';\n\nexport const MOBILE_REPLAY_INTEGRATION_NAME = 'MobileReplay';\n\n/**\n * Screenshot strategy type for Android Session Replay.\n *\n * - `'canvas'`: Canvas-based screenshot strategy. This strategy does **not** support any masking options, it always masks text and images. Use this if your application has strict PII requirements.\n * - `'pixelCopy'`: Pixel copy screenshot strategy (default). Supports all masking options.\n */\nexport type ScreenshotStrategy = 'canvas' | 'pixelCopy';\n\nexport interface MobileReplayOptions {\n /**\n * Mask all text in recordings\n *\n * @default true\n */\n maskAllText?: boolean;\n\n /**\n * Mask all images in recordings\n *\n * @default true\n */\n maskAllImages?: boolean;\n\n /**\n * Mask all vector graphics in recordings\n * Supports `react-native-svg`\n *\n * @default true\n */\n maskAllVectors?: boolean;\n\n /**\n * Enables the up to 5x faster experimental view renderer used by the Session Replay integration on iOS.\n *\n * Enabling this flag will reduce the amount of time it takes to render each frame of the session replay on the main thread, therefore reducing\n * interruptions and visual lag.\n *\n * - Experiment: This is an experimental feature and is therefore disabled by default.\n *\n * @deprecated Use `enableViewRendererV2` instead.\n * @platform ios\n */\n enableExperimentalViewRenderer?: boolean;\n\n /**\n * Enables up to 5x faster new view renderer used by the Session Replay integration on iOS.\n *\n * Enabling this flag will reduce the amount of time it takes to render each frame of the session replay on the main thread, therefore reducing\n * interruptions and visual lag. [Our benchmarks](https://github.com/getsentry/sentry-cocoa/pull/4940) have shown a significant improvement of\n * **up to 4-5x faster rendering** (reducing `~160ms` to `~36ms` per frame) on older devices.\n *\n * - Experiment: In case you are noticing issues with the new view renderer, please report the issue on [GitHub](https://github.com/getsentry/sentry-cocoa).\n * Eventually, we will remove this feature flag and use the new view renderer by default.\n *\n * @default true\n * @platform ios\n */\n enableViewRendererV2?: boolean;\n\n /**\n * Enables up to 5x faster but incomplete view rendering used by the Session Replay integration on iOS.\n *\n * Enabling this flag will reduce the amount of time it takes to render each frame of the session replay on the main thread, therefore reducing\n * interruptions and visual lag.\n *\n * - Note: This flag can only be used together with `enableExperimentalViewRenderer` with up to 20% faster render times.\n * - Experiment: This is an experimental feature and is therefore disabled by default.\n *\n * @default false\n * @platform ios\n */\n enableFastViewRendering?: boolean;\n\n /**\n * Array of view class names to include in subtree traversal during session replay and screenshot capture on iOS.\n *\n * Only views that are instances of these classes (or subclasses) will be traversed.\n * This helps prevent crashes when traversing problematic view hierarchies by allowing you to explicitly include only safe view classes.\n *\n * If both `includedViewClasses` and `excludedViewClasses` are set, `excludedViewClasses` takes precedence:\n * views matching excluded classes won't be traversed even if they match an included class.\n *\n * @default undefined\n * @platform ios\n */\n includedViewClasses?: string[];\n\n /**\n * Array of view class names to exclude from subtree traversal during session replay and screenshot capture on iOS.\n *\n * Views of these classes (or subclasses) will be skipped entirely, including all their children.\n * This helps prevent crashes when traversing problematic view hierarchies by allowing you to explicitly exclude problematic view classes.\n *\n * If both `includedViewClasses` and `excludedViewClasses` are set, `excludedViewClasses` takes precedence:\n * views matching excluded classes won't be traversed even if they match an included class.\n *\n * @default undefined\n * @platform ios\n */\n excludedViewClasses?: string[];\n\n /**\n * Sets the screenshot strategy used by the Session Replay integration on Android.\n *\n * If your application has strict PII requirements we recommend using `'canvas'`.\n * This strategy does **not** support any masking options, it always masks text and images.\n *\n * - Experiment: In case you are noticing issues with the canvas screenshot strategy, please report the issue on [GitHub](https://github.com/getsentry/sentry-java).\n *\n * @default 'pixelCopy'\n * @platform android\n */\n screenshotStrategy?: ScreenshotStrategy;\n\n /**\n * Callback to determine if a replay should be captured for a specific error.\n * When this callback returns `false`, no replay will be captured for the error.\n * This callback is only called when an error occurs and `replaysOnErrorSampleRate` is set.\n *\n * @param event The error event\n * @param hint Additional event information\n * @returns `false` to skip capturing a replay for this error, `true` or `undefined` to proceed with sampling\n */\n beforeErrorSampling?: (event: Event, hint: EventHint) => boolean;\n}\n\nconst defaultOptions: MobileReplayOptions = {\n maskAllText: true,\n maskAllImages: true,\n maskAllVectors: true,\n enableExperimentalViewRenderer: false,\n enableViewRendererV2: true,\n enableFastViewRendering: false,\n screenshotStrategy: 'pixelCopy',\n};\n\nfunction mergeOptions(initOptions: Partial<MobileReplayOptions>): MobileReplayOptions {\n const merged = {\n ...defaultOptions,\n ...initOptions,\n };\n\n if (initOptions.enableViewRendererV2 === undefined && initOptions.enableExperimentalViewRenderer !== undefined) {\n merged.enableViewRendererV2 = initOptions.enableExperimentalViewRenderer;\n }\n\n return merged;\n}\n\ntype MobileReplayIntegration = Integration & {\n options: MobileReplayOptions;\n getReplayId: () => string | null;\n};\n\n/**\n * The Mobile Replay Integration, let's you adjust the default mobile replay options.\n * To be passed to `Sentry.init` with `replaysOnErrorSampleRate` or `replaysSessionSampleRate`.\n *\n * ```javascript\n * Sentry.init({\n * replaysOnErrorSampleRate: 1.0,\n * replaysSessionSampleRate: 1.0,\n * integrations: [mobileReplayIntegration({\n * // Adjust the default options\n * })],\n * });\n * ```\n *\n * @experimental\n */\nexport const mobileReplayIntegration = (initOptions: MobileReplayOptions = defaultOptions): MobileReplayIntegration => {\n if (isExpoGo()) {\n debug.warn(\n `[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} is not supported in Expo Go. Use EAS Build or \\`expo prebuild\\` to enable it.`,\n );\n }\n if (notMobileOs()) {\n debug.warn(`[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} is not supported on this platform.`);\n }\n\n if (isExpoGo() || notMobileOs()) {\n return mobileReplayIntegrationNoop();\n }\n\n const options = mergeOptions(initOptions);\n\n // Cache the replay ID in JavaScript to avoid excessive bridge calls\n // This will be updated when we know the replay ID changes (e.g., after captureReplay)\n let cachedReplayId: string | null = null;\n\n function updateCachedReplayId(replayId: string | null): void {\n cachedReplayId = replayId;\n }\n\n function getCachedReplayId(): string | null {\n if (cachedReplayId !== null) {\n return cachedReplayId;\n }\n const nativeReplayId = NATIVE.getCurrentReplayId();\n if (nativeReplayId) {\n cachedReplayId = nativeReplayId;\n }\n return nativeReplayId;\n }\n\n async function processEvent(event: ErrorEvent, hint: EventHint): Promise<ErrorEvent> {\n const hasException = event.exception?.values && event.exception.values.length > 0;\n if (!hasException) {\n // Event is not an error, will not capture replay\n return event;\n }\n\n // Check if beforeErrorSampling callback filters out this error\n if (initOptions.beforeErrorSampling) {\n try {\n if (initOptions.beforeErrorSampling(event, hint) === false) {\n debug.log(\n `[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} not sent; beforeErrorSampling conditions not met for event ${event.event_id}.`,\n );\n return event;\n }\n } catch (error) {\n debug.error(\n `[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} beforeErrorSampling callback threw an error, proceeding with replay capture`,\n error,\n );\n // Continue with replay capture if callback throws\n }\n }\n\n const replayId = await NATIVE.captureReplay(isHardCrash(event));\n if (replayId) {\n updateCachedReplayId(replayId);\n debug.log(\n `[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} Captured recording replay ${replayId} for event ${event.event_id}.`,\n );\n // Add replay_id to error event contexts to link replays to events/traces\n event.contexts = event.contexts || {};\n event.contexts.replay = {\n ...event.contexts.replay,\n replay_id: replayId,\n };\n } else {\n // Check if there's an ongoing recording and update cache if found\n const recordingReplayId = NATIVE.getCurrentReplayId();\n if (recordingReplayId) {\n updateCachedReplayId(recordingReplayId);\n debug.log(\n `[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} assign already recording replay ${recordingReplayId} for event ${event.event_id}.`,\n );\n // Add replay_id to error event contexts to link replays to events/traces\n event.contexts = event.contexts || {};\n event.contexts.replay = {\n ...event.contexts.replay,\n replay_id: recordingReplayId,\n };\n } else {\n updateCachedReplayId(null);\n debug.log(`[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} not sampled for event ${event.event_id}.`);\n }\n }\n\n return event;\n }\n\n function setup(client: Client): void {\n if (!hasHooks(client)) {\n return;\n }\n\n // Initialize the cached replay ID on setup\n cachedReplayId = NATIVE.getCurrentReplayId();\n\n client.on('createDsc', (dsc: DynamicSamplingContext) => {\n if (dsc.replay_id) {\n return;\n }\n\n // Use cached replay ID to avoid bridge calls\n const currentReplayId = getCachedReplayId();\n if (currentReplayId) {\n dsc.replay_id = currentReplayId;\n }\n });\n\n client.on('processMetric', (metric: Metric) => {\n // Add replay_id to metric attributes to link metrics to replays\n const currentReplayId = getCachedReplayId();\n if (currentReplayId) {\n metric.attributes = metric.attributes || {};\n metric.attributes.replay_id = currentReplayId;\n }\n });\n\n client.on('beforeAddBreadcrumb', enrichXhrBreadcrumbsForMobileReplay);\n\n // Wrap beforeSend to run processEvent after user's beforeSend\n const clientOptions = client.getOptions();\n const originalBeforeSend = clientOptions.beforeSend;\n clientOptions.beforeSend = async (event: ErrorEvent, hint: EventHint): Promise<ErrorEvent | null> => {\n let result: ErrorEvent | null = event;\n if (originalBeforeSend) {\n result = await originalBeforeSend(event, hint);\n if (result === null) {\n // Event was dropped by user's beforeSend, don't capture replay\n return null;\n }\n }\n try {\n return await processEvent(result, hint);\n } catch (error) {\n debug.error(`[Sentry] ${MOBILE_REPLAY_INTEGRATION_NAME} Failed to process event for replay`, error);\n return result;\n }\n };\n }\n\n function getReplayId(): string | null {\n return getCachedReplayId();\n }\n\n // TODO: When adding manual API, ensure overlap with the web replay so users can use the same API interchangeably\n // https://github.com/getsentry/sentry-javascript/blob/develop/packages/replay-internal/src/integration.ts#L45\n return {\n name: MOBILE_REPLAY_INTEGRATION_NAME,\n setup,\n options: options,\n getReplayId: getReplayId,\n };\n};\n\nconst mobileReplayIntegrationNoop = (): MobileReplayIntegration => {\n return {\n name: MOBILE_REPLAY_INTEGRATION_NAME,\n options: defaultOptions,\n getReplayId: () => null, // Mock implementation for noop version\n };\n};\n"]}
@@ -1,4 +1,3 @@
1
- /// <reference types="react-native" />
2
1
  /** Convert a Content-Length header to number/undefined. */
3
2
  export declare function parseContentLengthHeader(header: string | null | undefined): number | undefined;
4
3
  export type RequestBody = null | Blob | FormData | URLSearchParams | string | ArrayBuffer | undefined;
@@ -1 +1 @@
1
- {"version":3,"file":"networkUtils.d.ts","sourceRoot":"","sources":["../../../src/js/replay/networkUtils.ts"],"names":[],"mappings":";AAEA,2DAA2D;AAC3D,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAO9F;AAED,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,QAAQ,GAAG,eAAe,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;AAEtG,8BAA8B;AAC9B,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,CAiCjE"}
1
+ {"version":3,"file":"networkUtils.d.ts","sourceRoot":"","sources":["../../../src/js/replay/networkUtils.ts"],"names":[],"mappings":"AAEA,2DAA2D;AAC3D,wBAAgB,wBAAwB,CAAC,MAAM,EAAE,MAAM,GAAG,IAAI,GAAG,SAAS,GAAG,MAAM,GAAG,SAAS,CAO9F;AAED,MAAM,MAAM,WAAW,GAAG,IAAI,GAAG,IAAI,GAAG,QAAQ,GAAG,eAAe,GAAG,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;AAEtG,8BAA8B;AAC9B,wBAAgB,WAAW,CAAC,IAAI,EAAE,WAAW,GAAG,MAAM,GAAG,SAAS,CAiCjE"}
@@ -1 +1 @@
1
- {"version":3,"file":"networkUtils.js","sourceRoot":"","sources":["../../../src/js/replay/networkUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,2DAA2D;AAC3D,MAAM,UAAU,wBAAwB,CAAC,MAAiC;IACxE,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,SAAS,CAAC;KAClB;IAED,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAClC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;AACxC,CAAC;AAID,8BAA8B;AAC9B,MAAM,UAAU,WAAW,CAAC,IAAiB;IAC3C,IAAI,CAAC,IAAI,EAAE;QACT,OAAO,SAAS,CAAC;KAClB;IAED,IAAI;QACF,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE;YAC5B,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;SAChC;QAED,IAAI,IAAI,YAAY,eAAe,EAAE;YACnC,OAAO,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC;SAC3C;QAED,IAAI,IAAI,YAAY,QAAQ,EAAE;YAC5B,MAAM,WAAW,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;YAC7C,OAAO,UAAU,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC;SACvC;QAED,IAAI,IAAI,YAAY,IAAI,EAAE;YACxB,OAAO,IAAI,CAAC,IAAI,CAAC;SAClB;QAED,IAAI,IAAI,YAAY,WAAW,EAAE;YAC/B,OAAO,IAAI,CAAC,UAAU,CAAC;SACxB;QAED,6DAA6D;KAC9D;IAAC,WAAM;QACN,wBAAwB;KACzB;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,kBAAkB,CAAC,QAAkB;IAC5C,2DAA2D;IAC3D,iFAAiF;IACjF,2LAA2L;IAC3L,OAAO,IAAI,eAAe,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC;AAClD,CAAC","sourcesContent":["import { encodeUTF8 } from '../utils/encode';\n\n/** Convert a Content-Length header to number/undefined. */\nexport function parseContentLengthHeader(header: string | null | undefined): number | undefined {\n if (!header) {\n return undefined;\n }\n\n const size = parseInt(header, 10);\n return isNaN(size) ? undefined : size;\n}\n\nexport type RequestBody = null | Blob | FormData | URLSearchParams | string | ArrayBuffer | undefined;\n\n/** Get the size of a body. */\nexport function getBodySize(body: RequestBody): number | undefined {\n if (!body) {\n return undefined;\n }\n\n try {\n if (typeof body === 'string') {\n return encodeUTF8(body).length;\n }\n\n if (body instanceof URLSearchParams) {\n return encodeUTF8(body.toString()).length;\n }\n\n if (body instanceof FormData) {\n const formDataStr = _serializeFormData(body);\n return encodeUTF8(formDataStr).length;\n }\n\n if (body instanceof Blob) {\n return body.size;\n }\n\n if (body instanceof ArrayBuffer) {\n return body.byteLength;\n }\n\n // Currently unhandled types: ArrayBufferView, ReadableStream\n } catch {\n // just return undefined\n }\n\n return undefined;\n}\n\nfunction _serializeFormData(formData: FormData): string {\n // This is a bit simplified, but gives us a decent estimate\n // This converts e.g. { name: 'Anne Smith', age: 13 } to 'name=Anne+Smith&age=13'\n // @ts-expect-error passing FormData to URLSearchParams won't correctly serialize `File` entries, which is fine for this use-case. See https://github.com/microsoft/TypeScript/issues/30584\n return new URLSearchParams(formData).toString();\n}\n"]}
1
+ {"version":3,"file":"networkUtils.js","sourceRoot":"","sources":["../../../src/js/replay/networkUtils.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAE7C,2DAA2D;AAC3D,MAAM,UAAU,wBAAwB,CAAC,MAAiC;IACxE,IAAI,CAAC,MAAM,EAAE,CAAC;QACZ,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,MAAM,IAAI,GAAG,QAAQ,CAAC,MAAM,EAAE,EAAE,CAAC,CAAC;IAClC,OAAO,KAAK,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS,CAAC,CAAC,CAAC,IAAI,CAAC;AACxC,CAAC;AAID,8BAA8B;AAC9B,MAAM,UAAU,WAAW,CAAC,IAAiB;IAC3C,IAAI,CAAC,IAAI,EAAE,CAAC;QACV,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAI,CAAC;QACH,IAAI,OAAO,IAAI,KAAK,QAAQ,EAAE,CAAC;YAC7B,OAAO,UAAU,CAAC,IAAI,CAAC,CAAC,MAAM,CAAC;QACjC,CAAC;QAED,IAAI,IAAI,YAAY,eAAe,EAAE,CAAC;YACpC,OAAO,UAAU,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,CAAC,MAAM,CAAC;QAC5C,CAAC;QAED,IAAI,IAAI,YAAY,QAAQ,EAAE,CAAC;YAC7B,MAAM,WAAW,GAAG,kBAAkB,CAAC,IAAI,CAAC,CAAC;YAC7C,OAAO,UAAU,CAAC,WAAW,CAAC,CAAC,MAAM,CAAC;QACxC,CAAC;QAED,IAAI,IAAI,YAAY,IAAI,EAAE,CAAC;YACzB,OAAO,IAAI,CAAC,IAAI,CAAC;QACnB,CAAC;QAED,IAAI,IAAI,YAAY,WAAW,EAAE,CAAC;YAChC,OAAO,IAAI,CAAC,UAAU,CAAC;QACzB,CAAC;QAED,6DAA6D;IAC/D,CAAC;IAAC,WAAM,CAAC;QACP,wBAAwB;IAC1B,CAAC;IAED,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAS,kBAAkB,CAAC,QAAkB;IAC5C,2DAA2D;IAC3D,iFAAiF;IACjF,2LAA2L;IAC3L,OAAO,IAAI,eAAe,CAAC,QAAQ,CAAC,CAAC,QAAQ,EAAE,CAAC;AAClD,CAAC","sourcesContent":["import { encodeUTF8 } from '../utils/encode';\n\n/** Convert a Content-Length header to number/undefined. */\nexport function parseContentLengthHeader(header: string | null | undefined): number | undefined {\n if (!header) {\n return undefined;\n }\n\n const size = parseInt(header, 10);\n return isNaN(size) ? undefined : size;\n}\n\nexport type RequestBody = null | Blob | FormData | URLSearchParams | string | ArrayBuffer | undefined;\n\n/** Get the size of a body. */\nexport function getBodySize(body: RequestBody): number | undefined {\n if (!body) {\n return undefined;\n }\n\n try {\n if (typeof body === 'string') {\n return encodeUTF8(body).length;\n }\n\n if (body instanceof URLSearchParams) {\n return encodeUTF8(body.toString()).length;\n }\n\n if (body instanceof FormData) {\n const formDataStr = _serializeFormData(body);\n return encodeUTF8(formDataStr).length;\n }\n\n if (body instanceof Blob) {\n return body.size;\n }\n\n if (body instanceof ArrayBuffer) {\n return body.byteLength;\n }\n\n // Currently unhandled types: ArrayBufferView, ReadableStream\n } catch {\n // just return undefined\n }\n\n return undefined;\n}\n\nfunction _serializeFormData(formData: FormData): string {\n // This is a bit simplified, but gives us a decent estimate\n // This converts e.g. { name: 'Anne Smith', age: 13 } to 'name=Anne+Smith&age=13'\n // @ts-expect-error passing FormData to URLSearchParams won't correctly serialize `File` entries, which is fine for this use-case. See https://github.com/microsoft/TypeScript/issues/30584\n return new URLSearchParams(formData).toString();\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"xhrUtils.d.ts","sourceRoot":"","sources":["../../../src/js/replay/xhrUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAkD,MAAM,cAAc,CAAC;AAK/G;;GAEG;AACH,wBAAgB,mCAAmC,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,cAAc,GAAG,SAAS,GAAG,IAAI,CAyBlH"}
1
+ {"version":3,"file":"xhrUtils.d.ts","sourceRoot":"","sources":["../../../src/js/replay/xhrUtils.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,cAAc,EAAkD,MAAM,cAAc,CAAC;AAQ/G;;GAEG;AACH,wBAAgB,mCAAmC,CAAC,UAAU,EAAE,UAAU,EAAE,IAAI,EAAE,cAAc,GAAG,SAAS,GAAG,IAAI,CAyBlH"}
@@ -1 +1 @@
1
- {"version":3,"file":"xhrUtils.js","sourceRoot":"","sources":["../../../src/js/replay/xhrUtils.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAEvE;;GAEG;AACH,MAAM,UAAU,mCAAmC,CAAC,UAAsB,EAAE,IAAgC;IAC1G,IAAI,UAAU,CAAC,QAAQ,KAAK,KAAK,IAAI,CAAC,IAAI,EAAE;QAC1C,OAAO;KACR;IAED,MAAM,OAAO,GAAG,IAAwB,CAAC;IACzC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE;QAChB,OAAO;KACR;IAED,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACvB,MAAM,EAAE,cAAc,GAAG,GAAG,EAAE,YAAY,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;IAEzE,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IACnC,MAAM,OAAO,GAAG,GAAG,CAAC,iBAAiB,CAAC,gBAAgB,CAAC;QACrD,CAAC,CAAC,wBAAwB,CAAC,GAAG,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;QACnE,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC;IAEjD,UAAU,CAAC,IAAI,GAAG,iBAAiB,iBACjC,eAAe,EAAE,cAAc,EAC/B,aAAa,EAAE,YAAY,EAC3B,iBAAiB,EAAE,OAAO,EAC1B,kBAAkB,EAAE,OAAO,IACxB,UAAU,CAAC,IAAI,EAClB,CAAC;AACL,CAAC;AAOD,SAAS,YAAY,CACnB,IAAgC,EAChC,YAA4C;IAE5C,IAAI;QACF,MAAM,OAAO,GAAG,YAAY,KAAK,MAAM,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC1G,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC;KAC7B;IAAC,WAAM;QACN,OAAO,SAAS,CAAC;KAClB;AACH,CAAC","sourcesContent":["import type { Breadcrumb, BreadcrumbHint, SentryWrappedXMLHttpRequest, XhrBreadcrumbHint } from '@sentry/core';\nimport { dropUndefinedKeys } from '@sentry/core';\nimport type { RequestBody } from './networkUtils';\nimport { getBodySize, parseContentLengthHeader } from './networkUtils';\n\n/**\n * Enrich an XHR breadcrumb with additional data for Mobile Replay network tab.\n */\nexport function enrichXhrBreadcrumbsForMobileReplay(breadcrumb: Breadcrumb, hint: BreadcrumbHint | undefined): void {\n if (breadcrumb.category !== 'xhr' || !hint) {\n return;\n }\n\n const xhrHint = hint as Partial<XhrHint>;\n if (!xhrHint.xhr) {\n return;\n }\n\n const now = Date.now();\n const { startTimestamp = now, endTimestamp = now, input, xhr } = xhrHint;\n\n const reqSize = getBodySize(input);\n const resSize = xhr.getResponseHeader('content-length')\n ? parseContentLengthHeader(xhr.getResponseHeader('content-length'))\n : _getBodySize(xhr.response, xhr.responseType);\n\n breadcrumb.data = dropUndefinedKeys({\n start_timestamp: startTimestamp,\n end_timestamp: endTimestamp,\n request_body_size: reqSize,\n response_body_size: resSize,\n ...breadcrumb.data,\n });\n}\n\ntype XhrHint = XhrBreadcrumbHint & {\n xhr: XMLHttpRequest & SentryWrappedXMLHttpRequest;\n input?: RequestBody;\n};\n\nfunction _getBodySize(\n body: XMLHttpRequest['response'],\n responseType: XMLHttpRequest['responseType'],\n): number | undefined {\n try {\n const bodyStr = responseType === 'json' && body && typeof body === 'object' ? JSON.stringify(body) : body;\n return getBodySize(bodyStr);\n } catch {\n return undefined;\n }\n}\n"]}
1
+ {"version":3,"file":"xhrUtils.js","sourceRoot":"","sources":["../../../src/js/replay/xhrUtils.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,iBAAiB,EAAE,MAAM,cAAc,CAAC;AAIjD,OAAO,EAAE,WAAW,EAAE,wBAAwB,EAAE,MAAM,gBAAgB,CAAC;AAEvE;;GAEG;AACH,MAAM,UAAU,mCAAmC,CAAC,UAAsB,EAAE,IAAgC;IAC1G,IAAI,UAAU,CAAC,QAAQ,KAAK,KAAK,IAAI,CAAC,IAAI,EAAE,CAAC;QAC3C,OAAO;IACT,CAAC;IAED,MAAM,OAAO,GAAG,IAAwB,CAAC;IACzC,IAAI,CAAC,OAAO,CAAC,GAAG,EAAE,CAAC;QACjB,OAAO;IACT,CAAC;IAED,MAAM,GAAG,GAAG,IAAI,CAAC,GAAG,EAAE,CAAC;IACvB,MAAM,EAAE,cAAc,GAAG,GAAG,EAAE,YAAY,GAAG,GAAG,EAAE,KAAK,EAAE,GAAG,EAAE,GAAG,OAAO,CAAC;IAEzE,MAAM,OAAO,GAAG,WAAW,CAAC,KAAK,CAAC,CAAC;IACnC,MAAM,OAAO,GAAG,GAAG,CAAC,iBAAiB,CAAC,gBAAgB,CAAC;QACrD,CAAC,CAAC,wBAAwB,CAAC,GAAG,CAAC,iBAAiB,CAAC,gBAAgB,CAAC,CAAC;QACnE,CAAC,CAAC,YAAY,CAAC,GAAG,CAAC,QAAQ,EAAE,GAAG,CAAC,YAAY,CAAC,CAAC;IAEjD,UAAU,CAAC,IAAI,GAAG,iBAAiB,iBACjC,eAAe,EAAE,cAAc,EAC/B,aAAa,EAAE,YAAY,EAC3B,iBAAiB,EAAE,OAAO,EAC1B,kBAAkB,EAAE,OAAO,IACxB,UAAU,CAAC,IAAI,EAClB,CAAC;AACL,CAAC;AAOD,SAAS,YAAY,CACnB,IAAgC,EAChC,YAA4C;IAE5C,IAAI,CAAC;QACH,MAAM,OAAO,GAAG,YAAY,KAAK,MAAM,IAAI,IAAI,IAAI,OAAO,IAAI,KAAK,QAAQ,CAAC,CAAC,CAAC,IAAI,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,CAAC,IAAI,CAAC;QAC1G,OAAO,WAAW,CAAC,OAAO,CAAC,CAAC;IAC9B,CAAC;IAAC,WAAM,CAAC;QACP,OAAO,SAAS,CAAC;IACnB,CAAC;AACH,CAAC","sourcesContent":["import type { Breadcrumb, BreadcrumbHint, SentryWrappedXMLHttpRequest, XhrBreadcrumbHint } from '@sentry/core';\n\nimport { dropUndefinedKeys } from '@sentry/core';\n\nimport type { RequestBody } from './networkUtils';\n\nimport { getBodySize, parseContentLengthHeader } from './networkUtils';\n\n/**\n * Enrich an XHR breadcrumb with additional data for Mobile Replay network tab.\n */\nexport function enrichXhrBreadcrumbsForMobileReplay(breadcrumb: Breadcrumb, hint: BreadcrumbHint | undefined): void {\n if (breadcrumb.category !== 'xhr' || !hint) {\n return;\n }\n\n const xhrHint = hint as Partial<XhrHint>;\n if (!xhrHint.xhr) {\n return;\n }\n\n const now = Date.now();\n const { startTimestamp = now, endTimestamp = now, input, xhr } = xhrHint;\n\n const reqSize = getBodySize(input);\n const resSize = xhr.getResponseHeader('content-length')\n ? parseContentLengthHeader(xhr.getResponseHeader('content-length'))\n : _getBodySize(xhr.response, xhr.responseType);\n\n breadcrumb.data = dropUndefinedKeys({\n start_timestamp: startTimestamp,\n end_timestamp: endTimestamp,\n request_body_size: reqSize,\n response_body_size: resSize,\n ...breadcrumb.data,\n });\n}\n\ntype XhrHint = XhrBreadcrumbHint & {\n xhr: XMLHttpRequest & SentryWrappedXMLHttpRequest;\n input?: RequestBody;\n};\n\nfunction _getBodySize(\n body: XMLHttpRequest['response'],\n responseType: XMLHttpRequest['responseType'],\n): number | undefined {\n try {\n const bodyStr = responseType === 'json' && body && typeof body === 'object' ? JSON.stringify(body) : body;\n return getBodySize(bodyStr);\n } catch {\n return undefined;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"scopeSync.d.ts","sourceRoot":"","sources":["../../src/js/scopeSync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,KAAK,EAAE,MAAM,cAAc,CAAC;AActD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CA6FrD"}
1
+ {"version":3,"file":"scopeSync.d.ts","sourceRoot":"","sources":["../../src/js/scopeSync.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAc,KAAK,EAAE,MAAM,cAAc,CAAC;AAgBtD;;GAEG;AACH,wBAAgB,kBAAkB,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,CA6FrD"}
@@ -58,7 +58,7 @@ export function enableSyncToNative(scope) {
58
58
  NATIVE.clearBreadcrumbs();
59
59
  return original.call(scope);
60
60
  });
61
- // eslint-disable-next-line @typescript-eslint/no-explicit-any
61
+ // oxlint-disable-next-line typescript-eslint(no-explicit-any)
62
62
  fillTyped(scope, 'setContext', original => (key, context) => {
63
63
  NATIVE.setContext(key, context);
64
64
  return original.call(scope, key, context);
@@ -1 +1 @@
1
- {"version":3,"file":"scopeSync.js","sourceRoot":"","sources":["../../src/js/scopeSync.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AACvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC;;;GAGG;AACH,MAAM,iBAAiB,GAAG,IAAI,OAAO,EAAe,CAAC;AAErD;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAY;IAC7C,IAAI,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE;QAChC,OAAO;KACR;IACD,iBAAiB,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAEnC,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,EAAS,EAAE;QACtD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACrB,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,KAAK,EAAS,EAAE;QAC3D,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC;QACrD,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE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AO,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,KAAK,EAAE,eAAe,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,UAAmC,EAAS,EAAE;QAC3F,6BAA6B;QAC7B,KAAK,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;QACvD,iCAAiC;QACjC,wEAAwE;QACxE,2CAA2C;QAC3C,kCAAkC;QAClC,+FAA+F;QAC/F,kCAAkC;QAClC,KAAK;QACL,MAAM;QACN,EAAE;QACF,gDAAgD;QAChD,yCAAyC;QACzC,IAAI;QACJ,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { Breadcrumb, Scope } from '@sentry/core';\nimport { debug } from '@sentry/core';\nimport { logger } from '@sentry/react';\nimport { DEFAULT_BREADCRUMB_LEVEL } from './breadcrumb';\nimport { fillTyped } from './utils/fill';\nimport { convertToNormalizedObject } from './utils/normalize';\nimport { NATIVE } from './wrapper';\n\n/**\n * This WeakMap is used to keep track of which scopes have been synced to the native SDKs.\n * This ensures that we don't double sync the same scope.\n */\nconst syncedToNativeMap = new WeakMap<Scope, true>();\n\n/**\n * Hooks into the scope set methods and sync new data added to the given scope with the native SDKs.\n */\nexport function enableSyncToNative(scope: Scope): void {\n if (syncedToNativeMap.has(scope)) {\n return;\n }\n syncedToNativeMap.set(scope, true);\n\n fillTyped(scope, 'setUser', original => (user): Scope => {\n NATIVE.setUser(user);\n return original.call(scope, user);\n });\n\n fillTyped(scope, 'setTag', original => (key, value): Scope => {\n NATIVE.setTag(key, NATIVE.primitiveProcessor(value));\n return original.call(scope, key, value);\n });\n\n fillTyped(scope, 'setTags', original => (tags): Scope => {\n // As native only has setTag, we just loop through each tag key.\n Object.keys(tags).forEach(key => {\n NATIVE.setTag(key, NATIVE.primitiveProcessor(tags[key]));\n });\n return original.call(scope, tags);\n });\n\n fillTyped(scope, 'setExtras', original => (extras): Scope => {\n Object.keys(extras).forEach(key => {\n NATIVE.setExtra(key, extras[key]);\n });\n return original.call(scope, extras);\n });\n\n fillTyped(scope, 'setExtra', original => (key, value): Scope => {\n NATIVE.setExtra(key, value);\n return original.call(scope, key, value);\n });\n\n fillTyped(scope, 'addBreadcrumb', original => (breadcrumb, maxBreadcrumbs): Scope => {\n const mergedBreadcrumb: Breadcrumb = {\n ...breadcrumb,\n level: breadcrumb.level || DEFAULT_BREADCRUMB_LEVEL,\n data: breadcrumb.data ? convertToNormalizedObject(breadcrumb.data) : undefined,\n };\n\n original.call(scope, mergedBreadcrumb, maxBreadcrumbs);\n\n const finalBreadcrumb = scope.getLastBreadcrumb();\n if (finalBreadcrumb) {\n NATIVE.addBreadcrumb(finalBreadcrumb);\n } else {\n logger.warn('[ScopeSync] Last created breadcrumb is undefined. Skipping sync to native.');\n }\n\n return scope;\n });\n\n fillTyped(scope, 'clearBreadcrumbs', original => (): Scope => {\n NATIVE.clearBreadcrumbs();\n return original.call(scope);\n });\n\n // eslint-disable-next-line @typescript-eslint/no-explicit-any\n fillTyped(scope, 'setContext', original => (key: string, context: { [key: string]: any } | null): Scope => {\n NATIVE.setContext(key, context);\n return original.call(scope, key, context);\n });\n\n fillTyped(scope, 'setAttribute', original => (key: string, value: unknown): Scope => {\n debug.warn('This feature is currently not supported.');\n // Only sync primitive types\n // Native layer still not supported\n // if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n // NATIVE.setAttribute(key, value);\n // }\n return original.call(scope, key, value);\n });\n\n fillTyped(scope, 'setAttributes', original => (attributes: Record<string, unknown>): Scope => {\n // Native layer not supported\n debug.warn('This feature is currently not supported.');\n // Filter to only primitive types\n // const primitiveAttrs: Record<string, string | number | boolean> = {};\n // Object.keys(attributes).forEach(key => {\n // const value = attributes[key];\n // if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n // primitiveAttrs[key] = value;\n // }\n // });\n //\n // if (Object.keys(primitiveAttrs).length > 0) {\n // NATIVE.setAttributes(primitiveAttrs);\n // }\n return original.call(scope, attributes);\n });\n}\n"]}
1
+ {"version":3,"file":"scopeSync.js","sourceRoot":"","sources":["../../src/js/scopeSync.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AACxD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,yBAAyB,EAAE,MAAM,mBAAmB,CAAC;AAC9D,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC;;;GAGG;AACH,MAAM,iBAAiB,GAAG,IAAI,OAAO,EAAe,CAAC;AAErD;;GAEG;AACH,MAAM,UAAU,kBAAkB,CAAC,KAAY;IAC7C,IAAI,iBAAiB,CAAC,GAAG,CAAC,KAAK,CAAC,EAAE,CAAC;QACjC,OAAO;IACT,CAAC;IACD,iBAAiB,CAAC,GAAG,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IAEnC,SAAS,CAAC,KAAK,EAAE,SAAS,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,IAAI,EAAS,EAAE;QACtD,MAAM,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QACrB,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,IAAI,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,KAAK,EAAE,QAAQ,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,GAAG,EAAE,KAAK,EAAS,EAAE;QAC3D,MAAM,CAAC,MAAM,CAAC,GAAG,EAAE,MAAM,CAAC,kBAAkB,CAAC,KAAK,CAAC,CAAC,CAAC;QACrD,OAAO,QAAQ,CAAC,IAAI,C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8F;QAC9F,oCAAoC;QACpC,IAAI;QACJ,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,GAAG,EAAE,KAAK,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;IAEH,SAAS,CAAC,KAAK,EAAE,eAAe,EAAE,QAAQ,CAAC,EAAE,CAAC,CAAC,UAAmC,EAAS,EAAE;QAC3F,6BAA6B;QAC7B,KAAK,CAAC,IAAI,CAAC,0CAA0C,CAAC,CAAC;QACvD,iCAAiC;QACjC,wEAAwE;QACxE,2CAA2C;QAC3C,kCAAkC;QAClC,+FAA+F;QAC/F,kCAAkC;QAClC,KAAK;QACL,MAAM;QACN,EAAE;QACF,gDAAgD;QAChD,yCAAyC;QACzC,IAAI;QACJ,OAAO,QAAQ,CAAC,IAAI,CAAC,KAAK,EAAE,UAAU,CAAC,CAAC;IAC1C,CAAC,CAAC,CAAC;AACL,CAAC","sourcesContent":["import type { Breadcrumb, Scope } from '@sentry/core';\n\nimport { debug } from '@sentry/core';\nimport { logger } from '@sentry/react';\n\nimport { DEFAULT_BREADCRUMB_LEVEL } from './breadcrumb';\nimport { fillTyped } from './utils/fill';\nimport { convertToNormalizedObject } from './utils/normalize';\nimport { NATIVE } from './wrapper';\n\n/**\n * This WeakMap is used to keep track of which scopes have been synced to the native SDKs.\n * This ensures that we don't double sync the same scope.\n */\nconst syncedToNativeMap = new WeakMap<Scope, true>();\n\n/**\n * Hooks into the scope set methods and sync new data added to the given scope with the native SDKs.\n */\nexport function enableSyncToNative(scope: Scope): void {\n if (syncedToNativeMap.has(scope)) {\n return;\n }\n syncedToNativeMap.set(scope, true);\n\n fillTyped(scope, 'setUser', original => (user): Scope => {\n NATIVE.setUser(user);\n return original.call(scope, user);\n });\n\n fillTyped(scope, 'setTag', original => (key, value): Scope => {\n NATIVE.setTag(key, NATIVE.primitiveProcessor(value));\n return original.call(scope, key, value);\n });\n\n fillTyped(scope, 'setTags', original => (tags): Scope => {\n // As native only has setTag, we just loop through each tag key.\n Object.keys(tags).forEach(key => {\n NATIVE.setTag(key, NATIVE.primitiveProcessor(tags[key]));\n });\n return original.call(scope, tags);\n });\n\n fillTyped(scope, 'setExtras', original => (extras): Scope => {\n Object.keys(extras).forEach(key => {\n NATIVE.setExtra(key, extras[key]);\n });\n return original.call(scope, extras);\n });\n\n fillTyped(scope, 'setExtra', original => (key, value): Scope => {\n NATIVE.setExtra(key, value);\n return original.call(scope, key, value);\n });\n\n fillTyped(scope, 'addBreadcrumb', original => (breadcrumb, maxBreadcrumbs): Scope => {\n const mergedBreadcrumb: Breadcrumb = {\n ...breadcrumb,\n level: breadcrumb.level || DEFAULT_BREADCRUMB_LEVEL,\n data: breadcrumb.data ? convertToNormalizedObject(breadcrumb.data) : undefined,\n };\n\n original.call(scope, mergedBreadcrumb, maxBreadcrumbs);\n\n const finalBreadcrumb = scope.getLastBreadcrumb();\n if (finalBreadcrumb) {\n NATIVE.addBreadcrumb(finalBreadcrumb);\n } else {\n logger.warn('[ScopeSync] Last created breadcrumb is undefined. Skipping sync to native.');\n }\n\n return scope;\n });\n\n fillTyped(scope, 'clearBreadcrumbs', original => (): Scope => {\n NATIVE.clearBreadcrumbs();\n return original.call(scope);\n });\n\n // oxlint-disable-next-line typescript-eslint(no-explicit-any)\n fillTyped(scope, 'setContext', original => (key: string, context: { [key: string]: any } | null): Scope => {\n NATIVE.setContext(key, context);\n return original.call(scope, key, context);\n });\n\n fillTyped(scope, 'setAttribute', original => (key: string, value: unknown): Scope => {\n debug.warn('This feature is currently not supported.');\n // Only sync primitive types\n // Native layer still not supported\n // if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n // NATIVE.setAttribute(key, value);\n // }\n return original.call(scope, key, value);\n });\n\n fillTyped(scope, 'setAttributes', original => (attributes: Record<string, unknown>): Scope => {\n // Native layer not supported\n debug.warn('This feature is currently not supported.');\n // Filter to only primitive types\n // const primitiveAttrs: Record<string, string | number | boolean> = {};\n // Object.keys(attributes).forEach(key => {\n // const value = attributes[key];\n // if (typeof value === 'string' || typeof value === 'number' || typeof value === 'boolean') {\n // primitiveAttrs[key] = value;\n // }\n // });\n //\n // if (Object.keys(primitiveAttrs).length > 0) {\n // NATIVE.setAttributes(primitiveAttrs);\n // }\n return original.call(scope, attributes);\n });\n}\n"]}
package/dist/js/sdk.d.ts CHANGED
@@ -14,6 +14,27 @@ export declare function wrap<P extends Record<string, unknown>>(RootComponent: R
14
14
  * Use this only for testing purposes.
15
15
  */
16
16
  export declare function nativeCrash(): void;
17
+ /**
18
+ * Signals that the application has finished loading and is ready for user interaction.
19
+ *
20
+ * Call this when your app is truly ready — after async initialization, data loading,
21
+ * splash screen dismissal, auth session restore, etc. This marks the end of the app start span,
22
+ * giving you a more accurate measurement of perceived startup time.
23
+ *
24
+ * If not called, the SDK falls back to the root component mount time (via `Sentry.wrap()`)
25
+ * or JS bundle execution start.
26
+ *
27
+ * @experimental This API is subject to change in future versions.
28
+ *
29
+ * @example
30
+ * ```ts
31
+ * await loadRemoteConfig();
32
+ * await restoreSession();
33
+ * SplashScreen.hide();
34
+ * Sentry.appLoaded();
35
+ * ```
36
+ */
37
+ export declare function appLoaded(): void;
17
38
  /**
18
39
  * Flushes all pending events in the queue to disk.
19
40
  * Use this before applying any realtime updates such as code-push or expo updates.
@@ -1 +1 @@
1
- {"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/js/sdk.tsx"],"names":[],"mappings":"AACA,OAAO,KAAK,EAA2C,KAAK,EAAE,MAAM,cAAc,CAAC;AAanF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAK/B,OAAO,KAAK,EAA4B,kBAAkB,EAAE,yBAAyB,EAAE,MAAM,WAAW,CAAC;AAgCzG;;GAEG;AACH,wBAAgB,IAAI,CAAC,aAAa,EAAE,kBAAkB,GAAG,IAAI,CA0H5D;AAED;;GAEG;AACH,wBAAgB,IAAI,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,EACpD,aAAa,EAAE,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KAAK,IAAI,OAAO,CAAC,OAAO,CAAC,CAc9C;AAED;;GAEG;AACH,wBAAsB,KAAK,IAAI,OAAO,CAAC,IAAI,CAAC,CAU3C;AAED;;;;;;;;;;;;GAYG;AACH,wBAAgB,SAAS,CAAC,CAAC,EAAE,QAAQ,EAAE,CAAC,KAAK,EAAE,KAAK,KAAK,CAAC,GAAG,CAAC,GAAG,SAAS,CAUzE;AAED;;GAEG;AACH,wBAAsB,cAAc,IAAI,OAAO,CAAC,OAAO,GAAG,IAAI,CAAC,CAE9D"}
package/dist/js/sdk.js CHANGED
@@ -11,13 +11,14 @@ import { debug, getClient, getGlobalScope, getIntegrationsToSetup, getIsolationS
11
11
  import { defaultStackParser, makeFetchTransport, Profiler } from '@sentry/react';
12
12
  import * as React from 'react';
13
13
  import { ReactNativeClient } from './client';
14
- import { FeedbackWidgetProvider } from './feedback/FeedbackWidgetProvider';
14
+ import { FeedbackFormProvider } from './feedback/FeedbackFormProvider';
15
15
  import { getDevServer } from './integrations/debugsymbolicatorutils';
16
16
  import { getDefaultIntegrations } from './integrations/default';
17
17
  import { shouldEnableNativeNagger } from './options';
18
18
  import { enableSyncToNative } from './scopeSync';
19
19
  import { TouchEventBoundary } from './touchevents';
20
20
  import { ReactNativeProfiler } from './tracing';
21
+ import { _appLoaded } from './tracing/integrations/appStart';
21
22
  import { useEncodePolyfill } from './transports/encodePolyfill';
22
23
  import { DEFAULT_BUFFER_SIZE, makeNativeTransportFactory } from './transports/native';
23
24
  import { getDefaultEnvironment, isExpoGo, isRunningInMetroDevServer, isWeb } from './utils/environment';
@@ -53,9 +54,7 @@ export function init(passedOptions) {
53
54
  }
54
55
  const userOptions = Object.assign(Object.assign({}, RN_GLOBAL_OBJ.__SENTRY_OPTIONS__), passedOptions);
55
56
  const maxQueueSize = (_c = (_a = userOptions.maxQueueSize) !== null && _a !== void 0 ? _a : (_b = userOptions.transportOptions) === null || _b === void 0 ? void 0 : _b.bufferSize) !== null && _c !== void 0 ? _c : DEFAULT_OPTIONS.maxQueueSize;
56
- const enableNative = userOptions.enableNative === undefined || userOptions.enableNative
57
- ? NATIVE.isNativeAvailable()
58
- : false;
57
+ const enableNative = userOptions.enableNative === undefined || userOptions.enableNative ? NATIVE.isNativeAvailable() : false;
59
58
  useEncodePolyfill();
60
59
  if (enableNative) {
61
60
  enableSyncToNative(getGlobalScope());
@@ -73,7 +72,9 @@ export function init(passedOptions) {
73
72
  const port = dsnComponents.port ? `:${dsnComponents.port}` : '';
74
73
  return `${dsnComponents.protocol}://${dsnComponents.host}${port}`;
75
74
  };
76
- const userBeforeBreadcrumb = safeFactory(userOptions.beforeBreadcrumb, { loggerMessage: 'The beforeBreadcrumb threw an error' });
75
+ const userBeforeBreadcrumb = safeFactory(userOptions.beforeBreadcrumb, {
76
+ loggerMessage: 'The beforeBreadcrumb threw an error',
77
+ });
77
78
  // Exclude Dev Server and Sentry Dsn request from Breadcrumbs
78
79
  const devServerUrl = (_d = getDevServer()) === null || _d === void 0 ? void 0 : _d.url;
79
80
  const dsn = getURLFromDSN(userOptions.dsn);
@@ -99,15 +100,17 @@ export function init(passedOptions) {
99
100
  };
100
101
  const options = Object.assign(Object.assign(Object.assign({}, DEFAULT_OPTIONS), userOptions), { release: (_e = userOptions.release) !== null && _e !== void 0 ? _e : getDefaultRelease(), enableNative, enableNativeNagger: shouldEnableNativeNagger(userOptions.enableNativeNagger),
101
102
  // If custom transport factory fails the SDK won't initialize
102
- transport: userOptions.transport
103
- || makeNativeTransportFactory({
103
+ transport: userOptions.transport ||
104
+ makeNativeTransportFactory({
104
105
  enableNative,
105
- })
106
- || makeFetchTransport, transportOptions: Object.assign(Object.assign(Object.assign({}, DEFAULT_OPTIONS.transportOptions), ((_f = userOptions.transportOptions) !== null && _f !== void 0 ? _f : {})), { bufferSize: maxQueueSize }), maxQueueSize, integrations: [], stackParser: stackParserFromStackParserOptions(userOptions.stackParser || defaultStackParser), beforeBreadcrumb: chainedBeforeBreadcrumb, initialScope: safeFactory(userOptions.initialScope, { loggerMessage: 'The initialScope threw an error' }) });
107
- if (!('autoInitializeNativeSdk' in userOptions) && RN_GLOBAL_OBJ.__SENTRY_OPTIONS__) {
108
- // Options file is present, native SDK is expected to be initialized
106
+ }) ||
107
+ makeFetchTransport, transportOptions: Object.assign(Object.assign(Object.assign({}, DEFAULT_OPTIONS.transportOptions), ((_f = userOptions.transportOptions) !== null && _f !== void 0 ? _f : {})), { bufferSize: maxQueueSize }), maxQueueSize, integrations: [], stackParser: stackParserFromStackParserOptions(userOptions.stackParser || defaultStackParser), beforeBreadcrumb: chainedBeforeBreadcrumb, initialScope: safeFactory(userOptions.initialScope, { loggerMessage: 'The initialScope threw an error' }) });
108
+ if (!('autoInitializeNativeSdk' in userOptions) && RN_GLOBAL_OBJ.__SENTRY_OPTIONS__ && !__DEV__) {
109
+ // Options file is present in a release build, native SDK is expected to be initialized
109
110
  // before JS from the native app entry point (e.g. AppDelegate, MainApplication).
110
- // eslint-disable-next-line no-console
111
+ // In dev builds, we always re-initialize from JS to set up the native log bridge
112
+ // and provide runtime values (devServerUrl, defaultSidecarUrl, etc.).
113
+ // oxlint-disable-next-line eslint(no-console)
111
114
  console.info('[Sentry] Using options file. Native SDK is expected to be initialized before JS, skipping automatic native initialization from JS.');
112
115
  options.autoInitializeNativeSdk = false;
113
116
  }
@@ -117,9 +120,7 @@ export function init(passedOptions) {
117
120
  if (!('environment' in options)) {
118
121
  options.environment = getDefaultEnvironment();
119
122
  }
120
- const defaultIntegrations = userOptions.defaultIntegrations === undefined
121
- ? getDefaultIntegrations(options)
122
- : userOptions.defaultIntegrations;
123
+ const defaultIntegrations = userOptions.defaultIntegrations === undefined ? getDefaultIntegrations(options) : userOptions.defaultIntegrations;
123
124
  options.integrations = getIntegrationsToSetup({
124
125
  integrations: safeFactory(userOptions.integrations, { loggerMessage: 'The integrations threw an error' }),
125
126
  defaultIntegrations,
@@ -138,13 +139,13 @@ export function init(passedOptions) {
138
139
  */
139
140
  export function wrap(RootComponent, options) {
140
141
  var _a;
141
- const profilerProps = Object.assign(Object.assign({}, (options === null || options === void 0 ? void 0 : options.profilerProps)), { name: (_a = RootComponent.displayName) !== null && _a !== void 0 ? _a : 'Root', updateProps: {} });
142
+ const profilerProps = Object.assign(Object.assign({}, options === null || options === void 0 ? void 0 : options.profilerProps), { name: (_a = RootComponent.displayName) !== null && _a !== void 0 ? _a : 'Root', updateProps: {} });
142
143
  const ProfilerComponent = isWeb() ? Profiler : ReactNativeProfiler;
143
144
  const RootApp = appProps => {
144
145
  var _a;
145
146
  return (React.createElement(TouchEventBoundary, Object.assign({}, ((_a = options === null || options === void 0 ? void 0 : options.touchEventBoundaryProps) !== null && _a !== void 0 ? _a : {})),
146
147
  React.createElement(ProfilerComponent, Object.assign({}, profilerProps),
147
- React.createElement(FeedbackWidgetProvider, null,
148
+ React.createElement(FeedbackFormProvider, null,
148
149
  React.createElement(RootComponent, Object.assign({}, appProps))))));
149
150
  };
150
151
  return RootApp;
@@ -156,6 +157,30 @@ export function wrap(RootComponent, options) {
156
157
  export function nativeCrash() {
157
158
  NATIVE.nativeCrash();
158
159
  }
160
+ /**
161
+ * Signals that the application has finished loading and is ready for user interaction.
162
+ *
163
+ * Call this when your app is truly ready — after async initialization, data loading,
164
+ * splash screen dismissal, auth session restore, etc. This marks the end of the app start span,
165
+ * giving you a more accurate measurement of perceived startup time.
166
+ *
167
+ * If not called, the SDK falls back to the root component mount time (via `Sentry.wrap()`)
168
+ * or JS bundle execution start.
169
+ *
170
+ * @experimental This API is subject to change in future versions.
171
+ *
172
+ * @example
173
+ * ```ts
174
+ * await loadRemoteConfig();
175
+ * await restoreSession();
176
+ * SplashScreen.hide();
177
+ * Sentry.appLoaded();
178
+ * ```
179
+ */
180
+ export function appLoaded() {
181
+ // oxlint-disable-next-line typescript-eslint(no-floating-promises)
182
+ _appLoaded();
183
+ }
159
184
  /**
160
185
  * Flushes all pending events in the queue to disk.
161
186
  * Use this before applying any realtime updates such as code-push or expo updates.
@@ -168,7 +193,6 @@ export function flush() {
168
193
  const result = yield client.flush();
169
194
  return result;
170
195
  }
171
- // eslint-disable-next-line no-empty
172
196
  }
173
197
  catch (_) { }
174
198
  debug.error('Failed to flush the event queue.');