@sentry/bundler-plugin-core 4.8.0 → 4.9.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 +16 -10
- package/dist/cjs/index.js.map +1 -1
- package/dist/esm/index.mjs +16 -10
- package/dist/esm/index.mjs.map +1 -1
- package/dist/types/build-plugin-manager.d.ts +4 -0
- package/dist/types/build-plugin-manager.d.ts.map +1 -1
- package/dist/types/index.d.ts +2 -1
- package/dist/types/index.d.ts.map +1 -1
- package/dist/types/options-mapping.d.ts.map +1 -1
- package/dist/types/sentry/telemetry.d.ts +2 -2
- package/dist/types/sentry/telemetry.d.ts.map +1 -1
- package/dist/types/types.d.ts +4 -0
- package/dist/types/types.d.ts.map +1 -1
- package/package.json +4 -4
package/dist/cjs/index.js
CHANGED
|
@@ -8141,7 +8141,7 @@ var CodeInjection = /*#__PURE__*/function () {
|
|
|
8141
8141
|
|
|
8142
8142
|
var SENTRY_SAAS_URL = "https://sentry.io";
|
|
8143
8143
|
function normalizeUserOptions(userOptions) {
|
|
8144
|
-
var _userOptions$org, _userOptions$project, _process$env$SENTRY_P, _userOptions$authToke, _ref, _userOptions$url, _userOptions$debug, _userOptions$silent, _userOptions$telemetr, _userOptions$disable, _ref2, _userOptions$release$, _userOptions$release, _userOptions$release$2, _userOptions$release2, _userOptions$release$3, _userOptions$release3, _userOptions$release$4, _userOptions$release4, _ref3, _userOptions$release$5, _userOptions$release5, _userOptions$release6, _userOptions$_metaOpt, _userOptions$_metaOpt2, _userOptions$_experim;
|
|
8144
|
+
var _userOptions$org, _userOptions$project, _process$env$SENTRY_P, _userOptions$authToke, _ref, _userOptions$url, _userOptions$debug, _userOptions$silent, _userOptions$telemetr, _userOptions$disable, _ref2, _userOptions$release$, _userOptions$release, _userOptions$release$2, _userOptions$release2, _userOptions$release$3, _userOptions$release3, _userOptions$release$4, _userOptions$release4, _ref3, _userOptions$release$5, _userOptions$release5, _userOptions$release6, _userOptions$_metaOpt, _userOptions$_metaOpt2, _userOptions$_metaOpt3, _userOptions$_metaOpt4, _userOptions$_experim;
|
|
8145
8145
|
var options = {
|
|
8146
8146
|
org: (_userOptions$org = userOptions.org) !== null && _userOptions$org !== void 0 ? _userOptions$org : process.env["SENTRY_ORG"],
|
|
8147
8147
|
project: (_userOptions$project = userOptions.project) !== null && _userOptions$project !== void 0 ? _userOptions$project : (_process$env$SENTRY_P = process.env["SENTRY_PROJECT"]) !== null && _process$env$SENTRY_P !== void 0 && _process$env$SENTRY_P.includes(",") ? process.env["SENTRY_PROJECT"].split(",").map(function (p) {
|
|
@@ -8168,7 +8168,8 @@ function normalizeUserOptions(userOptions) {
|
|
|
8168
8168
|
reactComponentAnnotation: userOptions.reactComponentAnnotation,
|
|
8169
8169
|
_metaOptions: {
|
|
8170
8170
|
telemetry: {
|
|
8171
|
-
metaFramework: (_userOptions$_metaOpt = userOptions._metaOptions) === null || _userOptions$_metaOpt === void 0 ? void 0 : (_userOptions$_metaOpt2 = _userOptions$_metaOpt.telemetry) === null || _userOptions$_metaOpt2 === void 0 ? void 0 : _userOptions$_metaOpt2.metaFramework
|
|
8171
|
+
metaFramework: (_userOptions$_metaOpt = userOptions._metaOptions) === null || _userOptions$_metaOpt === void 0 ? void 0 : (_userOptions$_metaOpt2 = _userOptions$_metaOpt.telemetry) === null || _userOptions$_metaOpt2 === void 0 ? void 0 : _userOptions$_metaOpt2.metaFramework,
|
|
8172
|
+
bundlerMajorVersion: (_userOptions$_metaOpt3 = userOptions._metaOptions) === null || _userOptions$_metaOpt3 === void 0 ? void 0 : (_userOptions$_metaOpt4 = _userOptions$_metaOpt3.telemetry) === null || _userOptions$_metaOpt4 === void 0 ? void 0 : _userOptions$_metaOpt4.bundlerMajorVersion
|
|
8172
8173
|
}
|
|
8173
8174
|
},
|
|
8174
8175
|
applicationKey: userOptions.applicationKey,
|
|
@@ -8429,7 +8430,7 @@ function makeOptionallyEnabledNodeTransport(shouldSendTelemetry) {
|
|
|
8429
8430
|
|
|
8430
8431
|
var SENTRY_SAAS_HOSTNAME = "sentry.io";
|
|
8431
8432
|
var stackParser = createStackParser(nodeStackLineParser());
|
|
8432
|
-
function createSentryInstance(options, shouldSendTelemetry, buildTool) {
|
|
8433
|
+
function createSentryInstance(options, shouldSendTelemetry, buildTool, buildToolMajorVersion) {
|
|
8433
8434
|
var clientOptions = {
|
|
8434
8435
|
platform: "node",
|
|
8435
8436
|
runtime: {
|
|
@@ -8439,7 +8440,7 @@ function createSentryInstance(options, shouldSendTelemetry, buildTool) {
|
|
|
8439
8440
|
dsn: "https://4c2bae7d9fbc413e8f7385f55c515d51@o1.ingest.sentry.io/6690737",
|
|
8440
8441
|
tracesSampleRate: 1,
|
|
8441
8442
|
sampleRate: 1,
|
|
8442
|
-
release: "4.
|
|
8443
|
+
release: "4.9.1",
|
|
8443
8444
|
integrations: [],
|
|
8444
8445
|
tracePropagationTargets: ["sentry.io/api"],
|
|
8445
8446
|
stackParser: stackParser,
|
|
@@ -8463,13 +8464,13 @@ function createSentryInstance(options, shouldSendTelemetry, buildTool) {
|
|
|
8463
8464
|
var client = new ServerRuntimeClient(clientOptions);
|
|
8464
8465
|
var scope = new Scope();
|
|
8465
8466
|
scope.setClient(client);
|
|
8466
|
-
setTelemetryDataOnScope(options, scope, buildTool);
|
|
8467
|
+
setTelemetryDataOnScope(options, scope, buildTool, buildToolMajorVersion);
|
|
8467
8468
|
return {
|
|
8468
8469
|
sentryScope: scope,
|
|
8469
8470
|
sentryClient: client
|
|
8470
8471
|
};
|
|
8471
8472
|
}
|
|
8472
|
-
function setTelemetryDataOnScope(options, scope, buildTool) {
|
|
8473
|
+
function setTelemetryDataOnScope(options, scope, buildTool, buildToolMajorVersion) {
|
|
8473
8474
|
var _options$_metaOptions;
|
|
8474
8475
|
var org = options.org,
|
|
8475
8476
|
project = options.project,
|
|
@@ -8509,6 +8510,9 @@ function setTelemetryDataOnScope(options, scope, buildTool) {
|
|
|
8509
8510
|
project: Array.isArray(project) ? project.join(", ") : project !== null && project !== void 0 ? project : "undefined",
|
|
8510
8511
|
bundler: buildTool
|
|
8511
8512
|
});
|
|
8513
|
+
if (buildToolMajorVersion) {
|
|
8514
|
+
scope.setTag("bundler-major-version", buildToolMajorVersion);
|
|
8515
|
+
}
|
|
8512
8516
|
scope.setUser({
|
|
8513
8517
|
id: org
|
|
8514
8518
|
});
|
|
@@ -9017,7 +9021,7 @@ function createSentryBuildPluginManager(userOptions, bundlerPluginMetaContext) {
|
|
|
9017
9021
|
};
|
|
9018
9022
|
}
|
|
9019
9023
|
var shouldSendTelemetry = allowedToSendTelemetry(options);
|
|
9020
|
-
var _createSentryInstance = createSentryInstance(options, shouldSendTelemetry, bundlerPluginMetaContext.buildTool),
|
|
9024
|
+
var _createSentryInstance = createSentryInstance(options, shouldSendTelemetry, bundlerPluginMetaContext.buildTool, bundlerPluginMetaContext.buildToolMajorVersion),
|
|
9021
9025
|
sentryScope = _createSentryInstance.sentryScope,
|
|
9022
9026
|
sentryClient = _createSentryInstance.sentryClient;
|
|
9023
9027
|
var _sentryClient$getOpti = sentryClient.getOptions(),
|
|
@@ -9048,7 +9052,7 @@ function createSentryBuildPluginManager(userOptions, bundlerPluginMetaContext) {
|
|
|
9048
9052
|
});
|
|
9049
9053
|
|
|
9050
9054
|
// Set the User-Agent that Sentry CLI will use when interacting with Sentry
|
|
9051
|
-
process.env["SENTRY_PIPELINE"] = "".concat(bundlerPluginMetaContext.buildTool, "-plugin/", "4.
|
|
9055
|
+
process.env["SENTRY_PIPELINE"] = "".concat(bundlerPluginMetaContext.buildTool, "-plugin/", "4.9.1");
|
|
9052
9056
|
|
|
9053
9057
|
// Propagate debug flag to Sentry CLI via environment variable
|
|
9054
9058
|
// Only set if not already defined to respect user's explicit configuration
|
|
@@ -9900,14 +9904,16 @@ function sentryUnpluginFactory(_ref) {
|
|
|
9900
9904
|
var injectionPlugin = _ref.injectionPlugin,
|
|
9901
9905
|
componentNameAnnotatePlugin = _ref.componentNameAnnotatePlugin,
|
|
9902
9906
|
debugIdUploadPlugin = _ref.debugIdUploadPlugin,
|
|
9903
|
-
bundleSizeOptimizationsPlugin = _ref.bundleSizeOptimizationsPlugin
|
|
9907
|
+
bundleSizeOptimizationsPlugin = _ref.bundleSizeOptimizationsPlugin,
|
|
9908
|
+
getBundlerMajorVersion = _ref.getBundlerMajorVersion;
|
|
9904
9909
|
return unplugin.createUnplugin(function () {
|
|
9905
9910
|
var _userOptions$_metaOpt, _userOptions$_metaOpt2, _options$sourcemaps, _options$sourcemaps3;
|
|
9906
9911
|
var userOptions = arguments.length > 0 && arguments[0] !== undefined ? arguments[0] : {};
|
|
9907
9912
|
var unpluginMetaContext = arguments.length > 1 ? arguments[1] : undefined;
|
|
9908
9913
|
var sentryBuildPluginManager = createSentryBuildPluginManager(userOptions, {
|
|
9909
9914
|
loggerPrefix: (_userOptions$_metaOpt = (_userOptions$_metaOpt2 = userOptions._metaOptions) === null || _userOptions$_metaOpt2 === void 0 ? void 0 : _userOptions$_metaOpt2.loggerPrefixOverride) !== null && _userOptions$_metaOpt !== void 0 ? _userOptions$_metaOpt : "[sentry-".concat(unpluginMetaContext.framework, "-plugin]"),
|
|
9910
|
-
buildTool: unpluginMetaContext.framework
|
|
9915
|
+
buildTool: unpluginMetaContext.framework,
|
|
9916
|
+
buildToolMajorVersion: getBundlerMajorVersion === null || getBundlerMajorVersion === void 0 ? void 0 : getBundlerMajorVersion()
|
|
9911
9917
|
});
|
|
9912
9918
|
var logger = sentryBuildPluginManager.logger,
|
|
9913
9919
|
options = sentryBuildPluginManager.normalizedOptions,
|