@vercel/introspection 0.0.8 → 0.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/hono.mjs CHANGED
@@ -268,7 +268,7 @@ var require_dist$1 = /* @__PURE__ */ __commonJS$1({ "../build-utils/dist/index.j
268
268
  this.head = this.tail = null;
269
269
  this.length = 0;
270
270
  };
271
- BufferList.prototype.join = function join5(s) {
271
+ BufferList.prototype.join = function join6(s) {
272
272
  if (this.length === 0) return "";
273
273
  var p = this.head;
274
274
  var ret = "" + p.data;
@@ -54373,13 +54373,14 @@ ${error.message}`;
54373
54373
  getLatestNodeVersion: () => getLatestNodeVersion,
54374
54374
  getNodeBinPath: () => getNodeBinPath,
54375
54375
  getNodeBinPaths: () => getNodeBinPaths,
54376
- getNodeVersion: () => getNodeVersion,
54377
54376
  getOsRelease: () => getOsRelease,
54377
+ getPackageJson: () => getPackageJson,
54378
54378
  getPathForPackageManager: () => getPathForPackageManager,
54379
54379
  getPlatformEnv: () => getPlatformEnv,
54380
54380
  getPrefixedEnvVars: () => getPrefixedEnvVars,
54381
54381
  getPrettyError: () => getPrettyError,
54382
54382
  getProvidedRuntime: () => getProvidedRuntime,
54383
+ getRuntimeNodeVersion: () => getRuntimeNodeVersion,
54383
54384
  getScriptName: () => getScriptName,
54384
54385
  getSpawnOptions: () => getSpawnOptions,
54385
54386
  getSupportedBunVersion: () => getSupportedBunVersion,
@@ -54399,6 +54400,7 @@ ${error.message}`;
54399
54400
  normalizePath: () => normalizePath,
54400
54401
  readConfigFile: () => readConfigFile,
54401
54402
  rename: () => rename,
54403
+ resetCustomInstallCommandSet: () => resetCustomInstallCommandSet,
54402
54404
  runBundleInstall: () => runBundleInstall,
54403
54405
  runCustomInstallCommand: () => runCustomInstallCommand,
54404
54406
  runNpmInstall: () => runNpmInstall,
@@ -55144,7 +55146,7 @@ ${error.message}`;
55144
55146
  }
55145
55147
  var import_assert6 = __toESM(__require("assert"));
55146
55148
  var import_fs_extra7 = __toESM(require_lib());
55147
- var import_path5 = __toESM(__require("path"));
55149
+ var import_path6 = __toESM(__require("path"));
55148
55150
  var import_async_sema4 = __toESM(require_async_sema());
55149
55151
  var import_cross_spawn = __toESM(require_cross_spawn());
55150
55152
  var import_semver2 = __toESM(require_semver2());
@@ -55264,14 +55266,14 @@ ${error.message}`;
55264
55266
  return (0, import_semver.intersects)(o.range, engineRange) && (availableVersions?.length ? availableVersions.includes(o.major) : true);
55265
55267
  }))) throw new NowBuildError({
55266
55268
  code: "BUILD_UTILS_NODE_VERSION_INVALID",
55267
- link: "http://vercel.link/node-version",
55269
+ link: "https://vercel.link/node-version",
55268
55270
  message: `Found invalid Node.js Version: "${engineRange}". ${getHint(isAuto, availableVersions)}`
55269
55271
  });
55270
55272
  }
55271
55273
  if (!selection) selection = getLatestNodeVersion(availableVersions);
55272
55274
  if (selection.state === "discontinued") throw new NowBuildError({
55273
55275
  code: "BUILD_UTILS_NODE_VERSION_DISCONTINUED",
55274
- link: "http://vercel.link/node-version",
55276
+ link: "https://vercel.link/node-version",
55275
55277
  message: `${`Node.js Version "${selection.range}" is discontinued and must be upgraded.`} ${getHint(isAuto)}`
55276
55278
  });
55277
55279
  debug$1(`Selected Node.js ${selection.range}`);
@@ -55305,6 +55307,7 @@ ${error.message}`;
55305
55307
  var import_toml = __toESM(require_toml());
55306
55308
  var import_fs_extra6 = __toESM(require_lib());
55307
55309
  var import_error_utils = __toESM(require_dist());
55310
+ var import_path5 = __require("path");
55308
55311
  async function readFileOrNull(file) {
55309
55312
  try {
55310
55313
  return await (0, import_fs_extra6.readFile)(file);
@@ -55331,6 +55334,14 @@ ${error.message}`;
55331
55334
  }
55332
55335
  return null;
55333
55336
  }
55337
+ async function getPackageJson(dir) {
55338
+ const packagePath = (0, import_path5.join)(dir, "package.json");
55339
+ try {
55340
+ return JSON.parse(await (0, import_fs_extra6.readFile)(packagePath, "utf8"));
55341
+ } catch (err) {
55342
+ return {};
55343
+ }
55344
+ }
55334
55345
  var { hasOwnProperty: hasOwnProperty2 } = Object.prototype;
55335
55346
  function cloneEnv(...envs) {
55336
55347
  return envs.reduce((obj, env) => {
@@ -55388,12 +55399,12 @@ ${error.message}`;
55388
55399
  return true;
55389
55400
  }
55390
55401
  function* traverseUpDirectories({ start, base }) {
55391
- let current = import_path5.default.normalize(start);
55392
- const normalizedRoot = base ? import_path5.default.normalize(base) : void 0;
55402
+ let current = import_path6.default.normalize(start);
55403
+ const normalizedRoot = base ? import_path6.default.normalize(base) : void 0;
55393
55404
  while (current) {
55394
55405
  yield current;
55395
55406
  if (current === normalizedRoot) break;
55396
- const next = import_path5.default.join(current, "..");
55407
+ const next = import_path6.default.join(current, "..");
55397
55408
  current = next === current ? void 0 : next;
55398
55409
  }
55399
55410
  }
@@ -55403,24 +55414,24 @@ ${error.message}`;
55403
55414
  start,
55404
55415
  base
55405
55416
  })) {
55406
- const packageJsonPath = import_path5.default.join(dir, "package.json");
55417
+ const packageJsonPath = import_path6.default.join(dir, "package.json");
55407
55418
  if (await import_fs_extra7.default.pathExists(packageJsonPath)) curRootPackageJsonPath = packageJsonPath;
55408
55419
  }
55409
55420
  return curRootPackageJsonPath ? {
55410
55421
  packageJson: await import_fs_extra7.default.readJson(curRootPackageJsonPath),
55411
- rootDir: import_path5.default.dirname(curRootPackageJsonPath)
55422
+ rootDir: import_path6.default.dirname(curRootPackageJsonPath)
55412
55423
  } : void 0;
55413
55424
  }
55414
55425
  async function getNodeBinPath({ cwd }) {
55415
55426
  const { lockfilePath } = await scanParentDirs(cwd);
55416
- const dir = import_path5.default.dirname(lockfilePath || cwd);
55417
- return import_path5.default.join(dir, "node_modules", ".bin");
55427
+ const dir = import_path6.default.dirname(lockfilePath || cwd);
55428
+ return import_path6.default.join(dir, "node_modules", ".bin");
55418
55429
  }
55419
55430
  function getNodeBinPaths({ start, base }) {
55420
55431
  return Array.from(traverseUpDirectories({
55421
55432
  start,
55422
55433
  base
55423
- })).map((dir) => import_path5.default.join(dir, "node_modules/.bin"));
55434
+ })).map((dir) => import_path6.default.join(dir, "node_modules/.bin"));
55424
55435
  }
55425
55436
  async function chmodPlusX(fsPath) {
55426
55437
  const s = await import_fs_extra7.default.stat(fsPath);
@@ -55430,10 +55441,10 @@ ${error.message}`;
55430
55441
  await import_fs_extra7.default.chmod(fsPath, base8);
55431
55442
  }
55432
55443
  async function runShellScript(fsPath, args = [], spawnOpts) {
55433
- (0, import_assert6.default)(import_path5.default.isAbsolute(fsPath));
55434
- const destPath = import_path5.default.dirname(fsPath);
55444
+ (0, import_assert6.default)(import_path6.default.isAbsolute(fsPath));
55445
+ const destPath = import_path6.default.dirname(fsPath);
55435
55446
  await chmodPlusX(fsPath);
55436
- const command = `./${import_path5.default.basename(fsPath)}`;
55447
+ const command = `./${import_path6.default.basename(fsPath)}`;
55437
55448
  await spawnAsync(command, args, {
55438
55449
  ...spawnOpts,
55439
55450
  cwd: destPath,
@@ -55446,7 +55457,7 @@ ${error.message}`;
55446
55457
  if (isBunVersion(nodeVersion)) return opts;
55447
55458
  if (!meta.isDev) {
55448
55459
  let found = false;
55449
- const pathSegments = (opts.env.PATH || process.env.PATH || "").split(import_path5.default.delimiter).map((segment) => {
55460
+ const pathSegments = (opts.env.PATH || process.env.PATH || "").split(import_path6.default.delimiter).map((segment) => {
55450
55461
  if (/^\/node[0-9]+\/bin/.test(segment)) {
55451
55462
  found = true;
55452
55463
  return `/node${nodeVersion.major}/bin`;
@@ -55454,11 +55465,11 @@ ${error.message}`;
55454
55465
  return segment;
55455
55466
  });
55456
55467
  if (!found) pathSegments.unshift(`/node${nodeVersion.major}/bin`);
55457
- opts.env.PATH = pathSegments.filter(Boolean).join(import_path5.default.delimiter);
55468
+ opts.env.PATH = pathSegments.filter(Boolean).join(import_path6.default.delimiter);
55458
55469
  }
55459
55470
  return opts;
55460
55471
  }
55461
- async function getNodeVersion(destPath, fallbackVersion = process.env.VERCEL_PROJECT_SETTINGS_NODE_VERSION, config = {}, meta = {}, availableVersions = getAvailableNodeVersions()) {
55472
+ async function getRuntimeNodeVersion(destPath, fallbackVersion = process.env.VERCEL_PROJECT_SETTINGS_NODE_VERSION, config = {}, meta = {}, availableVersions = getAvailableNodeVersions()) {
55462
55473
  if (config.bunVersion) return getSupportedBunVersion(config.bunVersion);
55463
55474
  const latestVersion = getLatestNodeVersion(availableVersions);
55464
55475
  if (meta.isDev) {
@@ -55471,14 +55482,14 @@ ${error.message}`;
55471
55482
  const supportedNodeVersion = await getSupportedNodeVersion(packageJsonVersion || configuredVersion, !packageJsonVersion, availableVersions);
55472
55483
  if (packageJson?.engines?.node) {
55473
55484
  const { node } = packageJson.engines;
55474
- if (configuredVersion && !(0, import_semver2.intersects)(configuredVersion, supportedNodeVersion.range)) console.warn(`Warning: Due to "engines": { "node": "${node}" } in your \`package.json\` file, the Node.js Version defined in your Project Settings ("${configuredVersion}") will not apply, Node.js Version "${supportedNodeVersion.range}" will be used instead. Learn More: http://vercel.link/node-version`);
55475
- if ((0, import_semver2.coerce)(node)?.raw === node) console.warn(`Warning: Detected "engines": { "node": "${node}" } in your \`package.json\` with major.minor.patch, but only major Node.js Version can be selected. Learn More: http://vercel.link/node-version`);
55476
- else if ((0, import_semver2.validRange)(node) && (0, import_semver2.intersects)(`${latestVersion.major + 1}.x`, node)) console.warn(`Warning: Detected "engines": { "node": "${node}" } in your \`package.json\` that will automatically upgrade when a new major Node.js Version is released. Learn More: http://vercel.link/node-version`);
55485
+ if (configuredVersion && !(0, import_semver2.intersects)(configuredVersion, supportedNodeVersion.range)) console.warn(`Warning: Due to "engines": { "node": "${node}" } in your \`package.json\` file, the Node.js Version defined in your Project Settings ("${configuredVersion}") will not apply, Node.js Version "${supportedNodeVersion.range}" will be used instead. Learn More: https://vercel.link/node-version`);
55486
+ if ((0, import_semver2.coerce)(node)?.raw === node) console.warn(`Warning: Detected "engines": { "node": "${node}" } in your \`package.json\` with major.minor.patch, but only major Node.js Version can be selected. Learn More: https://vercel.link/node-version`);
55487
+ else if ((0, import_semver2.validRange)(node) && (0, import_semver2.intersects)(`${latestVersion.major + 1}.x`, node)) console.warn(`Warning: Detected "engines": { "node": "${node}" } in your \`package.json\` that will automatically upgrade when a new major Node.js Version is released. Learn More: https://vercel.link/node-version`);
55477
55488
  }
55478
55489
  return supportedNodeVersion;
55479
55490
  }
55480
55491
  async function scanParentDirs(destPath, readPackageJson = false, base = "/") {
55481
- (0, import_assert6.default)(import_path5.default.isAbsolute(destPath));
55492
+ (0, import_assert6.default)(import_path6.default.isAbsolute(destPath));
55482
55493
  const pkgJsonPath = await walkParentDirs({
55483
55494
  base,
55484
55495
  start: destPath,
@@ -55564,8 +55575,8 @@ ${error.message}`;
55564
55575
  }
55565
55576
  async function checkTurboSupportsCorepack(turboVersionRange, rootDir) {
55566
55577
  if (turboVersionSpecifierSupportsCorepack(turboVersionRange)) return true;
55567
- const turboJsonPath = import_path5.default.join(rootDir, "turbo.json");
55568
- const turboJsoncPath = import_path5.default.join(rootDir, "turbo.jsonc");
55578
+ const turboJsonPath = import_path6.default.join(rootDir, "turbo.json");
55579
+ const turboJsoncPath = import_path6.default.join(rootDir, "turbo.jsonc");
55569
55580
  const [turboJsonExists, turboJsoncExists] = await Promise.all([import_fs_extra7.default.pathExists(turboJsonPath), import_fs_extra7.default.pathExists(turboJsoncPath)]);
55570
55581
  let turboJson = null;
55571
55582
  let turboConfigPath = null;
@@ -55574,7 +55585,7 @@ ${error.message}`;
55574
55585
  if (turboConfigPath) try {
55575
55586
  turboJson = import_json5.default.parse(await import_fs_extra7.default.readFile(turboConfigPath, "utf8"));
55576
55587
  } catch (err) {
55577
- console.warn(`WARNING: Failed to parse ${import_path5.default.basename(turboConfigPath)}`);
55588
+ console.warn(`WARNING: Failed to parse ${import_path6.default.basename(turboConfigPath)}`);
55578
55589
  }
55579
55590
  return turboJson !== null && typeof turboJson === "object" && "globalPassThroughEnv" in turboJson && Array.isArray(turboJson.globalPassThroughEnv) && turboJson.globalPassThroughEnv.includes("COREPACK_HOME");
55580
55591
  }
@@ -55608,13 +55619,13 @@ ${error.message}`;
55608
55619
  return true;
55609
55620
  }
55610
55621
  async function walkParentDirs({ base, start, filename }) {
55611
- (0, import_assert6.default)(import_path5.default.isAbsolute(base), "Expected \"base\" to be absolute path");
55612
- (0, import_assert6.default)(import_path5.default.isAbsolute(start), "Expected \"start\" to be absolute path");
55622
+ (0, import_assert6.default)(import_path6.default.isAbsolute(base), "Expected \"base\" to be absolute path");
55623
+ (0, import_assert6.default)(import_path6.default.isAbsolute(start), "Expected \"start\" to be absolute path");
55613
55624
  for (const dir of traverseUpDirectories({
55614
55625
  start,
55615
55626
  base
55616
55627
  })) {
55617
- const fullPath = import_path5.default.join(dir, filename);
55628
+ const fullPath = import_path6.default.join(dir, filename);
55618
55629
  if (await import_fs_extra7.default.pathExists(fullPath)) return fullPath;
55619
55630
  }
55620
55631
  return null;
@@ -55625,10 +55636,10 @@ ${error.message}`;
55625
55636
  start,
55626
55637
  base
55627
55638
  })) {
55628
- const fullPaths = filenames.map((f) => import_path5.default.join(dir, f));
55639
+ const fullPaths = filenames.map((f) => import_path6.default.join(dir, f));
55629
55640
  const existResults = await Promise.all(fullPaths.map((f) => import_fs_extra7.default.pathExists(f)));
55630
55641
  const foundOneOrMore = existResults.some((b) => b);
55631
- const packageJsonPath = import_path5.default.join(dir, "package.json");
55642
+ const packageJsonPath = import_path6.default.join(dir, "package.json");
55632
55643
  const packageJson = await import_fs_extra7.default.readJSON(packageJsonPath).catch(() => null);
55633
55644
  if (packageJson?.packageManager) packageManager = packageJson.packageManager;
55634
55645
  if (foundOneOrMore) return {
@@ -55688,12 +55699,16 @@ ${error.message}`;
55688
55699
  };
55689
55700
  }
55690
55701
  var runNpmInstallSema = new import_async_sema4.default(1);
55702
+ var customInstallCommandSet;
55703
+ function resetCustomInstallCommandSet() {
55704
+ customInstallCommandSet = void 0;
55705
+ }
55691
55706
  async function runNpmInstall(destPath, args = [], spawnOpts, meta, projectCreatedAt) {
55692
55707
  if (meta?.isDev) {
55693
55708
  debug$1("Skipping dependency installation because dev mode is enabled");
55694
55709
  return false;
55695
55710
  }
55696
- (0, import_assert6.default)(import_path5.default.isAbsolute(destPath));
55711
+ (0, import_assert6.default)(import_path6.default.isAbsolute(destPath));
55697
55712
  try {
55698
55713
  await runNpmInstallSema.acquire();
55699
55714
  const { cliType, packageJsonPath, packageJson, lockfileVersion, packageJsonPackageManager, turboSupportsCorepackHome } = await scanParentDirs(destPath, true);
@@ -55705,6 +55720,12 @@ ${error.message}`;
55705
55720
  if (meta && packageJsonPath && defaultInstall) {
55706
55721
  const { alreadyInstalled, runNpmInstallSet } = checkIfAlreadyInstalled(meta.runNpmInstallSet, packageJsonPath);
55707
55722
  if (alreadyInstalled) return false;
55723
+ if (process.env.VERCEL_INSTALL_COMPLETED === "1") {
55724
+ debug$1(`Skipping dependency installation for ${packageJsonPath} because VERCEL_INSTALL_COMPLETED is set`);
55725
+ runNpmInstallSet.add(packageJsonPath);
55726
+ meta.runNpmInstallSet = runNpmInstallSet;
55727
+ return false;
55728
+ }
55708
55729
  meta.runNpmInstallSet = runNpmInstallSet;
55709
55730
  }
55710
55731
  if (cliType === "yarn") {
@@ -55760,11 +55781,11 @@ ${error.message}`;
55760
55781
  else debug$1(`Detected ${detectedPackageManager}. Added "${newPath}" to path. Based on assumed package manager "${cliType}", lockfile "${detectedLockfile}", and lockfileVersion "${lockfileVersion}"`);
55761
55782
  const newEnv = { ...env };
55762
55783
  const alreadyInPath = (newPath2) => {
55763
- return (env.PATH ?? "").split(import_path5.default.delimiter).includes(newPath2);
55784
+ return (env.PATH ?? "").split(import_path6.default.delimiter).includes(newPath2);
55764
55785
  };
55765
55786
  if (newPath && !alreadyInPath(newPath)) {
55766
55787
  const oldPath = env.PATH + "";
55767
- newEnv.PATH = `${newPath}${import_path5.default.delimiter}${oldPath}`;
55788
+ newEnv.PATH = `${newPath}${import_path6.default.delimiter}${oldPath}`;
55768
55789
  if (detectedLockfile && detectedPackageManager) {
55769
55790
  const detectedV9PnpmLockfile = detectedLockfile === "pnpm-lock.yaml" && lockfileVersion === 9;
55770
55791
  if (detectedPackageManager === "pnpm@10.x" && packageJsonPackageManager) {
@@ -55931,7 +55952,7 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
55931
55952
  });
55932
55953
  if (corepackEnabled) overrides = NO_OVERRIDE;
55933
55954
  const alreadyInPath = (newPath) => {
55934
- return (env.PATH ?? "").split(import_path5.default.delimiter).includes(newPath);
55955
+ return (env.PATH ?? "").split(import_path6.default.delimiter).includes(newPath);
55935
55956
  };
55936
55957
  switch (true) {
55937
55958
  case cliType === "yarn" && !env.YARN_NODE_LINKER: return {
@@ -55951,6 +55972,17 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
55951
55972
  }
55952
55973
  }
55953
55974
  async function runCustomInstallCommand({ destPath, installCommand, spawnOpts, projectCreatedAt }) {
55975
+ const normalizedPath = import_path6.default.normalize(destPath);
55976
+ const { alreadyInstalled, runNpmInstallSet } = checkIfAlreadyInstalled(customInstallCommandSet, normalizedPath);
55977
+ customInstallCommandSet = runNpmInstallSet;
55978
+ if (alreadyInstalled) {
55979
+ debug$1(`Skipping custom install command for ${normalizedPath} because it was already run`);
55980
+ return false;
55981
+ }
55982
+ if (process.env.VERCEL_INSTALL_COMPLETED === "1") {
55983
+ debug$1(`Skipping custom install command for ${normalizedPath} because VERCEL_INSTALL_COMPLETED is set`);
55984
+ return false;
55985
+ }
55954
55986
  console.log(`Running "install" command: \`${installCommand}\`...`);
55955
55987
  const { cliType, lockfileVersion, packageJson, packageJsonPackageManager, turboSupportsCorepackHome } = await scanParentDirs(destPath, true);
55956
55988
  const env = getEnvForPackageManager({
@@ -55968,9 +56000,10 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
55968
56000
  env,
55969
56001
  cwd: destPath
55970
56002
  });
56003
+ return true;
55971
56004
  }
55972
56005
  async function runPackageJsonScript(destPath, scriptNames, spawnOpts, projectCreatedAt) {
55973
- (0, import_assert6.default)(import_path5.default.isAbsolute(destPath));
56006
+ (0, import_assert6.default)(import_path6.default.isAbsolute(destPath));
55974
56007
  const { packageJson, cliType, lockfileVersion, packageJsonPackageManager, turboSupportsCorepackHome } = await scanParentDirs(destPath, true);
55975
56008
  const scriptName = getScriptName(packageJson, typeof scriptNames === "string" ? [scriptNames] : scriptNames);
55976
56009
  if (!scriptName) return false;
@@ -56004,7 +56037,7 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
56004
56037
  debug$1("Skipping dependency installation because dev mode is enabled");
56005
56038
  return;
56006
56039
  }
56007
- (0, import_assert6.default)(import_path5.default.isAbsolute(destPath));
56040
+ (0, import_assert6.default)(import_path6.default.isAbsolute(destPath));
56008
56041
  const opts = {
56009
56042
  ...spawnOpts,
56010
56043
  cwd: destPath,
@@ -56017,7 +56050,7 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
56017
56050
  debug$1("Skipping dependency installation because dev mode is enabled");
56018
56051
  return;
56019
56052
  }
56020
- (0, import_assert6.default)(import_path5.default.isAbsolute(destPath));
56053
+ (0, import_assert6.default)(import_path6.default.isAbsolute(destPath));
56021
56054
  const opts = {
56022
56055
  ...spawnOpts,
56023
56056
  cwd: destPath,
@@ -56035,7 +56068,7 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
56035
56068
  }
56036
56069
  }
56037
56070
  var installDependencies = (0, import_util2.deprecate)(runNpmInstall, "installDependencies() is deprecated. Please use runNpmInstall() instead.");
56038
- var import_path6 = __toESM(__require("path"));
56071
+ var import_path7 = __toESM(__require("path"));
56039
56072
  var import_fs_extra8 = __toESM(require_lib());
56040
56073
  var import_ignore = __toESM(require_ignore());
56041
56074
  function isCodedError(error) {
@@ -56053,8 +56086,8 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
56053
56086
  throw error;
56054
56087
  }
56055
56088
  };
56056
- const vercelIgnorePath = import_path6.default.join(downloadPath, rootDirectory || "", ".vercelignore");
56057
- const nowIgnorePath = import_path6.default.join(downloadPath, rootDirectory || "", ".nowignore");
56089
+ const vercelIgnorePath = import_path7.default.join(downloadPath, rootDirectory || "", ".vercelignore");
56090
+ const nowIgnorePath = import_path7.default.join(downloadPath, rootDirectory || "", ".nowignore");
56058
56091
  const ignoreContents = [];
56059
56092
  try {
56060
56093
  ignoreContents.push(...(await Promise.all([readFile4(vercelIgnorePath), readFile4(nowIgnorePath)])).filter(Boolean));
@@ -56092,18 +56125,18 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
56092
56125
  }
56093
56126
  return newEnvs;
56094
56127
  }
56095
- var import_path7 = __toESM(__require("path"));
56128
+ var import_path8 = __toESM(__require("path"));
56096
56129
  var import_fs2 = __require("fs");
56097
56130
  async function hardLinkDir(src, destDirs) {
56098
56131
  if (destDirs.length === 0) return;
56099
- destDirs = destDirs.filter((destDir) => import_path7.default.relative(destDir, src) !== "");
56132
+ destDirs = destDirs.filter((destDir) => import_path8.default.relative(destDir, src) !== "");
56100
56133
  const files = await import_fs2.promises.readdir(src);
56101
56134
  await Promise.all(files.map(async (file) => {
56102
56135
  if (file === "node_modules") return;
56103
- const srcFile = import_path7.default.join(src, file);
56136
+ const srcFile = import_path8.default.join(src, file);
56104
56137
  if ((await import_fs2.promises.lstat(srcFile)).isDirectory()) {
56105
56138
  await hardLinkDir(srcFile, await Promise.all(destDirs.map(async (destDir) => {
56106
- const destSubdir = import_path7.default.join(destDir, file);
56139
+ const destSubdir = import_path8.default.join(destDir, file);
56107
56140
  try {
56108
56141
  await import_fs2.promises.mkdir(destSubdir, { recursive: true });
56109
56142
  } catch (err) {
@@ -56114,7 +56147,7 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
56114
56147
  return;
56115
56148
  }
56116
56149
  await Promise.all(destDirs.map(async (destDir) => {
56117
- const destFile = import_path7.default.join(destDir, file);
56150
+ const destFile = import_path8.default.join(destDir, file);
56118
56151
  try {
56119
56152
  await linkOrCopyFile(srcFile, destFile);
56120
56153
  } catch (err) {
@@ -56129,7 +56162,7 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
56129
56162
  await linkOrCopy(srcFile, destFile);
56130
56163
  } catch (err) {
56131
56164
  if (err.code === "ENOENT") {
56132
- await import_fs2.promises.mkdir(import_path7.default.dirname(destFile), { recursive: true });
56165
+ await import_fs2.promises.mkdir(import_path8.default.dirname(destFile), { recursive: true });
56133
56166
  await linkOrCopy(srcFile, destFile);
56134
56167
  return;
56135
56168
  }
@@ -56144,10 +56177,10 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
56144
56177
  await import_fs2.promises.copyFile(srcFile, destFile);
56145
56178
  }
56146
56179
  }
56147
- var import_path8 = __require("path");
56180
+ var import_path9 = __require("path");
56148
56181
  var import_promises = __require("fs/promises");
56149
56182
  async function validateNpmrc(cwd) {
56150
- if ((await (0, import_promises.readFile)((0, import_path8.join)(cwd, ".npmrc"), "utf-8").catch((err) => {
56183
+ if ((await (0, import_promises.readFile)((0, import_path9.join)(cwd, ".npmrc"), "utf-8").catch((err) => {
56151
56184
  if (err.code !== "ENOENT") throw err;
56152
56185
  }))?.match(/(?<!#.*)use-node-version/)) throw new Error("Detected unsupported \"use-node-version\" in your \".npmrc\". Please use \"engines\" in your \"package.json\" instead.");
56153
56186
  }
@@ -56188,12 +56221,12 @@ To use ${otherVersion}, manually opt in using corepack (https://vercel.com/docs/
56188
56221
  if (!os) return "provided.al2023";
56189
56222
  return os.PRETTY_NAME === "Amazon Linux 2" ? "provided.al2" : "provided.al2023";
56190
56223
  }
56191
- var import_path9 = __require("path");
56224
+ var import_path10 = __require("path");
56192
56225
  var shouldServe = ({ entrypoint, files, requestPath }) => {
56193
56226
  requestPath = requestPath.replace(/\/$/, "");
56194
56227
  entrypoint = entrypoint.replace(/\\/, "/");
56195
56228
  if (entrypoint === requestPath && hasProp(files, entrypoint)) return true;
56196
- const { dir, name } = (0, import_path9.parse)(entrypoint);
56229
+ const { dir, name } = (0, import_path10.parse)(entrypoint);
56197
56230
  if (name === "index" && dir === requestPath && hasProp(files, entrypoint)) return true;
56198
56231
  return false;
56199
56232
  };
@@ -56474,6 +56507,7 @@ ${entrypointsForMessage}`);
56474
56507
  "express",
56475
56508
  "hono",
56476
56509
  "h3",
56510
+ "koa",
56477
56511
  "nestjs",
56478
56512
  "fastify",
56479
56513
  "elysia"
@@ -56482,6 +56516,7 @@ ${entrypointsForMessage}`);
56482
56516
  "@vercel/express",
56483
56517
  "@vercel/hono",
56484
56518
  "@vercel/h3",
56519
+ "@vercel/koa",
56485
56520
  "@vercel/nestjs",
56486
56521
  "@vercel/fastify",
56487
56522
  "@vercel/elysia"
@@ -56505,12 +56540,12 @@ ${entrypointsForMessage}`);
56505
56540
  return isExperimentalBackendsEnabled() && isBackendFramework(framework);
56506
56541
  }
56507
56542
  var import_fs3 = __toESM(__require("fs"));
56508
- var import_path10 = __require("path");
56543
+ var import_path11 = __require("path");
56509
56544
  var import_execa = __toESM(require_execa());
56510
56545
  var isWin2 = process.platform === "win32";
56511
56546
  async function runStdlibPyScript(options) {
56512
56547
  const { scriptName, pythonPath, args = [], cwd } = options;
56513
- const scriptPath = (0, import_path10.join)(__dirname, "..", "lib", "python", `${scriptName}.py`);
56548
+ const scriptPath = (0, import_path11.join)(__dirname, "..", "lib", "python", `${scriptName}.py`);
56514
56549
  if (!import_fs3.default.existsSync(scriptPath)) throw new Error(`Python script not found: ${scriptPath}`);
56515
56550
  const pythonCmd = pythonPath ?? (isWin2 ? "python" : "python3");
56516
56551
  debug$1(`Running stdlib Python script: ${pythonCmd} ${scriptPath} ${args.join(" ")}`);