@sentry/rollup-plugin 2.0.0-alpha.7 → 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 CHANGED
@@ -42,33 +42,12 @@ export default {
42
42
  plugins: [
43
43
  // Put the Sentry rollup plugin after all other plugins
44
44
  sentryRollupPlugin({
45
- org: "___ORG_SLUG___",
46
- project: "___PROJECT_SLUG___",
45
+ org: process.env.SENTRY_ORG,
46
+ project: process.env.SENTRY_PROJECT,
47
47
 
48
48
  // Auth tokens can be obtained from https://sentry.io/settings/account/api/auth-tokens/
49
49
  // and need `project:releases` and `org:read` scopes
50
- authToken: env.SENTRY_AUTH_TOKEN,
51
-
52
- sourcemaps: {
53
- // Specify the directory containing build artifacts
54
- assets: "./**",
55
- // Don't upload the source maps of dependencies
56
- ignore: ["./node_modules/**"],
57
- },
58
-
59
- // Helps troubleshooting - set to false to make plugin less noisy
60
- debug: true,
61
-
62
- // Use the following option if you're on an SDK version lower than 7.47.0:
63
- // release: {
64
- // uploadLegacySourcemaps: {
65
- // include: ".",
66
- // ignore: ["node_modules"],
67
- // },
68
- // },
69
-
70
- // Optionally uncomment the line below to override automatic release name detection
71
- // release: env.RELEASE,
50
+ authToken: process.env.SENTRY_AUTH_TOKEN,
72
51
  }),
73
52
  ],
74
53
  output: {
@@ -108,17 +87,13 @@ export default {
108
87
  - [`_experiments`](#option-_experiments)
109
88
  - [`injectBuildInformation`](#option-_experiments-injectbuildinformation)
110
89
 
111
- ### `org`
112
-
113
- <a name="option-org"></a>
90
+ ### <a name="option-org"></a>`org`
114
91
 
115
92
  Type: `string`
116
93
 
117
94
  The slug of the Sentry organization associated with the app.
118
95
 
119
- ### `project`
120
-
121
- <a name="option-project"></a>
96
+ ### <a name="option-project"></a>`project`
122
97
 
123
98
 
124
99
 
@@ -126,9 +101,7 @@ The slug of the Sentry project associated with the app.
126
101
 
127
102
  This value can also be specified via the `SENTRY_PROJECT` environment variable.
128
103
 
129
- ### `authToken`
130
-
131
- <a name="option-authtoken"></a>
104
+ ### <a name="option-authtoken"></a>`authToken`
132
105
 
133
106
  Type: `string`
134
107
 
@@ -136,9 +109,7 @@ The authentication token to use for all communication with Sentry. Can be obtain
136
109
 
137
110
  This value can also be specified via the `SENTRY_AUTH_TOKEN` environment variable.
138
111
 
139
- ### `url`
140
-
141
- <a name="option-url"></a>
112
+ ### <a name="option-url"></a>`url`
142
113
 
143
114
  Type: `string`
144
115
 
@@ -148,33 +119,25 @@ This value can also be set via the SENTRY_URL environment variable.
148
119
 
149
120
  Defaults to https://sentry.io/, which is the correct value for SaaS customers.
150
121
 
151
- ### `headers`
152
-
153
- <a name="option-headers"></a>
122
+ ### <a name="option-headers"></a>`headers`
154
123
 
155
124
  Type: `Record<string, string>`
156
125
 
157
126
  Headers added to every outgoing network request.
158
127
 
159
- ### `debug`
160
-
161
- <a name="option-debug"></a>
128
+ ### <a name="option-debug"></a>`debug`
162
129
 
163
130
  Type: `boolean`
164
131
 
165
132
  Print useful debug information. Defaults to `false`.
166
133
 
167
- ### `silent`
168
-
169
- <a name="option-silent"></a>
134
+ ### <a name="option-silent"></a>`silent`
170
135
 
171
136
  Type: `boolean`
172
137
 
173
138
  Suppresses all logs. Defaults to `false`.
174
139
 
175
- ### `errorHandler`
176
-
177
- <a name="option-errorhandler"></a>
140
+ ### <a name="option-errorhandler"></a>`errorHandler`
178
141
 
179
142
  Type: `(err: Error) => void`
180
143
 
@@ -191,9 +154,7 @@ errorHandler: (err) => {
191
154
  ```
192
155
 
193
156
 
194
- ### `telemetry`
195
-
196
- <a name="option-telemetry"></a>
157
+ ### <a name="option-telemetry"></a>`telemetry`
197
158
 
198
159
  Type: `boolean`
199
160
 
@@ -203,36 +164,30 @@ At Sentry we like to use Sentry ourselves to deliver faster and more stable prod
203
164
 
204
165
  Defaults to `true`.
205
166
 
206
- ### `disable`
207
-
208
- <a name="option-disable"></a>
167
+ ### <a name="option-disable"></a>`disable`
209
168
 
210
169
  Type: `boolean`
211
170
 
212
171
  Completely disables all functionality of the plugin. Defaults to `false`.
213
172
 
214
- ### `sourcemaps`
215
-
216
- <a name="option-sourcemaps"></a>
173
+ ### <a name="option-sourcemaps"></a>`sourcemaps`
217
174
 
218
175
 
219
176
 
220
177
  Options for source maps uploading. Leave this option undefined if you do not want to upload source maps to Sentry.
221
- ### `sourcemaps.assets`
222
-
223
- <a name="option-sourcemaps-assets"></a>
178
+ ### <a name="option-sourcemaps-assets"></a>`sourcemaps.assets`
224
179
 
225
180
  Type: `string | string[]`
226
181
 
227
182
  A glob or an array of globs that specifies the build artifacts that should be uploaded to Sentry.
228
183
 
184
+ If this option is not specified, the plugin will try to upload all JavaScript files and source map files that are created during build.
185
+
229
186
  The globbing patterns follow the implementation of the `glob` package. (https://www.npmjs.com/package/glob)
230
187
 
231
188
  Use the `debug` option to print information about which files end up being uploaded.
232
189
 
233
- ### `sourcemaps.ignore`
234
-
235
- <a name="option-sourcemaps-ignore"></a>
190
+ ### <a name="option-sourcemaps-ignore"></a>`sourcemaps.ignore`
236
191
 
237
192
  Type: `string | string[]`
238
193
 
@@ -244,9 +199,7 @@ The globbing patterns follow the implementation of the `glob` package. (https://
244
199
 
245
200
  Use the `debug` option to print information about which files end up being uploaded.
246
201
 
247
- ### `sourcemaps.rewriteSources`
248
-
249
- <a name="option-sourcemaps-rewritesources"></a>
202
+ ### <a name="option-sourcemaps-rewritesources"></a>`sourcemaps.rewriteSources`
250
203
 
251
204
  Type: `(source: string, map: any) => string`
252
205
 
@@ -254,9 +207,7 @@ Hook to rewrite the `sources` field inside the source map before being uploaded
254
207
 
255
208
  Defaults to making all sources relative to `process.cwd()` while building.
256
209
 
257
- ### `sourcemaps.deleteFilesAfterUpload`
258
-
259
- <a name="option-sourcemaps-deletefilesafterupload"></a>
210
+ ### <a name="option-sourcemaps-deletefilesafterupload"></a>`sourcemaps.deleteFilesAfterUpload`
260
211
 
261
212
  Type: `string | string[]`
262
213
 
@@ -266,18 +217,14 @@ The globbing patterns follow the implementation of the `glob` package. (https://
266
217
 
267
218
  Use the `debug` option to print information about which files end up being deleted.
268
219
 
269
- ### `release`
270
-
271
- <a name="option-release"></a>
220
+ ### <a name="option-release"></a>`release`
272
221
 
273
222
 
274
223
 
275
224
  Options related to managing the Sentry releases for a build.
276
225
 
277
226
  More info: https://docs.sentry.io/product/releases/
278
- ### `release.name`
279
-
280
- <a name="option-release-name"></a>
227
+ ### <a name="option-release-name"></a>`release.name`
281
228
 
282
229
  Type: `string`
283
230
 
@@ -289,9 +236,7 @@ Defaults to automatically detecting a value for your environment. This includes
289
236
 
290
237
  If you didn't provide a value and the plugin can't automatically detect one, no release will be created.
291
238
 
292
- ### `release.inject`
293
-
294
- <a name="option-release-inject"></a>
239
+ ### <a name="option-release-inject"></a>`release.inject`
295
240
 
296
241
  Type: `boolean`
297
242
 
@@ -299,9 +244,7 @@ Whether the plugin should inject release information into the build for the SDK
299
244
 
300
245
  Defaults to `true`.
301
246
 
302
- ### `release.create`
303
-
304
- <a name="option-release-create"></a>
247
+ ### <a name="option-release-create"></a>`release.create`
305
248
 
306
249
  Type: `boolean`
307
250
 
@@ -309,9 +252,7 @@ Whether the plugin should create a release on Sentry during the build. Note that
309
252
 
310
253
  Defaults to `true`.
311
254
 
312
- ### `release.finalize`
313
-
314
- <a name="option-release-finalize"></a>
255
+ ### <a name="option-release-finalize"></a>`release.finalize`
315
256
 
316
257
  Type: `boolean`
317
258
 
@@ -319,17 +260,13 @@ Whether the Sentry release should be automatically finalized (meaning an end tim
319
260
 
320
261
  Defaults to `true`.
321
262
 
322
- ### `release.dist`
323
-
324
- <a name="option-release-dist"></a>
263
+ ### <a name="option-release-dist"></a>`release.dist`
325
264
 
326
265
  Type: `string`
327
266
 
328
267
  Unique identifier for the distribution, used to further segment your release.
329
268
 
330
- ### `release.vcsRemote`
331
-
332
- <a name="option-release-vcsremote"></a>
269
+ ### <a name="option-release-vcsremote"></a>`release.vcsRemote`
333
270
 
334
271
  Type: `string`
335
272
 
@@ -339,16 +276,12 @@ This value can also be specified via the `SENTRY_VSC_REMOTE` environment variabl
339
276
 
340
277
  Defaults to 'origin'.
341
278
 
342
- ### `release.setCommits`
343
-
344
- <a name="option-release-setcommits"></a>
279
+ ### <a name="option-release-setcommits"></a>`release.setCommits`
345
280
 
346
281
 
347
282
 
348
283
  Option to associate the created release with its commits in Sentry.
349
- ### `release.setCommits.previousCommit`
350
-
351
- <a name="option-release-setcommits-previouscommit"></a>
284
+ ### <a name="option-release-setcommits-previouscommit"></a>`release.setCommits.previousCommit`
352
285
 
353
286
  Type: `string`
354
287
 
@@ -358,9 +291,7 @@ Defaults to the last commit of the previous release in Sentry.
358
291
 
359
292
  If there was no previous release, the last 10 commits will be used.
360
293
 
361
- ### `release.setCommits.ignoreMissing`
362
-
363
- <a name="option-release-setcommits-ignoremissing"></a>
294
+ ### <a name="option-release-setcommits-ignoremissing"></a>`release.setCommits.ignoreMissing`
364
295
 
365
296
  Type: `boolean`
366
297
 
@@ -368,9 +299,7 @@ If the flag is to `true` and the previous release commit was not found in the re
368
299
 
369
300
  Defaults to `false`.
370
301
 
371
- ### `release.setCommits.ignoreEmpty`
372
-
373
- <a name="option-release-setcommits-ignoreempty"></a>
302
+ ### <a name="option-release-setcommits-ignoreempty"></a>`release.setCommits.ignoreEmpty`
374
303
 
375
304
  Type: `boolean`
376
305
 
@@ -378,9 +307,7 @@ If this flag is set, the setCommits step will not fail and just exit silently if
378
307
 
379
308
  Defaults to `false`.
380
309
 
381
- ### `release.setCommits.auto`
382
-
383
- <a name="option-release-setcommits-auto"></a>
310
+ ### <a name="option-release-setcommits-auto"></a>`release.setCommits.auto`
384
311
 
385
312
  Type: `boolean`
386
313
 
@@ -388,9 +315,7 @@ Automatically sets `commit` and `previousCommit`. Sets `commit` to `HEAD` and `p
388
315
 
389
316
  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`.
390
317
 
391
- ### `release.setCommits.repo`
392
-
393
- <a name="option-release-setcommits-repo"></a>
318
+ ### <a name="option-release-setcommits-repo"></a>`release.setCommits.repo`
394
319
 
395
320
  Type: `string`
396
321
 
@@ -398,9 +323,7 @@ The full repo name as defined in Sentry.
398
323
 
399
324
  Required if the `auto` option is not set to `true`.
400
325
 
401
- ### `release.setCommits.commit`
402
-
403
- <a name="option-release-setcommits-commit"></a>
326
+ ### <a name="option-release-setcommits-commit"></a>`release.setCommits.commit`
404
327
 
405
328
  Type: `string`
406
329
 
@@ -408,64 +331,48 @@ The current (last) commit in the release.
408
331
 
409
332
  Required if the `auto` option is not set to `true`.
410
333
 
411
- ### `release.deploy`
412
-
413
- <a name="option-release-deploy"></a>
334
+ ### <a name="option-release-deploy"></a>`release.deploy`
414
335
 
415
336
 
416
337
 
417
338
  Adds deployment information to the release in Sentry.
418
- ### `release.deploy.env`
419
-
420
- <a name="option-release-deploy-env"></a>
339
+ ### <a name="option-release-deploy-env"></a>`release.deploy.env`
421
340
 
422
341
  Type: `string`
423
342
 
424
343
  Environment for this release. Values that make sense here would be `production` or `staging`.
425
344
 
426
- ### `release.deploy.started`
427
-
428
- <a name="option-release-deploy-started"></a>
345
+ ### <a name="option-release-deploy-started"></a>`release.deploy.started`
429
346
 
430
347
  Type: `number | string`
431
348
 
432
349
  Deployment start time in Unix timestamp (in seconds) or ISO 8601 format.
433
350
 
434
- ### `release.deploy.finished`
435
-
436
- <a name="option-release-deploy-finished"></a>
351
+ ### <a name="option-release-deploy-finished"></a>`release.deploy.finished`
437
352
 
438
353
  Type: `number | string`
439
354
 
440
355
  Deployment finish time in Unix timestamp (in seconds) or ISO 8601 format.
441
356
 
442
- ### `release.deploy.time`
443
-
444
- <a name="option-release-deploy-time"></a>
357
+ ### <a name="option-release-deploy-time"></a>`release.deploy.time`
445
358
 
446
359
  Type: `number`
447
360
 
448
361
  Deployment duration (in seconds). Can be used instead of started and finished.
449
362
 
450
- ### `release.deploy.name`
451
-
452
- <a name="option-release-deploy-name"></a>
363
+ ### <a name="option-release-deploy-name"></a>`release.deploy.name`
453
364
 
454
365
  Type: `string`
455
366
 
456
367
  Human readable name for the deployment.
457
368
 
458
- ### `release.deploy.url`
459
-
460
- <a name="option-release-deploy-url"></a>
369
+ ### <a name="option-release-deploy-url"></a>`release.deploy.url`
461
370
 
462
371
  Type: `string`
463
372
 
464
373
  URL that points to the deployment.
465
374
 
466
- ### `release.cleanArtifacts`
467
-
468
- <a name="option-release-cleanartifacts"></a>
375
+ ### <a name="option-release-cleanartifacts"></a>`release.cleanArtifacts`
469
376
 
470
377
  Type: `boolean`
471
378
 
@@ -473,9 +380,7 @@ Remove all previously uploaded artifacts for this release on Sentry before the u
473
380
 
474
381
  Defaults to `false`.
475
382
 
476
- ### `release.uploadLegacySourcemaps`
477
-
478
- <a name="option-release-uploadlegacysourcemaps"></a>
383
+ ### <a name="option-release-uploadlegacysourcemaps"></a>`release.uploadLegacySourcemaps`
479
384
 
480
385
  Type: `string | IncludeEntry | Array<string | IncludeEntry>`
481
386
 
@@ -575,16 +480,12 @@ type IncludeEntry = {
575
480
 
576
481
 
577
482
 
578
- ### `_experiments`
579
-
580
- <a name="option-_experiments"></a>
483
+ ### <a name="option-_experiments"></a>`_experiments`
581
484
 
582
485
  Type: `string`
583
486
 
584
487
  Options that are considered experimental and subject to change. This option does not follow semantic versioning and may change in any release.
585
- ### `_experiments.injectBuildInformation`
586
-
587
- <a name="option-_experiments-injectbuildinformation"></a>
488
+ ### <a name="option-_experiments-injectbuildinformation"></a>`_experiments.injectBuildInformation`
588
489
 
589
490
  Type: `boolean`
590
491
 
package/dist/cjs/index.js CHANGED
@@ -10,19 +10,25 @@ function rollupReleaseInjectionPlugin(injectionCode) {
10
10
  rollup: bundlerPluginCore.createRollupReleaseInjectionHooks(injectionCode)
11
11
  };
12
12
  }
13
-
14
13
  function rollupDebugIdInjectionPlugin() {
15
14
  return {
16
15
  name: "sentry-rollup-debug-id-injection-plugin",
17
16
  rollup: bundlerPluginCore.createRollupDebugIdInjectionHooks()
18
17
  };
19
18
  }
20
-
19
+ function rollupDebugIdUploadPlugin(upload) {
20
+ return {
21
+ name: "sentry-rollup-debug-id-upload-plugin",
22
+ rollup: bundlerPluginCore.createRollupDebugIdUploadHooks(upload)
23
+ };
24
+ }
21
25
  var sentryUnplugin = bundlerPluginCore.sentryUnpluginFactory({
22
26
  releaseInjectionPlugin: rollupReleaseInjectionPlugin,
23
- debugIdInjectionPlugin: rollupDebugIdInjectionPlugin
24
- }); // eslint-disable-next-line @typescript-eslint/no-explicit-any
27
+ debugIdInjectionPlugin: rollupDebugIdInjectionPlugin,
28
+ debugIdUploadPlugin: rollupDebugIdUploadPlugin
29
+ });
25
30
 
31
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
26
32
  var sentryRollupPlugin = sentryUnplugin.rollup;
27
33
 
28
34
  Object.defineProperty(exports, 'sentryCliBinaryExists', {
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["import {\n sentryUnpluginFactory,\n Options,\n createRollupReleaseInjectionHooks,\n createRollupDebugIdInjectionHooks,\n} from \"@sentry/bundler-plugin-core\";\nimport type { UnpluginOptions } from \"unplugin\";\n\nfunction rollupReleaseInjectionPlugin(injectionCode: string): UnpluginOptions {\n return {\n name: \"sentry-rollup-release-injection-plugin\",\n rollup: createRollupReleaseInjectionHooks(injectionCode),\n };\n}\n\nfunction rollupDebugIdInjectionPlugin(): UnpluginOptions {\n return {\n name: \"sentry-rollup-debug-id-injection-plugin\",\n rollup: createRollupDebugIdInjectionHooks(),\n };\n}\n\nconst sentryUnplugin = sentryUnpluginFactory({\n releaseInjectionPlugin: rollupReleaseInjectionPlugin,\n debugIdInjectionPlugin: rollupDebugIdInjectionPlugin,\n});\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const sentryRollupPlugin: (options: Options) => any = sentryUnplugin.rollup;\n\nexport type { Options as SentryRollupPluginOptions } from \"@sentry/bundler-plugin-core\";\nexport { sentryCliBinaryExists } from \"@sentry/bundler-plugin-core\";\n"],"names":["rollupReleaseInjectionPlugin","injectionCode","name","rollup","createRollupReleaseInjectionHooks","rollupDebugIdInjectionPlugin","createRollupDebugIdInjectionHooks","sentryUnplugin","sentryUnpluginFactory","releaseInjectionPlugin","debugIdInjectionPlugin","sentryRollupPlugin"],"mappings":";;;;;;AAQA,SAASA,4BAAT,CAAsCC,aAAtC,EAA8E;EAC5E,OAAO;AACLC,IAAAA,IAAI,EAAE,wCADD;IAELC,MAAM,EAAEC,mDAAiC,CAACH,aAAD,CAAA;GAF3C,CAAA;AAID,CAAA;;AAED,SAASI,4BAAT,GAAyD;EACvD,OAAO;AACLH,IAAAA,IAAI,EAAE,yCADD;AAELC,IAAAA,MAAM,EAAEG,mDAAiC,EAAA;GAF3C,CAAA;AAID,CAAA;;AAED,IAAMC,cAAc,GAAGC,uCAAqB,CAAC;AAC3CC,EAAAA,sBAAsB,EAAET,4BADmB;AAE3CU,EAAAA,sBAAsB,EAAEL,4BAAAA;AAFmB,CAAD,CAA5C;;AAMaM,IAAAA,kBAA6C,GAAGJ,cAAc,CAACJ;;;;;;;;"}
1
+ {"version":3,"file":"index.js","sources":["../../src/index.ts"],"sourcesContent":["import {\n sentryUnpluginFactory,\n Options,\n createRollupReleaseInjectionHooks,\n createRollupDebugIdInjectionHooks,\n createRollupDebugIdUploadHooks,\n} from \"@sentry/bundler-plugin-core\";\nimport type { UnpluginOptions } from \"unplugin\";\n\nfunction rollupReleaseInjectionPlugin(injectionCode: string): UnpluginOptions {\n return {\n name: \"sentry-rollup-release-injection-plugin\",\n rollup: createRollupReleaseInjectionHooks(injectionCode),\n };\n}\n\nfunction rollupDebugIdInjectionPlugin(): UnpluginOptions {\n return {\n name: \"sentry-rollup-debug-id-injection-plugin\",\n rollup: createRollupDebugIdInjectionHooks(),\n };\n}\n\nfunction rollupDebugIdUploadPlugin(\n upload: (buildArtifacts: string[]) => Promise<void>\n): UnpluginOptions {\n return {\n name: \"sentry-rollup-debug-id-upload-plugin\",\n rollup: createRollupDebugIdUploadHooks(upload),\n };\n}\n\nconst sentryUnplugin = sentryUnpluginFactory({\n releaseInjectionPlugin: rollupReleaseInjectionPlugin,\n debugIdInjectionPlugin: rollupDebugIdInjectionPlugin,\n debugIdUploadPlugin: rollupDebugIdUploadPlugin,\n});\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const sentryRollupPlugin: (options: Options) => any = sentryUnplugin.rollup;\n\nexport type { Options as SentryRollupPluginOptions } from \"@sentry/bundler-plugin-core\";\nexport { sentryCliBinaryExists } from \"@sentry/bundler-plugin-core\";\n"],"names":["rollupReleaseInjectionPlugin","injectionCode","name","rollup","createRollupReleaseInjectionHooks","rollupDebugIdInjectionPlugin","createRollupDebugIdInjectionHooks","rollupDebugIdUploadPlugin","upload","createRollupDebugIdUploadHooks","sentryUnplugin","sentryUnpluginFactory","releaseInjectionPlugin","debugIdInjectionPlugin","debugIdUploadPlugin","sentryRollupPlugin"],"mappings":";;;;;;AASA,SAASA,4BAA4BA,CAACC,aAAqB,EAAmB;EAC5E,OAAO;AACLC,IAAAA,IAAI,EAAE,wCAAwC;IAC9CC,MAAM,EAAEC,mDAAiC,CAACH,aAAa,CAAA;GACxD,CAAA;AACH,CAAA;AAEA,SAASI,4BAA4BA,GAAoB;EACvD,OAAO;AACLH,IAAAA,IAAI,EAAE,yCAAyC;IAC/CC,MAAM,EAAEG,mDAAiC,EAAC;GAC3C,CAAA;AACH,CAAA;AAEA,SAASC,yBAAyBA,CAChCC,MAAmD,EAClC;EACjB,OAAO;AACLN,IAAAA,IAAI,EAAE,sCAAsC;IAC5CC,MAAM,EAAEM,gDAA8B,CAACD,MAAM,CAAA;GAC9C,CAAA;AACH,CAAA;AAEA,IAAME,cAAc,GAAGC,uCAAqB,CAAC;AAC3CC,EAAAA,sBAAsB,EAAEZ,4BAA4B;AACpDa,EAAAA,sBAAsB,EAAER,4BAA4B;AACpDS,EAAAA,mBAAmB,EAAEP,yBAAAA;AACvB,CAAC,CAAC,CAAA;;AAEF;AACaQ,IAAAA,kBAA6C,GAAGL,cAAc,CAACP;;;;;;;;"}
@@ -1,4 +1,4 @@
1
- import { sentryUnpluginFactory, createRollupReleaseInjectionHooks, createRollupDebugIdInjectionHooks } from '@sentry/bundler-plugin-core';
1
+ import { sentryUnpluginFactory, createRollupReleaseInjectionHooks, createRollupDebugIdInjectionHooks, createRollupDebugIdUploadHooks } from '@sentry/bundler-plugin-core';
2
2
  export { sentryCliBinaryExists } from '@sentry/bundler-plugin-core';
3
3
 
4
4
  function rollupReleaseInjectionPlugin(injectionCode) {
@@ -7,19 +7,25 @@ function rollupReleaseInjectionPlugin(injectionCode) {
7
7
  rollup: createRollupReleaseInjectionHooks(injectionCode)
8
8
  };
9
9
  }
10
-
11
10
  function rollupDebugIdInjectionPlugin() {
12
11
  return {
13
12
  name: "sentry-rollup-debug-id-injection-plugin",
14
13
  rollup: createRollupDebugIdInjectionHooks()
15
14
  };
16
15
  }
17
-
16
+ function rollupDebugIdUploadPlugin(upload) {
17
+ return {
18
+ name: "sentry-rollup-debug-id-upload-plugin",
19
+ rollup: createRollupDebugIdUploadHooks(upload)
20
+ };
21
+ }
18
22
  var sentryUnplugin = sentryUnpluginFactory({
19
23
  releaseInjectionPlugin: rollupReleaseInjectionPlugin,
20
- debugIdInjectionPlugin: rollupDebugIdInjectionPlugin
21
- }); // eslint-disable-next-line @typescript-eslint/no-explicit-any
24
+ debugIdInjectionPlugin: rollupDebugIdInjectionPlugin,
25
+ debugIdUploadPlugin: rollupDebugIdUploadPlugin
26
+ });
22
27
 
28
+ // eslint-disable-next-line @typescript-eslint/no-explicit-any
23
29
  var sentryRollupPlugin = sentryUnplugin.rollup;
24
30
 
25
31
  export { sentryRollupPlugin };
@@ -1 +1 @@
1
- {"version":3,"file":"index.mjs","sources":["../../src/index.ts"],"sourcesContent":["import {\n sentryUnpluginFactory,\n Options,\n createRollupReleaseInjectionHooks,\n createRollupDebugIdInjectionHooks,\n} from \"@sentry/bundler-plugin-core\";\nimport type { UnpluginOptions } from \"unplugin\";\n\nfunction rollupReleaseInjectionPlugin(injectionCode: string): UnpluginOptions {\n return {\n name: \"sentry-rollup-release-injection-plugin\",\n rollup: createRollupReleaseInjectionHooks(injectionCode),\n };\n}\n\nfunction rollupDebugIdInjectionPlugin(): UnpluginOptions {\n return {\n name: \"sentry-rollup-debug-id-injection-plugin\",\n rollup: createRollupDebugIdInjectionHooks(),\n };\n}\n\nconst sentryUnplugin = sentryUnpluginFactory({\n releaseInjectionPlugin: rollupReleaseInjectionPlugin,\n debugIdInjectionPlugin: rollupDebugIdInjectionPlugin,\n});\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const sentryRollupPlugin: (options: Options) => any = sentryUnplugin.rollup;\n\nexport type { Options as SentryRollupPluginOptions } from \"@sentry/bundler-plugin-core\";\nexport { sentryCliBinaryExists } from \"@sentry/bundler-plugin-core\";\n"],"names":["rollupReleaseInjectionPlugin","injectionCode","name","rollup","createRollupReleaseInjectionHooks","rollupDebugIdInjectionPlugin","createRollupDebugIdInjectionHooks","sentryUnplugin","sentryUnpluginFactory","releaseInjectionPlugin","debugIdInjectionPlugin","sentryRollupPlugin"],"mappings":";;;AAQA,SAASA,4BAAT,CAAsCC,aAAtC,EAA8E;EAC5E,OAAO;AACLC,IAAAA,IAAI,EAAE,wCADD;IAELC,MAAM,EAAEC,iCAAiC,CAACH,aAAD,CAAA;GAF3C,CAAA;AAID,CAAA;;AAED,SAASI,4BAAT,GAAyD;EACvD,OAAO;AACLH,IAAAA,IAAI,EAAE,yCADD;AAELC,IAAAA,MAAM,EAAEG,iCAAiC,EAAA;GAF3C,CAAA;AAID,CAAA;;AAED,IAAMC,cAAc,GAAGC,qBAAqB,CAAC;AAC3CC,EAAAA,sBAAsB,EAAET,4BADmB;AAE3CU,EAAAA,sBAAsB,EAAEL,4BAAAA;AAFmB,CAAD,CAA5C;;AAMaM,IAAAA,kBAA6C,GAAGJ,cAAc,CAACJ;;;;"}
1
+ {"version":3,"file":"index.mjs","sources":["../../src/index.ts"],"sourcesContent":["import {\n sentryUnpluginFactory,\n Options,\n createRollupReleaseInjectionHooks,\n createRollupDebugIdInjectionHooks,\n createRollupDebugIdUploadHooks,\n} from \"@sentry/bundler-plugin-core\";\nimport type { UnpluginOptions } from \"unplugin\";\n\nfunction rollupReleaseInjectionPlugin(injectionCode: string): UnpluginOptions {\n return {\n name: \"sentry-rollup-release-injection-plugin\",\n rollup: createRollupReleaseInjectionHooks(injectionCode),\n };\n}\n\nfunction rollupDebugIdInjectionPlugin(): UnpluginOptions {\n return {\n name: \"sentry-rollup-debug-id-injection-plugin\",\n rollup: createRollupDebugIdInjectionHooks(),\n };\n}\n\nfunction rollupDebugIdUploadPlugin(\n upload: (buildArtifacts: string[]) => Promise<void>\n): UnpluginOptions {\n return {\n name: \"sentry-rollup-debug-id-upload-plugin\",\n rollup: createRollupDebugIdUploadHooks(upload),\n };\n}\n\nconst sentryUnplugin = sentryUnpluginFactory({\n releaseInjectionPlugin: rollupReleaseInjectionPlugin,\n debugIdInjectionPlugin: rollupDebugIdInjectionPlugin,\n debugIdUploadPlugin: rollupDebugIdUploadPlugin,\n});\n\n// eslint-disable-next-line @typescript-eslint/no-explicit-any\nexport const sentryRollupPlugin: (options: Options) => any = sentryUnplugin.rollup;\n\nexport type { Options as SentryRollupPluginOptions } from \"@sentry/bundler-plugin-core\";\nexport { sentryCliBinaryExists } from \"@sentry/bundler-plugin-core\";\n"],"names":["rollupReleaseInjectionPlugin","injectionCode","name","rollup","createRollupReleaseInjectionHooks","rollupDebugIdInjectionPlugin","createRollupDebugIdInjectionHooks","rollupDebugIdUploadPlugin","upload","createRollupDebugIdUploadHooks","sentryUnplugin","sentryUnpluginFactory","releaseInjectionPlugin","debugIdInjectionPlugin","debugIdUploadPlugin","sentryRollupPlugin"],"mappings":";;;AASA,SAASA,4BAA4BA,CAACC,aAAqB,EAAmB;EAC5E,OAAO;AACLC,IAAAA,IAAI,EAAE,wCAAwC;IAC9CC,MAAM,EAAEC,iCAAiC,CAACH,aAAa,CAAA;GACxD,CAAA;AACH,CAAA;AAEA,SAASI,4BAA4BA,GAAoB;EACvD,OAAO;AACLH,IAAAA,IAAI,EAAE,yCAAyC;IAC/CC,MAAM,EAAEG,iCAAiC,EAAC;GAC3C,CAAA;AACH,CAAA;AAEA,SAASC,yBAAyBA,CAChCC,MAAmD,EAClC;EACjB,OAAO;AACLN,IAAAA,IAAI,EAAE,sCAAsC;IAC5CC,MAAM,EAAEM,8BAA8B,CAACD,MAAM,CAAA;GAC9C,CAAA;AACH,CAAA;AAEA,IAAME,cAAc,GAAGC,qBAAqB,CAAC;AAC3CC,EAAAA,sBAAsB,EAAEZ,4BAA4B;AACpDa,EAAAA,sBAAsB,EAAER,4BAA4B;AACpDS,EAAAA,mBAAmB,EAAEP,yBAAAA;AACvB,CAAC,CAAC,CAAA;;AAEF;AACaQ,IAAAA,kBAA6C,GAAGL,cAAc,CAACP;;;;"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@sentry/rollup-plugin",
3
- "version": "2.0.0-alpha.7",
3
+ "version": "2.1.0",
4
4
  "description": "Official Sentry Rollup plugin",
5
5
  "repository": "git://github.com/getsentry/sentry-javascript-bundler-plugins.git",
6
6
  "homepage": "https://github.com/getsentry/sentry-javascript-bundler-plugins/tree/main/packages/rollup-plugin",
@@ -49,7 +49,7 @@
49
49
  "prepack": "ts-node ./src/prepack.ts"
50
50
  },
51
51
  "dependencies": {
52
- "@sentry/bundler-plugin-core": "2.0.0-alpha.7",
52
+ "@sentry/bundler-plugin-core": "2.1.0",
53
53
  "unplugin": "1.0.1"
54
54
  },
55
55
  "peerDependencies": {
@@ -61,8 +61,8 @@
61
61
  "@babel/preset-typescript": "7.17.12",
62
62
  "@rollup/plugin-babel": "5.3.1",
63
63
  "@rollup/plugin-node-resolve": "13.3.0",
64
- "@sentry-internal/eslint-config": "2.0.0-alpha.7",
65
- "@sentry-internal/sentry-bundler-plugin-tsconfig": "2.0.0-alpha.7",
64
+ "@sentry-internal/eslint-config": "2.1.0",
65
+ "@sentry-internal/sentry-bundler-plugin-tsconfig": "2.1.0",
66
66
  "@swc/core": "^1.2.205",
67
67
  "@swc/jest": "^0.2.21",
68
68
  "@types/jest": "^28.1.3",