@sentry/react-native 8.5.0 → 8.6.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 (212) hide show
  1. package/RNSentry.podspec +1 -1
  2. package/android/expo-handler/build.gradle +20 -0
  3. package/android/expo-handler/src/main/java/io/sentry/react/expo/SentryExpoPackage.java +22 -0
  4. package/android/expo-handler/src/main/java/io/sentry/react/expo/SentryReactNativeHostHandler.java +48 -0
  5. package/android/expo-stubs/README.md +7 -0
  6. package/android/expo-stubs/build.gradle +23 -0
  7. package/android/expo-stubs/gradle/wrapper/gradle-wrapper.jar +0 -0
  8. package/android/expo-stubs/gradle/wrapper/gradle-wrapper.properties +7 -0
  9. package/android/expo-stubs/gradlew +251 -0
  10. package/android/expo-stubs/gradlew.bat +94 -0
  11. package/android/expo-stubs/settings.gradle +1 -0
  12. package/android/expo-stubs/src/main/java/expo/modules/core/interfaces/Package.java +11 -0
  13. package/android/expo-stubs/src/main/java/expo/modules/core/interfaces/ReactNativeHostHandler.java +7 -0
  14. package/android/libs/expo-stubs.jar +0 -0
  15. package/android/libs/replay-stubs.jar +0 -0
  16. package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +15 -11
  17. package/android/src/main/java/io/sentry/react/RNSentryVersion.java +1 -1
  18. package/dist/js/NativeLogListener.js.map +1 -1
  19. package/dist/js/RNSentryReplayMaskNativeComponent.d.ts.map +1 -1
  20. package/dist/js/RNSentryReplayUnmaskNativeComponent.d.ts.map +1 -1
  21. package/dist/js/breadcrumb.js.map +1 -1
  22. package/dist/js/client.js.map +1 -1
  23. package/dist/js/feedback/FeedbackButton.js.map +1 -1
  24. package/dist/js/feedback/FeedbackWidget.js +6 -6
  25. package/dist/js/feedback/FeedbackWidget.js.map +1 -1
  26. package/dist/js/feedback/FeedbackWidget.styles.d.ts.map +1 -1
  27. package/dist/js/feedback/FeedbackWidgetManager.js.map +1 -1
  28. package/dist/js/feedback/FeedbackWidgetProvider.js.map +1 -1
  29. package/dist/js/feedback/ScreenshotButton.d.ts +1 -1
  30. package/dist/js/feedback/ScreenshotButton.js.map +1 -1
  31. package/dist/js/feedback/ShakeToReportBug.js.map +1 -1
  32. package/dist/js/feedback/defaults.js.map +1 -1
  33. package/dist/js/feedback/integration.d.ts +2 -2
  34. package/dist/js/feedback/integration.d.ts.map +1 -1
  35. package/dist/js/feedback/integration.js.map +1 -1
  36. package/dist/js/feedback/lazy.js.map +1 -1
  37. package/dist/js/feedback/utils.d.ts.map +1 -1
  38. package/dist/js/feedback/utils.js.map +1 -1
  39. package/dist/js/integrations/appRegistry.d.ts.map +1 -1
  40. package/dist/js/integrations/appRegistry.js.map +1 -1
  41. package/dist/js/integrations/breadcrumbs.d.ts.map +1 -1
  42. package/dist/js/integrations/debugsymbolicator.js +3 -3
  43. package/dist/js/integrations/debugsymbolicator.js.map +1 -1
  44. package/dist/js/integrations/debugsymbolicatorutils.js.map +1 -1
  45. package/dist/js/integrations/default.js +1 -1
  46. package/dist/js/integrations/default.js.map +1 -1
  47. package/dist/js/integrations/devicecontext.js +1 -1
  48. package/dist/js/integrations/devicecontext.js.map +1 -1
  49. package/dist/js/integrations/expoconstants.js.map +1 -1
  50. package/dist/js/integrations/expocontext.js.map +1 -1
  51. package/dist/js/integrations/expoupdateslistener.js.map +1 -1
  52. package/dist/js/integrations/logEnricherIntegration.js +1 -1
  53. package/dist/js/integrations/logEnricherIntegration.js.map +1 -1
  54. package/dist/js/integrations/modulesloader.js.map +1 -1
  55. package/dist/js/integrations/nativelinkederrors.d.ts.map +1 -1
  56. package/dist/js/integrations/nativelinkederrors.js +1 -0
  57. package/dist/js/integrations/nativelinkederrors.js.map +1 -1
  58. package/dist/js/integrations/primitiveTagIntegration.js.map +1 -1
  59. package/dist/js/integrations/reactnativeerrorhandlers.d.ts.map +1 -1
  60. package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
  61. package/dist/js/integrations/reactnativeerrorhandlersutils.js.map +1 -1
  62. package/dist/js/integrations/reactnativeinfo.js.map +1 -1
  63. package/dist/js/integrations/release.js +1 -1
  64. package/dist/js/integrations/release.js.map +1 -1
  65. package/dist/js/integrations/rewriteframes.js.map +1 -1
  66. package/dist/js/integrations/screenshot.js +1 -1
  67. package/dist/js/integrations/screenshot.js.map +1 -1
  68. package/dist/js/integrations/sdkinfo.js.map +1 -1
  69. package/dist/js/integrations/spotlight.js.map +1 -1
  70. package/dist/js/integrations/viewhierarchy.js +1 -1
  71. package/dist/js/integrations/viewhierarchy.js.map +1 -1
  72. package/dist/js/misc.js.map +1 -1
  73. package/dist/js/options.d.ts +1 -1
  74. package/dist/js/options.js.map +1 -1
  75. package/dist/js/playground/examples.js.map +1 -1
  76. package/dist/js/playground/modal.d.ts +2 -2
  77. package/dist/js/playground/modal.d.ts.map +1 -1
  78. package/dist/js/playground/modal.js +6 -6
  79. package/dist/js/playground/modal.js.map +1 -1
  80. package/dist/js/profiling/cache.js.map +1 -1
  81. package/dist/js/profiling/convertHermesProfile.js.map +1 -1
  82. package/dist/js/profiling/debugid.js.map +1 -1
  83. package/dist/js/profiling/integration.d.ts.map +1 -1
  84. package/dist/js/profiling/integration.js.map +1 -1
  85. package/dist/js/profiling/utils.js.map +1 -1
  86. package/dist/js/replay/CustomMask.d.ts.map +1 -1
  87. package/dist/js/replay/CustomMask.js.map +1 -1
  88. package/dist/js/replay/CustomMask.web.d.ts.map +1 -1
  89. package/dist/js/replay/browserReplay.d.ts.map +1 -1
  90. package/dist/js/replay/browserReplay.js.map +1 -1
  91. package/dist/js/replay/mobilereplay.d.ts.map +1 -1
  92. package/dist/js/replay/mobilereplay.js +21 -2
  93. package/dist/js/replay/mobilereplay.js.map +1 -1
  94. package/dist/js/replay/networkUtils.d.ts +0 -1
  95. package/dist/js/replay/networkUtils.d.ts.map +1 -1
  96. package/dist/js/replay/networkUtils.js.map +1 -1
  97. package/dist/js/replay/xhrUtils.js.map +1 -1
  98. package/dist/js/scopeSync.js.map +1 -1
  99. package/dist/js/sdk.d.ts.map +1 -1
  100. package/dist/js/sdk.js +4 -2
  101. package/dist/js/sdk.js.map +1 -1
  102. package/dist/js/tools/ModulesCollector.js.map +1 -1
  103. package/dist/js/tools/easBuildHooks.js +13 -14
  104. package/dist/js/tools/easBuildHooks.js.map +1 -1
  105. package/dist/js/tools/enableLogger.js +1 -2
  106. package/dist/js/tools/enableLogger.js.map +1 -1
  107. package/dist/js/tools/metroMiddleware.d.ts.map +1 -1
  108. package/dist/js/tools/metroMiddleware.js.map +1 -1
  109. package/dist/js/tools/metroconfig.js +6 -7
  110. package/dist/js/tools/metroconfig.js.map +1 -1
  111. package/dist/js/tools/sentryBabelTransformerUtils.js +7 -7
  112. package/dist/js/tools/sentryBabelTransformerUtils.js.map +1 -1
  113. package/dist/js/tools/sentryMetroSerializer.d.ts.map +1 -1
  114. package/dist/js/tools/sentryMetroSerializer.js +2 -2
  115. package/dist/js/tools/sentryMetroSerializer.js.map +1 -1
  116. package/dist/js/tools/sentryOptionsSerializer.js +1 -2
  117. package/dist/js/tools/sentryOptionsSerializer.js.map +1 -1
  118. package/dist/js/tools/sentryReleaseInjector.d.ts +1 -1
  119. package/dist/js/tools/sentryReleaseInjector.d.ts.map +1 -1
  120. package/dist/js/tools/sentryReleaseInjector.js.map +1 -1
  121. package/dist/js/tools/utils.d.ts.map +1 -1
  122. package/dist/js/tools/utils.js +7 -7
  123. package/dist/js/tools/utils.js.map +1 -1
  124. package/dist/js/tools/vendor/metro/countLines.d.ts.map +1 -1
  125. package/dist/js/tools/vendor/metro/utils.d.ts.map +1 -1
  126. package/dist/js/tools/vendor/metro/utils.js.map +1 -1
  127. package/dist/js/touchevents.d.ts.map +1 -1
  128. package/dist/js/touchevents.js +2 -0
  129. package/dist/js/touchevents.js.map +1 -1
  130. package/dist/js/tracing/expoAsset.js.map +1 -1
  131. package/dist/js/tracing/expoImage.js.map +1 -1
  132. package/dist/js/tracing/expoRouter.js.map +1 -1
  133. package/dist/js/tracing/gesturetracing.js.map +1 -1
  134. package/dist/js/tracing/integrations/appStart.d.ts +1 -1
  135. package/dist/js/tracing/integrations/appStart.d.ts.map +1 -1
  136. package/dist/js/tracing/integrations/appStart.js +5 -5
  137. package/dist/js/tracing/integrations/appStart.js.map +1 -1
  138. package/dist/js/tracing/integrations/nativeFrames.d.ts.map +1 -1
  139. package/dist/js/tracing/integrations/nativeFrames.js +4 -1
  140. package/dist/js/tracing/integrations/nativeFrames.js.map +1 -1
  141. package/dist/js/tracing/integrations/stalltracking.d.ts +1 -1
  142. package/dist/js/tracing/integrations/stalltracking.d.ts.map +1 -1
  143. package/dist/js/tracing/integrations/stalltracking.js +4 -1
  144. package/dist/js/tracing/integrations/stalltracking.js.map +1 -1
  145. package/dist/js/tracing/integrations/timeToDisplayIntegration.js +14 -14
  146. package/dist/js/tracing/integrations/timeToDisplayIntegration.js.map +1 -1
  147. package/dist/js/tracing/integrations/userInteraction.d.ts.map +1 -1
  148. package/dist/js/tracing/integrations/userInteraction.js.map +1 -1
  149. package/dist/js/tracing/onSpanEndUtils.d.ts.map +1 -1
  150. package/dist/js/tracing/onSpanEndUtils.js +20 -13
  151. package/dist/js/tracing/onSpanEndUtils.js.map +1 -1
  152. package/dist/js/tracing/reactnativenavigation.d.ts.map +1 -1
  153. package/dist/js/tracing/reactnativenavigation.js.map +1 -1
  154. package/dist/js/tracing/reactnativeprofiler.js.map +1 -1
  155. package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
  156. package/dist/js/tracing/reactnativetracing.js.map +1 -1
  157. package/dist/js/tracing/reactnavigation.d.ts +3 -0
  158. package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
  159. package/dist/js/tracing/reactnavigation.js +4 -2
  160. package/dist/js/tracing/reactnavigation.js.map +1 -1
  161. package/dist/js/tracing/span.d.ts +2 -17
  162. package/dist/js/tracing/span.d.ts.map +1 -1
  163. package/dist/js/tracing/span.js.map +1 -1
  164. package/dist/js/tracing/timeToDisplayFallback.d.ts.map +1 -1
  165. package/dist/js/tracing/timetodisplay.js.map +1 -1
  166. package/dist/js/tracing/timetodisplaynative.d.ts.map +1 -1
  167. package/dist/js/tracing/timetodisplaynative.js.map +1 -1
  168. package/dist/js/tracing/utils.js.map +1 -1
  169. package/dist/js/transports/encodePolyfill.d.ts +1 -1
  170. package/dist/js/transports/encodePolyfill.d.ts.map +1 -1
  171. package/dist/js/transports/encodePolyfill.js.map +1 -1
  172. package/dist/js/transports/native.js.map +1 -1
  173. package/dist/js/utils/AsyncExpiringMap.js.map +1 -1
  174. package/dist/js/utils/encode.js.map +1 -1
  175. package/dist/js/utils/environment.js.map +1 -1
  176. package/dist/js/utils/ignorerequirecyclelogs.js.map +1 -1
  177. package/dist/js/utils/normalize.js.map +1 -1
  178. package/dist/js/utils/outcome.js.map +1 -1
  179. package/dist/js/utils/primitiveConverter.js.map +1 -1
  180. package/dist/js/utils/release.js.map +1 -1
  181. package/dist/js/utils/rnlibraries.js.map +1 -1
  182. package/dist/js/utils/safe.js.map +1 -1
  183. package/dist/js/utils/worldwide.d.ts +0 -1
  184. package/dist/js/utils/worldwide.d.ts.map +1 -1
  185. package/dist/js/utils/xhr.d.ts +0 -1
  186. package/dist/js/utils/xhr.d.ts.map +1 -1
  187. package/dist/js/utils/xhr.js.map +1 -1
  188. package/dist/js/vendor/base64-js/fromByteArray.js.map +1 -1
  189. package/dist/js/vendor/buffer/utf8ToBytes.js.map +1 -1
  190. package/dist/js/version.d.ts +1 -1
  191. package/dist/js/version.js +1 -1
  192. package/dist/js/version.js.map +1 -1
  193. package/dist/js/wrapper.d.ts.map +1 -1
  194. package/dist/js/wrapper.js +5 -6
  195. package/dist/js/wrapper.js.map +1 -1
  196. package/expo-module.config.json +7 -0
  197. package/ios/RNSentryStart.m +4 -1
  198. package/ios/RNSentryVersion.m +1 -1
  199. package/package.json +10 -10
  200. package/ts3.8/dist/js/feedback/ScreenshotButton.d.ts +1 -1
  201. package/ts3.8/dist/js/feedback/integration.d.ts +2 -2
  202. package/ts3.8/dist/js/options.d.ts +1 -1
  203. package/ts3.8/dist/js/playground/modal.d.ts +2 -2
  204. package/ts3.8/dist/js/replay/networkUtils.d.ts +0 -1
  205. package/ts3.8/dist/js/tracing/integrations/appStart.d.ts +1 -1
  206. package/ts3.8/dist/js/tracing/integrations/stalltracking.d.ts +1 -1
  207. package/ts3.8/dist/js/tracing/reactnavigation.d.ts +3 -0
  208. package/ts3.8/dist/js/tracing/span.d.ts +2 -17
  209. package/ts3.8/dist/js/transports/encodePolyfill.d.ts +1 -1
  210. package/ts3.8/dist/js/utils/worldwide.d.ts +0 -1
  211. package/ts3.8/dist/js/utils/xhr.d.ts +0 -1
  212. package/ts3.8/dist/js/version.d.ts +1 -1
package/RNSentry.podspec CHANGED
@@ -51,7 +51,7 @@ Pod::Spec.new do |s|
51
51
  'HEADER_SEARCH_PATHS' => '$(inherited) "${PODS_ROOT}/Sentry/Sources/Sentry" "${PODS_ROOT}/Sentry/Sources/Sentry/include"'
52
52
  }
53
53
 
54
- s.dependency 'Sentry', '9.7.0'
54
+ s.dependency 'Sentry', '9.8.0'
55
55
 
56
56
  if defined? install_modules_dependencies
57
57
  # Default React Native dependencies for 0.71 and above (new and legacy architecture)
@@ -0,0 +1,20 @@
1
+ apply plugin: 'com.android.library'
2
+
3
+ android {
4
+ compileSdkVersion 31
5
+ namespace = "io.sentry.react.expo"
6
+
7
+ defaultConfig {
8
+ minSdkVersion 21
9
+ }
10
+
11
+ compileOptions {
12
+ sourceCompatibility JavaVersion.VERSION_1_8
13
+ targetCompatibility JavaVersion.VERSION_1_8
14
+ }
15
+ }
16
+
17
+ dependencies {
18
+ compileOnly project(':expo-modules-core')
19
+ compileOnly 'io.sentry:sentry-android:8.36.0'
20
+ }
@@ -0,0 +1,22 @@
1
+ package io.sentry.react.expo;
2
+
3
+ import android.content.Context;
4
+ import expo.modules.core.interfaces.Package;
5
+ import expo.modules.core.interfaces.ReactNativeHostHandler;
6
+ import java.util.Collections;
7
+ import java.util.List;
8
+
9
+ /**
10
+ * Expo package that registers {@link SentryReactNativeHostHandler} to capture native exceptions
11
+ * swallowed by Expo's bridgeless error handling.
12
+ *
13
+ * <p>This package is auto-discovered by Expo's autolinking system when {@code @sentry/react-native}
14
+ * is installed in an Expo project. It is not used in non-Expo React Native projects.
15
+ */
16
+ public class SentryExpoPackage implements Package {
17
+
18
+ @Override
19
+ public List<? extends ReactNativeHostHandler> createReactNativeHostHandlers(Context context) {
20
+ return Collections.singletonList(new SentryReactNativeHostHandler());
21
+ }
22
+ }
@@ -0,0 +1,48 @@
1
+ package io.sentry.react.expo;
2
+
3
+ import androidx.annotation.NonNull;
4
+ import expo.modules.core.interfaces.ReactNativeHostHandler;
5
+ import io.sentry.Sentry;
6
+ import io.sentry.exception.ExceptionMechanismException;
7
+ import io.sentry.protocol.Mechanism;
8
+
9
+ /**
10
+ * Captures native Android exceptions that are routed through Expo's {@code
11
+ * ExpoReactHostDelegate.handleInstanceException}.
12
+ *
13
+ * <p>On Expo SDK 53+, certain native exceptions (e.g., IllegalStateException from Fabric's
14
+ * SurfaceMountingManager) are caught by React Native and routed to {@code handleInstanceException}.
15
+ * Expo's implementation iterates registered host handlers but does not rethrow, so the exception
16
+ * never reaches Java's {@code UncaughtExceptionHandler} which Sentry relies on for crash capture.
17
+ *
18
+ * <p>This handler captures those exceptions directly via {@code Sentry.captureException} with an
19
+ * unhandled mechanism, ensuring they appear as crashes in Sentry.
20
+ */
21
+ public class SentryReactNativeHostHandler implements ReactNativeHostHandler {
22
+
23
+ private static final String MECHANISM_TYPE = "expoReactHost";
24
+
25
+ @Override
26
+ public void onReactInstanceException(boolean useDeveloperSupport, @NonNull Exception exception) {
27
+ if (useDeveloperSupport) {
28
+ return;
29
+ }
30
+
31
+ if (!Sentry.isEnabled()) {
32
+ return;
33
+ }
34
+
35
+ try { // NOPMD - We don't want to crash in any case
36
+ final Mechanism mechanism = new Mechanism();
37
+ mechanism.setType(MECHANISM_TYPE);
38
+ mechanism.setHandled(false);
39
+
40
+ final ExceptionMechanismException mechanismException =
41
+ new ExceptionMechanismException(mechanism, exception, Thread.currentThread());
42
+
43
+ Sentry.captureException(mechanismException);
44
+ } catch (Throwable ignored) { // NOPMD - We don't want to crash in any case
45
+ // ignore
46
+ }
47
+ }
48
+ }
@@ -0,0 +1,7 @@
1
+ This module provides stubs for `expo-modules-core` interfaces (`Package` and `ReactNativeHostHandler`) needed to compile the Expo handler tests in `RNSentryAndroidTester`.
2
+
3
+ The Expo handler (`android/expo-handler/`) registers a `ReactNativeHostHandler` that captures native exceptions swallowed by Expo's bridgeless error handling (`ExpoReactHostDelegate.handleInstanceException`). In Expo projects, the handler is compiled against the real `expo-modules-core` project. For unit testing in `RNSentryAndroidTester` (which doesn't have Expo), these stubs provide the interfaces at compile time.
4
+
5
+ ## Updating the stubs
6
+
7
+ To update the stubs, just run `yarn build` from the root of the repo and it will recompile the classes and put them under `packages/core/android/libs/expo-stubs.jar`. Check this newly generated `.jar` in and push.
@@ -0,0 +1,23 @@
1
+ allprojects {
2
+ repositories {
3
+ mavenCentral()
4
+ google()
5
+ }
6
+ }
7
+
8
+ apply plugin: 'java-library'
9
+
10
+ java {
11
+ sourceCompatibility = JavaVersion.VERSION_1_8
12
+ targetCompatibility = JavaVersion.VERSION_1_8
13
+ }
14
+
15
+ tasks.named('jar', Jar) {
16
+ archiveBaseName.set('expo-stubs')
17
+ archiveVersion.set('')
18
+ destinationDirectory.set(file("$rootDir/../libs"))
19
+ }
20
+
21
+ dependencies {
22
+ compileOnly 'com.google.android:android:4.1.1.4'
23
+ }
@@ -0,0 +1,7 @@
1
+ distributionBase=GRADLE_USER_HOME
2
+ distributionPath=wrapper/dists
3
+ distributionUrl=https\://services.gradle.org/distributions/gradle-8.13-bin.zip
4
+ networkTimeout=10000
5
+ validateDistributionUrl=true
6
+ zipStoreBase=GRADLE_USER_HOME
7
+ zipStorePath=wrapper/dists
@@ -0,0 +1,251 @@
1
+ #!/bin/sh
2
+
3
+ #
4
+ # Copyright © 2015-2021 the original authors.
5
+ #
6
+ # Licensed under the Apache License, Version 2.0 (the "License");
7
+ # you may not use this file except in compliance with the License.
8
+ # You may obtain a copy of the License at
9
+ #
10
+ # https://www.apache.org/licenses/LICENSE-2.0
11
+ #
12
+ # Unless required by applicable law or agreed to in writing, software
13
+ # distributed under the License is distributed on an "AS IS" BASIS,
14
+ # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
15
+ # See the License for the specific language governing permissions and
16
+ # limitations under the License.
17
+ #
18
+ # SPDX-License-Identifier: Apache-2.0
19
+ #
20
+
21
+ ##############################################################################
22
+ #
23
+ # Gradle start up script for POSIX generated by Gradle.
24
+ #
25
+ # Important for running:
26
+ #
27
+ # (1) You need a POSIX-compliant shell to run this script. If your /bin/sh is
28
+ # noncompliant, but you have some other compliant shell such as ksh or
29
+ # bash, then to run this script, type that shell name before the whole
30
+ # command line, like:
31
+ #
32
+ # ksh Gradle
33
+ #
34
+ # Busybox and similar reduced shells will NOT work, because this script
35
+ # requires all of these POSIX shell features:
36
+ # * functions;
37
+ # * expansions «$var», «${var}», «${var:-default}», «${var+SET}»,
38
+ # «${var#prefix}», «${var%suffix}», and «$( cmd )»;
39
+ # * compound commands having a testable exit status, especially «case»;
40
+ # * various built-in commands including «command», «set», and «ulimit».
41
+ #
42
+ # Important for patching:
43
+ #
44
+ # (2) This script targets any POSIX shell, so it avoids extensions provided
45
+ # by Bash, Ksh, etc; in particular arrays are avoided.
46
+ #
47
+ # The "traditional" practice of packing multiple parameters into a
48
+ # space-separated string is a well documented source of bugs and security
49
+ # problems, so this is (mostly) avoided, by progressively accumulating
50
+ # options in "$@", and eventually passing that to Java.
51
+ #
52
+ # Where the inherited environment variables (DEFAULT_JVM_OPTS, JAVA_OPTS,
53
+ # and GRADLE_OPTS) rely on word-splitting, this is performed explicitly;
54
+ # see the in-line comments for details.
55
+ #
56
+ # There are tweaks for specific operating systems such as AIX, CygWin,
57
+ # Darwin, MinGW, and NonStop.
58
+ #
59
+ # (3) This script is generated from the Groovy template
60
+ # https://github.com/gradle/gradle/blob/HEAD/platforms/jvm/plugins-application/src/main/resources/org/gradle/api/internal/plugins/unixStartScript.txt
61
+ # within the Gradle project.
62
+ #
63
+ # You can find Gradle at https://github.com/gradle/gradle/.
64
+ #
65
+ ##############################################################################
66
+
67
+ # Attempt to set APP_HOME
68
+
69
+ # Resolve links: $0 may be a link
70
+ app_path=$0
71
+
72
+ # Need this for daisy-chained symlinks.
73
+ while
74
+ APP_HOME=${app_path%"${app_path##*/}"} # leaves a trailing /; empty if no leading path
75
+ [ -h "$app_path" ]
76
+ do
77
+ ls=$( ls -ld "$app_path" )
78
+ link=${ls#*' -> '}
79
+ case $link in #(
80
+ /*) app_path=$link ;; #(
81
+ *) app_path=$APP_HOME$link ;;
82
+ esac
83
+ done
84
+
85
+ # This is normally unused
86
+ # shellcheck disable=SC2034
87
+ APP_BASE_NAME=${0##*/}
88
+ # Discard cd standard output in case $CDPATH is set (https://github.com/gradle/gradle/issues/25036)
89
+ APP_HOME=$( cd -P "${APP_HOME:-./}" > /dev/null && printf '%s\n' "$PWD" ) || exit
90
+
91
+ # Use the maximum available, or set MAX_FD != -1 to use that value.
92
+ MAX_FD=maximum
93
+
94
+ warn () {
95
+ echo "$*"
96
+ } >&2
97
+
98
+ die () {
99
+ echo
100
+ echo "$*"
101
+ echo
102
+ exit 1
103
+ } >&2
104
+
105
+ # OS specific support (must be 'true' or 'false').
106
+ cygwin=false
107
+ msys=false
108
+ darwin=false
109
+ nonstop=false
110
+ case "$( uname )" in #(
111
+ CYGWIN* ) cygwin=true ;; #(
112
+ Darwin* ) darwin=true ;; #(
113
+ MSYS* | MINGW* ) msys=true ;; #(
114
+ NONSTOP* ) nonstop=true ;;
115
+ esac
116
+
117
+ CLASSPATH=$APP_HOME/gradle/wrapper/gradle-wrapper.jar
118
+
119
+
120
+ # Determine the Java command to use to start the JVM.
121
+ if [ -n "$JAVA_HOME" ] ; then
122
+ if [ -x "$JAVA_HOME/jre/sh/java" ] ; then
123
+ # IBM's JDK on AIX uses strange locations for the executables
124
+ JAVACMD=$JAVA_HOME/jre/sh/java
125
+ else
126
+ JAVACMD=$JAVA_HOME/bin/java
127
+ fi
128
+ if [ ! -x "$JAVACMD" ] ; then
129
+ die "ERROR: JAVA_HOME is set to an invalid directory: $JAVA_HOME
130
+
131
+ Please set the JAVA_HOME variable in your environment to match the
132
+ location of your Java installation."
133
+ fi
134
+ else
135
+ JAVACMD=java
136
+ if ! command -v java >/dev/null 2>&1
137
+ then
138
+ die "ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH.
139
+
140
+ Please set the JAVA_HOME variable in your environment to match the
141
+ location of your Java installation."
142
+ fi
143
+ fi
144
+
145
+ # Increase the maximum file descriptors if we can.
146
+ if ! "$cygwin" && ! "$darwin" && ! "$nonstop" ; then
147
+ case $MAX_FD in #(
148
+ max*)
149
+ # In POSIX sh, ulimit -H is undefined. That's why the result is checked to see if it worked.
150
+ # shellcheck disable=SC2039,SC3045
151
+ MAX_FD=$( ulimit -H -n ) ||
152
+ warn "Could not query maximum file descriptor limit"
153
+ esac
154
+ case $MAX_FD in #(
155
+ '' | soft) :;; #(
156
+ *)
157
+ # In POSIX sh, ulimit -n is undefined. That's why the result is checked to see if it worked.
158
+ # shellcheck disable=SC2039,SC3045
159
+ ulimit -n "$MAX_FD" ||
160
+ warn "Could not set maximum file descriptor limit to $MAX_FD"
161
+ esac
162
+ fi
163
+
164
+ # Collect all arguments for the java command, stacking in reverse order:
165
+ # * args from the command line
166
+ # * the main class name
167
+ # * -classpath
168
+ # * -D...appname settings
169
+ # * --module-path (only if needed)
170
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, and GRADLE_OPTS environment variables.
171
+
172
+ # For Cygwin or MSYS, switch paths to Windows format before running java
173
+ if "$cygwin" || "$msys" ; then
174
+ APP_HOME=$( cygpath --path --mixed "$APP_HOME" )
175
+ CLASSPATH=$( cygpath --path --mixed "$CLASSPATH" )
176
+
177
+ JAVACMD=$( cygpath --unix "$JAVACMD" )
178
+
179
+ # Now convert the arguments - kludge to limit ourselves to /bin/sh
180
+ for arg do
181
+ if
182
+ case $arg in #(
183
+ -*) false ;; # don't mess with options #(
184
+ /?*) t=${arg#/} t=/${t%%/*} # looks like a POSIX filepath
185
+ [ -e "$t" ] ;; #(
186
+ *) false ;;
187
+ esac
188
+ then
189
+ arg=$( cygpath --path --ignore --mixed "$arg" )
190
+ fi
191
+ # Roll the args list around exactly as many times as the number of
192
+ # args, so each arg winds up back in the position where it started, but
193
+ # possibly modified.
194
+ #
195
+ # NB: a `for` loop captures its iteration list before it begins, so
196
+ # changing the positional parameters here affects neither the number of
197
+ # iterations, nor the values presented in `arg`.
198
+ shift # remove old arg
199
+ set -- "$@" "$arg" # push replacement arg
200
+ done
201
+ fi
202
+
203
+
204
+ # Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
205
+ DEFAULT_JVM_OPTS='"-Xmx64m" "-Xms64m"'
206
+
207
+ # Collect all arguments for the java command:
208
+ # * DEFAULT_JVM_OPTS, JAVA_OPTS, and optsEnvironmentVar are not allowed to contain shell fragments,
209
+ # and any embedded shellness will be escaped.
210
+ # * For example: A user cannot expect ${Hostname} to be expanded, as it is an environment variable and will be
211
+ # treated as '${Hostname}' itself on the command line.
212
+
213
+ set -- \
214
+ "-Dorg.gradle.appname=$APP_BASE_NAME" \
215
+ -classpath "$CLASSPATH" \
216
+ org.gradle.wrapper.GradleWrapperMain \
217
+ "$@"
218
+
219
+ # Stop when "xargs" is not available.
220
+ if ! command -v xargs >/dev/null 2>&1
221
+ then
222
+ die "xargs is not available"
223
+ fi
224
+
225
+ # Use "xargs" to parse quoted args.
226
+ #
227
+ # With -n1 it outputs one arg per line, with the quotes and backslashes removed.
228
+ #
229
+ # In Bash we could simply go:
230
+ #
231
+ # readarray ARGS < <( xargs -n1 <<<"$var" ) &&
232
+ # set -- "${ARGS[@]}" "$@"
233
+ #
234
+ # but POSIX shell has neither arrays nor command substitution, so instead we
235
+ # post-process each arg (as a line of input to sed) to backslash-escape any
236
+ # character that might be a shell metacharacter, then use eval to reverse
237
+ # that process (while maintaining the separation between arguments), and wrap
238
+ # the whole thing up as a single "set" statement.
239
+ #
240
+ # This will of course break if any of these variables contains a newline or
241
+ # an unmatched quote.
242
+ #
243
+
244
+ eval "set -- $(
245
+ printf '%s\n' "$DEFAULT_JVM_OPTS $JAVA_OPTS $GRADLE_OPTS" |
246
+ xargs -n1 |
247
+ sed ' s~[^-[:alnum:]+,./:=@_]~\\&~g; ' |
248
+ tr '\n' ' '
249
+ )" '"$@"'
250
+
251
+ exec "$JAVACMD" "$@"
@@ -0,0 +1,94 @@
1
+ @rem
2
+ @rem Copyright 2015 the original author or authors.
3
+ @rem
4
+ @rem Licensed under the Apache License, Version 2.0 (the "License");
5
+ @rem you may not use this file except in compliance with the License.
6
+ @rem You may obtain a copy of the License at
7
+ @rem
8
+ @rem https://www.apache.org/licenses/LICENSE-2.0
9
+ @rem
10
+ @rem Unless required by applicable law or agreed to in writing, software
11
+ @rem distributed under the License is distributed on an "AS IS" BASIS,
12
+ @rem WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ @rem See the License for the specific language governing permissions and
14
+ @rem limitations under the License.
15
+ @rem
16
+ @rem SPDX-License-Identifier: Apache-2.0
17
+ @rem
18
+
19
+ @if "%DEBUG%"=="" @echo off
20
+ @rem ##########################################################################
21
+ @rem
22
+ @rem Gradle startup script for Windows
23
+ @rem
24
+ @rem ##########################################################################
25
+
26
+ @rem Set local scope for the variables with windows NT shell
27
+ if "%OS%"=="Windows_NT" setlocal
28
+
29
+ set DIRNAME=%~dp0
30
+ if "%DIRNAME%"=="" set DIRNAME=.
31
+ @rem This is normally unused
32
+ set APP_BASE_NAME=%~n0
33
+ set APP_HOME=%DIRNAME%
34
+
35
+ @rem Resolve any "." and ".." in APP_HOME to make it shorter.
36
+ for %%i in ("%APP_HOME%") do set APP_HOME=%%~fi
37
+
38
+ @rem Add default JVM options here. You can also use JAVA_OPTS and GRADLE_OPTS to pass JVM options to this script.
39
+ set DEFAULT_JVM_OPTS="-Xmx64m" "-Xms64m"
40
+
41
+ @rem Find java.exe
42
+ if defined JAVA_HOME goto findJavaFromJavaHome
43
+
44
+ set JAVA_EXE=java.exe
45
+ %JAVA_EXE% -version >NUL 2>&1
46
+ if %ERRORLEVEL% equ 0 goto execute
47
+
48
+ echo. 1>&2
49
+ echo ERROR: JAVA_HOME is not set and no 'java' command could be found in your PATH. 1>&2
50
+ echo. 1>&2
51
+ echo Please set the JAVA_HOME variable in your environment to match the 1>&2
52
+ echo location of your Java installation. 1>&2
53
+
54
+ goto fail
55
+
56
+ :findJavaFromJavaHome
57
+ set JAVA_HOME=%JAVA_HOME:"=%
58
+ set JAVA_EXE=%JAVA_HOME%/bin/java.exe
59
+
60
+ if exist "%JAVA_EXE%" goto execute
61
+
62
+ echo. 1>&2
63
+ echo ERROR: JAVA_HOME is set to an invalid directory: %JAVA_HOME% 1>&2
64
+ echo. 1>&2
65
+ echo Please set the JAVA_HOME variable in your environment to match the 1>&2
66
+ echo location of your Java installation. 1>&2
67
+
68
+ goto fail
69
+
70
+ :execute
71
+ @rem Setup the command line
72
+
73
+ set CLASSPATH=%APP_HOME%\gradle\wrapper\gradle-wrapper.jar
74
+
75
+
76
+ @rem Execute Gradle
77
+ "%JAVA_EXE%" %DEFAULT_JVM_OPTS% %JAVA_OPTS% %GRADLE_OPTS% "-Dorg.gradle.appname=%APP_BASE_NAME%" -classpath "%CLASSPATH%" org.gradle.wrapper.GradleWrapperMain %*
78
+
79
+ :end
80
+ @rem End local scope for the variables with windows NT shell
81
+ if %ERRORLEVEL% equ 0 goto mainEnd
82
+
83
+ :fail
84
+ rem Set variable GRADLE_EXIT_CONSOLE if you need the _script_ return code instead of
85
+ rem the _cmd.exe /c_ return code!
86
+ set EXIT_CODE=%ERRORLEVEL%
87
+ if %EXIT_CODE% equ 0 set EXIT_CODE=1
88
+ if not ""=="%GRADLE_EXIT_CONSOLE%" exit %EXIT_CODE%
89
+ exit /b %EXIT_CODE%
90
+
91
+ :mainEnd
92
+ if "%OS%"=="Windows_NT" endlocal
93
+
94
+ :omega
@@ -0,0 +1 @@
1
+ rootProject.name = 'expo-stubs'
@@ -0,0 +1,11 @@
1
+ package expo.modules.core.interfaces;
2
+
3
+ import android.content.Context;
4
+ import java.util.Collections;
5
+ import java.util.List;
6
+
7
+ public interface Package {
8
+ default List<? extends ReactNativeHostHandler> createReactNativeHostHandlers(Context context) {
9
+ return Collections.emptyList();
10
+ }
11
+ }
@@ -0,0 +1,7 @@
1
+ package expo.modules.core.interfaces;
2
+
3
+ public interface ReactNativeHostHandler {
4
+ default void onReactInstanceException(boolean useDeveloperSupport, Exception exception) {
5
+ // default empty implementation
6
+ }
7
+ }
Binary file
Binary file
@@ -28,7 +28,6 @@ import com.facebook.react.bridge.WritableArray;
28
28
  import com.facebook.react.bridge.WritableMap;
29
29
  import com.facebook.react.bridge.WritableNativeArray;
30
30
  import com.facebook.react.bridge.WritableNativeMap;
31
- import io.sentry.Breadcrumb;
32
31
  import io.sentry.ILogger;
33
32
  import io.sentry.IScope;
34
33
  import io.sentry.ISentryExecutorService;
@@ -73,7 +72,6 @@ import java.net.URISyntaxException;
73
72
  import java.nio.charset.Charset;
74
73
  import java.util.ArrayList;
75
74
  import java.util.HashMap;
76
- import java.util.Iterator;
77
75
  import java.util.List;
78
76
  import java.util.Map;
79
77
  import java.util.Properties;
@@ -866,19 +864,25 @@ public class RNSentryModuleImpl {
866
864
  promise.resolve(null);
867
865
  return;
868
866
  }
869
- if (currentScope != null) {
870
- // Remove react-native breadcrumbs
871
- Iterator<Breadcrumb> breadcrumbsIterator = currentScope.getBreadcrumbs().iterator();
872
- while (breadcrumbsIterator.hasNext()) {
873
- Breadcrumb breadcrumb = breadcrumbsIterator.next();
874
- if ("react-native".equals(breadcrumb.getOrigin())) {
875
- breadcrumbsIterator.remove();
867
+
868
+ final @NotNull Map<String, Object> serialized =
869
+ InternalSentrySdk.serializeScope(context, (SentryAndroidOptions) options, currentScope);
870
+
871
+ final @Nullable Object serializedBreadcrumbs = serialized.get("breadcrumbs");
872
+ if (serializedBreadcrumbs instanceof List) {
873
+ final List<?> breadcrumbs = (List<?>) serializedBreadcrumbs;
874
+ List<Map<?, ?>> filtered = new ArrayList<>();
875
+ for (Object o : breadcrumbs) {
876
+ if (o instanceof Map) {
877
+ final Map<?, ?> breadcrumb = (Map<?, ?>) o;
878
+ if (!"react-native".equals(breadcrumb.get("origin"))) {
879
+ filtered.add(breadcrumb);
880
+ }
876
881
  }
877
882
  }
883
+ serialized.put("breadcrumbs", filtered);
878
884
  }
879
885
 
880
- final @NotNull Map<String, Object> serialized =
881
- InternalSentrySdk.serializeScope(context, (SentryAndroidOptions) options, currentScope);
882
886
  final @Nullable Object deviceContext = RNSentryMapConverter.convertToWritable(serialized);
883
887
  promise.resolve(deviceContext);
884
888
  }
@@ -2,7 +2,7 @@ package io.sentry.react;
2
2
 
3
3
  class RNSentryVersion {
4
4
  static final String REACT_NATIVE_SDK_PACKAGE_NAME = "npm:@sentry/react-native";
5
- static final String REACT_NATIVE_SDK_PACKAGE_VERSION = "8.5.0";
5
+ static final String REACT_NATIVE_SDK_PACKAGE_VERSION = "8.6.0";
6
6
  static final String NATIVE_SDK_NAME = "sentry.native.android.react-native";
7
7
  static final String ANDROID_SDK_NAME = "sentry.java.android.react-native";
8
8
  static final String REACT_NATIVE_SDK_NAME = "sentry.javascript.react-native";
@@ -1 +1 @@
1
- {"version":3,"file":"NativeLogListener.js","sourceRoot":"","sources":["../../src/js/NativeLogListener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE3E,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;A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C;QAC3D,OAAO,SAAS,CAAC;KAClB;AACH,CAAC;AAED;;;;GAIG;AACH,MAAM,UAAU,uBAAuB,CAAC,GAAmB;IACzD,MAAM,OAAO,GAAG,aAAa,GAAG,CAAC,SAAS,KAAK,GAAG,CAAC,OAAO,EAAE,CAAC;IAE7D,QAAQ,GAAG,CAAC,KAAK,CAAC,WAAW,EAAE,EAAE;QAC/B,KAAK,OAAO,CAAC;QACb,KAAK,OAAO;YACV,KAAK,CAAC,KAAK,CAAC,OAAO,CAAC,CAAC;YACrB,MAAM;QACR,KAAK,SAAS;YACZ,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACpB,MAAM;QACR,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO,CAAC;QACb;YACE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YACnB,MAAM;KACT;AACH,CAAC","sourcesContent":["import { debug } from '@sentry/core';\nimport { NativeEventEmitter, NativeModules, Platform } from 'react-native';\nimport type { NativeLogEntry } from './options';\nimport { isExpoGo } from './utils/environment';\n\nconst NATIVE_LOG_EVENT_NAME = 'SentryNativeLog';\n\n/**\n * Sets up the native log listener that forwards logs from the native SDK to JS.\n * This only works when `debug: true` is set in Sentry options.\n *\n * @param callback - The callback to invoke when a native log is received.\n * @returns A function to remove the listener, or undefined if setup failed.\n */\nexport function setupNativeLogListener(callback: (log: NativeLogEntry) => void): (() => void) | undefined {\n if (Platform.OS !== 'ios' && Platform.OS !== 'android') {\n debug.log('Native log listener is only supported on iOS and Android.');\n return undefined;\n }\n\n if (isExpoGo()) {\n return undefined;\n }\n\n if (!NativeModules.RNSentry) {\n debug.warn('Could not set up native log listener: RNSentry module not found.');\n return undefined;\n }\n\n try {\n const eventEmitter = new NativeEventEmitter(NativeModules.RNSentry);\n\n const listener = eventEmitter.addListener(\n NATIVE_LOG_EVENT_NAME,\n (event: { level?: string; component?: string; message?: string }) => {\n const logEntry: NativeLogEntry = {\n level: event.level ?? 'info',\n component: event.component ?? 'Sentry',\n message: event.message ?? '',\n };\n callback(logEntry);\n },\n );\n\n debug.log('Native log listener set up successfully.');\n\n let removed = false;\n return () => {\n if (!removed) {\n listener.remove();\n removed = true;\n debug.log('Native log listener removed.');\n }\n };\n } catch (error) {\n debug.warn('Failed to set up native log listener:', error);\n return undefined;\n }\n}\n\n/**\n * Default handler for native logs that uses Sentry's debug logger.\n * This avoids interference with captureConsoleIntegration which would\n * otherwise capture these logs as breadcrumbs or events.\n */\nexport function defaultNativeLogHandler(log: NativeLogEntry): void {\n const message = `[Native] [${log.component}] ${log.message}`;\n\n switch (log.level.toLowerCase()) {\n case 'fatal':\n case 'error':\n debug.error(message);\n break;\n case 'warning':\n debug.warn(message);\n break;\n case 'info':\n case 'debug':\n default:\n debug.log(message);\n break;\n }\n}\n"]}
1
+ {"version":3,"file":"NativeLogListener.js","sourceRoot":"","sources":["../../src/js/NativeLogListener.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AACrC,OAAO,EAAE,kBAAkB,EAAE,aAAa,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAE3E,OAAO,EAAE,QAAQ,EAAE,MAAM,qBAAqB,CAAC;AAE/C,MAAM,qBAAqB,GAAG,iBAAiB,CAAC;AAEhD;;;;;;GAMG;AACH,MAAM,UAAU,sBAAsB,CAAC,QAAuC;IAC5E,IAAI,QAAQ,CAAC,EAAE,KAAK,KAAK,IAAI,QAAQ,CAAC,EAAE,KAAK,SAAS,EAAE,CAAC;QACvD,KAAK,CAAC,GAAG,CAAC,2DAA2D,CAAC,CAAC;QACvE,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAI,QAAQ,EAAE,EAAE,CAAC;QACf,OAAO,SAAS,CAAC;IACnB,CAAC;IAED,IAAI,CAAC,aAAa,CAAC,QAAQ,EAAE,CAAC;QAC5B,KAAK,CAAC,IAAI,CAAC,kEAAkE,CAAC,CAAC;QAC/E,OAAO,SAAS,CAAC;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YACZ,KAAK,CAAC,IAAI,CAAC,OAAO,CAAC,CAAC;YACpB,MAAM;QACR,KAAK,MAAM,CAAC;QACZ,KAAK,OAAO,CAAC;QACb;YACE,KAAK,CAAC,GAAG,CAAC,OAAO,CAAC,CAAC;YACnB,MAAM;IACV,CAAC;AACH,CAAC","sourcesContent":["import { debug } from '@sentry/core';\nimport { NativeEventEmitter, NativeModules, Platform } from 'react-native';\nimport type { NativeLogEntry } from './options';\nimport { isExpoGo } from './utils/environment';\n\nconst NATIVE_LOG_EVENT_NAME = 'SentryNativeLog';\n\n/**\n * Sets up the native log listener that forwards logs from the native SDK to JS.\n * This only works when `debug: true` is set in Sentry options.\n *\n * @param callback - The callback to invoke when a native log is received.\n * @returns A function to remove the listener, or undefined if setup failed.\n */\nexport function setupNativeLogListener(callback: (log: NativeLogEntry) => void): (() => void) | undefined {\n if (Platform.OS !== 'ios' && Platform.OS !== 'android') {\n debug.log('Native log listener is only supported on iOS and Android.');\n return undefined;\n }\n\n if (isExpoGo()) {\n return undefined;\n }\n\n if (!NativeModules.RNSentry) {\n debug.warn('Could not set up native log listener: RNSentry module not found.');\n return undefined;\n }\n\n try {\n const eventEmitter = new NativeEventEmitter(NativeModules.RNSentry);\n\n const listener = eventEmitter.addListener(\n NATIVE_LOG_EVENT_NAME,\n (event: { level?: string; component?: string; message?: string }) => {\n const logEntry: NativeLogEntry = {\n level: event.level ?? 'info',\n component: event.component ?? 'Sentry',\n message: event.message ?? '',\n };\n callback(logEntry);\n },\n );\n\n debug.log('Native log listener set up successfully.');\n\n let removed = false;\n return () => {\n if (!removed) {\n listener.remove();\n removed = true;\n debug.log('Native log listener removed.');\n }\n };\n } catch (error) {\n debug.warn('Failed to set up native log listener:', error);\n return undefined;\n }\n}\n\n/**\n * Default handler for native logs that uses Sentry's debug logger.\n * This avoids interference with captureConsoleIntegration which would\n * otherwise capture these logs as breadcrumbs or events.\n */\nexport function defaultNativeLogHandler(log: NativeLogEntry): void {\n const message = `[Native] [${log.component}] ${log.message}`;\n\n switch (log.level.toLowerCase()) {\n case 'fatal':\n case 'error':\n debug.error(message);\n break;\n case 'warning':\n debug.warn(message);\n break;\n case 'info':\n case 'debug':\n default:\n debug.log(message);\n break;\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"RNSentryReplayMaskNativeComponent.d.ts","sourceRoot":"","sources":["../../src/js/RNSentryReplayMaskNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAO7D,MAAM,WAAW,WAAY,SAAQ,SAAS;CAAG;;AAEjD,wBAAuG"}
1
+ {"version":3,"file":"RNSentryReplayMaskNativeComponent.d.ts","sourceRoot":"","sources":["../../src/js/RNSentryReplayMaskNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAO7D,MAAM,WAAW,WAAY,SAAQ,SAAS;CAAG;wBAE2B,aAAa,CAAC,WAAW,CAAC;AAAtG,wBAAuG"}
@@ -1 +1 @@
1
- {"version":3,"file":"RNSentryReplayUnmaskNativeComponent.d.ts","sourceRoot":"","sources":["../../src/js/RNSentryReplayUnmaskNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAO7D,MAAM,WAAW,WAAY,SAAQ,SAAS;CAAG;;AAEjD,wBAAyG"}
1
+ {"version":3,"file":"RNSentryReplayUnmaskNativeComponent.d.ts","sourceRoot":"","sources":["../../src/js/RNSentryReplayUnmaskNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,aAAa,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAO7D,MAAM,WAAW,WAAY,SAAQ,SAAS;CAAG;wBAE6B,aAAa,CAAC,WAAW,CAAC;AAAxG,wBAAyG"}
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrum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C,SAAS,GAAG,gBAAgB,CAAC;SACzC;KACF;IAED,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import type { Breadcrumb, SeverityLevel } from '@sentry/core';\nimport { severityLevelFromString } from '@sentry/core';\n\nexport const DEFAULT_BREADCRUMB_LEVEL: SeverityLevel = 'info';\n\ntype BreadcrumbCandidate = {\n [K in keyof Partial<Breadcrumb>]: unknown;\n};\n\n/**\n * Convert plain object to a valid Breadcrumb\n */\nexport function breadcrumbFromObject(candidate: BreadcrumbCandidate): Breadcrumb {\n const breadcrumb: Breadcrumb = {};\n\n if (typeof candidate.type === 'string') {\n breadcrumb.type = candidate.type;\n }\n if (typeof candidate.level === 'string') {\n breadcrumb.level = severityLevelFromString(candidate.level);\n }\n if (typeof candidate.event_id === 'string') {\n breadcrumb.event_id = candidate.event_id;\n }\n if (typeof candidate.category === 'string') {\n breadcrumb.category = candidate.category;\n }\n if (typeof candidate.message === 'string') {\n breadcrumb.message = candidate.message;\n }\n if (typeof candidate.data === 'object' && candidate.data !== null) {\n breadcrumb.data = candidate.data;\n }\n if (typeof candidate.timestamp === 'string') {\n const timestampSeconds = Date.parse(candidate.timestamp) / 1000; // breadcrumb timestamp is in seconds\n if (!isNaN(timestampSeconds)) {\n breadcrumb.timestamp = timestampSeconds;\n }\n }\n\n return breadcrumb;\n}\n"]}
1
+ {"version":3,"file":"breadcrumb.js","sourceRoot":"","sources":["../../src/js/breadcrumb.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,cAAc,CAAC;AAEvD,MAAM,CAAC,MAAM,wBAAwB,GAAkB,MAAM,CAAC;AAM9D;;GAEG;AACH,MAAM,UAAU,oBAAoB,CAAC,SAA8B;IACjE,MAAM,UAAU,GAAe,EAAE,CAAC;IAElC,IAAI,OAAO,SAAS,CAAC,IAAI,KAAK,QAAQ,EAAE,CAAC;QACvC,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;IACnC,CAAC;IACD,IAAI,OAAO,SAAS,CAAC,KAAK,KAAK,QAAQ,EAAE,CAAC;QACxC,UAAU,CAAC,KAAK,GAAG,uBAAuB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;IAC9D,CAAC;IACD,IAAI,OAAO,SAAS,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC3C,UAAU,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;IAC3C,CAAC;IACD,IAAI,OAAO,SAAS,CAAC,QAAQ,KAAK,QAAQ,EAAE,CAAC;QAC3C,UAAU,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;IAC3C,CAAC;IACD,IAAI,OAAO,SAAS,CAAC,OAAO,KAAK,QAAQ,EAAE,CAAC;QAC1C,UAAU,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;IACzC,CAAC;IACD,IAAI,OAAO,SAAS,CAAC,IAAI,KAAK,QAAQ,IAAI,SAAS,CAAC,IAAI,KAAK,IAAI,EAAE,CAAC;QAClE,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;IACnC,CAAC;IACD,IAAI,OAAO,SAAS,CAAC,SAAS,KAAK,QAAQ,EAAE,CAAC;QAC5C,MAAM,gBAAgB,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,GAAG,IAAI,CAAC,CAAC,qCAAqC;QACtG,IAAI,CAAC,KAAK,CAAC,gBAAgB,CAAC,EAAE,CAAC;YAC7B,UAAU,CAAC,SAAS,GAAG,gBAAgB,CAAC;QAC1C,CAAC;IACH,CAAC;IAED,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import type { Breadcrumb, SeverityLevel } from '@sentry/core';\nimport { severityLevelFromString } from '@sentry/core';\n\nexport const DEFAULT_BREADCRUMB_LEVEL: SeverityLevel = 'info';\n\ntype BreadcrumbCandidate = {\n [K in keyof Partial<Breadcrumb>]: unknown;\n};\n\n/**\n * Convert plain object to a valid Breadcrumb\n */\nexport function breadcrumbFromObject(candidate: BreadcrumbCandidate): Breadcrumb {\n const breadcrumb: Breadcrumb = {};\n\n if (typeof candidate.type === 'string') {\n breadcrumb.type = candidate.type;\n }\n if (typeof candidate.level === 'string') {\n breadcrumb.level = severityLevelFromString(candidate.level);\n }\n if (typeof candidate.event_id === 'string') {\n breadcrumb.event_id = candidate.event_id;\n }\n if (typeof candidate.category === 'string') {\n breadcrumb.category = candidate.category;\n }\n if (typeof candidate.message === 'string') {\n breadcrumb.message = candidate.message;\n }\n if (typeof candidate.data === 'object' && candidate.data !== null) {\n breadcrumb.data = candidate.data;\n }\n if (typeof candidate.timestamp === 'string') {\n const timestampSeconds = Date.parse(candidate.timestamp) / 1000; // breadcrumb timestamp is in seconds\n if (!isNaN(timestampSeconds)) {\n breadcrumb.timestamp = timestampSeconds;\n }\n }\n\n return breadcrumb;\n}\n"]}