@sentry/craft 3.6.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 +862 -667
  2. package/package.json +1 -1
package/dist/craft CHANGED
@@ -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"])),
@@ -121433,6 +121470,18 @@ async function fetchPRCoAuthors(prNumber) {
121433
121470
  function isBumpType(value) {
121434
121471
  return BUMP_TYPES.has(value);
121435
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
+ }
121436
121485
  function getLineNumber(text, charIndex) {
121437
121486
  let count = 1;
121438
121487
  for (let i5 = 0; i5 < charIndex && i5 < text.length; i5++) {
@@ -121885,7 +121934,7 @@ function getNormalizedReleaseConfig() {
121885
121934
  return normalized;
121886
121935
  }
121887
121936
  function shouldExcludePR(labels, author, config, body) {
121888
- if (body?.includes(SKIP_CHANGELOG_MAGIC_WORD)) {
121937
+ if (hasSkipChangelogMagicWord(body)) {
121889
121938
  return true;
121890
121939
  }
121891
121940
  if (!config?.changelog) {
@@ -122132,7 +122181,7 @@ async function generateChangelogWithHighlight(git, rev, currentPRNumber) {
122132
122181
  }
122133
122182
  async function fetchRawCommitInfo(git, rev, until) {
122134
122183
  const gitCommits = (await getChangesSince(git, rev, until)).filter(
122135
- ({ body }) => !body.includes(SKIP_CHANGELOG_MAGIC_WORD)
122184
+ ({ body }) => !hasSkipChangelogMagicWord(body)
122136
122185
  );
122137
122186
  const githubCommits = await getPRAndLabelsFromCommit(
122138
122187
  gitCommits.map(({ hash }) => hash)
@@ -124340,7 +124389,7 @@ function normalizeNugetVersion(version2) {
124340
124389
  const withoutMetadata = version2.split("+")[0];
124341
124390
  const dash = withoutMetadata.indexOf("-");
124342
124391
  const release3 = dash === -1 ? withoutMetadata : withoutMetadata.slice(0, dash);
124343
- const prerelease = dash === -1 ? "" : withoutMetadata.slice(dash);
124392
+ const prerelease2 = dash === -1 ? "" : withoutMetadata.slice(dash);
124344
124393
  const parts = release3.split(".").map((part) => /^\d+$/.test(part) ? String(parseInt(part, 10)) : part);
124345
124394
  while (parts.length < 3) {
124346
124395
  parts.push("0");
@@ -124348,7 +124397,7 @@ function normalizeNugetVersion(version2) {
124348
124397
  if (parts.length === 4 && parts[3] === "0") {
124349
124398
  parts.pop();
124350
124399
  }
124351
- return `${parts.join(".")}${prerelease}`.toLowerCase();
124400
+ return `${parts.join(".")}${prerelease2}`.toLowerCase();
124352
124401
  }
124353
124402
  async function readNupkgIdentity(nupkgPath) {
124354
124403
  const zip = new import_node_stream_zip2.default.async({ file: nupkgPath });
@@ -170106,7 +170155,7 @@ var require_semantic = __commonJS({
170106
170155
  major: major2,
170107
170156
  minor,
170108
170157
  patch,
170109
- inc: inc3
170158
+ inc: inc4
170110
170159
  };
170111
170160
  function major2(input) {
170112
170161
  const version2 = explain(input);
@@ -170135,7 +170184,7 @@ var require_semantic = __commonJS({
170135
170184
  }
170136
170185
  return version2.release[2];
170137
170186
  }
170138
- function inc3(input, release3, preReleaseIdentifier) {
170187
+ function inc4(input, release3, preReleaseIdentifier) {
170139
170188
  let identifier = preReleaseIdentifier || `a`;
170140
170189
  const version2 = parse15(input);
170141
170190
  if (!version2) {
@@ -170264,7 +170313,7 @@ var require_pep440 = __commonJS({
170264
170313
  satisfies: satisfies2,
170265
170314
  validRange
170266
170315
  } = require_specifier();
170267
- var { major: major2, minor, patch, inc: inc3 } = require_semantic();
170316
+ var { major: major2, minor, patch, inc: inc4 } = require_semantic();
170268
170317
  module2.exports = {
170269
170318
  // version
170270
170319
  valid: valid2,
@@ -170294,7 +170343,7 @@ var require_pep440 = __commonJS({
170294
170343
  major: major2,
170295
170344
  minor,
170296
170345
  patch,
170297
- inc: inc3
170346
+ inc: inc4
170298
170347
  };
170299
170348
  }
170300
170349
  });
@@ -174396,7 +174445,7 @@ var require_dist11 = __commonJS({
174396
174445
  return mod.getStringConstant(source, name) ?? null;
174397
174446
  }
174398
174447
  var import_fs34 = __toESM2(require("fs"), 1);
174399
- var import_path34 = require("path");
174448
+ var import_path35 = require("path");
174400
174449
  async function extractImports(source) {
174401
174450
  if (!source.includes("import")) {
174402
174451
  return [];
@@ -174425,21 +174474,21 @@ var require_dist11 = __commonJS({
174425
174474
  return pending;
174426
174475
  }
174427
174476
  async function resolveNamePartsUncached(parts, searchDirs, cache4) {
174428
- const rel = (0, import_path34.join)(...parts);
174477
+ const rel = (0, import_path35.join)(...parts);
174429
174478
  for (const root of searchDirs) {
174430
174479
  let target = null;
174431
174480
  let targetKind = null;
174432
- const candidateInit = (0, import_path34.join)(root, rel, "__init__.py");
174481
+ const candidateInit = (0, import_path35.join)(root, rel, "__init__.py");
174433
174482
  if (await statKind(candidateInit, cache4) === "file") {
174434
174483
  target = candidateInit;
174435
174484
  targetKind = "file";
174436
174485
  } else {
174437
- const candidateModule = (0, import_path34.join)(root, `${rel}.py`);
174486
+ const candidateModule = (0, import_path35.join)(root, `${rel}.py`);
174438
174487
  if (await statKind(candidateModule, cache4) === "file") {
174439
174488
  target = candidateModule;
174440
174489
  targetKind = "file";
174441
- } else if (await statKind((0, import_path34.join)(root, rel), cache4) === "dir") {
174442
- 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);
174443
174492
  targetKind = "dir";
174444
174493
  }
174445
174494
  }
@@ -174447,8 +174496,8 @@ var require_dist11 = __commonJS({
174447
174496
  const parentChain = [];
174448
174497
  let acc = root;
174449
174498
  for (const part of parts.slice(0, -1)) {
174450
- acc = (0, import_path34.join)(acc, part);
174451
- 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");
174452
174501
  if (await statKind(init2, cache4) === "file") {
174453
174502
  parentChain.push(init2);
174454
174503
  }
@@ -174485,8 +174534,8 @@ var require_dist11 = __commonJS({
174485
174534
  function submoduleDir(target, targetKind) {
174486
174535
  if (targetKind === "dir")
174487
174536
  return target;
174488
- if (targetKind === "file" && target.endsWith(`${import_path34.sep}__init__.py`)) {
174489
- return (0, import_path34.dirname)(target);
174537
+ if (targetKind === "file" && target.endsWith(`${import_path35.sep}__init__.py`)) {
174538
+ return (0, import_path35.dirname)(target);
174490
174539
  }
174491
174540
  return null;
174492
174541
  }
@@ -174495,9 +174544,9 @@ var require_dist11 = __commonJS({
174495
174544
  let search = roots;
174496
174545
  let searchKey = rootsKey;
174497
174546
  if (stmt.level > 0) {
174498
- let base = (0, import_path34.dirname)(importerPath);
174547
+ let base = (0, import_path35.dirname)(importerPath);
174499
174548
  for (let i5 = 1; i5 < stmt.level; i5++) {
174500
- base = (0, import_path34.dirname)(base);
174549
+ base = (0, import_path35.dirname)(base);
174501
174550
  }
174502
174551
  search = [base];
174503
174552
  searchKey = base;
@@ -174540,14 +174589,14 @@ var require_dist11 = __commonJS({
174540
174589
  return [...resolved];
174541
174590
  }
174542
174591
  function isModuleNameSeed(seed) {
174543
- 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);
174544
174593
  }
174545
174594
  async function collectImportClosure({
174546
174595
  seeds,
174547
174596
  searchRoots,
174548
174597
  maxFiles = DEFAULT_MAX_FILES
174549
174598
  }) {
174550
- const roots = searchRoots.map((r6) => (0, import_path34.resolve)(r6));
174599
+ const roots = searchRoots.map((r6) => (0, import_path35.resolve)(r6));
174551
174600
  const rootsKey = roots.join("\0");
174552
174601
  const cache4 = {
174553
174602
  statKinds: /* @__PURE__ */ new Map(),
@@ -174570,7 +174619,7 @@ var require_dist11 = __commonJS({
174570
174619
  frontier.push(...name.parentChain);
174571
174620
  }
174572
174621
  } else {
174573
- const seedPath = (0, import_path34.resolve)(seed);
174622
+ const seedPath = (0, import_path35.resolve)(seed);
174574
174623
  if (await statKind(seedPath, cache4) === "file") {
174575
174624
  frontier.push(seedPath);
174576
174625
  }
@@ -187045,8 +187094,8 @@ var require_dist12 = __commonJS({
187045
187094
  this.raw = this.version;
187046
187095
  return this;
187047
187096
  };
187048
- exports3.inc = inc3;
187049
- function inc3(version2, release3, loose, identifier) {
187097
+ exports3.inc = inc4;
187098
+ function inc4(version2, release3, loose, identifier) {
187050
187099
  if (typeof loose === "string") {
187051
187100
  identifier = loose;
187052
187101
  loose = void 0;
@@ -187731,8 +187780,8 @@ var require_dist12 = __commonJS({
187731
187780
  }
187732
187781
  return true;
187733
187782
  }
187734
- exports3.prerelease = prerelease;
187735
- function prerelease(version2, options) {
187783
+ exports3.prerelease = prerelease2;
187784
+ function prerelease2(version2, options) {
187736
187785
  var parsed = parse62(version2, options);
187737
187786
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
187738
187787
  }
@@ -187766,11 +187815,11 @@ var require_dist12 = __commonJS({
187766
187815
  var resolveCommand = require_resolveCommand();
187767
187816
  var escape2 = require_escape2();
187768
187817
  var readShebang = require_readShebang();
187769
- var semver4 = require_semver3();
187818
+ var semver5 = require_semver3();
187770
187819
  var isWin2 = process.platform === "win32";
187771
187820
  var isExecutableRegExp = /\.(?:com|exe)$/i;
187772
187821
  var isCmdShimRegExp = /node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;
187773
- var supportsShellOption = niceTry(() => semver4.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;
187774
187823
  function detectShebang(parsed) {
187775
187824
  parsed.file = resolveCommand(parsed);
187776
187825
  const shebang = parsed.file && readShebang(parsed.file);
@@ -188300,8 +188349,8 @@ var require_dist12 = __commonJS({
188300
188349
  this.raw = this.version;
188301
188350
  return this;
188302
188351
  };
188303
- exports3.inc = inc3;
188304
- function inc3(version2, release3, loose, identifier) {
188352
+ exports3.inc = inc4;
188353
+ function inc4(version2, release3, loose, identifier) {
188305
188354
  if (typeof loose === "string") {
188306
188355
  identifier = loose;
188307
188356
  loose = void 0;
@@ -189020,8 +189069,8 @@ var require_dist12 = __commonJS({
189020
189069
  }
189021
189070
  return true;
189022
189071
  }
189023
- exports3.prerelease = prerelease;
189024
- function prerelease(version2, options) {
189072
+ exports3.prerelease = prerelease2;
189073
+ function prerelease2(version2, options) {
189025
189074
  var parsed = parse62(version2, options);
189026
189075
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
189027
189076
  }
@@ -208201,7 +208250,7 @@ ${fields}`;
208201
208250
  var import_assert22 = __toESM2(require("assert"));
208202
208251
  var import_fs_extra = __toESM2(require_lib16());
208203
208252
  var import_multistream = __toESM2(require_multistream());
208204
- var import_path34 = __toESM2(require("path"));
208253
+ var import_path35 = __toESM2(require("path"));
208205
208254
  var import_async_sema = __toESM2(require_async_sema());
208206
208255
  var semaToPreventEMFILE = new import_async_sema.default(20);
208207
208256
  var FileFsRef = class _FileFsRef {
@@ -208243,7 +208292,7 @@ ${fields}`;
208243
208292
  (0, import_assert22.default)(typeof mode === "number");
208244
208293
  (0, import_assert22.default)(typeof stream2.pipe === "function");
208245
208294
  (0, import_assert22.default)(typeof fsPath === "string");
208246
- await import_fs_extra.default.mkdirp(import_path34.default.dirname(fsPath));
208295
+ await import_fs_extra.default.mkdirp(import_path35.default.dirname(fsPath));
208247
208296
  await new Promise((resolve11, reject) => {
208248
208297
  const dest = import_fs_extra.default.createWriteStream(fsPath, {
208249
208298
  mode: mode & 511
@@ -209201,12 +209250,12 @@ ${fields}`;
209201
209250
  }
209202
209251
  }
209203
209252
  };
209204
- var import_path35 = require("path");
209253
+ var import_path36 = require("path");
209205
209254
  var import_os5 = require("os");
209206
209255
  var import_fs_extra4 = __toESM2(require_lib16());
209207
209256
  async function getWritableDirectory() {
209208
209257
  const name = Math.floor(Math.random() * 2147483647).toString(16);
209209
- const directory = (0, import_path35.join)((0, import_os5.tmpdir)(), name);
209258
+ const directory = (0, import_path36.join)((0, import_os5.tmpdir)(), name);
209210
209259
  await (0, import_fs_extra4.mkdirp)(directory);
209211
209260
  return directory;
209212
209261
  }
@@ -214134,7 +214183,7 @@ var require_readdir_recursive = __commonJS({
214134
214183
  });
214135
214184
  module2.exports = __toCommonJS2(readdir_recursive_exports);
214136
214185
  var import_fs34 = __toESM2(require("fs"));
214137
- var import_path34 = __toESM2(require("path"));
214186
+ var import_path35 = __toESM2(require("path"));
214138
214187
  var import_minimatch8 = __toESM2(require_commonjs3());
214139
214188
  function patternMatcher(pattern) {
214140
214189
  return function(path20, stats) {
@@ -214162,7 +214211,7 @@ var require_readdir_recursive = __commonJS({
214162
214211
  return resolve11(list2);
214163
214212
  }
214164
214213
  files.forEach(function(file) {
214165
- const filePath = import_path34.default.join(path20, file);
214214
+ const filePath = import_path35.default.join(path20, file);
214166
214215
  import_fs34.default.lstat(filePath, function(_err, stats) {
214167
214216
  if (_err) {
214168
214217
  return reject(_err);
@@ -221963,7 +222012,7 @@ var require_utils10 = __commonJS({
221963
222012
  shouldInlineStaticFiles: () => shouldInlineStaticFiles
221964
222013
  });
221965
222014
  module2.exports = __toCommonJS2(utils_exports);
221966
- var import_path34 = require("path");
222015
+ var import_path35 = require("path");
221967
222016
  var import_stream10 = require("stream");
221968
222017
  var import_url13 = require("url");
221969
222018
  var import_ignore4 = __toESM2(require_ignore2());
@@ -222027,8 +222076,8 @@ var require_utils10 = __commonJS({
222027
222076
  };
222028
222077
  async function getUserIgnore(cwd) {
222029
222078
  const [vercelignore, nowignore] = await Promise.all([
222030
- maybeRead((0, import_path34.join)(cwd, ".vercelignore"), ""),
222031
- maybeRead((0, import_path34.join)(cwd, ".nowignore"), "")
222079
+ maybeRead((0, import_path35.join)(cwd, ".vercelignore"), ""),
222080
+ maybeRead((0, import_path35.join)(cwd, ".nowignore"), "")
222032
222081
  ]);
222033
222082
  if (vercelignore && nowignore) {
222034
222083
  throw new import_build_utils.NowBuildError({
@@ -222058,7 +222107,7 @@ var require_utils10 = __commonJS({
222058
222107
  debug4("Building file tree...");
222059
222108
  if (isDirectory && !Array.isArray(path20)) {
222060
222109
  const ignores2 = (absPath) => {
222061
- const rel = (0, import_path34.relative)(path20, absPath);
222110
+ const rel = (0, import_path35.relative)(path20, absPath);
222062
222111
  const ignored = ig.ignores(rel);
222063
222112
  if (ignored) {
222064
222113
  ignoreList.push(rel);
@@ -222069,7 +222118,7 @@ var require_utils10 = __commonJS({
222069
222118
  const refs = /* @__PURE__ */ new Set();
222070
222119
  if (prebuilt) {
222071
222120
  const vcConfigFilePaths = fileList.filter(
222072
- (file) => (0, import_path34.basename)(file) === ".vc-config.json"
222121
+ (file) => (0, import_path35.basename)(file) === ".vc-config.json"
222073
222122
  );
222074
222123
  const userIg = await getUserIgnore(path20);
222075
222124
  await Promise.all(
@@ -222079,9 +222128,9 @@ var require_utils10 = __commonJS({
222079
222128
  if (!config.filePathMap)
222080
222129
  return;
222081
222130
  for (const v12 of Object.values(config.filePathMap)) {
222082
- const absPath = (0, import_path34.join)(path20, v12);
222083
- const rel = (0, import_path34.relative)(path20, absPath);
222084
- 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)) {
222085
222134
  debug4(
222086
222135
  `Ignoring "filePathMap" entry "${v12}": resolves outside the deployment root`
222087
222136
  );
@@ -222099,7 +222148,7 @@ var require_utils10 = __commonJS({
222099
222148
  );
222100
222149
  try {
222101
222150
  let microfrontendConfigPath = (0, import_utils68.findConfig)({
222102
- dir: (0, import_path34.join)(path20, rootDirectory || "")
222151
+ dir: (0, import_path35.join)(path20, rootDirectory || "")
222103
222152
  });
222104
222153
  if (!microfrontendConfigPath && !rootDirectory && projectName) {
222105
222154
  microfrontendConfigPath = (0, import_utils68.findConfig)({
@@ -222117,7 +222166,7 @@ var require_utils10 = __commonJS({
222117
222166
  }
222118
222167
  }
222119
222168
  try {
222120
- const routesJsonPath = (0, import_path34.join)(path20, ".vercel", "routes.json");
222169
+ const routesJsonPath = (0, import_path35.join)(path20, ".vercel", "routes.json");
222121
222170
  const routesJsonContent = await maybeRead(routesJsonPath, null);
222122
222171
  if (routesJsonContent !== null) {
222123
222172
  refs.add(routesJsonPath);
@@ -222129,12 +222178,12 @@ var require_utils10 = __commonJS({
222129
222178
  if (prebuilt && bulkRedirectsPath) {
222130
222179
  try {
222131
222180
  const projectRoot = path20;
222132
- const bulkRedirectsFullPath = (0, import_path34.join)(
222181
+ const bulkRedirectsFullPath = (0, import_path35.join)(
222133
222182
  projectRoot,
222134
222183
  rootDirectory || "",
222135
222184
  bulkRedirectsPath
222136
222185
  );
222137
- const relativeFromRoot = (0, import_path34.relative)(projectRoot, bulkRedirectsFullPath);
222186
+ const relativeFromRoot = (0, import_path35.relative)(projectRoot, bulkRedirectsFullPath);
222138
222187
  if (relativeFromRoot.startsWith("..")) {
222139
222188
  debug4(
222140
222189
  `Skipping bulk redirects path "${bulkRedirectsPath}" - path traversal detected (resolves outside project root)`
@@ -222189,9 +222238,9 @@ var require_utils10 = __commonJS({
222189
222238
  if (typeof cwd !== "string") {
222190
222239
  throw new Error(`\`cwd\` must be a "string"`);
222191
222240
  }
222192
- const relOutputDir = (0, import_path34.relative)(cwd, vercelOutputDir);
222241
+ const relOutputDir = (0, import_path35.relative)(cwd, vercelOutputDir);
222193
222242
  ignores = ["*"];
222194
- const parts = relOutputDir.split(import_path34.sep);
222243
+ const parts = relOutputDir.split(import_path35.sep);
222195
222244
  parts.forEach((_5, i5) => {
222196
222245
  const level = parts.slice(0, i5 + 1).join("/");
222197
222246
  ignores.push(`!${level}`);
@@ -222231,8 +222280,8 @@ var require_utils10 = __commonJS({
222231
222280
  const files = await Promise.all(
222232
222281
  cwds.map(async (cwd2) => {
222233
222282
  const [vercelignore, nowignore] = await Promise.all([
222234
- maybeRead((0, import_path34.join)(cwd2, ".vercelignore"), ""),
222235
- maybeRead((0, import_path34.join)(cwd2, ".nowignore"), "")
222283
+ maybeRead((0, import_path35.join)(cwd2, ".vercelignore"), ""),
222284
+ maybeRead((0, import_path35.join)(cwd2, ".nowignore"), "")
222236
222285
  ]);
222237
222286
  if (vercelignore && nowignore) {
222238
222287
  throw new import_build_utils.NowBuildError({
@@ -222244,7 +222293,7 @@ var require_utils10 = __commonJS({
222244
222293
  return vercelignore || nowignore;
222245
222294
  })
222246
222295
  );
222247
- 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);
222248
222297
  if (isRustProject) {
222249
222298
  ignores.push("/target");
222250
222299
  }
@@ -222326,9 +222375,9 @@ ${clearRelative(ignoreFile)}`);
222326
222375
  for (const name of file.names) {
222327
222376
  let fileName;
222328
222377
  if (clientOptions.isDirectory) {
222329
- 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;
222330
222379
  } else {
222331
- const segments = name.split(import_path34.sep);
222380
+ const segments = name.split(import_path35.sep);
222332
222381
  fileName = segments[segments.length - 1];
222333
222382
  }
222334
222383
  const normalizedName = isWin ? fileName.replace(/\\/g, "/") : fileName;
@@ -223356,7 +223405,7 @@ var require_upload = __commonJS({
223356
223405
  var import_async_retry5 = __toESM2(require_lib15());
223357
223406
  var import_async_sema = require_lib12();
223358
223407
  var import_utils68 = require_utils10();
223359
- var import_errors49 = require_errors3();
223408
+ var import_errors50 = require_errors3();
223360
223409
  var import_deploy = require_deploy();
223361
223410
  var isClientNetworkError = (err) => {
223362
223411
  if (!(err instanceof Error)) {
@@ -223528,11 +223577,11 @@ var require_upload = __commonJS({
223528
223577
  `An internal error occurred in upload request. Not retrying...`
223529
223578
  );
223530
223579
  const { error: error3 } = await res.json();
223531
- err = new import_errors49.DeploymentError(error3);
223580
+ err = new import_errors50.DeploymentError(error3);
223532
223581
  } else {
223533
223582
  debug4(`A server error occurred in upload request. Retrying...`);
223534
223583
  const { error: error3 } = await res.json();
223535
- throw new import_errors49.DeploymentError(error3);
223584
+ throw new import_errors50.DeploymentError(error3);
223536
223585
  }
223537
223586
  } catch (e5) {
223538
223587
  debug4(`An unexpected error occurred in upload promise:
@@ -228847,8 +228896,8 @@ var require_collect_deployment_files = __commonJS({
228847
228896
  module2.exports = __toCommonJS2(collect_deployment_files_exports);
228848
228897
  var import_error_utils = require_dist13();
228849
228898
  var import_fs_extra = require_lib11();
228850
- var import_path34 = require("path");
228851
- var import_errors49 = require_errors3();
228899
+ var import_path35 = require("path");
228900
+ var import_errors50 = require_errors3();
228852
228901
  var import_utils68 = require_utils10();
228853
228902
  var import_archive = require_archive();
228854
228903
  var import_hashes = require_hashes();
@@ -228857,7 +228906,7 @@ var require_collect_deployment_files = __commonJS({
228857
228906
  debug4(
228858
228907
  `Error: 'path' is expected to be a string or an array. Received ${typeof path20}`
228859
228908
  );
228860
- throw new import_errors49.DeploymentError({
228909
+ throw new import_errors50.DeploymentError({
228861
228910
  code: "missing_path",
228862
228911
  message: "Path not provided"
228863
228912
  });
@@ -228869,15 +228918,15 @@ var require_collect_deployment_files = __commonJS({
228869
228918
  clientOptions.isDirectory = isDirectory;
228870
228919
  if (Array.isArray(path20)) {
228871
228920
  for (const filePath of path20) {
228872
- if (!(0, import_path34.isAbsolute)(filePath)) {
228873
- throw new import_errors49.DeploymentError({
228921
+ if (!(0, import_path35.isAbsolute)(filePath)) {
228922
+ throw new import_errors50.DeploymentError({
228874
228923
  code: "invalid_path",
228875
228924
  message: `Provided path ${filePath} is not absolute`
228876
228925
  });
228877
228926
  }
228878
228927
  }
228879
- } else if (!(0, import_path34.isAbsolute)(path20)) {
228880
- throw new import_errors49.DeploymentError({
228928
+ } else if (!(0, import_path35.isAbsolute)(path20)) {
228929
+ throw new import_errors50.DeploymentError({
228881
228930
  code: "invalid_path",
228882
228931
  message: `Provided path ${path20} is not absolute`
228883
228932
  });
@@ -228900,9 +228949,9 @@ var require_collect_deployment_files = __commonJS({
228900
228949
  filesMap = clientOptions.archive === "tgz" ? await (0, import_archive.createTgzFiles)(workPath, fileList, debug4) : await (0, import_hashes.hashes)(fileList);
228901
228950
  } catch (err) {
228902
228951
  if (clientOptions.prebuilt && (0, import_error_utils.isErrnoException)(err) && err.code === "ENOENT" && err.path) {
228903
- const errPath = (0, import_path34.relative)(workPath, err.path);
228904
- err.message = `File does not exist: "${(0, import_path34.relative)(workPath, errPath)}"`;
228905
- 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")) {
228906
228955
  err.message = `Please ensure project dependencies have been installed:
228907
228956
  ${err.message}`;
228908
228957
  }
@@ -228945,7 +228994,7 @@ var require_create_deployment = __commonJS({
228945
228994
  var import_deploy = require_deploy();
228946
228995
  var import_upload = require_upload();
228947
228996
  var import_utils68 = require_utils10();
228948
- var import_errors49 = require_errors3();
228997
+ var import_errors50 = require_errors3();
228949
228998
  var import_collect_deployment_files = require_collect_deployment_files();
228950
228999
  function buildCreateDeployment() {
228951
229000
  return async function* createDeployment2(clientOptions, deploymentOptions = {}) {
@@ -228957,7 +229006,7 @@ var require_create_deployment = __commonJS({
228957
229006
  debug4(
228958
229007
  `Error: 'token' is expected to be a string. Received ${typeof clientOptions.token}`
228959
229008
  );
228960
- throw new import_errors49.DeploymentError({
229009
+ throw new import_errors50.DeploymentError({
228961
229010
  code: "token_not_provided",
228962
229011
  message: "Options object must include a `token`"
228963
229012
  });
@@ -228965,7 +229014,7 @@ var require_create_deployment = __commonJS({
228965
229014
  if (clientOptions.manual) {
228966
229015
  debug4("Manual provisioning mode enabled");
228967
229016
  if (!clientOptions.prebuilt) {
228968
- throw new import_errors49.DeploymentError({
229017
+ throw new import_errors50.DeploymentError({
228969
229018
  code: "invalid_options",
228970
229019
  message: "The `manual` option requires `prebuilt` to be true"
228971
229020
  });
@@ -229047,23 +229096,23 @@ var require_continue = __commonJS({
229047
229096
  continueDeployment: () => continueDeployment2
229048
229097
  });
229049
229098
  module2.exports = __toCommonJS2(continue_exports);
229050
- var import_path34 = require("path");
229099
+ var import_path35 = require("path");
229051
229100
  var import_fs_extra = __toESM2(require_lib11());
229052
229101
  var import_check_deployment_status = require_check_deployment_status();
229053
229102
  var import_utils68 = require_utils10();
229054
229103
  var import_hashes = require_hashes();
229055
229104
  var import_ready_state = require_ready_state();
229056
229105
  var import_upload = require_upload();
229057
- var import_errors49 = require_errors3();
229106
+ var import_errors50 = require_errors3();
229058
229107
  var import_archive = require_archive();
229059
229108
  async function* continueDeployment2(options) {
229060
229109
  const debug4 = (0, import_utils68.createDebug)(options.debug);
229061
229110
  debug4(`Continuing deployment: ${options.deploymentId}`);
229062
- 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");
229063
229112
  if (!await import_fs_extra.default.pathExists(outputDir)) {
229064
229113
  return yield {
229065
229114
  type: "error",
229066
- payload: new import_errors49.DeploymentError({
229115
+ payload: new import_errors50.DeploymentError({
229067
229116
  code: "output_dir_not_found",
229068
229117
  message: `Output directory not found at ${outputDir}. Run 'vercel build' first.`
229069
229118
  })
@@ -229074,7 +229123,7 @@ var require_continue = __commonJS({
229074
229123
  { isDirectory: true, prebuilt: true, vercelOutputDir: outputDir },
229075
229124
  debug4
229076
229125
  );
229077
- const provisionJsonPath = (0, import_path34.join)(outputDir, "provision.json");
229126
+ const provisionJsonPath = (0, import_path35.join)(outputDir, "provision.json");
229078
229127
  const unbundledFiles = fileList.filter((f8) => f8 === provisionJsonPath);
229079
229128
  let files;
229080
229129
  if (options.archive === "tgz") {
@@ -229162,7 +229211,7 @@ var require_continue = __commonJS({
229162
229211
  if (!deployment) {
229163
229212
  return yield {
229164
229213
  type: "error",
229165
- payload: new import_errors49.DeploymentError({
229214
+ payload: new import_errors50.DeploymentError({
229166
229215
  code: "continue_failed",
229167
229216
  message: "Failed to continue deployment after uploading files"
229168
229217
  })
@@ -229264,7 +229313,7 @@ var require_inspect_deployment_files = __commonJS({
229264
229313
  inspectDeploymentFiles: () => inspectDeploymentFiles2
229265
229314
  });
229266
229315
  module2.exports = __toCommonJS2(inspect_deployment_files_exports);
229267
- var import_path34 = require("path");
229316
+ var import_path35 = require("path");
229268
229317
  var import_collect_deployment_files = require_collect_deployment_files();
229269
229318
  var import_utils68 = require_utils10();
229270
229319
  async function inspectDeploymentFiles2(clientOptions) {
@@ -229276,8 +229325,8 @@ var require_inspect_deployment_files = __commonJS({
229276
229325
  for (const [sha, file] of filesMap) {
229277
229326
  const size2 = file.data?.byteLength || file.data?.length || 0;
229278
229327
  for (const name of file.names) {
229279
- const pathName = isDirectory ? (0, import_path34.relative)(workPath, name) : name.split(import_path34.sep).at(-1) || name;
229280
- 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("/");
229281
229330
  const deploymentFile = {
229282
229331
  path: normalizedPath,
229283
229332
  size: size2,
@@ -230366,7 +230415,7 @@ var require_package7 = __commonJS({
230366
230415
  "package.json"(exports2, module2) {
230367
230416
  module2.exports = {
230368
230417
  name: "@sentry/craft",
230369
- version: "3.6.0",
230418
+ version: "3.7.0",
230370
230419
  description: "The universal sentry workflow CLI",
230371
230420
  main: "dist/craft",
230372
230421
  repository: "https://github.com/getsentry/craft",
@@ -230573,7 +230622,7 @@ function getPackage() {
230573
230622
  }
230574
230623
  function getPackageVersion3() {
230575
230624
  const { version: version2 } = getPackage();
230576
- const buildInfo = "5a97c9fdb9182ed0aef66f36accbbf022e7bfbb5";
230625
+ const buildInfo = "055aa3c9b28b95a24c86a82cf48b08fea499d3d7";
230577
230626
  return buildInfo ? `${version2} (${buildInfo})` : version2;
230578
230627
  }
230579
230628
  function semVerToString(s8) {
@@ -230625,479 +230674,6 @@ var require_get_caller_file = __commonJS({
230625
230674
  }
230626
230675
  });
230627
230676
 
230628
- // node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/quote.js
230629
- var require_quote = __commonJS({
230630
- "node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/quote.js"(exports2, module2) {
230631
- "use strict";
230632
- init_import_meta_url();
230633
- var OPS = (
230634
- /** @type {const} */
230635
- [
230636
- "||",
230637
- "&&",
230638
- ";;&",
230639
- ";;",
230640
- ";&",
230641
- "|&",
230642
- "<(",
230643
- ">(",
230644
- "<<<",
230645
- "<<-",
230646
- "<<",
230647
- ">>",
230648
- ">&",
230649
- ">|",
230650
- "&>>",
230651
- "&>",
230652
- "<&",
230653
- "<>",
230654
- "&",
230655
- ";",
230656
- "(",
230657
- ")",
230658
- "|",
230659
- "<",
230660
- ">"
230661
- ]
230662
- );
230663
- var LINE_TERMINATORS = /[\n\r\u2028\u2029]/;
230664
- var GLOB_SHELL_SPECIAL = /[\s#!"$&'():;<=>@\\^`|~]/g;
230665
- module2.exports = function quote(xs3) {
230666
- var sawComment = false;
230667
- return xs3.map(function(s8) {
230668
- if (sawComment && typeof s8 === "string" && LINE_TERMINATORS.test(s8)) {
230669
- throw new TypeError("a token after a `comment` must not contain line terminators");
230670
- }
230671
- if (s8 === "") {
230672
- return (
230673
- /** @type {const} */
230674
- "''"
230675
- );
230676
- }
230677
- if (s8 && typeof s8 === "object") {
230678
- if ("op" in s8 && s8.op === "glob") {
230679
- if (typeof s8.pattern !== "string") {
230680
- throw new TypeError("glob token requires a string `pattern`");
230681
- }
230682
- if (LINE_TERMINATORS.test(s8.pattern)) {
230683
- throw new TypeError("glob `pattern` must not contain line terminators");
230684
- }
230685
- if (s8.pattern === "") {
230686
- return (
230687
- /** @type {const} */
230688
- "''"
230689
- );
230690
- }
230691
- return s8.pattern.replace(GLOB_SHELL_SPECIAL, "\\$&");
230692
- }
230693
- if ("op" in s8 && typeof s8.op === "string") {
230694
- if (OPS.indexOf(s8.op) < 0) {
230695
- throw new TypeError("invalid `op` value: " + JSON.stringify(s8.op));
230696
- }
230697
- return s8.op.replace(/[\s\S]/g, "\\$&");
230698
- }
230699
- if ("comment" in s8 && typeof s8.comment === "string") {
230700
- if (LINE_TERMINATORS.test(s8.comment)) {
230701
- throw new TypeError("`comment` must not contain line terminators");
230702
- }
230703
- sawComment = true;
230704
- return "#" + s8.comment;
230705
- }
230706
- throw new TypeError("unrecognized object token shape");
230707
- }
230708
- if (/'/.test(s8) && /!/.test(s8)) {
230709
- return "'" + s8.replace(/'/g, `'"'"'`) + "'";
230710
- }
230711
- if (/["\s\\]/.test(s8) && !/'/.test(s8)) {
230712
- return "'" + s8 + "'";
230713
- }
230714
- if (/["'\s]/.test(s8)) {
230715
- return '"' + s8.replace(/(["\\$`])/g, "\\$1") + '"';
230716
- }
230717
- return String(s8).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g, "$1\\$2");
230718
- }).join(" ");
230719
- };
230720
- }
230721
- });
230722
-
230723
- // node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/parse.js
230724
- var require_parse4 = __commonJS({
230725
- "node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/parse.js"(exports2, module2) {
230726
- "use strict";
230727
- init_import_meta_url();
230728
- var CONTROL = (
230729
- /** @type {const} */
230730
- "(?:" + /** @type {const} */
230731
- [
230732
- "\\|\\|",
230733
- "\\&(?:\\&|>>?)",
230734
- // `&&`, `&>`, and `&>>`
230735
- ";;\\&?",
230736
- // `;;` and `;;&`
230737
- "[;|]\\&",
230738
- // `;&` and `|&`
230739
- "\\<\\(",
230740
- "\\<\\<\\<",
230741
- "\\<\\<-",
230742
- "\\<\\<(?!\\()",
230743
- // `<<(` stays `<` and `<(`, as zsh reads it; other shells reject it
230744
- ">>",
230745
- ">[&|(]",
230746
- // `>&`, `>|`, and `>(`
230747
- "<[&>]",
230748
- // `<&` and `<>`
230749
- "[&;()|<>]"
230750
- ].join(
230751
- /** @type {const} */
230752
- "|"
230753
- ) + /** @type {const} */
230754
- ")"
230755
- );
230756
- var controlRE = new RegExp("^" + CONTROL + "$");
230757
- var META = (
230758
- /** @type {const} */
230759
- "|&;()<> \\t"
230760
- );
230761
- var SINGLE_QUOTE = (
230762
- /** @type {const} */
230763
- "'([^']*?)'"
230764
- );
230765
- var ANSI_C_BODY = "(?:\\\\[\\s\\S]|[^\\\\'])*?";
230766
- var ANSI_C_QUOTE = "\\$'" + ANSI_C_BODY + "'";
230767
- var ansiCAt = new RegExp("\\$'" + ANSI_C_BODY + "(?:(')|\\\\?$)", "g");
230768
- var ANSI_C_LETTERS = "abeEfnrtv";
230769
- var ANSI_C_CHARS = "\x07\b\x1B\x1B\f\n\r \v";
230770
- var hash = /^#$/;
230771
- var SQ = (
230772
- /** @type {const} */
230773
- "'"
230774
- );
230775
- var DQ = (
230776
- /** @type {const} */
230777
- '"'
230778
- );
230779
- var DS = (
230780
- /** @type {const} */
230781
- "$"
230782
- );
230783
- var TOKEN = "";
230784
- var mult = (
230785
- /** @type {const} */
230786
- 4294967296
230787
- );
230788
- for (i5 = 0; i5 < 4; i5++) {
230789
- TOKEN += (mult * Math.random()).toString(16);
230790
- }
230791
- var i5;
230792
- var startsWithToken = new RegExp("^" + TOKEN);
230793
- function matchAll(s8, r6) {
230794
- var origIndex = r6.lastIndex;
230795
- var matches = [];
230796
- var matchObj;
230797
- while (matchObj = r6.exec(s8)) {
230798
- matches[matches.length] = matchObj;
230799
- if (r6.lastIndex === matchObj.index) {
230800
- r6.lastIndex += 1;
230801
- }
230802
- }
230803
- r6.lastIndex = origIndex;
230804
- return matches;
230805
- }
230806
- function getVar(env3, pre, key) {
230807
- var r6 = typeof env3 === "function" ? env3(key) : env3[key];
230808
- if (typeof r6 === "undefined" && key != "") {
230809
- r6 = "";
230810
- } else if (typeof r6 === "undefined") {
230811
- r6 = "$";
230812
- }
230813
- if (typeof r6 === "object") {
230814
- return pre + TOKEN + JSON.stringify(r6) + TOKEN;
230815
- }
230816
- return pre + r6;
230817
- }
230818
- 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;
230819
- function expandAnsiCEscape(m10, escape2) {
230820
- var kind = escape2.charAt(0);
230821
- if (kind === "c") {
230822
- var ctrl = escape2.charAt(1);
230823
- return ctrl === "?" ? "\x7F" : String.fromCharCode(ctrl.charCodeAt(0) & 31);
230824
- }
230825
- if (kind === "x" || kind === "u" || kind === "U") {
230826
- var cp = parseInt(escape2.slice(1), 16);
230827
- if (cp > 1114111) {
230828
- return m10;
230829
- }
230830
- return String.fromCharCode.apply(null, cp > 65535 ? [55232 + (cp >> 10), 56320 + (cp & 1023)] : [cp]);
230831
- }
230832
- if (kind >= "0" && kind <= "7") {
230833
- return String.fromCharCode(parseInt(escape2, 8) & 255);
230834
- }
230835
- var letter = ANSI_C_LETTERS.indexOf(escape2);
230836
- return letter < 0 ? escape2 : ANSI_C_CHARS.charAt(letter);
230837
- }
230838
- function expandAnsiC(body) {
230839
- return body.replace(ansiCEscape, expandAnsiCEscape).split("\0")[0];
230840
- }
230841
- function closesAnsiC(s8, i6) {
230842
- ansiCAt.lastIndex = i6;
230843
- return !!/** @type {RegExpExecArray} */
230844
- ansiCAt.exec(s8)[1];
230845
- }
230846
- function parseInternal(string2, env3, opts) {
230847
- if (!opts) {
230848
- opts = {};
230849
- }
230850
- var BS = opts.escape || "\\";
230851
- var ifs = opts.splitUnquoted === true ? " \n" : typeof opts.splitUnquoted === "string" ? opts.splitUnquoted : "";
230852
- var BAREWORD = "(\\" + BS + `['"$\\` + BS + META + "]|\\$\\$|\\$(?!" + ANSI_C_QUOTE.slice(2) + `)|[^\\s'"$` + META + "])+";
230853
- var DOUBLE_QUOTE = '"(?:\\' + BS + '[\\s\\S]|[^"\\' + BS + '])*"';
230854
- var chunker = new RegExp([
230855
- "(" + CONTROL + ")",
230856
- // control chars
230857
- "(" + ANSI_C_QUOTE + "|" + BAREWORD + "|" + DOUBLE_QUOTE + "|" + SINGLE_QUOTE + ")+"
230858
- ].join("|"), "g");
230859
- var matches = matchAll(string2, chunker);
230860
- if (matches.length === 0) {
230861
- return [];
230862
- }
230863
- if (!env3) {
230864
- env3 = {};
230865
- }
230866
- var commented = false;
230867
- return matches.map(function(match3) {
230868
- var s8 = match3[0];
230869
- if (!s8 || commented) {
230870
- return void 0;
230871
- }
230872
- if (controlRE.test(s8)) {
230873
- return (
230874
- /** @type {ControlOperator} */
230875
- { op: s8 }
230876
- );
230877
- }
230878
- var quote = false;
230879
- var esc = false;
230880
- var out = "";
230881
- var words = [];
230882
- var sawQuote = false;
230883
- var pendingNw = null;
230884
- var isGlob = false;
230885
- var i6;
230886
- function parseEnvVar() {
230887
- i6 += 1;
230888
- var varend;
230889
- var varname;
230890
- var char = s8.charAt(i6);
230891
- if (char === "{") {
230892
- i6 += 1;
230893
- if (s8.charAt(i6) === "}") {
230894
- throw new Error("Bad substitution: " + s8.slice(i6 - 2, i6 + 1));
230895
- }
230896
- var depth = 1;
230897
- varend = i6;
230898
- while (depth > 0 && varend < s8.length) {
230899
- if (s8.charAt(varend) === "{" && s8.charAt(varend - 1) === "$") {
230900
- depth += 1;
230901
- } else if (s8.charAt(varend) === "}") {
230902
- depth -= 1;
230903
- }
230904
- varend += 1;
230905
- }
230906
- if (depth !== 0) {
230907
- throw new Error("Bad substitution: " + s8.slice(i6));
230908
- }
230909
- varend -= 1;
230910
- varname = s8.slice(i6, varend);
230911
- i6 = varend;
230912
- } else if (/[*@#?$!-]/.test(char)) {
230913
- varname = char;
230914
- } else {
230915
- var slicedFromI = s8.slice(i6);
230916
- varend = slicedFromI.match(/[^\w\d_]/);
230917
- if (!varend) {
230918
- varname = slicedFromI;
230919
- i6 = s8.length;
230920
- } else {
230921
- varname = slicedFromI.slice(0, varend.index);
230922
- i6 += /** @type {number} */
230923
- varend.index - 1;
230924
- }
230925
- }
230926
- return getVar(
230927
- /** @type {NonNullable<typeof env>} */
230928
- env3,
230929
- "",
230930
- varname
230931
- );
230932
- }
230933
- function flushRun() {
230934
- if (pendingNw === null) {
230935
- return;
230936
- }
230937
- if (pendingNw === 0) {
230938
- if (out !== "") {
230939
- words[words.length] = out;
230940
- out = "";
230941
- }
230942
- } else {
230943
- words[words.length] = out;
230944
- out = "";
230945
- for (var fe3 = 1; fe3 < pendingNw; fe3 += 1) {
230946
- words[words.length] = "";
230947
- }
230948
- }
230949
- pendingNw = null;
230950
- }
230951
- for (i6 = 0; i6 < s8.length; i6++) {
230952
- var c7 = s8.charAt(i6);
230953
- if (ifs && c7 !== DS) {
230954
- flushRun();
230955
- }
230956
- isGlob = isGlob || !quote && (c7 === "*" || c7 === "?");
230957
- if (esc) {
230958
- out += c7;
230959
- esc = false;
230960
- } else if (quote) {
230961
- if (c7 === quote) {
230962
- quote = false;
230963
- } else if (quote == SQ) {
230964
- out += c7;
230965
- } else {
230966
- if (c7 === BS) {
230967
- i6 += 1;
230968
- c7 = s8.charAt(i6);
230969
- if (c7 === DQ || c7 === BS || c7 === DS) {
230970
- out += c7;
230971
- } else {
230972
- out += BS + c7;
230973
- }
230974
- } else if (c7 === DS) {
230975
- out += parseEnvVar();
230976
- } else {
230977
- out += c7;
230978
- }
230979
- }
230980
- } else if (c7 === DQ || c7 === SQ) {
230981
- quote = c7;
230982
- sawQuote = true;
230983
- } else if (controlRE.test(c7)) {
230984
- return (
230985
- /** @type {ControlOperator} */
230986
- { op: s8 }
230987
- );
230988
- } else if (hash.test(c7)) {
230989
- commented = true;
230990
- var commentObj = { comment: string2.slice(match3.index + i6 + 1) };
230991
- if (out.length) {
230992
- return (
230993
- /** @type {const} */
230994
- [out, commentObj]
230995
- );
230996
- }
230997
- return (
230998
- /** @type {const} */
230999
- [commentObj]
231000
- );
231001
- } else if (c7 === BS) {
231002
- esc = true;
231003
- } else if (c7 === DS && s8.charAt(i6 + 1) === SQ && closesAnsiC(s8, i6)) {
231004
- flushRun();
231005
- sawQuote = true;
231006
- out += expandAnsiC(s8.slice(i6 + 2, ansiCAt.lastIndex - 1));
231007
- i6 = ansiCAt.lastIndex - 1;
231008
- } else if (c7 === DS) {
231009
- var value = parseEnvVar();
231010
- if (!ifs) {
231011
- out += value;
231012
- } else {
231013
- for (var vi3 = 0; vi3 < value.length; vi3 += 1) {
231014
- var vc = value.charAt(vi3);
231015
- if (ifs.indexOf(vc) < 0) {
231016
- flushRun();
231017
- out += vc;
231018
- } else if (pendingNw === null) {
231019
- pendingNw = vc === " " || vc === " " || vc === "\n" ? 0 : 1;
231020
- } else if (vc !== " " && vc !== " " && vc !== "\n") {
231021
- pendingNw += 1;
231022
- }
231023
- }
231024
- }
231025
- } else {
231026
- out += c7;
231027
- }
231028
- }
231029
- if (isGlob) {
231030
- return (
231031
- /** @type {GlobPattern} */
231032
- { op: "glob", pattern: out }
231033
- );
231034
- }
231035
- if (ifs) {
231036
- if (pendingNw !== null && pendingNw > 0) {
231037
- words[words.length] = out;
231038
- out = "";
231039
- for (var te5 = 1; te5 < pendingNw; te5 += 1) {
231040
- words[words.length] = "";
231041
- }
231042
- }
231043
- if (out !== "" || sawQuote && words.length === 0) {
231044
- words[words.length] = out;
231045
- }
231046
- return words;
231047
- }
231048
- return out;
231049
- }).reduce(
231050
- function(prev, arg) {
231051
- if (typeof arg === "undefined") {
231052
- return prev;
231053
- }
231054
- [].concat(arg).forEach(function(entry) {
231055
- prev[prev.length] = entry;
231056
- });
231057
- return prev;
231058
- },
231059
- /** @type {ParseEntry[]} */
231060
- []
231061
- );
231062
- }
231063
- module2.exports = function parse15(s8, env3, opts) {
231064
- var mapped = parseInternal(s8, env3, opts);
231065
- if (typeof env3 !== "function") {
231066
- return mapped;
231067
- }
231068
- return mapped.reduce(
231069
- function(acc, s9) {
231070
- if (typeof s9 === "object") {
231071
- acc[acc.length] = s9;
231072
- return acc;
231073
- }
231074
- var xs3 = s9.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g"));
231075
- if (xs3.length === 1) {
231076
- acc[acc.length] = xs3[0];
231077
- return acc;
231078
- }
231079
- xs3.filter(Boolean).forEach(function(x8) {
231080
- acc[acc.length] = startsWithToken.test(x8) ? JSON.parse(x8.split(TOKEN)[1]) : x8;
231081
- });
231082
- return acc;
231083
- },
231084
- /** @type {ParseEntry[]} */
231085
- []
231086
- );
231087
- };
231088
- }
231089
- });
231090
-
231091
- // node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/index.js
231092
- var require_shell_quote = __commonJS({
231093
- "node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/index.js"(exports2) {
231094
- "use strict";
231095
- init_import_meta_url();
231096
- exports2.quote = require_quote();
231097
- exports2.parse = require_parse4();
231098
- }
231099
- });
231100
-
231101
230677
  // node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js
231102
230678
  var require_constants4 = __commonJS({
231103
230679
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js"(exports2, module2) {
@@ -231529,16 +231105,16 @@ var require_semver = __commonJS({
231529
231105
  }
231530
231106
  }
231531
231107
  if (identifier) {
231532
- let prerelease = [identifier, base];
231108
+ let prerelease2 = [identifier, base];
231533
231109
  if (identifierBase === false) {
231534
- prerelease = [identifier];
231110
+ prerelease2 = [identifier];
231535
231111
  }
231536
231112
  if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
231537
231113
  if (isNaN(this.prerelease[1])) {
231538
- this.prerelease = prerelease;
231114
+ this.prerelease = prerelease2;
231539
231115
  }
231540
231116
  } else {
231541
- this.prerelease = prerelease;
231117
+ this.prerelease = prerelease2;
231542
231118
  }
231543
231119
  }
231544
231120
  break;
@@ -231558,7 +231134,7 @@ var require_semver = __commonJS({
231558
231134
  });
231559
231135
 
231560
231136
  // node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js
231561
- var require_parse5 = __commonJS({
231137
+ var require_parse4 = __commonJS({
231562
231138
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js"(exports2, module2) {
231563
231139
  "use strict";
231564
231140
  init_import_meta_url();
@@ -231585,7 +231161,7 @@ var require_valid = __commonJS({
231585
231161
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js"(exports2, module2) {
231586
231162
  "use strict";
231587
231163
  init_import_meta_url();
231588
- var parse15 = require_parse5();
231164
+ var parse15 = require_parse4();
231589
231165
  var valid2 = (version2, options) => {
231590
231166
  const v12 = parse15(version2, options);
231591
231167
  return v12 ? v12.version : null;
@@ -231599,7 +231175,7 @@ var require_clean = __commonJS({
231599
231175
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js"(exports2, module2) {
231600
231176
  "use strict";
231601
231177
  init_import_meta_url();
231602
- var parse15 = require_parse5();
231178
+ var parse15 = require_parse4();
231603
231179
  var clean = (version2, options) => {
231604
231180
  const s8 = parse15(version2.trim().replace(/^[=v]+/, ""), options);
231605
231181
  return s8 ? s8.version : null;
@@ -231614,7 +231190,7 @@ var require_inc = __commonJS({
231614
231190
  "use strict";
231615
231191
  init_import_meta_url();
231616
231192
  var SemVer5 = require_semver();
231617
- var inc3 = (version2, release3, options, identifier, identifierBase) => {
231193
+ var inc4 = (version2, release3, options, identifier, identifierBase) => {
231618
231194
  if (typeof options === "string") {
231619
231195
  identifierBase = identifier;
231620
231196
  identifier = options;
@@ -231629,7 +231205,7 @@ var require_inc = __commonJS({
231629
231205
  return null;
231630
231206
  }
231631
231207
  };
231632
- module2.exports = inc3;
231208
+ module2.exports = inc4;
231633
231209
  }
231634
231210
  });
231635
231211
 
@@ -231638,7 +231214,7 @@ var require_diff = __commonJS({
231638
231214
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js"(exports2, module2) {
231639
231215
  "use strict";
231640
231216
  init_import_meta_url();
231641
- var parse15 = require_parse5();
231217
+ var parse15 = require_parse4();
231642
231218
  var diff = (version1, version2) => {
231643
231219
  const v12 = parse15(version1, null, true);
231644
231220
  const v22 = parse15(version2, null, true);
@@ -231716,12 +231292,12 @@ var require_prerelease = __commonJS({
231716
231292
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js"(exports2, module2) {
231717
231293
  "use strict";
231718
231294
  init_import_meta_url();
231719
- var parse15 = require_parse5();
231720
- var prerelease = (version2, options) => {
231295
+ var parse15 = require_parse4();
231296
+ var prerelease2 = (version2, options) => {
231721
231297
  const parsed = parse15(version2, options);
231722
231298
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
231723
231299
  };
231724
- module2.exports = prerelease;
231300
+ module2.exports = prerelease2;
231725
231301
  }
231726
231302
  });
231727
231303
 
@@ -231918,7 +231494,7 @@ var require_coerce = __commonJS({
231918
231494
  "use strict";
231919
231495
  init_import_meta_url();
231920
231496
  var SemVer5 = require_semver();
231921
- var parse15 = require_parse5();
231497
+ var parse15 = require_parse4();
231922
231498
  var { safeRe: re6, t: t6 } = require_re();
231923
231499
  var coerce = (version2, options) => {
231924
231500
  if (version2 instanceof SemVer5) {
@@ -231951,9 +231527,9 @@ var require_coerce = __commonJS({
231951
231527
  const major2 = match3[2];
231952
231528
  const minor = match3[3] || "0";
231953
231529
  const patch = match3[4] || "0";
231954
- const prerelease = options.includePrerelease && match3[5] ? `-${match3[5]}` : "";
231530
+ const prerelease2 = options.includePrerelease && match3[5] ? `-${match3[5]}` : "";
231955
231531
  const build = options.includePrerelease && match3[6] ? `+${match3[6]}` : "";
231956
- return parse15(`${major2}.${minor}.${patch}${prerelease}${build}`, options);
231532
+ return parse15(`${major2}.${minor}.${patch}${prerelease2}${build}`, options);
231957
231533
  };
231958
231534
  module2.exports = coerce;
231959
231535
  }
@@ -232986,15 +232562,15 @@ var require_semver2 = __commonJS({
232986
232562
  var constants4 = require_constants4();
232987
232563
  var SemVer5 = require_semver();
232988
232564
  var identifiers = require_identifiers();
232989
- var parse15 = require_parse5();
232565
+ var parse15 = require_parse4();
232990
232566
  var valid2 = require_valid();
232991
232567
  var clean = require_clean();
232992
- var inc3 = require_inc();
232568
+ var inc4 = require_inc();
232993
232569
  var diff = require_diff();
232994
232570
  var major2 = require_major();
232995
232571
  var minor = require_minor();
232996
232572
  var patch = require_patch();
232997
- var prerelease = require_prerelease();
232573
+ var prerelease2 = require_prerelease();
232998
232574
  var compare = require_compare();
232999
232575
  var rcompare = require_rcompare();
233000
232576
  var compareLoose = require_compare_loose();
@@ -233027,12 +232603,12 @@ var require_semver2 = __commonJS({
233027
232603
  parse: parse15,
233028
232604
  valid: valid2,
233029
232605
  clean,
233030
- inc: inc3,
232606
+ inc: inc4,
233031
232607
  diff,
233032
232608
  major: major2,
233033
232609
  minor,
233034
232610
  patch,
233035
- prerelease,
232611
+ prerelease: prerelease2,
233036
232612
  compare,
233037
232613
  rcompare,
233038
232614
  compareLoose,
@@ -233073,6 +232649,479 @@ var require_semver2 = __commonJS({
233073
232649
  }
233074
232650
  });
233075
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
+
233076
233125
  // node_modules/.pnpm/ansi-regex@4.1.1/node_modules/ansi-regex/index.js
233077
233126
  var require_ansi_regex2 = __commonJS({
233078
233127
  "node_modules/.pnpm/ansi-regex@4.1.1/node_modules/ansi-regex/index.js"(exports2, module2) {
@@ -238811,13 +238860,11 @@ __export(prepare_exports, {
238811
238860
  command: () => command4,
238812
238861
  description: () => description3,
238813
238862
  handler: () => handler4,
238814
- prepareMain: () => prepareMain,
238815
- runPreReleaseCommand: () => runPreReleaseCommand
238863
+ prepareMain: () => prepareMain
238816
238864
  });
238817
238865
  init_import_meta_url();
238818
238866
  var import_fs32 = require("fs");
238819
- var import_path32 = require("path");
238820
- var shellQuote2 = __toESM(require_shell_quote());
238867
+ var import_path33 = require("path");
238821
238868
  init_dryRun();
238822
238869
  init_config2();
238823
238870
  init_logger2();
@@ -238903,6 +238950,49 @@ async function calculateCalVer(git, config) {
238903
238950
  logger.info(`CalVer: determined version ${version2}`);
238904
238951
  return version2;
238905
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
+ }
238906
238996
 
238907
238997
  // src/commands/prepare.ts
238908
238998
  init_changelog();
@@ -238910,7 +239000,14 @@ init_errors2();
238910
239000
  init_git();
238911
239001
  init_helpers();
238912
239002
  init_strings();
238913
- 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();
238914
239011
 
238915
239012
  // src/utils/releaseCommandEnv.ts
238916
239013
  init_import_meta_url();
@@ -238936,9 +239033,8 @@ function buildReleaseCommandEnv(extras = {}) {
238936
239033
  return { ...env3, ...extras };
238937
239034
  }
238938
239035
 
238939
- // src/commands/prepare.ts
238940
- init_tracing2();
238941
- init_version8();
239036
+ // src/utils/preReleaseCommand.ts
239037
+ init_system();
238942
239038
 
238943
239039
  // src/utils/versionBump.ts
238944
239040
  init_import_meta_url();
@@ -239016,6 +239112,65 @@ async function runAutomaticVersionBumps(targets, rootDir, newVersion) {
239016
239112
  return { anyBumped, bumpableTargets, skippedTargets };
239017
239113
  }
239018
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
+
239019
239174
  // src/commands/publish.ts
239020
239175
  var publish_exports = {};
239021
239176
  __export(publish_exports, {
@@ -239036,11 +239191,13 @@ init_import_meta_url();
239036
239191
  var import_chalk = __toESM(require_source());
239037
239192
  var import_fs31 = require("fs");
239038
239193
  init_dryRun();
239039
- var import_path31 = require("path");
239040
- 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());
239041
239197
  var import_string_length = __toESM(require_string_length());
239042
239198
  init_config2();
239043
239199
  init_logger2();
239200
+ init_project_config();
239044
239201
  init_targets();
239045
239202
  init_base5();
239046
239203
  init_errors2();
@@ -239058,14 +239215,14 @@ init_tracing2();
239058
239215
  init_import_meta_url();
239059
239216
  var import_crypto7 = require("crypto");
239060
239217
  var import_os4 = require("os");
239061
- var import_path30 = require("path");
239218
+ var import_path31 = require("path");
239062
239219
  var STATE_DIR_NAME = "craft";
239063
239220
  function getCraftStateDir() {
239064
239221
  const xdgStateHome = process.env.XDG_STATE_HOME;
239065
239222
  if (xdgStateHome && xdgStateHome.length > 0) {
239066
- return (0, import_path30.join)(xdgStateHome, STATE_DIR_NAME);
239223
+ return (0, import_path31.join)(xdgStateHome, STATE_DIR_NAME);
239067
239224
  }
239068
- 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);
239069
239226
  }
239070
239227
  function sanitiseForFilename(raw) {
239071
239228
  return raw.toLowerCase().replace(/[^a-z0-9._-]+/g, "_").replace(/^_+|_+$/g, "");
@@ -239089,14 +239246,14 @@ function getPublishStateFilename(version2, githubConfig, cwd = process.cwd(), wo
239089
239246
  return `publish-state-${cwdDigest}-${workspacePrefix}${safeVersion}.json`;
239090
239247
  }
239091
239248
  function getPublishStatePath(version2, githubConfig, cwd = process.cwd(), workspace) {
239092
- return (0, import_path30.join)(
239249
+ return (0, import_path31.join)(
239093
239250
  getCraftStateDir(),
239094
239251
  getPublishStateFilename(version2, githubConfig, cwd, workspace)
239095
239252
  );
239096
239253
  }
239097
239254
 
239098
239255
  // src/commands/publish.ts
239099
- 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");
239100
239257
  var command2 = ["publish NEW-VERSION"];
239101
239258
  var aliases = ["pp", "publish"];
239102
239259
  var description = "\u{1F6EB} Publish artifacts";
@@ -239353,17 +239510,7 @@ async function handleReleaseBranch(git, remoteName, branch, releaseRevision, mer
239353
239510
  }
239354
239511
  logger.debug(`Checking out merge target branch:`, mergeTarget);
239355
239512
  await git.checkout(mergeTarget);
239356
- logger.debug(`Pulling latest changes from ${remoteName}/${mergeTarget}`);
239357
- try {
239358
- await git.pull(remoteName, mergeTarget, ["--rebase"]);
239359
- } catch (pullError) {
239360
- try {
239361
- await git.raw(["rebase", "--abort"]);
239362
- } catch {
239363
- logger.trace("git rebase --abort failed (may be no rebase in progress)");
239364
- }
239365
- throw pullError;
239366
- }
239513
+ await pullWithRebase(git, remoteName, mergeTarget);
239367
239514
  logger.debug(`Merging ${mergeSource} into: ${mergeTarget}`);
239368
239515
  try {
239369
239516
  await git.merge(["--no-ff", "--no-edit", mergeSource]);
@@ -239449,6 +239596,72 @@ async function handleReleaseBranch(git, remoteName, branch, releaseRevision, mer
239449
239596
  }
239450
239597
  }
239451
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
+ }
239452
239665
  async function runPostReleaseCommand(newVersion, postReleaseCommand) {
239453
239666
  let sysCommand;
239454
239667
  let args;
@@ -239456,7 +239669,7 @@ async function runPostReleaseCommand(newVersion, postReleaseCommand) {
239456
239669
  logger.debug("Not running the post-release command: no command specified");
239457
239670
  return false;
239458
239671
  } else if (postReleaseCommand) {
239459
- [sysCommand, ...args] = shellQuote.parse(postReleaseCommand);
239672
+ [sysCommand, ...args] = shellQuote2.parse(postReleaseCommand);
239460
239673
  } else if (hasExecutable(DEFAULT_POST_RELEASE_SCRIPT_PATH)) {
239461
239674
  sysCommand = "/bin/bash";
239462
239675
  args = [DEFAULT_POST_RELEASE_SCRIPT_PATH];
@@ -239604,7 +239817,7 @@ Original error: ${err instanceof Error ? err.message : String(err)}`;
239604
239817
  await promptConfirmation();
239605
239818
  await withTempDir(async (downloadDirectory) => {
239606
239819
  artifactProvider.setDownloadDirectory(downloadDirectory);
239607
- (0, import_fs31.mkdirSync)((0, import_path31.dirname)(publishStateFile), { recursive: true });
239820
+ (0, import_fs31.mkdirSync)((0, import_path32.dirname)(publishStateFile), { recursive: true });
239608
239821
  for (const target of targetList) {
239609
239822
  await publishToTarget(target, newVersion, revision);
239610
239823
  publishState.published[BaseTarget.getId(target.config)] = true;
@@ -239626,22 +239839,29 @@ Original error: ${err instanceof Error ? err.message : String(err)}`;
239626
239839
  `The --merge-target option will be ignored because noMerge is enabled via ${noMergeConfig.source === "auto-detected" ? "auto-detection (compiled GitHub Action)" : "config"}.`
239627
239840
  );
239628
239841
  }
239842
+ let mergedInto;
239629
239843
  if (noMerge) {
239630
239844
  const source = argv.noMerge ? "CLI option" : noMergeConfig.source === "auto-detected" ? "auto-detection (compiled GitHub Action with dist/ folder)" : "config";
239631
239845
  logger.info(`Not merging the release branch (${source}).`);
239632
239846
  } else if (targetsToPublish.has("all" /* All */) || targetsToPublish.has("none" /* None */) || earlierStateExists) {
239847
+ let mergeTarget = argv.mergeTarget;
239633
239848
  try {
239849
+ mergeTarget ||= await getDefaultBranch(git, argv.remote);
239634
239850
  await handleReleaseBranch(
239635
239851
  git,
239636
239852
  argv.remote,
239637
239853
  branchName,
239638
239854
  revision,
239639
- argv.mergeTarget,
239855
+ mergeTarget,
239640
239856
  argv.keepBranch,
239641
239857
  rev ? revision : branchName
239642
239858
  );
239859
+ mergedInto = mergeTarget;
239643
239860
  } catch (mergeError) {
239644
239861
  captureException(mergeError);
239862
+ if (mergeError instanceof BranchCleanupError) {
239863
+ mergedInto = mergeTarget;
239864
+ }
239645
239865
  const lines = [];
239646
239866
  if (mergeError instanceof BranchCleanupError) {
239647
239867
  lines.push(
@@ -239731,6 +239951,34 @@ Original error: ${err instanceof Error ? err.message : String(err)}`;
239731
239951
  ];
239732
239952
  logger.warn(msg.join("\n"));
239733
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
+ }
239734
239982
  await runPostReleaseCommand(newVersion, config.postReleaseCommand);
239735
239983
  }
239736
239984
  var handler2 = async (args) => {
@@ -239775,9 +240023,7 @@ async function handler3() {
239775
240023
  var command4 = ["prepare [NEW-VERSION]"];
239776
240024
  var aliases2 = ["p", "prerelease", "prepublish", "prepare", "release"];
239777
240025
  var description3 = "\u{1F6A2} Prepare a new release branch";
239778
- var DEFAULT_BUMP_VERSION_PATH = (0, import_path32.join)("scripts", "bump-version.sh");
239779
240026
  var AUTO_VERSION_MIN_VERSION2 = "2.14.0";
239780
- var AUTO_BUMP_MIN_VERSION = "2.21.0";
239781
240027
  var builder2 = (yargs) => yargs.positional("NEW-VERSION", {
239782
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',
239783
240029
  type: "string"
@@ -239911,57 +240157,6 @@ async function commitChanges(git, newVersion, preReleaseCommandRan) {
239911
240157
  logger.trace(`Commit message: "${message}"`);
239912
240158
  await git.commit(message);
239913
240159
  }
239914
- async function runPreReleaseCommand(options) {
239915
- const { oldVersion, newVersion, preReleaseCommand, targets, rootDir } = options;
239916
- if (preReleaseCommand !== void 0 && preReleaseCommand.length === 0) {
239917
- logger.warn("Not running the pre-release command: no command specified");
239918
- return false;
239919
- }
239920
- if (preReleaseCommand) {
239921
- return runCustomPreReleaseCommand(
239922
- oldVersion,
239923
- newVersion,
239924
- preReleaseCommand
239925
- );
239926
- }
239927
- if (requiresMinVersion(AUTO_BUMP_MIN_VERSION) && targets && targets.length > 0) {
239928
- logger.info("Running automatic version bumping from targets...");
239929
- const result = await runAutomaticVersionBumps(targets, rootDir, newVersion);
239930
- if (!result.anyBumped) {
239931
- if (result.bumpableTargets.length === 0) {
239932
- logger.warn(
239933
- "None of your configured targets support automatic version bumping. Consider adding a preReleaseCommand to bump versions manually."
239934
- );
239935
- } else {
239936
- throw new ConfigurationError(
239937
- `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.`
239938
- );
239939
- }
239940
- }
239941
- return result.anyBumped;
239942
- }
239943
- return runCustomPreReleaseCommand(oldVersion, newVersion, void 0);
239944
- }
239945
- async function runCustomPreReleaseCommand(oldVersion, newVersion, preReleaseCommand) {
239946
- let sysCommand;
239947
- let args;
239948
- const nonEmptyOldVersion = oldVersion || "0.0.0";
239949
- if (preReleaseCommand) {
239950
- [sysCommand, ...args] = shellQuote2.parse(preReleaseCommand);
239951
- } else {
239952
- sysCommand = "/bin/bash";
239953
- args = [DEFAULT_BUMP_VERSION_PATH];
239954
- }
239955
- args = [...args, nonEmptyOldVersion, newVersion];
239956
- logger.info("Running the pre-release command...");
239957
- await spawnProcess(sysCommand, args, {
239958
- env: buildReleaseCommandEnv({
239959
- CRAFT_NEW_VERSION: newVersion,
239960
- CRAFT_OLD_VERSION: nonEmptyOldVersion
239961
- })
239962
- });
239963
- return true;
239964
- }
239965
240160
  function checkGitStatus(repoStatus, rev) {
239966
240161
  logger.info("Checking the local repository status...");
239967
240162
  logger.debug("Repository status:", formatJson(repoStatus));
@@ -240022,7 +240217,7 @@ async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "
240022
240217
  }
240023
240218
  logger.info("Checking the changelog...");
240024
240219
  logger.debug(`Changelog policy: "${changelogPolicy}".`);
240025
- const relativePath = (0, import_path32.relative)("", changelogPath);
240220
+ const relativePath = (0, import_path33.relative)("", changelogPath);
240026
240221
  logger.debug(`Changelog path: ${relativePath}`);
240027
240222
  if (relativePath.startsWith(".")) {
240028
240223
  throw new ConfigurationError(`Invalid changelog path: "${changelogPath}"`);
@@ -240227,7 +240422,7 @@ async function prepareMain(argv) {
240227
240422
  changelogPath
240228
240423
  );
240229
240424
  if (changelogBody) {
240230
- const resolvedChangelogPath = (0, import_path32.relative)("", changelogPath);
240425
+ const resolvedChangelogPath = (0, import_path33.relative)("", changelogPath);
240231
240426
  await git.add(resolvedChangelogPath);
240232
240427
  }
240233
240428
  const preReleaseCommandRan = await runPreReleaseCommand({
@@ -240341,7 +240536,7 @@ init_import_meta_url();
240341
240536
  init_logger2();
240342
240537
  init_config2();
240343
240538
  init_errors2();
240344
- var import_path33 = require("path");
240539
+ var import_path34 = require("path");
240345
240540
  var import_fs33 = require("fs");
240346
240541
  init_none();
240347
240542
  var mkdirp = require_mkdirp2();
@@ -240364,7 +240559,7 @@ var builder3 = (yargs) => yargs.positional("NAME", {
240364
240559
  });
240365
240560
  async function prepareOutputDirectory(argv) {
240366
240561
  if (argv.directory) {
240367
- const fullPath = (0, import_path33.resolve)(argv.directory);
240562
+ const fullPath = (0, import_path34.resolve)(argv.directory);
240368
240563
  if ((0, import_fs33.existsSync)(fullPath)) {
240369
240564
  if ((0, import_fs33.lstatSync)(fullPath).isDirectory()) {
240370
240565
  return fullPath;
@@ -240377,7 +240572,7 @@ async function prepareOutputDirectory(argv) {
240377
240572
  return fullPath;
240378
240573
  }
240379
240574
  } else {
240380
- return (0, import_path33.resolve)(process.cwd());
240575
+ return (0, import_path34.resolve)(process.cwd());
240381
240576
  }
240382
240577
  }
240383
240578
  async function handlerMain(argv) {