@sentry/craft 3.13.0 → 3.14.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/craft +122 -30
- package/package.json +1 -1
package/dist/craft
CHANGED
|
@@ -60833,7 +60833,7 @@ var require_lib9 = __commonJS({
|
|
|
60833
60833
|
}
|
|
60834
60834
|
var INTERNALS$1 = /* @__PURE__ */ Symbol("Response internals");
|
|
60835
60835
|
var STATUS_CODES = http5.STATUS_CODES;
|
|
60836
|
-
var
|
|
60836
|
+
var Response2 = class _Response {
|
|
60837
60837
|
constructor() {
|
|
60838
60838
|
let body = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : null;
|
|
60839
60839
|
let opts = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : {};
|
|
@@ -60891,8 +60891,8 @@ var require_lib9 = __commonJS({
|
|
|
60891
60891
|
});
|
|
60892
60892
|
}
|
|
60893
60893
|
};
|
|
60894
|
-
Body.mixIn(
|
|
60895
|
-
Object.defineProperties(
|
|
60894
|
+
Body.mixIn(Response2.prototype);
|
|
60895
|
+
Object.defineProperties(Response2.prototype, {
|
|
60896
60896
|
url: { enumerable: true },
|
|
60897
60897
|
status: { enumerable: true },
|
|
60898
60898
|
ok: { enumerable: true },
|
|
@@ -60901,7 +60901,7 @@ var require_lib9 = __commonJS({
|
|
|
60901
60901
|
headers: { enumerable: true },
|
|
60902
60902
|
clone: { enumerable: true }
|
|
60903
60903
|
});
|
|
60904
|
-
Object.defineProperty(
|
|
60904
|
+
Object.defineProperty(Response2.prototype, Symbol.toStringTag, {
|
|
60905
60905
|
value: "Response",
|
|
60906
60906
|
writable: false,
|
|
60907
60907
|
enumerable: false,
|
|
@@ -61235,7 +61235,7 @@ var require_lib9 = __commonJS({
|
|
|
61235
61235
|
};
|
|
61236
61236
|
const codings = headers.get("Content-Encoding");
|
|
61237
61237
|
if (!request3.compress || request3.method === "HEAD" || codings === null || res.statusCode === 204 || res.statusCode === 304) {
|
|
61238
|
-
response = new
|
|
61238
|
+
response = new Response2(body, response_options);
|
|
61239
61239
|
resolve11(response);
|
|
61240
61240
|
return;
|
|
61241
61241
|
}
|
|
@@ -61245,7 +61245,7 @@ var require_lib9 = __commonJS({
|
|
|
61245
61245
|
};
|
|
61246
61246
|
if (codings == "gzip" || codings == "x-gzip") {
|
|
61247
61247
|
body = body.pipe(zlib2.createGunzip(zlibOptions));
|
|
61248
|
-
response = new
|
|
61248
|
+
response = new Response2(body, response_options);
|
|
61249
61249
|
resolve11(response);
|
|
61250
61250
|
return;
|
|
61251
61251
|
}
|
|
@@ -61257,12 +61257,12 @@ var require_lib9 = __commonJS({
|
|
|
61257
61257
|
} else {
|
|
61258
61258
|
body = body.pipe(zlib2.createInflateRaw());
|
|
61259
61259
|
}
|
|
61260
|
-
response = new
|
|
61260
|
+
response = new Response2(body, response_options);
|
|
61261
61261
|
resolve11(response);
|
|
61262
61262
|
});
|
|
61263
61263
|
raw.on("end", function() {
|
|
61264
61264
|
if (!response) {
|
|
61265
|
-
response = new
|
|
61265
|
+
response = new Response2(body, response_options);
|
|
61266
61266
|
resolve11(response);
|
|
61267
61267
|
}
|
|
61268
61268
|
});
|
|
@@ -61270,11 +61270,11 @@ var require_lib9 = __commonJS({
|
|
|
61270
61270
|
}
|
|
61271
61271
|
if (codings == "br" && typeof zlib2.createBrotliDecompress === "function") {
|
|
61272
61272
|
body = body.pipe(zlib2.createBrotliDecompress());
|
|
61273
|
-
response = new
|
|
61273
|
+
response = new Response2(body, response_options);
|
|
61274
61274
|
resolve11(response);
|
|
61275
61275
|
return;
|
|
61276
61276
|
}
|
|
61277
|
-
response = new
|
|
61277
|
+
response = new Response2(body, response_options);
|
|
61278
61278
|
resolve11(response);
|
|
61279
61279
|
});
|
|
61280
61280
|
writeToStream(req, request3);
|
|
@@ -61316,7 +61316,7 @@ var require_lib9 = __commonJS({
|
|
|
61316
61316
|
exports2.default = exports2;
|
|
61317
61317
|
exports2.Headers = Headers2;
|
|
61318
61318
|
exports2.Request = Request2;
|
|
61319
|
-
exports2.Response =
|
|
61319
|
+
exports2.Response = Response2;
|
|
61320
61320
|
exports2.FetchError = FetchError;
|
|
61321
61321
|
exports2.AbortError = AbortError;
|
|
61322
61322
|
}
|
|
@@ -117889,9 +117889,20 @@ function extractScope(title) {
|
|
|
117889
117889
|
return null;
|
|
117890
117890
|
}
|
|
117891
117891
|
function formatScopeTitle(scope) {
|
|
117892
|
-
return scope.
|
|
117892
|
+
return scope.split(/[-_\s]+/).map(
|
|
117893
|
+
(word) => SCOPE_WORD_CASING.get(word.toLowerCase()) ?? word.charAt(0).toUpperCase() + word.slice(1)
|
|
117894
|
+
).join(" ");
|
|
117893
117895
|
}
|
|
117894
117896
|
function extractChangelogEntry(prBody) {
|
|
117897
|
+
const contentTokens = getChangelogEntryTokens(prBody);
|
|
117898
|
+
return contentTokens ? parseTokensToEntries(contentTokens) : null;
|
|
117899
|
+
}
|
|
117900
|
+
function extractReleaseNotes(prBody) {
|
|
117901
|
+
return (getChangelogEntryTokens(prBody) ?? []).filter(
|
|
117902
|
+
(token) => token.type === "blockquote" && GITHUB_ALERT_PATTERN.test(token.text)
|
|
117903
|
+
).map((token) => token.raw.trim());
|
|
117904
|
+
}
|
|
117905
|
+
function getChangelogEntryTokens(prBody) {
|
|
117895
117906
|
if (!prBody) {
|
|
117896
117907
|
return null;
|
|
117897
117908
|
}
|
|
@@ -117911,10 +117922,7 @@ function extractChangelogEntry(prBody) {
|
|
|
117911
117922
|
}
|
|
117912
117923
|
contentTokens.push(token);
|
|
117913
117924
|
}
|
|
117914
|
-
|
|
117915
|
-
return null;
|
|
117916
|
-
}
|
|
117917
|
-
return parseTokensToEntries(contentTokens);
|
|
117925
|
+
return contentTokens.length > 0 ? contentTokens : null;
|
|
117918
117926
|
}
|
|
117919
117927
|
function renderIndentedCodeBlock(codeToken, indent = " ") {
|
|
117920
117928
|
const fence = codeToken.lang ? `\`\`\`${codeToken.lang}` : "```";
|
|
@@ -118610,6 +118618,7 @@ function categorizeCommits(rawCommits) {
|
|
|
118610
118618
|
const releaseConfig = getNormalizedReleaseConfig();
|
|
118611
118619
|
const categories = /* @__PURE__ */ new Map();
|
|
118612
118620
|
const leftovers = [];
|
|
118621
|
+
const releaseNotes = [];
|
|
118613
118622
|
const missing = [];
|
|
118614
118623
|
let bumpPriority = null;
|
|
118615
118624
|
let matchedCommitsWithSemver = 0;
|
|
@@ -118619,6 +118628,7 @@ function categorizeCommits(rawCommits) {
|
|
|
118619
118628
|
if (shouldExcludePR(labels, raw.author, releaseConfig, bodyToCheck)) {
|
|
118620
118629
|
continue;
|
|
118621
118630
|
}
|
|
118631
|
+
releaseNotes.push(...extractReleaseNotes(raw.prBody));
|
|
118622
118632
|
const titleForMatching = (raw.prTitle ?? raw.title).trim();
|
|
118623
118633
|
const match2 = matchCommitToCategory(
|
|
118624
118634
|
labels,
|
|
@@ -118701,6 +118711,7 @@ function categorizeCommits(rawCommits) {
|
|
|
118701
118711
|
data: {
|
|
118702
118712
|
categories,
|
|
118703
118713
|
leftovers,
|
|
118714
|
+
releaseNotes,
|
|
118704
118715
|
releaseConfig
|
|
118705
118716
|
},
|
|
118706
118717
|
stats: {
|
|
@@ -118716,7 +118727,7 @@ async function generateRawChangelog(git, rev, until) {
|
|
|
118716
118727
|
return categorizeCommits(filteredCommits);
|
|
118717
118728
|
}
|
|
118718
118729
|
async function serializeChangelog(rawData, maxLeftovers, disableMentions = false, disablePRLinks = false, summarize = true) {
|
|
118719
|
-
const { categories, leftovers, releaseConfig } = rawData;
|
|
118730
|
+
const { categories, leftovers, releaseNotes, releaseConfig } = rawData;
|
|
118720
118731
|
const changelogSections = [];
|
|
118721
118732
|
const summaryCategories = [];
|
|
118722
118733
|
const summaryPositions = /* @__PURE__ */ new Map();
|
|
@@ -118895,6 +118906,7 @@ ${group.items.join("\n")}`;
|
|
|
118895
118906
|
if (summary.release)
|
|
118896
118907
|
changelogSections.unshift(formatSummaryText(summary.release));
|
|
118897
118908
|
}
|
|
118909
|
+
changelogSections.unshift(...releaseNotes);
|
|
118898
118910
|
return changelogSections.join("\n\n");
|
|
118899
118911
|
}
|
|
118900
118912
|
async function generateChangesetFromGitImpl(git, rev, maxLeftovers, summarize, until) {
|
|
@@ -119035,7 +119047,7 @@ async function getPRAndLabelsFromCommit(hashes) {
|
|
|
119035
119047
|
})
|
|
119036
119048
|
);
|
|
119037
119049
|
}
|
|
119038
|
-
var import_fs12, import_path12, BUMP_TYPES, DEFAULT_CHANGELOG_PATH, DEFAULT_UNRELEASED_TITLE, SKIP_CHANGELOG_MAGIC_WORD, DEFAULT_CHANGESET_BODY, VERSION_HEADER_LEVEL, SUBSECTION_HEADER_LEVEL, SCOPE_HEADER_LEVEL, MAX_COMMITS_PER_QUERY, COMMIT_QUERY_TIMEOUT_MS, MAX_PR_COMMITS, MAX_PRS_PER_QUERY, MAX_COMMIT_AUTHORS, MAX_CREDITED_AUTHORS, MAX_LEFTOVERS, DEFAULT_RELEASE_CONFIG, releaseConfigCache, SHORT_SHA_LENGTH, changesetCache, rawChangesetCache;
|
|
119050
|
+
var import_fs12, import_path12, BUMP_TYPES, DEFAULT_CHANGELOG_PATH, DEFAULT_UNRELEASED_TITLE, SKIP_CHANGELOG_MAGIC_WORD, DEFAULT_CHANGESET_BODY, VERSION_HEADER_LEVEL, SUBSECTION_HEADER_LEVEL, SCOPE_HEADER_LEVEL, MAX_COMMITS_PER_QUERY, COMMIT_QUERY_TIMEOUT_MS, MAX_PR_COMMITS, MAX_PRS_PER_QUERY, MAX_COMMIT_AUTHORS, MAX_CREDITED_AUTHORS, MAX_LEFTOVERS, SCOPE_WORD_CASING, GITHUB_ALERT_PATTERN, DEFAULT_RELEASE_CONFIG, releaseConfigCache, SHORT_SHA_LENGTH, changesetCache, rawChangesetCache;
|
|
119039
119051
|
var init_changelog = __esm({
|
|
119040
119052
|
"src/utils/changelog.ts"() {
|
|
119041
119053
|
"use strict";
|
|
@@ -119073,6 +119085,38 @@ var init_changelog = __esm({
|
|
|
119073
119085
|
if (SUBSECTION_HEADER_LEVEL <= VERSION_HEADER_LEVEL) {
|
|
119074
119086
|
throw new Error("Subsection headers should nest under version headers!");
|
|
119075
119087
|
}
|
|
119088
|
+
SCOPE_WORD_CASING = /* @__PURE__ */ new Map([
|
|
119089
|
+
["ai", "AI"],
|
|
119090
|
+
["api", "API"],
|
|
119091
|
+
["aws", "AWS"],
|
|
119092
|
+
["ci", "CI"],
|
|
119093
|
+
["cli", "CLI"],
|
|
119094
|
+
["css", "CSS"],
|
|
119095
|
+
["db", "DB"],
|
|
119096
|
+
["gcp", "GCP"],
|
|
119097
|
+
["github", "GitHub"],
|
|
119098
|
+
["gitlab", "GitLab"],
|
|
119099
|
+
["graphql", "GraphQL"],
|
|
119100
|
+
["html", "HTML"],
|
|
119101
|
+
["http", "HTTP"],
|
|
119102
|
+
["ios", "iOS"],
|
|
119103
|
+
["ipados", "iPadOS"],
|
|
119104
|
+
["javascript", "JavaScript"],
|
|
119105
|
+
["json", "JSON"],
|
|
119106
|
+
["macos", "macOS"],
|
|
119107
|
+
["mcp", "MCP"],
|
|
119108
|
+
["npm", "npm"],
|
|
119109
|
+
["oauth", "OAuth"],
|
|
119110
|
+
["sdk", "SDK"],
|
|
119111
|
+
["sql", "SQL"],
|
|
119112
|
+
["tvos", "tvOS"],
|
|
119113
|
+
["typescript", "TypeScript"],
|
|
119114
|
+
["ui", "UI"],
|
|
119115
|
+
["url", "URL"],
|
|
119116
|
+
["visionos", "visionOS"],
|
|
119117
|
+
["watchos", "watchOS"]
|
|
119118
|
+
]);
|
|
119119
|
+
GITHUB_ALERT_PATTERN = /^\[!(?:NOTE|TIP|IMPORTANT|WARNING|CAUTION)\][ \t]*(?:\n|$)/i;
|
|
119076
119120
|
DEFAULT_RELEASE_CONFIG = {
|
|
119077
119121
|
changelog: {
|
|
119078
119122
|
exclude: {
|
|
@@ -153973,7 +154017,22 @@ var init_gpg = __esm({
|
|
|
153973
154017
|
});
|
|
153974
154018
|
|
|
153975
154019
|
// src/targets/maven.ts
|
|
153976
|
-
|
|
154020
|
+
async function describeFailedResponse(prefix, response) {
|
|
154021
|
+
const message = `${prefix}: ${response.status}, ${response.statusText}`;
|
|
154022
|
+
let body = "";
|
|
154023
|
+
try {
|
|
154024
|
+
body = (await response.text()).trim();
|
|
154025
|
+
} catch {
|
|
154026
|
+
}
|
|
154027
|
+
if (!body) {
|
|
154028
|
+
return message;
|
|
154029
|
+
}
|
|
154030
|
+
if (body.length > MAX_ERROR_BODY_LENGTH) {
|
|
154031
|
+
body = `${body.slice(0, MAX_ERROR_BODY_LENGTH)}\u2026`;
|
|
154032
|
+
}
|
|
154033
|
+
return `${message}: ${body}`;
|
|
154034
|
+
}
|
|
154035
|
+
var import_path18, import_fs22, import_node_fetch4, POM_DEFAULT_FILENAME, POM_FILE_EXT, BOM_FILE_KEY_REGEXP, NEXUS_API_BASE_URL, CENTRAL_API_BASE_URL, NEXUS_RETRY_DELAY, SONATYPE_RETRY_DEADLINE, CENTRAL_RETRY_DELAY, MAX_ERROR_BODY_LENGTH, targetSecrets2, targetOptions, MavenTarget;
|
|
153977
154036
|
var init_maven = __esm({
|
|
153978
154037
|
"src/targets/maven.ts"() {
|
|
153979
154038
|
"use strict";
|
|
@@ -153997,6 +154056,7 @@ var init_maven = __esm({
|
|
|
153997
154056
|
NEXUS_RETRY_DELAY = 10 * 1e3;
|
|
153998
154057
|
SONATYPE_RETRY_DEADLINE = 120 * 60 * 1e3;
|
|
153999
154058
|
CENTRAL_RETRY_DELAY = 60 * 1e3;
|
|
154059
|
+
MAX_ERROR_BODY_LENGTH = 1e3;
|
|
154000
154060
|
targetSecrets2 = [
|
|
154001
154061
|
"GPG_PASSPHRASE",
|
|
154002
154062
|
"OSSRH_USERNAME",
|
|
@@ -154524,7 +154584,7 @@ Error:
|
|
|
154524
154584
|
);
|
|
154525
154585
|
if (!response.ok) {
|
|
154526
154586
|
throw new Error(
|
|
154527
|
-
|
|
154587
|
+
await describeFailedResponse("Unable to fetch repositories", response)
|
|
154528
154588
|
);
|
|
154529
154589
|
}
|
|
154530
154590
|
const body = await response.json();
|
|
@@ -154566,7 +154626,10 @@ Error:
|
|
|
154566
154626
|
);
|
|
154567
154627
|
if (!response.ok) {
|
|
154568
154628
|
throw new Error(
|
|
154569
|
-
|
|
154629
|
+
await describeFailedResponse(
|
|
154630
|
+
`Unable to close repository ${repositoryId}`,
|
|
154631
|
+
response
|
|
154632
|
+
)
|
|
154570
154633
|
);
|
|
154571
154634
|
}
|
|
154572
154635
|
const poolingStartTime = Date.now();
|
|
@@ -154603,7 +154666,10 @@ Error:
|
|
|
154603
154666
|
);
|
|
154604
154667
|
if (!response.ok) {
|
|
154605
154668
|
throw new Error(
|
|
154606
|
-
|
|
154669
|
+
await describeFailedResponse(
|
|
154670
|
+
`Unable to release repository ${repositoryId}`,
|
|
154671
|
+
response
|
|
154672
|
+
)
|
|
154607
154673
|
);
|
|
154608
154674
|
}
|
|
154609
154675
|
const poolingStartTime = Date.now();
|
|
@@ -154644,10 +154710,35 @@ Error:
|
|
|
154644
154710
|
});
|
|
154645
154711
|
|
|
154646
154712
|
// src/targets/mcpRegistry.ts
|
|
154647
|
-
function
|
|
154713
|
+
function normalizeServer(server) {
|
|
154648
154714
|
const copy = { ...server };
|
|
154649
154715
|
delete copy.$schema;
|
|
154650
|
-
return copy;
|
|
154716
|
+
return withoutEmptyValues(copy);
|
|
154717
|
+
}
|
|
154718
|
+
function withoutEmptyValues(value) {
|
|
154719
|
+
if (Array.isArray(value)) {
|
|
154720
|
+
return value.map(withoutEmptyValues);
|
|
154721
|
+
}
|
|
154722
|
+
if (value === null || typeof value !== "object") {
|
|
154723
|
+
return value;
|
|
154724
|
+
}
|
|
154725
|
+
const result = {};
|
|
154726
|
+
for (const [key, item] of Object.entries(value)) {
|
|
154727
|
+
const normalized = withoutEmptyValues(item);
|
|
154728
|
+
if (!isEmptyValue(normalized)) {
|
|
154729
|
+
result[key] = normalized;
|
|
154730
|
+
}
|
|
154731
|
+
}
|
|
154732
|
+
return result;
|
|
154733
|
+
}
|
|
154734
|
+
function isEmptyValue(value) {
|
|
154735
|
+
if (value === void 0 || value === null || value === false) {
|
|
154736
|
+
return true;
|
|
154737
|
+
}
|
|
154738
|
+
if (typeof value === "string" || Array.isArray(value)) {
|
|
154739
|
+
return value.length === 0;
|
|
154740
|
+
}
|
|
154741
|
+
return typeof value === "object" && Object.keys(value).length === 0;
|
|
154651
154742
|
}
|
|
154652
154743
|
function errorMessage(err) {
|
|
154653
154744
|
return err instanceof Error ? err.message : String(err);
|
|
@@ -154839,13 +154930,14 @@ var init_mcpRegistry = __esm({
|
|
|
154839
154930
|
return listing;
|
|
154840
154931
|
}
|
|
154841
154932
|
/**
|
|
154842
|
-
* Checks that the listing equals the manifest (ignoring `$schema`
|
|
154843
|
-
* active. Throws `mismatchMessage`
|
|
154933
|
+
* Checks that the listing equals the manifest (ignoring `$schema` and the
|
|
154934
|
+
* empty values the registry drops) and is active. Throws `mismatchMessage`
|
|
154935
|
+
* when the content differs.
|
|
154844
154936
|
*/
|
|
154845
154937
|
verifyListing(listing, manifest, mismatchMessage) {
|
|
154846
154938
|
if (!(0, import_util23.isDeepStrictEqual)(
|
|
154847
|
-
|
|
154848
|
-
|
|
154939
|
+
normalizeServer(listing.server ?? {}),
|
|
154940
|
+
normalizeServer(manifest)
|
|
154849
154941
|
)) {
|
|
154850
154942
|
throw new Error(mismatchMessage);
|
|
154851
154943
|
}
|
|
@@ -192266,7 +192358,7 @@ var require_package7 = __commonJS({
|
|
|
192266
192358
|
"package.json"(exports2, module2) {
|
|
192267
192359
|
module2.exports = {
|
|
192268
192360
|
name: "@sentry/craft",
|
|
192269
|
-
version: "3.
|
|
192361
|
+
version: "3.14.0",
|
|
192270
192362
|
description: "The universal sentry workflow CLI",
|
|
192271
192363
|
main: "dist/craft",
|
|
192272
192364
|
repository: "https://github.com/getsentry/craft",
|
|
@@ -192477,7 +192569,7 @@ function getPackage() {
|
|
|
192477
192569
|
}
|
|
192478
192570
|
function getPackageVersion3() {
|
|
192479
192571
|
const { version: version2 } = getPackage();
|
|
192480
|
-
const buildInfo = "
|
|
192572
|
+
const buildInfo = "229e7c8d3d42775e21015b494fa070b6f2cad7e0";
|
|
192481
192573
|
return buildInfo ? `${version2} (${buildInfo})` : version2;
|
|
192482
192574
|
}
|
|
192483
192575
|
function semVerToString(s8) {
|