@sentry/bundler-plugin-core 2.6.0 → 2.6.2
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/esm/index.mjs
CHANGED
|
@@ -829,6 +829,9 @@ function createDebugIdUploadFunction(_ref) {
|
|
|
829
829
|
return Promise.all(filePathsToDelete.map(function (filePathToDelete) {
|
|
830
830
|
return fs__default.promises.rm(filePathToDelete, {
|
|
831
831
|
force: true
|
|
832
|
+
})["catch"](function (e) {
|
|
833
|
+
// This is allowed to fail - we just don't do anything
|
|
834
|
+
logger.debug("An error occured while attempting to delete asset: ".concat(filePathToDelete), e);
|
|
832
835
|
});
|
|
833
836
|
}));
|
|
834
837
|
case 53:
|
|
@@ -966,43 +969,72 @@ function determineSourceMapPathFromBundle(_x9, _x10, _x11) {
|
|
|
966
969
|
*/
|
|
967
970
|
function _determineSourceMapPathFromBundle() {
|
|
968
971
|
_determineSourceMapPathFromBundle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(bundlePath, bundleSource, logger) {
|
|
969
|
-
var sourceMappingUrlMatch, sourceMappingUrl, adjacentSourceMapFilePath;
|
|
972
|
+
var sourceMappingUrlMatch, sourceMappingUrl, isUrl, isSupportedUrl, url, absoluteSourceMapPath, adjacentSourceMapFilePath;
|
|
970
973
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
971
974
|
while (1) switch (_context5.prev = _context5.next) {
|
|
972
975
|
case 0:
|
|
973
976
|
// 1. try to find source map at `sourceMappingURL` location
|
|
974
|
-
sourceMappingUrlMatch = bundleSource.match(
|
|
977
|
+
sourceMappingUrlMatch = bundleSource.match(/^\s*\/\/# sourceMappingURL=(.*)$/m);
|
|
975
978
|
if (!sourceMappingUrlMatch) {
|
|
976
|
-
_context5.next =
|
|
979
|
+
_context5.next = 21;
|
|
977
980
|
break;
|
|
978
981
|
}
|
|
979
982
|
sourceMappingUrl = path__default.normalize(sourceMappingUrlMatch[1]);
|
|
980
|
-
|
|
981
|
-
|
|
983
|
+
try {
|
|
984
|
+
url = new URL(sourceMappingUrl);
|
|
985
|
+
isUrl = true;
|
|
986
|
+
isSupportedUrl = url.protocol === "file:";
|
|
987
|
+
} catch (_unused) {
|
|
988
|
+
isUrl = false;
|
|
989
|
+
isSupportedUrl = false;
|
|
990
|
+
}
|
|
991
|
+
if (!isSupportedUrl) {
|
|
992
|
+
_context5.next = 8;
|
|
982
993
|
break;
|
|
983
994
|
}
|
|
984
|
-
|
|
985
|
-
|
|
986
|
-
|
|
995
|
+
absoluteSourceMapPath = sourceMappingUrl;
|
|
996
|
+
_context5.next = 13;
|
|
997
|
+
break;
|
|
987
998
|
case 8:
|
|
988
|
-
|
|
999
|
+
if (!isUrl) {
|
|
1000
|
+
_context5.next = 12;
|
|
1001
|
+
break;
|
|
1002
|
+
}
|
|
1003
|
+
return _context5.abrupt("return");
|
|
1004
|
+
case 12:
|
|
1005
|
+
if (path__default.isAbsolute(sourceMappingUrl)) {
|
|
1006
|
+
absoluteSourceMapPath = sourceMappingUrl;
|
|
1007
|
+
} else {
|
|
1008
|
+
absoluteSourceMapPath = path__default.join(path__default.dirname(bundlePath), sourceMappingUrl);
|
|
1009
|
+
}
|
|
1010
|
+
case 13:
|
|
1011
|
+
_context5.prev = 13;
|
|
1012
|
+
_context5.next = 16;
|
|
1013
|
+
return util.promisify(fs__default.access)(absoluteSourceMapPath);
|
|
1014
|
+
case 16:
|
|
1015
|
+
return _context5.abrupt("return", absoluteSourceMapPath);
|
|
1016
|
+
case 19:
|
|
1017
|
+
_context5.prev = 19;
|
|
1018
|
+
_context5.t0 = _context5["catch"](13);
|
|
1019
|
+
case 21:
|
|
1020
|
+
_context5.prev = 21;
|
|
989
1021
|
adjacentSourceMapFilePath = bundlePath + ".map";
|
|
990
|
-
_context5.next =
|
|
1022
|
+
_context5.next = 25;
|
|
991
1023
|
return util.promisify(fs__default.access)(adjacentSourceMapFilePath);
|
|
992
|
-
case
|
|
1024
|
+
case 25:
|
|
993
1025
|
return _context5.abrupt("return", adjacentSourceMapFilePath);
|
|
994
|
-
case
|
|
995
|
-
_context5.prev =
|
|
996
|
-
_context5.
|
|
997
|
-
case
|
|
1026
|
+
case 28:
|
|
1027
|
+
_context5.prev = 28;
|
|
1028
|
+
_context5.t1 = _context5["catch"](21);
|
|
1029
|
+
case 30:
|
|
998
1030
|
// This is just a debug message because it can be quite spammy for some frameworks
|
|
999
1031
|
logger.debug("Could not determine source map path for bundle: ".concat(bundlePath, " - Did you turn on source map generation in your bundler?"));
|
|
1000
1032
|
return _context5.abrupt("return", undefined);
|
|
1001
|
-
case
|
|
1033
|
+
case 32:
|
|
1002
1034
|
case "end":
|
|
1003
1035
|
return _context5.stop();
|
|
1004
1036
|
}
|
|
1005
|
-
}, _callee5, null, [[
|
|
1037
|
+
}, _callee5, null, [[13, 19], [21, 28]]);
|
|
1006
1038
|
}));
|
|
1007
1039
|
return _determineSourceMapPathFromBundle.apply(this, arguments);
|
|
1008
1040
|
}
|
|
@@ -1266,7 +1298,7 @@ function createSentryInstance(options, shouldSendTelemetry, bundler) {
|
|
|
1266
1298
|
dsn: "https://4c2bae7d9fbc413e8f7385f55c515d51@o1.ingest.sentry.io/6690737",
|
|
1267
1299
|
tracesSampleRate: 1,
|
|
1268
1300
|
sampleRate: 1,
|
|
1269
|
-
release: "2.6.
|
|
1301
|
+
release: "2.6.2",
|
|
1270
1302
|
integrations: [],
|
|
1271
1303
|
tracePropagationTargets: ["sentry.io/api"],
|
|
1272
1304
|
stackParser: defaultStackParser,
|
|
@@ -1336,6 +1368,8 @@ function setTelemetryDataOnHub(options, hub, bundler) {
|
|
|
1336
1368
|
if (release.uploadLegacySourcemaps) {
|
|
1337
1369
|
hub.setTag("uploadLegacySourcemapsEntries", Array.isArray(release.uploadLegacySourcemaps) ? release.uploadLegacySourcemaps.length : 1);
|
|
1338
1370
|
}
|
|
1371
|
+
hub.setTag("module-metadata", !!options._experiments.moduleMetadata);
|
|
1372
|
+
hub.setTag("inject-build-information", !!options._experiments.injectBuildInformation);
|
|
1339
1373
|
|
|
1340
1374
|
// Optional release pipeline steps
|
|
1341
1375
|
hub.setTag("clean-artifacts", release.cleanArtifacts);
|
|
@@ -1496,7 +1530,7 @@ function sentryUnpluginFactory(_ref) {
|
|
|
1496
1530
|
});
|
|
1497
1531
|
|
|
1498
1532
|
// Set the User-Agent that Sentry CLI will use when interacting with Sentry
|
|
1499
|
-
process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.6.
|
|
1533
|
+
process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.6.2");
|
|
1500
1534
|
function handleRecoverableError(unknownError) {
|
|
1501
1535
|
sentrySession.status = "abnormal";
|
|
1502
1536
|
try {
|