You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* This value can also be set via the `SENTRY_URL` environment variable.
29
31
*
30
-
* Defaults to https://sentry.io/, which is the correct value for SaaS customers.
32
+
* @default "https://sentry.io" (correct value for SaaS customers)
31
33
*/
32
34
url?: string;
33
35
34
36
/**
35
-
* Headers added to every outgoing network request.
37
+
* Additional headers to send with every outgoing request to Sentry.
36
38
*/
37
39
headers?: Record<string,string>;
38
40
39
41
/**
40
-
* Print useful debug information.
42
+
* Enable debug information logs during build-time.
43
+
* Enabling this will give you, for example, logs about source maps.
41
44
*
42
-
* Defaults to `false`.
45
+
* @defaultfalse
43
46
*/
44
47
debug?: boolean;
45
48
46
49
/**
47
-
* Suppresses all logs.
50
+
* Suppresses all build logs (all log levels, including errors).
48
51
*
49
-
* Defaults to `false`.
52
+
* @defaultfalse
50
53
*/
51
54
silent?: boolean;
52
55
@@ -68,14 +71,15 @@ export interface Options {
68
71
errorHandler?: (err: Error)=>void;
69
72
70
73
/**
71
-
* If set to true, internal plugin errors and performance data will be sent to Sentry.
74
+
* If this flag is `true`, internal plugin errors and performance data will be sent to Sentry.
75
+
* It will not collect any sensitive or user-specific data.
72
76
*
73
-
* At Sentry we like to use Sentry ourselves to deliver faster and more stable products.
77
+
* At Sentry, we like to use Sentry ourselves to deliver faster and more stable products.
74
78
* We're very careful of what we're sending. We won't collect anything other than error
75
79
* and high-level performance data. We will never collect your code or any details of the
76
80
* projects in which you're using this plugin.
77
81
*
78
-
* Defaults to `true`.
82
+
* @defaulttrue
79
83
*/
80
84
telemetry?: boolean;
81
85
@@ -87,7 +91,7 @@ export interface Options {
87
91
disable?: boolean;
88
92
89
93
/**
90
-
* Options for source maps uploading.
94
+
* Options related to source maps upload and processing.
91
95
*/
92
96
sourcemaps?: {
93
97
/**
@@ -96,29 +100,30 @@ export interface Options {
96
100
* If set to `"disable-upload"`, the plugin will not upload sourcemaps to Sentry, but will inject debug IDs into the build artifacts.
97
101
* This is useful if you want to manually upload sourcemaps to Sentry at a later point in time.
98
102
*
99
-
* Defaults to `false`.
103
+
* @defaultfalse
100
104
*/
101
105
disable?: boolean|"disable-upload";
102
106
103
107
/**
104
-
* A glob or an array of globs that specifies the build artifacts that should be uploaded to Sentry.
108
+
* A glob or an array of globs that specify the build artifacts and source maps that will be uploaded to Sentry.
105
109
*
106
-
* If this option is not specified, the plugin will try to upload all JavaScript files and source map files that are created during build.
110
+
* The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
107
111
*
108
-
* The globbing patterns follow the implementation of the `glob` package. (https://www.npmjs.com/package/glob)
112
+
* If this option is not specified, the plugin will try to upload all JavaScript files and source map files that are created during build.
109
113
*
110
114
* Use the `debug` option to print information about which files end up being uploaded.
115
+
*
111
116
*/
112
117
assets?: string|string[];
113
118
114
119
/**
115
120
* A glob or an array of globs that specifies which build artifacts should not be uploaded to Sentry.
116
121
*
117
-
* Default: `[]`
118
-
*
119
-
* The globbing patterns follow the implementation of the `glob` package. (https://www.npmjs.com/package/glob)
122
+
* The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
120
123
*
121
124
* Use the `debug` option to print information about which files end up being uploaded.
125
+
*
126
+
* @default []
122
127
*/
123
128
ignore?: string|string[];
124
129
@@ -153,11 +158,11 @@ export interface Options {
153
158
/**
154
159
* A glob or an array of globs that specifies the build artifacts that should be deleted after the artifact upload to Sentry has been completed.
155
160
*
156
-
* The globbing patterns follow the implementation of the `glob` package. (https://www.npmjs.com/package/glob)
157
-
*
158
-
* Note: If you pass in a promise that resolves to a string or array, the plugin will await the promise and use
161
+
* Note: If you pass in a Promise that resolves to a string or array, the plugin will await the Promise and use
159
162
* the resolved value globs. This is useful if you need to dynamically determine the files to delete. Some
160
-
* higher-level Sentry SDKs or options use this feature (e.g. SvelteKit).
163
+
* higher-level Sentry SDKs or options use this feature (e.g., SvelteKit).
164
+
*
165
+
* The globbing patterns must follow the implementation of the `glob` package: https://www.npmjs.com/package/glob#glob-primer
161
166
*
162
167
* Use the `debug` option to print information about which files end up being deleted.
163
168
*/
@@ -176,10 +181,10 @@ export interface Options {
176
181
* This value can also be specified via the `SENTRY_RELEASE` environment variable.
177
182
*
178
183
* Defaults to automatically detecting a value for your environment.
179
-
* This includes values for Cordova, Heroku, AWS CodeBuild, CircleCI, Xcode, and Gradle, and otherwise uses the git `HEAD`'s commit SHA.
180
-
* (the latter requires access to git CLI and for the root directory to be a valid repository)
184
+
* This includes values for Cordova, Heroku, AWS CodeBuild, CircleCI, Xcode, and Gradle, and otherwise uses the git `HEAD`'s commit SHA
185
+
* (the latter requires access to git CLI and for the root directory to be a valid repository).
181
186
*
182
-
* If you didn't provide a value and the plugin can't automatically detect one, no release will be created.
187
+
* If no `name` is provided and the plugin can't automatically detect one, no release will be created.
183
188
*/
184
189
name?: string;
185
190
@@ -192,44 +197,48 @@ export interface Options {
192
197
193
198
/**
194
199
* Whether the plugin should create a release on Sentry during the build.
195
-
* Note that a release may still appear in Sentry even if this is value is `false` because any Sentry event that has a release value attached will automatically create a release.
196
-
* (for example via the `inject` option)
197
200
*
198
-
* Defaults to `true`.
201
+
* Note that a release may still appear in Sentry even if this value is `false`. Any Sentry event that has a release value attached
202
+
* will automatically create a release (for example, via the `inject` option).
203
+
*
204
+
* @default true
199
205
*/
200
206
create?: boolean;
201
207
202
208
/**
203
-
* Whether the Sentry release should be automatically finalized (meaning an end timestamp is added) after the build ends.
209
+
* Whether to automatically finalize the release. The release is finalized by adding an end timestamp after the build ends.
204
210
*
205
-
* Defaults to `true`.
211
+
* @defaulttrue
206
212
*/
207
213
finalize?: boolean;
208
214
209
215
/**
210
-
* Unique identifier for the distribution, used to further segment your release.
216
+
* Unique distribution identifier for the release. Used to further segment the release.
217
+
*
211
218
* Usually your build number.
212
219
*/
213
220
dist?: string;
214
221
215
222
/**
216
-
* Version control system remote name.
223
+
* Version control system (VCS) remote name.
217
224
*
218
225
* This value can also be specified via the `SENTRY_VSC_REMOTE` environment variable.
219
226
*
220
-
* Defaults to 'origin'.
227
+
* @default "origin"
221
228
*/
222
229
vcsRemote?: string;
223
230
224
231
/**
225
-
* Associates the release with its commits in Sentry.
232
+
* Configuration for associating the release with its commits in Sentry.
233
+
*
234
+
* Set to `false` to disable commit association.
226
235
*
227
-
* Defaults to `{ auto: true }`. Set to `false` to disable commit association.
236
+
* @default{ auto: true }
228
237
*/
229
238
setCommits?: SetCommitsOptions|false;
230
239
231
240
/**
232
-
* Adds deployment information to the release in Sentry.
241
+
* Configuration for adding deployment information to the release in Sentry.
233
242
*/
234
243
deploy?: DeployOptions;
235
244
@@ -247,28 +256,34 @@ export interface Options {
247
256
};
248
257
249
258
/**
250
-
* Options related to bundle size optimizations.
259
+
* Options for bundle size optimizations by excluding certain features.
251
260
*/
252
261
bundleSizeOptimizations?: {
253
262
/**
254
-
* If set to `true`, the plugin will attempt to tree-shake (remove) any debugging code within the Sentry SDK.
255
-
* Note that the success of this depends on tree shaking being enabled in your build tooling.
263
+
* Exclude debug statements from the bundle, thus disabling features like the SDK's `debug` option.
256
264
*
257
-
* Setting this option to `true` will disable features like the SDK's `debug` option.
265
+
* If set to `true`, the plugin will attempt to tree-shake (remove) any debugging code within the Sentry SDK during the build.
266
+
* Note that the success of this depends on tree-shaking being enabled in your build tooling.
267
+
*
268
+
* @default false
258
269
*/
259
270
excludeDebugStatements?: boolean;
260
271
261
272
/**
273
+
* Exclude tracing functionality from the bundle, thus disabling features like performance monitoring.
274
+
*
262
275
* If set to `true`, the plugin will attempt to tree-shake (remove) code within the Sentry SDK that is related to tracing and performance monitoring.
263
-
* Note that the success of this depends on treeshaking being enabled in your build tooling.
276
+
* Note that the success of this depends on tree-shaking being enabled in your build tooling.
264
277
*
265
278
* **Notice:** Do not enable this when you're using any performance monitoring-related SDK features (e.g. `Sentry.startTransaction()`).
279
+
280
+
* @default false
266
281
*/
267
282
excludeTracing?: boolean;
268
283
269
284
/**
270
285
* If set to `true`, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay Canvas recording functionality.
271
-
* Note that the success of this depends on treeshaking being enabled in your build tooling.
286
+
* Note that the success of this depends on tree-shaking being enabled in your build tooling.
272
287
*
273
288
* You can safely do this when you do not want to capture any Canvas activity via Sentry Session Replay.
274
289
*
@@ -277,26 +292,38 @@ export interface Options {
277
292
excludeReplayCanvas?: boolean;
278
293
279
294
/**
295
+
* Exclude Replay Shadow DOM functionality from the bundle.
296
+
*
280
297
* 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.
281
-
* Note that the success of this depends on treeshaking being enabled in your build tooling.
298
+
* Note that the success of this depends on tree-shaking being enabled in your build tooling.
282
299
*
283
300
* This option is safe to be used when you do not want to capture any Shadow DOM activity via Sentry Session Replay.
301
+
*
302
+
* @default false
284
303
*/
285
304
excludeReplayShadowDom?: boolean;
286
305
287
306
/**
288
-
* If set to `true`, the plugin will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay `iframe` recording functionality.
289
-
* Note that the success of this depends on tree shaking being enabled in your build tooling.
307
+
* Exclude Replay iFrame functionality from the bundle.
308
+
*
309
+
* If set to `true`, the Sentry SDK will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay `iframe` recording functionality.
310
+
* Note that the success of this depends on tree-shaking being enabled in your build tooling.
290
311
*
291
312
* You can safely do this when you do not want to capture any `iframe` activity via Sentry Session Replay.
313
+
*
314
+
* @default false
292
315
*/
293
316
excludeReplayIframe?: boolean;
294
317
295
318
/**
296
-
* 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.
297
-
* Note that the success of this depends on tree shaking being enabled in your build tooling.
319
+
* Exclude Replay worker functionality from the bundle.
320
+
*
321
+
* If set to `true`, the Sentry SDK will attempt to tree-shake (remove) code related to the Sentry SDK's Session Replay's Compression Web Worker.
322
+
* Note that the success of this depends on tree-shaking being enabled in your build tooling.
298
323
*
299
324
* **Notice:** You should only use this option if you manually host a compression worker and configure it in your Sentry Session Replay integration config via the `workerUrl` option.
exports[`generateGlobalInjectorCode generates code with release 1`] =`"!function(){vare=\\"undefined\\"!=typeofwindow?window:\\"undefined\\"!=typeofglobal?global:\\"undefined\\"!=typeofglobalThis?globalThis:\\"undefined\\"!=typeofself?self:{};e.SENTRY_RELEASE={id:\\"1.2.3\\"};}();"`;
3
+
exports[`generateGlobalInjectorCode generates code with release 1`] =`"!function(){try{var e=\\"undefined\\"!=typeof window?window:\\"undefined\\"!=typeofglobal?global:\\"undefined\\"!=typeofglobalThis?globalThis:\\"undefined\\"!=typeofself?self:{};e.SENTRY_RELEASE={id:\\"1.2.3\\"};}catch(e){}}();"`;
4
4
5
-
exports[`generateGlobalInjectorCode generates code with release and build information 1`] =`"!function(){vare=\\"undefined\\"!=typeofwindow?window:\\"undefined\\"!=typeofglobal?global:\\"undefined\\"!=typeofglobalThis?globalThis:\\"undefined\\"!=typeofself?self:{};e.SENTRY_RELEASE={id:\\"1.2.3\\"};e.SENTRY_BUILD_INFO={\\"deps\\":[\\"myDep\\",\\"rollup\\"],\\"depsVersions\\":{\\"rollup\\":3},\\"nodeVersion\\":18};}();"`;
5
+
exports[`generateGlobalInjectorCode generates code with release and build information 1`] =`"!function(){try{var e=\\"undefined\\"!=typeof window?window:\\"undefined\\"!=typeofglobal?global:\\"undefined\\"!=typeofglobalThis?globalThis:\\"undefined\\"!=typeofself?self:{};e.SENTRY_RELEASE={id:\\"1.2.3\\"};e.SENTRY_BUILD_INFO={\\"deps\\":[\\"myDep\\",\\"rollup\\"],\\"depsVersions\\":{\\"rollup\\":3},\\"nodeVersion\\":18};}catch(e){}}();"`;
6
6
7
-
exports[`generateModuleMetadataInjectorCode generates code with empty metadata object 1`] =`"!function(){vare=\\"undefined\\"!=typeofwindow?window:\\"undefined\\"!=typeofglobal?global:\\"undefined\\"!=typeofglobalThis?globalThis:\\"undefined\\"!=typeofself?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(newe.Error).stack]=function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];if(null!=a)for(var t ina)a.hasOwnProperty(t)&&(e[t]=a[t])}returne}({},e._sentryModuleMetadata[(newe.Error).stack],{})}();"`;
7
+
exports[`generateModuleMetadataInjectorCode generates code with empty metadata object 1`] =`"!function(){try{var e=\\"undefined\\"!=typeof window?window:\\"undefined\\"!=typeofglobal?global:\\"undefined\\"!=typeofglobalThis?globalThis:\\"undefined\\"!=typeofself?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(newe.Error).stack]=function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];if(null!=a)for(var t ina)a.hasOwnProperty(t)&&(e[t]=a[t])}returne}({},e._sentryModuleMetadata[(new e.Error).stack],{})}catch(e){}}();"`;
8
8
9
-
exports[`generateModuleMetadataInjectorCode generates code with metadata object 1`] =`"!function(){vare=\\"undefined\\"!=typeofwindow?window:\\"undefined\\"!=typeofglobal?global:\\"undefined\\"!=typeofglobalThis?globalThis:\\"undefined\\"!=typeofself?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(newe.Error).stack]=function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];if(null!=a)for(var t ina)a.hasOwnProperty(t)&&(e[t]=a[t])}returne}({},e._sentryModuleMetadata[(newe.Error).stack],{\\"file1.js\\":{\\"foo\\":\\"bar\\"},\\"file2.js\\":{\\"bar\\":\\"baz\\"}})}();"`;
9
+
exports[`generateModuleMetadataInjectorCode generates code with metadata object 1`] = `"!function(){try{var e=\\"undefined\\"!=typeofwindow?window:\\"undefined\\"!=typeofglobal?global:\\"undefined\\"!=typeofglobalThis?globalThis:\\"undefined\\"!=typeofself?self:{};e._sentryModuleMetadata=e._sentryModuleMetadata||{},e._sentryModuleMetadata[(newe.Error).stack]=function(e){for(var n=1;n<arguments.length;n++){var a=arguments[n];if(null!=a)for(var t ina)a.hasOwnProperty(t)&&(e[t]=a[t])}returne}({},e._sentryModuleMetadata[(newe.Error).stack],{\\"file1.js\\":{\\"foo\\":\\"bar\\"},\\"file2.js\\":{\\"bar\\":\\"baz\\"}})}catch(e){}}();"`;
0 commit comments