@sentry/react-native 7.0.0-rc.1 → 7.0.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 (151) hide show
  1. package/RNSentry.podspec +3 -1
  2. package/android/build.gradle +1 -1
  3. package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +50 -5
  4. package/android/src/main/java/io/sentry/react/RNSentryVersion.java +1 -1
  5. package/android/src/newarch/java/io/sentry/react/RNSentryModule.java +5 -0
  6. package/dist/js/NativeRNSentry.d.ts +1 -0
  7. package/dist/js/NativeRNSentry.d.ts.map +1 -1
  8. package/dist/js/NativeRNSentry.js.map +1 -1
  9. package/dist/js/client.d.ts +2 -2
  10. package/dist/js/client.d.ts.map +1 -1
  11. package/dist/js/client.js +8 -8
  12. package/dist/js/client.js.map +1 -1
  13. package/dist/js/feedback/FeedbackWidget.js +12 -12
  14. package/dist/js/feedback/FeedbackWidget.js.map +1 -1
  15. package/dist/js/feedback/FeedbackWidgetManager.js +2 -2
  16. package/dist/js/feedback/FeedbackWidgetManager.js.map +1 -1
  17. package/dist/js/feedback/FeedbackWidgetProvider.js +3 -3
  18. package/dist/js/feedback/FeedbackWidgetProvider.js.map +1 -1
  19. package/dist/js/integrations/appRegistry.js +2 -2
  20. package/dist/js/integrations/appRegistry.js.map +1 -1
  21. package/dist/js/integrations/debugsymbolicator.js +3 -3
  22. package/dist/js/integrations/debugsymbolicator.js.map +1 -1
  23. package/dist/js/integrations/debugsymbolicatorutils.js +3 -3
  24. package/dist/js/integrations/debugsymbolicatorutils.js.map +1 -1
  25. package/dist/js/integrations/default.d.ts.map +1 -1
  26. package/dist/js/integrations/default.js +4 -1
  27. package/dist/js/integrations/default.js.map +1 -1
  28. package/dist/js/integrations/devicecontext.js +2 -2
  29. package/dist/js/integrations/devicecontext.js.map +1 -1
  30. package/dist/js/integrations/expocontext.d.ts.map +1 -1
  31. package/dist/js/integrations/expocontext.js +2 -2
  32. package/dist/js/integrations/expocontext.js.map +1 -1
  33. package/dist/js/integrations/exports.d.ts +1 -0
  34. package/dist/js/integrations/exports.d.ts.map +1 -1
  35. package/dist/js/integrations/exports.js +1 -0
  36. package/dist/js/integrations/exports.js.map +1 -1
  37. package/dist/js/integrations/logEnricherIntegration.d.ts +3 -0
  38. package/dist/js/integrations/logEnricherIntegration.d.ts.map +1 -0
  39. package/dist/js/integrations/logEnricherIntegration.js +65 -0
  40. package/dist/js/integrations/logEnricherIntegration.js.map +1 -0
  41. package/dist/js/integrations/modulesloader.js +2 -2
  42. package/dist/js/integrations/modulesloader.js.map +1 -1
  43. package/dist/js/integrations/reactnativeerrorhandlers.js +12 -12
  44. package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
  45. package/dist/js/integrations/reactnativeerrorhandlersutils.js +6 -6
  46. package/dist/js/integrations/reactnativeerrorhandlersutils.js.map +1 -1
  47. package/dist/js/integrations/sdkinfo.js +3 -3
  48. package/dist/js/integrations/sdkinfo.js.map +1 -1
  49. package/dist/js/integrations/spotlight.js +4 -4
  50. package/dist/js/integrations/spotlight.js.map +1 -1
  51. package/dist/js/integrations/viewhierarchy.js +2 -2
  52. package/dist/js/integrations/viewhierarchy.js.map +1 -1
  53. package/dist/js/options.d.ts +1 -1
  54. package/dist/js/options.d.ts.map +1 -1
  55. package/dist/js/options.js.map +1 -1
  56. package/dist/js/playground/modal.js +3 -3
  57. package/dist/js/playground/modal.js.map +1 -1
  58. package/dist/js/profiling/convertHermesProfile.js +5 -5
  59. package/dist/js/profiling/convertHermesProfile.js.map +1 -1
  60. package/dist/js/profiling/debugid.d.ts.map +1 -1
  61. package/dist/js/profiling/debugid.js +2 -2
  62. package/dist/js/profiling/debugid.js.map +1 -1
  63. package/dist/js/profiling/integration.js +13 -13
  64. package/dist/js/profiling/integration.js.map +1 -1
  65. package/dist/js/profiling/utils.js +3 -3
  66. package/dist/js/profiling/utils.js.map +1 -1
  67. package/dist/js/replay/CustomMask.js +3 -3
  68. package/dist/js/replay/CustomMask.js.map +1 -1
  69. package/dist/js/replay/mobilereplay.js +5 -5
  70. package/dist/js/replay/mobilereplay.js.map +1 -1
  71. package/dist/js/sdk.js +7 -7
  72. package/dist/js/sdk.js.map +1 -1
  73. package/dist/js/tools/ModulesCollector.js +12 -12
  74. package/dist/js/tools/ModulesCollector.js.map +1 -1
  75. package/dist/js/tools/enableLogger.js +1 -1
  76. package/dist/js/tools/enableLogger.js.map +1 -1
  77. package/dist/js/tools/metroMiddleware.js +6 -6
  78. package/dist/js/tools/metroMiddleware.js.map +1 -1
  79. package/dist/js/tools/metroconfig.js +2 -2
  80. package/dist/js/tools/metroconfig.js.map +1 -1
  81. package/dist/js/tools/sentryBabelTransformerUtils.d.ts.map +1 -1
  82. package/dist/js/tools/sentryBabelTransformerUtils.js +6 -6
  83. package/dist/js/tools/sentryBabelTransformerUtils.js.map +1 -1
  84. package/dist/js/tools/utils.d.ts.map +1 -1
  85. package/dist/js/tools/utils.js +39 -10
  86. package/dist/js/tools/utils.js.map +1 -1
  87. package/dist/js/tools/vendor/metro/utils.d.ts.map +1 -1
  88. package/dist/js/tools/vendor/metro/utils.js +28 -6
  89. package/dist/js/tools/vendor/metro/utils.js.map +1 -1
  90. package/dist/js/touchevents.js +3 -3
  91. package/dist/js/touchevents.js.map +1 -1
  92. package/dist/js/tracing/gesturetracing.js +5 -5
  93. package/dist/js/tracing/gesturetracing.js.map +1 -1
  94. package/dist/js/tracing/integrations/appStart.js +34 -34
  95. package/dist/js/tracing/integrations/appStart.js.map +1 -1
  96. package/dist/js/tracing/integrations/nativeFrames.js +14 -14
  97. package/dist/js/tracing/integrations/nativeFrames.js.map +1 -1
  98. package/dist/js/tracing/integrations/stalltracking.js +7 -7
  99. package/dist/js/tracing/integrations/stalltracking.js.map +1 -1
  100. package/dist/js/tracing/integrations/timeToDisplayIntegration.js +11 -11
  101. package/dist/js/tracing/integrations/timeToDisplayIntegration.js.map +1 -1
  102. package/dist/js/tracing/integrations/userInteraction.js +8 -8
  103. package/dist/js/tracing/integrations/userInteraction.js.map +1 -1
  104. package/dist/js/tracing/onSpanEndUtils.js +10 -10
  105. package/dist/js/tracing/onSpanEndUtils.js.map +1 -1
  106. package/dist/js/tracing/reactnativeprofiler.js +2 -2
  107. package/dist/js/tracing/reactnativeprofiler.js.map +1 -1
  108. package/dist/js/tracing/reactnavigation.js +14 -14
  109. package/dist/js/tracing/reactnavigation.js.map +1 -1
  110. package/dist/js/tracing/span.js +6 -6
  111. package/dist/js/tracing/span.js.map +1 -1
  112. package/dist/js/tracing/timetodisplay.d.ts.map +1 -1
  113. package/dist/js/tracing/timetodisplay.js +20 -30
  114. package/dist/js/tracing/timetodisplay.js.map +1 -1
  115. package/dist/js/tracing/utils.js +2 -2
  116. package/dist/js/tracing/utils.js.map +1 -1
  117. package/dist/js/utils/environment.d.ts.map +1 -1
  118. package/dist/js/utils/environment.js +2 -1
  119. package/dist/js/utils/environment.js.map +1 -1
  120. package/dist/js/utils/safe.js +3 -3
  121. package/dist/js/utils/safe.js.map +1 -1
  122. package/dist/js/utils/worldwide.d.ts +1 -0
  123. package/dist/js/utils/worldwide.d.ts.map +1 -1
  124. package/dist/js/utils/worldwide.js.map +1 -1
  125. package/dist/js/version.d.ts +1 -1
  126. package/dist/js/version.d.ts.map +1 -1
  127. package/dist/js/version.js +1 -1
  128. package/dist/js/version.js.map +1 -1
  129. package/dist/js/wrapper.d.ts +1 -0
  130. package/dist/js/wrapper.d.ts.map +1 -1
  131. package/dist/js/wrapper.js +40 -26
  132. package/dist/js/wrapper.js.map +1 -1
  133. package/ios/RNSentry+fetchNativeStack.m +101 -0
  134. package/ios/RNSentry.h +5 -0
  135. package/ios/RNSentry.mm +67 -77
  136. package/ios/RNSentryVersion.m +1 -1
  137. package/package.json +15 -14
  138. package/plugin/build/withSentryAndroid.js +7 -7
  139. package/plugin/build/withSentryAndroidGradlePlugin.d.ts +3 -2
  140. package/plugin/build/withSentryAndroidGradlePlugin.js +11 -22
  141. package/scripts/expo-upload-sourcemaps.js +1 -1
  142. package/scripts/sentry_utils.rb +4 -0
  143. package/src/js/NativeRNSentry.ts +1 -0
  144. package/ts3.8/dist/js/NativeRNSentry.d.ts +1 -0
  145. package/ts3.8/dist/js/client.d.ts +2 -2
  146. package/ts3.8/dist/js/integrations/exports.d.ts +1 -0
  147. package/ts3.8/dist/js/integrations/logEnricherIntegration.d.ts +3 -0
  148. package/ts3.8/dist/js/options.d.ts +1 -1
  149. package/ts3.8/dist/js/utils/worldwide.d.ts +1 -0
  150. package/ts3.8/dist/js/version.d.ts +1 -1
  151. package/ts3.8/dist/js/wrapper.d.ts +1 -0
@@ -1 +1 @@
1
- {"version":3,"file":"FeedbackWidgetManager.js","sourceRoot":"","sources":["../../../src/js/feedback/FeedbackWidgetManager.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,KAAK,EAAG,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,2CAA2C,EAAC,qCAAqC,EAAE,6CAA6C,EAAE,MAAM,QAAQ,CAAC;AAE1J,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAC;AAC7C,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAC5C,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,CAAC;AAEjD,MAAM,mBAAmB,GAAG,GAAS,EAAE;IACrC,QAAQ;AACV,CAAC,CAAC;AAEF,MAAe,eAAe;IAIlB,MAAM,KAAK,sBAAsB;QACzC,MAAM,IAAI,KAAK,CAAC,gDAAgD,CAAC,CAAC;IACpE,CAAC;IAEM,MAAM,CAAC,UAAU,CAAC,aAAyC;QAChE,IAAI,CAAC,cAAc,GAAG,aAAa,CAAC;IACtC,CAAC;IAED;;OAEG;IACI,MAAM,CAAC,KAAK;QACjB,IAAI,CAAC,UAAU,GAAG,KAAK,CAAC;QACxB,IAAI,CAAC,cAAc,GAAG,mBAAmB,CAAC;IAC5C,CAA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I,EAAE,CAAC;AAC/B,CAAC,CAAC;AAEF,MAAM,0BAA0B,GAAG,GAAS,EAAE;IAC5C,qBAAqB,CAAC,KAAK,EAAE,CAAC;AAChC,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,GAAS,EAAE;IACpC,2CAA2C,EAAE,CAAC;IAC9C,qBAAqB,CAAC,IAAI,EAAE,CAAC;AAC/B,CAAC,CAAC;AAEF,MAAM,kBAAkB,GAAG,GAAS,EAAE;IACpC,qBAAqB,CAAC,IAAI,EAAE,CAAC;AAC/B,CAAC,CAAC;AAEF,MAAM,0BAA0B,GAAG,GAAS,EAAE;IAC5C,qBAAqB,CAAC,KAAK,EAAE,CAAC;AAChC,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAG,GAAS,EAAE;IACtC,IAAI,KAAK,EAAE,EAAE;QACX,MAAM,CAAC,IAAI,CAAC,2CAA2C,CAAC,CAAC;QACzD,OAAO;KACR;IACD,6CAA6C,EAAE,CAAC;IAChD,uBAAuB,CAAC,IAAI,EAAE,CAAC;AACjC,CAAC,CAAC;AAEF,MAAM,oBAAoB,GAAG,GAAS,EAAE;IACtC,uBAAuB,CAAC,IAAI,EAAE,CAAC;AACjC,CAAC,CAAC;AAEF,MAAM,4BAA4B,GAAG,GAAS,EAAE;IAC9C,uBAAuB,CAAC,KAAK,EAAE,CAAC;AAClC,CAAC,CAAC;AAEF,OAAO,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,oBAAoB,EAAE,oBAAoB,EAAE,0BAA0B,EAAE,0BAA0B,EAAE,4BAA4B,EAAE,CAAC","sourcesContent":["import { logger } from '@sentry/core';\nimport { isWeb } from '../utils/environment';\nimport { lazyLoadAutoInjectFeedbackButtonIntegration,lazyLoadAutoInjectFeedbackIntegration, lazyLoadAutoInjectScreenshotButtonIntegration } from './lazy';\n\nexport const PULL_DOWN_CLOSE_THRESHOLD = 200;\nexport const SLIDE_ANIMATION_DURATION = 200;\nexport const BACKGROUND_ANIMATION_DURATION = 200;\n\nconst NOOP_SET_VISIBILITY = (): void => {\n // No-op\n};\n\nabstract class FeedbackManager {\n protected static _isVisible = false;\n protected static _setVisibility: (visible: boolean) => void;\n\n protected static get _feedbackComponentName(): string {\n throw new Error('Subclasses must override feedbackComponentName');\n }\n\n public static initialize(setVisibility: (visible: boolean) => void): void {\n this._setVisibility = setVisibility;\n }\n\n /**\n * For testing purposes only.\n */\n public static reset(): void {\n this._isVisible = false;\n this._setVisibility = NOOP_SET_VISIBILITY;\n }\n\n public static show(): void {\n if (this._setVisibility !== NOOP_SET_VISIBILITY) {\n this._isVisible = true;\n this._setVisibility(true);\n } else {\n // This message should be always shown otherwise it's not possible to use the widget.\n // eslint-disable-next-line no-console\n console.warn(`[Sentry] ${this._feedbackComponentName} requires 'Sentry.wrap(RootComponent)' to be called before 'show${this._feedbackComponentName}()'.`);\n }\n }\n\n public static hide(): void {\n if (this._setVisibility !== NOOP_SET_VISIBILITY) {\n this._isVisible = false;\n this._setVisibility(false);\n } else {\n // This message should be always shown otherwise it's not possible to use the widget.\n // eslint-disable-next-line no-console\n console.warn(`[Sentry] ${this._feedbackComponentName} requires 'Sentry.wrap(RootComponent)' before interacting with the widget.`);\n }\n }\n\n public static isFormVisible(): boolean {\n return this._isVisible;\n }\n}\n\n/**\n * Provides functionality to show and hide the feedback widget.\n */\nexport class FeedbackWidgetManager extends FeedbackManager {\n /**\n * Returns the name of the feedback component.\n */\n protected static get _feedbackComponentName(): string {\n return 'FeedbackWidget';\n }\n}\n\n/**\n * Provides functionality to show and hide the feedback button.\n */\nexport class FeedbackButtonManager extends FeedbackManager {\n /**\n * Returns the name of the feedback component.\n */\n protected static get _feedbackComponentName(): string {\n return 'FeedbackButton';\n }\n}\n\n/**\n * Provides functionality to show and hide the screenshot button.\n */\nexport class ScreenshotButtonManager extends FeedbackManager {\n /**\n * Returns the name of the feedback component.\n */\n protected static get _feedbackComponentName(): string {\n return 'ScreenshotButton';\n }\n}\n\nconst showFeedbackWidget = (): void => {\n lazyLoadAutoInjectFeedbackIntegration();\n FeedbackWidgetManager.show();\n};\n\nconst resetFeedbackWidgetManager = (): void => {\n FeedbackWidgetManager.reset();\n};\n\nconst showFeedbackButton = (): void => {\n lazyLoadAutoInjectFeedbackButtonIntegration();\n FeedbackButtonManager.show();\n};\n\nconst hideFeedbackButton = (): void => {\n FeedbackButtonManager.hide();\n};\n\nconst resetFeedbackButtonManager = (): void => {\n FeedbackButtonManager.reset();\n};\n\nconst showScreenshotButton = (): void => {\n if (isWeb()) {\n logger.warn('ScreenshotButton is not supported on Web.');\n return;\n }\n lazyLoadAutoInjectScreenshotButtonIntegration();\n ScreenshotButtonManager.show();\n};\n\nconst hideScreenshotButton = (): void => {\n ScreenshotButtonManager.hide();\n};\n\nconst resetScreenshotButtonManager = (): void => {\n ScreenshotButtonManager.reset();\n};\n\nexport { showFeedbackButton, hideFeedbackButton, showFeedbackWidget, showScreenshotButton, hideScreenshotButton, resetFeedbackButtonManager, resetFeedbackWidgetManager, resetScreenshotButtonManager };\n"]}
1
+ {"version":3,"file":"FeedbackWidgetManager.js","sourceRoot":"","sources":["../../../src/js/feedback/FeedbackWidgetManager.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,KAAK,EAAG,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,2CAA2C,EAAC,qCAAqC,EAAE,6CAA6C,EAAE,MAAM,QAAQ,CAAC;AAE1J,MAAM,CAAC,MAAM,yBAAyB,GAAG,GAAG,CAAC;AAC7C,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAG,CAAC;AAC5C,MAAM,CAAC,MAAM,6BAA6B,GAAG,GAAG,CAAC;AAEjD,MAAM,mBAAmB,GAAG,GAAS,EAAE;IACrC,QAAQ;AACV,CAAC,CAAC;AAEF,MAAe,eAAe;IAIlB,MAAM,KAAK,sBAAsB;QACzC,MAAM,IAAI,KAAK,CAAC,gDAAg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EAAE,CAAC","sourcesContent":["import { debug } from '@sentry/core';\nimport { isWeb } from '../utils/environment';\nimport { lazyLoadAutoInjectFeedbackButtonIntegration,lazyLoadAutoInjectFeedbackIntegration, lazyLoadAutoInjectScreenshotButtonIntegration } from './lazy';\n\nexport const PULL_DOWN_CLOSE_THRESHOLD = 200;\nexport const SLIDE_ANIMATION_DURATION = 200;\nexport const BACKGROUND_ANIMATION_DURATION = 200;\n\nconst NOOP_SET_VISIBILITY = (): void => {\n // No-op\n};\n\nabstract class FeedbackManager {\n protected static _isVisible = false;\n protected static _setVisibility: (visible: boolean) => void;\n\n protected static get _feedbackComponentName(): string {\n throw new Error('Subclasses must override feedbackComponentName');\n }\n\n public static initialize(setVisibility: (visible: boolean) => void): void {\n this._setVisibility = setVisibility;\n }\n\n /**\n * For testing purposes only.\n */\n public static reset(): void {\n this._isVisible = false;\n this._setVisibility = NOOP_SET_VISIBILITY;\n }\n\n public static show(): void {\n if (this._setVisibility !== NOOP_SET_VISIBILITY) {\n this._isVisible = true;\n this._setVisibility(true);\n } else {\n // This message should be always shown otherwise it's not possible to use the widget.\n // eslint-disable-next-line no-console\n console.warn(`[Sentry] ${this._feedbackComponentName} requires 'Sentry.wrap(RootComponent)' to be called before 'show${this._feedbackComponentName}()'.`);\n }\n }\n\n public static hide(): void {\n if (this._setVisibility !== NOOP_SET_VISIBILITY) {\n this._isVisible = false;\n this._setVisibility(false);\n } else {\n // This message should be always shown otherwise it's not possible to use the widget.\n // eslint-disable-next-line no-console\n console.warn(`[Sentry] ${this._feedbackComponentName} requires 'Sentry.wrap(RootComponent)' before interacting with the widget.`);\n }\n }\n\n public static isFormVisible(): boolean {\n return this._isVisible;\n }\n}\n\n/**\n * Provides functionality to show and hide the feedback widget.\n */\nexport class FeedbackWidgetManager extends FeedbackManager {\n /**\n * Returns the name of the feedback component.\n */\n protected static get _feedbackComponentName(): string {\n return 'FeedbackWidget';\n }\n}\n\n/**\n * Provides functionality to show and hide the feedback button.\n */\nexport class FeedbackButtonManager extends FeedbackManager {\n /**\n * Returns the name of the feedback component.\n */\n protected static get _feedbackComponentName(): string {\n return 'FeedbackButton';\n }\n}\n\n/**\n * Provides functionality to show and hide the screenshot button.\n */\nexport class ScreenshotButtonManager extends FeedbackManager {\n /**\n * Returns the name of the feedback component.\n */\n protected static get _feedbackComponentName(): string {\n return 'ScreenshotButton';\n }\n}\n\nconst showFeedbackWidget = (): void => {\n lazyLoadAutoInjectFeedbackIntegration();\n FeedbackWidgetManager.show();\n};\n\nconst resetFeedbackWidgetManager = (): void => {\n FeedbackWidgetManager.reset();\n};\n\nconst showFeedbackButton = (): void => {\n lazyLoadAutoInjectFeedbackButtonIntegration();\n FeedbackButtonManager.show();\n};\n\nconst hideFeedbackButton = (): void => {\n FeedbackButtonManager.hide();\n};\n\nconst resetFeedbackButtonManager = (): void => {\n FeedbackButtonManager.reset();\n};\n\nconst showScreenshotButton = (): void => {\n if (isWeb()) {\n debug.warn('ScreenshotButton is not supported on Web.');\n return;\n }\n lazyLoadAutoInjectScreenshotButtonIntegration();\n ScreenshotButtonManager.show();\n};\n\nconst hideScreenshotButton = (): void => {\n ScreenshotButtonManager.hide();\n};\n\nconst resetScreenshotButtonManager = (): void => {\n ScreenshotButtonManager.reset();\n};\n\nexport { showFeedbackButton, hideFeedbackButton, showFeedbackWidget, showScreenshotButton, hideScreenshotButton, resetFeedbackButtonManager, resetFeedbackWidgetManager, resetScreenshotButtonManager };\n"]}
@@ -1,4 +1,4 @@
1
- import { logger } from '@sentry/core';
1
+ import { debug } from '@sentry/core';
2
2
  import * as React from 'react';
3
3
  import { Animated, Appearance, Dimensions, Easing, Modal, PanResponder, Platform, ScrollView, View } from 'react-native';
4
4
  import { notWeb } from '../utils/environment';
@@ -138,7 +138,7 @@ export class FeedbackWidgetProvider extends React.Component {
138
138
  easing: Easing.in(Easing.quad),
139
139
  }),
140
140
  ]).start(() => {
141
- logger.info('FeedbackWidgetProvider componentDidUpdate');
141
+ debug.log('FeedbackWidgetProvider componentDidUpdate');
142
142
  });
143
143
  }
144
144
  else if (prevState.isVisible && !this.state.isVisible) {
@@ -150,7 +150,7 @@ export class FeedbackWidgetProvider extends React.Component {
150
150
  */
151
151
  render() {
152
152
  if (!isModalSupported()) {
153
- logger.error('FeedbackWidget Modal is not supported in React Native < 0.71 with Fabric renderer.');
153
+ debug.error('FeedbackWidget Modal is not supported in React Native < 0.71 with Fabric renderer.');
154
154
  return React.createElement(React.Fragment, null, this.props.children);
155
155
  }
156
156
  const theme = getTheme();
@@ -1 +1 @@
1
- {"version":3,"file":"FeedbackWidgetProvider.js","sourceRoot":"","sources":["../../../src/js/feedback/FeedbackWidgetProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAkF,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzM,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAC,YAAY,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EACL,6BAA6B,EAC7B,qBAAqB,EACrB,qBAAqB,EACrB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,GACzB,MAAM,yBAAyB,CAAC;AACjC,OAAO,EAAE,wBAAwB,EAAE,kBAAkB,EAAE,0BAA0B,EAAE,MAAM,eAAe,CAAC;AACzG,OAAO,EAAE,gBAAgB,EAAE,MAAM,oBAAoB,CAAC;AACtD,OAAO,EAAE,gBA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,IAAI,CAAC,YAAY,IAClC,CACS,CACC,CACV,CACM,CACjB,CACA,CACJ,CAAC;IACJ,CAAC;CA6CF","sourcesContent":["import { logger } from '@sentry/core';\nimport * as React from 'react';\nimport { type NativeEventSubscription, type NativeScrollEvent,type NativeSyntheticEvent, Animated, Appearance, Dimensions, Easing, Modal, PanResponder, Platform, ScrollView, View } from 'react-native';\nimport { notWeb } from '../utils/environment';\nimport { FeedbackButton } from './FeedbackButton';\nimport { FeedbackWidget } from './FeedbackWidget';\nimport { modalSheetContainer,modalWrapper, topSpacer } from './FeedbackWidget.styles';\nimport { getTheme } from './FeedbackWidget.theme';\nimport type { FeedbackWidgetStyles } from './FeedbackWidget.types';\nimport {\n BACKGROUND_ANIMATION_DURATION,\n FeedbackButtonManager,\n FeedbackWidgetManager,\n PULL_DOWN_CLOSE_THRESHOLD,\n ScreenshotButtonManager,\n SLIDE_ANIMATION_DURATION,\n} from './FeedbackWidgetManager';\nimport { getFeedbackButtonOptions, getFeedbackOptions, getScreenshotButtonOptions } from './integration';\nimport { ScreenshotButton } from './ScreenshotButton';\nimport { isModalSupported, isNativeDriverSupportedForColorAnimations } from './utils';\n\nconst useNativeDriverForColorAnimations = isNativeDriverSupportedForColorAnimations();\n\nexport interface FeedbackWidgetProviderProps {\n children: React.ReactNode;\n styles?: FeedbackWidgetStyles;\n}\n\nexport interface FeedbackWidgetProviderState {\n isButtonVisible: boolean;\n isScreenshotButtonVisible: boolean;\n isVisible: boolean;\n backgroundOpacity: Animated.Value;\n panY: Animated.Value;\n isScrollAtTop: boolean;\n}\n\n/**\n * FeedbackWidgetProvider is a component that wraps the feedback widget and provides\n * functionality to show and hide the widget. It also manages the visibility of the\n * feedback button and screenshot button.\n */\nexport class FeedbackWidgetProvider extends React.Component<FeedbackWidgetProviderProps> {\n public state: FeedbackWidgetProviderState = {\n isButtonVisible: false,\n isScreenshotButtonVisible: false,\n isVisible: false,\n backgroundOpacity: new Animated.Value(0),\n panY: new Animated.Value(Dimensions.get('screen').height),\n isScrollAtTop: true,\n };\n\n private _themeListener: NativeEventSubscription | undefined;\n\n private _panResponder = PanResponder.create({\n onStartShouldSetPanResponder: (_, gestureState) => {\n return notWeb() && this.state.isScrollAtTop && gestureState.dy > 0;\n },\n onMoveShouldSetPanResponder: (_, gestureState) => {\n return notWeb() && this.state.isScrollAtTop && gestureState.dy > 0;\n },\n onPanResponderMove: (_, gestureState) => {\n if (gestureState.dy > 0) {\n this.state.panY.setValue(gestureState.dy);\n }\n },\n onPanResponderRelease: (_, gestureState) => {\n if (gestureState.dy > PULL_DOWN_CLOSE_THRESHOLD) {\n // Close on swipe below a certain threshold\n Animated.timing(this.state.panY, {\n toValue: Dimensions.get('screen').height,\n duration: SLIDE_ANIMATION_DURATION,\n useNativeDriver: true,\n }).start(() => {\n this._handleClose();\n });\n } else {\n // Animate it back to the original position\n Animated.spring(this.state.panY, {\n toValue: 0,\n useNativeDriver: true,\n }).start();\n }\n },\n });\n\n public constructor(props: FeedbackWidgetProviderProps) {\n super(props);\n FeedbackButtonManager.initialize(this._setButtonVisibilityFunction);\n ScreenshotButtonManager.initialize(this._setScreenshotButtonVisibilityFunction);\n FeedbackWidgetManager.initialize(this._setVisibilityFunction);\n }\n\n /**\n * Add a listener to the theme change event.\n */\n public componentDidMount(): void {\n this._themeListener = Appearance.addChangeListener(() => {\n this.forceUpdate();\n });\n }\n\n /**\n * Clean up the theme listener.\n */\n public componentWillUnmount(): void {\n if (this._themeListener) {\n this._themeListener.remove();\n }\n }\n\n /**\n * Animates the background opacity when the modal is shown.\n */\n public componentDidUpdate(_prevProps: any, prevState: FeedbackWidgetProviderState): void {\n if (!prevState.isVisible && this.state.isVisible) {\n Animated.parallel([\n Animated.timing(this.state.backgroundOpacity, {\n toValue: 1,\n duration: BACKGROUND_ANIMATION_DURATION,\n useNativeDriver: useNativeDriverForColorAnimations,\n easing: Easing.in(Easing.quad),\n }),\n Animated.timing(this.state.panY, {\n toValue: 0,\n duration: SLIDE_ANIMATION_DURATION,\n useNativeDriver: true,\n easing: Easing.in(Easing.quad),\n }),\n ]).start(() => {\n logger.info('FeedbackWidgetProvider componentDidUpdate');\n });\n } else if (prevState.isVisible && !this.state.isVisible) {\n this.state.backgroundOpacity.setValue(0);\n }\n }\n\n /**\n * Renders the feedback form modal.\n */\n public render(): React.ReactNode {\n if (!isModalSupported()) {\n logger.error('FeedbackWidget Modal is not supported in React Native < 0.71 with Fabric renderer.');\n return <>{this.props.children}</>;\n }\n\n const theme = getTheme();\n\n const { isButtonVisible, isScreenshotButtonVisible, isVisible, backgroundOpacity } = this.state;\n\n const backgroundColor = backgroundOpacity.interpolate({\n inputRange: [0, 1],\n outputRange: ['rgba(0, 0, 0, 0)', 'rgba(0, 0, 0, 0.9)'],\n });\n\n // Wrapping the `Modal` component in a `View` component is necessary to avoid\n // issues like https://github.com/software-mansion/react-native-reanimated/issues/6035\n return (\n <>\n {this.props.children}\n {isButtonVisible && <FeedbackButton {...getFeedbackButtonOptions()} />}\n {isScreenshotButtonVisible && <ScreenshotButton {...getScreenshotButtonOptions()} />}\n {isVisible && (\n <Animated.View style={[modalWrapper, { backgroundColor }]}>\n <Modal\n visible={isVisible}\n transparent\n animationType=\"none\"\n onRequestClose={this._handleClose}\n testID=\"feedback-form-modal\"\n >\n <View style={topSpacer} />\n <Animated.View\n style={[modalSheetContainer(theme), { transform: [{ translateY: this.state.panY }] }]}\n {...this._panResponder.panHandlers}\n >\n <ScrollView\n bounces={false}\n keyboardShouldPersistTaps=\"handled\"\n automaticallyAdjustKeyboardInsets={Platform.OS === 'ios'}\n onScroll={this._handleScroll}\n >\n <FeedbackWidget\n {...getFeedbackOptions()}\n onFormClose={this._handleClose}\n onFormSubmitted={this._handleClose}\n />\n </ScrollView>\n </Animated.View>\n </Modal>\n </Animated.View>\n )}\n </>\n );\n }\n\n private _handleScroll = (event: NativeSyntheticEvent<NativeScrollEvent>): void => {\n this.setState({ isScrollAtTop: event.nativeEvent.contentOffset.y <= 0 });\n };\n\n private _setVisibilityFunction = (visible: boolean): void => {\n const updateState = (): void => {\n this.setState({ isVisible: visible });\n };\n if (!visible) {\n Animated.parallel([\n Animated.timing(this.state.panY, {\n toValue: Dimensions.get('screen').height,\n duration: SLIDE_ANIMATION_DURATION,\n useNativeDriver: true,\n easing: Easing.out(Easing.quad),\n }),\n Animated.timing(this.state.backgroundOpacity, {\n toValue: 0,\n duration: BACKGROUND_ANIMATION_DURATION,\n useNativeDriver: useNativeDriverForColorAnimations,\n easing: Easing.out(Easing.quad),\n }),\n ]).start(() => {\n // Change of the state unmount the component\n // which would cancel the animation\n updateState();\n });\n } else {\n updateState();\n }\n };\n\n private _setButtonVisibilityFunction = (visible: boolean): void => {\n this.setState({ isButtonVisible: visible });\n };\n\n private _setScreenshotButtonVisibilityFunction = (visible: boolean): void => {\n this.setState({ isScreenshotButtonVisible: visible });\n };\n\n private _handleClose = (): void => {\n FeedbackWidgetManager.hide();\n };\n}\n"]}
1
+ {"version":3,"file":"FeedbackWidgetProvider.js","sourceRoot":"","sources":["../../../src/js/feedback/FeedbackWidgetProvider.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAC/B,OAAO,EAAkF,QAAQ,EAAE,UAAU,EAAE,UAAU,EAAE,MAAM,EAAE,KAAK,EAAE,YAAY,EAAE,QAAQ,EAAE,UAAU,EAAE,IAAI,EAAE,MAAM,cAAc,CAAC;AACzM,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,cAAc,EAAE,MAAM,kBAAkB,CAAC;AAClD,OAAO,EAAE,mBAAmB,EAAC,YAAY,EAAE,SAAS,EAAE,MAAM,yBAAyB,CAAC;AACtF,OAAO,EAAE,QAAQ,EAAE,MAAM,wBAAwB,CAAC;AAElD,OAAO,EACL,6BAA6B,EA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ElC,oBAAC,UAAU,IACT,OAAO,EAAE,KAAK,EACd,yBAAyB,EAAC,SAAS,EACnC,iCAAiC,EAAE,QAAQ,CAAC,EAAE,KAAK,KAAK,EACxD,QAAQ,EAAE,IAAI,CAAC,aAAa;4BAE5B,oBAAC,cAAc,oBACT,kBAAkB,EAAE,IACxB,WAAW,EAAE,IAAI,CAAC,YAAY,EAC9B,eAAe,EAAE,IAAI,CAAC,YAAY,IAClC,CACS,CACC,CACV,CACM,CACjB,CACA,CACJ,CAAC;IACJ,CAAC;CA6CF","sourcesContent":["import { debug } from '@sentry/core';\nimport * as React from 'react';\nimport { type NativeEventSubscription, type NativeScrollEvent,type NativeSyntheticEvent, Animated, Appearance, Dimensions, Easing, Modal, PanResponder, Platform, ScrollView, View } from 'react-native';\nimport { notWeb } from '../utils/environment';\nimport { FeedbackButton } from './FeedbackButton';\nimport { FeedbackWidget } from './FeedbackWidget';\nimport { modalSheetContainer,modalWrapper, topSpacer } from './FeedbackWidget.styles';\nimport { getTheme } from './FeedbackWidget.theme';\nimport type { FeedbackWidgetStyles } from './FeedbackWidget.types';\nimport {\n BACKGROUND_ANIMATION_DURATION,\n FeedbackButtonManager,\n FeedbackWidgetManager,\n PULL_DOWN_CLOSE_THRESHOLD,\n ScreenshotButtonManager,\n SLIDE_ANIMATION_DURATION,\n} from './FeedbackWidgetManager';\nimport { getFeedbackButtonOptions, getFeedbackOptions, getScreenshotButtonOptions } from './integration';\nimport { ScreenshotButton } from './ScreenshotButton';\nimport { isModalSupported, isNativeDriverSupportedForColorAnimations } from './utils';\n\nconst useNativeDriverForColorAnimations = isNativeDriverSupportedForColorAnimations();\n\nexport interface FeedbackWidgetProviderProps {\n children: React.ReactNode;\n styles?: FeedbackWidgetStyles;\n}\n\nexport interface FeedbackWidgetProviderState {\n isButtonVisible: boolean;\n isScreenshotButtonVisible: boolean;\n isVisible: boolean;\n backgroundOpacity: Animated.Value;\n panY: Animated.Value;\n isScrollAtTop: boolean;\n}\n\n/**\n * FeedbackWidgetProvider is a component that wraps the feedback widget and provides\n * functionality to show and hide the widget. It also manages the visibility of the\n * feedback button and screenshot button.\n */\nexport class FeedbackWidgetProvider extends React.Component<FeedbackWidgetProviderProps> {\n public state: FeedbackWidgetProviderState = {\n isButtonVisible: false,\n isScreenshotButtonVisible: false,\n isVisible: false,\n backgroundOpacity: new Animated.Value(0),\n panY: new Animated.Value(Dimensions.get('screen').height),\n isScrollAtTop: true,\n };\n\n private _themeListener: NativeEventSubscription | undefined;\n\n private _panResponder = PanResponder.create({\n onStartShouldSetPanResponder: (_, gestureState) => {\n return notWeb() && this.state.isScrollAtTop && gestureState.dy > 0;\n },\n onMoveShouldSetPanResponder: (_, gestureState) => {\n return notWeb() && this.state.isScrollAtTop && gestureState.dy > 0;\n },\n onPanResponderMove: (_, gestureState) => {\n if (gestureState.dy > 0) {\n this.state.panY.setValue(gestureState.dy);\n }\n },\n onPanResponderRelease: (_, gestureState) => {\n if (gestureState.dy > PULL_DOWN_CLOSE_THRESHOLD) {\n // Close on swipe below a certain threshold\n Animated.timing(this.state.panY, {\n toValue: Dimensions.get('screen').height,\n duration: SLIDE_ANIMATION_DURATION,\n useNativeDriver: true,\n }).start(() => {\n this._handleClose();\n });\n } else {\n // Animate it back to the original position\n Animated.spring(this.state.panY, {\n toValue: 0,\n useNativeDriver: true,\n }).start();\n }\n },\n });\n\n public constructor(props: FeedbackWidgetProviderProps) {\n super(props);\n FeedbackButtonManager.initialize(this._setButtonVisibilityFunction);\n ScreenshotButtonManager.initialize(this._setScreenshotButtonVisibilityFunction);\n FeedbackWidgetManager.initialize(this._setVisibilityFunction);\n }\n\n /**\n * Add a listener to the theme change event.\n */\n public componentDidMount(): void {\n this._themeListener = Appearance.addChangeListener(() => {\n this.forceUpdate();\n });\n }\n\n /**\n * Clean up the theme listener.\n */\n public componentWillUnmount(): void {\n if (this._themeListener) {\n this._themeListener.remove();\n }\n }\n\n /**\n * Animates the background opacity when the modal is shown.\n */\n public componentDidUpdate(_prevProps: any, prevState: FeedbackWidgetProviderState): void {\n if (!prevState.isVisible && this.state.isVisible) {\n Animated.parallel([\n Animated.timing(this.state.backgroundOpacity, {\n toValue: 1,\n duration: BACKGROUND_ANIMATION_DURATION,\n useNativeDriver: useNativeDriverForColorAnimations,\n easing: Easing.in(Easing.quad),\n }),\n Animated.timing(this.state.panY, {\n toValue: 0,\n duration: SLIDE_ANIMATION_DURATION,\n useNativeDriver: true,\n easing: Easing.in(Easing.quad),\n }),\n ]).start(() => {\n debug.log('FeedbackWidgetProvider componentDidUpdate');\n });\n } else if (prevState.isVisible && !this.state.isVisible) {\n this.state.backgroundOpacity.setValue(0);\n }\n }\n\n /**\n * Renders the feedback form modal.\n */\n public render(): React.ReactNode {\n if (!isModalSupported()) {\n debug.error('FeedbackWidget Modal is not supported in React Native < 0.71 with Fabric renderer.');\n return <>{this.props.children}</>;\n }\n\n const theme = getTheme();\n\n const { isButtonVisible, isScreenshotButtonVisible, isVisible, backgroundOpacity } = this.state;\n\n const backgroundColor = backgroundOpacity.interpolate({\n inputRange: [0, 1],\n outputRange: ['rgba(0, 0, 0, 0)', 'rgba(0, 0, 0, 0.9)'],\n });\n\n // Wrapping the `Modal` component in a `View` component is necessary to avoid\n // issues like https://github.com/software-mansion/react-native-reanimated/issues/6035\n return (\n <>\n {this.props.children}\n {isButtonVisible && <FeedbackButton {...getFeedbackButtonOptions()} />}\n {isScreenshotButtonVisible && <ScreenshotButton {...getScreenshotButtonOptions()} />}\n {isVisible && (\n <Animated.View style={[modalWrapper, { backgroundColor }]}>\n <Modal\n visible={isVisible}\n transparent\n animationType=\"none\"\n onRequestClose={this._handleClose}\n testID=\"feedback-form-modal\"\n >\n <View style={topSpacer} />\n <Animated.View\n style={[modalSheetContainer(theme), { transform: [{ translateY: this.state.panY }] }]}\n {...this._panResponder.panHandlers}\n >\n <ScrollView\n bounces={false}\n keyboardShouldPersistTaps=\"handled\"\n automaticallyAdjustKeyboardInsets={Platform.OS === 'ios'}\n onScroll={this._handleScroll}\n >\n <FeedbackWidget\n {...getFeedbackOptions()}\n onFormClose={this._handleClose}\n onFormSubmitted={this._handleClose}\n />\n </ScrollView>\n </Animated.View>\n </Modal>\n </Animated.View>\n )}\n </>\n );\n }\n\n private _handleScroll = (event: NativeSyntheticEvent<NativeScrollEvent>): void => {\n this.setState({ isScrollAtTop: event.nativeEvent.contentOffset.y <= 0 });\n };\n\n private _setVisibilityFunction = (visible: boolean): void => {\n const updateState = (): void => {\n this.setState({ isVisible: visible });\n };\n if (!visible) {\n Animated.parallel([\n Animated.timing(this.state.panY, {\n toValue: Dimensions.get('screen').height,\n duration: SLIDE_ANIMATION_DURATION,\n useNativeDriver: true,\n easing: Easing.out(Easing.quad),\n }),\n Animated.timing(this.state.backgroundOpacity, {\n toValue: 0,\n duration: BACKGROUND_ANIMATION_DURATION,\n useNativeDriver: useNativeDriverForColorAnimations,\n easing: Easing.out(Easing.quad),\n }),\n ]).start(() => {\n // Change of the state unmount the component\n // which would cancel the animation\n updateState();\n });\n } else {\n updateState();\n }\n };\n\n private _setButtonVisibilityFunction = (visible: boolean): void => {\n this.setState({ isButtonVisible: visible });\n };\n\n private _setScreenshotButtonVisibilityFunction = (visible: boolean): void => {\n this.setState({ isScreenshotButtonVisible: visible });\n };\n\n private _handleClose = (): void => {\n FeedbackWidgetManager.hide();\n };\n}\n"]}
@@ -1,4 +1,4 @@
1
- import { getClient, logger } from '@sentry/core';
1
+ import { debug, getClient } from '@sentry/core';
2
2
  import { isWeb } from '../utils/environment';
3
3
  import { fillTyped } from '../utils/fill';
4
4
  import { ReactNativeLibraries } from '../utils/rnlibraries';
@@ -15,7 +15,7 @@ export const appRegistryIntegration = () => {
15
15
  },
16
16
  onRunApplication: (callback) => {
17
17
  if (callbacks.includes(callback)) {
18
- logger.debug('[AppRegistryIntegration] Callback already registered.');
18
+ debug.log('[AppRegistryIntegration] Callback already registered.');
19
19
  return;
20
20
  }
21
21
  callbacks.push(callback);
@@ -1 +1 @@
1
- {"version":3,"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AI,CAAC,CAAC;QACzC,CAAC,CAAC;IACJ,CAAC,CAAC,CAAC;AACL,CAAC,CAAC;AAEF,MAAM,CAAC,MAAM,yBAAyB,GAAG,CACvC,SAA6B,SAAS,EAAE,EACe,EAAE;IACzD,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,MAAM,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;AACvD,CAAC,CAAC","sourcesContent":["import type { Client, Integration } from '@sentry/core';\nimport { getClient, logger } from '@sentry/core';\nimport { isWeb } from '../utils/environment';\nimport { fillTyped } from '../utils/fill';\nimport { ReactNativeLibraries } from '../utils/rnlibraries';\n\nexport const INTEGRATION_NAME = 'AppRegistry';\n\nexport const appRegistryIntegration = (): Integration & {\n onRunApplication: (callback: () => void) => void;\n} => {\n const callbacks: (() => void)[] = [];\n\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n if (isWeb()) {\n return;\n }\n\n patchAppRegistryRunApplication(callbacks);\n },\n onRunApplication: (callback: () => void) => {\n if (callbacks.includes(callback)) {\n logger.debug('[AppRegistryIntegration] Callback already registered.');\n return;\n }\n callbacks.push(callback);\n },\n };\n};\n\nexport const patchAppRegistryRunApplication = (callbacks: (() => void)[]): void => {\n const { AppRegistry } = ReactNativeLibraries;\n if (!AppRegistry) {\n return;\n }\n\n fillTyped(AppRegistry, 'runApplication', originalRunApplication => {\n return (...args) => {\n callbacks.forEach(callback => callback());\n return originalRunApplication(...args);\n };\n });\n};\n\nexport const getAppRegistryIntegration = (\n client: Client | undefined = getClient(),\n): ReturnType<typeof appRegistryIntegration> | undefined => {\n if (!client) {\n return undefined;\n }\n\n return client.getIntegrationByName(INTEGRATION_NAME);\n};\n"]}
1
+ {"version":3,"file":"appRegistry.js","sourceRoot":"","sources":["../../../src/js/integrations/appRegistry.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,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EACe,EAAE;IACzD,IAAI,CAAC,MAAM,EAAE;QACX,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,MAAM,CAAC,oBAAoB,CAAC,gBAAgB,CAAC,CAAC;AACvD,CAAC,CAAC","sourcesContent":["import type { Client, Integration } from '@sentry/core';\nimport { debug, getClient } from '@sentry/core';\nimport { isWeb } from '../utils/environment';\nimport { fillTyped } from '../utils/fill';\nimport { ReactNativeLibraries } from '../utils/rnlibraries';\n\nexport const INTEGRATION_NAME = 'AppRegistry';\n\nexport const appRegistryIntegration = (): Integration & {\n onRunApplication: (callback: () => void) => void;\n} => {\n const callbacks: (() => void)[] = [];\n\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n if (isWeb()) {\n return;\n }\n\n patchAppRegistryRunApplication(callbacks);\n },\n onRunApplication: (callback: () => void) => {\n if (callbacks.includes(callback)) {\n debug.log('[AppRegistryIntegration] Callback already registered.');\n return;\n }\n callbacks.push(callback);\n },\n };\n};\n\nexport const patchAppRegistryRunApplication = (callbacks: (() => void)[]): void => {\n const { AppRegistry } = ReactNativeLibraries;\n if (!AppRegistry) {\n return;\n }\n\n fillTyped(AppRegistry, 'runApplication', originalRunApplication => {\n return (...args) => {\n callbacks.forEach(callback => callback());\n return originalRunApplication(...args);\n };\n });\n};\n\nexport const getAppRegistryIntegration = (\n client: Client | undefined = getClient(),\n): ReturnType<typeof appRegistryIntegration> | undefined => {\n if (!client) {\n return undefined;\n }\n\n return client.getIntegrationByName(INTEGRATION_NAME);\n};\n"]}
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { logger } from '@sentry/core';
10
+ import { debug } from '@sentry/core';
11
11
  import { getFramesToPop, isErrorLike } from '../utils/error';
12
12
  import { fetchSourceContext, parseErrorStack, symbolicateStackTrace } from './debugsymbolicatorutils';
13
13
  const INTEGRATION_NAME = 'DebugSymbolicator';
@@ -60,7 +60,7 @@ function symbolicate(rawStack, skipFirstFrames = 0) {
60
60
  const parsedStack = parseErrorStack(rawStack);
61
61
  const prettyStack = yield symbolicateStackTrace(parsedStack);
62
62
  if (!prettyStack) {
63
- logger.error('React Native DevServer could not symbolicate the stack trace.');
63
+ debug.error('React Native DevServer could not symbolicate the stack trace.');
64
64
  return null;
65
65
  }
66
66
  // This has been changed in an react-native version so stack is contained in here
@@ -77,7 +77,7 @@ function symbolicate(rawStack, skipFirstFrames = 0) {
77
77
  }
78
78
  catch (error) {
79
79
  if (error instanceof Error) {
80
- logger.warn(`Unable to symbolicate stack trace: ${error.message}`);
80
+ debug.warn(`Unable to symbolicate stack trace: ${error.message}`);
81
81
  }
82
82
  return null;
83
83
  }
@@ -1 +1 @@
1
- {"version":3,"file":"debugsymbolicator.js","sourceRoot":"","sources":["../../../src/js/integrations/debugsymbolicator.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAEtC,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEtG,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AAE7C,sEAAsE;AACtE,MAAM,wBAAwB,GAAG,IAAI,MAAM,CAAC,CAAC,+BAA+B,EAAE,oBAAoB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAY/G,6DAA6D;AAC7D,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAgB,EAAE;IAC5D,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,GAAG,EAAE;YACd,UAAU;QACZ,CAAC;QACD,YAAY;KACb,CAAC;AACJ,CAAC,CAAC;AAEF,SAAe,YAAY,CAAC,KAAY,EAAE,IAAe;;;QACvD,IAAI,CAAA,MAAA,KAAK,CAAC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xF,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACxB;IACD,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import type { Event, EventHint, Exception, Integration, StackFrame as SentryStackFrame } from '@sentry/core';\nimport { logger } from '@sentry/core';\nimport type { ExtendedError } from '../utils/error';\nimport { getFramesToPop, isErrorLike } from '../utils/error';\nimport type * as ReactNative from '../vendor/react-native';\nimport { fetchSourceContext, parseErrorStack, symbolicateStackTrace } from './debugsymbolicatorutils';\n\nconst INTEGRATION_NAME = 'DebugSymbolicator';\n\n// eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor\nconst INTERNAL_CALLSITES_REGEX = new RegExp(['ReactNativeRenderer-dev\\\\.js$', 'MessageQueue\\\\.js$'].join('|'));\n\n/**\n * React Native Error\n */\nexport type ReactNativeError = Error & {\n framesToPop?: number;\n jsEngine?: string;\n preventSymbolication?: boolean;\n componentStack?: string;\n};\n\n/** Tries to symbolicate the JS stack trace on the device. */\nexport const debugSymbolicatorIntegration = (): 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 if (event.exception?.values && isErrorLike(hint.originalException)) {\n // originalException is ErrorLike object\n const errorGroup = getExceptionGroup(hint.originalException);\n for (const [index, error] of errorGroup.entries()) {\n const symbolicatedFrames = await symbolicate(error.stack, getFramesToPop(error));\n\n symbolicatedFrames && replaceExceptionFramesInException(event.exception.values[index], symbolicatedFrames);\n }\n } else if (hint.syntheticException && isErrorLike(hint.syntheticException)) {\n // syntheticException is Error object\n const symbolicatedFrames = await symbolicate(\n hint.syntheticException.stack,\n getFramesToPop(hint.syntheticException),\n );\n\n if (event.exception) {\n symbolicatedFrames &&\n event.exception.values &&\n replaceExceptionFramesInException(event.exception.values[0], symbolicatedFrames);\n } else if (event.threads) {\n // RN JS doesn't have threads\n symbolicatedFrames && replaceThreadFramesInEvent(event, symbolicatedFrames);\n }\n }\n\n return event;\n}\n\n/**\n * Symbolicates the stack on the device talking to local dev server.\n * Mutates the passed event.\n */\nasync function symbolicate(rawStack: string, skipFirstFrames: number = 0): Promise<SentryStackFrame[] | null> {\n try {\n const parsedStack = parseErrorStack(rawStack);\n\n const prettyStack = await symbolicateStackTrace(parsedStack);\n if (!prettyStack) {\n logger.error('React Native DevServer could not symbolicate the stack trace.');\n return null;\n }\n\n // This has been changed in an react-native version so stack is contained in here\n const newStack = 'stack' in prettyStack ? prettyStack.stack : prettyStack;\n\n // https://github.com/getsentry/sentry-javascript/blob/739d904342aaf9327312f409952f14ceff4ae1ab/packages/utils/src/stacktrace.ts#L23\n // Match SentryParser which counts lines of stack (-1 for first line with the Error message)\n const skipFirstAdjustedToSentryStackParser = Math.max(skipFirstFrames - 1, 0);\n const stackWithoutPoppedFrames = skipFirstAdjustedToSentryStackParser\n ? newStack.slice(skipFirstAdjustedToSentryStackParser)\n : newStack;\n\n const stackWithoutInternalCallsites = stackWithoutPoppedFrames.filter(\n (frame: { file?: string }) => frame.file && frame.file.match(INTERNAL_CALLSITES_REGEX) === null,\n );\n\n const sentryFrames = await convertReactNativeFramesToSentryFrames(stackWithoutInternalCallsites);\n return await fetchSourceContext(sentryFrames);\n } catch (error) {\n if (error instanceof Error) {\n logger.warn(`Unable to symbolicate stack trace: ${error.message}`);\n }\n return null;\n }\n}\n\n/**\n * Converts ReactNativeFrames to frames in the Sentry format\n * @param frames ReactNativeFrame[]\n */\nasync function convertReactNativeFramesToSentryFrames(frames: ReactNative.StackFrame[]): Promise<SentryStackFrame[]> {\n return Promise.all(\n frames.map(async (frame: ReactNative.StackFrame): Promise<SentryStackFrame> => {\n let inApp = !!frame.column && !!frame.lineNumber;\n inApp =\n inApp &&\n frame.file !== undefined &&\n !frame.file.includes('node_modules') &&\n !frame.file.includes('native code');\n\n const newFrame: SentryStackFrame = {\n lineno: frame.lineNumber,\n colno: frame.column,\n filename: frame.file,\n function: frame.methodName,\n in_app: inApp,\n };\n\n return newFrame;\n }),\n );\n}\n\n/**\n * Replaces the frames in the exception of a error.\n * @param event Event\n * @param frames StackFrame[]\n */\nfunction replaceExceptionFramesInException(exception: Exception | undefined, frames: SentryStackFrame[]): void {\n if (exception?.stacktrace) {\n exception.stacktrace.frames = frames.reverse();\n }\n}\n\n/**\n * Replaces the frames in the thread of a message.\n * @param event Event\n * @param frames StackFrame[]\n */\nfunction replaceThreadFramesInEvent(event: Event, frames: SentryStackFrame[]): void {\n if (event.threads?.values?.[0]?.stacktrace) {\n event.threads.values[0].stacktrace.frames = frames.reverse();\n }\n}\n\n/**\n * Return a list containing the original exception and also the cause if found.\n *\n * @param originalException The original exception.\n */\nfunction getExceptionGroup(originalException: unknown): (Error & { stack: string })[] {\n const err = originalException as ExtendedError;\n const errorGroup: (Error & { stack: string })[] = [];\n for (let cause: ExtendedError | undefined = err; isErrorLike(cause); cause = cause.cause) {\n errorGroup.push(cause);\n }\n return errorGroup;\n}\n"]}
1
+ {"version":3,"file":"debugsymbolicator.js","sourceRoot":"","sources":["../../../src/js/integrations/debugsymbolicator.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,cAAc,EAAE,WAAW,EAAE,MAAM,gBAAgB,CAAC;AAE7D,OAAO,EAAE,kBAAkB,EAAE,eAAe,EAAE,qBAAqB,EAAE,MAAM,0BAA0B,CAAC;AAEtG,MAAM,gBAAgB,GAAG,mBAAmB,CAAC;AAE7C,sEAAsE;AACtE,MAAM,wBAAwB,GAAG,IAAI,MAAM,CAAC,CAAC,+BAA+B,EAAE,oBAAoB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AAY/G,6DAA6D;AAC7D,MAAM,CAAC,MAAM,4BAA4B,GAAG,GAAgB,EAAE;IAC5D,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,GAAG,EAAE;YACd,UAAU;QACZ,CAA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AE,CAAC;IACrD,KAAK,IAAI,KAAK,GAA8B,GAAG,EAAE,WAAW,CAAC,KAAK,CAAC,EAAE,KAAK,GAAG,KAAK,CAAC,KAAK,EAAE;QACxF,UAAU,CAAC,IAAI,CAAC,KAAK,CAAC,CAAC;KACxB;IACD,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import type { Event, EventHint, Exception, Integration, StackFrame as SentryStackFrame } from '@sentry/core';\nimport { debug } from '@sentry/core';\nimport type { ExtendedError } from '../utils/error';\nimport { getFramesToPop, isErrorLike } from '../utils/error';\nimport type * as ReactNative from '../vendor/react-native';\nimport { fetchSourceContext, parseErrorStack, symbolicateStackTrace } from './debugsymbolicatorutils';\n\nconst INTEGRATION_NAME = 'DebugSymbolicator';\n\n// eslint-disable-next-line @sentry-internal/sdk/no-regexp-constructor\nconst INTERNAL_CALLSITES_REGEX = new RegExp(['ReactNativeRenderer-dev\\\\.js$', 'MessageQueue\\\\.js$'].join('|'));\n\n/**\n * React Native Error\n */\nexport type ReactNativeError = Error & {\n framesToPop?: number;\n jsEngine?: string;\n preventSymbolication?: boolean;\n componentStack?: string;\n};\n\n/** Tries to symbolicate the JS stack trace on the device. */\nexport const debugSymbolicatorIntegration = (): 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 if (event.exception?.values && isErrorLike(hint.originalException)) {\n // originalException is ErrorLike object\n const errorGroup = getExceptionGroup(hint.originalException);\n for (const [index, error] of errorGroup.entries()) {\n const symbolicatedFrames = await symbolicate(error.stack, getFramesToPop(error));\n\n symbolicatedFrames && replaceExceptionFramesInException(event.exception.values[index], symbolicatedFrames);\n }\n } else if (hint.syntheticException && isErrorLike(hint.syntheticException)) {\n // syntheticException is Error object\n const symbolicatedFrames = await symbolicate(\n hint.syntheticException.stack,\n getFramesToPop(hint.syntheticException),\n );\n\n if (event.exception) {\n symbolicatedFrames &&\n event.exception.values &&\n replaceExceptionFramesInException(event.exception.values[0], symbolicatedFrames);\n } else if (event.threads) {\n // RN JS doesn't have threads\n symbolicatedFrames && replaceThreadFramesInEvent(event, symbolicatedFrames);\n }\n }\n\n return event;\n}\n\n/**\n * Symbolicates the stack on the device talking to local dev server.\n * Mutates the passed event.\n */\nasync function symbolicate(rawStack: string, skipFirstFrames: number = 0): Promise<SentryStackFrame[] | null> {\n try {\n const parsedStack = parseErrorStack(rawStack);\n\n const prettyStack = await symbolicateStackTrace(parsedStack);\n if (!prettyStack) {\n debug.error('React Native DevServer could not symbolicate the stack trace.');\n return null;\n }\n\n // This has been changed in an react-native version so stack is contained in here\n const newStack = 'stack' in prettyStack ? prettyStack.stack : prettyStack;\n\n // https://github.com/getsentry/sentry-javascript/blob/739d904342aaf9327312f409952f14ceff4ae1ab/packages/utils/src/stacktrace.ts#L23\n // Match SentryParser which counts lines of stack (-1 for first line with the Error message)\n const skipFirstAdjustedToSentryStackParser = Math.max(skipFirstFrames - 1, 0);\n const stackWithoutPoppedFrames = skipFirstAdjustedToSentryStackParser\n ? newStack.slice(skipFirstAdjustedToSentryStackParser)\n : newStack;\n\n const stackWithoutInternalCallsites = stackWithoutPoppedFrames.filter(\n (frame: { file?: string }) => frame.file && frame.file.match(INTERNAL_CALLSITES_REGEX) === null,\n );\n\n const sentryFrames = await convertReactNativeFramesToSentryFrames(stackWithoutInternalCallsites);\n return await fetchSourceContext(sentryFrames);\n } catch (error) {\n if (error instanceof Error) {\n debug.warn(`Unable to symbolicate stack trace: ${error.message}`);\n }\n return null;\n }\n}\n\n/**\n * Converts ReactNativeFrames to frames in the Sentry format\n * @param frames ReactNativeFrame[]\n */\nasync function convertReactNativeFramesToSentryFrames(frames: ReactNative.StackFrame[]): Promise<SentryStackFrame[]> {\n return Promise.all(\n frames.map(async (frame: ReactNative.StackFrame): Promise<SentryStackFrame> => {\n let inApp = !!frame.column && !!frame.lineNumber;\n inApp =\n inApp &&\n frame.file !== undefined &&\n !frame.file.includes('node_modules') &&\n !frame.file.includes('native code');\n\n const newFrame: SentryStackFrame = {\n lineno: frame.lineNumber,\n colno: frame.column,\n filename: frame.file,\n function: frame.methodName,\n in_app: inApp,\n };\n\n return newFrame;\n }),\n );\n}\n\n/**\n * Replaces the frames in the exception of a error.\n * @param event Event\n * @param frames StackFrame[]\n */\nfunction replaceExceptionFramesInException(exception: Exception | undefined, frames: SentryStackFrame[]): void {\n if (exception?.stacktrace) {\n exception.stacktrace.frames = frames.reverse();\n }\n}\n\n/**\n * Replaces the frames in the thread of a message.\n * @param event Event\n * @param frames StackFrame[]\n */\nfunction replaceThreadFramesInEvent(event: Event, frames: SentryStackFrame[]): void {\n if (event.threads?.values?.[0]?.stacktrace) {\n event.threads.values[0].stacktrace.frames = frames.reverse();\n }\n}\n\n/**\n * Return a list containing the original exception and also the cause if found.\n *\n * @param originalException The original exception.\n */\nfunction getExceptionGroup(originalException: unknown): (Error & { stack: string })[] {\n const err = originalException as ExtendedError;\n const errorGroup: (Error & { stack: string })[] = [];\n for (let cause: ExtendedError | undefined = err; isErrorLike(cause); cause = cause.cause) {\n errorGroup.push(cause);\n }\n return errorGroup;\n}\n"]}
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { logger } from '@sentry/core';
10
+ import { debug } from '@sentry/core';
11
11
  import { ReactNativeLibraries } from '../utils/rnlibraries';
12
12
  import { createStealthXhr, XHR_READYSTATE_DONE } from '../utils/xhr';
13
13
  /**
@@ -27,7 +27,7 @@ export function fetchSourceContext(frames) {
27
27
  }
28
28
  const url = getSentryMetroSourceContextUrl();
29
29
  if (!url) {
30
- logger.error('Could not fetch source context. No dev server URL found.');
30
+ debug.error('Could not fetch source context. No dev server URL found.');
31
31
  resolve(frames);
32
32
  return;
33
33
  }
@@ -58,7 +58,7 @@ export function fetchSourceContext(frames) {
58
58
  };
59
59
  }
60
60
  catch (error) {
61
- logger.error('Could not fetch source context.', error);
61
+ debug.error('Could not fetch source context.', error);
62
62
  resolve(frames);
63
63
  }
64
64
  });
@@ -1 +1 @@
1
- {"version":3,"file":"debugsymbolicatorutils.js","sourceRoot":"","sources":["../../../src/js/integrations/debugsymbolicatorutils.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AACtC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGrE;;;;;GAKG;AACH,MAAM,UAAgB,kBAAkB,CAAC,MAA0B;;QACjE,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;YAC3B,IAAI;gBACF,MAAM,GAAG,GAAG,gBAAgB,EAAE,CAAC;gBAC/B,IAAI,CAAC,GAAG,EAAE;oBACR,OAAO,CAAC,MAAM,CAAC,CAAC;oBAChB,OAAO;iBACR;gBAED,MAAM,GAAG,GAAG,8BAA8B,EAAE,CAAC;gBAC7C,IAAI,CAAC,GAAG,EAAE;oBACR,MAAM,CAAC,KAAK,CAAC,0DAA0D,CAAC,CAAC;oBACzE,OAAO,CAAC,MAAM,CAAC,CAAC;oBAChB,OAAO;iBACR;gBAED,GAAG,CAAC,IAAI,CAAC,MAAM,EAAE,GAAG,EAAE,IAAI,CAAC,CAAC;gBAC5B,GAAG,CAAC,gBAAgB,CAAC,cAAc,EAAE,kBAAkB,CAAC,CAAC;gBACzD,GAAG,CAAC,IAAI,CAAC,IAAI,CAAC,SAAS,CAAC,EAAE,KAAK,EAAE,MAAM,EAAE,CAAC,CAAC,CAAC;gBAE5C,GAAG,CAAC,kBAAkB,GAAG,GAAS,EAAE;oBAClC,IAAI,GAAG,CAAC,UAAU,KAAK,mBAAmB,EAAE;wBAC1C,IAAI,GAAG,CAAC,MAAM,KAAK,GAAG,EAAE;4BACtB,OAAO,CAA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C,CAAC,CAAC;KACzD;IACD,OAAO,oBAAoB,CAAC,QAAQ,CAAC,qBAAqB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AAC/E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY;;IAC1B,IAAI;QACF,OAAO,MAAA,oBAAoB,CAAC,QAAQ,0CAAE,YAAY,EAAE,CAAC;KACtD;IAAC,OAAO,GAAG,EAAE;QACZ,8BAA8B;KAC/B;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import type { StackFrame as SentryStackFrame } from '@sentry/core';\nimport { logger } from '@sentry/core';\nimport { ReactNativeLibraries } from '../utils/rnlibraries';\nimport { createStealthXhr, XHR_READYSTATE_DONE } from '../utils/xhr';\nimport type * as ReactNative from '../vendor/react-native';\n\n/**\n * Fetches source context for the Sentry Middleware (/__sentry/context)\n *\n * @param frame StackFrame\n * @param getDevServer function from RN to get DevServer URL\n */\nexport async function fetchSourceContext(frames: SentryStackFrame[]): Promise<SentryStackFrame[]> {\n return new Promise(resolve => {\n try {\n const xhr = createStealthXhr();\n if (!xhr) {\n resolve(frames);\n return;\n }\n\n const url = getSentryMetroSourceContextUrl();\n if (!url) {\n logger.error('Could not fetch source context. No dev server URL found.');\n resolve(frames);\n return;\n }\n\n xhr.open('POST', url, true);\n xhr.setRequestHeader('Content-Type', 'application/json');\n xhr.send(JSON.stringify({ stack: frames }));\n\n xhr.onreadystatechange = (): void => {\n if (xhr.readyState === XHR_READYSTATE_DONE) {\n if (xhr.status !== 200) {\n resolve(frames);\n }\n\n try {\n const response: { stack?: SentryStackFrame[] } = JSON.parse(xhr.responseText);\n if (Array.isArray(response.stack)) {\n resolve(response.stack);\n } else {\n resolve(frames);\n }\n } catch (error) {\n resolve(frames);\n }\n }\n };\n xhr.onerror = (): void => {\n resolve(frames);\n };\n } catch (error) {\n logger.error('Could not fetch source context.', error);\n resolve(frames);\n }\n });\n}\n\nfunction getSentryMetroSourceContextUrl(): string | undefined {\n const devServer = getDevServer();\n\n if (!devServer) {\n return undefined;\n }\n\n return `${devServer.url}__sentry/context`;\n}\n\n/**\n * Loads and calls RN Core Devtools parseErrorStack function.\n */\nexport function parseErrorStack(errorStack: string): Array<ReactNative.StackFrame> {\n if (!ReactNativeLibraries.Devtools) {\n throw new Error('React Native Devtools not available.');\n }\n return ReactNativeLibraries.Devtools.parseErrorStack(errorStack);\n}\n\n/**\n * Loads and calls RN Core Devtools symbolicateStackTrace function.\n */\nexport function symbolicateStackTrace(\n stack: Array<ReactNative.StackFrame>,\n extraData?: Record<string, unknown>,\n): Promise<ReactNative.SymbolicatedStackTrace> {\n if (!ReactNativeLibraries.Devtools) {\n throw new Error('React Native Devtools not available.');\n }\n return ReactNativeLibraries.Devtools.symbolicateStackTrace(stack, extraData);\n}\n\n/**\n * Loads and returns the RN DevServer URL.\n */\nexport function getDevServer(): ReactNative.DevServerInfo | undefined {\n try {\n return ReactNativeLibraries.Devtools?.getDevServer();\n } catch (_oO) {\n // We can't load devserver URL\n }\n return undefined;\n}\n"]}
1
+ {"version":3,"file":"debugsymbolicatorutils.js","sourceRoot":"","sources":["../../../src/js/integrations/debugsymbolicatorutils.ts"],"names":[],"mappings":";;;;;;;;;AACA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,oBAAoB,EAAE,MAAM,sBAAsB,CAAC;AAC5D,OAAO,EAAE,gBAAgB,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAGrE;;;;;GAKG;AACH,MAAM,UAAgB,kBAAkB,CAAC,MAA0B;;QACjE,OAAO,IAAI,OAAO,CAAC,OAAO,CAAC,EAAE;YAC3B,IAAI;gBACF,MAAM,GAAG,GAAG,gBAAgB,EAAE,CAAC;gBAC/B,IAAI,CAAC,GAAG,EAAE;oBACR,OAAO,CAAC,MAAM,CAAC,CAAC;oBAChB,OAAO;iBACR;gBAED,MAAM,GAAG,GAAG,8BAA8B,EAAE,CAAC;gBAC7C,IAAI,CAAC,G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S,GAAG,YAAY,EAAE,CAAC;IAEjC,IAAI,CAAC,SAAS,EAAE;QACd,OAAO,SAAS,CAAC;KAClB;IAED,OAAO,GAAG,SAAS,CAAC,GAAG,kBAAkB,CAAC;AAC5C,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,eAAe,CAAC,UAAkB;IAChD,IAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE;QAClC,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;KACzD;IACD,OAAO,oBAAoB,CAAC,QAAQ,CAAC,eAAe,CAAC,UAAU,CAAC,CAAC;AACnE,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,qBAAqB,CACnC,KAAoC,EACpC,SAAmC;IAEnC,IAAI,CAAC,oBAAoB,CAAC,QAAQ,EAAE;QAClC,MAAM,IAAI,KAAK,CAAC,sCAAsC,CAAC,CAAC;KACzD;IACD,OAAO,oBAAoB,CAAC,QAAQ,CAAC,qBAAqB,CAAC,KAAK,EAAE,SAAS,CAAC,CAAC;AAC/E,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,YAAY;;IAC1B,IAAI;QACF,OAAO,MAAA,oBAAoB,CAAC,QAAQ,0CAAE,YAAY,EAAE,CAAC;KACtD;IAAC,OAAO,GAAG,EAAE;QACZ,8BAA8B;KAC/B;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import type { StackFrame as SentryStackFrame } from '@sentry/core';\nimport { debug } from '@sentry/core';\nimport { ReactNativeLibraries } from '../utils/rnlibraries';\nimport { createStealthXhr, XHR_READYSTATE_DONE } from '../utils/xhr';\nimport type * as ReactNative from '../vendor/react-native';\n\n/**\n * Fetches source context for the Sentry Middleware (/__sentry/context)\n *\n * @param frame StackFrame\n * @param getDevServer function from RN to get DevServer URL\n */\nexport async function fetchSourceContext(frames: SentryStackFrame[]): Promise<SentryStackFrame[]> {\n return new Promise(resolve => {\n try {\n const xhr = createStealthXhr();\n if (!xhr) {\n resolve(frames);\n return;\n }\n\n const url = getSentryMetroSourceContextUrl();\n if (!url) {\n debug.error('Could not fetch source context. No dev server URL found.');\n resolve(frames);\n return;\n }\n\n xhr.open('POST', url, true);\n xhr.setRequestHeader('Content-Type', 'application/json');\n xhr.send(JSON.stringify({ stack: frames }));\n\n xhr.onreadystatechange = (): void => {\n if (xhr.readyState === XHR_READYSTATE_DONE) {\n if (xhr.status !== 200) {\n resolve(frames);\n }\n\n try {\n const response: { stack?: SentryStackFrame[] } = JSON.parse(xhr.responseText);\n if (Array.isArray(response.stack)) {\n resolve(response.stack);\n } else {\n resolve(frames);\n }\n } catch (error) {\n resolve(frames);\n }\n }\n };\n xhr.onerror = (): void => {\n resolve(frames);\n };\n } catch (error) {\n debug.error('Could not fetch source context.', error);\n resolve(frames);\n }\n });\n}\n\nfunction getSentryMetroSourceContextUrl(): string | undefined {\n const devServer = getDevServer();\n\n if (!devServer) {\n return undefined;\n }\n\n return `${devServer.url}__sentry/context`;\n}\n\n/**\n * Loads and calls RN Core Devtools parseErrorStack function.\n */\nexport function parseErrorStack(errorStack: string): Array<ReactNative.StackFrame> {\n if (!ReactNativeLibraries.Devtools) {\n throw new Error('React Native Devtools not available.');\n }\n return ReactNativeLibraries.Devtools.parseErrorStack(errorStack);\n}\n\n/**\n * Loads and calls RN Core Devtools symbolicateStackTrace function.\n */\nexport function symbolicateStackTrace(\n stack: Array<ReactNative.StackFrame>,\n extraData?: Record<string, unknown>,\n): Promise<ReactNative.SymbolicatedStackTrace> {\n if (!ReactNativeLibraries.Devtools) {\n throw new Error('React Native Devtools not available.');\n }\n return ReactNativeLibraries.Devtools.symbolicateStackTrace(stack, extraData);\n}\n\n/**\n * Loads and returns the RN DevServer URL.\n */\nexport function getDevServer(): ReactNative.DevServerInfo | undefined {\n try {\n return ReactNativeLibraries.Devtools?.getDevServer();\n } catch (_oO) {\n // We can't load devserver URL\n }\n return undefined;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAsC3D;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,wBAAwB,GAAG,WAAW,EAAE,CA+GvF"}
1
+ {"version":3,"file":"default.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAChD,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,YAAY,CAAC;AAuC3D;;;;;;GAMG;AACH,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,wBAAwB,GAAG,WAAW,EAAE,CAkHvF"}
@@ -2,7 +2,7 @@
2
2
  import { browserSessionIntegration } from '@sentry/browser';
3
3
  import { reactNativeTracingIntegration } from '../tracing';
4
4
  import { notWeb } from '../utils/environment';
5
- import { appRegistryIntegration, appStartIntegration, breadcrumbsIntegration, browserApiErrorsIntegration, browserGlobalHandlersIntegration, browserLinkedErrorsIntegration, createNativeFramesIntegrations, createReactNativeRewriteFrames, debugSymbolicatorIntegration, dedupeIntegration, deviceContextIntegration, eventOriginIntegration, expoContextIntegration, functionToStringIntegration, hermesProfilingIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, mobileReplayIntegration, modulesLoaderIntegration, nativeLinkedErrorsIntegration, nativeReleaseIntegration, primitiveTagIntegration, reactNativeErrorHandlersIntegration, reactNativeInfoIntegration, screenshotIntegration, sdkInfoIntegration, spotlightIntegration, stallTrackingIntegration, timeToDisplayIntegration, userInteractionIntegration, viewHierarchyIntegration, } from './exports';
5
+ import { appRegistryIntegration, appStartIntegration, breadcrumbsIntegration, browserApiErrorsIntegration, browserGlobalHandlersIntegration, browserLinkedErrorsIntegration, createNativeFramesIntegrations, createReactNativeRewriteFrames, debugSymbolicatorIntegration, dedupeIntegration, deviceContextIntegration, eventOriginIntegration, expoContextIntegration, functionToStringIntegration, hermesProfilingIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, logEnricherIntegration, mobileReplayIntegration, modulesLoaderIntegration, nativeLinkedErrorsIntegration, nativeReleaseIntegration, primitiveTagIntegration, reactNativeErrorHandlersIntegration, reactNativeInfoIntegration, screenshotIntegration, sdkInfoIntegration, spotlightIntegration, stallTrackingIntegration, timeToDisplayIntegration, userInteractionIntegration, viewHierarchyIntegration, } from './exports';
6
6
  /**
7
7
  * Returns the default ReactNative integrations based on the current environment.
8
8
  *
@@ -42,6 +42,9 @@ export function getDefaultIntegrations(options) {
42
42
  if (options.enableNative) {
43
43
  integrations.push(deviceContextIntegration());
44
44
  integrations.push(modulesLoaderIntegration());
45
+ if (options.enableLogs) {
46
+ integrations.push(logEnricherIntegration());
47
+ }
45
48
  if (options.attachScreenshot) {
46
49
  integrations.push(screenshotIntegration());
47
50
  }
@@ -1 +1 @@
1
- {"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAG5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,gCAAgC,EAChC,8BAA8B,EAC9B,8BAA8B,EAC9B,8BAA8B,EAC9B,4BAA4B,EAC5B,iBAAiB,EACjB,wBAAwB,EACxB,sBAAsB,EACtB,sBAAsB,EACtB,2BAA2B,EAC3B,0BAA0B,EAC1B,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,EACvB,wBAAwB,EACxB,6BAA6B,EAC7B,wBAAwB,EACxB,uBAAuB,EACvB,mCAAmC,EACnC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AAG,MAAA,OAAO,CAAC,YAAY,0CAAE,wBAAwB,CAAC;KACnF;IAED,IAAI,CAAC,gBAAgB,IAAI,2BAA2B,CAAC,IAAI,MAAM,EAAE,EAAE;QACjE,0FAA0F;QAC1F,yFAAyF;QACzF,YAAY,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC,CAAC;KAC9C;IAED,IAAI,OAAO,IAAI,MAAM,EAAE,EAAE;QACvB,YAAY,CAAC,IAAI,CAAC,4BAA4B,EAAE,CAAC,CAAC;KACnD;IAED,YAAY,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC,CAAC;IAE7C,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["/* eslint-disable complexity */\nimport { browserSessionIntegration } from '@sentry/browser';\nimport type { Integration } from '@sentry/core';\nimport type { ReactNativeClientOptions } from '../options';\nimport { reactNativeTracingIntegration } from '../tracing';\nimport { notWeb } from '../utils/environment';\nimport {\n appRegistryIntegration,\n appStartIntegration,\n breadcrumbsIntegration,\n browserApiErrorsIntegration,\n browserGlobalHandlersIntegration,\n browserLinkedErrorsIntegration,\n createNativeFramesIntegrations,\n createReactNativeRewriteFrames,\n debugSymbolicatorIntegration,\n dedupeIntegration,\n deviceContextIntegration,\n eventOriginIntegration,\n expoContextIntegration,\n functionToStringIntegration,\n hermesProfilingIntegration,\n httpClientIntegration,\n httpContextIntegration,\n inboundFiltersIntegration,\n mobileReplayIntegration,\n modulesLoaderIntegration,\n nativeLinkedErrorsIntegration,\n nativeReleaseIntegration,\n primitiveTagIntegration,\n reactNativeErrorHandlersIntegration,\n reactNativeInfoIntegration,\n screenshotIntegration,\n sdkInfoIntegration,\n spotlightIntegration,\n stallTrackingIntegration,\n timeToDisplayIntegration,\n userInteractionIntegration,\n viewHierarchyIntegration,\n} from './exports';\n\n/**\n * Returns the default ReactNative integrations based on the current environment.\n *\n * Native integrations are only returned when native is enabled.\n *\n * Web integrations are only returned when running on web.\n */\nexport function getDefaultIntegrations(options: ReactNativeClientOptions): Integration[] {\n const integrations: Integration[] = [];\n\n if (notWeb()) {\n integrations.push(\n reactNativeErrorHandlersIntegration({\n patchGlobalPromise: options.patchGlobalPromise,\n }),\n );\n integrations.push(nativeLinkedErrorsIntegration());\n } else {\n integrations.push(browserApiErrorsIntegration());\n integrations.push(browserGlobalHandlersIntegration());\n integrations.push(browserLinkedErrorsIntegration());\n\n if (options.enableAutoSessionTracking) {\n integrations.push(browserSessionIntegration());\n }\n }\n\n // @sentry/react default integrations\n integrations.push(inboundFiltersIntegration());\n integrations.push(functionToStringIntegration());\n integrations.push(breadcrumbsIntegration());\n integrations.push(dedupeIntegration());\n integrations.push(httpContextIntegration());\n // end @sentry/react-native default integrations\n\n integrations.push(nativeReleaseIntegration());\n integrations.push(eventOriginIntegration());\n integrations.push(sdkInfoIntegration());\n integrations.push(reactNativeInfoIntegration());\n\n integrations.push(createReactNativeRewriteFrames());\n\n if (options.enableNative) {\n integrations.push(deviceContextIntegration());\n integrations.push(modulesLoaderIntegration());\n if (options.attachScreenshot) {\n integrations.push(screenshotIntegration());\n }\n if (options.attachViewHierarchy) {\n integrations.push(viewHierarchyIntegration());\n }\n if (typeof options.profilesSampleRate === 'number') {\n integrations.push(hermesProfilingIntegration());\n }\n }\n\n // hasTracingEnabled from `@sentry/core` only check if tracesSampler or tracesSampleRate keys are present\n // that's different from prev imp here and might lead misconfiguration\n // `tracesSampleRate: undefined` should not enable tracing\n const hasTracingEnabled = typeof options.tracesSampleRate === 'number' || typeof options.tracesSampler === 'function';\n if (hasTracingEnabled && options.enableAppStartTracking && options.enableNative) {\n integrations.push(appStartIntegration());\n }\n const nativeFramesIntegrationInstance = createNativeFramesIntegrations(\n hasTracingEnabled && options.enableNativeFramesTracking && options.enableNative,\n );\n if (nativeFramesIntegrationInstance) {\n integrations.push(nativeFramesIntegrationInstance);\n }\n if (hasTracingEnabled && options.enableStallTracking) {\n integrations.push(stallTrackingIntegration());\n }\n if (hasTracingEnabled && options.enableUserInteractionTracing) {\n integrations.push(userInteractionIntegration());\n }\n if (hasTracingEnabled && options.enableAutoPerformanceTracing) {\n integrations.push(appRegistryIntegration());\n integrations.push(reactNativeTracingIntegration());\n }\n if (hasTracingEnabled) {\n integrations.push(timeToDisplayIntegration());\n }\n if (options.enableCaptureFailedRequests) {\n integrations.push(httpClientIntegration());\n }\n\n integrations.push(expoContextIntegration());\n\n if (options.spotlight) {\n const sidecarUrl = typeof options.spotlight === 'string' ? options.spotlight : undefined;\n integrations.push(spotlightIntegration({ sidecarUrl }));\n }\n\n const hasReplayOptions =\n typeof options.replaysOnErrorSampleRate === 'number' || typeof options.replaysSessionSampleRate === 'number';\n const hasExperimentsReplayOptions =\n (options._experiments && typeof options._experiments.replaysOnErrorSampleRate === 'number') ||\n (options._experiments && typeof options._experiments.replaysSessionSampleRate === 'number');\n\n if (!hasReplayOptions && hasExperimentsReplayOptions) {\n // Remove in the next major version (v7)\n options.replaysOnErrorSampleRate = options._experiments?.replaysOnErrorSampleRate;\n options.replaysSessionSampleRate = options._experiments?.replaysSessionSampleRate;\n }\n\n if ((hasReplayOptions || hasExperimentsReplayOptions) && notWeb()) {\n // We can't create and add browserReplayIntegration as it overrides the users supplied one\n // The browser replay integration works differently than the rest of default integrations\n integrations.push(mobileReplayIntegration());\n }\n\n if (__DEV__ && notWeb()) {\n integrations.push(debugSymbolicatorIntegration());\n }\n\n integrations.push(primitiveTagIntegration());\n\n return integrations;\n}\n"]}
1
+ {"version":3,"file":"default.js","sourceRoot":"","sources":["../../../src/js/integrations/default.ts"],"names":[],"mappings":"AAAA,+BAA+B;AAC/B,OAAO,EAAE,yBAAyB,EAAE,MAAM,iBAAiB,CAAC;AAG5D,OAAO,EAAE,6BAA6B,EAAE,MAAM,YAAY,CAAC;AAC3D,OAAO,EAAE,MAAM,EAAE,MAAM,sBAAsB,CAAC;AAC9C,OAAO,EACL,sBAAsB,EACtB,mBAAmB,EACnB,sBAAsB,EACtB,2BAA2B,EAC3B,gCAAgC,EAChC,8BAA8B,E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AC/G,MAAM,2BAA2B,GAC/B,CAAC,OAAO,CAAC,YAAY,IAAI,OAAO,OAAO,CAAC,YAAY,CAAC,wBAAwB,KAAK,QAAQ,CAAC;QAC3F,CAAC,OAAO,CAAC,YAAY,IAAI,OAAO,OAAO,CAAC,YAAY,CAAC,wBAAwB,KAAK,QAAQ,CAAC,CAAC;IAE9F,IAAI,CAAC,gBAAgB,IAAI,2BAA2B,EAAE;QACpD,wCAAwC;QACxC,OAAO,CAAC,wBAAwB,GAAG,MAAA,OAAO,CAAC,YAAY,0CAAE,wBAAwB,CAAC;QAClF,OAAO,CAAC,wBAAwB,GAAG,MAAA,OAAO,CAAC,YAAY,0CAAE,wBAAwB,CAAC;KACnF;IAED,IAAI,CAAC,gBAAgB,IAAI,2BAA2B,CAAC,IAAI,MAAM,EAAE,EAAE;QACjE,0FAA0F;QAC1F,yFAAyF;QACzF,YAAY,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC,CAAC;KAC9C;IAED,IAAI,OAAO,IAAI,MAAM,EAAE,EAAE;QACvB,YAAY,CAAC,IAAI,CAAC,4BAA4B,EAAE,CAAC,CAAC;KACnD;IAED,YAAY,CAAC,IAAI,CAAC,uBAAuB,EAAE,CAAC,CAAC;IAE7C,OAAO,YAAY,CAAC;AACtB,CAAC","sourcesContent":["/* eslint-disable complexity */\nimport { browserSessionIntegration } from '@sentry/browser';\nimport type { Integration } from '@sentry/core';\nimport type { ReactNativeClientOptions } from '../options';\nimport { reactNativeTracingIntegration } from '../tracing';\nimport { notWeb } from '../utils/environment';\nimport {\n appRegistryIntegration,\n appStartIntegration,\n breadcrumbsIntegration,\n browserApiErrorsIntegration,\n browserGlobalHandlersIntegration,\n browserLinkedErrorsIntegration,\n createNativeFramesIntegrations,\n createReactNativeRewriteFrames,\n debugSymbolicatorIntegration,\n dedupeIntegration,\n deviceContextIntegration,\n eventOriginIntegration,\n expoContextIntegration,\n functionToStringIntegration,\n hermesProfilingIntegration,\n httpClientIntegration,\n httpContextIntegration,\n inboundFiltersIntegration,\n logEnricherIntegration,\n mobileReplayIntegration,\n modulesLoaderIntegration,\n nativeLinkedErrorsIntegration,\n nativeReleaseIntegration,\n primitiveTagIntegration,\n reactNativeErrorHandlersIntegration,\n reactNativeInfoIntegration,\n screenshotIntegration,\n sdkInfoIntegration,\n spotlightIntegration,\n stallTrackingIntegration,\n timeToDisplayIntegration,\n userInteractionIntegration,\n viewHierarchyIntegration,\n} from './exports';\n\n/**\n * Returns the default ReactNative integrations based on the current environment.\n *\n * Native integrations are only returned when native is enabled.\n *\n * Web integrations are only returned when running on web.\n */\nexport function getDefaultIntegrations(options: ReactNativeClientOptions): Integration[] {\n const integrations: Integration[] = [];\n\n if (notWeb()) {\n integrations.push(\n reactNativeErrorHandlersIntegration({\n patchGlobalPromise: options.patchGlobalPromise,\n }),\n );\n integrations.push(nativeLinkedErrorsIntegration());\n } else {\n integrations.push(browserApiErrorsIntegration());\n integrations.push(browserGlobalHandlersIntegration());\n integrations.push(browserLinkedErrorsIntegration());\n\n if (options.enableAutoSessionTracking) {\n integrations.push(browserSessionIntegration());\n }\n }\n\n // @sentry/react default integrations\n integrations.push(inboundFiltersIntegration());\n integrations.push(functionToStringIntegration());\n integrations.push(breadcrumbsIntegration());\n integrations.push(dedupeIntegration());\n integrations.push(httpContextIntegration());\n // end @sentry/react-native default integrations\n\n integrations.push(nativeReleaseIntegration());\n integrations.push(eventOriginIntegration());\n integrations.push(sdkInfoIntegration());\n integrations.push(reactNativeInfoIntegration());\n\n integrations.push(createReactNativeRewriteFrames());\n\n if (options.enableNative) {\n integrations.push(deviceContextIntegration());\n integrations.push(modulesLoaderIntegration());\n if (options.enableLogs) {\n integrations.push(logEnricherIntegration());\n }\n if (options.attachScreenshot) {\n integrations.push(screenshotIntegration());\n }\n if (options.attachViewHierarchy) {\n integrations.push(viewHierarchyIntegration());\n }\n if (typeof options.profilesSampleRate === 'number') {\n integrations.push(hermesProfilingIntegration());\n }\n }\n\n // hasTracingEnabled from `@sentry/core` only check if tracesSampler or tracesSampleRate keys are present\n // that's different from prev imp here and might lead misconfiguration\n // `tracesSampleRate: undefined` should not enable tracing\n const hasTracingEnabled = typeof options.tracesSampleRate === 'number' || typeof options.tracesSampler === 'function';\n if (hasTracingEnabled && options.enableAppStartTracking && options.enableNative) {\n integrations.push(appStartIntegration());\n }\n const nativeFramesIntegrationInstance = createNativeFramesIntegrations(\n hasTracingEnabled && options.enableNativeFramesTracking && options.enableNative,\n );\n if (nativeFramesIntegrationInstance) {\n integrations.push(nativeFramesIntegrationInstance);\n }\n if (hasTracingEnabled && options.enableStallTracking) {\n integrations.push(stallTrackingIntegration());\n }\n if (hasTracingEnabled && options.enableUserInteractionTracing) {\n integrations.push(userInteractionIntegration());\n }\n if (hasTracingEnabled && options.enableAutoPerformanceTracing) {\n integrations.push(appRegistryIntegration());\n integrations.push(reactNativeTracingIntegration());\n }\n if (hasTracingEnabled) {\n integrations.push(timeToDisplayIntegration());\n }\n if (options.enableCaptureFailedRequests) {\n integrations.push(httpClientIntegration());\n }\n\n integrations.push(expoContextIntegration());\n\n if (options.spotlight) {\n const sidecarUrl = typeof options.spotlight === 'string' ? options.spotlight : undefined;\n integrations.push(spotlightIntegration({ sidecarUrl }));\n }\n\n const hasReplayOptions =\n typeof options.replaysOnErrorSampleRate === 'number' || typeof options.replaysSessionSampleRate === 'number';\n const hasExperimentsReplayOptions =\n (options._experiments && typeof options._experiments.replaysOnErrorSampleRate === 'number') ||\n (options._experiments && typeof options._experiments.replaysSessionSampleRate === 'number');\n\n if (!hasReplayOptions && hasExperimentsReplayOptions) {\n // Remove in the next major version (v7)\n options.replaysOnErrorSampleRate = options._experiments?.replaysOnErrorSampleRate;\n options.replaysSessionSampleRate = options._experiments?.replaysSessionSampleRate;\n }\n\n if ((hasReplayOptions || hasExperimentsReplayOptions) && notWeb()) {\n // We can't create and add browserReplayIntegration as it overrides the users supplied one\n // The browser replay integration works differently than the rest of default integrations\n integrations.push(mobileReplayIntegration());\n }\n\n if (__DEV__ && notWeb()) {\n integrations.push(debugSymbolicatorIntegration());\n }\n\n integrations.push(primitiveTagIntegration());\n\n return integrations;\n}\n"]}
@@ -7,7 +7,7 @@ var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, ge
7
7
  step((generator = generator.apply(thisArg, _arguments || [])).next());
8
8
  });
9
9
  };
10
- import { logger, severityLevelFromString } from '@sentry/core';
10
+ import { debug, severityLevelFromString } from '@sentry/core';
11
11
  import { AppState } from 'react-native';
12
12
  import { breadcrumbFromObject } from '../breadcrumb';
13
13
  import { NATIVE } from '../wrapper';
@@ -30,7 +30,7 @@ function processEvent(event, _hint, client) {
30
30
  native = yield NATIVE.fetchNativeDeviceContexts();
31
31
  }
32
32
  catch (e) {
33
- logger.log(`Failed to get device context from native: ${e}`);
33
+ debug.log(`Failed to get device context from native: ${e}`);
34
34
  }
35
35
  if (!native) {
36
36
  return event;
@@ -1 +1 @@
1
- {"version":3,"file":"devicecontext.js","sourceRoot":"","sources":["../../../src/js/integrations/devicecontext.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC/D,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAEzC,uCAAuC;AACvC,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAgB,EAAE;IACxD,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,GAAG,EAAE;YACd,UAAU;QACZ,CAAC;QACD,YAAY;KACb,CAAC;AACJ,CAAC,CAAC;AAEF,SAAe,YAAY,CAAC,KAAY,EAAE,KAAgB,EAAE,MAAc;;;QACxE,IAAI,MAAM,GAAwC,IAAI,CAAC;QACvD,IAAI;YACF,MAAM,GA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AAC,MAAA,CAAC,CAAC,SAAS,mCAAI,CAAC,CAAC,GAAG,CAAC,MAAA,CAAC,CAAC,SAAS,mCAAI,CAAC,CAAC,CAAA,EAAA,CAAC,CAAC,oBAAoB;iBAC5E,KAAK,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,+BAA+B;SAC3D;QAED,OAAO,KAAK,CAAC;;CACd","sourcesContent":["/* eslint-disable complexity */\nimport type { Client, Event, EventHint, Integration } from '@sentry/core';\nimport { logger, severityLevelFromString } from '@sentry/core';\nimport { AppState } from 'react-native';\nimport { breadcrumbFromObject } from '../breadcrumb';\nimport type { NativeDeviceContextsResponse } from '../NativeRNSentry';\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'DeviceContext';\n\n/** Load device context from native. */\nexport const deviceContextIntegration = (): Integration => {\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n /* noop */\n },\n processEvent,\n };\n};\n\nasync function processEvent(event: Event, _hint: EventHint, client: Client): Promise<Event> {\n let native: NativeDeviceContextsResponse | null = null;\n try {\n native = await NATIVE.fetchNativeDeviceContexts();\n } catch (e) {\n logger.log(`Failed to get device context from native: ${e}`);\n }\n\n if (!native) {\n return event;\n }\n\n const nativeUser = native.user;\n if (!event.user && nativeUser) {\n event.user = nativeUser;\n }\n\n let nativeContexts = native.contexts;\n if (AppState.currentState !== 'unknown') {\n nativeContexts = nativeContexts || {};\n nativeContexts.app = {\n ...nativeContexts.app,\n in_foreground: AppState.currentState === 'active',\n };\n }\n if (nativeContexts) {\n event.contexts = { ...nativeContexts, ...event.contexts };\n if (nativeContexts.app) {\n event.contexts.app = { ...nativeContexts.app, ...event.contexts.app };\n }\n }\n\n const nativeTags = native.tags;\n if (nativeTags) {\n event.tags = { ...nativeTags, ...event.tags };\n }\n\n const nativeExtra = native.extra;\n if (nativeExtra) {\n event.extra = { ...nativeExtra, ...event.extra };\n }\n\n const nativeFingerprint = native.fingerprint;\n if (nativeFingerprint) {\n event.fingerprint = (event.fingerprint ?? []).concat(\n nativeFingerprint.filter(item => (event.fingerprint ?? []).indexOf(item) < 0),\n );\n }\n\n const nativeLevel = typeof native['level'] === 'string' ? severityLevelFromString(native['level']) : undefined;\n if (!event.level && nativeLevel) {\n event.level = nativeLevel;\n }\n\n const nativeEnvironment = native['environment'];\n if (!event.environment && nativeEnvironment) {\n event.environment = nativeEnvironment;\n }\n\n const nativeBreadcrumbs = Array.isArray(native['breadcrumbs'])\n ? native['breadcrumbs'].map(breadcrumbFromObject)\n : undefined;\n if (nativeBreadcrumbs) {\n const maxBreadcrumbs = client?.getOptions().maxBreadcrumbs ?? 100; // Default is 100.\n event.breadcrumbs = nativeBreadcrumbs\n .concat(event.breadcrumbs || []) // concatenate the native and js breadcrumbs\n .sort((a, b) => (a.timestamp ?? 0) - (b.timestamp ?? 0)) // sort by timestamp\n .slice(-maxBreadcrumbs); // keep the last maxBreadcrumbs\n }\n\n return event;\n}\n"]}
1
+ {"version":3,"file":"devicecontext.js","sourceRoot":"","sources":["../../../src/js/integrations/devicecontext.ts"],"names":[],"mappings":";;;;;;;;;AAEA,OAAO,EAAE,KAAK,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAC9D,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AACxC,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,MAAM,gBAAgB,GAAG,eAAe,CAAC;AAEzC,uCAAuC;AACvC,MAAM,CAAC,MAAM,wBAAwB,GAAG,GAAgB,EAAE;IACxD,OAAO;QACL,IAAI,EAAE,gBAAgB;QACtB,SAAS,EAAE,GAAG,EAAE;YACd,UAAU;QACZ,CAAC;QACD,YAAY;KACb,CAAC;AACJ,CAAC,CAAC;AAEF,SAAe,YAAY,CAAC,KAAY,EAAE,KAAgB,EAAE,MAAc;;;QACxE,IAAI,MAAM,GAAwC,IAAI,CAAC;QACvD,IAAI;YAC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AC,OAAA,CAAC,MAAA,CAAC,CAAC,SAAS,mCAAI,CAAC,CAAC,GAAG,CAAC,MAAA,CAAC,CAAC,SAAS,mCAAI,CAAC,CAAC,CAAA,EAAA,CAAC,CAAC,oBAAoB;iBAC5E,KAAK,CAAC,CAAC,cAAc,CAAC,CAAC,CAAC,+BAA+B;SAC3D;QAED,OAAO,KAAK,CAAC;;CACd","sourcesContent":["/* eslint-disable complexity */\nimport type { Client, Event, EventHint, Integration } from '@sentry/core';\nimport { debug, severityLevelFromString } from '@sentry/core';\nimport { AppState } from 'react-native';\nimport { breadcrumbFromObject } from '../breadcrumb';\nimport type { NativeDeviceContextsResponse } from '../NativeRNSentry';\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'DeviceContext';\n\n/** Load device context from native. */\nexport const deviceContextIntegration = (): Integration => {\n return {\n name: INTEGRATION_NAME,\n setupOnce: () => {\n /* noop */\n },\n processEvent,\n };\n};\n\nasync function processEvent(event: Event, _hint: EventHint, client: Client): Promise<Event> {\n let native: NativeDeviceContextsResponse | null = null;\n try {\n native = await NATIVE.fetchNativeDeviceContexts();\n } catch (e) {\n debug.log(`Failed to get device context from native: ${e}`);\n }\n\n if (!native) {\n return event;\n }\n\n const nativeUser = native.user;\n if (!event.user && nativeUser) {\n event.user = nativeUser;\n }\n\n let nativeContexts = native.contexts;\n if (AppState.currentState !== 'unknown') {\n nativeContexts = nativeContexts || {};\n nativeContexts.app = {\n ...nativeContexts.app,\n in_foreground: AppState.currentState === 'active',\n };\n }\n if (nativeContexts) {\n event.contexts = { ...nativeContexts, ...event.contexts };\n if (nativeContexts.app) {\n event.contexts.app = { ...nativeContexts.app, ...event.contexts.app };\n }\n }\n\n const nativeTags = native.tags;\n if (nativeTags) {\n event.tags = { ...nativeTags, ...event.tags };\n }\n\n const nativeExtra = native.extra;\n if (nativeExtra) {\n event.extra = { ...nativeExtra, ...event.extra };\n }\n\n const nativeFingerprint = native.fingerprint;\n if (nativeFingerprint) {\n event.fingerprint = (event.fingerprint ?? []).concat(\n nativeFingerprint.filter(item => (event.fingerprint ?? []).indexOf(item) < 0),\n );\n }\n\n const nativeLevel = typeof native['level'] === 'string' ? severityLevelFromString(native['level']) : undefined;\n if (!event.level && nativeLevel) {\n event.level = nativeLevel;\n }\n\n const nativeEnvironment = native['environment'];\n if (!event.environment && nativeEnvironment) {\n event.environment = nativeEnvironment;\n }\n\n const nativeBreadcrumbs = Array.isArray(native['breadcrumbs'])\n ? native['breadcrumbs'].map(breadcrumbFromObject)\n : undefined;\n if (nativeBreadcrumbs) {\n const maxBreadcrumbs = client?.getOptions().maxBreadcrumbs ?? 100; // Default is 100.\n event.breadcrumbs = nativeBreadcrumbs\n .concat(event.breadcrumbs || []) // concatenate the native and js breadcrumbs\n .sort((a, b) => (a.timestamp ?? 0) - (b.timestamp ?? 0)) // sort by timestamp\n .slice(-maxBreadcrumbs); // keep the last maxBreadcrumbs\n }\n\n return event;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"expocontext.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/expocontext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,WAAW,EAA0B,MAAM,cAAc,CAAC;AAQxG,eAAO,MAAM,uBAAuB,gBAAgB,CAAC;AAErD,6CAA6C;AAC7C,eAAO,MAAM,sBAAsB,QAAO,WA0DzC,CAAC;AAEF;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,kBAAkB,CAqC1D;AAwDD,KAAK,kBAAkB,GAAG,OAAO,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,wBAAwB,EAAE,OAAO,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uBAAuB,EAAE,MAAM,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC"}
1
+ {"version":3,"file":"expocontext.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/expocontext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAkC,KAAK,WAAW,EAAyB,MAAM,cAAc,CAAC;AAQvG,eAAO,MAAM,uBAAuB,gBAAgB,CAAC;AAErD,6CAA6C;AAC7C,eAAO,MAAM,sBAAsB,QAAO,WA0DzC,CAAC;AAEF;;GAEG;AACH,wBAAgB,qBAAqB,IAAI,kBAAkB,CAqC1D;AAwDD,KAAK,kBAAkB,GAAG,OAAO,CAAC;IAChC,UAAU,EAAE,OAAO,CAAC;IACpB,kBAAkB,EAAE,OAAO,CAAC;IAC5B,mBAAmB,EAAE,OAAO,CAAC;IAC7B,wBAAwB,EAAE,OAAO,CAAC;IAClC,SAAS,EAAE,MAAM,CAAC;IAClB,OAAO,EAAE,MAAM,CAAC;IAChB,eAAe,EAAE,MAAM,CAAC;IACxB,mBAAmB,EAAE,MAAM,CAAC;IAC5B,uBAAuB,EAAE,MAAM,CAAC;IAChC,eAAe,EAAE,MAAM,CAAC;IACxB,UAAU,EAAE,MAAM,CAAC;CACpB,CAAC,CAAC"}
@@ -1,4 +1,4 @@
1
- import { logger } from '@sentry/core';
1
+ import { debug } from '@sentry/core';
2
2
  import { isExpo, isExpoGo } from '../utils/environment';
3
3
  import { getExpoDevice, getExpoUpdates } from '../utils/expomodules';
4
4
  import { NATIVE } from '../wrapper';
@@ -25,7 +25,7 @@ export const expoContextIntegration = () => {
25
25
  NATIVE.setContext(OTA_UPDATES_CONTEXT_KEY, expoUpdates);
26
26
  }
27
27
  catch (error) {
28
- logger.error('Error setting Expo updates context:', error);
28
+ debug.error('Error setting Expo updates context:', error);
29
29
  }
30
30
  }
31
31
  function processEvent(event) {
@@ -1 +1 @@
1
- {"version":3,"file":"expocontext.js","sourceRoot":"","sources":["../../../src/js/integrations/exp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;GAEG;AACH,SAAS,oBAAoB;IAC3B,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IAEnC,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,SAAS,CAAC;KAClB;IAED,OAAO;QACL,IAAI,EAAE,UAAU,CAAC,UAAU;QAC3B,SAAS,EAAE,CAAC,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,QAAQ,CAAA;QAChC,KAAK,EAAE,UAAU,CAAC,SAAS;QAC3B,YAAY,EAAE,UAAU,CAAC,YAAY;QACrC,WAAW,EAAE,UAAU,CAAC,WAAW;KACpC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,gBAAgB;IACvB,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IAEnC,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,SAAS,CAAC;KAClB;IAED,OAAO;QACL,KAAK,EAAE,UAAU,CAAC,SAAS;QAC3B,OAAO,EAAE,UAAU,CAAC,SAAS;QAC7B,IAAI,EAAE,UAAU,CAAC,MAAM;KACxB,CAAC;AACJ,CAAC","sourcesContent":["import { type DeviceContext, type Event, type Integration, type OsContext, logger } from '@sentry/core';\nimport type { ReactNativeClient } from '../client';\nimport { isExpo, isExpoGo } from '../utils/environment';\nimport { getExpoDevice, getExpoUpdates } from '../utils/expomodules';\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'ExpoContext';\n\nexport const OTA_UPDATES_CONTEXT_KEY = 'ota_updates';\n\n/** Load device context from expo modules. */\nexport const expoContextIntegration = (): Integration => {\n let _expoUpdatesContextCached: ExpoUpdatesContext | undefined;\n\n function setup(client: ReactNativeClient): void {\n client.on('afterInit', () => {\n if (!client.getOptions().enableNative) {\n return;\n }\n\n setExpoUpdatesNativeContext();\n });\n }\n\n function setExpoUpdatesNativeContext(): void {\n if (!isExpo() || isExpoGo()) {\n return;\n }\n\n const expoUpdates = getExpoUpdatesContextCached();\n\n try {\n // Ensures native errors and crashes have the same context as JS errors\n NATIVE.setContext(OTA_UPDATES_CONTEXT_KEY, expoUpdates);\n } catch (error) {\n logger.error('Error setting Expo updates context:', error);\n }\n }\n\n function processEvent(event: Event): Event {\n if (!isExpo()) {\n return event;\n }\n\n addExpoGoContext(event);\n addExpoUpdatesContext(event);\n return event;\n }\n\n function addExpoUpdatesContext(event: Event): void {\n event.contexts = event.contexts || {};\n event.contexts[OTA_UPDATES_CONTEXT_KEY] = {\n ...getExpoUpdatesContextCached(),\n };\n }\n\n function getExpoUpdatesContextCached(): ExpoUpdatesContext {\n if (_expoUpdatesContextCached) {\n return _expoUpdatesContextCached;\n }\n\n return (_expoUpdatesContextCached = getExpoUpdatesContext());\n }\n\n return {\n name: INTEGRATION_NAME,\n setup,\n processEvent,\n };\n};\n\n/**\n * @internal Exposed for testing purposes\n */\nexport function getExpoUpdatesContext(): ExpoUpdatesContext {\n const expoUpdates = getExpoUpdates();\n if (!expoUpdates) {\n return {\n is_enabled: false,\n };\n }\n\n const updatesContext: ExpoUpdatesContext = {\n is_enabled: !!expoUpdates.isEnabled,\n is_embedded_launch: !!expoUpdates.isEmbeddedLaunch,\n is_emergency_launch: !!expoUpdates.isEmergencyLaunch,\n is_using_embedded_assets: !!expoUpdates.isUsingEmbeddedAssets,\n };\n\n if (typeof expoUpdates.updateId === 'string' && expoUpdates.updateId) {\n updatesContext.update_id = expoUpdates.updateId.toLowerCase();\n }\n if (typeof expoUpdates.channel === 'string' && expoUpdates.channel) {\n updatesContext.channel = expoUpdates.channel.toLowerCase();\n }\n if (typeof expoUpdates.runtimeVersion === 'string' && expoUpdates.runtimeVersion) {\n updatesContext.runtime_version = expoUpdates.runtimeVersion.toLowerCase();\n }\n if (typeof expoUpdates.checkAutomatically === 'string' && expoUpdates.checkAutomatically) {\n updatesContext.check_automatically = expoUpdates.checkAutomatically.toLowerCase();\n }\n if (typeof expoUpdates.emergencyLaunchReason === 'string' && expoUpdates.emergencyLaunchReason) {\n updatesContext.emergency_launch_reason = expoUpdates.emergencyLaunchReason;\n }\n if (typeof expoUpdates.launchDuration === 'number') {\n updatesContext.launch_duration = expoUpdates.launchDuration;\n }\n if (expoUpdates.createdAt instanceof Date) {\n updatesContext.created_at = expoUpdates.createdAt.toISOString();\n }\n return updatesContext;\n}\n\nfunction addExpoGoContext(event: Event): void {\n if (!isExpoGo()) {\n return;\n }\n\n const expoDeviceContext = getExpoDeviceContext();\n if (expoDeviceContext) {\n event.contexts = event.contexts || {};\n event.contexts.device = { ...expoDeviceContext, ...event.contexts.device };\n }\n\n const expoOsContext = getExpoOsContext();\n if (expoOsContext) {\n event.contexts = event.contexts || {};\n event.contexts.os = { ...expoOsContext, ...event.contexts.os };\n }\n}\n\n/**\n * Returns the Expo Device context if present\n */\nfunction getExpoDeviceContext(): DeviceContext | undefined {\n const expoDevice = getExpoDevice();\n\n if (!expoDevice) {\n return undefined;\n }\n\n return {\n name: expoDevice.deviceName,\n simulator: !expoDevice?.isDevice,\n model: expoDevice.modelName,\n manufacturer: expoDevice.manufacturer,\n memory_size: expoDevice.totalMemory,\n };\n}\n\n/**\n * Returns the Expo OS context if present\n */\nfunction getExpoOsContext(): OsContext | undefined {\n const expoDevice = getExpoDevice();\n\n if (!expoDevice) {\n return undefined;\n }\n\n return {\n build: expoDevice.osBuildId,\n version: expoDevice.osVersion,\n name: expoDevice.osName,\n };\n}\n\ntype ExpoUpdatesContext = Partial<{\n is_enabled: boolean;\n is_embedded_launch: boolean;\n is_emergency_launch: boolean;\n is_using_embedded_assets: boolean;\n update_id: string;\n channel: string;\n runtime_version: string;\n check_automatically: string;\n emergency_launch_reason: string;\n launch_duration: number;\n created_at: string;\n}>;\n"]}
1
+ {"version":3,"file":"expocontext.js","sourceRoot":"","sources":["../../../src/js/integrations/expocontext.ts"],"names":[],"mappings":"AAAA,OAAO,EAAoE,KAAK,EAAE,MAAM,cAAc,CAAC;AAEvG,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,MAAM,sBAAsB,CAAC;AACxD,OAAO,EAAE,aAA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UAAU,CAAC,UAAU;QAC3B,SAAS,EAAE,CAAC,CAAA,UAAU,aAAV,UAAU,uBAAV,UAAU,CAAE,QAAQ,CAAA;QAChC,KAAK,EAAE,UAAU,CAAC,SAAS;QAC3B,YAAY,EAAE,UAAU,CAAC,YAAY;QACrC,WAAW,EAAE,UAAU,CAAC,WAAW;KACpC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAS,gBAAgB;IACvB,MAAM,UAAU,GAAG,aAAa,EAAE,CAAC;IAEnC,IAAI,CAAC,UAAU,EAAE;QACf,OAAO,SAAS,CAAC;KAClB;IAED,OAAO;QACL,KAAK,EAAE,UAAU,CAAC,SAAS;QAC3B,OAAO,EAAE,UAAU,CAAC,SAAS;QAC7B,IAAI,EAAE,UAAU,CAAC,MAAM;KACxB,CAAC;AACJ,CAAC","sourcesContent":["import { type DeviceContext, type Event, type Integration, type OsContext, debug } from '@sentry/core';\nimport type { ReactNativeClient } from '../client';\nimport { isExpo, isExpoGo } from '../utils/environment';\nimport { getExpoDevice, getExpoUpdates } from '../utils/expomodules';\nimport { NATIVE } from '../wrapper';\n\nconst INTEGRATION_NAME = 'ExpoContext';\n\nexport const OTA_UPDATES_CONTEXT_KEY = 'ota_updates';\n\n/** Load device context from expo modules. */\nexport const expoContextIntegration = (): Integration => {\n let _expoUpdatesContextCached: ExpoUpdatesContext | undefined;\n\n function setup(client: ReactNativeClient): void {\n client.on('afterInit', () => {\n if (!client.getOptions().enableNative) {\n return;\n }\n\n setExpoUpdatesNativeContext();\n });\n }\n\n function setExpoUpdatesNativeContext(): void {\n if (!isExpo() || isExpoGo()) {\n return;\n }\n\n const expoUpdates = getExpoUpdatesContextCached();\n\n try {\n // Ensures native errors and crashes have the same context as JS errors\n NATIVE.setContext(OTA_UPDATES_CONTEXT_KEY, expoUpdates);\n } catch (error) {\n debug.error('Error setting Expo updates context:', error);\n }\n }\n\n function processEvent(event: Event): Event {\n if (!isExpo()) {\n return event;\n }\n\n addExpoGoContext(event);\n addExpoUpdatesContext(event);\n return event;\n }\n\n function addExpoUpdatesContext(event: Event): void {\n event.contexts = event.contexts || {};\n event.contexts[OTA_UPDATES_CONTEXT_KEY] = {\n ...getExpoUpdatesContextCached(),\n };\n }\n\n function getExpoUpdatesContextCached(): ExpoUpdatesContext {\n if (_expoUpdatesContextCached) {\n return _expoUpdatesContextCached;\n }\n\n return (_expoUpdatesContextCached = getExpoUpdatesContext());\n }\n\n return {\n name: INTEGRATION_NAME,\n setup,\n processEvent,\n };\n};\n\n/**\n * @internal Exposed for testing purposes\n */\nexport function getExpoUpdatesContext(): ExpoUpdatesContext {\n const expoUpdates = getExpoUpdates();\n if (!expoUpdates) {\n return {\n is_enabled: false,\n };\n }\n\n const updatesContext: ExpoUpdatesContext = {\n is_enabled: !!expoUpdates.isEnabled,\n is_embedded_launch: !!expoUpdates.isEmbeddedLaunch,\n is_emergency_launch: !!expoUpdates.isEmergencyLaunch,\n is_using_embedded_assets: !!expoUpdates.isUsingEmbeddedAssets,\n };\n\n if (typeof expoUpdates.updateId === 'string' && expoUpdates.updateId) {\n updatesContext.update_id = expoUpdates.updateId.toLowerCase();\n }\n if (typeof expoUpdates.channel === 'string' && expoUpdates.channel) {\n updatesContext.channel = expoUpdates.channel.toLowerCase();\n }\n if (typeof expoUpdates.runtimeVersion === 'string' && expoUpdates.runtimeVersion) {\n updatesContext.runtime_version = expoUpdates.runtimeVersion.toLowerCase();\n }\n if (typeof expoUpdates.checkAutomatically === 'string' && expoUpdates.checkAutomatically) {\n updatesContext.check_automatically = expoUpdates.checkAutomatically.toLowerCase();\n }\n if (typeof expoUpdates.emergencyLaunchReason === 'string' && expoUpdates.emergencyLaunchReason) {\n updatesContext.emergency_launch_reason = expoUpdates.emergencyLaunchReason;\n }\n if (typeof expoUpdates.launchDuration === 'number') {\n updatesContext.launch_duration = expoUpdates.launchDuration;\n }\n if (expoUpdates.createdAt instanceof Date) {\n updatesContext.created_at = expoUpdates.createdAt.toISOString();\n }\n return updatesContext;\n}\n\nfunction addExpoGoContext(event: Event): void {\n if (!isExpoGo()) {\n return;\n }\n\n const expoDeviceContext = getExpoDeviceContext();\n if (expoDeviceContext) {\n event.contexts = event.contexts || {};\n event.contexts.device = { ...expoDeviceContext, ...event.contexts.device };\n }\n\n const expoOsContext = getExpoOsContext();\n if (expoOsContext) {\n event.contexts = event.contexts || {};\n event.contexts.os = { ...expoOsContext, ...event.contexts.os };\n }\n}\n\n/**\n * Returns the Expo Device context if present\n */\nfunction getExpoDeviceContext(): DeviceContext | undefined {\n const expoDevice = getExpoDevice();\n\n if (!expoDevice) {\n return undefined;\n }\n\n return {\n name: expoDevice.deviceName,\n simulator: !expoDevice?.isDevice,\n model: expoDevice.modelName,\n manufacturer: expoDevice.manufacturer,\n memory_size: expoDevice.totalMemory,\n };\n}\n\n/**\n * Returns the Expo OS context if present\n */\nfunction getExpoOsContext(): OsContext | undefined {\n const expoDevice = getExpoDevice();\n\n if (!expoDevice) {\n return undefined;\n }\n\n return {\n build: expoDevice.osBuildId,\n version: expoDevice.osVersion,\n name: expoDevice.osName,\n };\n}\n\ntype ExpoUpdatesContext = Partial<{\n is_enabled: boolean;\n is_embedded_launch: boolean;\n is_emergency_launch: boolean;\n is_using_embedded_assets: boolean;\n update_id: string;\n channel: string;\n runtime_version: string;\n check_automatically: string;\n emergency_launch_reason: string;\n launch_duration: number;\n created_at: string;\n}>;\n"]}
@@ -24,5 +24,6 @@ export { appRegistryIntegration } from './appRegistry';
24
24
  export { timeToDisplayIntegration } from '../tracing/integrations/timeToDisplayIntegration';
25
25
  export { breadcrumbsIntegration } from './breadcrumbs';
26
26
  export { primitiveTagIntegration } from './primitiveTagIntegration';
27
+ export { logEnricherIntegration } from './logEnricherIntegration';
27
28
  export { browserApiErrorsIntegration, dedupeIntegration, functionToStringIntegration, globalHandlersIntegration as browserGlobalHandlersIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, linkedErrorsIntegration as browserLinkedErrorsIntegration, rewriteFramesIntegration, extraErrorDataIntegration, } from '@sentry/react';
28
29
  //# sourceMappingURL=exports.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"exports.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAC/G,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,0B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AAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAC/G,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EACL,2BAA2B,EAC3B,iBAAiB,EACjB,2BAA2B,EAC3B,yBAAyB,IAAI,gCAAgC,EAC7D,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,IAAI,8BAA8B,EACzD,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,eAAe,CAAC"}
@@ -24,5 +24,6 @@ export { appRegistryIntegration } from './appRegistry';
24
24
  export { timeToDisplayIntegration } from '../tracing/integrations/timeToDisplayIntegration';
25
25
  export { breadcrumbsIntegration } from './breadcrumbs';
26
26
  export { primitiveTagIntegration } from './primitiveTagIntegration';
27
+ export { logEnricherIntegration } from './logEnricherIntegration';
27
28
  export { browserApiErrorsIntegration, dedupeIntegration, functionToStringIntegration, globalHandlersIntegration as browserGlobalHandlersIntegration, httpClientIntegration, httpContextIntegration, inboundFiltersIntegration, linkedErrorsIntegration as browserLinkedErrorsIntegration, rewriteFramesIntegration, extraErrorDataIntegration, } from '@sentry/react';
28
29
  //# sourceMappingURL=exports.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"exports.js","sourceRoot":"","sources":["../../../src/js/integrations/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAC/G,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AAEpE,OAAO,EACL,2BAA2B,EAC3B,iBAAiB,EACjB,2BAA2B,EAC3B,yBAAyB,IAAI,gCAAgC,EAC7D,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,IAAI,8BAA8B,EACzD,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,eAAe,CAAC","sourcesContent":["export { debugSymbolicatorIntegration } from './debugsymbolicator';\nexport { deviceContextIntegration } from './devicecontext';\nexport { reactNativeErrorHandlersIntegration } from './reactnativeerrorhandlers';\nexport { nativeLinkedErrorsIntegration } from './nativelinkederrors';\nexport { nativeReleaseIntegration } from './release';\nexport { eventOriginIntegration } from './eventorigin';\nexport { sdkInfoIntegration } from './sdkinfo';\nexport { reactNativeInfoIntegration } from './reactnativeinfo';\nexport { modulesLoaderIntegration } from './modulesloader';\nexport { hermesProfilingIntegration } from '../profiling/integration';\nexport { screenshotIntegration } from './screenshot';\nexport { viewHierarchyIntegration } from './viewhierarchy';\nexport { expoContextIntegration } from './expocontext';\nexport { spotlightIntegration } from './spotlight';\nexport { mobileReplayIntegration } from '../replay/mobilereplay';\nexport { feedbackIntegration } from '../feedback/integration';\nexport { browserReplayIntegration } from '../replay/browserReplay';\nexport { appStartIntegration } from '../tracing/integrations/appStart';\nexport { nativeFramesIntegration, createNativeFramesIntegrations } from '../tracing/integrations/nativeFrames';\nexport { stallTrackingIntegration } from '../tracing/integrations/stalltracking';\nexport { userInteractionIntegration } from '../tracing/integrations/userInteraction';\nexport { createReactNativeRewriteFrames } from './rewriteframes';\nexport { appRegistryIntegration } from './appRegistry';\nexport { timeToDisplayIntegration } from '../tracing/integrations/timeToDisplayIntegration';\nexport { breadcrumbsIntegration } from './breadcrumbs';\nexport { primitiveTagIntegration } from './primitiveTagIntegration';\n\nexport {\n browserApiErrorsIntegration,\n dedupeIntegration,\n functionToStringIntegration,\n globalHandlersIntegration as browserGlobalHandlersIntegration,\n httpClientIntegration,\n httpContextIntegration,\n inboundFiltersIntegration,\n linkedErrorsIntegration as browserLinkedErrorsIntegration,\n rewriteFramesIntegration,\n extraErrorDataIntegration,\n} from '@sentry/react';\n"]}
1
+ {"version":3,"file":"exports.js","sourceRoot":"","sources":["../../../src/js/integrations/exports.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,4BAA4B,EAAE,MAAM,qBAAqB,CAAC;AACnE,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,mCAAmC,EAAE,MAAM,4BAA4B,CAAC;AACjF,OAAO,EAAE,6BAA6B,EAAE,MAAM,sBAAsB,CAAC;AACrE,OAAO,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AACrD,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,MAAM,mBAAmB,CAAC;AAC/D,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,0BAA0B,EAAE,MAAM,0BAA0B,CAAC;AACtE,OAAO,EAAE,qBAAqB,EAAE,MAAM,cAAc,CAAC;AACrD,OAAO,EAAE,wBAAwB,EAAE,MAAM,iBAAiB,CAAC;AAC3D,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,oBAAoB,EAAE,MAAM,aAAa,CAAC;AACnD,OAAO,EAAE,uBAAuB,EAAE,MAAM,wBAAwB,CAAC;AACjE,OAAO,EAAE,mBAAmB,EAAE,MAAM,yBAAyB,CAAC;AAC9D,OAAO,EAAE,wBAAwB,EAAE,MAAM,yBAAyB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,kCAAkC,CAAC;AACvE,OAAO,EAAE,uBAAuB,EAAE,8BAA8B,EAAE,MAAM,sCAAsC,CAAC;AAC/G,OAAO,EAAE,wBAAwB,EAAE,MAAM,uCAAuC,CAAC;AACjF,OAAO,EAAE,0BAA0B,EAAE,MAAM,yCAAyC,CAAC;AACrF,OAAO,EAAE,8BAA8B,EAAE,MAAM,iBAAiB,CAAC;AACjE,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,wBAAwB,EAAE,MAAM,kDAAkD,CAAC;AAC5F,OAAO,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AACvD,OAAO,EAAE,uBAAuB,EAAE,MAAM,2BAA2B,CAAC;AACpE,OAAO,EAAE,sBAAsB,EAAE,MAAM,0BAA0B,CAAC;AAElE,OAAO,EACL,2BAA2B,EAC3B,iBAAiB,EACjB,2BAA2B,EAC3B,yBAAyB,IAAI,gCAAgC,EAC7D,qBAAqB,EACrB,sBAAsB,EACtB,yBAAyB,EACzB,uBAAuB,IAAI,8BAA8B,EACzD,wBAAwB,EACxB,yBAAyB,GAC1B,MAAM,eAAe,CAAC","sourcesContent":["export { debugSymbolicatorIntegration } from './debugsymbolicator';\nexport { deviceContextIntegration } from './devicecontext';\nexport { reactNativeErrorHandlersIntegration } from './reactnativeerrorhandlers';\nexport { nativeLinkedErrorsIntegration } from './nativelinkederrors';\nexport { nativeReleaseIntegration } from './release';\nexport { eventOriginIntegration } from './eventorigin';\nexport { sdkInfoIntegration } from './sdkinfo';\nexport { reactNativeInfoIntegration } from './reactnativeinfo';\nexport { modulesLoaderIntegration } from './modulesloader';\nexport { hermesProfilingIntegration } from '../profiling/integration';\nexport { screenshotIntegration } from './screenshot';\nexport { viewHierarchyIntegration } from './viewhierarchy';\nexport { expoContextIntegration } from './expocontext';\nexport { spotlightIntegration } from './spotlight';\nexport { mobileReplayIntegration } from '../replay/mobilereplay';\nexport { feedbackIntegration } from '../feedback/integration';\nexport { browserReplayIntegration } from '../replay/browserReplay';\nexport { appStartIntegration } from '../tracing/integrations/appStart';\nexport { nativeFramesIntegration, createNativeFramesIntegrations } from '../tracing/integrations/nativeFrames';\nexport { stallTrackingIntegration } from '../tracing/integrations/stalltracking';\nexport { userInteractionIntegration } from '../tracing/integrations/userInteraction';\nexport { createReactNativeRewriteFrames } from './rewriteframes';\nexport { appRegistryIntegration } from './appRegistry';\nexport { timeToDisplayIntegration } from '../tracing/integrations/timeToDisplayIntegration';\nexport { breadcrumbsIntegration } from './breadcrumbs';\nexport { primitiveTagIntegration } from './primitiveTagIntegration';\nexport { logEnricherIntegration } from './logEnricherIntegration';\n\nexport {\n browserApiErrorsIntegration,\n dedupeIntegration,\n functionToStringIntegration,\n globalHandlersIntegration as browserGlobalHandlersIntegration,\n httpClientIntegration,\n httpContextIntegration,\n inboundFiltersIntegration,\n linkedErrorsIntegration as browserLinkedErrorsIntegration,\n rewriteFramesIntegration,\n extraErrorDataIntegration,\n} from '@sentry/react';\n"]}
@@ -0,0 +1,3 @@
1
+ import type { Integration } from '@sentry/core';
2
+ export declare const logEnricherIntegration: () => Integration;
3
+ //# sourceMappingURL=logEnricherIntegration.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"logEnricherIntegration.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/logEnricherIntegration.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,WAAW,EAAO,MAAM,cAAc,CAAC;AAOrD,eAAO,MAAM,sBAAsB,QAAO,WAkBzC,CAAC"}