@sentry/react-native 5.31.1 → 6.0.0-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (294) hide show
  1. package/CHANGELOG.md +102 -0
  2. package/dist/js/client.d.ts +5 -9
  3. package/dist/js/client.d.ts.map +1 -1
  4. package/dist/js/client.js +11 -42
  5. package/dist/js/client.js.map +1 -1
  6. package/dist/js/index.d.ts +5 -10
  7. package/dist/js/index.d.ts.map +1 -1
  8. package/dist/js/index.js +4 -21
  9. package/dist/js/index.js.map +1 -1
  10. package/dist/js/integrations/debugsymbolicator.d.ts +2 -8
  11. package/dist/js/integrations/debugsymbolicator.d.ts.map +1 -1
  12. package/dist/js/integrations/debugsymbolicator.js +1 -9
  13. package/dist/js/integrations/debugsymbolicator.js.map +1 -1
  14. package/dist/js/integrations/default.d.ts.map +1 -1
  15. package/dist/js/integrations/default.js +16 -4
  16. package/dist/js/integrations/default.js.map +1 -1
  17. package/dist/js/integrations/devicecontext.d.ts +2 -8
  18. package/dist/js/integrations/devicecontext.d.ts.map +1 -1
  19. package/dist/js/integrations/devicecontext.js +0 -9
  20. package/dist/js/integrations/devicecontext.js.map +1 -1
  21. package/dist/js/integrations/eventorigin.d.ts +2 -8
  22. package/dist/js/integrations/eventorigin.d.ts.map +1 -1
  23. package/dist/js/integrations/eventorigin.js +0 -8
  24. package/dist/js/integrations/eventorigin.js.map +1 -1
  25. package/dist/js/integrations/expocontext.d.ts +2 -8
  26. package/dist/js/integrations/expocontext.d.ts.map +1 -1
  27. package/dist/js/integrations/expocontext.js +0 -8
  28. package/dist/js/integrations/expocontext.js.map +1 -1
  29. package/dist/js/integrations/exports.d.ts +5 -0
  30. package/dist/js/integrations/exports.d.ts.map +1 -1
  31. package/dist/js/integrations/exports.js +5 -0
  32. package/dist/js/integrations/exports.js.map +1 -1
  33. package/dist/js/integrations/modulesloader.d.ts +2 -8
  34. package/dist/js/integrations/modulesloader.d.ts.map +1 -1
  35. package/dist/js/integrations/modulesloader.js +0 -8
  36. package/dist/js/integrations/modulesloader.js.map +1 -1
  37. package/dist/js/integrations/nativelinkederrors.d.ts +2 -8
  38. package/dist/js/integrations/nativelinkederrors.d.ts.map +1 -1
  39. package/dist/js/integrations/nativelinkederrors.js +0 -8
  40. package/dist/js/integrations/nativelinkederrors.js.map +1 -1
  41. package/dist/js/integrations/reactnativeerrorhandlers.d.ts +2 -8
  42. package/dist/js/integrations/reactnativeerrorhandlers.d.ts.map +1 -1
  43. package/dist/js/integrations/reactnativeerrorhandlers.js +1 -8
  44. package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
  45. package/dist/js/integrations/reactnativeinfo.d.ts +2 -8
  46. package/dist/js/integrations/reactnativeinfo.d.ts.map +1 -1
  47. package/dist/js/integrations/reactnativeinfo.js +0 -8
  48. package/dist/js/integrations/reactnativeinfo.js.map +1 -1
  49. package/dist/js/integrations/release.d.ts +2 -8
  50. package/dist/js/integrations/release.d.ts.map +1 -1
  51. package/dist/js/integrations/release.js +0 -8
  52. package/dist/js/integrations/release.js.map +1 -1
  53. package/dist/js/integrations/rewriteframes.js +1 -1
  54. package/dist/js/integrations/rewriteframes.js.map +1 -1
  55. package/dist/js/integrations/screenshot.d.ts +2 -8
  56. package/dist/js/integrations/screenshot.d.ts.map +1 -1
  57. package/dist/js/integrations/screenshot.js +2 -11
  58. package/dist/js/integrations/screenshot.js.map +1 -1
  59. package/dist/js/integrations/sdkinfo.d.ts +2 -8
  60. package/dist/js/integrations/sdkinfo.d.ts.map +1 -1
  61. package/dist/js/integrations/sdkinfo.js +0 -8
  62. package/dist/js/integrations/sdkinfo.js.map +1 -1
  63. package/dist/js/integrations/spotlight.d.ts +2 -10
  64. package/dist/js/integrations/spotlight.d.ts.map +1 -1
  65. package/dist/js/integrations/spotlight.js +1 -10
  66. package/dist/js/integrations/spotlight.js.map +1 -1
  67. package/dist/js/integrations/viewhierarchy.d.ts +2 -8
  68. package/dist/js/integrations/viewhierarchy.d.ts.map +1 -1
  69. package/dist/js/integrations/viewhierarchy.js +0 -8
  70. package/dist/js/integrations/viewhierarchy.js.map +1 -1
  71. package/dist/js/options.d.ts +34 -2
  72. package/dist/js/options.d.ts.map +1 -1
  73. package/dist/js/options.js.map +1 -1
  74. package/dist/js/profiling/cache.d.ts +1 -1
  75. package/dist/js/profiling/hermes.d.ts +1 -1
  76. package/dist/js/profiling/hermes.d.ts.map +1 -1
  77. package/dist/js/profiling/integration.d.ts +1 -7
  78. package/dist/js/profiling/integration.d.ts.map +1 -1
  79. package/dist/js/profiling/integration.js +39 -25
  80. package/dist/js/profiling/integration.js.map +1 -1
  81. package/dist/js/profiling/utils.js +2 -1
  82. package/dist/js/profiling/utils.js.map +1 -1
  83. package/dist/js/replay/mobilereplay.d.ts +2 -2
  84. package/dist/js/replay/mobilereplay.d.ts.map +1 -1
  85. package/dist/js/replay/mobilereplay.js.map +1 -1
  86. package/dist/js/replay/networkUtils.d.ts +0 -1
  87. package/dist/js/replay/networkUtils.d.ts.map +1 -1
  88. package/dist/js/scopeSync.d.ts +6 -0
  89. package/dist/js/scopeSync.d.ts.map +1 -0
  90. package/dist/js/scopeSync.js +60 -0
  91. package/dist/js/scopeSync.js.map +1 -0
  92. package/dist/js/sdk.d.ts +1 -20
  93. package/dist/js/sdk.d.ts.map +1 -1
  94. package/dist/js/sdk.js +20 -53
  95. package/dist/js/sdk.js.map +1 -1
  96. package/dist/js/tools/metroconfig.d.ts +1 -1
  97. package/dist/js/tools/metroconfig.d.ts.map +1 -1
  98. package/dist/js/tools/metroconfig.js.map +1 -1
  99. package/dist/js/tools/sentryMetroSerializer.js.map +1 -1
  100. package/dist/js/touchevents.d.ts +0 -1
  101. package/dist/js/touchevents.d.ts.map +1 -1
  102. package/dist/js/touchevents.js +5 -9
  103. package/dist/js/touchevents.js.map +1 -1
  104. package/dist/js/tracing/gesturetracing.d.ts +1 -6
  105. package/dist/js/tracing/gesturetracing.d.ts.map +1 -1
  106. package/dist/js/tracing/gesturetracing.js +8 -12
  107. package/dist/js/tracing/gesturetracing.js.map +1 -1
  108. package/dist/js/tracing/index.d.ts +6 -7
  109. package/dist/js/tracing/index.d.ts.map +1 -1
  110. package/dist/js/tracing/index.js +4 -7
  111. package/dist/js/tracing/index.js.map +1 -1
  112. package/dist/js/tracing/integrations/appStart.d.ts +39 -0
  113. package/dist/js/tracing/integrations/appStart.d.ts.map +1 -0
  114. package/dist/js/tracing/integrations/appStart.js +301 -0
  115. package/dist/js/tracing/integrations/appStart.js.map +1 -0
  116. package/dist/js/tracing/integrations/nativeFrames.d.ts +21 -0
  117. package/dist/js/tracing/integrations/nativeFrames.d.ts.map +1 -0
  118. package/dist/js/tracing/integrations/nativeFrames.js +195 -0
  119. package/dist/js/tracing/integrations/nativeFrames.js.map +1 -0
  120. package/dist/js/tracing/integrations/stalltracking.d.ts +31 -0
  121. package/dist/js/tracing/integrations/stalltracking.d.ts.map +1 -0
  122. package/dist/js/tracing/integrations/stalltracking.js +236 -0
  123. package/dist/js/tracing/integrations/stalltracking.js.map +1 -0
  124. package/dist/js/tracing/integrations/userInteraction.d.ts +11 -0
  125. package/dist/js/tracing/integrations/userInteraction.d.ts.map +1 -0
  126. package/dist/js/tracing/integrations/userInteraction.js +70 -0
  127. package/dist/js/tracing/integrations/userInteraction.js.map +1 -0
  128. package/dist/js/tracing/onSpanEndUtils.d.ts +17 -0
  129. package/dist/js/tracing/onSpanEndUtils.d.ts.map +1 -0
  130. package/dist/js/tracing/onSpanEndUtils.js +112 -0
  131. package/dist/js/tracing/onSpanEndUtils.js.map +1 -0
  132. package/dist/js/tracing/origin.d.ts +2 -0
  133. package/dist/js/tracing/origin.d.ts.map +1 -0
  134. package/dist/js/tracing/origin.js +2 -0
  135. package/dist/js/tracing/origin.js.map +1 -0
  136. package/dist/js/tracing/reactnativenavigation.d.ts +21 -39
  137. package/dist/js/tracing/reactnativenavigation.d.ts.map +1 -1
  138. package/dist/js/tracing/reactnativenavigation.js +98 -87
  139. package/dist/js/tracing/reactnativenavigation.js.map +1 -1
  140. package/dist/js/tracing/reactnativeprofiler.d.ts.map +1 -1
  141. package/dist/js/tracing/reactnativeprofiler.js +6 -13
  142. package/dist/js/tracing/reactnativeprofiler.js.map +1 -1
  143. package/dist/js/tracing/reactnativetracing.d.ts +44 -160
  144. package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
  145. package/dist/js/tracing/reactnativetracing.js +51 -481
  146. package/dist/js/tracing/reactnativetracing.js.map +1 -1
  147. package/dist/js/tracing/reactnavigation.d.ts +18 -63
  148. package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
  149. package/dist/js/tracing/reactnavigation.js +200 -205
  150. package/dist/js/tracing/reactnavigation.js.map +1 -1
  151. package/dist/js/tracing/semanticAttributes.d.ts +12 -0
  152. package/dist/js/tracing/semanticAttributes.d.ts.map +1 -0
  153. package/dist/js/tracing/semanticAttributes.js +12 -0
  154. package/dist/js/tracing/semanticAttributes.js.map +1 -0
  155. package/dist/js/tracing/span.d.ts +52 -0
  156. package/dist/js/tracing/span.d.ts.map +1 -0
  157. package/dist/js/tracing/span.js +82 -0
  158. package/dist/js/tracing/span.js.map +1 -0
  159. package/dist/js/tracing/timetodisplay.d.ts.map +1 -1
  160. package/dist/js/tracing/timetodisplay.js +14 -29
  161. package/dist/js/tracing/timetodisplay.js.map +1 -1
  162. package/dist/js/tracing/timetodisplaynative.types.d.ts +0 -1
  163. package/dist/js/tracing/timetodisplaynative.types.d.ts.map +1 -1
  164. package/dist/js/tracing/types.d.ts +2 -9
  165. package/dist/js/tracing/types.d.ts.map +1 -1
  166. package/dist/js/tracing/types.js.map +1 -1
  167. package/dist/js/tracing/utils.d.ts +19 -14
  168. package/dist/js/tracing/utils.d.ts.map +1 -1
  169. package/dist/js/tracing/utils.js +38 -52
  170. package/dist/js/tracing/utils.js.map +1 -1
  171. package/dist/js/transports/encodePolyfill.d.ts +3 -0
  172. package/dist/js/transports/encodePolyfill.d.ts.map +1 -0
  173. package/dist/js/transports/encodePolyfill.js +13 -0
  174. package/dist/js/transports/encodePolyfill.js.map +1 -0
  175. package/dist/js/transports/native.d.ts +2 -2
  176. package/dist/js/transports/native.d.ts.map +1 -1
  177. package/dist/js/transports/native.js +2 -1
  178. package/dist/js/transports/native.js.map +1 -1
  179. package/dist/js/utils/AsyncExpiringMap.d.ts +56 -0
  180. package/dist/js/utils/AsyncExpiringMap.d.ts.map +1 -0
  181. package/dist/js/utils/AsyncExpiringMap.js +130 -0
  182. package/dist/js/utils/AsyncExpiringMap.js.map +1 -0
  183. package/dist/js/utils/fill.d.ts +7 -0
  184. package/dist/js/utils/fill.d.ts.map +1 -0
  185. package/dist/js/utils/fill.js +9 -0
  186. package/dist/js/utils/fill.js.map +1 -0
  187. package/dist/js/utils/span.d.ts +19 -0
  188. package/dist/js/utils/span.d.ts.map +1 -0
  189. package/dist/js/utils/span.js +29 -0
  190. package/dist/js/utils/span.js.map +1 -0
  191. package/dist/js/vendor/react-native/index.d.ts +1 -2
  192. package/dist/js/vendor/react-native/index.d.ts.map +1 -1
  193. package/dist/js/vendor/react-native/index.js.map +1 -1
  194. package/dist/js/version.d.ts +1 -1
  195. package/dist/js/version.d.ts.map +1 -1
  196. package/dist/js/version.js +1 -1
  197. package/dist/js/version.js.map +1 -1
  198. package/dist/js/wrapper.d.ts.map +1 -1
  199. package/dist/js/wrapper.js +1 -0
  200. package/dist/js/wrapper.js.map +1 -1
  201. package/package.json +11 -12
  202. package/ts3.8/dist/js/client.d.ts +5 -9
  203. package/ts3.8/dist/js/index.d.ts +5 -10
  204. package/ts3.8/dist/js/integrations/debugsymbolicator.d.ts +2 -8
  205. package/ts3.8/dist/js/integrations/devicecontext.d.ts +2 -8
  206. package/ts3.8/dist/js/integrations/eventorigin.d.ts +2 -8
  207. package/ts3.8/dist/js/integrations/expocontext.d.ts +2 -8
  208. package/ts3.8/dist/js/integrations/exports.d.ts +5 -0
  209. package/ts3.8/dist/js/integrations/modulesloader.d.ts +2 -8
  210. package/ts3.8/dist/js/integrations/nativelinkederrors.d.ts +2 -8
  211. package/ts3.8/dist/js/integrations/reactnativeerrorhandlers.d.ts +2 -8
  212. package/ts3.8/dist/js/integrations/reactnativeinfo.d.ts +2 -8
  213. package/ts3.8/dist/js/integrations/release.d.ts +2 -8
  214. package/ts3.8/dist/js/integrations/screenshot.d.ts +2 -8
  215. package/ts3.8/dist/js/integrations/sdkinfo.d.ts +2 -8
  216. package/ts3.8/dist/js/integrations/spotlight.d.ts +2 -10
  217. package/ts3.8/dist/js/integrations/viewhierarchy.d.ts +2 -8
  218. package/ts3.8/dist/js/options.d.ts +34 -2
  219. package/ts3.8/dist/js/profiling/cache.d.ts +1 -1
  220. package/ts3.8/dist/js/profiling/hermes.d.ts +1 -1
  221. package/ts3.8/dist/js/profiling/integration.d.ts +1 -7
  222. package/ts3.8/dist/js/replay/mobilereplay.d.ts +2 -2
  223. package/ts3.8/dist/js/replay/networkUtils.d.ts +0 -1
  224. package/ts3.8/dist/js/scopeSync.d.ts +6 -0
  225. package/ts3.8/dist/js/sdk.d.ts +1 -20
  226. package/ts3.8/dist/js/touchevents.d.ts +0 -1
  227. package/ts3.8/dist/js/tracing/gesturetracing.d.ts +1 -6
  228. package/ts3.8/dist/js/tracing/index.d.ts +6 -7
  229. package/ts3.8/dist/js/tracing/integrations/appStart.d.ts +39 -0
  230. package/ts3.8/dist/js/tracing/integrations/nativeFrames.d.ts +21 -0
  231. package/ts3.8/dist/js/tracing/integrations/stalltracking.d.ts +31 -0
  232. package/ts3.8/dist/js/tracing/integrations/userInteraction.d.ts +11 -0
  233. package/ts3.8/dist/js/tracing/onSpanEndUtils.d.ts +17 -0
  234. package/ts3.8/dist/js/tracing/origin.d.ts +2 -0
  235. package/ts3.8/dist/js/tracing/reactnativenavigation.d.ts +21 -39
  236. package/ts3.8/dist/js/tracing/reactnativetracing.d.ts +44 -160
  237. package/ts3.8/dist/js/tracing/reactnavigation.d.ts +18 -63
  238. package/ts3.8/dist/js/tracing/semanticAttributes.d.ts +12 -0
  239. package/ts3.8/dist/js/tracing/span.d.ts +52 -0
  240. package/ts3.8/dist/js/tracing/timetodisplaynative.types.d.ts +0 -1
  241. package/ts3.8/dist/js/tracing/types.d.ts +2 -9
  242. package/ts3.8/dist/js/tracing/utils.d.ts +19 -14
  243. package/ts3.8/dist/js/transports/encodePolyfill.d.ts +3 -0
  244. package/ts3.8/dist/js/transports/native.d.ts +2 -2
  245. package/ts3.8/dist/js/utils/AsyncExpiringMap.d.ts +56 -0
  246. package/ts3.8/dist/js/utils/fill.d.ts +7 -0
  247. package/ts3.8/dist/js/utils/span.d.ts +19 -0
  248. package/ts3.8/dist/js/vendor/react-native/index.d.ts +1 -2
  249. package/ts3.8/dist/js/version.d.ts +1 -1
  250. package/dist/js/integrations/index.d.ts +0 -16
  251. package/dist/js/integrations/index.d.ts.map +0 -1
  252. package/dist/js/integrations/index.js +0 -17
  253. package/dist/js/integrations/index.js.map +0 -1
  254. package/dist/js/scope.d.ts +0 -54
  255. package/dist/js/scope.d.ts.map +0 -1
  256. package/dist/js/scope.js +0 -89
  257. package/dist/js/scope.js.map +0 -1
  258. package/dist/js/tracing/addTracingExtensions.d.ts +0 -8
  259. package/dist/js/tracing/addTracingExtensions.d.ts.map +0 -1
  260. package/dist/js/tracing/addTracingExtensions.js +0 -66
  261. package/dist/js/tracing/addTracingExtensions.js.map +0 -1
  262. package/dist/js/tracing/nativeframes.d.ts +0 -60
  263. package/dist/js/tracing/nativeframes.d.ts.map +0 -1
  264. package/dist/js/tracing/nativeframes.js +0 -210
  265. package/dist/js/tracing/nativeframes.js.map +0 -1
  266. package/dist/js/tracing/reactnavigationv4.d.ts +0 -92
  267. package/dist/js/tracing/reactnavigationv4.d.ts.map +0 -1
  268. package/dist/js/tracing/reactnavigationv4.js +0 -229
  269. package/dist/js/tracing/reactnavigationv4.js.map +0 -1
  270. package/dist/js/tracing/routingInstrumentation.d.ts +0 -52
  271. package/dist/js/tracing/routingInstrumentation.d.ts.map +0 -1
  272. package/dist/js/tracing/routingInstrumentation.js +0 -36
  273. package/dist/js/tracing/routingInstrumentation.js.map +0 -1
  274. package/dist/js/tracing/stalltracking.d.ts +0 -99
  275. package/dist/js/tracing/stalltracking.d.ts.map +0 -1
  276. package/dist/js/tracing/stalltracking.js +0 -286
  277. package/dist/js/tracing/stalltracking.js.map +0 -1
  278. package/dist/js/tracing/transaction.d.ts +0 -11
  279. package/dist/js/tracing/transaction.d.ts.map +0 -1
  280. package/dist/js/tracing/transaction.js +0 -37
  281. package/dist/js/tracing/transaction.js.map +0 -1
  282. package/dist/js/transports/TextEncoder.d.ts +0 -3
  283. package/dist/js/transports/TextEncoder.d.ts.map +0 -1
  284. package/dist/js/transports/TextEncoder.js +0 -12
  285. package/dist/js/transports/TextEncoder.js.map +0 -1
  286. package/ts3.8/dist/js/integrations/index.d.ts +0 -16
  287. package/ts3.8/dist/js/scope.d.ts +0 -54
  288. package/ts3.8/dist/js/tracing/addTracingExtensions.d.ts +0 -8
  289. package/ts3.8/dist/js/tracing/nativeframes.d.ts +0 -60
  290. package/ts3.8/dist/js/tracing/reactnavigationv4.d.ts +0 -92
  291. package/ts3.8/dist/js/tracing/routingInstrumentation.d.ts +0 -52
  292. package/ts3.8/dist/js/tracing/stalltracking.d.ts +0 -99
  293. package/ts3.8/dist/js/tracing/transaction.d.ts +0 -11
  294. package/ts3.8/dist/js/transports/TextEncoder.d.ts +0 -3
@@ -1,4 +1,4 @@
1
- import { rewriteFramesIntegration } from '@sentry/integrations';
1
+ import { rewriteFramesIntegration } from '@sentry/core';
2
2
  import { Platform } from 'react-native';
3
3
  import { isExpo, isHermesEnabled } from '../utils/environment';
4
4
  export const ANDROID_DEFAULT_BUNDLE_NAME = 'app:///index.android.bundle';
@@ -1 +1 @@
1
- {"version":3,"file":"rewriteframes.js","sourceRoot":"","sources":["../../../src/js/integrations/rewriteframes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,sBAAsB,CAAC;AAEhE,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AQ,GAAG,2BAA2B,CAAC;gBAC7C,OAAO,KAAK,CAAC;aACd;YAED,IAAI,MAAM,EAAE,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,EAAE;gBACrC,KAAK,CAAC,QAAQ,GAAG,uBAAuB,CAAC;gBACzC,OAAO,KAAK,CAAC;aACd;YAED,MAAM,SAAS,GAAG,QAAQ,CAAC;YAC3B,+DAA+D;YAC/D,IAAI,KAAK,CAAC,QAAQ,KAAK,sBAAsB,EAAE;gBAC7C,KAAK,CAAC,MAAM,GAAG,KAAK,CAAC;aACtB;YACD,wCAAwC;YACxC,KAAK,CAAC,QAAQ;gBACZ,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,GAAG,SAAS,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YACzG,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { rewriteFramesIntegration } from '@sentry/integrations';\nimport type { Integration, StackFrame } from '@sentry/types';\nimport { Platform } from 'react-native';\n\nimport { isExpo, isHermesEnabled } from '../utils/environment';\n\nexport const ANDROID_DEFAULT_BUNDLE_NAME = 'app:///index.android.bundle';\nexport const IOS_DEFAULT_BUNDLE_NAME = 'app:///main.jsbundle';\n\n/**\n * Creates React Native default rewrite frames integration\n * which appends app:// to the beginning of the filename\n * and removes file://, 'address at' prefixes, CodePush postfix,\n * and Expo bundle postfix.\n */\nexport function createReactNativeRewriteFrames(): Integration {\n return rewriteFramesIntegration({\n iteratee: (frame: StackFrame) => {\n if (frame.platform === 'java' || frame.platform === 'cocoa') {\n // Because platform is not required in StackFrame type\n // we assume that if not set it's javascript\n return frame;\n }\n\n if (!frame.filename) {\n return frame;\n }\n delete frame.abs_path;\n\n frame.filename = frame.filename\n .replace(/^file:\\/\\//, '')\n .replace(/^address at /, '')\n .replace(/^.*\\/[^.]+(\\.app|CodePush|.*(?=\\/))/, '');\n\n if (frame.filename === '[native code]' || frame.filename === 'native') {\n return frame;\n }\n // Is React Native frame\n\n // Check Hermes Bytecode Frame and convert to 1-based column\n if (isHermesEnabled() && frame.lineno === 1 && frame.colno !== undefined) {\n // hermes bytecode columns are 0-based, while v8 and jsc are 1-based\n // Hermes frames without debug info have always line = 1 and col points to a bytecode pos\n // https://github.com/facebook/react/issues/21792#issuecomment-873171991\n frame.colno += 1;\n }\n\n // Expo adds hash to the end of bundle names\n if (isExpo() && Platform.OS === 'android') {\n frame.filename = ANDROID_DEFAULT_BUNDLE_NAME;\n return frame;\n }\n\n if (isExpo() && Platform.OS === 'ios') {\n frame.filename = IOS_DEFAULT_BUNDLE_NAME;\n return frame;\n }\n\n const appPrefix = 'app://';\n // https://github.com/getsentry/sentry-react-native/issues/3348\n if (frame.filename === '/InternalBytecode.js') {\n frame.in_app = false;\n }\n // We always want to have a triple slash\n frame.filename =\n frame.filename.indexOf('/') === 0 ? `${appPrefix}${frame.filename}` : `${appPrefix}/${frame.filename}`;\n return frame;\n },\n });\n}\n"]}
1
+ {"version":3,"file":"rewriteframes.js","sourceRoot":"","sources":["../../../src/js/integrations/rewriteframes.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,wBAAwB,EAAE,MAAM,cAAc,CAAC;AAExD,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,MAAM,EAAE,eAAe,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,CAAC,MAAM,2BAA2B,GAAG,6BAA6B,CAAC;AACzE,MAAM,CAAC,MAAM,uBAAuB,GAAG,sBAAsB,CAAC;AAE9D;;;;;GAKG;AACH,MAAM,UAAU,8BAA8B;IAC5C,OAAO,wBAAwB,CAAC;QAC9B,QAAQ,EAAE,CAAC,KAAiB,EAAE,EAAE;YAC9B,IAAI,KAAK,CAAC,QAAQ,KAAK,MAAM,IAAI,K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AAC,QAAQ;gBACZ,KAAK,CAAC,QAAQ,CAAC,OAAO,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC,CAAC,GAAG,SAAS,GAAG,KAAK,CAAC,QAAQ,EAAE,CAAC,CAAC,CAAC,GAAG,SAAS,IAAI,KAAK,CAAC,QAAQ,EAAE,CAAC;YACzG,OAAO,KAAK,CAAC;QACf,CAAC;KACF,CAAC,CAAC;AACL,CAAC","sourcesContent":["import { rewriteFramesIntegration } from '@sentry/core';\nimport type { Integration, StackFrame } from '@sentry/types';\nimport { Platform } from 'react-native';\n\nimport { isExpo, isHermesEnabled } from '../utils/environment';\n\nexport const ANDROID_DEFAULT_BUNDLE_NAME = 'app:///index.android.bundle';\nexport const IOS_DEFAULT_BUNDLE_NAME = 'app:///main.jsbundle';\n\n/**\n * Creates React Native default rewrite frames integration\n * which appends app:// to the beginning of the filename\n * and removes file://, 'address at' prefixes, CodePush postfix,\n * and Expo bundle postfix.\n */\nexport function createReactNativeRewriteFrames(): Integration {\n return rewriteFramesIntegration({\n iteratee: (frame: StackFrame) => {\n if (frame.platform === 'java' || frame.platform === 'cocoa') {\n // Because platform is not required in StackFrame type\n // we assume that if not set it's javascript\n return frame;\n }\n\n if (!frame.filename) {\n return frame;\n }\n delete frame.abs_path;\n\n frame.filename = frame.filename\n .replace(/^file:\\/\\//, '')\n .replace(/^address at /, '')\n .replace(/^.*\\/[^.]+(\\.app|CodePush|.*(?=\\/))/, '');\n\n if (frame.filename === '[native code]' || frame.filename === 'native') {\n return frame;\n }\n // Is React Native frame\n\n // Check Hermes Bytecode Frame and convert to 1-based column\n if (isHermesEnabled() && frame.lineno === 1 && frame.colno !== undefined) {\n // hermes bytecode columns are 0-based, while v8 and jsc are 1-based\n // Hermes frames without debug info have always line = 1 and col points to a bytecode pos\n // https://github.com/facebook/react/issues/21792#issuecomment-873171991\n frame.colno += 1;\n }\n\n // Expo adds hash to the end of bundle names\n if (isExpo() && Platform.OS === 'android') {\n frame.filename = ANDROID_DEFAULT_BUNDLE_NAME;\n return frame;\n }\n\n if (isExpo() && Platform.OS === 'ios') {\n frame.filename = IOS_DEFAULT_BUNDLE_NAME;\n return frame;\n }\n\n const appPrefix = 'app://';\n // https://github.com/getsentry/sentry-react-native/issues/3348\n if (frame.filename === '/InternalBytecode.js') {\n frame.in_app = false;\n }\n // We always want to have a triple slash\n frame.filename =\n frame.filename.indexOf('/') === 0 ? `${appPrefix}${frame.filename}` : `${appPrefix}/${frame.filename}`;\n return frame;\n },\n });\n}\n"]}
@@ -1,10 +1,4 @@
1
- import type { Integration, IntegrationClass, IntegrationFnResult } from '@sentry/types';
1
+ import type { Integration } from '@sentry/types';
2
2
  /** Adds screenshots to error events */
3
- export declare const screenshotIntegration: () => IntegrationFnResult;
4
- /**
5
- * Adds screenshots to error events
6
- *
7
- * @deprecated Use `screenshotIntegration()` instead.
8
- */
9
- export declare const Screenshot: IntegrationClass<Integration>;
3
+ export declare const screenshotIntegration: () => Integration;
10
4
  //# sourceMappingURL=screenshot.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"screenshot.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/screenshot.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAoB,WAAW,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAQ1G,uCAAuC;AACvC,eAAO,MAAM,qBAAqB,QAAO,mBAQxC,CAAC;AAEF;;;;GAIG;AAEH,eAAO,MAAM,UAAU,+BAGW,CAAC"}
1
+ {"version":3,"file":"screenshot.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/screenshot.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAoB,WAAW,EAAE,MAAM,eAAe,CAAC;AAQnE,uCAAuC;AACvC,eAAO,MAAM,qBAAqB,QAAO,WAQxC,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { __awaiter } from "tslib";
2
- import { convertIntegrationFnToClass } from '@sentry/core';
3
2
  import { NATIVE } from '../wrapper';
4
3
  const INTEGRATION_NAME = 'Screenshot';
5
4
  /** Adds screenshots to error events */
@@ -12,19 +11,11 @@ export const screenshotIntegration = () => {
12
11
  processEvent,
13
12
  };
14
13
  };
15
- /**
16
- * Adds screenshots to error events
17
- *
18
- * @deprecated Use `screenshotIntegration()` instead.
19
- */
20
- // eslint-disable-next-line deprecation/deprecation
21
- export const Screenshot = convertIntegrationFnToClass(INTEGRATION_NAME, screenshotIntegration);
22
14
  function processEvent(event, hint, client) {
23
- var _a;
15
+ var _a, _b;
24
16
  return __awaiter(this, void 0, void 0, function* () {
25
- const options = client.getOptions();
26
17
  const hasException = event.exception && event.exception.values && event.exception.values.length > 0;
27
- if (!hasException || ((_a = options === null || options === void 0 ? void 0 : options.beforeScreenshot) === null || _a === void 0 ? void 0 : _a.call(options, event, hint)) === false) {
18
+ if (!hasException || ((_b = (_a = client.getOptions()).beforeScreenshot) === null || _b === void 0 ? void 0 : _b.call(_a, event, hint)) === false) {
28
19
  return event;
29
20
  }
30
21
  const screenshots = yield NATIVE.captureScreenshot();
@@ -1 +1 @@
1
- {"version":3,"file":"screenshot.js","sourceRoot":"","sources":["../../../src/js/integrations/screenshot.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAK3D,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAEtC,uCAAuC;AACvC,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAwB,EAAE;IAC7D,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,GAAG,EAAE;YACd,OAAO;QACT,CAAC;QACD,YAAY;KACb,CAAC;AACJ,CAAC,CAAC;AAEF;;;;GAIG;AACH,mDAAmD;AACnD,MAAM,CAAC,MAAM,UAAU,GAAG,2BAA2B,CACnD,gBAAgB,EAChB,qBAAqB,CACW,CAAC;AAEnC,SAAe,YAAY,CAAC,KAAY,EAAE,IAAe,EAAE,MAAyB;;;QAClF,MAAM,OAAO,GAAG,MAAM,CAAC,UAAU,EAAE,CAAC;QAEpC,MAAM,YAAY,GAAG,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;QACpG,IAAI,CAAC,YAAY,IAAI,CAAA,MAAA,OAAO,aAAP,OAAO,uBAAP,OAAO,CAAE,gBAAgB,wDAAG,KAAK,EAAE,IAAI,CAAC,MAAK,KAAK,EAAE;YACvE,OAAO,KAAK,CAAC;SACd;QAED,MAAM,WAAW,GAAkC,MAAM,MAAM,CAAC,iBAAiB,EAAE,CAAC;QACpF,IAAI,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;YACzC,IAAI,CAAC,WAAW,GAAG,CAAC,GAAG,WAAW,EAAE,GAAG,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,KAAI,EAAE,CAAC,CAAC,CAAC;SACnE;QAED,OAAO,KAAK,CAAC;;CACd","sourcesContent":["import { convertIntegrationFnToClass } from '@sentry/core';\nimport type { Event, EventHint, Integration, IntegrationClass, IntegrationFnResult } from '@sentry/types';\n\nimport type { ReactNativeClient } from '../client';\nimport type { Screenshot as ScreenshotAttachment } from '../wrapper';\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'Screenshot';\n\n/** Adds screenshots to error events */\nexport const screenshotIntegration = (): IntegrationFnResult => {\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n // noop\n },\n processEvent,\n };\n};\n\n/**\n * Adds screenshots to error events\n *\n * @deprecated Use `screenshotIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport const Screenshot = convertIntegrationFnToClass(\n INTEGRATION_NAME,\n screenshotIntegration,\n) as IntegrationClass<Integration>;\n\nasync function processEvent(event: Event, hint: EventHint, client: ReactNativeClient): Promise<Event> {\n const options = client.getOptions();\n\n const hasException = event.exception && event.exception.values && event.exception.values.length > 0;\n if (!hasException || options?.beforeScreenshot?.(event, hint) === false) {\n return event;\n }\n\n const screenshots: ScreenshotAttachment[] | null = await NATIVE.captureScreenshot();\n if (screenshots && screenshots.length > 0) {\n hint.attachments = [...screenshots, ...(hint?.attachments || [])];\n }\n\n return event;\n}\n"]}
1
+ {"version":3,"file":"screenshot.js","sourceRoot":"","sources":["../../../src/js/integrations/screenshot.ts"],"names":[],"mappings":";AAIA,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,gBAAgB,GAAG,YAAY,CAAC;AAEtC,uCAAuC;AACvC,MAAM,CAAC,MAAM,qBAAqB,GAAG,GAAgB,EAAE;IACrD,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,GAAG,EAAE;YACd,OAAO;QACT,CAAC;QACD,YAAY;KACb,CAAC;AACJ,CAAC,CAAC;AAEF,SAAe,YAAY,CAAC,KAAY,EAAE,IAAe,EAAE,MAAyB;;;QAClF,MAAM,YAAY,GAAG,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;QACpG,IAAI,CAAC,YAAY,IAAI,CAAA,MAAA,MAAA,MAAM,CAAC,UAAU,EAAE,EAAC,gBAAgB,mDAAG,KAAK,EAAE,IAAI,CAAC,MAAK,KAAK,EAAE;YAClF,OAAO,KAAK,CAAC;SACd;QAED,MAAM,WAAW,GAAkC,MAAM,MAAM,CAAC,iBAAiB,EAAE,CAAC;QACpF,IAAI,WAAW,IAAI,WAAW,CAAC,MAAM,GAAG,CAAC,EAAE;YACzC,IAAI,CAAC,WAAW,GAAG,CAAC,GAAG,WAAW,EAAE,GAAG,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,KAAI,EAAE,CAAC,CAAC,CAAC;SACnE;QAED,OAAO,KAAK,CAAC;;CACd","sourcesContent":["import type { Event, EventHint, Integration } from '@sentry/types';\n\nimport type { ReactNativeClient } from '../client';\nimport type { Screenshot as ScreenshotAttachment } from '../wrapper';\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'Screenshot';\n\n/** Adds screenshots to error events */\nexport const screenshotIntegration = (): Integration => {\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n // noop\n },\n processEvent,\n };\n};\n\nasync function processEvent(event: Event, hint: EventHint, client: ReactNativeClient): Promise<Event> {\n const hasException = event.exception && event.exception.values && event.exception.values.length > 0;\n if (!hasException || client.getOptions().beforeScreenshot?.(event, hint) === false) {\n return event;\n }\n\n const screenshots: ScreenshotAttachment[] | null = await NATIVE.captureScreenshot();\n if (screenshots && screenshots.length > 0) {\n hint.attachments = [...screenshots, ...(hint?.attachments || [])];\n }\n\n return event;\n}\n"]}
@@ -1,13 +1,7 @@
1
- import type { Integration, IntegrationClass, IntegrationFnResult, SdkInfo as SdkInfoType } from '@sentry/types';
1
+ import type { Integration, SdkInfo as SdkInfoType } from '@sentry/types';
2
2
  type DefaultSdkInfo = Pick<Required<SdkInfoType>, 'name' | 'packages' | 'version'>;
3
3
  export declare const defaultSdkInfo: DefaultSdkInfo;
4
4
  /** Default SdkInfo instrumentation */
5
- export declare const sdkInfoIntegration: () => IntegrationFnResult;
6
- /**
7
- * Default SdkInfo instrumentation
8
- *
9
- * @deprecated Use `sdkInfoIntegration()` instead.
10
- */
11
- export declare const SdkInfo: IntegrationClass<Integration>;
5
+ export declare const sdkInfoIntegration: () => Integration;
12
6
  export {};
13
7
  //# sourceMappingURL=sdkinfo.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"sdkinfo.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/sdkinfo.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAEV,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EAEnB,OAAO,IAAI,WAAW,EACvB,MAAM,eAAe,CAAC;AASvB,KAAK,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC,CAAC;AAEnF,eAAO,MAAM,cAAc,EAAE,cAS5B,CAAC;AAEF,sCAAsC;AACtC,eAAO,MAAM,kBAAkB,QAAO,mBAUrC,CAAC;AAEF;;;;GAIG;AAEH,eAAO,MAAM,OAAO,+BAGc,CAAC"}
1
+ {"version":3,"file":"sdkinfo.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/sdkinfo.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,WAAW,EAAW,OAAO,IAAI,WAAW,EAAE,MAAM,eAAe,CAAC;AASzF,KAAK,cAAc,GAAG,IAAI,CAAC,QAAQ,CAAC,WAAW,CAAC,EAAE,MAAM,GAAG,UAAU,GAAG,SAAS,CAAC,CAAC;AAEnF,eAAO,MAAM,cAAc,EAAE,cAS5B,CAAC;AAEF,sCAAsC;AACtC,eAAO,MAAM,kBAAkB,QAAO,WAUrC,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { __awaiter } from "tslib";
2
- import { convertIntegrationFnToClass } from '@sentry/core';
3
2
  import { logger } from '@sentry/utils';
4
3
  import { isExpoGo, notWeb } from '../utils/environment';
5
4
  import { SDK_NAME, SDK_PACKAGE_NAME, SDK_VERSION } from '../version';
@@ -26,13 +25,6 @@ export const sdkInfoIntegration = () => {
26
25
  processEvent: (event) => processEvent(event, fetchNativeSdkInfo),
27
26
  };
28
27
  };
29
- /**
30
- * Default SdkInfo instrumentation
31
- *
32
- * @deprecated Use `sdkInfoIntegration()` instead.
33
- */
34
- // eslint-disable-next-line deprecation/deprecation
35
- export const SdkInfo = convertIntegrationFnToClass(INTEGRATION_NAME, sdkInfoIntegration);
36
28
  function processEvent(event, fetchNativeSdkInfo) {
37
29
  return __awaiter(this, void 0, void 0, function* () {
38
30
  const nativeSdkPackage = yield fetchNativ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CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,IAAI,EAAE,CAAC;QAC5B,KAAK,CAAC,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,cAAc,CAAC,IAAI,CAAC;QACvD,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC;QAChE,KAAK,CAAC,GAAG,CAAC,QAAQ,GAAG;YACnB,wEAAwE;YACxE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC;YAC7B,GAAG,CAAC,CAAC,gBAAgB,IAAI,CAAC,gBAAgB,CAAC,CAAC,IAAI,EAAE,CAAC;SACpD,CAAC;QAEF,OAAO,KAAK,CAAC;IACf,CAAC;CAAA;AAED,SAAS,8BAA8B;IACrC,IAAI,CAAC,MAAM,EAAE,IAAI,QAAQ,EAAE,EAAE;QAC3B,OAAO,GAAG,EAAE;YACV,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC,CAAC;KACH;IAED,IAAI,QAAQ,GAAY,KAAK,CAAC;IAC9B,IAAI,qBAAqB,GAAmB,IAAI,CAAC;IAEjD,OAAO,GAAS,EAAE;QAChB,IAAI,QAAQ,EAAE;YACZ,OAAO,qBAAqB,CAAC;SAC9B;QAED,IAAI;YACF,qBAAqB,GAAG,MAAM,MAAM,CAAC,kBAAkB,EAAE,CAAC;YAC1D,QAAQ,GAAG,IAAI,CAAC;SACjB;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,CAAC,IAAI,CAAC,kCAAkC,EAAE,CAAC,CAAC,CAAC;SACpD;QAED,OAAO,qBAAqB,CAAC;IAC/B,CAAC,CAAA,CAAC;AACJ,CAAC","sourcesContent":["import { convertIntegrationFnToClass } from '@sentry/core';\nimport type {\n Event,\n Integration,\n IntegrationClass,\n IntegrationFnResult,\n Package,\n SdkInfo as SdkInfoType,\n} from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport { isExpoGo, notWeb } from '../utils/environment';\nimport { SDK_NAME, SDK_PACKAGE_NAME, SDK_VERSION } from '../version';\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'SdkInfo';\n\ntype DefaultSdkInfo = Pick<Required<SdkInfoType>, 'name' | 'packages' | 'version'>;\n\nexport const defaultSdkInfo: DefaultSdkInfo = {\n name: SDK_NAME,\n packages: [\n {\n name: SDK_PACKAGE_NAME,\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n};\n\n/** Default SdkInfo instrumentation */\nexport const sdkInfoIntegration = (): IntegrationFnResult => {\n const fetchNativeSdkInfo = createCachedFetchNativeSdkInfo();\n\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n // noop\n },\n processEvent: (event: Event) => processEvent(event, fetchNativeSdkInfo),\n };\n};\n\n/**\n * Default SdkInfo instrumentation\n *\n * @deprecated Use `sdkInfoIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport const SdkInfo = convertIntegrationFnToClass(\n INTEGRATION_NAME,\n sdkInfoIntegration,\n) as IntegrationClass<Integration>;\n\nasync function processEvent(event: Event, fetchNativeSdkInfo: () => Promise<Package | null>): Promise<Event> {\n const nativeSdkPackage = await fetchNativeSdkInfo();\n\n event.platform = event.platform || 'javascript';\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || defaultSdkInfo.name;\n event.sdk.version = event.sdk.version || defaultSdkInfo.version;\n event.sdk.packages = [\n // default packages are added by baseclient and should not be added here\n ...(event.sdk.packages || []),\n ...((nativeSdkPackage && [nativeSdkPackage]) || []),\n ];\n\n return event;\n}\n\nfunction createCachedFetchNativeSdkInfo(): () => Promise<Package | null> {\n if (!notWeb() || isExpoGo()) {\n return () => {\n return Promise.resolve(null);\n };\n }\n\n let isCached: boolean = false;\n let nativeSdkPackageCache: Package | null = null;\n\n return async () => {\n if (isCached) {\n return nativeSdkPackageCache;\n }\n\n try {\n nativeSdkPackageCache = await NATIVE.fetchNativeSdkInfo();\n isCached = true;\n } catch (e) {\n logger.warn('Could not fetch native sdk info.', e);\n }\n\n return nativeSdkPackageCache;\n };\n}\n"]}
1
+ {"version":3,"file":"sdkinfo.js","sourceRoot":"","sources":["../../../src/js/integrations/sdkinfo.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,QAAQ,EAAE,gBAAgB,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACrE,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,gBAAgB,GAAG,SAAS,CAAC;AAInC,MAAM,CAAC,MAAM,cAAc,GAAmB;IAC5C,IAAI,EAAE,QAAQ;IACd,QAAQ,EAAE;QACR;YACE,IAAI,EAAE,gBAAgB;YACtB,OAAO,EAAE,WAAW;SACrB;KACF;IACD,OAAO,EAAE,WAAW;CACrB,CAAC;AAEF,sCAAsC;AACtC,MAAM,CAAC,MAAM,kBAAkB,GAAG,GAAgB,EAAE;IAClD,MAAM,kBAAkB,GAAG,8BAA8B,EAAE,CAAC;IAE5D,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,GAAG,EAAE;YACd,OAAO;QACT,CAAC;QACD,YAAY,EAAE,CAAC,KAAY,EAAE,EAAE,CAAC,YAAY,CAAC,KAAK,EAAE,kBAAkB,CAAC;KACxE,CAAC;AACJ,CAAC,CAAC;AAEF,SAAe,YAAY,CAAC,KAAY,EAAE,kBAAiD;;QACzF,MAAM,gBAAgB,GAAG,MAAM,kBAAkB,EAAE,CAAC;QAEpD,KAAK,CAAC,QAAQ,GAAG,KAAK,CAAC,QAAQ,IAAI,YAAY,CAAC;QAChD,KAAK,CAAC,GAAG,GAAG,KAAK,CAAC,GAAG,IAAI,EAAE,CAAC;QAC5B,KAAK,CAAC,GAAG,CAAC,IAAI,GAAG,KAAK,CAAC,GAAG,CAAC,IAAI,IAAI,cAAc,CAAC,IAAI,CAAC;QACvD,KAAK,CAAC,GAAG,CAAC,OAAO,GAAG,KAAK,CAAC,GAAG,CAAC,OAAO,IAAI,cAAc,CAAC,OAAO,CAAC;QAChE,KAAK,CAAC,GAAG,CAAC,QAAQ,GAAG;YACnB,wEAAwE;YACxE,GAAG,CAAC,KAAK,CAAC,GAAG,CAAC,QAAQ,IAAI,EAAE,CAAC;YAC7B,GAAG,CAAC,CAAC,gBAAgB,IAAI,CAAC,gBAAgB,CAAC,CAAC,IAAI,EAAE,CAAC;SACpD,CAAC;QAEF,OAAO,KAAK,CAAC;IACf,CAAC;CAAA;AAED,SAAS,8BAA8B;IACrC,IAAI,CAAC,MAAM,EAAE,IAAI,QAAQ,EAAE,EAAE;QAC3B,OAAO,GAAG,EAAE;YACV,OAAO,OAAO,CAAC,OAAO,CAAC,IAAI,CAAC,CAAC;QAC/B,CAAC,CAAC;KACH;IAED,IAAI,QAAQ,GAAY,KAAK,CAAC;IAC9B,IAAI,qBAAqB,GAAmB,IAAI,CAAC;IAEjD,OAAO,GAAS,EAAE;QAChB,IAAI,QAAQ,EAAE;YACZ,OAAO,qBAAqB,CAAC;SAC9B;QAED,IAAI;YACF,qBAAqB,GAAG,MAAM,MAAM,CAAC,kBAAkB,EAAE,CAAC;YAC1D,QAAQ,GAAG,IAAI,CAAC;SACjB;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,CAAC,IAAI,CAAC,kCAAkC,EAAE,CAAC,CAAC,CAAC;SACpD;QAED,OAAO,qBAAqB,CAAC;IAC/B,CAAC,CAAA,CAAC;AACJ,CAAC","sourcesContent":["import type { Event, Integration, Package, SdkInfo as SdkInfoType } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport { isExpoGo, notWeb } from '../utils/environment';\nimport { SDK_NAME, SDK_PACKAGE_NAME, SDK_VERSION } from '../version';\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'SdkInfo';\n\ntype DefaultSdkInfo = Pick<Required<SdkInfoType>, 'name' | 'packages' | 'version'>;\n\nexport const defaultSdkInfo: DefaultSdkInfo = {\n name: SDK_NAME,\n packages: [\n {\n name: SDK_PACKAGE_NAME,\n version: SDK_VERSION,\n },\n ],\n version: SDK_VERSION,\n};\n\n/** Default SdkInfo instrumentation */\nexport const sdkInfoIntegration = (): Integration => {\n const fetchNativeSdkInfo = createCachedFetchNativeSdkInfo();\n\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n // noop\n },\n processEvent: (event: Event) => processEvent(event, fetchNativeSdkInfo),\n };\n};\n\nasync function processEvent(event: Event, fetchNativeSdkInfo: () => Promise<Package | null>): Promise<Event> {\n const nativeSdkPackage = await fetchNativeSdkInfo();\n\n event.platform = event.platform || 'javascript';\n event.sdk = event.sdk || {};\n event.sdk.name = event.sdk.name || defaultSdkInfo.name;\n event.sdk.version = event.sdk.version || defaultSdkInfo.version;\n event.sdk.packages = [\n // default packages are added by baseclient and should not be added here\n ...(event.sdk.packages || []),\n ...((nativeSdkPackage && [nativeSdkPackage]) || []),\n ];\n\n return event;\n}\n\nfunction createCachedFetchNativeSdkInfo(): () => Promise<Package | null> {\n if (!notWeb() || isExpoGo()) {\n return () => {\n return Promise.resolve(null);\n };\n }\n\n let isCached: boolean = false;\n let nativeSdkPackageCache: Package | null = null;\n\n return async () => {\n if (isCached) {\n return nativeSdkPackageCache;\n }\n\n try {\n nativeSdkPackageCache = await NATIVE.fetchNativeSdkInfo();\n isCached = true;\n } catch (e) {\n logger.warn('Could not fetch native sdk info.', e);\n }\n\n return nativeSdkPackageCache;\n };\n}\n"]}
@@ -1,4 +1,4 @@
1
- import type { Integration, IntegrationFnResult } from '@sentry/types';
1
+ import type { Integration } from '@sentry/types';
2
2
  type SpotlightReactNativeIntegrationOptions = {
3
3
  /**
4
4
  * The URL of the Sidecar instance to connect and forward events to.
@@ -13,14 +13,6 @@ type SpotlightReactNativeIntegrationOptions = {
13
13
  *
14
14
  * Learn more about spotlight at https://spotlightjs.com
15
15
  */
16
- export declare function spotlightIntegration({ sidecarUrl, }?: SpotlightReactNativeIntegrationOptions): IntegrationFnResult;
17
- /**
18
- * Use this integration to send errors and transactions to Spotlight.
19
- *
20
- * Learn more about spotlight at https://spotlightjs.com
21
- *
22
- * @deprecated Use `spotlightIntegration()` instead.
23
- */
24
- export declare const Spotlight: (args_0?: SpotlightReactNativeIntegrationOptions | undefined) => Integration;
16
+ export declare function spotlightIntegration({ sidecarUrl, }?: SpotlightReactNativeIntegrationOptions): Integration;
25
17
  export {};
26
18
  //# sourceMappingURL=spotlight.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"spotlight.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/spotlight.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAKV,WAAW,EACX,mBAAmB,EACpB,MAAM,eAAe,CAAC;AAOvB,KAAK,sCAAsC,GAAG;IAC5C;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,UAAmC,GACpC,GAAE,sCAA2C,GAAG,mBAAmB,CAcnE;AAED;;;;;;GAMG;AACH,eAAO,MAAM,SAAS,mEAAiF,WAAW,CAAC"}
1
+ {"version":3,"file":"spotlight.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/spotlight.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAyD,WAAW,EAAE,MAAM,eAAe,CAAC;AAMxG,KAAK,sCAAsC,GAAG;IAC5C;;;;;OAKG;IACH,UAAU,CAAC,EAAE,MAAM,CAAC;CACrB,CAAC;AAEF;;;;GAIG;AACH,wBAAgB,oBAAoB,CAAC,EACnC,UAAmC,GACpC,GAAE,sCAA2C,GAAG,WAAW,CAc3D"}
@@ -1,5 +1,4 @@
1
1
  import { logger, serializeEnvelope } from '@sentry/utils';
2
- import { makeUtf8TextEncoder } from '../transports/TextEncoder';
3
2
  import { ReactNativeLibraries } from '../utils/rnlibraries';
4
3
  import { createStealthXhr, XHR_READYSTATE_DONE } from '../utils/xhr';
5
4
  /**
@@ -19,14 +18,6 @@ export function spotlightIntegration({ sidecarUrl = getDefaultSidecarUrl(), } =
19
18
  },
20
19
  };
21
20
  }
22
- /**
23
- * Use this integration to send errors and transactions to Spotlight.
24
- *
25
- * Learn more about spotlight at https://spotlightjs.com
26
- *
27
- * @deprecated Use `spotlightIntegration()` instead.
28
- */
29
- export const Spotlight = spotlightIntegration;
30
21
  function setup(client, sidecarUrl) {
31
22
  sendEnvelopesToSidecar(client, sidecarUrl);
32
23
  }
@@ -58,7 +49,7 @@ function sendEnvelopesToSidecar(client, sidecarUrl) {
58
49
  }
59
50
  }
60
51
  };
61
- xhr.send(serializeEnvelope(spotlightEnvelope, makeUtf8TextEncoder()));
52
+ xhr.send(serializeEnvelope(spotlightEnvelope));
62
53
  });
63
54
  }
64
55
  function getDefaultSidecarUrl() {
@@ -1 +1 @@
1
- {"version":3,"file":"spotlight.js","sourceRoot":"","sources":["../../../src/js/integrations/spotlight.ts"],"names":[],"mappings":"AAQA,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAE,mBAAmB,EAAE,MAAM,2BAA2B,CAAC;AAChE,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAYrE;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,EACnC,UAAU,GAAG,oBAAoB,EAAE,MACO,EAAE;IAC5C,MAAM,CAAC,IAAI,CAAC,+BAA+B,EAAE,UAAU,CAAC,CAAC;IAEzD,OAAO;QACL,IAAI,EAAE,WAAW;QAEjB,SAAS;YACP,qBAAqB;QACvB,CAAC;QAED,KAAK,CAAC,MAAmD;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AC1B,IAAI,MAAM,KAAK,CAAC,IAAI,CAAC,MAAM,IAAI,GAAG,IAAI,MAAM,GAAG,GAAG,CAAC,EAAE;oBACnD,8CAA8C;iBAC/C;qBAAM;oBACL,mBAAmB;oBACnB,MAAM,CAAC,KAAK,CACV,8GAA8G,EAC9G,IAAI,KAAK,CAAC,GAAG,CAAC,UAAU,CAAC,CAC1B,CAAC;iBACH;aACF;QACH,CAAC,CAAC;QAEF,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,EAAE,mBAAmB,EAAE,CAAC,CAAC,CAAC;IACxE,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,oBAAoB;;IAC3B,IAAI;QACF,MAAM,EAAE,GAAG,EAAE,GAAG,MAAA,oBAAoB,CAAC,QAAQ,0CAAE,YAAY,EAAE,CAAC;QAC9D,OAAO,UAAU,qBAAqB,CAAC,GAAG,CAAC,cAAc,CAAC;KAC3D;IAAC,OAAO,GAAG,EAAE;QACZ,8BAA8B;KAC/B;IACD,OAAO,8BAA8B,CAAC;AACxC,CAAC;AAED;;GAEG;AACH,SAAS,qBAAqB,CAAC,SAAiB;IAC9C,MAAM,KAAK,GAAG,oCAAoC,CAAC;IACnD,MAAM,OAAO,GAAG,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEvC,IAAI,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE;QACzB,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;KACnB;SAAM;QACL,qBAAqB;QACrB,OAAO,IAAI,CAAC;KACb;AACH,CAAC","sourcesContent":["import type {\n BaseTransportOptions,\n Client,\n ClientOptions,\n Envelope,\n Integration,\n IntegrationFnResult,\n} from '@sentry/types';\nimport { logger, serializeEnvelope } from '@sentry/utils';\n\nimport { makeUtf8TextEncoder } from '../transports/TextEncoder';\nimport { ReactNativeLibraries } from '../utils/rnlibraries';\nimport { createStealthXhr, XHR_READYSTATE_DONE } from '../utils/xhr';\n\ntype SpotlightReactNativeIntegrationOptions = {\n /**\n * The URL of the Sidecar instance to connect and forward events to.\n * If not set, Spotlight will try to connect to the Sidecar running on localhost:8969.\n *\n * @default \"http://localhost:8969/stream\"\n */\n sidecarUrl?: string;\n};\n\n/**\n * Use this integration to send errors and transactions to Spotlight.\n *\n * Learn more about spotlight at https://spotlightjs.com\n */\nexport function spotlightIntegration({\n sidecarUrl = getDefaultSidecarUrl(),\n}: SpotlightReactNativeIntegrationOptions = {}): IntegrationFnResult {\n logger.info('[Spotlight] Using Sidecar URL', sidecarUrl);\n\n return {\n name: 'Spotlight',\n\n setupOnce(): void {\n // nothing to do here\n },\n\n setup(client: Client<ClientOptions<BaseTransportOptions>>): void {\n setup(client, sidecarUrl);\n },\n };\n}\n\n/**\n * Use this integration to send errors and transactions to Spotlight.\n *\n * Learn more about spotlight at https://spotlightjs.com\n *\n * @deprecated Use `spotlightIntegration()` instead.\n */\nexport const Spotlight = spotlightIntegration as (...args: Parameters<typeof spotlightIntegration>) => Integration;\n\nfunction setup(client: Client, sidecarUrl: string): void {\n sendEnvelopesToSidecar(client, sidecarUrl);\n}\n\nfunction sendEnvelopesToSidecar(client: Client, sidecarUrl: string): void {\n if (!client.on) {\n return;\n }\n\n client.on('beforeEnvelope', (originalEnvelope: Envelope) => {\n // TODO: This is a workaround for spotlight/sidecar not supporting images\n const spotlightEnvelope: Envelope = [...originalEnvelope];\n const envelopeItems = [...originalEnvelope[1]].filter(\n item => typeof item[0].content_type !== 'string' || !item[0].content_type.startsWith('image'),\n );\n\n spotlightEnvelope[1] = envelopeItems as Envelope[1];\n\n const xhr = createStealthXhr();\n if (!xhr) {\n logger.error('[Spotlight] Sentry SDK can not create XHR object');\n return;\n }\n\n xhr.open('POST', sidecarUrl, true);\n xhr.setRequestHeader('Content-Type', 'application/x-sentry-envelope');\n\n xhr.onreadystatechange = function () {\n if (xhr.readyState === XHR_READYSTATE_DONE) {\n const status = xhr.status;\n if (status === 0 || (status >= 200 && status < 400)) {\n // The request has been completed successfully\n } else {\n // Handle the error\n logger.error(\n \"[Spotlight] Sentry SDK can't connect to Spotlight is it running? See https://spotlightjs.com to download it.\",\n new Error(xhr.statusText),\n );\n }\n }\n };\n\n xhr.send(serializeEnvelope(spotlightEnvelope, makeUtf8TextEncoder()));\n });\n}\n\nfunction getDefaultSidecarUrl(): string {\n try {\n const { url } = ReactNativeLibraries.Devtools?.getDevServer();\n return `http://${getHostnameFromString(url)}:8969/stream`;\n } catch (_oO) {\n // We can't load devserver URL\n }\n return 'http://localhost:8969/stream';\n}\n\n/**\n * React Native implementation of the URL class is missing the `hostname` property.\n */\nfunction getHostnameFromString(urlString: string): string | null {\n const regex = /^(?:\\w+:)?\\/\\/([^/:]+)(:\\d+)?(.*)$/;\n const matches = urlString.match(regex);\n\n if (matches && matches[1]) {\n return matches[1];\n } else {\n // Invalid URL format\n return null;\n }\n}\n"]}
1
+ {"version":3,"file":"spotlight.js","sourceRoot":"","sources":["../../../src/js/integrations/spotlight.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,MAAM,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC;AAE1D,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAYrE;;;;GAIG;AACH,MAAM,UAAU,oBAAoB,CAAC,EACnC,UAAU,GAAG,oBAAoB,EAAE,MACO,EAAE;IAC5C,MAAM,CAAC,IAAI,CAAC,+BAA+B,EAAE,UAAU,CAAC,CAAC;IAEzD,OAAO;QACL,IAAI,EAAE,WAAW;QAEjB,SAAS;YACP,qBAAqB;QACvB,CAAC;QAED,KAAK,CAAC,MAAmD;YACvD,KAAK,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;QAC5B,CAAC;KACF,CAAC;AACJ,CAAC;AAED,SAAS,KAAK,CAAC,MAAc,EAAE,UAAkB;IAC/C,sBAAsB,CAAC,MAAM,EAAE,UAAU,CAAC,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C;iBACH;aACF;QACH,CAAC,CAAC;QAEF,GAAG,CAAC,IAAI,CAAC,iBAAiB,CAAC,iBAAiB,CAAC,CAAC,CAAC;IACjD,CAAC,CAAC,CAAC;AACL,CAAC;AAED,SAAS,oBAAoB;;IAC3B,IAAI;QACF,MAAM,EAAE,GAAG,EAAE,GAAG,MAAA,oBAAoB,CAAC,QAAQ,0CAAE,YAAY,EAAE,CAAC;QAC9D,OAAO,UAAU,qBAAqB,CAAC,GAAG,CAAC,cAAc,CAAC;KAC3D;IAAC,OAAO,GAAG,EAAE;QACZ,8BAA8B;KAC/B;IACD,OAAO,8BAA8B,CAAC;AACxC,CAAC;AAED;;GAEG;AACH,SAAS,qBAAqB,CAAC,SAAiB;IAC9C,MAAM,KAAK,GAAG,oCAAoC,CAAC;IACnD,MAAM,OAAO,GAAG,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,CAAC;IAEvC,IAAI,OAAO,IAAI,OAAO,CAAC,CAAC,CAAC,EAAE;QACzB,OAAO,OAAO,CAAC,CAAC,CAAC,CAAC;KACnB;SAAM;QACL,qBAAqB;QACrB,OAAO,IAAI,CAAC;KACb;AACH,CAAC","sourcesContent":["import type { BaseTransportOptions, Client, ClientOptions, Envelope, Integration } from '@sentry/types';\nimport { logger, serializeEnvelope } from '@sentry/utils';\n\nimport { ReactNativeLibraries } from '../utils/rnlibraries';\nimport { createStealthXhr, XHR_READYSTATE_DONE } from '../utils/xhr';\n\ntype SpotlightReactNativeIntegrationOptions = {\n /**\n * The URL of the Sidecar instance to connect and forward events to.\n * If not set, Spotlight will try to connect to the Sidecar running on localhost:8969.\n *\n * @default \"http://localhost:8969/stream\"\n */\n sidecarUrl?: string;\n};\n\n/**\n * Use this integration to send errors and transactions to Spotlight.\n *\n * Learn more about spotlight at https://spotlightjs.com\n */\nexport function spotlightIntegration({\n sidecarUrl = getDefaultSidecarUrl(),\n}: SpotlightReactNativeIntegrationOptions = {}): Integration {\n logger.info('[Spotlight] Using Sidecar URL', sidecarUrl);\n\n return {\n name: 'Spotlight',\n\n setupOnce(): void {\n // nothing to do here\n },\n\n setup(client: Client<ClientOptions<BaseTransportOptions>>): void {\n setup(client, sidecarUrl);\n },\n };\n}\n\nfunction setup(client: Client, sidecarUrl: string): void {\n sendEnvelopesToSidecar(client, sidecarUrl);\n}\n\nfunction sendEnvelopesToSidecar(client: Client, sidecarUrl: string): void {\n if (!client.on) {\n return;\n }\n\n client.on('beforeEnvelope', (originalEnvelope: Envelope) => {\n // TODO: This is a workaround for spotlight/sidecar not supporting images\n const spotlightEnvelope: Envelope = [...originalEnvelope];\n const envelopeItems = [...originalEnvelope[1]].filter(\n item => typeof item[0].content_type !== 'string' || !item[0].content_type.startsWith('image'),\n );\n\n spotlightEnvelope[1] = envelopeItems as Envelope[1];\n\n const xhr = createStealthXhr();\n if (!xhr) {\n logger.error('[Spotlight] Sentry SDK can not create XHR object');\n return;\n }\n\n xhr.open('POST', sidecarUrl, true);\n xhr.setRequestHeader('Content-Type', 'application/x-sentry-envelope');\n\n xhr.onreadystatechange = function () {\n if (xhr.readyState === XHR_READYSTATE_DONE) {\n const status = xhr.status;\n if (status === 0 || (status >= 200 && status < 400)) {\n // The request has been completed successfully\n } else {\n // Handle the error\n logger.error(\n \"[Spotlight] Sentry SDK can't connect to Spotlight is it running? See https://spotlightjs.com to download it.\",\n new Error(xhr.statusText),\n );\n }\n }\n };\n\n xhr.send(serializeEnvelope(spotlightEnvelope));\n });\n}\n\nfunction getDefaultSidecarUrl(): string {\n try {\n const { url } = ReactNativeLibraries.Devtools?.getDevServer();\n return `http://${getHostnameFromString(url)}:8969/stream`;\n } catch (_oO) {\n // We can't load devserver URL\n }\n return 'http://localhost:8969/stream';\n}\n\n/**\n * React Native implementation of the URL class is missing the `hostname` property.\n */\nfunction getHostnameFromString(urlString: string): string | null {\n const regex = /^(?:\\w+:)?\\/\\/([^/:]+)(:\\d+)?(.*)$/;\n const matches = urlString.match(regex);\n\n if (matches && matches[1]) {\n return matches[1];\n } else {\n // Invalid URL format\n return null;\n }\n}\n"]}
@@ -1,10 +1,4 @@
1
- import type { Integration, IntegrationClass, IntegrationFnResult } from '@sentry/types';
1
+ import type { Integration } from '@sentry/types';
2
2
  /** Adds ViewHierarchy to error events */
3
- export declare const viewHierarchyIntegration: () => IntegrationFnResult;
4
- /**
5
- * Adds ViewHierarchy to error events
6
- *
7
- * @deprecated Use `viewHierarchyIntegration()` instead.
8
- */
9
- export declare const ViewHierarchy: IntegrationClass<Integration>;
3
+ export declare const viewHierarchyIntegration: () => Integration;
10
4
  //# sourceMappingURL=viewhierarchy.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"viewhierarchy.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/viewhierarchy.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAgC,WAAW,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,eAAe,CAAC;AAWtH,yCAAyC;AACzC,eAAO,MAAM,wBAAwB,QAAO,mBAQ3C,CAAC;AAEF;;;;GAIG;AAEH,eAAO,MAAM,aAAa,+BAGQ,CAAC"}
1
+ {"version":3,"file":"viewhierarchy.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/viewhierarchy.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAgC,WAAW,EAAE,MAAM,eAAe,CAAC;AAW/E,yCAAyC;AACzC,eAAO,MAAM,wBAAwB,QAAO,WAQ3C,CAAC"}
@@ -1,5 +1,4 @@
1
1
  import { __awaiter } from "tslib";
2
- import { convertIntegrationFnToClass } from '@sentry/core';
3
2
  import { logger } from '@sentry/utils';
4
3
  import { NATIVE } from '../wrapper';
5
4
  const filename = 'view-hierarchy.json';
@@ -16,13 +15,6 @@ export const viewHierarchyIntegration = () => {
16
15
  processEvent,
17
16
  };
18
17
  };
19
- /**
20
- * Adds ViewHierarchy to error events
21
- *
22
- * @deprecated Use `viewHierarchyIntegration()` instead.
23
- */
24
- // eslint-disable-next-line deprecation/deprecation
25
- export const ViewHierarchy = convertIntegrationFnToClass(INTEGRATION_NAME, viewHierarchyIntegration);
26
18
  function processEvent(event, hint) {
27
19
  return __awaiter(this, void 0, void 0, function* () {
28
20
  const hasException = event.exception && event.exception.values && event.exception.values.length > 0;
@@ -1 +1 @@
1
- {"version":3,"file":"viewhierarchy.js","sourceRoot":"","sources":["../../../src/js/integrations/viewhierarchy.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,2BAA2B,EAAE,MAAM,cAAc,CAAC;AAE3D,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,QAAQ,GAAW,qBAAqB,CAAC;AAC/C,MAAM,WAAW,GAAW,kBAAkB,CAAC;AAC/C,MAAM,cAAc,GAAG,sBAAsD,CAAC;AAE9E,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAEzC,yCAAyC;AACzC,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAwB,EAAE;IAChE,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,GAAG,EAAE;YACd,OAAO;QACT,CAAC;QACD,YAAY;KACb,CAAC;AACJ,CAAC,CAAC;AAEF;;;;GAIG;AACH,mDAAmD;AACnD,MAAM,CAAC,MAAM,aAAa,GAAG,2BAA2B,CACtD,gBAAgB,EAChB,wBAAwB,CACQ,CAAC;AAEnC,SAAe,YAAY,CAAC,KAAY,EAAE,IAAe;;QACvD,MAAM,YAAY,GAAG,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;QACpG,IAAI,CAAC,YAAY,EAAE;YACjB,OAAO,KAAK,CAAC;SACd;QAED,IAAI,aAAa,GAAsB,IAAI,CAAC;QAC5C,IAAI;YACF,aAAa,GAAG,MAAM,MAAM,CAAC,kBAAkB,EAAE,CAAC;SACnD;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,CAAC,KAAK,CAAC,2CAA2C,EAAE,CAAC,CAAC,CAAC;SAC9D;QAED,IAAI,aAAa,EAAE;YACjB,IAAI,CAAC,WAAW,GAAG;gBACjB;oBACE,QAAQ;oBACR,WAAW;oBACX,cAAc;oBACd,IAAI,EAAE,aAAa;iBACpB;gBACD,GAAG,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,KAAI,EAAE,CAAC;aAC7B,CAAC;SACH;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CAAA","sourcesContent":["import { convertIntegrationFnToClass } from '@sentry/core';\nimport type { Attachment, Event, EventHint, Integration, IntegrationClass, IntegrationFnResult } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport { NATIVE } from '../wrapper';\n\nconst filename: string = 'view-hierarchy.json';\nconst contentType: string = 'application/json';\nconst attachmentType = 'event.view_hierarchy' as Attachment['attachmentType'];\n\nconst INTEGRATION_NAME = 'ViewHierarchy';\n\n/** Adds ViewHierarchy to error events */\nexport const viewHierarchyIntegration = (): IntegrationFnResult => {\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n // noop\n },\n processEvent,\n };\n};\n\n/**\n * Adds ViewHierarchy to error events\n *\n * @deprecated Use `viewHierarchyIntegration()` instead.\n */\n// eslint-disable-next-line deprecation/deprecation\nexport const ViewHierarchy = convertIntegrationFnToClass(\n INTEGRATION_NAME,\n viewHierarchyIntegration,\n) as IntegrationClass<Integration>;\n\nasync function processEvent(event: Event, hint: EventHint): Promise<Event> {\n const hasException = event.exception && event.exception.values && event.exception.values.length > 0;\n if (!hasException) {\n return event;\n }\n\n let viewHierarchy: Uint8Array | null = null;\n try {\n viewHierarchy = await NATIVE.fetchViewHierarchy();\n } catch (e) {\n logger.error('Failed to get view hierarchy from native.', e);\n }\n\n if (viewHierarchy) {\n hint.attachments = [\n {\n filename,\n contentType,\n attachmentType,\n data: viewHierarchy,\n },\n ...(hint?.attachments || []),\n ];\n }\n\n return event;\n}\n"]}
1
+ {"version":3,"file":"viewhierarchy.js","sourceRoot":"","sources":["../../../src/js/integrations/viewhierarchy.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,QAAQ,GAAW,qBAAqB,CAAC;AAC/C,MAAM,WAAW,GAAW,kBAAkB,CAAC;AAC/C,MAAM,cAAc,GAAG,sBAAsD,CAAC;AAE9E,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAEzC,yCAAyC;AACzC,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAgB,EAAE;IACxD,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,GAAG,EAAE;YACd,OAAO;QACT,CAAC;QACD,YAAY;KACb,CAAC;AACJ,CAAC,CAAC;AAEF,SAAe,YAAY,CAAC,KAAY,EAAE,IAAe;;QACvD,MAAM,YAAY,GAAG,KAAK,CAAC,SAAS,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,IAAI,KAAK,CAAC,SAAS,CAAC,MAAM,CAAC,MAAM,GAAG,CAAC,CAAC;QACpG,IAAI,CAAC,YAAY,EAAE;YACjB,OAAO,KAAK,CAAC;SACd;QAED,IAAI,aAAa,GAAsB,IAAI,CAAC;QAC5C,IAAI;YACF,aAAa,GAAG,MAAM,MAAM,CAAC,kBAAkB,EAAE,CAAC;SACnD;QAAC,OAAO,CAAC,EAAE;YACV,MAAM,CAAC,KAAK,CAAC,2CAA2C,EAAE,CAAC,CAAC,CAAC;SAC9D;QAED,IAAI,aAAa,EAAE;YACjB,IAAI,CAAC,WAAW,GAAG;gBACjB;oBACE,QAAQ;oBACR,WAAW;oBACX,cAAc;oBACd,IAAI,EAAE,aAAa;iBACpB;gBACD,GAAG,CAAC,CAAA,IAAI,aAAJ,IAAI,uBAAJ,IAAI,CAAE,WAAW,KAAI,EAAE,CAAC;aAC7B,CAAC;SACH;QAED,OAAO,KAAK,CAAC;IACf,CAAC;CAAA","sourcesContent":["import type { Attachment, Event, EventHint, Integration } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport { NATIVE } from '../wrapper';\n\nconst filename: string = 'view-hierarchy.json';\nconst contentType: string = 'application/json';\nconst attachmentType = 'event.view_hierarchy' as Attachment['attachmentType'];\n\nconst INTEGRATION_NAME = 'ViewHierarchy';\n\n/** Adds ViewHierarchy to error events */\nexport const viewHierarchyIntegration = (): Integration => {\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n // noop\n },\n processEvent,\n };\n};\n\nasync function processEvent(event: Event, hint: EventHint): Promise<Event> {\n const hasException = event.exception && event.exception.values && event.exception.values.length > 0;\n if (!hasException) {\n return event;\n }\n\n let viewHierarchy: Uint8Array | null = null;\n try {\n viewHierarchy = await NATIVE.fetchViewHierarchy();\n } catch (e) {\n logger.error('Failed to get view hierarchy from native.', e);\n }\n\n if (viewHierarchy) {\n hint.attachments = [\n {\n filename,\n contentType,\n attachmentType,\n data: viewHierarchy,\n },\n ...(hint?.attachments || []),\n ];\n }\n\n return event;\n}\n"]}
@@ -1,7 +1,10 @@
1
- import type { BrowserTransportOptions } from '@sentry/browser/types/transports/types';
2
- import type { ProfilerProps } from '@sentry/react/types/profiler';
1
+ import type { makeFetchTransport } from '@sentry/browser';
2
+ import type { Profiler } from '@sentry/react';
3
3
  import type { CaptureContext, ClientOptions, Event, EventHint, Options } from '@sentry/types';
4
+ import type * as React from 'react';
4
5
  import type { TouchEventBoundaryProps } from './touchevents';
6
+ type ProfilerProps = React.ComponentProps<typeof Profiler>;
7
+ type BrowserTransportOptions = Parameters<typeof makeFetchTransport>[0];
5
8
  export interface BaseReactNativeOptions {
6
9
  /**
7
10
  * Enables native transport + device info + offline caching.
@@ -174,6 +177,34 @@ export interface BaseReactNativeOptions {
174
177
  * from the function, no screenshot will be attached.
175
178
  */
176
179
  beforeScreenshot?: (event: Event, hint: EventHint) => boolean;
180
+ /**
181
+ * Track the app start time by adding measurements to the first route transaction. If there is no routing instrumentation
182
+ * an app start transaction will be started.
183
+ *
184
+ * Requires performance monitoring to be enabled.
185
+ *
186
+ * @default true
187
+ */
188
+ enableAppStartTracking?: boolean;
189
+ /**
190
+ * Track the slow and frozen frames in the application. Enabling this options will add
191
+ * slow and frozen frames measurements to all created root spans (transactions).
192
+ *
193
+ * @default true
194
+ */
195
+ enableNativeFramesTracking?: boolean;
196
+ /**
197
+ * Track when and how long the JS event loop stalls for. Adds stalls as measurements to all transactions.
198
+ *
199
+ * @default true
200
+ */
201
+ enableStallTracking?: boolean;
202
+ /**
203
+ * Trace User Interaction events like touch and gestures.
204
+ *
205
+ * @default false
206
+ */
207
+ enableUserInteractionTracing?: boolean;
177
208
  /**
178
209
  * Options which are in beta, or otherwise not guaranteed to be stable.
179
210
  */
@@ -230,4 +261,5 @@ export interface ReactNativeWrapperOptions {
230
261
  * environment.
231
262
  */
232
263
  export declare function shouldEnableNativeNagger(userOptions: unknown): boolean;
264
+ export {};
233
265
  //# sourceMappingURL=options.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"options.d.ts","sourceRoot":"","sources":["../../src/js/options.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,wCAAwC,CAAC;AACtF,OAAO,KAAK,EAAE,aAAa,EAAE,MAAM,8BAA8B,CAAC;AAClE,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,KAAK,EAAE,SAAS,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAG9F,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAG7D,MAAM,WAAW,sBAAsB;IACrC;;;;;OAKG;IACH,YAAY,CAAC,EAAE,OAAO,CAAC;IAEvB;;;OAGG;IACH,yBAAyB,CAAC,EAAE,OAAO,CAAC;IAEpC;;;;;;;;;;OAUG;IACH,uBAAuB,CAAC,EAAE,OAAO,CAA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sourcesContent":["import type { BrowserTransportOptions } from '@sentry/browser/types/transports/types';\nimport type { ProfilerProps } from '@sentry/react/types/profiler';\nimport type { CaptureContext, ClientOptions, Event, EventHint, Options } from '@sentry/types';\nimport { Platform } from 'react-native';\n\nimport type { TouchEventBoundaryProps } from './touchevents';\nimport { getExpoConstants } from './utils/expomodules';\n\nexport interface BaseReactNativeOptions {\n /**\n * Enables native transport + device info + offline caching.\n * Be careful, disabling this also breaks automatic release setting.\n * This means you have to manage setting the release yourself.\n * Defaults to `true`.\n */\n enableNative?: boolean;\n\n /**\n * Enables native crashHandling. This only works if `enableNative` is `true`.\n * Defaults to `true`.\n */\n enableNativeCrashHandling?: boolean;\n\n /**\n * Initializes the native SDK on init.\n * Set this to `false` if you have an existing native SDK and don't want to re-initialize.\n *\n * NOTE: Be careful and only use this if you know what you are doing.\n * If you use this flag, make sure a native SDK is running before the JS Engine initializes or events might not be captured.\n * Also, make sure the DSN on both the React Native side and the native side are the same one.\n * We strongly recommend checking the documentation if you need to use this.\n *\n * @default true\n */\n autoInitializeNativeSdk?: boolean;\n\n /** Should the native nagger alert be shown or not. */\n enableNativeNagger?: boolean;\n\n /** Should sessions be tracked to Sentry Health or not. */\n enableAutoSessionTracking?: boolean;\n\n /** The interval to end a session if the App goes to the background. */\n sessionTrackingIntervalMillis?: number;\n\n /** Enable NDK on Android\n *\n * @default true\n */\n enableNdk?: boolean;\n\n /** Enable scope sync from Java to NDK on Android\n * Only has an effect if `enableNdk` is `true`.\n */\n enableNdkScopeSync?: boolean;\n\n /** When enabled, all the threads are automatically attached to all logged events on Android */\n attachThreads?: boolean;\n\n /**\n * When enabled, certain personally identifiable information (PII) is added by active integrations.\n *\n * @default false\n */\n sendDefaultPii?: boolean;\n\n /**\n * Callback that is called after the RN SDK on the JS Layer has made contact with the Native Layer.\n */\n onReady?: (response: {\n /** `true` if the native SDK has been initialized, `false` otherwise. */\n didCallNativeInit: boolean;\n }) => void;\n\n /** Enable auto performance tracking by default. Renamed from `enableAutoPerformanceTracking` in v5. */\n enableAutoPerformanceTracing?: boolean;\n\n /**\n * Enables Out of Memory Tracking for iOS and macCatalyst.\n * See the following link for more information and possible restrictions:\n * https://docs.sentry.io/platforms/apple/guides/ios/configuration/out-of-memory/\n *\n * Renamed from `enableOutOfMemoryTracking` in v5.\n *\n * @default true\n */\n enableWatchdogTerminationTracking?: boolean;\n\n /**\n * Set data to the inital scope\n * @deprecated Use `Sentry.configureScope(...)`\n */\n initialScope?: CaptureContext;\n\n /**\n * When enabled, Sentry will overwrite the global Promise instance to ensure that unhandled rejections are correctly tracked.\n * If you run into issues with Promise polyfills such as `core-js`, make sure you polyfill after Sentry is initialized.\n * Read more at https://docs.sentry.io/platforms/react-native/troubleshooting/#unhandled-promise-rejections\n *\n * When disabled, this option will not disable unhandled rejection tracking. Set `onunhandledrejection: false` on the `ReactNativeErrorHandlers` integration instead.\n *\n * @default true\n */\n patchGlobalPromise?: boolean;\n\n /**\n * The max cache items for capping the number of envelopes.\n *\n * @default 30\n */\n maxCacheItems?: number;\n\n /**\n * When enabled, the SDK tracks when the application stops responding for a specific amount of\n * time defined by the `appHangTimeoutInterval` option.\n *\n * iOS only\n *\n * @default true\n */\n enableAppHangTracking?: boolean;\n\n /**\n * The minimum amount of time an app should be unresponsive to be classified as an App Hanging.\n * The actual amount may be a little longer.\n * Avoid using values lower than 100ms, which may cause a lot of app hangs events being transmitted.\n * Value should be in seconds.\n *\n * iOS only\n *\n * @default 2\n */\n appHangTimeoutInterval?: number;\n\n /**\n * The max queue size for capping the number of envelopes waiting to be sent by Transport.\n */\n maxQueueSize?: number;\n\n /**\n * When enabled and a user experiences an error, Sentry provides the ability to take a screenshot and include it as an attachment.\n *\n * @default false\n */\n attachScreenshot?: boolean;\n\n /**\n * When enabled Sentry includes the current view hierarchy in the error attachments.\n *\n * @default false\n */\n attachViewHierarchy?: boolean;\n\n /**\n * When enabled, Sentry will capture failed XHR/Fetch requests. This option also enabled HTTP Errors on iOS.\n * [Sentry Android Gradle Plugin](https://docs.sentry.io/platforms/android/configuration/integrations/okhttp/)\n * is needed to capture HTTP Errors on Android.\n *\n * @default false\n */\n enableCaptureFailedRequests?: boolean;\n\n /**\n * This option will enable forwarding captured Sentry events to Spotlight.\n *\n * More details: https://spotlightjs.com/\n *\n * IMPORTANT: Only set this option to `true` while developing, not in production!\n *\n * @deprecated Use `spotlight` instead.\n */\n enableSpotlight?: boolean;\n\n /**\n * This option changes the default Spotlight Sidecar URL.\n *\n * By default, the SDK expects the Sidecar to be running\n * on the same host as React Native Metro Dev Server.\n *\n * More details: https://spotlightjs.com/\n *\n * @default \"http://localhost:8969/stream\"\n *\n * @deprecated Use `spotlight` instead.\n */\n spotlightSidecarUrl?: string;\n\n /**\n * If you use Spotlight by Sentry during development, use\n * this option to forward captured Sentry events to Spotlight.\n *\n * Either set it to true, or provide a specific Spotlight Sidecar URL.\n *\n * More details: https://spotlightjs.com/\n *\n * IMPORTANT: Only set this option to `true` while developing, not in production!\n */\n spotlight?: boolean | string;\n\n /**\n * Sets a callback which is executed before capturing screenshots. Only\n * relevant if `attachScreenshot` is set to true. When false is returned\n * from the function, no screenshot will be attached.\n */\n beforeScreenshot?: (event: Event, hint: EventHint) => boolean;\n\n /**\n * Options which are in beta, or otherwise not guaranteed to be stable.\n */\n _experiments?: {\n [key: string]: unknown;\n\n /**\n * The sample rate for profiling\n * 1.0 will profile all transactions and 0 will profile none.\n */\n profilesSampleRate?: number;\n\n /**\n * The sample rate for session-long replays.\n * 1.0 will record all sessions and 0 will record none.\n */\n replaysSessionSampleRate?: number;\n\n /**\n * The sample rate for sessions that has had an error occur.\n * This is independent of `sessionSampleRate`.\n * 1.0 will record all sessions and 0 will record none.\n */\n replaysOnErrorSampleRate?: number;\n };\n\n /**\n * This options changes the placement of the attached stacktrace of `captureMessage` in the event.\n *\n * @default false\n * @deprecated This option will be removed in the next major version. Use `beforeSend` instead.\n */\n useThreadsForMessageStack?: boolean;\n}\n\nexport interface ReactNativeTransportOptions extends BrowserTransportOptions {\n /**\n * @deprecated use `maxQueueSize` in the root of the SDK options.\n */\n bufferSize?: number;\n}\n\n/**\n * Configuration options for the Sentry ReactNative SDK.\n * @see ReactNativeFrontend for more information.\n */\n\nexport interface ReactNativeOptions\n extends Omit<Options<ReactNativeTransportOptions>, '_experiments'>,\n BaseReactNativeOptions {}\n\nexport interface ReactNativeClientOptions\n extends Omit<ClientOptions<ReactNativeTransportOptions>, 'tunnel' | '_experiments'>,\n BaseReactNativeOptions {}\n\nexport interface ReactNativeWrapperOptions {\n /** Props for the root React profiler */\n profilerProps?: ProfilerProps;\n\n /** Props for the root touch event boundary */\n touchEventBoundaryProps?: TouchEventBoundaryProps;\n}\n\n/**\n * If the user has not explicitly set `enableNativeNagger`\n * the function enables native nagging based on the current\n * environment.\n */\nexport function shouldEnableNativeNagger(userOptions: unknown): boolean {\n if (typeof userOptions === 'boolean') {\n // User can override the default behavior\n return userOptions;\n }\n\n if (Platform.OS === 'web' || Platform.OS === 'windows') {\n // We don't want to nag on known platforms that don't support native\n return false;\n }\n\n const expoConstants = getExpoConstants();\n if (expoConstants && expoConstants.appOwnership === 'expo') {\n // If the app is running in Expo Go, we don't want to nag\n return false;\n }\n\n return true;\n}\n"]}
1
+ {"version":3,"file":"options.js","sourceRoot":"","sources":["../../src/js/options.ts"],"names":[],"mappings":"AAIA,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAGxC,OAAO,EAAE,gBAAgB,EAAE,MAAM,qBAAqB,CAAC;AA0SvD;;;;GAIG;AACH,MAAM,UAAU,wBAAwB,CAAC,WAAoB;IAC3D,IAAI,OAAO,WAAW,KAAK,SAAS,EAAE;QACpC,yCAAyC;QACzC,OAAO,WAAW,CAAC;KACpB;IAED,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,QAAQ,CAAC,EAAE,KAAK,SAAS,EAAE;QACtD,oEAAoE;QACpE,OAAO,KAAK,CAAC;KACd;IAED,MAAM,aAAa,GAAG,gBAAgB,EAAE,CAAC;IACzC,IAAI,aAAa,IAAI,aAAa,CAAC,YAAY,KAAK,MAAM,EAAE;QAC1D,yDAAyD;QACzD,OAAO,KAAK,CAAC;KACd;IAED,OAAO,IAAI,CAAC;AACd,CAAC","sourcesContent":["import type { makeFetchTransport } from '@sentry/browser';\nimport type { Profiler } from '@sentry/react';\nimport type { CaptureContext, ClientOptions, Event, EventHint, Options } from '@sentry/types';\nimport type * as React from 'react';\nimport { Platform } from 'react-native';\n\nimport type { TouchEventBoundaryProps } from './touchevents';\nimport { getExpoConstants } from './utils/expomodules';\n\ntype ProfilerProps = React.ComponentProps<typeof Profiler>;\ntype BrowserTransportOptions = Parameters<typeof makeFetchTransport>[0];\n\nexport interface BaseReactNativeOptions {\n /**\n * Enables native transport + device info + offline caching.\n * Be careful, disabling this also breaks automatic release setting.\n * This means you have to manage setting the release yourself.\n * Defaults to `true`.\n */\n enableNative?: boolean;\n\n /**\n * Enables native crashHandling. This only works if `enableNative` is `true`.\n * Defaults to `true`.\n */\n enableNativeCrashHandling?: boolean;\n\n /**\n * Initializes the native SDK on init.\n * Set this to `false` if you have an existing native SDK and don't want to re-initialize.\n *\n * NOTE: Be careful and only use this if you know what you are doing.\n * If you use this flag, make sure a native SDK is running before the JS Engine initializes or events might not be captured.\n * Also, make sure the DSN on both the React Native side and the native side are the same one.\n * We strongly recommend checking the documentation if you need to use this.\n *\n * @default true\n */\n autoInitializeNativeSdk?: boolean;\n\n /** Should the native nagger alert be shown or not. */\n enableNativeNagger?: boolean;\n\n /** Should sessions be tracked to Sentry Health or not. */\n enableAutoSessionTracking?: boolean;\n\n /** The interval to end a session if the App goes to the background. */\n sessionTrackingIntervalMillis?: number;\n\n /** Enable NDK on Android\n *\n * @default true\n */\n enableNdk?: boolean;\n\n /** Enable scope sync from Java to NDK on Android\n * Only has an effect if `enableNdk` is `true`.\n */\n enableNdkScopeSync?: boolean;\n\n /** When enabled, all the threads are automatically attached to all logged events on Android */\n attachThreads?: boolean;\n\n /**\n * When enabled, certain personally identifiable information (PII) is added by active integrations.\n *\n * @default false\n */\n sendDefaultPii?: boolean;\n\n /**\n * Callback that is called after the RN SDK on the JS Layer has made contact with the Native Layer.\n */\n onReady?: (response: {\n /** `true` if the native SDK has been initialized, `false` otherwise. */\n didCallNativeInit: boolean;\n }) => void;\n\n /** Enable auto performance tracking by default. Renamed from `enableAutoPerformanceTracking` in v5. */\n enableAutoPerformanceTracing?: boolean;\n\n /**\n * Enables Out of Memory Tracking for iOS and macCatalyst.\n * See the following link for more information and possible restrictions:\n * https://docs.sentry.io/platforms/apple/guides/ios/configuration/out-of-memory/\n *\n * Renamed from `enableOutOfMemoryTracking` in v5.\n *\n * @default true\n */\n enableWatchdogTerminationTracking?: boolean;\n\n /**\n * Set data to the inital scope\n * @deprecated Use `Sentry.configureScope(...)`\n */\n initialScope?: CaptureContext;\n\n /**\n * When enabled, Sentry will overwrite the global Promise instance to ensure that unhandled rejections are correctly tracked.\n * If you run into issues with Promise polyfills such as `core-js`, make sure you polyfill after Sentry is initialized.\n * Read more at https://docs.sentry.io/platforms/react-native/troubleshooting/#unhandled-promise-rejections\n *\n * When disabled, this option will not disable unhandled rejection tracking. Set `onunhandledrejection: false` on the `ReactNativeErrorHandlers` integration instead.\n *\n * @default true\n */\n patchGlobalPromise?: boolean;\n\n /**\n * The max cache items for capping the number of envelopes.\n *\n * @default 30\n */\n maxCacheItems?: number;\n\n /**\n * When enabled, the SDK tracks when the application stops responding for a specific amount of\n * time defined by the `appHangTimeoutInterval` option.\n *\n * iOS only\n *\n * @default true\n */\n enableAppHangTracking?: boolean;\n\n /**\n * The minimum amount of time an app should be unresponsive to be classified as an App Hanging.\n * The actual amount may be a little longer.\n * Avoid using values lower than 100ms, which may cause a lot of app hangs events being transmitted.\n * Value should be in seconds.\n *\n * iOS only\n *\n * @default 2\n */\n appHangTimeoutInterval?: number;\n\n /**\n * The max queue size for capping the number of envelopes waiting to be sent by Transport.\n */\n maxQueueSize?: number;\n\n /**\n * When enabled and a user experiences an error, Sentry provides the ability to take a screenshot and include it as an attachment.\n *\n * @default false\n */\n attachScreenshot?: boolean;\n\n /**\n * When enabled Sentry includes the current view hierarchy in the error attachments.\n *\n * @default false\n */\n attachViewHierarchy?: boolean;\n\n /**\n * When enabled, Sentry will capture failed XHR/Fetch requests. This option also enabled HTTP Errors on iOS.\n * [Sentry Android Gradle Plugin](https://docs.sentry.io/platforms/android/configuration/integrations/okhttp/)\n * is needed to capture HTTP Errors on Android.\n *\n * @default false\n */\n enableCaptureFailedRequests?: boolean;\n\n /**\n * This option will enable forwarding captured Sentry events to Spotlight.\n *\n * More details: https://spotlightjs.com/\n *\n * IMPORTANT: Only set this option to `true` while developing, not in production!\n *\n * @deprecated Use `spotlight` instead.\n */\n enableSpotlight?: boolean;\n\n /**\n * This option changes the default Spotlight Sidecar URL.\n *\n * By default, the SDK expects the Sidecar to be running\n * on the same host as React Native Metro Dev Server.\n *\n * More details: https://spotlightjs.com/\n *\n * @default \"http://localhost:8969/stream\"\n *\n * @deprecated Use `spotlight` instead.\n */\n spotlightSidecarUrl?: string;\n\n /**\n * If you use Spotlight by Sentry during development, use\n * this option to forward captured Sentry events to Spotlight.\n *\n * Either set it to true, or provide a specific Spotlight Sidecar URL.\n *\n * More details: https://spotlightjs.com/\n *\n * IMPORTANT: Only set this option to `true` while developing, not in production!\n */\n spotlight?: boolean | string;\n\n /**\n * Sets a callback which is executed before capturing screenshots. Only\n * relevant if `attachScreenshot` is set to true. When false is returned\n * from the function, no screenshot will be attached.\n */\n beforeScreenshot?: (event: Event, hint: EventHint) => boolean;\n\n /**\n * Track the app start time by adding measurements to the first route transaction. If there is no routing instrumentation\n * an app start transaction will be started.\n *\n * Requires performance monitoring to be enabled.\n *\n * @default true\n */\n enableAppStartTracking?: boolean;\n\n /**\n * Track the slow and frozen frames in the application. Enabling this options will add\n * slow and frozen frames measurements to all created root spans (transactions).\n *\n * @default true\n */\n enableNativeFramesTracking?: boolean;\n\n /**\n * Track when and how long the JS event loop stalls for. Adds stalls as measurements to all transactions.\n *\n * @default true\n */\n enableStallTracking?: boolean;\n\n /**\n * Trace User Interaction events like touch and gestures.\n *\n * @default false\n */\n enableUserInteractionTracing?: boolean;\n\n /**\n * Options which are in beta, or otherwise not guaranteed to be stable.\n */\n _experiments?: {\n [key: string]: unknown;\n\n /**\n * The sample rate for profiling\n * 1.0 will profile all transactions and 0 will profile none.\n */\n profilesSampleRate?: number;\n\n /**\n * The sample rate for session-long replays.\n * 1.0 will record all sessions and 0 will record none.\n */\n replaysSessionSampleRate?: number;\n\n /**\n * The sample rate for sessions that has had an error occur.\n * This is independent of `sessionSampleRate`.\n * 1.0 will record all sessions and 0 will record none.\n */\n replaysOnErrorSampleRate?: number;\n };\n\n /**\n * This options changes the placement of the attached stacktrace of `captureMessage` in the event.\n *\n * @default false\n * @deprecated This option will be removed in the next major version. Use `beforeSend` instead.\n */\n useThreadsForMessageStack?: boolean;\n}\n\nexport interface ReactNativeTransportOptions extends BrowserTransportOptions {\n /**\n * @deprecated use `maxQueueSize` in the root of the SDK options.\n */\n bufferSize?: number;\n}\n\n/**\n * Configuration options for the Sentry ReactNative SDK.\n * @see ReactNativeFrontend for more information.\n */\n\nexport interface ReactNativeOptions\n extends Omit<Options<ReactNativeTransportOptions>, '_experiments'>,\n BaseReactNativeOptions {}\n\nexport interface ReactNativeClientOptions\n extends Omit<ClientOptions<ReactNativeTransportOptions>, 'tunnel' | '_experiments'>,\n BaseReactNativeOptions {}\n\nexport interface ReactNativeWrapperOptions {\n /** Props for the root React profiler */\n profilerProps?: ProfilerProps;\n\n /** Props for the root touch event boundary */\n touchEventBoundaryProps?: TouchEventBoundaryProps;\n}\n\n/**\n * If the user has not explicitly set `enableNativeNagger`\n * the function enables native nagging based on the current\n * environment.\n */\nexport function shouldEnableNativeNagger(userOptions: unknown): boolean {\n if (typeof userOptions === 'boolean') {\n // User can override the default behavior\n return userOptions;\n }\n\n if (Platform.OS === 'web' || Platform.OS === 'windows') {\n // We don't want to nag on known platforms that don't support native\n return false;\n }\n\n const expoConstants = getExpoConstants();\n if (expoConstants && expoConstants.appOwnership === 'expo') {\n // If the app is running in Expo Go, we don't want to nag\n return false;\n }\n\n return true;\n}\n"]}
@@ -1,6 +1,6 @@
1
1
  import type { AndroidCombinedProfileEvent, CombinedProfileEvent } from './types';
2
2
  export declare const PROFILE_QUEUE: {
3
- get: (key: string) => AndroidCombinedProfileEvent | CombinedProfileEvent | undefined;
3
+ get: (key: string) => AndroidCombinedProfileEvent | CombinedProfileEvent;
4
4
  add: (key: string, value: AndroidCombinedProfileEvent | CombinedProfileEvent) => void;
5
5
  delete: (key: string) => boolean;
6
6
  clear: () => void;
@@ -36,5 +36,5 @@ export interface Profile {
36
36
  samples: Sample[];
37
37
  stackFrames: Record<string, StackFrame>;
38
38
  }
39
- export declare const DEFAULT_BUNDLE_NAME: string | undefined;
39
+ export declare const DEFAULT_BUNDLE_NAME: string;
40
40
  //# sourceMappingURL=hermes.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"hermes.d.ts","sourceRoot":"","sources":["../../../src/js/profiling/hermes.ts"],"names":[],"mappings":"AAIA,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAClC,MAAM,MAAM,qBAAqB,GAAG,MAAM,CAAC;AAE3C,MAAM,WAAW,UAAU;IACzB,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,MAAM,CAAC;IACX,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MAAM,CAAC;IACZ,EAAE,EAAE,qBAAqB,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE;QACJ,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH;AAED,MAAM,WAAW,MAAM;IACrB,GAAG,EAAE,MAAM,CAAC;IACZ,IAAI,EAAE,MAAM,CAAC;IACb,EAAE,EAAE,qBAAqB,CAAC;IAC1B,GAAG,EAAE,MAAM,CAAC;IACZ,GAAG,EAAE,MA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AM,CAAC;IACZ,MAAM,EAAE,MAAM,CAAC;IACf,EAAE,EAAE,YAAY,CAAC;CAClB;AAED,MAAM,WAAW,UAAU;IAEzB,YAAY,CAAC,EAAE,MAAM,CAAC;IACtB,MAAM,CAAC,EAAE,MAAM,CAAC;IAGhB,IAAI,CAAC,EAAE,MAAM,CAAC;IACd,MAAM,CAAC,EAAE,MAAM,CAAC;IAChB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,UAAU,CAAC,EAAE,MAAM,CAAC;IAGpB,IAAI,EAAE,MAAM,CAAC;IACb,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB;AAED,MAAM,WAAW,OAAO;IACtB,WAAW,EAAE,UAAU,EAAE,CAAC;IAC1B,OAAO,EAAE,MAAM,EAAE,CAAC;IAClB,WAAW,EAAE,MAAM,CAAC,MAAM,EAAE,UAAU,CAAC,CAAC;CACzC;AAED,eAAO,MAAM,mBAAmB,QACuF,CAAC"}
@@ -1,4 +1,4 @@
1
- import type { Integration, IntegrationClass, IntegrationFn, ThreadCpuProfile } from '@sentry/types';
1
+ import type { IntegrationFn, ThreadCpuProfile } from '@sentry/types';
2
2
  import type { NativeAndroidProfileEvent, NativeProfileEvent } from './nativeTypes';
3
3
  import type { AndroidCombinedProfileEvent, CombinedProfileEvent, HermesProfileEvent } from './types';
4
4
  /**
@@ -7,12 +7,6 @@ import type { AndroidCombinedProfileEvent, CombinedProfileEvent, HermesProfileEv
7
7
  * @experimental
8
8
  */
9
9
  export declare const hermesProfilingIntegration: IntegrationFn;
10
- /**
11
- * Profiling integration creates a profile for each transaction and adds it to the event envelope.
12
- *
13
- * @deprecated Use `hermesProfilingIntegration()` instead.
14
- */
15
- export declare const HermesProfiling: IntegrationClass<Integration>;
16
10
  /**
17
11
  * Starts Profilers and returns the timestamp when profiling started in nanoseconds.
18
12
  */
@@ -1 +1 @@
1
- {"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../src/js/profiling/integration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAGV,WAAW,EACX,gBAAgB,EAChB,aAAa,EACb,gBAAgB,EAEjB,MAAM,eAAe,CAAC;AASvB,OAAO,KAAK,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,KAAK,EAAE,2BAA2B,EAAE,oBAAoB,EAAE,kBAAkB,EAAgB,MAAM,SAAS,CAAC;AAYnH;;;;GAIG;AACH,eAAO,MAAM,0BAA0B,EAAE,aA4KxC,CAAC;AAEF;;;;GAIG;AAEH,eAAO,MAAM,eAAe,+BAGM,CAAC;AAEnC;;GAEG;AACH,wBAAgB,cAAc,IAAI,MAAM,GAAG,IAAI,CAO9C;AAED;;GAEG;AACH,wBAAgB,aAAa,CAC3B,uBAAuB,EAAE,MAAM,GAC9B,oBAAoB,GAAG,2BAA2B,GAAG,IAAI,CAyB3D;AAED;;GAEG;AACH,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,kBAAkB,EAC1B,aAAa,EAAE,yBAAyB,EACxC,UAAU,EAAE,MAAM,GACjB,2BAA2B,CAQ7B;AAED;;GAEG;AACH,wBAAgB,+BAA+B,CAC7C,MAAM,EAAE,kBAAkB,EAC1B,MAAM,EAAE,kBAAkB,GACzB,oBAAoB,CAStB;AAED;;GAEG;AACH,wBAAgB,iCAAiC,CAC/C,MAAM,EAAE,gBAAgB,EACxB,MAAM,EAAE,gBAAgB,EACxB,uBAAuB,EAAE,MAAM,GAAG,SAAS,GAC1C,oBAAoB,CAAC,SAAS,CAAC,CAkCjC"}
1
+ {"version":3,"file":"integration.d.ts","sourceRoot":"","sources":["../../../src/js/profiling/integration.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAmB,aAAa,EAAQ,gBAAgB,EAAE,MAAM,eAAe,CAAC;AAU5F,OAAO,KAAK,EAAE,yBAAyB,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AACnF,OAAO,KAAK,EAAE,2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