@sentry/react-native 5.24.0 → 5.25.0-alpha.2
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 +88 -2
- package/RNSentry.podspec +1 -1
- package/android/build.gradle +1 -1
- package/android/src/main/java/io/sentry/react/RNSentryModuleImpl.java +56 -7
- package/android/src/main/java/io/sentry/react/RNSentryReplayBreadcrumbConverter.java +178 -0
- package/android/src/newarch/java/io/sentry/react/RNSentryModule.java +10 -0
- package/android/src/oldarch/java/io/sentry/react/RNSentryModule.java +10 -0
- package/dist/js/NativeRNSentry.d.ts +2 -0
- package/dist/js/NativeRNSentry.d.ts.map +1 -1
- package/dist/js/NativeRNSentry.js.map +1 -1
- package/dist/js/client.d.ts +4 -0
- package/dist/js/client.d.ts.map +1 -1
- package/dist/js/client.js +12 -2
- package/dist/js/client.js.map +1 -1
- package/dist/js/integrations/default.d.ts.map +1 -1
- package/dist/js/integrations/default.js +9 -1
- package/dist/js/integrations/default.js.map +1 -1
- package/dist/js/integrations/exports.d.ts +2 -1
- package/dist/js/integrations/exports.d.ts.map +1 -1
- package/dist/js/integrations/exports.js +2 -1
- package/dist/js/integrations/exports.js.map +1 -1
- package/dist/js/integrations/index.d.ts +1 -0
- package/dist/js/integrations/index.d.ts.map +1 -1
- package/dist/js/integrations/index.js +1 -0
- package/dist/js/integrations/index.js.map +1 -1
- package/dist/js/options.d.ts +24 -2
- package/dist/js/options.d.ts.map +1 -1
- package/dist/js/options.js.map +1 -1
- package/dist/js/replay/mobilereplay.d.ts +36 -0
- package/dist/js/replay/mobilereplay.d.ts.map +1 -0
- package/dist/js/replay/mobilereplay.js +99 -0
- package/dist/js/replay/mobilereplay.js.map +1 -0
- package/dist/js/replay/networkUtils.d.ts +8 -0
- package/dist/js/replay/networkUtils.d.ts.map +1 -0
- package/dist/js/replay/networkUtils.js +52 -0
- package/dist/js/replay/networkUtils.js.map +1 -0
- package/dist/js/replay/xhrUtils.d.ts +6 -0
- package/dist/js/replay/xhrUtils.d.ts.map +1 -0
- package/dist/js/replay/xhrUtils.js +31 -0
- package/dist/js/replay/xhrUtils.js.map +1 -0
- package/dist/js/touchevents.d.ts +4 -0
- package/dist/js/touchevents.d.ts.map +1 -1
- package/dist/js/touchevents.js +93 -53
- package/dist/js/touchevents.js.map +1 -1
- package/dist/js/tracing/nativeframes.d.ts.map +1 -1
- package/dist/js/tracing/nativeframes.js +6 -0
- package/dist/js/tracing/nativeframes.js.map +1 -1
- package/dist/js/utils/clientutils.d.ts +10 -0
- package/dist/js/utils/clientutils.d.ts.map +1 -0
- package/dist/js/utils/clientutils.js +9 -0
- package/dist/js/utils/clientutils.js.map +1 -0
- package/dist/js/utils/environment.d.ts +4 -0
- package/dist/js/utils/environment.d.ts.map +1 -1
- package/dist/js/utils/environment.js +8 -0
- package/dist/js/utils/environment.js.map +1 -1
- package/dist/js/utils/worldwide.d.ts +6 -0
- package/dist/js/utils/worldwide.d.ts.map +1 -1
- package/dist/js/utils/worldwide.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 +7 -1
- package/dist/js/wrapper.d.ts.map +1 -1
- package/dist/js/wrapper.js +24 -0
- package/dist/js/wrapper.js.map +1 -1
- package/ios/RNSentry.mm +33 -7
- package/ios/RNSentryReplay.h +8 -0
- package/ios/RNSentryReplay.m +60 -0
- package/ios/RNSentryReplayBreadcrumbConverter.h +16 -0
- package/ios/RNSentryReplayBreadcrumbConverter.m +172 -0
- package/package.json +1 -1
- package/scripts/expo-upload-sourcemaps.js +10 -10
- package/src/js/NativeRNSentry.ts +2 -0
- package/ts3.8/dist/js/NativeRNSentry.d.ts +2 -0
- package/ts3.8/dist/js/client.d.ts +4 -0
- package/ts3.8/dist/js/integrations/exports.d.ts +2 -1
- package/ts3.8/dist/js/integrations/index.d.ts +1 -0
- package/ts3.8/dist/js/options.d.ts +24 -2
- package/ts3.8/dist/js/replay/mobilereplay.d.ts +36 -0
- package/ts3.8/dist/js/replay/networkUtils.d.ts +8 -0
- package/ts3.8/dist/js/replay/xhrUtils.d.ts +6 -0
- package/ts3.8/dist/js/touchevents.d.ts +4 -0
- package/ts3.8/dist/js/utils/clientutils.d.ts +10 -0
- package/ts3.8/dist/js/utils/environment.d.ts +4 -0
- package/ts3.8/dist/js/utils/worldwide.d.ts +6 -0
- package/ts3.8/dist/js/version.d.ts +1 -1
- package/ts3.8/dist/js/wrapper.d.ts +7 -1
|
@@ -159,6 +159,28 @@ export interface BaseReactNativeOptions {
|
|
|
159
159
|
* from the function, no screenshot will be attached.
|
|
160
160
|
*/
|
|
161
161
|
beforeScreenshot?: (event: Event, hint: EventHint) => boolean;
|
|
162
|
+
/**
|
|
163
|
+
* Options which are in beta, or otherwise not guaranteed to be stable.
|
|
164
|
+
*/
|
|
165
|
+
_experiments?: {
|
|
166
|
+
[key: string]: unknown;
|
|
167
|
+
/**
|
|
168
|
+
* The sample rate for profiling
|
|
169
|
+
* 1.0 will profile all transactions and 0 will profile none.
|
|
170
|
+
*/
|
|
171
|
+
profilesSampleRate?: number;
|
|
172
|
+
/**
|
|
173
|
+
* The sample rate for session-long replays.
|
|
174
|
+
* 1.0 will record all sessions and 0 will record none.
|
|
175
|
+
*/
|
|
176
|
+
replaysSessionSampleRate?: number;
|
|
177
|
+
/**
|
|
178
|
+
* The sample rate for sessions that has had an error occur.
|
|
179
|
+
* This is independent of `sessionSampleRate`.
|
|
180
|
+
* 1.0 will record all sessions and 0 will record none.
|
|
181
|
+
*/
|
|
182
|
+
replaysOnErrorSampleRate?: number;
|
|
183
|
+
};
|
|
162
184
|
}
|
|
163
185
|
export interface ReactNativeTransportOptions extends BrowserTransportOptions {
|
|
164
186
|
/**
|
|
@@ -170,9 +192,9 @@ export interface ReactNativeTransportOptions extends BrowserTransportOptions {
|
|
|
170
192
|
* Configuration options for the Sentry ReactNative SDK.
|
|
171
193
|
* @see ReactNativeFrontend for more information.
|
|
172
194
|
*/
|
|
173
|
-
export interface ReactNativeOptions extends Options<ReactNativeTransportOptions>, BaseReactNativeOptions {
|
|
195
|
+
export interface ReactNativeOptions extends Omit<Options<ReactNativeTransportOptions>, '_experiments'>, BaseReactNativeOptions {
|
|
174
196
|
}
|
|
175
|
-
export interface ReactNativeClientOptions extends Omit<ClientOptions<ReactNativeTransportOptions>, 'tunnel'>, BaseReactNativeOptions {
|
|
197
|
+
export interface ReactNativeClientOptions extends Omit<ClientOptions<ReactNativeTransportOptions>, 'tunnel' | '_experiments'>, BaseReactNativeOptions {
|
|
176
198
|
}
|
|
177
199
|
export interface ReactNativeWrapperOptions {
|
|
178
200
|
/** Props for the root React profiler */
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
import type { IntegrationFnResult } from '@sentry/types';
|
|
2
|
+
export declare const MOBILE_REPLAY_INTEGRATION_NAME = "MobileReplay";
|
|
3
|
+
export interface MobileReplayOptions {
|
|
4
|
+
/**
|
|
5
|
+
* Mask all text in recordings
|
|
6
|
+
*/
|
|
7
|
+
maskAllText?: boolean;
|
|
8
|
+
/**
|
|
9
|
+
* Mask all text in recordings
|
|
10
|
+
*/
|
|
11
|
+
maskAllImages?: boolean;
|
|
12
|
+
}
|
|
13
|
+
type MobileReplayIntegration = IntegrationFnResult & {
|
|
14
|
+
options: Required<MobileReplayOptions>;
|
|
15
|
+
};
|
|
16
|
+
/**
|
|
17
|
+
* The Mobile Replay Integration, let's you adjust the default mobile replay options.
|
|
18
|
+
* To be passed to `Sentry.init` with `replaysOnErrorSampleRate` or `replaysSessionSampleRate`.
|
|
19
|
+
*
|
|
20
|
+
* ```javascript
|
|
21
|
+
* Sentry.init({
|
|
22
|
+
* _experiments: {
|
|
23
|
+
* replaysOnErrorSampleRate: 1.0,
|
|
24
|
+
* replaysSessionSampleRate: 1.0,
|
|
25
|
+
* },
|
|
26
|
+
* integrations: [mobileReplayIntegration({
|
|
27
|
+
* // Adjust the default options
|
|
28
|
+
* })],
|
|
29
|
+
* });
|
|
30
|
+
* ```
|
|
31
|
+
*
|
|
32
|
+
* @experimental
|
|
33
|
+
*/
|
|
34
|
+
export declare const mobileReplayIntegration: (initOptions?: MobileReplayOptions) => MobileReplayIntegration;
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=mobilereplay.d.ts.map
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
/// <reference types="react-native" />
|
|
2
|
+
/// <reference types="react" />
|
|
3
|
+
/** Convert a Content-Length header to number/undefined. */
|
|
4
|
+
export declare function parseContentLengthHeader(header: string | null | undefined): number | undefined;
|
|
5
|
+
export type RequestBody = null | Blob | FormData | URLSearchParams | string | ArrayBuffer | undefined;
|
|
6
|
+
/** Get the size of a body. */
|
|
7
|
+
export declare function getBodySize(body: RequestBody): number | undefined;
|
|
8
|
+
//# sourceMappingURL=networkUtils.d.ts.map
|
|
@@ -0,0 +1,6 @@
|
|
|
1
|
+
import type { Breadcrumb, BreadcrumbHint } from '@sentry/types';
|
|
2
|
+
/**
|
|
3
|
+
* Enrich an XHR breadcrumb with additional data for Mobile Replay network tab.
|
|
4
|
+
*/
|
|
5
|
+
export declare function enrichXhrBreadcrumbsForMobileReplay(breadcrumb: Breadcrumb, hint: BreadcrumbHint | undefined): void;
|
|
6
|
+
//# sourceMappingURL=xhrUtils.d.ts.map
|
|
@@ -60,6 +60,10 @@ declare class TouchEventBoundary extends React.Component<TouchEventBoundaryProps
|
|
|
60
60
|
* @param e
|
|
61
61
|
*/
|
|
62
62
|
private _onTouchStart;
|
|
63
|
+
/**
|
|
64
|
+
* Pushes the name to the componentTreeNames array if it is not ignored.
|
|
65
|
+
*/
|
|
66
|
+
private _pushIfNotIgnored;
|
|
63
67
|
}
|
|
64
68
|
/**
|
|
65
69
|
* Convenience Higher-Order-Component for TouchEventBoundary
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import type { Client } from '@sentry/types';
|
|
2
|
+
/**
|
|
3
|
+
* Checks if the provided Sentry client has hooks implemented.
|
|
4
|
+
* @param client The Sentry client object to check.
|
|
5
|
+
* @returns True if the client has hooks, false otherwise.
|
|
6
|
+
*/
|
|
7
|
+
export declare function hasHooks(client: Client): client is Client & {
|
|
8
|
+
on: Required<Client>['on'];
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=clientutils.d.ts.map
|
|
@@ -16,6 +16,10 @@ export declare function getExpoGoVersion(): string | undefined;
|
|
|
16
16
|
export declare function getExpoSdkVersion(): string | undefined;
|
|
17
17
|
/** Checks if the current platform is not web */
|
|
18
18
|
export declare function notWeb(): boolean;
|
|
19
|
+
/** Checks if the current platform is supported mobile platform (iOS or Android) */
|
|
20
|
+
export declare function isMobileOs(): boolean;
|
|
21
|
+
/** Checks if the current platform is not supported mobile platform (iOS or Android) */
|
|
22
|
+
export declare function notMobileOs(): boolean;
|
|
19
23
|
/** Returns Hermes Version if hermes is present in the runtime */
|
|
20
24
|
export declare function getHermesVersion(): string | undefined;
|
|
21
25
|
/** Returns default environment based on __DEV__ */
|
|
@@ -22,7 +22,13 @@ export interface ReactNativeInternalGlobal extends InternalGlobal {
|
|
|
22
22
|
};
|
|
23
23
|
__BUNDLE_START_TIME__?: number;
|
|
24
24
|
nativePerformanceNow?: () => number;
|
|
25
|
+
TextEncoder?: TextEncoder;
|
|
25
26
|
}
|
|
27
|
+
type TextEncoder = {
|
|
28
|
+
new (): TextEncoder;
|
|
29
|
+
encode(input?: string): Uint8Array;
|
|
30
|
+
};
|
|
26
31
|
/** Get's the global object for the current JavaScript runtime */
|
|
27
32
|
export declare const RN_GLOBAL_OBJ: ReactNativeInternalGlobal;
|
|
33
|
+
export {};
|
|
28
34
|
//# sourceMappingURL=worldwide.d.ts.map
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
export declare const SDK_PACKAGE_NAME = "npm:@sentry/react-native";
|
|
2
2
|
export declare const SDK_NAME = "sentry.javascript.react-native";
|
|
3
|
-
export declare const SDK_VERSION = "5.
|
|
3
|
+
export declare const SDK_VERSION = "5.25.0-alpha.2";
|
|
4
4
|
//# sourceMappingURL=version.d.ts.map
|
|
@@ -4,6 +4,7 @@ import type { NativeAppStartResponse, NativeDeviceContextsResponse, NativeFrames
|
|
|
4
4
|
import type { ReactNativeClientOptions } from './options';
|
|
5
5
|
import type * as Hermes from './profiling/hermes';
|
|
6
6
|
import type { NativeAndroidProfileEvent, NativeProfileEvent } from './profiling/nativeTypes';
|
|
7
|
+
import type { MobileReplayOptions } from './replay/mobilereplay';
|
|
7
8
|
/**
|
|
8
9
|
* Returns the RNSentry module. Dynamically resolves if NativeModule or TurboModule is used.
|
|
9
10
|
*/
|
|
@@ -13,6 +14,9 @@ export interface Screenshot {
|
|
|
13
14
|
contentType: string;
|
|
14
15
|
filename: string;
|
|
15
16
|
}
|
|
17
|
+
export type NativeSdkOptions = Partial<ReactNativeClientOptions> & {
|
|
18
|
+
mobileReplayOptions: MobileReplayOptions | undefined;
|
|
19
|
+
};
|
|
16
20
|
interface SentryNativeWrapper {
|
|
17
21
|
enableNative: boolean;
|
|
18
22
|
nativeIsReady: boolean;
|
|
@@ -29,7 +33,7 @@ interface SentryNativeWrapper {
|
|
|
29
33
|
};
|
|
30
34
|
_isModuleLoaded(module: Spec | undefined): module is Spec;
|
|
31
35
|
isNativeAvailable(): boolean;
|
|
32
|
-
initNativeSdk(options:
|
|
36
|
+
initNativeSdk(options: NativeSdkOptions): PromiseLike<boolean>;
|
|
33
37
|
closeNativeSdk(): PromiseLike<void>;
|
|
34
38
|
sendEnvelope(envelope: Envelope): Promise<void>;
|
|
35
39
|
captureScreenshot(): Promise<Screenshot[] | null>;
|
|
@@ -63,6 +67,8 @@ interface SentryNativeWrapper {
|
|
|
63
67
|
*/
|
|
64
68
|
fetchNativeStackFramesBy(instructionsAddr: number[]): NativeStackFrames | null;
|
|
65
69
|
initNativeReactNavigationNewFrameTracking(): Promise<void>;
|
|
70
|
+
captureReplay(isHardCrash: boolean): Promise<string | null>;
|
|
71
|
+
getCurrentReplayId(): string | null;
|
|
66
72
|
}
|
|
67
73
|
/**
|
|
68
74
|
* Our internal interface for calling native functions
|