@sentry/craft 3.9.0 → 3.10.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 +178 -83
- package/package.json +1 -1
package/dist/craft
CHANGED
|
@@ -1076,12 +1076,12 @@ function _parseInt(input) {
|
|
|
1076
1076
|
}
|
|
1077
1077
|
function parseSemver(input) {
|
|
1078
1078
|
const match3 = input.match(SEMVER_REGEXP) || [];
|
|
1079
|
-
const
|
|
1079
|
+
const major3 = _parseInt(match3[1]);
|
|
1080
1080
|
const minor2 = _parseInt(match3[2]);
|
|
1081
1081
|
const patch2 = _parseInt(match3[3]);
|
|
1082
1082
|
return {
|
|
1083
1083
|
buildmetadata: match3[5],
|
|
1084
|
-
major: isNaN(
|
|
1084
|
+
major: isNaN(major3) ? void 0 : major3,
|
|
1085
1085
|
minor: isNaN(minor2) ? void 0 : minor2,
|
|
1086
1086
|
patch: isNaN(patch2) ? void 0 : patch2,
|
|
1087
1087
|
prerelease: match3[4]
|
|
@@ -36311,8 +36311,8 @@ function hasStableSyncModuleHooks(isDeno3) {
|
|
|
36311
36311
|
if (isDeno3) {
|
|
36312
36312
|
return true;
|
|
36313
36313
|
}
|
|
36314
|
-
const { major:
|
|
36315
|
-
return
|
|
36314
|
+
const { major: major3 = 0, minor: minor2 = 0 } = parseSemver(process.versions.node ?? "0.0.0");
|
|
36315
|
+
return major3 > 25 || major3 === 25 && minor2 >= 1 || major3 === 24 && minor2 >= 13;
|
|
36316
36316
|
}
|
|
36317
36317
|
function getPackageType(dir) {
|
|
36318
36318
|
if (packageTypeByDir.has(dir)) {
|
|
@@ -46332,9 +46332,9 @@ function requireLoader() {
|
|
|
46332
46332
|
if (match3 === null) {
|
|
46333
46333
|
throwError(state2, "ill-formed argument of the YAML directive");
|
|
46334
46334
|
}
|
|
46335
|
-
const
|
|
46335
|
+
const major3 = parseInt(match3[1], 10);
|
|
46336
46336
|
const minor2 = parseInt(match3[2], 10);
|
|
46337
|
-
if (
|
|
46337
|
+
if (major3 !== 1) {
|
|
46338
46338
|
throwError(state2, "unacceptable YAML version of the document");
|
|
46339
46339
|
}
|
|
46340
46340
|
state2.version = args[0];
|
|
@@ -119467,20 +119467,31 @@ var init_gem = __esm({
|
|
|
119467
119467
|
});
|
|
119468
119468
|
|
|
119469
119469
|
// src/targets/ghPages.ts
|
|
119470
|
-
|
|
119470
|
+
function describePagesBuild(build) {
|
|
119471
|
+
if (!build) {
|
|
119472
|
+
return "timed out";
|
|
119473
|
+
}
|
|
119474
|
+
return build.error.message || build.status;
|
|
119475
|
+
}
|
|
119476
|
+
var fs12, DEFAULT_DEPLOY_ARCHIVE_REGEX2, DEFAULT_DEPLOY_BRANCH, PAGES_BUILD_POLL_INTERVAL_MS, PAGES_BUILD_MAX_POLLS, PAGES_MAX_REBUILDS, GhPagesTarget;
|
|
119471
119477
|
var init_ghPages = __esm({
|
|
119472
119478
|
"src/targets/ghPages.ts"() {
|
|
119473
119479
|
"use strict";
|
|
119474
119480
|
init_import_meta_url();
|
|
119475
119481
|
fs12 = __toESM(require("fs"));
|
|
119482
|
+
init_async();
|
|
119476
119483
|
init_errors2();
|
|
119477
119484
|
init_files();
|
|
119478
119485
|
init_githubApi();
|
|
119479
119486
|
init_git();
|
|
119487
|
+
init_helpers();
|
|
119480
119488
|
init_system();
|
|
119481
119489
|
init_base5();
|
|
119482
119490
|
DEFAULT_DEPLOY_ARCHIVE_REGEX2 = /^(?:.+-)?gh-pages\.zip$/;
|
|
119483
119491
|
DEFAULT_DEPLOY_BRANCH = "gh-pages";
|
|
119492
|
+
PAGES_BUILD_POLL_INTERVAL_MS = 10 * 1e3;
|
|
119493
|
+
PAGES_BUILD_MAX_POLLS = 90;
|
|
119494
|
+
PAGES_MAX_REBUILDS = 2;
|
|
119484
119495
|
GhPagesTarget = class extends BaseTarget {
|
|
119485
119496
|
/** Target name */
|
|
119486
119497
|
name = "gh-pages";
|
|
@@ -119550,6 +119561,7 @@ var init_ghPages = __esm({
|
|
|
119550
119561
|
* @param branch Branch to push
|
|
119551
119562
|
* @param archivePath Path to the archive
|
|
119552
119563
|
* @param version Version to deploy
|
|
119564
|
+
* @returns SHA of the pushed commit
|
|
119553
119565
|
*/
|
|
119554
119566
|
async commitArchiveToBranch(directory, remote, branch, archivePath, version2) {
|
|
119555
119567
|
this.logger.info(
|
|
@@ -119581,6 +119593,78 @@ var init_ghPages = __esm({
|
|
|
119581
119593
|
await git.commit(`craft(gh-pages): update, version "${version2}"`);
|
|
119582
119594
|
this.logger.info(`Pushing branch "${branch}"...`);
|
|
119583
119595
|
await git.push("origin", branch, ["--set-upstream"]);
|
|
119596
|
+
return (await git.revparse(["HEAD"])).trim();
|
|
119597
|
+
}
|
|
119598
|
+
/**
|
|
119599
|
+
* Waits until GitHub Pages builds the pushed commit, and requests a
|
|
119600
|
+
* rebuild when the build fails.
|
|
119601
|
+
*
|
|
119602
|
+
* A push to the branch only starts the build. GitHub can fail the build
|
|
119603
|
+
* later, for example when its deploy job times out (getsentry/craft#960).
|
|
119604
|
+
* Skips the wait when the token cannot read Pages, or when Pages does not
|
|
119605
|
+
* build from the configured branch.
|
|
119606
|
+
*
|
|
119607
|
+
* @param sha SHA of the pushed commit
|
|
119608
|
+
*/
|
|
119609
|
+
async waitForPagesBuild(sha) {
|
|
119610
|
+
const { githubOwner: owner, githubRepo: repo, branch } = this.ghPagesConfig;
|
|
119611
|
+
let pages;
|
|
119612
|
+
try {
|
|
119613
|
+
pages = (await this.github.repos.getPages({ owner, repo })).data;
|
|
119614
|
+
} catch (e5) {
|
|
119615
|
+
if (e5.status === 403 || e5.status === 404) {
|
|
119616
|
+
this.logger.warn(
|
|
119617
|
+
`Cannot read GitHub Pages settings of ${owner}/${repo} (HTTP ${e5.status}), not waiting for the Pages build.`
|
|
119618
|
+
);
|
|
119619
|
+
return;
|
|
119620
|
+
}
|
|
119621
|
+
throw e5;
|
|
119622
|
+
}
|
|
119623
|
+
if (pages.build_type !== "legacy" || pages.source?.branch !== branch) {
|
|
119624
|
+
this.logger.info(
|
|
119625
|
+
`GitHub Pages of ${owner}/${repo} does not build from branch "${branch}", not waiting for the Pages build.`
|
|
119626
|
+
);
|
|
119627
|
+
return;
|
|
119628
|
+
}
|
|
119629
|
+
let failedBuild;
|
|
119630
|
+
for (let attempt = 0; attempt <= PAGES_MAX_REBUILDS; attempt++) {
|
|
119631
|
+
if (attempt > 0) {
|
|
119632
|
+
this.logger.warn(
|
|
119633
|
+
`GitHub Pages build failed (${describePagesBuild(failedBuild)}), requesting rebuild ${attempt}/${PAGES_MAX_REBUILDS}...`
|
|
119634
|
+
);
|
|
119635
|
+
await this.github.repos.requestPagesBuild({ owner, repo });
|
|
119636
|
+
}
|
|
119637
|
+
const build = await this.pollPagesBuild(sha, failedBuild?.url);
|
|
119638
|
+
if (build?.status === "built") {
|
|
119639
|
+
this.logger.info(`GitHub Pages build for ${sha} is complete.`);
|
|
119640
|
+
return;
|
|
119641
|
+
}
|
|
119642
|
+
failedBuild = build ?? failedBuild;
|
|
119643
|
+
}
|
|
119644
|
+
reportError(
|
|
119645
|
+
`GitHub Pages build for ${sha} failed after ${PAGES_MAX_REBUILDS} rebuilds (${describePagesBuild(failedBuild)}). See https://github.com/${owner}/${repo}/deployments/github-pages`
|
|
119646
|
+
);
|
|
119647
|
+
}
|
|
119648
|
+
/**
|
|
119649
|
+
* Reads the latest GitHub Pages build until the build for `sha` finishes
|
|
119650
|
+
*
|
|
119651
|
+
* @param sha SHA of the pushed commit
|
|
119652
|
+
* @param ignoreUrl URL of an earlier failed build of the same commit
|
|
119653
|
+
* @returns The finished build, or undefined when the wait timed out
|
|
119654
|
+
*/
|
|
119655
|
+
async pollPagesBuild(sha, ignoreUrl) {
|
|
119656
|
+
const { githubOwner: owner, githubRepo: repo } = this.ghPagesConfig;
|
|
119657
|
+
for (let poll = 0; poll < PAGES_BUILD_MAX_POLLS; poll++) {
|
|
119658
|
+
await sleep(PAGES_BUILD_POLL_INTERVAL_MS);
|
|
119659
|
+
const build = (await this.github.repos.getLatestPagesBuild({ owner, repo })).data;
|
|
119660
|
+
if (build.commit === sha && build.url !== ignoreUrl && (build.status === "built" || build.status === "errored")) {
|
|
119661
|
+
return build;
|
|
119662
|
+
}
|
|
119663
|
+
this.logger.debug(
|
|
119664
|
+
`Latest GitHub Pages build: ${build.status} for ${build.commit}`
|
|
119665
|
+
);
|
|
119666
|
+
}
|
|
119667
|
+
return void 0;
|
|
119584
119668
|
}
|
|
119585
119669
|
/**
|
|
119586
119670
|
* Pushes an archive with static HTML web assets to the configured branch
|
|
@@ -119611,7 +119695,7 @@ Details: ${JSON.stringify(
|
|
|
119611
119695
|
githubRepo,
|
|
119612
119696
|
getGitHubApiToken()
|
|
119613
119697
|
);
|
|
119614
|
-
await withTempDir(
|
|
119698
|
+
const sha = await withTempDir(
|
|
119615
119699
|
async (directory) => this.commitArchiveToBranch(
|
|
119616
119700
|
directory,
|
|
119617
119701
|
remote,
|
|
@@ -119622,6 +119706,11 @@ Details: ${JSON.stringify(
|
|
|
119622
119706
|
true,
|
|
119623
119707
|
"craft-gh-pages-"
|
|
119624
119708
|
);
|
|
119709
|
+
if (isDryRun()) {
|
|
119710
|
+
this.logger.info("[dry-run] Not waiting for the GitHub Pages build.");
|
|
119711
|
+
} else {
|
|
119712
|
+
await this.waitForPagesBuild(sha);
|
|
119713
|
+
}
|
|
119625
119714
|
this.logger.info("GitHub pages release complete");
|
|
119626
119715
|
}
|
|
119627
119716
|
};
|
|
@@ -124131,8 +124220,8 @@ var init_npm = __esm({
|
|
|
124131
124220
|
if (!parsedVersion) {
|
|
124132
124221
|
reportError(`Cannot parse NPM version: "${npmVersionStr}"`);
|
|
124133
124222
|
}
|
|
124134
|
-
const { major:
|
|
124135
|
-
if (
|
|
124223
|
+
const { major: major3 = 0, minor: minor2 = 0 } = parsedVersion ?? {};
|
|
124224
|
+
if (major3 < NPM_MIN_MAJOR || major3 === NPM_MIN_MAJOR && minor2 < NPM_MIN_MINOR) {
|
|
124136
124225
|
reportError(
|
|
124137
124226
|
`NPM version is too old: ${npmVersionStr}. Please update your NodeJS`
|
|
124138
124227
|
);
|
|
@@ -124186,7 +124275,7 @@ var init_npm = __esm({
|
|
|
124186
124275
|
"npm target: OIDC trusted publishing requires npm, but only yarn was found. Install npm >= 11.5.1 to use OIDC."
|
|
124187
124276
|
);
|
|
124188
124277
|
}
|
|
124189
|
-
const { major:
|
|
124278
|
+
const { major: major3, minor: minor2, patch: patch2 } = this.npmVersion;
|
|
124190
124279
|
if (!versionGreaterOrEqualThan(this.npmVersion, NPM_OIDC_MIN_VERSION)) {
|
|
124191
124280
|
const {
|
|
124192
124281
|
major: minMaj,
|
|
@@ -124194,7 +124283,7 @@ var init_npm = __esm({
|
|
|
124194
124283
|
patch: minPat
|
|
124195
124284
|
} = NPM_OIDC_MIN_VERSION;
|
|
124196
124285
|
throw new ConfigurationError(
|
|
124197
|
-
`npm target: OIDC trusted publishing requires npm >= ${minMaj}.${minMin}.${minPat}, but found ${
|
|
124286
|
+
`npm target: OIDC trusted publishing requires npm >= ${minMaj}.${minMin}.${minPat}, but found ${major3}.${minor2}.${patch2}. Update npm (or Node.js) to use OIDC.`
|
|
124198
124287
|
);
|
|
124199
124288
|
}
|
|
124200
124289
|
useOidc = true;
|
|
@@ -124207,14 +124296,14 @@ var init_npm = __esm({
|
|
|
124207
124296
|
);
|
|
124208
124297
|
useOidc = true;
|
|
124209
124298
|
} else {
|
|
124210
|
-
const { major:
|
|
124299
|
+
const { major: major3, minor: minor2, patch: patch2 } = this.npmVersion;
|
|
124211
124300
|
const {
|
|
124212
124301
|
major: minMaj,
|
|
124213
124302
|
minor: minMin,
|
|
124214
124303
|
patch: minPat
|
|
124215
124304
|
} = NPM_OIDC_MIN_VERSION;
|
|
124216
124305
|
this.logger.warn(
|
|
124217
|
-
`OIDC environment detected but npm ${
|
|
124306
|
+
`OIDC environment detected but npm ${major3}.${minor2}.${patch2} is too old for trusted publishing (requires >= ${minMaj}.${minMin}.${minPat}). Falling through to token-based auth.`
|
|
124218
124307
|
);
|
|
124219
124308
|
}
|
|
124220
124309
|
}
|
|
@@ -125852,12 +125941,12 @@ var init_registry = __esm({
|
|
|
125852
125941
|
});
|
|
125853
125942
|
|
|
125854
125943
|
// src/targets/registry.ts
|
|
125855
|
-
var
|
|
125944
|
+
var import_async9, BATCH_KEYS, PUSH_MAX_ATTEMPTS, PUSH_RETRY_DELAY_SECS, PUSH_RETRY_EXP_FACTOR, RegistryTarget;
|
|
125856
125945
|
var init_registry2 = __esm({
|
|
125857
125946
|
"src/targets/registry.ts"() {
|
|
125858
125947
|
"use strict";
|
|
125859
125948
|
init_import_meta_url();
|
|
125860
|
-
|
|
125949
|
+
import_async9 = __toESM(require_async());
|
|
125861
125950
|
init_errors2();
|
|
125862
125951
|
init_files();
|
|
125863
125952
|
init_githubApi();
|
|
@@ -126086,7 +126175,7 @@ var init_registry2 = __esm({
|
|
|
126086
126175
|
"Adding extra data (checksums, download links) for available artifacts..."
|
|
126087
126176
|
);
|
|
126088
126177
|
const files = {};
|
|
126089
|
-
await (0,
|
|
126178
|
+
await (0, import_async9.mapLimit)(
|
|
126090
126179
|
artifacts,
|
|
126091
126180
|
MAX_DOWNLOAD_CONCURRENCY,
|
|
126092
126181
|
async (artifact) => {
|
|
@@ -135166,9 +135255,9 @@ function decode2(at4, to3) {
|
|
|
135166
135255
|
if (at4 >= to3) {
|
|
135167
135256
|
throw new Error("unexpected end of (decode) payload.");
|
|
135168
135257
|
}
|
|
135169
|
-
const
|
|
135258
|
+
const major3 = (payload[at4] & 224) >> 5;
|
|
135170
135259
|
const minor2 = payload[at4] & 31;
|
|
135171
|
-
switch (
|
|
135260
|
+
switch (major3) {
|
|
135172
135261
|
case majorUint64:
|
|
135173
135262
|
case majorNegativeInt64:
|
|
135174
135263
|
case majorTag:
|
|
@@ -135204,10 +135293,10 @@ function decode2(at4, to3) {
|
|
|
135204
135293
|
throw new Error(`unexpected minor value ${minor2}.`);
|
|
135205
135294
|
}
|
|
135206
135295
|
}
|
|
135207
|
-
if (
|
|
135296
|
+
if (major3 === majorUint64) {
|
|
135208
135297
|
_offset = offset;
|
|
135209
135298
|
return castBigInt(unsignedInt);
|
|
135210
|
-
} else if (
|
|
135299
|
+
} else if (major3 === majorNegativeInt64) {
|
|
135211
135300
|
let negativeInt;
|
|
135212
135301
|
if (typeof unsignedInt === "bigint") {
|
|
135213
135302
|
negativeInt = BigInt(-1) - unsignedInt;
|
|
@@ -135256,7 +135345,7 @@ function decode2(at4, to3) {
|
|
|
135256
135345
|
case majorList:
|
|
135257
135346
|
case majorUnstructuredByteString:
|
|
135258
135347
|
if (minor2 === minorIndefinite) {
|
|
135259
|
-
switch (
|
|
135348
|
+
switch (major3) {
|
|
135260
135349
|
case majorUtf8String:
|
|
135261
135350
|
return decodeUtf8StringIndefinite(at4, to3);
|
|
135262
135351
|
case majorMap:
|
|
@@ -135267,7 +135356,7 @@ function decode2(at4, to3) {
|
|
|
135267
135356
|
return decodeUnstructuredByteStringIndefinite(at4, to3);
|
|
135268
135357
|
}
|
|
135269
135358
|
} else {
|
|
135270
|
-
switch (
|
|
135359
|
+
switch (major3) {
|
|
135271
135360
|
case majorUtf8String:
|
|
135272
135361
|
return decodeUtf8String(at4, to3);
|
|
135273
135362
|
case majorMap:
|
|
@@ -135370,10 +135459,10 @@ function decodeUtf8StringIndefinite(at4, to3) {
|
|
|
135370
135459
|
_offset = at4 - base + 2;
|
|
135371
135460
|
return bytesToUtf8(data2, 0, data2.length);
|
|
135372
135461
|
}
|
|
135373
|
-
const
|
|
135462
|
+
const major3 = (payload[at4] & 224) >> 5;
|
|
135374
135463
|
const minor2 = payload[at4] & 31;
|
|
135375
|
-
if (
|
|
135376
|
-
throw new Error(`unexpected major type ${
|
|
135464
|
+
if (major3 !== majorUtf8String) {
|
|
135465
|
+
throw new Error(`unexpected major type ${major3} in indefinite string.`);
|
|
135377
135466
|
}
|
|
135378
135467
|
if (minor2 === minorIndefinite) {
|
|
135379
135468
|
throw new Error("nested indefinite string.");
|
|
@@ -135408,10 +135497,10 @@ function decodeUnstructuredByteStringIndefinite(at4, to3) {
|
|
|
135408
135497
|
_offset = at4 - base + 2;
|
|
135409
135498
|
return data2;
|
|
135410
135499
|
}
|
|
135411
|
-
const
|
|
135500
|
+
const major3 = (payload[at4] & 224) >> 5;
|
|
135412
135501
|
const minor2 = payload[at4] & 31;
|
|
135413
|
-
if (
|
|
135414
|
-
throw new Error(`unexpected major type ${
|
|
135502
|
+
if (major3 !== majorUnstructuredByteString) {
|
|
135503
|
+
throw new Error(`unexpected major type ${major3} in indefinite string.`);
|
|
135415
135504
|
}
|
|
135416
135505
|
if (minor2 === minorIndefinite) {
|
|
135417
135506
|
throw new Error("nested indefinite string.");
|
|
@@ -135465,9 +135554,9 @@ function decodeMap(at4, to3) {
|
|
|
135465
135554
|
if (at4 >= to3) {
|
|
135466
135555
|
throw new Error("unexpected end of map payload.");
|
|
135467
135556
|
}
|
|
135468
|
-
const
|
|
135469
|
-
if (
|
|
135470
|
-
throw new Error(`unexpected major type ${
|
|
135557
|
+
const major3 = (payload[at4] & 224) >> 5;
|
|
135558
|
+
if (major3 !== majorUtf8String) {
|
|
135559
|
+
throw new Error(`unexpected major type ${major3} for map key at index ${at4}.`);
|
|
135471
135560
|
}
|
|
135472
135561
|
const key = decode2(at4, to3);
|
|
135473
135562
|
at4 += _offset;
|
|
@@ -135490,9 +135579,9 @@ function decodeMapIndefinite(at4, to3) {
|
|
|
135490
135579
|
_offset = at4 - base + 2;
|
|
135491
135580
|
return map3;
|
|
135492
135581
|
}
|
|
135493
|
-
const
|
|
135494
|
-
if (
|
|
135495
|
-
throw new Error(`unexpected major type ${
|
|
135582
|
+
const major3 = (payload[at4] & 224) >> 5;
|
|
135583
|
+
if (major3 !== majorUtf8String) {
|
|
135584
|
+
throw new Error(`unexpected major type ${major3} for map key.`);
|
|
135496
135585
|
}
|
|
135497
135586
|
const key = decode2(at4, to3);
|
|
135498
135587
|
at4 += _offset;
|
|
@@ -135598,22 +135687,22 @@ function resize(size2) {
|
|
|
135598
135687
|
}
|
|
135599
135688
|
dataView2 = new DataView(data.buffer, data.byteOffset, data.byteLength);
|
|
135600
135689
|
}
|
|
135601
|
-
function encodeHeader(
|
|
135690
|
+
function encodeHeader(major3, value) {
|
|
135602
135691
|
if (value < 24) {
|
|
135603
|
-
data[cursor++] =
|
|
135692
|
+
data[cursor++] = major3 << 5 | value;
|
|
135604
135693
|
} else if (value < 1 << 8) {
|
|
135605
|
-
data[cursor++] =
|
|
135694
|
+
data[cursor++] = major3 << 5 | 24;
|
|
135606
135695
|
data[cursor++] = value;
|
|
135607
135696
|
} else if (value < 1 << 16) {
|
|
135608
|
-
data[cursor++] =
|
|
135697
|
+
data[cursor++] = major3 << 5 | extendedFloat16;
|
|
135609
135698
|
dataView2.setUint16(cursor, value);
|
|
135610
135699
|
cursor += 2;
|
|
135611
135700
|
} else if (value < 2 ** 32) {
|
|
135612
|
-
data[cursor++] =
|
|
135701
|
+
data[cursor++] = major3 << 5 | extendedFloat32;
|
|
135613
135702
|
dataView2.setUint32(cursor, value);
|
|
135614
135703
|
cursor += 4;
|
|
135615
135704
|
} else {
|
|
135616
|
-
data[cursor++] =
|
|
135705
|
+
data[cursor++] = major3 << 5 | extendedFloat64;
|
|
135617
135706
|
dataView2.setBigUint64(cursor, typeof value === "bigint" ? value : BigInt(value));
|
|
135618
135707
|
cursor += 8;
|
|
135619
135708
|
}
|
|
@@ -135637,23 +135726,23 @@ function encode(_input) {
|
|
|
135637
135726
|
} else if (typeof input === "number") {
|
|
135638
135727
|
if (Number.isInteger(input)) {
|
|
135639
135728
|
const nonNegative = input >= 0;
|
|
135640
|
-
const
|
|
135729
|
+
const major3 = nonNegative ? majorUint64 : majorNegativeInt64;
|
|
135641
135730
|
const value = nonNegative ? input : -input - 1;
|
|
135642
135731
|
if (value < 24) {
|
|
135643
|
-
data[cursor++] =
|
|
135732
|
+
data[cursor++] = major3 << 5 | value;
|
|
135644
135733
|
} else if (value < 256) {
|
|
135645
|
-
data[cursor++] =
|
|
135734
|
+
data[cursor++] = major3 << 5 | 24;
|
|
135646
135735
|
data[cursor++] = value;
|
|
135647
135736
|
} else if (value < 65536) {
|
|
135648
|
-
data[cursor++] =
|
|
135737
|
+
data[cursor++] = major3 << 5 | extendedFloat16;
|
|
135649
135738
|
data[cursor++] = value >> 8;
|
|
135650
135739
|
data[cursor++] = value;
|
|
135651
135740
|
} else if (value < 4294967296) {
|
|
135652
|
-
data[cursor++] =
|
|
135741
|
+
data[cursor++] = major3 << 5 | extendedFloat32;
|
|
135653
135742
|
dataView2.setUint32(cursor, value);
|
|
135654
135743
|
cursor += 4;
|
|
135655
135744
|
} else {
|
|
135656
|
-
data[cursor++] =
|
|
135745
|
+
data[cursor++] = major3 << 5 | extendedFloat64;
|
|
135657
135746
|
dataView2.setBigUint64(cursor, BigInt(value));
|
|
135658
135747
|
cursor += 8;
|
|
135659
135748
|
}
|
|
@@ -135665,24 +135754,24 @@ function encode(_input) {
|
|
|
135665
135754
|
continue;
|
|
135666
135755
|
} else if (typeof input === "bigint") {
|
|
135667
135756
|
const nonNegative = input >= 0;
|
|
135668
|
-
const
|
|
135757
|
+
const major3 = nonNegative ? majorUint64 : majorNegativeInt64;
|
|
135669
135758
|
const value = nonNegative ? input : -input - BigInt(1);
|
|
135670
135759
|
const n5 = Number(value);
|
|
135671
135760
|
if (n5 < 24) {
|
|
135672
|
-
data[cursor++] =
|
|
135761
|
+
data[cursor++] = major3 << 5 | n5;
|
|
135673
135762
|
} else if (n5 < 256) {
|
|
135674
|
-
data[cursor++] =
|
|
135763
|
+
data[cursor++] = major3 << 5 | 24;
|
|
135675
135764
|
data[cursor++] = n5;
|
|
135676
135765
|
} else if (n5 < 65536) {
|
|
135677
|
-
data[cursor++] =
|
|
135766
|
+
data[cursor++] = major3 << 5 | extendedFloat16;
|
|
135678
135767
|
data[cursor++] = n5 >> 8;
|
|
135679
135768
|
data[cursor++] = n5 & 255;
|
|
135680
135769
|
} else if (n5 < 4294967296) {
|
|
135681
|
-
data[cursor++] =
|
|
135770
|
+
data[cursor++] = major3 << 5 | extendedFloat32;
|
|
135682
135771
|
dataView2.setUint32(cursor, n5);
|
|
135683
135772
|
cursor += 4;
|
|
135684
135773
|
} else if (value < BigInt("18446744073709551616")) {
|
|
135685
|
-
data[cursor++] =
|
|
135774
|
+
data[cursor++] = major3 << 5 | extendedFloat64;
|
|
135686
135775
|
dataView2.setBigUint64(cursor, value);
|
|
135687
135776
|
cursor += 8;
|
|
135688
135777
|
} else {
|
|
@@ -165926,9 +166015,9 @@ var require_loader = __commonJS({
|
|
|
165926
166015
|
if (match3 === null) {
|
|
165927
166016
|
throwError(state2, "ill-formed argument of the YAML directive");
|
|
165928
166017
|
}
|
|
165929
|
-
const
|
|
166018
|
+
const major3 = parseInt(match3[1], 10);
|
|
165930
166019
|
const minor2 = parseInt(match3[2], 10);
|
|
165931
|
-
if (
|
|
166020
|
+
if (major3 !== 1) {
|
|
165932
166021
|
throwError(state2, "unacceptable YAML version of the document");
|
|
165933
166022
|
}
|
|
165934
166023
|
state2.version = args[0];
|
|
@@ -170439,12 +170528,12 @@ var require_semantic = __commonJS({
|
|
|
170439
170528
|
init_import_meta_url();
|
|
170440
170529
|
var { explain, parse: parse17, stringify: stringify4 } = require_version();
|
|
170441
170530
|
module2.exports = {
|
|
170442
|
-
major:
|
|
170531
|
+
major: major3,
|
|
170443
170532
|
minor: minor2,
|
|
170444
170533
|
patch: patch2,
|
|
170445
170534
|
inc: inc4
|
|
170446
170535
|
};
|
|
170447
|
-
function
|
|
170536
|
+
function major3(input) {
|
|
170448
170537
|
const version2 = explain(input);
|
|
170449
170538
|
if (!version2) {
|
|
170450
170539
|
throw new TypeError("Invalid Version: " + input);
|
|
@@ -170600,7 +170689,7 @@ var require_pep440 = __commonJS({
|
|
|
170600
170689
|
satisfies: satisfies2,
|
|
170601
170690
|
validRange
|
|
170602
170691
|
} = require_specifier();
|
|
170603
|
-
var { major:
|
|
170692
|
+
var { major: major3, minor: minor2, patch: patch2, inc: inc4 } = require_semantic();
|
|
170604
170693
|
module2.exports = {
|
|
170605
170694
|
// version
|
|
170606
170695
|
valid: valid2,
|
|
@@ -170627,7 +170716,7 @@ var require_pep440 = __commonJS({
|
|
|
170627
170716
|
satisfies: satisfies2,
|
|
170628
170717
|
validRange,
|
|
170629
170718
|
// semantic
|
|
170630
|
-
major:
|
|
170719
|
+
major: major3,
|
|
170631
170720
|
minor: minor2,
|
|
170632
170721
|
patch: patch2,
|
|
170633
170722
|
inc: inc4
|
|
@@ -176129,13 +176218,13 @@ ${issues}`,
|
|
|
176129
176218
|
if (version2.length < 2) {
|
|
176130
176219
|
return null;
|
|
176131
176220
|
}
|
|
176132
|
-
const
|
|
176221
|
+
const major3 = version2[0];
|
|
176133
176222
|
const minorStr = version2.substring(1);
|
|
176134
176223
|
const minor2 = parseInt(minorStr, 10);
|
|
176135
176224
|
if (isNaN(minor2) || minor2 > 255) {
|
|
176136
176225
|
return null;
|
|
176137
176226
|
}
|
|
176138
|
-
return `${
|
|
176227
|
+
return `${major3}.${minor2}`;
|
|
176139
176228
|
}
|
|
176140
176229
|
function rfindNumericChar(s8) {
|
|
176141
176230
|
for (let i5 = s8.length - 1; i5 >= 0; i5--) {
|
|
@@ -187430,8 +187519,8 @@ var require_dist12 = __commonJS({
|
|
|
187430
187519
|
function rcompareIdentifiers(a5, b9) {
|
|
187431
187520
|
return compareIdentifiers(b9, a5);
|
|
187432
187521
|
}
|
|
187433
|
-
exports3.major =
|
|
187434
|
-
function
|
|
187522
|
+
exports3.major = major3;
|
|
187523
|
+
function major3(a5, loose) {
|
|
187435
187524
|
return new SemVer22(a5, loose).major;
|
|
187436
187525
|
}
|
|
187437
187526
|
exports3.minor = minor2;
|
|
@@ -188685,8 +188774,8 @@ var require_dist12 = __commonJS({
|
|
|
188685
188774
|
function rcompareIdentifiers(a5, b9) {
|
|
188686
188775
|
return compareIdentifiers(b9, a5);
|
|
188687
188776
|
}
|
|
188688
|
-
exports3.major =
|
|
188689
|
-
function
|
|
188777
|
+
exports3.major = major3;
|
|
188778
|
+
function major3(a5, loose) {
|
|
188690
188779
|
return new SemVer22(a5, loose).major;
|
|
188691
188780
|
}
|
|
188692
188781
|
exports3.minor = minor2;
|
|
@@ -190634,7 +190723,7 @@ var require_dist12 = __commonJS({
|
|
|
190634
190723
|
}
|
|
190635
190724
|
var directiveHandlers = {
|
|
190636
190725
|
YAML: function handleYamlDirective(state2, name, args) {
|
|
190637
|
-
var match3,
|
|
190726
|
+
var match3, major3, minor2;
|
|
190638
190727
|
if (state2.version !== null) {
|
|
190639
190728
|
throwError(state2, "duplication of %YAML directive");
|
|
190640
190729
|
}
|
|
@@ -190645,9 +190734,9 @@ var require_dist12 = __commonJS({
|
|
|
190645
190734
|
if (match3 === null) {
|
|
190646
190735
|
throwError(state2, "ill-formed argument of the YAML directive");
|
|
190647
190736
|
}
|
|
190648
|
-
|
|
190737
|
+
major3 = parseInt(match3[1], 10);
|
|
190649
190738
|
minor2 = parseInt(match3[2], 10);
|
|
190650
|
-
if (
|
|
190739
|
+
if (major3 !== 1) {
|
|
190651
190740
|
throwError(state2, "unacceptable YAML version of the document");
|
|
190652
190741
|
}
|
|
190653
190742
|
state2.version = args[0];
|
|
@@ -209786,15 +209875,15 @@ ${fields}`;
|
|
|
209786
209875
|
return getOptions().filter((v12) => v12.major >= 18).filter(isNodeVersionAvailable).map((n5) => n5.major);
|
|
209787
209876
|
}
|
|
209788
209877
|
function getHint(isAuto = false, availableVersions) {
|
|
209789
|
-
const { major:
|
|
209790
|
-
return isAuto ? `Please set Node.js Version to ${range3} in your Project Settings to use Node.js ${
|
|
209878
|
+
const { major: major3, range: range3 } = getLatestNodeVersion(availableVersions);
|
|
209879
|
+
return isAuto ? `Please set Node.js Version to ${range3} in your Project Settings to use Node.js ${major3}.` : `Please set "engines": { "node": "${range3}" } in your \`package.json\` file to use Node.js ${major3}.`;
|
|
209791
209880
|
}
|
|
209792
209881
|
function getLatestNodeVersion(availableVersions) {
|
|
209793
209882
|
const all = getOptions();
|
|
209794
209883
|
if (availableVersions) {
|
|
209795
209884
|
for (const version2 of all) {
|
|
209796
|
-
for (const
|
|
209797
|
-
if (version2.major ===
|
|
209885
|
+
for (const major3 of availableVersions) {
|
|
209886
|
+
if (version2.major === major3) {
|
|
209798
209887
|
return version2;
|
|
209799
209888
|
}
|
|
209800
209889
|
}
|
|
@@ -230739,7 +230828,7 @@ var require_package7 = __commonJS({
|
|
|
230739
230828
|
"package.json"(exports2, module2) {
|
|
230740
230829
|
module2.exports = {
|
|
230741
230830
|
name: "@sentry/craft",
|
|
230742
|
-
version: "3.
|
|
230831
|
+
version: "3.10.0",
|
|
230743
230832
|
description: "The universal sentry workflow CLI",
|
|
230744
230833
|
main: "dist/craft",
|
|
230745
230834
|
repository: "https://github.com/getsentry/craft",
|
|
@@ -230947,7 +231036,7 @@ function getPackage() {
|
|
|
230947
231036
|
}
|
|
230948
231037
|
function getPackageVersion3() {
|
|
230949
231038
|
const { version: version2 } = getPackage();
|
|
230950
|
-
const buildInfo = "
|
|
231039
|
+
const buildInfo = "dd3381aa60f029043a6723dcd3df7bebdaba0430";
|
|
230951
231040
|
return buildInfo ? `${version2} (${buildInfo})` : version2;
|
|
230952
231041
|
}
|
|
230953
231042
|
function semVerToString(s8) {
|
|
@@ -231585,8 +231674,8 @@ var require_major = __commonJS({
|
|
|
231585
231674
|
"use strict";
|
|
231586
231675
|
init_import_meta_url();
|
|
231587
231676
|
var SemVer5 = require_semver();
|
|
231588
|
-
var
|
|
231589
|
-
module2.exports =
|
|
231677
|
+
var major3 = (a5, loose) => new SemVer5(a5, loose).major;
|
|
231678
|
+
module2.exports = major3;
|
|
231590
231679
|
}
|
|
231591
231680
|
});
|
|
231592
231681
|
|
|
@@ -231849,12 +231938,12 @@ var require_coerce = __commonJS({
|
|
|
231849
231938
|
if (match3 === null) {
|
|
231850
231939
|
return null;
|
|
231851
231940
|
}
|
|
231852
|
-
const
|
|
231941
|
+
const major3 = match3[2];
|
|
231853
231942
|
const minor2 = match3[3] || "0";
|
|
231854
231943
|
const patch2 = match3[4] || "0";
|
|
231855
231944
|
const prerelease2 = options.includePrerelease && match3[5] ? `-${match3[5]}` : "";
|
|
231856
231945
|
const build = options.includePrerelease && match3[6] ? `+${match3[6]}` : "";
|
|
231857
|
-
return parse17(`${
|
|
231946
|
+
return parse17(`${major3}.${minor2}.${patch2}${prerelease2}${build}`, options);
|
|
231858
231947
|
};
|
|
231859
231948
|
module2.exports = coerce;
|
|
231860
231949
|
}
|
|
@@ -232892,7 +232981,7 @@ var require_semver2 = __commonJS({
|
|
|
232892
232981
|
var clean = require_clean();
|
|
232893
232982
|
var inc4 = require_inc();
|
|
232894
232983
|
var diff = require_diff();
|
|
232895
|
-
var
|
|
232984
|
+
var major3 = require_major();
|
|
232896
232985
|
var minor2 = require_minor();
|
|
232897
232986
|
var patch2 = require_patch();
|
|
232898
232987
|
var prerelease2 = require_prerelease();
|
|
@@ -232930,7 +233019,7 @@ var require_semver2 = __commonJS({
|
|
|
232930
233019
|
clean,
|
|
232931
233020
|
inc: inc4,
|
|
232932
233021
|
diff,
|
|
232933
|
-
major:
|
|
233022
|
+
major: major3,
|
|
232934
233023
|
minor: minor2,
|
|
232935
233024
|
patch: patch2,
|
|
232936
233025
|
prerelease: prerelease2,
|
|
@@ -235519,8 +235608,8 @@ var _c4;
|
|
|
235519
235608
|
var minNodeVersion = process && process.env && process.env.YARGS_MIN_NODE_VERSION ? Number(process.env.YARGS_MIN_NODE_VERSION) : 20;
|
|
235520
235609
|
var nodeVersion = (_b = (_a5 = process === null || process === void 0 ? void 0 : process.versions) === null || _a5 === void 0 ? void 0 : _a5.node) !== null && _b !== void 0 ? _b : (_c4 = process === null || process === void 0 ? void 0 : process.version) === null || _c4 === void 0 ? void 0 : _c4.slice(1);
|
|
235521
235610
|
if (nodeVersion) {
|
|
235522
|
-
const
|
|
235523
|
-
if (
|
|
235611
|
+
const major3 = Number(nodeVersion.match(/^([^.]+)/)[1]);
|
|
235612
|
+
if (major3 < minNodeVersion) {
|
|
235524
235613
|
throw Error(`yargs parser supports a minimum Node.js version of ${minNodeVersion}. Read our version support policy: https://github.com/yargs/yargs-parser#supported-nodejs-versions`);
|
|
235525
235614
|
}
|
|
235526
235615
|
}
|
|
@@ -240883,6 +240972,7 @@ async function resolveVersion(git, options) {
|
|
|
240883
240972
|
);
|
|
240884
240973
|
}
|
|
240885
240974
|
const latestTag = await getLatestTag(git, getGitTagPrefix());
|
|
240975
|
+
const currentVersion = latestTag && getVersion(latestTag) || await readProjectVersion(config.targets || [], getReleaseUnitDir()) || "0.0.0";
|
|
240886
240976
|
let bumpType;
|
|
240887
240977
|
if (version2 === "auto" || version2 === "pre") {
|
|
240888
240978
|
const changelogResult = await getChangelogWithBumpType(
|
|
@@ -240891,10 +240981,15 @@ async function resolveVersion(git, options) {
|
|
|
240891
240981
|
);
|
|
240892
240982
|
validateBumpType(changelogResult);
|
|
240893
240983
|
bumpType = changelogResult.bumpType;
|
|
240984
|
+
if (bumpType === "major" && semver5.major(currentVersion) === 0) {
|
|
240985
|
+
logger.info(
|
|
240986
|
+
`${currentVersion} is below 1.0.0, so the breaking changes bump the minor version. Pass "major" to release 1.0.0.`
|
|
240987
|
+
);
|
|
240988
|
+
bumpType = "minor";
|
|
240989
|
+
}
|
|
240894
240990
|
} else {
|
|
240895
240991
|
bumpType = version2;
|
|
240896
240992
|
}
|
|
240897
|
-
const currentVersion = latestTag && getVersion(latestTag) || await readProjectVersion(config.targets || [], getReleaseUnitDir()) || "0.0.0";
|
|
240898
240993
|
let newVersion = calculateNextVersion(currentVersion, bumpType);
|
|
240899
240994
|
if (version2 === "pre") {
|
|
240900
240995
|
newVersion = calculatePrerelease(newVersion, currentVersion);
|