@sentry/craft 3.6.0 → 3.7.1

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 +940 -709
  2. package/package.json +1 -1
package/dist/craft CHANGED
@@ -44268,10 +44268,10 @@ var init_ignore = __esm({
44268
44268
  ignored(p8) {
44269
44269
  const fullpath = p8.fullpath();
44270
44270
  const fullpaths = `${fullpath}/`;
44271
- const relative7 = p8.relative() || ".";
44272
- const relatives = `${relative7}/`;
44271
+ const relative8 = p8.relative() || ".";
44272
+ const relatives = `${relative8}/`;
44273
44273
  for (const m10 of this.relative) {
44274
- if (m10.match(relative7) || m10.match(relatives))
44274
+ if (m10.match(relative8) || m10.match(relatives))
44275
44275
  return true;
44276
44276
  }
44277
44277
  for (const m10 of this.absolute) {
@@ -44282,9 +44282,9 @@ var init_ignore = __esm({
44282
44282
  }
44283
44283
  childrenIgnored(p8) {
44284
44284
  const fullpath = p8.fullpath() + "/";
44285
- const relative7 = (p8.relative() || ".") + "/";
44285
+ const relative8 = (p8.relative() || ".") + "/";
44286
44286
  for (const m10 of this.relativeChildren) {
44287
- if (m10.match(relative7))
44287
+ if (m10.match(relative8))
44288
44288
  return true;
44289
44289
  }
44290
44290
  for (const m10 of this.absoluteChildren) {
@@ -60256,6 +60256,14 @@ function symlinkDependencyDirs(originalCwd, worktreePath) {
60256
60256
  }
60257
60257
  }
60258
60258
  }
60259
+ async function listLocalBranches(git) {
60260
+ const refs = await git.raw([
60261
+ "for-each-ref",
60262
+ "--format=%(refname)",
60263
+ "refs/heads/"
60264
+ ]);
60265
+ return refs.split("\n").filter(Boolean);
60266
+ }
60259
60267
  async function createDryRunIsolation(git, rev) {
60260
60268
  if (!isDryRun()) {
60261
60269
  return {
@@ -60280,14 +60288,13 @@ async function createDryRunIsolation(git, rev) {
60280
60288
  const worktreePath = (0, import_path3.join)((0, import_os.tmpdir)(), `craft-dry-run-${randomSuffix}`);
60281
60289
  logger.info(`[dry-run] Creating temporary worktree at ${worktreePath}`);
60282
60290
  const rawGit = wo(originalCwd);
60283
- await rawGit.raw(["worktree", "add", "--detach", worktreePath, revision]);
60284
- symlinkDependencyDirs(originalCwd, worktreePath);
60285
- const worktreeGit = createDryRunGit(
60286
- // eslint-disable-next-line no-restricted-syntax -- This is the wrapper module
60287
- wo(worktreePath, { allowEnvironment: GIT_IDENTITY_ENV })
60291
+ const originalBranches = new Set(await listLocalBranches(rawGit));
60292
+ const repositoryRoot = (await rawGit.revparse(["--show-toplevel"])).trim();
60293
+ const worktreeCwd = (0, import_path3.join)(
60294
+ worktreePath,
60295
+ (0, import_path3.relative)((0, import_fs3.realpathSync)(repositoryRoot), (0, import_fs3.realpathSync)(originalCwd))
60288
60296
  );
60289
- enableWorktreeMode();
60290
- process.chdir(worktreePath);
60297
+ await rawGit.raw(["worktree", "add", "--detach", worktreePath, revision]);
60291
60298
  const cleanup = async () => {
60292
60299
  logger.debug(`[dry-run] Cleaning up temporary worktree at ${worktreePath}`);
60293
60300
  unregisterCleanupHandlers();
@@ -60308,8 +60315,35 @@ async function createDryRunIsolation(git, rev) {
60308
60315
  logger.warn(`[dry-run] Failed to clean up worktree: ${rmErr}`);
60309
60316
  }
60310
60317
  }
60318
+ try {
60319
+ for (const branch of await listLocalBranches(rawGit)) {
60320
+ if (!originalBranches.has(branch)) {
60321
+ await rawGit.raw(["update-ref", "-d", branch]);
60322
+ logger.debug(`[dry-run] Deleted temporary branch ${branch}`);
60323
+ }
60324
+ }
60325
+ } catch (err) {
60326
+ logger.warn(`[dry-run] Failed to clean up temporary branches: ${err}`);
60327
+ }
60311
60328
  };
60312
60329
  registerCleanupHandlers(cleanup);
60330
+ try {
60331
+ if (!(0, import_fs3.existsSync)(worktreeCwd)) {
60332
+ throw new ConfigurationError(
60333
+ `Cannot run the dry run from "${originalCwd}": it does not exist at revision "${revision}".`
60334
+ );
60335
+ }
60336
+ symlinkDependencyDirs(originalCwd, worktreeCwd);
60337
+ enableWorktreeMode();
60338
+ process.chdir(worktreeCwd);
60339
+ } catch (err) {
60340
+ await cleanup();
60341
+ throw err;
60342
+ }
60343
+ const worktreeGit = createDryRunGit(
60344
+ // eslint-disable-next-line no-restricted-syntax -- This is the wrapper module
60345
+ wo(worktreePath, { allowEnvironment: GIT_IDENTITY_ENV })
60346
+ );
60313
60347
  const showDiff = async () => {
60314
60348
  const diffGit = wo(worktreePath);
60315
60349
  const worktreeHead = (await diffGit.revparse(["HEAD"])).trim();
@@ -60494,6 +60528,7 @@ var init_dryRun = __esm({
60494
60528
  init_dist3();
60495
60529
  init_logger2();
60496
60530
  init_helpers();
60531
+ init_errors2();
60497
60532
  init_gitIdentityEnv();
60498
60533
  _inWorktreeMode = false;
60499
60534
  _activeWorktreeCleanup = null;
@@ -61093,13 +61128,13 @@ async function getWorkspaceChangeFilter() {
61093
61128
  const discovered = await discoverWorkspaces(root);
61094
61129
  const ownedPaths = new Set(getWorkspaceNames());
61095
61130
  for (const pkg of discovered.packages) {
61096
- const relative7 = import_node_path13.default.relative(root, pkg.location).split(import_node_path13.default.sep).join("/");
61097
- if (relative7 === "" || relative7 === ".." || relative7.startsWith("../")) {
61131
+ const relative8 = import_node_path13.default.relative(root, pkg.location).split(import_node_path13.default.sep).join("/");
61132
+ if (relative8 === "" || relative8 === ".." || relative8.startsWith("../")) {
61098
61133
  throw new ConfigurationError(
61099
61134
  `Workspace package is outside the repository: ${pkg.name}`
61100
61135
  );
61101
61136
  }
61102
- ownedPaths.add(relative7);
61137
+ ownedPaths.add(relative8);
61103
61138
  }
61104
61139
  const orderedOwners = [...ownedPaths].sort(
61105
61140
  (left2, right2) => right2.length - left2.length
@@ -62184,7 +62219,7 @@ function findPrototypeKey(input) {
62184
62219
  (key) => Object.prototype.hasOwnProperty.call(input, key)
62185
62220
  ) : void 0;
62186
62221
  }
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;
62222
+ 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
62223
  var init_project_config = __esm({
62189
62224
  "src/schemas/project_config.ts"() {
62190
62225
  "use strict";
@@ -62315,11 +62350,48 @@ var init_project_config = __esm({
62315
62350
  unownedPaths: optional(UnownedPathsPolicySchema)
62316
62351
  })
62317
62352
  ]);
62353
+ PostReleaseBumpTypeSchema = picklist([
62354
+ "patch",
62355
+ "minor",
62356
+ "major",
62357
+ "calver"
62358
+ ]);
62359
+ PostReleaseBumpObjectSchema = strictObject({
62360
+ /** How to get the next version. Default: `calver` for CalVer, else `minor`. */
62361
+ bump: optional(PostReleaseBumpTypeSchema),
62362
+ /**
62363
+ * Development version template. Default: `{{version}}-dev.0`. Only version
62364
+ * characters are allowed: the value reaches spawned commands as an argument,
62365
+ * where `${VAR}` would be expanded from the environment.
62366
+ */
62367
+ version: optional(
62368
+ pipe(
62369
+ string(),
62370
+ regex(
62371
+ /^(?:[0-9A-Za-z._+-]|\{\{version\}\})+$/,
62372
+ 'Use only letters, digits, ".", "_", "+", "-", and {{version}}.'
62373
+ )
62374
+ )
62375
+ )
62376
+ });
62377
+ PostReleaseBumpSchema = union([
62378
+ PostReleaseBumpObjectSchema,
62379
+ pipe(
62380
+ PostReleaseBumpTypeSchema,
62381
+ transform((bump) => ({ bump }))
62382
+ ),
62383
+ pipe(
62384
+ literal(true),
62385
+ transform(() => ({}))
62386
+ ),
62387
+ literal(false)
62388
+ ]);
62318
62389
  releaseUnitFields = {
62319
62390
  github: optional(GitHubGlobalConfigSchema),
62320
62391
  targets: optional(array(TargetConfigSchema)),
62321
62392
  preReleaseCommand: optional(string()),
62322
62393
  postReleaseCommand: optional(string()),
62394
+ postReleaseBump: optional(nonArray(PostReleaseBumpSchema)),
62323
62395
  releaseBranchPrefix: optional(string()),
62324
62396
  changelog: optional(nonArray(ChangelogConfigSchema)),
62325
62397
  changelogPolicy: optional(picklist(["auto", "simple", "none"])),
@@ -121433,6 +121505,18 @@ async function fetchPRCoAuthors(prNumber) {
121433
121505
  function isBumpType(value) {
121434
121506
  return BUMP_TYPES.has(value);
121435
121507
  }
121508
+ function hasSkipChangelogMagicWord(text) {
121509
+ if (!text?.includes(SKIP_CHANGELOG_MAGIC_WORD)) {
121510
+ return false;
121511
+ }
121512
+ let found = false;
121513
+ d5.walkTokens(d5.lexer(text), (token) => {
121514
+ if ((token.type === "text" || token.type === "html") && !("tokens" in token && token.tokens?.length) && token.raw.includes(SKIP_CHANGELOG_MAGIC_WORD)) {
121515
+ found = true;
121516
+ }
121517
+ });
121518
+ return found;
121519
+ }
121436
121520
  function getLineNumber(text, charIndex) {
121437
121521
  let count = 1;
121438
121522
  for (let i5 = 0; i5 < charIndex && i5 < text.length; i5++) {
@@ -121885,7 +121969,7 @@ function getNormalizedReleaseConfig() {
121885
121969
  return normalized;
121886
121970
  }
121887
121971
  function shouldExcludePR(labels, author, config, body) {
121888
- if (body?.includes(SKIP_CHANGELOG_MAGIC_WORD)) {
121972
+ if (hasSkipChangelogMagicWord(body)) {
121889
121973
  return true;
121890
121974
  }
121891
121975
  if (!config?.changelog) {
@@ -122132,7 +122216,7 @@ async function generateChangelogWithHighlight(git, rev, currentPRNumber) {
122132
122216
  }
122133
122217
  async function fetchRawCommitInfo(git, rev, until) {
122134
122218
  const gitCommits = (await getChangesSince(git, rev, until)).filter(
122135
- ({ body }) => !body.includes(SKIP_CHANGELOG_MAGIC_WORD)
122219
+ ({ body }) => !hasSkipChangelogMagicWord(body)
122136
122220
  );
122137
122221
  const githubCommits = await getPRAndLabelsFromCommit(
122138
122222
  gitCommits.map(({ hash }) => hash)
@@ -124340,7 +124424,7 @@ function normalizeNugetVersion(version2) {
124340
124424
  const withoutMetadata = version2.split("+")[0];
124341
124425
  const dash = withoutMetadata.indexOf("-");
124342
124426
  const release3 = dash === -1 ? withoutMetadata : withoutMetadata.slice(0, dash);
124343
- const prerelease = dash === -1 ? "" : withoutMetadata.slice(dash);
124427
+ const prerelease2 = dash === -1 ? "" : withoutMetadata.slice(dash);
124344
124428
  const parts = release3.split(".").map((part) => /^\d+$/.test(part) ? String(parseInt(part, 10)) : part);
124345
124429
  while (parts.length < 3) {
124346
124430
  parts.push("0");
@@ -124348,7 +124432,7 @@ function normalizeNugetVersion(version2) {
124348
124432
  if (parts.length === 4 && parts[3] === "0") {
124349
124433
  parts.pop();
124350
124434
  }
124351
- return `${parts.join(".")}${prerelease}`.toLowerCase();
124435
+ return `${parts.join(".")}${prerelease2}`.toLowerCase();
124352
124436
  }
124353
124437
  async function readNupkgIdentity(nupkgPath) {
124354
124438
  const zip = new import_node_stream_zip2.default.async({ file: nupkgPath });
@@ -142978,12 +143062,12 @@ var require_fromHttp = __commonJS({
142978
143062
  var fromHttp = (options = {}) => {
142979
143063
  options.logger?.debug("@aws-sdk/credential-provider-http - fromHttp");
142980
143064
  let host;
142981
- const relative7 = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];
143065
+ const relative8 = options.awsContainerCredentialsRelativeUri ?? process.env[AWS_CONTAINER_CREDENTIALS_RELATIVE_URI];
142982
143066
  const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI];
142983
143067
  const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN];
142984
143068
  const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE];
142985
143069
  const warn3 = options.logger?.constructor?.name === "NoOpLogger" || !options.logger?.warn ? console.warn : options.logger.warn.bind(options.logger);
142986
- if (relative7 && full) {
143070
+ if (relative8 && full) {
142987
143071
  warn3("@aws-sdk/credential-provider-http: you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri.");
142988
143072
  warn3("awsContainerCredentialsFullUri will take precedence.");
142989
143073
  }
@@ -142993,8 +143077,8 @@ var require_fromHttp = __commonJS({
142993
143077
  }
142994
143078
  if (full) {
142995
143079
  host = full;
142996
- } else if (relative7) {
142997
- host = `${DEFAULT_LINK_LOCAL_HOST}${relative7}`;
143080
+ } else if (relative8) {
143081
+ host = `${DEFAULT_LINK_LOCAL_HOST}${relative8}`;
142998
143082
  } else {
142999
143083
  throw new property_provider_1.CredentialsProviderError(`No HTTP credential provider host provided.
143000
143084
  Set AWS_CONTAINER_CREDENTIALS_FULL_URI or AWS_CONTAINER_CREDENTIALS_RELATIVE_URI.`, { logger: options.logger });
@@ -161127,10 +161211,10 @@ var require_symlink = __commonJS({
161127
161211
  pathExists(dstpath, (err, destinationExists) => {
161128
161212
  if (err) return callback(err);
161129
161213
  if (destinationExists) return callback(null);
161130
- symlinkPaths(srcpath, dstpath, (err2, relative7) => {
161214
+ symlinkPaths(srcpath, dstpath, (err2, relative8) => {
161131
161215
  if (err2) return callback(err2);
161132
- srcpath = relative7.toDst;
161133
- symlinkType(relative7.toCwd, type2, (err3, type3) => {
161216
+ srcpath = relative8.toDst;
161217
+ symlinkType(relative8.toCwd, type2, (err3, type3) => {
161134
161218
  if (err3) return callback(err3);
161135
161219
  const dir = path20.dirname(dstpath);
161136
161220
  pathExists(dir, (err4, dirExists) => {
@@ -161148,9 +161232,9 @@ var require_symlink = __commonJS({
161148
161232
  function createSymlinkSync(srcpath, dstpath, type2) {
161149
161233
  const destinationExists = fs16.existsSync(dstpath);
161150
161234
  if (destinationExists) return void 0;
161151
- const relative7 = symlinkPathsSync(srcpath, dstpath);
161152
- srcpath = relative7.toDst;
161153
- type2 = symlinkTypeSync(relative7.toCwd, type2);
161235
+ const relative8 = symlinkPathsSync(srcpath, dstpath);
161236
+ srcpath = relative8.toDst;
161237
+ type2 = symlinkTypeSync(relative8.toCwd, type2);
161154
161238
  const dir = path20.dirname(dstpath);
161155
161239
  const exists = fs16.existsSync(dir);
161156
161240
  if (exists) return fs16.symlinkSync(srcpath, dstpath, type2);
@@ -169216,10 +169300,10 @@ var require_symlink2 = __commonJS({
169216
169300
  });
169217
169301
  }
169218
169302
  function _createSymlink(srcpath, dstpath, type2, callback) {
169219
- symlinkPaths(srcpath, dstpath, (err, relative7) => {
169303
+ symlinkPaths(srcpath, dstpath, (err, relative8) => {
169220
169304
  if (err) return callback(err);
169221
- srcpath = relative7.toDst;
169222
- symlinkType(relative7.toCwd, type2, (err2, type3) => {
169305
+ srcpath = relative8.toDst;
169306
+ symlinkType(relative8.toCwd, type2, (err2, type3) => {
169223
169307
  if (err2) return callback(err2);
169224
169308
  const dir = path20.dirname(dstpath);
169225
169309
  pathExists(dir, (err3, dirExists) => {
@@ -169244,9 +169328,9 @@ var require_symlink2 = __commonJS({
169244
169328
  const dstStat = fs16.statSync(dstpath);
169245
169329
  if (areIdentical(srcStat, dstStat)) return;
169246
169330
  }
169247
- const relative7 = symlinkPathsSync(srcpath, dstpath);
169248
- srcpath = relative7.toDst;
169249
- type2 = symlinkTypeSync(relative7.toCwd, type2);
169331
+ const relative8 = symlinkPathsSync(srcpath, dstpath);
169332
+ srcpath = relative8.toDst;
169333
+ type2 = symlinkTypeSync(relative8.toCwd, type2);
169250
169334
  const dir = path20.dirname(dstpath);
169251
169335
  const exists = fs16.existsSync(dir);
169252
169336
  if (exists) return fs16.symlinkSync(srcpath, dstpath, type2);
@@ -170106,7 +170190,7 @@ var require_semantic = __commonJS({
170106
170190
  major: major2,
170107
170191
  minor,
170108
170192
  patch,
170109
- inc: inc3
170193
+ inc: inc4
170110
170194
  };
170111
170195
  function major2(input) {
170112
170196
  const version2 = explain(input);
@@ -170135,7 +170219,7 @@ var require_semantic = __commonJS({
170135
170219
  }
170136
170220
  return version2.release[2];
170137
170221
  }
170138
- function inc3(input, release3, preReleaseIdentifier) {
170222
+ function inc4(input, release3, preReleaseIdentifier) {
170139
170223
  let identifier = preReleaseIdentifier || `a`;
170140
170224
  const version2 = parse15(input);
170141
170225
  if (!version2) {
@@ -170264,7 +170348,7 @@ var require_pep440 = __commonJS({
170264
170348
  satisfies: satisfies2,
170265
170349
  validRange
170266
170350
  } = require_specifier();
170267
- var { major: major2, minor, patch, inc: inc3 } = require_semantic();
170351
+ var { major: major2, minor, patch, inc: inc4 } = require_semantic();
170268
170352
  module2.exports = {
170269
170353
  // version
170270
170354
  valid: valid2,
@@ -170294,7 +170378,7 @@ var require_pep440 = __commonJS({
170294
170378
  major: major2,
170295
170379
  minor,
170296
170380
  patch,
170297
- inc: inc3
170381
+ inc: inc4
170298
170382
  };
170299
170383
  }
170300
170384
  });
@@ -174396,7 +174480,7 @@ var require_dist11 = __commonJS({
174396
174480
  return mod.getStringConstant(source, name) ?? null;
174397
174481
  }
174398
174482
  var import_fs34 = __toESM2(require("fs"), 1);
174399
- var import_path34 = require("path");
174483
+ var import_path35 = require("path");
174400
174484
  async function extractImports(source) {
174401
174485
  if (!source.includes("import")) {
174402
174486
  return [];
@@ -174425,21 +174509,21 @@ var require_dist11 = __commonJS({
174425
174509
  return pending;
174426
174510
  }
174427
174511
  async function resolveNamePartsUncached(parts, searchDirs, cache4) {
174428
- const rel = (0, import_path34.join)(...parts);
174512
+ const rel = (0, import_path35.join)(...parts);
174429
174513
  for (const root of searchDirs) {
174430
174514
  let target = null;
174431
174515
  let targetKind = null;
174432
- const candidateInit = (0, import_path34.join)(root, rel, "__init__.py");
174516
+ const candidateInit = (0, import_path35.join)(root, rel, "__init__.py");
174433
174517
  if (await statKind(candidateInit, cache4) === "file") {
174434
174518
  target = candidateInit;
174435
174519
  targetKind = "file";
174436
174520
  } else {
174437
- const candidateModule = (0, import_path34.join)(root, `${rel}.py`);
174521
+ const candidateModule = (0, import_path35.join)(root, `${rel}.py`);
174438
174522
  if (await statKind(candidateModule, cache4) === "file") {
174439
174523
  target = candidateModule;
174440
174524
  targetKind = "file";
174441
- } else if (await statKind((0, import_path34.join)(root, rel), cache4) === "dir") {
174442
- target = (0, import_path34.join)(root, rel);
174525
+ } else if (await statKind((0, import_path35.join)(root, rel), cache4) === "dir") {
174526
+ target = (0, import_path35.join)(root, rel);
174443
174527
  targetKind = "dir";
174444
174528
  }
174445
174529
  }
@@ -174447,8 +174531,8 @@ var require_dist11 = __commonJS({
174447
174531
  const parentChain = [];
174448
174532
  let acc = root;
174449
174533
  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");
174534
+ acc = (0, import_path35.join)(acc, part);
174535
+ const init2 = (0, import_path35.join)(acc, "__init__.py");
174452
174536
  if (await statKind(init2, cache4) === "file") {
174453
174537
  parentChain.push(init2);
174454
174538
  }
@@ -174485,8 +174569,8 @@ var require_dist11 = __commonJS({
174485
174569
  function submoduleDir(target, targetKind) {
174486
174570
  if (targetKind === "dir")
174487
174571
  return target;
174488
- if (targetKind === "file" && target.endsWith(`${import_path34.sep}__init__.py`)) {
174489
- return (0, import_path34.dirname)(target);
174572
+ if (targetKind === "file" && target.endsWith(`${import_path35.sep}__init__.py`)) {
174573
+ return (0, import_path35.dirname)(target);
174490
174574
  }
174491
174575
  return null;
174492
174576
  }
@@ -174495,9 +174579,9 @@ var require_dist11 = __commonJS({
174495
174579
  let search = roots;
174496
174580
  let searchKey = rootsKey;
174497
174581
  if (stmt.level > 0) {
174498
- let base = (0, import_path34.dirname)(importerPath);
174582
+ let base = (0, import_path35.dirname)(importerPath);
174499
174583
  for (let i5 = 1; i5 < stmt.level; i5++) {
174500
- base = (0, import_path34.dirname)(base);
174584
+ base = (0, import_path35.dirname)(base);
174501
174585
  }
174502
174586
  search = [base];
174503
174587
  searchKey = base;
@@ -174540,14 +174624,14 @@ var require_dist11 = __commonJS({
174540
174624
  return [...resolved];
174541
174625
  }
174542
174626
  function isModuleNameSeed(seed) {
174543
- return !(0, import_path34.isAbsolute)(seed) && /^[A-Za-z_][\w]*(\.[A-Za-z_][\w]*)*$/.test(seed);
174627
+ return !(0, import_path35.isAbsolute)(seed) && /^[A-Za-z_][\w]*(\.[A-Za-z_][\w]*)*$/.test(seed);
174544
174628
  }
174545
174629
  async function collectImportClosure({
174546
174630
  seeds,
174547
174631
  searchRoots,
174548
174632
  maxFiles = DEFAULT_MAX_FILES
174549
174633
  }) {
174550
- const roots = searchRoots.map((r6) => (0, import_path34.resolve)(r6));
174634
+ const roots = searchRoots.map((r6) => (0, import_path35.resolve)(r6));
174551
174635
  const rootsKey = roots.join("\0");
174552
174636
  const cache4 = {
174553
174637
  statKinds: /* @__PURE__ */ new Map(),
@@ -174570,7 +174654,7 @@ var require_dist11 = __commonJS({
174570
174654
  frontier.push(...name.parentChain);
174571
174655
  }
174572
174656
  } else {
174573
- const seedPath = (0, import_path34.resolve)(seed);
174657
+ const seedPath = (0, import_path35.resolve)(seed);
174574
174658
  if (await statKind(seedPath, cache4) === "file") {
174575
174659
  frontier.push(seedPath);
174576
174660
  }
@@ -184269,7 +184353,7 @@ var require_dist12 = __commonJS({
184269
184353
  splitRootRe = /^[\/]*/;
184270
184354
  }
184271
184355
  var splitRootRe;
184272
- exports3.realpathSync = function realpathSync4(p8, cache4) {
184356
+ exports3.realpathSync = function realpathSync5(p8, cache4) {
184273
184357
  p8 = pathModule.resolve(p8);
184274
184358
  if (cache4 && Object.prototype.hasOwnProperty.call(cache4, p8)) {
184275
184359
  return cache4[p8];
@@ -184432,8 +184516,8 @@ var require_dist12 = __commonJS({
184432
184516
  "../../node_modules/.pnpm/fs.realpath@1.0.0/node_modules/fs.realpath/index.js"(exports3, module22) {
184433
184517
  module22.exports = realpath2;
184434
184518
  realpath2.realpath = realpath2;
184435
- realpath2.sync = realpathSync4;
184436
- realpath2.realpathSync = realpathSync4;
184519
+ realpath2.sync = realpathSync5;
184520
+ realpath2.realpathSync = realpathSync5;
184437
184521
  realpath2.monkeypatch = monkeypatch;
184438
184522
  realpath2.unmonkeypatch = unmonkeypatch;
184439
184523
  var fs122 = require("fs");
@@ -184461,7 +184545,7 @@ var require_dist12 = __commonJS({
184461
184545
  }
184462
184546
  });
184463
184547
  }
184464
- function realpathSync4(p8, cache4) {
184548
+ function realpathSync5(p8, cache4) {
184465
184549
  if (ok2) {
184466
184550
  return origRealpathSync(p8, cache4);
184467
184551
  }
@@ -184477,7 +184561,7 @@ var require_dist12 = __commonJS({
184477
184561
  }
184478
184562
  function monkeypatch() {
184479
184563
  fs122.realpath = realpath2;
184480
- fs122.realpathSync = realpathSync4;
184564
+ fs122.realpathSync = realpathSync5;
184481
184565
  }
184482
184566
  function unmonkeypatch() {
184483
184567
  fs122.realpath = origRealpath;
@@ -187045,8 +187129,8 @@ var require_dist12 = __commonJS({
187045
187129
  this.raw = this.version;
187046
187130
  return this;
187047
187131
  };
187048
- exports3.inc = inc3;
187049
- function inc3(version2, release3, loose, identifier) {
187132
+ exports3.inc = inc4;
187133
+ function inc4(version2, release3, loose, identifier) {
187050
187134
  if (typeof loose === "string") {
187051
187135
  identifier = loose;
187052
187136
  loose = void 0;
@@ -187731,8 +187815,8 @@ var require_dist12 = __commonJS({
187731
187815
  }
187732
187816
  return true;
187733
187817
  }
187734
- exports3.prerelease = prerelease;
187735
- function prerelease(version2, options) {
187818
+ exports3.prerelease = prerelease2;
187819
+ function prerelease2(version2, options) {
187736
187820
  var parsed = parse62(version2, options);
187737
187821
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
187738
187822
  }
@@ -187766,11 +187850,11 @@ var require_dist12 = __commonJS({
187766
187850
  var resolveCommand = require_resolveCommand();
187767
187851
  var escape2 = require_escape2();
187768
187852
  var readShebang = require_readShebang();
187769
- var semver4 = require_semver3();
187853
+ var semver5 = require_semver3();
187770
187854
  var isWin2 = process.platform === "win32";
187771
187855
  var isExecutableRegExp = /\.(?:com|exe)$/i;
187772
187856
  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;
187857
+ var supportsShellOption = niceTry(() => semver5.satisfies(process.version, "^4.8.0 || ^5.7.0 || >= 6.0.0", true)) || false;
187774
187858
  function detectShebang(parsed) {
187775
187859
  parsed.file = resolveCommand(parsed);
187776
187860
  const shebang = parsed.file && readShebang(parsed.file);
@@ -188300,8 +188384,8 @@ var require_dist12 = __commonJS({
188300
188384
  this.raw = this.version;
188301
188385
  return this;
188302
188386
  };
188303
- exports3.inc = inc3;
188304
- function inc3(version2, release3, loose, identifier) {
188387
+ exports3.inc = inc4;
188388
+ function inc4(version2, release3, loose, identifier) {
188305
188389
  if (typeof loose === "string") {
188306
188390
  identifier = loose;
188307
188391
  loose = void 0;
@@ -189020,8 +189104,8 @@ var require_dist12 = __commonJS({
189020
189104
  }
189021
189105
  return true;
189022
189106
  }
189023
- exports3.prerelease = prerelease;
189024
- function prerelease(version2, options) {
189107
+ exports3.prerelease = prerelease2;
189108
+ function prerelease2(version2, options) {
189025
189109
  var parsed = parse62(version2, options);
189026
189110
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
189027
189111
  }
@@ -208201,7 +208285,7 @@ ${fields}`;
208201
208285
  var import_assert22 = __toESM2(require("assert"));
208202
208286
  var import_fs_extra = __toESM2(require_lib16());
208203
208287
  var import_multistream = __toESM2(require_multistream());
208204
- var import_path34 = __toESM2(require("path"));
208288
+ var import_path35 = __toESM2(require("path"));
208205
208289
  var import_async_sema = __toESM2(require_async_sema());
208206
208290
  var semaToPreventEMFILE = new import_async_sema.default(20);
208207
208291
  var FileFsRef = class _FileFsRef {
@@ -208243,7 +208327,7 @@ ${fields}`;
208243
208327
  (0, import_assert22.default)(typeof mode === "number");
208244
208328
  (0, import_assert22.default)(typeof stream2.pipe === "function");
208245
208329
  (0, import_assert22.default)(typeof fsPath === "string");
208246
- await import_fs_extra.default.mkdirp(import_path34.default.dirname(fsPath));
208330
+ await import_fs_extra.default.mkdirp(import_path35.default.dirname(fsPath));
208247
208331
  await new Promise((resolve11, reject) => {
208248
208332
  const dest = import_fs_extra.default.createWriteStream(fsPath, {
208249
208333
  mode: mode & 511
@@ -209201,12 +209285,12 @@ ${fields}`;
209201
209285
  }
209202
209286
  }
209203
209287
  };
209204
- var import_path35 = require("path");
209288
+ var import_path36 = require("path");
209205
209289
  var import_os5 = require("os");
209206
209290
  var import_fs_extra4 = __toESM2(require_lib16());
209207
209291
  async function getWritableDirectory() {
209208
209292
  const name = Math.floor(Math.random() * 2147483647).toString(16);
209209
- const directory = (0, import_path35.join)((0, import_os5.tmpdir)(), name);
209293
+ const directory = (0, import_path36.join)((0, import_os5.tmpdir)(), name);
209210
209294
  await (0, import_fs_extra4.mkdirp)(directory);
209211
209295
  return directory;
209212
209296
  }
@@ -214134,7 +214218,7 @@ var require_readdir_recursive = __commonJS({
214134
214218
  });
214135
214219
  module2.exports = __toCommonJS2(readdir_recursive_exports);
214136
214220
  var import_fs34 = __toESM2(require("fs"));
214137
- var import_path34 = __toESM2(require("path"));
214221
+ var import_path35 = __toESM2(require("path"));
214138
214222
  var import_minimatch8 = __toESM2(require_commonjs3());
214139
214223
  function patternMatcher(pattern) {
214140
214224
  return function(path20, stats) {
@@ -214162,7 +214246,7 @@ var require_readdir_recursive = __commonJS({
214162
214246
  return resolve11(list2);
214163
214247
  }
214164
214248
  files.forEach(function(file) {
214165
- const filePath = import_path34.default.join(path20, file);
214249
+ const filePath = import_path35.default.join(path20, file);
214166
214250
  import_fs34.default.lstat(filePath, function(_err, stats) {
214167
214251
  if (_err) {
214168
214252
  return reject(_err);
@@ -219330,15 +219414,15 @@ var require_pattern = __commonJS({
219330
219414
  exports2.removeDuplicateSlashes = removeDuplicateSlashes;
219331
219415
  function partitionAbsoluteAndRelative(patterns) {
219332
219416
  const absolute = [];
219333
- const relative7 = [];
219417
+ const relative8 = [];
219334
219418
  for (const pattern of patterns) {
219335
219419
  if (isAbsolute7(pattern)) {
219336
219420
  absolute.push(pattern);
219337
219421
  } else {
219338
- relative7.push(pattern);
219422
+ relative8.push(pattern);
219339
219423
  }
219340
219424
  }
219341
- return [absolute, relative7];
219425
+ return [absolute, relative8];
219342
219426
  }
219343
219427
  exports2.partitionAbsoluteAndRelative = partitionAbsoluteAndRelative;
219344
219428
  function isAbsolute7(pattern) {
@@ -221963,7 +222047,7 @@ var require_utils10 = __commonJS({
221963
222047
  shouldInlineStaticFiles: () => shouldInlineStaticFiles
221964
222048
  });
221965
222049
  module2.exports = __toCommonJS2(utils_exports);
221966
- var import_path34 = require("path");
222050
+ var import_path35 = require("path");
221967
222051
  var import_stream10 = require("stream");
221968
222052
  var import_url13 = require("url");
221969
222053
  var import_ignore4 = __toESM2(require_ignore2());
@@ -222027,8 +222111,8 @@ var require_utils10 = __commonJS({
222027
222111
  };
222028
222112
  async function getUserIgnore(cwd) {
222029
222113
  const [vercelignore, nowignore] = await Promise.all([
222030
- maybeRead((0, import_path34.join)(cwd, ".vercelignore"), ""),
222031
- maybeRead((0, import_path34.join)(cwd, ".nowignore"), "")
222114
+ maybeRead((0, import_path35.join)(cwd, ".vercelignore"), ""),
222115
+ maybeRead((0, import_path35.join)(cwd, ".nowignore"), "")
222032
222116
  ]);
222033
222117
  if (vercelignore && nowignore) {
222034
222118
  throw new import_build_utils.NowBuildError({
@@ -222058,7 +222142,7 @@ var require_utils10 = __commonJS({
222058
222142
  debug4("Building file tree...");
222059
222143
  if (isDirectory && !Array.isArray(path20)) {
222060
222144
  const ignores2 = (absPath) => {
222061
- const rel = (0, import_path34.relative)(path20, absPath);
222145
+ const rel = (0, import_path35.relative)(path20, absPath);
222062
222146
  const ignored = ig.ignores(rel);
222063
222147
  if (ignored) {
222064
222148
  ignoreList.push(rel);
@@ -222069,7 +222153,7 @@ var require_utils10 = __commonJS({
222069
222153
  const refs = /* @__PURE__ */ new Set();
222070
222154
  if (prebuilt) {
222071
222155
  const vcConfigFilePaths = fileList.filter(
222072
- (file) => (0, import_path34.basename)(file) === ".vc-config.json"
222156
+ (file) => (0, import_path35.basename)(file) === ".vc-config.json"
222073
222157
  );
222074
222158
  const userIg = await getUserIgnore(path20);
222075
222159
  await Promise.all(
@@ -222079,9 +222163,9 @@ var require_utils10 = __commonJS({
222079
222163
  if (!config.filePathMap)
222080
222164
  return;
222081
222165
  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)) {
222166
+ const absPath = (0, import_path35.join)(path20, v12);
222167
+ const rel = (0, import_path35.relative)(path20, absPath);
222168
+ if (rel.startsWith("..") || (0, import_path35.isAbsolute)(rel)) {
222085
222169
  debug4(
222086
222170
  `Ignoring "filePathMap" entry "${v12}": resolves outside the deployment root`
222087
222171
  );
@@ -222099,7 +222183,7 @@ var require_utils10 = __commonJS({
222099
222183
  );
222100
222184
  try {
222101
222185
  let microfrontendConfigPath = (0, import_utils68.findConfig)({
222102
- dir: (0, import_path34.join)(path20, rootDirectory || "")
222186
+ dir: (0, import_path35.join)(path20, rootDirectory || "")
222103
222187
  });
222104
222188
  if (!microfrontendConfigPath && !rootDirectory && projectName) {
222105
222189
  microfrontendConfigPath = (0, import_utils68.findConfig)({
@@ -222117,7 +222201,7 @@ var require_utils10 = __commonJS({
222117
222201
  }
222118
222202
  }
222119
222203
  try {
222120
- const routesJsonPath = (0, import_path34.join)(path20, ".vercel", "routes.json");
222204
+ const routesJsonPath = (0, import_path35.join)(path20, ".vercel", "routes.json");
222121
222205
  const routesJsonContent = await maybeRead(routesJsonPath, null);
222122
222206
  if (routesJsonContent !== null) {
222123
222207
  refs.add(routesJsonPath);
@@ -222129,12 +222213,12 @@ var require_utils10 = __commonJS({
222129
222213
  if (prebuilt && bulkRedirectsPath) {
222130
222214
  try {
222131
222215
  const projectRoot = path20;
222132
- const bulkRedirectsFullPath = (0, import_path34.join)(
222216
+ const bulkRedirectsFullPath = (0, import_path35.join)(
222133
222217
  projectRoot,
222134
222218
  rootDirectory || "",
222135
222219
  bulkRedirectsPath
222136
222220
  );
222137
- const relativeFromRoot = (0, import_path34.relative)(projectRoot, bulkRedirectsFullPath);
222221
+ const relativeFromRoot = (0, import_path35.relative)(projectRoot, bulkRedirectsFullPath);
222138
222222
  if (relativeFromRoot.startsWith("..")) {
222139
222223
  debug4(
222140
222224
  `Skipping bulk redirects path "${bulkRedirectsPath}" - path traversal detected (resolves outside project root)`
@@ -222189,9 +222273,9 @@ var require_utils10 = __commonJS({
222189
222273
  if (typeof cwd !== "string") {
222190
222274
  throw new Error(`\`cwd\` must be a "string"`);
222191
222275
  }
222192
- const relOutputDir = (0, import_path34.relative)(cwd, vercelOutputDir);
222276
+ const relOutputDir = (0, import_path35.relative)(cwd, vercelOutputDir);
222193
222277
  ignores = ["*"];
222194
- const parts = relOutputDir.split(import_path34.sep);
222278
+ const parts = relOutputDir.split(import_path35.sep);
222195
222279
  parts.forEach((_5, i5) => {
222196
222280
  const level = parts.slice(0, i5 + 1).join("/");
222197
222281
  ignores.push(`!${level}`);
@@ -222231,8 +222315,8 @@ var require_utils10 = __commonJS({
222231
222315
  const files = await Promise.all(
222232
222316
  cwds.map(async (cwd2) => {
222233
222317
  const [vercelignore, nowignore] = await Promise.all([
222234
- maybeRead((0, import_path34.join)(cwd2, ".vercelignore"), ""),
222235
- maybeRead((0, import_path34.join)(cwd2, ".nowignore"), "")
222318
+ maybeRead((0, import_path35.join)(cwd2, ".vercelignore"), ""),
222319
+ maybeRead((0, import_path35.join)(cwd2, ".nowignore"), "")
222236
222320
  ]);
222237
222321
  if (vercelignore && nowignore) {
222238
222322
  throw new import_build_utils.NowBuildError({
@@ -222244,7 +222328,7 @@ var require_utils10 = __commonJS({
222244
222328
  return vercelignore || nowignore;
222245
222329
  })
222246
222330
  );
222247
- const isRustProject = (await Promise.all(cwds.map((cwd2) => (0, import_fs_extra.pathExists)((0, import_path34.join)(cwd2, "Cargo.toml"))))).some(Boolean);
222331
+ const isRustProject = (await Promise.all(cwds.map((cwd2) => (0, import_fs_extra.pathExists)((0, import_path35.join)(cwd2, "Cargo.toml"))))).some(Boolean);
222248
222332
  if (isRustProject) {
222249
222333
  ignores.push("/target");
222250
222334
  }
@@ -222326,9 +222410,9 @@ ${clearRelative(ignoreFile)}`);
222326
222410
  for (const name of file.names) {
222327
222411
  let fileName;
222328
222412
  if (clientOptions.isDirectory) {
222329
- fileName = typeof clientOptions.path === "string" ? (0, import_path34.relative)(clientOptions.path, name) : name;
222413
+ fileName = typeof clientOptions.path === "string" ? (0, import_path35.relative)(clientOptions.path, name) : name;
222330
222414
  } else {
222331
- const segments = name.split(import_path34.sep);
222415
+ const segments = name.split(import_path35.sep);
222332
222416
  fileName = segments[segments.length - 1];
222333
222417
  }
222334
222418
  const normalizedName = isWin ? fileName.replace(/\\/g, "/") : fileName;
@@ -223356,7 +223440,7 @@ var require_upload = __commonJS({
223356
223440
  var import_async_retry5 = __toESM2(require_lib15());
223357
223441
  var import_async_sema = require_lib12();
223358
223442
  var import_utils68 = require_utils10();
223359
- var import_errors49 = require_errors3();
223443
+ var import_errors51 = require_errors3();
223360
223444
  var import_deploy = require_deploy();
223361
223445
  var isClientNetworkError = (err) => {
223362
223446
  if (!(err instanceof Error)) {
@@ -223528,11 +223612,11 @@ var require_upload = __commonJS({
223528
223612
  `An internal error occurred in upload request. Not retrying...`
223529
223613
  );
223530
223614
  const { error: error3 } = await res.json();
223531
- err = new import_errors49.DeploymentError(error3);
223615
+ err = new import_errors51.DeploymentError(error3);
223532
223616
  } else {
223533
223617
  debug4(`A server error occurred in upload request. Retrying...`);
223534
223618
  const { error: error3 } = await res.json();
223535
- throw new import_errors49.DeploymentError(error3);
223619
+ throw new import_errors51.DeploymentError(error3);
223536
223620
  }
223537
223621
  } catch (e5) {
223538
223622
  debug4(`An unexpected error occurred in upload promise:
@@ -228847,8 +228931,8 @@ var require_collect_deployment_files = __commonJS({
228847
228931
  module2.exports = __toCommonJS2(collect_deployment_files_exports);
228848
228932
  var import_error_utils = require_dist13();
228849
228933
  var import_fs_extra = require_lib11();
228850
- var import_path34 = require("path");
228851
- var import_errors49 = require_errors3();
228934
+ var import_path35 = require("path");
228935
+ var import_errors51 = require_errors3();
228852
228936
  var import_utils68 = require_utils10();
228853
228937
  var import_archive = require_archive();
228854
228938
  var import_hashes = require_hashes();
@@ -228857,7 +228941,7 @@ var require_collect_deployment_files = __commonJS({
228857
228941
  debug4(
228858
228942
  `Error: 'path' is expected to be a string or an array. Received ${typeof path20}`
228859
228943
  );
228860
- throw new import_errors49.DeploymentError({
228944
+ throw new import_errors51.DeploymentError({
228861
228945
  code: "missing_path",
228862
228946
  message: "Path not provided"
228863
228947
  });
@@ -228869,15 +228953,15 @@ var require_collect_deployment_files = __commonJS({
228869
228953
  clientOptions.isDirectory = isDirectory;
228870
228954
  if (Array.isArray(path20)) {
228871
228955
  for (const filePath of path20) {
228872
- if (!(0, import_path34.isAbsolute)(filePath)) {
228873
- throw new import_errors49.DeploymentError({
228956
+ if (!(0, import_path35.isAbsolute)(filePath)) {
228957
+ throw new import_errors51.DeploymentError({
228874
228958
  code: "invalid_path",
228875
228959
  message: `Provided path ${filePath} is not absolute`
228876
228960
  });
228877
228961
  }
228878
228962
  }
228879
- } else if (!(0, import_path34.isAbsolute)(path20)) {
228880
- throw new import_errors49.DeploymentError({
228963
+ } else if (!(0, import_path35.isAbsolute)(path20)) {
228964
+ throw new import_errors51.DeploymentError({
228881
228965
  code: "invalid_path",
228882
228966
  message: `Provided path ${path20} is not absolute`
228883
228967
  });
@@ -228900,9 +228984,9 @@ var require_collect_deployment_files = __commonJS({
228900
228984
  filesMap = clientOptions.archive === "tgz" ? await (0, import_archive.createTgzFiles)(workPath, fileList, debug4) : await (0, import_hashes.hashes)(fileList);
228901
228985
  } catch (err) {
228902
228986
  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")) {
228987
+ const errPath = (0, import_path35.relative)(workPath, err.path);
228988
+ err.message = `File does not exist: "${(0, import_path35.relative)(workPath, errPath)}"`;
228989
+ if (errPath.split(import_path35.sep).includes("node_modules")) {
228906
228990
  err.message = `Please ensure project dependencies have been installed:
228907
228991
  ${err.message}`;
228908
228992
  }
@@ -228945,7 +229029,7 @@ var require_create_deployment = __commonJS({
228945
229029
  var import_deploy = require_deploy();
228946
229030
  var import_upload = require_upload();
228947
229031
  var import_utils68 = require_utils10();
228948
- var import_errors49 = require_errors3();
229032
+ var import_errors51 = require_errors3();
228949
229033
  var import_collect_deployment_files = require_collect_deployment_files();
228950
229034
  function buildCreateDeployment() {
228951
229035
  return async function* createDeployment2(clientOptions, deploymentOptions = {}) {
@@ -228957,7 +229041,7 @@ var require_create_deployment = __commonJS({
228957
229041
  debug4(
228958
229042
  `Error: 'token' is expected to be a string. Received ${typeof clientOptions.token}`
228959
229043
  );
228960
- throw new import_errors49.DeploymentError({
229044
+ throw new import_errors51.DeploymentError({
228961
229045
  code: "token_not_provided",
228962
229046
  message: "Options object must include a `token`"
228963
229047
  });
@@ -228965,7 +229049,7 @@ var require_create_deployment = __commonJS({
228965
229049
  if (clientOptions.manual) {
228966
229050
  debug4("Manual provisioning mode enabled");
228967
229051
  if (!clientOptions.prebuilt) {
228968
- throw new import_errors49.DeploymentError({
229052
+ throw new import_errors51.DeploymentError({
228969
229053
  code: "invalid_options",
228970
229054
  message: "The `manual` option requires `prebuilt` to be true"
228971
229055
  });
@@ -229047,23 +229131,23 @@ var require_continue = __commonJS({
229047
229131
  continueDeployment: () => continueDeployment2
229048
229132
  });
229049
229133
  module2.exports = __toCommonJS2(continue_exports);
229050
- var import_path34 = require("path");
229134
+ var import_path35 = require("path");
229051
229135
  var import_fs_extra = __toESM2(require_lib11());
229052
229136
  var import_check_deployment_status = require_check_deployment_status();
229053
229137
  var import_utils68 = require_utils10();
229054
229138
  var import_hashes = require_hashes();
229055
229139
  var import_ready_state = require_ready_state();
229056
229140
  var import_upload = require_upload();
229057
- var import_errors49 = require_errors3();
229141
+ var import_errors51 = require_errors3();
229058
229142
  var import_archive = require_archive();
229059
229143
  async function* continueDeployment2(options) {
229060
229144
  const debug4 = (0, import_utils68.createDebug)(options.debug);
229061
229145
  debug4(`Continuing deployment: ${options.deploymentId}`);
229062
- const outputDir = options.vercelOutputDir || (0, import_path34.join)(options.path, ".vercel", "output");
229146
+ const outputDir = options.vercelOutputDir || (0, import_path35.join)(options.path, ".vercel", "output");
229063
229147
  if (!await import_fs_extra.default.pathExists(outputDir)) {
229064
229148
  return yield {
229065
229149
  type: "error",
229066
- payload: new import_errors49.DeploymentError({
229150
+ payload: new import_errors51.DeploymentError({
229067
229151
  code: "output_dir_not_found",
229068
229152
  message: `Output directory not found at ${outputDir}. Run 'vercel build' first.`
229069
229153
  })
@@ -229074,7 +229158,7 @@ var require_continue = __commonJS({
229074
229158
  { isDirectory: true, prebuilt: true, vercelOutputDir: outputDir },
229075
229159
  debug4
229076
229160
  );
229077
- const provisionJsonPath = (0, import_path34.join)(outputDir, "provision.json");
229161
+ const provisionJsonPath = (0, import_path35.join)(outputDir, "provision.json");
229078
229162
  const unbundledFiles = fileList.filter((f8) => f8 === provisionJsonPath);
229079
229163
  let files;
229080
229164
  if (options.archive === "tgz") {
@@ -229162,7 +229246,7 @@ var require_continue = __commonJS({
229162
229246
  if (!deployment) {
229163
229247
  return yield {
229164
229248
  type: "error",
229165
- payload: new import_errors49.DeploymentError({
229249
+ payload: new import_errors51.DeploymentError({
229166
229250
  code: "continue_failed",
229167
229251
  message: "Failed to continue deployment after uploading files"
229168
229252
  })
@@ -229264,7 +229348,7 @@ var require_inspect_deployment_files = __commonJS({
229264
229348
  inspectDeploymentFiles: () => inspectDeploymentFiles2
229265
229349
  });
229266
229350
  module2.exports = __toCommonJS2(inspect_deployment_files_exports);
229267
- var import_path34 = require("path");
229351
+ var import_path35 = require("path");
229268
229352
  var import_collect_deployment_files = require_collect_deployment_files();
229269
229353
  var import_utils68 = require_utils10();
229270
229354
  async function inspectDeploymentFiles2(clientOptions) {
@@ -229276,8 +229360,8 @@ var require_inspect_deployment_files = __commonJS({
229276
229360
  for (const [sha, file] of filesMap) {
229277
229361
  const size2 = file.data?.byteLength || file.data?.length || 0;
229278
229362
  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("/");
229363
+ const pathName = isDirectory ? (0, import_path35.relative)(workPath, name) : name.split(import_path35.sep).at(-1) || name;
229364
+ const normalizedPath = pathName.split(import_path35.sep).join("/");
229281
229365
  const deploymentFile = {
229282
229366
  path: normalizedPath,
229283
229367
  size: size2,
@@ -229940,11 +230024,12 @@ function applyWorkspaceSelection(config, workspaceDirectory) {
229940
230024
  );
229941
230025
  }
229942
230026
  function findConfigFile() {
229943
- if (_configPathCache && (0, import_fs27.existsSync)(_configPathCache)) {
230027
+ const cwd = process.cwd();
230028
+ if (_configPathCache && _configPathCacheCwd === cwd && (0, import_fs27.existsSync)(_configPathCache)) {
229944
230029
  return _configPathCache;
229945
230030
  }
229946
230031
  _configPathCache = void 0;
229947
- const cwd = process.cwd();
230032
+ _configPathCacheCwd = cwd;
229948
230033
  const MAX_DEPTH = 1024;
229949
230034
  let depth = 0;
229950
230035
  let currentDir = cwd;
@@ -230322,7 +230407,7 @@ async function expandWorkspaceTargets(targets) {
230322
230407
  }
230323
230408
  return expandedTargets;
230324
230409
  }
230325
- var import_fs27, import_path25, import_git_url_parse, CONFIG_FILE_NAME, DEFAULT_RELEASE_BRANCH_NAME, _configPathCache, _configCache, WORKSPACES_MIN_VERSION, _activeWorkspaceName, WORKSPACE_PLACEHOLDERS, WORKSPACE_PLACEHOLDER_REGEX, AUTO_VERSION_MIN_VERSION, _globalGitHubConfigCache, DEFAULT_CHANGELOG_FILE_PATH;
230410
+ var import_fs27, import_path25, import_git_url_parse, CONFIG_FILE_NAME, DEFAULT_RELEASE_BRANCH_NAME, _configPathCache, _configPathCacheCwd, _configCache, WORKSPACES_MIN_VERSION, _activeWorkspaceName, WORKSPACE_PLACEHOLDERS, WORKSPACE_PLACEHOLDER_REGEX, AUTO_VERSION_MIN_VERSION, _globalGitHubConfigCache, DEFAULT_CHANGELOG_FILE_PATH;
230326
230411
  var init_config2 = __esm({
230327
230412
  "src/config.ts"() {
230328
230413
  "use strict";
@@ -230366,7 +230451,7 @@ var require_package7 = __commonJS({
230366
230451
  "package.json"(exports2, module2) {
230367
230452
  module2.exports = {
230368
230453
  name: "@sentry/craft",
230369
- version: "3.6.0",
230454
+ version: "3.7.1",
230370
230455
  description: "The universal sentry workflow CLI",
230371
230456
  main: "dist/craft",
230372
230457
  repository: "https://github.com/getsentry/craft",
@@ -230573,7 +230658,7 @@ function getPackage() {
230573
230658
  }
230574
230659
  function getPackageVersion3() {
230575
230660
  const { version: version2 } = getPackage();
230576
- const buildInfo = "5a97c9fdb9182ed0aef66f36accbbf022e7bfbb5";
230661
+ const buildInfo = "d725f285bc864ea8aeb300f189a8680cde6aa22a";
230577
230662
  return buildInfo ? `${version2} (${buildInfo})` : version2;
230578
230663
  }
230579
230664
  function semVerToString(s8) {
@@ -230625,479 +230710,6 @@ var require_get_caller_file = __commonJS({
230625
230710
  }
230626
230711
  });
230627
230712
 
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
230713
  // node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js
231102
230714
  var require_constants4 = __commonJS({
231103
230715
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/internal/constants.js"(exports2, module2) {
@@ -231529,16 +231141,16 @@ var require_semver = __commonJS({
231529
231141
  }
231530
231142
  }
231531
231143
  if (identifier) {
231532
- let prerelease = [identifier, base];
231144
+ let prerelease2 = [identifier, base];
231533
231145
  if (identifierBase === false) {
231534
- prerelease = [identifier];
231146
+ prerelease2 = [identifier];
231535
231147
  }
231536
231148
  if (compareIdentifiers(this.prerelease[0], identifier) === 0) {
231537
231149
  if (isNaN(this.prerelease[1])) {
231538
- this.prerelease = prerelease;
231150
+ this.prerelease = prerelease2;
231539
231151
  }
231540
231152
  } else {
231541
- this.prerelease = prerelease;
231153
+ this.prerelease = prerelease2;
231542
231154
  }
231543
231155
  }
231544
231156
  break;
@@ -231558,7 +231170,7 @@ var require_semver = __commonJS({
231558
231170
  });
231559
231171
 
231560
231172
  // node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js
231561
- var require_parse5 = __commonJS({
231173
+ var require_parse4 = __commonJS({
231562
231174
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/parse.js"(exports2, module2) {
231563
231175
  "use strict";
231564
231176
  init_import_meta_url();
@@ -231585,7 +231197,7 @@ var require_valid = __commonJS({
231585
231197
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/valid.js"(exports2, module2) {
231586
231198
  "use strict";
231587
231199
  init_import_meta_url();
231588
- var parse15 = require_parse5();
231200
+ var parse15 = require_parse4();
231589
231201
  var valid2 = (version2, options) => {
231590
231202
  const v12 = parse15(version2, options);
231591
231203
  return v12 ? v12.version : null;
@@ -231599,7 +231211,7 @@ var require_clean = __commonJS({
231599
231211
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/clean.js"(exports2, module2) {
231600
231212
  "use strict";
231601
231213
  init_import_meta_url();
231602
- var parse15 = require_parse5();
231214
+ var parse15 = require_parse4();
231603
231215
  var clean = (version2, options) => {
231604
231216
  const s8 = parse15(version2.trim().replace(/^[=v]+/, ""), options);
231605
231217
  return s8 ? s8.version : null;
@@ -231614,7 +231226,7 @@ var require_inc = __commonJS({
231614
231226
  "use strict";
231615
231227
  init_import_meta_url();
231616
231228
  var SemVer5 = require_semver();
231617
- var inc3 = (version2, release3, options, identifier, identifierBase) => {
231229
+ var inc4 = (version2, release3, options, identifier, identifierBase) => {
231618
231230
  if (typeof options === "string") {
231619
231231
  identifierBase = identifier;
231620
231232
  identifier = options;
@@ -231629,7 +231241,7 @@ var require_inc = __commonJS({
231629
231241
  return null;
231630
231242
  }
231631
231243
  };
231632
- module2.exports = inc3;
231244
+ module2.exports = inc4;
231633
231245
  }
231634
231246
  });
231635
231247
 
@@ -231638,7 +231250,7 @@ var require_diff = __commonJS({
231638
231250
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/diff.js"(exports2, module2) {
231639
231251
  "use strict";
231640
231252
  init_import_meta_url();
231641
- var parse15 = require_parse5();
231253
+ var parse15 = require_parse4();
231642
231254
  var diff = (version1, version2) => {
231643
231255
  const v12 = parse15(version1, null, true);
231644
231256
  const v22 = parse15(version2, null, true);
@@ -231716,12 +231328,12 @@ var require_prerelease = __commonJS({
231716
231328
  "node_modules/.pnpm/semver@7.7.3/node_modules/semver/functions/prerelease.js"(exports2, module2) {
231717
231329
  "use strict";
231718
231330
  init_import_meta_url();
231719
- var parse15 = require_parse5();
231720
- var prerelease = (version2, options) => {
231331
+ var parse15 = require_parse4();
231332
+ var prerelease2 = (version2, options) => {
231721
231333
  const parsed = parse15(version2, options);
231722
231334
  return parsed && parsed.prerelease.length ? parsed.prerelease : null;
231723
231335
  };
231724
- module2.exports = prerelease;
231336
+ module2.exports = prerelease2;
231725
231337
  }
231726
231338
  });
231727
231339
 
@@ -231918,7 +231530,7 @@ var require_coerce = __commonJS({
231918
231530
  "use strict";
231919
231531
  init_import_meta_url();
231920
231532
  var SemVer5 = require_semver();
231921
- var parse15 = require_parse5();
231533
+ var parse15 = require_parse4();
231922
231534
  var { safeRe: re6, t: t6 } = require_re();
231923
231535
  var coerce = (version2, options) => {
231924
231536
  if (version2 instanceof SemVer5) {
@@ -231951,9 +231563,9 @@ var require_coerce = __commonJS({
231951
231563
  const major2 = match3[2];
231952
231564
  const minor = match3[3] || "0";
231953
231565
  const patch = match3[4] || "0";
231954
- const prerelease = options.includePrerelease && match3[5] ? `-${match3[5]}` : "";
231566
+ const prerelease2 = options.includePrerelease && match3[5] ? `-${match3[5]}` : "";
231955
231567
  const build = options.includePrerelease && match3[6] ? `+${match3[6]}` : "";
231956
- return parse15(`${major2}.${minor}.${patch}${prerelease}${build}`, options);
231568
+ return parse15(`${major2}.${minor}.${patch}${prerelease2}${build}`, options);
231957
231569
  };
231958
231570
  module2.exports = coerce;
231959
231571
  }
@@ -232986,15 +232598,15 @@ var require_semver2 = __commonJS({
232986
232598
  var constants4 = require_constants4();
232987
232599
  var SemVer5 = require_semver();
232988
232600
  var identifiers = require_identifiers();
232989
- var parse15 = require_parse5();
232601
+ var parse15 = require_parse4();
232990
232602
  var valid2 = require_valid();
232991
232603
  var clean = require_clean();
232992
- var inc3 = require_inc();
232604
+ var inc4 = require_inc();
232993
232605
  var diff = require_diff();
232994
232606
  var major2 = require_major();
232995
232607
  var minor = require_minor();
232996
232608
  var patch = require_patch();
232997
- var prerelease = require_prerelease();
232609
+ var prerelease2 = require_prerelease();
232998
232610
  var compare = require_compare();
232999
232611
  var rcompare = require_rcompare();
233000
232612
  var compareLoose = require_compare_loose();
@@ -233027,12 +232639,12 @@ var require_semver2 = __commonJS({
233027
232639
  parse: parse15,
233028
232640
  valid: valid2,
233029
232641
  clean,
233030
- inc: inc3,
232642
+ inc: inc4,
233031
232643
  diff,
233032
232644
  major: major2,
233033
232645
  minor,
233034
232646
  patch,
233035
- prerelease,
232647
+ prerelease: prerelease2,
233036
232648
  compare,
233037
232649
  rcompare,
233038
232650
  compareLoose,
@@ -233073,6 +232685,479 @@ var require_semver2 = __commonJS({
233073
232685
  }
233074
232686
  });
233075
232687
 
232688
+ // node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/quote.js
232689
+ var require_quote = __commonJS({
232690
+ "node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/quote.js"(exports2, module2) {
232691
+ "use strict";
232692
+ init_import_meta_url();
232693
+ var OPS = (
232694
+ /** @type {const} */
232695
+ [
232696
+ "||",
232697
+ "&&",
232698
+ ";;&",
232699
+ ";;",
232700
+ ";&",
232701
+ "|&",
232702
+ "<(",
232703
+ ">(",
232704
+ "<<<",
232705
+ "<<-",
232706
+ "<<",
232707
+ ">>",
232708
+ ">&",
232709
+ ">|",
232710
+ "&>>",
232711
+ "&>",
232712
+ "<&",
232713
+ "<>",
232714
+ "&",
232715
+ ";",
232716
+ "(",
232717
+ ")",
232718
+ "|",
232719
+ "<",
232720
+ ">"
232721
+ ]
232722
+ );
232723
+ var LINE_TERMINATORS = /[\n\r\u2028\u2029]/;
232724
+ var GLOB_SHELL_SPECIAL = /[\s#!"$&'():;<=>@\\^`|~]/g;
232725
+ module2.exports = function quote(xs3) {
232726
+ var sawComment = false;
232727
+ return xs3.map(function(s8) {
232728
+ if (sawComment && typeof s8 === "string" && LINE_TERMINATORS.test(s8)) {
232729
+ throw new TypeError("a token after a `comment` must not contain line terminators");
232730
+ }
232731
+ if (s8 === "") {
232732
+ return (
232733
+ /** @type {const} */
232734
+ "''"
232735
+ );
232736
+ }
232737
+ if (s8 && typeof s8 === "object") {
232738
+ if ("op" in s8 && s8.op === "glob") {
232739
+ if (typeof s8.pattern !== "string") {
232740
+ throw new TypeError("glob token requires a string `pattern`");
232741
+ }
232742
+ if (LINE_TERMINATORS.test(s8.pattern)) {
232743
+ throw new TypeError("glob `pattern` must not contain line terminators");
232744
+ }
232745
+ if (s8.pattern === "") {
232746
+ return (
232747
+ /** @type {const} */
232748
+ "''"
232749
+ );
232750
+ }
232751
+ return s8.pattern.replace(GLOB_SHELL_SPECIAL, "\\$&");
232752
+ }
232753
+ if ("op" in s8 && typeof s8.op === "string") {
232754
+ if (OPS.indexOf(s8.op) < 0) {
232755
+ throw new TypeError("invalid `op` value: " + JSON.stringify(s8.op));
232756
+ }
232757
+ return s8.op.replace(/[\s\S]/g, "\\$&");
232758
+ }
232759
+ if ("comment" in s8 && typeof s8.comment === "string") {
232760
+ if (LINE_TERMINATORS.test(s8.comment)) {
232761
+ throw new TypeError("`comment` must not contain line terminators");
232762
+ }
232763
+ sawComment = true;
232764
+ return "#" + s8.comment;
232765
+ }
232766
+ throw new TypeError("unrecognized object token shape");
232767
+ }
232768
+ if (/'/.test(s8) && /!/.test(s8)) {
232769
+ return "'" + s8.replace(/'/g, `'"'"'`) + "'";
232770
+ }
232771
+ if (/["\s\\]/.test(s8) && !/'/.test(s8)) {
232772
+ return "'" + s8 + "'";
232773
+ }
232774
+ if (/["'\s]/.test(s8)) {
232775
+ return '"' + s8.replace(/(["\\$`])/g, "\\$1") + '"';
232776
+ }
232777
+ return String(s8).replace(/([A-Za-z]:)?([#!"$&'()*,:;<=>?@[\\\]^`{|}~])/g, "$1\\$2");
232778
+ }).join(" ");
232779
+ };
232780
+ }
232781
+ });
232782
+
232783
+ // node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/parse.js
232784
+ var require_parse5 = __commonJS({
232785
+ "node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/parse.js"(exports2, module2) {
232786
+ "use strict";
232787
+ init_import_meta_url();
232788
+ var CONTROL = (
232789
+ /** @type {const} */
232790
+ "(?:" + /** @type {const} */
232791
+ [
232792
+ "\\|\\|",
232793
+ "\\&(?:\\&|>>?)",
232794
+ // `&&`, `&>`, and `&>>`
232795
+ ";;\\&?",
232796
+ // `;;` and `;;&`
232797
+ "[;|]\\&",
232798
+ // `;&` and `|&`
232799
+ "\\<\\(",
232800
+ "\\<\\<\\<",
232801
+ "\\<\\<-",
232802
+ "\\<\\<(?!\\()",
232803
+ // `<<(` stays `<` and `<(`, as zsh reads it; other shells reject it
232804
+ ">>",
232805
+ ">[&|(]",
232806
+ // `>&`, `>|`, and `>(`
232807
+ "<[&>]",
232808
+ // `<&` and `<>`
232809
+ "[&;()|<>]"
232810
+ ].join(
232811
+ /** @type {const} */
232812
+ "|"
232813
+ ) + /** @type {const} */
232814
+ ")"
232815
+ );
232816
+ var controlRE = new RegExp("^" + CONTROL + "$");
232817
+ var META = (
232818
+ /** @type {const} */
232819
+ "|&;()<> \\t"
232820
+ );
232821
+ var SINGLE_QUOTE = (
232822
+ /** @type {const} */
232823
+ "'([^']*?)'"
232824
+ );
232825
+ var ANSI_C_BODY = "(?:\\\\[\\s\\S]|[^\\\\'])*?";
232826
+ var ANSI_C_QUOTE = "\\$'" + ANSI_C_BODY + "'";
232827
+ var ansiCAt = new RegExp("\\$'" + ANSI_C_BODY + "(?:(')|\\\\?$)", "g");
232828
+ var ANSI_C_LETTERS = "abeEfnrtv";
232829
+ var ANSI_C_CHARS = "\x07\b\x1B\x1B\f\n\r \v";
232830
+ var hash = /^#$/;
232831
+ var SQ = (
232832
+ /** @type {const} */
232833
+ "'"
232834
+ );
232835
+ var DQ = (
232836
+ /** @type {const} */
232837
+ '"'
232838
+ );
232839
+ var DS = (
232840
+ /** @type {const} */
232841
+ "$"
232842
+ );
232843
+ var TOKEN = "";
232844
+ var mult = (
232845
+ /** @type {const} */
232846
+ 4294967296
232847
+ );
232848
+ for (i5 = 0; i5 < 4; i5++) {
232849
+ TOKEN += (mult * Math.random()).toString(16);
232850
+ }
232851
+ var i5;
232852
+ var startsWithToken = new RegExp("^" + TOKEN);
232853
+ function matchAll(s8, r6) {
232854
+ var origIndex = r6.lastIndex;
232855
+ var matches = [];
232856
+ var matchObj;
232857
+ while (matchObj = r6.exec(s8)) {
232858
+ matches[matches.length] = matchObj;
232859
+ if (r6.lastIndex === matchObj.index) {
232860
+ r6.lastIndex += 1;
232861
+ }
232862
+ }
232863
+ r6.lastIndex = origIndex;
232864
+ return matches;
232865
+ }
232866
+ function getVar(env3, pre, key) {
232867
+ var r6 = typeof env3 === "function" ? env3(key) : env3[key];
232868
+ if (typeof r6 === "undefined" && key != "") {
232869
+ r6 = "";
232870
+ } else if (typeof r6 === "undefined") {
232871
+ r6 = "$";
232872
+ }
232873
+ if (typeof r6 === "object") {
232874
+ return pre + TOKEN + JSON.stringify(r6) + TOKEN;
232875
+ }
232876
+ return pre + r6;
232877
+ }
232878
+ 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;
232879
+ function expandAnsiCEscape(m10, escape2) {
232880
+ var kind = escape2.charAt(0);
232881
+ if (kind === "c") {
232882
+ var ctrl = escape2.charAt(1);
232883
+ return ctrl === "?" ? "\x7F" : String.fromCharCode(ctrl.charCodeAt(0) & 31);
232884
+ }
232885
+ if (kind === "x" || kind === "u" || kind === "U") {
232886
+ var cp = parseInt(escape2.slice(1), 16);
232887
+ if (cp > 1114111) {
232888
+ return m10;
232889
+ }
232890
+ return String.fromCharCode.apply(null, cp > 65535 ? [55232 + (cp >> 10), 56320 + (cp & 1023)] : [cp]);
232891
+ }
232892
+ if (kind >= "0" && kind <= "7") {
232893
+ return String.fromCharCode(parseInt(escape2, 8) & 255);
232894
+ }
232895
+ var letter = ANSI_C_LETTERS.indexOf(escape2);
232896
+ return letter < 0 ? escape2 : ANSI_C_CHARS.charAt(letter);
232897
+ }
232898
+ function expandAnsiC(body) {
232899
+ return body.replace(ansiCEscape, expandAnsiCEscape).split("\0")[0];
232900
+ }
232901
+ function closesAnsiC(s8, i6) {
232902
+ ansiCAt.lastIndex = i6;
232903
+ return !!/** @type {RegExpExecArray} */
232904
+ ansiCAt.exec(s8)[1];
232905
+ }
232906
+ function parseInternal(string2, env3, opts) {
232907
+ if (!opts) {
232908
+ opts = {};
232909
+ }
232910
+ var BS = opts.escape || "\\";
232911
+ var ifs = opts.splitUnquoted === true ? " \n" : typeof opts.splitUnquoted === "string" ? opts.splitUnquoted : "";
232912
+ var BAREWORD = "(\\" + BS + `['"$\\` + BS + META + "]|\\$\\$|\\$(?!" + ANSI_C_QUOTE.slice(2) + `)|[^\\s'"$` + META + "])+";
232913
+ var DOUBLE_QUOTE = '"(?:\\' + BS + '[\\s\\S]|[^"\\' + BS + '])*"';
232914
+ var chunker = new RegExp([
232915
+ "(" + CONTROL + ")",
232916
+ // control chars
232917
+ "(" + ANSI_C_QUOTE + "|" + BAREWORD + "|" + DOUBLE_QUOTE + "|" + SINGLE_QUOTE + ")+"
232918
+ ].join("|"), "g");
232919
+ var matches = matchAll(string2, chunker);
232920
+ if (matches.length === 0) {
232921
+ return [];
232922
+ }
232923
+ if (!env3) {
232924
+ env3 = {};
232925
+ }
232926
+ var commented = false;
232927
+ return matches.map(function(match3) {
232928
+ var s8 = match3[0];
232929
+ if (!s8 || commented) {
232930
+ return void 0;
232931
+ }
232932
+ if (controlRE.test(s8)) {
232933
+ return (
232934
+ /** @type {ControlOperator} */
232935
+ { op: s8 }
232936
+ );
232937
+ }
232938
+ var quote = false;
232939
+ var esc = false;
232940
+ var out = "";
232941
+ var words = [];
232942
+ var sawQuote = false;
232943
+ var pendingNw = null;
232944
+ var isGlob = false;
232945
+ var i6;
232946
+ function parseEnvVar() {
232947
+ i6 += 1;
232948
+ var varend;
232949
+ var varname;
232950
+ var char = s8.charAt(i6);
232951
+ if (char === "{") {
232952
+ i6 += 1;
232953
+ if (s8.charAt(i6) === "}") {
232954
+ throw new Error("Bad substitution: " + s8.slice(i6 - 2, i6 + 1));
232955
+ }
232956
+ var depth = 1;
232957
+ varend = i6;
232958
+ while (depth > 0 && varend < s8.length) {
232959
+ if (s8.charAt(varend) === "{" && s8.charAt(varend - 1) === "$") {
232960
+ depth += 1;
232961
+ } else if (s8.charAt(varend) === "}") {
232962
+ depth -= 1;
232963
+ }
232964
+ varend += 1;
232965
+ }
232966
+ if (depth !== 0) {
232967
+ throw new Error("Bad substitution: " + s8.slice(i6));
232968
+ }
232969
+ varend -= 1;
232970
+ varname = s8.slice(i6, varend);
232971
+ i6 = varend;
232972
+ } else if (/[*@#?$!-]/.test(char)) {
232973
+ varname = char;
232974
+ } else {
232975
+ var slicedFromI = s8.slice(i6);
232976
+ varend = slicedFromI.match(/[^\w\d_]/);
232977
+ if (!varend) {
232978
+ varname = slicedFromI;
232979
+ i6 = s8.length;
232980
+ } else {
232981
+ varname = slicedFromI.slice(0, varend.index);
232982
+ i6 += /** @type {number} */
232983
+ varend.index - 1;
232984
+ }
232985
+ }
232986
+ return getVar(
232987
+ /** @type {NonNullable<typeof env>} */
232988
+ env3,
232989
+ "",
232990
+ varname
232991
+ );
232992
+ }
232993
+ function flushRun() {
232994
+ if (pendingNw === null) {
232995
+ return;
232996
+ }
232997
+ if (pendingNw === 0) {
232998
+ if (out !== "") {
232999
+ words[words.length] = out;
233000
+ out = "";
233001
+ }
233002
+ } else {
233003
+ words[words.length] = out;
233004
+ out = "";
233005
+ for (var fe3 = 1; fe3 < pendingNw; fe3 += 1) {
233006
+ words[words.length] = "";
233007
+ }
233008
+ }
233009
+ pendingNw = null;
233010
+ }
233011
+ for (i6 = 0; i6 < s8.length; i6++) {
233012
+ var c7 = s8.charAt(i6);
233013
+ if (ifs && c7 !== DS) {
233014
+ flushRun();
233015
+ }
233016
+ isGlob = isGlob || !quote && (c7 === "*" || c7 === "?");
233017
+ if (esc) {
233018
+ out += c7;
233019
+ esc = false;
233020
+ } else if (quote) {
233021
+ if (c7 === quote) {
233022
+ quote = false;
233023
+ } else if (quote == SQ) {
233024
+ out += c7;
233025
+ } else {
233026
+ if (c7 === BS) {
233027
+ i6 += 1;
233028
+ c7 = s8.charAt(i6);
233029
+ if (c7 === DQ || c7 === BS || c7 === DS) {
233030
+ out += c7;
233031
+ } else {
233032
+ out += BS + c7;
233033
+ }
233034
+ } else if (c7 === DS) {
233035
+ out += parseEnvVar();
233036
+ } else {
233037
+ out += c7;
233038
+ }
233039
+ }
233040
+ } else if (c7 === DQ || c7 === SQ) {
233041
+ quote = c7;
233042
+ sawQuote = true;
233043
+ } else if (controlRE.test(c7)) {
233044
+ return (
233045
+ /** @type {ControlOperator} */
233046
+ { op: s8 }
233047
+ );
233048
+ } else if (hash.test(c7)) {
233049
+ commented = true;
233050
+ var commentObj = { comment: string2.slice(match3.index + i6 + 1) };
233051
+ if (out.length) {
233052
+ return (
233053
+ /** @type {const} */
233054
+ [out, commentObj]
233055
+ );
233056
+ }
233057
+ return (
233058
+ /** @type {const} */
233059
+ [commentObj]
233060
+ );
233061
+ } else if (c7 === BS) {
233062
+ esc = true;
233063
+ } else if (c7 === DS && s8.charAt(i6 + 1) === SQ && closesAnsiC(s8, i6)) {
233064
+ flushRun();
233065
+ sawQuote = true;
233066
+ out += expandAnsiC(s8.slice(i6 + 2, ansiCAt.lastIndex - 1));
233067
+ i6 = ansiCAt.lastIndex - 1;
233068
+ } else if (c7 === DS) {
233069
+ var value = parseEnvVar();
233070
+ if (!ifs) {
233071
+ out += value;
233072
+ } else {
233073
+ for (var vi3 = 0; vi3 < value.length; vi3 += 1) {
233074
+ var vc = value.charAt(vi3);
233075
+ if (ifs.indexOf(vc) < 0) {
233076
+ flushRun();
233077
+ out += vc;
233078
+ } else if (pendingNw === null) {
233079
+ pendingNw = vc === " " || vc === " " || vc === "\n" ? 0 : 1;
233080
+ } else if (vc !== " " && vc !== " " && vc !== "\n") {
233081
+ pendingNw += 1;
233082
+ }
233083
+ }
233084
+ }
233085
+ } else {
233086
+ out += c7;
233087
+ }
233088
+ }
233089
+ if (isGlob) {
233090
+ return (
233091
+ /** @type {GlobPattern} */
233092
+ { op: "glob", pattern: out }
233093
+ );
233094
+ }
233095
+ if (ifs) {
233096
+ if (pendingNw !== null && pendingNw > 0) {
233097
+ words[words.length] = out;
233098
+ out = "";
233099
+ for (var te5 = 1; te5 < pendingNw; te5 += 1) {
233100
+ words[words.length] = "";
233101
+ }
233102
+ }
233103
+ if (out !== "" || sawQuote && words.length === 0) {
233104
+ words[words.length] = out;
233105
+ }
233106
+ return words;
233107
+ }
233108
+ return out;
233109
+ }).reduce(
233110
+ function(prev, arg) {
233111
+ if (typeof arg === "undefined") {
233112
+ return prev;
233113
+ }
233114
+ [].concat(arg).forEach(function(entry) {
233115
+ prev[prev.length] = entry;
233116
+ });
233117
+ return prev;
233118
+ },
233119
+ /** @type {ParseEntry[]} */
233120
+ []
233121
+ );
233122
+ }
233123
+ module2.exports = function parse15(s8, env3, opts) {
233124
+ var mapped = parseInternal(s8, env3, opts);
233125
+ if (typeof env3 !== "function") {
233126
+ return mapped;
233127
+ }
233128
+ return mapped.reduce(
233129
+ function(acc, s9) {
233130
+ if (typeof s9 === "object") {
233131
+ acc[acc.length] = s9;
233132
+ return acc;
233133
+ }
233134
+ var xs3 = s9.split(RegExp("(" + TOKEN + ".*?" + TOKEN + ")", "g"));
233135
+ if (xs3.length === 1) {
233136
+ acc[acc.length] = xs3[0];
233137
+ return acc;
233138
+ }
233139
+ xs3.filter(Boolean).forEach(function(x8) {
233140
+ acc[acc.length] = startsWithToken.test(x8) ? JSON.parse(x8.split(TOKEN)[1]) : x8;
233141
+ });
233142
+ return acc;
233143
+ },
233144
+ /** @type {ParseEntry[]} */
233145
+ []
233146
+ );
233147
+ };
233148
+ }
233149
+ });
233150
+
233151
+ // node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/index.js
233152
+ var require_shell_quote = __commonJS({
233153
+ "node_modules/.pnpm/shell-quote@1.12.0/node_modules/shell-quote/index.js"(exports2) {
233154
+ "use strict";
233155
+ init_import_meta_url();
233156
+ exports2.quote = require_quote();
233157
+ exports2.parse = require_parse5();
233158
+ }
233159
+ });
233160
+
233076
233161
  // node_modules/.pnpm/ansi-regex@4.1.1/node_modules/ansi-regex/index.js
233077
233162
  var require_ansi_regex2 = __commonJS({
233078
233163
  "node_modules/.pnpm/ansi-regex@4.1.1/node_modules/ansi-regex/index.js"(exports2, module2) {
@@ -238811,13 +238896,11 @@ __export(prepare_exports, {
238811
238896
  command: () => command4,
238812
238897
  description: () => description3,
238813
238898
  handler: () => handler4,
238814
- prepareMain: () => prepareMain,
238815
- runPreReleaseCommand: () => runPreReleaseCommand
238899
+ prepareMain: () => prepareMain
238816
238900
  });
238817
238901
  init_import_meta_url();
238818
238902
  var import_fs32 = require("fs");
238819
- var import_path32 = require("path");
238820
- var shellQuote2 = __toESM(require_shell_quote());
238903
+ var import_path33 = require("path");
238821
238904
  init_dryRun();
238822
238905
  init_config2();
238823
238906
  init_logger2();
@@ -238903,6 +238986,49 @@ async function calculateCalVer(git, config) {
238903
238986
  logger.info(`CalVer: determined version ${version2}`);
238904
238987
  return version2;
238905
238988
  }
238989
+ var CALVER_TOKEN_PATTERNS = {
238990
+ Y: "(\\d{4})",
238991
+ y: "(\\d{2})",
238992
+ m: "(\\d{2})",
238993
+ "-m": "(\\d{1,2})",
238994
+ d: "(\\d{2})",
238995
+ "-d": "(\\d{1,2})"
238996
+ };
238997
+ function getNextCalVerPeriod(version2, format7) {
238998
+ const tokens = [];
238999
+ const datePattern = format7.replace(/[.*+?^${}()|[\]\\]/g, "\\$&").replace(/%(Y|y|-m|m|-d|d)/g, (_match, token) => {
239000
+ tokens.push(token);
239001
+ return CALVER_TOKEN_PATTERNS[token];
239002
+ });
239003
+ const match3 = new RegExp(`^${datePattern}\\.\\d+$`).exec(version2);
239004
+ if (!match3 || tokens.length === 0) {
239005
+ return void 0;
239006
+ }
239007
+ let year2 = 0;
239008
+ let month = 1;
239009
+ let day = 1;
239010
+ tokens.forEach((token, index) => {
239011
+ const value = Number(match3[index + 1]);
239012
+ if (token === "Y") {
239013
+ year2 = value;
239014
+ } else if (token === "y") {
239015
+ year2 = 2e3 + value;
239016
+ } else if (token.endsWith("m")) {
239017
+ month = value;
239018
+ } else {
239019
+ day = value;
239020
+ }
239021
+ });
239022
+ const date2 = new Date(year2, month - 1, day);
239023
+ if (tokens.some((token) => token.endsWith("d"))) {
239024
+ date2.setDate(date2.getDate() + 1);
239025
+ } else if (tokens.some((token) => token.endsWith("m"))) {
239026
+ date2.setMonth(date2.getMonth() + 1);
239027
+ } else {
239028
+ date2.setFullYear(date2.getFullYear() + 1);
239029
+ }
239030
+ return `${formatCalVerDate(date2, format7)}.0`;
239031
+ }
238906
239032
 
238907
239033
  // src/commands/prepare.ts
238908
239034
  init_changelog();
@@ -238910,7 +239036,14 @@ init_errors2();
238910
239036
  init_git();
238911
239037
  init_helpers();
238912
239038
  init_strings();
238913
- init_system();
239039
+
239040
+ // src/utils/preReleaseCommand.ts
239041
+ init_import_meta_url();
239042
+ var import_path30 = require("path");
239043
+ var shellQuote = __toESM(require_shell_quote());
239044
+ init_config2();
239045
+ init_logger2();
239046
+ init_errors2();
238914
239047
 
238915
239048
  // src/utils/releaseCommandEnv.ts
238916
239049
  init_import_meta_url();
@@ -238936,9 +239069,8 @@ function buildReleaseCommandEnv(extras = {}) {
238936
239069
  return { ...env3, ...extras };
238937
239070
  }
238938
239071
 
238939
- // src/commands/prepare.ts
238940
- init_tracing2();
238941
- init_version8();
239072
+ // src/utils/preReleaseCommand.ts
239073
+ init_system();
238942
239074
 
238943
239075
  // src/utils/versionBump.ts
238944
239076
  init_import_meta_url();
@@ -239016,6 +239148,65 @@ async function runAutomaticVersionBumps(targets, rootDir, newVersion) {
239016
239148
  return { anyBumped, bumpableTargets, skippedTargets };
239017
239149
  }
239018
239150
 
239151
+ // src/utils/preReleaseCommand.ts
239152
+ var DEFAULT_BUMP_VERSION_PATH = (0, import_path30.join)("scripts", "bump-version.sh");
239153
+ var AUTO_BUMP_MIN_VERSION = "2.21.0";
239154
+ async function runPreReleaseCommand(options) {
239155
+ const { oldVersion, newVersion, preReleaseCommand, targets, rootDir } = options;
239156
+ if (preReleaseCommand !== void 0 && preReleaseCommand.length === 0) {
239157
+ logger.warn("Not running the pre-release command: no command specified");
239158
+ return false;
239159
+ }
239160
+ if (preReleaseCommand) {
239161
+ return runCustomPreReleaseCommand(
239162
+ oldVersion,
239163
+ newVersion,
239164
+ preReleaseCommand
239165
+ );
239166
+ }
239167
+ if (requiresMinVersion(AUTO_BUMP_MIN_VERSION) && targets && targets.length > 0) {
239168
+ logger.info("Running automatic version bumping from targets...");
239169
+ const result = await runAutomaticVersionBumps(targets, rootDir, newVersion);
239170
+ if (!result.anyBumped) {
239171
+ if (result.bumpableTargets.length === 0) {
239172
+ logger.warn(
239173
+ "None of your configured targets support automatic version bumping. Consider adding a preReleaseCommand to bump versions manually."
239174
+ );
239175
+ } else {
239176
+ throw new ConfigurationError(
239177
+ `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.`
239178
+ );
239179
+ }
239180
+ }
239181
+ return result.anyBumped;
239182
+ }
239183
+ return runCustomPreReleaseCommand(oldVersion, newVersion, void 0);
239184
+ }
239185
+ async function runCustomPreReleaseCommand(oldVersion, newVersion, preReleaseCommand) {
239186
+ let sysCommand;
239187
+ let args;
239188
+ const nonEmptyOldVersion = oldVersion || "0.0.0";
239189
+ if (preReleaseCommand) {
239190
+ [sysCommand, ...args] = shellQuote.parse(preReleaseCommand);
239191
+ } else {
239192
+ sysCommand = "/bin/bash";
239193
+ args = [DEFAULT_BUMP_VERSION_PATH];
239194
+ }
239195
+ args = [...args, nonEmptyOldVersion, newVersion];
239196
+ logger.info("Running the pre-release command...");
239197
+ await spawnProcess(sysCommand, args, {
239198
+ env: buildReleaseCommandEnv({
239199
+ CRAFT_NEW_VERSION: newVersion,
239200
+ CRAFT_OLD_VERSION: nonEmptyOldVersion
239201
+ })
239202
+ });
239203
+ return true;
239204
+ }
239205
+
239206
+ // src/commands/prepare.ts
239207
+ init_tracing2();
239208
+ init_version8();
239209
+
239019
239210
  // src/commands/publish.ts
239020
239211
  var publish_exports = {};
239021
239212
  __export(publish_exports, {
@@ -239036,11 +239227,13 @@ init_import_meta_url();
239036
239227
  var import_chalk = __toESM(require_source());
239037
239228
  var import_fs31 = require("fs");
239038
239229
  init_dryRun();
239039
- var import_path31 = require("path");
239040
- var shellQuote = __toESM(require_shell_quote());
239230
+ var import_path32 = require("path");
239231
+ var semver3 = __toESM(require_semver2());
239232
+ var shellQuote2 = __toESM(require_shell_quote());
239041
239233
  var import_string_length = __toESM(require_string_length());
239042
239234
  init_config2();
239043
239235
  init_logger2();
239236
+ init_project_config();
239044
239237
  init_targets();
239045
239238
  init_base5();
239046
239239
  init_errors2();
@@ -239058,14 +239251,14 @@ init_tracing2();
239058
239251
  init_import_meta_url();
239059
239252
  var import_crypto7 = require("crypto");
239060
239253
  var import_os4 = require("os");
239061
- var import_path30 = require("path");
239254
+ var import_path31 = require("path");
239062
239255
  var STATE_DIR_NAME = "craft";
239063
239256
  function getCraftStateDir() {
239064
239257
  const xdgStateHome = process.env.XDG_STATE_HOME;
239065
239258
  if (xdgStateHome && xdgStateHome.length > 0) {
239066
- return (0, import_path30.join)(xdgStateHome, STATE_DIR_NAME);
239259
+ return (0, import_path31.join)(xdgStateHome, STATE_DIR_NAME);
239067
239260
  }
239068
- return (0, import_path30.join)((0, import_os4.homedir)(), ".local", "state", STATE_DIR_NAME);
239261
+ return (0, import_path31.join)((0, import_os4.homedir)(), ".local", "state", STATE_DIR_NAME);
239069
239262
  }
239070
239263
  function sanitiseForFilename(raw) {
239071
239264
  return raw.toLowerCase().replace(/[^a-z0-9._-]+/g, "_").replace(/^_+|_+$/g, "");
@@ -239089,14 +239282,14 @@ function getPublishStateFilename(version2, githubConfig, cwd = process.cwd(), wo
239089
239282
  return `publish-state-${cwdDigest}-${workspacePrefix}${safeVersion}.json`;
239090
239283
  }
239091
239284
  function getPublishStatePath(version2, githubConfig, cwd = process.cwd(), workspace) {
239092
- return (0, import_path30.join)(
239285
+ return (0, import_path31.join)(
239093
239286
  getCraftStateDir(),
239094
239287
  getPublishStateFilename(version2, githubConfig, cwd, workspace)
239095
239288
  );
239096
239289
  }
239097
239290
 
239098
239291
  // src/commands/publish.ts
239099
- var DEFAULT_POST_RELEASE_SCRIPT_PATH = (0, import_path31.join)("scripts", "post-release.sh");
239292
+ var DEFAULT_POST_RELEASE_SCRIPT_PATH = (0, import_path32.join)("scripts", "post-release.sh");
239100
239293
  var command2 = ["publish NEW-VERSION"];
239101
239294
  var aliases = ["pp", "publish"];
239102
239295
  var description = "\u{1F6EB} Publish artifacts";
@@ -239353,17 +239546,7 @@ async function handleReleaseBranch(git, remoteName, branch, releaseRevision, mer
239353
239546
  }
239354
239547
  logger.debug(`Checking out merge target branch:`, mergeTarget);
239355
239548
  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
- }
239549
+ await pullWithRebase(git, remoteName, mergeTarget);
239367
239550
  logger.debug(`Merging ${mergeSource} into: ${mergeTarget}`);
239368
239551
  try {
239369
239552
  await git.merge(["--no-ff", "--no-edit", mergeSource]);
@@ -239449,6 +239632,72 @@ async function handleReleaseBranch(git, remoteName, branch, releaseRevision, mer
239449
239632
  }
239450
239633
  }
239451
239634
  }
239635
+ async function pullWithRebase(git, remoteName, branch) {
239636
+ logger.debug(`Pulling latest changes from ${remoteName}/${branch}`);
239637
+ try {
239638
+ await git.pull(remoteName, branch, ["--rebase"]);
239639
+ } catch (pullError) {
239640
+ try {
239641
+ await git.raw(["rebase", "--abort"]);
239642
+ } catch {
239643
+ logger.trace("git rebase --abort failed (may be no rebase in progress)");
239644
+ }
239645
+ throw pullError;
239646
+ }
239647
+ }
239648
+ var DEFAULT_DEVELOPMENT_VERSION_TEMPLATE = "{{version}}-dev.0";
239649
+ async function runPostReleaseBump(git, remoteName, mergeTarget, releasedVersion, bumpConfig, config) {
239650
+ if (semver3.prerelease(releasedVersion)) {
239651
+ logger.info(
239652
+ `Not bumping the development version after pre-release ${releasedVersion}.`
239653
+ );
239654
+ return;
239655
+ }
239656
+ const bump = bumpConfig.bump ?? (config.versioning?.policy === "calver" /* CalVer */ ? "calver" : "minor");
239657
+ const nextVersion = bump === "calver" ? getNextCalVerPeriod(
239658
+ releasedVersion,
239659
+ config.versioning?.calver?.format ?? DEFAULT_CALVER_CONFIG.format
239660
+ ) : semver3.inc(releasedVersion, bump);
239661
+ if (!nextVersion) {
239662
+ throw new Error(
239663
+ `Cannot derive the next ${bump} version from "${releasedVersion}".`
239664
+ );
239665
+ }
239666
+ const devVersion = (bumpConfig.version ?? DEFAULT_DEVELOPMENT_VERSION_TEMPLATE).replaceAll("{{version}}", nextVersion);
239667
+ if (isDryRun()) {
239668
+ logger.info(
239669
+ `[dry-run] Would bump the development version to ${devVersion} and push it to ${remoteName}/${mergeTarget}.`
239670
+ );
239671
+ return;
239672
+ }
239673
+ logger.info(`Bumping the development version to ${devVersion}...`);
239674
+ const bumped = await runPreReleaseCommand({
239675
+ oldVersion: releasedVersion,
239676
+ newVersion: devVersion,
239677
+ preReleaseCommand: config.preReleaseCommand,
239678
+ targets: config.targets,
239679
+ rootDir: getReleaseUnitDir()
239680
+ });
239681
+ if (!bumped) {
239682
+ logger.warn(
239683
+ "Not bumping the development version: nothing wrote a version."
239684
+ );
239685
+ return;
239686
+ }
239687
+ const repoStatus = await git.status();
239688
+ if (repoStatus.files.length === 0) {
239689
+ logger.info(`The development version is already ${devVersion}.`);
239690
+ return;
239691
+ }
239692
+ await git.commit("meta: Bump new development version\n\n#skip-changelog", [
239693
+ "--all"
239694
+ ]);
239695
+ await pullWithRebase(git, remoteName, mergeTarget);
239696
+ await git.push(remoteName, mergeTarget);
239697
+ logger.info(
239698
+ `Pushed development version ${devVersion} to ${remoteName}/${mergeTarget}.`
239699
+ );
239700
+ }
239452
239701
  async function runPostReleaseCommand(newVersion, postReleaseCommand) {
239453
239702
  let sysCommand;
239454
239703
  let args;
@@ -239456,7 +239705,7 @@ async function runPostReleaseCommand(newVersion, postReleaseCommand) {
239456
239705
  logger.debug("Not running the post-release command: no command specified");
239457
239706
  return false;
239458
239707
  } else if (postReleaseCommand) {
239459
- [sysCommand, ...args] = shellQuote.parse(postReleaseCommand);
239708
+ [sysCommand, ...args] = shellQuote2.parse(postReleaseCommand);
239460
239709
  } else if (hasExecutable(DEFAULT_POST_RELEASE_SCRIPT_PATH)) {
239461
239710
  sysCommand = "/bin/bash";
239462
239711
  args = [DEFAULT_POST_RELEASE_SCRIPT_PATH];
@@ -239604,7 +239853,7 @@ Original error: ${err instanceof Error ? err.message : String(err)}`;
239604
239853
  await promptConfirmation();
239605
239854
  await withTempDir(async (downloadDirectory) => {
239606
239855
  artifactProvider.setDownloadDirectory(downloadDirectory);
239607
- (0, import_fs31.mkdirSync)((0, import_path31.dirname)(publishStateFile), { recursive: true });
239856
+ (0, import_fs31.mkdirSync)((0, import_path32.dirname)(publishStateFile), { recursive: true });
239608
239857
  for (const target of targetList) {
239609
239858
  await publishToTarget(target, newVersion, revision);
239610
239859
  publishState.published[BaseTarget.getId(target.config)] = true;
@@ -239626,22 +239875,29 @@ Original error: ${err instanceof Error ? err.message : String(err)}`;
239626
239875
  `The --merge-target option will be ignored because noMerge is enabled via ${noMergeConfig.source === "auto-detected" ? "auto-detection (compiled GitHub Action)" : "config"}.`
239627
239876
  );
239628
239877
  }
239878
+ let mergedInto;
239629
239879
  if (noMerge) {
239630
239880
  const source = argv.noMerge ? "CLI option" : noMergeConfig.source === "auto-detected" ? "auto-detection (compiled GitHub Action with dist/ folder)" : "config";
239631
239881
  logger.info(`Not merging the release branch (${source}).`);
239632
239882
  } else if (targetsToPublish.has("all" /* All */) || targetsToPublish.has("none" /* None */) || earlierStateExists) {
239883
+ let mergeTarget = argv.mergeTarget;
239633
239884
  try {
239885
+ mergeTarget ||= await getDefaultBranch(git, argv.remote);
239634
239886
  await handleReleaseBranch(
239635
239887
  git,
239636
239888
  argv.remote,
239637
239889
  branchName,
239638
239890
  revision,
239639
- argv.mergeTarget,
239891
+ mergeTarget,
239640
239892
  argv.keepBranch,
239641
239893
  rev ? revision : branchName
239642
239894
  );
239895
+ mergedInto = mergeTarget;
239643
239896
  } catch (mergeError) {
239644
239897
  captureException(mergeError);
239898
+ if (mergeError instanceof BranchCleanupError) {
239899
+ mergedInto = mergeTarget;
239900
+ }
239645
239901
  const lines = [];
239646
239902
  if (mergeError instanceof BranchCleanupError) {
239647
239903
  lines.push(
@@ -239731,6 +239987,34 @@ Original error: ${err instanceof Error ? err.message : String(err)}`;
239731
239987
  ];
239732
239988
  logger.warn(msg.join("\n"));
239733
239989
  }
239990
+ if (config.postReleaseBump) {
239991
+ if (mergedInto) {
239992
+ try {
239993
+ await runPostReleaseBump(
239994
+ git,
239995
+ argv.remote,
239996
+ mergedInto,
239997
+ newVersion,
239998
+ config.postReleaseBump,
239999
+ config
240000
+ );
240001
+ } catch (bumpError) {
240002
+ captureException(bumpError);
240003
+ logger.warn(
240004
+ [
240005
+ `Failed to bump the development version after ${newVersion}.`,
240006
+ `All publish targets completed successfully \u2014 bump the version on ${mergedInto} manually.`,
240007
+ ``,
240008
+ `Error: ${bumpError instanceof Error ? bumpError.message : String(bumpError)}`
240009
+ ].join("\n")
240010
+ );
240011
+ }
240012
+ } else {
240013
+ logger.info(
240014
+ "Not bumping the development version: the release branch was not merged."
240015
+ );
240016
+ }
240017
+ }
239734
240018
  await runPostReleaseCommand(newVersion, config.postReleaseCommand);
239735
240019
  }
239736
240020
  var handler2 = async (args) => {
@@ -239775,9 +240059,7 @@ async function handler3() {
239775
240059
  var command4 = ["prepare [NEW-VERSION]"];
239776
240060
  var aliases2 = ["p", "prerelease", "prepublish", "prepare", "release"];
239777
240061
  var description3 = "\u{1F6A2} Prepare a new release branch";
239778
- var DEFAULT_BUMP_VERSION_PATH = (0, import_path32.join)("scripts", "bump-version.sh");
239779
240062
  var AUTO_VERSION_MIN_VERSION2 = "2.14.0";
239780
- var AUTO_BUMP_MIN_VERSION = "2.21.0";
239781
240063
  var builder2 = (yargs) => yargs.positional("NEW-VERSION", {
239782
240064
  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
240065
  type: "string"
@@ -239911,57 +240193,6 @@ async function commitChanges(git, newVersion, preReleaseCommandRan) {
239911
240193
  logger.trace(`Commit message: "${message}"`);
239912
240194
  await git.commit(message);
239913
240195
  }
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
240196
  function checkGitStatus(repoStatus, rev) {
239966
240197
  logger.info("Checking the local repository status...");
239967
240198
  logger.debug("Repository status:", formatJson(repoStatus));
@@ -240022,7 +240253,7 @@ async function prepareChangelog(git, oldVersion, newVersion, changelogPolicy = "
240022
240253
  }
240023
240254
  logger.info("Checking the changelog...");
240024
240255
  logger.debug(`Changelog policy: "${changelogPolicy}".`);
240025
- const relativePath = (0, import_path32.relative)("", changelogPath);
240256
+ const relativePath = (0, import_path33.relative)("", changelogPath);
240026
240257
  logger.debug(`Changelog path: ${relativePath}`);
240027
240258
  if (relativePath.startsWith(".")) {
240028
240259
  throw new ConfigurationError(`Invalid changelog path: "${changelogPath}"`);
@@ -240227,7 +240458,7 @@ async function prepareMain(argv) {
240227
240458
  changelogPath
240228
240459
  );
240229
240460
  if (changelogBody) {
240230
- const resolvedChangelogPath = (0, import_path32.relative)("", changelogPath);
240461
+ const resolvedChangelogPath = (0, import_path33.relative)("", changelogPath);
240231
240462
  await git.add(resolvedChangelogPath);
240232
240463
  }
240233
240464
  const preReleaseCommandRan = await runPreReleaseCommand({
@@ -240341,7 +240572,7 @@ init_import_meta_url();
240341
240572
  init_logger2();
240342
240573
  init_config2();
240343
240574
  init_errors2();
240344
- var import_path33 = require("path");
240575
+ var import_path34 = require("path");
240345
240576
  var import_fs33 = require("fs");
240346
240577
  init_none();
240347
240578
  var mkdirp = require_mkdirp2();
@@ -240364,7 +240595,7 @@ var builder3 = (yargs) => yargs.positional("NAME", {
240364
240595
  });
240365
240596
  async function prepareOutputDirectory(argv) {
240366
240597
  if (argv.directory) {
240367
- const fullPath = (0, import_path33.resolve)(argv.directory);
240598
+ const fullPath = (0, import_path34.resolve)(argv.directory);
240368
240599
  if ((0, import_fs33.existsSync)(fullPath)) {
240369
240600
  if ((0, import_fs33.lstatSync)(fullPath).isDirectory()) {
240370
240601
  return fullPath;
@@ -240377,7 +240608,7 @@ async function prepareOutputDirectory(argv) {
240377
240608
  return fullPath;
240378
240609
  }
240379
240610
  } else {
240380
- return (0, import_path33.resolve)(process.cwd());
240611
+ return (0, import_path34.resolve)(process.cwd());
240381
240612
  }
240382
240613
  }
240383
240614
  async function handlerMain(argv) {