@depup/sentry__react 10.44.0-depup.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/LICENSE +21 -0
- package/README.md +25 -0
- package/build/cjs/constants.js +12 -0
- package/build/cjs/constants.js.map +1 -0
- package/build/cjs/debug-build.js +11 -0
- package/build/cjs/debug-build.js.map +1 -0
- package/build/cjs/error.js +113 -0
- package/build/cjs/error.js.map +1 -0
- package/build/cjs/errorboundary.js +170 -0
- package/build/cjs/errorboundary.js.map +1 -0
- package/build/cjs/hoist-non-react-statics.js +159 -0
- package/build/cjs/hoist-non-react-statics.js.map +1 -0
- package/build/cjs/index.js +51 -0
- package/build/cjs/index.js.map +1 -0
- package/build/cjs/profiler.js +226 -0
- package/build/cjs/profiler.js.map +1 -0
- package/build/cjs/reactrouter-compat-utils/instrumentation.js +1295 -0
- package/build/cjs/reactrouter-compat-utils/instrumentation.js.map +1 -0
- package/build/cjs/reactrouter-compat-utils/lazy-routes.js +160 -0
- package/build/cjs/reactrouter-compat-utils/lazy-routes.js.map +1 -0
- package/build/cjs/reactrouter-compat-utils/route-manifest.js +194 -0
- package/build/cjs/reactrouter-compat-utils/route-manifest.js.map +1 -0
- package/build/cjs/reactrouter-compat-utils/utils.js +336 -0
- package/build/cjs/reactrouter-compat-utils/utils.js.map +1 -0
- package/build/cjs/reactrouter.js +236 -0
- package/build/cjs/reactrouter.js.map +1 -0
- package/build/cjs/reactrouterv3.js +130 -0
- package/build/cjs/reactrouterv3.js.map +1 -0
- package/build/cjs/reactrouterv6.js +61 -0
- package/build/cjs/reactrouterv6.js.map +1 -0
- package/build/cjs/reactrouterv7.js +61 -0
- package/build/cjs/reactrouterv7.js.map +1 -0
- package/build/cjs/redux.js +106 -0
- package/build/cjs/redux.js.map +1 -0
- package/build/cjs/sdk.js +21 -0
- package/build/cjs/sdk.js.map +1 -0
- package/build/cjs/tanstackrouter.js +134 -0
- package/build/cjs/tanstackrouter.js.map +1 -0
- package/build/esm/constants.js +8 -0
- package/build/esm/constants.js.map +1 -0
- package/build/esm/debug-build.js +9 -0
- package/build/esm/debug-build.js.map +1 -0
- package/build/esm/error.js +108 -0
- package/build/esm/error.js.map +1 -0
- package/build/esm/errorboundary.js +166 -0
- package/build/esm/errorboundary.js.map +1 -0
- package/build/esm/hoist-non-react-statics.js +157 -0
- package/build/esm/hoist-non-react-statics.js.map +1 -0
- package/build/esm/index.js +12 -0
- package/build/esm/index.js.map +1 -0
- package/build/esm/package.json +1 -0
- package/build/esm/profiler.js +221 -0
- package/build/esm/profiler.js.map +1 -0
- package/build/esm/reactrouter-compat-utils/instrumentation.js +1281 -0
- package/build/esm/reactrouter-compat-utils/instrumentation.js.map +1 -0
- package/build/esm/reactrouter-compat-utils/lazy-routes.js +156 -0
- package/build/esm/reactrouter-compat-utils/lazy-routes.js.map +1 -0
- package/build/esm/reactrouter-compat-utils/route-manifest.js +191 -0
- package/build/esm/reactrouter-compat-utils/route-manifest.js.map +1 -0
- package/build/esm/reactrouter-compat-utils/utils.js +320 -0
- package/build/esm/reactrouter-compat-utils/utils.js.map +1 -0
- package/build/esm/reactrouter.js +232 -0
- package/build/esm/reactrouter.js.map +1 -0
- package/build/esm/reactrouterv3.js +128 -0
- package/build/esm/reactrouterv3.js.map +1 -0
- package/build/esm/reactrouterv6.js +55 -0
- package/build/esm/reactrouterv6.js.map +1 -0
- package/build/esm/reactrouterv7.js +55 -0
- package/build/esm/reactrouterv7.js.map +1 -0
- package/build/esm/redux.js +104 -0
- package/build/esm/redux.js.map +1 -0
- package/build/esm/sdk.js +19 -0
- package/build/esm/sdk.js.map +1 -0
- package/build/esm/tanstackrouter.js +132 -0
- package/build/esm/tanstackrouter.js.map +1 -0
- package/build/types/constants.d.ts +4 -0
- package/build/types/constants.d.ts.map +1 -0
- package/build/types/debug-build.d.ts +7 -0
- package/build/types/debug-build.d.ts.map +1 -0
- package/build/types/error.d.ts +41 -0
- package/build/types/error.d.ts.map +1 -0
- package/build/types/errorboundary.d.ts +87 -0
- package/build/types/errorboundary.d.ts.map +1 -0
- package/build/types/hoist-non-react-statics.d.ts +21 -0
- package/build/types/hoist-non-react-statics.d.ts.map +1 -0
- package/build/types/index.d.ts +13 -0
- package/build/types/index.d.ts.map +1 -0
- package/build/types/profiler.d.ts +56 -0
- package/build/types/profiler.d.ts.map +1 -0
- package/build/types/reactrouter-compat-utils/index.d.ts +5 -0
- package/build/types/reactrouter-compat-utils/index.d.ts.map +1 -0
- package/build/types/reactrouter-compat-utils/instrumentation.d.ts +117 -0
- package/build/types/reactrouter-compat-utils/instrumentation.d.ts.map +1 -0
- package/build/types/reactrouter-compat-utils/lazy-routes.d.ts +18 -0
- package/build/types/reactrouter-compat-utils/lazy-routes.d.ts.map +1 -0
- package/build/types/reactrouter-compat-utils/route-manifest.d.ts +13 -0
- package/build/types/reactrouter-compat-utils/route-manifest.d.ts.map +1 -0
- package/build/types/reactrouter-compat-utils/utils.d.ts +71 -0
- package/build/types/reactrouter-compat-utils/utils.d.ts.map +1 -0
- package/build/types/reactrouter.d.ts +41 -0
- package/build/types/reactrouter.d.ts.map +1 -0
- package/build/types/reactrouterv3.d.ts +29 -0
- package/build/types/reactrouterv3.d.ts.map +1 -0
- package/build/types/reactrouterv6.d.ts +32 -0
- package/build/types/reactrouterv6.d.ts.map +1 -0
- package/build/types/reactrouterv7.d.ts +32 -0
- package/build/types/reactrouterv7.d.ts.map +1 -0
- package/build/types/redux.d.ts +38 -0
- package/build/types/redux.d.ts.map +1 -0
- package/build/types/sdk.d.ts +7 -0
- package/build/types/sdk.d.ts.map +1 -0
- package/build/types/tanstackrouter.d.ts +13 -0
- package/build/types/tanstackrouter.d.ts.map +1 -0
- package/build/types/types.d.ts +163 -0
- package/build/types/types.d.ts.map +1 -0
- package/build/types/vendor/tanstackrouter-types.d.ts +36 -0
- package/build/types/vendor/tanstackrouter-types.d.ts.map +1 -0
- package/build/types-ts3.8/constants.d.ts +4 -0
- package/build/types-ts3.8/debug-build.d.ts +7 -0
- package/build/types-ts3.8/error.d.ts +41 -0
- package/build/types-ts3.8/errorboundary.d.ts +87 -0
- package/build/types-ts3.8/hoist-non-react-statics.d.ts +21 -0
- package/build/types-ts3.8/index.d.ts +13 -0
- package/build/types-ts3.8/profiler.d.ts +56 -0
- package/build/types-ts3.8/reactrouter-compat-utils/index.d.ts +5 -0
- package/build/types-ts3.8/reactrouter-compat-utils/instrumentation.d.ts +117 -0
- package/build/types-ts3.8/reactrouter-compat-utils/lazy-routes.d.ts +18 -0
- package/build/types-ts3.8/reactrouter-compat-utils/route-manifest.d.ts +13 -0
- package/build/types-ts3.8/reactrouter-compat-utils/utils.d.ts +77 -0
- package/build/types-ts3.8/reactrouter.d.ts +41 -0
- package/build/types-ts3.8/reactrouterv3.d.ts +29 -0
- package/build/types-ts3.8/reactrouterv6.d.ts +32 -0
- package/build/types-ts3.8/reactrouterv7.d.ts +32 -0
- package/build/types-ts3.8/redux.d.ts +38 -0
- package/build/types-ts3.8/sdk.d.ts +7 -0
- package/build/types-ts3.8/tanstackrouter.d.ts +13 -0
- package/build/types-ts3.8/types.d.ts +163 -0
- package/build/types-ts3.8/vendor/tanstackrouter-types.d.ts +36 -0
- package/changes.json +5 -0
- package/package.json +108 -0
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
import type { Scope } from '@sentry/core';
|
|
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
|
+
* Redux state in attachments or not.
|
|
11
|
+
* @default true
|
|
12
|
+
*/
|
|
13
|
+
attachReduxState?: boolean;
|
|
14
|
+
/**
|
|
15
|
+
* Transforms the state before attaching it to an event.
|
|
16
|
+
* Use this to remove any private data before sending it to Sentry.
|
|
17
|
+
* Return null to not attach the state.
|
|
18
|
+
*/
|
|
19
|
+
stateTransformer(state: S | undefined): (S & any) | null;
|
|
20
|
+
/**
|
|
21
|
+
* Transforms the action before sending it as a breadcrumb.
|
|
22
|
+
* Use this to remove any private data before sending it to Sentry.
|
|
23
|
+
* Return null to not send the breadcrumb.
|
|
24
|
+
*/
|
|
25
|
+
actionTransformer(action: AnyAction): AnyAction | null;
|
|
26
|
+
/**
|
|
27
|
+
* Called on every state update, configure the Sentry Scope with the redux state.
|
|
28
|
+
*/
|
|
29
|
+
configureScopeWithState?(scope: Scope, state: S): void;
|
|
30
|
+
}
|
|
31
|
+
/**
|
|
32
|
+
* Creates an enhancer that would be passed to Redux's createStore to log actions and the latest state to Sentry.
|
|
33
|
+
*
|
|
34
|
+
* @param enhancerOptions Options to pass to the enhancer
|
|
35
|
+
*/
|
|
36
|
+
declare function createReduxEnhancer(enhancerOptions?: Partial<SentryEnhancerOptions>): any;
|
|
37
|
+
export { createReduxEnhancer };
|
|
38
|
+
//# sourceMappingURL=redux.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"redux.d.ts","sourceRoot":"","sources":["../../src/redux.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,cAAc,CAAC;AAG1C,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;AAwCD,MAAM,WAAW,qBAAqB,CAAC,CAAC,GAAG,GAAG;IAC5C;;;OAGG;IACH,gBAAgB,CAAC,EAAE,OAAO,CAAC;IAE3B;;;;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,CAoFlF;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,KAAK,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEtD,OAAO,KAAK,EAAE,MAAM,EAAE,MAAM,cAAc,CAAC;AAI3C;;GAEG;AACH,wBAAgB,IAAI,CAAC,OAAO,EAAE,cAAc,GAAG,MAAM,GAAG,SAAS,CAQhE"}
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { browserTracingIntegration as originalBrowserTracingIntegration } from '@sentry/browser';
|
|
2
|
+
import type { Integration } from '@sentry/core';
|
|
3
|
+
/**
|
|
4
|
+
* A custom browser tracing integration for TanStack Router.
|
|
5
|
+
*
|
|
6
|
+
* The minimum compatible version of `@tanstack/react-router` is `1.64.0`.
|
|
7
|
+
*
|
|
8
|
+
* @param router A TanStack Router `Router` instance that should be used for routing instrumentation.
|
|
9
|
+
* @param options Sentry browser tracing configuration.
|
|
10
|
+
*/
|
|
11
|
+
export declare function tanstackRouterBrowserTracingIntegration(router: any, // This is `any` because we don't want any type mismatches if TanStack Router changes their types
|
|
12
|
+
options?: Parameters<typeof originalBrowserTracingIntegration>[0]): Integration;
|
|
13
|
+
//# sourceMappingURL=tanstackrouter.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tanstackrouter.d.ts","sourceRoot":"","sources":["../../src/tanstackrouter.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,yBAAyB,IAAI,iCAAiC,EAI/D,MAAM,iBAAiB,CAAC;AACzB,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAQhD;;;;;;;GAOG;AACH,wBAAgB,uCAAuC,CAErD,MAAM,EAAE,GAAG,EAAE,iGAAiG;AAC9G,OAAO,GAAE,UAAU,CAAC,OAAO,iCAAiC,CAAC,CAAC,CAAC,CAAM,GACpE,WAAW,CAkGb"}
|
|
@@ -0,0 +1,163 @@
|
|
|
1
|
+
import type { ReactElement } from 'react';
|
|
2
|
+
export type Action = 'PUSH' | 'REPLACE' | 'POP';
|
|
3
|
+
export type Location = {
|
|
4
|
+
pathname: string;
|
|
5
|
+
action?: Action;
|
|
6
|
+
} & Record<string, any>;
|
|
7
|
+
export interface NonIndexRouteObject {
|
|
8
|
+
caseSensitive?: boolean;
|
|
9
|
+
children?: RouteObject[];
|
|
10
|
+
handle?: Record<string, any>;
|
|
11
|
+
element?: React.ReactNode | null;
|
|
12
|
+
errorElement?: React.ReactNode | null;
|
|
13
|
+
index?: any;
|
|
14
|
+
path?: string;
|
|
15
|
+
}
|
|
16
|
+
export interface IndexRouteObject {
|
|
17
|
+
caseSensitive?: boolean;
|
|
18
|
+
children?: undefined;
|
|
19
|
+
handle?: Record<string, any>;
|
|
20
|
+
element?: React.ReactNode | null;
|
|
21
|
+
errorElement?: React.ReactNode | null;
|
|
22
|
+
index: any;
|
|
23
|
+
path?: string;
|
|
24
|
+
}
|
|
25
|
+
export type RouteObject = (IndexRouteObject | NonIndexRouteObject) & Record<string, any>;
|
|
26
|
+
export type Params<Key extends string = string> = {
|
|
27
|
+
readonly [key in Key]: string | undefined;
|
|
28
|
+
};
|
|
29
|
+
export type UseRoutes = (routes: RouteObject[], locationArg?: Partial<Location> | string) => React.ReactElement | null;
|
|
30
|
+
export interface RouteMatch<ParamKey extends string = string> {
|
|
31
|
+
/**
|
|
32
|
+
* The names and values of dynamic parameters in the URL.
|
|
33
|
+
*/
|
|
34
|
+
params: Params<ParamKey>;
|
|
35
|
+
/**
|
|
36
|
+
* The portion of the URL pathname that was matched.
|
|
37
|
+
*/
|
|
38
|
+
pathname: string;
|
|
39
|
+
/**
|
|
40
|
+
* The portion of the URL pathname that was matched before child routes.
|
|
41
|
+
*/
|
|
42
|
+
pathnameBase: string;
|
|
43
|
+
/**
|
|
44
|
+
* The route object that was used to match.
|
|
45
|
+
*/
|
|
46
|
+
route: RouteObject;
|
|
47
|
+
}
|
|
48
|
+
export type UseEffect = (cb: () => void, deps: unknown[]) => void;
|
|
49
|
+
export type UseLocation = () => Location;
|
|
50
|
+
export type UseNavigationType = () => Action;
|
|
51
|
+
export type RouteObjectArrayAlias = any;
|
|
52
|
+
export type RouteMatchAlias = any;
|
|
53
|
+
export type CreateRoutesFromChildren = (children: ReactElement[]) => RouteObjectArrayAlias;
|
|
54
|
+
export type MatchRoutes = (routes: RouteObjectArrayAlias, location: Location, basename?: string) => RouteMatchAlias[] | null;
|
|
55
|
+
export type ShouldRevalidateFunction = (args: any) => boolean;
|
|
56
|
+
interface DataFunctionArgs {
|
|
57
|
+
request: Request;
|
|
58
|
+
params: Params;
|
|
59
|
+
}
|
|
60
|
+
type LoaderFunctionArgs = DataFunctionArgs;
|
|
61
|
+
type ActionFunctionArgs = DataFunctionArgs;
|
|
62
|
+
export interface LoaderFunction {
|
|
63
|
+
(args: LoaderFunctionArgs): Promise<Response> | Response | Promise<any> | any;
|
|
64
|
+
}
|
|
65
|
+
export interface ActionFunction {
|
|
66
|
+
(args: ActionFunctionArgs): Promise<Response> | Response | Promise<any> | any;
|
|
67
|
+
}
|
|
68
|
+
declare type AgnosticBaseRouteObject = {
|
|
69
|
+
caseSensitive?: boolean;
|
|
70
|
+
path?: string;
|
|
71
|
+
id?: string;
|
|
72
|
+
loader?: LoaderFunction;
|
|
73
|
+
action?: ActionFunction;
|
|
74
|
+
hasErrorBoundary?: boolean;
|
|
75
|
+
shouldRevalidate?: ShouldRevalidateFunction;
|
|
76
|
+
handle?: any;
|
|
77
|
+
};
|
|
78
|
+
export declare type AgnosticIndexRouteObject = AgnosticBaseRouteObject & Record<string, any>;
|
|
79
|
+
export declare type AgnosticNonIndexRouteObject = AgnosticBaseRouteObject & Record<string, any>;
|
|
80
|
+
export declare type AgnosticDataIndexRouteObject = AgnosticIndexRouteObject & {
|
|
81
|
+
id: string;
|
|
82
|
+
};
|
|
83
|
+
export declare type AgnosticDataNonIndexRouteObject = AgnosticNonIndexRouteObject & {
|
|
84
|
+
children?: AgnosticDataRouteObject[];
|
|
85
|
+
id: string;
|
|
86
|
+
};
|
|
87
|
+
export interface AgnosticRouteMatch<ParamKey extends string = string, RouteObjectType extends AgnosticRouteObject = AgnosticRouteObject> {
|
|
88
|
+
params: Params<ParamKey>;
|
|
89
|
+
pathname: string;
|
|
90
|
+
pathnameBase: string;
|
|
91
|
+
route: RouteObjectType;
|
|
92
|
+
}
|
|
93
|
+
export type AgnosticDataRouteMatch = AgnosticRouteMatch<string, AgnosticDataRouteObject>;
|
|
94
|
+
interface UseMatchesMatch {
|
|
95
|
+
id: string;
|
|
96
|
+
pathname: string;
|
|
97
|
+
params: AgnosticRouteMatch['params'];
|
|
98
|
+
data: unknown;
|
|
99
|
+
handle: unknown;
|
|
100
|
+
}
|
|
101
|
+
export interface GetScrollRestorationKeyFunction {
|
|
102
|
+
(location: Location, matches: UseMatchesMatch[]): string | null;
|
|
103
|
+
}
|
|
104
|
+
export interface Path {
|
|
105
|
+
pathname: string;
|
|
106
|
+
search: string;
|
|
107
|
+
hash: string;
|
|
108
|
+
}
|
|
109
|
+
export interface RouterSubscriber<TState extends RouterState = RouterState> {
|
|
110
|
+
(state: TState): void;
|
|
111
|
+
}
|
|
112
|
+
export interface GetScrollPositionFunction {
|
|
113
|
+
(): number;
|
|
114
|
+
}
|
|
115
|
+
declare type LinkNavigateOptions = {
|
|
116
|
+
replace?: boolean;
|
|
117
|
+
state?: any;
|
|
118
|
+
preventScrollReset?: boolean;
|
|
119
|
+
};
|
|
120
|
+
export declare type AgnosticDataRouteObject = AgnosticDataIndexRouteObject | AgnosticDataNonIndexRouteObject;
|
|
121
|
+
export declare type To = string | Partial<Path>;
|
|
122
|
+
export declare type HydrationState = any;
|
|
123
|
+
export declare type FormMethod = 'get' | 'post' | 'put' | 'patch' | 'delete';
|
|
124
|
+
export declare type FormEncType = 'application/x-www-form-urlencoded' | 'multipart/form-data';
|
|
125
|
+
export declare type RouterNavigateOptions = LinkNavigateOptions | SubmissionNavigateOptions;
|
|
126
|
+
export declare type AgnosticRouteObject = AgnosticIndexRouteObject | AgnosticNonIndexRouteObject;
|
|
127
|
+
declare type SubmissionNavigateOptions = {
|
|
128
|
+
replace?: boolean;
|
|
129
|
+
state?: any;
|
|
130
|
+
formMethod?: FormMethod;
|
|
131
|
+
formEncType?: FormEncType;
|
|
132
|
+
formData: FormData;
|
|
133
|
+
};
|
|
134
|
+
export interface RouterInit {
|
|
135
|
+
basename: string;
|
|
136
|
+
routes: AgnosticRouteObject[];
|
|
137
|
+
history: History;
|
|
138
|
+
hydrationData?: HydrationState;
|
|
139
|
+
}
|
|
140
|
+
export type NavigationState = {
|
|
141
|
+
state: 'idle' | 'loading' | 'submitting';
|
|
142
|
+
};
|
|
143
|
+
export type NavigationStates = {
|
|
144
|
+
Idle: NavigationState;
|
|
145
|
+
Loading: NavigationState;
|
|
146
|
+
Submitting: NavigationState;
|
|
147
|
+
};
|
|
148
|
+
export type Navigation = NavigationStates[keyof NavigationStates];
|
|
149
|
+
export type RouteData = any;
|
|
150
|
+
export type Fetcher = any;
|
|
151
|
+
type HistoryAction = 'POP' | 'PUSH' | 'REPLACE';
|
|
152
|
+
export interface RouterState {
|
|
153
|
+
historyAction: Action | HistoryAction | any;
|
|
154
|
+
location: Location;
|
|
155
|
+
navigation: Navigation;
|
|
156
|
+
}
|
|
157
|
+
export interface Router<TState extends RouterState = RouterState> {
|
|
158
|
+
state: TState;
|
|
159
|
+
subscribe(fn: RouterSubscriber<TState>): () => void;
|
|
160
|
+
}
|
|
161
|
+
export type CreateRouterFunction<TState extends RouterState = RouterState, TRouter extends Router<TState> = Router<TState>> = (routes: RouteObject[], opts?: any) => TRouter;
|
|
162
|
+
export {};
|
|
163
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,YAAY,EAAE,MAAM,OAAO,CAAC;AAE1C,MAAM,MAAM,MAAM,GAAG,MAAM,GAAG,SAAS,GAAG,KAAK,CAAC;AAEhD,MAAM,MAAM,QAAQ,GAAG;IACrB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,CAAC,EAAE,MAAM,CAAC;CACjB,GAAG,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;AAGxB,MAAM,WAAW,mBAAmB;IAClC,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,WAAW,EAAE,CAAC;IACzB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IACjC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IACtC,KAAK,CAAC,EAAE,GAAG,CAAC;IACZ,IAAI,CAAC,EAAE,MAAM,CAAC;CACf;AAED,MAAM,WAAW,gBAAgB;IAC/B,aAAa,CAAC,EAAE,OAAO,CAAC;IACxB,QAAQ,CAAC,EAAE,SAAS,CAAC;IACrB,MAAM,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;IAC7B,OAAO,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IACjC,YAAY,CAAC,EAAE,KAAK,CAAC,SAAS,GAAG,IAAI,CAAC;IACtC,KAAK,EAAE,GAAG,CAAC;IACX,IAAI,CAAC,EAAE,MAAM,CAAC;CACf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,CAAC;AAC5B,MAAM,MAAM,OAAO,GAAG,GAAG,CAAC;AAE1B,KAAK,aAAa,GAAG,KAAK,GAAG,MAAM,GAAG,SAAS,CAAC;AAEhD,MAAM,WAAW,WAAW;IAC1B,aAAa,EAAE,MAAM,GAAG,aAAa,GAAG,GAAG,CAAC;IAC5C,QAAQ,EAAE,QAAQ,CAAC;IACnB,UAAU,EAAE,UAAU,CAAC;CACxB;AACD,MAAM,WAAW,MAAM,CAAC,MAAM,SAAS,WAAW,GAAG,WAAW;IAC9D,KAAK,EAAE,MAAM,CAAC;IACd,SAAS,CAAC,EAAE,EAAE,gBAAgB,CAAC,MAAM,CAAC,GAAG,MAAM,IAAI,CAAC;CACrD;AAED,MAAM,MAAM,oBAAoB,CAC9B,MAAM,SAAS,WAAW,GAAG,WAAW,EACxC,OAAO,SAAS,MAAM,CAAC,MAAM,CAAC,GAAG,MAAM,CAAC,MAAM,CAAC,IAC7C,CAAC,MAAM,EAAE,WAAW,EAAE,EAAE,IAAI,CAAC,EAAE,GAAG,KAAK,OAAO,CAAC"}
|
|
@@ -0,0 +1,36 @@
|
|
|
1
|
+
export interface VendoredTanstackRouter {
|
|
2
|
+
history: VendoredTanstackRouterHistory;
|
|
3
|
+
state: VendoredTanstackRouterState;
|
|
4
|
+
options: {
|
|
5
|
+
parseSearch: (search: string) => Record<string, any>;
|
|
6
|
+
};
|
|
7
|
+
matchRoutes: (pathname: string, locationSearch: {}, opts?: {
|
|
8
|
+
preload?: boolean;
|
|
9
|
+
throwOnError?: boolean;
|
|
10
|
+
}) => Array<VendoredTanstackRouterRouteMatch>;
|
|
11
|
+
subscribe(eventType: 'onResolved' | 'onBeforeNavigate', callback: (stateUpdate: {
|
|
12
|
+
toLocation: VendoredTanstackRouterLocation;
|
|
13
|
+
fromLocation?: VendoredTanstackRouterLocation;
|
|
14
|
+
}) => void): () => void;
|
|
15
|
+
}
|
|
16
|
+
interface VendoredTanstackRouterLocation {
|
|
17
|
+
pathname: string;
|
|
18
|
+
search: {};
|
|
19
|
+
state: string;
|
|
20
|
+
}
|
|
21
|
+
interface VendoredTanstackRouterHistory {
|
|
22
|
+
subscribe: (cb: () => void) => () => void;
|
|
23
|
+
}
|
|
24
|
+
interface VendoredTanstackRouterState {
|
|
25
|
+
matches: Array<VendoredTanstackRouterRouteMatch>;
|
|
26
|
+
pendingMatches?: Array<VendoredTanstackRouterRouteMatch>;
|
|
27
|
+
}
|
|
28
|
+
export interface VendoredTanstackRouterRouteMatch {
|
|
29
|
+
routeId: string;
|
|
30
|
+
pathname: string;
|
|
31
|
+
params: {
|
|
32
|
+
[key: string]: string;
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
export {};
|
|
36
|
+
//# sourceMappingURL=tanstackrouter-types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"tanstackrouter-types.d.ts","sourceRoot":"","sources":["../../../src/vendor/tanstackrouter-types.ts"],"names":[],"mappings":"AA4BA,MAAM,WAAW,sBAAsB;IACrC,OAAO,EAAE,6BAA6B,CAAC;IACvC,KAAK,EAAE,2BAA2B,CAAC;IACnC,OAAO,EAAE;QAEP,WAAW,EAAE,CAAC,MAAM,EAAE,MAAM,KAAK,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,CAAC;KACtD,CAAC;IACF,WAAW,EAAE,CACX,QAAQ,EAAE,MAAM,EAEhB,cAAc,EAAE,EAAE,EAClB,IAAI,CAAC,EAAE;QACL,OAAO,CAAC,EAAE,OAAO,CAAC;QAClB,YAAY,CAAC,EAAE,OAAO,CAAC;KACxB,KACE,KAAK,CAAC,gCAAgC,CAAC,CAAC;IAC7C,SAAS,CACP,SAAS,EAAE,YAAY,GAAG,kBAAkB,EAC5C,QAAQ,EAAE,CAAC,WAAW,EAAE;QACtB,UAAU,EAAE,8BAA8B,CAAC;QAC3C,YAAY,CAAC,EAAE,8BAA8B,CAAC;KAC/C,KAAK,IAAI,GACT,MAAM,IAAI,CAAC;CACf;AAED,UAAU,8BAA8B;IACtC,QAAQ,EAAE,MAAM,CAAC;IAEjB,MAAM,EAAE,EAAE,CAAC;IACX,KAAK,EAAE,MAAM,CAAC;CACf;AAED,UAAU,6BAA6B;IACrC,SAAS,EAAE,CAAC,EAAE,EAAE,MAAM,IAAI,KAAK,MAAM,IAAI,CAAC;CAC3C;AAED,UAAU,2BAA2B;IACnC,OAAO,EAAE,KAAK,CAAC,gCAAgC,CAAC,CAAC;IACjD,cAAc,CAAC,EAAE,KAAK,CAAC,gCAAgC,CAAC,CAAC;CAC1D;AAED,MAAM,WAAW,gCAAgC;IAC/C,OAAO,EAAE,MAAM,CAAC;IAChB,QAAQ,EAAE,MAAM,CAAC;IACjB,MAAM,EAAE;QAAE,CAAC,GAAG,EAAE,MAAM,GAAG,MAAM,CAAA;KAAE,CAAC;CACnC"}
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* This serves as a build time flag that will be true by default, but false in non-debug builds or if users replace `__SENTRY_DEBUG__` in their generated code.
|
|
3
|
+
*
|
|
4
|
+
* ATTENTION: This constant must never cross package boundaries (i.e. be exported) to guarantee that it can be used for tree shaking.
|
|
5
|
+
*/
|
|
6
|
+
export declare const DEBUG_BUILD: boolean;
|
|
7
|
+
//# sourceMappingURL=debug-build.d.ts.map
|
|
@@ -0,0 +1,41 @@
|
|
|
1
|
+
import { captureException } from '@sentry/browser';
|
|
2
|
+
import { ErrorInfo } from 'react';
|
|
3
|
+
/**
|
|
4
|
+
* See if React major version is 17+ by parsing version string.
|
|
5
|
+
*/
|
|
6
|
+
export declare function isAtLeastReact17(reactVersion: string): boolean;
|
|
7
|
+
/**
|
|
8
|
+
* Recurse through `error.cause` chain to set cause on an error.
|
|
9
|
+
*/
|
|
10
|
+
export declare function setCause(error: Error & {
|
|
11
|
+
cause?: Error;
|
|
12
|
+
}, cause: Error): void;
|
|
13
|
+
/**
|
|
14
|
+
* Captures an error that was thrown by a React ErrorBoundary or React root.
|
|
15
|
+
*
|
|
16
|
+
* @param error The error to capture.
|
|
17
|
+
* @param errorInfo The errorInfo provided by React.
|
|
18
|
+
* @param hint Optional additional data to attach to the Sentry event.
|
|
19
|
+
* @returns the id of the captured Sentry event.
|
|
20
|
+
*/
|
|
21
|
+
export declare function captureReactException(error: any, { componentStack }: ErrorInfo, hint?: Parameters<typeof captureException>[1]): string;
|
|
22
|
+
/**
|
|
23
|
+
* Creates an error handler that can be used with the `onCaughtError`, `onUncaughtError`,
|
|
24
|
+
* and `onRecoverableError` options in `createRoot` and `hydrateRoot` React DOM methods.
|
|
25
|
+
*
|
|
26
|
+
* @param callback An optional callback that will be called after the error is captured.
|
|
27
|
+
* Use this to add custom handling for errors.
|
|
28
|
+
*
|
|
29
|
+
* @example
|
|
30
|
+
*
|
|
31
|
+
* ```JavaScript
|
|
32
|
+
* const root = createRoot(container, {
|
|
33
|
+
* onCaughtError: Sentry.reactErrorHandler(),
|
|
34
|
+
* onUncaughtError: Sentry.reactErrorHandler((error, errorInfo) => {
|
|
35
|
+
* console.warn('Caught error', error, errorInfo.componentStack);
|
|
36
|
+
* });
|
|
37
|
+
* });
|
|
38
|
+
* ```
|
|
39
|
+
*/
|
|
40
|
+
export declare function reactErrorHandler(callback?: (error: any, errorInfo: ErrorInfo, eventId: string) => void): (error: any, errorInfo: ErrorInfo) => void;
|
|
41
|
+
//# sourceMappingURL=error.d.ts.map
|
|
@@ -0,0 +1,87 @@
|
|
|
1
|
+
import { ReportDialogOptions } from '@sentry/browser';
|
|
2
|
+
import { Scope } from '@sentry/core';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
export declare const UNKNOWN_COMPONENT = "unknown";
|
|
5
|
+
export type FallbackRender = (errorData: {
|
|
6
|
+
error: unknown;
|
|
7
|
+
componentStack: string;
|
|
8
|
+
eventId: string;
|
|
9
|
+
resetError(): void;
|
|
10
|
+
}) => React.ReactElement;
|
|
11
|
+
type OnUnmountType = {
|
|
12
|
+
(error: null, componentStack: null, eventId: null): void;
|
|
13
|
+
(error: unknown, componentStack: string, eventId: string): void;
|
|
14
|
+
};
|
|
15
|
+
export type ErrorBoundaryProps = {
|
|
16
|
+
children?: React.ReactNode | (() => React.ReactNode);
|
|
17
|
+
/** If a Sentry report dialog should be rendered on error */
|
|
18
|
+
showDialog?: boolean | undefined;
|
|
19
|
+
/**
|
|
20
|
+
* Options to be passed into the Sentry report dialog.
|
|
21
|
+
* No-op if {@link showDialog} is false.
|
|
22
|
+
*/
|
|
23
|
+
dialogOptions?: ReportDialogOptions | undefined;
|
|
24
|
+
/**
|
|
25
|
+
* A fallback component that gets rendered when the error boundary encounters an error.
|
|
26
|
+
*
|
|
27
|
+
* Can either provide a React Component, or a function that returns React Component as
|
|
28
|
+
* a valid fallback prop. If a function is provided, the function will be called with
|
|
29
|
+
* the error, the component stack, and an function that resets the error boundary on error.
|
|
30
|
+
*
|
|
31
|
+
*/
|
|
32
|
+
fallback?: React.ReactElement | FallbackRender | undefined;
|
|
33
|
+
/**
|
|
34
|
+
* If set to `true` or `false`, the error `handled` property will be set to the given value.
|
|
35
|
+
* If unset, the default behaviour is to rely on the presence of the `fallback` prop to determine
|
|
36
|
+
* if the error was handled or not.
|
|
37
|
+
*/
|
|
38
|
+
handled?: boolean | undefined;
|
|
39
|
+
/** Called when the error boundary encounters an error */
|
|
40
|
+
onError?: ((error: unknown, componentStack: string, eventId: string) => void) | undefined;
|
|
41
|
+
/** Called on componentDidMount() */
|
|
42
|
+
onMount?: (() => void) | undefined;
|
|
43
|
+
/**
|
|
44
|
+
* Called when the error boundary resets due to a reset call from the
|
|
45
|
+
* fallback render props function.
|
|
46
|
+
*/
|
|
47
|
+
onReset?: ((error: unknown, componentStack: string, eventId: string) => void) | undefined;
|
|
48
|
+
/**
|
|
49
|
+
* Called on componentWillUnmount() with the error, componentStack, and eventId.
|
|
50
|
+
*
|
|
51
|
+
* If the error boundary never encountered an error, the error
|
|
52
|
+
* componentStack, and eventId will be null.
|
|
53
|
+
*/
|
|
54
|
+
onUnmount?: OnUnmountType | undefined;
|
|
55
|
+
/** Called before the error is captured by Sentry, allows for you to add tags or context using the scope */
|
|
56
|
+
beforeCapture?: ((scope: Scope, error: unknown, componentStack: string) => void) | undefined;
|
|
57
|
+
};
|
|
58
|
+
type ErrorBoundaryState = {
|
|
59
|
+
componentStack: null;
|
|
60
|
+
error: null;
|
|
61
|
+
eventId: null;
|
|
62
|
+
} | {
|
|
63
|
+
componentStack: React.ErrorInfo['componentStack'];
|
|
64
|
+
error: unknown;
|
|
65
|
+
eventId: string;
|
|
66
|
+
};
|
|
67
|
+
/**
|
|
68
|
+
* A ErrorBoundary component that logs errors to Sentry.
|
|
69
|
+
* NOTE: If you are a Sentry user, and you are seeing this stack frame, it means the
|
|
70
|
+
* Sentry React SDK ErrorBoundary caught an error invoking your application code. This
|
|
71
|
+
* is expected behavior and NOT indicative of a bug with the Sentry React SDK.
|
|
72
|
+
*/
|
|
73
|
+
declare class ErrorBoundary extends React.Component<ErrorBoundaryProps, ErrorBoundaryState> {
|
|
74
|
+
state: ErrorBoundaryState;
|
|
75
|
+
private readonly _openFallbackReportDialog;
|
|
76
|
+
private _lastEventId?;
|
|
77
|
+
private _cleanupHook?;
|
|
78
|
+
constructor(props: ErrorBoundaryProps);
|
|
79
|
+
componentDidCatch(error: unknown, errorInfo: React.ErrorInfo): void;
|
|
80
|
+
componentDidMount(): void;
|
|
81
|
+
componentWillUnmount(): void;
|
|
82
|
+
resetErrorBoundary(): void;
|
|
83
|
+
render(): React.ReactNode;
|
|
84
|
+
}
|
|
85
|
+
declare function withErrorBoundary<P extends Record<string, any>>(WrappedComponent: React.ComponentType<P>, errorBoundaryOptions: ErrorBoundaryProps): React.FC<P>;
|
|
86
|
+
export { ErrorBoundary, withErrorBoundary };
|
|
87
|
+
//# sourceMappingURL=errorboundary.d.ts.map
|
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Inlined implementation of hoist-non-react-statics
|
|
3
|
+
* Original library: https://github.com/mridgway/hoist-non-react-statics
|
|
4
|
+
* License: BSD-3-Clause
|
|
5
|
+
* Copyright 2015, Yahoo! Inc.
|
|
6
|
+
*
|
|
7
|
+
* This is an inlined version to avoid ESM compatibility issues with the original package.
|
|
8
|
+
*/
|
|
9
|
+
import * as React from 'react';
|
|
10
|
+
/**
|
|
11
|
+
* Copies non-react specific statics from a child component to a parent component.
|
|
12
|
+
* Similar to Object.assign, but copies all static properties from source to target,
|
|
13
|
+
* excluding React-specific statics and known JavaScript statics.
|
|
14
|
+
*
|
|
15
|
+
* @param targetComponent - The component to copy statics to
|
|
16
|
+
* @param sourceComponent - The component to copy statics from
|
|
17
|
+
* @param excludelist - An optional object of keys to exclude from hoisting
|
|
18
|
+
* @returns The target component with hoisted statics
|
|
19
|
+
*/
|
|
20
|
+
export declare function hoistNonReactStatics<T extends React.ComponentType<any>, S extends React.ComponentType<any>, C extends Record<string, boolean> = Record<string, never>>(targetComponent: T, sourceComponent: S, excludelist?: C): T;
|
|
21
|
+
//# sourceMappingURL=hoist-non-react-statics.d.ts.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
export * from '@sentry/browser';
|
|
2
|
+
export { init } from './sdk';
|
|
3
|
+
export { captureReactException, reactErrorHandler } from './error';
|
|
4
|
+
export { Profiler, withProfiler, useProfiler } from './profiler';
|
|
5
|
+
export { ErrorBoundaryProps, FallbackRender } from './errorboundary';
|
|
6
|
+
export { ErrorBoundary, withErrorBoundary } from './errorboundary';
|
|
7
|
+
export { createReduxEnhancer } from './redux';
|
|
8
|
+
export { reactRouterV3BrowserTracingIntegration } from './reactrouterv3';
|
|
9
|
+
export { tanstackRouterBrowserTracingIntegration } from './tanstackrouter';
|
|
10
|
+
export { withSentryRouting, reactRouterV4BrowserTracingIntegration, reactRouterV5BrowserTracingIntegration, } from './reactrouter';
|
|
11
|
+
export { reactRouterV6BrowserTracingIntegration, withSentryReactRouterV6Routing, wrapUseRoutesV6, wrapCreateBrowserRouterV6, wrapCreateMemoryRouterV6, } from './reactrouterv6';
|
|
12
|
+
export { reactRouterV7BrowserTracingIntegration, withSentryReactRouterV7Routing, wrapCreateBrowserRouterV7, wrapCreateMemoryRouterV7, wrapUseRoutesV7, } from './reactrouterv7';
|
|
13
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,56 @@
|
|
|
1
|
+
import { Span } from '@sentry/core';
|
|
2
|
+
import * as React from 'react';
|
|
3
|
+
export declare const UNKNOWN_COMPONENT = "unknown";
|
|
4
|
+
export type ProfilerProps = {
|
|
5
|
+
name: string;
|
|
6
|
+
disabled?: boolean;
|
|
7
|
+
includeRender?: boolean;
|
|
8
|
+
includeUpdates?: boolean;
|
|
9
|
+
children?: React.ReactNode;
|
|
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
|
+
/**
|
|
25
|
+
* The span that represents the duration of time between shouldComponentUpdate and componentDidUpdate
|
|
26
|
+
*/
|
|
27
|
+
protected _updateSpan: Span | undefined;
|
|
28
|
+
constructor(props: ProfilerProps);
|
|
29
|
+
componentDidMount(): void;
|
|
30
|
+
shouldComponentUpdate({ updateProps, includeUpdates }: ProfilerProps): boolean;
|
|
31
|
+
componentDidUpdate(): void;
|
|
32
|
+
componentWillUnmount(): void;
|
|
33
|
+
render(): React.ReactNode;
|
|
34
|
+
}
|
|
35
|
+
/**
|
|
36
|
+
* withProfiler is a higher order component that wraps a
|
|
37
|
+
* component in a {@link Profiler} component. It is recommended that
|
|
38
|
+
* the higher order component be used over the regular {@link Profiler} component.
|
|
39
|
+
*
|
|
40
|
+
* @param WrappedComponent component that is wrapped by Profiler
|
|
41
|
+
* @param options the {@link ProfilerProps} you can pass into the Profiler
|
|
42
|
+
*/
|
|
43
|
+
declare function withProfiler<P extends Record<string, any>>(WrappedComponent: React.ComponentType<P>, options?: Pick<Partial<ProfilerProps>, Exclude<keyof ProfilerProps, 'updateProps' | 'children'>>): React.FC<P>;
|
|
44
|
+
/**
|
|
45
|
+
*
|
|
46
|
+
* `useProfiler` is a React hook that profiles a React component.
|
|
47
|
+
*
|
|
48
|
+
* Requires React 16.8 or above.
|
|
49
|
+
* @param name displayName of component being profiled
|
|
50
|
+
*/
|
|
51
|
+
declare function useProfiler(name: string, options?: {
|
|
52
|
+
disabled?: boolean;
|
|
53
|
+
hasRenderSpan?: boolean;
|
|
54
|
+
}): void;
|
|
55
|
+
export { Profiler, useProfiler, withProfiler };
|
|
56
|
+
//# sourceMappingURL=profiler.d.ts.map
|
|
@@ -0,0 +1,5 @@
|
|
|
1
|
+
export { ReactRouterOptions } from './instrumentation';
|
|
2
|
+
export { createReactRouterV6CompatibleTracingIntegration, createV6CompatibleWithSentryReactRouterRouting, createV6CompatibleWrapCreateBrowserRouter, createV6CompatibleWrapCreateMemoryRouter, createV6CompatibleWrapUseRoutes, handleNavigation, addResolvedRoutesToParent, processResolvedRoutes, updateNavigationSpan, } from './instrumentation';
|
|
3
|
+
export { resolveRouteNameAndSource, getNormalizedName, initializeRouterUtils, locationIsInsideDescendantRoute, prefixWithSlash, rebuildRoutePathFromAllRoutes, pathEndsWithWildcard, pathIsWildcardAndHasChildren, getNumberOfUrlSegments, transactionNameHasWildcard, getActiveRootSpan, setNavigationContext, clearNavigationContext, getNavigationContext, } from './utils';
|
|
4
|
+
export { createAsyncHandlerProxy, handleAsyncHandlerResult, checkRouteForAsyncHandler } from './lazy-routes';
|
|
5
|
+
//# sourceMappingURL=index.d.ts.map
|
|
@@ -0,0 +1,117 @@
|
|
|
1
|
+
import { browserTracingIntegration } from '@sentry/browser';
|
|
2
|
+
import { Integration, Span } from '@sentry/core';
|
|
3
|
+
import * as React from 'react';
|
|
4
|
+
import { Action, AgnosticDataRouteMatch, CreateRouterFunction, CreateRoutesFromChildren, Location, MatchRoutes, RouteObject, Router, RouterState, UseEffect, UseLocation, UseNavigationType, UseRoutes } from '../types';
|
|
5
|
+
export declare const allRoutes: Set<RouteObject>;
|
|
6
|
+
/**
|
|
7
|
+
* Computes location key for duplicate detection. Normalizes undefined/null to empty strings.
|
|
8
|
+
* Exported for testing.
|
|
9
|
+
*/
|
|
10
|
+
export declare function computeLocationKey(location: Location): string;
|
|
11
|
+
/**
|
|
12
|
+
* Determines if a navigation should be skipped as a duplicate, and if an existing span should be updated.
|
|
13
|
+
* Exported for testing.
|
|
14
|
+
*
|
|
15
|
+
* @returns An object with:
|
|
16
|
+
* - skip: boolean - Whether to skip creating a new span
|
|
17
|
+
* - shouldUpdate: boolean - Whether to update the existing span name (wildcard upgrade)
|
|
18
|
+
*/
|
|
19
|
+
export declare function shouldSkipNavigation(trackedNav: {
|
|
20
|
+
span: Span;
|
|
21
|
+
routeName: string;
|
|
22
|
+
pathname: string;
|
|
23
|
+
locationKey: string;
|
|
24
|
+
isPlaceholder?: boolean;
|
|
25
|
+
} | undefined, locationKey: string, proposedName: string, spanHasEnded: boolean): {
|
|
26
|
+
skip: boolean;
|
|
27
|
+
shouldUpdate: boolean;
|
|
28
|
+
};
|
|
29
|
+
export interface ReactRouterOptions {
|
|
30
|
+
useEffect: UseEffect;
|
|
31
|
+
useLocation: UseLocation;
|
|
32
|
+
useNavigationType: UseNavigationType;
|
|
33
|
+
createRoutesFromChildren: CreateRoutesFromChildren;
|
|
34
|
+
matchRoutes: MatchRoutes;
|
|
35
|
+
/**
|
|
36
|
+
* Whether to strip the basename from the pathname when creating transactions.
|
|
37
|
+
*
|
|
38
|
+
* This is useful for applications that use a basename in their routing setup.
|
|
39
|
+
* @default false
|
|
40
|
+
*/
|
|
41
|
+
stripBasename?: boolean;
|
|
42
|
+
/**
|
|
43
|
+
* Enables support for async route handlers.
|
|
44
|
+
*
|
|
45
|
+
* This allows Sentry to track and instrument routes dynamically resolved from async handlers.
|
|
46
|
+
* @default false
|
|
47
|
+
*/
|
|
48
|
+
enableAsyncRouteHandlers?: boolean;
|
|
49
|
+
/**
|
|
50
|
+
* Maximum time (in milliseconds) to wait for lazy routes to load before finalizing span names.
|
|
51
|
+
*
|
|
52
|
+
* - Set to `0` to not wait at all (immediate finalization)
|
|
53
|
+
* - Set to `Infinity` to wait as long as possible (capped at `finalTimeout` to prevent indefinite hangs)
|
|
54
|
+
* - Negative values will fall back to the default
|
|
55
|
+
*
|
|
56
|
+
* Defaults to 3× the configured `idleTimeout` (default: 3000ms).
|
|
57
|
+
*
|
|
58
|
+
* @default idleTimeout * 3
|
|
59
|
+
*/
|
|
60
|
+
lazyRouteTimeout?: number;
|
|
61
|
+
/**
|
|
62
|
+
* Static route manifest for resolving parameterized route names with lazy routes.
|
|
63
|
+
*
|
|
64
|
+
* Requires `enableAsyncRouteHandlers: true`. When provided, the manifest is used
|
|
65
|
+
* as the primary source for determining transaction names. This is more reliable
|
|
66
|
+
* than depending on React Router's lazy route resolution timing.
|
|
67
|
+
*
|
|
68
|
+
* @example
|
|
69
|
+
* ```ts
|
|
70
|
+
* lazyRouteManifest: [
|
|
71
|
+
* '/',
|
|
72
|
+
* '/users',
|
|
73
|
+
* '/users/:userId',
|
|
74
|
+
* '/org/:orgSlug/projects/:projectId',
|
|
75
|
+
* ]
|
|
76
|
+
* ```
|
|
77
|
+
*/
|
|
78
|
+
lazyRouteManifest?: string[];
|
|
79
|
+
}
|
|
80
|
+
type V6CompatibleVersion = '6' | '7';
|
|
81
|
+
export declare function addResolvedRoutesToParent(resolvedRoutes: RouteObject[], parentRoute: RouteObject): void;
|
|
82
|
+
/**
|
|
83
|
+
* Processes resolved routes by adding them to allRoutes and checking for nested async handlers.
|
|
84
|
+
* When capturedSpan is provided, updates that specific span instead of the current active span.
|
|
85
|
+
* This prevents race conditions where a lazy handler resolves after the user has navigated away.
|
|
86
|
+
*/
|
|
87
|
+
export declare function processResolvedRoutes(resolvedRoutes: RouteObject[], parentRoute?: RouteObject, currentLocation?: Location | null, capturedSpan?: Span): void;
|
|
88
|
+
/**
|
|
89
|
+
* Updates a navigation span with the correct route name after lazy routes have been loaded.
|
|
90
|
+
*/
|
|
91
|
+
export declare function updateNavigationSpan(activeRootSpan: Span, location: Location, allRoutes: RouteObject[], forceUpdate: boolean | undefined, matchRoutes: MatchRoutes): void;
|
|
92
|
+
/**
|
|
93
|
+
* Creates a wrapCreateBrowserRouter function that can be used with all React Router v6 compatible versions.
|
|
94
|
+
*/
|
|
95
|
+
export declare function createV6CompatibleWrapCreateBrowserRouter<TState extends RouterState = RouterState, TRouter extends Router<TState> = Router<TState>>(createRouterFunction: CreateRouterFunction<TState, TRouter>, version: V6CompatibleVersion): CreateRouterFunction<TState, TRouter>;
|
|
96
|
+
/**
|
|
97
|
+
* Creates a wrapCreateMemoryRouter function that can be used with all React Router v6 compatible versions.
|
|
98
|
+
*/
|
|
99
|
+
export declare function createV6CompatibleWrapCreateMemoryRouter<TState extends RouterState = RouterState, TRouter extends Router<TState> = Router<TState>>(createRouterFunction: CreateRouterFunction<TState, TRouter>, version: V6CompatibleVersion): CreateRouterFunction<TState, TRouter>;
|
|
100
|
+
/**
|
|
101
|
+
* Creates a browser tracing integration that can be used with all React Router v6 compatible versions.
|
|
102
|
+
*/
|
|
103
|
+
export declare function createReactRouterV6CompatibleTracingIntegration(options: Parameters<typeof browserTracingIntegration>[0] & ReactRouterOptions, version: V6CompatibleVersion): Integration;
|
|
104
|
+
export declare function createV6CompatibleWrapUseRoutes(origUseRoutes: UseRoutes, version: V6CompatibleVersion): UseRoutes;
|
|
105
|
+
export declare function handleNavigation(opts: {
|
|
106
|
+
location: Location;
|
|
107
|
+
routes: RouteObject[];
|
|
108
|
+
navigationType: Action;
|
|
109
|
+
version: V6CompatibleVersion;
|
|
110
|
+
matches?: AgnosticDataRouteMatch;
|
|
111
|
+
basename?: string;
|
|
112
|
+
allRoutes?: RouteObject[];
|
|
113
|
+
}): void;
|
|
114
|
+
export declare function addRoutesToAllRoutes(routes: RouteObject[]): void;
|
|
115
|
+
export declare function createV6CompatibleWithSentryReactRouterRouting<P extends Record<string, any>, R extends React.FC<P>>(Routes: R, version: V6CompatibleVersion): R;
|
|
116
|
+
export {};
|
|
117
|
+
//# sourceMappingURL=instrumentation.d.ts.map
|