@sentry/craft 2.25.1 → 2.25.3
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 +105 -15
- package/package.json +3 -2
package/dist/craft
CHANGED
|
@@ -28167,7 +28167,7 @@ var init_esm6 = __esm({
|
|
|
28167
28167
|
}
|
|
28168
28168
|
});
|
|
28169
28169
|
|
|
28170
|
-
// node_modules/.pnpm/brace-expansion@5.0.
|
|
28170
|
+
// node_modules/.pnpm/brace-expansion@5.0.5/node_modules/brace-expansion/dist/esm/index.js
|
|
28171
28171
|
function numeric(str2) {
|
|
28172
28172
|
return !isNaN(str2) ? parseInt(str2, 10) : str2.charCodeAt(0);
|
|
28173
28173
|
}
|
|
@@ -28261,7 +28261,7 @@ function expand_(str2, max, isTop) {
|
|
|
28261
28261
|
const x5 = numeric(n4[0]);
|
|
28262
28262
|
const y4 = numeric(n4[1]);
|
|
28263
28263
|
const width = Math.max(n4[0].length, n4[1].length);
|
|
28264
|
-
let incr = n4.length === 3 && n4[2] !== void 0 ? Math.abs(numeric(n4[2])) : 1;
|
|
28264
|
+
let incr = n4.length === 3 && n4[2] !== void 0 ? Math.max(Math.abs(numeric(n4[2])), 1) : 1;
|
|
28265
28265
|
let test = lte;
|
|
28266
28266
|
const reverse = y4 < x5;
|
|
28267
28267
|
if (reverse) {
|
|
@@ -28312,7 +28312,7 @@ function expand_(str2, max, isTop) {
|
|
|
28312
28312
|
}
|
|
28313
28313
|
var escSlash, escOpen, escClose, escComma, escPeriod, escSlashPattern, escOpenPattern, escClosePattern, escCommaPattern, escPeriodPattern, slashPattern, openPattern, closePattern, commaPattern, periodPattern, EXPANSION_MAX;
|
|
28314
28314
|
var init_esm7 = __esm({
|
|
28315
|
-
"node_modules/.pnpm/brace-expansion@5.0.
|
|
28315
|
+
"node_modules/.pnpm/brace-expansion@5.0.5/node_modules/brace-expansion/dist/esm/index.js"() {
|
|
28316
28316
|
init_import_meta_url();
|
|
28317
28317
|
init_esm6();
|
|
28318
28318
|
escSlash = "\0SLASH" + Math.random() + "\0";
|
|
@@ -116574,6 +116574,14 @@ function parseTokensToEntries(tokens) {
|
|
|
116574
116574
|
prev.nestedContent = prev.nestedContent ? `${prev.nestedContent}
|
|
116575
116575
|
${codeBlock}` : codeBlock;
|
|
116576
116576
|
}
|
|
116577
|
+
} else if (token.type === "html") {
|
|
116578
|
+
const htmlContent = token.raw.trim();
|
|
116579
|
+
if (htmlContent && entries.length > 0) {
|
|
116580
|
+
const indented = htmlContent.split("\n").map((line) => ` ${line}`).join("\n");
|
|
116581
|
+
const prev = entries[entries.length - 1];
|
|
116582
|
+
prev.nestedContent = prev.nestedContent ? `${prev.nestedContent}
|
|
116583
|
+
${indented}` : indented;
|
|
116584
|
+
}
|
|
116577
116585
|
}
|
|
116578
116586
|
}
|
|
116579
116587
|
return entries.length > 0 ? entries : null;
|
|
@@ -159069,7 +159077,7 @@ var require_package6 = __commonJS({
|
|
|
159069
159077
|
"package.json"(exports2, module2) {
|
|
159070
159078
|
module2.exports = {
|
|
159071
159079
|
name: "@sentry/craft",
|
|
159072
|
-
version: "2.25.
|
|
159080
|
+
version: "2.25.3",
|
|
159073
159081
|
description: "The universal sentry workflow CLI",
|
|
159074
159082
|
main: "dist/craft",
|
|
159075
159083
|
repository: "https://github.com/getsentry/craft",
|
|
@@ -159176,7 +159184,8 @@ var require_package6 = __commonJS({
|
|
|
159176
159184
|
minimatch: "^10.2.1",
|
|
159177
159185
|
"ajv@<6.14.0": "^6.14.0",
|
|
159178
159186
|
rollup: "^4.59.0",
|
|
159179
|
-
flatted: "^3.4.2"
|
|
159187
|
+
flatted: "^3.4.2",
|
|
159188
|
+
"picomatch@<3": "^2.3.2"
|
|
159180
159189
|
}
|
|
159181
159190
|
}
|
|
159182
159191
|
};
|
|
@@ -159240,7 +159249,7 @@ function getPackage() {
|
|
|
159240
159249
|
}
|
|
159241
159250
|
function getPackageVersion() {
|
|
159242
159251
|
const { version: version2 } = getPackage();
|
|
159243
|
-
const buildInfo = "
|
|
159252
|
+
const buildInfo = "9a8e27a89529970cc0f241c6b77fdcbc32838c03";
|
|
159244
159253
|
return buildInfo ? `${version2} (${buildInfo})` : version2;
|
|
159245
159254
|
}
|
|
159246
159255
|
function semVerToString(s6) {
|
|
@@ -167304,6 +167313,8 @@ async function runAutomaticVersionBumps(targets, rootDir, newVersion) {
|
|
|
167304
167313
|
// src/commands/publish.ts
|
|
167305
167314
|
var publish_exports = {};
|
|
167306
167315
|
__export(publish_exports, {
|
|
167316
|
+
MergeConflictError: () => MergeConflictError,
|
|
167317
|
+
PushError: () => PushError,
|
|
167307
167318
|
aliases: () => aliases,
|
|
167308
167319
|
builder: () => builder,
|
|
167309
167320
|
command: () => command2,
|
|
@@ -167543,6 +167554,24 @@ async function checkRevisionStatus(statusProvider, revision, skipStatusCheckFlag
|
|
|
167543
167554
|
}
|
|
167544
167555
|
await statusProvider.waitForTheBuildToSucceed(revision);
|
|
167545
167556
|
}
|
|
167557
|
+
var MergeConflictError = class extends Error {
|
|
167558
|
+
constructor(message, conflictedFiles, diff) {
|
|
167559
|
+
const trueProto = new.target.prototype;
|
|
167560
|
+
super(message);
|
|
167561
|
+
this.conflictedFiles = conflictedFiles;
|
|
167562
|
+
this.diff = diff;
|
|
167563
|
+
this.__proto__ = trueProto;
|
|
167564
|
+
}
|
|
167565
|
+
__proto__;
|
|
167566
|
+
};
|
|
167567
|
+
var PushError = class extends Error {
|
|
167568
|
+
__proto__;
|
|
167569
|
+
constructor(message) {
|
|
167570
|
+
const trueProto = new.target.prototype;
|
|
167571
|
+
super(message);
|
|
167572
|
+
this.__proto__ = trueProto;
|
|
167573
|
+
}
|
|
167574
|
+
};
|
|
167546
167575
|
async function handleReleaseBranch(git, remoteName, branch, mergeTarget, keepBranch = false) {
|
|
167547
167576
|
if (!mergeTarget) {
|
|
167548
167577
|
mergeTarget = await getDefaultBranch(git, remoteName);
|
|
@@ -167575,15 +167604,40 @@ async function handleReleaseBranch(git, remoteName, branch, mergeTarget, keepBra
|
|
|
167575
167604
|
try {
|
|
167576
167605
|
await git.merge(["-s", "resolve", "--no-ff", "--no-edit", branch]);
|
|
167577
167606
|
} catch (resolveError) {
|
|
167607
|
+
let conflictedFiles = [];
|
|
167608
|
+
let conflictDiff = "";
|
|
167609
|
+
try {
|
|
167610
|
+
const status = await git.status();
|
|
167611
|
+
conflictedFiles = status.conflicted;
|
|
167612
|
+
} catch (_statusError) {
|
|
167613
|
+
logger.trace("git status failed while collecting conflict info");
|
|
167614
|
+
}
|
|
167615
|
+
if (conflictedFiles.length > 0) {
|
|
167616
|
+
try {
|
|
167617
|
+
conflictDiff = await git.diff(conflictedFiles);
|
|
167618
|
+
} catch (_diffError) {
|
|
167619
|
+
logger.trace("git diff failed while collecting conflict diff");
|
|
167620
|
+
}
|
|
167621
|
+
}
|
|
167578
167622
|
try {
|
|
167579
167623
|
await git.merge(["--abort"]);
|
|
167580
167624
|
} catch (_abortError) {
|
|
167581
167625
|
logger.trace("git merge --abort failed after resolve strategy");
|
|
167582
167626
|
}
|
|
167583
|
-
throw
|
|
167627
|
+
throw new MergeConflictError(
|
|
167628
|
+
resolveError instanceof Error ? resolveError.message : String(resolveError),
|
|
167629
|
+
conflictedFiles,
|
|
167630
|
+
conflictDiff
|
|
167631
|
+
);
|
|
167584
167632
|
}
|
|
167585
167633
|
}
|
|
167586
|
-
|
|
167634
|
+
try {
|
|
167635
|
+
await git.push(remoteName, mergeTarget);
|
|
167636
|
+
} catch (pushError) {
|
|
167637
|
+
throw new PushError(
|
|
167638
|
+
pushError instanceof Error ? pushError.message : String(pushError)
|
|
167639
|
+
);
|
|
167640
|
+
}
|
|
167587
167641
|
if (keepBranch) {
|
|
167588
167642
|
logger.info("Not deleting the release branch.");
|
|
167589
167643
|
} else {
|
|
@@ -167783,19 +167837,55 @@ Original error: ${err instanceof Error ? err.message : String(err)}`;
|
|
|
167783
167837
|
);
|
|
167784
167838
|
} catch (mergeError) {
|
|
167785
167839
|
captureException(mergeError);
|
|
167786
|
-
|
|
167787
|
-
|
|
167788
|
-
|
|
167789
|
-
|
|
167840
|
+
const lines = [
|
|
167841
|
+
`Failed to merge release branch "${branchName}" into the target branch.`
|
|
167842
|
+
];
|
|
167843
|
+
if (mergeError instanceof MergeConflictError) {
|
|
167844
|
+
lines.push(`Merge conflict \u2014 both ort and resolve strategies failed.`);
|
|
167845
|
+
if (mergeError.conflictedFiles.length > 0) {
|
|
167846
|
+
lines.push(``);
|
|
167847
|
+
lines.push(`Conflicting files:`);
|
|
167848
|
+
for (const file of mergeError.conflictedFiles) {
|
|
167849
|
+
lines.push(` - ${file}`);
|
|
167850
|
+
}
|
|
167851
|
+
}
|
|
167852
|
+
if (mergeError.diff) {
|
|
167853
|
+
lines.push(``, `Diff:`, mergeError.diff);
|
|
167854
|
+
}
|
|
167855
|
+
lines.push(
|
|
167856
|
+
``,
|
|
167790
167857
|
`All publish targets completed successfully \u2014 only the post-publish merge failed.`,
|
|
167791
167858
|
``,
|
|
167792
167859
|
`To resolve manually:`,
|
|
167793
167860
|
` 1. Merge the release branch into the target branch, resolving conflicts`,
|
|
167794
|
-
` 2. Delete the release branch: git push ${argv.remote} --delete ${branchName}
|
|
167861
|
+
` 2. Delete the release branch: git push ${argv.remote} --delete ${branchName}`
|
|
167862
|
+
);
|
|
167863
|
+
} else if (mergeError instanceof PushError) {
|
|
167864
|
+
lines.push(
|
|
167865
|
+
`The merge succeeded locally but pushing to the remote failed.`,
|
|
167866
|
+
`This is likely due to an expired authentication token (common for long-running publishes > 1 hour).`,
|
|
167867
|
+
``,
|
|
167868
|
+
`All publish targets completed successfully \u2014 only the post-publish push failed.`,
|
|
167795
167869
|
``,
|
|
167796
|
-
`
|
|
167797
|
-
|
|
167870
|
+
`To resolve manually:`,
|
|
167871
|
+
` 1. Re-authenticate (e.g., generate a fresh token)`,
|
|
167872
|
+
` 2. Merge the release branch into the target branch`,
|
|
167873
|
+
` 3. Delete the release branch: git push ${argv.remote} --delete ${branchName}`
|
|
167874
|
+
);
|
|
167875
|
+
} else {
|
|
167876
|
+
lines.push(
|
|
167877
|
+
`All publish targets completed successfully \u2014 only the post-publish merge failed.`,
|
|
167878
|
+
``,
|
|
167879
|
+
`To resolve manually:`,
|
|
167880
|
+
` 1. Merge the release branch into the target branch`,
|
|
167881
|
+
` 2. Delete the release branch: git push ${argv.remote} --delete ${branchName}`
|
|
167882
|
+
);
|
|
167883
|
+
}
|
|
167884
|
+
lines.push(
|
|
167885
|
+
``,
|
|
167886
|
+
`Error: ${mergeError instanceof Error ? mergeError.message : String(mergeError)}`
|
|
167798
167887
|
);
|
|
167888
|
+
logger.warn(lines.join("\n"));
|
|
167799
167889
|
}
|
|
167800
167890
|
safeFs.unlink(publishStateFile).catch(
|
|
167801
167891
|
(err) => logger.trace("Couldn't remove publish state file: ", err)
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@sentry/craft",
|
|
3
|
-
"version": "2.25.
|
|
3
|
+
"version": "2.25.3",
|
|
4
4
|
"description": "The universal sentry workflow CLI",
|
|
5
5
|
"main": "dist/craft",
|
|
6
6
|
"repository": "https://github.com/getsentry/craft",
|
|
@@ -107,7 +107,8 @@
|
|
|
107
107
|
"minimatch": "^10.2.1",
|
|
108
108
|
"ajv@<6.14.0": "^6.14.0",
|
|
109
109
|
"rollup": "^4.59.0",
|
|
110
|
-
"flatted": "^3.4.2"
|
|
110
|
+
"flatted": "^3.4.2",
|
|
111
|
+
"picomatch@<3": "^2.3.2"
|
|
111
112
|
}
|
|
112
113
|
}
|
|
113
114
|
}
|