@sentry/bundler-plugin-core 2.6.1 → 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/cjs/index.js +48 -19
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +48 -19
- package/dist/esm/index.mjs.map +1 -1
- package/package.json +3 -3
package/dist/cjs/index.js
CHANGED
|
@@ -1003,43 +1003,72 @@ function determineSourceMapPathFromBundle(_x9, _x10, _x11) {
|
|
|
1003
1003
|
*/
|
|
1004
1004
|
function _determineSourceMapPathFromBundle() {
|
|
1005
1005
|
_determineSourceMapPathFromBundle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(bundlePath, bundleSource, logger) {
|
|
1006
|
-
var sourceMappingUrlMatch, sourceMappingUrl, adjacentSourceMapFilePath;
|
|
1006
|
+
var sourceMappingUrlMatch, sourceMappingUrl, isUrl, isSupportedUrl, url, absoluteSourceMapPath, adjacentSourceMapFilePath;
|
|
1007
1007
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
1008
1008
|
while (1) switch (_context5.prev = _context5.next) {
|
|
1009
1009
|
case 0:
|
|
1010
1010
|
// 1. try to find source map at `sourceMappingURL` location
|
|
1011
|
-
sourceMappingUrlMatch = bundleSource.match(
|
|
1011
|
+
sourceMappingUrlMatch = bundleSource.match(/^\s*\/\/# sourceMappingURL=(.*)$/m);
|
|
1012
1012
|
if (!sourceMappingUrlMatch) {
|
|
1013
|
-
_context5.next =
|
|
1013
|
+
_context5.next = 21;
|
|
1014
1014
|
break;
|
|
1015
1015
|
}
|
|
1016
1016
|
sourceMappingUrl = path__default["default"].normalize(sourceMappingUrlMatch[1]);
|
|
1017
|
-
|
|
1018
|
-
|
|
1017
|
+
try {
|
|
1018
|
+
url = new URL(sourceMappingUrl);
|
|
1019
|
+
isUrl = true;
|
|
1020
|
+
isSupportedUrl = url.protocol === "file:";
|
|
1021
|
+
} catch (_unused) {
|
|
1022
|
+
isUrl = false;
|
|
1023
|
+
isSupportedUrl = false;
|
|
1024
|
+
}
|
|
1025
|
+
if (!isSupportedUrl) {
|
|
1026
|
+
_context5.next = 8;
|
|
1019
1027
|
break;
|
|
1020
1028
|
}
|
|
1021
|
-
|
|
1022
|
-
|
|
1023
|
-
|
|
1029
|
+
absoluteSourceMapPath = sourceMappingUrl;
|
|
1030
|
+
_context5.next = 13;
|
|
1031
|
+
break;
|
|
1024
1032
|
case 8:
|
|
1025
|
-
|
|
1033
|
+
if (!isUrl) {
|
|
1034
|
+
_context5.next = 12;
|
|
1035
|
+
break;
|
|
1036
|
+
}
|
|
1037
|
+
return _context5.abrupt("return");
|
|
1038
|
+
case 12:
|
|
1039
|
+
if (path__default["default"].isAbsolute(sourceMappingUrl)) {
|
|
1040
|
+
absoluteSourceMapPath = sourceMappingUrl;
|
|
1041
|
+
} else {
|
|
1042
|
+
absoluteSourceMapPath = path__default["default"].join(path__default["default"].dirname(bundlePath), sourceMappingUrl);
|
|
1043
|
+
}
|
|
1044
|
+
case 13:
|
|
1045
|
+
_context5.prev = 13;
|
|
1046
|
+
_context5.next = 16;
|
|
1047
|
+
return util__namespace.promisify(fs__default["default"].access)(absoluteSourceMapPath);
|
|
1048
|
+
case 16:
|
|
1049
|
+
return _context5.abrupt("return", absoluteSourceMapPath);
|
|
1050
|
+
case 19:
|
|
1051
|
+
_context5.prev = 19;
|
|
1052
|
+
_context5.t0 = _context5["catch"](13);
|
|
1053
|
+
case 21:
|
|
1054
|
+
_context5.prev = 21;
|
|
1026
1055
|
adjacentSourceMapFilePath = bundlePath + ".map";
|
|
1027
|
-
_context5.next =
|
|
1056
|
+
_context5.next = 25;
|
|
1028
1057
|
return util__namespace.promisify(fs__default["default"].access)(adjacentSourceMapFilePath);
|
|
1029
|
-
case
|
|
1058
|
+
case 25:
|
|
1030
1059
|
return _context5.abrupt("return", adjacentSourceMapFilePath);
|
|
1031
|
-
case
|
|
1032
|
-
_context5.prev =
|
|
1033
|
-
_context5.
|
|
1034
|
-
case
|
|
1060
|
+
case 28:
|
|
1061
|
+
_context5.prev = 28;
|
|
1062
|
+
_context5.t1 = _context5["catch"](21);
|
|
1063
|
+
case 30:
|
|
1035
1064
|
// This is just a debug message because it can be quite spammy for some frameworks
|
|
1036
1065
|
logger.debug("Could not determine source map path for bundle: ".concat(bundlePath, " - Did you turn on source map generation in your bundler?"));
|
|
1037
1066
|
return _context5.abrupt("return", undefined);
|
|
1038
|
-
case
|
|
1067
|
+
case 32:
|
|
1039
1068
|
case "end":
|
|
1040
1069
|
return _context5.stop();
|
|
1041
1070
|
}
|
|
1042
|
-
}, _callee5, null, [[
|
|
1071
|
+
}, _callee5, null, [[13, 19], [21, 28]]);
|
|
1043
1072
|
}));
|
|
1044
1073
|
return _determineSourceMapPathFromBundle.apply(this, arguments);
|
|
1045
1074
|
}
|
|
@@ -1303,7 +1332,7 @@ function createSentryInstance(options, shouldSendTelemetry, bundler) {
|
|
|
1303
1332
|
dsn: "https://4c2bae7d9fbc413e8f7385f55c515d51@o1.ingest.sentry.io/6690737",
|
|
1304
1333
|
tracesSampleRate: 1,
|
|
1305
1334
|
sampleRate: 1,
|
|
1306
|
-
release: "2.6.
|
|
1335
|
+
release: "2.6.2",
|
|
1307
1336
|
integrations: [],
|
|
1308
1337
|
tracePropagationTargets: ["sentry.io/api"],
|
|
1309
1338
|
stackParser: node.defaultStackParser,
|
|
@@ -1535,7 +1564,7 @@ function sentryUnpluginFactory(_ref) {
|
|
|
1535
1564
|
});
|
|
1536
1565
|
|
|
1537
1566
|
// Set the User-Agent that Sentry CLI will use when interacting with Sentry
|
|
1538
|
-
process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.6.
|
|
1567
|
+
process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.6.2");
|
|
1539
1568
|
function handleRecoverableError(unknownError) {
|
|
1540
1569
|
sentrySession.status = "abnormal";
|
|
1541
1570
|
try {
|