@sentry/bundler-plugin-core 2.22.1 → 2.22.3
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
CHANGED
|
@@ -707,7 +707,7 @@ function generateModuleMetadataInjectorCode(metadata) {
|
|
|
707
707
|
// The code below is mostly ternary operators because it saves bundle size.
|
|
708
708
|
// The checks are to support as many environments as possible. (Node.js, Browser, webworkers, etc.)
|
|
709
709
|
// We are merging the metadata objects in case modules are bundled twice with the plugin
|
|
710
|
-
return "{\n var _sentryModuleMetadataGlobal =\n typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : typeof self !== \"undefined\"\n ? self\n : {};\n\n _sentryModuleMetadataGlobal._sentryModuleMetadata =\n _sentryModuleMetadataGlobal._sentryModuleMetadata || {};\n\n _sentryModuleMetadataGlobal._sentryModuleMetadata[new Error().stack] =\n Object.assign(\n {},\n _sentryModuleMetadataGlobal._sentryModuleMetadata[new Error().stack],\n ".concat(JSON.stringify(metadata), "\n );\n}");
|
|
710
|
+
return "{\n var _sentryModuleMetadataGlobal =\n typeof window !== \"undefined\"\n ? window\n : typeof global !== \"undefined\"\n ? global\n : typeof self !== \"undefined\"\n ? self\n : {};\n\n _sentryModuleMetadataGlobal._sentryModuleMetadata =\n _sentryModuleMetadataGlobal._sentryModuleMetadata || {};\n\n _sentryModuleMetadataGlobal._sentryModuleMetadata[new _sentryModuleMetadataGlobal.Error().stack] =\n Object.assign(\n {},\n _sentryModuleMetadataGlobal._sentryModuleMetadata[new _sentryModuleMetadataGlobal.Error().stack],\n ".concat(JSON.stringify(metadata), "\n );\n}");
|
|
711
711
|
}
|
|
712
712
|
function getBuildInformation$1() {
|
|
713
713
|
var packageJson = getPackageJson();
|
|
@@ -13659,7 +13659,7 @@ function createSentryInstance(options, shouldSendTelemetry, bundler) {
|
|
|
13659
13659
|
dsn: "https://4c2bae7d9fbc413e8f7385f55c515d51@o1.ingest.sentry.io/6690737",
|
|
13660
13660
|
tracesSampleRate: 1,
|
|
13661
13661
|
sampleRate: 1,
|
|
13662
|
-
release: "2.22.
|
|
13662
|
+
release: "2.22.3",
|
|
13663
13663
|
integrations: [],
|
|
13664
13664
|
tracePropagationTargets: ["sentry.io/api"],
|
|
13665
13665
|
stackParser: defaultStackParser,
|
|
@@ -14573,7 +14573,7 @@ function sentryUnpluginFactory(_ref) {
|
|
|
14573
14573
|
debugIdUploadPlugin = _ref.debugIdUploadPlugin,
|
|
14574
14574
|
bundleSizeOptimizationsPlugin = _ref.bundleSizeOptimizationsPlugin;
|
|
14575
14575
|
return unplugin.createUnplugin(function () {
|
|
14576
|
-
var _userOptions$_metaOpt, _userOptions$_metaOpt2, _userOptions$silent, _userOptions$debug, _userOptions$_experim, _options$sourcemaps, _options$sourcemaps$f, _options$
|
|
14576
|
+
var _userOptions$_metaOpt, _userOptions$_metaOpt2, _userOptions$silent, _userOptions$debug, _userOptions$_experim, _options$sourcemaps, _options$sourcemaps2, _options$sourcemaps$f, _options$sourcemaps6, _options$sourcemaps7;
|
|
14577
14577
|
var userOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
14578
14578
|
var unpluginMetaContext = arguments.length > 1 ? arguments[1] : undefined;
|
|
14579
14579
|
var logger = createLogger({
|
|
@@ -14623,7 +14623,7 @@ function sentryUnpluginFactory(_ref) {
|
|
|
14623
14623
|
});
|
|
14624
14624
|
|
|
14625
14625
|
// Set the User-Agent that Sentry CLI will use when interacting with Sentry
|
|
14626
|
-
process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.22.
|
|
14626
|
+
process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.22.3");
|
|
14627
14627
|
function handleRecoverableError(unknownError) {
|
|
14628
14628
|
sentrySession.status = "abnormal";
|
|
14629
14629
|
try {
|
|
@@ -14795,8 +14795,10 @@ function sentryUnpluginFactory(_ref) {
|
|
|
14795
14795
|
createDependencyOnSourcemapFiles: createDependencyOnSourcemapFiles
|
|
14796
14796
|
}));
|
|
14797
14797
|
}
|
|
14798
|
-
|
|
14799
|
-
|
|
14798
|
+
if (!((_options$sourcemaps = options.sourcemaps) !== null && _options$sourcemaps !== void 0 && _options$sourcemaps.disable)) {
|
|
14799
|
+
plugins.push(debugIdInjectionPlugin(logger));
|
|
14800
|
+
}
|
|
14801
|
+
if ((_options$sourcemaps2 = options.sourcemaps) !== null && _options$sourcemaps2 !== void 0 && _options$sourcemaps2.disable) {
|
|
14800
14802
|
logger.debug("Source map upload was disabled. Will not upload sourcemaps using debug ID process.");
|
|
14801
14803
|
} else if (!options.authToken) {
|
|
14802
14804
|
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/");
|
|
@@ -14805,16 +14807,16 @@ function sentryUnpluginFactory(_ref) {
|
|
|
14805
14807
|
} else if (!options.project) {
|
|
14806
14808
|
logger.warn("No project provided. Will not upload source maps. Please set the `project` option to your Sentry project slug.");
|
|
14807
14809
|
} else {
|
|
14808
|
-
var _options$
|
|
14810
|
+
var _options$sourcemaps3, _options$sourcemaps4, _options$sourcemaps5;
|
|
14809
14811
|
plugins.push(debugIdUploadPlugin(createDebugIdUploadFunction({
|
|
14810
|
-
assets: (_options$
|
|
14811
|
-
ignore: (_options$
|
|
14812
|
+
assets: (_options$sourcemaps3 = options.sourcemaps) === null || _options$sourcemaps3 === void 0 ? void 0 : _options$sourcemaps3.assets,
|
|
14813
|
+
ignore: (_options$sourcemaps4 = options.sourcemaps) === null || _options$sourcemaps4 === void 0 ? void 0 : _options$sourcemaps4.ignore,
|
|
14812
14814
|
createDependencyOnSourcemapFiles: createDependencyOnSourcemapFiles,
|
|
14813
14815
|
dist: options.release.dist,
|
|
14814
14816
|
releaseName: options.release.name,
|
|
14815
14817
|
logger: logger,
|
|
14816
14818
|
handleRecoverableError: handleRecoverableError,
|
|
14817
|
-
rewriteSourcesHook: (_options$
|
|
14819
|
+
rewriteSourcesHook: (_options$sourcemaps5 = options.sourcemaps) === null || _options$sourcemaps5 === void 0 ? void 0 : _options$sourcemaps5.rewriteSources,
|
|
14818
14820
|
sentryHub: sentryHub,
|
|
14819
14821
|
sentryClient: sentryClient,
|
|
14820
14822
|
sentryCliOptions: {
|
|
@@ -14839,7 +14841,7 @@ function sentryUnpluginFactory(_ref) {
|
|
|
14839
14841
|
}
|
|
14840
14842
|
plugins.push(fileDeletionPlugin({
|
|
14841
14843
|
waitUntilSourcemapFileDependenciesAreFreed: waitUntilSourcemapFileDependenciesAreFreed,
|
|
14842
|
-
filesToDeleteAfterUpload: (_options$sourcemaps$f = (_options$
|
|
14844
|
+
filesToDeleteAfterUpload: (_options$sourcemaps$f = (_options$sourcemaps6 = options.sourcemaps) === null || _options$sourcemaps6 === void 0 ? void 0 : _options$sourcemaps6.filesToDeleteAfterUpload) !== null && _options$sourcemaps$f !== void 0 ? _options$sourcemaps$f : (_options$sourcemaps7 = options.sourcemaps) === null || _options$sourcemaps7 === void 0 ? void 0 : _options$sourcemaps7.deleteFilesAfterUpload,
|
|
14843
14845
|
logger: logger,
|
|
14844
14846
|
handleRecoverableError: handleRecoverableError,
|
|
14845
14847
|
sentryHub: sentryHub,
|
|
@@ -15126,7 +15128,7 @@ function createComponentNameAnnotateHooks() {
|
|
|
15126
15128
|
};
|
|
15127
15129
|
}
|
|
15128
15130
|
function getDebugIdSnippet(debugId) {
|
|
15129
|
-
return ";!function(){try{var e=\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]=\"".concat(debugId, "\",e._sentryDebugIdIdentifier=\"sentry-dbid-").concat(debugId, "\")}catch(e){}}();");
|
|
15131
|
+
return ";!function(){try{var e=\"undefined\"!=typeof window?window:\"undefined\"!=typeof global?global:\"undefined\"!=typeof self?self:{},n=(new e.Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]=\"".concat(debugId, "\",e._sentryDebugIdIdentifier=\"sentry-dbid-").concat(debugId, "\")}catch(e){}}();");
|
|
15130
15132
|
}
|
|
15131
15133
|
|
|
15132
15134
|
exports.createComponentNameAnnotateHooks = createComponentNameAnnotateHooks;
|