@sentry/react-native 5.0.0-alpha.1 → 5.0.0-alpha.11

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 (168) hide show
  1. package/CHANGELOG.md +403 -4
  2. package/README.md +6 -0
  3. package/RNSentry.podspec +22 -5
  4. package/android/build.gradle +20 -2
  5. package/android/src/main/java/io/sentry/react/{RNSentryModule.java → RNSentryModuleImpl.java} +174 -114
  6. package/android/src/main/java/io/sentry/react/RNSentryPackage.java +35 -19
  7. package/android/src/newarch/java/io/sentry/react/RNSentryModule.java +119 -0
  8. package/android/src/oldarch/java/io/sentry/react/RNSentryModule.java +119 -0
  9. package/dist/js/NativeRNSentry.d.ts +52 -0
  10. package/dist/js/NativeRNSentry.d.ts.map +1 -0
  11. package/dist/js/NativeRNSentry.js +4 -0
  12. package/dist/js/NativeRNSentry.js.map +1 -0
  13. package/dist/js/client.d.ts +18 -6
  14. package/dist/js/client.d.ts.map +1 -1
  15. package/dist/js/client.js +96 -37
  16. package/dist/js/client.js.map +1 -1
  17. package/dist/js/index.d.ts +4 -3
  18. package/dist/js/index.d.ts.map +1 -1
  19. package/dist/js/index.js +3 -2
  20. package/dist/js/index.js.map +1 -1
  21. package/dist/js/integrations/debugsymbolicator.d.ts +9 -0
  22. package/dist/js/integrations/debugsymbolicator.d.ts.map +1 -1
  23. package/dist/js/integrations/debugsymbolicator.js +0 -2
  24. package/dist/js/integrations/debugsymbolicator.js.map +1 -1
  25. package/dist/js/integrations/index.d.ts +2 -0
  26. package/dist/js/integrations/index.d.ts.map +1 -1
  27. package/dist/js/integrations/index.js +2 -0
  28. package/dist/js/integrations/index.js.map +1 -1
  29. package/dist/js/integrations/modulesloader.d.ts +17 -0
  30. package/dist/js/integrations/modulesloader.d.ts.map +1 -0
  31. package/dist/js/integrations/modulesloader.js +39 -0
  32. package/dist/js/integrations/modulesloader.js.map +1 -0
  33. package/dist/js/integrations/reactnativeerrorhandlers.d.ts.map +1 -1
  34. package/dist/js/integrations/reactnativeerrorhandlers.js +10 -7
  35. package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
  36. package/dist/js/integrations/reactnativeinfo.d.ts +23 -0
  37. package/dist/js/integrations/reactnativeinfo.d.ts.map +1 -0
  38. package/dist/js/integrations/reactnativeinfo.js +43 -0
  39. package/dist/js/integrations/reactnativeinfo.js.map +1 -0
  40. package/dist/js/integrations/screenshot.d.ts +23 -0
  41. package/dist/js/integrations/screenshot.d.ts.map +1 -0
  42. package/dist/js/integrations/screenshot.js +39 -0
  43. package/dist/js/integrations/screenshot.js.map +1 -0
  44. package/dist/js/integrations/sdkinfo.d.ts +4 -1
  45. package/dist/js/integrations/sdkinfo.d.ts.map +1 -1
  46. package/dist/js/integrations/sdkinfo.js +13 -7
  47. package/dist/js/integrations/sdkinfo.js.map +1 -1
  48. package/dist/js/measurements.d.ts +4 -0
  49. package/dist/js/measurements.d.ts.map +1 -1
  50. package/dist/js/measurements.js +12 -1
  51. package/dist/js/measurements.js.map +1 -1
  52. package/dist/js/misc.d.ts +9 -0
  53. package/dist/js/misc.d.ts.map +1 -0
  54. package/dist/js/misc.js +17 -0
  55. package/dist/js/misc.js.map +1 -0
  56. package/dist/js/options.d.ts +45 -9
  57. package/dist/js/options.d.ts.map +1 -1
  58. package/dist/js/options.js.map +1 -1
  59. package/dist/js/scope.d.ts +10 -2
  60. package/dist/js/scope.d.ts.map +1 -1
  61. package/dist/js/scope.js +13 -1
  62. package/dist/js/scope.js.map +1 -1
  63. package/dist/js/sdk.d.ts +25 -0
  64. package/dist/js/sdk.d.ts.map +1 -1
  65. package/dist/js/sdk.js +86 -27
  66. package/dist/js/sdk.js.map +1 -1
  67. package/dist/js/tools/ModulesCollector.d.ts +17 -0
  68. package/dist/js/tools/ModulesCollector.d.ts.map +1 -0
  69. package/dist/js/tools/ModulesCollector.js +109 -0
  70. package/dist/js/tools/ModulesCollector.js.map +1 -0
  71. package/dist/js/tools/collectModules.d.ts +2 -0
  72. package/dist/js/tools/collectModules.d.ts.map +1 -0
  73. package/dist/js/tools/collectModules.js +11 -0
  74. package/dist/js/tools/collectModules.js.map +1 -0
  75. package/dist/js/touchevents.d.ts +8 -0
  76. package/dist/js/touchevents.d.ts.map +1 -1
  77. package/dist/js/touchevents.js +10 -5
  78. package/dist/js/touchevents.js.map +1 -1
  79. package/dist/js/tracing/nativeframes.js.map +1 -1
  80. package/dist/js/tracing/reactnativenavigation.d.ts +9 -0
  81. package/dist/js/tracing/reactnativenavigation.d.ts.map +1 -1
  82. package/dist/js/tracing/reactnativenavigation.js +20 -12
  83. package/dist/js/tracing/reactnativenavigation.js.map +1 -1
  84. package/dist/js/tracing/reactnativetracing.d.ts +15 -6
  85. package/dist/js/tracing/reactnativetracing.d.ts.map +1 -1
  86. package/dist/js/tracing/reactnativetracing.js +16 -9
  87. package/dist/js/tracing/reactnativetracing.js.map +1 -1
  88. package/dist/js/tracing/reactnavigation.d.ts +7 -1
  89. package/dist/js/tracing/reactnavigation.d.ts.map +1 -1
  90. package/dist/js/tracing/reactnavigation.js +31 -23
  91. package/dist/js/tracing/reactnavigation.js.map +1 -1
  92. package/dist/js/tracing/reactnavigationv4.d.ts +9 -9
  93. package/dist/js/tracing/reactnavigationv4.d.ts.map +1 -1
  94. package/dist/js/tracing/reactnavigationv4.js +27 -15
  95. package/dist/js/tracing/reactnavigationv4.js.map +1 -1
  96. package/dist/js/tracing/routingInstrumentation.d.ts +1 -1
  97. package/dist/js/tracing/routingInstrumentation.d.ts.map +1 -1
  98. package/dist/js/tracing/routingInstrumentation.js.map +1 -1
  99. package/dist/js/tracing/utils.d.ts +4 -3
  100. package/dist/js/tracing/utils.d.ts.map +1 -1
  101. package/dist/js/tracing/utils.js +7 -10
  102. package/dist/js/tracing/utils.js.map +1 -1
  103. package/dist/js/transports/TextEncoder.d.ts +3 -0
  104. package/dist/js/transports/TextEncoder.d.ts.map +1 -0
  105. package/dist/js/transports/TextEncoder.js +12 -0
  106. package/dist/js/transports/TextEncoder.js.map +1 -0
  107. package/dist/js/transports/native.d.ts +10 -1
  108. package/dist/js/transports/native.d.ts.map +1 -1
  109. package/dist/js/transports/native.js +15 -4
  110. package/dist/js/transports/native.js.map +1 -1
  111. package/dist/js/user.d.ts +6 -0
  112. package/dist/js/user.d.ts.map +1 -0
  113. package/dist/js/user.js +1 -0
  114. package/dist/js/user.js.map +1 -0
  115. package/dist/js/utils/envelope.d.ts +12 -0
  116. package/dist/js/utils/envelope.d.ts.map +1 -0
  117. package/dist/js/utils/envelope.js +21 -0
  118. package/dist/js/utils/envelope.js.map +1 -0
  119. package/dist/js/utils/environment.d.ts +7 -0
  120. package/dist/js/utils/environment.d.ts.map +1 -0
  121. package/dist/js/utils/environment.js +14 -0
  122. package/dist/js/utils/environment.js.map +1 -0
  123. package/dist/js/utils/ignorerequirecyclelogs.d.ts +6 -0
  124. package/dist/js/utils/ignorerequirecyclelogs.d.ts.map +1 -0
  125. package/dist/js/utils/ignorerequirecyclelogs.js +15 -0
  126. package/dist/js/utils/ignorerequirecyclelogs.js.map +1 -0
  127. package/dist/js/utils/outcome.d.ts +6 -0
  128. package/dist/js/utils/outcome.d.ts.map +1 -0
  129. package/dist/js/utils/outcome.js +19 -0
  130. package/dist/js/utils/outcome.js.map +1 -0
  131. package/dist/js/utils/safe.d.ts +18 -0
  132. package/dist/js/utils/safe.d.ts.map +1 -0
  133. package/dist/js/utils/safe.js +46 -0
  134. package/dist/js/utils/safe.js.map +1 -0
  135. package/dist/js/utils/worldwide.d.ts +13 -0
  136. package/dist/js/utils/worldwide.d.ts.map +1 -0
  137. package/dist/js/utils/worldwide.js +4 -0
  138. package/dist/js/utils/worldwide.js.map +1 -0
  139. package/dist/js/vendor/buffer/index.d.ts +2 -0
  140. package/dist/js/vendor/buffer/index.d.ts.map +1 -0
  141. package/dist/js/vendor/buffer/index.js +2 -0
  142. package/dist/js/vendor/buffer/index.js.map +1 -0
  143. package/dist/js/vendor/buffer/utf8ToBytes.d.ts +10 -0
  144. package/dist/js/vendor/buffer/utf8ToBytes.d.ts.map +1 -0
  145. package/dist/js/vendor/buffer/utf8ToBytes.js +82 -0
  146. package/dist/js/vendor/buffer/utf8ToBytes.js.map +1 -0
  147. package/dist/js/vendor/index.d.ts +2 -0
  148. package/dist/js/vendor/index.d.ts.map +1 -0
  149. package/dist/js/vendor/index.js +2 -0
  150. package/dist/js/vendor/index.js.map +1 -0
  151. package/dist/js/version.d.ts +2 -1
  152. package/dist/js/version.d.ts.map +1 -1
  153. package/dist/js/version.js +2 -1
  154. package/dist/js/version.js.map +1 -1
  155. package/dist/js/wrapper.d.ts +13 -4
  156. package/dist/js/wrapper.d.ts.map +1 -1
  157. package/dist/js/wrapper.js +129 -71
  158. package/dist/js/wrapper.js.map +1 -1
  159. package/ios/{RNSentry.m → RNSentry.mm} +98 -57
  160. package/package.json +32 -26
  161. package/sample-new-architecture/react-native.config.js +10 -0
  162. package/scripts/collect-modules.sh +43 -0
  163. package/sentry.gradle +57 -6
  164. package/src/js/NativeRNSentry.ts +66 -0
  165. package/dist/js/definitions.d.ts +0 -52
  166. package/dist/js/definitions.d.ts.map +0 -1
  167. package/dist/js/definitions.js +0 -1
  168. package/dist/js/definitions.js.map +0 -1
@@ -0,0 +1,119 @@
1
+ package io.sentry.react;
2
+
3
+ import androidx.annotation.NonNull;
4
+
5
+ import com.facebook.react.bridge.ReactApplicationContext;
6
+ import com.facebook.react.bridge.ReadableArray;
7
+ import com.facebook.react.bridge.ReadableMap;
8
+ import com.facebook.react.bridge.Promise;
9
+
10
+ public class RNSentryModule extends NativeRNSentrySpec {
11
+
12
+ private final RNSentryModuleImpl impl;
13
+
14
+ RNSentryModule(ReactApplicationContext reactContext) {
15
+ super(reactContext);
16
+ this.impl = new RNSentryModuleImpl(reactContext);
17
+ }
18
+
19
+ @Override
20
+ @NonNull
21
+ public String getName() {
22
+ return RNSentryModuleImpl.NAME;
23
+ }
24
+
25
+ @Override
26
+ public void initNativeSdk(final ReadableMap rnOptions, Promise promise) {
27
+ this.impl.initNativeSdk(rnOptions, promise);
28
+ }
29
+
30
+ @Override
31
+ public void crash() {
32
+ this.impl.crash();
33
+ }
34
+
35
+ @Override
36
+ public void fetchModules(Promise promise) {
37
+ this.impl.fetchModules(promise);
38
+ }
39
+
40
+ @Override
41
+ public void fetchNativeRelease(Promise promise) {
42
+ this.impl.fetchNativeRelease(promise);
43
+ }
44
+
45
+ @Override
46
+ public void fetchNativeAppStart(Promise promise) {
47
+ this.impl.fetchNativeAppStart(promise);
48
+ }
49
+
50
+ @Override
51
+ public void fetchNativeFrames(Promise promise) {
52
+ this.impl.fetchNativeFrames(promise);
53
+ }
54
+
55
+ @Override
56
+ public void captureEnvelope(ReadableArray rawBytes, ReadableMap options, Promise promise) {
57
+ this.impl.captureEnvelope(rawBytes, options, promise);
58
+ }
59
+
60
+ @Override
61
+ public void captureScreenshot(Promise promise) {
62
+ this.impl.captureScreenshot(promise);
63
+ }
64
+
65
+ @Override
66
+ public void setUser(final ReadableMap user, final ReadableMap otherUserKeys) {
67
+ this.impl.setUser(user, otherUserKeys);
68
+ }
69
+
70
+ @Override
71
+ public void addBreadcrumb(final ReadableMap breadcrumb) {
72
+ this.impl.addBreadcrumb(breadcrumb);
73
+ }
74
+
75
+ @Override
76
+ public void clearBreadcrumbs() {
77
+ this.impl.clearBreadcrumbs();
78
+ }
79
+
80
+ @Override
81
+ public void setExtra(String key, String extra) {
82
+ this.impl.setExtra(key, extra);
83
+ }
84
+
85
+ @Override
86
+ public void setContext(final String key, final ReadableMap context) {
87
+ this.impl.setContext(key, context);
88
+ }
89
+
90
+ @Override
91
+ public void setTag(String key, String value) {
92
+ this.impl.setTag(key, value);
93
+ }
94
+
95
+ @Override
96
+ public void closeNativeSdk(Promise promise) {
97
+ this.impl.closeNativeSdk(promise);
98
+ }
99
+
100
+ @Override
101
+ public void enableNativeFramesTracking() {
102
+ this.impl.enableNativeFramesTracking();
103
+ }
104
+
105
+ @Override
106
+ public void disableNativeFramesTracking() {
107
+ this.impl.disableNativeFramesTracking();
108
+ }
109
+
110
+ @Override
111
+ public void fetchNativeDeviceContexts(Promise promise) {
112
+ // Not used on android
113
+ }
114
+
115
+ @Override
116
+ public void fetchNativeSdkInfo(Promise promise) {
117
+ // Not used on android
118
+ }
119
+ }
@@ -0,0 +1,119 @@
1
+ package io.sentry.react;
2
+
3
+ import com.facebook.react.bridge.ReadableArray;
4
+ import com.facebook.react.bridge.ReadableMap;
5
+ import com.facebook.react.bridge.Promise;
6
+ import com.facebook.react.bridge.ReactApplicationContext;
7
+ import com.facebook.react.bridge.ReactContext;
8
+ import com.facebook.react.bridge.ReactContextBaseJavaModule;
9
+ import com.facebook.react.bridge.ReactMethod;
10
+
11
+ public class RNSentryModule extends ReactContextBaseJavaModule {
12
+
13
+ private final RNSentryModuleImpl impl;
14
+
15
+ RNSentryModule(ReactApplicationContext reactContext) {
16
+ super(reactContext);
17
+ this.impl = new RNSentryModuleImpl(reactContext);
18
+ }
19
+
20
+ @Override
21
+ public String getName() {
22
+ return RNSentryModuleImpl.NAME;
23
+ }
24
+
25
+ @ReactMethod
26
+ public void initNativeSdk(final ReadableMap rnOptions, Promise promise) {
27
+ this.impl.initNativeSdk(rnOptions, promise);
28
+ }
29
+
30
+ @ReactMethod
31
+ public void crash() {
32
+ this.impl.crash();
33
+ }
34
+
35
+ @ReactMethod
36
+ public void fetchModules(Promise promise) {
37
+ this.impl.fetchModules(promise);
38
+ }
39
+
40
+ @ReactMethod
41
+ public void fetchNativeRelease(Promise promise) {
42
+ this.impl.fetchNativeRelease(promise);
43
+ }
44
+
45
+ @ReactMethod
46
+ public void fetchNativeAppStart(Promise promise) {
47
+ this.impl.fetchNativeAppStart(promise);
48
+ }
49
+
50
+ @ReactMethod
51
+ public void fetchNativeFrames(Promise promise) {
52
+ this.impl.fetchNativeFrames(promise);
53
+ }
54
+
55
+ @ReactMethod
56
+ public void captureEnvelope(ReadableArray rawBytes, ReadableMap options, Promise promise) {
57
+ this.impl.captureEnvelope(rawBytes, options, promise);
58
+ }
59
+
60
+ @ReactMethod
61
+ public void captureScreenshot(Promise promise) {
62
+ this.impl.captureScreenshot(promise);
63
+ }
64
+
65
+ @ReactMethod
66
+ public void setUser(final ReadableMap user, final ReadableMap otherUserKeys) {
67
+ this.impl.setUser(user, otherUserKeys);
68
+ }
69
+
70
+ @ReactMethod
71
+ public void addBreadcrumb(final ReadableMap breadcrumb) {
72
+ this.impl.addBreadcrumb(breadcrumb);
73
+ }
74
+
75
+ @ReactMethod
76
+ public void clearBreadcrumbs() {
77
+ this.impl.clearBreadcrumbs();
78
+ }
79
+
80
+ @ReactMethod
81
+ public void setExtra(String key, String extra) {
82
+ this.impl.setExtra(key, extra);
83
+ }
84
+
85
+ @ReactMethod
86
+ public void setContext(final String key, final ReadableMap context) {
87
+ this.impl.setContext(key, context);
88
+ }
89
+
90
+ @ReactMethod
91
+ public void setTag(String key, String value) {
92
+ this.impl.setTag(key, value);
93
+ }
94
+
95
+ @ReactMethod
96
+ public void closeNativeSdk(Promise promise) {
97
+ this.impl.closeNativeSdk(promise);
98
+ }
99
+
100
+ @ReactMethod
101
+ public void enableNativeFramesTracking() {
102
+ this.impl.enableNativeFramesTracking();
103
+ }
104
+
105
+ @ReactMethod
106
+ public void disableNativeFramesTracking() {
107
+ this.impl.disableNativeFramesTracking();
108
+ }
109
+
110
+ @ReactMethod
111
+ public void fetchNativeDeviceContexts(Promise promise) {
112
+ // Not used on android
113
+ }
114
+
115
+ @ReactMethod
116
+ public void fetchNativeSdkInfo(Promise promise) {
117
+ // Not used on android
118
+ }
119
+ }
@@ -0,0 +1,52 @@
1
+ import { Package } from '@sentry/types';
2
+ import { TurboModule } from 'react-native';
3
+ import type { UnsafeObject } from 'react-native/Libraries/Types/CodegenTypes';
4
+ export interface Spec extends TurboModule {
5
+ addBreadcrumb(breadcrumb: UnsafeObject): void;
6
+ captureEnvelope(bytes: number[], options: {
7
+ store: boolean;
8
+ }): Promise<boolean>;
9
+ captureScreenshot(): Promise<NativeScreenshot[]>;
10
+ clearBreadcrumbs(): void;
11
+ crash(): void;
12
+ closeNativeSdk(): Promise<void>;
13
+ disableNativeFramesTracking(): void;
14
+ fetchNativeRelease(): Promise<NativeReleaseResponse>;
15
+ fetchNativeSdkInfo(): Promise<Package>;
16
+ fetchNativeDeviceContexts(): Promise<NativeDeviceContextsResponse>;
17
+ fetchNativeAppStart(): Promise<NativeAppStartResponse | null>;
18
+ fetchNativeFrames(): Promise<NativeFramesResponse | null>;
19
+ initNativeSdk(options: UnsafeObject): Promise<boolean>;
20
+ setUser(defaultUserKeys: UnsafeObject | null, otherUserKeys: UnsafeObject | null): void;
21
+ setContext(key: string, value: UnsafeObject | null): void;
22
+ setExtra(key: string, value: string): void;
23
+ setTag(key: string, value: string): void;
24
+ enableNativeFramesTracking(): void;
25
+ fetchModules(): Promise<string | undefined | null>;
26
+ }
27
+ export declare type NativeAppStartResponse = {
28
+ isColdStart: boolean;
29
+ appStartTime: number;
30
+ didFetchAppStart: boolean;
31
+ };
32
+ export declare type NativeFramesResponse = {
33
+ totalFrames: number;
34
+ slowFrames: number;
35
+ frozenFrames: number;
36
+ };
37
+ export declare type NativeReleaseResponse = {
38
+ build: string;
39
+ id: string;
40
+ version: string;
41
+ };
42
+ export declare type NativeDeviceContextsResponse = {
43
+ [key: string]: Record<string, unknown>;
44
+ };
45
+ export declare type NativeScreenshot = {
46
+ data: number[];
47
+ contentType: string;
48
+ filename: string;
49
+ };
50
+ declare const _default: Spec;
51
+ export default _default;
52
+ //# sourceMappingURL=NativeRNSentry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeRNSentry.d.ts","sourceRoot":"","sources":["../../src/js/NativeRNSentry.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,OAAO,EAAE,MAAM,eAAe,CAAC;AACxC,OAAO,EAAE,WAAW,EAAuB,MAAM,cAAc,CAAC;AAChE,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,2CAA2C,CAAC;AAI9E,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ACpD;AAED,oBAAY,sBAAsB,GAAG;IACnC,WAAW,EAAE,OAAO,CAAC;IACrB,YAAY,EAAE,MAAM,CAAC;IACrB,gBAAgB,EAAE,OAAO,CAAC;CAC3B,CAAC;AAEF,oBAAY,oBAAoB,GAAG;IACjC,WAAW,EAAE,MAAM,CAAC;IACpB,UAAU,EAAE,MAAM,CAAC;IACnB,YAAY,EAAE,MAAM,CAAC;CACtB,CAAC;AAEF,oBAAY,qBAAqB,GAAG;IAClC,KAAK,EAAE,MAAM,CAAC;IACd,EAAE,EAAE,MAAM,CAAC;IACX,OAAO,EAAE,MAAM,CAAC;CACjB,CAAC;AAEF,oBAAY,4BAA4B,GAAG;IACzC,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;CACxC,CAAC;AAEF,oBAAY,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAA;;AAGD,wBAAkE"}
@@ -0,0 +1,4 @@
1
+ import { TurboModuleRegistry } from 'react-native';
2
+ // The export must be here to pass codegen even if not used
3
+ export default TurboModuleRegistry.getEnforcing('RNSentry');
4
+ //# sourceMappingURL=NativeRNSentry.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"NativeRNSentry.js","sourceRoot":"","sources":["../../src/js/NativeRNSentry.ts"],"names":[],"mappings":"AACA,OAAO,EAAe,mBAAmB,EAAE,MAAM,cAAc,CAAC;AA+DhE,2DAA2D;AAC3D,eAAe,mBAAmB,CAAC,YAAY,CAAO,UAAU,CAAC,CAAC","sourcesContent":["import { Package } from '@sentry/types';\nimport { TurboModule, 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}\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\nexport type NativeDeviceContextsResponse = {\n [key: string]: Record<string, unknown>;\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,5 +1,5 @@
1
1
  import { BaseClient } from '@sentry/core';
2
- import { Event, EventHint, SeverityLevel } from '@sentry/types';
2
+ import { Envelope, Event, EventHint, SeverityLevel, UserFeedback } from '@sentry/types';
3
3
  import { ReactNativeClientOptions } from './options';
4
4
  /**
5
5
  * The Sentry React Native SDK Client.
@@ -8,7 +8,7 @@ import { ReactNativeClientOptions } from './options';
8
8
  * @see SentryClient for usage documentation.
9
9
  */
10
10
  export declare class ReactNativeClient extends BaseClient<ReactNativeClientOptions> {
11
- private readonly _browserClient;
11
+ private _outcomesBuffer;
12
12
  /**
13
13
  * Creates a new React Native SDK instance.
14
14
  * @param options Configuration options for this SDK.
@@ -17,11 +17,11 @@ export declare class ReactNativeClient extends BaseClient<ReactNativeClientOptio
17
17
  /**
18
18
  * @inheritDoc
19
19
  */
20
- eventFromException(_exception: unknown, _hint?: EventHint): PromiseLike<Event>;
20
+ eventFromException(exception: unknown, hint?: EventHint): PromiseLike<Event>;
21
21
  /**
22
22
  * @inheritDoc
23
23
  */
24
- eventFromMessage(_message: string, _level?: SeverityLevel, _hint?: EventHint): PromiseLike<Event>;
24
+ eventFromMessage(message: string, level?: SeverityLevel, hint?: EventHint): PromiseLike<Event>;
25
25
  /**
26
26
  * If native client is available it will trigger a native crash.
27
27
  * Use this only for testing purposes.
@@ -32,12 +32,24 @@ export declare class ReactNativeClient extends BaseClient<ReactNativeClientOptio
32
32
  */
33
33
  close(): PromiseLike<boolean>;
34
34
  /**
35
- * Starts native client with dsn and options
36
- */
35
+ * Sends user feedback to Sentry.
36
+ */
37
+ captureUserFeedback(feedback: UserFeedback): void;
38
+ /**
39
+ * @inheritdoc
40
+ */
41
+ protected _sendEnvelope(envelope: Envelope): void;
42
+ /**
43
+ * Starts native client with dsn and options
44
+ */
37
45
  private _initNativeSdk;
38
46
  /**
39
47
  * If the user is in development mode, and the native nagger is enabled then it will show an alert.
40
48
  */
41
49
  private _showCannotConnectDialog;
50
+ /**
51
+ * Attaches a client report from outcomes to the envelope.
52
+ */
53
+ private _attachClientReportTo;
42
54
  }
43
55
  //# sourceMappingURL=client.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.d.ts","sourceRoot":"","sources":["../../src/js/client.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAC1C,OAAO,EAAE,KAAK,EAAE,SAAS,EAAE,aAAa,EAAa,MAAM,eAAe,CAAC;AAI3E,OAAO,E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CAAC,EAAE,SAAS,GAAG,WAAW,CAAC,KAAK,CAAC;IAqBrG;;;OAGG;IACI,WAAW,IAAI,IAAI;IAI1B;;OAEG;IACI,KAAK,IAAI,WAAW,CAAC,OAAO,CAAC;IAOpC;;OAEG;IACI,mBAAmB,CAAC,QAAQ,EAAE,YAAY,GAAG,IAAI;IAYxD;;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
@@ -1,9 +1,13 @@
1
1
  import { __awaiter } from "tslib";
2
- import { BrowserClient, defaultStackParser, makeFetchTransport } from '@sentry/browser';
2
+ import { eventFromException, eventFromMessage } from '@sentry/browser';
3
3
  import { BaseClient } from '@sentry/core';
4
- // @ts-ignore LogBox introduced in RN 0.63
5
- import { Alert, LogBox, YellowBox } from 'react-native';
6
- import { NativeTransport } from './transports/native';
4
+ import { dateTimestampInSeconds, logger, SentryError } from '@sentry/utils';
5
+ import { Alert } from 'react-native';
6
+ import { Screenshot } from './integrations/screenshot';
7
+ import { defaultSdkInfo } from './integrations/sdkinfo';
8
+ import { createUserFeedbackEnvelope, items } from './utils/envelope';
9
+ import { ignoreRequireCycleLogs } from './utils/ignorerequirecyclelogs';
10
+ import { mergeOutcomes } from './utils/outcome';
7
11
  import { NATIVE } from './wrapper';
8
12
  /**
9
13
  * The Sentry React Native SDK Client.
@@ -17,43 +21,37 @@ export class ReactNativeClient extends BaseClient {
17
21
  * @param options Configuration options for this SDK.
18
22
  */
19
23
  constructor(options) {
20
- const transport = (options, nativeFetch) => {
21
- if (NATIVE.isNativeTransportAvailable()) {
22
- return new NativeTransport();
23
- }
24
- return makeFetchTransport(options, nativeFetch);
25
- };
26
- options.transport = transport;
24
+ ignoreRequireCycleLogs();
25
+ options._metadata = options._metadata || {};
26
+ options._metadata.sdk = options._metadata.sdk || defaultSdkInfo;
27
27
  super(options);
28
- // This is a workaround for now using fetch on RN, this is a known issue in react-native and only generates a warning
29
- // YellowBox deprecated and replaced with with LogBox in RN 0.63
30
- if (LogBox) {
31
- // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access
32
- LogBox.ignoreLogs(['Require cycle:']);
33
- }
34
- else {
35
- // eslint-disable-next-line deprecation/deprecation
36
- YellowBox.ignoreWarnings(['Require cycle:']);
37
- }
38
- this._browserClient = new BrowserClient({
39
- dsn: options.dsn,
40
- transport: options.transport,
41
- stackParser: options.stackParser || defaultStackParser,
42
- integrations: [],
43
- });
28
+ this._outcomesBuffer = [];
44
29
  void this._initNativeSdk();
45
30
  }
46
31
  /**
47
32
  * @inheritDoc
48
33
  */
49
- eventFromException(_exception, _hint) {
50
- return this._browserClient.eventFromException(_exception, _hint);
34
+ eventFromException(exception, hint = {}) {
35
+ return Screenshot.attachScreenshotToEventHint(hint, this._options)
36
+ .then(hintWithScreenshot => eventFromException(this._options.stackParser, exception, hintWithScreenshot, this._options.attachStacktrace));
51
37
  }
52
38
  /**
53
39
  * @inheritDoc
54
40
  */
55
- eventFromMessage(_message, _level, _hint) {
56
- return this._browserClient.eventFromMessage(_message, _level, _hint);
41
+ eventFromMessage(message, level, hint) {
42
+ return eventFromMessage(this._options.stackParser, message, level, hint, this._options.attachStacktrace).then((event) => {
43
+ var _a;
44
+ // TMP! Remove this function once JS SDK uses threads for messages
45
+ if (!((_a = event.exception) === null || _a === void 0 ? void 0 : _a.values) || event.exception.values.length <= 0) {
46
+ return event;
47
+ }
48
+ const values = event.exception.values.map((exception) => ({
49
+ stacktrace: exception.stacktrace,
50
+ }));
51
+ event.threads = { values };
52
+ delete event.exception;
53
+ return event;
54
+ });
57
55
  }
58
56
  /**
59
57
  * If native client is available it will trigger a native crash.
@@ -72,10 +70,51 @@ export class ReactNativeClient extends BaseClient {
72
70
  });
73
71
  }
74
72
  /**
75
- * Starts native client with dsn and options
76
- */
73
+ * Sends user feedback to Sentry.
74
+ */
75
+ captureUserFeedback(feedback) {
76
+ const envelope = createUserFeedbackEnvelope(feedback, {
77
+ metadata: this._options._metadata,
78
+ dsn: this.getDsn(),
79
+ tunnel: this._options.tunnel,
80
+ });
81
+ this._sendEnvelope(envelope);
82
+ }
83
+ /**
84
+ * @inheritdoc
85
+ */
86
+ _sendEnvelope(envelope) {
87
+ const outcomes = this._clearOutcomes();
88
+ this._outcomesBuffer = mergeOutcomes(this._outcomesBuffer, outcomes);
89
+ if (this._options.sendClientReports) {
90
+ this._attachClientReportTo(this._outcomesBuffer, envelope);
91
+ }
92
+ let shouldClearOutcomesBuffer = true;
93
+ if (this._transport && this._dsn) {
94
+ this._transport.send(envelope)
95
+ .then(null, reason => {
96
+ if (reason instanceof SentryError) { // SentryError is thrown by SyncPromise
97
+ shouldClearOutcomesBuffer = false;
98
+ // If this is called asynchronously we want the _outcomesBuffer to be cleared
99
+ logger.error('SentryError while sending event, keeping outcomes buffer:', reason);
100
+ }
101
+ else {
102
+ logger.error('Error while sending event:', reason);
103
+ }
104
+ });
105
+ }
106
+ else {
107
+ logger.error('Transport disabled');
108
+ }
109
+ if (shouldClearOutcomesBuffer) {
110
+ this._outcomesBuffer = []; // if send fails synchronously the _outcomesBuffer will stay intact
111
+ }
112
+ }
113
+ /**
114
+ * Starts native client with dsn and options
115
+ */
77
116
  _initNativeSdk() {
78
- var _a, _b, _c, _d;
117
+ var _a, _b;
79
118
  return __awaiter(this, void 0, void 0, function* () {
80
119
  let didCallNativeInit = false;
81
120
  try {
@@ -83,10 +122,15 @@ export class ReactNativeClient extends BaseClient {
83
122
  }
84
123
  catch (_) {
85
124
  this._showCannotConnectDialog();
86
- (_b = (_a = this._options).onReady) === null || _b === void 0 ? void 0 : _b.call(_a, { didCallNativeInit: false });
87
- return;
88
125
  }
89
- (_d = (_c = this._options).onReady) === null || _d === void 0 ? void 0 : _d.call(_c, { didCallNativeInit });
126
+ finally {
127
+ try {
128
+ (_b = (_a = this._options).onReady) === null || _b === void 0 ? void 0 : _b.call(_a, { didCallNativeInit });
129
+ }
130
+ catch (error) {
131
+ logger.error('The OnReady callback threw an error: ', error);
132
+ }
133
+ }
90
134
  });
91
135
  }
92
136
  /**
@@ -97,5 +141,20 @@ export class ReactNativeClient extends BaseClient {
97
141
  Alert.alert('Sentry', '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.');
98
142
  }
99
143
  }
144
+ /**
145
+ * Attaches a client report from outcomes to the envelope.
146
+ */
147
+ _attachClientReportTo(outcomes, envelope) {
148
+ if (outcomes.length > 0) {
149
+ const clientReportItem = [
150
+ { type: 'client_report' },
151
+ {
152
+ timestamp: dateTimestampInSeconds(),
153
+ discarded_events: outcomes,
154
+ },
155
+ ];
156
+ envelope[items].push(clientReportItem);
157
+ }
158
+ }
100
159
  }
101
160
  //# sourceMappingURL=client.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"client.js","sourceRoot":"","sources":["../../src/js/client.ts"],"names":[],"mappings":";AAAA,OAAO,EAAE,aAAa,EAAE,kBAAkB,EAAE,kBAAkB,EAAE,MAAM,iBAAiB,CAAC;AAGxF,OAAO,EAAE,UAAU,EAAE,MAAM,cAAc,CAAC;AAE1C,0CAA0C;AAC1C,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAGxD,OAAO,EAAE,eAAe,EAAE,MAAM,qBAAqB,CAAC;AACtD,OAAO,EAAE,MAAM,EAAE,MAAM,WAAW,CAAC;AAEnC;;;;;GAKG;AACH,MAAM,OAAO,iBAAkB,SAAQ,UAAoC;IAIzE;;;OAGG;IACF,YAAmB,OAAiC;QACnD,MAAM,SAAS,GAAG,CAAC,OAAgC,EAAE,WAAuB,EAAa,EAAE;YACzF,IAAI,MAAM,CAAC,0BAA0B,EAAE,EAAE;gBACvC,OAAO,IAAI,eAAe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AAE,CAAC,MAAM,CAAyB,CAAC;QAC5E,CAAC,CAAC,CAAC;IACL,CAAC;IAED;;KAEC;IACa,cAAc;;;YAC1B,IAAI,iBAAiB,GAAG,KAAK,CAAC;YAE9B,IAAI;gBACF,iBAAiB,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC/D;YAAC,OAAO,CAAC,EAAE;gBACV,IAAI,CAAC,wBAAwB,EAAE,CAAC;gBAEhC,MAAA,MAAA,IAAI,CAAC,QAAQ,EAAC,OAAO,mDAAG,EAAE,iBAAiB,EAAE,KAAK,EAAE,EAAE;gBAEtD,OAAO;aACR;YACD,MAAA,MAAA,IAAI,CAAC,QAAQ,EAAC,OAAO,mDAAG,EAAE,iBAAiB,EAAE,EAAE;;KAChD;IAED;;OAEG;IACK,wBAAwB;QAC9B,IAAI,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE;YAC/C,KAAK,CAAC,KAAK,CACT,QAAQ,EACR,qOAAqO,CACtO,CAAC;SACH;IACH,CAAC;CACF","sourcesContent":["import { BrowserClient, defaultStackParser, makeFetchTransport } from '@sentry/browser';\nimport { BrowserTransportOptions } from '@sentry/browser/types/transports/types';\nimport { FetchImpl } from '@sentry/browser/types/transports/utils';\nimport { BaseClient } from '@sentry/core';\nimport { Event, EventHint, SeverityLevel, Transport } from '@sentry/types';\n// @ts-ignore LogBox introduced in RN 0.63\nimport { Alert, LogBox, YellowBox } from 'react-native';\n\nimport { ReactNativeClientOptions } from './options';\nimport { NativeTransport } from './transports/native';\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 readonly _browserClient: BrowserClient;\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 const transport = (options: BrowserTransportOptions, nativeFetch?: FetchImpl): Transport => {\n if (NATIVE.isNativeTransportAvailable()) {\n return new NativeTransport();\n }\n return makeFetchTransport(options, nativeFetch);\n }\n\n options.transport = transport;\n super(options);\n\n // This is a workaround for now using fetch on RN, this is a known issue in react-native and only generates a warning\n // YellowBox deprecated and replaced with with LogBox in RN 0.63\n if (LogBox) {\n // eslint-disable-next-line @typescript-eslint/no-unsafe-member-access\n LogBox.ignoreLogs(['Require cycle:']);\n } else {\n // eslint-disable-next-line deprecation/deprecation\n YellowBox.ignoreWarnings(['Require cycle:']);\n }\n\n this._browserClient = new BrowserClient({\n dsn: options.dsn,\n transport: options.transport,\n stackParser: options.stackParser || defaultStackParser,\n integrations: [],\n });\n\n void this._initNativeSdk();\n }\n\n\n /**\n * @inheritDoc\n */\n public eventFromException(_exception: unknown, _hint?: EventHint): PromiseLike<Event> {\n return this._browserClient.eventFromException(_exception, _hint);\n }\n\n /**\n * @inheritDoc\n */\n public eventFromMessage(_message: string, _level?: SeverityLevel, _hint?: EventHint): PromiseLike<Event> {\n return this._browserClient.eventFromMessage(_message, _level, _hint);\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 * 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\n this._options.onReady?.({ didCallNativeInit: false });\n\n return;\n }\n this._options.onReady?.({ didCallNativeInit });\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"]}
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,UAAU,EAAE,MAAM,2BAA2B,CAAC;AACvD,OAAO,EAAE,cAAc,EAAE,MAAM,wBAAwB,CAAC;AAExD,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,CAAC;IAC7B,CAAC;IAED;;OAEG;IACI,kBAAk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M,CAAC,KAAK,CAAC,oBAAoB,CAAC,CAAC;SACpC;QAED,IAAI,yBAAyB,EAAE;YAC7B,IAAI,CAAC,eAAe,GAAG,EAAE,CAAC,CAAC,mEAAmE;SAC/F;IACH,CAAC;IAED;;OAEG;IACW,cAAc;;;YAC1B,IAAI,iBAAiB,GAAG,KAAK,CAAC;YAE9B,IAAI;gBACF,iBAAiB,GAAG,MAAM,MAAM,CAAC,aAAa,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC;aAC/D;YAAC,OAAO,CAAC,EAAE;gBACV,IAAI,CAAC,wBAAwB,EAAE,CAAC;aACjC;oBAAS;gBACR,IAAI;oBACF,MAAA,MAAA,IAAI,CAAC,QAAQ,EAAC,OAAO,mDAAG,EAAE,iBAAiB,EAAE,EAAE;iBAChD;gBAAC,OAAO,KAAK,EAAE;oBACd,MAAM,CAAC,KAAK,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAAC;iBAC9D;aACF;;KACF;IAED;;OAEG;IACK,wBAAwB;QAC9B,IAAI,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE;YAC/C,KAAK,CAAC,KAAK,CACT,QAAQ,EACR,qOAAqO,CACtO,CAAC;SACH;IACH,CAAC;IAED;;OAEG;IACK,qBAAqB,CAAC,QAAmB,EAAE,QAA8B;QAC/E,IAAI,QAAQ,CAAC,MAAM,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 {\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 { Screenshot } from './integrations/screenshot';\nimport { defaultSdkInfo } from './integrations/sdkinfo';\nimport { ReactNativeClientOptions } from './options';\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 * @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,12 +1,13 @@
1
- export { Breadcrumb, Request, SdkInfo, Event, Exception, StackFrame, Stacktrace, Thread, User, } from '@sentry/types';
2
- export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withScope, } from '@sentry/core';
1
+ export { Breadcrumb, Request, SdkInfo, Event, Exception, StackFrame, Stacktrace, Thread, User, UserFeedback, } from '@sentry/types';
2
+ export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, } from '@sentry/core';
3
3
  import '@sentry/tracing';
4
4
  export { Integrations as BrowserIntegrations, ErrorBoundary, withErrorBoundary, createReduxEnhancer, Profiler, useProfiler, withProfiler, } from '@sentry/react';
5
+ export { lastEventId, } from '@sentry/browser';
5
6
  import * as Integrations from './integrations';
6
7
  import { SDK_NAME, SDK_VERSION } from './version';
7
8
  export { ReactNativeOptions } from './options';
8
9
  export { ReactNativeClient } from './client';
9
- export { init, wrap, setDist, setRelease, nativeCrash, flush, close, } from './sdk';
10
+ export { init, wrap, setDist, setRelease, nativeCrash, flush, close, captureUserFeedback, withScope, configureScope, } from './sdk';
10
11
  export { TouchEventBoundary, withTouchEventBoundary } from './touchevents';
11
12
  export { ReactNativeTracing, ReactNavigationV4Instrumentation, ReactNavigationV5Instrumentation, ReactNavigationInstrumentation, ReactNativeNavigationInstrumentation, RoutingInstrumentation, ReactNavigationTransactionContext, } from './tracing';
12
13
  export { Integrations, SDK_NAME, SDK_VERSION };
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/js/index.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,UAAU,EACV,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,UAAU,EACV,UAAU,EACV,MAAM,EACN,IAAI,GACL,MAAM,eAAe,CAAC;AAEvB,OAAO,EACL,uBAAuB,EACvB,aAAa,EACb,gBAAgB,EAChB,YAAY,EACZ,cAAc,EACd,cAAc,EACd,iBAAiB,EACjB,aAAa,EACb,GAAG,EACH,KAAK,EACL,UAAU,EACV,QAAQ,EACR,SAAS,EACT,MAAM,EACN,OAAO,EACP,OAAO,EACP,gBAAgB,EAChB,SAAS,GACV,MAAM,cAAc,CAAC;AAItB,OAAO,iBAAiB,CAAC;AAMzB,OAAO,EACL,YAAY,IAAI,mBAAmB,EACnC,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,QAAQ,EACR,WAAW,EACX,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,OAAO,KAAK,YAAY,MAAM,gBAAgB,CAAC;AAC/C,OAAO,EAAE,QAAQ,EAAE,WAAW,EAAE,MAAM,WAAW,CAAC;AAClD,OAAO,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAC/C,OAAO,EAAE,iBAAiB,EAAE,MAAM,UAAU,CAAC;AAE7C,OAAO,EACL,IAAI,EACJ,IAAI,EAEJ,OAAO,EAEP,UAAU,EACV,WAAW,EACX,KAAK,EACL,KAAK,GACN,MAAM,OAAO,CAAC;AACf,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,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AACf,OAAO,EAAE,kBAAkB,EAAE,sBAAsB,EAAE,MAAM,eAAe,CAAC;AAE3E,OAAO,EACL,kBAAkB,EAClB,gCAAgC,EAEhC,gCAAgC,EAChC,8BAA8B,EAC9B,oCAAoC,EACpC,sBAAsB,EACtB,iCAAiC,GAClC,MAAM,WAAW,CAAC;AAEnB,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC"}
package/dist/js/index.js CHANGED
@@ -1,4 +1,4 @@
1
- export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, configureScope, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, withScope, } from '@sentry/core';
1
+ export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent, captureMessage, getHubFromCarrier, getCurrentHub, Hub, Scope, setContext, setExtra, setExtras, setTag, setTags, setUser, startTransaction, } from '@sentry/core';
2
2
  // We need to import it so we patch the hub with global functions
3
3
  // aka. this has side effects
4
4
  import '@sentry/tracing';
@@ -6,6 +6,7 @@ import '@sentry/tracing';
6
6
  import { _addTracingExtensions } from './measurements';
7
7
  _addTracingExtensions();
8
8
  export { Integrations as BrowserIntegrations, ErrorBoundary, withErrorBoundary, createReduxEnhancer, Profiler, useProfiler, withProfiler, } from '@sentry/react';
9
+ export { lastEventId, } from '@sentry/browser';
9
10
  import * as Integrations from './integrations';
10
11
  import { SDK_NAME, SDK_VERSION } from './version';
11
12
  export { ReactNativeClient } from './client';
@@ -13,7 +14,7 @@ export { init, wrap,
13
14
  // eslint-disable-next-line deprecation/deprecation
14
15
  setDist,
15
16
  // eslint-disable-next-line deprecation/deprecation
16
- setRelease, nativeCrash, flush, close, } from './sdk';
17
+ setRelease, nativeCrash, flush, close, captureUserFeedback, withScope, configureScope, } from './sdk';
17
18
  export { TouchEventBoundary, withTouchEventBoundary } from './touchevents';
18
19
  export { ReactNativeTracing, ReactNavigationV4Instrumentation,
19
20
  // eslint-disable-next-line deprecation/deprecation