@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/esm/index.mjs
CHANGED
|
@@ -969,43 +969,72 @@ function determineSourceMapPathFromBundle(_x9, _x10, _x11) {
|
|
|
969
969
|
*/
|
|
970
970
|
function _determineSourceMapPathFromBundle() {
|
|
971
971
|
_determineSourceMapPathFromBundle = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee5(bundlePath, bundleSource, logger) {
|
|
972
|
-
var sourceMappingUrlMatch, sourceMappingUrl, adjacentSourceMapFilePath;
|
|
972
|
+
var sourceMappingUrlMatch, sourceMappingUrl, isUrl, isSupportedUrl, url, absoluteSourceMapPath, adjacentSourceMapFilePath;
|
|
973
973
|
return _regeneratorRuntime().wrap(function _callee5$(_context5) {
|
|
974
974
|
while (1) switch (_context5.prev = _context5.next) {
|
|
975
975
|
case 0:
|
|
976
976
|
// 1. try to find source map at `sourceMappingURL` location
|
|
977
|
-
sourceMappingUrlMatch = bundleSource.match(
|
|
977
|
+
sourceMappingUrlMatch = bundleSource.match(/^\s*\/\/# sourceMappingURL=(.*)$/m);
|
|
978
978
|
if (!sourceMappingUrlMatch) {
|
|
979
|
-
_context5.next =
|
|
979
|
+
_context5.next = 21;
|
|
980
980
|
break;
|
|
981
981
|
}
|
|
982
982
|
sourceMappingUrl = path__default.normalize(sourceMappingUrlMatch[1]);
|
|
983
|
-
|
|
984
|
-
|
|
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;
|
|
985
993
|
break;
|
|
986
994
|
}
|
|
987
|
-
|
|
988
|
-
|
|
989
|
-
|
|
995
|
+
absoluteSourceMapPath = sourceMappingUrl;
|
|
996
|
+
_context5.next = 13;
|
|
997
|
+
break;
|
|
990
998
|
case 8:
|
|
991
|
-
|
|
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;
|
|
992
1021
|
adjacentSourceMapFilePath = bundlePath + ".map";
|
|
993
|
-
_context5.next =
|
|
1022
|
+
_context5.next = 25;
|
|
994
1023
|
return util.promisify(fs__default.access)(adjacentSourceMapFilePath);
|
|
995
|
-
case
|
|
1024
|
+
case 25:
|
|
996
1025
|
return _context5.abrupt("return", adjacentSourceMapFilePath);
|
|
997
|
-
case
|
|
998
|
-
_context5.prev =
|
|
999
|
-
_context5.
|
|
1000
|
-
case
|
|
1026
|
+
case 28:
|
|
1027
|
+
_context5.prev = 28;
|
|
1028
|
+
_context5.t1 = _context5["catch"](21);
|
|
1029
|
+
case 30:
|
|
1001
1030
|
// This is just a debug message because it can be quite spammy for some frameworks
|
|
1002
1031
|
logger.debug("Could not determine source map path for bundle: ".concat(bundlePath, " - Did you turn on source map generation in your bundler?"));
|
|
1003
1032
|
return _context5.abrupt("return", undefined);
|
|
1004
|
-
case
|
|
1033
|
+
case 32:
|
|
1005
1034
|
case "end":
|
|
1006
1035
|
return _context5.stop();
|
|
1007
1036
|
}
|
|
1008
|
-
}, _callee5, null, [[
|
|
1037
|
+
}, _callee5, null, [[13, 19], [21, 28]]);
|
|
1009
1038
|
}));
|
|
1010
1039
|
return _determineSourceMapPathFromBundle.apply(this, arguments);
|
|
1011
1040
|
}
|
|
@@ -1269,7 +1298,7 @@ function createSentryInstance(options, shouldSendTelemetry, bundler) {
|
|
|
1269
1298
|
dsn: "https://4c2bae7d9fbc413e8f7385f55c515d51@o1.ingest.sentry.io/6690737",
|
|
1270
1299
|
tracesSampleRate: 1,
|
|
1271
1300
|
sampleRate: 1,
|
|
1272
|
-
release: "2.6.
|
|
1301
|
+
release: "2.6.2",
|
|
1273
1302
|
integrations: [],
|
|
1274
1303
|
tracePropagationTargets: ["sentry.io/api"],
|
|
1275
1304
|
stackParser: defaultStackParser,
|
|
@@ -1501,7 +1530,7 @@ function sentryUnpluginFactory(_ref) {
|
|
|
1501
1530
|
});
|
|
1502
1531
|
|
|
1503
1532
|
// Set the User-Agent that Sentry CLI will use when interacting with Sentry
|
|
1504
|
-
process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.6.
|
|
1533
|
+
process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.6.2");
|
|
1505
1534
|
function handleRecoverableError(unknownError) {
|
|
1506
1535
|
sentrySession.status = "abnormal";
|
|
1507
1536
|
try {
|