vercel 54.7.1 → 54.8.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 (75) hide show
  1. package/dist/chunks/{add-67QG24DA.js → add-7PN3D2CB.js} +11 -11
  2. package/dist/chunks/{chunk-KP6S4KU2.js → chunk-2VNVOF6Y.js} +34 -37
  3. package/dist/chunks/{chunk-PBX6K5OJ.js → chunk-3UG4R5C6.js} +9 -9
  4. package/dist/chunks/{chunk-ZTHVV4KB.js → chunk-4NDOMD3E.js} +1 -1
  5. package/dist/chunks/{chunk-IXR7P5OR.js → chunk-5MRKNVDF.js} +8 -8
  6. package/dist/chunks/{chunk-HTOH3MSD.js → chunk-5SYDEK2N.js} +1 -1
  7. package/dist/chunks/{chunk-LOQRUMOE.js → chunk-5ZJHY4AC.js} +3 -3
  8. package/dist/chunks/{chunk-OAUXTVXM.js → chunk-6GCPDK6C.js} +2 -2
  9. package/dist/chunks/{chunk-XQUJUKTN.js → chunk-6IQZVQV6.js} +2 -2
  10. package/dist/chunks/{chunk-POF76PSB.js → chunk-6MRFETFX.js} +5 -5
  11. package/dist/chunks/{chunk-FQ5AMV7J.js → chunk-A4NNTF2R.js} +5 -5
  12. package/dist/chunks/{chunk-WWLVPUED.js → chunk-B6C7NMT3.js} +2 -2
  13. package/dist/chunks/{chunk-N733ZD4W.js → chunk-BBJUIDZF.js} +1 -1
  14. package/dist/chunks/{chunk-GVL6A2EH.js → chunk-BGOG7M2L.js} +2 -2
  15. package/dist/chunks/{chunk-ILYEE673.js → chunk-BLBP6PJV.js} +3 -3
  16. package/dist/chunks/{chunk-CJPMAEBA.js → chunk-C2JLV23W.js} +4 -4
  17. package/dist/chunks/{chunk-TJQZGB6S.js → chunk-DAASB6YQ.js} +2 -2
  18. package/dist/chunks/{chunk-4CIXZOP4.js → chunk-DPXUXH7G.js} +1 -1
  19. package/dist/chunks/{chunk-3EOZ4ZDJ.js → chunk-FMN3NXRC.js} +2 -2
  20. package/dist/chunks/{chunk-6ABZRR5D.js → chunk-I6N27CZY.js} +8 -8
  21. package/dist/chunks/{chunk-7HAY2TY5.js → chunk-IQQJHYW4.js} +3 -3
  22. package/dist/chunks/{chunk-GIJMTTDG.js → chunk-KFVMKDQD.js} +195 -243
  23. package/dist/chunks/{chunk-ZCMQ43RC.js → chunk-KV23GR7J.js} +1 -1
  24. package/dist/chunks/{chunk-LOS7HHU3.js → chunk-LKBI43XK.js} +1 -1
  25. package/dist/chunks/{chunk-IDFKAJW3.js → chunk-LN6B7ZI3.js} +1 -1
  26. package/dist/chunks/{chunk-VWXC5XIE.js → chunk-MZ6WX76F.js} +3 -3
  27. package/dist/chunks/{chunk-PPCVO6KR.js → chunk-MZXIRI4R.js} +3 -3
  28. package/dist/chunks/{chunk-2R5WYHZW.js → chunk-NGRSQRSN.js} +2 -2
  29. package/dist/chunks/{chunk-7OUZIPHA.js → chunk-NHGCQRK5.js} +2 -2
  30. package/dist/chunks/{chunk-TIJBJ7EO.js → chunk-O4C4A7HM.js} +2 -2
  31. package/dist/chunks/{chunk-JWLKJA7N.js → chunk-QSUXC4XD.js} +5 -5
  32. package/dist/chunks/{chunk-CMQXECHW.js → chunk-RM4XGGZO.js} +2 -2
  33. package/dist/chunks/{chunk-2SYGBHZU.js → chunk-SX3T5LJW.js} +2 -2
  34. package/dist/chunks/{chunk-QN7GS5KD.js → chunk-T5UBTKLR.js} +3 -3
  35. package/dist/chunks/{chunk-CPWI2SWV.js → chunk-TAHQ6VAS.js} +2 -2
  36. package/dist/chunks/{chunk-FV5RQPKY.js → chunk-TCF6MGBY.js} +1 -1
  37. package/dist/chunks/{chunk-ACS2IKKO.js → chunk-TKYXKHYP.js} +283 -179
  38. package/dist/chunks/{chunk-XDU5XSTQ.js → chunk-UVSQEC2H.js} +3 -3
  39. package/dist/chunks/{chunk-AOJHEPS4.js → chunk-WEVQWSBT.js} +1 -1
  40. package/dist/chunks/{chunk-ZQKJVHXY.js → chunk-Z5SBJH6L.js} +13 -0
  41. package/dist/chunks/{chunk-WGF7XCUT.js → chunk-ZBFZHPN5.js} +9 -9
  42. package/dist/chunks/{chunk-O7SEN4RY.js → chunk-ZTPOJE63.js} +2 -2
  43. package/dist/chunks/{compile-vercel-config-R5X7XQH3.js → compile-vercel-config-ZRGV2HQF.js} +6 -6
  44. package/dist/chunks/{delete-QUCIXBSR.js → delete-62D6RPHR.js} +8 -8
  45. package/dist/chunks/{disable-N7JFRNT5.js → disable-EUFCTMHU.js} +8 -8
  46. package/dist/chunks/{discard-PDT55IX4.js → discard-UXWAYS5Y.js} +8 -8
  47. package/dist/chunks/{edit-C35BISPR.js → edit-K7S5CQEI.js} +10 -10
  48. package/dist/chunks/{enable-AIKCOZPH.js → enable-4C5ME3GT.js} +8 -8
  49. package/dist/chunks/{exec-5MN7VTSE.js → exec-JSOL4CYJ.js} +2 -2
  50. package/dist/chunks/{export-SQBM4PT6.js → export-NPUHUUHH.js} +8 -8
  51. package/dist/chunks/{inspect-FQ6NOVDU.js → inspect-ASCZ6G5V.js} +11 -11
  52. package/dist/chunks/{list-ZJVOBYVT.js → list-G7DVTQFM.js} +12 -12
  53. package/dist/chunks/{list-XJIRH6SE.js → list-MY22OIPS.js} +9 -9
  54. package/dist/chunks/{ls-SOTFIBD6.js → ls-C5IRWH53.js} +11 -11
  55. package/dist/chunks/{publish-US2CACSX.js → publish-645OGLRF.js} +8 -8
  56. package/dist/chunks/{query-DUJSSD3L.js → query-T5BWXYMO.js} +11 -11
  57. package/dist/chunks/{reorder-Y5N4VOO7.js → reorder-OHRSG6FC.js} +8 -8
  58. package/dist/chunks/{restore-TTEF3WC7.js → restore-GZNFRZV5.js} +8 -8
  59. package/dist/chunks/{rm-AARNIFI5.js → rm-4IHGJQWN.js} +11 -11
  60. package/dist/chunks/{routes-IBID4NSZ.js → routes-3OHKNMGT.js} +3 -3
  61. package/dist/chunks/{rule-inspect-TQBZNJUL.js → rule-inspect-E5WP4XX3.js} +11 -11
  62. package/dist/chunks/{rules-QWOMXETM.js → rules-KFYHGFV7.js} +9 -9
  63. package/dist/chunks/{schema-CZIQHHUV.js → schema-DUVEFNFM.js} +11 -11
  64. package/dist/chunks/{types-LU2G5DD3.js → types-P6JKZFEY.js} +5 -5
  65. package/dist/chunks/{update-A2FXWT7E.js → update-W4JIJ732.js} +11 -11
  66. package/dist/commands/build/index.js +17 -18
  67. package/dist/commands/deploy/index.js +26 -26
  68. package/dist/commands/dev/index.js +18 -18
  69. package/dist/commands/env/index.js +22 -22
  70. package/dist/commands/link/index.js +21 -21
  71. package/dist/commands/list/index.js +12 -12
  72. package/dist/commands-bulk.js +3230 -2874
  73. package/dist/index.js +47 -49
  74. package/dist/version.mjs +1 -1
  75. package/package.json +23 -22
@@ -8,13 +8,13 @@ import {
8
8
  TelemetryClient,
9
9
  require_dist as require_dist2,
10
10
  require_graceful_fs
11
- } from "./chunk-4CIXZOP4.js";
11
+ } from "./chunk-DPXUXH7G.js";
12
12
  import {
13
13
  buildCommandWithYes,
14
14
  getPreservedArgsForEnvPull,
15
15
  outputActionRequired,
16
16
  outputAgentError
17
- } from "./chunk-7OUZIPHA.js";
17
+ } from "./chunk-NHGCQRK5.js";
18
18
  import {
19
19
  require_ms,
20
20
  stamp_default
@@ -34,7 +34,7 @@ import {
34
34
  require_string_width,
35
35
  require_strip_ansi,
36
36
  yesOption
37
- } from "./chunk-XQUJUKTN.js";
37
+ } from "./chunk-6IQZVQV6.js";
38
38
  import {
39
39
  APIError,
40
40
  CantParseJSONFile,
@@ -49,7 +49,7 @@ import {
49
49
  isAPIError,
50
50
  packageName,
51
51
  require_lib
52
- } from "./chunk-IDFKAJW3.js";
52
+ } from "./chunk-LN6B7ZI3.js";
53
53
  import {
54
54
  pkg_default
55
55
  } from "./chunk-P4QNYOFB.js";
@@ -63,7 +63,7 @@ import {
63
63
  require_cli_spinners,
64
64
  require_dist,
65
65
  require_escape_string_regexp
66
- } from "./chunk-ZQKJVHXY.js";
66
+ } from "./chunk-Z5SBJH6L.js";
67
67
  import {
68
68
  require_ansi_styles,
69
69
  require_source,
@@ -16011,19 +16011,17 @@ var require_frameworks = __commonJS({
16011
16011
  experimental: true
16012
16012
  },
16013
16013
  {
16014
- name: "Sanity (v3)",
16015
- slug: "sanity-v3",
16016
- demo: "https://sanity-studio-template.vercel.app",
16014
+ name: "Sanity",
16015
+ slug: "sanity",
16016
+ demo: "https://template-studio-clean.sanity.dev",
16017
16017
  logo: "https://api-frameworks.vercel.sh/framework-logos/sanity.svg",
16018
- tagline: "The structured content platform.",
16018
+ darkModeLogo: "https://api-frameworks.vercel.sh/framework-logos/sanity-dark.svg",
16019
+ tagline: "The back-end built for AI content operations. Power web, mobile, and agentic applications at scale.",
16019
16020
  description: "A Sanity Studio",
16020
16021
  website: "https://www.sanity.io",
16021
16022
  envPrefix: "SANITY_STUDIO_",
16022
16023
  detectors: {
16023
16024
  some: [
16024
- {
16025
- path: "sanity.json"
16026
- },
16027
16025
  {
16028
16026
  path: "sanity.config.js"
16029
16027
  },
@@ -16039,8 +16037,7 @@ var require_frameworks = __commonJS({
16039
16037
  ],
16040
16038
  every: [
16041
16039
  {
16042
- path: "package.json",
16043
- matchContent: '"(dev)?(d|D)ependencies":\\s*{[^}]*"sanity":\\s*"\\^?3\\..*"[^}]*}'
16040
+ matchPackage: "sanity"
16044
16041
  }
16045
16042
  ]
16046
16043
  },
@@ -16059,6 +16056,7 @@ var require_frameworks = __commonJS({
16059
16056
  value: "dist"
16060
16057
  }
16061
16058
  },
16059
+ dependency: "sanity",
16062
16060
  getOutputDirName: async () => "dist",
16063
16061
  defaultRoutes: [
16064
16062
  {
@@ -16071,10 +16069,10 @@ var require_frameworks = __commonJS({
16071
16069
  ]
16072
16070
  },
16073
16071
  {
16074
- name: "Sanity",
16075
- slug: "sanity",
16072
+ name: "Sanity (v2)",
16073
+ slug: "sanity-v2",
16076
16074
  demo: "https://sanity-studio-template.vercel.app",
16077
- logo: "https://api-frameworks.vercel.sh/framework-logos/sanity.svg",
16075
+ logo: "https://api-frameworks.vercel.sh/framework-logos/sanity-v2.svg",
16078
16076
  tagline: "The structured content platform.",
16079
16077
  description: "A Sanity Studio",
16080
16078
  website: "https://www.sanity.io",
@@ -16083,18 +16081,12 @@ var require_frameworks = __commonJS({
16083
16081
  some: [
16084
16082
  {
16085
16083
  path: "sanity.json"
16086
- },
16087
- {
16088
- path: "sanity.config.js"
16089
- },
16090
- {
16091
- path: "sanity.config.jsx"
16092
- },
16093
- {
16094
- path: "sanity.config.ts"
16095
- },
16084
+ }
16085
+ ],
16086
+ every: [
16096
16087
  {
16097
- path: "sanity.config.tsx"
16088
+ path: "package.json",
16089
+ matchContent: '"(dev)?(d|D)ependencies":\\s*{[^}]*"@sanity/cli":\\s*"\\^?2\\..*"[^}]*}'
16098
16090
  }
16099
16091
  ]
16100
16092
  },
@@ -22687,11 +22679,9 @@ var require_utils3 = __commonJS({
22687
22679
  inferRuntimeFromFramework: () => inferRuntimeFromFramework,
22688
22680
  inferServiceRuntime: () => inferServiceRuntime,
22689
22681
  isFrontendFramework: () => isFrontendFramework,
22690
- isPublicServicesEnabled: () => isPublicServicesEnabled2,
22691
22682
  isRouteOwningBuilder: () => isRouteOwningBuilder2,
22692
22683
  isStaticBuild: () => isStaticBuild2,
22693
- readVercelConfig: () => readVercelConfig,
22694
- validateServicesConfigGate: () => validateServicesConfigGate
22684
+ readVercelConfig: () => readVercelConfig
22695
22685
  });
22696
22686
  module.exports = __toCommonJS2(utils_exports);
22697
22687
  var import_framework_helpers = __require("@vercel/build-utils/dist/framework-helpers");
@@ -22708,18 +22698,6 @@ var require_utils3 = __commonJS({
22708
22698
  return false;
22709
22699
  }
22710
22700
  }
22711
- function isPublicServicesEnabled2() {
22712
- return process.env.VERCEL_USE_SERVICES === "1" || process.env.VERCEL_USE_SERVICES?.toLowerCase() === "true";
22713
- }
22714
- function validateServicesConfigGate(config) {
22715
- if (config?.services !== void 0 && !isPublicServicesEnabled2()) {
22716
- return {
22717
- code: "INVALID_VERCEL_CONFIG",
22718
- message: "Invalid vercel.json - should NOT have additional property `services`. Please remove it."
22719
- };
22720
- }
22721
- return null;
22722
- }
22723
22701
  var INTERNAL_QUEUES_PREFIX = "/_svc/_queues";
22724
22702
  function normalizeInternalServiceEntrypoint(entrypoint) {
22725
22703
  const normalized = entrypoint.replace(/\\/g, "/").replace(/^\/+/, "").replace(/\.[^/.]+$/, "");
@@ -22804,10 +22782,6 @@ var require_utils3 = __commonJS({
22804
22782
  try {
22805
22783
  const content = await fs5.readFile("vercel.json");
22806
22784
  const config = JSON.parse(content.toString());
22807
- const gateError = validateServicesConfigGate(config);
22808
- if (gateError) {
22809
- return { config: null, error: gateError };
22810
- }
22811
22785
  return { config, error: null };
22812
22786
  } catch {
22813
22787
  return {
@@ -22825,10 +22799,6 @@ var require_utils3 = __commonJS({
22825
22799
  const { parse: tomlParse3 } = await import("smol-toml");
22826
22800
  const content = await fs5.readFile("vercel.toml");
22827
22801
  const config = tomlParse3(content.toString());
22828
- const gateError = validateServicesConfigGate(config);
22829
- if (gateError) {
22830
- return { config: null, error: gateError };
22831
- }
22832
22802
  return { config, error: null };
22833
22803
  } catch {
22834
22804
  return {
@@ -24101,8 +24071,8 @@ var require_auto_detect = __commonJS({
24101
24071
  warnings: [],
24102
24072
  errors: [
24103
24073
  {
24104
- code: "NO_SERVICES_CONFIGURED",
24105
- message: "No services detected. Configure services in vercel.json or ensure a framework exists at project root, frontend/, or apps/web/."
24074
+ code: "NO_EXPERIMENTAL_SERVICES_CONFIGURED",
24075
+ message: "No services detected. Configure `experimentalServices` in vercel.json or ensure a framework exists at project root, frontend/, or apps/web/."
24106
24076
  }
24107
24077
  ]
24108
24078
  };
@@ -27963,8 +27933,7 @@ var require_detect_services = __commonJS({
27963
27933
  fs: fs5,
27964
27934
  workPath,
27965
27935
  detectEntrypoint,
27966
- configuredServices: providedConfiguredServices,
27967
- configuredServicesType
27936
+ configuredServices: providedConfiguredServices
27968
27937
  } = options;
27969
27938
  const scopedFs = workPath ? fs5.chdir(workPath) : fs5;
27970
27939
  const { config: vercelConfig, error: configError } = await (0, import_utils4.readVercelConfig)(scopedFs);
@@ -27979,8 +27948,7 @@ var require_detect_services = __commonJS({
27979
27948
  });
27980
27949
  }
27981
27950
  const hasProvidedConfiguredServices = providedConfiguredServices && Object.keys(providedConfiguredServices).length > 0;
27982
- const hasNonEmptyPublicServicesConfig = hasProvidedConfiguredServices && configuredServicesType === "services" || !hasProvidedConfiguredServices && vercelConfig?.services && Object.keys(vercelConfig.services).length > 0;
27983
- const configuredServices = hasProvidedConfiguredServices ? providedConfiguredServices : hasNonEmptyPublicServicesConfig ? vercelConfig?.services : vercelConfig?.experimentalServices;
27951
+ const configuredServices = hasProvidedConfiguredServices ? providedConfiguredServices : vercelConfig?.experimentalServices;
27984
27952
  const hasConfiguredServices = configuredServices && Object.keys(configuredServices).length > 0;
27985
27953
  if (!hasConfiguredServices) {
27986
27954
  const detectors = [
@@ -28002,8 +27970,8 @@ var require_detect_services = __commonJS({
28002
27970
  routes: emptyRoutes(),
28003
27971
  errors: [
28004
27972
  {
28005
- code: "NO_SERVICES_CONFIGURED",
28006
- message: "No services configured. Add `services` to vercel.json."
27973
+ code: "NO_EXPERIMENTAL_SERVICES_CONFIGURED",
27974
+ message: "No services configured. Add `experimentalServices` to vercel.json."
28007
27975
  }
28008
27976
  ],
28009
27977
  warnings: []
@@ -28012,20 +27980,14 @@ var require_detect_services = __commonJS({
28012
27980
  const result = await (0, import_resolve.resolveAllConfiguredServices)(
28013
27981
  configuredServices,
28014
27982
  scopedFs,
28015
- "configured",
28016
- {
28017
- requireFileEntrypointForBackendRuntimes: Boolean(
28018
- hasNonEmptyPublicServicesConfig
28019
- )
28020
- }
27983
+ "configured"
28021
27984
  );
28022
27985
  const routes = generateServicesRoutes2(result.services);
28023
27986
  return withResolvedResult({
28024
27987
  services: result.services,
28025
27988
  source: "configured",
28026
- // GA `services` opts into explicit `env`; experimentalServices keeps
28027
- // the legacy `{NAME}_URL` injection.
28028
- useImplicitEnvInjection: !hasNonEmptyPublicServicesConfig,
27989
+ // experimentalServices uses the legacy `{NAME}_URL` injection.
27990
+ useImplicitEnvInjection: true,
28029
27991
  routes,
28030
27992
  errors: result.errors,
28031
27993
  warnings: []
@@ -28516,8 +28478,8 @@ var require_get_services_builders = __commonJS({
28516
28478
  builders: null,
28517
28479
  errors: [
28518
28480
  {
28519
- code: "NO_SERVICES_CONFIGURED",
28520
- message: "No services configured. Add `services` to vercel.json."
28481
+ code: "NO_EXPERIMENTAL_SERVICES_CONFIGURED",
28482
+ message: "No services configured. Add `experimentalServices` to vercel.json."
28521
28483
  }
28522
28484
  ],
28523
28485
  warnings: warningResponses,
@@ -28648,10 +28610,10 @@ var require_detect_builders = __commonJS({
28648
28610
  return publicBuilder ? publicBuilder.src.replace("/**/*", "") : null;
28649
28611
  }
28650
28612
  async function detectBuilders2(files, pkg, options = {}) {
28651
- const { services, experimentalServices, projectSettings = {} } = options;
28613
+ const { experimentalServices, projectSettings = {} } = options;
28652
28614
  const { framework } = projectSettings;
28653
- const configuredServices = services ?? experimentalServices;
28654
- const configuredServicesType = services != null ? "services" : "experimentalServices";
28615
+ const configuredServices = experimentalServices;
28616
+ const configuredServicesType = "experimentalServices";
28655
28617
  const hasServicesConfig = configuredServices != null && typeof configuredServices === "object";
28656
28618
  if (hasServicesConfig || framework === "services") {
28657
28619
  return (0, import_get_services_builders.getServicesBuilders)({
@@ -36958,7 +36920,7 @@ var require_package = __commonJS({
36958
36920
  "../client/package.json"(exports, module) {
36959
36921
  module.exports = {
36960
36922
  name: "@vercel/client",
36961
- version: "17.5.7",
36923
+ version: "17.5.8",
36962
36924
  main: "dist/index.js",
36963
36925
  typings: "dist/index.d.ts",
36964
36926
  homepage: "https://vercel.com",
@@ -50427,7 +50389,7 @@ async function fetchUser(client) {
50427
50389
  if (client.authConfig.userId !== res.user.id) {
50428
50390
  client.updateAuthConfig({ userId: res.user.id });
50429
50391
  try {
50430
- client.writeToAuthConfigFile();
50392
+ client.persistAuthConfig();
50431
50393
  } catch {
50432
50394
  output_manager_default.debug("Failed to persist cached userId to auth config.");
50433
50395
  }
@@ -50442,7 +50404,7 @@ async function fetchUser(client) {
50442
50404
  if (client.authConfig.userId) {
50443
50405
  client.updateAuthConfig({ userId: void 0 });
50444
50406
  try {
50445
- client.writeToAuthConfigFile();
50407
+ client.persistAuthConfig();
50446
50408
  } catch {
50447
50409
  output_manager_default.debug("Failed to persist cached userId to auth config.");
50448
50410
  }
@@ -54549,7 +54511,7 @@ async function login(client, telemetry) {
54549
54511
  if (isInitialLogin) {
54550
54512
  await updateCurrentTeamAfterLogin(client);
54551
54513
  }
54552
- client.writeToAuthConfigFile();
54514
+ client.persistAuthConfig();
54553
54515
  client.writeToConfigFile();
54554
54516
  output_manager_default.debug(`Saved credentials in "${humanizePath(client.getGlobalPathConfig())}"`);
54555
54517
  output_manager_default.print(`
@@ -54792,7 +54754,7 @@ async function pullEnvRecordsForEnvPull(client, pullId, source, options) {
54792
54754
  userId: void 0,
54793
54755
  expiresAt: Math.floor(Date.now() / 1e3) + tokens.expires_in
54794
54756
  });
54795
- client.writeToAuthConfigFile();
54757
+ client.persistAuthConfig();
54796
54758
  output_manager_default.spinner("Downloading");
54797
54759
  return await pullEnvRecords(client, pullId, source, options);
54798
54760
  }
@@ -55029,34 +54991,13 @@ var experimentalServicesMountSchema = {
55029
54991
  }
55030
54992
  ]
55031
54993
  };
55032
- var servicesMountSchema = {
55033
- oneOf: [
55034
- {
55035
- type: "string",
55036
- minLength: 1,
55037
- maxLength: 512
55038
- },
55039
- {
55040
- type: "object",
55041
- additionalProperties: false,
55042
- required: ["path"],
55043
- properties: {
55044
- path: {
55045
- type: "string",
55046
- minLength: 1,
55047
- maxLength: 512
55048
- }
55049
- }
55050
- }
55051
- ]
55052
- };
55053
- var staticServiceScheduleSchema = {
54994
+ var staticExperimentalServiceScheduleSchema = {
55054
54995
  type: "string",
55055
54996
  minLength: 9,
55056
54997
  maxLength: 256,
55057
54998
  not: { const: "<dynamic>" }
55058
54999
  };
55059
- var serviceScheduleSchema = {
55000
+ var experimentalServiceScheduleSchema = {
55060
55001
  oneOf: [
55061
55002
  {
55062
55003
  type: "string",
@@ -55066,11 +55007,11 @@ var serviceScheduleSchema = {
55066
55007
  {
55067
55008
  type: "array",
55068
55009
  minItems: 1,
55069
- items: staticServiceScheduleSchema
55010
+ items: staticExperimentalServiceScheduleSchema
55070
55011
  }
55071
55012
  ]
55072
55013
  };
55073
- var serviceQueueTopicSchema = {
55014
+ var experimentalServiceQueueTopicSchema = {
55074
55015
  type: "object",
55075
55016
  additionalProperties: false,
55076
55017
  required: ["topic"],
@@ -55092,7 +55033,7 @@ var serviceQueueTopicSchema = {
55092
55033
  }
55093
55034
  }
55094
55035
  };
55095
- var serviceTopicsSchema = {
55036
+ var experimentalServiceTopicsSchema = {
55096
55037
  oneOf: [
55097
55038
  {
55098
55039
  type: "array",
@@ -55106,7 +55047,7 @@ var serviceTopicsSchema = {
55106
55047
  {
55107
55048
  type: "array",
55108
55049
  minItems: 1,
55109
- items: serviceQueueTopicSchema
55050
+ items: experimentalServiceQueueTopicSchema
55110
55051
  }
55111
55052
  ]
55112
55053
  };
@@ -55114,25 +55055,6 @@ var envVarNamesSchema = {
55114
55055
  pattern: "^[A-Za-z_][A-Za-z0-9_]*$",
55115
55056
  maxLength: 256
55116
55057
  };
55117
- var envVarSchema = {
55118
- type: "object",
55119
- additionalProperties: false,
55120
- required: ["type", "service"],
55121
- properties: {
55122
- type: { const: "service-ref" },
55123
- service: {
55124
- type: "string",
55125
- minLength: 1,
55126
- maxLength: 64,
55127
- pattern: "^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$"
55128
- }
55129
- }
55130
- };
55131
- var envVarRecordSchema = {
55132
- type: "object",
55133
- additionalProperties: envVarSchema,
55134
- propertyNames: envVarNamesSchema
55135
- };
55136
55058
  var experimentalServicesCommonProperties = {
55137
55059
  entrypoint: {
55138
55060
  type: "string",
@@ -55222,23 +55144,6 @@ var experimentalServicesRoutableProperties = {
55222
55144
  maxLength: 63
55223
55145
  }
55224
55146
  };
55225
- var servicesCommonProperties = {
55226
- entrypoint: experimentalServicesCommonProperties.entrypoint,
55227
- root: experimentalServicesCommonProperties.root,
55228
- framework: experimentalServicesCommonProperties.framework,
55229
- runtime: experimentalServicesCommonProperties.runtime,
55230
- buildCommand: experimentalServicesCommonProperties.buildCommand,
55231
- preDeployCommand: experimentalServicesCommonProperties.preDeployCommand,
55232
- memory: experimentalServicesCommonProperties.memory,
55233
- maxDuration: experimentalServicesCommonProperties.maxDuration,
55234
- includeFiles: experimentalServicesCommonProperties.includeFiles,
55235
- excludeFiles: experimentalServicesCommonProperties.excludeFiles,
55236
- env: envVarRecordSchema
55237
- };
55238
- var servicesRoutableProperties = {
55239
- mount: servicesMountSchema
55240
- };
55241
- var servicesRequiredProperties = ["type", "root"];
55242
55147
  var experimentalServicesServiceConfigSchema = {
55243
55148
  oneOf: [
55244
55149
  {
@@ -55264,7 +55169,7 @@ var experimentalServicesServiceConfigSchema = {
55264
55169
  trigger: {
55265
55170
  const: "schedule"
55266
55171
  },
55267
- schedule: serviceScheduleSchema
55172
+ schedule: experimentalServiceScheduleSchema
55268
55173
  }
55269
55174
  },
55270
55175
  {
@@ -55279,7 +55184,7 @@ var experimentalServicesServiceConfigSchema = {
55279
55184
  trigger: {
55280
55185
  const: "queue"
55281
55186
  },
55282
- topics: serviceTopicsSchema,
55187
+ topics: experimentalServiceTopicsSchema,
55283
55188
  consumer: {
55284
55189
  type: "string",
55285
55190
  minLength: 1,
@@ -55335,79 +55240,11 @@ var experimentalServicesServiceConfigSchema = {
55335
55240
  type: {
55336
55241
  const: "cron"
55337
55242
  },
55338
- schedule: serviceScheduleSchema
55339
- }
55340
- }
55341
- ]
55342
- };
55343
- var servicesServiceConfigSchema = {
55344
- oneOf: [
55345
- {
55346
- type: "object",
55347
- additionalProperties: false,
55348
- required: servicesRequiredProperties,
55349
- properties: {
55350
- ...servicesCommonProperties,
55351
- ...servicesRoutableProperties,
55352
- type: {
55353
- enum: ["web"]
55354
- }
55355
- }
55356
- },
55357
- {
55358
- type: "object",
55359
- additionalProperties: false,
55360
- required: [...servicesRequiredProperties, "trigger", "schedule"],
55361
- properties: {
55362
- ...servicesCommonProperties,
55363
- type: {
55364
- const: "job"
55365
- },
55366
- trigger: {
55367
- const: "schedule"
55368
- },
55369
- schedule: serviceScheduleSchema
55370
- }
55371
- },
55372
- {
55373
- type: "object",
55374
- additionalProperties: false,
55375
- required: [...servicesRequiredProperties, "trigger", "topics"],
55376
- properties: {
55377
- ...servicesCommonProperties,
55378
- type: {
55379
- const: "job"
55380
- },
55381
- trigger: {
55382
- const: "queue"
55383
- },
55384
- topics: serviceTopicsSchema
55385
- }
55386
- },
55387
- {
55388
- type: "object",
55389
- additionalProperties: false,
55390
- required: [...servicesRequiredProperties, "trigger", "entrypoint"],
55391
- properties: {
55392
- ...servicesCommonProperties,
55393
- type: {
55394
- const: "job"
55395
- },
55396
- trigger: {
55397
- const: "workflow"
55398
- }
55243
+ schedule: experimentalServiceScheduleSchema
55399
55244
  }
55400
55245
  }
55401
55246
  ]
55402
55247
  };
55403
- var servicesSchema = {
55404
- type: "object",
55405
- propertyNames: {
55406
- pattern: "^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$",
55407
- maxLength: 64
55408
- },
55409
- additionalProperties: servicesServiceConfigSchema
55410
- };
55411
55248
  var experimentalServicesSchema = {
55412
55249
  type: "object",
55413
55250
  propertyNames: {
@@ -55431,6 +55268,80 @@ var experimentalServiceGroupsSchema = {
55431
55268
  }
55432
55269
  }
55433
55270
  };
55271
+ var experimentalServicesV2PathSchema = {
55272
+ type: "string",
55273
+ minLength: 1,
55274
+ maxLength: 512
55275
+ };
55276
+ var experimentalServicesV2CommandSchema = {
55277
+ type: "string",
55278
+ minLength: 1,
55279
+ maxLength: 2048
55280
+ };
55281
+ var experimentalServicesV2BindingSchema = {
55282
+ type: "object",
55283
+ additionalProperties: false,
55284
+ required: ["type", "service", "format", "env"],
55285
+ properties: {
55286
+ type: { const: "service" },
55287
+ service: {
55288
+ type: "string",
55289
+ minLength: 1,
55290
+ maxLength: 64,
55291
+ pattern: "^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$"
55292
+ },
55293
+ format: { const: "url" },
55294
+ env: {
55295
+ type: "string",
55296
+ ...envVarNamesSchema
55297
+ }
55298
+ }
55299
+ };
55300
+ var experimentalServicesV2BindingsSchema = {
55301
+ type: "array",
55302
+ maxItems: 100,
55303
+ items: experimentalServicesV2BindingSchema
55304
+ };
55305
+ var experimentalServicesV2ServiceConfigSchema = {
55306
+ type: "object",
55307
+ additionalProperties: false,
55308
+ required: ["root"],
55309
+ properties: {
55310
+ root: experimentalServicesV2PathSchema,
55311
+ framework: {
55312
+ type: "string",
55313
+ minLength: 1,
55314
+ maxLength: 256
55315
+ },
55316
+ runtime: {
55317
+ type: "string",
55318
+ minLength: 1,
55319
+ maxLength: 256
55320
+ },
55321
+ entrypoint: experimentalServicesV2PathSchema,
55322
+ installCommand: experimentalServicesV2CommandSchema,
55323
+ buildCommand: experimentalServicesV2CommandSchema,
55324
+ devCommand: experimentalServicesV2CommandSchema,
55325
+ ignoreCommand: experimentalServicesV2CommandSchema,
55326
+ outputDirectory: experimentalServicesV2PathSchema,
55327
+ bindings: experimentalServicesV2BindingsSchema,
55328
+ functions: functionsSchema,
55329
+ headers: import_routing_utils.headersSchema,
55330
+ redirects: import_routing_utils.redirectsSchema,
55331
+ rewrites: import_routing_utils.rewritesSchema,
55332
+ routes: import_routing_utils.routesSchema,
55333
+ cleanUrls: import_routing_utils.cleanUrlsSchema,
55334
+ trailingSlash: import_routing_utils.trailingSlashSchema
55335
+ }
55336
+ };
55337
+ var experimentalServicesV2Schema = {
55338
+ type: "object",
55339
+ propertyNames: {
55340
+ pattern: "^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$",
55341
+ maxLength: 64
55342
+ },
55343
+ additionalProperties: experimentalServicesV2ServiceConfigSchema
55344
+ };
55434
55345
  var vercelConfigSchema = {
55435
55346
  type: "object",
55436
55347
  // These are not all possibilities because `vc dev`
@@ -55448,26 +55359,14 @@ var vercelConfigSchema = {
55448
55359
  images: imagesSchema,
55449
55360
  crons: cronsSchema,
55450
55361
  bunVersion: { type: "string" },
55451
- services: servicesSchema,
55452
55362
  experimentalServices: experimentalServicesSchema,
55453
- experimentalServiceGroups: experimentalServiceGroupsSchema
55363
+ experimentalServiceGroups: experimentalServiceGroupsSchema,
55364
+ experimentalServicesV2: experimentalServicesV2Schema
55454
55365
  }
55455
55366
  };
55456
55367
  var ajv = new import_ajv.default();
55457
55368
  var validate = ajv.compile(vercelConfigSchema);
55458
- function isPublicServicesEnabled() {
55459
- return process.env.VERCEL_USE_SERVICES === "1" || process.env.VERCEL_USE_SERVICES?.toLowerCase() === "true";
55460
- }
55461
55369
  function validateConfig(config) {
55462
- if (Object.prototype.hasOwnProperty.call(config, "services") && !isPublicServicesEnabled()) {
55463
- const fileName = config[import_client.fileNameSymbol] || "vercel.json";
55464
- const niceError = getPrettyError({
55465
- dataPath: "",
55466
- params: { additionalProperty: "services" }
55467
- });
55468
- niceError.message = `Invalid ${fileName} - ${niceError.message}`;
55469
- return niceError;
55470
- }
55471
55370
  if (!validate(config)) {
55472
55371
  if (validate.errors && validate.errors[0]) {
55473
55372
  const error = validate.errors[0];
@@ -55484,24 +55383,17 @@ function validateConfig(config) {
55484
55383
  link: "https://vercel.link/functions-and-builds"
55485
55384
  });
55486
55385
  }
55487
- const hasServices = Boolean(config.services);
55488
55386
  const hasExperimentalServices = Boolean(config.experimentalServices);
55489
- if (hasServices && hasExperimentalServices) {
55387
+ if (hasExperimentalServices && config.builds) {
55490
55388
  return new NowBuildError({
55491
- code: "SERVICES_AND_EXPERIMENTAL_SERVICES",
55492
- message: "The `services` property cannot be used in conjunction with the `experimentalServices` property. Please remove one of them."
55389
+ code: "EXPERIMENTAL_SERVICES_AND_BUILDS",
55390
+ message: "The `experimentalServices` property cannot be used in conjunction with the `builds` property. Please remove one of them."
55493
55391
  });
55494
55392
  }
55495
- if ((hasServices || hasExperimentalServices) && config.builds) {
55393
+ if (hasExperimentalServices && config.functions) {
55496
55394
  return new NowBuildError({
55497
- code: "SERVICES_AND_BUILDS",
55498
- message: "The `services` property cannot be used in conjunction with the `builds` property. Please remove one of them."
55499
- });
55500
- }
55501
- if ((hasServices || hasExperimentalServices) && config.functions) {
55502
- return new NowBuildError({
55503
- code: "SERVICES_AND_FUNCTIONS",
55504
- message: "The `services` property cannot be used in conjunction with the `functions` property. Please remove one of them."
55395
+ code: "EXPERIMENTAL_SERVICES_AND_FUNCTIONS",
55396
+ message: "The `experimentalServices` property cannot be used in conjunction with the `functions` property. Please remove one of them."
55505
55397
  });
55506
55398
  }
55507
55399
  if (config.experimentalServiceGroups && !config.experimentalServices) {
@@ -55510,6 +55402,66 @@ function validateConfig(config) {
55510
55402
  message: "The `experimentalServiceGroups` property requires `experimentalServices` to be defined. Service groups reference services by name."
55511
55403
  });
55512
55404
  }
55405
+ const hasExperimentalServicesV2 = Boolean(config.experimentalServicesV2);
55406
+ if (hasExperimentalServicesV2 && hasExperimentalServices) {
55407
+ return new NowBuildError({
55408
+ code: "EXPERIMENTAL_SERVICES_V2_AND_EXPERIMENTAL_SERVICES",
55409
+ message: "The `experimentalServicesV2` property cannot be used in conjunction with the `experimentalServices` property. Please use only one services configuration."
55410
+ });
55411
+ }
55412
+ if (hasExperimentalServicesV2 && config.builds) {
55413
+ return new NowBuildError({
55414
+ code: "EXPERIMENTAL_SERVICES_V2_AND_BUILDS",
55415
+ message: "The `experimentalServicesV2` property cannot be used in conjunction with the `builds` property. Please remove one of them."
55416
+ });
55417
+ }
55418
+ if (hasExperimentalServicesV2) {
55419
+ const ambiguousTopLevel = [];
55420
+ if (config.functions != null) {
55421
+ ambiguousTopLevel.push("functions");
55422
+ }
55423
+ if (config.installCommand != null) {
55424
+ ambiguousTopLevel.push("installCommand");
55425
+ }
55426
+ if (config.buildCommand != null) {
55427
+ ambiguousTopLevel.push("buildCommand");
55428
+ }
55429
+ if (config.devCommand != null) {
55430
+ ambiguousTopLevel.push("devCommand");
55431
+ }
55432
+ if (config.ignoreCommand != null) {
55433
+ ambiguousTopLevel.push("ignoreCommand");
55434
+ }
55435
+ if (config.outputDirectory != null) {
55436
+ ambiguousTopLevel.push("outputDirectory");
55437
+ }
55438
+ if (config.framework != null) {
55439
+ ambiguousTopLevel.push("framework");
55440
+ }
55441
+ if (ambiguousTopLevel.length > 0) {
55442
+ const count = ambiguousTopLevel.length;
55443
+ const fields = ambiguousTopLevel.map((field) => `\`${field}\``).join(", ");
55444
+ return new NowBuildError({
55445
+ code: "EXPERIMENTAL_SERVICES_V2_AND_TOP_LEVEL_BUILD_SETTINGS",
55446
+ message: `The top-level ${count > 1 ? "properties" : "property"} ${fields} cannot be used with \`experimentalServicesV2\` because the owning service is ambiguous. Move ${count > 1 ? "them" : "it"} under the relevant service in \`experimentalServicesV2\`.`
55447
+ });
55448
+ }
55449
+ }
55450
+ if (config.experimentalServicesV2) {
55451
+ const serviceNames = new Set(Object.keys(config.experimentalServicesV2));
55452
+ for (const [serviceName, serviceConfig] of Object.entries(
55453
+ config.experimentalServicesV2
55454
+ )) {
55455
+ for (const binding of serviceConfig.bindings ?? []) {
55456
+ if (!serviceNames.has(binding.service)) {
55457
+ return new NowBuildError({
55458
+ code: "EXPERIMENTAL_SERVICES_V2_BINDING_UNKNOWN_SERVICE",
55459
+ message: `Service "${serviceName}" declares a binding to unknown service "${binding.service}". Add "${binding.service}" to \`experimentalServicesV2\` or fix the binding.`
55460
+ });
55461
+ }
55462
+ }
55463
+ }
55464
+ }
55513
55465
  return null;
55514
55466
  }
55515
55467
 
@@ -55560,7 +55512,7 @@ async function hasExperimentalServicesConfig(cwd) {
55560
55512
  );
55561
55513
  if (!config || config instanceof Error)
55562
55514
  return false;
55563
- return config.services != null && typeof config.services === "object" || config.experimentalServices != null && typeof config.experimentalServices === "object";
55515
+ return config.experimentalServices != null && typeof config.experimentalServices === "object";
55564
55516
  } catch {
55565
55517
  return false;
55566
55518
  }
@@ -55576,7 +55528,7 @@ async function tryDetectServices(cwd) {
55576
55528
  detectEntrypoint: createDetectEntrypoint(cwd)
55577
55529
  });
55578
55530
  const hasNoServicesError = result.errors.some(
55579
- (e) => e.code === "NO_SERVICES_CONFIGURED"
55531
+ (e) => e.code === "NO_EXPERIMENTAL_SERVICES_CONFIGURED"
55580
55532
  );
55581
55533
  if (hasNoServicesError) {
55582
55534
  return null;
@@ -55659,9 +55611,9 @@ async function prepareTomlServicesConfigWrite(configPath, config) {
55659
55611
  }
55660
55612
  function getServicesConfigWriteBlockerFromError(error) {
55661
55613
  switch (error?.code) {
55662
- case "SERVICES_AND_BUILDS":
55614
+ case "EXPERIMENTAL_SERVICES_AND_BUILDS":
55663
55615
  return "builds";
55664
- case "SERVICES_AND_FUNCTIONS":
55616
+ case "EXPERIMENTAL_SERVICES_AND_FUNCTIONS":
55665
55617
  return "functions";
55666
55618
  default:
55667
55619
  return null;