@sentry/react 6.19.3 → 6.19.4
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/build/types/constants.d.ts +4 -0
- package/build/types/constants.d.ts.map +1 -0
- package/build/types/errorboundary.d.ts +62 -0
- package/build/types/errorboundary.d.ts.map +1 -0
- package/build/types/index.d.ts +8 -0
- package/build/types/index.d.ts.map +1 -0
- package/build/types/profiler.d.ts +55 -0
- package/build/types/profiler.d.ts.map +1 -0
- package/build/types/reactrouter.d.ts +25 -0
- package/build/types/reactrouter.d.ts.map +1 -0
- package/build/types/reactrouterv3.d.ts +26 -0
- package/build/types/reactrouterv3.d.ts.map +1 -0
- package/build/types/redux.d.ts +33 -0
- package/build/types/redux.d.ts.map +1 -0
- package/build/types/sdk.d.ts +6 -0
- package/build/types/sdk.d.ts.map +1 -0
- package/build/types/types.d.ts +8 -0
- package/build/types/types.d.ts.map +1 -0
- package/package.json +13 -14
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../src/constants.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD,eAAO,MAAM,eAAe,oBAAoB,CAAC;AAEjD,eAAO,MAAM,cAAc,mBAAmB,CAAC"}
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
import { ReportDialogOptions, Scope } from '@sentry/browser';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare function isAtLeastReact17(version: string): boolean;
|
|
4
|
+
export declare const UNKNOWN_COMPONENT = "unknown";
|
|
5
|
+
export declare type FallbackRender = (errorData: {
|
|
6
|
+
error: Error;
|
|
7
|
+
componentStack: string | null;
|
|
8
|
+
eventId: string | null;
|
|
9
|
+
resetError(): void;
|
|
10
|
+
}) => React.ReactElement;
|
|
11
|
+
export declare type ErrorBoundaryProps = {
|
|
12
|
+
/** If a Sentry report dialog should be rendered on error */
|
|
13
|
+
showDialog?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Options to be passed into the Sentry report dialog.
|
|
16
|
+
* No-op if {@link showDialog} is false.
|
|
17
|
+
*/
|
|
18
|
+
dialogOptions?: ReportDialogOptions;
|
|
19
|
+
/**
|
|
20
|
+
* A fallback component that gets rendered when the error boundary encounters an error.
|
|
21
|
+
*
|
|
22
|
+
* Can either provide a React Component, or a function that returns React Component as
|
|
23
|
+
* a valid fallback prop. If a function is provided, the function will be called with
|
|
24
|
+
* the error, the component stack, and an function that resets the error boundary on error.
|
|
25
|
+
*
|
|
26
|
+
*/
|
|
27
|
+
fallback?: React.ReactElement | FallbackRender;
|
|
28
|
+
/** Called when the error boundary encounters an error */
|
|
29
|
+
onError?(error: Error, componentStack: string, eventId: string): void;
|
|
30
|
+
/** Called on componentDidMount() */
|
|
31
|
+
onMount?(): void;
|
|
32
|
+
/** Called if resetError() is called from the fallback render props function */
|
|
33
|
+
onReset?(error: Error | null, componentStack: string | null, eventId: string | null): void;
|
|
34
|
+
/** Called on componentWillUnmount() */
|
|
35
|
+
onUnmount?(error: Error | null, componentStack: string | null, eventId: string | null): void;
|
|
36
|
+
/** Called before the error is captured by Sentry, allows for you to add tags or context using the scope */
|
|
37
|
+
beforeCapture?(scope: Scope, error: Error | null, componentStack: string | null): void;
|
|
38
|
+
};
|
|
39
|
+
declare type ErrorBoundaryState = {
|
|
40
|
+
componentStack: React.ErrorInfo['componentStack'] | null;
|
|
41
|
+
error: Error | null;
|
|
42
|
+
eventId: string | null;
|
|
43
|
+
};
|
|
44
|
+
/**
|
|
45
|
+
* A ErrorBoundary component that logs errors to Sentry. Requires React >= 16.
|
|
46
|
+
* NOTE: If you are a Sentry user, and you are seeing this stack frame, it means the
|
|
47
|
+
* Sentry React SDK ErrorBoundary caught an error invoking your application code. This
|
|
48
|
+
* is expected behavior and NOT indicative of a bug with the Sentry React SDK.
|
|
49
|
+
*/
|
|
50
|
+
declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
51
|
+
state: ErrorBoundaryState;
|
|
52
|
+
componentDidCatch(error: Error & {
|
|
53
|
+
cause?: Error;
|
|
54
|
+
}, { componentStack }: React.ErrorInfo): void;
|
|
55
|
+
componentDidMount(): void;
|
|
56
|
+
componentWillUnmount(): void;
|
|
57
|
+
resetErrorBoundary: () => void;
|
|
58
|
+
render(): React.ReactNode;
|
|
59
|
+
}
|
|
60
|
+
declare function withErrorBoundary<P extends Record<string, any>>(WrappedComponent: React.ComponentType<P>, errorBoundaryOptions: ErrorBoundaryProps): React.FC<P>;
|
|
61
|
+
export { ErrorBoundary, withErrorBoundary };
|
|
62
|
+
//# sourceMappingURL=errorboundary.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"errorboundary.d.ts","sourceRoot":"","sources":["../../src/errorboundary.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAoB,mBAAmB,EAAE,KAAK,EAA+B,MAAM,iBAAiB,CAAC;AAG5G,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,MAAM,GAAG,OAAO,CAGzD;AAED,eAAO,MAAM,iBAAiB,YAAY,CAAC;AAE3C,oBAAY,cAAc,GAAG,CAAC,SAAS,EAAE;IACvC,KAAK,EAAE,KAAK,CAAC;IACb,cAAc,EAAE,MAAM,GAAG,IAAI,CAAC;IAC9B,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACvB,UAAU,IAAI,IAAI,CAAC;CACpB,KAAK,KAAK,CAAC,YAAY,CAAC;AAEzB,oBAAY,kBAAkB,GAAG;IAC/B,4DAA4D;IAC5D,UAAU,CAAC,EAAE,OAAO,CAAC;IACrB;;;OAGG;IACH,aAAa,CAAC,EAAE,mBAAmB,CAAC;IACpC;;;;;;;OAOG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,YAAY,GAAG,cAAc,CAAC;IAC/C,yDAAyD;IACzD,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,cAAc,EAAE,MAAM,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;IACtE,oCAAoC;IACpC,OAAO,CAAC,IAAI,IAAI,CAAC;IACjB,gFAAgF;IAChF,OAAO,CAAC,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE,cAAc,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAC3F,uCAAuC;IACvC,SAAS,CAAC,CAAC,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE,cAAc,EAAE,MAAM,GAAG,IAAI,EAAE,OAAO,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;IAC7F,2GAA2G;IAC3G,aAAa,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,KAAK,GAAG,IAAI,EAAE,cAAc,EAAE,MAAM,GAAG,IAAI,GAAG,IAAI,CAAC;CACxF,CAAC;AAEF,aAAK,kBAAkB,GAAG;IACxB,cAAc,EAAE,KAAK,CAAC,SAAS,CAAC,gBAAgB,CAAC,GAAG,IAAI,CAAC;IACzD,KAAK,EAAE,KAAK,GAAG,IAAI,CAAC;IACpB,OAAO,EAAE,MAAM,GAAG,IAAI,CAAC;CACxB,CAAC;AAQF;;;;;GAKG;AACH,cAAM,aAAc,SAAQ,KAAK,CAAC,SAAS,CAAC,kBAAkB,EAAE,kBAAkB,CAAC;IAC1E,KAAK,EAAE,kBAAkB,CAAiB;IAE1C,iBAAiB,CAAC,KAAK,EAAE,KAAK,GAAG;QAAE,KAAK,CAAC,EAAE,KAAK,CAAA;KAAE,EAAE,EAAE,cAAc,EAAE,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI;IAiC9F,iBAAiB,IAAI,IAAI;IAOzB,oBAAoB,IAAI,IAAI;IAQ5B,kBAAkB,EAAE,MAAM,IAAI,CAOnC;IAEK,MAAM,IAAI,KAAK,CAAC,SAAS;CA6BjC;AAGD,iBAAS,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACtD,gBAAgB,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EACxC,oBAAoB,EAAE,kBAAkB,GACvC,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAiBb;AAED,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,CAAC"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
export * from '@sentry/browser';
|
|
2
|
+
export { init } from './sdk';
|
|
3
|
+
export { Profiler, withProfiler, useProfiler } from './profiler';
|
|
4
|
+
export { ErrorBoundary, withErrorBoundary } from './errorboundary';
|
|
5
|
+
export { createReduxEnhancer } from './redux';
|
|
6
|
+
export { reactRouterV3Instrumentation } from './reactrouterv3';
|
|
7
|
+
export { reactRouterV4Instrumentation, reactRouterV5Instrumentation, withSentryRouting } from './reactrouter';
|
|
8
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/index.ts"],"names":[],"mappings":"AAAA,cAAc,iBAAiB,CAAC;AAEhC,OAAO,EAAE,IAAI,EAAE,MAAM,OAAO,CAAC;AAC7B,OAAO,EAAE,QAAQ,EAAE,YAAY,EAAE,WAAW,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,EAAE,aAAa,EAAE,iBAAiB,EAAE,MAAM,iBAAiB,CAAC;AACnE,OAAO,EAAE,mBAAmB,EAAE,MAAM,SAAS,CAAC;AAC9C,OAAO,EAAE,4BAA4B,EAAE,MAAM,iBAAiB,CAAC;AAC/D,OAAO,EAAE,4BAA4B,EAAE,4BAA4B,EAAE,iBAAiB,EAAE,MAAM,eAAe,CAAC"}
|
|
@@ -0,0 +1,55 @@
|
|
|
1
|
+
import { Hub } from '@sentry/browser';
|
|
2
|
+
import { Span, Transaction } from '@sentry/types';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
export declare const UNKNOWN_COMPONENT = "unknown";
|
|
5
|
+
export declare type ProfilerProps = {
|
|
6
|
+
name: string;
|
|
7
|
+
disabled?: boolean;
|
|
8
|
+
includeRender?: boolean;
|
|
9
|
+
includeUpdates?: boolean;
|
|
10
|
+
updateProps: {
|
|
11
|
+
[key: string]: unknown;
|
|
12
|
+
};
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* The Profiler component leverages Sentry's Tracing integration to generate
|
|
16
|
+
* spans based on component lifecycles.
|
|
17
|
+
*/
|
|
18
|
+
declare class Profiler extends React.Component<ProfilerProps> {
|
|
19
|
+
/**
|
|
20
|
+
* The span of the mount activity
|
|
21
|
+
* Made protected for the React Native SDK to access
|
|
22
|
+
*/
|
|
23
|
+
protected _mountSpan: Span | undefined;
|
|
24
|
+
private _mountActivity;
|
|
25
|
+
static defaultProps: Partial<ProfilerProps>;
|
|
26
|
+
constructor(props: ProfilerProps);
|
|
27
|
+
componentDidMount(): void;
|
|
28
|
+
componentDidUpdate({ updateProps, includeUpdates }: ProfilerProps): void;
|
|
29
|
+
componentWillUnmount(): void;
|
|
30
|
+
render(): React.ReactNode;
|
|
31
|
+
}
|
|
32
|
+
/**
|
|
33
|
+
* withProfiler is a higher order component that wraps a
|
|
34
|
+
* component in a {@link Profiler} component. It is recommended that
|
|
35
|
+
* the higher order component be used over the regular {@link Profiler} component.
|
|
36
|
+
*
|
|
37
|
+
* @param WrappedComponent component that is wrapped by Profiler
|
|
38
|
+
* @param options the {@link ProfilerProps} you can pass into the Profiler
|
|
39
|
+
*/
|
|
40
|
+
declare function withProfiler<P extends Record<string, any>>(WrappedComponent: React.ComponentType<P>, options?: Pick<Partial<ProfilerProps>, Exclude<keyof ProfilerProps, 'updateProps'>>): React.FC<P>;
|
|
41
|
+
/**
|
|
42
|
+
*
|
|
43
|
+
* `useProfiler` is a React hook that profiles a React component.
|
|
44
|
+
*
|
|
45
|
+
* Requires React 16.8 or above.
|
|
46
|
+
* @param name displayName of component being profiled
|
|
47
|
+
*/
|
|
48
|
+
declare function useProfiler(name: string, options?: {
|
|
49
|
+
disabled?: boolean;
|
|
50
|
+
hasRenderSpan?: boolean;
|
|
51
|
+
}): void;
|
|
52
|
+
export { withProfiler, Profiler, useProfiler };
|
|
53
|
+
/** Grabs active transaction off scope */
|
|
54
|
+
export declare function getActiveTransaction<T extends Transaction>(hub?: Hub): T | undefined;
|
|
55
|
+
//# sourceMappingURL=profiler.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"profiler.d.ts","sourceRoot":"","sources":["../../src/profiler.tsx"],"names":[],"mappings":"AAEA,OAAO,EAAiB,GAAG,EAAE,MAAM,iBAAiB,CAAC;AACrD,OAAO,EAAiC,IAAI,EAAE,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjF,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,eAAO,MAAM,iBAAiB,YAAY,CAAC;AA8D3C,oBAAY,aAAa,GAAG;IAE1B,IAAI,EAAE,MAAM,CAAC;IAGb,QAAQ,CAAC,EAAE,OAAO,CAAC;IAEnB,aAAa,CAAC,EAAE,OAAO,CAAC;IAExB,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB,WAAW,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,OAAO,CAAA;KAAE,CAAC;CACzC,CAAC;AAEF;;;GAGG;AACH,cAAM,QAAS,SAAQ,KAAK,CAAC,SAAS,CAAC,aAAa,CAAC;IACnD;;;OAGG;IACH,SAAS,CAAC,UAAU,EAAE,IAAI,GAAG,SAAS,CAAa;IAGnD,OAAO,CAAC,cAAc,CAAuB;IAG7C,OAAc,YAAY,EAAE,OAAO,CAAC,aAAa,CAAC,CAIhD;gBAEiB,KAAK,EAAE,aAAa;IAyBhC,iBAAiB,IAAI,IAAI;IAYzB,kBAAkB,CAAC,EAAE,WAAW,EAAE,cAAqB,EAAE,EAAE,aAAa,GAAG,IAAI;IA2B/E,oBAAoB,IAAI,IAAI;IAe5B,MAAM,IAAI,KAAK,CAAC,SAAS;CAGjC;AAED;;;;;;;GAOG;AACH,iBAAS,YAAY,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EACjD,gBAAgB,EAAE,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAExC,OAAO,CAAC,EAAE,IAAI,CAAC,OAAO,CAAC,aAAa,CAAC,EAAE,OAAO,CAAC,MAAM,aAAa,EAAE,aAAa,CAAC,CAAC,GAClF,KAAK,CAAC,EAAE,CAAC,CAAC,CAAC,CAgBb;AAED;;;;;;GAMG;AACH,iBAAS,WAAW,CAClB,IAAI,EAAE,MAAM,EACZ,OAAO,GAAE;IAAE,QAAQ,CAAC,EAAE,OAAO,CAAC;IAAC,aAAa,CAAC,EAAE,OAAO,CAAA;CAGrD,GACA,IAAI,CAmCN;AAED,OAAO,EAAE,YAAY,EAAE,QAAQ,EAAE,WAAW,EAAE,CAAC;AAE/C,yCAAyC;AACzC,wBAAgB,oBAAoB,CAAC,CAAC,SAAS,WAAW,EAAE,GAAG,GAAE,GAAqB,GAAG,CAAC,GAAG,SAAS,CASrG"}
|
|
@@ -0,0 +1,25 @@
|
|
|
1
|
+
import * as React from 'react';
|
|
2
|
+
import { Action, Location, ReactRouterInstrumentation } from './types';
|
|
3
|
+
declare type Match = {
|
|
4
|
+
path: string;
|
|
5
|
+
url: string;
|
|
6
|
+
params: Record<string, any>;
|
|
7
|
+
isExact: boolean;
|
|
8
|
+
};
|
|
9
|
+
export declare type RouterHistory = {
|
|
10
|
+
location?: Location;
|
|
11
|
+
listen?(cb: (location: Location, action: Action) => void): void;
|
|
12
|
+
} & Record<string, any>;
|
|
13
|
+
export declare type RouteConfig = {
|
|
14
|
+
[propName: string]: any;
|
|
15
|
+
path?: string | string[];
|
|
16
|
+
exact?: boolean;
|
|
17
|
+
component?: JSX.Element;
|
|
18
|
+
routes?: RouteConfig[];
|
|
19
|
+
};
|
|
20
|
+
declare type MatchPath = (pathname: string, props: string | string[] | any, parent?: Match | null) => Match | null;
|
|
21
|
+
export declare function reactRouterV4Instrumentation(history: RouterHistory, routes?: RouteConfig[], matchPath?: MatchPath): ReactRouterInstrumentation;
|
|
22
|
+
export declare function reactRouterV5Instrumentation(history: RouterHistory, routes?: RouteConfig[], matchPath?: MatchPath): ReactRouterInstrumentation;
|
|
23
|
+
export declare function withSentryRouting<P extends Record<string, any>, R extends React.ComponentType<P>>(Route: R): R;
|
|
24
|
+
export {};
|
|
25
|
+
//# sourceMappingURL=reactrouter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactrouter.d.ts","sourceRoot":"","sources":["../../src/reactrouter.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAE/B,OAAO,EAAE,MAAM,EAAE,QAAQ,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAKvE,aAAK,KAAK,GAAG;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAAC,OAAO,EAAE,OAAO,CAAA;CAAE,CAAC;AAE1F,oBAAY,aAAa,GAAG;IAC1B,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,QAAQ,EAAE,MAAM,EAAE,MAAM,KAAK,IAAI,GAAG,IAAI,CAAC;CACjE,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAExB,oBAAY,WAAW,GAAG;IACxB,CAAC,QAAQ,EAAE,MAAM,GAAG,GAAG,CAAC;IACxB,IAAI,CAAC,EAAE,MAAM,GAAG,MAAM,EAAE,CAAC;IACzB,KAAK,CAAC,EAAE,OAAO,CAAC;IAChB,SAAS,CAAC,EAAE,GAAG,CAAC,OAAO,CAAC;IACxB,MAAM,CAAC,EAAE,WAAW,EAAE,CAAC;CACxB,CAAC;AAEF,aAAK,SAAS,GAAG,CAAC,QAAQ,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,GAAG,MAAM,EAAE,GAAG,GAAG,EAAE,MAAM,CAAC,EAAE,KAAK,GAAG,IAAI,KAAK,KAAK,GAAG,IAAI,CAAC;AAO3G,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,aAAa,EACtB,MAAM,CAAC,EAAE,WAAW,EAAE,EACtB,SAAS,CAAC,EAAE,SAAS,GACpB,0BAA0B,CAE5B;AAED,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,aAAa,EACtB,MAAM,CAAC,EAAE,WAAW,EAAE,EACtB,SAAS,CAAC,EAAE,SAAS,GACpB,0BAA0B,CAE5B;AAyGD,wBAAgB,iBAAiB,CAAC,CAAC,SAAS,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,CAAC,SAAS,KAAK,CAAC,aAAa,CAAC,CAAC,CAAC,EAAE,KAAK,EAAE,CAAC,GAAG,CAAC,CAoB9G"}
|
|
@@ -0,0 +1,26 @@
|
|
|
1
|
+
import { Location, ReactRouterInstrumentation } from './types';
|
|
2
|
+
declare type HistoryV3 = {
|
|
3
|
+
location?: Location;
|
|
4
|
+
listen?(cb: (location: Location) => void): void;
|
|
5
|
+
} & Record<string, any>;
|
|
6
|
+
export declare type Route = {
|
|
7
|
+
path?: string;
|
|
8
|
+
childRoutes?: Route[];
|
|
9
|
+
};
|
|
10
|
+
export declare type Match = (props: {
|
|
11
|
+
location: Location;
|
|
12
|
+
routes: Route[];
|
|
13
|
+
}, cb: (error?: Error, _redirectLocation?: Location, renderProps?: {
|
|
14
|
+
routes?: Route[];
|
|
15
|
+
}) => void) => void;
|
|
16
|
+
/**
|
|
17
|
+
* Creates routing instrumentation for React Router v3
|
|
18
|
+
* Works for React Router >= 3.2.0 and < 4.0.0
|
|
19
|
+
*
|
|
20
|
+
* @param history object from the `history` library
|
|
21
|
+
* @param routes a list of all routes, should be
|
|
22
|
+
* @param match `Router.match` utility
|
|
23
|
+
*/
|
|
24
|
+
export declare function reactRouterV3Instrumentation(history: HistoryV3, routes: Route[], match: Match): ReactRouterInstrumentation;
|
|
25
|
+
export {};
|
|
26
|
+
//# sourceMappingURL=reactrouterv3.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"reactrouterv3.d.ts","sourceRoot":"","sources":["../../src/reactrouterv3.ts"],"names":[],"mappings":"AAGA,OAAO,EAAE,QAAQ,EAAE,0BAA0B,EAAE,MAAM,SAAS,CAAC;AAK/D,aAAK,SAAS,GAAG;IACf,QAAQ,CAAC,EAAE,QAAQ,CAAC;IACpB,MAAM,CAAC,CAAC,EAAE,EAAE,CAAC,QAAQ,EAAE,QAAQ,KAAK,IAAI,GAAG,IAAI,CAAC;CAEjD,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAExB,oBAAY,KAAK,GAAG;IAAE,IAAI,CAAC,EAAE,MAAM,CAAC;IAAC,WAAW,CAAC,EAAE,KAAK,EAAE,CAAA;CAAE,CAAC;AAE7D,oBAAY,KAAK,GAAG,CAClB,KAAK,EAAE;IAAE,QAAQ,EAAE,QAAQ,CAAC;IAAC,MAAM,EAAE,KAAK,EAAE,CAAA;CAAE,EAC9C,EAAE,EAAE,CAAC,KAAK,CAAC,EAAE,KAAK,EAAE,iBAAiB,CAAC,EAAE,QAAQ,EAAE,WAAW,CAAC,EAAE;IAAE,MAAM,CAAC,EAAE,KAAK,EAAE,CAAA;CAAE,KAAK,IAAI,KAC1F,IAAI,CAAC;AAIV;;;;;;;GAOG;AACH,wBAAgB,4BAA4B,CAC1C,OAAO,EAAE,SAAS,EAClB,MAAM,EAAE,KAAK,EAAE,EACf,KAAK,EAAE,KAAK,GACX,0BAA0B,CA+C5B"}
|
|
@@ -0,0 +1,33 @@
|
|
|
1
|
+
import { Scope } from '@sentry/types';
|
|
2
|
+
interface Action<T = any> {
|
|
3
|
+
type: T;
|
|
4
|
+
}
|
|
5
|
+
interface AnyAction extends Action {
|
|
6
|
+
[extraProps: string]: any;
|
|
7
|
+
}
|
|
8
|
+
export interface SentryEnhancerOptions<S = any> {
|
|
9
|
+
/**
|
|
10
|
+
* Transforms the state before attaching it to an event.
|
|
11
|
+
* Use this to remove any private data before sending it to Sentry.
|
|
12
|
+
* Return null to not attach the state.
|
|
13
|
+
*/
|
|
14
|
+
stateTransformer(state: S | undefined): (S & any) | null;
|
|
15
|
+
/**
|
|
16
|
+
* Transforms the action before sending it as a breadcrumb.
|
|
17
|
+
* Use this to remove any private data before sending it to Sentry.
|
|
18
|
+
* Return null to not send the breadcrumb.
|
|
19
|
+
*/
|
|
20
|
+
actionTransformer(action: AnyAction): AnyAction | null;
|
|
21
|
+
/**
|
|
22
|
+
* Called on every state update, configure the Sentry Scope with the redux state.
|
|
23
|
+
*/
|
|
24
|
+
configureScopeWithState?(scope: Scope, state: S): void;
|
|
25
|
+
}
|
|
26
|
+
/**
|
|
27
|
+
* Creates an enhancer that would be passed to Redux's createStore to log actions and the latest state to Sentry.
|
|
28
|
+
*
|
|
29
|
+
* @param enhancerOptions Options to pass to the enhancer
|
|
30
|
+
*/
|
|
31
|
+
declare function createReduxEnhancer(enhancerOptions?: Partial<SentryEnhancerOptions>): any;
|
|
32
|
+
export { createReduxEnhancer };
|
|
33
|
+
//# sourceMappingURL=redux.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redux.d.ts","sourceRoot":"","sources":["../../src/redux.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,EAAE,MAAM,eAAe,CAAC;AAEtC,UAAU,MAAM,CAAC,CAAC,GAAG,GAAG;IACtB,IAAI,EAAE,CAAC,CAAC;CACT;AAED,UAAU,SAAU,SAAQ,MAAM;IAChC,CAAC,UAAU,EAAE,MAAM,GAAG,GAAG,CAAC;CAC3B;AAuCD,MAAM,WAAW,qBAAqB,CAAC,CAAC,GAAG,GAAG;IAC5C;;;;OAIG;IACH,gBAAgB,CAAC,KAAK,EAAE,CAAC,GAAG,SAAS,GAAG,CAAC,CAAC,GAAG,GAAG,CAAC,GAAG,IAAI,CAAC;IACzD;;;;OAIG;IACH,iBAAiB,CAAC,MAAM,EAAE,SAAS,GAAG,SAAS,GAAG,IAAI,CAAC;IACvD;;OAEG;IACH,uBAAuB,CAAC,CAAC,KAAK,EAAE,KAAK,EAAE,KAAK,EAAE,CAAC,GAAG,IAAI,CAAC;CACxD;AAWD;;;;GAIG;AACH,iBAAS,mBAAmB,CAAC,eAAe,CAAC,EAAE,OAAO,CAAC,qBAAqB,CAAC,GAAG,GAAG,CA4ClF;AAED,OAAO,EAAE,mBAAmB,EAAE,CAAC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"sdk.d.ts","sourceRoot":"","sources":["../../src/sdk.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,cAAc,EAAoC,MAAM,iBAAiB,CAAC;AAEnF;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,IAAI,CAalD"}
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { Transaction, TransactionContext } from '@sentry/types';
|
|
2
|
+
export declare type Action = 'PUSH' | 'REPLACE' | 'POP';
|
|
3
|
+
export declare type Location = {
|
|
4
|
+
pathname: string;
|
|
5
|
+
action?: Action;
|
|
6
|
+
} & Record<string, any>;
|
|
7
|
+
export declare type ReactRouterInstrumentation = <T extends Transaction>(startTransaction: (context: TransactionContext) => T | undefined, startTransactionOnPageLoad?: boolean, startTransactionOnLocationChange?: boolean) => void;
|
|
8
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAE,kBAAkB,EAAE,MAAM,eAAe,CAAC;AAEhE,oBAAY,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,KAAK,CAAC;AAEhD,oBAAY,QAAQ,GAAG;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CAEjB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAExB,oBAAY,0BAA0B,GAAG,CAAC,CAAC,SAAS,WAAW,EAC7D,gBAAgB,EAAE,CAAC,OAAO,EAAE,kBAAkB,KAAK,CAAC,GAAG,SAAS,EAChE,0BAA0B,CAAC,EAAE,OAAO,EACpC,gCAAgC,CAAC,EAAE,OAAO,KACvC,IAAI,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/react",
|
|
3
|
-
"version": "6.19.
|
|
3
|
+
"version": "6.19.4",
|
|
4
4
|
"description": "Official Sentry SDK for React.js",
|
|
5
5
|
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
6
|
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/react",
|
|
@@ -11,24 +11,24 @@
|
|
|
11
11
|
},
|
|
12
12
|
"main": "dist/index.js",
|
|
13
13
|
"module": "esm/index.js",
|
|
14
|
-
"types": "
|
|
14
|
+
"types": "build/types/index.d.ts",
|
|
15
15
|
"publishConfig": {
|
|
16
16
|
"access": "public"
|
|
17
17
|
},
|
|
18
18
|
"dependencies": {
|
|
19
|
-
"@sentry/browser": "6.19.
|
|
20
|
-
"@sentry/minimal": "6.19.
|
|
21
|
-
"@sentry/types": "6.19.
|
|
22
|
-
"@sentry/utils": "6.19.
|
|
19
|
+
"@sentry/browser": "6.19.4",
|
|
20
|
+
"@sentry/minimal": "6.19.4",
|
|
21
|
+
"@sentry/types": "6.19.4",
|
|
22
|
+
"@sentry/utils": "6.19.4",
|
|
23
23
|
"hoist-non-react-statics": "^3.3.2",
|
|
24
24
|
"tslib": "^1.9.3"
|
|
25
25
|
},
|
|
26
26
|
"peerDependencies": {
|
|
27
|
-
"react": "15.x || 16.x || 17.x"
|
|
27
|
+
"react": "15.x || 16.x || 17.x || 18.x"
|
|
28
28
|
},
|
|
29
29
|
"devDependencies": {
|
|
30
|
-
"@testing-library/react": "^
|
|
31
|
-
"@testing-library/react-hooks": "^
|
|
30
|
+
"@testing-library/react": "^13.0.0",
|
|
31
|
+
"@testing-library/react-hooks": "^7.0.2",
|
|
32
32
|
"@types/history-4": "npm:@types/history@4.7.8",
|
|
33
33
|
"@types/history-5": "npm:@types/history@4.7.8",
|
|
34
34
|
"@types/hoist-non-react-statics": "^3.3.1",
|
|
@@ -41,12 +41,11 @@
|
|
|
41
41
|
"history-4": "npm:history@4.6.0",
|
|
42
42
|
"history-5": "npm:history@4.9.0",
|
|
43
43
|
"jsdom": "^16.2.2",
|
|
44
|
-
"react": "^
|
|
45
|
-
"react-dom": "^
|
|
44
|
+
"react": "^18.0.0",
|
|
45
|
+
"react-dom": "^18.0.0",
|
|
46
46
|
"react-router-3": "npm:react-router@3.2.0",
|
|
47
47
|
"react-router-4": "npm:react-router@4.1.0",
|
|
48
48
|
"react-router-5": "npm:react-router@5.0.0",
|
|
49
|
-
"react-test-renderer": "^16.13.1",
|
|
50
49
|
"redux": "^4.0.5"
|
|
51
50
|
},
|
|
52
51
|
"scripts": {
|
|
@@ -67,11 +66,11 @@
|
|
|
67
66
|
"clean": "rimraf dist esm build coverage",
|
|
68
67
|
"fix": "run-s fix:eslint fix:prettier",
|
|
69
68
|
"fix:eslint": "eslint . --format stylish --fix",
|
|
70
|
-
"fix:prettier": "prettier --write \"{src,test}/**/*.ts\"",
|
|
69
|
+
"fix:prettier": "prettier --write \"{src,test,scripts}/**/*.ts\"",
|
|
71
70
|
"link:yarn": "yarn link",
|
|
72
71
|
"lint": "run-s lint:prettier lint:eslint",
|
|
73
72
|
"lint:eslint": "eslint . --cache --cache-location '../../eslintcache/' --format stylish",
|
|
74
|
-
"lint:prettier": "prettier --check \"{src,test}/**/*.ts\"",
|
|
73
|
+
"lint:prettier": "prettier --check \"{src,test,scripts}/**/*.ts\"",
|
|
75
74
|
"test": "jest",
|
|
76
75
|
"test:watch": "jest --watch"
|
|
77
76
|
},
|