vercel 59.6.2 → 59.9.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (89) hide show
  1. package/dist/chunks/{add-HJSEM4YJ.js → add-6YKY5LGR.js} +2 -2
  2. package/dist/chunks/{add-4GQZ22ZN.js → add-DGK2A56E.js} +2 -2
  3. package/dist/chunks/{add-SIGUSM3Y.js → add-QZ5FW7LT.js} +5 -5
  4. package/dist/chunks/{build-XOMJDX4M.js → build-YFUXHSMU.js} +2 -2
  5. package/dist/chunks/{chunk-GISTGGBO.js → chunk-22GK226I.js} +3 -3
  6. package/dist/chunks/{chunk-WZ2S3A2A.js → chunk-2TXLG52H.js} +19 -3
  7. package/dist/chunks/{chunk-PRH6KRUT.js → chunk-3E62ATUY.js} +1 -1
  8. package/dist/chunks/{chunk-LXZVOR6F.js → chunk-52P3DIMH.js} +1 -1
  9. package/dist/chunks/{chunk-FRZULOVH.js → chunk-62XYUSRS.js} +1 -1
  10. package/dist/chunks/{chunk-V3MDDR2X.js → chunk-7PMXNOZH.js} +1 -1
  11. package/dist/chunks/{chunk-YJKZQEHS.js → chunk-DSBOE2OV.js} +1 -1
  12. package/dist/chunks/{chunk-R5PULMHT.js → chunk-FEQJSISH.js} +1 -1
  13. package/dist/chunks/{chunk-ZNMTDLYH.js → chunk-FME4CIZL.js} +2 -2
  14. package/dist/chunks/{chunk-SF3AYAIF.js → chunk-H43VTKRO.js} +4 -4
  15. package/dist/chunks/{chunk-3F5EGINT.js → chunk-HK2IYHVR.js} +1 -1
  16. package/dist/chunks/{chunk-2YRAWYGE.js → chunk-I526H4AS.js} +17 -0
  17. package/dist/chunks/{chunk-JH4WQRIU.js → chunk-I7ZVTKXM.js} +1 -1
  18. package/dist/chunks/{chunk-SWI6F4X3.js → chunk-IWNFDR3C.js} +5 -1
  19. package/dist/chunks/{chunk-YJUO3EKH.js → chunk-KJBZ5ZST.js} +0 -1
  20. package/dist/chunks/{chunk-37V5P4VO.js → chunk-LD3Q3MUI.js} +6 -6
  21. package/dist/chunks/{chunk-7HE63HCR.js → chunk-LDZFKXIR.js} +5 -1
  22. package/dist/chunks/{chunk-VJ5NAOWB.js → chunk-OHQJEOP7.js} +312 -192
  23. package/dist/chunks/{chunk-NGNN6WF2.js → chunk-PGTGT7AU.js} +3 -3
  24. package/dist/chunks/{chunk-GZQQNLF5.js → chunk-PIFTX5CY.js} +2 -2
  25. package/dist/chunks/{chunk-7R6M3BHM.js → chunk-QWOCOZMS.js} +1 -1
  26. package/dist/chunks/{chunk-6M2KZUED.js → chunk-T3MRP74K.js} +1 -1
  27. package/dist/chunks/{chunk-DE7MBNHQ.js → chunk-XN75ARAD.js} +1 -1
  28. package/dist/chunks/{chunk-2O5J3KMT.js → chunk-ZCAFRSCD.js} +1 -1
  29. package/dist/chunks/{clear-BWT2FJY4.js → clear-LHNLYPZB.js} +2 -2
  30. package/dist/chunks/{compile-vercel-config-DGM4NISW.js → compile-vercel-config-6KPIBWNU.js} +1 -1
  31. package/dist/chunks/{config-RSE6Z4LB.js → config-CNP7P3VD.js} +5 -5
  32. package/dist/chunks/{config-NJAN3RMU.js → config-UETLVP5G.js} +2 -2
  33. package/dist/chunks/config-validator.mjs +1 -1
  34. package/dist/chunks/{delete-SSL2PK2F.js → delete-BYCZJBHH.js} +2 -2
  35. package/dist/chunks/{delete-LROBRBAH.js → delete-MB7H2LWR.js} +2 -2
  36. package/dist/chunks/{disable-ASG5JDZR.js → disable-OCDW6U2Q.js} +2 -2
  37. package/dist/chunks/{discard-PV47B6IL.js → discard-DWPG5UX5.js} +2 -2
  38. package/dist/chunks/{edit-REI7HXGG.js → edit-ATX4K4OL.js} +2 -2
  39. package/dist/chunks/{edit-5ATYIOLX.js → edit-NOZXPAV3.js} +3 -3
  40. package/dist/chunks/{enable-LZXL7XAG.js → enable-BO5DALIP.js} +2 -2
  41. package/dist/chunks/{export-ZAZFQU2E.js → export-RS6X5DZW.js} +2 -2
  42. package/dist/chunks/{image-QPHN5V7L.js → image-QCNVSQFC.js} +3 -3
  43. package/dist/chunks/{import-builders-W3YE2V6A.js → import-builders-H4VASUQQ.js} +2 -2
  44. package/dist/chunks/{inspect-BFGK72WY.js → inspect-BOLFZZBM.js} +3 -3
  45. package/dist/chunks/{inspect-SJEZVGPK.js → inspect-GPLZZEW2.js} +2 -2
  46. package/dist/chunks/{inspect-SSOM3FXS.js → inspect-HHXFMDN2.js} +2 -2
  47. package/dist/chunks/{inspect-RDMC2Z3Q.js → inspect-LZUSSUNE.js} +2 -2
  48. package/dist/chunks/{inspect-FRXJRM6T.js → inspect-XXHIV73A.js} +2 -2
  49. package/dist/chunks/{list-PHDUZVMR.js → list-H7ED7LCU.js} +1 -1
  50. package/dist/chunks/{list-2HTR7Q3J.js → list-THFMP23I.js} +2 -2
  51. package/dist/chunks/{list-W33GXKDA.js → list-XDRILJOZ.js} +3 -3
  52. package/dist/chunks/{login-JWAFHVDG.js → login-6KR5DCYM.js} +2 -2
  53. package/dist/chunks/{ls-3MH2OCP3.js → ls-5QFIXKF3.js} +2 -2
  54. package/dist/chunks/{ls-KX2VBOGV.js → ls-5RGCKNYB.js} +3 -3
  55. package/dist/chunks/{ls-KDFU224B.js → ls-CBFHIORN.js} +2 -2
  56. package/dist/chunks/{ls-D2POUHI7.js → ls-GRY6G2OR.js} +2 -2
  57. package/dist/chunks/{ls-3AN2DZHN.js → ls-LXVF34KZ.js} +2 -2
  58. package/dist/chunks/{ls-RWKNJQNT.js → ls-PKN53PLB.js} +2 -2
  59. package/dist/chunks/{open-IEYRB6RL.js → open-Q7GEQR5J.js} +2 -2
  60. package/dist/chunks/{permissions-ZWZUMEHR.js → permissions-6SA56V2A.js} +4 -4
  61. package/dist/chunks/{publish-UWZYBDHK.js → publish-TYGP2WTZ.js} +2 -2
  62. package/dist/chunks/{push-IAEQ3FBF.js → push-5KTXEM2H.js} +2 -2
  63. package/dist/chunks/{query-NNOZYSED.js → query-DSYDUL7N.js} +1 -1
  64. package/dist/chunks/{reorder-TKBM244W.js → reorder-BEQAMXC3.js} +2 -2
  65. package/dist/chunks/{reply-FLBSBMTW.js → reply-GSQ5PVE4.js} +2 -2
  66. package/dist/chunks/{resolve-GJYPMWUE.js → resolve-AG4SS62T.js} +2 -2
  67. package/dist/chunks/{restore-PNI3TM3U.js → restore-LARYR55K.js} +2 -2
  68. package/dist/chunks/{rm-FN7LTIIL.js → rm-F5SIKHU2.js} +2 -2
  69. package/dist/chunks/{rm-PGJ4KR6U.js → rm-FG63ON57.js} +2 -2
  70. package/dist/chunks/{rm-76CSSSSV.js → rm-FPAFEN2E.js} +2 -2
  71. package/dist/chunks/{rm-FTE33UHE.js → rm-GPHZ3GID.js} +3 -3
  72. package/dist/chunks/{rm-FXA5DLXQ.js → rm-ZKG56ZEW.js} +3 -3
  73. package/dist/chunks/{rule-inspect-LJIGPTWS.js → rule-inspect-JS4BK6GZ.js} +3 -3
  74. package/dist/chunks/{rules-6BMNO6M5.js → rules-SMIGLNUR.js} +6 -6
  75. package/dist/chunks/{schema-HATXEQDP.js → schema-FRSEAOYM.js} +1 -1
  76. package/dist/chunks/{set-C3UQUQ42.js → set-E46SNNNI.js} +3 -3
  77. package/dist/chunks/{tags-BTVDROFG.js → tags-CMBXR3FL.js} +2 -2
  78. package/dist/chunks/{update-B6PSOHUW.js → update-M5WXFGQ4.js} +5 -5
  79. package/dist/commands/build/index.js +115 -7
  80. package/dist/commands/deploy/index.js +8 -8
  81. package/dist/commands/dev/index.js +335 -46
  82. package/dist/commands/env/index.js +4 -4
  83. package/dist/commands/link/index.js +3 -3
  84. package/dist/commands/list/index.js +3 -3
  85. package/dist/commands-bulk.js +92 -65
  86. package/dist/help.js +1 -1
  87. package/dist/index.js +9 -9
  88. package/dist/version.mjs +1 -1
  89. package/package.json +50 -50
@@ -21506,6 +21506,7 @@ var require_detect_framework = __commonJS({
21506
21506
  removeSupersededFrameworks: () => removeSupersededFrameworks
21507
21507
  });
21508
21508
  module.exports = __toCommonJS2(detect_framework_exports);
21509
+ var import_build_utils11 = __require("@vercel/build-utils");
21509
21510
  var import_child_process3 = __require("child_process");
21510
21511
  function shouldIncludeExperimentalFrameworks(useExperimentalFrameworks) {
21511
21512
  if (typeof useExperimentalFrameworks === "boolean") {
@@ -21707,15 +21708,12 @@ var require_detect_framework = __commonJS({
21707
21708
  if (!firstMatchPackage?.matchPackage) {
21708
21709
  return;
21709
21710
  }
21710
- return lookupInstalledVersion(
21711
- process.execPath,
21712
- firstMatchPackage.matchPackage
21713
- );
21711
+ return lookupInstalledVersion(firstMatchPackage.matchPackage);
21714
21712
  }
21715
- function lookupInstalledVersion(cwd, packageName2) {
21713
+ function lookupInstalledVersion(packageName2) {
21716
21714
  try {
21717
21715
  const script = `require('${packageName2}/package.json').version`;
21718
- return (0, import_child_process3.spawnSync)(cwd, ["-p", script], {
21716
+ return (0, import_child_process3.spawnSync)((0, import_build_utils11.getNodeExecPath)(), ["-p", script], {
21719
21717
  encoding: "utf-8"
21720
21718
  }).stdout.trim();
21721
21719
  } catch (error) {
@@ -32252,9 +32250,9 @@ var require_dist5 = __commonJS({
32252
32250
  }
32253
32251
  });
32254
32252
 
32255
- // ../../internals/service-topology/dist/types.js
32256
- var require_types3 = __commonJS({
32257
- "../../internals/service-topology/dist/types.js"(exports, module) {
32253
+ // ../../internals/runtimes/dist/constants.js
32254
+ var require_constants = __commonJS({
32255
+ "../../internals/runtimes/dist/constants.js"(exports, module) {
32258
32256
  "use strict";
32259
32257
  var __defProp = Object.defineProperty;
32260
32258
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -32273,15 +32271,16 @@ var require_types3 = __commonJS({
32273
32271
  return to;
32274
32272
  };
32275
32273
  var __toCommonJS2 = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32276
- var types_exports = {};
32277
- __export2(types_exports, {
32274
+ var constants_exports = {};
32275
+ __export2(constants_exports, {
32276
+ CONTAINER_ENTRYPOINT_CANDIDATES: () => CONTAINER_ENTRYPOINT_CANDIDATES,
32278
32277
  ENTRYPOINT_EXTENSIONS: () => ENTRYPOINT_EXTENSIONS,
32279
32278
  ROUTE_OWNING_BUILDERS: () => ROUTE_OWNING_BUILDERS,
32280
32279
  RUNTIME_BUILDERS: () => RUNTIME_BUILDERS,
32281
32280
  RUNTIME_MANIFESTS: () => RUNTIME_MANIFESTS,
32282
32281
  STATIC_BUILDERS: () => STATIC_BUILDERS
32283
32282
  });
32284
- module.exports = __toCommonJS2(types_exports);
32283
+ module.exports = __toCommonJS2(constants_exports);
32285
32284
  var RUNTIME_BUILDERS = {
32286
32285
  node: "@vercel/backends",
32287
32286
  python: "@vercel/python",
@@ -32324,12 +32323,18 @@ var require_types3 = __commonJS({
32324
32323
  "@vercel/next",
32325
32324
  "@vercel/backends"
32326
32325
  ]);
32326
+ var CONTAINER_ENTRYPOINT_CANDIDATES = [
32327
+ "Dockerfile.vercel",
32328
+ "Containerfile.vercel",
32329
+ "Dockerfile",
32330
+ "Containerfile"
32331
+ ];
32327
32332
  }
32328
32333
  });
32329
32334
 
32330
- // ../../internals/service-topology/dist/utils.js
32331
- var require_utils3 = __commonJS({
32332
- "../../internals/service-topology/dist/utils.js"(exports, module) {
32335
+ // ../../internals/runtimes/dist/framework.js
32336
+ var require_framework = __commonJS({
32337
+ "../../internals/runtimes/dist/framework.js"(exports, module) {
32333
32338
  "use strict";
32334
32339
  var __defProp = Object.defineProperty;
32335
32340
  var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
@@ -32348,82 +32353,34 @@ var require_utils3 = __commonJS({
32348
32353
  return to;
32349
32354
  };
32350
32355
  var __toCommonJS2 = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32351
- var utils_exports = {};
32352
- __export2(utils_exports, {
32356
+ var framework_exports = {};
32357
+ __export2(framework_exports, {
32353
32358
  DETECTION_FRAMEWORKS: () => DETECTION_FRAMEWORKS,
32354
- INTERNAL_QUEUES_PREFIX: () => INTERNAL_QUEUES_PREFIX,
32355
- INTERNAL_SERVICE_PREFIX: () => import_build_utils11.INTERNAL_SERVICE_PREFIX,
32356
- assignMountPaths: () => assignMountPaths,
32357
- combineBuildCommand: () => combineBuildCommand,
32358
32359
  filterFrameworksByRuntime: () => filterFrameworksByRuntime,
32359
- getBuilderForRuntime: () => getBuilderForRuntime,
32360
- getInternalServiceCronPath: () => import_build_utils11.getInternalServiceCronPath,
32361
- getInternalServiceCronPathPrefix: () => import_build_utils11.getInternalServiceCronPathPrefix,
32362
- getInternalServiceFunctionPath: () => import_build_utils11.getInternalServiceFunctionPath,
32363
- getInternalServiceWorkerPath: () => import_build_utils11.getInternalServiceWorkerPath,
32364
- getInternalServiceWorkerPathPrefix: () => import_build_utils11.getInternalServiceWorkerPathPrefix,
32365
- hasFile: () => hasFile,
32366
32360
  inferRuntimeFromFramework: () => inferRuntimeFromFramework,
32367
- inferServiceRuntime: () => inferServiceRuntime,
32368
32361
  isBFFFramework: () => isBFFFramework,
32369
- isFrontendFramework: () => isFrontendFramework,
32370
- isRouteOwningBuilder: () => isRouteOwningBuilder2,
32371
- isStaticBuild: () => isStaticBuild2,
32372
- readVercelConfig: () => readVercelConfig,
32373
- stripTrailingSlash: () => stripTrailingSlash
32362
+ isFrontendFramework: () => isFrontendFramework
32374
32363
  });
32375
- module.exports = __toCommonJS2(utils_exports);
32364
+ module.exports = __toCommonJS2(framework_exports);
32376
32365
  var import_build_utils11 = __require("@vercel/build-utils");
32377
32366
  var import_frameworks6 = require_frameworks();
32378
- var import_types = require_types3();
32367
+ var import_constants3 = require_constants();
32379
32368
  var DETECTION_FRAMEWORKS = import_frameworks6.frameworkList.filter(
32380
32369
  (framework) => !framework.experimental || framework.runtimeFramework
32381
32370
  );
32382
- function stripTrailingSlash(p) {
32383
- const stripped = p.replace(/\/+$/, "");
32384
- return stripped === "" ? "." : stripped;
32385
- }
32386
- async function hasFile(fs5, filePath) {
32387
- try {
32388
- return await fs5.isFile(filePath);
32389
- } catch {
32390
- return false;
32391
- }
32392
- }
32393
- var INTERNAL_QUEUES_PREFIX = "/_svc/_queues";
32394
- function getBuilderForRuntime(runtime) {
32395
- const builder = import_types.RUNTIME_BUILDERS[runtime];
32396
- if (!builder) {
32397
- throw new Error(`Unknown runtime: ${runtime}`);
32398
- }
32399
- return builder;
32400
- }
32401
- function isStaticBuild2(service) {
32402
- return import_types.STATIC_BUILDERS.has(service.builder.use);
32403
- }
32404
- function isRouteOwningBuilder2(service) {
32405
- return import_types.ROUTE_OWNING_BUILDERS.has(service.builder.use);
32406
- }
32407
32371
  function inferRuntimeFromFramework(framework) {
32408
- if (!framework) {
32372
+ if (!framework)
32409
32373
  return void 0;
32410
- }
32411
- if (framework in import_types.RUNTIME_BUILDERS) {
32374
+ if (framework in import_constants3.RUNTIME_BUILDERS)
32412
32375
  return framework;
32413
- }
32414
- if ((0, import_build_utils11.isPythonFramework)(framework)) {
32376
+ if ((0, import_build_utils11.isPythonFramework)(framework))
32415
32377
  return "python";
32416
- }
32417
- if ((0, import_build_utils11.isBackendFramework)(framework)) {
32378
+ if ((0, import_build_utils11.isBackendFramework)(framework))
32418
32379
  return "node";
32419
- }
32420
32380
  return void 0;
32421
32381
  }
32422
32382
  function isFrontendFramework(framework) {
32423
- if (!framework) {
32424
- return false;
32425
- }
32426
- return !inferRuntimeFromFramework(framework);
32383
+ return !!framework && !inferRuntimeFromFramework(framework);
32427
32384
  }
32428
32385
  var BFF_FRAMEWORKS = /* @__PURE__ */ new Set([
32429
32386
  "nextjs",
@@ -32436,39 +32393,67 @@ var require_utils3 = __commonJS({
32436
32393
  return !!framework && BFF_FRAMEWORKS.has(framework);
32437
32394
  }
32438
32395
  function filterFrameworksByRuntime(frameworks, runtime) {
32439
- if (!runtime) {
32396
+ if (!runtime)
32440
32397
  return [...frameworks];
32441
- }
32442
- return frameworks.filter(
32443
- (framework) => inferRuntimeFromFramework(framework.slug) === runtime
32444
- );
32398
+ return frameworks.filter((f) => inferRuntimeFromFramework(f.slug) === runtime);
32445
32399
  }
32446
- function inferServiceRuntime(config) {
32447
- if (config.runtime && config.runtime in import_types.RUNTIME_BUILDERS) {
32448
- return config.runtime;
32449
- }
32450
- const frameworkRuntime = inferRuntimeFromFramework(config.framework);
32451
- if (frameworkRuntime) {
32452
- return frameworkRuntime;
32453
- }
32454
- if (config.builder) {
32455
- for (const [runtime, builderName] of Object.entries(import_types.RUNTIME_BUILDERS)) {
32456
- if (config.builder === builderName) {
32457
- return runtime;
32458
- }
32459
- }
32400
+ }
32401
+ });
32402
+
32403
+ // ../../internals/service-topology/dist/utils.js
32404
+ var require_utils3 = __commonJS({
32405
+ "../../internals/service-topology/dist/utils.js"(exports, module) {
32406
+ "use strict";
32407
+ var __defProp = Object.defineProperty;
32408
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
32409
+ var __getOwnPropNames = Object.getOwnPropertyNames;
32410
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
32411
+ var __export2 = (target, all) => {
32412
+ for (var name in all)
32413
+ __defProp(target, name, { get: all[name], enumerable: true });
32414
+ };
32415
+ var __copyProps = (to, from, except, desc) => {
32416
+ if (from && typeof from === "object" || typeof from === "function") {
32417
+ for (let key of __getOwnPropNames(from))
32418
+ if (!__hasOwnProp.call(to, key) && key !== except)
32419
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
32460
32420
  }
32461
- if (config.entrypoint) {
32462
- if (config.entrypoint === "pyproject.toml" || config.entrypoint.endsWith("/pyproject.toml")) {
32463
- return "python";
32464
- }
32465
- for (const [ext, runtime] of Object.entries(import_types.ENTRYPOINT_EXTENSIONS)) {
32466
- if (config.entrypoint.endsWith(ext)) {
32467
- return runtime;
32468
- }
32469
- }
32421
+ return to;
32422
+ };
32423
+ var __toCommonJS2 = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32424
+ var utils_exports = {};
32425
+ __export2(utils_exports, {
32426
+ INTERNAL_QUEUES_PREFIX: () => INTERNAL_QUEUES_PREFIX,
32427
+ INTERNAL_SERVICE_PREFIX: () => import_build_utils11.INTERNAL_SERVICE_PREFIX,
32428
+ assignMountPaths: () => assignMountPaths,
32429
+ combineBuildCommand: () => combineBuildCommand,
32430
+ getInternalServiceCronPath: () => import_build_utils11.getInternalServiceCronPath,
32431
+ getInternalServiceCronPathPrefix: () => import_build_utils11.getInternalServiceCronPathPrefix,
32432
+ getInternalServiceFunctionPath: () => import_build_utils11.getInternalServiceFunctionPath,
32433
+ getInternalServiceWorkerPath: () => import_build_utils11.getInternalServiceWorkerPath,
32434
+ getInternalServiceWorkerPathPrefix: () => import_build_utils11.getInternalServiceWorkerPathPrefix,
32435
+ hasFile: () => hasFile,
32436
+ isRouteOwningBuilder: () => isRouteOwningBuilder2,
32437
+ isStaticBuild: () => isStaticBuild2,
32438
+ readVercelConfig: () => readVercelConfig
32439
+ });
32440
+ module.exports = __toCommonJS2(utils_exports);
32441
+ var import_build_utils11 = __require("@vercel/build-utils");
32442
+ var import_constants3 = require_constants();
32443
+ var import_framework = require_framework();
32444
+ async function hasFile(fs5, filePath) {
32445
+ try {
32446
+ return await fs5.isFile(filePath);
32447
+ } catch {
32448
+ return false;
32470
32449
  }
32471
- return void 0;
32450
+ }
32451
+ var INTERNAL_QUEUES_PREFIX = "/_svc/_queues";
32452
+ function isStaticBuild2(service) {
32453
+ return import_constants3.STATIC_BUILDERS.has(service.builder.use);
32454
+ }
32455
+ function isRouteOwningBuilder2(service) {
32456
+ return import_constants3.ROUTE_OWNING_BUILDERS.has(service.builder.use);
32472
32457
  }
32473
32458
  async function readVercelConfig(fs5) {
32474
32459
  const hasVercelJson = await fs5.hasPath("vercel.json");
@@ -32514,7 +32499,7 @@ var require_utils3 = __commonJS({
32514
32499
  return warnings;
32515
32500
  }
32516
32501
  const frontendNames = names.filter(
32517
- (name) => isFrontendFramework(services[name].framework)
32502
+ (name) => (0, import_framework.isFrontendFramework)(services[name].framework)
32518
32503
  );
32519
32504
  let rootName = null;
32520
32505
  if (frontendNames.length === 1) {
@@ -32527,7 +32512,7 @@ var require_utils3 = __commonJS({
32527
32512
  });
32528
32513
  }
32529
32514
  const rootFramework = rootName ? services[rootName].framework : void 0;
32530
- const isBFF = rootFramework ? isBFFFramework(rootFramework) : false;
32515
+ const isBFF = rootFramework ? (0, import_framework.isBFFFramework)(rootFramework) : false;
32531
32516
  const nonRootNames = names.filter((n) => n !== rootName);
32532
32517
  const needsNamespace = isBFF || nonRootNames.length > 1;
32533
32518
  for (const name of names) {
@@ -32552,6 +32537,126 @@ var require_utils3 = __commonJS({
32552
32537
  }
32553
32538
  });
32554
32539
 
32540
+ // ../../internals/runtimes/dist/runtime.js
32541
+ var require_runtime = __commonJS({
32542
+ "../../internals/runtimes/dist/runtime.js"(exports, module) {
32543
+ "use strict";
32544
+ var __defProp = Object.defineProperty;
32545
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
32546
+ var __getOwnPropNames = Object.getOwnPropertyNames;
32547
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
32548
+ var __export2 = (target, all) => {
32549
+ for (var name in all)
32550
+ __defProp(target, name, { get: all[name], enumerable: true });
32551
+ };
32552
+ var __copyProps = (to, from, except, desc) => {
32553
+ if (from && typeof from === "object" || typeof from === "function") {
32554
+ for (let key of __getOwnPropNames(from))
32555
+ if (!__hasOwnProp.call(to, key) && key !== except)
32556
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
32557
+ }
32558
+ return to;
32559
+ };
32560
+ var __toCommonJS2 = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32561
+ var runtime_exports = {};
32562
+ __export2(runtime_exports, {
32563
+ getBuilderForRuntime: () => getBuilderForRuntime,
32564
+ inferRuntime: () => inferRuntime
32565
+ });
32566
+ module.exports = __toCommonJS2(runtime_exports);
32567
+ var import_constants3 = require_constants();
32568
+ var import_framework = require_framework();
32569
+ function getBuilderForRuntime(runtime) {
32570
+ const builder = import_constants3.RUNTIME_BUILDERS[runtime];
32571
+ if (!builder)
32572
+ throw new Error(`Unknown runtime: ${runtime}`);
32573
+ return builder;
32574
+ }
32575
+ function inferRuntime(config) {
32576
+ if (config.runtime && config.runtime in import_constants3.RUNTIME_BUILDERS) {
32577
+ return config.runtime;
32578
+ }
32579
+ const frameworkRuntime = (0, import_framework.inferRuntimeFromFramework)(config.framework);
32580
+ if (frameworkRuntime)
32581
+ return frameworkRuntime;
32582
+ if (config.builder) {
32583
+ for (const [runtime, builderName] of Object.entries(import_constants3.RUNTIME_BUILDERS)) {
32584
+ if (config.builder === builderName)
32585
+ return runtime;
32586
+ }
32587
+ }
32588
+ if (config.entrypoint) {
32589
+ if (config.entrypoint === "pyproject.toml" || config.entrypoint.endsWith("/pyproject.toml")) {
32590
+ return "python";
32591
+ }
32592
+ for (const [ext, runtime] of Object.entries(import_constants3.ENTRYPOINT_EXTENSIONS)) {
32593
+ if (config.entrypoint.endsWith(ext))
32594
+ return runtime;
32595
+ }
32596
+ }
32597
+ return void 0;
32598
+ }
32599
+ }
32600
+ });
32601
+
32602
+ // ../../internals/runtimes/dist/entrypoint.js
32603
+ var require_entrypoint = __commonJS({
32604
+ "../../internals/runtimes/dist/entrypoint.js"(exports, module) {
32605
+ "use strict";
32606
+ var __defProp = Object.defineProperty;
32607
+ var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
32608
+ var __getOwnPropNames = Object.getOwnPropertyNames;
32609
+ var __hasOwnProp = Object.prototype.hasOwnProperty;
32610
+ var __export2 = (target, all) => {
32611
+ for (var name in all)
32612
+ __defProp(target, name, { get: all[name], enumerable: true });
32613
+ };
32614
+ var __copyProps = (to, from, except, desc) => {
32615
+ if (from && typeof from === "object" || typeof from === "function") {
32616
+ for (let key of __getOwnPropNames(from))
32617
+ if (!__hasOwnProp.call(to, key) && key !== except)
32618
+ __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
32619
+ }
32620
+ return to;
32621
+ };
32622
+ var __toCommonJS2 = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
32623
+ var entrypoint_exports = {};
32624
+ __export2(entrypoint_exports, {
32625
+ isDockerfileEntrypoint: () => isDockerfileEntrypoint,
32626
+ parsePyModuleAttrEntrypoint: () => parsePyModuleAttrEntrypoint,
32627
+ stripTrailingSlash: () => stripTrailingSlash
32628
+ });
32629
+ module.exports = __toCommonJS2(entrypoint_exports);
32630
+ var import_path19 = __require("path");
32631
+ var import_constants3 = require_constants();
32632
+ var PYTHON_MODULE_ATTR_RE = /^([A-Za-z_][\w]*(?:\.[A-Za-z_][\w]*)*):([A-Za-z_][\w]*)$/;
32633
+ function parsePyModuleAttrEntrypoint(entrypoint) {
32634
+ const match = PYTHON_MODULE_ATTR_RE.exec(entrypoint);
32635
+ if (!match)
32636
+ return null;
32637
+ const [, modulePart, attrName] = match;
32638
+ if (!modulePart || !attrName)
32639
+ return null;
32640
+ return {
32641
+ attrName,
32642
+ filePath: modulePart.replace(/\./g, "/") + ".py"
32643
+ };
32644
+ }
32645
+ var CONTAINER_ENTRYPOINT_BASENAMES = new Set(
32646
+ import_constants3.CONTAINER_ENTRYPOINT_CANDIDATES.map((name) => name.toLowerCase())
32647
+ );
32648
+ function isDockerfileEntrypoint(entrypoint) {
32649
+ return CONTAINER_ENTRYPOINT_BASENAMES.has(
32650
+ import_path19.posix.basename(entrypoint).toLowerCase()
32651
+ );
32652
+ }
32653
+ function stripTrailingSlash(p) {
32654
+ const stripped = p.replace(/\/+$/, "");
32655
+ return stripped === "" ? "." : stripped;
32656
+ }
32657
+ }
32658
+ });
32659
+
32555
32660
  // ../../internals/service-topology/dist/resolve.js
32556
32661
  var require_resolve2 = __commonJS({
32557
32662
  "../../internals/service-topology/dist/resolve.js"(exports, module) {
@@ -32578,7 +32683,6 @@ var require_resolve2 = __commonJS({
32578
32683
  detectFrameworkFromWorkspace: () => detectFrameworkFromWorkspace,
32579
32684
  getServiceFs: () => getServiceFs,
32580
32685
  inferWorkspaceFromNearestManifest: () => inferWorkspaceFromNearestManifest,
32581
- parsePyModuleAttrEntrypoint: () => parsePyModuleAttrEntrypoint,
32582
32686
  resolveAllConfiguredServices: () => resolveAllConfiguredServices,
32583
32687
  resolveConfiguredService: () => resolveConfiguredService,
32584
32688
  resolveEntrypointPath: () => resolveEntrypointPath,
@@ -32588,23 +32692,16 @@ var require_resolve2 = __commonJS({
32588
32692
  module.exports = __toCommonJS2(resolve_exports);
32589
32693
  var import_path19 = __require("path");
32590
32694
  var import_build_utils11 = __require("@vercel/build-utils");
32591
- var import_types = require_types3();
32695
+ var import_constants3 = require_constants();
32696
+ var import_framework = require_framework();
32697
+ var import_runtime6 = require_runtime();
32698
+ var import_entrypoint = require_entrypoint();
32592
32699
  var import_utils4 = require_utils3();
32593
32700
  var import_frameworks6 = require_frameworks();
32594
32701
  var import_fs_detectors6 = require_dist2();
32595
32702
  var import_routing_utils2 = require_dist5();
32596
32703
  var import_build_utils22 = __require("@vercel/build-utils");
32597
32704
  var frameworksBySlug2 = new Map(import_frameworks6.frameworkList.map((f) => [f.slug, f]));
32598
- var PYTHON_MODULE_ATTR_RE = /^([A-Za-z_][\w]*(?:\.[A-Za-z_][\w]*)*):([A-Za-z_][\w]*)$/;
32599
- function parsePyModuleAttrEntrypoint(entrypoint) {
32600
- const match = PYTHON_MODULE_ATTR_RE.exec(entrypoint);
32601
- if (!match)
32602
- return null;
32603
- return {
32604
- attrName: match[2],
32605
- filePath: match[1].replace(/\./g, "/") + ".py"
32606
- };
32607
- }
32608
32705
  var SERVICE_NAME_REGEX = /^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$/;
32609
32706
  var DNS_LABEL_RE = /^(?!-)[a-z0-9](?:[a-z0-9-]{0,61}[a-z0-9])?$/i;
32610
32707
  var ENV_VAR_NAME_RE = /^[A-Za-z_][A-Za-z0-9_]*$/;
@@ -32623,7 +32720,7 @@ var require_resolve2 = __commonJS({
32623
32720
  if (!root) {
32624
32721
  return { fs: fs5 };
32625
32722
  }
32626
- const normalizedRoot = (0, import_utils4.stripTrailingSlash)(import_path19.posix.normalize(root));
32723
+ const normalizedRoot = (0, import_entrypoint.stripTrailingSlash)(import_path19.posix.normalize(root));
32627
32724
  if (!await fs5.hasPath(normalizedRoot)) {
32628
32725
  return {
32629
32726
  fs: fs5,
@@ -32663,10 +32760,10 @@ var require_resolve2 = __commonJS({
32663
32760
  return config.trigger;
32664
32761
  }
32665
32762
  function getEntrypointRequiredRuntime(config) {
32666
- if (config.runtime && config.runtime in import_types.RUNTIME_BUILDERS) {
32763
+ if (config.runtime && config.runtime in import_constants3.RUNTIME_BUILDERS) {
32667
32764
  return config.runtime;
32668
32765
  }
32669
- return (0, import_utils4.inferRuntimeFromFramework)(config.framework);
32766
+ return (0, import_framework.inferRuntimeFromFramework)(config.framework);
32670
32767
  }
32671
32768
  function validateBackendFileEntrypoint(name, config, resolvedEntrypoint, options) {
32672
32769
  if (!options.requireFileEntrypointForBackendRuntimes || !resolvedEntrypoint?.isDirectory) {
@@ -32704,10 +32801,6 @@ var require_resolve2 = __commonJS({
32704
32801
  }
32705
32802
  };
32706
32803
  }
32707
- function isDockerfileEntrypoint(entrypoint) {
32708
- const base = import_path19.posix.basename(entrypoint).toLowerCase();
32709
- return base === "dockerfile" || base === "containerfile" || base.endsWith(".dockerfile");
32710
- }
32711
32804
  function toWorkspaceRelativeEntrypoint(entrypoint, workspace) {
32712
32805
  const normalizedEntrypoint = import_path19.posix.normalize(entrypoint);
32713
32806
  if (workspace === ".") {
@@ -32734,7 +32827,7 @@ var require_resolve2 = __commonJS({
32734
32827
  if (!entrypoint || !runtime) {
32735
32828
  return void 0;
32736
32829
  }
32737
- const manifests = import_types.RUNTIME_MANIFESTS[runtime];
32830
+ const manifests = import_constants3.RUNTIME_MANIFESTS[runtime];
32738
32831
  if (!manifests || manifests.length === 0) {
32739
32832
  return void 0;
32740
32833
  }
@@ -32770,7 +32863,7 @@ var require_resolve2 = __commonJS({
32770
32863
  runtime
32771
32864
  }) {
32772
32865
  const serviceFs = workspace === "." ? fs5 : fs5.chdir(workspace);
32773
- const frameworkCandidates = (0, import_utils4.filterFrameworksByRuntime)(import_frameworks6.frameworkList, runtime);
32866
+ const frameworkCandidates = (0, import_framework.filterFrameworksByRuntime)(import_frameworks6.frameworkList, runtime);
32774
32867
  const frameworks = await (0, import_fs_detectors6.detectFrameworks)({
32775
32868
  fs: serviceFs,
32776
32869
  frameworkList: frameworkCandidates
@@ -33037,7 +33130,7 @@ var require_resolve2 = __commonJS({
33037
33130
  }
33038
33131
  }
33039
33132
  }
33040
- if (config.runtime && !(config.runtime in import_types.RUNTIME_BUILDERS)) {
33133
+ if (config.runtime && !(config.runtime in import_constants3.RUNTIME_BUILDERS)) {
33041
33134
  return {
33042
33135
  code: "INVALID_RUNTIME",
33043
33136
  message: `Service "${name}" has invalid runtime "${config.runtime}".`,
@@ -33052,7 +33145,7 @@ var require_resolve2 = __commonJS({
33052
33145
  };
33053
33146
  }
33054
33147
  if (config.runtime && config.framework) {
33055
- const frameworkRuntime = (0, import_utils4.inferRuntimeFromFramework)(config.framework);
33148
+ const frameworkRuntime = (0, import_framework.inferRuntimeFromFramework)(config.framework);
33056
33149
  if (frameworkRuntime && frameworkRuntime !== config.runtime) {
33057
33150
  return {
33058
33151
  code: "RUNTIME_FRAMEWORK_MISMATCH",
@@ -33097,12 +33190,12 @@ var require_resolve2 = __commonJS({
33097
33190
  }
33098
33191
  function validateServiceEntrypoint(name, config, resolvedEntrypoint) {
33099
33192
  if (!resolvedEntrypoint.isDirectory && !config.builder && !config.runtime && !config.framework) {
33100
- const runtime = (0, import_utils4.inferServiceRuntime)({
33193
+ const runtime = (0, import_runtime6.inferRuntime)({
33101
33194
  ...config,
33102
33195
  entrypoint: resolvedEntrypoint.normalized
33103
33196
  });
33104
33197
  if (!runtime) {
33105
- const supported = Object.keys(import_types.ENTRYPOINT_EXTENSIONS).join(", ");
33198
+ const supported = Object.keys(import_constants3.ENTRYPOINT_EXTENSIONS).join(", ");
33106
33199
  return {
33107
33200
  code: "UNSUPPORTED_ENTRYPOINT",
33108
33201
  message: `Service "${name}" has unsupported entrypoint "${config.entrypoint}". Use a supported extension (${supported}) or specify "builder", "framework", or "runtime".`,
@@ -33125,7 +33218,7 @@ var require_resolve2 = __commonJS({
33125
33218
  const type = config.type || "web";
33126
33219
  const trigger = getEffectiveServiceTrigger(config);
33127
33220
  const rawEntrypoint = config.entrypoint;
33128
- const moduleAttrParsed = typeof rawEntrypoint === "string" ? parsePyModuleAttrEntrypoint(rawEntrypoint) : null;
33221
+ const moduleAttrParsed = typeof rawEntrypoint === "string" ? (0, import_entrypoint.parsePyModuleAttrEntrypoint)(rawEntrypoint) : null;
33129
33222
  const routingResult = resolveServiceRoutingConfig(name, config);
33130
33223
  if (routingResult.error) {
33131
33224
  throw new Error(routingResult.error.message);
@@ -33134,7 +33227,7 @@ var require_resolve2 = __commonJS({
33134
33227
  const configuredSubdomain = routingResult.routing?.subdomain;
33135
33228
  const routePrefixWasConfigured = routingResult.routing?.routePrefixConfigured ?? false;
33136
33229
  const containerEntrypoint = isContainerRuntime(config) && typeof rawEntrypoint === "string" ? rawEntrypoint : void 0;
33137
- const containerDockerfile = containerEntrypoint && isDockerfileEntrypoint(containerEntrypoint) ? import_path19.posix.normalize(containerEntrypoint) : void 0;
33230
+ const containerDockerfile = containerEntrypoint && (0, import_entrypoint.isDockerfileEntrypoint)(containerEntrypoint) ? import_path19.posix.normalize(containerEntrypoint) : void 0;
33138
33231
  const containerImage = containerEntrypoint && !containerDockerfile ? containerEntrypoint : void 0;
33139
33232
  let resolvedEntrypointPath = resolvedEntrypoint;
33140
33233
  if (!containerEntrypoint && !resolvedEntrypointPath && typeof rawEntrypoint === "string") {
@@ -33153,7 +33246,7 @@ var require_resolve2 = __commonJS({
33153
33246
  }
33154
33247
  const normalizedEntrypoint = resolvedEntrypointPath?.normalized;
33155
33248
  const entrypointIsDirectory = Boolean(resolvedEntrypointPath?.isDirectory);
33156
- const inferredRuntime = (0, import_utils4.inferServiceRuntime)({
33249
+ const inferredRuntime = (0, import_runtime6.inferRuntime)({
33157
33250
  ...config,
33158
33251
  entrypoint: entrypointIsDirectory ? void 0 : normalizedEntrypoint
33159
33252
  });
@@ -33208,7 +33301,7 @@ var require_resolve2 = __commonJS({
33208
33301
  const isCronService = (0, import_build_utils11.isScheduleTriggeredService)({ type, trigger });
33209
33302
  builderUse = type === "web" || isCronService ? "@vercel/backends" : "@vercel/node";
33210
33303
  } else {
33211
- builderUse = (0, import_utils4.getBuilderForRuntime)(inferredRuntime);
33304
+ builderUse = (0, import_runtime6.getBuilderForRuntime)(inferredRuntime);
33212
33305
  }
33213
33306
  builderSrc = inferredRuntime === "container" && typeof containerEntrypoint === "string" ? containerEntrypoint : resolvedEntrypointFile;
33214
33307
  }
@@ -33232,7 +33325,7 @@ var require_resolve2 = __commonJS({
33232
33325
  builderConfig.includeFiles = config.includeFiles;
33233
33326
  if (config.excludeFiles)
33234
33327
  builderConfig.excludeFiles = config.excludeFiles;
33235
- const isStaticBuild2 = import_types.STATIC_BUILDERS.has(builderUse);
33328
+ const isStaticBuild2 = import_constants3.STATIC_BUILDERS.has(builderUse);
33236
33329
  const runtime = isStaticBuild2 ? void 0 : inferredRuntime;
33237
33330
  if (routePrefix) {
33238
33331
  const stripped = routePrefix.startsWith("/") ? routePrefix.slice(1) : routePrefix;
@@ -33300,7 +33393,7 @@ var require_resolve2 = __commonJS({
33300
33393
  const serviceFs = serviceFsResult.fs;
33301
33394
  let resolvedEntrypoint;
33302
33395
  if (typeof serviceConfig.entrypoint === "string" && !isContainerRuntime(serviceConfig)) {
33303
- const moduleAttr = parsePyModuleAttrEntrypoint(serviceConfig.entrypoint);
33396
+ const moduleAttr = (0, import_entrypoint.parsePyModuleAttrEntrypoint)(serviceConfig.entrypoint);
33304
33397
  const entrypointToResolve = moduleAttr?.filePath ?? serviceConfig.entrypoint;
33305
33398
  const resolvedPath = await resolveEntrypointPath({
33306
33399
  fs: serviceFs,
@@ -33337,7 +33430,7 @@ var require_resolve2 = __commonJS({
33337
33430
  let resolvedConfig = serviceConfig;
33338
33431
  if (!serviceConfig.framework && resolvedEntrypoint) {
33339
33432
  if (resolvedEntrypoint.isDirectory) {
33340
- const inferredRuntime = (0, import_utils4.inferServiceRuntime)({
33433
+ const inferredRuntime = (0, import_runtime6.inferRuntime)({
33341
33434
  ...serviceConfig
33342
33435
  });
33343
33436
  const workspace = resolvedEntrypoint.normalized;
@@ -33364,7 +33457,7 @@ var require_resolve2 = __commonJS({
33364
33457
  framework
33365
33458
  };
33366
33459
  } else {
33367
- const inferredRuntime = (0, import_utils4.inferServiceRuntime)({
33460
+ const inferredRuntime = (0, import_runtime6.inferRuntime)({
33368
33461
  ...serviceConfig,
33369
33462
  entrypoint: resolvedEntrypoint.normalized
33370
33463
  });
@@ -33491,9 +33584,11 @@ var require_resolve_v2 = __commonJS({
33491
33584
  var import_path19 = __require("path");
33492
33585
  var import_build_utils11 = __require("@vercel/build-utils");
33493
33586
  var import_frameworks6 = require_frameworks();
33494
- var import_types = require_types3();
33587
+ var import_constants3 = require_constants();
33588
+ var import_framework = require_framework();
33589
+ var import_runtime6 = require_runtime();
33590
+ var import_entrypoint = require_entrypoint();
33495
33591
  var import_resolve = require_resolve2();
33496
- var import_utils4 = require_utils3();
33497
33592
  var frameworksBySlug2 = new Map(import_frameworks6.frameworkList.map((f) => [f.slug, f]));
33498
33593
  var MAX_SERVICE_NAME_LENGTH = 64;
33499
33594
  var SERVICE_NAME_REGEX = /^[a-z]([a-z_-]*[a-z])?$/;
@@ -33503,22 +33598,8 @@ var require_resolve_v2 = __commonJS({
33503
33598
  function getInvalidServiceNameMessage(name) {
33504
33599
  return `Service name "${name}" is invalid. Names must be 1-${MAX_SERVICE_NAME_LENGTH} characters, start and end with a lowercase letter, and contain only lowercase letters, hyphens, and underscores.`;
33505
33600
  }
33506
- var CONTAINER_ENTRYPOINT_CANDIDATES = [
33507
- "Dockerfile.vercel",
33508
- "Containerfile.vercel",
33509
- "Dockerfile",
33510
- "Containerfile"
33511
- ];
33512
- var CONTAINER_ENTRYPOINT_BASENAMES = new Set(
33513
- CONTAINER_ENTRYPOINT_CANDIDATES.map((name) => name.toLowerCase())
33514
- );
33515
- function isDockerfileEntrypoint(entrypoint) {
33516
- return CONTAINER_ENTRYPOINT_BASENAMES.has(
33517
- import_path19.posix.basename(entrypoint).toLowerCase()
33518
- );
33519
- }
33520
33601
  async function detectContainerEntrypoint(serviceFs) {
33521
- for (const candidate of CONTAINER_ENTRYPOINT_CANDIDATES) {
33602
+ for (const candidate of import_constants3.CONTAINER_ENTRYPOINT_CANDIDATES) {
33522
33603
  if (await serviceFs.hasPath(candidate)) {
33523
33604
  return candidate;
33524
33605
  }
@@ -33536,7 +33617,7 @@ var require_resolve_v2 = __commonJS({
33536
33617
  const entrypoint = config.entrypoint;
33537
33618
  let dockerfile;
33538
33619
  if (typeof entrypoint === "string") {
33539
- if (!isDockerfileEntrypoint(entrypoint)) {
33620
+ if (!(0, import_entrypoint.isDockerfileEntrypoint)(entrypoint)) {
33540
33621
  return {
33541
33622
  error: {
33542
33623
  code: "INVALID_SERVICE_CONFIG",
@@ -33552,7 +33633,7 @@ var require_resolve_v2 = __commonJS({
33552
33633
  return {
33553
33634
  error: {
33554
33635
  code: "MISSING_SERVICE_CONFIG",
33555
- message: `Container service "${name}" has no "entrypoint" and no ${CONTAINER_ENTRYPOINT_CANDIDATES.join(
33636
+ message: `Container service "${name}" has no "entrypoint" and no ${import_constants3.CONTAINER_ENTRYPOINT_CANDIDATES.join(
33556
33637
  ", "
33557
33638
  )} was found in "${normalizedRoot}".`,
33558
33639
  serviceName: name
@@ -33630,7 +33711,7 @@ var require_resolve_v2 = __commonJS({
33630
33711
  serviceName: name
33631
33712
  };
33632
33713
  }
33633
- if (config.runtime && !(config.runtime in import_types.RUNTIME_BUILDERS)) {
33714
+ if (config.runtime && !(config.runtime in import_constants3.RUNTIME_BUILDERS)) {
33634
33715
  return {
33635
33716
  code: "INVALID_RUNTIME",
33636
33717
  message: `Service "${name}" has invalid runtime "${config.runtime}".`,
@@ -33645,7 +33726,7 @@ var require_resolve_v2 = __commonJS({
33645
33726
  };
33646
33727
  }
33647
33728
  if (config.runtime && config.framework) {
33648
- const frameworkRuntime = (0, import_utils4.inferRuntimeFromFramework)(config.framework);
33729
+ const frameworkRuntime = (0, import_framework.inferRuntimeFromFramework)(config.framework);
33649
33730
  if (frameworkRuntime && frameworkRuntime !== config.runtime) {
33650
33731
  return {
33651
33732
  code: "RUNTIME_FRAMEWORK_MISMATCH",
@@ -33657,18 +33738,18 @@ var require_resolve_v2 = __commonJS({
33657
33738
  return null;
33658
33739
  }
33659
33740
  async function resolveConfiguredServiceV22(name, config, fs5) {
33660
- const normalizedRoot = (0, import_utils4.stripTrailingSlash)(import_path19.posix.normalize(config.root));
33741
+ const normalizedRoot = (0, import_entrypoint.stripTrailingSlash)(import_path19.posix.normalize(config.root));
33661
33742
  const serviceFsResult = normalizedRoot === "." ? { fs: fs5 } : await (0, import_resolve.getServiceFs)(fs5, name, normalizedRoot);
33662
33743
  if (serviceFsResult.error) {
33663
33744
  return { error: serviceFsResult.error };
33664
33745
  }
33665
33746
  const serviceFs = serviceFsResult.fs;
33666
- const isContainer = config.runtime === "container" || typeof config.entrypoint === "string" && isDockerfileEntrypoint(config.entrypoint);
33747
+ const isContainer = config.runtime === "container" || typeof config.entrypoint === "string" && (0, import_entrypoint.isDockerfileEntrypoint)(config.entrypoint);
33667
33748
  if (isContainer) {
33668
33749
  return resolveContainerServiceV2(name, config, normalizedRoot, serviceFs);
33669
33750
  }
33670
33751
  const rawEntrypoint = config.entrypoint;
33671
- const moduleAttr = typeof rawEntrypoint === "string" ? (0, import_resolve.parsePyModuleAttrEntrypoint)(rawEntrypoint) : null;
33752
+ const moduleAttr = typeof rawEntrypoint === "string" ? (0, import_entrypoint.parsePyModuleAttrEntrypoint)(rawEntrypoint) : null;
33672
33753
  let normalizedEntrypoint;
33673
33754
  let entrypointIsDirectory = false;
33674
33755
  if (typeof rawEntrypoint === "string") {
@@ -33685,7 +33766,7 @@ var require_resolve_v2 = __commonJS({
33685
33766
  entrypointIsDirectory = Boolean(resolved.entrypoint?.isDirectory);
33686
33767
  }
33687
33768
  const entrypointFile = entrypointIsDirectory || !normalizedEntrypoint ? void 0 : normalizedEntrypoint;
33688
- let inferredRuntime = (0, import_utils4.inferServiceRuntime)({
33769
+ let inferredRuntime = (0, import_runtime6.inferRuntime)({
33689
33770
  runtime: config.runtime,
33690
33771
  framework: config.framework,
33691
33772
  entrypoint: entrypointFile
@@ -33705,7 +33786,7 @@ var require_resolve_v2 = __commonJS({
33705
33786
  }
33706
33787
  framework = detection.framework;
33707
33788
  detectedFramework = Boolean(framework);
33708
- inferredRuntime = (0, import_utils4.inferServiceRuntime)({
33789
+ inferredRuntime = (0, import_runtime6.inferRuntime)({
33709
33790
  runtime: config.runtime,
33710
33791
  framework,
33711
33792
  entrypoint: entrypointFile
@@ -33720,7 +33801,7 @@ var require_resolve_v2 = __commonJS({
33720
33801
  }
33721
33802
  };
33722
33803
  }
33723
- const frameworkRuntime = (0, import_utils4.inferRuntimeFromFramework)(framework);
33804
+ const frameworkRuntime = (0, import_framework.inferRuntimeFromFramework)(framework);
33724
33805
  if (detectedFramework && frameworkRuntime && !entrypointFile) {
33725
33806
  return {
33726
33807
  error: {
@@ -33755,7 +33836,7 @@ var require_resolve_v2 = __commonJS({
33755
33836
  }
33756
33837
  };
33757
33838
  }
33758
- builderUse = inferredRuntime === "node" ? "@vercel/backends" : (0, import_utils4.getBuilderForRuntime)(inferredRuntime);
33839
+ builderUse = inferredRuntime === "node" ? "@vercel/backends" : (0, import_runtime6.getBuilderForRuntime)(inferredRuntime);
33759
33840
  builderSrc = entrypointFile;
33760
33841
  }
33761
33842
  }
@@ -33777,7 +33858,7 @@ var require_resolve_v2 = __commonJS({
33777
33858
  if (moduleAttr) {
33778
33859
  builderConfig.handlerFunction = moduleAttr.attrName;
33779
33860
  }
33780
- const runtime = import_types.STATIC_BUILDERS.has(builderUse) ? void 0 : inferredRuntime;
33861
+ const runtime = import_constants3.STATIC_BUILDERS.has(builderUse) ? void 0 : inferredRuntime;
33781
33862
  return {
33782
33863
  service: {
33783
33864
  schema: "experimentalServicesV2",
@@ -33883,6 +33964,7 @@ var require_auto_detect = __commonJS({
33883
33964
  module.exports = __toCommonJS2(auto_detect_exports);
33884
33965
  var import_fs_detectors6 = require_dist2();
33885
33966
  var import_frameworks6 = require_frameworks();
33967
+ var import_framework = require_framework();
33886
33968
  var import_utils4 = require_utils3();
33887
33969
  var FRONTEND_DIR = "frontend";
33888
33970
  var APPS_WEB_DIR = "apps/web";
@@ -34093,7 +34175,7 @@ var require_auto_detect = __commonJS({
34093
34175
  const serviceFs = fs5.chdir(dirPath);
34094
34176
  const frameworks = await (0, import_fs_detectors6.detectFrameworks)({
34095
34177
  fs: serviceFs,
34096
- frameworkList: import_utils4.DETECTION_FRAMEWORKS,
34178
+ frameworkList: import_framework.DETECTION_FRAMEWORKS,
34097
34179
  useExperimentalFrameworks: true
34098
34180
  });
34099
34181
  if (frameworks.length > 1) {
@@ -34112,7 +34194,7 @@ var require_auto_detect = __commonJS({
34112
34194
  const framework = frameworks[0];
34113
34195
  const slug = framework.slug ?? void 0;
34114
34196
  const mountPath = `/${serviceName}`;
34115
- const detected = detectEntrypoint && !(0, import_utils4.isFrontendFramework)(slug) ? await detectEntrypoint({ workPath: dirPath, framework: slug }) : null;
34197
+ const detected = detectEntrypoint && !(0, import_framework.isFrontendFramework)(slug) ? await detectEntrypoint({ workPath: dirPath, framework: slug }) : null;
34116
34198
  return {
34117
34199
  service: {
34118
34200
  framework: slug,
@@ -34164,6 +34246,7 @@ var require_detect_railway = __commonJS({
34164
34246
  var import_path19 = __require("path");
34165
34247
  var import_smol_toml3 = __toESM2(__require("smol-toml"));
34166
34248
  var import_fs_detectors6 = require_dist2();
34249
+ var import_framework = require_framework();
34167
34250
  var import_utils4 = require_utils3();
34168
34251
  var RAILWAY_JSON = "railway.json";
34169
34252
  var RAILWAY_TOML = "railway.toml";
@@ -34199,12 +34282,12 @@ var require_detect_railway = __commonJS({
34199
34282
  const dirLabel = cf.dirPath === "." ? "root" : cf.dirPath;
34200
34283
  const frameworks = await (0, import_fs_detectors6.detectFrameworks)({
34201
34284
  fs: serviceFs,
34202
- frameworkList: import_utils4.DETECTION_FRAMEWORKS,
34285
+ frameworkList: import_framework.DETECTION_FRAMEWORKS,
34203
34286
  useExperimentalFrameworks: true
34204
34287
  });
34205
34288
  if (cf.config.deploy?.cronSchedule) {
34206
34289
  const schedule = cf.config.deploy.cronSchedule;
34207
- const runtime = frameworks.length === 1 ? (0, import_utils4.inferRuntimeFromFramework)(frameworks[0].slug) : void 0;
34290
+ const runtime = frameworks.length === 1 ? (0, import_framework.inferRuntimeFromFramework)(frameworks[0].slug) : void 0;
34208
34291
  const hint = {
34209
34292
  type: "job",
34210
34293
  trigger: "schedule",
@@ -34254,7 +34337,7 @@ var require_detect_railway = __commonJS({
34254
34337
  root: cf.dirPath,
34255
34338
  framework: slug
34256
34339
  };
34257
- if (cf.dirPath !== "." && detectEntrypoint && !(0, import_utils4.isFrontendFramework)(slug)) {
34340
+ if (cf.dirPath !== "." && detectEntrypoint && !(0, import_framework.isFrontendFramework)(slug)) {
34258
34341
  const detected = await detectEntrypoint({
34259
34342
  workPath: cf.dirPath,
34260
34343
  framework: slug
@@ -34406,7 +34489,8 @@ var require_detect_render = __commonJS({
34406
34489
  module.exports = __toCommonJS2(detect_render_exports);
34407
34490
  var import_js_yaml = __toESM2(require_js_yaml3());
34408
34491
  var import_fs_detectors6 = require_dist2();
34409
- var import_types = require_types3();
34492
+ var import_constants3 = require_constants();
34493
+ var import_framework = require_framework();
34410
34494
  var import_utils4 = require_utils3();
34411
34495
  var RENDER_YAML = "render.yaml";
34412
34496
  var SERVICE_TYPE_MAP = {
@@ -34440,7 +34524,7 @@ var require_detect_render = __commonJS({
34440
34524
  if (serviceType === "cron") {
34441
34525
  const name = rs.name ?? "unnamed";
34442
34526
  const schedule = rs.schedule;
34443
- const runtime = rs.runtime && rs.runtime in import_types.RUNTIME_BUILDERS ? rs.runtime : void 0;
34527
+ const runtime = rs.runtime && rs.runtime in import_constants3.RUNTIME_BUILDERS ? rs.runtime : void 0;
34444
34528
  const hint = {
34445
34529
  type: "cron",
34446
34530
  ...schedule ? { schedule } : {},
@@ -34513,7 +34597,7 @@ var require_detect_render = __commonJS({
34513
34597
  const serviceFs = rootDir === "." ? fs5 : fs5.chdir(rootDir);
34514
34598
  const frameworks = await (0, import_fs_detectors6.detectFrameworks)({
34515
34599
  fs: serviceFs,
34516
- frameworkList: import_utils4.DETECTION_FRAMEWORKS,
34600
+ frameworkList: import_framework.DETECTION_FRAMEWORKS,
34517
34601
  useExperimentalFrameworks: true
34518
34602
  });
34519
34603
  if (frameworks.length === 0) {
@@ -34539,7 +34623,7 @@ var require_detect_render = __commonJS({
34539
34623
  type: vercelType,
34540
34624
  framework: framework.slug ?? void 0
34541
34625
  };
34542
- if (rootDir !== "." && detectEntrypoint && !(0, import_utils4.isFrontendFramework)(serviceConfig.framework)) {
34626
+ if (rootDir !== "." && detectEntrypoint && !(0, import_framework.isFrontendFramework)(serviceConfig.framework)) {
34543
34627
  const detected = await detectEntrypoint({
34544
34628
  workPath: rootDir,
34545
34629
  framework: serviceConfig.framework
@@ -34627,6 +34711,7 @@ var require_detect_procfile = __commonJS({
34627
34711
  });
34628
34712
  module.exports = __toCommonJS2(detect_procfile_exports);
34629
34713
  var import_fs_detectors6 = require_dist2();
34714
+ var import_framework = require_framework();
34630
34715
  var import_utils4 = require_utils3();
34631
34716
  var PROCFILE = "Procfile";
34632
34717
  var PROCFILE_LINE_RE = /^\s*([A-Za-z_][A-Za-z0-9_-]*):\s*(.+)/;
@@ -34685,7 +34770,7 @@ var require_detect_procfile = __commonJS({
34685
34770
  }
34686
34771
  const frameworks = await (0, import_fs_detectors6.detectFrameworks)({
34687
34772
  fs: fs5,
34688
- frameworkList: import_utils4.DETECTION_FRAMEWORKS,
34773
+ frameworkList: import_framework.DETECTION_FRAMEWORKS,
34689
34774
  useExperimentalFrameworks: true
34690
34775
  });
34691
34776
  if (frameworks.length > 1) {
@@ -34881,6 +34966,7 @@ var require_detect_services = __commonJS({
34881
34966
  module.exports = __toCommonJS2(detect_services_exports);
34882
34967
  var import_build_utils11 = __require("@vercel/build-utils");
34883
34968
  var import_routing_utils2 = require_dist5();
34969
+ var import_framework = require_framework();
34884
34970
  var import_utils4 = require_utils3();
34885
34971
  var import_resolve = require_resolve2();
34886
34972
  var import_resolve_v2 = require_resolve_v2();
@@ -34930,7 +35016,7 @@ var require_detect_services = __commonJS({
34930
35016
  if (typeof service.mountPath === "string") {
34931
35017
  serviceConfig.mountPath = service.mountPath;
34932
35018
  }
34933
- if ((0, import_utils4.isFrontendFramework)(service.framework)) {
35019
+ if ((0, import_framework.isFrontendFramework)(service.framework)) {
34934
35020
  serviceConfig.framework = service.framework;
34935
35021
  }
34936
35022
  if (typeof service.buildCommand === "string") {
@@ -38009,7 +38095,7 @@ var require_package = __commonJS({
38009
38095
  "../client/package.json"(exports, module) {
38010
38096
  module.exports = {
38011
38097
  name: "@vercel/client",
38012
- version: "18.2.18",
38098
+ version: "18.2.21",
38013
38099
  main: "dist/index.js",
38014
38100
  typings: "dist/index.d.ts",
38015
38101
  homepage: "https://vercel.com",
@@ -40856,7 +40942,7 @@ var require_expand = __commonJS({
40856
40942
  });
40857
40943
 
40858
40944
  // ../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/constants.js
40859
- var require_constants = __commonJS({
40945
+ var require_constants2 = __commonJS({
40860
40946
  "../../node_modules/.pnpm/braces@3.0.3/node_modules/braces/lib/constants.js"(exports, module) {
40861
40947
  "use strict";
40862
40948
  module.exports = {
@@ -40989,7 +41075,7 @@ var require_parse2 = __commonJS({
40989
41075
  /* ' */
40990
41076
  CHAR_NO_BREAK_SPACE,
40991
41077
  CHAR_ZERO_WIDTH_NOBREAK_SPACE
40992
- } = require_constants();
41078
+ } = require_constants2();
40993
41079
  var parse3 = (input, options = {}) => {
40994
41080
  if (typeof input !== "string") {
40995
41081
  throw new TypeError("Expected a string");
@@ -41262,7 +41348,7 @@ var require_braces = __commonJS({
41262
41348
  });
41263
41349
 
41264
41350
  // ../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/constants.js
41265
- var require_constants2 = __commonJS({
41351
+ var require_constants3 = __commonJS({
41266
41352
  "../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/constants.js"(exports, module) {
41267
41353
  "use strict";
41268
41354
  var path3 = __require("path");
@@ -41473,7 +41559,7 @@ var require_utils5 = __commonJS({
41473
41559
  REGEX_REMOVE_BACKSLASH,
41474
41560
  REGEX_SPECIAL_CHARS,
41475
41561
  REGEX_SPECIAL_CHARS_GLOBAL
41476
- } = require_constants2();
41562
+ } = require_constants3();
41477
41563
  exports.isObject = (val) => val !== null && typeof val === "object" && !Array.isArray(val);
41478
41564
  exports.hasRegexChars = (str) => REGEX_SPECIAL_CHARS.test(str);
41479
41565
  exports.isRegexChar = (str) => str.length === 1 && exports.hasRegexChars(str);
@@ -41561,7 +41647,7 @@ var require_scan = __commonJS({
41561
41647
  /* ) */
41562
41648
  CHAR_RIGHT_SQUARE_BRACKET
41563
41649
  /* ] */
41564
- } = require_constants2();
41650
+ } = require_constants3();
41565
41651
  var isPathSeparator = (code2) => {
41566
41652
  return code2 === CHAR_FORWARD_SLASH || code2 === CHAR_BACKWARD_SLASH;
41567
41653
  };
@@ -41862,7 +41948,7 @@ var require_scan = __commonJS({
41862
41948
  var require_parse3 = __commonJS({
41863
41949
  "../../node_modules/.pnpm/picomatch@2.3.2/node_modules/picomatch/lib/parse.js"(exports, module) {
41864
41950
  "use strict";
41865
- var constants = require_constants2();
41951
+ var constants = require_constants3();
41866
41952
  var utils = require_utils5();
41867
41953
  var {
41868
41954
  MAX_LENGTH,
@@ -42876,7 +42962,7 @@ var require_picomatch = __commonJS({
42876
42962
  var scan = require_scan();
42877
42963
  var parse3 = require_parse3();
42878
42964
  var utils = require_utils5();
42879
- var constants = require_constants2();
42965
+ var constants = require_constants3();
42880
42966
  var isObject = (val) => val && typeof val === "object" && !Array.isArray(val);
42881
42967
  var picomatch = (glob, options, returnState = false) => {
42882
42968
  if (Array.isArray(glob)) {
@@ -43841,7 +43927,7 @@ var require_run_parallel = __commonJS({
43841
43927
  });
43842
43928
 
43843
43929
  // ../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js
43844
- var require_constants3 = __commonJS({
43930
+ var require_constants4 = __commonJS({
43845
43931
  "../../node_modules/.pnpm/@nodelib+fs.scandir@2.1.5/node_modules/@nodelib/fs.scandir/out/constants.js"(exports) {
43846
43932
  "use strict";
43847
43933
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -43920,7 +44006,7 @@ var require_async3 = __commonJS({
43920
44006
  exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
43921
44007
  var fsStat = require_out();
43922
44008
  var rpl = require_run_parallel();
43923
- var constants_1 = require_constants3();
44009
+ var constants_1 = require_constants4();
43924
44010
  var utils = require_utils7();
43925
44011
  var common2 = require_common4();
43926
44012
  function read(directory, settings, callback) {
@@ -44029,7 +44115,7 @@ var require_sync3 = __commonJS({
44029
44115
  Object.defineProperty(exports, "__esModule", { value: true });
44030
44116
  exports.readdir = exports.readdirWithFileTypes = exports.read = void 0;
44031
44117
  var fsStat = require_out();
44032
- var constants_1 = require_constants3();
44118
+ var constants_1 = require_constants4();
44033
44119
  var utils = require_utils7();
44034
44120
  var common2 = require_common4();
44035
44121
  function read(directory, settings) {
@@ -53332,7 +53418,7 @@ var require_inspect_deployment_files = __commonJS({
53332
53418
  });
53333
53419
 
53334
53420
  // ../client/dist/types.js
53335
- var require_types4 = __commonJS({
53421
+ var require_types3 = __commonJS({
53336
53422
  "../client/dist/types.js"(exports, module) {
53337
53423
  "use strict";
53338
53424
  var __defProp = Object.defineProperty;
@@ -53413,7 +53499,7 @@ var require_dist7 = __commonJS({
53413
53499
  var import_inspect_deployment_files = require_inspect_deployment_files();
53414
53500
  var import_utils4 = require_utils9();
53415
53501
  __reExport(src_exports, require_errors(), module.exports);
53416
- __reExport(src_exports, require_types4(), module.exports);
53502
+ __reExport(src_exports, require_types3(), module.exports);
53417
53503
  var createDeployment = (0, import_create_deployment.default)();
53418
53504
  }
53419
53505
  });
@@ -58908,6 +58994,38 @@ function validateConfig(config) {
58908
58994
  return niceError;
58909
58995
  }
58910
58996
  }
58997
+ for (const [pattern, fn] of Object.entries(config.functions ?? {})) {
58998
+ if (fn.affinity !== void 0) {
58999
+ return new NowBuildError({
59000
+ code: "FUNCTION_AFFINITY_REQUIRES_SERVICE",
59001
+ message: `Function affinity can only be configured under a service. Move functions[${JSON.stringify(
59002
+ pattern
59003
+ )}].affinity into the relevant service's functions configuration.`,
59004
+ link: "https://vercel.com/docs/concepts/projects/project-configuration#functions"
59005
+ });
59006
+ }
59007
+ }
59008
+ const functionMaps = [
59009
+ config.functions,
59010
+ ...Object.values(config.services ?? {}).map((service) => service.functions),
59011
+ ...Object.values(config.experimentalServicesV2 ?? {}).map(
59012
+ (service) => service.functions
59013
+ )
59014
+ ];
59015
+ for (const functions of functionMaps) {
59016
+ for (const [pattern, fn] of Object.entries(functions ?? {})) {
59017
+ const regions = [...new Set(fn.regions)];
59018
+ if (fn.affinity?.mode === "strict" && (regions.includes("all") || regions.length > 1)) {
59019
+ return new NowBuildError({
59020
+ code: "INVALID_FUNCTION_AFFINITY_REGIONS",
59021
+ message: `Function affinity mode "strict" requires at most one statically configured region. Update \`functions[${JSON.stringify(
59022
+ pattern
59023
+ )}].regions\` to contain a single region.`,
59024
+ link: "https://vercel.com/docs/concepts/projects/project-configuration#functions"
59025
+ });
59026
+ }
59027
+ }
59028
+ }
58911
59029
  if (config.proxy) {
58912
59030
  const proxyError = (0, import_fs_detectors2.validateProxyConfig)(config.proxy);
58913
59031
  if (proxyError) {
@@ -59059,7 +59177,7 @@ function createDetectEntrypoint(projectRoot) {
59059
59177
  };
59060
59178
  }
59061
59179
  async function loadBuilderDetectEntrypoint(name, projectRoot) {
59062
- const { importBuilders } = await import("./import-builders-W3YE2V6A.js");
59180
+ const { importBuilders } = await import("./import-builders-H4VASUQQ.js");
59063
59181
  const builders = await importBuilders(/* @__PURE__ */ new Set([name]), projectRoot);
59064
59182
  const loaded = builders.get(name);
59065
59183
  if (!loaded) {
@@ -61336,7 +61454,7 @@ async function linkFolderToProject(client, path3, projectLink, projectName, orgS
61336
61454
  }
61337
61455
 
61338
61456
  // src/util/compile-vercel-config.ts
61339
- import { NowBuildError as NowBuildError3 } from "@vercel/build-utils";
61457
+ import { getNodeExecPath, NowBuildError as NowBuildError3 } from "@vercel/build-utils";
61340
61458
  function toRouteFormat(item) {
61341
61459
  if ("src" in item)
61342
61460
  return item;
@@ -61570,6 +61688,7 @@ async function compileVercelConfig(workPath) {
61570
61688
  await writeFile4(loaderPath, loaderScript, "utf-8");
61571
61689
  const config = await new Promise((resolve6, reject) => {
61572
61690
  const child = fork(loaderPath, [tempOutPath], {
61691
+ execPath: getNodeExecPath(),
61573
61692
  stdio: ["pipe", "pipe", "pipe", "ipc"]
61574
61693
  });
61575
61694
  let stderrOutput = "";
@@ -61777,6 +61896,7 @@ export {
61777
61896
  getVercelConfigPath,
61778
61897
  readConfig,
61779
61898
  require_dist5 as require_dist3,
61899
+ require_runtime,
61780
61900
  require_dist6 as require_dist4,
61781
61901
  displayDetectedServices,
61782
61902
  validateConfig,