@sentry/react-native 5.23.0-alpha.1 → 5.23.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +50 -48
- package/RNSentry.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +1 -54
- package/android/src/newarch/java/io/sentry/react/RNSentryModule.java +0 -10
- package/android/src/oldarch/java/io/sentry/react/RNSentryModule.java +0 -10
- package/dist/js/NativeRNSentry.d.ts +0 -2
- package/dist/js/NativeRNSentry.d.ts.map +1 -1
- package/dist/js/NativeRNSentry.js.map +1 -1
- package/dist/js/client.d.ts +0 -8
- package/dist/js/client.d.ts.map +1 -1
- package/dist/js/client.js +3 -19
- package/dist/js/client.js.map +1 -1
- package/dist/js/index.d.ts +5 -3
- package/dist/js/index.d.ts.map +1 -1
- package/dist/js/index.js +5 -3
- package/dist/js/index.js.map +1 -1
- package/dist/js/integrations/debugsymbolicator.d.ts +8 -60
- package/dist/js/integrations/debugsymbolicator.d.ts.map +1 -1
- package/dist/js/integrations/debugsymbolicator.js +137 -209
- package/dist/js/integrations/debugsymbolicator.js.map +1 -1
- package/dist/js/integrations/debugsymbolicatorutils.d.ts +18 -0
- package/dist/js/integrations/debugsymbolicatorutils.d.ts.map +1 -0
- package/dist/js/integrations/debugsymbolicatorutils.js +70 -0
- package/dist/js/integrations/debugsymbolicatorutils.js.map +1 -0
- package/dist/js/integrations/default.d.ts.map +1 -1
- package/dist/js/integrations/default.js +24 -49
- package/dist/js/integrations/default.js.map +1 -1
- package/dist/js/integrations/devicecontext.d.ts +8 -15
- package/dist/js/integrations/devicecontext.d.ts.map +1 -1
- package/dist/js/integrations/devicecontext.js +74 -74
- package/dist/js/integrations/devicecontext.js.map +1 -1
- package/dist/js/integrations/eventorigin.d.ts +8 -15
- package/dist/js/integrations/eventorigin.d.ts.map +1 -1
- package/dist/js/integrations/eventorigin.js +17 -17
- package/dist/js/integrations/eventorigin.js.map +1 -1
- package/dist/js/integrations/expocontext.d.ts +8 -15
- package/dist/js/integrations/expocontext.d.ts.map +1 -1
- package/dist/js/integrations/expocontext.js +28 -32
- package/dist/js/integrations/expocontext.js.map +1 -1
- package/dist/js/integrations/exports.d.ts +16 -0
- package/dist/js/integrations/exports.d.ts.map +1 -0
- package/dist/js/integrations/exports.js +16 -0
- package/dist/js/integrations/exports.js.map +1 -0
- package/dist/js/integrations/index.d.ts +4 -1
- package/dist/js/integrations/index.d.ts.map +1 -1
- package/dist/js/integrations/index.js +5 -1
- package/dist/js/integrations/index.js.map +1 -1
- package/dist/js/integrations/modulesloader.d.ts +8 -15
- package/dist/js/integrations/modulesloader.d.ts.map +1 -1
- package/dist/js/integrations/modulesloader.js +34 -31
- package/dist/js/integrations/modulesloader.js.map +1 -1
- package/dist/js/integrations/nativelinkederrors.d.ts +8 -51
- package/dist/js/integrations/nativelinkederrors.d.ts.map +1 -1
- package/dist/js/integrations/nativelinkederrors.js +112 -124
- package/dist/js/integrations/nativelinkederrors.js.map +1 -1
- package/dist/js/integrations/reactnativeerrorhandlers.d.ts +8 -54
- package/dist/js/integrations/reactnativeerrorhandlers.d.ts.map +1 -1
- package/dist/js/integrations/reactnativeerrorhandlers.js +109 -199
- package/dist/js/integrations/reactnativeerrorhandlers.js.map +1 -1
- package/dist/js/integrations/reactnativeerrorhandlersutils.d.ts +27 -0
- package/dist/js/integrations/reactnativeerrorhandlersutils.d.ts.map +1 -0
- package/dist/js/integrations/reactnativeerrorhandlersutils.js +77 -0
- package/dist/js/integrations/reactnativeerrorhandlersutils.js.map +1 -0
- package/dist/js/integrations/reactnativeinfo.d.ts +8 -15
- package/dist/js/integrations/reactnativeinfo.d.ts.map +1 -1
- package/dist/js/integrations/reactnativeinfo.js +51 -51
- package/dist/js/integrations/reactnativeinfo.js.map +1 -1
- package/dist/js/integrations/release.d.ts +8 -15
- package/dist/js/integrations/release.d.ts.map +1 -1
- package/dist/js/integrations/release.js +55 -57
- package/dist/js/integrations/release.js.map +1 -1
- package/dist/js/integrations/rewriteframes.js +2 -2
- package/dist/js/integrations/rewriteframes.js.map +1 -1
- package/dist/js/integrations/screenshot.d.ts +8 -23
- package/dist/js/integrations/screenshot.d.ts.map +1 -1
- package/dist/js/integrations/screenshot.js +31 -47
- package/dist/js/integrations/screenshot.js.map +1 -1
- package/dist/js/integrations/sdkinfo.d.ts +8 -16
- package/dist/js/integrations/sdkinfo.d.ts.map +1 -1
- package/dist/js/integrations/sdkinfo.js +54 -41
- package/dist/js/integrations/sdkinfo.js.map +1 -1
- package/dist/js/integrations/spotlight.d.ts +10 -2
- package/dist/js/integrations/spotlight.d.ts.map +1 -1
- package/dist/js/integrations/spotlight.js +14 -9
- package/dist/js/integrations/spotlight.js.map +1 -1
- package/dist/js/integrations/viewhierarchy.d.ts +8 -18
- package/dist/js/integrations/viewhierarchy.d.ts.map +1 -1
- package/dist/js/integrations/viewhierarchy.js +46 -43
- package/dist/js/integrations/viewhierarchy.js.map +1 -1
- package/dist/js/options.d.ts +2 -24
- package/dist/js/options.d.ts.map +1 -1
- package/dist/js/options.js.map +1 -1
- package/dist/js/profiling/integration.d.ts +8 -32
- package/dist/js/profiling/integration.d.ts.map +1 -1
- package/dist/js/profiling/integration.js +120 -119
- package/dist/js/profiling/integration.js.map +1 -1
- package/dist/js/tracing/nativeframes.d.ts +0 -4
- package/dist/js/tracing/nativeframes.d.ts.map +1 -1
- package/dist/js/tracing/nativeframes.js +14 -14
- package/dist/js/tracing/nativeframes.js.map +1 -1
- package/dist/js/utils/environment.d.ts +0 -4
- package/dist/js/utils/environment.d.ts.map +1 -1
- package/dist/js/utils/environment.js +0 -8
- package/dist/js/utils/environment.js.map +1 -1
- package/dist/js/version.d.ts +1 -1
- package/dist/js/version.d.ts.map +1 -1
- package/dist/js/version.js +1 -1
- package/dist/js/version.js.map +1 -1
- package/dist/js/wrapper.d.ts +1 -7
- package/dist/js/wrapper.d.ts.map +1 -1
- package/dist/js/wrapper.js +0 -24
- package/dist/js/wrapper.js.map +1 -1
- package/ios/RNSentry.mm +1 -47
- package/ios/RNSentryOnDrawReporter.h +23 -0
- package/ios/RNSentryOnDrawReporter.m +2 -17
- package/package.json +1 -9
- package/src/js/NativeRNSentry.ts +0 -2
- package/ts3.8/dist/js/NativeRNSentry.d.ts +0 -2
- package/ts3.8/dist/js/client.d.ts +0 -8
- package/ts3.8/dist/js/index.d.ts +5 -3
- package/ts3.8/dist/js/integrations/debugsymbolicator.d.ts +8 -60
- package/ts3.8/dist/js/integrations/debugsymbolicatorutils.d.ts +18 -0
- package/ts3.8/dist/js/integrations/devicecontext.d.ts +8 -15
- package/ts3.8/dist/js/integrations/eventorigin.d.ts +8 -15
- package/ts3.8/dist/js/integrations/expocontext.d.ts +8 -15
- package/ts3.8/dist/js/integrations/exports.d.ts +16 -0
- package/ts3.8/dist/js/integrations/index.d.ts +4 -1
- package/ts3.8/dist/js/integrations/modulesloader.d.ts +8 -15
- package/ts3.8/dist/js/integrations/nativelinkederrors.d.ts +8 -51
- package/ts3.8/dist/js/integrations/reactnativeerrorhandlers.d.ts +8 -54
- package/ts3.8/dist/js/integrations/reactnativeerrorhandlersutils.d.ts +27 -0
- package/ts3.8/dist/js/integrations/reactnativeinfo.d.ts +8 -15
- package/ts3.8/dist/js/integrations/release.d.ts +8 -15
- package/ts3.8/dist/js/integrations/screenshot.d.ts +8 -23
- package/ts3.8/dist/js/integrations/sdkinfo.d.ts +8 -16
- package/ts3.8/dist/js/integrations/spotlight.d.ts +10 -2
- package/ts3.8/dist/js/integrations/viewhierarchy.d.ts +8 -18
- package/ts3.8/dist/js/options.d.ts +2 -24
- package/ts3.8/dist/js/profiling/integration.d.ts +8 -32
- package/ts3.8/dist/js/tracing/nativeframes.d.ts +0 -4
- package/ts3.8/dist/js/utils/environment.d.ts +0 -4
- package/ts3.8/dist/js/version.d.ts +1 -1
- package/ts3.8/dist/js/wrapper.d.ts +1 -7
- package/dist/js/integrations/mobilereplay.d.ts +0 -36
- package/dist/js/integrations/mobilereplay.d.ts.map +0 -1
- package/dist/js/integrations/mobilereplay.js +0 -97
- package/dist/js/integrations/mobilereplay.js.map +0 -1
- package/dist/js/utils/clientutils.d.ts +0 -8
- package/dist/js/utils/clientutils.d.ts.map +0 -1
- package/dist/js/utils/clientutils.js +0 -7
- package/dist/js/utils/clientutils.js.map +0 -1
- package/ts3.8/dist/js/integrations/mobilereplay.d.ts +0 -36
- package/ts3.8/dist/js/utils/clientutils.d.ts +0 -8
package/CHANGELOG.md
CHANGED
|
@@ -1,21 +1,64 @@
|
|
|
1
1
|
# Changelog
|
|
2
2
|
|
|
3
|
-
## 5.23.0
|
|
3
|
+
## 5.23.0
|
|
4
4
|
|
|
5
|
-
###
|
|
5
|
+
### Features
|
|
6
6
|
|
|
7
|
-
-
|
|
7
|
+
- Functional integrations ([#3814](https://github.com/getsentry/sentry-react-native/pull/3814))
|
|
8
8
|
|
|
9
|
-
|
|
9
|
+
Instead of installing `@sentry/integrations` and creating integrations using the `new` keyword, you can use direct imports of the functional integrations.
|
|
10
|
+
|
|
11
|
+
```js
|
|
12
|
+
// Before
|
|
13
|
+
import * as Sentry from '@sentry/react-native';
|
|
14
|
+
import { HttpClient } from '@sentry/integrations';
|
|
15
|
+
|
|
16
|
+
Sentry.init({
|
|
17
|
+
integrations: [
|
|
18
|
+
new Sentry.BrowserIntegrations.Dedupe(),
|
|
19
|
+
new Sentry.Integration.Screenshot(),
|
|
20
|
+
new HttpClient(),
|
|
21
|
+
],
|
|
22
|
+
});
|
|
23
|
+
|
|
24
|
+
// After
|
|
25
|
+
import * as Sentry from '@sentry/react-native';
|
|
26
|
+
|
|
27
|
+
Sentry.init({
|
|
28
|
+
integrations: [
|
|
29
|
+
Sentry.dedupeIntegration(),
|
|
30
|
+
Sentry.screenshotIntegration(),
|
|
31
|
+
Sentry.httpClientIntegration(),
|
|
32
|
+
],
|
|
33
|
+
});
|
|
34
|
+
```
|
|
35
|
+
|
|
36
|
+
Note that the `Sentry.BrowserIntegrations`, `Sentry.Integration` and the Class style integrations will be removed in the next major version of the SDK.
|
|
37
|
+
|
|
38
|
+
### Fixes
|
|
39
|
+
|
|
40
|
+
- Remove unused `rnpm` config ([#3811](https://github.com/getsentry/sentry-react-native/pull/3811))
|
|
10
41
|
|
|
11
42
|
### Dependencies
|
|
12
43
|
|
|
13
44
|
- Bump CLI from v2.30.4 to v2.31.2 ([#3719](https://github.com/getsentry/sentry-react-native/pull/3719))
|
|
14
45
|
- [changelog](https://github.com/getsentry/sentry-cli/blob/master/CHANGELOG.md#2312)
|
|
15
46
|
- [diff](https://github.com/getsentry/sentry-cli/compare/2.30.4...2.31.2)
|
|
16
|
-
- Bump Cocoa SDK from v8.
|
|
17
|
-
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#
|
|
18
|
-
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.
|
|
47
|
+
- Bump Cocoa SDK from v8.26.0 to v8.27.0 ([#3858](https://github.com/getsentry/sentry-react-native/pull/3858))
|
|
48
|
+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8270)
|
|
49
|
+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.26.0...8.27.0)
|
|
50
|
+
|
|
51
|
+
## 5.22.3
|
|
52
|
+
|
|
53
|
+
### Fixes
|
|
54
|
+
|
|
55
|
+
- Missing `RNSentryOnDrawReporterView` on iOS ([#3832](https://github.com/getsentry/sentry-react-native/pull/3832))
|
|
56
|
+
|
|
57
|
+
### Dependencies
|
|
58
|
+
|
|
59
|
+
- Bump Cocoa SDK from v8.25.0 to v8.26.0 ([#3802](https://github.com/getsentry/sentry-react-native/pull/3802), [#3815](https://github.com/getsentry/sentry-react-native/pull/3815))
|
|
60
|
+
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8260)
|
|
61
|
+
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.25.0...8.26.0)
|
|
19
62
|
|
|
20
63
|
## 5.22.2
|
|
21
64
|
|
|
@@ -38,47 +81,6 @@ Access to Mobile Replay is limited to early access orgs on Sentry. If you're int
|
|
|
38
81
|
- [changelog](https://github.com/getsentry/sentry-cocoa/blob/main/CHANGELOG.md#8250)
|
|
39
82
|
- [diff](https://github.com/getsentry/sentry-cocoa/compare/8.24.0...8.25.0)
|
|
40
83
|
|
|
41
|
-
## 5.23.0-alpha.0
|
|
42
|
-
|
|
43
|
-
### Features
|
|
44
|
-
|
|
45
|
-
- Mobile Session Replay Alpha ([#3714](https://github.com/getsentry/sentry-react-native/pull/3714))
|
|
46
|
-
|
|
47
|
-
To enable Replay for React Native on mobile and web add the following options.
|
|
48
|
-
|
|
49
|
-
```js
|
|
50
|
-
Sentry.init({
|
|
51
|
-
_experiments: {
|
|
52
|
-
replaysSessionSampleRate: 1.0,
|
|
53
|
-
replaysOnErrorSampleRate: 1.0,
|
|
54
|
-
},
|
|
55
|
-
});
|
|
56
|
-
```
|
|
57
|
-
|
|
58
|
-
To change the default Mobile Replay options add the `mobileReplayIntegration`.
|
|
59
|
-
|
|
60
|
-
```js
|
|
61
|
-
Sentry.init({
|
|
62
|
-
_experiments: {
|
|
63
|
-
replaysSessionSampleRate: 1.0,
|
|
64
|
-
replaysOnErrorSampleRate: 1.0,
|
|
65
|
-
},
|
|
66
|
-
integration: [
|
|
67
|
-
Sentry.mobileReplayIntegration({
|
|
68
|
-
maskAllText: true,
|
|
69
|
-
maskAllImages: true,
|
|
70
|
-
}),
|
|
71
|
-
],
|
|
72
|
-
});
|
|
73
|
-
```
|
|
74
|
-
|
|
75
|
-
Access is limited to early access orgs on Sentry. If you're interested, [sign up for the waitlist](https://sentry.io/lp/mobile-replay-beta/)
|
|
76
|
-
|
|
77
|
-
### Dependencies
|
|
78
|
-
|
|
79
|
-
- Bump Cocoa SDK to [8.25.0-alpha.0](https://github.com/getsentry/sentry-cocoa/releases/tag/8.25.0-alpha.0)
|
|
80
|
-
- Bump Android SDK to [7.9.0-alpha.1](https://github.com/getsentry/sentry-java/releases/tag/7.9.0-alpha.1)
|
|
81
|
-
|
|
82
84
|
## 5.22.0
|
|
83
85
|
|
|
84
86
|
### Features
|
package/RNSentry.podspec
CHANGED
|
@@ -33,7 +33,7 @@ Pod::Spec.new do |s|
|
|
|
33
33
|
s.preserve_paths = '*.js'
|
|
34
34
|
|
|
35
35
|
s.dependency 'React-Core'
|
|
36
|
-
s.dependency 'Sentry/HybridSDK', '8.
|
|
36
|
+
s.dependency 'Sentry/HybridSDK', '8.27.0'
|
|
37
37
|
|
|
38
38
|
s.source_files = 'ios/**/*.{h,m,mm}'
|
|
39
39
|
s.public_header_files = 'ios/RNSentry.h'
|
package/android/build.gradle
CHANGED
|
@@ -61,7 +61,6 @@ import io.sentry.SentryEvent;
|
|
|
61
61
|
import io.sentry.SentryExecutorService;
|
|
62
62
|
import io.sentry.SentryLevel;
|
|
63
63
|
import io.sentry.SentryOptions;
|
|
64
|
-
import io.sentry.SentryReplayOptions;
|
|
65
64
|
import io.sentry.UncaughtExceptionHandlerIntegration;
|
|
66
65
|
import io.sentry.android.core.AndroidLogger;
|
|
67
66
|
import io.sentry.android.core.AndroidProfiler;
|
|
@@ -80,7 +79,6 @@ import io.sentry.android.core.internal.util.SentryFrameMetricsCollector;
|
|
|
80
79
|
import io.sentry.android.core.performance.AppStartMetrics;
|
|
81
80
|
import io.sentry.protocol.SdkVersion;
|
|
82
81
|
import io.sentry.protocol.SentryException;
|
|
83
|
-
import io.sentry.protocol.SentryId;
|
|
84
82
|
import io.sentry.protocol.SentryPackage;
|
|
85
83
|
import io.sentry.protocol.User;
|
|
86
84
|
import io.sentry.protocol.ViewHierarchy;
|
|
@@ -254,9 +252,7 @@ public class RNSentryModuleImpl {
|
|
|
254
252
|
if (rnOptions.hasKey("enableNdk")) {
|
|
255
253
|
options.setEnableNdk(rnOptions.getBoolean("enableNdk"));
|
|
256
254
|
}
|
|
257
|
-
|
|
258
|
-
options.getExperimental().setSessionReplay(getReplayOptions(rnOptions));
|
|
259
|
-
}
|
|
255
|
+
|
|
260
256
|
options.setBeforeSend((event, hint) -> {
|
|
261
257
|
// React native internally throws a JavascriptException
|
|
262
258
|
// Since we catch it before that, we don't want to send this one
|
|
@@ -297,37 +293,6 @@ public class RNSentryModuleImpl {
|
|
|
297
293
|
promise.resolve(true);
|
|
298
294
|
}
|
|
299
295
|
|
|
300
|
-
private SentryReplayOptions getReplayOptions(@NotNull ReadableMap rnOptions) {
|
|
301
|
-
@NotNull final SentryReplayOptions androidReplayOptions = new SentryReplayOptions();
|
|
302
|
-
|
|
303
|
-
@Nullable final ReadableMap rnExperimentsOptions = rnOptions.getMap("_experiments");
|
|
304
|
-
if (rnExperimentsOptions == null) {
|
|
305
|
-
return androidReplayOptions;
|
|
306
|
-
}
|
|
307
|
-
|
|
308
|
-
if (!(rnExperimentsOptions.hasKey("replaysSessionSampleRate") || rnExperimentsOptions.hasKey("replaysOnErrorSampleRate"))) {
|
|
309
|
-
return androidReplayOptions;
|
|
310
|
-
}
|
|
311
|
-
|
|
312
|
-
androidReplayOptions.setSessionSampleRate(rnExperimentsOptions.hasKey("replaysSessionSampleRate")
|
|
313
|
-
? rnExperimentsOptions.getDouble("replaysSessionSampleRate") : null);
|
|
314
|
-
androidReplayOptions.setErrorSampleRate(rnExperimentsOptions.hasKey("replaysOnErrorSampleRate")
|
|
315
|
-
? rnExperimentsOptions.getDouble("replaysOnErrorSampleRate") : null);
|
|
316
|
-
|
|
317
|
-
if (!rnOptions.hasKey("mobileReplayOptions")) {
|
|
318
|
-
return androidReplayOptions;
|
|
319
|
-
}
|
|
320
|
-
@Nullable final ReadableMap rnMobileReplayOptions = rnOptions.getMap("mobileReplayOptions");
|
|
321
|
-
if (rnMobileReplayOptions == null) {
|
|
322
|
-
return androidReplayOptions;
|
|
323
|
-
}
|
|
324
|
-
|
|
325
|
-
androidReplayOptions.setRedactAllText(!rnMobileReplayOptions.hasKey("maskAllText") || rnMobileReplayOptions.getBoolean("maskAllText"));
|
|
326
|
-
androidReplayOptions.setRedactAllImages(!rnMobileReplayOptions.hasKey("maskAllImages") || rnMobileReplayOptions.getBoolean("maskAllImages"));
|
|
327
|
-
|
|
328
|
-
return androidReplayOptions;
|
|
329
|
-
}
|
|
330
|
-
|
|
331
296
|
public void crash() {
|
|
332
297
|
throw new RuntimeException("TEST - Sentry Client Crash (only works in release mode)");
|
|
333
298
|
}
|
|
@@ -445,24 +410,6 @@ public class RNSentryModuleImpl {
|
|
|
445
410
|
}
|
|
446
411
|
}
|
|
447
412
|
|
|
448
|
-
public void startReplay(boolean isHardCrash, Promise promise) {
|
|
449
|
-
Sentry.getCurrentHub().getOptions().getReplayController().sendReplay(isHardCrash, null, null);
|
|
450
|
-
promise.resolve(getCurrentReplayId());
|
|
451
|
-
}
|
|
452
|
-
|
|
453
|
-
public @Nullable String getCurrentReplayId() {
|
|
454
|
-
final @Nullable IScope scope = InternalSentrySdk.getCurrentScope();
|
|
455
|
-
if (scope == null) {
|
|
456
|
-
return null;
|
|
457
|
-
}
|
|
458
|
-
|
|
459
|
-
final @NotNull SentryId id = scope.getReplayId();
|
|
460
|
-
if (id == SentryId.EMPTY_ID) {
|
|
461
|
-
return null;
|
|
462
|
-
}
|
|
463
|
-
return id.toString();
|
|
464
|
-
}
|
|
465
|
-
|
|
466
413
|
public void captureEnvelope(String rawBytes, ReadableMap options, Promise promise) {
|
|
467
414
|
byte[] bytes = Base64.decode(rawBytes, Base64.DEFAULT);
|
|
468
415
|
|
|
@@ -158,14 +158,4 @@ public class RNSentryModule extends NativeRNSentrySpec {
|
|
|
158
158
|
// Not used on Android
|
|
159
159
|
return null;
|
|
160
160
|
}
|
|
161
|
-
|
|
162
|
-
@Override
|
|
163
|
-
public void startReplay(boolean isHardCrash, Promise promise) {
|
|
164
|
-
this.impl.startReplay(isHardCrash, promise);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
@Override
|
|
168
|
-
public String getCurrentReplayId() {
|
|
169
|
-
return this.impl.getCurrentReplayId();
|
|
170
|
-
}
|
|
171
161
|
}
|
|
@@ -158,14 +158,4 @@ public class RNSentryModule extends ReactContextBaseJavaModule {
|
|
|
158
158
|
// Not used on Android
|
|
159
159
|
return null;
|
|
160
160
|
}
|
|
161
|
-
|
|
162
|
-
@ReactMethod
|
|
163
|
-
public void startReplay(boolean isHardCrash, Promise promise) {
|
|
164
|
-
this.impl.startReplay(isHardCrash, promise);
|
|
165
|
-
}
|
|
166
|
-
|
|
167
|
-
@ReactMethod(isBlockingSynchronousMethod = true)
|
|
168
|
-
public String getCurrentReplayId() {
|
|
169
|
-
return this.impl.getCurrentReplayId();
|
|
170
|
-
}
|
|
171
161
|
}
|
|
@@ -39,8 +39,6 @@ export interface Spec extends TurboModule {
|
|
|
39
39
|
fetchNativePackageName(): string | undefined | null;
|
|
40
40
|
fetchNativeStackFramesBy(instructionsAddr: number[]): NativeStackFrames | undefined | null;
|
|
41
41
|
initNativeReactNavigationNewFrameTracking(): Promise<void>;
|
|
42
|
-
startReplay(isHardCrash: boolean): Promise<string | undefined | null>;
|
|
43
|
-
getCurrentReplayId(): string | undefined | null;
|
|
44
42
|
}
|
|
45
43
|
export type NativeStackFrame = {
|
|
46
44
|
platform: string;
|
|
@@ -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,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,8BAA8B,CAAC;AAIjE,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,WAAW,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK,IAAI,CAAC;IACzC,eAAe,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAC;IACtC,aAAa,CAAC,UAAU,EAAE,YAAY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AAM,CAAC;QACjB,IAAI,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;KAChC,EAAE,CAAC;CACL,CAAC;AAEF,MAAM,MAAM,gBAAgB,GAAG;IAC7B,IAAI,EAAE,MAAM,EAAE,CAAC;IACf,WAAW,EAAE,MAAM,CAAC;IACpB,QAAQ,EAAE,MAAM,CAAC;CAClB,CAAC;;AAGF,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;
|
|
1
|
+
{"version":3,"file":"NativeRNSentry.js","sourceRoot":"","sources":["../../src/js/NativeRNSentry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AAiJnD,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';\n\nimport type { UnsafeObject } from './utils/rnlibrariesinterface';\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 addListener: (eventType: string) => void;\n removeListeners: (id: number) => void;\n addBreadcrumb(breadcrumb: UnsafeObject): void;\n captureEnvelope(\n bytes: string,\n options: {\n store: boolean;\n },\n ): Promise<boolean>;\n captureScreenshot(): Promise<NativeScreenshot[] | undefined | null>;\n clearBreadcrumbs(): void;\n crash(): void;\n closeNativeSdk(): Promise<void>;\n disableNativeFramesTracking(): void;\n fetchNativeRelease(): Promise<NativeReleaseResponse>;\n fetchNativeSdkInfo(): Promise<Package | null>;\n fetchNativeDeviceContexts(): Promise<NativeDeviceContextsResponse | null>;\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 startProfiling(): { started?: boolean; error?: string };\n stopProfiling(): {\n profile?: string;\n nativeProfile?: UnsafeObject;\n androidProfile?: UnsafeObject;\n error?: string;\n };\n fetchNativePackageName(): string | undefined | null;\n fetchNativeStackFramesBy(instructionsAddr: number[]): NativeStackFrames | undefined | null;\n initNativeReactNavigationNewFrameTracking(): Promise<void>;\n}\n\nexport type NativeStackFrame = {\n platform: string;\n /**\n * The instruction address of this frame.\n * Formatted as hex with 0x prefix.\n */\n instruction_addr: string;\n package?: string;\n /**\n * The debug image address of this frame.\n * Formatted as hex with 0x prefix.\n */\n image_addr?: string;\n in_app?: boolean;\n /**\n * The symbol name of this frame.\n * If symbolicated locally.\n */\n function?: string;\n /**\n * The symbol address of this frame.\n * If symbolicated locally.\n * Formatted as hex with 0x prefix.\n */\n symbol_addr?: string;\n};\n\nexport type NativeDebugImage = {\n name?: string;\n type?: string;\n uuid?: string;\n debug_id?: string;\n image_addr?: string;\n image_size?: number;\n code_file?: string;\n image_vmaddr?: string;\n};\n\nexport type NativeStackFrames = {\n frames: NativeStackFrame[];\n debugMetaImages?: NativeDebugImage[];\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 and sentry-android\n * https://github.com/getsentry/sentry-cocoa/blob/master/Sources/Sentry/SentryScope.m\n * https://github.com/getsentry/sentry-java/blob/a461f7e125b65240004e6162b341f383ce2e1394/sentry-android-core/src/main/java/io/sentry/android/core/InternalSentrySdk.java#L32\n */\nexport type NativeDeviceContextsResponse = {\n [key: string]: unknown;\n tags?: Record<string, string>;\n extra?: Record<string, unknown>;\n contexts?: 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"]}
|
package/dist/js/client.d.ts
CHANGED
|
@@ -39,14 +39,6 @@ export declare class ReactNativeClient extends BaseClient<ReactNativeClientOptio
|
|
|
39
39
|
* Sets up the integrations
|
|
40
40
|
*/
|
|
41
41
|
setupIntegrations(): void;
|
|
42
|
-
/**
|
|
43
|
-
* @inheritDoc
|
|
44
|
-
*/
|
|
45
|
-
init(): void;
|
|
46
|
-
/**
|
|
47
|
-
* @inheritdoc
|
|
48
|
-
*/
|
|
49
|
-
protected _setupIntegrations(): void;
|
|
50
42
|
/**
|
|
51
43
|
* @inheritdoc
|
|
52
44
|
*/
|
package/dist/js/client.d.ts.map
CHANGED
|
@@ -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;
|
|
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;AAMvB,OAAO,KAAK,EAAE,wBAAwB,EAAE,MAAM,WAAW,CAAC;AAO1D;;;;;GAKG;AACH,qBAAa,iBAAkB,SAAQ,UAAU,CAAC,wBAAwB,CAAC;IACzE,OAAO,CAAC,eAAe,CAAY;IAEnC;;;OAGG;gBACgB,OAAO,EAAE,wBAAwB;IAUpD;;OAEG;IACI,kBAAkB,CAAC,SAAS,EAAE,OAAO,EAAE,IAAI,GAAE,SAAc,GAAG,WAAW,CAAC,KAAK,CAAC;IAIvF;;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;IAahC;;OAEG;IACH,SAAS,CAAC,aAAa,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI;IA+BjD;;OAEG;IACH,OAAO,CAAC,cAAc;IAmBtB;;OAEG;IACH,OAAO,CAAC,wBAAwB;IAShC;;OAEG;IACH,OAAO,CAAC,qBAAqB;CAa9B"}
|
package/dist/js/client.js
CHANGED
|
@@ -3,7 +3,6 @@ import { BaseClient } from '@sentry/core';
|
|
|
3
3
|
import { dateTimestampInSeconds, logger, SentryError } from '@sentry/utils';
|
|
4
4
|
import { Alert } from 'react-native';
|
|
5
5
|
import { createIntegration } from './integrations/factory';
|
|
6
|
-
import { MOBILE_REPLAY_INTEGRATION_NAME } from './integrations/mobilereplay';
|
|
7
6
|
import { defaultSdkInfo } from './integrations/sdkinfo';
|
|
8
7
|
import { ReactNativeTracing } from './tracing';
|
|
9
8
|
import { createUserFeedbackEnvelope, items } from './utils/envelope';
|
|
@@ -27,6 +26,7 @@ export class ReactNativeClient extends BaseClient {
|
|
|
27
26
|
options._metadata.sdk = options._metadata.sdk || defaultSdkInfo;
|
|
28
27
|
super(options);
|
|
29
28
|
this._outcomesBuffer = [];
|
|
29
|
+
this._initNativeSdk();
|
|
30
30
|
}
|
|
31
31
|
/**
|
|
32
32
|
* @inheritDoc
|
|
@@ -83,21 +83,8 @@ export class ReactNativeClient extends BaseClient {
|
|
|
83
83
|
* Sets up the integrations
|
|
84
84
|
*/
|
|
85
85
|
setupIntegrations() {
|
|
86
|
-
super.setupIntegrations();
|
|
87
|
-
}
|
|
88
|
-
/**
|
|
89
|
-
* @inheritDoc
|
|
90
|
-
*/
|
|
91
|
-
init() {
|
|
92
|
-
super.init();
|
|
93
|
-
this._initNativeSdk();
|
|
94
|
-
}
|
|
95
|
-
/**
|
|
96
|
-
* @inheritdoc
|
|
97
|
-
*/
|
|
98
|
-
_setupIntegrations() {
|
|
99
86
|
var _a;
|
|
100
|
-
super.
|
|
87
|
+
super.setupIntegrations();
|
|
101
88
|
const tracing = this.getIntegration(ReactNativeTracing);
|
|
102
89
|
const routingName = (_a = tracing === null || tracing === void 0 ? void 0 : tracing.options.routingInstrumentation) === null || _a === void 0 ? void 0 : _a.name;
|
|
103
90
|
if (routingName) {
|
|
@@ -143,10 +130,7 @@ export class ReactNativeClient extends BaseClient {
|
|
|
143
130
|
* Starts native client with dsn and options
|
|
144
131
|
*/
|
|
145
132
|
_initNativeSdk() {
|
|
146
|
-
NATIVE.initNativeSdk(
|
|
147
|
-
'options' in this._integrations[MOBILE_REPLAY_INTEGRATION_NAME]
|
|
148
|
-
? this._integrations[MOBILE_REPLAY_INTEGRATION_NAME].options
|
|
149
|
-
: undefined }))
|
|
133
|
+
NATIVE.initNativeSdk(this._options)
|
|
150
134
|
.then((result) => {
|
|
151
135
|
return result;
|
|
152
136
|
}, () => {
|
package/dist/js/client.js.map
CHANGED
|
@@ -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;AAE3D,OAAO,EAAE,8BAA8B,EAAE,MAAM,6BAA6B,CAAC;AAC7E,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;IAGzE;;;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,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AAC;QAChB,CAAC,EACD,GAAG,EAAE;YACH,IAAI,CAAC,wBAAwB,EAAE,CAAC;YAChC,OAAO,KAAK,CAAC;QACf,CAAC,CACF;aACA,IAAI,CAAC,CAAC,iBAA0B,EAAE,EAAE;;YACnC,MAAA,MAAA,IAAI,CAAC,QAAQ,EAAC,OAAO,mDAAG,EAAE,iBAAiB,EAAE,CAAC,CAAC;QACjD,CAAC,CAAC;aACD,IAAI,CAAC,SAAS,EAAE,KAAK,CAAC,EAAE;YACvB,MAAM,CAAC,KAAK,CAAC,uCAAuC,EAAE,KAAK,CAAC,CAAC;QAC/D,CAAC,CAAC,CAAC;IACP,CAAC;IAED;;OAEG;IACK,wBAAwB;QAC9B,IAAI,OAAO,IAAI,IAAI,CAAC,QAAQ,CAAC,kBAAkB,EAAE;YAC/C,KAAK,CAAC,KAAK,CACT,QAAQ,EACR,6NAA6N,CAC9N,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 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 type { mobileReplayIntegration } from './integrations/mobilereplay';\nimport { MOBILE_REPLAY_INTEGRATION_NAME } from './integrations/mobilereplay';\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 }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint: EventHint = {}): PromiseLike<Event> {\n return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\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: undefined,\n });\n this._sendEnvelope(envelope);\n }\n\n /**\n * Sets up the integrations\n */\n public setupIntegrations(): void {\n super.setupIntegrations();\n }\n\n /**\n * @inheritDoc\n */\n public init(): void {\n super.init();\n this._initNativeSdk();\n }\n\n /**\n * @inheritdoc\n */\n protected _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 const enableUserInteractionTracing = tracing?.options.enableUserInteractionTracing;\n if (enableUserInteractionTracing) {\n this.addIntegration(createIntegration('ReactNativeUserInteractionTracing'));\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._isEnabled() && this._transport && this._dsn) {\n this.emit('beforeEnvelope', envelope);\n\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 _initNativeSdk(): void {\n NATIVE.initNativeSdk({\n ...this._options,\n mobileReplayOptions:\n this._integrations[MOBILE_REPLAY_INTEGRATION_NAME] &&\n 'options' in this._integrations[MOBILE_REPLAY_INTEGRATION_NAME]\n ? (this._integrations[MOBILE_REPLAY_INTEGRATION_NAME] as ReturnType<typeof mobileReplayIntegration>).options\n : undefined,\n })\n .then(\n (result: boolean) => {\n return result;\n },\n () => {\n this._showCannotConnectDialog();\n return false;\n },\n )\n .then((didCallNativeInit: boolean) => {\n this._options.onReady?.({ didCallNativeInit });\n })\n .then(undefined, error => {\n logger.error('The OnReady callback threw an error: ', error);\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/ 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,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,c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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 { 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 this._initNativeSdk();\n }\n\n /**\n * @inheritDoc\n */\n public eventFromException(exception: unknown, hint: EventHint = {}): PromiseLike<Event> {\n return eventFromException(this._options.stackParser, exception, hint, this._options.attachStacktrace);\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: undefined,\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 const enableUserInteractionTracing = tracing?.options.enableUserInteractionTracing;\n if (enableUserInteractionTracing) {\n this.addIntegration(createIntegration('ReactNativeUserInteractionTracing'));\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._isEnabled() && this._transport && this._dsn) {\n this.emit('beforeEnvelope', envelope);\n\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 _initNativeSdk(): void {\n NATIVE.initNativeSdk(this._options)\n .then(\n (result: boolean) => {\n return result;\n },\n () => {\n this._showCannotConnectDialog();\n return false;\n },\n )\n .then((didCallNativeInit: boolean) => {\n this._options.onReady?.({ didCallNativeInit });\n })\n .then(undefined, error => {\n logger.error('The OnReady callback threw an error: ', error);\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/ 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"]}
|
package/dist/js/index.d.ts
CHANGED
|
@@ -3,13 +3,15 @@ export { addGlobalEventProcessor, addBreadcrumb, captureException, captureEvent,
|
|
|
3
3
|
export { Integrations as BrowserIntegrations, ErrorBoundary, withErrorBoundary, createReduxEnhancer, Profiler, useProfiler, withProfiler, } from '@sentry/react';
|
|
4
4
|
export { lastEventId } from '@sentry/browser';
|
|
5
5
|
import * as Integrations from './integrations';
|
|
6
|
-
export
|
|
7
|
-
|
|
6
|
+
export * from './integrations/exports';
|
|
7
|
+
export { SDK_NAME, SDK_VERSION } from './version';
|
|
8
8
|
export type { ReactNativeOptions } from './options';
|
|
9
9
|
export { ReactNativeClient } from './client';
|
|
10
10
|
export { init, wrap, setDist, setRelease, nativeCrash, flush, close, captureUserFeedback, withScope, configureScope, } from './sdk';
|
|
11
11
|
export { TouchEventBoundary, withTouchEventBoundary } from './touchevents';
|
|
12
12
|
export { ReactNativeTracing, ReactNavigationV4Instrumentation, ReactNavigationV5Instrumentation, ReactNavigationInstrumentation, ReactNativeNavigationInstrumentation, RoutingInstrumentation, sentryTraceGesture, TimeToInitialDisplay, TimeToFullDisplay, startTimeToInitialDisplaySpan, startTimeToFullDisplaySpan, } from './tracing';
|
|
13
13
|
export type { ReactNavigationTransactionContext, TimeToDisplayProps } from './tracing';
|
|
14
|
-
export {
|
|
14
|
+
export {
|
|
15
|
+
/** @deprecated Import the integration function directly, e.g. `screenshotIntegration()` instead of `new Integrations.Screenshot(). */
|
|
16
|
+
Integrations, };
|
|
15
17
|
//# sourceMappingURL=index.d.ts.map
|
package/dist/js/index.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/js/index.ts"],"names":[],"mappings":"AAAA,YAAY,EACV,UAAU,EACV,OAAO,EACP,OAAO,EACP,KAAK,EACL,SAAS,EACT,UAAU,EACV,UAAU,EACV,MAAM,EACN,IAAI,EACJ,YAAY,GACb,MAAM,eAAe,CAAC;AAEvB,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,EAGhB,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,aAAa,EACb,UAAU,EACV,aAAa,EACb,cAAc,EAGd,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,OAAO,GACR,MAAM,cAAc,CAAC;AAKtB,OAAO,EACL,YAAY,IAAI,mBAAmB,EACnC,aAAa,EACb,iBAAiB,EACjB,mBAAmB,EACnB,Q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OAAO,EAEP,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,EAEhC,gCAAgC,EAChC,8BAA8B,EAC9B,oCAAoC,EACpC,sBAAsB,EACtB,kBAAkB,EAClB,oBAAoB,EACpB,iBAAiB,EACjB,6BAA6B,EAC7B,0BAA0B,GAC3B,MAAM,WAAW,CAAC;AAEnB,YAAY,EAAE,iCAAiC,EAAE,kBAAkB,EAAE,MAAM,WAAW,CAAC;AAEvF,OAAO;AACL,sIAAsI;AACtI,YAAY,GACb,CAAC"}
|
package/dist/js/index.js
CHANGED
|
@@ -8,8 +8,8 @@ _addTracingExtensions();
|
|
|
8
8
|
export { Integrations as BrowserIntegrations, ErrorBoundary, withErrorBoundary, createReduxEnhancer, Profiler, useProfiler, withProfiler, } from '@sentry/react';
|
|
9
9
|
export { lastEventId } from '@sentry/browser';
|
|
10
10
|
import * as Integrations from './integrations';
|
|
11
|
-
export
|
|
12
|
-
|
|
11
|
+
export * from './integrations/exports';
|
|
12
|
+
export { SDK_NAME, SDK_VERSION } from './version';
|
|
13
13
|
export { ReactNativeClient } from './client';
|
|
14
14
|
export { init, wrap,
|
|
15
15
|
// eslint-disable-next-line deprecation/deprecation
|
|
@@ -20,5 +20,7 @@ export { TouchEventBoundary, withTouchEventBoundary } from './touchevents';
|
|
|
20
20
|
export { ReactNativeTracing, ReactNavigationV4Instrumentation,
|
|
21
21
|
// eslint-disable-next-line deprecation/deprecation
|
|
22
22
|
ReactNavigationV5Instrumentation, ReactNavigationInstrumentation, ReactNativeNavigationInstrumentation, RoutingInstrumentation, sentryTraceGesture, TimeToInitialDisplay, TimeToFullDisplay, startTimeToInitialDisplaySpan, startTimeToFullDisplaySpan, } from './tracing';
|
|
23
|
-
export {
|
|
23
|
+
export {
|
|
24
|
+
/** @deprecated Import the integration function directly, e.g. `screenshotIntegration()` instead of `new Integrations.Screenshot(). */
|
|
25
|
+
Integrations, };
|
|
24
26
|
//# sourceMappingURL=index.js.map
|
package/dist/js/index.js.map
CHANGED
|
@@ -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;AAEhB,WAAW;AACX,iBAAiB,EACjB,SAAS,EACT,eAAe,EACf,aAAa,EACb,UAAU,EACV,aAAa,EACb,cAAc;AAEd,YAAY;AACZ,eAAe,EACf,cAAc,EACd,iBAAiB,EACjB,SAAS,EACT,gBAAgB,EAChB,iBAAiB,EACjB,OAAO,GACR,MAAM,cAAc,CAAC;AAEtB,OAAO,EAAE,qBAAqB,EAAE,MAAM,gCAAgC,CAAC;AACvE,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;
|
|
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,O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,\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\n // v8 spans\n startInactiveSpan,\n startSpan,\n startSpanManual,\n getActiveSpan,\n spanToJSON,\n spanIsSampled,\n setMeasurement,\n\n // v8 scopes\n getCurrentScope,\n getGlobalScope,\n getIsolationScope,\n getClient,\n setCurrentClient,\n addEventProcessor,\n metrics,\n} from '@sentry/core';\n\nimport { _addTracingExtensions } from './tracing/addTracingExtensions';\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';\n\nexport * from './integrations/exports';\n\nexport { SDK_NAME, SDK_VERSION } from './version';\nexport type { 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 sentryTraceGesture,\n TimeToInitialDisplay,\n TimeToFullDisplay,\n startTimeToInitialDisplaySpan,\n startTimeToFullDisplaySpan,\n} from './tracing';\n\nexport type { ReactNavigationTransactionContext, TimeToDisplayProps } from './tracing';\n\nexport {\n /** @deprecated Import the integration function directly, e.g. `screenshotIntegration()` instead of `new Integrations.Screenshot(). */\n Integrations,\n};\n"]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { Integration, IntegrationClass, IntegrationFnResult } from '@sentry/types';
|
|
2
2
|
/**
|
|
3
3
|
* React Native Error
|
|
4
4
|
*/
|
|
@@ -9,63 +9,11 @@ export type ReactNativeError = Error & {
|
|
|
9
9
|
componentStack?: string;
|
|
10
10
|
};
|
|
11
11
|
/** Tries to symbolicate the JS stack trace on the device. */
|
|
12
|
-
export declare
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
*/
|
|
20
|
-
name: string;
|
|
21
|
-
/**
|
|
22
|
-
* @inheritDoc
|
|
23
|
-
*/
|
|
24
|
-
setupOnce(addGlobalEventProcessor: (callback: EventProcessor) => void, getCurrentHub: () => Hub): void;
|
|
25
|
-
/**
|
|
26
|
-
* Symbolicates the stack on the device talking to local dev server.
|
|
27
|
-
* Mutates the passed event.
|
|
28
|
-
*/
|
|
29
|
-
private _symbolicate;
|
|
30
|
-
/**
|
|
31
|
-
* Converts ReactNativeFrames to frames in the Sentry format
|
|
32
|
-
* @param frames ReactNativeFrame[]
|
|
33
|
-
*/
|
|
34
|
-
private _convertReactNativeFramesToSentryFrames;
|
|
35
|
-
/**
|
|
36
|
-
* Replaces the frames in the exception of a error.
|
|
37
|
-
* @param event Event
|
|
38
|
-
* @param frames StackFrame[]
|
|
39
|
-
*/
|
|
40
|
-
private _replaceExceptionFramesInEvent;
|
|
41
|
-
/**
|
|
42
|
-
* Replaces the frames in the thread of a message.
|
|
43
|
-
* @param event Event
|
|
44
|
-
* @param frames StackFrame[]
|
|
45
|
-
*/
|
|
46
|
-
private _replaceThreadFramesInEvent;
|
|
47
|
-
/**
|
|
48
|
-
* This tries to add source context for in_app Frames
|
|
49
|
-
*
|
|
50
|
-
* @param frame StackFrame
|
|
51
|
-
* @param getDevServer function from RN to get DevServer URL
|
|
52
|
-
*/
|
|
53
|
-
private _addSourceContext;
|
|
54
|
-
/**
|
|
55
|
-
* Get source context for segment
|
|
56
|
-
*/
|
|
57
|
-
private _fetchSourceContext;
|
|
58
|
-
/**
|
|
59
|
-
* Loads and calls RN Core Devtools parseErrorStack function.
|
|
60
|
-
*/
|
|
61
|
-
private _parseErrorStack;
|
|
62
|
-
/**
|
|
63
|
-
* Loads and calls RN Core Devtools symbolicateStackTrace function.
|
|
64
|
-
*/
|
|
65
|
-
private _symbolicateStackTrace;
|
|
66
|
-
/**
|
|
67
|
-
* Loads and returns the RN DevServer URL.
|
|
68
|
-
*/
|
|
69
|
-
private _getDevServer;
|
|
70
|
-
}
|
|
12
|
+
export declare const debugSymbolicatorIntegration: () => IntegrationFnResult;
|
|
13
|
+
/**
|
|
14
|
+
* Tries to symbolicate the JS stack trace on the device.
|
|
15
|
+
*
|
|
16
|
+
* @deprecated Use `debugSymbolicatorIntegration()` instead.
|
|
17
|
+
*/
|
|
18
|
+
export declare const DebugSymbolicator: IntegrationClass<Integration>;
|
|
71
19
|
//# sourceMappingURL=debugsymbolicator.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"debugsymbolicator.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/debugsymbolicator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"debugsymbolicator.d.ts","sourceRoot":"","sources":["../../../src/js/integrations/debugsymbolicator.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAGV,WAAW,EACX,gBAAgB,EAChB,mBAAmB,EAEpB,MAAM,eAAe,CAAC;AAYvB;;GAEG;AACH,MAAM,MAAM,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,eAAO,MAAM,4BAA4B,QAAO,mBAQ/C,CAAC;AAEF;;;;GAIG;AAEH,eAAO,MAAM,iBAAiB,+BAGI,CAAC"}
|