@sentry/esbuild-plugin 2.0.0 → 2.1.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/README.md +42 -141
- package/dist/cjs/index.js +419 -12
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +399 -12
- package/dist/esm/index.mjs.map +1 -1
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -49,27 +49,6 @@ require("esbuild").build({
|
|
|
49
49
|
// Auth tokens can be obtained from https://sentry.io/settings/account/api/auth-tokens/
|
|
50
50
|
// and need `project:releases` and `org:read` scopes
|
|
51
51
|
authToken: process.env.SENTRY_AUTH_TOKEN,
|
|
52
|
-
|
|
53
|
-
sourcemaps: {
|
|
54
|
-
// Specify the directory containing build artifacts
|
|
55
|
-
assets: "./**",
|
|
56
|
-
// Don't upload the source maps of dependencies
|
|
57
|
-
ignore: ["./node_modules/**"],
|
|
58
|
-
},
|
|
59
|
-
|
|
60
|
-
// Helps troubleshooting - set to false to make plugin less noisy
|
|
61
|
-
debug: true,
|
|
62
|
-
|
|
63
|
-
// Use the following option if you're on an SDK version lower than 7.47.0:
|
|
64
|
-
// release: {
|
|
65
|
-
// uploadLegacySourcemaps: {
|
|
66
|
-
// include: ".",
|
|
67
|
-
// ignore: ["node_modules"],
|
|
68
|
-
// },
|
|
69
|
-
// },
|
|
70
|
-
|
|
71
|
-
// Optionally uncomment the line below to override automatic release name detection
|
|
72
|
-
// release: process.env.RELEASE,
|
|
73
52
|
}),
|
|
74
53
|
],
|
|
75
54
|
});
|
|
@@ -106,17 +85,13 @@ require("esbuild").build({
|
|
|
106
85
|
- [`_experiments`](#option-_experiments)
|
|
107
86
|
- [`injectBuildInformation`](#option-_experiments-injectbuildinformation)
|
|
108
87
|
|
|
109
|
-
###
|
|
110
|
-
|
|
111
|
-
<a name="option-org"></a>
|
|
88
|
+
### <a name="option-org"></a>`org`
|
|
112
89
|
|
|
113
90
|
Type: `string`
|
|
114
91
|
|
|
115
92
|
The slug of the Sentry organization associated with the app.
|
|
116
93
|
|
|
117
|
-
###
|
|
118
|
-
|
|
119
|
-
<a name="option-project"></a>
|
|
94
|
+
### <a name="option-project"></a>`project`
|
|
120
95
|
|
|
121
96
|
|
|
122
97
|
|
|
@@ -124,9 +99,7 @@ The slug of the Sentry project associated with the app.
|
|
|
124
99
|
|
|
125
100
|
This value can also be specified via the `SENTRY_PROJECT` environment variable.
|
|
126
101
|
|
|
127
|
-
###
|
|
128
|
-
|
|
129
|
-
<a name="option-authtoken"></a>
|
|
102
|
+
### <a name="option-authtoken"></a>`authToken`
|
|
130
103
|
|
|
131
104
|
Type: `string`
|
|
132
105
|
|
|
@@ -134,9 +107,7 @@ The authentication token to use for all communication with Sentry. Can be obtain
|
|
|
134
107
|
|
|
135
108
|
This value can also be specified via the `SENTRY_AUTH_TOKEN` environment variable.
|
|
136
109
|
|
|
137
|
-
###
|
|
138
|
-
|
|
139
|
-
<a name="option-url"></a>
|
|
110
|
+
### <a name="option-url"></a>`url`
|
|
140
111
|
|
|
141
112
|
Type: `string`
|
|
142
113
|
|
|
@@ -146,33 +117,25 @@ This value can also be set via the SENTRY_URL environment variable.
|
|
|
146
117
|
|
|
147
118
|
Defaults to https://sentry.io/, which is the correct value for SaaS customers.
|
|
148
119
|
|
|
149
|
-
###
|
|
150
|
-
|
|
151
|
-
<a name="option-headers"></a>
|
|
120
|
+
### <a name="option-headers"></a>`headers`
|
|
152
121
|
|
|
153
122
|
Type: `Record<string, string>`
|
|
154
123
|
|
|
155
124
|
Headers added to every outgoing network request.
|
|
156
125
|
|
|
157
|
-
###
|
|
158
|
-
|
|
159
|
-
<a name="option-debug"></a>
|
|
126
|
+
### <a name="option-debug"></a>`debug`
|
|
160
127
|
|
|
161
128
|
Type: `boolean`
|
|
162
129
|
|
|
163
130
|
Print useful debug information. Defaults to `false`.
|
|
164
131
|
|
|
165
|
-
###
|
|
166
|
-
|
|
167
|
-
<a name="option-silent"></a>
|
|
132
|
+
### <a name="option-silent"></a>`silent`
|
|
168
133
|
|
|
169
134
|
Type: `boolean`
|
|
170
135
|
|
|
171
136
|
Suppresses all logs. Defaults to `false`.
|
|
172
137
|
|
|
173
|
-
###
|
|
174
|
-
|
|
175
|
-
<a name="option-errorhandler"></a>
|
|
138
|
+
### <a name="option-errorhandler"></a>`errorHandler`
|
|
176
139
|
|
|
177
140
|
Type: `(err: Error) => void`
|
|
178
141
|
|
|
@@ -189,9 +152,7 @@ errorHandler: (err) => {
|
|
|
189
152
|
```
|
|
190
153
|
|
|
191
154
|
|
|
192
|
-
###
|
|
193
|
-
|
|
194
|
-
<a name="option-telemetry"></a>
|
|
155
|
+
### <a name="option-telemetry"></a>`telemetry`
|
|
195
156
|
|
|
196
157
|
Type: `boolean`
|
|
197
158
|
|
|
@@ -201,36 +162,30 @@ At Sentry we like to use Sentry ourselves to deliver faster and more stable prod
|
|
|
201
162
|
|
|
202
163
|
Defaults to `true`.
|
|
203
164
|
|
|
204
|
-
###
|
|
205
|
-
|
|
206
|
-
<a name="option-disable"></a>
|
|
165
|
+
### <a name="option-disable"></a>`disable`
|
|
207
166
|
|
|
208
167
|
Type: `boolean`
|
|
209
168
|
|
|
210
169
|
Completely disables all functionality of the plugin. Defaults to `false`.
|
|
211
170
|
|
|
212
|
-
###
|
|
213
|
-
|
|
214
|
-
<a name="option-sourcemaps"></a>
|
|
171
|
+
### <a name="option-sourcemaps"></a>`sourcemaps`
|
|
215
172
|
|
|
216
173
|
|
|
217
174
|
|
|
218
175
|
Options for source maps uploading. Leave this option undefined if you do not want to upload source maps to Sentry.
|
|
219
|
-
###
|
|
220
|
-
|
|
221
|
-
<a name="option-sourcemaps-assets"></a>
|
|
176
|
+
### <a name="option-sourcemaps-assets"></a>`sourcemaps.assets`
|
|
222
177
|
|
|
223
178
|
Type: `string | string[]`
|
|
224
179
|
|
|
225
180
|
A glob or an array of globs that specifies the build artifacts that should be uploaded to Sentry.
|
|
226
181
|
|
|
182
|
+
If this option is not specified, the plugin will try to upload all JavaScript files and source map files that are created during build.
|
|
183
|
+
|
|
227
184
|
The globbing patterns follow the implementation of the `glob` package. (https://www.npmjs.com/package/glob)
|
|
228
185
|
|
|
229
186
|
Use the `debug` option to print information about which files end up being uploaded.
|
|
230
187
|
|
|
231
|
-
###
|
|
232
|
-
|
|
233
|
-
<a name="option-sourcemaps-ignore"></a>
|
|
188
|
+
### <a name="option-sourcemaps-ignore"></a>`sourcemaps.ignore`
|
|
234
189
|
|
|
235
190
|
Type: `string | string[]`
|
|
236
191
|
|
|
@@ -242,9 +197,7 @@ The globbing patterns follow the implementation of the `glob` package. (https://
|
|
|
242
197
|
|
|
243
198
|
Use the `debug` option to print information about which files end up being uploaded.
|
|
244
199
|
|
|
245
|
-
###
|
|
246
|
-
|
|
247
|
-
<a name="option-sourcemaps-rewritesources"></a>
|
|
200
|
+
### <a name="option-sourcemaps-rewritesources"></a>`sourcemaps.rewriteSources`
|
|
248
201
|
|
|
249
202
|
Type: `(source: string, map: any) => string`
|
|
250
203
|
|
|
@@ -252,9 +205,7 @@ Hook to rewrite the `sources` field inside the source map before being uploaded
|
|
|
252
205
|
|
|
253
206
|
Defaults to making all sources relative to `process.cwd()` while building.
|
|
254
207
|
|
|
255
|
-
###
|
|
256
|
-
|
|
257
|
-
<a name="option-sourcemaps-deletefilesafterupload"></a>
|
|
208
|
+
### <a name="option-sourcemaps-deletefilesafterupload"></a>`sourcemaps.deleteFilesAfterUpload`
|
|
258
209
|
|
|
259
210
|
Type: `string | string[]`
|
|
260
211
|
|
|
@@ -264,18 +215,14 @@ The globbing patterns follow the implementation of the `glob` package. (https://
|
|
|
264
215
|
|
|
265
216
|
Use the `debug` option to print information about which files end up being deleted.
|
|
266
217
|
|
|
267
|
-
###
|
|
268
|
-
|
|
269
|
-
<a name="option-release"></a>
|
|
218
|
+
### <a name="option-release"></a>`release`
|
|
270
219
|
|
|
271
220
|
|
|
272
221
|
|
|
273
222
|
Options related to managing the Sentry releases for a build.
|
|
274
223
|
|
|
275
224
|
More info: https://docs.sentry.io/product/releases/
|
|
276
|
-
###
|
|
277
|
-
|
|
278
|
-
<a name="option-release-name"></a>
|
|
225
|
+
### <a name="option-release-name"></a>`release.name`
|
|
279
226
|
|
|
280
227
|
Type: `string`
|
|
281
228
|
|
|
@@ -287,9 +234,7 @@ Defaults to automatically detecting a value for your environment. This includes
|
|
|
287
234
|
|
|
288
235
|
If you didn't provide a value and the plugin can't automatically detect one, no release will be created.
|
|
289
236
|
|
|
290
|
-
###
|
|
291
|
-
|
|
292
|
-
<a name="option-release-inject"></a>
|
|
237
|
+
### <a name="option-release-inject"></a>`release.inject`
|
|
293
238
|
|
|
294
239
|
Type: `boolean`
|
|
295
240
|
|
|
@@ -297,9 +242,7 @@ Whether the plugin should inject release information into the build for the SDK
|
|
|
297
242
|
|
|
298
243
|
Defaults to `true`.
|
|
299
244
|
|
|
300
|
-
###
|
|
301
|
-
|
|
302
|
-
<a name="option-release-create"></a>
|
|
245
|
+
### <a name="option-release-create"></a>`release.create`
|
|
303
246
|
|
|
304
247
|
Type: `boolean`
|
|
305
248
|
|
|
@@ -307,9 +250,7 @@ Whether the plugin should create a release on Sentry during the build. Note that
|
|
|
307
250
|
|
|
308
251
|
Defaults to `true`.
|
|
309
252
|
|
|
310
|
-
###
|
|
311
|
-
|
|
312
|
-
<a name="option-release-finalize"></a>
|
|
253
|
+
### <a name="option-release-finalize"></a>`release.finalize`
|
|
313
254
|
|
|
314
255
|
Type: `boolean`
|
|
315
256
|
|
|
@@ -317,17 +258,13 @@ Whether the Sentry release should be automatically finalized (meaning an end tim
|
|
|
317
258
|
|
|
318
259
|
Defaults to `true`.
|
|
319
260
|
|
|
320
|
-
###
|
|
321
|
-
|
|
322
|
-
<a name="option-release-dist"></a>
|
|
261
|
+
### <a name="option-release-dist"></a>`release.dist`
|
|
323
262
|
|
|
324
263
|
Type: `string`
|
|
325
264
|
|
|
326
265
|
Unique identifier for the distribution, used to further segment your release.
|
|
327
266
|
|
|
328
|
-
###
|
|
329
|
-
|
|
330
|
-
<a name="option-release-vcsremote"></a>
|
|
267
|
+
### <a name="option-release-vcsremote"></a>`release.vcsRemote`
|
|
331
268
|
|
|
332
269
|
Type: `string`
|
|
333
270
|
|
|
@@ -337,16 +274,12 @@ This value can also be specified via the `SENTRY_VSC_REMOTE` environment variabl
|
|
|
337
274
|
|
|
338
275
|
Defaults to 'origin'.
|
|
339
276
|
|
|
340
|
-
###
|
|
341
|
-
|
|
342
|
-
<a name="option-release-setcommits"></a>
|
|
277
|
+
### <a name="option-release-setcommits"></a>`release.setCommits`
|
|
343
278
|
|
|
344
279
|
|
|
345
280
|
|
|
346
281
|
Option to associate the created release with its commits in Sentry.
|
|
347
|
-
###
|
|
348
|
-
|
|
349
|
-
<a name="option-release-setcommits-previouscommit"></a>
|
|
282
|
+
### <a name="option-release-setcommits-previouscommit"></a>`release.setCommits.previousCommit`
|
|
350
283
|
|
|
351
284
|
Type: `string`
|
|
352
285
|
|
|
@@ -356,9 +289,7 @@ Defaults to the last commit of the previous release in Sentry.
|
|
|
356
289
|
|
|
357
290
|
If there was no previous release, the last 10 commits will be used.
|
|
358
291
|
|
|
359
|
-
###
|
|
360
|
-
|
|
361
|
-
<a name="option-release-setcommits-ignoremissing"></a>
|
|
292
|
+
### <a name="option-release-setcommits-ignoremissing"></a>`release.setCommits.ignoreMissing`
|
|
362
293
|
|
|
363
294
|
Type: `boolean`
|
|
364
295
|
|
|
@@ -366,9 +297,7 @@ If the flag is to `true` and the previous release commit was not found in the re
|
|
|
366
297
|
|
|
367
298
|
Defaults to `false`.
|
|
368
299
|
|
|
369
|
-
###
|
|
370
|
-
|
|
371
|
-
<a name="option-release-setcommits-ignoreempty"></a>
|
|
300
|
+
### <a name="option-release-setcommits-ignoreempty"></a>`release.setCommits.ignoreEmpty`
|
|
372
301
|
|
|
373
302
|
Type: `boolean`
|
|
374
303
|
|
|
@@ -376,9 +305,7 @@ If this flag is set, the setCommits step will not fail and just exit silently if
|
|
|
376
305
|
|
|
377
306
|
Defaults to `false`.
|
|
378
307
|
|
|
379
|
-
###
|
|
380
|
-
|
|
381
|
-
<a name="option-release-setcommits-auto"></a>
|
|
308
|
+
### <a name="option-release-setcommits-auto"></a>`release.setCommits.auto`
|
|
382
309
|
|
|
383
310
|
Type: `boolean`
|
|
384
311
|
|
|
@@ -386,9 +313,7 @@ Automatically sets `commit` and `previousCommit`. Sets `commit` to `HEAD` and `p
|
|
|
386
313
|
|
|
387
314
|
If you set this to `true`, manually specified `commit` and `previousCommit` options will be overridden. It is best to not specify them at all if you set this option to `true`.
|
|
388
315
|
|
|
389
|
-
###
|
|
390
|
-
|
|
391
|
-
<a name="option-release-setcommits-repo"></a>
|
|
316
|
+
### <a name="option-release-setcommits-repo"></a>`release.setCommits.repo`
|
|
392
317
|
|
|
393
318
|
Type: `string`
|
|
394
319
|
|
|
@@ -396,9 +321,7 @@ The full repo name as defined in Sentry.
|
|
|
396
321
|
|
|
397
322
|
Required if the `auto` option is not set to `true`.
|
|
398
323
|
|
|
399
|
-
###
|
|
400
|
-
|
|
401
|
-
<a name="option-release-setcommits-commit"></a>
|
|
324
|
+
### <a name="option-release-setcommits-commit"></a>`release.setCommits.commit`
|
|
402
325
|
|
|
403
326
|
Type: `string`
|
|
404
327
|
|
|
@@ -406,64 +329,48 @@ The current (last) commit in the release.
|
|
|
406
329
|
|
|
407
330
|
Required if the `auto` option is not set to `true`.
|
|
408
331
|
|
|
409
|
-
###
|
|
410
|
-
|
|
411
|
-
<a name="option-release-deploy"></a>
|
|
332
|
+
### <a name="option-release-deploy"></a>`release.deploy`
|
|
412
333
|
|
|
413
334
|
|
|
414
335
|
|
|
415
336
|
Adds deployment information to the release in Sentry.
|
|
416
|
-
###
|
|
417
|
-
|
|
418
|
-
<a name="option-release-deploy-env"></a>
|
|
337
|
+
### <a name="option-release-deploy-env"></a>`release.deploy.env`
|
|
419
338
|
|
|
420
339
|
Type: `string`
|
|
421
340
|
|
|
422
341
|
Environment for this release. Values that make sense here would be `production` or `staging`.
|
|
423
342
|
|
|
424
|
-
###
|
|
425
|
-
|
|
426
|
-
<a name="option-release-deploy-started"></a>
|
|
343
|
+
### <a name="option-release-deploy-started"></a>`release.deploy.started`
|
|
427
344
|
|
|
428
345
|
Type: `number | string`
|
|
429
346
|
|
|
430
347
|
Deployment start time in Unix timestamp (in seconds) or ISO 8601 format.
|
|
431
348
|
|
|
432
|
-
###
|
|
433
|
-
|
|
434
|
-
<a name="option-release-deploy-finished"></a>
|
|
349
|
+
### <a name="option-release-deploy-finished"></a>`release.deploy.finished`
|
|
435
350
|
|
|
436
351
|
Type: `number | string`
|
|
437
352
|
|
|
438
353
|
Deployment finish time in Unix timestamp (in seconds) or ISO 8601 format.
|
|
439
354
|
|
|
440
|
-
###
|
|
441
|
-
|
|
442
|
-
<a name="option-release-deploy-time"></a>
|
|
355
|
+
### <a name="option-release-deploy-time"></a>`release.deploy.time`
|
|
443
356
|
|
|
444
357
|
Type: `number`
|
|
445
358
|
|
|
446
359
|
Deployment duration (in seconds). Can be used instead of started and finished.
|
|
447
360
|
|
|
448
|
-
###
|
|
449
|
-
|
|
450
|
-
<a name="option-release-deploy-name"></a>
|
|
361
|
+
### <a name="option-release-deploy-name"></a>`release.deploy.name`
|
|
451
362
|
|
|
452
363
|
Type: `string`
|
|
453
364
|
|
|
454
365
|
Human readable name for the deployment.
|
|
455
366
|
|
|
456
|
-
###
|
|
457
|
-
|
|
458
|
-
<a name="option-release-deploy-url"></a>
|
|
367
|
+
### <a name="option-release-deploy-url"></a>`release.deploy.url`
|
|
459
368
|
|
|
460
369
|
Type: `string`
|
|
461
370
|
|
|
462
371
|
URL that points to the deployment.
|
|
463
372
|
|
|
464
|
-
###
|
|
465
|
-
|
|
466
|
-
<a name="option-release-cleanartifacts"></a>
|
|
373
|
+
### <a name="option-release-cleanartifacts"></a>`release.cleanArtifacts`
|
|
467
374
|
|
|
468
375
|
Type: `boolean`
|
|
469
376
|
|
|
@@ -471,9 +378,7 @@ Remove all previously uploaded artifacts for this release on Sentry before the u
|
|
|
471
378
|
|
|
472
379
|
Defaults to `false`.
|
|
473
380
|
|
|
474
|
-
###
|
|
475
|
-
|
|
476
|
-
<a name="option-release-uploadlegacysourcemaps"></a>
|
|
381
|
+
### <a name="option-release-uploadlegacysourcemaps"></a>`release.uploadLegacySourcemaps`
|
|
477
382
|
|
|
478
383
|
Type: `string | IncludeEntry | Array<string | IncludeEntry>`
|
|
479
384
|
|
|
@@ -573,16 +478,12 @@ type IncludeEntry = {
|
|
|
573
478
|
|
|
574
479
|
|
|
575
480
|
|
|
576
|
-
###
|
|
577
|
-
|
|
578
|
-
<a name="option-_experiments"></a>
|
|
481
|
+
### <a name="option-_experiments"></a>`_experiments`
|
|
579
482
|
|
|
580
483
|
Type: `string`
|
|
581
484
|
|
|
582
485
|
Options that are considered experimental and subject to change. This option does not follow semantic versioning and may change in any release.
|
|
583
|
-
###
|
|
584
|
-
|
|
585
|
-
<a name="option-_experiments-injectbuildinformation"></a>
|
|
486
|
+
### <a name="option-_experiments-injectbuildinformation"></a>`_experiments.injectBuildInformation`
|
|
586
487
|
|
|
587
488
|
Type: `boolean`
|
|
588
489
|
|