@sentry/react-router 9.3.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 +16 -0
- package/README.md +182 -0
- package/build/cjs/client/sdk.js +24 -0
- package/build/cjs/client/sdk.js.map +1 -0
- package/build/cjs/index.client.js +19 -0
- package/build/cjs/index.client.js.map +1 -0
- package/build/cjs/index.server.js +23 -0
- package/build/cjs/index.server.js.map +1 -0
- package/build/cjs/server/sdk.js +24 -0
- package/build/cjs/server/sdk.js.map +1 -0
- package/build/cjs/vite/buildEnd/handleOnBuildEnd.js +114 -0
- package/build/cjs/vite/buildEnd/handleOnBuildEnd.js.map +1 -0
- package/build/cjs/vite/makeCustomSentryVitePlugins.js +40 -0
- package/build/cjs/vite/makeCustomSentryVitePlugins.js.map +1 -0
- package/build/cjs/vite/makeEnableSourceMapsPlugin.js +87 -0
- package/build/cjs/vite/makeEnableSourceMapsPlugin.js.map +1 -0
- package/build/cjs/vite/plugin.js +28 -0
- package/build/cjs/vite/plugin.js.map +1 -0
- package/build/esm/client/sdk.js +22 -0
- package/build/esm/client/sdk.js.map +1 -0
- package/build/esm/index.client.js +3 -0
- package/build/esm/index.client.js.map +1 -0
- package/build/esm/index.server.js +5 -0
- package/build/esm/index.server.js.map +1 -0
- package/build/esm/package.json +1 -0
- package/build/esm/server/sdk.js +22 -0
- package/build/esm/server/sdk.js.map +1 -0
- package/build/esm/vite/buildEnd/handleOnBuildEnd.js +112 -0
- package/build/esm/vite/buildEnd/handleOnBuildEnd.js.map +1 -0
- package/build/esm/vite/makeCustomSentryVitePlugins.js +38 -0
- package/build/esm/vite/makeCustomSentryVitePlugins.js.map +1 -0
- package/build/esm/vite/makeEnableSourceMapsPlugin.js +84 -0
- package/build/esm/vite/makeEnableSourceMapsPlugin.js.map +1 -0
- package/build/esm/vite/plugin.js +26 -0
- package/build/esm/vite/plugin.js.map +1 -0
- package/build/types/client/index.d.ts +3 -0
- package/build/types/client/index.d.ts.map +1 -0
- package/build/types/client/sdk.d.ts +7 -0
- package/build/types/client/sdk.d.ts.map +1 -0
- package/build/types/common/debug-build.d.ts +7 -0
- package/build/types/common/debug-build.d.ts.map +1 -0
- package/build/types/index.client.d.ts +2 -0
- package/build/types/index.client.d.ts.map +1 -0
- package/build/types/index.server.d.ts +3 -0
- package/build/types/index.server.d.ts.map +1 -0
- package/build/types/index.types.d.ts +13 -0
- package/build/types/index.types.d.ts.map +1 -0
- package/build/types/server/index.d.ts +3 -0
- package/build/types/server/index.d.ts.map +1 -0
- package/build/types/server/sdk.d.ts +6 -0
- package/build/types/server/sdk.d.ts.map +1 -0
- package/build/types/vite/buildEnd/handleOnBuildEnd.d.ts +10 -0
- package/build/types/vite/buildEnd/handleOnBuildEnd.d.ts.map +1 -0
- package/build/types/vite/index.d.ts +4 -0
- package/build/types/vite/index.d.ts.map +1 -0
- package/build/types/vite/makeCustomSentryVitePlugins.d.ts +7 -0
- package/build/types/vite/makeCustomSentryVitePlugins.d.ts.map +1 -0
- package/build/types/vite/makeEnableSourceMapsPlugin.d.ts +23 -0
- package/build/types/vite/makeEnableSourceMapsPlugin.d.ts.map +1 -0
- package/build/types/vite/plugin.d.ts +12 -0
- package/build/types/vite/plugin.d.ts.map +1 -0
- package/build/types/vite/types.d.ts +141 -0
- package/build/types/vite/types.d.ts.map +1 -0
- package/package.json +78 -0
|
@@ -0,0 +1,141 @@
|
|
|
1
|
+
import type { SentryVitePluginOptions } from '@sentry/vite-plugin';
|
|
2
|
+
type SourceMapsOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* If this flag is `true`, and an auth token is detected, the Sentry SDK will
|
|
5
|
+
* automatically generate and upload source maps to Sentry during a production build.
|
|
6
|
+
*
|
|
7
|
+
* @default true
|
|
8
|
+
*/
|
|
9
|
+
enabled?: boolean;
|
|
10
|
+
/**
|
|
11
|
+
* A glob or an array of globs that specifies the build artifacts that should be deleted after the artifact
|
|
12
|
+
* upload to Sentry has been completed.
|
|
13
|
+
*
|
|
14
|
+
* @default [] - By default no files are deleted.
|
|
15
|
+
*
|
|
16
|
+
* The globbing patterns follow the implementation of the glob package. (https://www.npmjs.com/package/glob)
|
|
17
|
+
*/
|
|
18
|
+
filesToDeleteAfterUpload?: string | Array<string>;
|
|
19
|
+
/**
|
|
20
|
+
* Options related to managing the Sentry releases for a build.
|
|
21
|
+
*
|
|
22
|
+
* More info: https://docs.sentry.io/product/releases/
|
|
23
|
+
*/
|
|
24
|
+
release?: {
|
|
25
|
+
/**
|
|
26
|
+
* Unique identifier for the release you want to create.
|
|
27
|
+
*
|
|
28
|
+
* This value can also be specified via the `SENTRY_RELEASE` environment variable.
|
|
29
|
+
*
|
|
30
|
+
* Defaults to automatically detecting a value for your environment.
|
|
31
|
+
* This includes values for Cordova, Heroku, AWS CodeBuild, CircleCI, Xcode, and Gradle, and otherwise uses the git `HEAD`'s commit SHA.
|
|
32
|
+
* (the latter requires access to git CLI and for the root directory to be a valid repository)
|
|
33
|
+
*
|
|
34
|
+
* If you didn't provide a value and the plugin can't automatically detect one, no release will be created.
|
|
35
|
+
*/
|
|
36
|
+
name?: string;
|
|
37
|
+
};
|
|
38
|
+
};
|
|
39
|
+
type BundleSizeOptimizationOptions = {
|
|
40
|
+
/**
|
|
41
|
+
* If set to `true`, the plugin will attempt to tree-shake (remove) any debugging code within the Sentry SDK.
|
|
42
|
+
* Note that the success of this depends on tree shaking being enabled in your build tooling.
|
|
43
|
+
*
|
|
44
|
+
* Setting this option to `true` will disable features like the SDK's `debug` option.
|
|
45
|
+
*/
|
|
46
|
+
excludeDebugStatements?: boolean;
|
|
47
|
+
/**
|
|
48
|
+
* If set to true, the plugin will try to tree-shake tracing statements out.
|
|
49
|
+
* Note that the success of this depends on tree shaking generally being enabled in your build.
|
|
50
|
+
* Attention: DO NOT enable this when you're using any performance monitoring-related SDK features (e.g. Sentry.startSpan()).
|
|
51
|
+
*/
|
|
52
|
+
excludeTracing?: boolean;
|
|
53
|
+
/**
|
|
54
|
+
* If set to `true`, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay Shadow DOM recording functionality.
|
|
55
|
+
* Note that the success of this depends on tree shaking being enabled in your build tooling.
|
|
56
|
+
*
|
|
57
|
+
* This option is safe to be used when you do not want to capture any Shadow DOM activity via Sentry Session Replay.
|
|
58
|
+
*/
|
|
59
|
+
excludeReplayShadowDom?: boolean;
|
|
60
|
+
/**
|
|
61
|
+
* If set to `true`, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay `iframe` recording functionality.
|
|
62
|
+
* Note that the success of this depends on tree shaking being enabled in your build tooling.
|
|
63
|
+
*
|
|
64
|
+
* You can safely do this when you do not want to capture any `iframe` activity via Sentry Session Replay.
|
|
65
|
+
*/
|
|
66
|
+
excludeReplayIframe?: boolean;
|
|
67
|
+
/**
|
|
68
|
+
* If set to `true`, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay's Compression Web Worker.
|
|
69
|
+
* Note that the success of this depends on tree shaking being enabled in your build tooling.
|
|
70
|
+
*
|
|
71
|
+
* **Notice:** You should only do use this option if you manually host a compression worker and configure it in your Sentry Session Replay integration config via the `workerUrl` option.
|
|
72
|
+
*/
|
|
73
|
+
excludeReplayWorker?: boolean;
|
|
74
|
+
};
|
|
75
|
+
export type SentryReactRouterBuildOptions = {
|
|
76
|
+
/**
|
|
77
|
+
* Options for configuring the Sentry release.
|
|
78
|
+
*/
|
|
79
|
+
release?: {
|
|
80
|
+
/**
|
|
81
|
+
* The name of the release to create in Sentry
|
|
82
|
+
*/
|
|
83
|
+
name?: string;
|
|
84
|
+
};
|
|
85
|
+
/**
|
|
86
|
+
* The auth token to use when uploading source maps to Sentry.
|
|
87
|
+
*
|
|
88
|
+
* Instead of specifying this option, you can also set the `SENTRY_AUTH_TOKEN` environment variable.
|
|
89
|
+
*
|
|
90
|
+
* To create an auth token, follow this guide:
|
|
91
|
+
* @see https://docs.sentry.io/product/accounts/auth-tokens/#organization-auth-tokens
|
|
92
|
+
*/
|
|
93
|
+
authToken?: string;
|
|
94
|
+
/**
|
|
95
|
+
* The organization slug of your Sentry organization.
|
|
96
|
+
* Instead of specifying this option, you can also set the `SENTRY_ORG` environment variable.
|
|
97
|
+
*/
|
|
98
|
+
org?: string;
|
|
99
|
+
/**
|
|
100
|
+
* The project slug of your Sentry project.
|
|
101
|
+
* Instead of specifying this option, you can also set the `SENTRY_PROJECT` environment variable.
|
|
102
|
+
*/
|
|
103
|
+
project?: string;
|
|
104
|
+
/**
|
|
105
|
+
* Options for the Sentry Vite plugin to customize bundle size optimizations.
|
|
106
|
+
*/
|
|
107
|
+
bundleSizeOptimizations?: BundleSizeOptimizationOptions;
|
|
108
|
+
/**
|
|
109
|
+
* If this flag is `true`, Sentry will log debug information during build time.
|
|
110
|
+
* @default false.
|
|
111
|
+
*/
|
|
112
|
+
debug?: boolean;
|
|
113
|
+
/**
|
|
114
|
+
* Options for the Sentry Vite plugin to customize the source maps upload process.
|
|
115
|
+
*
|
|
116
|
+
*/
|
|
117
|
+
sourceMapsUploadOptions?: SourceMapsOptions;
|
|
118
|
+
/**
|
|
119
|
+
* If this flag is `true`, the Sentry plugin will collect some telemetry data and send it to Sentry.
|
|
120
|
+
* It will not collect any sensitive or user-specific data.
|
|
121
|
+
*
|
|
122
|
+
* @default true
|
|
123
|
+
*/
|
|
124
|
+
telemetry?: boolean;
|
|
125
|
+
/**
|
|
126
|
+
* Options to further customize the Sentry Vite Plugin (@sentry/vite-plugin) behavior directly.
|
|
127
|
+
* Options specified in this object take precedence over the options specified in
|
|
128
|
+
* the `sourcemaps` and `release` objects.
|
|
129
|
+
*
|
|
130
|
+
* @see https://www.npmjs.com/package/@sentry/vite-plugin/v/2.22.2#options which lists all available options.
|
|
131
|
+
*
|
|
132
|
+
* Warning: Options within this object are subject to change at any time.
|
|
133
|
+
* We DO NOT guarantee semantic versioning for these options, meaning breaking
|
|
134
|
+
* changes can occur at any time within a major SDK version.
|
|
135
|
+
*
|
|
136
|
+
* Furthermore, some options are untested with SvelteKit specifically. Use with caution.
|
|
137
|
+
*/
|
|
138
|
+
unstable_sentryVitePluginOptions?: Partial<SentryVitePluginOptions>;
|
|
139
|
+
};
|
|
140
|
+
export {};
|
|
141
|
+
//# sourceMappingURL=types.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../../src/vite/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,qBAAqB,CAAC;AAEnE,KAAK,iBAAiB,GAAG;IACvB;;;;;OAKG;IACH,OAAO,CAAC,EAAE,OAAO,CAAC;IAElB;;;;;;;OAOG;IACH,wBAAwB,CAAC,EAAE,MAAM,GAAG,KAAK,CAAC,MAAM,CAAC,CAAC;IAElD;;;;OAIG;IACH,OAAO,CAAC,EAAE;QACR;;;;;;;;;;WAUG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;CACH,CAAC;AAEF,KAAK,6BAA6B,GAAG;IACnC;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;;OAIG;IACH,cAAc,CAAC,EAAE,OAAO,CAAC;IAEzB;;;;;OAKG;IACH,sBAAsB,CAAC,EAAE,OAAO,CAAC;IAEjC;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAE9B;;;;;OAKG;IACH,mBAAmB,CAAC,EAAE,OAAO,CAAC;CAC/B,CAAC;AAEF,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;OAEG;IACH,OAAO,CAAC,EAAE;QACR;;WAEG;QACH,IAAI,CAAC,EAAE,MAAM,CAAC;KACf,CAAC;IAEF;;;;;;;OAOG;IACH,SAAS,CAAC,EAAE,MAAM,CAAC;IAEnB;;;OAGG;IACH,GAAG,CAAC,EAAE,MAAM,CAAC;IAEb;;;OAGG;IACH,OAAO,CAAC,EAAE,MAAM,CAAC;IAEjB;;OAEG;IACH,uBAAuB,CAAC,EAAE,6BAA6B,CAAC;IAExD;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB;;;OAGG;IACH,uBAAuB,CAAC,EAAE,iBAAiB,CAAC;IAE5C;;;;;OAKG;IACH,SAAS,CAAC,EAAE,OAAO,CAAC;IAEpB;;;;;;;;;;;;OAYG;IACH,gCAAgC,CAAC,EAAE,OAAO,CAAC,uBAAuB,CAAC,CAAC;CACrE,CAAC"}
|
package/package.json
ADDED
|
@@ -0,0 +1,78 @@
|
|
|
1
|
+
{
|
|
2
|
+
"name": "@sentry/react-router",
|
|
3
|
+
"version": "9.3.0",
|
|
4
|
+
"description": "Official Sentry SDK for React Router (Framework)",
|
|
5
|
+
"repository": "git://github.com/getsentry/sentry-javascript.git",
|
|
6
|
+
"homepage": "https://github.com/getsentry/sentry-javascript/tree/master/packages/react-router",
|
|
7
|
+
"author": "Sentry",
|
|
8
|
+
"license": "MIT",
|
|
9
|
+
"engines": {
|
|
10
|
+
"node": ">=20"
|
|
11
|
+
},
|
|
12
|
+
"files": [
|
|
13
|
+
"/build"
|
|
14
|
+
],
|
|
15
|
+
"main": "build/cjs/index.server.js",
|
|
16
|
+
"module": "build/esm/index.server.js",
|
|
17
|
+
"browser": "build/esm/index.client.js",
|
|
18
|
+
"types": "build/types/index.types.d.ts",
|
|
19
|
+
"exports": {
|
|
20
|
+
"./package.json": "./package.json",
|
|
21
|
+
".": {
|
|
22
|
+
"types": "./build/types/index.types.d.ts",
|
|
23
|
+
"browser": {
|
|
24
|
+
"import": "./build/esm/index.client.js",
|
|
25
|
+
"require": "./build/cjs/index.client.js"
|
|
26
|
+
},
|
|
27
|
+
"node": {
|
|
28
|
+
"import": "./build/esm/index.server.js",
|
|
29
|
+
"require": "./build/cjs/index.server.js"
|
|
30
|
+
}
|
|
31
|
+
}
|
|
32
|
+
},
|
|
33
|
+
"publishConfig": {
|
|
34
|
+
"access": "public"
|
|
35
|
+
},
|
|
36
|
+
"dependencies": {
|
|
37
|
+
"@sentry/browser": "9.3.0",
|
|
38
|
+
"@sentry/cli": "^2.42.1",
|
|
39
|
+
"@sentry/core": "9.3.0",
|
|
40
|
+
"@sentry/node": "9.3.0",
|
|
41
|
+
"@sentry/vite-plugin": "^3.2.0",
|
|
42
|
+
"glob": "11.0.1"
|
|
43
|
+
},
|
|
44
|
+
"devDependencies": {
|
|
45
|
+
"@react-router/dev": "^7.1.5",
|
|
46
|
+
"@react-router/node": "^7.1.5",
|
|
47
|
+
"react-router": "^7.1.5",
|
|
48
|
+
"vite": "^6.1.0"
|
|
49
|
+
},
|
|
50
|
+
"peerDependencies": {
|
|
51
|
+
"@react-router/node": "7.x",
|
|
52
|
+
"react": ">=18",
|
|
53
|
+
"react-router": "7.x"
|
|
54
|
+
},
|
|
55
|
+
"scripts": {
|
|
56
|
+
"build": "run-p build:transpile build:types",
|
|
57
|
+
"build:dev": "yarn build",
|
|
58
|
+
"build:transpile": "rollup -c rollup.npm.config.mjs",
|
|
59
|
+
"build:types": "run-s build:types:core",
|
|
60
|
+
"build:types:core": "tsc -p tsconfig.types.json",
|
|
61
|
+
"build:watch": "run-p build:transpile:watch build:types:watch",
|
|
62
|
+
"build:dev:watch": "yarn build:watch",
|
|
63
|
+
"build:transpile:watch": "rollup -c rollup.npm.config.mjs --watch",
|
|
64
|
+
"build:types:watch": "tsc -p tsconfig.types.json --watch",
|
|
65
|
+
"build:tarball": "npm pack",
|
|
66
|
+
"circularDepCheck": "madge --circular src/index.client.ts && madge --circular src/index.server.ts && madge --circular src/index.types.ts",
|
|
67
|
+
"clean": "rimraf build coverage sentry-react-router-*.tgz",
|
|
68
|
+
"fix": "eslint . --format stylish --fix",
|
|
69
|
+
"lint": "eslint . --format stylish",
|
|
70
|
+
"test": "yarn test:unit",
|
|
71
|
+
"test:unit": "vitest run",
|
|
72
|
+
"test:watch": "vitest --watch",
|
|
73
|
+
"yalc:publish": "yalc publish --push --sig"
|
|
74
|
+
},
|
|
75
|
+
"volta": {
|
|
76
|
+
"extends": "../../package.json"
|
|
77
|
+
}
|
|
78
|
+
}
|