@sentry/bundler-plugin-core 2.5.0 → 2.6.1
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/dist/cjs/index.js +28 -18
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +28 -18
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/debug-id-upload.d.ts +1 -1
- package/dist/types/debug-id-upload.d.ts.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/plugins/release-management.d.ts +1 -1
- package/dist/types/plugins/release-management.d.ts.map +1 -1
- package/dist/types/sentry/telemetry.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/cjs/index.js
CHANGED
|
@@ -863,6 +863,9 @@ function createDebugIdUploadFunction(_ref) {
|
|
|
863
863
|
return Promise.all(filePathsToDelete.map(function (filePathToDelete) {
|
|
864
864
|
return fs__default["default"].promises.rm(filePathToDelete, {
|
|
865
865
|
force: true
|
|
866
|
+
})["catch"](function (e) {
|
|
867
|
+
// This is allowed to fail - we just don't do anything
|
|
868
|
+
logger.debug("An error occured while attempting to delete asset: ".concat(filePathToDelete), e);
|
|
866
869
|
});
|
|
867
870
|
}));
|
|
868
871
|
case 53:
|
|
@@ -1300,7 +1303,7 @@ function createSentryInstance(options, shouldSendTelemetry, bundler) {
|
|
|
1300
1303
|
dsn: "https://4c2bae7d9fbc413e8f7385f55c515d51@o1.ingest.sentry.io/6690737",
|
|
1301
1304
|
tracesSampleRate: 1,
|
|
1302
1305
|
sampleRate: 1,
|
|
1303
|
-
release: "2.
|
|
1306
|
+
release: "2.6.1",
|
|
1304
1307
|
integrations: [],
|
|
1305
1308
|
tracePropagationTargets: ["sentry.io/api"],
|
|
1306
1309
|
stackParser: node.defaultStackParser,
|
|
@@ -1370,6 +1373,8 @@ function setTelemetryDataOnHub(options, hub, bundler) {
|
|
|
1370
1373
|
if (release.uploadLegacySourcemaps) {
|
|
1371
1374
|
hub.setTag("uploadLegacySourcemapsEntries", Array.isArray(release.uploadLegacySourcemaps) ? release.uploadLegacySourcemaps.length : 1);
|
|
1372
1375
|
}
|
|
1376
|
+
hub.setTag("module-metadata", !!options._experiments.moduleMetadata);
|
|
1377
|
+
hub.setTag("inject-build-information", !!options._experiments.injectBuildInformation);
|
|
1373
1378
|
|
|
1374
1379
|
// Optional release pipeline steps
|
|
1375
1380
|
hub.setTag("clean-artifacts", release.cleanArtifacts);
|
|
@@ -1530,7 +1535,7 @@ function sentryUnpluginFactory(_ref) {
|
|
|
1530
1535
|
});
|
|
1531
1536
|
|
|
1532
1537
|
// Set the User-Agent that Sentry CLI will use when interacting with Sentry
|
|
1533
|
-
process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.
|
|
1538
|
+
process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.6.1");
|
|
1534
1539
|
function handleRecoverableError(unknownError) {
|
|
1535
1540
|
sentrySession.status = "abnormal";
|
|
1536
1541
|
try {
|
|
@@ -1600,7 +1605,7 @@ function sentryUnpluginFactory(_ref) {
|
|
|
1600
1605
|
logger.warn("No release name provided. Will not create release. Please set the `release.name` option to identify your release.");
|
|
1601
1606
|
} else if (!options.authToken) {
|
|
1602
1607
|
logger.warn("No auth token provided. Will not create release. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/");
|
|
1603
|
-
} else if (!options.org) {
|
|
1608
|
+
} else if (!options.org && !options.authToken.startsWith("sntrys_")) {
|
|
1604
1609
|
logger.warn("No organization slug provided. Will not create release. Please set the `org` option to your Sentry organization slug.");
|
|
1605
1610
|
} else if (!options.project) {
|
|
1606
1611
|
logger.warn("No project provided. Will not create release. Please set the `project` option to your Sentry project slug.");
|
|
@@ -1632,7 +1637,7 @@ function sentryUnpluginFactory(_ref) {
|
|
|
1632
1637
|
plugins.push(debugIdInjectionPlugin());
|
|
1633
1638
|
if (!options.authToken) {
|
|
1634
1639
|
logger.warn("No auth token provided. Will not upload source maps. Please set the `authToken` option. You can find information on how to generate a Sentry auth token here: https://docs.sentry.io/api/auth/");
|
|
1635
|
-
} else if (!options.org) {
|
|
1640
|
+
} else if (!options.org && !options.authToken.startsWith("sntrys_")) {
|
|
1636
1641
|
logger.warn("No org provided. Will not upload source maps. Please set the `org` option to your Sentry organization slug.");
|
|
1637
1642
|
} else if (!options.project) {
|
|
1638
1643
|
logger.warn("No project provided. Will not upload source maps. Please set the `project` option to your Sentry project slug.");
|
|
@@ -1785,35 +1790,40 @@ function createRollupDebugIdUploadHooks(upload) {
|
|
|
1785
1790
|
while (1) switch (_context.prev = _context.next) {
|
|
1786
1791
|
case 0:
|
|
1787
1792
|
if (!outputOptions.dir) {
|
|
1788
|
-
_context.next =
|
|
1793
|
+
_context.next = 9;
|
|
1789
1794
|
break;
|
|
1790
1795
|
}
|
|
1791
1796
|
outputDir = outputOptions.dir;
|
|
1792
|
-
|
|
1793
|
-
|
|
1797
|
+
_context.next = 4;
|
|
1798
|
+
return glob.glob(["/**/*.js", "/**/*.js.map"], {
|
|
1799
|
+
root: outputDir,
|
|
1800
|
+
absolute: true,
|
|
1801
|
+
nodir: true
|
|
1794
1802
|
});
|
|
1795
|
-
|
|
1803
|
+
case 4:
|
|
1804
|
+
_buildArtifacts = _context.sent;
|
|
1805
|
+
_context.next = 7;
|
|
1796
1806
|
return upload(_buildArtifacts);
|
|
1797
|
-
case 5:
|
|
1798
|
-
_context.next = 15;
|
|
1799
|
-
break;
|
|
1800
1807
|
case 7:
|
|
1808
|
+
_context.next = 17;
|
|
1809
|
+
break;
|
|
1810
|
+
case 9:
|
|
1801
1811
|
if (!outputOptions.file) {
|
|
1802
|
-
_context.next =
|
|
1812
|
+
_context.next = 14;
|
|
1803
1813
|
break;
|
|
1804
1814
|
}
|
|
1805
|
-
_context.next =
|
|
1815
|
+
_context.next = 12;
|
|
1806
1816
|
return upload([outputOptions.file]);
|
|
1807
|
-
case 10:
|
|
1808
|
-
_context.next = 15;
|
|
1809
|
-
break;
|
|
1810
1817
|
case 12:
|
|
1818
|
+
_context.next = 17;
|
|
1819
|
+
break;
|
|
1820
|
+
case 14:
|
|
1811
1821
|
_buildArtifacts2 = Object.keys(bundle).map(function (asset) {
|
|
1812
1822
|
return path__namespace.join(path__namespace.resolve(), asset);
|
|
1813
1823
|
});
|
|
1814
|
-
_context.next =
|
|
1824
|
+
_context.next = 17;
|
|
1815
1825
|
return upload(_buildArtifacts2);
|
|
1816
|
-
case
|
|
1826
|
+
case 17:
|
|
1817
1827
|
case "end":
|
|
1818
1828
|
return _context.stop();
|
|
1819
1829
|
}
|