@sentry/craft 2.18.3 → 2.19.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 +78 -39
- package/package.json +1 -1
package/dist/craft
CHANGED
|
@@ -109788,15 +109788,15 @@ var require_mustache = __commonJS({
|
|
|
109788
109788
|
this.pos += match3.length;
|
|
109789
109789
|
return match3;
|
|
109790
109790
|
};
|
|
109791
|
-
function
|
|
109791
|
+
function Context2(view, parentContext) {
|
|
109792
109792
|
this.view = view;
|
|
109793
109793
|
this.cache = { ".": this.view };
|
|
109794
109794
|
this.parent = parentContext;
|
|
109795
109795
|
}
|
|
109796
|
-
|
|
109797
|
-
return new
|
|
109796
|
+
Context2.prototype.push = function push(view) {
|
|
109797
|
+
return new Context2(view, this);
|
|
109798
109798
|
};
|
|
109799
|
-
|
|
109799
|
+
Context2.prototype.lookup = function lookup(name) {
|
|
109800
109800
|
var cache5 = this.cache;
|
|
109801
109801
|
var value;
|
|
109802
109802
|
if (cache5.hasOwnProperty(name)) {
|
|
@@ -109845,7 +109845,7 @@ var require_mustache = __commonJS({
|
|
|
109845
109845
|
};
|
|
109846
109846
|
Writer.prototype.render = function render2(template, view, partials, tags) {
|
|
109847
109847
|
var tokens = this.parse(template, tags);
|
|
109848
|
-
var context2 = view instanceof
|
|
109848
|
+
var context2 = view instanceof Context2 ? view : new Context2(view);
|
|
109849
109849
|
return this.renderTokens(tokens, context2, partials, template, tags);
|
|
109850
109850
|
};
|
|
109851
109851
|
Writer.prototype.renderTokens = function renderTokens(tokens, context2, partials, originalTemplate, tags) {
|
|
@@ -109941,7 +109941,7 @@ var require_mustache = __commonJS({
|
|
|
109941
109941
|
};
|
|
109942
109942
|
mustache2.escape = escapeHtml;
|
|
109943
109943
|
mustache2.Scanner = Scanner;
|
|
109944
|
-
mustache2.Context =
|
|
109944
|
+
mustache2.Context = Context2;
|
|
109945
109945
|
mustache2.Writer = Writer;
|
|
109946
109946
|
return mustache2;
|
|
109947
109947
|
});
|
|
@@ -109976,7 +109976,28 @@ function sanitizeObject(obj) {
|
|
|
109976
109976
|
return result;
|
|
109977
109977
|
}
|
|
109978
109978
|
function renderTemplateSafe(template, context2) {
|
|
109979
|
-
|
|
109979
|
+
const sanitizedContext = sanitizeObject(context2);
|
|
109980
|
+
const unknownVars = [];
|
|
109981
|
+
mustache.Context.prototype.lookup = function(name) {
|
|
109982
|
+
const value = originalLookup.call(this, name);
|
|
109983
|
+
if (value === void 0) {
|
|
109984
|
+
unknownVars.push(name);
|
|
109985
|
+
}
|
|
109986
|
+
return value;
|
|
109987
|
+
};
|
|
109988
|
+
try {
|
|
109989
|
+
const result = mustache.render(template, sanitizedContext);
|
|
109990
|
+
if (unknownVars.length > 0) {
|
|
109991
|
+
const availableVars = Object.keys(sanitizedContext).join(", ");
|
|
109992
|
+
const unknownList = [...new Set(unknownVars)].join(", ");
|
|
109993
|
+
throw new ConfigurationError(
|
|
109994
|
+
`Unknown template variable(s): ${unknownList}. Available variables: ${availableVars}`
|
|
109995
|
+
);
|
|
109996
|
+
}
|
|
109997
|
+
return result;
|
|
109998
|
+
} finally {
|
|
109999
|
+
mustache.Context.prototype.lookup = originalLookup;
|
|
110000
|
+
}
|
|
109980
110001
|
}
|
|
109981
110002
|
function formatSize(size) {
|
|
109982
110003
|
if (size < 1024) {
|
|
@@ -109998,12 +110019,14 @@ function formatJson(obj) {
|
|
|
109998
110019
|
return result;
|
|
109999
110020
|
}
|
|
110000
110021
|
}
|
|
110001
|
-
var mustache, util5;
|
|
110022
|
+
var mustache, util5, originalLookup;
|
|
110002
110023
|
var init_strings = __esm({
|
|
110003
110024
|
"src/utils/strings.ts"() {
|
|
110004
110025
|
init_import_meta_url();
|
|
110005
110026
|
mustache = __toESM(require_mustache());
|
|
110006
110027
|
util5 = __toESM(require("util"));
|
|
110028
|
+
init_errors2();
|
|
110029
|
+
originalLookup = mustache.Context.prototype.lookup;
|
|
110007
110030
|
}
|
|
110008
110031
|
});
|
|
110009
110032
|
|
|
@@ -117753,13 +117776,13 @@ var init_docker = __esm({
|
|
|
117753
117776
|
}
|
|
117754
117777
|
if (!username || !password) {
|
|
117755
117778
|
if (registry === "ghcr.io") {
|
|
117756
|
-
username = username
|
|
117757
|
-
password = password
|
|
117779
|
+
username = username || process.env.GITHUB_ACTOR || "x-access-token";
|
|
117780
|
+
password = password || process.env.GITHUB_TOKEN || process.env.GITHUB_API_TOKEN;
|
|
117758
117781
|
}
|
|
117759
117782
|
}
|
|
117760
117783
|
if (useDefaultFallback) {
|
|
117761
|
-
username = username
|
|
117762
|
-
password = password
|
|
117784
|
+
username = username || process.env.DOCKER_USERNAME;
|
|
117785
|
+
password = password || process.env.DOCKER_PASSWORD;
|
|
117763
117786
|
}
|
|
117764
117787
|
}
|
|
117765
117788
|
if (!username || !password) {
|
|
@@ -117910,7 +117933,8 @@ Please use ${registryHint}DOCKER_USERNAME and DOCKER_PASSWORD environment variab
|
|
|
117910
117933
|
}
|
|
117911
117934
|
if (source.credentials) {
|
|
117912
117935
|
await this.loginToRegistry(source.credentials);
|
|
117913
|
-
} else if (sourceRegistry && !source.skipLogin && !gcrConfiguredRegistries.has(sourceRegistry)
|
|
117936
|
+
} else if (sourceRegistry && !source.skipLogin && !gcrConfiguredRegistries.has(sourceRegistry) && // Don't warn if source and target share the same registry - target login will cover it
|
|
117937
|
+
sourceRegistry !== targetRegistry) {
|
|
117914
117938
|
this.logger.debug(`No credentials for source registry ${sourceRegistry}, assuming public`);
|
|
117915
117939
|
}
|
|
117916
117940
|
if (target.credentials) {
|
|
@@ -117934,11 +117958,13 @@ Please use ${registryHint}DOCKER_USERNAME and DOCKER_PASSWORD environment variab
|
|
|
117934
117958
|
async copy(sourceRevision, version2) {
|
|
117935
117959
|
const { source, target } = this.dockerConfig;
|
|
117936
117960
|
const sourceImage = renderTemplateSafe(source.format, {
|
|
117961
|
+
image: source.image,
|
|
117937
117962
|
source: source.image,
|
|
117938
117963
|
target: target.image,
|
|
117939
117964
|
revision: sourceRevision
|
|
117940
117965
|
});
|
|
117941
117966
|
const targetImage = renderTemplateSafe(target.format, {
|
|
117967
|
+
image: target.image,
|
|
117942
117968
|
source: source.image,
|
|
117943
117969
|
target: target.image,
|
|
117944
117970
|
version: version2
|
|
@@ -120047,7 +120073,7 @@ function stripTitle(title, pattern, preserveScope) {
|
|
|
120047
120073
|
}
|
|
120048
120074
|
return capitalized;
|
|
120049
120075
|
}
|
|
120050
|
-
function formatChangelogEntry(entry, disableMentions = false) {
|
|
120076
|
+
function formatChangelogEntry(entry, disableMentions = false, disablePRLinks = false) {
|
|
120051
120077
|
let title = entry.title;
|
|
120052
120078
|
if (entry.prNumber) {
|
|
120053
120079
|
const prSuffix = `(#${entry.prNumber})`;
|
|
@@ -120059,11 +120085,11 @@ function formatChangelogEntry(entry, disableMentions = false) {
|
|
|
120059
120085
|
let text = `- ${title}`;
|
|
120060
120086
|
const authorRef = entry.author ? disableMentions ? `**${entry.author}**` : `@${entry.author}` : null;
|
|
120061
120087
|
if (entry.prNumber) {
|
|
120062
|
-
const
|
|
120088
|
+
const prRef = disablePRLinks ? `\`#${entry.prNumber}\`` : `[#${entry.prNumber}](${entry.repoUrl}/pull/${entry.prNumber})`;
|
|
120063
120089
|
if (authorRef) {
|
|
120064
|
-
text += ` by ${authorRef} in
|
|
120090
|
+
text += ` by ${authorRef} in ${prRef}`;
|
|
120065
120091
|
} else {
|
|
120066
|
-
text += ` in
|
|
120092
|
+
text += ` in ${prRef}`;
|
|
120067
120093
|
}
|
|
120068
120094
|
} else {
|
|
120069
120095
|
const shortHash = entry.hash.slice(0, SHORT_SHA_LENGTH);
|
|
@@ -120145,7 +120171,7 @@ async function generateChangelogWithHighlight(git, rev, currentPRNumber) {
|
|
|
120145
120171
|
const filteredCommits = processReverts(allCommits);
|
|
120146
120172
|
const currentPRSurvived = filteredCommits.some((c4) => c4.highlight);
|
|
120147
120173
|
const { data: rawData, stats } = categorizeCommits(filteredCommits);
|
|
120148
|
-
const changelog = await serializeChangelog(rawData, MAX_LEFTOVERS, true);
|
|
120174
|
+
const changelog = await serializeChangelog(rawData, MAX_LEFTOVERS, true, true);
|
|
120149
120175
|
const bumpType = currentPRSurvived ? prBumpType : stats.bumpType;
|
|
120150
120176
|
return {
|
|
120151
120177
|
changelog,
|
|
@@ -120288,7 +120314,7 @@ async function generateRawChangelog(git, rev, until) {
|
|
|
120288
120314
|
const filteredCommits = processReverts(rawCommits);
|
|
120289
120315
|
return categorizeCommits(filteredCommits);
|
|
120290
120316
|
}
|
|
120291
|
-
async function serializeChangelog(rawData, maxLeftovers, disableMentions = false) {
|
|
120317
|
+
async function serializeChangelog(rawData, maxLeftovers, disableMentions = false, disablePRLinks = false) {
|
|
120292
120318
|
const { categories, leftovers, releaseConfig } = rawData;
|
|
120293
120319
|
const changelogSections = [];
|
|
120294
120320
|
const { repo, owner } = await getGlobalGitHubConfig();
|
|
@@ -120345,7 +120371,8 @@ async function serializeChangelog(rawData, maxLeftovers, disableMentions = false
|
|
|
120345
120371
|
repoUrl,
|
|
120346
120372
|
highlight: pr.highlight
|
|
120347
120373
|
},
|
|
120348
|
-
disableMentions
|
|
120374
|
+
disableMentions,
|
|
120375
|
+
disablePRLinks
|
|
120349
120376
|
)
|
|
120350
120377
|
);
|
|
120351
120378
|
if (scopeHeader) {
|
|
@@ -120393,7 +120420,8 @@ async function serializeChangelog(rawData, maxLeftovers, disableMentions = false
|
|
|
120393
120420
|
body: pr.body || void 0,
|
|
120394
120421
|
highlight: pr.highlight
|
|
120395
120422
|
},
|
|
120396
|
-
disableMentions
|
|
120423
|
+
disableMentions,
|
|
120424
|
+
disablePRLinks
|
|
120397
120425
|
)
|
|
120398
120426
|
);
|
|
120399
120427
|
}
|
|
@@ -158590,6 +158618,12 @@ var init_awsLambdaLayer = __esm({
|
|
|
158590
158618
|
*/
|
|
158591
158619
|
async publish(version2, revision) {
|
|
158592
158620
|
this.checkProjectConfig();
|
|
158621
|
+
if (isPreviewRelease(version2) && !this.awsLambdaConfig.linkPrereleases) {
|
|
158622
|
+
this.logger.info(
|
|
158623
|
+
`Skipping AWS Lambda layer publication for pre-release version ${version2}`
|
|
158624
|
+
);
|
|
158625
|
+
return void 0;
|
|
158626
|
+
}
|
|
158593
158627
|
this.logger.debug("Fetching artifact list...");
|
|
158594
158628
|
const packageFiles = await this.getArtifactsForRevision(revision, {
|
|
158595
158629
|
includeNames: this.config.includeNames === void 0 ? void 0 : new RegExp(this.config.includeNames)
|
|
@@ -158615,19 +158649,19 @@ var init_awsLambdaLayer = __esm({
|
|
|
158615
158649
|
this.logger.info(
|
|
158616
158650
|
`Cloning ${remote.getRemoteString()} to ${directory}...`
|
|
158617
158651
|
);
|
|
158618
|
-
const git = await cloneRepo(
|
|
158619
|
-
|
|
158620
|
-
|
|
158621
|
-
await this.publishRuntimes(
|
|
158622
|
-
version2,
|
|
158623
|
-
directory,
|
|
158624
|
-
awsRegions,
|
|
158625
|
-
artifactBuffer
|
|
158626
|
-
);
|
|
158627
|
-
this.logger.debug("Finished publishing runtimes.");
|
|
158628
|
-
},
|
|
158629
|
-
"publishRuntimes(...)"
|
|
158652
|
+
const git = await cloneRepo(
|
|
158653
|
+
remote.getRemoteStringWithAuth(),
|
|
158654
|
+
directory
|
|
158630
158655
|
);
|
|
158656
|
+
await safeExec(async () => {
|
|
158657
|
+
await this.publishRuntimes(
|
|
158658
|
+
version2,
|
|
158659
|
+
directory,
|
|
158660
|
+
awsRegions,
|
|
158661
|
+
artifactBuffer
|
|
158662
|
+
);
|
|
158663
|
+
this.logger.debug("Finished publishing runtimes.");
|
|
158664
|
+
}, "publishRuntimes(...)");
|
|
158631
158665
|
await git.add(["."]);
|
|
158632
158666
|
await git.checkout("master");
|
|
158633
158667
|
const runtimeNames = this.config.compatibleRuntimes.map(
|
|
@@ -161108,7 +161142,7 @@ var require_package6 = __commonJS({
|
|
|
161108
161142
|
"package.json"(exports2, module2) {
|
|
161109
161143
|
module2.exports = {
|
|
161110
161144
|
name: "@sentry/craft",
|
|
161111
|
-
version: "2.
|
|
161145
|
+
version: "2.19.0",
|
|
161112
161146
|
description: "The universal sentry workflow CLI",
|
|
161113
161147
|
main: "dist/craft",
|
|
161114
161148
|
repository: "https://github.com/getsentry/craft",
|
|
@@ -161265,7 +161299,7 @@ function getPackage() {
|
|
|
161265
161299
|
}
|
|
161266
161300
|
function getPackageVersion() {
|
|
161267
161301
|
const { version: version2 } = getPackage();
|
|
161268
|
-
const buildInfo = "
|
|
161302
|
+
const buildInfo = "c6e2f04939b6ee67030588afbb5af76b127d8203";
|
|
161269
161303
|
return buildInfo ? `${version2} (${buildInfo})` : version2;
|
|
161270
161304
|
}
|
|
161271
161305
|
function semVerToString(s4) {
|
|
@@ -169457,7 +169491,7 @@ var handler2 = async (args) => {
|
|
|
169457
169491
|
};
|
|
169458
169492
|
|
|
169459
169493
|
// src/commands/prepare.ts
|
|
169460
|
-
var command3 = ["prepare NEW-VERSION"];
|
|
169494
|
+
var command3 = ["prepare [NEW-VERSION]"];
|
|
169461
169495
|
var aliases2 = ["p", "prerelease", "prepublish", "prepare", "release"];
|
|
169462
169496
|
var description2 = "\u{1F6A2} Prepare a new release branch";
|
|
169463
169497
|
var DEFAULT_BUMP_VERSION_PATH = (0, import_path18.join)("scripts", "bump-version.sh");
|
|
@@ -169650,9 +169684,14 @@ async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "
|
|
|
169650
169684
|
throw new ConfigurationError(`Invalid changelog path: "${changelogPath}"`);
|
|
169651
169685
|
}
|
|
169652
169686
|
if (!(0, import_fs21.existsSync)(relativePath)) {
|
|
169653
|
-
|
|
169654
|
-
`
|
|
169655
|
-
|
|
169687
|
+
if (changelogPolicy === "auto" /* Auto */) {
|
|
169688
|
+
logger.info(`Creating changelog file: ${relativePath}`);
|
|
169689
|
+
await safeFs.writeFile(relativePath, "# Changelog\n");
|
|
169690
|
+
} else {
|
|
169691
|
+
throw new ConfigurationError(
|
|
169692
|
+
`Changelog does not exist: "${changelogPath}"`
|
|
169693
|
+
);
|
|
169694
|
+
}
|
|
169656
169695
|
}
|
|
169657
169696
|
let changelogString = (await import_fs21.promises.readFile(relativePath)).toString();
|
|
169658
169697
|
let changeset = findChangeset(
|