@sentry/bundler-plugin-core 0.2.3 → 0.3.0
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/esm/index.mjs
CHANGED
|
@@ -804,6 +804,7 @@ function normalizeUserOptions(userOptions) {
|
|
|
804
804
|
// but CLI v2 uses `SENTRY_HEADER` (which is also better aligned with other naming)
|
|
805
805
|
// In the spirit of maximum compatibility, we allow both here.
|
|
806
806
|
customHeader: (_ref3 = (_userOptions$customHe = userOptions.customHeader) !== null && _userOptions$customHe !== void 0 ? _userOptions$customHe : process.env["SENTRY_HEADER"]) !== null && _ref3 !== void 0 ? _ref3 : process.env["CUSTOM_HEADER"],
|
|
807
|
+
headers: userOptions.headers,
|
|
807
808
|
vcsRemote: userOptions.vcsRemote,
|
|
808
809
|
// env var: `SENTRY_VSC_REMOTE`
|
|
809
810
|
// Optional options
|
|
@@ -927,12 +928,16 @@ function validateOptions(options, logger) {
|
|
|
927
928
|
}
|
|
928
929
|
|
|
929
930
|
var SENTRY_SAAS_HOSTNAME = "sentry.io";
|
|
930
|
-
function makeSentryClient(dsn, allowedToSendTelemetryPromise) {
|
|
931
|
+
function makeSentryClient(dsn, allowedToSendTelemetryPromise, userProject) {
|
|
931
932
|
var client = new NodeClient({
|
|
932
933
|
dsn: dsn,
|
|
933
934
|
tracesSampleRate: 1,
|
|
934
935
|
sampleRate: 1,
|
|
935
|
-
|
|
936
|
+
// We're also sending the user project in dist because it is an indexed fieldso we can use this data effectively in
|
|
937
|
+
// a dashboard.
|
|
938
|
+
// Yes, this is slightly abusing the purpose of this field.
|
|
939
|
+
dist: userProject,
|
|
940
|
+
release: "0.3.0",
|
|
936
941
|
integrations: [],
|
|
937
942
|
tracePropagationTargets: ["sentry.io/api"],
|
|
938
943
|
stackParser: defaultStackParser,
|
|
@@ -1084,12 +1089,12 @@ function _shouldSendTelemetry() {
|
|
|
1084
1089
|
_shouldSendTelemetry = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime().mark(function _callee2(options) {
|
|
1085
1090
|
var _cliInfo$split$, _cliInfo$split$$repla;
|
|
1086
1091
|
|
|
1087
|
-
var silent, org, project, authToken, url, vcsRemote, customHeader,
|
|
1092
|
+
var silent, org, project, authToken, url, vcsRemote, customHeader, headers, telemetry, dryRun, cli, cliInfo, cliInfoUrl;
|
|
1088
1093
|
return _regeneratorRuntime().wrap(function _callee2$(_context2) {
|
|
1089
1094
|
while (1) {
|
|
1090
1095
|
switch (_context2.prev = _context2.next) {
|
|
1091
1096
|
case 0:
|
|
1092
|
-
silent = options.silent, org = options.org, project = options.project, authToken = options.authToken, url = options.url, vcsRemote = options.vcsRemote, customHeader = options.customHeader,
|
|
1097
|
+
silent = options.silent, org = options.org, project = options.project, authToken = options.authToken, url = options.url, vcsRemote = options.vcsRemote, customHeader = options.customHeader, headers = options.headers, telemetry = options.telemetry, dryRun = options.dryRun; // `options.telemetry` defaults to true
|
|
1093
1098
|
|
|
1094
1099
|
if (!(telemetry === false)) {
|
|
1095
1100
|
_context2.next = 3;
|
|
@@ -1121,9 +1126,9 @@ function _shouldSendTelemetry() {
|
|
|
1121
1126
|
org: org,
|
|
1122
1127
|
project: project,
|
|
1123
1128
|
vcsRemote: vcsRemote,
|
|
1124
|
-
dist: dist,
|
|
1125
1129
|
silent: silent,
|
|
1126
|
-
customHeader: customHeader
|
|
1130
|
+
customHeader: customHeader,
|
|
1131
|
+
headers: headers
|
|
1127
1132
|
});
|
|
1128
1133
|
_context2.prev = 8;
|
|
1129
1134
|
_context2.next = 11;
|
|
@@ -1285,7 +1290,8 @@ function _uploadSourceMaps() {
|
|
|
1285
1290
|
_context3.prev = 2;
|
|
1286
1291
|
_context3.next = 5;
|
|
1287
1292
|
return ctx.cli.releases.uploadSourceMaps(releaseName, {
|
|
1288
|
-
include: options.include
|
|
1293
|
+
include: options.include,
|
|
1294
|
+
dist: options.dist
|
|
1289
1295
|
});
|
|
1290
1296
|
|
|
1291
1297
|
case 5:
|
|
@@ -1580,16 +1586,16 @@ function getSentryCli(internalOptions, logger) {
|
|
|
1580
1586
|
url = internalOptions.url,
|
|
1581
1587
|
vcsRemote = internalOptions.vcsRemote,
|
|
1582
1588
|
customHeader = internalOptions.customHeader,
|
|
1583
|
-
|
|
1589
|
+
headers = internalOptions.headers;
|
|
1584
1590
|
var cli = new SentryCli(internalOptions.configFile, {
|
|
1585
1591
|
url: url,
|
|
1586
1592
|
authToken: authToken,
|
|
1587
1593
|
org: org,
|
|
1588
1594
|
project: project,
|
|
1589
1595
|
vcsRemote: vcsRemote,
|
|
1590
|
-
dist: dist,
|
|
1591
1596
|
silent: silent,
|
|
1592
|
-
customHeader: customHeader
|
|
1597
|
+
customHeader: customHeader,
|
|
1598
|
+
headers: headers
|
|
1593
1599
|
});
|
|
1594
1600
|
|
|
1595
1601
|
if (internalOptions.dryRun) {
|
|
@@ -1678,7 +1684,7 @@ var unplugin = createUnplugin(function (options, unpluginMetaContext) {
|
|
|
1678
1684
|
var internalOptions = normalizeUserOptions(options);
|
|
1679
1685
|
var allowedToSendTelemetryPromise = shouldSendTelemetry(internalOptions);
|
|
1680
1686
|
|
|
1681
|
-
var _makeSentryClient = makeSentryClient("https://4c2bae7d9fbc413e8f7385f55c515d51@o1.ingest.sentry.io/6690737", allowedToSendTelemetryPromise),
|
|
1687
|
+
var _makeSentryClient = makeSentryClient("https://4c2bae7d9fbc413e8f7385f55c515d51@o1.ingest.sentry.io/6690737", allowedToSendTelemetryPromise, internalOptions.project),
|
|
1682
1688
|
sentryHub = _makeSentryClient.sentryHub,
|
|
1683
1689
|
sentryClient = _makeSentryClient.sentryClient;
|
|
1684
1690
|
|