@sentry/react-native 5.2.0 → 5.3.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (143) hide show
  1. package/CHANGELOG.md +57 -0
  2. package/RNSentry.podspec +1 -1
  3. package/android/build.gradle +1 -1
  4. package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +13 -0
  5. package/dist/js/NativeRNSentry.d.ts.map +1 -1
  6. package/dist/js/NativeRNSentry.js.map +1 -1
  7. package/dist/js/breadcrumb.d.ts.map +1 -1
  8. package/dist/js/breadcrumb.js.map +1 -1
  9. package/dist/js/client.d.ts.map +1 -1
  10. package/dist/js/client.js +4 -5
  11. package/dist/js/client.js.map +1 -1
  12. package/dist/js/index.d.ts +1 -2
  13. package/dist/js/index.d.ts.map +1 -1
  14. package/dist/js/index.js +1 -5
  15. package/dist/js/index.js.map +1 -1
  16. package/dist/js/integrations/debugsymbolicator.d.ts.map +1 -1
  17. package/dist/js/integrations/debugsymbolicator.js +1 -3
  18. package/dist/js/integrations/debugsymbolicator.js.map +1 -1
  19. package/dist/js/integrations/devicecontext.d.ts.map +1 -1
  20. package/dist/js/integrations/devicecontext.js +2 -4
  21. package/dist/js/integrations/devicecontext.js.map +1 -1
  22. package/dist/js/integrations/eventorigin.js +1 -1
  23. package/dist/js/integrations/eventorigin.js.map +1 -1
  24. package/dist/js/integrations/factory.d.ts.map +1 -1
  25. package/dist/js/integrations/factory.js +3 -1
  26. package/dist/js/integrations/factory.js.map +1 -1
  27. package/dist/js/integrations/modulesloader.d.ts.map +1 -1
  28. package/dist/js/integrations/modulesloader.js.map +1 -1
  29. package/dist/js/integrations/reactnativeerrorhandlers.d.ts.map +1 -1
  30. package/dist/js/integrations/reactnativeerrorhandlers.js +2 -2
  31. package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
  32. package/dist/js/integrations/reactnativeinfo.d.ts.map +1 -1
  33. package/dist/js/integrations/reactnativeinfo.js +1 -2
  34. package/dist/js/integrations/reactnativeinfo.js.map +1 -1
  35. package/dist/js/integrations/rewriteframes.d.ts.map +1 -1
  36. package/dist/js/integrations/rewriteframes.js +2 -5
  37. package/dist/js/integrations/rewriteframes.js.map +1 -1
  38. package/dist/js/integrations/screenshot.d.ts.map +1 -1
  39. package/dist/js/integrations/screenshot.js +2 -6
  40. package/dist/js/integrations/screenshot.js.map +1 -1
  41. package/dist/js/integrations/sdkinfo.js.map +1 -1
  42. package/dist/js/integrations/viewhierarchy.js.map +1 -1
  43. package/dist/js/measurements.d.ts +2 -3
  44. package/dist/js/measurements.d.ts.map +1 -1
  45. package/dist/js/measurements.js +5 -8
  46. package/dist/js/measurements.js.map +1 -1
  47. package/dist/js/misc.d.ts.map +1 -1
  48. package/dist/js/misc.js +1 -3
  49. package/dist/js/misc.js.map +1 -1
  50. package/dist/js/options.d.ts +14 -6
  51. package/dist/js/options.d.ts.map +1 -1
  52. package/dist/js/options.js.map +1 -1
  53. package/dist/js/scope.d.ts +2 -2
  54. package/dist/js/scope.d.ts.map +1 -1
  55. package/dist/js/scope.js +4 -4
  56. package/dist/js/scope.js.map +1 -1
  57. package/dist/js/sdk.d.ts.map +1 -1
  58. package/dist/js/sdk.js +8 -8
  59. package/dist/js/sdk.js.map +1 -1
  60. package/dist/js/tools/ModulesCollector.d.ts.map +1 -1
  61. package/dist/js/tools/ModulesCollector.js +3 -7
  62. package/dist/js/tools/ModulesCollector.js.map +1 -1
  63. package/dist/js/tools/collectModules.js +1 -3
  64. package/dist/js/tools/collectModules.js.map +1 -1
  65. package/dist/js/tracing/gesturetracing.d.ts.map +1 -1
  66. package/dist/js/tracing/gesturetracing.js +4 -2
  67. package/dist/js/tracing/gesturetracing.js.map +1 -1
  68. package/dist/js/tracing/index.d.ts +3 -3
  69. package/dist/js/tracing/index.d.ts.map +1 -1
  70. package/dist/js/tracing/index.js +2 -2
  71. package/dist/js/tracing/index.js.map +1 -1
  72. package/dist/js/tracing/nativeframes.d.ts +4 -4
  73. package/dist/js/tracing/nativeframes.d.ts.map +1 -1
  74. package/dist/js/tracing/nativeframes.js +15 -15
  75. package/dist/js/tracing/nativeframes.js.map +1 -1
  76. package/dist/js/tracing/ops.d.ts.map +1 -1
  77. package/dist/js/tracing/ops.js.map +1 -1
  78. package/dist/js/tracing/reactnativenavigation.d.ts +13 -2
  79. package/dist/js/tracing/reactnativenavigation.d.ts.map +1 -1
  80. package/dist/js/tracing/reactnativenavigation.js +29 -29
  81. package/dist/js/tracing/reactnativenavigation.js.map +1 -1
  82. package/dist/js/tracing/reactnativetracing.d.ts +2 -2
  83. package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
  84. package/dist/js/tracing/reactnativetracing.js +20 -16
  85. package/dist/js/tracing/reactnativetracing.js.map +1 -1
  86. package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
  87. package/dist/js/tracing/reactnavigation.js.map +1 -1
  88. package/dist/js/tracing/reactnavigationv4.d.ts.map +1 -1
  89. package/dist/js/tracing/reactnavigationv4.js +1 -2
  90. package/dist/js/tracing/reactnavigationv4.js.map +1 -1
  91. package/dist/js/tracing/routingInstrumentation.d.ts.map +1 -1
  92. package/dist/js/tracing/routingInstrumentation.js.map +1 -1
  93. package/dist/js/tracing/stalltracking.d.ts +1 -1
  94. package/dist/js/tracing/stalltracking.d.ts.map +1 -1
  95. package/dist/js/tracing/stalltracking.js +9 -17
  96. package/dist/js/tracing/stalltracking.js.map +1 -1
  97. package/dist/js/tracing/transaction.d.ts.map +1 -1
  98. package/dist/js/tracing/transaction.js +2 -1
  99. package/dist/js/tracing/transaction.js.map +1 -1
  100. package/dist/js/tracing/types.d.ts.map +1 -1
  101. package/dist/js/tracing/types.js.map +1 -1
  102. package/dist/js/tracing/utils.d.ts +1 -1
  103. package/dist/js/tracing/utils.d.ts.map +1 -1
  104. package/dist/js/tracing/utils.js.map +1 -1
  105. package/dist/js/transports/TextEncoder.d.ts.map +1 -1
  106. package/dist/js/transports/TextEncoder.js.map +1 -1
  107. package/dist/js/transports/native.d.ts +1 -1
  108. package/dist/js/transports/native.d.ts.map +1 -1
  109. package/dist/js/transports/native.js +1 -1
  110. package/dist/js/transports/native.js.map +1 -1
  111. package/dist/js/user.d.ts.map +1 -1
  112. package/dist/js/user.js.map +1 -1
  113. package/dist/js/utils/envelope.d.ts.map +1 -1
  114. package/dist/js/utils/envelope.js +5 -2
  115. package/dist/js/utils/envelope.js.map +1 -1
  116. package/dist/js/utils/outcome.js +1 -1
  117. package/dist/js/utils/outcome.js.map +1 -1
  118. package/dist/js/utils/safe.d.ts.map +1 -1
  119. package/dist/js/utils/safe.js +1 -3
  120. package/dist/js/utils/safe.js.map +1 -1
  121. package/dist/js/vendor/buffer/index.d.ts +1 -1
  122. package/dist/js/vendor/buffer/index.d.ts.map +1 -1
  123. package/dist/js/vendor/buffer/index.js +1 -1
  124. package/dist/js/vendor/buffer/index.js.map +1 -1
  125. package/dist/js/vendor/buffer/utf8ToBytes.d.ts +0 -5
  126. package/dist/js/vendor/buffer/utf8ToBytes.d.ts.map +1 -1
  127. package/dist/js/vendor/buffer/utf8ToBytes.js +29 -16
  128. package/dist/js/vendor/buffer/utf8ToBytes.js.map +1 -1
  129. package/dist/js/vendor/index.d.ts +1 -1
  130. package/dist/js/vendor/index.d.ts.map +1 -1
  131. package/dist/js/vendor/index.js +1 -1
  132. package/dist/js/vendor/index.js.map +1 -1
  133. package/dist/js/version.d.ts +1 -1
  134. package/dist/js/version.js +1 -1
  135. package/dist/js/version.js.map +1 -1
  136. package/dist/js/wrapper.d.ts +2 -2
  137. package/dist/js/wrapper.d.ts.map +1 -1
  138. package/dist/js/wrapper.js +8 -18
  139. package/dist/js/wrapper.js.map +1 -1
  140. package/ios/RNSentry.mm +6 -3
  141. package/package.json +19 -14
  142. package/sentry.gradle +12 -7
  143. package/src/js/NativeRNSentry.ts +4 -7
package/CHANGELOG.md CHANGED
@@ -1,5 +1,62 @@
1
1
  # Changelog
2
2
 
3
+ ## 5.3.1
4
+
5
+ ### Fixes
6
+
7
+ - Disable `enableNativeCrashHandling` and `enableAutoPerformanceTracing` on Apple ([#2936](https://github.com/getsentry/sentry-react-native/pull/))
8
+ - Mac Catalyst builds successfully
9
+ - `sentry.gradle` Gracefully skip modules collecting if the script doesn't exist ([#2952](https://github.com/getsentry/sentry-react-native/pull/2952))
10
+
11
+ ### Dependencies
12
+
13
+ - Bump JavaScript SDK from v7.45.0 to v7.47.0 ([#2946](https://github.com/getsentry/sentry-react-native/pull/2946), [#2958](https://github.com/getsentry/sentry-react-native/pull/2958))
14
+ - [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#7470)
15
+ - [diff](https://github.com/getsentry/sentry-javascript/compare/7.45.0...7.47.0)
16
+ - Bump Android SDK from v6.16.0 to v6.17.0 ([#2948](https://github.com/getsentry/sentry-react-native/pull/2948))
17
+ - [changelog](https://github.com/getsentry/sentry-java/blob/main/CHANGELOG.md#6170)
18
+ - [diff](https://github.com/getsentry/sentry-java/compare/6.16.0...6.17.0)
19
+ - Bump Cocoa SDK from v8.3.3 to v8.4.0 ([#2954](https://github.com/getsentry/sentry-react-native/pull/2954))
20
+ - [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#840)
21
+ - [diff](https://github.com/getsentry/sentry-cocoa/compare/8.3.3...8.4.0)
22
+ - Bump CLI from v2.16.1 to v2.17.1 ([#2957](https://github.com/getsentry/sentry-react-native/pull/2957), [#2964](https://github.com/getsentry/sentry-react-native/pull/2964))
23
+ - [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2171)
24
+ - [diff](https://github.com/getsentry/sentry-cli/compare/2.16.1...2.17.1)
25
+
26
+ ## 5.3.0
27
+
28
+ ### Features
29
+
30
+ - Add `enableTracing` option ([#2933](https://github.com/getsentry/sentry-react-native/pull/2933))
31
+ - Add Tabs auto instrumentation for React Native Navigation ([#2932](https://github.com/getsentry/sentry-react-native/pull/2932))
32
+ - This is enabled by default, if you want to disable tabs instrumentation see the example below.
33
+
34
+ ```js
35
+ const routingInstrumentation = new Sentry.ReactNativeNavigationInstrumentation(Navigation, { enableTabsInstrumentation: false })
36
+ ```
37
+
38
+ ### Fixes
39
+
40
+ - Disable HTTP Client Errors by default on all platform ([#2931](https://github.com/getsentry/sentry-react-native/pull/2931))
41
+ - See [HttpClient](https://docs.sentry.io/platforms/javascript/configuration/integrations/plugin/#httpclient) for configuration details.
42
+ - Use `enableCaptureFailedRequests` to enable the feature.
43
+
44
+ ```js
45
+ Sentry.init({ enableCaptureFailedRequests: true })
46
+ ```
47
+
48
+ ### Dependencies
49
+
50
+ - Bump JavaScript SDK from v7.44.2 to v7.45.0 ([#2927](https://github.com/getsentry/sentry-react-native/pull/2927))
51
+ - [changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md#7450)
52
+ - [diff](https://github.com/getsentry/sentry-javascript/compare/7.44.2...7.45.0)
53
+ - Bump CLI from v2.15.2 to v2.16.1 ([#2926](https://github.com/getsentry/sentry-react-native/pull/2926))
54
+ - [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2161)
55
+ - [diff](https://github.com/getsentry/sentry-cli/compare/2.15.2...2.16.1)
56
+ - Bump Cocoa SDK from v8.3.2 to v8.3.3 ([#2925](https://github.com/getsentry/sentry-react-native/pull/2925))
57
+ - [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#833)
58
+ - [diff](https://github.com/getsentry/sentry-cocoa/compare/8.3.2...8.3.3)
59
+
3
60
  ## 5.2.0
4
61
 
5
62
  ### Features
package/RNSentry.podspec CHANGED
@@ -19,7 +19,7 @@ Pod::Spec.new do |s|
19
19
  s.preserve_paths = '*.js'
20
20
 
21
21
  s.dependency 'React-Core'
22
- s.dependency 'Sentry/HybridSDK', '8.3.2'
22
+ s.dependency 'Sentry/HybridSDK', '8.4.0'
23
23
 
24
24
  s.source_files = 'ios/**/*.{h,mm}'
25
25
  s.public_header_files = 'ios/RNSentry.h'
@@ -42,5 +42,5 @@ android {
42
42
 
43
43
  dependencies {
44
44
  implementation 'com.facebook.react:react-native:+'
45
- api 'io.sentry:sentry-android:6.16.0'
45
+ api 'io.sentry:sentry-android:6.17.0'
46
46
  }
@@ -10,6 +10,7 @@ import android.content.res.AssetManager;
10
10
  import android.util.SparseIntArray;
11
11
 
12
12
  import androidx.annotation.Nullable;
13
+ import androidx.annotation.NonNull;
13
14
  import androidx.core.app.FrameMetricsAggregator;
14
15
 
15
16
  import com.facebook.react.bridge.Arguments;
@@ -51,6 +52,7 @@ import io.sentry.UncaughtExceptionHandlerIntegration;
51
52
  import io.sentry.android.core.AndroidLogger;
52
53
  import io.sentry.android.core.AnrIntegration;
53
54
  import io.sentry.android.core.AppStartState;
55
+ import io.sentry.android.core.BuildConfig;
54
56
  import io.sentry.android.core.BuildInfoProvider;
55
57
  import io.sentry.android.core.CurrentActivityHolder;
56
58
  import io.sentry.android.core.NdkIntegration;
@@ -102,6 +104,17 @@ public class RNSentryModuleImpl {
102
104
 
103
105
  public void initNativeSdk(final ReadableMap rnOptions, Promise promise) {
104
106
  SentryAndroid.init(this.getReactApplicationContext(), options -> {
107
+ @NonNull final String sdkName = "sentry.java.android.react-native";
108
+ @Nullable SdkVersion sdkVersion = options.getSdkVersion();
109
+ if (sdkVersion == null) {
110
+ sdkVersion = new SdkVersion(sdkName, BuildConfig.VERSION_NAME);
111
+ } else {
112
+ sdkVersion.setName(sdkName);
113
+ }
114
+
115
+ options.setSentryClientName(sdkVersion.getName() + "/" + sdkVersion.getVersion());
116
+ options.setSdkVersion(sdkVersion);
117
+
105
118
  if (rnOptions.hasKey("debug") && rnOptions.getBoolean("debug")) {
106
119
  options.setDebug(true);
107
120
  }
@@ -1 +1 @@
1
- {"version":3,"file":"NativeRNSentry.d.ts","sourceRoot":"","sources":["../../src/js/NativeRNSentry.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AAC7C,OAAO,KAAK,EAAE,W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GF,wBAAkE"}
@@ -1 +1 @@
1
- {"version":3,"file":"NativeRNSentry.js","sourceRoot":"","sources":["../../src/js/NativeRNSentry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AA2FnD,2DAA2D;AAC3D,eAAe,mBAAmB,CAAC,YAAY,CAAO,UAAU,CAAC,CAAC","sourcesContent":["import type { Package } from '@sentry/types';\nimport type { TurboModule} from 'react-native';\nimport { TurboModuleRegistry } from 'react-native';\nimport type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';\n\n// There has to be only one interface and it has to be named `Spec`\n// Only extra allowed definitions are types (probably codegen bug)\nexport interface Spec extends TurboModule {\n addBreadcrumb(breadcrumb: UnsafeObject): void;\n captureEnvelope(\n bytes: number[],\n options: {\n store: boolean,\n },\n ): Promise<boolean>;\n captureScreenshot(): Promise<NativeScreenshot[]>;\n clearBreadcrumbs(): void;\n crash(): void;\n closeNativeSdk(): Promise<void>;\n disableNativeFramesTracking(): void;\n fetchNativeRelease(): Promise<NativeReleaseResponse>;\n fetchNativeSdkInfo(): Promise<Package>;\n fetchNativeDeviceContexts(): Promise<NativeDeviceContextsResponse>;\n fetchNativeAppStart(): Promise<NativeAppStartResponse | null>;\n fetchNativeFrames(): Promise<NativeFramesResponse | null>;\n initNativeSdk(options: UnsafeObject): Promise<boolean>;\n setUser(\n defaultUserKeys: UnsafeObject | null,\n otherUserKeys: UnsafeObject | null\n ): void;\n setContext(key: string, value: UnsafeObject | null): void;\n setExtra(key: string, value: string): void;\n setTag(key: string, value: string): void;\n enableNativeFramesTracking(): void;\n fetchModules(): Promise<string | undefined | null>;\n fetchViewHierarchy(): Promise<number[] | undefined | null>;\n}\n\nexport type NativeAppStartResponse = {\n isColdStart: boolean;\n appStartTime: number;\n didFetchAppStart: boolean;\n};\n\nexport type NativeFramesResponse = {\n totalFrames: number;\n slowFrames: number;\n frozenFrames: number;\n};\n\nexport type NativeReleaseResponse = {\n build: string;\n id: string;\n version: string;\n};\n\n/**\n * This type describes serialized scope from sentry-cocoa. (This is not used for Android)\n * https://github.com/getsentry/sentry-cocoa/blob/master/Sources/Sentry/SentryScope.m\n */\nexport type NativeDeviceContextsResponse = {\n [key: string]: unknown;\n tags?: Record<string, string>;\n extra?: Record<string, unknown>;\n context?: Record<string, Record<string, unknown>>;\n user?: {\n userId?: string;\n email?: string;\n username?: string;\n ipAddress?: string;\n segment?: string;\n data?: Record<string, unknown>;\n };\n dist?: string;\n environment?: string;\n fingerprint?: string[];\n level?: string;\n breadcrumbs?: {\n level?: string;\n timestamp?: string;\n category?: string;\n type?: string;\n message?: string;\n data?: Record<string, unknown>;\n }[];\n};\n\nexport type NativeScreenshot = {\n data: number[];\n contentType: string;\n filename: string;\n}\n\n// The export must be here to pass codegen even if not used\nexport default TurboModuleRegistry.getEnforcing<Spec>('RNSentry');\n"]}
1
+ {"version":3,"file":"NativeRNSentry.js","sourceRoot":"","sources":["../../src/js/NativeRNSentry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAwFnD,2DAA2D;AAC3D,eAAe,mBAAmB,CAAC,YAAY,CAAO,UAAU,CAAC,CAAC","sourcesContent":["import type { Package } from '@sentry/types';\nimport type { TurboModule } from 'react-native';\nimport { TurboModuleRegistry } from 'react-native';\nimport type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';\n\n// There has to be only one interface and it has to be named `Spec`\n// Only extra allowed definitions are types (probably codegen bug)\nexport interface Spec extends TurboModule {\n addBreadcrumb(breadcrumb: UnsafeObject): void;\n captureEnvelope(\n bytes: number[],\n options: {\n store: boolean;\n },\n ): Promise<boolean>;\n captureScreenshot(): Promise<NativeScreenshot[]>;\n clearBreadcrumbs(): void;\n crash(): void;\n closeNativeSdk(): Promise<void>;\n disableNativeFramesTracking(): void;\n fetchNativeRelease(): Promise<NativeReleaseResponse>;\n fetchNativeSdkInfo(): Promise<Package>;\n fetchNativeDeviceContexts(): Promise<NativeDeviceContextsResponse>;\n fetchNativeAppStart(): Promise<NativeAppStartResponse | null>;\n fetchNativeFrames(): Promise<NativeFramesResponse | null>;\n initNativeSdk(options: UnsafeObject): Promise<boolean>;\n setUser(defaultUserKeys: UnsafeObject | null, otherUserKeys: UnsafeObject | null): void;\n setContext(key: string, value: UnsafeObject | null): void;\n setExtra(key: string, value: string): void;\n setTag(key: string, value: string): void;\n enableNativeFramesTracking(): void;\n fetchModules(): Promise<string | undefined | null>;\n fetchViewHierarchy(): Promise<number[] | undefined | null>;\n}\n\nexport type NativeAppStartResponse = {\n isColdStart: boolean;\n appStartTime: number;\n didFetchAppStart: boolean;\n};\n\nexport type NativeFramesResponse = {\n totalFrames: number;\n slowFrames: number;\n frozenFrames: number;\n};\n\nexport type NativeReleaseResponse = {\n build: string;\n id: string;\n version: string;\n};\n\n/**\n * This type describes serialized scope from sentry-cocoa. (This is not used for Android)\n * https://github.com/getsentry/sentry-cocoa/blob/master/Sources/Sentry/SentryScope.m\n */\nexport type NativeDeviceContextsResponse = {\n [key: string]: unknown;\n tags?: Record<string, string>;\n extra?: Record<string, unknown>;\n context?: Record<string, Record<string, unknown>>;\n user?: {\n userId?: string;\n email?: string;\n username?: string;\n ipAddress?: string;\n segment?: string;\n data?: Record<string, unknown>;\n };\n dist?: string;\n environment?: string;\n fingerprint?: string[];\n level?: string;\n breadcrumbs?: {\n level?: string;\n timestamp?: string;\n category?: string;\n type?: string;\n message?: string;\n data?: Record<string, unknown>;\n }[];\n};\n\nexport type NativeScreenshot = {\n data: number[];\n contentType: string;\n filename: string;\n};\n\n// The export must be here to pass codegen even if not used\nexport default TurboModuleRegistry.getEnforcing<Spec>('RNSentry');\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../src/js/breadcrumb.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG/D,eAAO,MAAM,wBAAwB,EAAE,aAAsB,CAAC;AAE9D,aAAK,mBAAmB,GAAG;KACxB,CAAC,IAAI,MAAM,OAAO,CAAC,UAAU,CAAC,GAAG,OAAO;CAC1C,CAAA;AAED;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,mBAAmB,GAAG,UAAU,CA6B/E"}
1
+ {"version":3,"file":"breadcrumb.d.ts","sourceRoot":"","sources":["../../src/js/breadcrumb.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,UAAU,EAAE,aAAa,EAAE,MAAM,eAAe,CAAC;AAG/D,eAAO,MAAM,wBAAwB,EAAE,aAAsB,CAAC;AAE9D,aAAK,mBAAmB,GAAG;KACxB,CAAC,IAAI,MAAM,OAAO,CAAC,UAAU,CAAC,GAAG,OAAO;CAC1C,CAAC;AAEF;;GAEG;AACH,wBAAgB,oBAAoB,CAAC,SAAS,EAAE,mBAAmB,GAAG,UAAU,CA6B/E"}
@@ -1 +1 @@
1
- {"version":3,"file":"breadcrumb.js","sourceRoot":"","sources":["../../src/js/breadcrumb.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAExD,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;QACtC,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;KAClC;IACD,IAAI,OAAO,SAAS,CAAC,KAAK,KAAK,QAAQ,EAAE;QACvC,UAAU,CAAC,KAAK,GAAG,uBAAuB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;KAC7D;IACD,IAAI,OAAO,SAAS,CAAC,QAAQ,KAAK,QAAQ,EAAE;QAC1C,UAAU,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;KAC1C;IACD,IAAI,OAAO,SAAS,CAAC,QAAQ,KAAK,QAAQ,EAAE;QAC1C,UAAU,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;KAC1C;IACD,IAAI,OAAO,SAAS,CAAC,OAAO,KAAK,QAAQ,EAAE;QACzC,UAAU,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;KACxC;IACD,IAAI,OAAO,SAAS,CAAC,IAAI,KAAK,QAAQ,IAAI,SAAS,CAAC,IAAI,KAAK,IAAI,EAAE;QACjE,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;KAClC;IACD,IAAI,OAAO,SAAS,CAAC,SAAS,KAAK,QAAQ,EAAE;QAC3C,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAAA;QACjD,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;YACrB,UAAU,CAAC,SAAS,GAAG,SAAS,CAAC;SAClC;KACF;IAED,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import type { Breadcrumb, SeverityLevel } from '@sentry/types';\nimport { severityLevelFromString } from '@sentry/utils';\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 timestamp = Date.parse(candidate.timestamp)\n if (!isNaN(timestamp)) {\n breadcrumb.timestamp = timestamp;\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,eAAe,CAAC;AAExD,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;QACtC,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;KAClC;IACD,IAAI,OAAO,SAAS,CAAC,KAAK,KAAK,QAAQ,EAAE;QACvC,UAAU,CAAC,KAAK,GAAG,uBAAuB,CAAC,SAAS,CAAC,KAAK,CAAC,CAAC;KAC7D;IACD,IAAI,OAAO,SAAS,CAAC,QAAQ,KAAK,QAAQ,EAAE;QAC1C,UAAU,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;KAC1C;IACD,IAAI,OAAO,SAAS,CAAC,QAAQ,KAAK,QAAQ,EAAE;QAC1C,UAAU,CAAC,QAAQ,GAAG,SAAS,CAAC,QAAQ,CAAC;KAC1C;IACD,IAAI,OAAO,SAAS,CAAC,OAAO,KAAK,QAAQ,EAAE;QACzC,UAAU,CAAC,OAAO,GAAG,SAAS,CAAC,OAAO,CAAC;KACxC;IACD,IAAI,OAAO,SAAS,CAAC,IAAI,KAAK,QAAQ,IAAI,SAAS,CAAC,IAAI,KAAK,IAAI,EAAE;QACjE,UAAU,CAAC,IAAI,GAAG,SAAS,CAAC,IAAI,CAAC;KAClC;IACD,IAAI,OAAO,SAAS,CAAC,SAAS,KAAK,QAAQ,EAAE;QAC3C,MAAM,SAAS,GAAG,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,SAAS,CAAC,CAAC;QAClD,IAAI,CAAC,KAAK,CAAC,SAAS,CAAC,EAAE;YACrB,UAAU,CAAC,SAAS,GAAG,SAAS,CAAC;SAClC;KACF;IAED,OAAO,UAAU,CAAC;AACpB,CAAC","sourcesContent":["import type { Breadcrumb, SeverityLevel } from '@sentry/types';\nimport { severityLevelFromString } from '@sentry/utils';\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 timestamp = Date.parse(candidate.timestamp);\n if (!isNaN(timestamp)) {\n breadcrumb.timestamp = timestamp;\n }\n }\n\n return breadcrumb;\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/js/client.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,KAAK,EAGV,QAAQ,EACR,KAAK,EACL,SAAS,EAGT,aAAa,EAEb,YAAY,EACb,MAAM,eAAe,CAAC;AAOvB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AA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AC,SAAS,EAAE,OAAO,EAAE,IAAI,GAAE,SAAc,GAAG,WAAW,CAAC,KAAK,CAAC;IAMvF;;OAEG;IACI,gBAAgB,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,aAAa,EAAE,IAAI,CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;IAmBrG;;;OAGG;IACI,WAAW,IAAI,IAAI;IAI1B;;OAEG;IACI,KAAK,IAAI,WAAW,CAAC,OAAO,CAAC;IAOpC;;OAEG;IACI,mBAAmB,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI;IASxD;;OAEG;IACI,iBAAiB,IAAI,IAAI;IAShC;;OAEG;IACH,SAAS,CAAC,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IA6BjD;;OAEG;YACW,cAAc;IAgB5B;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAShC;;OAEG;IACH,OAAO,CAAC,qBAAqB;CAa9B"}
package/dist/js/client.js CHANGED
@@ -34,8 +34,7 @@ export class ReactNativeClient extends BaseClient {
34
34
  * @inheritDoc
35
35
  */
36
36
  eventFromException(exception, hint = {}) {
37
- return Screenshot.attachScreenshotToEventHint(hint, this._options)
38
- .then(hintWithScreenshot => eventFromException(this._options.stackParser, exception, hintWithScreenshot, this._options.attachStacktrace));
37
+ return Screenshot.attachScreenshotToEventHint(hint, this._options).then(hintWithScreenshot => eventFromException(this._options.stackParser, exception, hintWithScreenshot, this._options.attachStacktrace));
39
38
  }
40
39
  /**
41
40
  * @inheritDoc
@@ -105,9 +104,9 @@ export class ReactNativeClient extends BaseClient {
105
104
  }
106
105
  let shouldClearOutcomesBuffer = true;
107
106
  if (this._transport && this._dsn) {
108
- this._transport.send(envelope)
109
- .then(null, reason => {
110
- if (reason instanceof SentryError) { // SentryError is thrown by SyncPromise
107
+ this._transport.send(envelope).then(null, reason => {
108
+ if (reason instanceof SentryError) {
109
+ // SentryError is thrown by SyncPromise
111
110
  shouldClearOutcomesBuffer = false;
112
111
  // If this is called asynchronously we want the _outcomesBuffer to be cleared
113
112
  logger.error('SentryError while sending event, keeping outcomes buffer:', reason);
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/js/client.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAa1C,OAAO,EAAE,sBAAsB,EAAE,MAAM,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAC5E,OAAO,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAErC,OAAO,EAAE,iBAAiB,EAAE,MAAM,wBAAwB,CAAC;AAC3D,OAAO,EAAE,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,0BAA0B,EAAE,KAAK,EAAE,MAAM,kBAAkB,CAAC;AACrE,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAC;AACxE,OAAO,EAAE,aAAa,EAAE,MAAM,iBAAiB,CAAC;AAChD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,OAAO,iBAAkB,SAAQ,UAAoC;IAIzE;;;OAGG;IACH,YAAmB,OAAiC;QAClD,sBAAsB,EAAE,CAAC;QACzB,OAAO,CAAC,SAAS,GAAG,OAAO,CAAC,SAAS,IAAI,EAAE,CAAC;QAC5C,OAAO,CAAC,SAAS,CAAC,GAAG,GAAG,OAAO,CAAC,SAAS,CAAC,GAAG,IAAI,cAAc,CAAC;QAChE,KAAK,CAAC,OAAO,CAAC,CAAC;QAEf,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC;QAC1B,KAAK,IAAI,CAAC,cAAc,EAAE,CAA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AM,GAAG,CAAC,EAAE;YACvB,MAAM,gBAAgB,GAAqB;gBACzC,EAAE,IAAI,EAAE,eAAe,EAAE;gBACzB;oBACE,SAAS,EAAE,sBAAsB,EAAE;oBACnC,gBAAgB,EAAE,QAAQ;iBAC3B;aACF,CAAC;YAEF,QAAQ,CAAC,KAAK,CAAC,CAAC,IAAI,CAAC,gBAAgB,CAAC,CAAC;SACxC;IACH,CAAC;CACF","sourcesContent":["import { eventFromException, eventFromMessage } from '@sentry/browser';\nimport { BaseClient } from '@sentry/core';\nimport type {\n ClientReportEnvelope,\n ClientReportItem,\n Envelope,\n Event,\n EventHint,\n Exception,\n Outcome,\n SeverityLevel,\n Thread,\n UserFeedback,\n} from '@sentry/types';\nimport { dateTimestampInSeconds, logger, SentryError } from '@sentry/utils';\nimport { Alert } from 'react-native';\n\nimport { createIntegration } from './integrations/factory';\nimport { Screenshot } from './integrations/screenshot';\nimport { defaultSdkInfo } from './integrations/sdkinfo';\nimport type { ReactNativeClientOptions } from './options';\nimport { ReactNativeTracing } from './tracing';\nimport { createUserFeedbackEnvelope, items } from './utils/envelope';\nimport { ignoreRequireCycleLogs } from './utils/ignorerequirecyclelogs';\nimport { mergeOutcomes } from './utils/outcome';\nimport { NATIVE } from './wrapper';\n\n/**\n * The Sentry React Native SDK Client.\n *\n * @see ReactNativeClientOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class ReactNativeClient extends BaseClient<ReactNativeClientOptions> {\n\n private _outcomesBuffer: Outcome[];\n\n /**\n * Creates a new React Native SDK instance.\n * @param options Configuration options for this SDK.\n */\n public constructor(options: ReactNativeClientOptions) {\n ignoreRequireCycleLogs();\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || defaultSdkInfo;\n super(options);\n\n this._outcomesBuffer = [];\n void this._initNativeSdk();\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint: EventHint = {}): PromiseLike<Event> {\n return Screenshot.attachScreenshotToEventHint(hint, this._options)\n .then(hintWithScreenshot => eventFromException(\n this._options.stackParser,\n exception,\n hintWithScreenshot,\n this._options.attachStacktrace,\n ));\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level?: SeverityLevel, hint?: EventHint): PromiseLike<Event> {\n return eventFromMessage(\n this._options.stackParser,\n message,\n level,\n hint,\n this._options.attachStacktrace,\n ).then((event: Event) => {\n // TMP! Remove this function once JS SDK uses threads for messages\n if (!event.exception?.values || event.exception.values.length <= 0) {\n return event;\n }\n const values = event.exception.values.map((exception: Exception): Thread => ({\n stacktrace: exception.stacktrace,\n }));\n (event as { threads?: { values: Thread[] } }).threads = { values };\n delete event.exception;\n return event;\n });\n }\n\n /**\n * If native client is available it will trigger a native crash.\n * Use this only for testing purposes.\n */\n public nativeCrash(): void {\n NATIVE.nativeCrash();\n }\n\n /**\n * @inheritDoc\n */\n public close(): PromiseLike<boolean> {\n // As super.close() flushes queued events, we wait for that to finish before closing the native SDK.\n return super.close().then((result: boolean) => {\n return NATIVE.closeNativeSdk().then(() => result) as PromiseLike<boolean>;\n });\n }\n\n /**\n * Sends user feedback to Sentry.\n */\n public captureUserFeedback(feedback: UserFeedback): void {\n const envelope = createUserFeedbackEnvelope(\n feedback,\n {\n metadata: this._options._metadata,\n dsn: this.getDsn(),\n tunnel: this._options.tunnel,\n },\n );\n this._sendEnvelope(envelope);\n }\n\n /**\n * Sets up the integrations\n */\n public setupIntegrations(): void {\n super.setupIntegrations();\n const tracing = this.getIntegration(ReactNativeTracing);\n const routingName = tracing?.options.routingInstrumentation?.name\n if (routingName) {\n this.addIntegration(createIntegration(routingName));\n }\n }\n\n /**\n * @inheritdoc\n */\n protected _sendEnvelope(envelope: Envelope): void {\n const outcomes = this._clearOutcomes();\n this._outcomesBuffer = mergeOutcomes(this._outcomesBuffer, outcomes);\n\n if (this._options.sendClientReports) {\n this._attachClientReportTo(this._outcomesBuffer, envelope as ClientReportEnvelope);\n }\n\n let shouldClearOutcomesBuffer = true;\n if (this._transport && this._dsn) {\n this._transport.send(envelope)\n .then(null, reason => {\n if (reason instanceof SentryError) { // SentryError is thrown by SyncPromise\n shouldClearOutcomesBuffer = false;\n // If this is called asynchronously we want the _outcomesBuffer to be cleared\n logger.error('SentryError while sending event, keeping outcomes buffer:', reason);\n } else {\n logger.error('Error while sending event:', reason);\n }\n });\n } else {\n logger.error('Transport disabled');\n }\n\n if (shouldClearOutcomesBuffer) {\n this._outcomesBuffer = []; // if send fails synchronously the _outcomesBuffer will stay intact\n }\n }\n\n /**\n * Starts native client with dsn and options\n */\n private async _initNativeSdk(): Promise<void> {\n let didCallNativeInit = false;\n\n try {\n didCallNativeInit = await NATIVE.initNativeSdk(this._options);\n } catch (_) {\n this._showCannotConnectDialog();\n } finally {\n try {\n this._options.onReady?.({ didCallNativeInit });\n } catch (error) {\n logger.error('The OnReady callback threw an error: ', error);\n }\n }\n }\n\n /**\n * If the user is in development mode, and the native nagger is enabled then it will show an alert.\n */\n private _showCannotConnectDialog(): void {\n if (__DEV__ && this._options.enableNativeNagger) {\n Alert.alert(\n 'Sentry',\n 'Warning, could not connect to Sentry native SDK.\\nIf you do not want to use the native component please pass `enableNative: false` in the options.\\nVisit: https://docs.sentry.io/platforms/react-native/#linking for more details.'\n );\n }\n }\n\n /**\n * Attaches a client report from outcomes to the envelope.\n */\n private _attachClientReportTo(outcomes: Outcome[], envelope: ClientReportEnvelope): void {\n if (outcomes.length > 0) {\n const clientReportItem: ClientReportItem = [\n { type: 'client_report' },\n {\n timestamp: dateTimestampInSeconds(),\n discarded_events: outcomes,\n },\n ];\n\n envelope[items].push(clientReportItem);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/js/client.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,kBAAkB,EAAE,gBAAgB,EAAE,MAAM,iBAAiB,CAAC;AACvE,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAa1C,OAAO,EAAE,sBAAsB,EAAE,MAAM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sentry/core';\nimport type {\n ClientReportEnvelope,\n ClientReportItem,\n Envelope,\n Event,\n EventHint,\n Exception,\n Outcome,\n SeverityLevel,\n Thread,\n UserFeedback,\n} from '@sentry/types';\nimport { dateTimestampInSeconds, logger, SentryError } from '@sentry/utils';\nimport { Alert } from 'react-native';\n\nimport { createIntegration } from './integrations/factory';\nimport { Screenshot } from './integrations/screenshot';\nimport { defaultSdkInfo } from './integrations/sdkinfo';\nimport type { ReactNativeClientOptions } from './options';\nimport { ReactNativeTracing } from './tracing';\nimport { createUserFeedbackEnvelope, items } from './utils/envelope';\nimport { ignoreRequireCycleLogs } from './utils/ignorerequirecyclelogs';\nimport { mergeOutcomes } from './utils/outcome';\nimport { NATIVE } from './wrapper';\n\n/**\n * The Sentry React Native SDK Client.\n *\n * @see ReactNativeClientOptions for documentation on configuration options.\n * @see SentryClient for usage documentation.\n */\nexport class ReactNativeClient extends BaseClient<ReactNativeClientOptions> {\n private _outcomesBuffer: Outcome[];\n\n /**\n * Creates a new React Native SDK instance.\n * @param options Configuration options for this SDK.\n */\n public constructor(options: ReactNativeClientOptions) {\n ignoreRequireCycleLogs();\n options._metadata = options._metadata || {};\n options._metadata.sdk = options._metadata.sdk || defaultSdkInfo;\n super(options);\n\n this._outcomesBuffer = [];\n void this._initNativeSdk();\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint: EventHint = {}): PromiseLike<Event> {\n return Screenshot.attachScreenshotToEventHint(hint, this._options).then(hintWithScreenshot =>\n eventFromException(this._options.stackParser, exception, hintWithScreenshot, this._options.attachStacktrace),\n );\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(message: string, level?: SeverityLevel, hint?: EventHint): PromiseLike<Event> {\n return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace).then(\n (event: Event) => {\n // TMP! Remove this function once JS SDK uses threads for messages\n if (!event.exception?.values || event.exception.values.length <= 0) {\n return event;\n }\n const values = event.exception.values.map(\n (exception: Exception): Thread => ({\n stacktrace: exception.stacktrace,\n }),\n );\n (event as { threads?: { values: Thread[] } }).threads = { values };\n delete event.exception;\n return event;\n },\n );\n }\n\n /**\n * If native client is available it will trigger a native crash.\n * Use this only for testing purposes.\n */\n public nativeCrash(): void {\n NATIVE.nativeCrash();\n }\n\n /**\n * @inheritDoc\n */\n public close(): PromiseLike<boolean> {\n // As super.close() flushes queued events, we wait for that to finish before closing the native SDK.\n return super.close().then((result: boolean) => {\n return NATIVE.closeNativeSdk().then(() => result) as PromiseLike<boolean>;\n });\n }\n\n /**\n * Sends user feedback to Sentry.\n */\n public captureUserFeedback(feedback: UserFeedback): void {\n const envelope = createUserFeedbackEnvelope(feedback, {\n metadata: this._options._metadata,\n dsn: this.getDsn(),\n tunnel: this._options.tunnel,\n });\n this._sendEnvelope(envelope);\n }\n\n /**\n * Sets up the integrations\n */\n public setupIntegrations(): void {\n super.setupIntegrations();\n const tracing = this.getIntegration(ReactNativeTracing);\n const routingName = tracing?.options.routingInstrumentation?.name;\n if (routingName) {\n this.addIntegration(createIntegration(routingName));\n }\n }\n\n /**\n * @inheritdoc\n */\n protected _sendEnvelope(envelope: Envelope): void {\n const outcomes = this._clearOutcomes();\n this._outcomesBuffer = mergeOutcomes(this._outcomesBuffer, outcomes);\n\n if (this._options.sendClientReports) {\n this._attachClientReportTo(this._outcomesBuffer, envelope as ClientReportEnvelope);\n }\n\n let shouldClearOutcomesBuffer = true;\n if (this._transport && this._dsn) {\n this._transport.send(envelope).then(null, reason => {\n if (reason instanceof SentryError) {\n // SentryError is thrown by SyncPromise\n shouldClearOutcomesBuffer = false;\n // If this is called asynchronously we want the _outcomesBuffer to be cleared\n logger.error('SentryError while sending event, keeping outcomes buffer:', reason);\n } else {\n logger.error('Error while sending event:', reason);\n }\n });\n } else {\n logger.error('Transport disabled');\n }\n\n if (shouldClearOutcomesBuffer) {\n this._outcomesBuffer = []; // if send fails synchronously the _outcomesBuffer will stay intact\n }\n }\n\n /**\n * Starts native client with dsn and options\n */\n private async _initNativeSdk(): Promise<void> {\n let didCallNativeInit = false;\n\n try {\n didCallNativeInit = await NATIVE.initNativeSdk(this._options);\n } catch (_) {\n this._showCannotConnectDialog();\n } finally {\n try {\n this._options.onReady?.({ didCallNativeInit });\n } catch (error) {\n logger.error('The OnReady callback threw an error: ', error);\n }\n }\n }\n\n /**\n * If the user is in development mode, and the native nagger is enabled then it will show an alert.\n */\n private _showCannotConnectDialog(): void {\n if (__DEV__ && this._options.enableNativeNagger) {\n Alert.alert(\n 'Sentry',\n 'Warning, could not connect to Sentry native SDK.\\nIf you do not want to use the native component please pass `enableNative: false` in the options.\\nVisit: https://docs.sentry.io/platforms/react-native/#linking for more details.',\n );\n }\n }\n\n /**\n * Attaches a client report from outcomes to the envelope.\n */\n private _attachClientReportTo(outcomes: Outcome[], envelope: ClientReportEnvelope): void {\n if (outcomes.length > 0) {\n const clientReportItem: ClientReportItem = [\n { type: 'client_report' },\n {\n timestamp: dateTimestampInSeconds(),\n discarded_events: outcomes,\n },\n ];\n\n envelope[items].push(clientReportItem);\n }\n }\n}\n"]}
@@ -1,8 +1,7 @@
1
1
  export { Breadcrumb, Request, SdkInfo, Event, Exception, StackFrame, Stacktrace, Thread, User, UserFeedback, } from '@sentry/types';
2
2
  export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, } from '@sentry/core';
3
- import '@sentry/tracing';
4
3
  export { Integrations as BrowserIntegrations, ErrorBoundary, withErrorBoundary, createReduxEnhancer, Profiler, useProfiler, withProfiler, } from '@sentry/react';
5
- export { lastEventId, } from '@sentry/browser';
4
+ export { lastEventId } from '@sentry/browser';
6
5
  import * as Integrations from './integrations';
7
6
  import { SDK_NAME, SDK_VERSION } from './version';
8
7
  export { ReactNativeOptions } from './options';
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/js/index.ts"],"names":[],"m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AY,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC"}
package/dist/js/index.js CHANGED
@@ -1,12 +1,8 @@
1
1
  export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, } from '@sentry/core';
2
- // We need to import it so we patch the hub with global functions
3
- // aka. this has side effects
4
- import '@sentry/tracing';
5
- // Add the React Native SDK's own tracing extensions, this needs to happen AFTER @sentry/tracing's
6
2
  import { _addTracingExtensions } from './measurements';
7
3
  _addTracingExtensions();
8
4
  export { Integrations as BrowserIntegrations, ErrorBoundary, withErrorBoundary, createReduxEnhancer, Profiler, useProfiler, withProfiler, } from '@sentry/react';
9
- export { lastEventId, } from '@sentry/browser';
5
+ export { lastEventId } from '@sentry/browser';
10
6
  import * as Integrations from './integrations';
11
7
  import { SDK_NAME, SDK_VERSION } from './version';
12
8
  export { ReactNativeClient } from './client';
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/js/index.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAEtB,iEAAiE;AACjE,6BAA6B;AAC7B,OAAO,iBAAiB,CAAC;AAEzB,kGAAkG;AAClG,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,qBAAqB,EAAE,CAAC;AAExB,OAAO,EACL,YAAY,IAAI,mBAAmB,EACnC,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,WAAW,GACZ,MAAM,iBAAiB,CAAC;AAEzB,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EACL,IAAI,EACJ,IAAI;AACJ,mDAAmD;AACnD,OAAO;AACP,mDAAmD;AACnD,UAAU,EACV,WAAW,EACX,KAAK,EACL,KAAK,EACL,mBAAmB,EACnB,SAAS,EACT,cAAc,GACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,EACL,kBAAkB,EAClB,gCAAgC;AAChC,mDAAmD;AACnD,gCAAgC,EAChC,8BAA8B,EAC9B,oCAAoC,EACpC,sBAAsB,EAEtB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC","sourcesContent":["export {\n Breadcrumb,\n Request,\n SdkInfo,\n Event,\n Exception,\n StackFrame,\n Stacktrace,\n Thread,\n User,\n UserFeedback,\n} from '@sentry/types';\n\nexport {\n addGlobalEventProcessor,\n addBreadcrumb,\n captureException,\n captureEvent,\n captureMessage,\n getHubFromCarrier,\n getCurrentHub,\n Hub,\n Scope,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n startTransaction,\n} from '@sentry/core';\n\n// We need to import it so we patch the hub with global functions\n// aka. this has side effects\nimport '@sentry/tracing';\n\n// Add the React Native SDK's own tracing extensions, this needs to happen AFTER @sentry/tracing's\nimport { _addTracingExtensions } from './measurements';\n_addTracingExtensions();\n\nexport {\n Integrations as BrowserIntegrations,\n ErrorBoundary,\n withErrorBoundary,\n createReduxEnhancer,\n Profiler,\n useProfiler,\n withProfiler,\n} from '@sentry/react';\n\nexport {\n lastEventId,\n} from '@sentry/browser';\n\nimport * as Integrations from './integrations';\nimport { SDK_NAME, SDK_VERSION } from './version';\nexport { ReactNativeOptions } from './options';\nexport { ReactNativeClient } from './client';\n\nexport {\n init,\n wrap,\n // eslint-disable-next-line deprecation/deprecation\n setDist,\n // eslint-disable-next-line deprecation/deprecation\n setRelease,\n nativeCrash,\n flush,\n close,\n captureUserFeedback,\n withScope,\n configureScope,\n} from './sdk';\nexport { TouchEventBoundary, withTouchEventBoundary } from './touchevents';\n\nexport {\n ReactNativeTracing,\n ReactNavigationV4Instrumentation,\n // eslint-disable-next-line deprecation/deprecation\n ReactNavigationV5Instrumentation,\n ReactNavigationInstrumentation,\n ReactNativeNavigationInstrumentation,\n RoutingInstrumentation,\n ReactNavigationTransactionContext,\n sentryTraceGesture,\n} from './tracing';\n\nexport { Integrations, SDK_NAME, SDK_VERSION };\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/js/index.ts"],"names":[],"mappings":"AAaA,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,gBAAgB,GACjB,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gBAAgB,CAAC;AACvD,qBAAqB,EAAE,CAAC;AAExB,OAAO,EACL,YAAY,IAAI,mBAAmB,EACnC,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,EAAE,WAAW,EAAE,MAAM,iBAAiB,CAAC;AAE9C,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAElD,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EACL,IAAI,EACJ,IAAI;AACJ,mDAAmD;AACnD,OAAO;AACP,mDAAmD;AACnD,UAAU,EACV,WAAW,EACX,KAAK,EACL,KAAK,EACL,mBAAmB,EACnB,SAAS,EACT,cAAc,GACf,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,EACL,kBAAkB,EAClB,gCAAgC;AAChC,mDAAmD;AACnD,gCAAgC,EAChC,8BAA8B,EAC9B,oCAAoC,EACpC,sBAAsB,EAEtB,kBAAkB,GACnB,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC","sourcesContent":["export {\n Breadcrumb,\n Request,\n SdkInfo,\n Event,\n Exception,\n StackFrame,\n Stacktrace,\n Thread,\n User,\n UserFeedback,\n} from '@sentry/types';\n\nexport {\n addGlobalEventProcessor,\n addBreadcrumb,\n captureException,\n captureEvent,\n captureMessage,\n getHubFromCarrier,\n getCurrentHub,\n Hub,\n Scope,\n setContext,\n setExtra,\n setExtras,\n setTag,\n setTags,\n setUser,\n startTransaction,\n} from '@sentry/core';\n\nimport { _addTracingExtensions } from './measurements';\n_addTracingExtensions();\n\nexport {\n Integrations as BrowserIntegrations,\n ErrorBoundary,\n withErrorBoundary,\n createReduxEnhancer,\n Profiler,\n useProfiler,\n withProfiler,\n} from '@sentry/react';\n\nexport { lastEventId } from '@sentry/browser';\n\nimport * as Integrations from './integrations';\nimport { SDK_NAME, SDK_VERSION } from './version';\nexport { ReactNativeOptions } from './options';\nexport { ReactNativeClient } from './client';\n\nexport {\n init,\n wrap,\n // eslint-disable-next-line deprecation/deprecation\n setDist,\n // eslint-disable-next-line deprecation/deprecation\n setRelease,\n nativeCrash,\n flush,\n close,\n captureUserFeedback,\n withScope,\n configureScope,\n} from './sdk';\nexport { TouchEventBoundary, withTouchEventBoundary } from './touchevents';\n\nexport {\n ReactNativeTracing,\n ReactNavigationV4Instrumentation,\n // eslint-disable-next-line deprecation/deprecation\n ReactNavigationV5Instrumentation,\n ReactNavigationInstrumentation,\n ReactNativeNavigationInstrumentation,\n RoutingInstrumentation,\n ReactNavigationTransactionContext,\n sentryTraceGesture,\n} from './tracing';\n\nexport { Integrations, SDK_NAME, SDK_VERSION };\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"debugsymbolicator.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/debugsymbolicator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAoB,WAAW,EAAc,MAAM,eAAe,CAAC;AAsB/E;;GAEG;AACH,oBAAY,gBAAgB,GAAG,KAAK,GAAG;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,6DAA6D;AAC7D,qBAAa,iBAAkB,YAAW,WAAW;IACnD;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAuB;IAC/C;;OAEG;IACI,IAAI,EAAE,MAAM,CAAwB;IAE3C;;OAEG;IACI,SAAS,IAAI,IAAI;IA6BxB;;;OAGG;YACW,YAAY;IAsC1B;;;OAGG;YACW,uCAAuC;IAqDrD;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAW7B;;;;;OAKG;YACW,iBAAiB;CAgChC"}
1
+ {"version":3,"file":"debugsymbolicator.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/debugsymbolicator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAoB,WAAW,EAAc,MAAM,eAAe,CAAC;AAoB/E;;GAEG;AACH,oBAAY,gBAAgB,GAAG,KAAK,GAAG;IACrC,WAAW,CAAC,EAAE,MAAM,CAAC;IACrB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,oBAAoB,CAAC,EAAE,OAAO,CAAC;IAC/B,cAAc,CAAC,EAAE,MAAM,CAAC;CACzB,CAAC;AAEF,6DAA6D;AAC7D,qBAAa,iBAAkB,YAAW,WAAW;IACnD;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAuB;IAC/C;;OAEG;IACI,IAAI,EAAE,MAAM,CAAwB;IAE3C;;OAEG;IACI,SAAS,IAAI,IAAI;IA6BxB;;;OAGG;YACW,YAAY;IAiC1B;;;OAGG;YACW,uCAAuC;IA+CrD;;;;OAIG;IACH,OAAO,CAAC,qBAAqB;IAW7B;;;;;OAKG;YACW,iBAAiB;CA0BhC"}
@@ -108,9 +108,7 @@ export class DebugSymbolicator {
108
108
  if (newFrame.function) {
109
109
  const addressAtPos = newFrame.function.indexOf('(address at');
110
110
  if (addressAtPos >= 0) {
111
- newFrame.function = newFrame.function
112
- .substr(0, addressAtPos)
113
- .trim();
111
+ newFrame.function = newFrame.function.substr(0, addressAtPos).trim();
114
112
  }
115
113
  }
116
114
  if (inApp) {
@@ -1 +1 @@
1
- {"version":3,"file":"debugsymbolicator.js","sourceRoot":"","sources":["../../../src/js/integrations/debugsymbolicator.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE1D,MAAM,wBAAwB,GAAG,IAAI,MAAM,CACzC,CAAC,+BAA+B,EAAE,oBAAoB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAClE,CAAC;AA2BF,6DAA6D;AAC7D,MAAM,OAAO,iBAAiB;IAA9B;QAKE;;WAEG;QACI,SAAI,GAAW,iBAAiB,CAAC,EAAE,CAAC;IA2L7C,CAAC;IAzLC;;OAEG;IACI,SAAS;QACd,uBAAuB,CAAC,CAAO,KAAY,EAAE,IAAgB,EAAE,EAAE;YAC/D,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;YAE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AAM,GAAG,IAAI,QAAQ,EAAE;oBAC1B,IAAI,MAAM,CAAC,SAAS,CAAC,cAAc,CAAC,IAAI,CAAC,QAAQ,EAAE,GAAG,CAAC,EAAE;wBACvD,QAAQ,GAAG,MAAM,KAAK,CACpB,GAAG,YAAY,EAAE,CAAC,GAAG,GAAG,QAAQ,CAAC,KAAK,CAAC,CAAC,GAAG,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,EAAE,EACxD;4BACE,MAAM,EAAE,KAAK;yBACd,CACF,CAAC;wBAEF,IAAI,QAAQ,CAAC,EAAE,EAAE;4BACf,MAAM;yBACP;qBACF;iBACF;aACF;YAED,IAAI,QAAQ,IAAI,QAAQ,CAAC,EAAE,EAAE;gBAC3B,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;gBACtC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAElC,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;aACjC;;KACF;;AAjMD;;GAEG;AACW,oBAAE,GAAW,mBAAmB,CAAC","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport type { Event, EventHint, Integration, StackFrame } from '@sentry/types';\nimport { addContextToFrame, logger } from '@sentry/utils';\n\nconst INTERNAL_CALLSITES_REGEX = new RegExp(\n ['ReactNativeRenderer-dev\\\\.js$', 'MessageQueue\\\\.js$'].join('|')\n);\n\ninterface GetDevServer {\n (): { url: string };\n}\n\n/**\n * React Native Stack Frame\n */\ninterface ReactNativeFrame {\n // arguments: []\n column: number;\n file: string;\n lineNumber: number;\n methodName: string;\n}\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 class DebugSymbolicator implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'DebugSymbolicator';\n /**\n * @inheritDoc\n */\n public name: string = DebugSymbolicator.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor(async (event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(DebugSymbolicator);\n\n if (!self || hint === undefined || hint.originalException === undefined) {\n return event;\n }\n\n const reactError = hint.originalException as ReactNativeError;\n\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const parseErrorStack = require('react-native/Libraries/Core/Devtools/parseErrorStack');\n\n let stack;\n try {\n stack = parseErrorStack(reactError);\n } catch (e) {\n // In RN 0.64 `parseErrorStack` now only takes a string\n stack = parseErrorStack(reactError.stack);\n }\n\n await self._symbolicate(event, stack);\n\n event.platform = 'node'; // Setting platform node makes sure we do not show source maps errors\n\n return event;\n });\n }\n\n /**\n * Symbolicates the stack on the device talking to local dev server.\n * Mutates the passed event.\n */\n private async _symbolicate(\n event: Event,\n stack: string | undefined\n ): Promise<void> {\n try {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const symbolicateStackTrace = require('react-native/Libraries/Core/Devtools/symbolicateStackTrace');\n const prettyStack = await symbolicateStackTrace(stack);\n\n if (prettyStack) {\n let newStack = prettyStack;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (prettyStack.stack) {\n // This has been changed in an react-native version so stack is contained in here\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n newStack = prettyStack.stack;\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const stackWithoutInternalCallsites = newStack.filter(\n (frame: { file?: string }) =>\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n frame.file && frame.file.match(INTERNAL_CALLSITES_REGEX) === null\n );\n\n const symbolicatedFrames = await this._convertReactNativeFramesToSentryFrames(\n stackWithoutInternalCallsites\n );\n this._replaceFramesInEvent(event, symbolicatedFrames);\n } else {\n logger.error('The stack is null');\n }\n } catch (error) {\n if (error instanceof Error) {\n logger.warn(`Unable to symbolicate stack trace: ${error.message}`);\n }\n }\n }\n\n /**\n * Converts ReactNativeFrames to frames in the Sentry format\n * @param frames ReactNativeFrame[]\n */\n private async _convertReactNativeFramesToSentryFrames(\n frames: ReactNativeFrame[]\n ): Promise<StackFrame[]> {\n let getDevServer: GetDevServer;\n try {\n getDevServer = require('react-native/Libraries/Core/Devtools/getDevServer');\n } catch (_oO) {\n // We can't load devserver URL\n }\n // Below you will find lines marked with :HACK to prevent showing errors in the sentry ui\n // But since this is a debug only feature: This is Fine (TM)\n return Promise.all(\n frames.map(\n async (frame: ReactNativeFrame): Promise<StackFrame> => {\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: StackFrame = {\n colno: frame.column,\n filename: frame.file,\n function: frame.methodName,\n in_app: inApp,\n lineno: inApp ? frame.lineNumber : undefined, // :HACK\n platform: inApp ? 'javascript' : 'node', // :HACK\n };\n\n // The upstream `react-native@0.61` delegates parsing of stacks to `stacktrace-parser`, which is buggy and\n // leaves a trailing `(address at` in the function name.\n // `react-native@0.62` seems to have custom logic to parse hermes frames specially.\n // Anyway, all we do here is throw away the bogus suffix.\n if (newFrame.function) {\n const addressAtPos = newFrame.function.indexOf('(address at');\n if (addressAtPos >= 0) {\n newFrame.function = newFrame.function\n .substr(0, addressAtPos)\n .trim();\n }\n }\n\n if (inApp) {\n await this._addSourceContext(newFrame, getDevServer);\n }\n\n return newFrame;\n }\n )\n );\n }\n\n /**\n * Replaces the frames in the exception of a error.\n * @param event Event\n * @param frames StackFrame[]\n */\n private _replaceFramesInEvent(event: Event, frames: StackFrame[]): void {\n if (\n event.exception &&\n event.exception.values &&\n event.exception.values[0] &&\n event.exception.values[0].stacktrace\n ) {\n event.exception.values[0].stacktrace.frames = frames.reverse();\n }\n }\n\n /**\n * This tries to add source context for in_app Frames\n *\n * @param frame StackFrame\n * @param getDevServer function from RN to get DevServer URL\n */\n private async _addSourceContext(\n frame: StackFrame,\n getDevServer?: GetDevServer\n ): Promise<void> {\n let response;\n\n const segments = frame.filename?.split('/') ?? [];\n\n if (getDevServer) {\n for (const idx in segments) {\n if (Object.prototype.hasOwnProperty.call(segments, idx)) {\n response = await fetch(\n `${getDevServer().url}${segments.slice(-idx).join('/')}`,\n {\n method: 'GET',\n }\n );\n\n if (response.ok) {\n break;\n }\n }\n }\n }\n\n if (response && response.ok) {\n const content = await response.text();\n const lines = content.split('\\n');\n\n addContextToFrame(lines, frame);\n }\n }\n}\n"]}
1
+ {"version":3,"file":"debugsymbolicator.js","sourceRoot":"","sources":["../../../src/js/integrations/debugsymbolicator.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,uBAAuB,EAAE,aAAa,EAAE,MAAM,cAAc,CAAC;AAEtE,OAAO,EAAE,iBAAiB,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAE1D,MAAM,wBAAwB,GAAG,IAAI,MAAM,CAAC,CAAC,+BAA+B,EAAE,oBAAoB,CAAC,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,CAAC;AA2B/G,6DAA6D;AAC7D,MAAM,OAAO,iBAAiB;IAA9B;QAKE;;WAEG;QACI,SAAI,GAAW,iBAAiB,CAAC,EAAE,CAAC;IA0K7C,CAAC;IAxKC;;OAEG;IACI,SAAS;QACd,uBAAuB,CAAC,CAAO,KAAY,EAAE,IAAgB,EAAE,EAAE;YAC/D,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC,cAAc,CAAC,iBAAiB,CAAC,CAAC;YAE/D,IAAI,CAAC,IAAI,IAAI,IAAI,KAAK,SAAS,IAAI,IAAI,CAAC,iBAAiB,KAAK,SAAS,EAAE;gBACvE,OAAO,KAAK,CAAC;aACd;YAED,MAAM,UAAU,GAAG,IAAI,CAAC,iBAAqC,CAAC;YAE9D,8DAA8D;YAC9D,MAAM,eAAe,GAAG,OAAO,CAAC,sDAAsD,CAAC,CAAC;YAExF,IAAI,KAAK,CAAC;YACV,IAAI;g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AE;4BAC/E,MAAM,EAAE,KAAK;yBACd,CAAC,CAAC;wBAEH,IAAI,QAAQ,CAAC,EAAE,EAAE;4BACf,MAAM;yBACP;qBACF;iBACF;aACF;YAED,IAAI,QAAQ,IAAI,QAAQ,CAAC,EAAE,EAAE;gBAC3B,MAAM,OAAO,GAAG,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;gBACtC,MAAM,KAAK,GAAG,OAAO,CAAC,KAAK,CAAC,IAAI,CAAC,CAAC;gBAElC,iBAAiB,CAAC,KAAK,EAAE,KAAK,CAAC,CAAC;aACjC;;KACF;;AAhLD;;GAEG;AACW,oBAAE,GAAW,mBAAmB,CAAC","sourcesContent":["import { addGlobalEventProcessor, getCurrentHub } from '@sentry/core';\nimport type { Event, EventHint, Integration, StackFrame } from '@sentry/types';\nimport { addContextToFrame, logger } from '@sentry/utils';\n\nconst INTERNAL_CALLSITES_REGEX = new RegExp(['ReactNativeRenderer-dev\\\\.js$', 'MessageQueue\\\\.js$'].join('|'));\n\ninterface GetDevServer {\n (): { url: string };\n}\n\n/**\n * React Native Stack Frame\n */\ninterface ReactNativeFrame {\n // arguments: []\n column: number;\n file: string;\n lineNumber: number;\n methodName: string;\n}\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 class DebugSymbolicator implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'DebugSymbolicator';\n /**\n * @inheritDoc\n */\n public name: string = DebugSymbolicator.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(): void {\n addGlobalEventProcessor(async (event: Event, hint?: EventHint) => {\n const self = getCurrentHub().getIntegration(DebugSymbolicator);\n\n if (!self || hint === undefined || hint.originalException === undefined) {\n return event;\n }\n\n const reactError = hint.originalException as ReactNativeError;\n\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const parseErrorStack = require('react-native/Libraries/Core/Devtools/parseErrorStack');\n\n let stack;\n try {\n stack = parseErrorStack(reactError);\n } catch (e) {\n // In RN 0.64 `parseErrorStack` now only takes a string\n stack = parseErrorStack(reactError.stack);\n }\n\n await self._symbolicate(event, stack);\n\n event.platform = 'node'; // Setting platform node makes sure we do not show source maps errors\n\n return event;\n });\n }\n\n /**\n * Symbolicates the stack on the device talking to local dev server.\n * Mutates the passed event.\n */\n private async _symbolicate(event: Event, stack: string | undefined): Promise<void> {\n try {\n // eslint-disable-next-line @typescript-eslint/no-var-requires\n const symbolicateStackTrace = require('react-native/Libraries/Core/Devtools/symbolicateStackTrace');\n const prettyStack = await symbolicateStackTrace(stack);\n\n if (prettyStack) {\n let newStack = prettyStack;\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n if (prettyStack.stack) {\n // This has been changed in an react-native version so stack is contained in here\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n newStack = prettyStack.stack;\n }\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n const stackWithoutInternalCallsites = newStack.filter(\n (frame: { file?: string }) =>\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n frame.file && frame.file.match(INTERNAL_CALLSITES_REGEX) === null,\n );\n\n const symbolicatedFrames = await this._convertReactNativeFramesToSentryFrames(stackWithoutInternalCallsites);\n this._replaceFramesInEvent(event, symbolicatedFrames);\n } else {\n logger.error('The stack is null');\n }\n } catch (error) {\n if (error instanceof Error) {\n logger.warn(`Unable to symbolicate stack trace: ${error.message}`);\n }\n }\n }\n\n /**\n * Converts ReactNativeFrames to frames in the Sentry format\n * @param frames ReactNativeFrame[]\n */\n private async _convertReactNativeFramesToSentryFrames(frames: ReactNativeFrame[]): Promise<StackFrame[]> {\n let getDevServer: GetDevServer;\n try {\n getDevServer = require('react-native/Libraries/Core/Devtools/getDevServer');\n } catch (_oO) {\n // We can't load devserver URL\n }\n // Below you will find lines marked with :HACK to prevent showing errors in the sentry ui\n // But since this is a debug only feature: This is Fine (TM)\n return Promise.all(\n frames.map(async (frame: ReactNativeFrame): Promise<StackFrame> => {\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: StackFrame = {\n colno: frame.column,\n filename: frame.file,\n function: frame.methodName,\n in_app: inApp,\n lineno: inApp ? frame.lineNumber : undefined, // :HACK\n platform: inApp ? 'javascript' : 'node', // :HACK\n };\n\n // The upstream `react-native@0.61` delegates parsing of stacks to `stacktrace-parser`, which is buggy and\n // leaves a trailing `(address at` in the function name.\n // `react-native@0.62` seems to have custom logic to parse hermes frames specially.\n // Anyway, all we do here is throw away the bogus suffix.\n if (newFrame.function) {\n const addressAtPos = newFrame.function.indexOf('(address at');\n if (addressAtPos >= 0) {\n newFrame.function = newFrame.function.substr(0, addressAtPos).trim();\n }\n }\n\n if (inApp) {\n await this._addSourceContext(newFrame, getDevServer);\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 */\n private _replaceFramesInEvent(event: Event, frames: StackFrame[]): void {\n if (\n event.exception &&\n event.exception.values &&\n event.exception.values[0] &&\n event.exception.values[0].stacktrace\n ) {\n event.exception.values[0].stacktrace.frames = frames.reverse();\n }\n }\n\n /**\n * This tries to add source context for in_app Frames\n *\n * @param frame StackFrame\n * @param getDevServer function from RN to get DevServer URL\n */\n private async _addSourceContext(frame: StackFrame, getDevServer?: GetDevServer): Promise<void> {\n let response;\n\n const segments = frame.filename?.split('/') ?? [];\n\n if (getDevServer) {\n for (const idx in segments) {\n if (Object.prototype.hasOwnProperty.call(segments, idx)) {\n response = await fetch(`${getDevServer().url}${segments.slice(-idx).join('/')}`, {\n method: 'GET',\n });\n\n if (response.ok) {\n break;\n }\n }\n }\n }\n\n if (response && response.ok) {\n const content = await response.text();\n const lines = content.split('\\n');\n\n addContextToFrame(lines, frame);\n }\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"devicecontext.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/devicecontext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAS,cAAc,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAQ7E,uCAAuC;AACvC,qBAAa,aAAc,YAAW,WAAW;IAC/C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAmB;IAE3C;;OAEG;IACI,IAAI,EAAE,MAAM,CAAoB;IAEvC;;OAEG;IACI,SAAS,CACd,uBAAuB,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,EAC3D,aAAa,EAAE,MAAM,GAAG,GACvB,IAAI;CA0ER"}
1
+ {"version":3,"file":"devicecontext.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/devicecontext.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAS,cAAc,EAAE,GAAG,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAQ7E,uCAAuC;AACvC,qBAAa,aAAc,YAAW,WAAW;IAC/C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAmB;IAE3C;;OAEG;IACI,IAAI,EAAE,MAAM,CAAoB;IAEvC;;OAEG;IACI,SAAS,CAAC,uBAAuB,EAAE,CAAC,QAAQ,EAAE,cAAc,KAAK,IAAI,EAAE,aAAa,EAAE,MAAM,GAAG,GAAG,IAAI;CAwE9G"}
@@ -53,11 +53,9 @@ export class DeviceContext {
53
53
  }
54
54
  const nativeFingerprint = native.fingerprint;
55
55
  if (nativeFingerprint) {
56
- event.fingerprint = ((_a = event.fingerprint) !== null && _a !== void 0 ? _a : []).concat(nativeFingerprint.filter((item) => { var _a; return ((_a = event.fingerprint) !== null && _a !== void 0 ? _a : []).indexOf(item) < 0; }));
56
+ event.fingerprint = ((_a = event.fingerprint) !== null && _a !== void 0 ? _a : []).concat(nativeFingerprint.filter(item => { var _a; return ((_a = event.fingerprint) !== null && _a !== void 0 ? _a : []).indexOf(item) < 0; }));
57
57
  }
58
- const nativeLevel = typeof native['level'] === 'string'
59
- ? severityLevelFromString(native['level'])
60
- : undefined;
58
+ const nativeLevel = typeof native['level'] === 'string' ? severityLevelFromString(native['level']) : undefined;
61
59
  if (!event.level && nativeLevel) {
62
60
  event.level = nativeLevel;
63
61
  }
@@ -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,eAAe,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,uCAAuC;AACvC,MAAM,OAAO,aAAa;IAA1B;QAME;;WAEG;QACI,SAAI,GAAW,aAAa,CAAC,EAAE,CAAC;IAkFzC,CAAC;IAhFC;;OAEG;IACI,SAAS,CACd,uBAA2D,EAC3D,aAAwB;QAExB,uBAAuB,CAAC,CAAO,KAAY,EAAE,EAAE;;YAC7C,MAAM,IAAI,GAAG,aAAa,EAAE,CAAC,cAAc,CAAC,aAAa,CAAC,CAAC;YAC3D,IAAI,CAAC,IAAI,EAAE;gBACT,OAAO,KAAK,CAAC;aACd;YAED,IAAI,MAAM,GAAwC,IAAI,CAAC;YACvD,IAAI;gBACF,MAAM,GAAG,MAAM,MAAM,CAAC,yBAAyB,EAAE,CAAC;aACnD;YAAC,OAAO,CAAC,EAAE;gBACV,MAAM,CAAC,GAAG,CAAC,6CAA6C,CAAC,EAAE,CAAC,CAAC;aAC9D;YAED,IAAI,CAAC,MAAM,EAAE;gBACX,OAAO,KAAK,CAAC;aACd;YAED,MAAM,UAAU,GAAG,MAAM,CAAC,IAAI,CAAC;YAC/B,IAAI,CAAC,KAAK,CAAC,IAAI,IAAI,UAAU,EAAE;gBAC7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ACd,IAAI,CAAC,KAAK,CAAC,KAAK,IAAI,WAAW,EAAE;gBAC/B,KAAK,CAAC,KAAK,GAAG,WAAW,CAAC;aAC3B;YAED,MAAM,iBAAiB,GAAG,MAAM,CAAC,aAAa,CAAC,CAAC;YAChD,IAAI,CAAC,KAAK,CAAC,WAAW,IAAI,iBAAiB,EAAE;gBAC3C,KAAK,CAAC,WAAW,GAAG,iBAAiB,CAAC;aACvC;YAED,MAAM,iBAAiB,GAAG,KAAK,CAAC,OAAO,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC;gBAC5D,CAAC,CAAC,MAAM,CAAC,aAAa,CAAC,CAAC,GAAG,CAAC,oBAAoB,CAAC;gBACjD,CAAC,CAAC,SAAS,CAAC;YACd,IAAI,iBAAiB,EAAE;gBACrB,KAAK,CAAC,WAAW,GAAG,iBAAiB,CAAC;aACvC;YAED,OAAO,KAAK,CAAC;QACf,CAAC,CAAA,CAAC,CAAC;IACL,CAAC;;AAzFD;;GAEG;AACW,gBAAE,GAAW,eAAe,CAAC","sourcesContent":["/* eslint-disable complexity */\nimport type { Event, EventProcessor, Hub, Integration } from '@sentry/types';\nimport { logger, severityLevelFromString } from '@sentry/utils';\nimport { AppState } from 'react-native';\n\nimport { breadcrumbFromObject } from '../breadcrumb';\nimport type { NativeDeviceContextsResponse } from '../NativeRNSentry';\nimport { NATIVE } from '../wrapper';\n\n/** Load device context from native. */\nexport class DeviceContext implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'DeviceContext';\n\n /**\n * @inheritDoc\n */\n public name: string = DeviceContext.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(\n addGlobalEventProcessor: (callback: EventProcessor) => void,\n getCurrentHub: () => Hub,\n ): void {\n addGlobalEventProcessor(async (event: Event) => {\n const self = getCurrentHub().getIntegration(DeviceContext);\n if (!self) {\n return event;\n }\n\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 nativeContext = native.context;\n if (AppState.currentState !== 'unknown') {\n nativeContext = nativeContext || {};\n nativeContext.app = {\n ...nativeContext.app,\n in_foreground: AppState.currentState === 'active',\n }\n }\n if (nativeContext) {\n event.contexts = { ...nativeContext, ...event.contexts };\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'\n ? severityLevelFromString(native['level'])\n : 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 event.breadcrumbs = nativeBreadcrumbs;\n }\n\n return event;\n });\n }\n}\n"]}
1
+ {"version":3,"file":"devicecontext.js","sourceRoot":"","sources":["../../../src/js/integrations/devicecontext.ts"],"names":[],"mappings":";AAEA,OAAO,EAAE,MAAM,EAAE,uBAAuB,EAAE,MAAM,eAAe,CAAC;AAChE,OAAO,EAAE,QAAQ,EAAE,MAAM,cAAc,CAAC;AAExC,OAAO,EAAE,oBAAoB,EAAE,MAAM,eAAe,CAAC;AAErD,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,uCAAuC;AACvC,MAAM,OAAO,aAAa;IAA1B;QAME;;WAEG;QACI,SAAI,GAAW,aAA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D;;GAEG;AACW,gBAAE,GAAW,eAAe,CAAC","sourcesContent":["/* eslint-disable complexity */\nimport type { Event, EventProcessor, Hub, Integration } from '@sentry/types';\nimport { logger, severityLevelFromString } from '@sentry/utils';\nimport { AppState } from 'react-native';\n\nimport { breadcrumbFromObject } from '../breadcrumb';\nimport type { NativeDeviceContextsResponse } from '../NativeRNSentry';\nimport { NATIVE } from '../wrapper';\n\n/** Load device context from native. */\nexport class DeviceContext implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'DeviceContext';\n\n /**\n * @inheritDoc\n */\n public name: string = DeviceContext.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void {\n addGlobalEventProcessor(async (event: Event) => {\n const self = getCurrentHub().getIntegration(DeviceContext);\n if (!self) {\n return event;\n }\n\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 nativeContext = native.context;\n if (AppState.currentState !== 'unknown') {\n nativeContext = nativeContext || {};\n nativeContext.app = {\n ...nativeContext.app,\n in_foreground: AppState.currentState === 'active',\n };\n }\n if (nativeContext) {\n event.contexts = { ...nativeContext, ...event.contexts };\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 event.breadcrumbs = nativeBreadcrumbs;\n }\n\n return event;\n });\n }\n}\n"]}
@@ -10,7 +10,7 @@ export class EventOrigin {
10
10
  * @inheritDoc
11
11
  */
12
12
  setupOnce(addGlobalEventProcessor) {
13
- addGlobalEventProcessor((event) => {
13
+ addGlobalEventProcessor(event => {
14
14
  var _a;
15
15
  event.tags = (_a = event.tags) !== null && _a !== void 0 ? _a : {};
16
16
  event.tags['event.origin'] = 'javascript';
@@ -1 +1 @@
1
- {"version":3,"file":"eventorigin.js","sourceRoot":"","sources":["../../../src/js/integrations/eventorigin.ts"],"names":[],"mappings":"AAEA,0CAA0C;AAC1C,MAAM,OAAO,WAAW;IAAxB;QAME;;WAEG;QACI,SAAI,GAAW,WAAW,CAAC,EAAE,CAAC;IAevC,CAAC;IAbC;;OAEG;IACI,SAAS,CAAC,uBAAoD;QACnE,uBAAuB,CAAC,CAAC,KAAK,EAAE,EAAE;;YAChC,KAAK,CAAC,IAAI,SAAG,KAAK,CAAC,IAAI,mCAAI,EAAE,CAAC;YAE9B,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,YAAY,CAAC;YAC1C,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,YAAY,CAAC;YAE/C,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC;;AAtBD;;GAEG;AACW,cAAE,GAAW,aAAa,CAAC","sourcesContent":["import type { EventProcessor, Integration } from '@sentry/types';\n\n/** Default EventOrigin instrumentation */\nexport class EventOrigin implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'EventOrigin';\n\n /**\n * @inheritDoc\n */\n public name: string = EventOrigin.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (e: EventProcessor) => void): void {\n addGlobalEventProcessor((event) => {\n event.tags = event.tags ?? {};\n\n event.tags['event.origin'] = 'javascript';\n event.tags['event.environment'] = 'javascript';\n\n return event;\n });\n }\n}\n"]}
1
+ {"version":3,"file":"eventorigin.js","sourceRoot":"","sources":["../../../src/js/integrations/eventorigin.ts"],"names":[],"mappings":"AAEA,0CAA0C;AAC1C,MAAM,OAAO,WAAW;IAAxB;QAME;;WAEG;QACI,SAAI,GAAW,WAAW,CAAC,EAAE,CAAC;IAevC,CAAC;IAbC;;OAEG;IACI,SAAS,CAAC,uBAAoD;QACnE,uBAAuB,CAAC,KAAK,CAAC,EAAE;;YAC9B,KAAK,CAAC,IAAI,SAAG,KAAK,CAAC,IAAI,mCAAI,EAAE,CAAC;YAE9B,KAAK,CAAC,IAAI,CAAC,cAAc,CAAC,GAAG,YAAY,CAAC;YAC1C,KAAK,CAAC,IAAI,CAAC,mBAAmB,CAAC,GAAG,YAAY,CAAC;YAE/C,OAAO,KAAK,CAAC;QACf,CAAC,CAAC,CAAC;IACL,CAAC;;AAtBD;;GAEG;AACW,cAAE,GAAW,aAAa,CAAC","sourcesContent":["import type { EventProcessor, Integration } from '@sentry/types';\n\n/** Default EventOrigin instrumentation */\nexport class EventOrigin implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'EventOrigin';\n\n /**\n * @inheritDoc\n */\n public name: string = EventOrigin.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (e: EventProcessor) => void): void {\n addGlobalEventProcessor(event => {\n event.tags = event.tags ?? {};\n\n event.tags['event.origin'] = 'javascript';\n event.tags['event.environment'] = 'javascript';\n\n return event;\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,WAAW,EACZ,MAAM,eAAe,CAAC;AAEvB;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,EACzB,SAAS,GAAE,WAAW,CAAC,WAAW,CAAwB,GACzD,WAAW,CAKb"}
1
+ {"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/factory.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAEjD;;;GAGG;AACH,wBAAgB,iBAAiB,CAC/B,IAAI,EAAE,WAAW,CAAC,MAAM,CAAC,EACzB,SAAS,GAAE,WAAW,CAAC,WAAW,CAEjC,GACA,WAAW,CAKb"}
@@ -2,7 +2,9 @@
2
2
  * Creates an integration out of the provided name and setup function.
3
3
  * @hidden
4
4
  */
5
- export function createIntegration(name, setupOnce = () => { }) {
5
+ export function createIntegration(name, setupOnce = () => {
6
+ /* noop */
7
+ }) {
6
8
  return {
7
9
  name: name,
8
10
  setupOnce,
@@ -1 +1 @@
1
- {"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../src/js/integrations/factory.ts"],"names":[],"mappings":"AAIA;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAC/B,IAAyB,EACzB,YAAsC,GAAG,EAAE,GAAc,CAAC;IAE1D,OAAO;QACL,IAAI,EAAE,IAAI;QACV,SAAS;KACV,CAAC;AACJ,CAAC","sourcesContent":["import type {\n Integration,\n} from '@sentry/types';\n\n/**\n * Creates an integration out of the provided name and setup function.\n * @hidden\n */\nexport function createIntegration(\n name: Integration['name'],\n setupOnce: Integration['setupOnce'] = () => { /* noop */ },\n): Integration {\n return {\n name: name,\n setupOnce,\n };\n}\n"]}
1
+ {"version":3,"file":"factory.js","sourceRoot":"","sources":["../../../src/js/integrations/factory.ts"],"names":[],"mappings":"AAEA;;;GAGG;AACH,MAAM,UAAU,iBAAiB,CAC/B,IAAyB,EACzB,YAAsC,GAAG,EAAE;IACzC,UAAU;AACZ,CAAC;IAED,OAAO;QACL,IAAI,EAAE,IAAI;QACV,SAAS;KACV,CAAC;AACJ,CAAC","sourcesContent":["import type { Integration } from '@sentry/types';\n\n/**\n * Creates an integration out of the provided name and setup function.\n * @hidden\n */\nexport function createIntegration(\n name: Integration['name'],\n setupOnce: Integration['setupOnce'] = () => {\n /* noop */\n },\n): Integration {\n return {\n name: name,\n setupOnce,\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"modulesloader.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/modulesloader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAQ,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAKvE,mDAAmD;AACnD,qBAAa,aAAc,YAAW,WAAW;IAC/C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAmB;IAE3C;;OAEG;IACI,IAAI,EAAE,MAAM,CAAoB;IAEvC;;OAEG;IACI,SAAS,CAAC,uBAAuB,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,GAAG,IAAI;CAsB7E"}
1
+ {"version":3,"file":"modulesloader.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/modulesloader.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAS,cAAc,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAKxE,mDAAmD;AACnD,qBAAa,aAAc,YAAW,WAAW;IAC/C;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAAmB;IAE3C;;OAEG;IACI,IAAI,EAAE,MAAM,CAAoB;IAEvC;;OAEG;IACI,SAAS,CAAC,uBAAuB,EAAE,CAAC,CAAC,EAAE,cAAc,KAAK,IAAI,GAAG,IAAI;CAsB7E"}
@@ -1 +1 @@
1
- {"version":3,"file":"modulesloader.js","sourceRoot":"","sources":["../../../src/js/integrations/modulesloader.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,mDAAmD;AACnD,MAAM,OAAO,aAAa;IAA1B;QAME;;WAEG;QACI,SAAI,GAAW,aAAa,CAAC,EAAE,CAAC;IA2BzC,CAAC;IAzBC;;OAEG;IACI,SAAS,CAAC,uBAAoD;QACnE,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,IAAI,OAAsC,CAAC;QAE3C,uBAAuB,CAAC,CAAO,KAAY,EAAE,EAAE;YAC7C,IAAI,CAAC,OAAO,EAAE;gBACZ,IAAI;oBACF,OAAO,GAAG,MAAM,MAAM,CAAC,YAAY,EAAE,CAAC;iBACvC;gBAAC,OAAO,CAAC,EAAE;oBACV,MAAM,CAAC,GAAG,CAAC,sCAAsC,CAAC,EAAE,CAAC,CAAC;iBACvD;gBACD,OAAO,GAAG,IAAI,CAAC;aAChB;YACD,IAAI,OAAO,EAAE;gBACX,KAAK,CAAC,OAAO,mCACR,OAAO,GACP,KAAK,CAAC,OAAO,CACjB,CAAC;aACH;YACD,OAAO,KAAK,CAAC;QACf,CAAC,CAAA,CAAC,CAAC;IACL,CAAC;;AAlCD;;GAEG;AACW,gBAAE,GAAW,eAAe,CAAC","sourcesContent":["import type { Event,EventProcessor, Integration } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport { NATIVE } from '../wrapper';\n\n/** Loads runtime JS modules from prepared file. */\nexport class ModulesLoader implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'ModulesLoader';\n\n /**\n * @inheritDoc\n */\n public name: string = ModulesLoader.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (e: EventProcessor) => void): void {\n let isSetup = false;\n let modules: Record<string, string> | null;\n\n addGlobalEventProcessor(async (event: Event) => {\n if (!isSetup) {\n try {\n modules = await NATIVE.fetchModules();\n } catch (e) {\n logger.log(`Failed to get modules from native: ${e}`);\n }\n isSetup = true;\n }\n if (modules) {\n event.modules = {\n ...modules,\n ...event.modules,\n };\n }\n return event;\n });\n }\n}\n"]}
1
+ {"version":3,"file":"modulesloader.js","sourceRoot":"","sources":["../../../src/js/integrations/modulesloader.ts"],"names":[],"mappings":";AACA,OAAO,EAAE,MAAM,EAAE,MAAM,eAAe,CAAC;AAEvC,OAAO,EAAE,MAAM,EAAE,MAAM,YAAY,CAAC;AAEpC,mDAAmD;AACnD,MAAM,OAAO,aAAa;IAA1B;QAME;;WAEG;QACI,SAAI,GAAW,aAAa,CAAC,EAAE,CAAC;IA2BzC,CAAC;IAzBC;;OAEG;IACI,SAAS,CAAC,uBAAoD;QACnE,IAAI,OAAO,GAAG,KAAK,CAAC;QACpB,IAAI,OAAsC,CAAC;QAE3C,uBAAuB,CAAC,CAAO,KAAY,EAAE,EAAE;YAC7C,IAAI,CAAC,OAAO,EAAE;gBACZ,IAAI;oBACF,OAAO,GAAG,MAAM,MAAM,CAAC,YAAY,EAAE,CAAC;iBACvC;gBAAC,OAAO,CAAC,EAAE;oBACV,MAAM,CAAC,GAAG,CAAC,sCAAsC,CAAC,EAAE,CAAC,CAAC;iBACvD;gBACD,OAAO,GAAG,IAAI,CAAC;aAChB;YACD,IAAI,OAAO,EAAE;gBACX,KAAK,CAAC,OAAO,mCACR,OAAO,GACP,KAAK,CAAC,OAAO,CACjB,CAAC;aACH;YACD,OAAO,KAAK,CAAC;QACf,CAAC,CAAA,CAAC,CAAC;IACL,CAAC;;AAlCD;;GAEG;AACW,gBAAE,GAAW,eAAe,CAAC","sourcesContent":["import type { Event, EventProcessor, Integration } from '@sentry/types';\nimport { logger } from '@sentry/utils';\n\nimport { NATIVE } from '../wrapper';\n\n/** Loads runtime JS modules from prepared file. */\nexport class ModulesLoader implements Integration {\n /**\n * @inheritDoc\n */\n public static id: string = 'ModulesLoader';\n\n /**\n * @inheritDoc\n */\n public name: string = ModulesLoader.id;\n\n /**\n * @inheritDoc\n */\n public setupOnce(addGlobalEventProcessor: (e: EventProcessor) => void): void {\n let isSetup = false;\n let modules: Record<string, string> | null;\n\n addGlobalEventProcessor(async (event: Event) => {\n if (!isSetup) {\n try {\n modules = await NATIVE.fetchModules();\n } catch (e) {\n logger.log(`Failed to get modules from native: ${e}`);\n }\n isSetup = true;\n }\n if (modules) {\n event.modules = {\n ...modules,\n ...event.modules,\n };\n }\n return event;\n });\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"reactnativeerrorhandlers.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/reactnativeerrorhandlers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAa,WAAW,EAAiB,MAAM,eAAe,CAAC;AAM3E,uCAAuC;AACvC,UAAU,+BAA+B;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAOD,2CAA2C;AAC3C,qBAAa,wBAAyB,YAAW,WAAW;IAC1D;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAA8B;IAEtD;;OAEG;IACI,IAAI,EAAE,MAAM,CAA+B;IAElD,yBAAyB;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkC;IAE3D,kBAAkB;gBACC,OAAO,CAAC,EAAE,OAAO,CAAC,+BAA+B,CAAC;IASrE;;OAEG;IACI,SAAS,IAAI,IAAI;IAKxB;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAUlC;;;;;;;;OAQG;IACH,OAAO,CAAC,gBAAgB;IAgBxB;;OAEG;IACH,OAAO,CAAC,gCAAgC;IAyCxC;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAmB5B;;OAEG;IACH,OAAO,CAAC,cAAc;CA2EvB"}
1
+ {"version":3,"file":"reactnativeerrorhandlers.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/reactnativeerrorhandlers.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAa,WAAW,EAAiB,MAAM,eAAe,CAAC;AAM3E,uCAAuC;AACvC,UAAU,+BAA+B;IACvC,OAAO,EAAE,OAAO,CAAC;IACjB,oBAAoB,EAAE,OAAO,CAAC;IAC9B,kBAAkB,EAAE,OAAO,CAAC;CAC7B;AAOD,2CAA2C;AAC3C,qBAAa,wBAAyB,YAAW,WAAW;IAC1D;;OAEG;IACH,OAAc,EAAE,EAAE,MAAM,CAA8B;IAEtD;;OAEG;IACI,IAAI,EAAE,MAAM,CAA+B;IAElD,yBAAyB;IACzB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAkC;IAE3D,kBAAkB;gBACC,OAAO,CAAC,EAAE,OAAO,CAAC,+BAA+B,CAAC;IASrE;;OAEG;IACI,SAAS,IAAI,IAAI;IAKxB;;OAEG;IACH,OAAO,CAAC,0BAA0B;IAUlC;;;;;;;;OAQG;IACH,OAAO,CAAC,gBAAgB;IAcxB;;OAEG;IACH,OAAO,CAAC,gCAAgC;IAuCxC;;OAEG;IACH,OAAO,CAAC,oBAAoB;IAmB5B;;OAEG;IACH,OAAO,CAAC,cAAc;CAoEvB"}
@@ -42,7 +42,7 @@ export class ReactNativeErrorHandlers {
42
42
  */
43
43
  _polyfillPromise() {
44
44
  /* eslint-disable import/no-extraneous-dependencies,@typescript-eslint/no-var-requires */
45
- const { polyfillGlobal, } = require('react-native/Libraries/Utilities/PolyfillFunctions');
45
+ const { polyfillGlobal } = require('react-native/Libraries/Utilities/PolyfillFunctions');
46
46
  // Below, we follow the exact way React Native initializes its promise library, and we globally replace it.
47
47
  const Promise = require('promise/setimmediate/es6-extensions');
48
48
  // As of RN 0.67 only done and finally are used
@@ -61,7 +61,7 @@ export class ReactNativeErrorHandlers {
61
61
  // eslint-disable-next-line no-console
62
62
  console.warn(`Possible Unhandled Promise Rejection (id: ${id}):\n${rejection}`);
63
63
  },
64
- onHandled: (id) => {
64
+ onHandled: id => {
65
65
  // eslint-disable-next-line no-console
66
66
  console.warn(`Promise Rejection Handled (id: ${id})\n` +
67
67
  'This means you can ignore any previous messages of the form ' +