vercel 33.1.0 → 33.2.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (2) hide show
  1. package/dist/index.js +223 -204
  2. package/package.json +8 -8
package/dist/index.js CHANGED
@@ -140,12 +140,12 @@ var require_polyfills = __commonJS2({
140
140
  "../../node_modules/.pnpm/graceful-fs@4.2.11/node_modules/graceful-fs/polyfills.js"(exports2, module2) {
141
141
  var constants = require("constants");
142
142
  var origCwd = process.cwd;
143
- var cwd = null;
143
+ var cwd2 = null;
144
144
  var platform2 = process.env.GRACEFUL_FS_PLATFORM || process.platform;
145
145
  process.cwd = function() {
146
- if (!cwd)
147
- cwd = origCwd.call(process);
148
- return cwd;
146
+ if (!cwd2)
147
+ cwd2 = origCwd.call(process);
148
+ return cwd2;
149
149
  };
150
150
  try {
151
151
  process.cwd();
@@ -154,7 +154,7 @@ var require_polyfills = __commonJS2({
154
154
  if (typeof process.chdir === "function") {
155
155
  chdir = process.chdir;
156
156
  process.chdir = function(d) {
157
- cwd = null;
157
+ cwd2 = null;
158
158
  chdir.call(process, d);
159
159
  };
160
160
  if (Object.setPrototypeOf)
@@ -12008,7 +12008,7 @@ var require_ansi_escapes = __commonJS2({
12008
12008
  return ret + ":" + buffer.toString("base64") + BEL;
12009
12009
  };
12010
12010
  ansiEscapes4.iTerm = {
12011
- setCwd: (cwd = process.cwd()) => `${OSC}50;CurrentDir=${cwd}${BEL}`,
12011
+ setCwd: (cwd2 = process.cwd()) => `${OSC}50;CurrentDir=${cwd2}${BEL}`,
12012
12012
  annotation: (message2, options = {}) => {
12013
12013
  let ret = `${OSC}1337;`;
12014
12014
  const hasX = typeof options.x !== "undefined";
@@ -52621,8 +52621,8 @@ var GA_TRACKING_ID, SENTRY_DSN;
52621
52621
  var init_constants = __esm({
52622
52622
  "src/util/constants.ts"() {
52623
52623
  "use strict";
52624
- GA_TRACKING_ID = "UA-117491914-3";
52625
- SENTRY_DSN = "https://26a24e59ba954011919a524b341b6ab5@sentry.io/1323225";
52624
+ GA_TRACKING_ID = void 0;
52625
+ SENTRY_DSN = void 0;
52626
52626
  }
52627
52627
  });
52628
52628
 
@@ -52631,12 +52631,12 @@ var require_polyfills2 = __commonJS2({
52631
52631
  "../../node_modules/.pnpm/graceful-fs@4.2.10/node_modules/graceful-fs/polyfills.js"(exports2, module2) {
52632
52632
  var constants = require("constants");
52633
52633
  var origCwd = process.cwd;
52634
- var cwd = null;
52634
+ var cwd2 = null;
52635
52635
  var platform2 = process.env.GRACEFUL_FS_PLATFORM || process.platform;
52636
52636
  process.cwd = function() {
52637
- if (!cwd)
52638
- cwd = origCwd.call(process);
52639
- return cwd;
52637
+ if (!cwd2)
52638
+ cwd2 = origCwd.call(process);
52639
+ return cwd2;
52640
52640
  };
52641
52641
  try {
52642
52642
  process.cwd();
@@ -52645,7 +52645,7 @@ var require_polyfills2 = __commonJS2({
52645
52645
  if (typeof process.chdir === "function") {
52646
52646
  chdir = process.chdir;
52647
52647
  process.chdir = function(d) {
52648
- cwd = null;
52648
+ cwd2 = null;
52649
52649
  chdir.call(process, d);
52650
52650
  };
52651
52651
  if (Object.setPrototypeOf)
@@ -62513,7 +62513,7 @@ var require_package = __commonJS2({
62513
62513
  "../client/package.json"(exports2, module2) {
62514
62514
  module2.exports = {
62515
62515
  name: "@vercel/client",
62516
- version: "13.0.13",
62516
+ version: "13.0.14",
62517
62517
  main: "dist/index.js",
62518
62518
  typings: "dist/index.d.ts",
62519
62519
  homepage: "https://vercel.com",
@@ -62550,7 +62550,7 @@ var require_package = __commonJS2({
62550
62550
  typescript: "4.9.5"
62551
62551
  },
62552
62552
  dependencies: {
62553
- "@vercel/build-utils": "7.5.0",
62553
+ "@vercel/build-utils": "7.5.1",
62554
62554
  "@vercel/routing-utils": "3.1.0",
62555
62555
  "@zeit/fetch": "5.2.0",
62556
62556
  "async-retry": "1.2.3",
@@ -63600,7 +63600,7 @@ var require_utils8 = __commonJS2({
63600
63600
  }
63601
63601
  return { fileList, ignoreList };
63602
63602
  }
63603
- async function getVercelIgnore4(cwd, prebuilt) {
63603
+ async function getVercelIgnore4(cwd2, prebuilt) {
63604
63604
  const ig = (0, import_ignore.default)();
63605
63605
  let ignores;
63606
63606
  if (prebuilt) {
@@ -63640,12 +63640,12 @@ var require_utils8 = __commonJS2({
63640
63640
  "venv",
63641
63641
  "CVS"
63642
63642
  ];
63643
- const cwds = Array.isArray(cwd) ? cwd : [cwd];
63643
+ const cwds = Array.isArray(cwd2) ? cwd2 : [cwd2];
63644
63644
  const files = await Promise.all(
63645
- cwds.map(async (cwd2) => {
63645
+ cwds.map(async (cwd22) => {
63646
63646
  const [vercelignore, nowignore] = await Promise.all([
63647
- maybeRead((0, import_path44.join)(cwd2, ".vercelignore"), ""),
63648
- maybeRead((0, import_path44.join)(cwd2, ".nowignore"), "")
63647
+ maybeRead((0, import_path44.join)(cwd22, ".vercelignore"), ""),
63648
+ maybeRead((0, import_path44.join)(cwd22, ".nowignore"), "")
63649
63649
  ]);
63650
63650
  if (vercelignore && nowignore) {
63651
63651
  throw new import_build_utils19.NowBuildError({
@@ -68228,13 +68228,13 @@ var require_tar_fs = __commonJS2({
68228
68228
  var normalize4 = !win32 ? echo : function(name) {
68229
68229
  return name.replace(/\\/g, "/").replace(/[:?<>|]/g, "_");
68230
68230
  };
68231
- var statAll = function(fs16, stat2, cwd, ignore, entries, sort) {
68231
+ var statAll = function(fs16, stat2, cwd2, ignore, entries, sort) {
68232
68232
  var queue = entries || ["."];
68233
68233
  return function loop(callback) {
68234
68234
  if (!queue.length)
68235
68235
  return callback();
68236
68236
  var next = queue.shift();
68237
- var nextAbs = path11.join(cwd, next);
68237
+ var nextAbs = path11.join(cwd2, next);
68238
68238
  stat2(nextAbs, function(err, stat3) {
68239
68239
  if (err)
68240
68240
  return callback(err);
@@ -68246,7 +68246,7 @@ var require_tar_fs = __commonJS2({
68246
68246
  if (sort)
68247
68247
  files.sort();
68248
68248
  for (var i = 0; i < files.length; i++) {
68249
- if (!ignore(path11.join(cwd, next, files[i])))
68249
+ if (!ignore(path11.join(cwd2, next, files[i])))
68250
68250
  queue.push(path11.join(next, files[i]));
68251
68251
  }
68252
68252
  callback(null, next, stat3);
@@ -68264,16 +68264,16 @@ var require_tar_fs = __commonJS2({
68264
68264
  return map(header);
68265
68265
  };
68266
68266
  };
68267
- exports2.pack = function(cwd, opts) {
68268
- if (!cwd)
68269
- cwd = ".";
68267
+ exports2.pack = function(cwd2, opts) {
68268
+ if (!cwd2)
68269
+ cwd2 = ".";
68270
68270
  if (!opts)
68271
68271
  opts = {};
68272
68272
  var xfs = opts.fs || fs15;
68273
68273
  var ignore = opts.ignore || opts.filter || noop;
68274
68274
  var map = opts.map || noop;
68275
68275
  var mapStream = opts.mapStream || echo;
68276
- var statNext = statAll(xfs, opts.dereference ? xfs.stat : xfs.lstat, cwd, ignore, opts.entries, opts.sort);
68276
+ var statNext = statAll(xfs, opts.dereference ? xfs.stat : xfs.lstat, cwd2, ignore, opts.entries, opts.sort);
68277
68277
  var strict = opts.strict !== false;
68278
68278
  var umask = typeof opts.umask === "number" ? ~opts.umask : ~processUmask();
68279
68279
  var dmode = typeof opts.dmode === "number" ? opts.dmode : 0;
@@ -68291,7 +68291,7 @@ var require_tar_fs = __commonJS2({
68291
68291
  fmode |= parseInt(222, 8);
68292
68292
  }
68293
68293
  var onsymlink = function(filename, header) {
68294
- xfs.readlink(path11.join(cwd, filename), function(err, linkname) {
68294
+ xfs.readlink(path11.join(cwd2, filename), function(err, linkname) {
68295
68295
  if (err)
68296
68296
  return pack.destroy(err);
68297
68297
  header.linkname = normalize4(linkname);
@@ -68338,7 +68338,7 @@ var require_tar_fs = __commonJS2({
68338
68338
  var entry = pack.entry(header, onnextentry);
68339
68339
  if (!entry)
68340
68340
  return;
68341
- var rs = mapStream(xfs.createReadStream(path11.join(cwd, filename)), header);
68341
+ var rs = mapStream(xfs.createReadStream(path11.join(cwd2, filename)), header);
68342
68342
  rs.on("error", function(err2) {
68343
68343
  entry.destroy(err2);
68344
68344
  });
@@ -68361,9 +68361,9 @@ var require_tar_fs = __commonJS2({
68361
68361
  var processUmask = function() {
68362
68362
  return process.umask ? process.umask() : 0;
68363
68363
  };
68364
- exports2.extract = function(cwd, opts) {
68365
- if (!cwd)
68366
- cwd = ".";
68364
+ exports2.extract = function(cwd2, opts) {
68365
+ if (!cwd2)
68366
+ cwd2 = ".";
68367
68367
  if (!opts)
68368
68368
  opts = {};
68369
68369
  var xfs = opts.fs || fs15;
@@ -68429,7 +68429,7 @@ var require_tar_fs = __commonJS2({
68429
68429
  extract.on("entry", function(header, stream, next) {
68430
68430
  header = map(header) || header;
68431
68431
  header.name = normalize4(header.name);
68432
- var name = path11.join(cwd, path11.join("/", header.name));
68432
+ var name = path11.join(cwd2, path11.join("/", header.name));
68433
68433
  if (ignore(name, header)) {
68434
68434
  stream.resume();
68435
68435
  return next();
@@ -68456,7 +68456,7 @@ var require_tar_fs = __commonJS2({
68456
68456
  if (win32)
68457
68457
  return next();
68458
68458
  xfs.unlink(name, function() {
68459
- var srcpath = path11.join(cwd, path11.join("/", header.linkname));
68459
+ var srcpath = path11.join(cwd2, path11.join("/", header.linkname));
68460
68460
  xfs.link(srcpath, name, function(err) {
68461
68461
  if (err && err.code === "EPERM" && opts.hardlinkAsFilesFallback) {
68462
68462
  stream = xfs.createReadStream(srcpath);
@@ -68488,7 +68488,7 @@ var require_tar_fs = __commonJS2({
68488
68488
  }, stat2);
68489
68489
  }
68490
68490
  var dir = path11.dirname(name);
68491
- validate2(xfs, dir, path11.join(cwd, "."), function(err, valid) {
68491
+ validate2(xfs, dir, path11.join(cwd2, "."), function(err, valid) {
68492
68492
  if (err)
68493
68493
  return next(err);
68494
68494
  if (!valid)
@@ -129966,7 +129966,7 @@ var require_resolveCommand = __commonJS2({
129966
129966
  var getPathKey = require_path_key();
129967
129967
  function resolveCommandAttempt(parsed, withoutPathExt) {
129968
129968
  const env = parsed.options.env || process.env;
129969
- const cwd = process.cwd();
129969
+ const cwd2 = process.cwd();
129970
129970
  const hasCustomCwd = parsed.options.cwd != null;
129971
129971
  const shouldSwitchCwd = hasCustomCwd && process.chdir !== void 0 && !process.chdir.disabled;
129972
129972
  if (shouldSwitchCwd) {
@@ -129984,7 +129984,7 @@ var require_resolveCommand = __commonJS2({
129984
129984
  } catch (e2) {
129985
129985
  } finally {
129986
129986
  if (shouldSwitchCwd) {
129987
- process.chdir(cwd);
129987
+ process.chdir(cwd2);
129988
129988
  }
129989
129989
  }
129990
129990
  if (resolved) {
@@ -148137,10 +148137,10 @@ var require_detect_framework = __commonJS2({
148137
148137
  firstMatchPackage.matchPackage
148138
148138
  );
148139
148139
  }
148140
- function lookupInstalledVersion(cwd, packageName2) {
148140
+ function lookupInstalledVersion(cwd2, packageName2) {
148141
148141
  try {
148142
148142
  const script = `require('${packageName2}/package.json').version`;
148143
- return (0, import_child_process4.spawnSync)(cwd, ["-p", script], {
148143
+ return (0, import_child_process4.spawnSync)(cwd2, ["-p", script], {
148144
148144
  encoding: "utf-8"
148145
148145
  }).stdout.trim();
148146
148146
  } catch (error4) {
@@ -148579,7 +148579,7 @@ var require_get_workspaces = __commonJS2({
148579
148579
  async function getWorkspaces3({
148580
148580
  fs: fs15,
148581
148581
  depth = MAX_DEPTH_TRAVERSE,
148582
- cwd = "/"
148582
+ cwd: cwd2 = "/"
148583
148583
  }) {
148584
148584
  if (depth === 0)
148585
148585
  return [];
@@ -148597,7 +148597,7 @@ var require_get_workspaces = __commonJS2({
148597
148597
  (childDirectory) => getWorkspaces3({
148598
148598
  fs: fs15.chdir(childDirectory.path),
148599
148599
  depth: depth - 1,
148600
- cwd: posixPath.join(cwd, childDirectory.path)
148600
+ cwd: posixPath.join(cwd2, childDirectory.path)
148601
148601
  })
148602
148602
  )
148603
148603
  )).flat();
@@ -148605,7 +148605,7 @@ var require_get_workspaces = __commonJS2({
148605
148605
  return [
148606
148606
  {
148607
148607
  type: workspaceType,
148608
- rootPath: cwd
148608
+ rootPath: cwd2
148609
148609
  }
148610
148610
  ];
148611
148611
  }
@@ -152381,12 +152381,12 @@ var require_common4 = __commonJS2({
152381
152381
  self2.symlinks = options.symlinks || /* @__PURE__ */ Object.create(null);
152382
152382
  setupIgnores(self2, options);
152383
152383
  self2.changedCwd = false;
152384
- var cwd = process.cwd();
152384
+ var cwd2 = process.cwd();
152385
152385
  if (!ownProp(options, "cwd"))
152386
- self2.cwd = path11.resolve(cwd);
152386
+ self2.cwd = path11.resolve(cwd2);
152387
152387
  else {
152388
152388
  self2.cwd = path11.resolve(options.cwd);
152389
- self2.changedCwd = self2.cwd !== cwd;
152389
+ self2.changedCwd = self2.cwd !== cwd2;
152390
152390
  }
152391
152391
  self2.root = options.root || path11.resolve(self2.cwd, "/");
152392
152392
  self2.root = path11.resolve(self2.root);
@@ -163679,8 +163679,8 @@ var init_create_project = __esm({
163679
163679
  });
163680
163680
 
163681
163681
  // src/util/projects/detect-projects.ts
163682
- async function detectProjects(cwd) {
163683
- const fs15 = new import_fs_detectors.LocalFileSystemDetector(cwd);
163682
+ async function detectProjects(cwd2) {
163683
+ const fs15 = new import_fs_detectors.LocalFileSystemDetector(cwd2);
163684
163684
  const workspaces = await (0, import_fs_detectors.getWorkspaces)({ fs: fs15 });
163685
163685
  const detectedProjects = /* @__PURE__ */ new Map();
163686
163686
  const packagePaths = (await Promise.all(
@@ -163833,8 +163833,8 @@ var init_connect_git_provider = __esm({
163833
163833
  });
163834
163834
 
163835
163835
  // src/util/link/repo.ts
163836
- async function getRepoLink(client2, cwd) {
163837
- const rootPath = await findRepoRoot(client2, cwd);
163836
+ async function getRepoLink(client2, cwd2) {
163837
+ const rootPath = await findRepoRoot(client2, cwd2);
163838
163838
  if (!rootPath)
163839
163839
  return void 0;
163840
163840
  const repoConfigPath = (0, import_path14.join)(rootPath, VERCEL_DIR2, VERCEL_DIR_REPO);
@@ -163846,9 +163846,9 @@ async function getRepoLink(client2, cwd) {
163846
163846
  );
163847
163847
  return { rootPath, repoConfig, repoConfigPath };
163848
163848
  }
163849
- async function ensureRepoLink(client2, cwd, { yes, overwrite }) {
163849
+ async function ensureRepoLink(client2, cwd2, { yes, overwrite }) {
163850
163850
  const { output: output2 } = client2;
163851
- const repoLink = await getRepoLink(client2, cwd);
163851
+ const repoLink = await getRepoLink(client2, cwd2);
163852
163852
  if (repoLink) {
163853
163853
  output2.debug(`Found Git repository root directory: ${repoLink.rootPath}`);
163854
163854
  } else {
@@ -164153,8 +164153,8 @@ var init_repo = __esm({
164153
164153
  });
164154
164154
 
164155
164155
  // src/util/projects/link.ts
164156
- function getVercelDirectory(cwd) {
164157
- const possibleDirs = [(0, import_path15.join)(cwd, VERCEL_DIR2), (0, import_path15.join)(cwd, VERCEL_DIR_FALLBACK)];
164156
+ function getVercelDirectory(cwd2) {
164157
+ const possibleDirs = [(0, import_path15.join)(cwd2, VERCEL_DIR2), (0, import_path15.join)(cwd2, VERCEL_DIR_FALLBACK)];
164158
164158
  const existingDirs = possibleDirs.filter((d) => isDirectory(d));
164159
164159
  if (existingDirs.length > 1) {
164160
164160
  throw new import_build_utils6.NowBuildError({
@@ -164397,7 +164397,7 @@ var init_link2 = __esm({
164397
164397
  });
164398
164398
 
164399
164399
  // src/util/projects/project-settings.ts
164400
- async function writeProjectSettings(cwd, project, org, isRepoLinked) {
164400
+ async function writeProjectSettings(cwd2, project, org, isRepoLinked) {
164401
164401
  let analyticsId;
164402
164402
  if (project.analytics?.id && (!project.analytics.disabledAt || project.analytics.enabledAt && project.analytics.enabledAt > project.analytics.disabledAt)) {
164403
164403
  analyticsId = project.analytics.id;
@@ -164418,7 +164418,7 @@ async function writeProjectSettings(cwd, project, org, isRepoLinked) {
164418
164418
  analyticsId
164419
164419
  }
164420
164420
  };
164421
- const path11 = (0, import_path16.join)(cwd, VERCEL_DIR2, VERCEL_DIR_PROJECT);
164421
+ const path11 = (0, import_path16.join)(cwd2, VERCEL_DIR2, VERCEL_DIR_PROJECT);
164422
164422
  return await (0, import_fs_extra8.outputJSON)(path11, projectLinkAndSettings, {
164423
164423
  spaces: 2
164424
164424
  });
@@ -164628,7 +164628,7 @@ function tryReadHeadSync(path11, length) {
164628
164628
  }
164629
164629
  }
164630
164630
  }
164631
- async function pull(client2, link4, project, environment, opts, args2, output2, cwd, source) {
164631
+ async function pull(client2, link4, project, environment, opts, args2, output2, cwd2, source) {
164632
164632
  if (args2.length > 1) {
164633
164633
  output2.error(
164634
164634
  `Invalid number of arguments. Usage: ${getCommandName(`env pull <file>`)}`
@@ -164636,7 +164636,7 @@ async function pull(client2, link4, project, environment, opts, args2, output2,
164636
164636
  return 1;
164637
164637
  }
164638
164638
  const [filename = ".env.local"] = args2;
164639
- const fullPath = (0, import_path17.resolve)(cwd, filename);
164639
+ const fullPath = (0, import_path17.resolve)(cwd2, filename);
164640
164640
  const skipConfirmation = opts["--yes"];
164641
164641
  const gitBranch = opts["--git-branch"];
164642
164642
  const head = tryReadHeadSync(fullPath, Buffer.byteLength(CONTENTS_PREFIX));
@@ -164680,7 +164680,7 @@ async function pull(client2, link4, project, environment, opts, args2, output2,
164680
164680
  }
164681
164681
  let isGitIgnoreUpdated = false;
164682
164682
  if (filename === ".env.local") {
164683
- const rootPath = link4.repoRoot ?? cwd;
164683
+ const rootPath = link4.repoRoot ?? cwd2;
164684
164684
  isGitIgnoreUpdated = await addToGitIgnore(rootPath, ".env*.local");
164685
164685
  }
164686
164686
  output2.print(
@@ -164852,7 +164852,7 @@ var init_input_project = __esm({
164852
164852
  });
164853
164853
 
164854
164854
  // src/util/validate-paths.ts
164855
- async function validateRootDirectory(output2, cwd, path11, errorSuffix) {
164855
+ async function validateRootDirectory(output2, cwd2, path11, errorSuffix) {
164856
164856
  const pathStat = await (0, import_fs_extra11.lstat)(path11).catch(() => null);
164857
164857
  const suffix = errorSuffix ? ` ${errorSuffix}` : "";
164858
164858
  if (!pathStat) {
@@ -164871,7 +164871,7 @@ async function validateRootDirectory(output2, cwd, path11, errorSuffix) {
164871
164871
  );
164872
164872
  return false;
164873
164873
  }
164874
- if (!path11.startsWith(cwd)) {
164874
+ if (!path11.startsWith(cwd2)) {
164875
164875
  output2.error(
164876
164876
  `The provided path ${import_chalk38.default.cyan(
164877
164877
  `\u201C${humanizePath(path11)}\u201D`
@@ -164927,7 +164927,7 @@ var init_validate_paths = __esm({
164927
164927
  });
164928
164928
 
164929
164929
  // src/util/input/input-root-directory.ts
164930
- async function inputRootDirectory(client2, cwd, autoConfirm = false) {
164930
+ async function inputRootDirectory(client2, cwd2, autoConfirm = false) {
164931
164931
  if (autoConfirm) {
164932
164932
  return null;
164933
164933
  }
@@ -164947,10 +164947,10 @@ async function inputRootDirectory(client2, cwd, autoConfirm = false) {
164947
164947
  if (normal === "." || normal === "./") {
164948
164948
  return null;
164949
164949
  }
164950
- const fullPath = import_path18.default.join(cwd, normal);
164950
+ const fullPath = import_path18.default.join(cwd2, normal);
164951
164951
  if (await validateRootDirectory(
164952
164952
  client2.output,
164953
- cwd,
164953
+ cwd2,
164954
164954
  fullPath,
164955
164955
  "Please choose a different one."
164956
164956
  ) === false) {
@@ -165141,14 +165141,14 @@ var init_generate_cert_for_deploy = __esm({
165141
165141
  });
165142
165142
 
165143
165143
  // src/util/deploy/create-deploy.ts
165144
- async function createDeploy(client2, now, contextName, path11, createArgs, org, isSettingUpProject, cwd, archive) {
165144
+ async function createDeploy(client2, now, contextName, path11, createArgs, org, isSettingUpProject, cwd2, archive) {
165145
165145
  try {
165146
165146
  return await now.create(
165147
165147
  path11,
165148
165148
  createArgs,
165149
165149
  org,
165150
165150
  isSettingUpProject,
165151
- cwd,
165151
+ cwd2,
165152
165152
  archive
165153
165153
  );
165154
165154
  } catch (err) {
@@ -165214,7 +165214,7 @@ async function createDeploy(client2, now, contextName, path11, createArgs, org,
165214
165214
  createArgs,
165215
165215
  org,
165216
165216
  isSettingUpProject,
165217
- cwd
165217
+ cwd2
165218
165218
  );
165219
165219
  }
165220
165220
  if (err.code === "not_found") {
@@ -165270,7 +165270,7 @@ function printInspectUrl(output2, inspectorUrl, deployStamp) {
165270
165270
  }
165271
165271
  async function processDeployment({
165272
165272
  org,
165273
- cwd,
165273
+ cwd: cwd2,
165274
165274
  projectName,
165275
165275
  isSettingUpProject,
165276
165276
  archive,
@@ -165365,7 +165365,7 @@ async function processDeployment({
165365
165365
  const deployment = event.payload;
165366
165366
  await linkFolderToProject(
165367
165367
  client2,
165368
- cwd,
165368
+ cwd2,
165369
165369
  {
165370
165370
  orgId: org.id,
165371
165371
  projectId: deployment.projectId
@@ -165526,7 +165526,7 @@ var init_util = __esm({
165526
165526
  skipAutoDetectionConfirmation,
165527
165527
  noWait,
165528
165528
  autoAssignCustomDomains
165529
- }, org, isSettingUpProject, cwd, archive) {
165529
+ }, org, isSettingUpProject, cwd2, archive) {
165530
165530
  let hashes = {};
165531
165531
  const uploadStamp = stamp_default();
165532
165532
  let requestBody = {
@@ -165561,7 +165561,7 @@ var init_util = __esm({
165561
165561
  isSettingUpProject,
165562
165562
  archive,
165563
165563
  skipAutoDetectionConfirmation,
165564
- cwd,
165564
+ cwd: cwd2,
165565
165565
  prebuilt,
165566
165566
  rootDirectory,
165567
165567
  noWait
@@ -166093,14 +166093,14 @@ var init_setup_and_link = __esm({
166093
166093
  });
166094
166094
 
166095
166095
  // src/util/link/ensure-link.ts
166096
- async function ensureLink(commandName, client2, cwd, opts = {}) {
166096
+ async function ensureLink(commandName, client2, cwd2, opts = {}) {
166097
166097
  let { link: link4 } = opts;
166098
166098
  if (!link4) {
166099
- link4 = await getLinkedProject(client2, cwd);
166099
+ link4 = await getLinkedProject(client2, cwd2);
166100
166100
  opts.link = link4;
166101
166101
  }
166102
166102
  if (link4.status === "linked" && opts.forceDelete || link4.status === "not_linked") {
166103
- link4 = await setupAndLink(client2, cwd, opts);
166103
+ link4 = await setupAndLink(client2, cwd2, opts);
166104
166104
  if (link4.status === "not_linked") {
166105
166105
  return 0;
166106
166106
  }
@@ -166221,7 +166221,7 @@ function parseArgs(client2) {
166221
166221
  }
166222
166222
  return argv2;
166223
166223
  }
166224
- async function pullAllEnvFiles(environment, client2, link4, project, argv2, cwd) {
166224
+ async function pullAllEnvFiles(environment, client2, link4, project, argv2, cwd2) {
166225
166225
  const environmentFile = `.env.${environment}.local`;
166226
166226
  return pull(
166227
166227
  client2,
@@ -166231,7 +166231,7 @@ async function pullAllEnvFiles(environment, client2, link4, project, argv2, cwd)
166231
166231
  argv2,
166232
166232
  [(0, import_path20.join)(".vercel", environmentFile)],
166233
166233
  client2.output,
166234
- cwd,
166234
+ cwd2,
166235
166235
  "vercel-cli:pull"
166236
166236
  );
166237
166237
  }
@@ -166248,16 +166248,16 @@ async function main(client2) {
166248
166248
  if (typeof argv2 === "number") {
166249
166249
  return argv2;
166250
166250
  }
166251
- let cwd = argv2._[1] || client2.cwd;
166251
+ let cwd2 = argv2._[1] || client2.cwd;
166252
166252
  const autoConfirm = Boolean(argv2["--yes"]);
166253
166253
  const environment = parseEnvironment(argv2["--environment"] || void 0);
166254
- const link4 = await ensureLink("pull", client2, cwd, { autoConfirm });
166254
+ const link4 = await ensureLink("pull", client2, cwd2, { autoConfirm });
166255
166255
  if (typeof link4 === "number") {
166256
166256
  return link4;
166257
166257
  }
166258
166258
  const { project, org, repoRoot } = link4;
166259
166259
  if (repoRoot) {
166260
- cwd = (0, import_path20.join)(repoRoot, project.rootDirectory || "");
166260
+ cwd2 = (0, import_path20.join)(repoRoot, project.rootDirectory || "");
166261
166261
  }
166262
166262
  client2.config.currentTeam = org.type === "team" ? org.id : void 0;
166263
166263
  const pullResultCode = await pullAllEnvFiles(
@@ -166266,7 +166266,7 @@ async function main(client2) {
166266
166266
  link4,
166267
166267
  project,
166268
166268
  argv2,
166269
- cwd
166269
+ cwd2
166270
166270
  );
166271
166271
  if (pullResultCode !== 0) {
166272
166272
  return pullResultCode;
@@ -166274,12 +166274,12 @@ async function main(client2) {
166274
166274
  client2.output.print("\n");
166275
166275
  client2.output.log("Downloading project settings");
166276
166276
  const isRepoLinked = typeof repoRoot === "string";
166277
- await writeProjectSettings(cwd, project, org, isRepoLinked);
166277
+ await writeProjectSettings(cwd2, project, org, isRepoLinked);
166278
166278
  const settingsStamp = stamp_default();
166279
166279
  client2.output.print(
166280
166280
  `${prependEmoji(
166281
166281
  `Downloaded project settings to ${import_chalk44.default.bold(
166282
- humanizePath((0, import_path20.join)(cwd, VERCEL_DIR2, VERCEL_DIR_PROJECT))
166282
+ humanizePath((0, import_path20.join)(cwd2, VERCEL_DIR2, VERCEL_DIR_PROJECT))
166283
166283
  )} ${import_chalk44.default.gray(settingsStamp())}`,
166284
166284
  emoji("success")
166285
166285
  )}
@@ -169734,8 +169734,8 @@ var init_static_builder = __esm({
169734
169734
  });
169735
169735
 
169736
169736
  // src/util/build/import-builders.ts
169737
- async function importBuilders(builderSpecs, cwd, output2) {
169738
- const buildersDir = (0, import_path25.join)(cwd, VERCEL_DIR2, "builders");
169737
+ async function importBuilders(builderSpecs, cwd2, output2) {
169738
+ const buildersDir = (0, import_path25.join)(cwd2, VERCEL_DIR2, "builders");
169739
169739
  let importResult = await resolveBuilders(buildersDir, builderSpecs, output2);
169740
169740
  if ("buildersToAdd" in importResult) {
169741
169741
  const installResult = await installBuilders(
@@ -170190,10 +170190,10 @@ var init_validate_config = __esm({
170190
170190
  });
170191
170191
 
170192
170192
  // src/util/build/monorepo.ts
170193
- async function setMonorepoDefaultSettings(cwd, workPath, projectSettings, output2) {
170194
- const localFileSystem = new import_fs_detectors3.LocalFileSystemDetector(cwd);
170193
+ async function setMonorepoDefaultSettings(cwd2, workPath, projectSettings, output2) {
170194
+ const localFileSystem = new import_fs_detectors3.LocalFileSystemDetector(cwd2);
170195
170195
  const projectName = (0, import_path27.basename)(workPath);
170196
- const relativeToRoot = (0, import_path27.relative)(workPath, cwd);
170196
+ const relativeToRoot = (0, import_path27.relative)(workPath, cwd2);
170197
170197
  const setCommand = (command, value) => {
170198
170198
  if (projectSettings[command]) {
170199
170199
  (0, import_build_utils12.debug)(
@@ -170206,7 +170206,7 @@ async function setMonorepoDefaultSettings(cwd, workPath, projectSettings, output
170206
170206
  try {
170207
170207
  const result = await (0, import_fs_detectors3.getMonorepoDefaultSettings)(
170208
170208
  projectName,
170209
- (0, import_path27.relative)(cwd, workPath),
170209
+ (0, import_path27.relative)(cwd2, workPath),
170210
170210
  relativeToRoot,
170211
170211
  localFileSystem
170212
170212
  );
@@ -170322,10 +170322,11 @@ var init_scrub_argv = __esm({
170322
170322
  // src/commands/build/index.ts
170323
170323
  var build_exports = {};
170324
170324
  __export3(build_exports, {
170325
- default: () => main2
170325
+ default: () => main2,
170326
+ readInstalledVersion: () => readInstalledVersion
170326
170327
  });
170327
170328
  async function main2(client2) {
170328
- let { cwd } = client2;
170329
+ let { cwd: cwd2 } = client2;
170329
170330
  const { output: output2 } = client2;
170330
170331
  if (process.env.__VERCEL_BUILD_RUNNING) {
170331
170332
  output2.error(
@@ -170355,17 +170356,17 @@ async function main2(client2) {
170355
170356
  const target = argv2["--prod"] ? "production" : "preview";
170356
170357
  const yes = Boolean(argv2["--yes"]);
170357
170358
  try {
170358
- await (0, import_build_utils13.validateNpmrc)(cwd);
170359
+ await (0, import_build_utils13.validateNpmrc)(cwd2);
170359
170360
  } catch (err) {
170360
170361
  output2.prettyError(err);
170361
170362
  return 1;
170362
170363
  }
170363
- const link4 = await getProjectLink(client2, cwd);
170364
+ const link4 = await getProjectLink(client2, cwd2);
170364
170365
  const projectRootDirectory = link4?.projectRootDirectory ?? "";
170365
170366
  if (link4?.repoRoot) {
170366
- cwd = client2.cwd = link4.repoRoot;
170367
+ cwd2 = client2.cwd = link4.repoRoot;
170367
170368
  }
170368
- const vercelDir = (0, import_path28.join)(cwd, projectRootDirectory, VERCEL_DIR2);
170369
+ const vercelDir = (0, import_path28.join)(cwd2, projectRootDirectory, VERCEL_DIR2);
170369
170370
  let project = await readProjectSettings(vercelDir);
170370
170371
  const isTTY3 = process.stdin.isTTY;
170371
170372
  while (!project?.settings) {
@@ -170393,7 +170394,7 @@ async function main2(client2) {
170393
170394
  return 0;
170394
170395
  }
170395
170396
  const { argv: originalArgv } = client2;
170396
- client2.cwd = (0, import_path28.join)(cwd, projectRootDirectory);
170397
+ client2.cwd = (0, import_path28.join)(cwd2, projectRootDirectory);
170397
170398
  client2.argv = [
170398
170399
  ...originalArgv.slice(0, 2),
170399
170400
  "pull",
@@ -170404,11 +170405,11 @@ async function main2(client2) {
170404
170405
  if (result !== 0) {
170405
170406
  return result;
170406
170407
  }
170407
- client2.cwd = cwd;
170408
+ client2.cwd = cwd2;
170408
170409
  client2.argv = originalArgv;
170409
170410
  project = await readProjectSettings(vercelDir);
170410
170411
  }
170411
- const defaultOutputDir = (0, import_path28.join)(cwd, projectRootDirectory, OUTPUT_DIR);
170412
+ const defaultOutputDir = (0, import_path28.join)(cwd2, projectRootDirectory, OUTPUT_DIR);
170412
170413
  const outputDir = argv2["--output"] ? (0, import_path28.resolve)(argv2["--output"]) : defaultOutputDir;
170413
170414
  await Promise.all([
170414
170415
  import_fs_extra18.default.remove(outputDir),
@@ -170423,7 +170424,7 @@ async function main2(client2) {
170423
170424
  const envToUnset = /* @__PURE__ */ new Set(["VERCEL", "NOW_BUILDER"]);
170424
170425
  try {
170425
170426
  const envPath = (0, import_path28.join)(
170426
- cwd,
170427
+ cwd2,
170427
170428
  projectRootDirectory,
170428
170429
  VERCEL_DIR2,
170429
170430
  `.env.${target}.local`
@@ -170445,10 +170446,13 @@ async function main2(client2) {
170445
170446
  if (project.settings.analyticsId) {
170446
170447
  envToUnset.add("VERCEL_ANALYTICS_ID");
170447
170448
  process.env.VERCEL_ANALYTICS_ID = project.settings.analyticsId;
170449
+ output2.warn(
170450
+ "Vercel Speed Insights auto-injection is deprecated in favor of @vercel/speed-insights package. Learn more: https://vercel.link/upgrate-to-speed-insights-package"
170451
+ );
170448
170452
  }
170449
170453
  process.env.VERCEL = "1";
170450
170454
  process.env.NOW_BUILDER = "1";
170451
- await doBuild(client2, project, buildsJson, cwd, outputDir);
170455
+ await doBuild(client2, project, buildsJson, cwd2, outputDir);
170452
170456
  return 0;
170453
170457
  } catch (err) {
170454
170458
  output2.prettyError(err);
@@ -170466,9 +170470,9 @@ async function main2(client2) {
170466
170470
  }
170467
170471
  }
170468
170472
  }
170469
- async function doBuild(client2, project, buildsJson, cwd, outputDir) {
170473
+ async function doBuild(client2, project, buildsJson, cwd2, outputDir) {
170470
170474
  const { localConfigPath, output: output2 } = client2;
170471
- const workPath = (0, import_path28.join)(cwd, project.settings.rootDirectory || ".");
170475
+ const workPath = (0, import_path28.join)(cwd2, project.settings.rootDirectory || ".");
170472
170476
  const [pkg, vercelConfig, nowConfig] = await Promise.all([
170473
170477
  readJSONFile((0, import_path28.join)(workPath, "package.json")),
170474
170478
  readJSONFile(
@@ -170497,7 +170501,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir) {
170497
170501
  ...pickOverrides(localConfig)
170498
170502
  };
170499
170503
  if (process.env.VERCEL_BUILD_MONOREPO_SUPPORT === "1" && pkg?.scripts?.["vercel-build"] === void 0 && projectSettings.rootDirectory !== null && projectSettings.rootDirectory !== ".") {
170500
- await setMonorepoDefaultSettings(cwd, workPath, projectSettings, output2);
170504
+ await setMonorepoDefaultSettings(cwd2, workPath, projectSettings, output2);
170501
170505
  }
170502
170506
  const files = (await staticFiles(workPath, client2)).map(
170503
170507
  (f) => (0, import_build_utils13.normalizePath)((0, import_path28.relative)(workPath, f))
@@ -170558,7 +170562,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir) {
170558
170562
  zeroConfigRoutes.push(...detectedBuilders.defaultRoutes || []);
170559
170563
  }
170560
170564
  const builderSpecs = new Set(builds.map((b) => b.use));
170561
- const buildersWithPkgs = await importBuilders(builderSpecs, cwd, output2);
170565
+ const buildersWithPkgs = await importBuilders(builderSpecs, cwd2, output2);
170562
170566
  const filesMap = {};
170563
170567
  for (const path11 of files) {
170564
170568
  const fsPath = (0, import_path28.join)(workPath, path11);
@@ -170568,27 +170572,6 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir) {
170568
170572
  const buildStamp = stamp_default();
170569
170573
  await import_fs_extra18.default.mkdirp(outputDir);
170570
170574
  const ops = [];
170571
- const dependencyMap = makeDepencyMap(pkg);
170572
- const speedInsighsVersion = dependencyMap.get("@vercel/speed-insights");
170573
- if (speedInsighsVersion) {
170574
- if (process.env.VERCEL_ANALYTICS_ID) {
170575
- output2.warn(
170576
- `The \`VERCEL_ANALYTICS_ID\` environment variable is deprecated and will be removed in a future release. Please remove it from your environment variables`
170577
- );
170578
- delete process.env.VERCEL_ANALYTICS_ID;
170579
- }
170580
- buildsJson.features = {
170581
- ...buildsJson.features ?? {},
170582
- speedInsightsVersion: speedInsighsVersion
170583
- };
170584
- }
170585
- const webAnalyticsVersion = dependencyMap.get("@vercel/analytics");
170586
- if (webAnalyticsVersion) {
170587
- buildsJson.features = {
170588
- ...buildsJson.features ?? {},
170589
- webAnalyticsVersion
170590
- };
170591
- }
170592
170575
  const buildsJsonBuilds = new Map(
170593
170576
  builds.map((build2) => {
170594
170577
  const builderWithPkg = buildersWithPkgs.get(build2.use);
@@ -170608,9 +170591,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir) {
170608
170591
  })
170609
170592
  );
170610
170593
  buildsJson.builds = Array.from(buildsJsonBuilds.values());
170611
- await import_fs_extra18.default.writeJSON((0, import_path28.join)(outputDir, "builds.json"), buildsJson, {
170612
- spaces: 2
170613
- });
170594
+ await writeBuildJson(buildsJson, outputDir);
170614
170595
  const meta = {
170615
170596
  skipDownload: true,
170616
170597
  cliVersion: pkg_default.version
@@ -170618,7 +170599,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir) {
170618
170599
  const sortedBuilders = sortBuilders(builds);
170619
170600
  const buildResults = /* @__PURE__ */ new Map();
170620
170601
  const overrides = [];
170621
- const repoRootPath = cwd;
170602
+ const repoRootPath = cwd2;
170622
170603
  const corepackShimDir = await initCorepack({ repoRootPath });
170623
170604
  for (const build2 of sortedBuilders) {
170624
170605
  if (typeof build2.src !== "string")
@@ -170708,6 +170689,32 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir) {
170708
170689
  throw error4;
170709
170690
  }
170710
170691
  }
170692
+ let needBuildsJsonOverride = false;
170693
+ const speedInsightsVersion = await readInstalledVersion(
170694
+ client2,
170695
+ "@vercel/speed-insights"
170696
+ );
170697
+ if (speedInsightsVersion) {
170698
+ buildsJson.features = {
170699
+ ...buildsJson.features ?? {},
170700
+ speedInsightsVersion
170701
+ };
170702
+ needBuildsJsonOverride = true;
170703
+ }
170704
+ const webAnalyticsVersion = await readInstalledVersion(
170705
+ client2,
170706
+ "@vercel/analytics"
170707
+ );
170708
+ if (webAnalyticsVersion) {
170709
+ buildsJson.features = {
170710
+ ...buildsJson.features ?? {},
170711
+ webAnalyticsVersion
170712
+ };
170713
+ needBuildsJsonOverride = true;
170714
+ }
170715
+ if (needBuildsJsonOverride) {
170716
+ await writeBuildJson(buildsJson, outputDir);
170717
+ }
170711
170718
  const configPath = (0, import_path28.join)(outputDir, "config.json");
170712
170719
  const existingConfig = await readJSONFile(configPath);
170713
170720
  if (existingConfig instanceof CantParseJSONFile) {
@@ -170750,7 +170757,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir) {
170750
170757
  const mergedWildcard = mergeWildcard(buildResults.values());
170751
170758
  const mergedOverrides = overrides.length > 0 ? Object.assign({}, ...overrides) : void 0;
170752
170759
  const mergedFlags = mergeFlags(buildResults.values());
170753
- const framework = await getFramework(cwd, buildResults);
170760
+ const framework = await getFramework(cwd2, buildResults);
170754
170761
  const config3 = {
170755
170762
  version: 3,
170756
170763
  routes: mergedRoutes,
@@ -170762,7 +170769,7 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir) {
170762
170769
  flags: mergedFlags
170763
170770
  };
170764
170771
  await import_fs_extra18.default.writeJSON((0, import_path28.join)(outputDir, "config.json"), config3, { spaces: 2 });
170765
- const relOutputDir = (0, import_path28.relative)(cwd, outputDir);
170772
+ const relOutputDir = (0, import_path28.relative)(cwd2, outputDir);
170766
170773
  output2.print(
170767
170774
  `${prependEmoji(
170768
170775
  `Build Completed in ${import_chalk45.default.bold(
@@ -170773,9 +170780,9 @@ async function doBuild(client2, project, buildsJson, cwd, outputDir) {
170773
170780
  `
170774
170781
  );
170775
170782
  }
170776
- async function getFramework(cwd, buildResults) {
170783
+ async function getFramework(cwd2, buildResults) {
170777
170784
  const detectedFramework = await (0, import_fs_detectors4.detectFrameworkRecord)({
170778
- fs: new import_fs_detectors4.LocalFileSystemDetector(cwd),
170785
+ fs: new import_fs_detectors4.LocalFileSystemDetector(cwd2),
170779
170786
  frameworkList: import_frameworks4.default
170780
170787
  });
170781
170788
  if (!detectedFramework) {
@@ -170868,13 +170875,24 @@ function mergeFlags(buildResults) {
170868
170875
  return [];
170869
170876
  });
170870
170877
  }
170871
- function makeDepencyMap(pkg) {
170872
- return new Map([
170873
- ...Object.entries(pkg?.devDependencies ?? {}),
170874
- ...Object.entries(pkg?.dependencies ?? {})
170875
- ]);
170878
+ async function writeBuildJson(buildsJson, outputDir) {
170879
+ await import_fs_extra18.default.writeJSON((0, import_path28.join)(outputDir, "builds.json"), buildsJson, { spaces: 2 });
170880
+ }
170881
+ async function readInstalledVersion({ output: output2 }, pkgName) {
170882
+ try {
170883
+ const descriptorPath = require.resolve(`${pkgName}/package.json`, {
170884
+ paths: [(0, import_process.cwd)()]
170885
+ });
170886
+ const descriptor2 = await (0, import_fs_extra18.readJSON)(descriptorPath);
170887
+ return descriptor2?.version;
170888
+ } catch (err) {
170889
+ output2.debug(
170890
+ `Package ${pkgName} is not installed (failed to read its package.json: ${err})`
170891
+ );
170892
+ }
170893
+ return;
170876
170894
  }
170877
- var import_fs_extra18, import_chalk45, import_dotenv, import_semver3, import_minimatch2, import_path28, import_frameworks4, import_build_utils13, import_fs_detectors4, import_routing_utils2, import_client8;
170895
+ var import_fs_extra18, import_chalk45, import_dotenv, import_semver3, import_minimatch2, import_path28, import_frameworks4, import_build_utils13, import_fs_detectors4, import_routing_utils2, import_client8, import_process;
170878
170896
  var init_build = __esm({
170879
170897
  "src/commands/build/index.ts"() {
170880
170898
  "use strict";
@@ -170912,6 +170930,7 @@ var init_build = __esm({
170912
170930
  init_help();
170913
170931
  init_command4();
170914
170932
  init_scrub_argv();
170933
+ import_process = require("process");
170915
170934
  }
170916
170935
  });
170917
170936
 
@@ -172071,7 +172090,7 @@ var init_command6 = __esm({
172071
172090
  shorthand: null,
172072
172091
  type: "boolean",
172073
172092
  deprecated: false,
172074
- description: void 0,
172093
+ description: "Disable the automatic promotion (aliasing) of the relevant domains to a new production deployment. You can use `vc promote` to complete the domain-assignment process later",
172075
172094
  multi: false
172076
172095
  },
172077
172096
  {
@@ -172317,7 +172336,7 @@ var init_deploy = __esm({
172317
172336
  }
172318
172337
  const { log: log2, debug: debug3, error: error4, prettyError } = output2;
172319
172338
  const quiet = !client2.stdout.isTTY;
172320
- let { path: cwd } = pathValidation;
172339
+ let { path: cwd2 } = pathValidation;
172321
172340
  const autoConfirm = argv2["--yes"];
172322
172341
  if (argv2["--name"]) {
172323
172342
  output2.print(
@@ -172350,7 +172369,7 @@ var init_deploy = __esm({
172350
172369
  output2.error(`Format must be one of: ${import_client10.VALID_ARCHIVE_FORMATS.join(", ")}`);
172351
172370
  return 1;
172352
172371
  }
172353
- const link4 = await getLinkedProject(client2, cwd);
172372
+ const link4 = await getLinkedProject(client2, cwd2);
172354
172373
  if (link4.status === "error") {
172355
172374
  return link4.exitCode;
172356
172375
  }
@@ -172361,7 +172380,7 @@ var init_deploy = __esm({
172361
172380
  if (status === "not_linked") {
172362
172381
  const shouldStartSetup = autoConfirm || await confirm(
172363
172382
  client2,
172364
- `Set up and deploy ${import_chalk53.default.cyan(`\u201C${humanizePath(cwd)}\u201D`)}?`,
172383
+ `Set up and deploy ${import_chalk53.default.cyan(`\u201C${humanizePath(cwd2)}\u201D`)}?`,
172365
172384
  true
172366
172385
  );
172367
172386
  if (!shouldStartSetup) {
@@ -172395,14 +172414,14 @@ var init_deploy = __esm({
172395
172414
  );
172396
172415
  if (typeof projectOrNewProjectName === "string") {
172397
172416
  newProjectName = projectOrNewProjectName;
172398
- rootDirectory = await inputRootDirectory(client2, cwd, autoConfirm);
172417
+ rootDirectory = await inputRootDirectory(client2, cwd2, autoConfirm);
172399
172418
  } else {
172400
172419
  project = projectOrNewProjectName;
172401
172420
  rootDirectory = project.rootDirectory;
172402
172421
  sourceFilesOutsideRootDirectory = project.sourceFilesOutsideRootDirectory;
172403
172422
  await linkFolderToProject(
172404
172423
  client2,
172405
- cwd,
172424
+ cwd2,
172406
172425
  {
172407
172426
  projectId: project.id,
172408
172427
  orgId: org.id
@@ -172414,16 +172433,16 @@ var init_deploy = __esm({
172414
172433
  }
172415
172434
  }
172416
172435
  if (link4.status === "linked" && link4.repoRoot) {
172417
- cwd = link4.repoRoot;
172436
+ cwd2 = link4.repoRoot;
172418
172437
  }
172419
172438
  if (!org) {
172420
172439
  throw new Error(`"org" is not defined`);
172421
172440
  }
172422
172441
  if (argv2["--prebuilt"]) {
172423
172442
  if (link4.status === "linked" && link4.repoRoot && link4.project.rootDirectory) {
172424
- cwd = (0, import_path32.join)(cwd, link4.project.rootDirectory);
172443
+ cwd2 = (0, import_path32.join)(cwd2, link4.project.rootDirectory);
172425
172444
  }
172426
- const prebuiltExists = await import_fs_extra20.default.pathExists((0, import_path32.join)(cwd, ".vercel/output"));
172445
+ const prebuiltExists = await import_fs_extra20.default.pathExists((0, import_path32.join)(cwd2, ".vercel/output"));
172427
172446
  if (!prebuiltExists) {
172428
172447
  error4(
172429
172448
  `The ${param(
@@ -172434,7 +172453,7 @@ var init_deploy = __esm({
172434
172453
  );
172435
172454
  return 1;
172436
172455
  }
172437
- const prebuiltBuild = await getPrebuiltJson(cwd);
172456
+ const prebuiltBuild = await getPrebuiltJson(cwd2);
172438
172457
  const prebuiltError = prebuiltBuild?.error || prebuiltBuild?.builds?.find((build2) => "error" in build2)?.error;
172439
172458
  if (prebuiltError) {
172440
172459
  output2.log(
@@ -172463,17 +172482,17 @@ var init_deploy = __esm({
172463
172482
  }
172464
172483
  const contextName = org.slug;
172465
172484
  client2.config.currentTeam = org.type === "team" ? org.id : void 0;
172466
- const sourcePath = rootDirectory && !sourceFilesOutsideRootDirectory ? (0, import_path32.join)(cwd, rootDirectory) : cwd;
172485
+ const sourcePath = rootDirectory && !sourceFilesOutsideRootDirectory ? (0, import_path32.join)(cwd2, rootDirectory) : cwd2;
172467
172486
  if (rootDirectory && await validateRootDirectory(
172468
172487
  output2,
172469
- cwd,
172488
+ cwd2,
172470
172489
  sourcePath,
172471
172490
  project ? `To change your Project Settings, go to https://vercel.com/${org?.slug}/${project.name}/settings` : ""
172472
172491
  ) === false) {
172473
172492
  return 1;
172474
172493
  }
172475
172494
  if (rootDirectory) {
172476
- const rootDirectoryConfig = readLocalConfig((0, import_path32.join)(cwd, rootDirectory));
172495
+ const rootDirectoryConfig = readLocalConfig((0, import_path32.join)(cwd2, rootDirectory));
172477
172496
  if (rootDirectoryConfig) {
172478
172497
  debug3(`Read local config from root directory (${rootDirectory})`);
172479
172498
  localConfig = rootDirectoryConfig;
@@ -172533,7 +172552,7 @@ var init_deploy = __esm({
172533
172552
  parseMeta(localConfig.meta),
172534
172553
  parseMeta(argv2["--meta"])
172535
172554
  );
172536
- const gitMetadata = await createGitMeta(cwd, output2, project);
172555
+ const gitMetadata = await createGitMeta(cwd2, output2, project);
172537
172556
  const deploymentEnv = Object.assign(
172538
172557
  {},
172539
172558
  parseEnv(localConfig.env),
@@ -172608,7 +172627,7 @@ var init_deploy = __esm({
172608
172627
  createArgs,
172609
172628
  org,
172610
172629
  !project,
172611
- cwd,
172630
+ cwd2,
172612
172631
  archive
172613
172632
  );
172614
172633
  if (deployment.code === "missing_project_settings") {
@@ -172637,7 +172656,7 @@ var init_deploy = __esm({
172637
172656
  createArgs,
172638
172657
  org,
172639
172658
  false,
172640
- cwd
172659
+ cwd2
172641
172660
  );
172642
172661
  }
172643
172662
  if (deployment instanceof NotDomainOwner) {
@@ -184714,8 +184733,8 @@ var require_src3 = __commonJS2({
184714
184733
  sendError
184715
184734
  }, methods);
184716
184735
  module2.exports = async (request, response, config3 = {}, methods = {}) => {
184717
- const cwd = process.cwd();
184718
- const current = config3.public ? path11.resolve(cwd, config3.public) : cwd;
184736
+ const cwd2 = process.cwd();
184737
+ const current = config3.public ? path11.resolve(cwd2, config3.public) : cwd2;
184719
184738
  const handlers = getHandlers(methods);
184720
184739
  let relativePath = null;
184721
184740
  let acceptsJSON = null;
@@ -185766,7 +185785,7 @@ Please run \`${await getUpdateCommand()}\` to update to the latest CLI.`
185766
185785
  );
185767
185786
  }
185768
185787
  }
185769
- async function getBuildMatches(vercelConfig, cwd, output2, devServer, fileList) {
185788
+ async function getBuildMatches(vercelConfig, cwd2, output2, devServer, fileList) {
185770
185789
  const matches = [];
185771
185790
  if (fileList.length === 0) {
185772
185791
  return matches;
@@ -185774,7 +185793,7 @@ async function getBuildMatches(vercelConfig, cwd, output2, devServer, fileList)
185774
185793
  const noMatches = [];
185775
185794
  const builds = vercelConfig.builds || [{ src: "**", use: "@vercel/static" }];
185776
185795
  const builderSpecs = new Set(builds.map((b) => b.use).filter(Boolean));
185777
- const buildersWithPkgs = await importBuilders(builderSpecs, cwd, output2);
185796
+ const buildersWithPkgs = await importBuilders(builderSpecs, cwd2, output2);
185778
185797
  for (const buildConfig of builds) {
185779
185798
  let { src = "**", use, config: config3 = {} } = buildConfig;
185780
185799
  if (!use) {
@@ -185789,12 +185808,12 @@ async function getBuildMatches(vercelConfig, cwd, output2, devServer, fileList)
185789
185808
  mapToEntrypoint.set(extensionless, src);
185790
185809
  src = extensionless;
185791
185810
  }
185792
- const files = fileList.filter((name) => name === src || (0, import_minimatch3.default)(name, src, { dot: true })).map((name) => (0, import_path35.join)(cwd, name));
185811
+ const files = fileList.filter((name) => name === src || (0, import_minimatch3.default)(name, src, { dot: true })).map((name) => (0, import_path35.join)(cwd2, name));
185793
185812
  if (files.length === 0) {
185794
185813
  noMatches.push(buildConfig);
185795
185814
  }
185796
185815
  for (const file of files) {
185797
- src = relative6(cwd, file);
185816
+ src = relative6(cwd2, file);
185798
185817
  const entrypoint = mapToEntrypoint.get(src) || src;
185799
185818
  if (config3.zeroConfig && config3.outputDirectory) {
185800
185819
  const outputMatch = config3.outputDirectory + "/";
@@ -186216,9 +186235,9 @@ function proxyPass(req, res, dest, devServer, requestId, ignorePath = true) {
186216
186235
  }
186217
186236
  );
186218
186237
  }
186219
- function serveStaticFile(req, res, cwd, opts) {
186238
+ function serveStaticFile(req, res, cwd2, opts) {
186220
186239
  return (0, import_serve_handler.default)(req, res, {
186221
- public: cwd,
186240
+ public: cwd2,
186222
186241
  cleanUrls: false,
186223
186242
  etag: true,
186224
186243
  ...opts
@@ -186475,7 +186494,7 @@ var init_server = __esm({
186475
186494
  import_frameworks5.default.map((f) => f.useRuntime?.use || "@vercel/static-build")
186476
186495
  );
186477
186496
  DevServer = class {
186478
- constructor(cwd, options) {
186497
+ constructor(cwd2, options) {
186479
186498
  this.clearVercelConfigPromise = () => {
186480
186499
  this.getVercelConfigPromise = null;
186481
186500
  };
@@ -187120,8 +187139,8 @@ Please ensure that ${cmd(err.path)} is properly installed`;
187120
187139
  await this.sendError(req, res, requestId, "UNKNOWN_ASSET_TYPE");
187121
187140
  }
187122
187141
  };
187123
- this.cwd = cwd;
187124
- this.repoRoot = options.repoRoot ?? cwd;
187142
+ this.cwd = cwd2;
187143
+ this.repoRoot = options.repoRoot ?? cwd2;
187125
187144
  this.output = options.output;
187126
187145
  this.envConfigs = { buildEnv: {}, runEnv: {}, allEnv: {} };
187127
187146
  this.envValues = options.envValues || {};
@@ -187144,7 +187163,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
187144
187163
  this.stopping = false;
187145
187164
  this.buildMatches = /* @__PURE__ */ new Map();
187146
187165
  this.inProgressBuilds = /* @__PURE__ */ new Map();
187147
- this.devCacheDir = (0, import_path36.join)(getVercelDirectory(cwd), "cache");
187166
+ this.devCacheDir = (0, import_path36.join)(getVercelDirectory(cwd2), "cache");
187148
187167
  this.vercelConfigWarning = false;
187149
187168
  this.getVercelConfigPromise = null;
187150
187169
  this.blockingBuildsPromise = null;
@@ -188061,7 +188080,7 @@ ${error_code}
188061
188080
  return this.caseSensitive;
188062
188081
  }
188063
188082
  async runDevCommand() {
188064
- const { devCommand: devCommand2, cwd } = this;
188083
+ const { devCommand: devCommand2, cwd: cwd2 } = this;
188065
188084
  if (devCommand2 === this.currentDevCommand) {
188066
188085
  return;
188067
188086
  }
@@ -188092,13 +188111,13 @@ ${error_code}
188092
188111
  PORT: `${port}`
188093
188112
  }
188094
188113
  );
188095
- const nodeBinPaths = (0, import_build_utils17.getNodeBinPaths)({ base: this.repoRoot, start: cwd });
188114
+ const nodeBinPaths = (0, import_build_utils17.getNodeBinPaths)({ base: this.repoRoot, start: cwd2 });
188096
188115
  const nodeBinPath = nodeBinPaths.join(import_path36.default.delimiter);
188097
188116
  env.PATH = `${nodeBinPath}${import_path36.default.delimiter}${env.PATH}`;
188098
188117
  let command = devCommand2.replace(/\$PORT/g, `${port}`).replace(/%PORT%/g, `${port}`);
188099
188118
  this.output.debug(
188100
188119
  `Starting dev command with parameters: ${JSON.stringify({
188101
- cwd,
188120
+ cwd: cwd2,
188102
188121
  command,
188103
188122
  port
188104
188123
  })}`
@@ -188107,7 +188126,7 @@ ${error_code}
188107
188126
  const proxyPort = new RegExp(port.toString(), "g");
188108
188127
  const p = (0, import_build_utils17.spawnCommand)(command, {
188109
188128
  stdio: ["inherit", "pipe", "pipe"],
188110
- cwd,
188129
+ cwd: cwd2,
188111
188130
  env
188112
188131
  });
188113
188132
  this.devProcess = p;
@@ -188137,11 +188156,11 @@ ${error_code}
188137
188156
  async function dev(client2, opts, args2) {
188138
188157
  const { output: output2 } = client2;
188139
188158
  const [dir = "."] = args2;
188140
- let cwd = (0, import_path37.resolve)(dir);
188159
+ let cwd2 = (0, import_path37.resolve)(dir);
188141
188160
  const listen4 = parseListen(opts["--listen"] || "3000");
188142
- let link4 = await getLinkedProject(client2, cwd);
188161
+ let link4 = await getLinkedProject(client2, cwd2);
188143
188162
  if (link4.status === "not_linked" && !process.env.__VERCEL_SKIP_DEV_CMD) {
188144
- link4 = await setupAndLink(client2, cwd, {
188163
+ link4 = await setupAndLink(client2, cwd2, {
188145
188164
  autoConfirm: opts["--yes"],
188146
188165
  link: link4,
188147
188166
  successEmoji: "link",
@@ -188167,16 +188186,16 @@ async function dev(client2, opts, args2) {
188167
188186
  if (link4.status === "linked") {
188168
188187
  const { project, org } = link4;
188169
188188
  if (link4.repoRoot) {
188170
- repoRoot = cwd = link4.repoRoot;
188189
+ repoRoot = cwd2 = link4.repoRoot;
188171
188190
  }
188172
188191
  client2.config.currentTeam = org.type === "team" ? org.id : void 0;
188173
188192
  projectSettings = project;
188174
188193
  if (project.rootDirectory) {
188175
- cwd = (0, import_path37.join)(cwd, project.rootDirectory);
188194
+ cwd2 = (0, import_path37.join)(cwd2, project.rootDirectory);
188176
188195
  }
188177
188196
  envValues = (await pullEnvRecords(output2, client2, project.id, "vercel-cli:dev")).env;
188178
188197
  }
188179
- const devServer = new DevServer(cwd, {
188198
+ const devServer = new DevServer(cwd2, {
188180
188199
  output: output2,
188181
188200
  projectSettings,
188182
188201
  envValues,
@@ -188184,7 +188203,7 @@ async function dev(client2, opts, args2) {
188184
188203
  });
188185
188204
  process.on("SIGTERM", () => devServer.stop());
188186
188205
  if (!devServer.devCommand) {
188187
- const outputDir = (0, import_path37.join)(cwd, OUTPUT_DIR);
188206
+ const outputDir = (0, import_path37.join)(cwd2, OUTPUT_DIR);
188188
188207
  if (await import_fs_extra22.default.pathExists(outputDir)) {
188189
188208
  output2.log(`Removing ${OUTPUT_DIR}`);
188190
188209
  await import_fs_extra22.default.remove(outputDir);
@@ -191973,7 +191992,7 @@ async function main6(client2) {
191973
191992
  }
191974
191993
  const subArgs = argv2._.slice(1);
191975
191994
  const { subcommand: subcommand2, args: args2 } = getSubcommand(subArgs, COMMAND_CONFIG6);
191976
- const { cwd, output: output2, config: config3 } = client2;
191995
+ const { cwd: cwd2, output: output2, config: config3 } = client2;
191977
191996
  const target = argv2["--environment"]?.toLowerCase() || "development";
191978
191997
  if (!isValidEnvTarget(target)) {
191979
191998
  output2.error(
@@ -191983,7 +192002,7 @@ async function main6(client2) {
191983
192002
  );
191984
192003
  return 1;
191985
192004
  }
191986
- const link4 = await getLinkedProject(client2, cwd);
192005
+ const link4 = await getLinkedProject(client2, cwd2);
191987
192006
  if (link4.status === "error") {
191988
192007
  return link4.exitCode;
191989
192008
  } else if (link4.status === "not_linked") {
@@ -192012,7 +192031,7 @@ async function main6(client2) {
192012
192031
  argv2,
192013
192032
  args2,
192014
192033
  output2,
192015
- cwd,
192034
+ cwd2,
192016
192035
  "vercel-cli:env:pull"
192017
192036
  );
192018
192037
  default:
@@ -192053,7 +192072,7 @@ var init_env = __esm({
192053
192072
 
192054
192073
  // src/commands/git/connect.ts
192055
192074
  async function connect(client2, argv2, args2, project, org) {
192056
- const { cwd, output: output2 } = client2;
192075
+ const { cwd: cwd2, output: output2 } = client2;
192057
192076
  const confirm2 = Boolean(argv2["--yes"]);
192058
192077
  const repoArg = argv2._[1];
192059
192078
  if (args2.length > 1) {
@@ -192074,7 +192093,7 @@ async function connect(client2, argv2, args2, project, org) {
192074
192093
  }
192075
192094
  const gitProviderLink = project.link;
192076
192095
  client2.config.currentTeam = org.type === "team" ? org.id : void 0;
192077
- const gitConfigPath = (0, import_path41.join)(cwd, ".git/config");
192096
+ const gitConfigPath = (0, import_path41.join)(cwd2, ".git/config");
192078
192097
  const gitConfig = await parseGitConfig(gitConfigPath, output2);
192079
192098
  if (repoArg) {
192080
192099
  const parsedUrlArg = parseRepoUrl(repoArg);
@@ -192529,8 +192548,8 @@ async function main7(client2) {
192529
192548
  subcommand2 = argv2._[0];
192530
192549
  const args2 = argv2._.slice(1);
192531
192550
  const autoConfirm = Boolean(argv2["--yes"]);
192532
- const { cwd, output: output2 } = client2;
192533
- const linkedProject = await ensureLink("git", client2, cwd, { autoConfirm });
192551
+ const { cwd: cwd2, output: output2 } = client2;
192552
+ const linkedProject = await ensureLink("git", client2, cwd2, { autoConfirm });
192534
192553
  if (typeof linkedProject === "number") {
192535
192554
  return linkedProject;
192536
192555
  }
@@ -192784,8 +192803,8 @@ ${deployHint}`);
192784
192803
  throw e2;
192785
192804
  });
192786
192805
  }
192787
- function prepareFolder(cwd, folder, force) {
192788
- const dest = import_path42.default.join(cwd, folder);
192806
+ function prepareFolder(cwd2, folder, force) {
192807
+ const dest = import_path42.default.join(cwd2, folder);
192789
192808
  if (import_fs8.default.existsSync(dest)) {
192790
192809
  if (!import_fs8.default.lstatSync(dest).isDirectory()) {
192791
192810
  throw new Error(
@@ -192803,7 +192822,7 @@ function prepareFolder(cwd, folder, force) {
192803
192822
  )} or ${cmd("-f")} to override it.`
192804
192823
  );
192805
192824
  }
192806
- } else if (dest !== cwd) {
192825
+ } else if (dest !== cwd2) {
192807
192826
  try {
192808
192827
  import_fs8.default.mkdirSync(dest);
192809
192828
  } catch (e2) {
@@ -193591,23 +193610,23 @@ async function link3(client2) {
193591
193610
  argv2["--yes"] = argv2["--confirm"];
193592
193611
  }
193593
193612
  const yes = !!argv2["--yes"];
193594
- let cwd = argv2._[1];
193595
- if (cwd) {
193613
+ let cwd2 = argv2._[1];
193614
+ if (cwd2) {
193596
193615
  client2.output.warn(
193597
193616
  `The ${cmd("vc link <directory>")} syntax is deprecated, please use ${cmd(
193598
- `vc link --cwd ${cwd}`
193617
+ `vc link --cwd ${cwd2}`
193599
193618
  )} instead`
193600
193619
  );
193601
193620
  } else {
193602
- cwd = client2.cwd;
193621
+ cwd2 = client2.cwd;
193603
193622
  }
193604
193623
  if (argv2["--repo"]) {
193605
193624
  client2.output.warn(
193606
193625
  `The ${cmd("--repo")} flag is in alpha, please report issues`
193607
193626
  );
193608
- await ensureRepoLink(client2, cwd, { yes, overwrite: true });
193627
+ await ensureRepoLink(client2, cwd2, { yes, overwrite: true });
193609
193628
  } else {
193610
- const link4 = await ensureLink("link", client2, cwd, {
193629
+ const link4 = await ensureLink("link", client2, cwd2, {
193611
193630
  autoConfirm: yes,
193612
193631
  forceDelete: true,
193613
193632
  projectName: argv2["--project"],
@@ -193725,7 +193744,7 @@ async function list2(client2) {
193725
193744
  handleError(err);
193726
193745
  return 1;
193727
193746
  }
193728
- const { cwd, output: output2, config: config3 } = client2;
193747
+ const { cwd: cwd2, output: output2, config: config3 } = client2;
193729
193748
  if ("--confirm" in argv2) {
193730
193749
  output2.warn("`--confirm` is deprecated, please use `--yes` instead");
193731
193750
  argv2["--yes"] = argv2["--confirm"];
@@ -193742,7 +193761,7 @@ async function list2(client2) {
193742
193761
  const autoConfirm = !!argv2["--yes"];
193743
193762
  const meta = parseMeta(argv2["--meta"]);
193744
193763
  const target = argv2["--prod"] ? "production" : typeof argv2["--environment"] === "string" ? argv2["--environment"].toLowerCase() : void 0;
193745
- let link4 = await getLinkedProject(client2, cwd);
193764
+ let link4 = await getLinkedProject(client2, cwd2);
193746
193765
  if (link4.status === "error") {
193747
193766
  return link4.exitCode;
193748
193767
  }
@@ -193755,7 +193774,7 @@ async function list2(client2) {
193755
193774
  return 1;
193756
193775
  }
193757
193776
  if (status === "not_linked" && !app) {
193758
- const linkedProject = await ensureLink("list", client2, cwd, {
193777
+ const linkedProject = await ensureLink("list", client2, cwd2, {
193759
193778
  autoConfirm,
193760
193779
  link: link4
193761
193780
  });
@@ -195184,7 +195203,7 @@ async function getProjectByCwdOrLink({
195184
195203
  autoConfirm,
195185
195204
  client: client2,
195186
195205
  commandName,
195187
- cwd,
195206
+ cwd: cwd2,
195188
195207
  projectNameOrId
195189
195208
  }) {
195190
195209
  if (projectNameOrId) {
@@ -195194,7 +195213,7 @@ async function getProjectByCwdOrLink({
195194
195213
  }
195195
195214
  return project;
195196
195215
  }
195197
- const linkedProject = await ensureLink(commandName, client2, cwd, {
195216
+ const linkedProject = await ensureLink(commandName, client2, cwd2, {
195198
195217
  autoConfirm
195199
195218
  });
195200
195219
  if (typeof linkedProject === "number") {
@@ -198533,16 +198552,16 @@ function createProxy(client2) {
198533
198552
  }
198534
198553
 
198535
198554
  // src/util/extension/exec.ts
198536
- async function execExtension(client2, name, args2, cwd) {
198555
+ async function execExtension(client2, name, args2, cwd2) {
198537
198556
  const { debug: debug3, log: log2 } = client2.output;
198538
198557
  const extensionCommand = `vercel-${name}`;
198539
- const { packageJsonPath, lockfilePath } = await (0, import_build_utils4.scanParentDirs)(cwd);
198558
+ const { packageJsonPath, lockfilePath } = await (0, import_build_utils4.scanParentDirs)(cwd2);
198540
198559
  const baseFile = lockfilePath || packageJsonPath;
198541
198560
  let extensionPath = null;
198542
198561
  if (baseFile) {
198543
198562
  extensionPath = await (0, import_build_utils4.walkParentDirs)({
198544
198563
  base: (0, import_path8.dirname)(baseFile),
198545
- start: cwd,
198564
+ start: cwd2,
198546
198565
  filename: `node_modules/.bin/${extensionCommand}`
198547
198566
  });
198548
198567
  }
@@ -198562,7 +198581,7 @@ async function execExtension(client2, name, args2, cwd) {
198562
198581
  const VERCEL_API = proxyUrl.href.replace(/\/$/, "");
198563
198582
  debug3(`extension proxy server listening at ${VERCEL_API}`);
198564
198583
  const result = await (0, import_execa.default)(extensionPath, args2, {
198565
- cwd,
198584
+ cwd: cwd2,
198566
198585
  reject: false,
198567
198586
  stdio: "inherit",
198568
198587
  env: {
@@ -198862,10 +198881,10 @@ var main13 = async () => {
198862
198881
  if (argv2["--cwd"]) {
198863
198882
  client.cwd = argv2["--cwd"];
198864
198883
  }
198865
- const { cwd } = client;
198884
+ const { cwd: cwd2 } = client;
198866
198885
  let subcommand2 = void 0;
198867
198886
  if (targetOrSubcommand) {
198868
- const targetPath = (0, import_path43.join)(cwd, targetOrSubcommand);
198887
+ const targetPath = (0, import_path43.join)(cwd2, targetOrSubcommand);
198869
198888
  const targetPathExists = (0, import_fs9.existsSync)(targetPath);
198870
198889
  const subcommandExists = GLOBAL_COMMANDS.has(targetOrSubcommand) || commands_default.has(targetOrSubcommand);
198871
198890
  if (targetPathExists && subcommandExists && !argv2["--cwd"] && !process.env.NOW_BUILDER) {
@@ -199019,7 +199038,7 @@ var main13 = async () => {
199019
199038
  client,
199020
199039
  targetCommand,
199021
199040
  argv2._.slice(3),
199022
- cwd
199041
+ cwd2
199023
199042
  );
199024
199043
  } catch (err) {
199025
199044
  if ((0, import_error_utils33.isErrnoException)(err) && err.code === "ENOENT") {