@sentry/craft 3.5.0 → 3.7.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.
Files changed (2) hide show
  1. package/dist/craft +1174 -790
  2. package/package.json +1 -1
package/dist/craft CHANGED
@@ -55665,12 +55665,12 @@ var require_text = __commonJS({
55665
55665
  validate() {
55666
55666
  var _this = this;
55667
55667
  return _asyncToGenerator(function* () {
55668
- let valid = yield _this.validator(_this.value);
55669
- if (typeof valid === `string`) {
55670
- _this.errorMsg = valid;
55671
- valid = false;
55668
+ let valid2 = yield _this.validator(_this.value);
55669
+ if (typeof valid2 === `string`) {
55670
+ _this.errorMsg = valid2;
55671
+ valid2 = false;
55672
55672
  }
55673
- _this.error = !valid;
55673
+ _this.error = !valid2;
55674
55674
  })();
55675
55675
  }
55676
55676
  submit() {
@@ -56471,12 +56471,12 @@ var require_date = __commonJS({
56471
56471
  validate() {
56472
56472
  var _this = this;
56473
56473
  return _asyncToGenerator(function* () {
56474
- let valid = yield _this.validator(_this.value);
56475
- if (typeof valid === "string") {
56476
- _this.errorMsg = valid;
56477
- valid = false;
56474
+ let valid2 = yield _this.validator(_this.value);
56475
+ if (typeof valid2 === "string") {
56476
+ _this.errorMsg = valid2;
56477
+ valid2 = false;
56478
56478
  }
56479
- _this.error = !valid;
56479
+ _this.error = !valid2;
56480
56480
  })();
56481
56481
  }
56482
56482
  submit() {
@@ -56661,12 +56661,12 @@ var require_number = __commonJS({
56661
56661
  validate() {
56662
56662
  var _this = this;
56663
56663
  return _asyncToGenerator(function* () {
56664
- let valid = yield _this.validator(_this.value);
56665
- if (typeof valid === `string`) {
56666
- _this.errorMsg = valid;
56667
- valid = false;
56664
+ let valid2 = yield _this.validator(_this.value);
56665
+ if (typeof valid2 === `string`) {
56666
+ _this.errorMsg = valid2;
56667
+ valid2 = false;
56668
56668
  }
56669
- _this.error = !valid;
56669
+ _this.error = !valid2;
56670
56670
  })();
56671
56671
  }
56672
56672
  submit() {
@@ -58117,12 +58117,12 @@ var require_text2 = __commonJS({
58117
58117
  this.close();
58118
58118
  }
58119
58119
  async validate() {
58120
- let valid = await this.validator(this.value);
58121
- if (typeof valid === `string`) {
58122
- this.errorMsg = valid;
58123
- valid = false;
58120
+ let valid2 = await this.validator(this.value);
58121
+ if (typeof valid2 === `string`) {
58122
+ this.errorMsg = valid2;
58123
+ valid2 = false;
58124
58124
  }
58125
- this.error = !valid;
58125
+ this.error = !valid2;
58126
58126
  }
58127
58127
  async submit() {
58128
58128
  this.value = this.value || this.initial;
@@ -58867,12 +58867,12 @@ var require_date2 = __commonJS({
58867
58867
  this.close();
58868
58868
  }
58869
58869
  async validate() {
58870
- let valid = await this.validator(this.value);
58871
- if (typeof valid === "string") {
58872
- this.errorMsg = valid;
58873
- valid = false;
58870
+ let valid2 = await this.validator(this.value);
58871
+ if (typeof valid2 === "string") {
58872
+ this.errorMsg = valid2;
58873
+ valid2 = false;
58874
58874
  }
58875
- this.error = !valid;
58875
+ this.error = !valid2;
58876
58876
  }
58877
58877
  async submit() {
58878
58878
  await this.validate();
@@ -59023,12 +59023,12 @@ var require_number2 = __commonJS({
59023
59023
  this.close();
59024
59024
  }
59025
59025
  async validate() {
59026
- let valid = await this.validator(this.value);
59027
- if (typeof valid === `string`) {
59028
- this.errorMsg = valid;
59029
- valid = false;
59026
+ let valid2 = await this.validator(this.value);
59027
+ if (typeof valid2 === `string`) {
59028
+ this.errorMsg = valid2;
59029
+ valid2 = false;
59030
59030
  }
59031
- this.error = !valid;
59031
+ this.error = !valid2;
59032
59032
  }
59033
59033
  async submit() {
59034
59034
  await this.validate();
@@ -62184,7 +62184,7 @@ function findPrototypeKey(input) {
62184
62184
  (key) => Object.prototype.hasOwnProperty.call(input, key)
62185
62185
  ) : void 0;
62186
62186
  }
62187
- var GitHubGlobalConfigSchema, TargetConfigSchema, BaseStatusProviderSchema, BaseArtifactProviderSchema, ArtifactPatternsSchema, GitHubArtifactsConfigSchema, GitHubArtifactProviderConfigSchema, CalVerConfigSchema, VersioningConfigSchema, AiSummaryEndpointSchema, AiSummaryApiKeyEnvSchema, AiSummaryLlmSchema, AiSummaryConfigSchema, UnownedPathsPolicySchema, ChangelogConfigSchema, releaseUnitFields, WorkspaceSchema, WorkspaceNameSchema, PROTOTYPE_KEYS, WorkspacesSchema, CraftProjectConfigObjectSchema, hasWorkspaces, workspaceOnlyChangelogField, CraftProjectConfigSchema;
62187
+ var GitHubGlobalConfigSchema, TargetConfigSchema, BaseStatusProviderSchema, BaseArtifactProviderSchema, ArtifactPatternsSchema, GitHubArtifactsConfigSchema, GitHubArtifactProviderConfigSchema, CalVerConfigSchema, VersioningConfigSchema, AiSummaryEndpointSchema, AiSummaryApiKeyEnvSchema, AiSummaryLlmSchema, AiSummaryConfigSchema, UnownedPathsPolicySchema, ChangelogConfigSchema, PostReleaseBumpTypeSchema, PostReleaseBumpObjectSchema, PostReleaseBumpSchema, releaseUnitFields, WorkspaceSchema, WorkspaceNameSchema, PROTOTYPE_KEYS, WorkspacesSchema, CraftProjectConfigObjectSchema, hasWorkspaces, workspaceOnlyChangelogField, CraftProjectConfigSchema;
62188
62188
  var init_project_config = __esm({
62189
62189
  "src/schemas/project_config.ts"() {
62190
62190
  "use strict";
@@ -62315,11 +62315,48 @@ var init_project_config = __esm({
62315
62315
  unownedPaths: optional(UnownedPathsPolicySchema)
62316
62316
  })
62317
62317
  ]);
62318
+ PostReleaseBumpTypeSchema = picklist([
62319
+ "patch",
62320
+ "minor",
62321
+ "major",
62322
+ "calver"
62323
+ ]);
62324
+ PostReleaseBumpObjectSchema = strictObject({
62325
+ /** How to get the next version. Default: `calver` for CalVer, else `minor`. */
62326
+ bump: optional(PostReleaseBumpTypeSchema),
62327
+ /**
62328
+ * Development version template. Default: `{{version}}-dev.0`. Only version
62329
+ * characters are allowed: the value reaches spawned commands as an argument,
62330
+ * where `${VAR}` would be expanded from the environment.
62331
+ */
62332
+ version: optional(
62333
+ pipe(
62334
+ string(),
62335
+ regex(
62336
+ /^(?:[0-9A-Za-z._+-]|\{\{version\}\})+$/,
62337
+ 'Use only letters, digits, ".", "_", "+", "-", and {{version}}.'
62338
+ )
62339
+ )
62340
+ )
62341
+ });
62342
+ PostReleaseBumpSchema = union([
62343
+ PostReleaseBumpObjectSchema,
62344
+ pipe(
62345
+ PostReleaseBumpTypeSchema,
62346
+ transform((bump) => ({ bump }))
62347
+ ),
62348
+ pipe(
62349
+ literal(true),
62350
+ transform(() => ({}))
62351
+ ),
62352
+ literal(false)
62353
+ ]);
62318
62354
  releaseUnitFields = {
62319
62355
  github: optional(GitHubGlobalConfigSchema),
62320
62356
  targets: optional(array(TargetConfigSchema)),
62321
62357
  preReleaseCommand: optional(string()),
62322
62358
  postReleaseCommand: optional(string()),
62359
+ postReleaseBump: optional(nonArray(PostReleaseBumpSchema)),
62323
62360
  releaseBranchPrefix: optional(string()),
62324
62361
  changelog: optional(nonArray(ChangelogConfigSchema)),
62325
62362
  changelogPolicy: optional(picklist(["auto", "simple", "none"])),
@@ -84598,13 +84635,13 @@ var require_verify_stream = __commonJS({
84598
84635
  util5.inherits(VerifyStream, Stream3);
84599
84636
  VerifyStream.prototype.verify = function verify() {
84600
84637
  try {
84601
- var valid = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer);
84638
+ var valid2 = jwsVerify(this.signature.buffer, this.algorithm, this.key.buffer);
84602
84639
  var obj = jwsDecode(this.signature.buffer, this.encoding);
84603
- this.emit("done", valid, obj);
84604
- this.emit("data", valid);
84640
+ this.emit("done", valid2, obj);
84641
+ this.emit("data", valid2);
84605
84642
  this.emit("end");
84606
84643
  this.readable = false;
84607
- return valid;
84644
+ return valid2;
84608
84645
  } catch (e5) {
84609
84646
  this.readable = false;
84610
84647
  this.emit("error", e5);
@@ -118107,6 +118144,22 @@ var init_crates = __esm({
118107
118144
  cratesConfig;
118108
118145
  /** GitHub repo configuration */
118109
118146
  githubRepo;
118147
+ /**
118148
+ * Read the version from Cargo.toml: the first top-level `version` key,
118149
+ * which is `[package]` or `[workspace.package]` in a typical manifest.
118150
+ *
118151
+ * @param rootDir - Project root directory
118152
+ * @returns The version, or undefined if there is no Cargo.toml or it has no
118153
+ * literal version (e.g. `version.workspace = true`)
118154
+ */
118155
+ static async readVersion(rootDir) {
118156
+ const cargoTomlPath = path11.join(rootDir, "Cargo.toml");
118157
+ if (!fs11.existsSync(cargoTomlPath)) {
118158
+ return void 0;
118159
+ }
118160
+ const content = fs11.readFileSync(cargoTomlPath, "utf-8");
118161
+ return /^\s*version\s*=\s*"([^"]+)"/m.exec(content)?.[1];
118162
+ }
118110
118163
  /**
118111
118164
  * Bump version in Cargo.toml using cargo set-version (from cargo-edit).
118112
118165
  *
@@ -118930,7 +118983,7 @@ var init_gcs2 = __esm({
118930
118983
  });
118931
118984
 
118932
118985
  // src/targets/gem.ts
118933
- var import_promises5, import_path11, DEFAULT_GEM_BIN, GEM_BIN, DEFAULT_GEM_REGEX, GemTarget;
118986
+ var import_promises5, import_path11, DEFAULT_GEM_BIN, GEM_BIN, GEMSPEC_VERSION_REGEX, VERSION_RB_REGEX, DEFAULT_GEM_REGEX, GemTarget;
118934
118987
  var init_gem = __esm({
118935
118988
  "src/targets/gem.ts"() {
118936
118989
  "use strict";
@@ -118944,10 +118997,50 @@ var init_gem = __esm({
118944
118997
  init_logger2();
118945
118998
  DEFAULT_GEM_BIN = "gem";
118946
118999
  GEM_BIN = process.env.GEM_BIN || DEFAULT_GEM_BIN;
119000
+ GEMSPEC_VERSION_REGEX = /^(\s*\w+\.version\s*=\s*["'])([^"']+)(["'])/m;
119001
+ VERSION_RB_REGEX = /^(\s*VERSION\s*=\s*["'])([^"']+)(["'])/m;
118947
119002
  DEFAULT_GEM_REGEX = /^.*(\.gem)$/;
118948
119003
  GemTarget = class _GemTarget extends BaseTarget {
118949
119004
  /** Target name */
118950
119005
  name = "gem";
119006
+ /**
119007
+ * Read the version from the first gemspec that bumpVersion() would update,
119008
+ * or from a lib/.../version.rb next to it when the gemspec references a
119009
+ * constant such as `MyGem::VERSION`.
119010
+ *
119011
+ * @param rootDir - Project root directory
119012
+ * @returns The version, or undefined if no gemspec declares a literal one
119013
+ */
119014
+ static async readVersion(rootDir) {
119015
+ const gemspecFiles = await findFiles(rootDir, {
119016
+ maxDepth: 2,
119017
+ fileFilter: (name) => name.endsWith(".gemspec")
119018
+ });
119019
+ for (const gemspecPath of gemspecFiles) {
119020
+ const content = await (0, import_promises5.readFile)(gemspecPath, "utf-8");
119021
+ const version2 = GEMSPEC_VERSION_REGEX.exec(content)?.[2] ?? await _GemTarget.readVersionRb((0, import_path11.join)((0, import_path11.dirname)(gemspecPath), "lib"));
119022
+ if (version2) {
119023
+ return version2;
119024
+ }
119025
+ }
119026
+ return void 0;
119027
+ }
119028
+ static async readVersionRb(dir) {
119029
+ let entries;
119030
+ try {
119031
+ entries = await (0, import_promises5.readdir)(dir, { withFileTypes: true });
119032
+ } catch {
119033
+ return void 0;
119034
+ }
119035
+ for (const entry of entries) {
119036
+ const fullPath = (0, import_path11.join)(dir, entry.name);
119037
+ const version2 = entry.isDirectory() ? await _GemTarget.readVersionRb(fullPath) : entry.name === "version.rb" ? VERSION_RB_REGEX.exec(await (0, import_promises5.readFile)(fullPath, "utf-8"))?.[2] : void 0;
119038
+ if (version2) {
119039
+ return version2;
119040
+ }
119041
+ }
119042
+ return void 0;
119043
+ }
118951
119044
  /**
118952
119045
  * Bump version in Ruby gem project files.
118953
119046
  *
@@ -118969,9 +119062,11 @@ var init_gem = __esm({
118969
119062
  let bumped = false;
118970
119063
  for (const gemspecPath of gemspecFiles) {
118971
119064
  const content = await (0, import_promises5.readFile)(gemspecPath, "utf-8");
118972
- const versionRegex = /^(\s*\w+\.version\s*=\s*["'])([^"']+)(["'])/m;
118973
- if (versionRegex.test(content)) {
118974
- const newContent = content.replace(versionRegex, `$1${newVersion}$3`);
119065
+ if (GEMSPEC_VERSION_REGEX.test(content)) {
119066
+ const newContent = content.replace(
119067
+ GEMSPEC_VERSION_REGEX,
119068
+ `$1${newVersion}$3`
119069
+ );
118975
119070
  if (newContent !== content) {
118976
119071
  logger.debug(`Updating version in ${gemspecPath} to ${newVersion}`);
118977
119072
  await (0, import_promises5.writeFile)(gemspecPath, newContent);
@@ -119009,9 +119104,11 @@ var init_gem = __esm({
119009
119104
  updated = subUpdated || updated;
119010
119105
  } else if (entry.name === "version.rb") {
119011
119106
  const content = await (0, import_promises5.readFile)(fullPath, "utf-8");
119012
- const versionRegex = /^(\s*VERSION\s*=\s*["'])([^"']+)(["'])/m;
119013
- if (versionRegex.test(content)) {
119014
- const newContent = content.replace(versionRegex, `$1${newVersion}$3`);
119107
+ if (VERSION_RB_REGEX.test(content)) {
119108
+ const newContent = content.replace(
119109
+ VERSION_RB_REGEX,
119110
+ `$1${newVersion}$3`
119111
+ );
119015
119112
  if (newContent !== content) {
119016
119113
  logger.debug(`Updating VERSION in ${fullPath} to ${newVersion}`);
119017
119114
  await (0, import_promises5.writeFile)(fullPath, newContent);
@@ -121373,6 +121470,18 @@ async function fetchPRCoAuthors(prNumber) {
121373
121470
  function isBumpType(value) {
121374
121471
  return BUMP_TYPES.has(value);
121375
121472
  }
121473
+ function hasSkipChangelogMagicWord(text) {
121474
+ if (!text?.includes(SKIP_CHANGELOG_MAGIC_WORD)) {
121475
+ return false;
121476
+ }
121477
+ let found = false;
121478
+ d5.walkTokens(d5.lexer(text), (token) => {
121479
+ if ((token.type === "text" || token.type === "html") && !("tokens" in token && token.tokens?.length) && token.raw.includes(SKIP_CHANGELOG_MAGIC_WORD)) {
121480
+ found = true;
121481
+ }
121482
+ });
121483
+ return found;
121484
+ }
121376
121485
  function getLineNumber(text, charIndex) {
121377
121486
  let count = 1;
121378
121487
  for (let i5 = 0; i5 < charIndex && i5 < text.length; i5++) {
@@ -121825,7 +121934,7 @@ function getNormalizedReleaseConfig() {
121825
121934
  return normalized;
121826
121935
  }
121827
121936
  function shouldExcludePR(labels, author, config, body) {
121828
- if (body?.includes(SKIP_CHANGELOG_MAGIC_WORD)) {
121937
+ if (hasSkipChangelogMagicWord(body)) {
121829
121938
  return true;
121830
121939
  }
121831
121940
  if (!config?.changelog) {
@@ -122072,7 +122181,7 @@ async function generateChangelogWithHighlight(git, rev, currentPRNumber) {
122072
122181
  }
122073
122182
  async function fetchRawCommitInfo(git, rev, until) {
122074
122183
  const gitCommits = (await getChangesSince(git, rev, until)).filter(
122075
- ({ body }) => !body.includes(SKIP_CHANGELOG_MAGIC_WORD)
122184
+ ({ body }) => !hasSkipChangelogMagicWord(body)
122076
122185
  );
122077
122186
  const githubCommits = await getPRAndLabelsFromCommit(
122078
122187
  gitCommits.map(({ hash }) => hash)
@@ -123462,6 +123571,15 @@ var init_npm = __esm({
123462
123571
  return expandedTarget;
123463
123572
  });
123464
123573
  }
123574
+ /**
123575
+ * Read the version from package.json.
123576
+ *
123577
+ * @param rootDir - Project root directory
123578
+ * @returns The version, or undefined if there is no readable package.json
123579
+ */
123580
+ static async readVersion(rootDir) {
123581
+ return _NpmTarget.readPackageJsonVersion((0, import_path14.join)(rootDir, "package.json"));
123582
+ }
123465
123583
  /**
123466
123584
  * Bump version in package.json using npm or yarn.
123467
123585
  * Supports workspaces - bumps root and all workspace packages.
@@ -124271,7 +124389,7 @@ function normalizeNugetVersion(version2) {
124271
124389
  const withoutMetadata = version2.split("+")[0];
124272
124390
  const dash = withoutMetadata.indexOf("-");
124273
124391
  const release3 = dash === -1 ? withoutMetadata : withoutMetadata.slice(0, dash);
124274
- const prerelease = dash === -1 ? "" : withoutMetadata.slice(dash);
124392
+ const prerelease2 = dash === -1 ? "" : withoutMetadata.slice(dash);
124275
124393
  const parts = release3.split(".").map((part) => /^\d+$/.test(part) ? String(parseInt(part, 10)) : part);
124276
124394
  while (parts.length < 3) {
124277
124395
  parts.push("0");
@@ -124279,7 +124397,7 @@ function normalizeNugetVersion(version2) {
124279
124397
  if (parts.length === 4 && parts[3] === "0") {
124280
124398
  parts.pop();
124281
124399
  }
124282
- return `${parts.join(".")}${prerelease}`.toLowerCase();
124400
+ return `${parts.join(".")}${prerelease2}`.toLowerCase();
124283
124401
  }
124284
124402
  async function readNupkgIdentity(nupkgPath) {
124285
124403
  const zip = new import_node_stream_zip2.default.async({ file: nupkgPath });
@@ -124446,6 +124564,9 @@ var init_nugetRegistry = __esm({
124446
124564
  });
124447
124565
 
124448
124566
  // src/targets/nuget.ts
124567
+ function readXmlTag(content, tag2) {
124568
+ return new RegExp(`<${tag2}>([^<]+)</${tag2}>`).exec(content)?.[1].trim();
124569
+ }
124449
124570
  var import_fs18, import_path15, import_crypto6, NUGET_DOTNET_BIN, DEFAULT_NUGET_SERVER_URL, DEFAULT_NUGET_REGEX, SYMBOLS_NUGET_REGEX, DOTNET_SPAWN_OPTIONS, NugetTarget;
124450
124571
  var init_nuget = __esm({
124451
124572
  "src/targets/nuget.ts"() {
@@ -124548,6 +124669,33 @@ var init_nuget = __esm({
124548
124669
  return expandedTarget;
124549
124670
  });
124550
124671
  }
124672
+ /**
124673
+ * Read the package version from Directory.Build.props, or from the first
124674
+ * .csproj that declares one, in the same order bumpVersion() edits them.
124675
+ *
124676
+ * @param rootDir - Project root directory
124677
+ * @returns The `<PackageVersion>`, `<Version>`, or `<VersionPrefix>` with
124678
+ * its `<VersionSuffix>`, or undefined if no .NET project file declares one
124679
+ */
124680
+ static async readVersion(rootDir) {
124681
+ const projectFiles = [
124682
+ "Directory.Build.props",
124683
+ ...(0, import_fs18.readdirSync)(rootDir).filter((f8) => f8.endsWith(".csproj"))
124684
+ ].map((file) => (0, import_path15.join)(rootDir, file)).filter((file) => (0, import_fs18.existsSync)(file));
124685
+ for (const file of projectFiles) {
124686
+ const content = (0, import_fs18.readFileSync)(file, "utf-8");
124687
+ const version2 = readXmlTag(content, "PackageVersion") ?? readXmlTag(content, "Version");
124688
+ if (version2) {
124689
+ return version2;
124690
+ }
124691
+ const prefix = readXmlTag(content, "VersionPrefix");
124692
+ if (prefix) {
124693
+ const suffix = readXmlTag(content, "VersionSuffix");
124694
+ return suffix ? `${prefix}-${suffix}` : prefix;
124695
+ }
124696
+ }
124697
+ return void 0;
124698
+ }
124551
124699
  /**
124552
124700
  * Bump version in .NET project files (.csproj, Directory.Build.props).
124553
124701
  *
@@ -124636,6 +124784,12 @@ var init_nuget = __esm({
124636
124784
  if (!updated) {
124637
124785
  return false;
124638
124786
  }
124787
+ if (/<VersionPrefix>/.test(newContent)) {
124788
+ newContent = newContent.replace(
124789
+ /(<VersionSuffix>)[^<]*(<\/VersionSuffix>)/g,
124790
+ "$1$2"
124791
+ );
124792
+ }
124639
124793
  if (newContent === content) {
124640
124794
  return true;
124641
124795
  }
@@ -124930,7 +125084,7 @@ var init_sentryPypi = __esm({
124930
125084
  });
124931
125085
 
124932
125086
  // src/targets/pypi.ts
124933
- var import_fs20, import_path17, DEFAULT_TWINE_BIN, TWINE_BIN, DEFAULT_PYPI_REGEX, PypiTarget;
125087
+ var import_fs20, import_path17, DEFAULT_TWINE_BIN, TWINE_BIN, PYPROJECT_VERSION_REGEX, DEFAULT_PYPI_REGEX, PypiTarget;
124934
125088
  var init_pypi = __esm({
124935
125089
  "src/targets/pypi.ts"() {
124936
125090
  "use strict";
@@ -124943,12 +125097,31 @@ var init_pypi = __esm({
124943
125097
  init_logger2();
124944
125098
  DEFAULT_TWINE_BIN = "twine";
124945
125099
  TWINE_BIN = process.env.TWINE_BIN || DEFAULT_TWINE_BIN;
125100
+ PYPROJECT_VERSION_REGEX = /^(\s*version\s*=\s*["'])([^"']+)(["'])/m;
124946
125101
  DEFAULT_PYPI_REGEX = /^.*\d\.\d.*(\.whl|\.gz|\.zip)$/;
124947
125102
  PypiTarget = class _PypiTarget extends BaseTarget {
124948
125103
  /** Target name */
124949
125104
  name = "pypi";
124950
125105
  /** Target options */
124951
125106
  pypiConfig;
125107
+ /**
125108
+ * Read the static version from pyproject.toml.
125109
+ *
125110
+ * @param rootDir - Project root directory
125111
+ * @returns The version, or undefined if there is no pyproject.toml, the
125112
+ * version is dynamic, or setuptools_scm derives it from git tags
125113
+ */
125114
+ static async readVersion(rootDir) {
125115
+ const pyprojectPath = (0, import_path17.join)(rootDir, "pyproject.toml");
125116
+ if (!(0, import_fs20.existsSync)(pyprojectPath)) {
125117
+ return void 0;
125118
+ }
125119
+ const content = (0, import_fs20.readFileSync)(pyprojectPath, "utf-8");
125120
+ if (content.includes("[tool.setuptools_scm]")) {
125121
+ return void 0;
125122
+ }
125123
+ return PYPROJECT_VERSION_REGEX.exec(content)?.[2];
125124
+ }
124952
125125
  /**
124953
125126
  * Bump version in Python project files.
124954
125127
  *
@@ -125019,14 +125192,16 @@ var init_pypi = __esm({
125019
125192
  * This handles standard PEP 621 [project] section with version field
125020
125193
  */
125021
125194
  static bumpDirectToml(pyprojectPath, content, newVersion) {
125022
- const versionRegex = /^(\s*version\s*=\s*["'])([^"']+)(["'])/m;
125023
- if (!versionRegex.test(content)) {
125195
+ if (!PYPROJECT_VERSION_REGEX.test(content)) {
125024
125196
  logger.debug(
125025
125197
  "pyproject.toml has [project] section but no version field found"
125026
125198
  );
125027
125199
  return false;
125028
125200
  }
125029
- const newContent = content.replace(versionRegex, `$1${newVersion}$3`);
125201
+ const newContent = content.replace(
125202
+ PYPROJECT_VERSION_REGEX,
125203
+ `$1${newVersion}$3`
125204
+ );
125030
125205
  if (newContent === content) {
125031
125206
  logger.debug("Version already set to target value");
125032
125207
  return true;
@@ -138439,7 +138614,7 @@ var require_fxp = __commonJS({
138439
138614
  class dt3 {
138440
138615
  constructor(t7, e6) {
138441
138616
  var n6;
138442
- this.options = t7, this.currentNode = null, this.tagsNodeStack = [], this.parseXml = Nt4, this.parseTextData = ft3, this.resolveNameSpace = gt3, this.buildAttributesMap = xt3, this.isItStopNode = wt3, this.replaceEntitiesValue = yt2, this.readStopNodeData = At4, this.saveTextToParentTag = Et3, this.addChild = bt3, this.ignoreAttributesFn = "function" == typeof (n6 = this.options.ignoreAttributes) ? n6 : Array.isArray(n6) ? (t8) => {
138617
+ this.options = t7, this.currentNode = null, this.tagsNodeStack = [], this.parseXml = Nt4, this.parseTextData = ft3, this.resolveNameSpace = gt4, this.buildAttributesMap = xt3, this.isItStopNode = wt3, this.replaceEntitiesValue = yt2, this.readStopNodeData = At4, this.saveTextToParentTag = Et3, this.addChild = bt3, this.ignoreAttributesFn = "function" == typeof (n6 = this.options.ignoreAttributes) ? n6 : Array.isArray(n6) ? (t8) => {
138443
138618
  for (const e7 of n6) {
138444
138619
  if ("string" == typeof e7 && t8 === e7) return true;
138445
138620
  if (e7 instanceof RegExp && e7.test(t8)) return true;
@@ -138465,7 +138640,7 @@ var require_fxp = __commonJS({
138465
138640
  return null == h9 ? t7 : typeof h9 != typeof t7 || h9 !== t7 ? h9 : a6.trimValues || t7.trim() === t7 ? Tt3(t7, a6.parseTagValue, a6.numberParseOptions) : t7;
138466
138641
  }
138467
138642
  }
138468
- function gt3(t7) {
138643
+ function gt4(t7) {
138469
138644
  if (this.options.removeNSPrefix) {
138470
138645
  const e6 = t7.split(":"), n6 = "/" === t7.charAt(0) ? "/" : "";
138471
138646
  if ("xmlns" === e6[0]) return "";
@@ -158136,6 +158311,22 @@ var init_pubDev = __esm({
158136
158311
  pubDevConfig;
158137
158312
  /** GitHub repo configuration */
158138
158313
  githubRepo;
158314
+ /**
158315
+ * Read the version from pubspec.yaml.
158316
+ *
158317
+ * @param rootDir - Project root directory
158318
+ * @returns The version, or undefined if there is no readable pubspec.yaml
158319
+ * or it has no version
158320
+ */
158321
+ static async readVersion(rootDir) {
158322
+ const pubspecPath = (0, import_path21.join)(rootDir, "pubspec.yaml");
158323
+ if (!(0, import_fs25.existsSync)(pubspecPath)) {
158324
+ return void 0;
158325
+ }
158326
+ const pubspec = load((0, import_fs25.readFileSync)(pubspecPath, "utf-8"));
158327
+ const version2 = pubspec?.version;
158328
+ return typeof version2 === "string" ? version2 : void 0;
158329
+ }
158139
158330
  /**
158140
158331
  * Bump version in pubspec.yaml for Dart/Flutter projects.
158141
158332
  *
@@ -158330,7 +158521,7 @@ var init_pubDev = __esm({
158330
158521
  });
158331
158522
 
158332
158523
  // src/targets/hex.ts
158333
- var import_fs26, import_path22, DEFAULT_MIX_BIN, MIX_BIN, HexTarget;
158524
+ var import_fs26, import_path22, DEFAULT_MIX_BIN, MIX_BIN, MIX_VERSION_PATTERNS, HexTarget;
158334
158525
  var init_hex = __esm({
158335
158526
  "src/targets/hex.ts"() {
158336
158527
  "use strict";
@@ -158345,11 +158536,36 @@ var init_hex = __esm({
158345
158536
  init_logger2();
158346
158537
  DEFAULT_MIX_BIN = "mix";
158347
158538
  MIX_BIN = process.env.MIX_BIN || DEFAULT_MIX_BIN;
158539
+ MIX_VERSION_PATTERNS = [
158540
+ /^(\s*version:\s*["'])([^"']+)(["'])/m,
158541
+ /^(\s*@version\s+["'])([^"']+)(["'])/m
158542
+ ];
158348
158543
  HexTarget = class extends BaseTarget {
158349
158544
  /** Target name */
158350
158545
  name = "hex";
158351
158546
  /** GitHub repo configuration */
158352
158547
  githubRepo;
158548
+ /**
158549
+ * Read the version from mix.exs.
158550
+ *
158551
+ * @param rootDir - Project root directory
158552
+ * @returns The version, or undefined if there is no mix.exs or it has no
158553
+ * literal `version:` or `@version`
158554
+ */
158555
+ static async readVersion(rootDir) {
158556
+ const mixExsPath = (0, import_path22.join)(rootDir, "mix.exs");
158557
+ if (!(0, import_fs26.existsSync)(mixExsPath)) {
158558
+ return void 0;
158559
+ }
158560
+ const content = (0, import_fs26.readFileSync)(mixExsPath, "utf-8");
158561
+ for (const pattern of MIX_VERSION_PATTERNS) {
158562
+ const version2 = pattern.exec(content)?.[2];
158563
+ if (version2) {
158564
+ return version2;
158565
+ }
158566
+ }
158567
+ return void 0;
158568
+ }
158353
158569
  /**
158354
158570
  * Bump version in mix.exs for Elixir projects.
158355
158571
  *
@@ -158364,13 +158580,9 @@ var init_hex = __esm({
158364
158580
  return false;
158365
158581
  }
158366
158582
  const content = (0, import_fs26.readFileSync)(mixExsPath, "utf-8");
158367
- const versionPatterns = [
158368
- /^(\s*version:\s*["'])([^"']+)(["'])/m,
158369
- /^(\s*@version\s+["'])([^"']+)(["'])/m
158370
- ];
158371
158583
  let newContent = content;
158372
158584
  let updated = false;
158373
- for (const pattern of versionPatterns) {
158585
+ for (const pattern of MIX_VERSION_PATTERNS) {
158374
158586
  if (pattern.test(newContent)) {
158375
158587
  newContent = newContent.replace(pattern, `$1${newVersion}$3`);
158376
158588
  updated = true;
@@ -161070,7 +161282,7 @@ var require_jsonfile = __commonJS({
161070
161282
  callback(null, obj);
161071
161283
  });
161072
161284
  }
161073
- function readFileSync22(file, options) {
161285
+ function readFileSync23(file, options) {
161074
161286
  options = options || {};
161075
161287
  if (typeof options === "string") {
161076
161288
  options = { encoding: options };
@@ -161136,7 +161348,7 @@ var require_jsonfile = __commonJS({
161136
161348
  }
161137
161349
  var jsonfile = {
161138
161350
  readFile: readFile7,
161139
- readFileSync: readFileSync22,
161351
+ readFileSync: readFileSync23,
161140
161352
  writeFile: writeFile5,
161141
161353
  writeFileSync: writeFileSync9
161142
161354
  };
@@ -169179,7 +169391,7 @@ var require_jsonfile3 = __commonJS({
169179
169391
  return obj;
169180
169392
  }
169181
169393
  var readFile7 = universalify.fromPromise(_readFile);
169182
- function readFileSync22(file, options = {}) {
169394
+ function readFileSync23(file, options = {}) {
169183
169395
  if (typeof options === "string") {
169184
169396
  options = { encoding: options };
169185
169397
  }
@@ -169211,7 +169423,7 @@ var require_jsonfile3 = __commonJS({
169211
169423
  }
169212
169424
  module2.exports = {
169213
169425
  readFile: readFile7,
169214
- readFileSync: readFileSync22,
169426
+ readFileSync: readFileSync23,
169215
169427
  writeFile: writeFile5,
169216
169428
  writeFileSync: writeFileSync9
169217
169429
  };
@@ -169551,14 +169763,14 @@ var require_version = __commonJS({
169551
169763
  ].join("");
169552
169764
  module2.exports = {
169553
169765
  VERSION_PATTERN,
169554
- valid,
169766
+ valid: valid2,
169555
169767
  clean,
169556
169768
  explain,
169557
169769
  parse: parse15,
169558
169770
  stringify: stringify4
169559
169771
  };
169560
169772
  var validRegex = new RegExp("^" + VERSION_PATTERN + "$", "i");
169561
- function valid(version2) {
169773
+ function valid2(version2) {
169562
169774
  return validRegex.test(version2) ? version2 : null;
169563
169775
  }
169564
169776
  var cleanRegex = new RegExp("^\\s*" + VERSION_PATTERN + "\\s*$", "i");
@@ -169684,13 +169896,13 @@ var require_operator = __commonJS({
169684
169896
  eq,
169685
169897
  ne: ne6,
169686
169898
  ge: ge4,
169687
- gt: gt3,
169899
+ gt: gt4,
169688
169900
  "<": lt4,
169689
169901
  "<=": le4,
169690
169902
  "==": eq,
169691
169903
  "!=": ne6,
169692
169904
  ">=": ge4,
169693
- ">": gt3,
169905
+ ">": gt4,
169694
169906
  "===": arbitrary
169695
169907
  };
169696
169908
  function lt4(version2, other) {
@@ -169708,7 +169920,7 @@ var require_operator = __commonJS({
169708
169920
  function ge4(version2, other) {
169709
169921
  return compare(version2, other) >= 0;
169710
169922
  }
169711
- function gt3(version2, other) {
169923
+ function gt4(version2, other) {
169712
169924
  return compare(version2, other) > 0;
169713
169925
  }
169714
169926
  function arbitrary(version2, other) {
@@ -169943,7 +170155,7 @@ var require_semantic = __commonJS({
169943
170155
  major: major2,
169944
170156
  minor,
169945
170157
  patch,
169946
- inc: inc3
170158
+ inc: inc4
169947
170159
  };
169948
170160
  function major2(input) {
169949
170161
  const version2 = explain(input);
@@ -169972,7 +170184,7 @@ var require_semantic = __commonJS({
169972
170184
  }
169973
170185
  return version2.release[2];
169974
170186
  }
169975
- function inc3(input, release3, preReleaseIdentifier) {
170187
+ function inc4(input, release3, preReleaseIdentifier) {
169976
170188
  let identifier = preReleaseIdentifier || `a`;
169977
170189
  const version2 = parse15(input);
169978
170190
  if (!version2) {
@@ -170091,8 +170303,8 @@ var require_semantic = __commonJS({
170091
170303
  var require_pep440 = __commonJS({
170092
170304
  "node_modules/.pnpm/@renovatebot+pep440@4.2.1/node_modules/@renovatebot/pep440/index.js"(exports2, module2) {
170093
170305
  init_import_meta_url();
170094
- var { valid, clean, explain, parse: parse15 } = require_version();
170095
- var { lt: lt4, le: le4, eq, ne: ne6, ge: ge4, gt: gt3, compare, rcompare } = require_operator();
170306
+ var { valid: valid2, clean, explain, parse: parse15 } = require_version();
170307
+ var { lt: lt4, le: le4, eq, ne: ne6, ge: ge4, gt: gt4, compare, rcompare } = require_operator();
170096
170308
  var {
170097
170309
  filter: filter2,
170098
170310
  maxSatisfying,
@@ -170101,10 +170313,10 @@ var require_pep440 = __commonJS({
170101
170313
  satisfies: satisfies2,
170102
170314
  validRange
170103
170315
  } = require_specifier();
170104
- var { major: major2, minor, patch, inc: inc3 } = require_semantic();
170316
+ var { major: major2, minor, patch, inc: inc4 } = require_semantic();
170105
170317
  module2.exports = {
170106
170318
  // version
170107
- valid,
170319
+ valid: valid2,
170108
170320
  clean,
170109
170321
  explain,
170110
170322
  parse: parse15,
@@ -170117,7 +170329,7 @@ var require_pep440 = __commonJS({
170117
170329
  neq: ne6,
170118
170330
  ge: ge4,
170119
170331
  gte: ge4,
170120
- gt: gt3,
170332
+ gt: gt4,
170121
170333
  compare,
170122
170334
  rcompare,
170123
170335
  // range
@@ -170131,7 +170343,7 @@ var require_pep440 = __commonJS({
170131
170343
  major: major2,
170132
170344
  minor,
170133
170345
  patch,
170134
- inc: inc3
170346
+ inc: inc4
170135
170347
  };
170136
170348
  }
170137
170349
  });
@@ -174233,7 +174445,7 @@ var require_dist11 = __commonJS({
174233
174445
  return mod.getStringConstant(source, name) ?? null;
174234
174446
  }
174235
174447
  var import_fs34 = __toESM2(require("fs"), 1);
174236
- var import_path34 = require("path");
174448
+ var import_path35 = require("path");
174237
174449
  async function extractImports(source) {
174238
174450
  if (!source.includes("import")) {
174239
174451
  return [];
@@ -174262,21 +174474,21 @@ var require_dist11 = __commonJS({
174262
174474
  return pending;
174263
174475
  }
174264
174476
  async function resolveNamePartsUncached(parts, searchDirs, cache4) {
174265
- const rel = (0, import_path34.join)(...parts);
174477
+ const rel = (0, import_path35.join)(...parts);
174266
174478
  for (const root of searchDirs) {
174267
174479
  let target = null;
174268
174480
  let targetKind = null;
174269
- const candidateInit = (0, import_path34.join)(root, rel, "__init__.py");
174481
+ const candidateInit = (0, import_path35.join)(root, rel, "__init__.py");
174270
174482
  if (await statKind(candidateInit, cache4) === "file") {
174271
174483
  target = candidateInit;
174272
174484
  targetKind = "file";
174273
174485
  } else {
174274
- const candidateModule = (0, import_path34.join)(root, `${rel}.py`);
174486
+ const candidateModule = (0, import_path35.join)(root, `${rel}.py`);
174275
174487
  if (await statKind(candidateModule, cache4) === "file") {
174276
174488
  target = candidateModule;
174277
174489
  targetKind = "file";
174278
- } else if (await statKind((0, import_path34.join)(root, rel), cache4) === "dir") {
174279
- target = (0, import_path34.join)(root, rel);
174490
+ } else if (await statKind((0, import_path35.join)(root, rel), cache4) === "dir") {
174491
+ target = (0, import_path35.join)(root, rel);
174280
174492
  targetKind = "dir";
174281
174493
  }
174282
174494
  }
@@ -174284,8 +174496,8 @@ var require_dist11 = __commonJS({
174284
174496
  const parentChain = [];
174285
174497
  let acc = root;
174286
174498
  for (const part of parts.slice(0, -1)) {
174287
- acc = (0, import_path34.join)(acc, part);
174288
- const init2 = (0, import_path34.join)(acc, "__init__.py");
174499
+ acc = (0, import_path35.join)(acc, part);
174500
+ const init2 = (0, import_path35.join)(acc, "__init__.py");
174289
174501
  if (await statKind(init2, cache4) === "file") {
174290
174502
  parentChain.push(init2);
174291
174503
  }
@@ -174322,8 +174534,8 @@ var require_dist11 = __commonJS({
174322
174534
  function submoduleDir(target, targetKind) {
174323
174535
  if (targetKind === "dir")
174324
174536
  return target;
174325
- if (targetKind === "file" && target.endsWith(`${import_path34.sep}__init__.py`)) {
174326
- return (0, import_path34.dirname)(target);
174537
+ if (targetKind === "file" && target.endsWith(`${import_path35.sep}__init__.py`)) {
174538
+ return (0, import_path35.dirname)(target);
174327
174539
  }
174328
174540
  return null;
174329
174541
  }
@@ -174332,9 +174544,9 @@ var require_dist11 = __commonJS({
174332
174544
  let search = roots;
174333
174545
  let searchKey = rootsKey;
174334
174546
  if (stmt.level > 0) {
174335
- let base = (0, import_path34.dirname)(importerPath);
174547
+ let base = (0, import_path35.dirname)(importerPath);
174336
174548
  for (let i5 = 1; i5 < stmt.level; i5++) {
174337
- base = (0, import_path34.dirname)(base);
174549
+ base = (0, import_path35.dirname)(base);
174338
174550
  }
174339
174551
  search = [base];
174340
174552
  searchKey = base;
@@ -174377,14 +174589,14 @@ var require_dist11 = __commonJS({
174377
174589
  return [...resolved];
174378
174590
  }
174379
174591
  function isModuleNameSeed(seed) {
174380
- return !(0, import_path34.isAbsolute)(seed) && /^[A-Za-z_][\w]*(\.[A-Za-z_][\w]*)*$/.test(seed);
174592
+ return !(0, import_path35.isAbsolute)(seed) && /^[A-Za-z_][\w]*(\.[A-Za-z_][\w]*)*$/.test(seed);
174381
174593
  }
174382
174594
  async function collectImportClosure({
174383
174595
  seeds,
174384
174596
  searchRoots,
174385
174597
  maxFiles = DEFAULT_MAX_FILES
174386
174598
  }) {
174387
- const roots = searchRoots.map((r6) => (0, import_path34.resolve)(r6));
174599
+ const roots = searchRoots.map((r6) => (0, import_path35.resolve)(r6));
174388
174600
  const rootsKey = roots.join("\0");
174389
174601
  const cache4 = {
174390
174602
  statKinds: /* @__PURE__ */ new Map(),
@@ -174407,7 +174619,7 @@ var require_dist11 = __commonJS({
174407
174619
  frontier.push(...name.parentChain);
174408
174620
  }
174409
174621
  } else {
174410
- const seedPath = (0, import_path34.resolve)(seed);
174622
+ const seedPath = (0, import_path35.resolve)(seed);
174411
174623
  if (await statKind(seedPath, cache4) === "file") {
174412
174624
  frontier.push(seedPath);
174413
174625
  }
@@ -177157,7 +177369,7 @@ var require_dist12 = __commonJS({
177157
177369
  pna.nextTick(cb, er3);
177158
177370
  }
177159
177371
  function validChunk(stream2, state2, chunk, cb) {
177160
- var valid = true;
177372
+ var valid2 = true;
177161
177373
  var er3 = false;
177162
177374
  if (chunk === null) {
177163
177375
  er3 = new TypeError("May not write null values to stream");
@@ -177167,9 +177379,9 @@ var require_dist12 = __commonJS({
177167
177379
  if (er3) {
177168
177380
  stream2.emit("error", er3);
177169
177381
  pna.nextTick(cb, er3);
177170
- valid = false;
177382
+ valid2 = false;
177171
177383
  }
177172
- return valid;
177384
+ return valid2;
177173
177385
  }
177174
177386
  Writable3.prototype.write = function(chunk, encoding, cb) {
177175
177387
  var state2 = this._writableState;
@@ -181158,7 +181370,7 @@ var require_dist12 = __commonJS({
181158
181370
  return obj;
181159
181371
  }
181160
181372
  var readFile32 = universalify.fromPromise(_readFile);
181161
- function readFileSync22(file, options = {}) {
181373
+ function readFileSync23(file, options = {}) {
181162
181374
  if (typeof options === "string") {
181163
181375
  options = { encoding: options };
181164
181376
  }
@@ -181190,7 +181402,7 @@ var require_dist12 = __commonJS({
181190
181402
  }
181191
181403
  module22.exports = {
181192
181404
  readFile: readFile32,
181193
- readFileSync: readFileSync22,
181405
+ readFileSync: readFileSync23,
181194
181406
  writeFile: writeFile5,
181195
181407
  writeFileSync: writeFileSync9
181196
181408
  };
@@ -186682,8 +186894,8 @@ var require_dist12 = __commonJS({
186682
186894
  return null;
186683
186895
  }
186684
186896
  }
186685
- exports3.valid = valid;
186686
- function valid(version2, options) {
186897
+ exports3.valid = valid2;
186898
+ function valid2(version2, options) {
186687
186899
  var v12 = parse62(version2, options);
186688
186900
  return v12 ? v12.version : null;
186689
186901
  }
@@ -186882,8 +187094,8 @@ var require_dist12 = __commonJS({
186882
187094
  this.raw = this.version;
186883
187095
  return this;
186884
187096
  };
186885
- exports3.inc = inc3;
186886
- function inc3(version2, release3, loose, identifier) {
187097
+ exports3.inc = inc4;
187098
+ function inc4(version2, release3, loose, identifier) {
186887
187099
  if (typeof loose === "string") {
186888
187100
  identifier = loose;
186889
187101
  loose = void 0;
@@ -186967,8 +187179,8 @@ var require_dist12 = __commonJS({
186967
187179
  return exports3.rcompare(a5, b9, loose);
186968
187180
  });
186969
187181
  }
186970
- exports3.gt = gt3;
186971
- function gt3(a5, b9, loose) {
187182
+ exports3.gt = gt4;
187183
+ function gt4(a5, b9, loose) {
186972
187184
  return compare(a5, b9, loose) > 0;
186973
187185
  }
186974
187186
  exports3.lt = lt4;
@@ -187013,7 +187225,7 @@ var require_dist12 = __commonJS({
187013
187225
  case "!=":
187014
187226
  return neq(a5, b9, loose);
187015
187227
  case ">":
187016
- return gt3(a5, b9, loose);
187228
+ return gt4(a5, b9, loose);
187017
187229
  case ">=":
187018
187230
  return gte2(a5, b9, loose);
187019
187231
  case "<":
@@ -187482,7 +187694,7 @@ var require_dist12 = __commonJS({
187482
187694
  compver.raw = compver.format();
187483
187695
  case "":
187484
187696
  case ">=":
187485
- if (!minver || gt3(minver, compver)) {
187697
+ if (!minver || gt4(minver, compver)) {
187486
187698
  minver = compver;
187487
187699
  }
187488
187700
  break;
@@ -187522,7 +187734,7 @@ var require_dist12 = __commonJS({
187522
187734
  var gtfn, ltefn, ltfn, comp, ecomp;
187523
187735
  switch (hilo) {
187524
187736
  case ">":
187525
- gtfn = gt3;
187737
+ gtfn = gt4;
187526
187738
  ltefn = lte2;
187527
187739
  ltfn = lt4;
187528
187740
  comp = ">";
@@ -187531,7 +187743,7 @@ var require_dist12 = __commonJS({
187531
187743
  case "<":
187532
187744
  gtfn = lt4;
187533
187745
  ltefn = gte2;
187534
- ltfn = gt3;
187746
+ ltfn = gt4;
187535
187747
  comp = "<";
187536
187748
  ecomp = "<=";
187537
187749
  break;
@@ -187568,8 +187780,8 @@ var require_dist12 = __commonJS({
187568
187780
  }
187569
187781
  return true;
187570
187782
  }
187571
- exports3.prerelease = prerelease;
187572
- function prerelease(version2, options) {
187783
+ exports3.prerelease = prerelease2;
187784
+ function prerelease2(version2, options) {
187573
187785
  var parsed = parse62(version2, options);
187574
187786
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
187575
187787
  }
@@ -187603,11 +187815,11 @@ var require_dist12 = __commonJS({
187603
187815
  var resolveCommand = require_resolveCommand();
187604
187816
  var escape2 = require_escape2();
187605
187817
  var readShebang = require_readShebang();
187606
- var semver3 = require_semver3();
187818
+ var semver5 = require_semver3();
187607
187819
  var isWin2 = process.platform === "win32";
187608
187820
  var isExecutableRegExp = /\.(?:com|exe)$/i;
187609
187821
  var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
187610
- var supportsShellOption = niceTry(() => semver3.satisfies(process.version, "^4.8.0 || ^5.7.0 || >= 6.0.0", true)) || false;
187822
+ var supportsShellOption = niceTry(() => semver5.satisfies(process.version, "^4.8.0 || ^5.7.0 || >= 6.0.0", true)) || false;
187611
187823
  function detectShebang(parsed) {
187612
187824
  parsed.file = resolveCommand(parsed);
187613
187825
  const shebang = parsed.file && readShebang(parsed.file);
@@ -187915,8 +188127,8 @@ var require_dist12 = __commonJS({
187915
188127
  return null;
187916
188128
  }
187917
188129
  }
187918
- exports3.valid = valid;
187919
- function valid(version2, options) {
188130
+ exports3.valid = valid2;
188131
+ function valid2(version2, options) {
187920
188132
  var v12 = parse62(version2, options);
187921
188133
  return v12 ? v12.version : null;
187922
188134
  }
@@ -188137,8 +188349,8 @@ var require_dist12 = __commonJS({
188137
188349
  this.raw = this.version;
188138
188350
  return this;
188139
188351
  };
188140
- exports3.inc = inc3;
188141
- function inc3(version2, release3, loose, identifier) {
188352
+ exports3.inc = inc4;
188353
+ function inc4(version2, release3, loose, identifier) {
188142
188354
  if (typeof loose === "string") {
188143
188355
  identifier = loose;
188144
188356
  loose = void 0;
@@ -188228,8 +188440,8 @@ var require_dist12 = __commonJS({
188228
188440
  return exports3.compareBuild(b9, a5, loose);
188229
188441
  });
188230
188442
  }
188231
- exports3.gt = gt3;
188232
- function gt3(a5, b9, loose) {
188443
+ exports3.gt = gt4;
188444
+ function gt4(a5, b9, loose) {
188233
188445
  return compare(a5, b9, loose) > 0;
188234
188446
  }
188235
188447
  exports3.lt = lt4;
@@ -188274,7 +188486,7 @@ var require_dist12 = __commonJS({
188274
188486
  case "!=":
188275
188487
  return neq(a5, b9, loose);
188276
188488
  case ">":
188277
- return gt3(a5, b9, loose);
188489
+ return gt4(a5, b9, loose);
188278
188490
  case ">=":
188279
188491
  return gte2(a5, b9, loose);
188280
188492
  case "<":
@@ -188771,7 +188983,7 @@ var require_dist12 = __commonJS({
188771
188983
  compver.raw = compver.format();
188772
188984
  case "":
188773
188985
  case ">=":
188774
- if (!minver || gt3(minver, compver)) {
188986
+ if (!minver || gt4(minver, compver)) {
188775
188987
  minver = compver;
188776
188988
  }
188777
188989
  break;
@@ -188811,7 +189023,7 @@ var require_dist12 = __commonJS({
188811
189023
  var gtfn, ltefn, ltfn, comp, ecomp;
188812
189024
  switch (hilo) {
188813
189025
  case ">":
188814
- gtfn = gt3;
189026
+ gtfn = gt4;
188815
189027
  ltefn = lte2;
188816
189028
  ltfn = lt4;
188817
189029
  comp = ">";
@@ -188820,7 +189032,7 @@ var require_dist12 = __commonJS({
188820
189032
  case "<":
188821
189033
  gtfn = lt4;
188822
189034
  ltefn = gte2;
188823
- ltfn = gt3;
189035
+ ltfn = gt4;
188824
189036
  comp = "<";
188825
189037
  ecomp = "<=";
188826
189038
  break;
@@ -188857,8 +189069,8 @@ var require_dist12 = __commonJS({
188857
189069
  }
188858
189070
  return true;
188859
189071
  }
188860
- exports3.prerelease = prerelease;
188861
- function prerelease(version2, options) {
189072
+ exports3.prerelease = prerelease2;
189073
+ function prerelease2(version2, options) {
188862
189074
  var parsed = parse62(version2, options);
188863
189075
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
188864
189076
  }
@@ -208038,7 +208250,7 @@ ${fields}`;
208038
208250
  var import_assert22 = __toESM2(require("assert"));
208039
208251
  var import_fs_extra = __toESM2(require_lib16());
208040
208252
  var import_multistream = __toESM2(require_multistream());
208041
- var import_path34 = __toESM2(require("path"));
208253
+ var import_path35 = __toESM2(require("path"));
208042
208254
  var import_async_sema = __toESM2(require_async_sema());
208043
208255
  var semaToPreventEMFILE = new import_async_sema.default(20);
208044
208256
  var FileFsRef = class _FileFsRef {
@@ -208080,7 +208292,7 @@ ${fields}`;
208080
208292
  (0, import_assert22.default)(typeof mode === "number");
208081
208293
  (0, import_assert22.default)(typeof stream2.pipe === "function");
208082
208294
  (0, import_assert22.default)(typeof fsPath === "string");
208083
- await import_fs_extra.default.mkdirp(import_path34.default.dirname(fsPath));
208295
+ await import_fs_extra.default.mkdirp(import_path35.default.dirname(fsPath));
208084
208296
  await new Promise((resolve11, reject) => {
208085
208297
  const dest = import_fs_extra.default.createWriteStream(fsPath, {
208086
208298
  mode: mode & 511
@@ -209038,12 +209250,12 @@ ${fields}`;
209038
209250
  }
209039
209251
  }
209040
209252
  };
209041
- var import_path35 = require("path");
209253
+ var import_path36 = require("path");
209042
209254
  var import_os5 = require("os");
209043
209255
  var import_fs_extra4 = __toESM2(require_lib16());
209044
209256
  async function getWritableDirectory() {
209045
209257
  const name = Math.floor(Math.random() * 2147483647).toString(16);
209046
- const directory = (0, import_path35.join)((0, import_os5.tmpdir)(), name);
209258
+ const directory = (0, import_path36.join)((0, import_os5.tmpdir)(), name);
209047
209259
  await (0, import_fs_extra4.mkdirp)(directory);
209048
209260
  return directory;
209049
209261
  }
@@ -213971,7 +214183,7 @@ var require_readdir_recursive = __commonJS({
213971
214183
  });
213972
214184
  module2.exports = __toCommonJS2(readdir_recursive_exports);
213973
214185
  var import_fs34 = __toESM2(require("fs"));
213974
- var import_path34 = __toESM2(require("path"));
214186
+ var import_path35 = __toESM2(require("path"));
213975
214187
  var import_minimatch8 = __toESM2(require_commonjs3());
213976
214188
  function patternMatcher(pattern) {
213977
214189
  return function(path20, stats) {
@@ -213999,7 +214211,7 @@ var require_readdir_recursive = __commonJS({
213999
214211
  return resolve11(list2);
214000
214212
  }
214001
214213
  files.forEach(function(file) {
214002
- const filePath = import_path34.default.join(path20, file);
214214
+ const filePath = import_path35.default.join(path20, file);
214003
214215
  import_fs34.default.lstat(filePath, function(_err, stats) {
214004
214216
  if (_err) {
214005
214217
  return reject(_err);
@@ -221800,7 +222012,7 @@ var require_utils10 = __commonJS({
221800
222012
  shouldInlineStaticFiles: () => shouldInlineStaticFiles
221801
222013
  });
221802
222014
  module2.exports = __toCommonJS2(utils_exports);
221803
- var import_path34 = require("path");
222015
+ var import_path35 = require("path");
221804
222016
  var import_stream10 = require("stream");
221805
222017
  var import_url13 = require("url");
221806
222018
  var import_ignore4 = __toESM2(require_ignore2());
@@ -221864,8 +222076,8 @@ var require_utils10 = __commonJS({
221864
222076
  };
221865
222077
  async function getUserIgnore(cwd) {
221866
222078
  const [vercelignore, nowignore] = await Promise.all([
221867
- maybeRead((0, import_path34.join)(cwd, ".vercelignore"), ""),
221868
- maybeRead((0, import_path34.join)(cwd, ".nowignore"), "")
222079
+ maybeRead((0, import_path35.join)(cwd, ".vercelignore"), ""),
222080
+ maybeRead((0, import_path35.join)(cwd, ".nowignore"), "")
221869
222081
  ]);
221870
222082
  if (vercelignore && nowignore) {
221871
222083
  throw new import_build_utils.NowBuildError({
@@ -221895,7 +222107,7 @@ var require_utils10 = __commonJS({
221895
222107
  debug4("Building file tree...");
221896
222108
  if (isDirectory && !Array.isArray(path20)) {
221897
222109
  const ignores2 = (absPath) => {
221898
- const rel = (0, import_path34.relative)(path20, absPath);
222110
+ const rel = (0, import_path35.relative)(path20, absPath);
221899
222111
  const ignored = ig.ignores(rel);
221900
222112
  if (ignored) {
221901
222113
  ignoreList.push(rel);
@@ -221906,7 +222118,7 @@ var require_utils10 = __commonJS({
221906
222118
  const refs = /* @__PURE__ */ new Set();
221907
222119
  if (prebuilt) {
221908
222120
  const vcConfigFilePaths = fileList.filter(
221909
- (file) => (0, import_path34.basename)(file) === ".vc-config.json"
222121
+ (file) => (0, import_path35.basename)(file) === ".vc-config.json"
221910
222122
  );
221911
222123
  const userIg = await getUserIgnore(path20);
221912
222124
  await Promise.all(
@@ -221916,9 +222128,9 @@ var require_utils10 = __commonJS({
221916
222128
  if (!config.filePathMap)
221917
222129
  return;
221918
222130
  for (const v12 of Object.values(config.filePathMap)) {
221919
- const absPath = (0, import_path34.join)(path20, v12);
221920
- const rel = (0, import_path34.relative)(path20, absPath);
221921
- if (rel.startsWith("..") || (0, import_path34.isAbsolute)(rel)) {
222131
+ const absPath = (0, import_path35.join)(path20, v12);
222132
+ const rel = (0, import_path35.relative)(path20, absPath);
222133
+ if (rel.startsWith("..") || (0, import_path35.isAbsolute)(rel)) {
221922
222134
  debug4(
221923
222135
  `Ignoring "filePathMap" entry "${v12}": resolves outside the deployment root`
221924
222136
  );
@@ -221936,7 +222148,7 @@ var require_utils10 = __commonJS({
221936
222148
  );
221937
222149
  try {
221938
222150
  let microfrontendConfigPath = (0, import_utils68.findConfig)({
221939
- dir: (0, import_path34.join)(path20, rootDirectory || "")
222151
+ dir: (0, import_path35.join)(path20, rootDirectory || "")
221940
222152
  });
221941
222153
  if (!microfrontendConfigPath && !rootDirectory && projectName) {
221942
222154
  microfrontendConfigPath = (0, import_utils68.findConfig)({
@@ -221954,7 +222166,7 @@ var require_utils10 = __commonJS({
221954
222166
  }
221955
222167
  }
221956
222168
  try {
221957
- const routesJsonPath = (0, import_path34.join)(path20, ".vercel", "routes.json");
222169
+ const routesJsonPath = (0, import_path35.join)(path20, ".vercel", "routes.json");
221958
222170
  const routesJsonContent = await maybeRead(routesJsonPath, null);
221959
222171
  if (routesJsonContent !== null) {
221960
222172
  refs.add(routesJsonPath);
@@ -221966,12 +222178,12 @@ var require_utils10 = __commonJS({
221966
222178
  if (prebuilt && bulkRedirectsPath) {
221967
222179
  try {
221968
222180
  const projectRoot = path20;
221969
- const bulkRedirectsFullPath = (0, import_path34.join)(
222181
+ const bulkRedirectsFullPath = (0, import_path35.join)(
221970
222182
  projectRoot,
221971
222183
  rootDirectory || "",
221972
222184
  bulkRedirectsPath
221973
222185
  );
221974
- const relativeFromRoot = (0, import_path34.relative)(projectRoot, bulkRedirectsFullPath);
222186
+ const relativeFromRoot = (0, import_path35.relative)(projectRoot, bulkRedirectsFullPath);
221975
222187
  if (relativeFromRoot.startsWith("..")) {
221976
222188
  debug4(
221977
222189
  `Skipping bulk redirects path "${bulkRedirectsPath}" - path traversal detected (resolves outside project root)`
@@ -222026,9 +222238,9 @@ var require_utils10 = __commonJS({
222026
222238
  if (typeof cwd !== "string") {
222027
222239
  throw new Error(`\`cwd\` must be a "string"`);
222028
222240
  }
222029
- const relOutputDir = (0, import_path34.relative)(cwd, vercelOutputDir);
222241
+ const relOutputDir = (0, import_path35.relative)(cwd, vercelOutputDir);
222030
222242
  ignores = ["*"];
222031
- const parts = relOutputDir.split(import_path34.sep);
222243
+ const parts = relOutputDir.split(import_path35.sep);
222032
222244
  parts.forEach((_5, i5) => {
222033
222245
  const level = parts.slice(0, i5 + 1).join("/");
222034
222246
  ignores.push(`!${level}`);
@@ -222068,8 +222280,8 @@ var require_utils10 = __commonJS({
222068
222280
  const files = await Promise.all(
222069
222281
  cwds.map(async (cwd2) => {
222070
222282
  const [vercelignore, nowignore] = await Promise.all([
222071
- maybeRead((0, import_path34.join)(cwd2, ".vercelignore"), ""),
222072
- maybeRead((0, import_path34.join)(cwd2, ".nowignore"), "")
222283
+ maybeRead((0, import_path35.join)(cwd2, ".vercelignore"), ""),
222284
+ maybeRead((0, import_path35.join)(cwd2, ".nowignore"), "")
222073
222285
  ]);
222074
222286
  if (vercelignore && nowignore) {
222075
222287
  throw new import_build_utils.NowBuildError({
@@ -222081,7 +222293,7 @@ var require_utils10 = __commonJS({
222081
222293
  return vercelignore || nowignore;
222082
222294
  })
222083
222295
  );
222084
- const isRustProject = (await Promise.all(cwds.map((cwd2) => (0, import_fs_extra.pathExists)((0, import_path34.join)(cwd2, "Cargo.toml"))))).some(Boolean);
222296
+ const isRustProject = (await Promise.all(cwds.map((cwd2) => (0, import_fs_extra.pathExists)((0, import_path35.join)(cwd2, "Cargo.toml"))))).some(Boolean);
222085
222297
  if (isRustProject) {
222086
222298
  ignores.push("/target");
222087
222299
  }
@@ -222163,9 +222375,9 @@ ${clearRelative(ignoreFile)}`);
222163
222375
  for (const name of file.names) {
222164
222376
  let fileName;
222165
222377
  if (clientOptions.isDirectory) {
222166
- fileName = typeof clientOptions.path === "string" ? (0, import_path34.relative)(clientOptions.path, name) : name;
222378
+ fileName = typeof clientOptions.path === "string" ? (0, import_path35.relative)(clientOptions.path, name) : name;
222167
222379
  } else {
222168
- const segments = name.split(import_path34.sep);
222380
+ const segments = name.split(import_path35.sep);
222169
222381
  fileName = segments[segments.length - 1];
222170
222382
  }
222171
222383
  const normalizedName = isWin ? fileName.replace(/\\/g, "/") : fileName;
@@ -223193,7 +223405,7 @@ var require_upload = __commonJS({
223193
223405
  var import_async_retry5 = __toESM2(require_lib15());
223194
223406
  var import_async_sema = require_lib12();
223195
223407
  var import_utils68 = require_utils10();
223196
- var import_errors49 = require_errors3();
223408
+ var import_errors50 = require_errors3();
223197
223409
  var import_deploy = require_deploy();
223198
223410
  var isClientNetworkError = (err) => {
223199
223411
  if (!(err instanceof Error)) {
@@ -223365,11 +223577,11 @@ var require_upload = __commonJS({
223365
223577
  `An internal error occurred in upload request. Not retrying...`
223366
223578
  );
223367
223579
  const { error: error3 } = await res.json();
223368
- err = new import_errors49.DeploymentError(error3);
223580
+ err = new import_errors50.DeploymentError(error3);
223369
223581
  } else {
223370
223582
  debug4(`A server error occurred in upload request. Retrying...`);
223371
223583
  const { error: error3 } = await res.json();
223372
- throw new import_errors49.DeploymentError(error3);
223584
+ throw new import_errors50.DeploymentError(error3);
223373
223585
  }
223374
223586
  } catch (e5) {
223375
223587
  debug4(`An unexpected error occurred in upload promise:
@@ -224116,7 +224328,7 @@ var require_stream_writable2 = __commonJS({
224116
224328
  pna.nextTick(cb, er3);
224117
224329
  }
224118
224330
  function validChunk(stream2, state2, chunk, cb) {
224119
- var valid = true;
224331
+ var valid2 = true;
224120
224332
  var er3 = false;
224121
224333
  if (chunk === null) {
224122
224334
  er3 = new TypeError("May not write null values to stream");
@@ -224126,9 +224338,9 @@ var require_stream_writable2 = __commonJS({
224126
224338
  if (er3) {
224127
224339
  stream2.emit("error", er3);
224128
224340
  pna.nextTick(cb, er3);
224129
- valid = false;
224341
+ valid2 = false;
224130
224342
  }
224131
- return valid;
224343
+ return valid2;
224132
224344
  }
224133
224345
  Writable3.prototype.write = function(chunk, encoding, cb) {
224134
224346
  var state2 = this._writableState;
@@ -228539,9 +228751,9 @@ var require_tar_fs = __commonJS({
228539
228751
  }, stat2);
228540
228752
  }
228541
228753
  var dir = path20.dirname(name);
228542
- validate4(xfs, dir, path20.join(cwd, "."), function(err, valid) {
228754
+ validate4(xfs, dir, path20.join(cwd, "."), function(err, valid2) {
228543
228755
  if (err) return next(err);
228544
- if (!valid) return next(new Error(dir + " is not a valid path"));
228756
+ if (!valid2) return next(new Error(dir + " is not a valid path"));
228545
228757
  mkdirfix(dir, {
228546
228758
  fs: xfs,
228547
228759
  own,
@@ -228684,8 +228896,8 @@ var require_collect_deployment_files = __commonJS({
228684
228896
  module2.exports = __toCommonJS2(collect_deployment_files_exports);
228685
228897
  var import_error_utils = require_dist13();
228686
228898
  var import_fs_extra = require_lib11();
228687
- var import_path34 = require("path");
228688
- var import_errors49 = require_errors3();
228899
+ var import_path35 = require("path");
228900
+ var import_errors50 = require_errors3();
228689
228901
  var import_utils68 = require_utils10();
228690
228902
  var import_archive = require_archive();
228691
228903
  var import_hashes = require_hashes();
@@ -228694,7 +228906,7 @@ var require_collect_deployment_files = __commonJS({
228694
228906
  debug4(
228695
228907
  `Error: 'path' is expected to be a string or an array. Received ${typeof path20}`
228696
228908
  );
228697
- throw new import_errors49.DeploymentError({
228909
+ throw new import_errors50.DeploymentError({
228698
228910
  code: "missing_path",
228699
228911
  message: "Path not provided"
228700
228912
  });
@@ -228706,15 +228918,15 @@ var require_collect_deployment_files = __commonJS({
228706
228918
  clientOptions.isDirectory = isDirectory;
228707
228919
  if (Array.isArray(path20)) {
228708
228920
  for (const filePath of path20) {
228709
- if (!(0, import_path34.isAbsolute)(filePath)) {
228710
- throw new import_errors49.DeploymentError({
228921
+ if (!(0, import_path35.isAbsolute)(filePath)) {
228922
+ throw new import_errors50.DeploymentError({
228711
228923
  code: "invalid_path",
228712
228924
  message: `Provided path ${filePath} is not absolute`
228713
228925
  });
228714
228926
  }
228715
228927
  }
228716
- } else if (!(0, import_path34.isAbsolute)(path20)) {
228717
- throw new import_errors49.DeploymentError({
228928
+ } else if (!(0, import_path35.isAbsolute)(path20)) {
228929
+ throw new import_errors50.DeploymentError({
228718
228930
  code: "invalid_path",
228719
228931
  message: `Provided path ${path20} is not absolute`
228720
228932
  });
@@ -228737,9 +228949,9 @@ var require_collect_deployment_files = __commonJS({
228737
228949
  filesMap = clientOptions.archive === "tgz" ? await (0, import_archive.createTgzFiles)(workPath, fileList, debug4) : await (0, import_hashes.hashes)(fileList);
228738
228950
  } catch (err) {
228739
228951
  if (clientOptions.prebuilt && (0, import_error_utils.isErrnoException)(err) && err.code === "ENOENT" && err.path) {
228740
- const errPath = (0, import_path34.relative)(workPath, err.path);
228741
- err.message = `File does not exist: "${(0, import_path34.relative)(workPath, errPath)}"`;
228742
- if (errPath.split(import_path34.sep).includes("node_modules")) {
228952
+ const errPath = (0, import_path35.relative)(workPath, err.path);
228953
+ err.message = `File does not exist: "${(0, import_path35.relative)(workPath, errPath)}"`;
228954
+ if (errPath.split(import_path35.sep).includes("node_modules")) {
228743
228955
  err.message = `Please ensure project dependencies have been installed:
228744
228956
  ${err.message}`;
228745
228957
  }
@@ -228782,7 +228994,7 @@ var require_create_deployment = __commonJS({
228782
228994
  var import_deploy = require_deploy();
228783
228995
  var import_upload = require_upload();
228784
228996
  var import_utils68 = require_utils10();
228785
- var import_errors49 = require_errors3();
228997
+ var import_errors50 = require_errors3();
228786
228998
  var import_collect_deployment_files = require_collect_deployment_files();
228787
228999
  function buildCreateDeployment() {
228788
229000
  return async function* createDeployment2(clientOptions, deploymentOptions = {}) {
@@ -228794,7 +229006,7 @@ var require_create_deployment = __commonJS({
228794
229006
  debug4(
228795
229007
  `Error: 'token' is expected to be a string. Received ${typeof clientOptions.token}`
228796
229008
  );
228797
- throw new import_errors49.DeploymentError({
229009
+ throw new import_errors50.DeploymentError({
228798
229010
  code: "token_not_provided",
228799
229011
  message: "Options object must include a `token`"
228800
229012
  });
@@ -228802,7 +229014,7 @@ var require_create_deployment = __commonJS({
228802
229014
  if (clientOptions.manual) {
228803
229015
  debug4("Manual provisioning mode enabled");
228804
229016
  if (!clientOptions.prebuilt) {
228805
- throw new import_errors49.DeploymentError({
229017
+ throw new import_errors50.DeploymentError({
228806
229018
  code: "invalid_options",
228807
229019
  message: "The `manual` option requires `prebuilt` to be true"
228808
229020
  });
@@ -228884,23 +229096,23 @@ var require_continue = __commonJS({
228884
229096
  continueDeployment: () => continueDeployment2
228885
229097
  });
228886
229098
  module2.exports = __toCommonJS2(continue_exports);
228887
- var import_path34 = require("path");
229099
+ var import_path35 = require("path");
228888
229100
  var import_fs_extra = __toESM2(require_lib11());
228889
229101
  var import_check_deployment_status = require_check_deployment_status();
228890
229102
  var import_utils68 = require_utils10();
228891
229103
  var import_hashes = require_hashes();
228892
229104
  var import_ready_state = require_ready_state();
228893
229105
  var import_upload = require_upload();
228894
- var import_errors49 = require_errors3();
229106
+ var import_errors50 = require_errors3();
228895
229107
  var import_archive = require_archive();
228896
229108
  async function* continueDeployment2(options) {
228897
229109
  const debug4 = (0, import_utils68.createDebug)(options.debug);
228898
229110
  debug4(`Continuing deployment: ${options.deploymentId}`);
228899
- const outputDir = options.vercelOutputDir || (0, import_path34.join)(options.path, ".vercel", "output");
229111
+ const outputDir = options.vercelOutputDir || (0, import_path35.join)(options.path, ".vercel", "output");
228900
229112
  if (!await import_fs_extra.default.pathExists(outputDir)) {
228901
229113
  return yield {
228902
229114
  type: "error",
228903
- payload: new import_errors49.DeploymentError({
229115
+ payload: new import_errors50.DeploymentError({
228904
229116
  code: "output_dir_not_found",
228905
229117
  message: `Output directory not found at ${outputDir}. Run 'vercel build' first.`
228906
229118
  })
@@ -228911,7 +229123,7 @@ var require_continue = __commonJS({
228911
229123
  { isDirectory: true, prebuilt: true, vercelOutputDir: outputDir },
228912
229124
  debug4
228913
229125
  );
228914
- const provisionJsonPath = (0, import_path34.join)(outputDir, "provision.json");
229126
+ const provisionJsonPath = (0, import_path35.join)(outputDir, "provision.json");
228915
229127
  const unbundledFiles = fileList.filter((f8) => f8 === provisionJsonPath);
228916
229128
  let files;
228917
229129
  if (options.archive === "tgz") {
@@ -228999,7 +229211,7 @@ var require_continue = __commonJS({
228999
229211
  if (!deployment) {
229000
229212
  return yield {
229001
229213
  type: "error",
229002
- payload: new import_errors49.DeploymentError({
229214
+ payload: new import_errors50.DeploymentError({
229003
229215
  code: "continue_failed",
229004
229216
  message: "Failed to continue deployment after uploading files"
229005
229217
  })
@@ -229101,7 +229313,7 @@ var require_inspect_deployment_files = __commonJS({
229101
229313
  inspectDeploymentFiles: () => inspectDeploymentFiles2
229102
229314
  });
229103
229315
  module2.exports = __toCommonJS2(inspect_deployment_files_exports);
229104
- var import_path34 = require("path");
229316
+ var import_path35 = require("path");
229105
229317
  var import_collect_deployment_files = require_collect_deployment_files();
229106
229318
  var import_utils68 = require_utils10();
229107
229319
  async function inspectDeploymentFiles2(clientOptions) {
@@ -229113,8 +229325,8 @@ var require_inspect_deployment_files = __commonJS({
229113
229325
  for (const [sha, file] of filesMap) {
229114
229326
  const size2 = file.data?.byteLength || file.data?.length || 0;
229115
229327
  for (const name of file.names) {
229116
- const pathName = isDirectory ? (0, import_path34.relative)(workPath, name) : name.split(import_path34.sep).at(-1) || name;
229117
- const normalizedPath = pathName.split(import_path34.sep).join("/");
229328
+ const pathName = isDirectory ? (0, import_path35.relative)(workPath, name) : name.split(import_path35.sep).at(-1) || name;
229329
+ const normalizedPath = pathName.split(import_path35.sep).join("/");
229118
229330
  const deploymentFile = {
229119
229331
  path: normalizedPath,
229120
229332
  size: size2,
@@ -230203,7 +230415,7 @@ var require_package7 = __commonJS({
230203
230415
  "package.json"(exports2, module2) {
230204
230416
  module2.exports = {
230205
230417
  name: "@sentry/craft",
230206
- version: "3.5.0",
230418
+ version: "3.7.0",
230207
230419
  description: "The universal sentry workflow CLI",
230208
230420
  main: "dist/craft",
230209
230421
  repository: "https://github.com/getsentry/craft",
@@ -230410,7 +230622,7 @@ function getPackage() {
230410
230622
  }
230411
230623
  function getPackageVersion3() {
230412
230624
  const { version: version2 } = getPackage();
230413
- const buildInfo = "3f1f02d50b08b8c509a28d2cc2abf594e9a28011";
230625
+ const buildInfo = "055aa3c9b28b95a24c86a82cf48b08fea499d3d7";
230414
230626
  return buildInfo ? `${version2} (${buildInfo})` : version2;
230415
230627
  }
230416
230628
  function semVerToString(s8) {
@@ -230462,479 +230674,6 @@ var require_get_caller_file = __commonJS({
230462
230674
  }
230463
230675
  });
230464
230676
 
230465
- // node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/quote.js
230466
- var require_quote = __commonJS({
230467
- "node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/quote.js"(exports2, module2) {
230468
- "use strict";
230469
- init_import_meta_url();
230470
- var OPS = (
230471
- /** @type {const} */
230472
- [
230473
- "||",
230474
- "&&",
230475
- ";;&",
230476
- ";;",
230477
- ";&",
230478
- "|&",
230479
- "<(",
230480
- ">(",
230481
- "<<<",
230482
- "<<-",
230483
- "<<",
230484
- ">>",
230485
- ">&",
230486
- ">|",
230487
- "&>>",
230488
- "&>",
230489
- "<&",
230490
- "<>",
230491
- "&",
230492
- ";",
230493
- "(",
230494
- ")",
230495
- "|",
230496
- "<",
230497
- ">"
230498
- ]
230499
- );
230500
- var LINE_TERMINATORS = /[\n\r\u2028\u2029]/;
230501
- var GLOB_SHELL_SPECIAL = /[\s#!"$&'():;<=>@\\^`|~]/g;
230502
- module2.exports = function quote(xs3) {
230503
- var sawComment = false;
230504
- return xs3.map(function(s8) {
230505
- if (sawComment && typeof s8 === "string" && LINE_TERMINATORS.test(s8)) {
230506
- throw new TypeError("a token after a `comment` must not contain line terminators");
230507
- }
230508
- if (s8 === "") {
230509
- return (
230510
- /** @type {const} */
230511
- "''"
230512
- );
230513
- }
230514
- if (s8 && typeof s8 === "object") {
230515
- if ("op" in s8 && s8.op === "glob") {
230516
- if (typeof s8.pattern !== "string") {
230517
- throw new TypeError("glob token requires a string `pattern`");
230518
- }
230519
- if (LINE_TERMINATORS.test(s8.pattern)) {
230520
- throw new TypeError("glob `pattern` must not contain line terminators");
230521
- }
230522
- if (s8.pattern === "") {
230523
- return (
230524
- /** @type {const} */
230525
- "''"
230526
- );
230527
- }
230528
- return s8.pattern.replace(GLOB_SHELL_SPECIAL, "\\$&");
230529
- }
230530
- if ("op" in s8 && typeof s8.op === "string") {
230531
- if (OPS.indexOf(s8.op) < 0) {
230532
- throw new TypeError("invalid `op` value: " + JSON.stringify(s8.op));
230533
- }
230534
- return s8.op.replace(/[\s\S]/g, "\\$&");
230535
- }
230536
- if ("comment" in s8 && typeof s8.comment === "string") {
230537
- if (LINE_TERMINATORS.test(s8.comment)) {
230538
- throw new TypeError("`comment` must not contain line terminators");
230539
- }
230540
- sawComment = true;
230541
- return "#" + s8.comment;
230542
- }
230543
- throw new TypeError("unrecognized object token shape");
230544
- }
230545
- if (/'/.test(s8) && /!/.test(s8)) {
230546
- return "'" + s8.replace(/'/g, `'"'"'`) + "'";
230547
- }
230548
- if (/["\s\\]/.test(s8) && !/'/.test(s8)) {
230549
- return "'" + s8 + "'";
230550
- }
230551
- if (/["'\s]/.test(s8)) {
230552
- return '"' + s8.replace(/(["\\$`])/g, "\\$1") + '"';
230553
- }
230554
- return String(s8).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g, "$1\\$2");
230555
- }).join(" ");
230556
- };
230557
- }
230558
- });
230559
-
230560
- // node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/parse.js
230561
- var require_parse4 = __commonJS({
230562
- "node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/parse.js"(exports2, module2) {
230563
- "use strict";
230564
- init_import_meta_url();
230565
- var CONTROL = (
230566
- /** @type {const} */
230567
- "(?:" + /** @type {const} */
230568
- [
230569
- "\\|\\|",
230570
- "\\&(?:\\&|>>?)",
230571
- // `&&`, `&>`, and `&>>`
230572
- ";;\\&?",
230573
- // `;;` and `;;&`
230574
- "[;|]\\&",
230575
- // `;&` and `|&`
230576
- "\\<\\(",
230577
- "\\<\\<\\<",
230578
- "\\<\\<-",
230579
- "\\<\\<(?!\\()",
230580
- // `<<(` stays `<` and `<(`, as zsh reads it; other shells reject it
230581
- ">>",
230582
- ">[&|(]",
230583
- // `>&`, `>|`, and `>(`
230584
- "<[&>]",
230585
- // `<&` and `<>`
230586
- "[&;()|<>]"
230587
- ].join(
230588
- /** @type {const} */
230589
- "|"
230590
- ) + /** @type {const} */
230591
- ")"
230592
- );
230593
- var controlRE = new RegExp("^" + CONTROL + "$");
230594
- var META = (
230595
- /** @type {const} */
230596
- "|&;()<> \\t"
230597
- );
230598
- var SINGLE_QUOTE = (
230599
- /** @type {const} */
230600
- "'([^']*?)'"
230601
- );
230602
- var ANSI_C_BODY = "(?:\\\\[\\s\\S]|[^\\\\'])*?";
230603
- var ANSI_C_QUOTE = "\\$'" + ANSI_C_BODY + "'";
230604
- var ansiCAt = new RegExp("\\$'" + ANSI_C_BODY + "(?:(')|\\\\?$)", "g");
230605
- var ANSI_C_LETTERS = "abeEfnrtv";
230606
- var ANSI_C_CHARS = "\x07\b\x1B\x1B\f\n\r \v";
230607
- var hash = /^#$/;
230608
- var SQ = (
230609
- /** @type {const} */
230610
- "'"
230611
- );
230612
- var DQ = (
230613
- /** @type {const} */
230614
- '"'
230615
- );
230616
- var DS = (
230617
- /** @type {const} */
230618
- "$"
230619
- );
230620
- var TOKEN = "";
230621
- var mult = (
230622
- /** @type {const} */
230623
- 4294967296
230624
- );
230625
- for (i5 = 0; i5 < 4; i5++) {
230626
- TOKEN += (mult * Math.random()).toString(16);
230627
- }
230628
- var i5;
230629
- var startsWithToken = new RegExp("^" + TOKEN);
230630
- function matchAll(s8, r6) {
230631
- var origIndex = r6.lastIndex;
230632
- var matches = [];
230633
- var matchObj;
230634
- while (matchObj = r6.exec(s8)) {
230635
- matches[matches.length] = matchObj;
230636
- if (r6.lastIndex === matchObj.index) {
230637
- r6.lastIndex += 1;
230638
- }
230639
- }
230640
- r6.lastIndex = origIndex;
230641
- return matches;
230642
- }
230643
- function getVar(env3, pre, key) {
230644
- var r6 = typeof env3 === "function" ? env3(key) : env3[key];
230645
- if (typeof r6 === "undefined" && key != "") {
230646
- r6 = "";
230647
- } else if (typeof r6 === "undefined") {
230648
- r6 = "$";
230649
- }
230650
- if (typeof r6 === "object") {
230651
- return pre + TOKEN + JSON.stringify(r6) + TOKEN;
230652
- }
230653
- return pre + r6;
230654
- }
230655
- var ansiCEscape = /\\([0-7]{1,3}|x[\dA-Fa-f]{1,2}|u[\dA-Fa-f]{1,4}|U[\dA-Fa-f]{1,8}|c(?:\\\\|[\s\S])|[abeEfnrtv\\'"?])/g;
230656
- function expandAnsiCEscape(m10, escape2) {
230657
- var kind = escape2.charAt(0);
230658
- if (kind === "c") {
230659
- var ctrl = escape2.charAt(1);
230660
- return ctrl === "?" ? "\x7F" : String.fromCharCode(ctrl.charCodeAt(0) & 31);
230661
- }
230662
- if (kind === "x" || kind === "u" || kind === "U") {
230663
- var cp = parseInt(escape2.slice(1), 16);
230664
- if (cp > 1114111) {
230665
- return m10;
230666
- }
230667
- return String.fromCharCode.apply(null, cp > 65535 ? [55232 + (cp >> 10), 56320 + (cp & 1023)] : [cp]);
230668
- }
230669
- if (kind >= "0" && kind <= "7") {
230670
- return String.fromCharCode(parseInt(escape2, 8) & 255);
230671
- }
230672
- var letter = ANSI_C_LETTERS.indexOf(escape2);
230673
- return letter < 0 ? escape2 : ANSI_C_CHARS.charAt(letter);
230674
- }
230675
- function expandAnsiC(body) {
230676
- return body.replace(ansiCEscape, expandAnsiCEscape).split("\0")[0];
230677
- }
230678
- function closesAnsiC(s8, i6) {
230679
- ansiCAt.lastIndex = i6;
230680
- return !!/** @type {RegExpExecArray} */
230681
- ansiCAt.exec(s8)[1];
230682
- }
230683
- function parseInternal(string2, env3, opts) {
230684
- if (!opts) {
230685
- opts = {};
230686
- }
230687
- var BS = opts.escape || "\\";
230688
- var ifs = opts.splitUnquoted === true ? " \n" : typeof opts.splitUnquoted === "string" ? opts.splitUnquoted : "";
230689
- var BAREWORD = "(\\" + BS + `['"$\\` + BS + META + "]|\\$\\$|\\$(?!" + ANSI_C_QUOTE.slice(2) + `)|[^\\s'"$` + META + "])+";
230690
- var DOUBLE_QUOTE = '"(?:\\' + BS + '[\\s\\S]|[^"\\' + BS + '])*"';
230691
- var chunker = new RegExp([
230692
- "(" + CONTROL + ")",
230693
- // control chars
230694
- "(" + ANSI_C_QUOTE + "|" + BAREWORD + "|" + DOUBLE_QUOTE + "|" + SINGLE_QUOTE + ")+"
230695
- ].join("|"), "g");
230696
- var matches = matchAll(string2, chunker);
230697
- if (matches.length === 0) {
230698
- return [];
230699
- }
230700
- if (!env3) {
230701
- env3 = {};
230702
- }
230703
- var commented = false;
230704
- return matches.map(function(match3) {
230705
- var s8 = match3[0];
230706
- if (!s8 || commented) {
230707
- return void 0;
230708
- }
230709
- if (controlRE.test(s8)) {
230710
- return (
230711
- /** @type {ControlOperator} */
230712
- { op: s8 }
230713
- );
230714
- }
230715
- var quote = false;
230716
- var esc = false;
230717
- var out = "";
230718
- var words = [];
230719
- var sawQuote = false;
230720
- var pendingNw = null;
230721
- var isGlob = false;
230722
- var i6;
230723
- function parseEnvVar() {
230724
- i6 += 1;
230725
- var varend;
230726
- var varname;
230727
- var char = s8.charAt(i6);
230728
- if (char === "{") {
230729
- i6 += 1;
230730
- if (s8.charAt(i6) === "}") {
230731
- throw new Error("Bad substitution: " + s8.slice(i6 - 2, i6 + 1));
230732
- }
230733
- var depth = 1;
230734
- varend = i6;
230735
- while (depth > 0 && varend < s8.length) {
230736
- if (s8.charAt(varend) === "{" && s8.charAt(varend - 1) === "$") {
230737
- depth += 1;
230738
- } else if (s8.charAt(varend) === "}") {
230739
- depth -= 1;
230740
- }
230741
- varend += 1;
230742
- }
230743
- if (depth !== 0) {
230744
- throw new Error("Bad substitution: " + s8.slice(i6));
230745
- }
230746
- varend -= 1;
230747
- varname = s8.slice(i6, varend);
230748
- i6 = varend;
230749
- } else if (/[*@#?$!-]/.test(char)) {
230750
- varname = char;
230751
- } else {
230752
- var slicedFromI = s8.slice(i6);
230753
- varend = slicedFromI.match(/[^\w\d_]/);
230754
- if (!varend) {
230755
- varname = slicedFromI;
230756
- i6 = s8.length;
230757
- } else {
230758
- varname = slicedFromI.slice(0, varend.index);
230759
- i6 += /** @type {number} */
230760
- varend.index - 1;
230761
- }
230762
- }
230763
- return getVar(
230764
- /** @type {NonNullable<typeof env>} */
230765
- env3,
230766
- "",
230767
- varname
230768
- );
230769
- }
230770
- function flushRun() {
230771
- if (pendingNw === null) {
230772
- return;
230773
- }
230774
- if (pendingNw === 0) {
230775
- if (out !== "") {
230776
- words[words.length] = out;
230777
- out = "";
230778
- }
230779
- } else {
230780
- words[words.length] = out;
230781
- out = "";
230782
- for (var fe3 = 1; fe3 < pendingNw; fe3 += 1) {
230783
- words[words.length] = "";
230784
- }
230785
- }
230786
- pendingNw = null;
230787
- }
230788
- for (i6 = 0; i6 < s8.length; i6++) {
230789
- var c7 = s8.charAt(i6);
230790
- if (ifs && c7 !== DS) {
230791
- flushRun();
230792
- }
230793
- isGlob = isGlob || !quote && (c7 === "*" || c7 === "?");
230794
- if (esc) {
230795
- out += c7;
230796
- esc = false;
230797
- } else if (quote) {
230798
- if (c7 === quote) {
230799
- quote = false;
230800
- } else if (quote == SQ) {
230801
- out += c7;
230802
- } else {
230803
- if (c7 === BS) {
230804
- i6 += 1;
230805
- c7 = s8.charAt(i6);
230806
- if (c7 === DQ || c7 === BS || c7 === DS) {
230807
- out += c7;
230808
- } else {
230809
- out += BS + c7;
230810
- }
230811
- } else if (c7 === DS) {
230812
- out += parseEnvVar();
230813
- } else {
230814
- out += c7;
230815
- }
230816
- }
230817
- } else if (c7 === DQ || c7 === SQ) {
230818
- quote = c7;
230819
- sawQuote = true;
230820
- } else if (controlRE.test(c7)) {
230821
- return (
230822
- /** @type {ControlOperator} */
230823
- { op: s8 }
230824
- );
230825
- } else if (hash.test(c7)) {
230826
- commented = true;
230827
- var commentObj = { comment: string2.slice(match3.index + i6 + 1) };
230828
- if (out.length) {
230829
- return (
230830
- /** @type {const} */
230831
- [out, commentObj]
230832
- );
230833
- }
230834
- return (
230835
- /** @type {const} */
230836
- [commentObj]
230837
- );
230838
- } else if (c7 === BS) {
230839
- esc = true;
230840
- } else if (c7 === DS && s8.charAt(i6 + 1) === SQ && closesAnsiC(s8, i6)) {
230841
- flushRun();
230842
- sawQuote = true;
230843
- out += expandAnsiC(s8.slice(i6 + 2, ansiCAt.lastIndex - 1));
230844
- i6 = ansiCAt.lastIndex - 1;
230845
- } else if (c7 === DS) {
230846
- var value = parseEnvVar();
230847
- if (!ifs) {
230848
- out += value;
230849
- } else {
230850
- for (var vi3 = 0; vi3 < value.length; vi3 += 1) {
230851
- var vc = value.charAt(vi3);
230852
- if (ifs.indexOf(vc) < 0) {
230853
- flushRun();
230854
- out += vc;
230855
- } else if (pendingNw === null) {
230856
- pendingNw = vc === " " || vc === " " || vc === "\n" ? 0 : 1;
230857
- } else if (vc !== " " && vc !== " " && vc !== "\n") {
230858
- pendingNw += 1;
230859
- }
230860
- }
230861
- }
230862
- } else {
230863
- out += c7;
230864
- }
230865
- }
230866
- if (isGlob) {
230867
- return (
230868
- /** @type {GlobPattern} */
230869
- { op: "glob", pattern: out }
230870
- );
230871
- }
230872
- if (ifs) {
230873
- if (pendingNw !== null && pendingNw > 0) {
230874
- words[words.length] = out;
230875
- out = "";
230876
- for (var te5 = 1; te5 < pendingNw; te5 += 1) {
230877
- words[words.length] = "";
230878
- }
230879
- }
230880
- if (out !== "" || sawQuote && words.length === 0) {
230881
- words[words.length] = out;
230882
- }
230883
- return words;
230884
- }
230885
- return out;
230886
- }).reduce(
230887
- function(prev, arg) {
230888
- if (typeof arg === "undefined") {
230889
- return prev;
230890
- }
230891
- [].concat(arg).forEach(function(entry) {
230892
- prev[prev.length] = entry;
230893
- });
230894
- return prev;
230895
- },
230896
- /** @type {ParseEntry[]} */
230897
- []
230898
- );
230899
- }
230900
- module2.exports = function parse15(s8, env3, opts) {
230901
- var mapped = parseInternal(s8, env3, opts);
230902
- if (typeof env3 !== "function") {
230903
- return mapped;
230904
- }
230905
- return mapped.reduce(
230906
- function(acc, s9) {
230907
- if (typeof s9 === "object") {
230908
- acc[acc.length] = s9;
230909
- return acc;
230910
- }
230911
- var xs3 = s9.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g"));
230912
- if (xs3.length === 1) {
230913
- acc[acc.length] = xs3[0];
230914
- return acc;
230915
- }
230916
- xs3.filter(Boolean).forEach(function(x8) {
230917
- acc[acc.length] = startsWithToken.test(x8) ? JSON.parse(x8.split(TOKEN)[1]) : x8;
230918
- });
230919
- return acc;
230920
- },
230921
- /** @type {ParseEntry[]} */
230922
- []
230923
- );
230924
- };
230925
- }
230926
- });
230927
-
230928
- // node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/index.js
230929
- var require_shell_quote = __commonJS({
230930
- "node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/index.js"(exports2) {
230931
- "use strict";
230932
- init_import_meta_url();
230933
- exports2.quote = require_quote();
230934
- exports2.parse = require_parse4();
230935
- }
230936
- });
230937
-
230938
230677
  // node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js
230939
230678
  var require_constants4 = __commonJS({
230940
230679
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js"(exports2, module2) {
@@ -231366,16 +231105,16 @@ var require_semver = __commonJS({
231366
231105
  }
231367
231106
  }
231368
231107
  if (identifier) {
231369
- let prerelease = [identifier, base];
231108
+ let prerelease2 = [identifier, base];
231370
231109
  if (identifierBase === false) {
231371
- prerelease = [identifier];
231110
+ prerelease2 = [identifier];
231372
231111
  }
231373
231112
  if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
231374
231113
  if (isNaN(this.prerelease[1])) {
231375
- this.prerelease = prerelease;
231114
+ this.prerelease = prerelease2;
231376
231115
  }
231377
231116
  } else {
231378
- this.prerelease = prerelease;
231117
+ this.prerelease = prerelease2;
231379
231118
  }
231380
231119
  }
231381
231120
  break;
@@ -231395,7 +231134,7 @@ var require_semver = __commonJS({
231395
231134
  });
231396
231135
 
231397
231136
  // node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js
231398
- var require_parse5 = __commonJS({
231137
+ var require_parse4 = __commonJS({
231399
231138
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js"(exports2, module2) {
231400
231139
  "use strict";
231401
231140
  init_import_meta_url();
@@ -231422,12 +231161,12 @@ var require_valid = __commonJS({
231422
231161
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js"(exports2, module2) {
231423
231162
  "use strict";
231424
231163
  init_import_meta_url();
231425
- var parse15 = require_parse5();
231426
- var valid = (version2, options) => {
231164
+ var parse15 = require_parse4();
231165
+ var valid2 = (version2, options) => {
231427
231166
  const v12 = parse15(version2, options);
231428
231167
  return v12 ? v12.version : null;
231429
231168
  };
231430
- module2.exports = valid;
231169
+ module2.exports = valid2;
231431
231170
  }
231432
231171
  });
231433
231172
 
@@ -231436,7 +231175,7 @@ var require_clean = __commonJS({
231436
231175
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js"(exports2, module2) {
231437
231176
  "use strict";
231438
231177
  init_import_meta_url();
231439
- var parse15 = require_parse5();
231178
+ var parse15 = require_parse4();
231440
231179
  var clean = (version2, options) => {
231441
231180
  const s8 = parse15(version2.trim().replace(/^[=v]+/, ""), options);
231442
231181
  return s8 ? s8.version : null;
@@ -231451,7 +231190,7 @@ var require_inc = __commonJS({
231451
231190
  "use strict";
231452
231191
  init_import_meta_url();
231453
231192
  var SemVer5 = require_semver();
231454
- var inc3 = (version2, release3, options, identifier, identifierBase) => {
231193
+ var inc4 = (version2, release3, options, identifier, identifierBase) => {
231455
231194
  if (typeof options === "string") {
231456
231195
  identifierBase = identifier;
231457
231196
  identifier = options;
@@ -231466,7 +231205,7 @@ var require_inc = __commonJS({
231466
231205
  return null;
231467
231206
  }
231468
231207
  };
231469
- module2.exports = inc3;
231208
+ module2.exports = inc4;
231470
231209
  }
231471
231210
  });
231472
231211
 
@@ -231475,7 +231214,7 @@ var require_diff = __commonJS({
231475
231214
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js"(exports2, module2) {
231476
231215
  "use strict";
231477
231216
  init_import_meta_url();
231478
- var parse15 = require_parse5();
231217
+ var parse15 = require_parse4();
231479
231218
  var diff = (version1, version2) => {
231480
231219
  const v12 = parse15(version1, null, true);
231481
231220
  const v22 = parse15(version2, null, true);
@@ -231553,12 +231292,12 @@ var require_prerelease = __commonJS({
231553
231292
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js"(exports2, module2) {
231554
231293
  "use strict";
231555
231294
  init_import_meta_url();
231556
- var parse15 = require_parse5();
231557
- var prerelease = (version2, options) => {
231295
+ var parse15 = require_parse4();
231296
+ var prerelease2 = (version2, options) => {
231558
231297
  const parsed = parse15(version2, options);
231559
231298
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
231560
231299
  };
231561
- module2.exports = prerelease;
231300
+ module2.exports = prerelease2;
231562
231301
  }
231563
231302
  });
231564
231303
 
@@ -231638,8 +231377,8 @@ var require_gt = __commonJS({
231638
231377
  "use strict";
231639
231378
  init_import_meta_url();
231640
231379
  var compare = require_compare();
231641
- var gt3 = (a5, b9, loose) => compare(a5, b9, loose) > 0;
231642
- module2.exports = gt3;
231380
+ var gt4 = (a5, b9, loose) => compare(a5, b9, loose) > 0;
231381
+ module2.exports = gt4;
231643
231382
  }
231644
231383
  });
231645
231384
 
@@ -231705,7 +231444,7 @@ var require_cmp = __commonJS({
231705
231444
  init_import_meta_url();
231706
231445
  var eq = require_eq();
231707
231446
  var neq = require_neq();
231708
- var gt3 = require_gt();
231447
+ var gt4 = require_gt();
231709
231448
  var gte2 = require_gte();
231710
231449
  var lt4 = require_lt();
231711
231450
  var lte2 = require_lte();
@@ -231734,7 +231473,7 @@ var require_cmp = __commonJS({
231734
231473
  case "!=":
231735
231474
  return neq(a5, b9, loose);
231736
231475
  case ">":
231737
- return gt3(a5, b9, loose);
231476
+ return gt4(a5, b9, loose);
231738
231477
  case ">=":
231739
231478
  return gte2(a5, b9, loose);
231740
231479
  case "<":
@@ -231755,7 +231494,7 @@ var require_coerce = __commonJS({
231755
231494
  "use strict";
231756
231495
  init_import_meta_url();
231757
231496
  var SemVer5 = require_semver();
231758
- var parse15 = require_parse5();
231497
+ var parse15 = require_parse4();
231759
231498
  var { safeRe: re6, t: t6 } = require_re();
231760
231499
  var coerce = (version2, options) => {
231761
231500
  if (version2 instanceof SemVer5) {
@@ -231788,9 +231527,9 @@ var require_coerce = __commonJS({
231788
231527
  const major2 = match3[2];
231789
231528
  const minor = match3[3] || "0";
231790
231529
  const patch = match3[4] || "0";
231791
- const prerelease = options.includePrerelease && match3[5] ? `-${match3[5]}` : "";
231530
+ const prerelease2 = options.includePrerelease && match3[5] ? `-${match3[5]}` : "";
231792
231531
  const build = options.includePrerelease && match3[6] ? `+${match3[6]}` : "";
231793
- return parse15(`${major2}.${minor}.${patch}${prerelease}${build}`, options);
231532
+ return parse15(`${major2}.${minor}.${patch}${prerelease2}${build}`, options);
231794
231533
  };
231795
231534
  module2.exports = coerce;
231796
231535
  }
@@ -232423,7 +232162,7 @@ var require_min_version = __commonJS({
232423
232162
  init_import_meta_url();
232424
232163
  var SemVer5 = require_semver();
232425
232164
  var Range = require_range2();
232426
- var gt3 = require_gt();
232165
+ var gt4 = require_gt();
232427
232166
  var minVersion = (range3, loose) => {
232428
232167
  range3 = new Range(range3, loose);
232429
232168
  let minver = new SemVer5("0.0.0");
@@ -232451,7 +232190,7 @@ var require_min_version = __commonJS({
232451
232190
  /* fallthrough */
232452
232191
  case "":
232453
232192
  case ">=":
232454
- if (!setMin || gt3(compver, setMin)) {
232193
+ if (!setMin || gt4(compver, setMin)) {
232455
232194
  setMin = compver;
232456
232195
  }
232457
232196
  break;
@@ -232463,7 +232202,7 @@ var require_min_version = __commonJS({
232463
232202
  throw new Error(`Unexpected operation: ${comparator.operator}`);
232464
232203
  }
232465
232204
  });
232466
- if (setMin && (!minver || gt3(minver, setMin))) {
232205
+ if (setMin && (!minver || gt4(minver, setMin))) {
232467
232206
  minver = setMin;
232468
232207
  }
232469
232208
  }
@@ -232503,7 +232242,7 @@ var require_outside = __commonJS({
232503
232242
  var { ANY } = Comparator;
232504
232243
  var Range = require_range2();
232505
232244
  var satisfies2 = require_satisfies();
232506
- var gt3 = require_gt();
232245
+ var gt4 = require_gt();
232507
232246
  var lt4 = require_lt();
232508
232247
  var lte2 = require_lte();
232509
232248
  var gte2 = require_gte();
@@ -232513,7 +232252,7 @@ var require_outside = __commonJS({
232513
232252
  let gtfn, ltefn, ltfn, comp, ecomp;
232514
232253
  switch (hilo) {
232515
232254
  case ">":
232516
- gtfn = gt3;
232255
+ gtfn = gt4;
232517
232256
  ltefn = lte2;
232518
232257
  ltfn = lt4;
232519
232258
  comp = ">";
@@ -232522,7 +232261,7 @@ var require_outside = __commonJS({
232522
232261
  case "<":
232523
232262
  gtfn = lt4;
232524
232263
  ltefn = gte2;
232525
- ltfn = gt3;
232264
+ ltfn = gt4;
232526
232265
  comp = "<";
232527
232266
  ecomp = "<=";
232528
232267
  break;
@@ -232705,10 +232444,10 @@ var require_subset = __commonJS({
232705
232444
  }
232706
232445
  }
232707
232446
  const eqSet = /* @__PURE__ */ new Set();
232708
- let gt3, lt4;
232447
+ let gt4, lt4;
232709
232448
  for (const c7 of sub) {
232710
232449
  if (c7.operator === ">" || c7.operator === ">=") {
232711
- gt3 = higherGT(gt3, c7, options);
232450
+ gt4 = higherGT(gt4, c7, options);
232712
232451
  } else if (c7.operator === "<" || c7.operator === "<=") {
232713
232452
  lt4 = lowerLT(lt4, c7, options);
232714
232453
  } else {
@@ -232719,16 +232458,16 @@ var require_subset = __commonJS({
232719
232458
  return null;
232720
232459
  }
232721
232460
  let gtltComp;
232722
- if (gt3 && lt4) {
232723
- gtltComp = compare(gt3.semver, lt4.semver, options);
232461
+ if (gt4 && lt4) {
232462
+ gtltComp = compare(gt4.semver, lt4.semver, options);
232724
232463
  if (gtltComp > 0) {
232725
232464
  return null;
232726
- } else if (gtltComp === 0 && (gt3.operator !== ">=" || lt4.operator !== "<=")) {
232465
+ } else if (gtltComp === 0 && (gt4.operator !== ">=" || lt4.operator !== "<=")) {
232727
232466
  return null;
232728
232467
  }
232729
232468
  }
232730
232469
  for (const eq of eqSet) {
232731
- if (gt3 && !satisfies2(eq, String(gt3), options)) {
232470
+ if (gt4 && !satisfies2(eq, String(gt4), options)) {
232732
232471
  return null;
232733
232472
  }
232734
232473
  if (lt4 && !satisfies2(eq, String(lt4), options)) {
@@ -232744,25 +232483,25 @@ var require_subset = __commonJS({
232744
232483
  let higher, lower;
232745
232484
  let hasDomLT, hasDomGT;
232746
232485
  let needDomLTPre = lt4 && !options.includePrerelease && lt4.semver.prerelease.length ? lt4.semver : false;
232747
- let needDomGTPre = gt3 && !options.includePrerelease && gt3.semver.prerelease.length ? gt3.semver : false;
232486
+ let needDomGTPre = gt4 && !options.includePrerelease && gt4.semver.prerelease.length ? gt4.semver : false;
232748
232487
  if (needDomLTPre && needDomLTPre.prerelease.length === 1 && lt4.operator === "<" && needDomLTPre.prerelease[0] === 0) {
232749
232488
  needDomLTPre = false;
232750
232489
  }
232751
232490
  for (const c7 of dom) {
232752
232491
  hasDomGT = hasDomGT || c7.operator === ">" || c7.operator === ">=";
232753
232492
  hasDomLT = hasDomLT || c7.operator === "<" || c7.operator === "<=";
232754
- if (gt3) {
232493
+ if (gt4) {
232755
232494
  if (needDomGTPre) {
232756
232495
  if (c7.semver.prerelease && c7.semver.prerelease.length && c7.semver.major === needDomGTPre.major && c7.semver.minor === needDomGTPre.minor && c7.semver.patch === needDomGTPre.patch) {
232757
232496
  needDomGTPre = false;
232758
232497
  }
232759
232498
  }
232760
232499
  if (c7.operator === ">" || c7.operator === ">=") {
232761
- higher = higherGT(gt3, c7, options);
232762
- if (higher === c7 && higher !== gt3) {
232500
+ higher = higherGT(gt4, c7, options);
232501
+ if (higher === c7 && higher !== gt4) {
232763
232502
  return false;
232764
232503
  }
232765
- } else if (gt3.operator === ">=" && !satisfies2(gt3.semver, String(c7), options)) {
232504
+ } else if (gt4.operator === ">=" && !satisfies2(gt4.semver, String(c7), options)) {
232766
232505
  return false;
232767
232506
  }
232768
232507
  }
@@ -232781,14 +232520,14 @@ var require_subset = __commonJS({
232781
232520
  return false;
232782
232521
  }
232783
232522
  }
232784
- if (!c7.operator && (lt4 || gt3) && gtltComp !== 0) {
232523
+ if (!c7.operator && (lt4 || gt4) && gtltComp !== 0) {
232785
232524
  return false;
232786
232525
  }
232787
232526
  }
232788
- if (gt3 && hasDomLT && !lt4 && gtltComp !== 0) {
232527
+ if (gt4 && hasDomLT && !lt4 && gtltComp !== 0) {
232789
232528
  return false;
232790
232529
  }
232791
- if (lt4 && hasDomGT && !gt3 && gtltComp !== 0) {
232530
+ if (lt4 && hasDomGT && !gt4 && gtltComp !== 0) {
232792
232531
  return false;
232793
232532
  }
232794
232533
  if (needDomGTPre || needDomLTPre) {
@@ -232823,22 +232562,22 @@ var require_semver2 = __commonJS({
232823
232562
  var constants4 = require_constants4();
232824
232563
  var SemVer5 = require_semver();
232825
232564
  var identifiers = require_identifiers();
232826
- var parse15 = require_parse5();
232827
- var valid = require_valid();
232565
+ var parse15 = require_parse4();
232566
+ var valid2 = require_valid();
232828
232567
  var clean = require_clean();
232829
- var inc3 = require_inc();
232568
+ var inc4 = require_inc();
232830
232569
  var diff = require_diff();
232831
232570
  var major2 = require_major();
232832
232571
  var minor = require_minor();
232833
232572
  var patch = require_patch();
232834
- var prerelease = require_prerelease();
232573
+ var prerelease2 = require_prerelease();
232835
232574
  var compare = require_compare();
232836
232575
  var rcompare = require_rcompare();
232837
232576
  var compareLoose = require_compare_loose();
232838
232577
  var compareBuild = require_compare_build();
232839
232578
  var sort = require_sort();
232840
232579
  var rsort = require_rsort();
232841
- var gt3 = require_gt();
232580
+ var gt4 = require_gt();
232842
232581
  var lt4 = require_lt();
232843
232582
  var eq = require_eq();
232844
232583
  var neq = require_neq();
@@ -232862,21 +232601,21 @@ var require_semver2 = __commonJS({
232862
232601
  var subset = require_subset();
232863
232602
  module2.exports = {
232864
232603
  parse: parse15,
232865
- valid,
232604
+ valid: valid2,
232866
232605
  clean,
232867
- inc: inc3,
232606
+ inc: inc4,
232868
232607
  diff,
232869
232608
  major: major2,
232870
232609
  minor,
232871
232610
  patch,
232872
- prerelease,
232611
+ prerelease: prerelease2,
232873
232612
  compare,
232874
232613
  rcompare,
232875
232614
  compareLoose,
232876
232615
  compareBuild,
232877
232616
  sort,
232878
232617
  rsort,
232879
- gt: gt3,
232618
+ gt: gt4,
232880
232619
  lt: lt4,
232881
232620
  eq,
232882
232621
  neq,
@@ -232910,6 +232649,479 @@ var require_semver2 = __commonJS({
232910
232649
  }
232911
232650
  });
232912
232651
 
232652
+ // node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/quote.js
232653
+ var require_quote = __commonJS({
232654
+ "node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/quote.js"(exports2, module2) {
232655
+ "use strict";
232656
+ init_import_meta_url();
232657
+ var OPS = (
232658
+ /** @type {const} */
232659
+ [
232660
+ "||",
232661
+ "&&",
232662
+ ";;&",
232663
+ ";;",
232664
+ ";&",
232665
+ "|&",
232666
+ "<(",
232667
+ ">(",
232668
+ "<<<",
232669
+ "<<-",
232670
+ "<<",
232671
+ ">>",
232672
+ ">&",
232673
+ ">|",
232674
+ "&>>",
232675
+ "&>",
232676
+ "<&",
232677
+ "<>",
232678
+ "&",
232679
+ ";",
232680
+ "(",
232681
+ ")",
232682
+ "|",
232683
+ "<",
232684
+ ">"
232685
+ ]
232686
+ );
232687
+ var LINE_TERMINATORS = /[\n\r\u2028\u2029]/;
232688
+ var GLOB_SHELL_SPECIAL = /[\s#!"$&'():;<=>@\\^`|~]/g;
232689
+ module2.exports = function quote(xs3) {
232690
+ var sawComment = false;
232691
+ return xs3.map(function(s8) {
232692
+ if (sawComment && typeof s8 === "string" && LINE_TERMINATORS.test(s8)) {
232693
+ throw new TypeError("a token after a `comment` must not contain line terminators");
232694
+ }
232695
+ if (s8 === "") {
232696
+ return (
232697
+ /** @type {const} */
232698
+ "''"
232699
+ );
232700
+ }
232701
+ if (s8 && typeof s8 === "object") {
232702
+ if ("op" in s8 && s8.op === "glob") {
232703
+ if (typeof s8.pattern !== "string") {
232704
+ throw new TypeError("glob token requires a string `pattern`");
232705
+ }
232706
+ if (LINE_TERMINATORS.test(s8.pattern)) {
232707
+ throw new TypeError("glob `pattern` must not contain line terminators");
232708
+ }
232709
+ if (s8.pattern === "") {
232710
+ return (
232711
+ /** @type {const} */
232712
+ "''"
232713
+ );
232714
+ }
232715
+ return s8.pattern.replace(GLOB_SHELL_SPECIAL, "\\$&");
232716
+ }
232717
+ if ("op" in s8 && typeof s8.op === "string") {
232718
+ if (OPS.indexOf(s8.op) < 0) {
232719
+ throw new TypeError("invalid `op` value: " + JSON.stringify(s8.op));
232720
+ }
232721
+ return s8.op.replace(/[\s\S]/g, "\\$&");
232722
+ }
232723
+ if ("comment" in s8 && typeof s8.comment === "string") {
232724
+ if (LINE_TERMINATORS.test(s8.comment)) {
232725
+ throw new TypeError("`comment` must not contain line terminators");
232726
+ }
232727
+ sawComment = true;
232728
+ return "#" + s8.comment;
232729
+ }
232730
+ throw new TypeError("unrecognized object token shape");
232731
+ }
232732
+ if (/'/.test(s8) && /!/.test(s8)) {
232733
+ return "'" + s8.replace(/'/g, `'"'"'`) + "'";
232734
+ }
232735
+ if (/["\s\\]/.test(s8) && !/'/.test(s8)) {
232736
+ return "'" + s8 + "'";
232737
+ }
232738
+ if (/["'\s]/.test(s8)) {
232739
+ return '"' + s8.replace(/(["\\$`])/g, "\\$1") + '"';
232740
+ }
232741
+ return String(s8).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g, "$1\\$2");
232742
+ }).join(" ");
232743
+ };
232744
+ }
232745
+ });
232746
+
232747
+ // node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/parse.js
232748
+ var require_parse5 = __commonJS({
232749
+ "node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/parse.js"(exports2, module2) {
232750
+ "use strict";
232751
+ init_import_meta_url();
232752
+ var CONTROL = (
232753
+ /** @type {const} */
232754
+ "(?:" + /** @type {const} */
232755
+ [
232756
+ "\\|\\|",
232757
+ "\\&(?:\\&|>>?)",
232758
+ // `&&`, `&>`, and `&>>`
232759
+ ";;\\&?",
232760
+ // `;;` and `;;&`
232761
+ "[;|]\\&",
232762
+ // `;&` and `|&`
232763
+ "\\<\\(",
232764
+ "\\<\\<\\<",
232765
+ "\\<\\<-",
232766
+ "\\<\\<(?!\\()",
232767
+ // `<<(` stays `<` and `<(`, as zsh reads it; other shells reject it
232768
+ ">>",
232769
+ ">[&|(]",
232770
+ // `>&`, `>|`, and `>(`
232771
+ "<[&>]",
232772
+ // `<&` and `<>`
232773
+ "[&;()|<>]"
232774
+ ].join(
232775
+ /** @type {const} */
232776
+ "|"
232777
+ ) + /** @type {const} */
232778
+ ")"
232779
+ );
232780
+ var controlRE = new RegExp("^" + CONTROL + "$");
232781
+ var META = (
232782
+ /** @type {const} */
232783
+ "|&;()<> \\t"
232784
+ );
232785
+ var SINGLE_QUOTE = (
232786
+ /** @type {const} */
232787
+ "'([^']*?)'"
232788
+ );
232789
+ var ANSI_C_BODY = "(?:\\\\[\\s\\S]|[^\\\\'])*?";
232790
+ var ANSI_C_QUOTE = "\\$'" + ANSI_C_BODY + "'";
232791
+ var ansiCAt = new RegExp("\\$'" + ANSI_C_BODY + "(?:(')|\\\\?$)", "g");
232792
+ var ANSI_C_LETTERS = "abeEfnrtv";
232793
+ var ANSI_C_CHARS = "\x07\b\x1B\x1B\f\n\r \v";
232794
+ var hash = /^#$/;
232795
+ var SQ = (
232796
+ /** @type {const} */
232797
+ "'"
232798
+ );
232799
+ var DQ = (
232800
+ /** @type {const} */
232801
+ '"'
232802
+ );
232803
+ var DS = (
232804
+ /** @type {const} */
232805
+ "$"
232806
+ );
232807
+ var TOKEN = "";
232808
+ var mult = (
232809
+ /** @type {const} */
232810
+ 4294967296
232811
+ );
232812
+ for (i5 = 0; i5 < 4; i5++) {
232813
+ TOKEN += (mult * Math.random()).toString(16);
232814
+ }
232815
+ var i5;
232816
+ var startsWithToken = new RegExp("^" + TOKEN);
232817
+ function matchAll(s8, r6) {
232818
+ var origIndex = r6.lastIndex;
232819
+ var matches = [];
232820
+ var matchObj;
232821
+ while (matchObj = r6.exec(s8)) {
232822
+ matches[matches.length] = matchObj;
232823
+ if (r6.lastIndex === matchObj.index) {
232824
+ r6.lastIndex += 1;
232825
+ }
232826
+ }
232827
+ r6.lastIndex = origIndex;
232828
+ return matches;
232829
+ }
232830
+ function getVar(env3, pre, key) {
232831
+ var r6 = typeof env3 === "function" ? env3(key) : env3[key];
232832
+ if (typeof r6 === "undefined" && key != "") {
232833
+ r6 = "";
232834
+ } else if (typeof r6 === "undefined") {
232835
+ r6 = "$";
232836
+ }
232837
+ if (typeof r6 === "object") {
232838
+ return pre + TOKEN + JSON.stringify(r6) + TOKEN;
232839
+ }
232840
+ return pre + r6;
232841
+ }
232842
+ var ansiCEscape = /\\([0-7]{1,3}|x[\dA-Fa-f]{1,2}|u[\dA-Fa-f]{1,4}|U[\dA-Fa-f]{1,8}|c(?:\\\\|[\s\S])|[abeEfnrtv\\'"?])/g;
232843
+ function expandAnsiCEscape(m10, escape2) {
232844
+ var kind = escape2.charAt(0);
232845
+ if (kind === "c") {
232846
+ var ctrl = escape2.charAt(1);
232847
+ return ctrl === "?" ? "\x7F" : String.fromCharCode(ctrl.charCodeAt(0) & 31);
232848
+ }
232849
+ if (kind === "x" || kind === "u" || kind === "U") {
232850
+ var cp = parseInt(escape2.slice(1), 16);
232851
+ if (cp > 1114111) {
232852
+ return m10;
232853
+ }
232854
+ return String.fromCharCode.apply(null, cp > 65535 ? [55232 + (cp >> 10), 56320 + (cp & 1023)] : [cp]);
232855
+ }
232856
+ if (kind >= "0" && kind <= "7") {
232857
+ return String.fromCharCode(parseInt(escape2, 8) & 255);
232858
+ }
232859
+ var letter = ANSI_C_LETTERS.indexOf(escape2);
232860
+ return letter < 0 ? escape2 : ANSI_C_CHARS.charAt(letter);
232861
+ }
232862
+ function expandAnsiC(body) {
232863
+ return body.replace(ansiCEscape, expandAnsiCEscape).split("\0")[0];
232864
+ }
232865
+ function closesAnsiC(s8, i6) {
232866
+ ansiCAt.lastIndex = i6;
232867
+ return !!/** @type {RegExpExecArray} */
232868
+ ansiCAt.exec(s8)[1];
232869
+ }
232870
+ function parseInternal(string2, env3, opts) {
232871
+ if (!opts) {
232872
+ opts = {};
232873
+ }
232874
+ var BS = opts.escape || "\\";
232875
+ var ifs = opts.splitUnquoted === true ? " \n" : typeof opts.splitUnquoted === "string" ? opts.splitUnquoted : "";
232876
+ var BAREWORD = "(\\" + BS + `['"$\\` + BS + META + "]|\\$\\$|\\$(?!" + ANSI_C_QUOTE.slice(2) + `)|[^\\s'"$` + META + "])+";
232877
+ var DOUBLE_QUOTE = '"(?:\\' + BS + '[\\s\\S]|[^"\\' + BS + '])*"';
232878
+ var chunker = new RegExp([
232879
+ "(" + CONTROL + ")",
232880
+ // control chars
232881
+ "(" + ANSI_C_QUOTE + "|" + BAREWORD + "|" + DOUBLE_QUOTE + "|" + SINGLE_QUOTE + ")+"
232882
+ ].join("|"), "g");
232883
+ var matches = matchAll(string2, chunker);
232884
+ if (matches.length === 0) {
232885
+ return [];
232886
+ }
232887
+ if (!env3) {
232888
+ env3 = {};
232889
+ }
232890
+ var commented = false;
232891
+ return matches.map(function(match3) {
232892
+ var s8 = match3[0];
232893
+ if (!s8 || commented) {
232894
+ return void 0;
232895
+ }
232896
+ if (controlRE.test(s8)) {
232897
+ return (
232898
+ /** @type {ControlOperator} */
232899
+ { op: s8 }
232900
+ );
232901
+ }
232902
+ var quote = false;
232903
+ var esc = false;
232904
+ var out = "";
232905
+ var words = [];
232906
+ var sawQuote = false;
232907
+ var pendingNw = null;
232908
+ var isGlob = false;
232909
+ var i6;
232910
+ function parseEnvVar() {
232911
+ i6 += 1;
232912
+ var varend;
232913
+ var varname;
232914
+ var char = s8.charAt(i6);
232915
+ if (char === "{") {
232916
+ i6 += 1;
232917
+ if (s8.charAt(i6) === "}") {
232918
+ throw new Error("Bad substitution: " + s8.slice(i6 - 2, i6 + 1));
232919
+ }
232920
+ var depth = 1;
232921
+ varend = i6;
232922
+ while (depth > 0 && varend < s8.length) {
232923
+ if (s8.charAt(varend) === "{" && s8.charAt(varend - 1) === "$") {
232924
+ depth += 1;
232925
+ } else if (s8.charAt(varend) === "}") {
232926
+ depth -= 1;
232927
+ }
232928
+ varend += 1;
232929
+ }
232930
+ if (depth !== 0) {
232931
+ throw new Error("Bad substitution: " + s8.slice(i6));
232932
+ }
232933
+ varend -= 1;
232934
+ varname = s8.slice(i6, varend);
232935
+ i6 = varend;
232936
+ } else if (/[*@#?$!-]/.test(char)) {
232937
+ varname = char;
232938
+ } else {
232939
+ var slicedFromI = s8.slice(i6);
232940
+ varend = slicedFromI.match(/[^\w\d_]/);
232941
+ if (!varend) {
232942
+ varname = slicedFromI;
232943
+ i6 = s8.length;
232944
+ } else {
232945
+ varname = slicedFromI.slice(0, varend.index);
232946
+ i6 += /** @type {number} */
232947
+ varend.index - 1;
232948
+ }
232949
+ }
232950
+ return getVar(
232951
+ /** @type {NonNullable<typeof env>} */
232952
+ env3,
232953
+ "",
232954
+ varname
232955
+ );
232956
+ }
232957
+ function flushRun() {
232958
+ if (pendingNw === null) {
232959
+ return;
232960
+ }
232961
+ if (pendingNw === 0) {
232962
+ if (out !== "") {
232963
+ words[words.length] = out;
232964
+ out = "";
232965
+ }
232966
+ } else {
232967
+ words[words.length] = out;
232968
+ out = "";
232969
+ for (var fe3 = 1; fe3 < pendingNw; fe3 += 1) {
232970
+ words[words.length] = "";
232971
+ }
232972
+ }
232973
+ pendingNw = null;
232974
+ }
232975
+ for (i6 = 0; i6 < s8.length; i6++) {
232976
+ var c7 = s8.charAt(i6);
232977
+ if (ifs && c7 !== DS) {
232978
+ flushRun();
232979
+ }
232980
+ isGlob = isGlob || !quote && (c7 === "*" || c7 === "?");
232981
+ if (esc) {
232982
+ out += c7;
232983
+ esc = false;
232984
+ } else if (quote) {
232985
+ if (c7 === quote) {
232986
+ quote = false;
232987
+ } else if (quote == SQ) {
232988
+ out += c7;
232989
+ } else {
232990
+ if (c7 === BS) {
232991
+ i6 += 1;
232992
+ c7 = s8.charAt(i6);
232993
+ if (c7 === DQ || c7 === BS || c7 === DS) {
232994
+ out += c7;
232995
+ } else {
232996
+ out += BS + c7;
232997
+ }
232998
+ } else if (c7 === DS) {
232999
+ out += parseEnvVar();
233000
+ } else {
233001
+ out += c7;
233002
+ }
233003
+ }
233004
+ } else if (c7 === DQ || c7 === SQ) {
233005
+ quote = c7;
233006
+ sawQuote = true;
233007
+ } else if (controlRE.test(c7)) {
233008
+ return (
233009
+ /** @type {ControlOperator} */
233010
+ { op: s8 }
233011
+ );
233012
+ } else if (hash.test(c7)) {
233013
+ commented = true;
233014
+ var commentObj = { comment: string2.slice(match3.index + i6 + 1) };
233015
+ if (out.length) {
233016
+ return (
233017
+ /** @type {const} */
233018
+ [out, commentObj]
233019
+ );
233020
+ }
233021
+ return (
233022
+ /** @type {const} */
233023
+ [commentObj]
233024
+ );
233025
+ } else if (c7 === BS) {
233026
+ esc = true;
233027
+ } else if (c7 === DS && s8.charAt(i6 + 1) === SQ && closesAnsiC(s8, i6)) {
233028
+ flushRun();
233029
+ sawQuote = true;
233030
+ out += expandAnsiC(s8.slice(i6 + 2, ansiCAt.lastIndex - 1));
233031
+ i6 = ansiCAt.lastIndex - 1;
233032
+ } else if (c7 === DS) {
233033
+ var value = parseEnvVar();
233034
+ if (!ifs) {
233035
+ out += value;
233036
+ } else {
233037
+ for (var vi3 = 0; vi3 < value.length; vi3 += 1) {
233038
+ var vc = value.charAt(vi3);
233039
+ if (ifs.indexOf(vc) < 0) {
233040
+ flushRun();
233041
+ out += vc;
233042
+ } else if (pendingNw === null) {
233043
+ pendingNw = vc === " " || vc === " " || vc === "\n" ? 0 : 1;
233044
+ } else if (vc !== " " && vc !== " " && vc !== "\n") {
233045
+ pendingNw += 1;
233046
+ }
233047
+ }
233048
+ }
233049
+ } else {
233050
+ out += c7;
233051
+ }
233052
+ }
233053
+ if (isGlob) {
233054
+ return (
233055
+ /** @type {GlobPattern} */
233056
+ { op: "glob", pattern: out }
233057
+ );
233058
+ }
233059
+ if (ifs) {
233060
+ if (pendingNw !== null && pendingNw > 0) {
233061
+ words[words.length] = out;
233062
+ out = "";
233063
+ for (var te5 = 1; te5 < pendingNw; te5 += 1) {
233064
+ words[words.length] = "";
233065
+ }
233066
+ }
233067
+ if (out !== "" || sawQuote && words.length === 0) {
233068
+ words[words.length] = out;
233069
+ }
233070
+ return words;
233071
+ }
233072
+ return out;
233073
+ }).reduce(
233074
+ function(prev, arg) {
233075
+ if (typeof arg === "undefined") {
233076
+ return prev;
233077
+ }
233078
+ [].concat(arg).forEach(function(entry) {
233079
+ prev[prev.length] = entry;
233080
+ });
233081
+ return prev;
233082
+ },
233083
+ /** @type {ParseEntry[]} */
233084
+ []
233085
+ );
233086
+ }
233087
+ module2.exports = function parse15(s8, env3, opts) {
233088
+ var mapped = parseInternal(s8, env3, opts);
233089
+ if (typeof env3 !== "function") {
233090
+ return mapped;
233091
+ }
233092
+ return mapped.reduce(
233093
+ function(acc, s9) {
233094
+ if (typeof s9 === "object") {
233095
+ acc[acc.length] = s9;
233096
+ return acc;
233097
+ }
233098
+ var xs3 = s9.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g"));
233099
+ if (xs3.length === 1) {
233100
+ acc[acc.length] = xs3[0];
233101
+ return acc;
233102
+ }
233103
+ xs3.filter(Boolean).forEach(function(x8) {
233104
+ acc[acc.length] = startsWithToken.test(x8) ? JSON.parse(x8.split(TOKEN)[1]) : x8;
233105
+ });
233106
+ return acc;
233107
+ },
233108
+ /** @type {ParseEntry[]} */
233109
+ []
233110
+ );
233111
+ };
233112
+ }
233113
+ });
233114
+
233115
+ // node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/index.js
233116
+ var require_shell_quote = __commonJS({
233117
+ "node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/index.js"(exports2) {
233118
+ "use strict";
233119
+ init_import_meta_url();
233120
+ exports2.quote = require_quote();
233121
+ exports2.parse = require_parse5();
233122
+ }
233123
+ });
233124
+
232913
233125
  // node_modules/.pnpm/ansi-regex@4.1.1/node_modules/ansi-regex/index.js
232914
233126
  var require_ansi_regex2 = __commonJS({
232915
233127
  "node_modules/.pnpm/ansi-regex@4.1.1/node_modules/ansi-regex/index.js"(exports2, module2) {
@@ -238648,13 +238860,11 @@ __export(prepare_exports, {
238648
238860
  command: () => command4,
238649
238861
  description: () => description3,
238650
238862
  handler: () => handler4,
238651
- prepareMain: () => prepareMain,
238652
- runPreReleaseCommand: () => runPreReleaseCommand
238863
+ prepareMain: () => prepareMain
238653
238864
  });
238654
238865
  init_import_meta_url();
238655
238866
  var import_fs32 = require("fs");
238656
- var import_path32 = require("path");
238657
- var shellQuote2 = __toESM(require_shell_quote());
238867
+ var import_path33 = require("path");
238658
238868
  init_dryRun();
238659
238869
  init_config2();
238660
238870
  init_logger2();
@@ -238740,6 +238950,49 @@ async function calculateCalVer(git, config) {
238740
238950
  logger.info(`CalVer: determined version ${version2}`);
238741
238951
  return version2;
238742
238952
  }
238953
+ var CALVER_TOKEN_PATTERNS = {
238954
+ Y: "(\\d{4})",
238955
+ y: "(\\d{2})",
238956
+ m: "(\\d{2})",
238957
+ "-m": "(\\d{1,2})",
238958
+ d: "(\\d{2})",
238959
+ "-d": "(\\d{1,2})"
238960
+ };
238961
+ function getNextCalVerPeriod(version2, format7) {
238962
+ const tokens = [];
238963
+ const datePattern = format7.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/%(Y|y|-m|m|-d|d)/g, (_match, token) => {
238964
+ tokens.push(token);
238965
+ return CALVER_TOKEN_PATTERNS[token];
238966
+ });
238967
+ const match3 = new RegExp(`^${datePattern}\\.\\d+$`).exec(version2);
238968
+ if (!match3 || tokens.length === 0) {
238969
+ return void 0;
238970
+ }
238971
+ let year2 = 0;
238972
+ let month = 1;
238973
+ let day = 1;
238974
+ tokens.forEach((token, index) => {
238975
+ const value = Number(match3[index + 1]);
238976
+ if (token === "Y") {
238977
+ year2 = value;
238978
+ } else if (token === "y") {
238979
+ year2 = 2e3 + value;
238980
+ } else if (token.endsWith("m")) {
238981
+ month = value;
238982
+ } else {
238983
+ day = value;
238984
+ }
238985
+ });
238986
+ const date2 = new Date(year2, month - 1, day);
238987
+ if (tokens.some((token) => token.endsWith("d"))) {
238988
+ date2.setDate(date2.getDate() + 1);
238989
+ } else if (tokens.some((token) => token.endsWith("m"))) {
238990
+ date2.setMonth(date2.getMonth() + 1);
238991
+ } else {
238992
+ date2.setFullYear(date2.getFullYear() + 1);
238993
+ }
238994
+ return `${formatCalVerDate(date2, format7)}.0`;
238995
+ }
238743
238996
 
238744
238997
  // src/commands/prepare.ts
238745
238998
  init_changelog();
@@ -238747,7 +239000,14 @@ init_errors2();
238747
239000
  init_git();
238748
239001
  init_helpers();
238749
239002
  init_strings();
238750
- init_system();
239003
+
239004
+ // src/utils/preReleaseCommand.ts
239005
+ init_import_meta_url();
239006
+ var import_path30 = require("path");
239007
+ var shellQuote = __toESM(require_shell_quote());
239008
+ init_config2();
239009
+ init_logger2();
239010
+ init_errors2();
238751
239011
 
238752
239012
  // src/utils/releaseCommandEnv.ts
238753
239013
  init_import_meta_url();
@@ -238773,17 +239033,42 @@ function buildReleaseCommandEnv(extras = {}) {
238773
239033
  return { ...env3, ...extras };
238774
239034
  }
238775
239035
 
238776
- // src/commands/prepare.ts
238777
- init_tracing2();
238778
- init_version8();
239036
+ // src/utils/preReleaseCommand.ts
239037
+ init_system();
238779
239038
 
238780
239039
  // src/utils/versionBump.ts
238781
239040
  init_import_meta_url();
239041
+ var semver2 = __toESM(require_semver2());
238782
239042
  init_targets();
238783
239043
  init_logger2();
238784
239044
  function hasVersionBump(targetClass) {
238785
239045
  return typeof targetClass === "function" && "bumpVersion" in targetClass && typeof targetClass.bumpVersion === "function";
238786
239046
  }
239047
+ function hasReadVersion(targetClass) {
239048
+ return typeof targetClass === "function" && "readVersion" in targetClass && typeof targetClass.readVersion === "function";
239049
+ }
239050
+ async function readProjectVersion(targets, rootDir) {
239051
+ const targetNames = new Set(targets.map((target) => target.name));
239052
+ for (const targetName of targetNames) {
239053
+ const targetClass = TARGET_MAP[targetName];
239054
+ if (!hasReadVersion(targetClass)) {
239055
+ continue;
239056
+ }
239057
+ const version2 = await targetClass.readVersion(rootDir);
239058
+ if (version2 && semver2.valid(version2) && semver2.gt(version2, "0.0.0")) {
239059
+ logger.info(
239060
+ `No previous release tag found, using version ${version2} read by the "${targetName}" target`
239061
+ );
239062
+ return version2;
239063
+ }
239064
+ if (version2) {
239065
+ logger.debug(
239066
+ `Ignoring version "${version2}" read by "${targetName}" target`
239067
+ );
239068
+ }
239069
+ }
239070
+ return void 0;
239071
+ }
238787
239072
  async function runAutomaticVersionBumps(targets, rootDir, newVersion) {
238788
239073
  const processedTargetTypes = /* @__PURE__ */ new Set();
238789
239074
  let anyBumped = false;
@@ -238827,6 +239112,65 @@ async function runAutomaticVersionBumps(targets, rootDir, newVersion) {
238827
239112
  return { anyBumped, bumpableTargets, skippedTargets };
238828
239113
  }
238829
239114
 
239115
+ // src/utils/preReleaseCommand.ts
239116
+ var DEFAULT_BUMP_VERSION_PATH = (0, import_path30.join)("scripts", "bump-version.sh");
239117
+ var AUTO_BUMP_MIN_VERSION = "2.21.0";
239118
+ async function runPreReleaseCommand(options) {
239119
+ const { oldVersion, newVersion, preReleaseCommand, targets, rootDir } = options;
239120
+ if (preReleaseCommand !== void 0 && preReleaseCommand.length === 0) {
239121
+ logger.warn("Not running the pre-release command: no command specified");
239122
+ return false;
239123
+ }
239124
+ if (preReleaseCommand) {
239125
+ return runCustomPreReleaseCommand(
239126
+ oldVersion,
239127
+ newVersion,
239128
+ preReleaseCommand
239129
+ );
239130
+ }
239131
+ if (requiresMinVersion(AUTO_BUMP_MIN_VERSION) && targets && targets.length > 0) {
239132
+ logger.info("Running automatic version bumping from targets...");
239133
+ const result = await runAutomaticVersionBumps(targets, rootDir, newVersion);
239134
+ if (!result.anyBumped) {
239135
+ if (result.bumpableTargets.length === 0) {
239136
+ logger.warn(
239137
+ "None of your configured targets support automatic version bumping. Consider adding a preReleaseCommand to bump versions manually."
239138
+ );
239139
+ } else {
239140
+ throw new ConfigurationError(
239141
+ `Targets [${result.skippedTargets.join(", ")}] support version bumping but did not find applicable files in your project. Define a preReleaseCommand to bump versions manually, or set preReleaseCommand: '' to skip version bumping.`
239142
+ );
239143
+ }
239144
+ }
239145
+ return result.anyBumped;
239146
+ }
239147
+ return runCustomPreReleaseCommand(oldVersion, newVersion, void 0);
239148
+ }
239149
+ async function runCustomPreReleaseCommand(oldVersion, newVersion, preReleaseCommand) {
239150
+ let sysCommand;
239151
+ let args;
239152
+ const nonEmptyOldVersion = oldVersion || "0.0.0";
239153
+ if (preReleaseCommand) {
239154
+ [sysCommand, ...args] = shellQuote.parse(preReleaseCommand);
239155
+ } else {
239156
+ sysCommand = "/bin/bash";
239157
+ args = [DEFAULT_BUMP_VERSION_PATH];
239158
+ }
239159
+ args = [...args, nonEmptyOldVersion, newVersion];
239160
+ logger.info("Running the pre-release command...");
239161
+ await spawnProcess(sysCommand, args, {
239162
+ env: buildReleaseCommandEnv({
239163
+ CRAFT_NEW_VERSION: newVersion,
239164
+ CRAFT_OLD_VERSION: nonEmptyOldVersion
239165
+ })
239166
+ });
239167
+ return true;
239168
+ }
239169
+
239170
+ // src/commands/prepare.ts
239171
+ init_tracing2();
239172
+ init_version8();
239173
+
238830
239174
  // src/commands/publish.ts
238831
239175
  var publish_exports = {};
238832
239176
  __export(publish_exports, {
@@ -238847,11 +239191,13 @@ init_import_meta_url();
238847
239191
  var import_chalk = __toESM(require_source());
238848
239192
  var import_fs31 = require("fs");
238849
239193
  init_dryRun();
238850
- var import_path31 = require("path");
238851
- var shellQuote = __toESM(require_shell_quote());
239194
+ var import_path32 = require("path");
239195
+ var semver3 = __toESM(require_semver2());
239196
+ var shellQuote2 = __toESM(require_shell_quote());
238852
239197
  var import_string_length = __toESM(require_string_length());
238853
239198
  init_config2();
238854
239199
  init_logger2();
239200
+ init_project_config();
238855
239201
  init_targets();
238856
239202
  init_base5();
238857
239203
  init_errors2();
@@ -238869,14 +239215,14 @@ init_tracing2();
238869
239215
  init_import_meta_url();
238870
239216
  var import_crypto7 = require("crypto");
238871
239217
  var import_os4 = require("os");
238872
- var import_path30 = require("path");
239218
+ var import_path31 = require("path");
238873
239219
  var STATE_DIR_NAME = "craft";
238874
239220
  function getCraftStateDir() {
238875
239221
  const xdgStateHome = process.env.XDG_STATE_HOME;
238876
239222
  if (xdgStateHome && xdgStateHome.length > 0) {
238877
- return (0, import_path30.join)(xdgStateHome, STATE_DIR_NAME);
239223
+ return (0, import_path31.join)(xdgStateHome, STATE_DIR_NAME);
238878
239224
  }
238879
- return (0, import_path30.join)((0, import_os4.homedir)(), ".local", "state", STATE_DIR_NAME);
239225
+ return (0, import_path31.join)((0, import_os4.homedir)(), ".local", "state", STATE_DIR_NAME);
238880
239226
  }
238881
239227
  function sanitiseForFilename(raw) {
238882
239228
  return raw.toLowerCase().replace(/[^a-z0-9._-]+/g, "_").replace(/^_+|_+$/g, "");
@@ -238900,14 +239246,14 @@ function getPublishStateFilename(version2, githubConfig, cwd = process.cwd(), wo
238900
239246
  return `publish-state-${cwdDigest}-${workspacePrefix}${safeVersion}.json`;
238901
239247
  }
238902
239248
  function getPublishStatePath(version2, githubConfig, cwd = process.cwd(), workspace) {
238903
- return (0, import_path30.join)(
239249
+ return (0, import_path31.join)(
238904
239250
  getCraftStateDir(),
238905
239251
  getPublishStateFilename(version2, githubConfig, cwd, workspace)
238906
239252
  );
238907
239253
  }
238908
239254
 
238909
239255
  // src/commands/publish.ts
238910
- var DEFAULT_POST_RELEASE_SCRIPT_PATH = (0, import_path31.join)("scripts", "post-release.sh");
239256
+ var DEFAULT_POST_RELEASE_SCRIPT_PATH = (0, import_path32.join)("scripts", "post-release.sh");
238911
239257
  var command2 = ["publish NEW-VERSION"];
238912
239258
  var aliases = ["pp", "publish"];
238913
239259
  var description = "\u{1F6EB} Publish artifacts";
@@ -239164,17 +239510,7 @@ async function handleReleaseBranch(git, remoteName, branch, releaseRevision, mer
239164
239510
  }
239165
239511
  logger.debug(`Checking out merge target branch:`, mergeTarget);
239166
239512
  await git.checkout(mergeTarget);
239167
- logger.debug(`Pulling latest changes from ${remoteName}/${mergeTarget}`);
239168
- try {
239169
- await git.pull(remoteName, mergeTarget, ["--rebase"]);
239170
- } catch (pullError) {
239171
- try {
239172
- await git.raw(["rebase", "--abort"]);
239173
- } catch {
239174
- logger.trace("git rebase --abort failed (may be no rebase in progress)");
239175
- }
239176
- throw pullError;
239177
- }
239513
+ await pullWithRebase(git, remoteName, mergeTarget);
239178
239514
  logger.debug(`Merging ${mergeSource} into: ${mergeTarget}`);
239179
239515
  try {
239180
239516
  await git.merge(["--no-ff", "--no-edit", mergeSource]);
@@ -239260,6 +239596,72 @@ async function handleReleaseBranch(git, remoteName, branch, releaseRevision, mer
239260
239596
  }
239261
239597
  }
239262
239598
  }
239599
+ async function pullWithRebase(git, remoteName, branch) {
239600
+ logger.debug(`Pulling latest changes from ${remoteName}/${branch}`);
239601
+ try {
239602
+ await git.pull(remoteName, branch, ["--rebase"]);
239603
+ } catch (pullError) {
239604
+ try {
239605
+ await git.raw(["rebase", "--abort"]);
239606
+ } catch {
239607
+ logger.trace("git rebase --abort failed (may be no rebase in progress)");
239608
+ }
239609
+ throw pullError;
239610
+ }
239611
+ }
239612
+ var DEFAULT_DEVELOPMENT_VERSION_TEMPLATE = "{{version}}-dev.0";
239613
+ async function runPostReleaseBump(git, remoteName, mergeTarget, releasedVersion, bumpConfig, config) {
239614
+ if (semver3.prerelease(releasedVersion)) {
239615
+ logger.info(
239616
+ `Not bumping the development version after pre-release ${releasedVersion}.`
239617
+ );
239618
+ return;
239619
+ }
239620
+ const bump = bumpConfig.bump ?? (config.versioning?.policy === "calver" /* CalVer */ ? "calver" : "minor");
239621
+ const nextVersion = bump === "calver" ? getNextCalVerPeriod(
239622
+ releasedVersion,
239623
+ config.versioning?.calver?.format ?? DEFAULT_CALVER_CONFIG.format
239624
+ ) : semver3.inc(releasedVersion, bump);
239625
+ if (!nextVersion) {
239626
+ throw new Error(
239627
+ `Cannot derive the next ${bump} version from "${releasedVersion}".`
239628
+ );
239629
+ }
239630
+ const devVersion = (bumpConfig.version ?? DEFAULT_DEVELOPMENT_VERSION_TEMPLATE).replaceAll("{{version}}", nextVersion);
239631
+ if (isDryRun()) {
239632
+ logger.info(
239633
+ `[dry-run] Would bump the development version to ${devVersion} and push it to ${remoteName}/${mergeTarget}.`
239634
+ );
239635
+ return;
239636
+ }
239637
+ logger.info(`Bumping the development version to ${devVersion}...`);
239638
+ const bumped = await runPreReleaseCommand({
239639
+ oldVersion: releasedVersion,
239640
+ newVersion: devVersion,
239641
+ preReleaseCommand: config.preReleaseCommand,
239642
+ targets: config.targets,
239643
+ rootDir: getReleaseUnitDir()
239644
+ });
239645
+ if (!bumped) {
239646
+ logger.warn(
239647
+ "Not bumping the development version: nothing wrote a version."
239648
+ );
239649
+ return;
239650
+ }
239651
+ const repoStatus = await git.status();
239652
+ if (repoStatus.files.length === 0) {
239653
+ logger.info(`The development version is already ${devVersion}.`);
239654
+ return;
239655
+ }
239656
+ await git.commit("meta: Bump new development version\n\n#skip-changelog", [
239657
+ "--all"
239658
+ ]);
239659
+ await pullWithRebase(git, remoteName, mergeTarget);
239660
+ await git.push(remoteName, mergeTarget);
239661
+ logger.info(
239662
+ `Pushed development version ${devVersion} to ${remoteName}/${mergeTarget}.`
239663
+ );
239664
+ }
239263
239665
  async function runPostReleaseCommand(newVersion, postReleaseCommand) {
239264
239666
  let sysCommand;
239265
239667
  let args;
@@ -239267,7 +239669,7 @@ async function runPostReleaseCommand(newVersion, postReleaseCommand) {
239267
239669
  logger.debug("Not running the post-release command: no command specified");
239268
239670
  return false;
239269
239671
  } else if (postReleaseCommand) {
239270
- [sysCommand, ...args] = shellQuote.parse(postReleaseCommand);
239672
+ [sysCommand, ...args] = shellQuote2.parse(postReleaseCommand);
239271
239673
  } else if (hasExecutable(DEFAULT_POST_RELEASE_SCRIPT_PATH)) {
239272
239674
  sysCommand = "/bin/bash";
239273
239675
  args = [DEFAULT_POST_RELEASE_SCRIPT_PATH];
@@ -239415,7 +239817,7 @@ Original error: ${err instanceof Error ? err.message : String(err)}`;
239415
239817
  await promptConfirmation();
239416
239818
  await withTempDir(async (downloadDirectory) => {
239417
239819
  artifactProvider.setDownloadDirectory(downloadDirectory);
239418
- (0, import_fs31.mkdirSync)((0, import_path31.dirname)(publishStateFile), { recursive: true });
239820
+ (0, import_fs31.mkdirSync)((0, import_path32.dirname)(publishStateFile), { recursive: true });
239419
239821
  for (const target of targetList) {
239420
239822
  await publishToTarget(target, newVersion, revision);
239421
239823
  publishState.published[BaseTarget.getId(target.config)] = true;
@@ -239437,22 +239839,29 @@ Original error: ${err instanceof Error ? err.message : String(err)}`;
239437
239839
  `The --merge-target option will be ignored because noMerge is enabled via ${noMergeConfig.source === "auto-detected" ? "auto-detection (compiled GitHub Action)" : "config"}.`
239438
239840
  );
239439
239841
  }
239842
+ let mergedInto;
239440
239843
  if (noMerge) {
239441
239844
  const source = argv.noMerge ? "CLI option" : noMergeConfig.source === "auto-detected" ? "auto-detection (compiled GitHub Action with dist/ folder)" : "config";
239442
239845
  logger.info(`Not merging the release branch (${source}).`);
239443
239846
  } else if (targetsToPublish.has("all" /* All */) || targetsToPublish.has("none" /* None */) || earlierStateExists) {
239847
+ let mergeTarget = argv.mergeTarget;
239444
239848
  try {
239849
+ mergeTarget ||= await getDefaultBranch(git, argv.remote);
239445
239850
  await handleReleaseBranch(
239446
239851
  git,
239447
239852
  argv.remote,
239448
239853
  branchName,
239449
239854
  revision,
239450
- argv.mergeTarget,
239855
+ mergeTarget,
239451
239856
  argv.keepBranch,
239452
239857
  rev ? revision : branchName
239453
239858
  );
239859
+ mergedInto = mergeTarget;
239454
239860
  } catch (mergeError) {
239455
239861
  captureException(mergeError);
239862
+ if (mergeError instanceof BranchCleanupError) {
239863
+ mergedInto = mergeTarget;
239864
+ }
239456
239865
  const lines = [];
239457
239866
  if (mergeError instanceof BranchCleanupError) {
239458
239867
  lines.push(
@@ -239542,6 +239951,34 @@ Original error: ${err instanceof Error ? err.message : String(err)}`;
239542
239951
  ];
239543
239952
  logger.warn(msg.join("\n"));
239544
239953
  }
239954
+ if (config.postReleaseBump) {
239955
+ if (mergedInto) {
239956
+ try {
239957
+ await runPostReleaseBump(
239958
+ git,
239959
+ argv.remote,
239960
+ mergedInto,
239961
+ newVersion,
239962
+ config.postReleaseBump,
239963
+ config
239964
+ );
239965
+ } catch (bumpError) {
239966
+ captureException(bumpError);
239967
+ logger.warn(
239968
+ [
239969
+ `Failed to bump the development version after ${newVersion}.`,
239970
+ `All publish targets completed successfully \u2014 bump the version on ${mergedInto} manually.`,
239971
+ ``,
239972
+ `Error: ${bumpError instanceof Error ? bumpError.message : String(bumpError)}`
239973
+ ].join("\n")
239974
+ );
239975
+ }
239976
+ } else {
239977
+ logger.info(
239978
+ "Not bumping the development version: the release branch was not merged."
239979
+ );
239980
+ }
239981
+ }
239545
239982
  await runPostReleaseCommand(newVersion, config.postReleaseCommand);
239546
239983
  }
239547
239984
  var handler2 = async (args) => {
@@ -239586,9 +240023,7 @@ async function handler3() {
239586
240023
  var command4 = ["prepare [NEW-VERSION]"];
239587
240024
  var aliases2 = ["p", "prerelease", "prepublish", "prepare", "release"];
239588
240025
  var description3 = "\u{1F6A2} Prepare a new release branch";
239589
- var DEFAULT_BUMP_VERSION_PATH = (0, import_path32.join)("scripts", "bump-version.sh");
239590
240026
  var AUTO_VERSION_MIN_VERSION2 = "2.14.0";
239591
- var AUTO_BUMP_MIN_VERSION = "2.21.0";
239592
240027
  var builder2 = (yargs) => yargs.positional("NEW-VERSION", {
239593
240028
  description: 'The new version to release. Can be: a semver string (e.g., "1.2.3"), a bump type ("major", "minor", or "patch"), "auto" to determine automatically from conventional commits, or "calver" for calendar versioning. If omitted, uses the versioning.policy from .craft.yml',
239594
240029
  type: "string"
@@ -239722,57 +240157,6 @@ async function commitChanges(git, newVersion, preReleaseCommandRan) {
239722
240157
  logger.trace(`Commit message: "${message}"`);
239723
240158
  await git.commit(message);
239724
240159
  }
239725
- async function runPreReleaseCommand(options) {
239726
- const { oldVersion, newVersion, preReleaseCommand, targets, rootDir } = options;
239727
- if (preReleaseCommand !== void 0 && preReleaseCommand.length === 0) {
239728
- logger.warn("Not running the pre-release command: no command specified");
239729
- return false;
239730
- }
239731
- if (preReleaseCommand) {
239732
- return runCustomPreReleaseCommand(
239733
- oldVersion,
239734
- newVersion,
239735
- preReleaseCommand
239736
- );
239737
- }
239738
- if (requiresMinVersion(AUTO_BUMP_MIN_VERSION) && targets && targets.length > 0) {
239739
- logger.info("Running automatic version bumping from targets...");
239740
- const result = await runAutomaticVersionBumps(targets, rootDir, newVersion);
239741
- if (!result.anyBumped) {
239742
- if (result.bumpableTargets.length === 0) {
239743
- logger.warn(
239744
- "None of your configured targets support automatic version bumping. Consider adding a preReleaseCommand to bump versions manually."
239745
- );
239746
- } else {
239747
- throw new ConfigurationError(
239748
- `Targets [${result.skippedTargets.join(", ")}] support version bumping but did not find applicable files in your project. Define a preReleaseCommand to bump versions manually, or set preReleaseCommand: '' to skip version bumping.`
239749
- );
239750
- }
239751
- }
239752
- return result.anyBumped;
239753
- }
239754
- return runCustomPreReleaseCommand(oldVersion, newVersion, void 0);
239755
- }
239756
- async function runCustomPreReleaseCommand(oldVersion, newVersion, preReleaseCommand) {
239757
- let sysCommand;
239758
- let args;
239759
- const nonEmptyOldVersion = oldVersion || "0.0.0";
239760
- if (preReleaseCommand) {
239761
- [sysCommand, ...args] = shellQuote2.parse(preReleaseCommand);
239762
- } else {
239763
- sysCommand = "/bin/bash";
239764
- args = [DEFAULT_BUMP_VERSION_PATH];
239765
- }
239766
- args = [...args, nonEmptyOldVersion, newVersion];
239767
- logger.info("Running the pre-release command...");
239768
- await spawnProcess(sysCommand, args, {
239769
- env: buildReleaseCommandEnv({
239770
- CRAFT_NEW_VERSION: newVersion,
239771
- CRAFT_OLD_VERSION: nonEmptyOldVersion
239772
- })
239773
- });
239774
- return true;
239775
- }
239776
240160
  function checkGitStatus(repoStatus, rev) {
239777
240161
  logger.info("Checking the local repository status...");
239778
240162
  logger.debug("Repository status:", formatJson(repoStatus));
@@ -239833,7 +240217,7 @@ async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "
239833
240217
  }
239834
240218
  logger.info("Checking the changelog...");
239835
240219
  logger.debug(`Changelog policy: "${changelogPolicy}".`);
239836
- const relativePath = (0, import_path32.relative)("", changelogPath);
240220
+ const relativePath = (0, import_path33.relative)("", changelogPath);
239837
240221
  logger.debug(`Changelog path: ${relativePath}`);
239838
240222
  if (relativePath.startsWith(".")) {
239839
240223
  throw new ConfigurationError(`Invalid changelog path: "${changelogPath}"`);
@@ -239971,7 +240355,7 @@ async function resolveVersion(git, options) {
239971
240355
  } else {
239972
240356
  bumpType = version2;
239973
240357
  }
239974
- const currentVersion = latestTag && getVersion(latestTag) || "0.0.0";
240358
+ const currentVersion = latestTag && getVersion(latestTag) || await readProjectVersion(config.targets || [], getReleaseUnitDir()) || "0.0.0";
239975
240359
  const newVersion = calculateNextVersion(currentVersion, bumpType);
239976
240360
  logger.info(
239977
240361
  `Version bump: ${currentVersion} -> ${newVersion} (${bumpType} bump)`
@@ -240038,7 +240422,7 @@ async function prepareMain(argv) {
240038
240422
  changelogPath
240039
240423
  );
240040
240424
  if (changelogBody) {
240041
- const resolvedChangelogPath = (0, import_path32.relative)("", changelogPath);
240425
+ const resolvedChangelogPath = (0, import_path33.relative)("", changelogPath);
240042
240426
  await git.add(resolvedChangelogPath);
240043
240427
  }
240044
240428
  const preReleaseCommandRan = await runPreReleaseCommand({
@@ -240152,7 +240536,7 @@ init_import_meta_url();
240152
240536
  init_logger2();
240153
240537
  init_config2();
240154
240538
  init_errors2();
240155
- var import_path33 = require("path");
240539
+ var import_path34 = require("path");
240156
240540
  var import_fs33 = require("fs");
240157
240541
  init_none();
240158
240542
  var mkdirp = require_mkdirp2();
@@ -240175,7 +240559,7 @@ var builder3 = (yargs) => yargs.positional("NAME", {
240175
240559
  });
240176
240560
  async function prepareOutputDirectory(argv) {
240177
240561
  if (argv.directory) {
240178
- const fullPath = (0, import_path33.resolve)(argv.directory);
240562
+ const fullPath = (0, import_path34.resolve)(argv.directory);
240179
240563
  if ((0, import_fs33.existsSync)(fullPath)) {
240180
240564
  if ((0, import_fs33.lstatSync)(fullPath).isDirectory()) {
240181
240565
  return fullPath;
@@ -240188,7 +240572,7 @@ async function prepareOutputDirectory(argv) {
240188
240572
  return fullPath;
240189
240573
  }
240190
240574
  } else {
240191
- return (0, import_path33.resolve)(process.cwd());
240575
+ return (0, import_path34.resolve)(process.cwd());
240192
240576
  }
240193
240577
  }
240194
240578
  async function handlerMain(argv) {