@sentry/bundler-plugin-core 2.14.0 → 2.14.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 +24 -13
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +24 -13
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/sentry/telemetry.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/cjs/index.js
CHANGED
|
@@ -376,6 +376,15 @@ function _regeneratorRuntime() {
|
|
|
376
376
|
}
|
|
377
377
|
}, exports;
|
|
378
378
|
}
|
|
379
|
+
function _typeof(obj) {
|
|
380
|
+
"@babel/helpers - typeof";
|
|
381
|
+
|
|
382
|
+
return _typeof = "function" == typeof Symbol && "symbol" == typeof Symbol.iterator ? function (obj) {
|
|
383
|
+
return typeof obj;
|
|
384
|
+
} : function (obj) {
|
|
385
|
+
return obj && "function" == typeof Symbol && obj.constructor === Symbol && obj !== Symbol.prototype ? "symbol" : typeof obj;
|
|
386
|
+
}, _typeof(obj);
|
|
387
|
+
}
|
|
379
388
|
function asyncGeneratorStep(gen, resolve, reject, _next, _throw, key, arg) {
|
|
380
389
|
try {
|
|
381
390
|
var info = gen[key](arg);
|
|
@@ -741,7 +750,7 @@ function createSentryInstance(options, shouldSendTelemetry, bundler) {
|
|
|
741
750
|
dsn: "https://4c2bae7d9fbc413e8f7385f55c515d51@o1.ingest.sentry.io/6690737",
|
|
742
751
|
tracesSampleRate: 1,
|
|
743
752
|
sampleRate: 1,
|
|
744
|
-
release: "2.14.
|
|
753
|
+
release: "2.14.1",
|
|
745
754
|
integrations: [],
|
|
746
755
|
tracePropagationTargets: ["sentry.io/api"],
|
|
747
756
|
stackParser: node.defaultStackParser,
|
|
@@ -806,7 +815,8 @@ function setTelemetryDataOnHub(options, hub, bundler) {
|
|
|
806
815
|
project = options.project,
|
|
807
816
|
release = options.release,
|
|
808
817
|
errorHandler = options.errorHandler,
|
|
809
|
-
sourcemaps = options.sourcemaps
|
|
818
|
+
sourcemaps = options.sourcemaps,
|
|
819
|
+
reactComponentAnnotation = options.reactComponentAnnotation;
|
|
810
820
|
hub.setTag("upload-legacy-sourcemaps", !!release.uploadLegacySourcemaps);
|
|
811
821
|
if (release.uploadLegacySourcemaps) {
|
|
812
822
|
hub.setTag("uploadLegacySourcemapsEntries", Array.isArray(release.uploadLegacySourcemaps) ? release.uploadLegacySourcemaps.length : 1);
|
|
@@ -828,6 +838,7 @@ function setTelemetryDataOnHub(options, hub, bundler) {
|
|
|
828
838
|
hub.setTag("custom-error-handler", !!errorHandler);
|
|
829
839
|
hub.setTag("sourcemaps-assets", !!(sourcemaps !== null && sourcemaps !== void 0 && sourcemaps.assets));
|
|
830
840
|
hub.setTag("delete-after-upload", !!(sourcemaps !== null && sourcemaps !== void 0 && sourcemaps.deleteFilesAfterUpload) || !!(sourcemaps !== null && sourcemaps !== void 0 && sourcemaps.filesToDeleteAfterUpload));
|
|
841
|
+
hub.setTag("react-annotate", !!(reactComponentAnnotation !== null && reactComponentAnnotation !== void 0 && reactComponentAnnotation.enabled));
|
|
831
842
|
hub.setTag("node", process.version);
|
|
832
843
|
hub.setTag("platform", process.platform);
|
|
833
844
|
hub.setTags({
|
|
@@ -1619,17 +1630,17 @@ function sentryUnpluginFactory(_ref) {
|
|
|
1619
1630
|
silent: (_userOptions$silent = userOptions.silent) !== null && _userOptions$silent !== void 0 ? _userOptions$silent : false,
|
|
1620
1631
|
debug: (_userOptions$debug = userOptions.debug) !== null && _userOptions$debug !== void 0 ? _userOptions$debug : false
|
|
1621
1632
|
});
|
|
1622
|
-
|
|
1623
|
-
|
|
1624
|
-
|
|
1625
|
-
|
|
1626
|
-
|
|
1627
|
-
// eslint-disable-next-line @typescript-eslint/ban-ts-comment
|
|
1628
|
-
// @ts-ignore Accessing `code` on error should be safe
|
|
1629
|
-
if (dotenvResult.error && dotenvResult.error.code !== "ENOENT") {
|
|
1630
|
-
throw dotenvResult.error;
|
|
1631
|
-
} else if (dotenvResult.parsed) {
|
|
1633
|
+
try {
|
|
1634
|
+
var dotenvFile = fs__namespace.readFileSync(path__namespace.join(process.cwd(), ".env.sentry-build-plugin"), "utf-8");
|
|
1635
|
+
// NOTE: Do not use the dotenv.config API directly to read the dotenv file! For some ungodly reason, it falls back to reading `${process.cwd()}/.env` which is absolutely not what we want.
|
|
1636
|
+
var dotenvResult = dotenv__namespace.parse(dotenvFile);
|
|
1637
|
+
process.env = _objectSpread2(_objectSpread2({}, process.env), dotenvResult);
|
|
1632
1638
|
logger.info('Using environment variables configured in ".env.sentry-build-plugin".');
|
|
1639
|
+
} catch (e) {
|
|
1640
|
+
// Ignore "file not found" errors but throw all others
|
|
1641
|
+
if (_typeof(e) === "object" && e && "code" in e && e.code !== "ENOENT") {
|
|
1642
|
+
throw e;
|
|
1643
|
+
}
|
|
1633
1644
|
}
|
|
1634
1645
|
var options = normalizeUserOptions(userOptions);
|
|
1635
1646
|
if (unpluginMetaContext.watchMode || options.disable) {
|
|
@@ -1653,7 +1664,7 @@ function sentryUnpluginFactory(_ref) {
|
|
|
1653
1664
|
});
|
|
1654
1665
|
|
|
1655
1666
|
// Set the User-Agent that Sentry CLI will use when interacting with Sentry
|
|
1656
|
-
process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.14.
|
|
1667
|
+
process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "2.14.1");
|
|
1657
1668
|
function handleRecoverableError(unknownError) {
|
|
1658
1669
|
sentrySession.status = "abnormal";
|
|
1659
1670
|
try {
|