@sentry/bundler-plugin-core 2.20.0 → 2.20.1

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
@@ -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.20.0",
13662
+ release: "2.20.1",
13663
13663
  integrations: [],
13664
13664
  tracePropagationTargets: ["sentry.io/api"],
13665
13665
  stackParser: defaultStackParser,
@@ -13751,6 +13751,7 @@ function setTelemetryDataOnHub(options, hub, bundler) {
13751
13751
  hub.setTag("node", process.version);
13752
13752
  hub.setTag("platform", process.platform);
13753
13753
  hub.setTag("meta-framework", (_options$_metaOptions = options._metaOptions.telemetry.metaFramework) !== null && _options$_metaOptions !== void 0 ? _options$_metaOptions : "none");
13754
+ hub.setTag("application-key-set", options.applicationKey !== undefined);
13754
13755
  hub.setTags({
13755
13756
  organization: org,
13756
13757
  project: project,
@@ -13861,7 +13862,7 @@ function createDebugIdUploadFunction(_ref) {
13861
13862
  sentryClient = _ref.sentryClient,
13862
13863
  sentryCliOptions = _ref.sentryCliOptions,
13863
13864
  rewriteSourcesHook = _ref.rewriteSourcesHook,
13864
- deleteFilesUpForDeletion = _ref.deleteFilesUpForDeletion;
13865
+ freeDependencyOnSourcemapFiles = _ref.freeDependencyOnSourcemapFiles;
13865
13866
  return /*#__PURE__*/function () {
13866
13867
  var _ref2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3(buildArtifactPaths) {
13867
13868
  var artifactBundleUploadTransaction, folderToCleanUp, mkdtempSpan, tmpUploadFolder, globAssets, globSpan, globResult, debugIdChunkFilePaths, prepareSpan, preparationTasks, workers, worker, workerIndex, files, stats, uploadSize, uploadSpan, cliInstance, cleanupSpan;
@@ -14017,21 +14018,18 @@ function createDebugIdUploadFunction(_ref) {
14017
14018
  uploadSpan.finish();
14018
14019
  logger.info("Successfully uploaded source maps to Sentry");
14019
14020
  case 47:
14020
- _context3.next = 49;
14021
- return deleteFilesUpForDeletion();
14022
- case 49:
14023
- _context3.next = 55;
14021
+ _context3.next = 53;
14024
14022
  break;
14025
- case 51:
14026
- _context3.prev = 51;
14023
+ case 49:
14024
+ _context3.prev = 49;
14027
14025
  _context3.t0 = _context3["catch"](1);
14028
14026
  sentryHub.withScope(function (scope) {
14029
14027
  scope.setSpan(artifactBundleUploadTransaction);
14030
14028
  sentryHub.captureException('Error in "debugIdUploadPlugin" writeBundle hook');
14031
14029
  });
14032
14030
  handleRecoverableError(_context3.t0);
14033
- case 55:
14034
- _context3.prev = 55;
14031
+ case 53:
14032
+ _context3.prev = 53;
14035
14033
  if (folderToCleanUp) {
14036
14034
  cleanupSpan = artifactBundleUploadTransaction.startChild({
14037
14035
  description: "cleanup"
@@ -14043,15 +14041,16 @@ function createDebugIdUploadFunction(_ref) {
14043
14041
  cleanupSpan.finish();
14044
14042
  }
14045
14043
  artifactBundleUploadTransaction.finish();
14046
- _context3.next = 60;
14044
+ freeDependencyOnSourcemapFiles();
14045
+ _context3.next = 59;
14047
14046
  return safeFlushTelemetry(sentryClient);
14047
+ case 59:
14048
+ return _context3.finish(53);
14048
14049
  case 60:
14049
- return _context3.finish(55);
14050
- case 61:
14051
14050
  case "end":
14052
14051
  return _context3.stop();
14053
14052
  }
14054
- }, _callee3, null, [[1, 51, 55, 61]]);
14053
+ }, _callee3, null, [[1, 49, 53, 60]]);
14055
14054
  }));
14056
14055
  return function (_x) {
14057
14056
  return _ref2.apply(this, arguments);
@@ -14298,7 +14297,7 @@ function releaseManagementPlugin(_ref) {
14298
14297
  sentryHub = _ref.sentryHub,
14299
14298
  sentryClient = _ref.sentryClient,
14300
14299
  sentryCliOptions = _ref.sentryCliOptions,
14301
- deleteFilesUpForDeletion = _ref.deleteFilesUpForDeletion;
14300
+ freeDependencyOnSourcemapFiles = _ref.freeDependencyOnSourcemapFiles;
14302
14301
  return {
14303
14302
  name: "sentry-debug-id-upload-plugin",
14304
14303
  writeBundle: function writeBundle() {
@@ -14361,24 +14360,25 @@ function releaseManagementPlugin(_ref) {
14361
14360
  _context.next = 18;
14362
14361
  return cliInstance.releases.newDeploy(releaseName, deployOptions);
14363
14362
  case 18:
14364
- _context.next = 20;
14365
- return deleteFilesUpForDeletion();
14366
- case 20:
14367
- _context.next = 28;
14363
+ _context.next = 26;
14368
14364
  break;
14369
- case 22:
14370
- _context.prev = 22;
14365
+ case 20:
14366
+ _context.prev = 20;
14371
14367
  _context.t0 = _context["catch"](0);
14372
14368
  sentryHub.captureException('Error in "releaseManagementPlugin" writeBundle hook');
14373
- _context.next = 27;
14369
+ _context.next = 25;
14374
14370
  return safeFlushTelemetry(sentryClient);
14375
- case 27:
14371
+ case 25:
14376
14372
  handleRecoverableError(_context.t0);
14377
- case 28:
14373
+ case 26:
14374
+ _context.prev = 26;
14375
+ freeDependencyOnSourcemapFiles();
14376
+ return _context.finish(26);
14377
+ case 29:
14378
14378
  case "end":
14379
14379
  return _context.stop();
14380
14380
  }
14381
- }, _callee, null, [[0, 22]]);
14381
+ }, _callee, null, [[0, 20, 26, 29]]);
14382
14382
  }))();
14383
14383
  }
14384
14384
  };
@@ -14468,33 +14468,61 @@ function fileDeletionPlugin(_ref) {
14468
14468
  var handleRecoverableError = _ref.handleRecoverableError,
14469
14469
  sentryHub = _ref.sentryHub,
14470
14470
  sentryClient = _ref.sentryClient,
14471
- deleteFilesUpForDeletion = _ref.deleteFilesUpForDeletion;
14471
+ filesToDeleteAfterUpload = _ref.filesToDeleteAfterUpload,
14472
+ dependenciesAreFreedPromise = _ref.dependenciesAreFreedPromise,
14473
+ logger = _ref.logger;
14472
14474
  return {
14473
14475
  name: "sentry-file-deletion-plugin",
14474
14476
  writeBundle: function writeBundle() {
14475
14477
  return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
14478
+ var filePathsToDelete;
14476
14479
  return _regeneratorRuntime().wrap(function _callee$(_context) {
14477
14480
  while (1) switch (_context.prev = _context.next) {
14478
14481
  case 0:
14479
14482
  _context.prev = 0;
14480
- _context.next = 3;
14481
- return deleteFilesUpForDeletion();
14482
- case 3:
14483
+ if (!(filesToDeleteAfterUpload !== undefined)) {
14484
+ _context.next = 11;
14485
+ break;
14486
+ }
14487
+ _context.next = 4;
14488
+ return glob.glob(filesToDeleteAfterUpload, {
14489
+ absolute: true,
14490
+ nodir: true
14491
+ });
14492
+ case 4:
14493
+ filePathsToDelete = _context.sent;
14494
+ logger.debug("Waiting for dependencies on generated files to be freed before deleting...");
14495
+ _context.next = 8;
14496
+ return dependenciesAreFreedPromise;
14497
+ case 8:
14498
+ filePathsToDelete.forEach(function (filePathToDelete) {
14499
+ logger.debug("Deleting asset after upload: ".concat(filePathToDelete));
14500
+ });
14483
14501
  _context.next = 11;
14502
+ return Promise.all(filePathsToDelete.map(function (filePathToDelete) {
14503
+ return fs__default["default"].promises.rm(filePathToDelete, {
14504
+ force: true
14505
+ })["catch"](function (e) {
14506
+ // This is allowed to fail - we just don't do anything
14507
+ logger.debug("An error occurred while attempting to delete asset: ".concat(filePathToDelete), e);
14508
+ });
14509
+ }));
14510
+ case 11:
14511
+ _context.next = 19;
14484
14512
  break;
14485
- case 5:
14486
- _context.prev = 5;
14513
+ case 13:
14514
+ _context.prev = 13;
14487
14515
  _context.t0 = _context["catch"](0);
14488
14516
  sentryHub.captureException('Error in "sentry-file-deletion-plugin" buildEnd hook');
14489
- _context.next = 10;
14517
+ _context.next = 18;
14490
14518
  return safeFlushTelemetry(sentryClient);
14491
- case 10:
14519
+ case 18:
14492
14520
  handleRecoverableError(_context.t0);
14493
- case 11:
14521
+ case 19:
14494
14522
  case "end":
14495
14523
  return _context.stop();
14496
14524
  }
14497
- }, _callee, null, [[0, 5]]);
14525
+ }, _callee, null, [[0, 13]]);
14498
14526
  }))();
14499
14527
  }
14500
14528
  };
@@ -14534,7 +14562,7 @@ function sentryUnpluginFactory(_ref) {
14534
14562
  debugIdUploadPlugin = _ref.debugIdUploadPlugin,
14535
14563
  bundleSizeOptimizationsPlugin = _ref.bundleSizeOptimizationsPlugin;
14536
14564
  return unplugin.createUnplugin(function () {
14537
- var _userOptions$_metaOpt, _userOptions$_metaOpt2, _userOptions$silent, _userOptions$debug, _userOptions$_experim;
14565
+ var _userOptions$_metaOpt, _userOptions$_metaOpt2, _userOptions$silent, _userOptions$debug, _userOptions$_experim, _options$sourcemaps$f, _options$sourcemaps4, _options$sourcemaps5;
14538
14566
  var userOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
14539
14567
  var unpluginMetaContext = arguments.length > 1 ? arguments[1] : undefined;
14540
14568
  var logger = createLogger({
@@ -14584,7 +14612,7 @@ function sentryUnpluginFactory(_ref) {
14584
14612
  });
14585
14613
 
14586
14614
  // Set the User-Agent that Sentry CLI will use when interacting with Sentry
14587
- process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.20.0");
14615
+ process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.20.1");
14588
14616
  function handleRecoverableError(unknownError) {
14589
14617
  sentrySession.status = "abnormal";
14590
14618
  try {
@@ -14620,47 +14648,43 @@ function sentryUnpluginFactory(_ref) {
14620
14648
  logger: logger,
14621
14649
  shouldSendTelemetry: shouldSendTelemetry
14622
14650
  }));
14623
- function deleteFilesUpForDeletion() {
14624
- return _deleteFilesUpForDeletion.apply(this, arguments);
14651
+
14652
+ // We have multiple plugins depending on generated source map files. (debug ID upload, legacy upload)
14653
+ // Additionally, we also want to have the functionality to delete files after uploading sourcemaps.
14654
+ // All of these plugins and the delete functionality need to run in the same hook (`writeBundle`).
14655
+ // Since the plugins among themselves are not aware of when they run and finish, we need a system to
14656
+ // track their dependencies on the generated files, so that we can initiate the file deletion only after
14657
+ // nothing depends on the files anymore.
14658
+ var dependenciesOnSourcemapFiles = new Set();
14659
+ var sourcemapFileDependencySubscribers = [];
14660
+ function notifySourcemapFileDependencySubscribers() {
14661
+ sourcemapFileDependencySubscribers.forEach(function (subscriber) {
14662
+ subscriber();
14663
+ });
14625
14664
  }
14626
- function _deleteFilesUpForDeletion() {
14627
- _deleteFilesUpForDeletion = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
14628
- var _options$sourcemaps$f, _options$sourcemaps4, _options$sourcemaps5;
14629
- var filesToDeleteAfterUpload, filePathsToDelete;
14630
- return _regeneratorRuntime().wrap(function _callee$(_context) {
14631
- while (1) switch (_context.prev = _context.next) {
14632
- case 0:
14633
- filesToDeleteAfterUpload = (_options$sourcemaps$f = (_options$sourcemaps4 = options.sourcemaps) === null || _options$sourcemaps4 === void 0 ? void 0 : _options$sourcemaps4.filesToDeleteAfterUpload) !== null && _options$sourcemaps$f !== void 0 ? _options$sourcemaps$f : (_options$sourcemaps5 = options.sourcemaps) === null || _options$sourcemaps5 === void 0 ? void 0 : _options$sourcemaps5.deleteFilesAfterUpload;
14634
- if (!filesToDeleteAfterUpload) {
14635
- _context.next = 8;
14636
- break;
14637
- }
14638
- _context.next = 4;
14639
- return glob.glob(filesToDeleteAfterUpload, {
14640
- absolute: true,
14641
- nodir: true
14642
- });
14643
- case 4:
14644
- filePathsToDelete = _context.sent;
14645
- filePathsToDelete.forEach(function (filePathToDelete) {
14646
- logger.debug("Deleting asset after upload: ".concat(filePathToDelete));
14647
- });
14648
- _context.next = 8;
14649
- return Promise.all(filePathsToDelete.map(function (filePathToDelete) {
14650
- return fs__namespace.promises.rm(filePathToDelete, {
14651
- force: true
14652
- })["catch"](function (e) {
14653
- // This is allowed to fail - we just don't do anything
14654
- logger.debug("An error occurred while attempting to delete asset: ".concat(filePathToDelete), e);
14655
- });
14656
- }));
14657
- case 8:
14658
- case "end":
14659
- return _context.stop();
14665
+ function createDependencyOnSourcemapFiles() {
14666
+ var dependencyIdentifier = Symbol();
14667
+ dependenciesOnSourcemapFiles.add(dependencyIdentifier);
14668
+ return function freeDependencyOnSourcemapFiles() {
14669
+ dependenciesOnSourcemapFiles["delete"](dependencyIdentifier);
14670
+ notifySourcemapFileDependencySubscribers();
14671
+ };
14672
+ }
14673
+
14674
+ /**
14675
+ * Returns a Promise that resolves when all the currently active dependencies are freed again.
14676
+ */
14677
+ function waitUntilSourcemapFileDependenciesAreFreed() {
14678
+ return new Promise(function (resolve) {
14679
+ sourcemapFileDependencySubscribers.push(function () {
14680
+ if (dependenciesOnSourcemapFiles.size === 0) {
14681
+ resolve();
14660
14682
  }
14661
- }, _callee);
14662
- }));
14663
- return _deleteFilesUpForDeletion.apply(this, arguments);
14683
+ });
14684
+ if (dependenciesOnSourcemapFiles.size === 0) {
14685
+ resolve();
14686
+ }
14687
+ });
14664
14688
  }
14665
14689
  if (options.bundleSizeOptimizations) {
14666
14690
  var bundleSizeOptimizations = options.bundleSizeOptimizations;
@@ -14754,16 +14778,10 @@ function sentryUnpluginFactory(_ref) {
14754
14778
  vcsRemote: options.release.vcsRemote,
14755
14779
  headers: options.headers
14756
14780
  },
14757
- deleteFilesUpForDeletion: deleteFilesUpForDeletion
14781
+ freeDependencyOnSourcemapFiles: createDependencyOnSourcemapFiles()
14758
14782
  }));
14759
14783
  }
14760
14784
  plugins.push(debugIdInjectionPlugin(logger));
14761
- plugins.push(fileDeletionPlugin({
14762
- deleteFilesUpForDeletion: deleteFilesUpForDeletion,
14763
- handleRecoverableError: handleRecoverableError,
14764
- sentryHub: sentryHub,
14765
- sentryClient: sentryClient
14766
- }));
14767
14785
  if (!options.authToken) {
14768
14786
  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/");
14769
14787
  } else if (!options.org && !options.authToken.startsWith("sntrys_")) {
@@ -14775,7 +14793,7 @@ function sentryUnpluginFactory(_ref) {
14775
14793
  plugins.push(debugIdUploadPlugin(createDebugIdUploadFunction({
14776
14794
  assets: (_options$sourcemaps = options.sourcemaps) === null || _options$sourcemaps === void 0 ? void 0 : _options$sourcemaps.assets,
14777
14795
  ignore: (_options$sourcemaps2 = options.sourcemaps) === null || _options$sourcemaps2 === void 0 ? void 0 : _options$sourcemaps2.ignore,
14778
- deleteFilesUpForDeletion: deleteFilesUpForDeletion,
14796
+ freeDependencyOnSourcemapFiles: createDependencyOnSourcemapFiles(),
14779
14797
  dist: options.release.dist,
14780
14798
  releaseName: options.release.name,
14781
14799
  logger: logger,
@@ -14803,6 +14821,16 @@ function sentryUnpluginFactory(_ref) {
14803
14821
  componentNameAnnotatePlugin && plugins.push(componentNameAnnotatePlugin());
14804
14822
  }
14805
14823
  }
14824
+ plugins.push(fileDeletionPlugin({
14825
+ // It is very important that this is only called after all other dependencies have been created with `createDependencyOnSourcemapFiles`.
14826
+ // Ideally, we always register this plugin last.
14827
+ dependenciesAreFreedPromise: waitUntilSourcemapFileDependenciesAreFreed(),
14828
+ filesToDeleteAfterUpload: (_options$sourcemaps$f = (_options$sourcemaps4 = options.sourcemaps) === null || _options$sourcemaps4 === void 0 ? void 0 : _options$sourcemaps4.filesToDeleteAfterUpload) !== null && _options$sourcemaps$f !== void 0 ? _options$sourcemaps$f : (_options$sourcemaps5 = options.sourcemaps) === null || _options$sourcemaps5 === void 0 ? void 0 : _options$sourcemaps5.deleteFilesAfterUpload,
14829
+ logger: logger,
14830
+ handleRecoverableError: handleRecoverableError,
14831
+ sentryHub: sentryHub,
14832
+ sentryClient: sentryClient
14833
+ }));
14806
14834
  return plugins;
14807
14835
  });
14808
14836
  }
@@ -14967,50 +14995,50 @@ function createRollupModuleMetadataInjectionHooks(injectionCode) {
14967
14995
  function createRollupDebugIdUploadHooks(upload) {
14968
14996
  return {
14969
14997
  writeBundle: function writeBundle(outputOptions, bundle) {
14970
- return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
14998
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee() {
14971
14999
  var outputDir, _buildArtifacts, _buildArtifacts2;
14972
- return _regeneratorRuntime().wrap(function _callee2$(_context2) {
14973
- while (1) switch (_context2.prev = _context2.next) {
15000
+ return _regeneratorRuntime().wrap(function _callee$(_context) {
15001
+ while (1) switch (_context.prev = _context.next) {
14974
15002
  case 0:
14975
15003
  if (!outputOptions.dir) {
14976
- _context2.next = 9;
15004
+ _context.next = 9;
14977
15005
  break;
14978
15006
  }
14979
15007
  outputDir = outputOptions.dir;
14980
- _context2.next = 4;
15008
+ _context.next = 4;
14981
15009
  return glob.glob(["/**/*.js", "/**/*.mjs", "/**/*.cjs", "/**/*.js.map", "/**/*.mjs.map", "/**/*.cjs.map"], {
14982
15010
  root: outputDir,
14983
15011
  absolute: true,
14984
15012
  nodir: true
14985
15013
  });
14986
15014
  case 4:
14987
- _buildArtifacts = _context2.sent;
14988
- _context2.next = 7;
15015
+ _buildArtifacts = _context.sent;
15016
+ _context.next = 7;
14989
15017
  return upload(_buildArtifacts);
14990
15018
  case 7:
14991
- _context2.next = 17;
15019
+ _context.next = 17;
14992
15020
  break;
14993
15021
  case 9:
14994
15022
  if (!outputOptions.file) {
14995
- _context2.next = 14;
15023
+ _context.next = 14;
14996
15024
  break;
14997
15025
  }
14998
- _context2.next = 12;
15026
+ _context.next = 12;
14999
15027
  return upload([outputOptions.file]);
15000
15028
  case 12:
15001
- _context2.next = 17;
15029
+ _context.next = 17;
15002
15030
  break;
15003
15031
  case 14:
15004
15032
  _buildArtifacts2 = Object.keys(bundle).map(function (asset) {
15005
15033
  return path__namespace.join(path__namespace.resolve(), asset);
15006
15034
  });
15007
- _context2.next = 17;
15035
+ _context.next = 17;
15008
15036
  return upload(_buildArtifacts2);
15009
15037
  case 17:
15010
15038
  case "end":
15011
- return _context2.stop();
15039
+ return _context.stop();
15012
15040
  }
15013
- }, _callee2);
15041
+ }, _callee);
15014
15042
  }))();
15015
15043
  }
15016
15044
  };
@@ -15018,26 +15046,26 @@ function createRollupDebugIdUploadHooks(upload) {
15018
15046
  function createComponentNameAnnotateHooks() {
15019
15047
  return {
15020
15048
  transform: function transform(code, id) {
15021
- return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee3() {
15049
+ return _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2() {
15022
15050
  var idWithoutQueryAndHash, parserPlugins, _result$code, result;
15023
- return _regeneratorRuntime().wrap(function _callee3$(_context3) {
15024
- while (1) switch (_context3.prev = _context3.next) {
15051
+ return _regeneratorRuntime().wrap(function _callee2$(_context2) {
15052
+ while (1) switch (_context2.prev = _context2.next) {
15025
15053
  case 0:
15026
15054
  // id may contain query and hash which will trip up our file extension logic below
15027
15055
  idWithoutQueryAndHash = stripQueryAndHashFromPath(id);
15028
15056
  if (!idWithoutQueryAndHash.match(/\\node_modules\\|\/node_modules\//)) {
15029
- _context3.next = 3;
15057
+ _context2.next = 3;
15030
15058
  break;
15031
15059
  }
15032
- return _context3.abrupt("return", null);
15060
+ return _context2.abrupt("return", null);
15033
15061
  case 3:
15034
15062
  if ([".jsx", ".tsx"].some(function (ending) {
15035
15063
  return idWithoutQueryAndHash.endsWith(ending);
15036
15064
  })) {
15037
- _context3.next = 5;
15065
+ _context2.next = 5;
15038
15066
  break;
15039
15067
  }
15040
- return _context3.abrupt("return", null);
15068
+ return _context2.abrupt("return", null);
15041
15069
  case 5:
15042
15070
  parserPlugins = [];
15043
15071
  if (idWithoutQueryAndHash.endsWith(".jsx")) {
@@ -15045,8 +15073,8 @@ function createComponentNameAnnotateHooks() {
15045
15073
  } else if (idWithoutQueryAndHash.endsWith(".tsx")) {
15046
15074
  parserPlugins.push("jsx", "typescript");
15047
15075
  }
15048
- _context3.prev = 7;
15049
- _context3.next = 10;
15076
+ _context2.prev = 7;
15077
+ _context2.next = 10;
15050
15078
  return core.transformAsync(code, {
15051
15079
  plugins: [[componentNameAnnotatePlugin__default["default"]]],
15052
15080
  filename: id,
@@ -15061,24 +15089,24 @@ function createComponentNameAnnotateHooks() {
15061
15089
  sourceMaps: true
15062
15090
  });
15063
15091
  case 10:
15064
- result = _context3.sent;
15065
- return _context3.abrupt("return", {
15092
+ result = _context2.sent;
15093
+ return _context2.abrupt("return", {
15066
15094
  code: (_result$code = result === null || result === void 0 ? void 0 : result.code) !== null && _result$code !== void 0 ? _result$code : code,
15067
15095
  map: result === null || result === void 0 ? void 0 : result.map
15068
15096
  });
15069
15097
  case 14:
15070
- _context3.prev = 14;
15071
- _context3.t0 = _context3["catch"](7);
15072
- logger.error("Failed to apply react annotate plugin", _context3.t0);
15098
+ _context2.prev = 14;
15099
+ _context2.t0 = _context2["catch"](7);
15100
+ logger.error("Failed to apply react annotate plugin", _context2.t0);
15073
15101
  case 17:
15074
- return _context3.abrupt("return", {
15102
+ return _context2.abrupt("return", {
15075
15103
  code: code
15076
15104
  });
15077
15105
  case 18:
15078
15106
  case "end":
15079
- return _context3.stop();
15107
+ return _context2.stop();
15080
15108
  }
15081
- }, _callee3, null, [[7, 14]]);
15109
+ }, _callee2, null, [[7, 14]]);
15082
15110
  }))();
15083
15111
  }
15084
15112
  };