@sentry/bundler-plugin-core 3.1.0 → 3.1.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 +14 -5
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +14 -5
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/index.d.ts.map +1 -1
- package/package.json +5 -5
package/dist/esm/index.mjs
CHANGED
|
@@ -8075,7 +8075,7 @@ function createSentryInstance(options, shouldSendTelemetry, bundler) {
|
|
|
8075
8075
|
dsn: "https://4c2bae7d9fbc413e8f7385f55c515d51@o1.ingest.sentry.io/6690737",
|
|
8076
8076
|
tracesSampleRate: 1,
|
|
8077
8077
|
sampleRate: 1,
|
|
8078
|
-
release: "3.1.
|
|
8078
|
+
release: "3.1.2",
|
|
8079
8079
|
integrations: [],
|
|
8080
8080
|
tracePropagationTargets: ["sentry.io/api"],
|
|
8081
8081
|
stackParser: stackParser,
|
|
@@ -9058,6 +9058,11 @@ function sentryUnpluginFactory(_ref) {
|
|
|
9058
9058
|
silent: (_userOptions$silent = userOptions.silent) !== null && _userOptions$silent !== void 0 ? _userOptions$silent : false,
|
|
9059
9059
|
debug: (_userOptions$debug = userOptions.debug) !== null && _userOptions$debug !== void 0 ? _userOptions$debug : false
|
|
9060
9060
|
});
|
|
9061
|
+
|
|
9062
|
+
// Not a bulletproof check but should be good enough to at least sometimes determine
|
|
9063
|
+
// if the plugin is called in dev/watch mode or for a prod build. The important part
|
|
9064
|
+
// here is to avoid a false positive. False negatives are okay.
|
|
9065
|
+
var isDevMode = process.env["NODE_ENV"] === "development";
|
|
9061
9066
|
try {
|
|
9062
9067
|
var dotenvFile = fs.readFileSync(path.join(process.cwd(), ".env.sentry-build-plugin"), "utf-8");
|
|
9063
9068
|
// 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.
|
|
@@ -9074,7 +9079,7 @@ function sentryUnpluginFactory(_ref) {
|
|
|
9074
9079
|
}
|
|
9075
9080
|
}
|
|
9076
9081
|
var options = normalizeUserOptions(userOptions);
|
|
9077
|
-
if (
|
|
9082
|
+
if (options.disable) {
|
|
9078
9083
|
return [{
|
|
9079
9084
|
name: "sentry-noop-plugin"
|
|
9080
9085
|
}];
|
|
@@ -9111,7 +9116,7 @@ function sentryUnpluginFactory(_ref) {
|
|
|
9111
9116
|
});
|
|
9112
9117
|
|
|
9113
9118
|
// Set the User-Agent that Sentry CLI will use when interacting with Sentry
|
|
9114
|
-
process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "3.1.
|
|
9119
|
+
process.env["SENTRY_PIPELINE"] = "".concat(unpluginMetaContext.framework, "-plugin/", "3.1.2");
|
|
9115
9120
|
function handleRecoverableError(unknownError) {
|
|
9116
9121
|
sentrySession.status = "abnormal";
|
|
9117
9122
|
try {
|
|
@@ -9216,7 +9221,7 @@ function sentryUnpluginFactory(_ref) {
|
|
|
9216
9221
|
if (!options.release.inject) {
|
|
9217
9222
|
logger.debug("Release injection disabled via `release.inject` option. Will not inject release.");
|
|
9218
9223
|
} else if (!options.release.name) {
|
|
9219
|
-
logger.
|
|
9224
|
+
logger.debug("No release name provided. Will not inject release. Please set the `release.name` option to identify your release.");
|
|
9220
9225
|
} else {
|
|
9221
9226
|
var _injectionCode = generateGlobalInjectorCode({
|
|
9222
9227
|
release: options.release.name,
|
|
@@ -9251,7 +9256,9 @@ function sentryUnpluginFactory(_ref) {
|
|
|
9251
9256
|
plugins.push(moduleMetadataInjectionPlugin(_injectionCode2));
|
|
9252
9257
|
}
|
|
9253
9258
|
if (!options.release.name) {
|
|
9254
|
-
logger.
|
|
9259
|
+
logger.debug("No release name provided. Will not create release. Please set the `release.name` option to identify your release.");
|
|
9260
|
+
} else if (isDevMode) {
|
|
9261
|
+
logger.debug("Running in development mode. Will not create release.");
|
|
9255
9262
|
} else if (!options.authToken) {
|
|
9256
9263
|
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/");
|
|
9257
9264
|
} else if (!options.org && !options.authToken.startsWith("sntrys_")) {
|
|
@@ -9288,6 +9295,8 @@ function sentryUnpluginFactory(_ref) {
|
|
|
9288
9295
|
}
|
|
9289
9296
|
if ((_options$sourcemaps2 = options.sourcemaps) !== null && _options$sourcemaps2 !== void 0 && _options$sourcemaps2.disable) {
|
|
9290
9297
|
logger.debug("Source map upload was disabled. Will not upload sourcemaps using debug ID process.");
|
|
9298
|
+
} else if (isDevMode) {
|
|
9299
|
+
logger.debug("Running in development mode. Will not upload sourcemaps.");
|
|
9291
9300
|
} else if (!options.authToken) {
|
|
9292
9301
|
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/");
|
|
9293
9302
|
} else if (!options.org && !options.authToken.startsWith("sntrys_")) {
|