@sentry/bundler-plugin-core 2.22.0 → 2.22.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.
@@ -654,7 +654,7 @@ function generateGlobalInjectorCode(_ref2) {
654
654
  injectBuildInformation = _ref2.injectBuildInformation;
655
655
  // The code below is mostly ternary operators because it saves bundle size.
656
656
  // The checks are to support as many environments as possible. (Node.js, Browser, webworkers, etc.)
657
- var code = "\n var _global =\n typeof window !== 'undefined' ?\n window :\n typeof global !== 'undefined' ?\n global :\n typeof self !== 'undefined' ?\n self :\n {};\n\n _global.SENTRY_RELEASE={id:\"".concat(release, "\"};");
657
+ var code = "\n var _global =\n typeof window !== 'undefined' ?\n window :\n typeof global !== 'undefined' ?\n global :\n typeof self !== 'undefined' ?\n self :\n {};\n\n _global.SENTRY_RELEASE={id:".concat(JSON.stringify(release), "};");
658
658
  if (injectBuildInformation) {
659
659
  var buildInfo = getBuildInformation$1();
660
660
  code += "\n _global.SENTRY_BUILD_INFO=".concat(JSON.stringify(buildInfo), ";");
@@ -13619,7 +13619,7 @@ function createSentryInstance(options, shouldSendTelemetry, bundler) {
13619
13619
  dsn: "https://4c2bae7d9fbc413e8f7385f55c515d51@o1.ingest.sentry.io/6690737",
13620
13620
  tracesSampleRate: 1,
13621
13621
  sampleRate: 1,
13622
- release: "2.22.0",
13622
+ release: "2.22.2",
13623
13623
  integrations: [],
13624
13624
  tracePropagationTargets: ["sentry.io/api"],
13625
13625
  stackParser: defaultStackParser,
@@ -14533,7 +14533,7 @@ function sentryUnpluginFactory(_ref) {
14533
14533
  debugIdUploadPlugin = _ref.debugIdUploadPlugin,
14534
14534
  bundleSizeOptimizationsPlugin = _ref.bundleSizeOptimizationsPlugin;
14535
14535
  return createUnplugin(function () {
14536
- var _userOptions$_metaOpt, _userOptions$_metaOpt2, _userOptions$silent, _userOptions$debug, _userOptions$_experim, _options$sourcemaps, _options$sourcemaps$f, _options$sourcemaps5, _options$sourcemaps6;
14536
+ var _userOptions$_metaOpt, _userOptions$_metaOpt2, _userOptions$silent, _userOptions$debug, _userOptions$_experim, _options$sourcemaps, _options$sourcemaps2, _options$sourcemaps$f, _options$sourcemaps6, _options$sourcemaps7;
14537
14537
  var userOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
14538
14538
  var unpluginMetaContext = arguments.length > 1 ? arguments[1] : undefined;
14539
14539
  var logger = createLogger({
@@ -14583,7 +14583,7 @@ function sentryUnpluginFactory(_ref) {
14583
14583
  });
14584
14584
 
14585
14585
  // Set the User-Agent that Sentry CLI will use when interacting with Sentry
14586
- process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.22.0");
14586
+ process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.22.2");
14587
14587
  function handleRecoverableError(unknownError) {
14588
14588
  sentrySession.status = "abnormal";
14589
14589
  try {
@@ -14722,9 +14722,7 @@ function sentryUnpluginFactory(_ref) {
14722
14722
  var _injectionCode2 = generateModuleMetadataInjectorCode(metadata);
14723
14723
  plugins.push(moduleMetadataInjectionPlugin(_injectionCode2));
14724
14724
  }
14725
- if ((_options$sourcemaps = options.sourcemaps) !== null && _options$sourcemaps !== void 0 && _options$sourcemaps.disable) {
14726
- logger.debug("Source map upload was disabled. Will not upload sourcemaps.");
14727
- } else if (!options.release.name) {
14725
+ if (!options.release.name) {
14728
14726
  logger.warn("No release name provided. Will not create release. Please set the `release.name` option to identify your release.");
14729
14727
  } else if (!options.authToken) {
14730
14728
  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/");
@@ -14757,24 +14755,28 @@ function sentryUnpluginFactory(_ref) {
14757
14755
  createDependencyOnSourcemapFiles: createDependencyOnSourcemapFiles
14758
14756
  }));
14759
14757
  }
14760
- plugins.push(debugIdInjectionPlugin(logger));
14761
- if (!options.authToken) {
14758
+ if (!((_options$sourcemaps = options.sourcemaps) !== null && _options$sourcemaps !== void 0 && _options$sourcemaps.disable)) {
14759
+ plugins.push(debugIdInjectionPlugin(logger));
14760
+ }
14761
+ if ((_options$sourcemaps2 = options.sourcemaps) !== null && _options$sourcemaps2 !== void 0 && _options$sourcemaps2.disable) {
14762
+ logger.debug("Source map upload was disabled. Will not upload sourcemaps using debug ID process.");
14763
+ } else if (!options.authToken) {
14762
14764
  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/");
14763
14765
  } else if (!options.org && !options.authToken.startsWith("sntrys_")) {
14764
14766
  logger.warn("No org provided. Will not upload source maps. Please set the `org` option to your Sentry organization slug.");
14765
14767
  } else if (!options.project) {
14766
14768
  logger.warn("No project provided. Will not upload source maps. Please set the `project` option to your Sentry project slug.");
14767
14769
  } else {
14768
- var _options$sourcemaps2, _options$sourcemaps3, _options$sourcemaps4;
14770
+ var _options$sourcemaps3, _options$sourcemaps4, _options$sourcemaps5;
14769
14771
  plugins.push(debugIdUploadPlugin(createDebugIdUploadFunction({
14770
- assets: (_options$sourcemaps2 = options.sourcemaps) === null || _options$sourcemaps2 === void 0 ? void 0 : _options$sourcemaps2.assets,
14771
- ignore: (_options$sourcemaps3 = options.sourcemaps) === null || _options$sourcemaps3 === void 0 ? void 0 : _options$sourcemaps3.ignore,
14772
+ assets: (_options$sourcemaps3 = options.sourcemaps) === null || _options$sourcemaps3 === void 0 ? void 0 : _options$sourcemaps3.assets,
14773
+ ignore: (_options$sourcemaps4 = options.sourcemaps) === null || _options$sourcemaps4 === void 0 ? void 0 : _options$sourcemaps4.ignore,
14772
14774
  createDependencyOnSourcemapFiles: createDependencyOnSourcemapFiles,
14773
14775
  dist: options.release.dist,
14774
14776
  releaseName: options.release.name,
14775
14777
  logger: logger,
14776
14778
  handleRecoverableError: handleRecoverableError,
14777
- rewriteSourcesHook: (_options$sourcemaps4 = options.sourcemaps) === null || _options$sourcemaps4 === void 0 ? void 0 : _options$sourcemaps4.rewriteSources,
14779
+ rewriteSourcesHook: (_options$sourcemaps5 = options.sourcemaps) === null || _options$sourcemaps5 === void 0 ? void 0 : _options$sourcemaps5.rewriteSources,
14778
14780
  sentryHub: sentryHub,
14779
14781
  sentryClient: sentryClient,
14780
14782
  sentryCliOptions: {
@@ -14799,7 +14801,7 @@ function sentryUnpluginFactory(_ref) {
14799
14801
  }
14800
14802
  plugins.push(fileDeletionPlugin({
14801
14803
  waitUntilSourcemapFileDependenciesAreFreed: waitUntilSourcemapFileDependenciesAreFreed,
14802
- filesToDeleteAfterUpload: (_options$sourcemaps$f = (_options$sourcemaps5 = options.sourcemaps) === null || _options$sourcemaps5 === void 0 ? void 0 : _options$sourcemaps5.filesToDeleteAfterUpload) !== null && _options$sourcemaps$f !== void 0 ? _options$sourcemaps$f : (_options$sourcemaps6 = options.sourcemaps) === null || _options$sourcemaps6 === void 0 ? void 0 : _options$sourcemaps6.deleteFilesAfterUpload,
14804
+ 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,
14803
14805
  logger: logger,
14804
14806
  handleRecoverableError: handleRecoverableError,
14805
14807
  sentryHub: sentryHub,