vercel 54.11.0 → 54.11.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 (50) hide show
  1. package/dist/chunks/{add-GWMRXCPO.js → add-T6Q4Z7IF.js} +4 -4
  2. package/dist/chunks/{chunk-4WWFHUVW.js → chunk-2BE6S2X5.js} +2 -2
  3. package/dist/chunks/{chunk-5LI3PLS3.js → chunk-3QANLV66.js} +2 -2
  4. package/dist/chunks/{chunk-T77OYIET.js → chunk-4AYB4D6T.js} +150 -93
  5. package/dist/chunks/{chunk-SASCGHJW.js → chunk-4EDYATFL.js} +4 -4
  6. package/dist/chunks/{chunk-PB37FIFM.js → chunk-4LAXPJJL.js} +1 -1
  7. package/dist/chunks/{chunk-HD23APLQ.js → chunk-74I4AWLF.js} +1 -1
  8. package/dist/chunks/{chunk-6UAZGWVF.js → chunk-A3HBHHB7.js} +1 -1
  9. package/dist/chunks/{chunk-FKD3R5S7.js → chunk-B5AHOULN.js} +1 -1
  10. package/dist/chunks/{chunk-OPAWD6UK.js → chunk-CJ2XGDXE.js} +1 -1
  11. package/dist/chunks/{chunk-2QPZXMJE.js → chunk-EJVUTQYL.js} +1 -1
  12. package/dist/chunks/{chunk-GVYAYUAT.js → chunk-FCJ5RCKQ.js} +2 -2
  13. package/dist/chunks/{chunk-RIDTMO6P.js → chunk-G3O5GGTH.js} +1 -1
  14. package/dist/chunks/{chunk-EMW6TUP2.js → chunk-JRCKHA5T.js} +4 -4
  15. package/dist/chunks/{chunk-DMKETFQS.js → chunk-KXQCHXEP.js} +1 -1
  16. package/dist/chunks/{chunk-Q3ZD22HR.js → chunk-MSTGWZ4V.js} +2 -2
  17. package/dist/chunks/{chunk-6YOW32LL.js → chunk-PEDCQGFS.js} +4 -4
  18. package/dist/chunks/{chunk-6ULI5CCZ.js → chunk-VEG7O6KK.js} +1 -1
  19. package/dist/chunks/{chunk-QUU263YC.js → chunk-WWFDZWZX.js} +3 -3
  20. package/dist/chunks/{chunk-EAKQRHY6.js → chunk-XRP2HYDU.js} +1 -1
  21. package/dist/chunks/{compile-vercel-config-Y7NCY4TH.js → compile-vercel-config-PINMHJZV.js} +1 -1
  22. package/dist/chunks/{delete-53LWNN3R.js → delete-JSAUWGZL.js} +2 -2
  23. package/dist/chunks/{disable-PB4E5RT2.js → disable-H6456MIN.js} +2 -2
  24. package/dist/chunks/{discard-XJPKRCEX.js → discard-MWHLHDII.js} +2 -2
  25. package/dist/chunks/{edit-LWDFUOJX.js → edit-PQBKAMEB.js} +3 -3
  26. package/dist/chunks/{enable-DBP5ARSO.js → enable-I2LTHACN.js} +2 -2
  27. package/dist/chunks/{export-LNTUARTL.js → export-PDBNDENX.js} +2 -2
  28. package/dist/chunks/{inspect-MLAWEGMC.js → inspect-YNZEEINA.js} +3 -3
  29. package/dist/chunks/{list-74DI6236.js → list-CXA72TY6.js} +3 -3
  30. package/dist/chunks/{list-FIZTMQ44.js → list-OT34GXTX.js} +2 -2
  31. package/dist/chunks/{ls-3WF6K6R5.js → ls-JLRWHA5W.js} +4 -4
  32. package/dist/chunks/{publish-BLJ4Z47H.js → publish-AR3FRIHJ.js} +2 -2
  33. package/dist/chunks/{query-N6O4SKZE.js → query-M4VFM77U.js} +2 -2
  34. package/dist/chunks/{reorder-TGFBUZO6.js → reorder-V5Q23O4J.js} +2 -2
  35. package/dist/chunks/{restore-RQB3RYLR.js → restore-FMGF5AU4.js} +2 -2
  36. package/dist/chunks/{rm-RY7JBRD5.js → rm-C54EEBUU.js} +4 -4
  37. package/dist/chunks/{rule-inspect-ENVJZ4PJ.js → rule-inspect-NKCIQNWD.js} +4 -4
  38. package/dist/chunks/{rules-3SSZZT7O.js → rules-LHTAZK7R.js} +6 -6
  39. package/dist/chunks/{schema-F2RCHWJK.js → schema-KGZ7YT4T.js} +2 -2
  40. package/dist/chunks/{update-QRLM425M.js → update-67NV2T55.js} +4 -4
  41. package/dist/commands/build/index.js +9 -9
  42. package/dist/commands/deploy/index.js +10 -10
  43. package/dist/commands/dev/index.js +8 -8
  44. package/dist/commands/env/index.js +4 -4
  45. package/dist/commands/link/index.js +7 -7
  46. package/dist/commands/list/index.js +3 -3
  47. package/dist/commands-bulk.js +31 -31
  48. package/dist/index.js +8 -8
  49. package/dist/version.mjs +1 -1
  50. package/package.json +17 -17
@@ -9,8 +9,8 @@ import {
9
9
  handleRulesApiError,
10
10
  parseRulesFlagsAndScope,
11
11
  rulesCollectionPath
12
- } from "./chunk-FKD3R5S7.js";
13
- import "./chunk-Q3ZD22HR.js";
12
+ } from "./chunk-B5AHOULN.js";
13
+ import "./chunk-MSTGWZ4V.js";
14
14
  import "./chunk-5SYDEK2N.js";
15
15
  import {
16
16
  validateJsonOutput
@@ -21,8 +21,8 @@ import {
21
21
  import {
22
22
  AGENT_REASON
23
23
  } from "./chunk-LJ5WXXG6.js";
24
- import "./chunk-6ULI5CCZ.js";
25
- import "./chunk-T77OYIET.js";
24
+ import "./chunk-VEG7O6KK.js";
25
+ import "./chunk-4AYB4D6T.js";
26
26
  import "./chunk-J5273CSE.js";
27
27
  import {
28
28
  buildCommandWithGlobalFlags,
@@ -25,10 +25,10 @@ import {
25
25
  import {
26
26
  buildCommand,
27
27
  pullCommand
28
- } from "./chunk-DMKETFQS.js";
28
+ } from "./chunk-KXQCHXEP.js";
29
29
  import {
30
30
  envCommand
31
- } from "./chunk-T77OYIET.js";
31
+ } from "./chunk-4AYB4D6T.js";
32
32
  import {
33
33
  confirmOption,
34
34
  forceOption,
@@ -9,7 +9,7 @@ import {
9
9
  } from "./chunk-V5P25P7F.js";
10
10
  import {
11
11
  getLocalPathConfig
12
- } from "./chunk-PB37FIFM.js";
12
+ } from "./chunk-4LAXPJJL.js";
13
13
  import {
14
14
  DEFAULT_VERCEL_CONFIG_FILENAME,
15
15
  VERCEL_CONFIG_EXTENSIONS,
@@ -36,7 +36,7 @@ import {
36
36
  useKeypress,
37
37
  usePrefix,
38
38
  useState
39
- } from "./chunk-T77OYIET.js";
39
+ } from "./chunk-4AYB4D6T.js";
40
40
  import {
41
41
  require_load_json_file
42
42
  } from "./chunk-J5273CSE.js";
@@ -2395,9 +2395,9 @@ var require_compile = __commonJS({
2395
2395
  endCompiling.call(this, schema, root, baseId);
2396
2396
  }
2397
2397
  function callValidate() {
2398
- var validate2 = compilation.validate;
2399
- var result = validate2.apply(this, arguments);
2400
- callValidate.errors = validate2.errors;
2398
+ var validate = compilation.validate;
2399
+ var result = validate.apply(this, arguments);
2400
+ callValidate.errors = validate.errors;
2401
2401
  return result;
2402
2402
  }
2403
2403
  function localCompile(_schema, _root, localRefs2, baseId2) {
@@ -2431,7 +2431,7 @@ var require_compile = __commonJS({
2431
2431
  sourceCode = vars(refVal, refValCode) + vars(patterns, patternCode) + vars(defaults, defaultCode) + vars(customRules, customRuleCode) + sourceCode;
2432
2432
  if (opts.processCode)
2433
2433
  sourceCode = opts.processCode(sourceCode, _schema);
2434
- var validate2;
2434
+ var validate;
2435
2435
  try {
2436
2436
  var makeValidate = new Function(
2437
2437
  "self",
@@ -2446,7 +2446,7 @@ var require_compile = __commonJS({
2446
2446
  "ValidationError",
2447
2447
  sourceCode
2448
2448
  );
2449
- validate2 = makeValidate(
2449
+ validate = makeValidate(
2450
2450
  self2,
2451
2451
  RULES,
2452
2452
  formats,
@@ -2458,26 +2458,26 @@ var require_compile = __commonJS({
2458
2458
  ucs2length,
2459
2459
  ValidationError2
2460
2460
  );
2461
- refVal[0] = validate2;
2461
+ refVal[0] = validate;
2462
2462
  } catch (e) {
2463
2463
  self2.logger.error("Error compiling schema, function code:", sourceCode);
2464
2464
  throw e;
2465
2465
  }
2466
- validate2.schema = _schema;
2467
- validate2.errors = null;
2468
- validate2.refs = refs;
2469
- validate2.refVal = refVal;
2470
- validate2.root = isRoot ? validate2 : _root;
2466
+ validate.schema = _schema;
2467
+ validate.errors = null;
2468
+ validate.refs = refs;
2469
+ validate.refVal = refVal;
2470
+ validate.root = isRoot ? validate : _root;
2471
2471
  if ($async)
2472
- validate2.$async = true;
2472
+ validate.$async = true;
2473
2473
  if (opts.sourceCode === true) {
2474
- validate2.source = {
2474
+ validate.source = {
2475
2475
  code: sourceCode,
2476
2476
  patterns,
2477
2477
  defaults
2478
2478
  };
2479
2479
  }
2480
- return validate2;
2480
+ return validate;
2481
2481
  }
2482
2482
  function resolveRef(baseId2, ref, isRoot) {
2483
2483
  ref = resolve5.url(baseId2, ref);
@@ -2574,27 +2574,27 @@ var require_compile = __commonJS({
2574
2574
  }
2575
2575
  }
2576
2576
  var compile2 = rule.definition.compile, inline = rule.definition.inline, macro = rule.definition.macro;
2577
- var validate2;
2577
+ var validate;
2578
2578
  if (compile2) {
2579
- validate2 = compile2.call(self2, schema2, parentSchema, it);
2579
+ validate = compile2.call(self2, schema2, parentSchema, it);
2580
2580
  } else if (macro) {
2581
- validate2 = macro.call(self2, schema2, parentSchema, it);
2581
+ validate = macro.call(self2, schema2, parentSchema, it);
2582
2582
  if (opts.validateSchema !== false)
2583
- self2.validateSchema(validate2, true);
2583
+ self2.validateSchema(validate, true);
2584
2584
  } else if (inline) {
2585
- validate2 = inline.call(self2, it, rule.keyword, schema2, parentSchema);
2585
+ validate = inline.call(self2, it, rule.keyword, schema2, parentSchema);
2586
2586
  } else {
2587
- validate2 = rule.definition.validate;
2588
- if (!validate2)
2587
+ validate = rule.definition.validate;
2588
+ if (!validate)
2589
2589
  return;
2590
2590
  }
2591
- if (validate2 === void 0)
2591
+ if (validate === void 0)
2592
2592
  throw new Error('custom keyword "' + rule.keyword + '"failed to compile');
2593
2593
  var index = customRules.length;
2594
- customRules[index] = validate2;
2594
+ customRules[index] = validate;
2595
2595
  return {
2596
2596
  code: "customRule" + index,
2597
- validate: validate2
2597
+ validate
2598
2598
  };
2599
2599
  }
2600
2600
  }
@@ -6145,7 +6145,7 @@ var require_ajv = __commonJS({
6145
6145
  var $dataMetaSchema = require_data();
6146
6146
  var util = require_util();
6147
6147
  module.exports = Ajv2;
6148
- Ajv2.prototype.validate = validate2;
6148
+ Ajv2.prototype.validate = validate;
6149
6149
  Ajv2.prototype.compile = compile;
6150
6150
  Ajv2.prototype.addSchema = addSchema;
6151
6151
  Ajv2.prototype.addMetaSchema = addMetaSchema;
@@ -6200,7 +6200,7 @@ var require_ajv = __commonJS({
6200
6200
  this.addKeyword("nullable", { metaSchema: { type: "boolean" } });
6201
6201
  addInitialSchemas(this);
6202
6202
  }
6203
- function validate2(schemaKeyRef, data) {
6203
+ function validate(schemaKeyRef, data) {
6204
6204
  var v;
6205
6205
  if (typeof schemaKeyRef == "string") {
6206
6206
  v = this.getSchema(schemaKeyRef);
@@ -20260,7 +20260,7 @@ var require_dist3 = __commonJS({
20260
20260
  var reFlags = flags(options);
20261
20261
  var _a = options.encode, encode = _a === void 0 ? function(x) {
20262
20262
  return x;
20263
- } : _a, _b = options.validate, validate2 = _b === void 0 ? true : _b;
20263
+ } : _a, _b = options.validate, validate = _b === void 0 ? true : _b;
20264
20264
  var matches = tokens.map(function(token) {
20265
20265
  if (typeof token === "object") {
20266
20266
  return new RegExp("^(?:" + token.pattern + ")$", reFlags);
@@ -20288,7 +20288,7 @@ var require_dist3 = __commonJS({
20288
20288
  }
20289
20289
  for (var j = 0; j < value.length; j++) {
20290
20290
  var segment = encode(value[j], token);
20291
- if (validate2 && !matches[i].test(segment)) {
20291
+ if (validate && !matches[i].test(segment)) {
20292
20292
  throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '", but got "' + segment + '"');
20293
20293
  }
20294
20294
  path += token.prefix + segment + token.suffix;
@@ -20297,7 +20297,7 @@ var require_dist3 = __commonJS({
20297
20297
  }
20298
20298
  if (typeof value === "string" || typeof value === "number") {
20299
20299
  var segment = encode(String(value), token);
20300
- if (validate2 && !matches[i].test(segment)) {
20300
+ if (validate && !matches[i].test(segment)) {
20301
20301
  throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but got "' + segment + '"');
20302
20302
  }
20303
20303
  path += token.prefix + segment + token.suffix;
@@ -20648,7 +20648,7 @@ var require_dist4 = __commonJS({
20648
20648
  var reFlags = flags(options);
20649
20649
  var _a = options.encode, encode = _a === void 0 ? function(x) {
20650
20650
  return x;
20651
- } : _a, _b = options.validate, validate2 = _b === void 0 ? true : _b;
20651
+ } : _a, _b = options.validate, validate = _b === void 0 ? true : _b;
20652
20652
  var matches = tokens.map(function(token) {
20653
20653
  if (typeof token === "object") {
20654
20654
  return new RegExp("^(?:".concat(token.pattern, ")$"), reFlags);
@@ -20676,7 +20676,7 @@ var require_dist4 = __commonJS({
20676
20676
  }
20677
20677
  for (var j = 0; j < value.length; j++) {
20678
20678
  var segment = encode(value[j], token);
20679
- if (validate2 && !matches[i].test(segment)) {
20679
+ if (validate && !matches[i].test(segment)) {
20680
20680
  throw new TypeError('Expected all "'.concat(token.name, '" to match "').concat(token.pattern, '", but got "').concat(segment, '"'));
20681
20681
  }
20682
20682
  path += token.prefix + segment + token.suffix;
@@ -20685,7 +20685,7 @@ var require_dist4 = __commonJS({
20685
20685
  }
20686
20686
  if (typeof value === "string" || typeof value === "number") {
20687
20687
  var segment = encode(String(value), token);
20688
- if (validate2 && !matches[i].test(segment)) {
20688
+ if (validate && !matches[i].test(segment)) {
20689
20689
  throw new TypeError('Expected "'.concat(token.name, '" to match "').concat(token.pattern, '", but got "').concat(segment, '"'));
20690
20690
  }
20691
20691
  path += token.prefix + segment + token.suffix;
@@ -20988,14 +20988,23 @@ var require_superstatic = __commonJS({
20988
20988
  normalizeHasKeys(r.has);
20989
20989
  normalizeHasKeys(r.missing);
20990
20990
  try {
20991
- const dest = replaceSegments(
20991
+ const interpolate = (value) => replaceSegments(
20992
20992
  segments,
20993
20993
  hasSegments,
20994
- r.destination,
20994
+ value,
20995
20995
  false,
20996
20996
  internalParamNames
20997
20997
  );
20998
- const route = { src, dest, check: true };
20998
+ let route;
20999
+ if (typeof r.destination === "string") {
21000
+ route = { src, dest: interpolate(r.destination), check: true };
21001
+ } else {
21002
+ const destination = { ...r.destination };
21003
+ if (typeof destination.path === "string") {
21004
+ destination.path = interpolate(destination.path);
21005
+ }
21006
+ route = { src, destination };
21007
+ }
20999
21008
  if (typeof r.env !== "undefined") {
21000
21009
  route.env = r.env;
21001
21010
  }
@@ -21553,6 +21562,32 @@ var require_schemas = __commonJS({
21553
21562
  }
21554
21563
  }
21555
21564
  };
21565
+ var serviceNameSchema = {
21566
+ description: "A service name identifier.",
21567
+ type: "string",
21568
+ minLength: 1,
21569
+ maxLength: 64,
21570
+ pattern: "^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$"
21571
+ };
21572
+ var serviceDestinationSchema = {
21573
+ description: "A service-targeted destination that delegates routing into a named service from `services`.",
21574
+ type: "object",
21575
+ additionalProperties: false,
21576
+ required: ["type", "service"],
21577
+ properties: {
21578
+ type: {
21579
+ description: "Discriminator. Must be `service`.",
21580
+ type: "string",
21581
+ enum: ["service"]
21582
+ },
21583
+ service: serviceNameSchema,
21584
+ path: {
21585
+ description: "Routing-only path used to select a route inside the target service. It does not mutate the URL observed by user code.",
21586
+ type: "string",
21587
+ maxLength: 4096
21588
+ }
21589
+ }
21590
+ };
21556
21591
  var matchableValueSchema = {
21557
21592
  description: "A value to match against. Can be a string (regex) or a condition operation object",
21558
21593
  anyOf: [
@@ -21901,8 +21936,10 @@ var require_schemas = __commonJS({
21901
21936
  maxLength: 4096
21902
21937
  },
21903
21938
  destination: {
21904
- type: "string",
21905
- maxLength: 4096
21939
+ anyOf: [
21940
+ { type: "string", maxLength: 4096 },
21941
+ serviceDestinationSchema
21942
+ ]
21906
21943
  },
21907
21944
  headers: {
21908
21945
  type: "object",
@@ -22051,9 +22088,8 @@ var require_schemas = __commonJS({
22051
22088
  maxLength: 4096
22052
22089
  },
22053
22090
  destination: {
22054
- description: "An absolute pathname to an existing resource or an external URL.",
22055
- type: "string",
22056
- maxLength: 4096
22091
+ description: "An absolute pathname to an existing resource, an external URL, or a service-targeted destination object.",
22092
+ anyOf: [{ type: "string", maxLength: 4096 }, serviceDestinationSchema]
22057
22093
  },
22058
22094
  has: hasSchema,
22059
22095
  missing: hasSchema,
@@ -22274,8 +22310,10 @@ var require_dist5 = __commonJS({
22274
22310
  `Route at index ${index} cannot define both \`dest\` and \`destination\`. Please use only one.`
22275
22311
  );
22276
22312
  }
22277
- route.dest = route.destination;
22278
- delete route.destination;
22313
+ if (typeof route.destination === "string") {
22314
+ route.dest = route.destination;
22315
+ delete route.destination;
22316
+ }
22279
22317
  }
22280
22318
  if (route.statusCode !== void 0) {
22281
22319
  if (route.status !== void 0) {
@@ -22335,6 +22373,11 @@ var require_dist5 = __commonJS({
22335
22373
  if (regError) {
22336
22374
  errors.push(regError);
22337
22375
  }
22376
+ if (route.destination && typeof route.destination === "object" && route.continue) {
22377
+ errors.push(
22378
+ `Route at index ${i} cannot define \`continue: true\` with a service \`destination\`. The service handoff is terminal.`
22379
+ );
22380
+ }
22338
22381
  const handleValue = handling[handling.length - 1];
22339
22382
  if (handleValue === "hit") {
22340
22383
  if (route.dest) {
@@ -22401,9 +22444,10 @@ var require_dist5 = __commonJS({
22401
22444
  link: "https://vercel.link/invalid-route-source-pattern"
22402
22445
  };
22403
22446
  }
22404
- if (destination) {
22447
+ const destinationString = typeof destination === "string" ? destination : typeof destination?.path === "string" ? destination.path : void 0;
22448
+ if (destinationString !== void 0) {
22405
22449
  try {
22406
- const { hostname: hostname2, pathname, query } = (0, import_url4.parse)(destination, true);
22450
+ const { hostname: hostname2, pathname, query } = (0, import_url4.parse)(destinationString, true);
22407
22451
  (0, import_superstatic.sourceToRegex)(hostname2 || "").segments.forEach(
22408
22452
  (name) => destinationSegments.add(name)
22409
22453
  );
@@ -37286,7 +37330,7 @@ var require_package = __commonJS({
37286
37330
  "../client/package.json"(exports, module) {
37287
37331
  module.exports = {
37288
37332
  name: "@vercel/client",
37289
- version: "17.5.12",
37333
+ version: "17.5.13",
37290
37334
  main: "dist/index.js",
37291
37335
  typings: "dist/index.d.ts",
37292
37336
  homepage: "https://vercel.com",
@@ -51801,7 +51845,7 @@ var require_tar_fs = __commonJS({
51801
51845
  }, stat2);
51802
51846
  }
51803
51847
  var dir = path.dirname(name);
51804
- validate2(xfs, dir, path.join(cwd, "."), function(err, valid) {
51848
+ validate(xfs, dir, path.join(cwd, "."), function(err, valid) {
51805
51849
  if (err)
51806
51850
  return next(err);
51807
51851
  if (!valid)
@@ -51833,14 +51877,14 @@ var require_tar_fs = __commonJS({
51833
51877
  extract.on("finish", opts.finish);
51834
51878
  return extract;
51835
51879
  };
51836
- function validate2(fs6, name, root, cb) {
51880
+ function validate(fs6, name, root, cb) {
51837
51881
  if (name === root)
51838
51882
  return cb(null, true);
51839
51883
  fs6.lstat(name, function(err, st) {
51840
51884
  if (err && err.code !== "ENOENT")
51841
51885
  return cb(err);
51842
51886
  if (err || st.isDirectory())
51843
- return validate2(fs6, path.join(name, ".."), root, cb);
51887
+ return validate(fs6, path.join(name, ".."), root, cb);
51844
51888
  cb(null, false);
51845
51889
  });
51846
51890
  }
@@ -53621,7 +53665,7 @@ function check(checked) {
53621
53665
  };
53622
53666
  }
53623
53667
  var esm_default2 = createPrompt((config, done) => {
53624
- const { instructions, pageSize = 7, loop = true, choices, required, validate: validate2 = () => true } = config;
53668
+ const { instructions, pageSize = 7, loop = true, choices, required, validate = () => true } = config;
53625
53669
  const theme = makeTheme(checkboxTheme, config.theme);
53626
53670
  const prefix = usePrefix({ theme });
53627
53671
  const [status, setStatus] = useState("pending");
@@ -53640,7 +53684,7 @@ var esm_default2 = createPrompt((config, done) => {
53640
53684
  useKeypress(async (key) => {
53641
53685
  if (isEnterKey(key)) {
53642
53686
  const selection = items.filter(isChecked);
53643
- const isValid = await validate2([...selection]);
53687
+ const isValid = await validate([...selection]);
53644
53688
  if (required && !items.some(isChecked)) {
53645
53689
  setError("At least one choice must be selected");
53646
53690
  } else if (isValid === true) {
@@ -56883,8 +56927,9 @@ var import_ajv = __toESM(require_ajv(), 1);
56883
56927
  var import_routing_utils = __toESM(require_dist5(), 1);
56884
56928
  var import_client = __toESM(require_dist7(), 1);
56885
56929
  import {
56886
- functionsSchema,
56930
+ getFunctionsSchema,
56887
56931
  buildsSchema,
56932
+ getMaxDurationLimit,
56888
56933
  getMaxDurationSchema,
56889
56934
  NowBuildError,
56890
56935
  getPrettyError
@@ -57116,7 +57161,7 @@ var envVarNamesSchema = {
57116
57161
  pattern: "^[A-Za-z_][A-Za-z0-9_]*$",
57117
57162
  maxLength: 256
57118
57163
  };
57119
- var experimentalServicesCommonProperties = {
57164
+ var getExperimentalServicesCommonProperties = () => ({
57120
57165
  entrypoint: {
57121
57166
  type: "string",
57122
57167
  minLength: 1,
@@ -57186,7 +57231,7 @@ var experimentalServicesCommonProperties = {
57186
57231
  }
57187
57232
  ]
57188
57233
  }
57189
- };
57234
+ });
57190
57235
  var experimentalServicesRoutableProperties = {
57191
57236
  mount: experimentalServicesMountSchema,
57192
57237
  routePrefix: {
@@ -57200,13 +57245,13 @@ var experimentalServicesRoutableProperties = {
57200
57245
  maxLength: 63
57201
57246
  }
57202
57247
  };
57203
- var experimentalServicesServiceConfigSchema = {
57248
+ var getExperimentalServicesServiceConfigSchema = () => ({
57204
57249
  oneOf: [
57205
57250
  {
57206
57251
  type: "object",
57207
57252
  additionalProperties: false,
57208
57253
  properties: {
57209
- ...experimentalServicesCommonProperties,
57254
+ ...getExperimentalServicesCommonProperties(),
57210
57255
  ...experimentalServicesRoutableProperties,
57211
57256
  type: {
57212
57257
  enum: ["web"]
@@ -57218,7 +57263,7 @@ var experimentalServicesServiceConfigSchema = {
57218
57263
  additionalProperties: false,
57219
57264
  required: ["type", "trigger", "schedule"],
57220
57265
  properties: {
57221
- ...experimentalServicesCommonProperties,
57266
+ ...getExperimentalServicesCommonProperties(),
57222
57267
  type: {
57223
57268
  const: "job"
57224
57269
  },
@@ -57233,7 +57278,7 @@ var experimentalServicesServiceConfigSchema = {
57233
57278
  additionalProperties: false,
57234
57279
  required: ["type", "trigger", "topics"],
57235
57280
  properties: {
57236
- ...experimentalServicesCommonProperties,
57281
+ ...getExperimentalServicesCommonProperties(),
57237
57282
  type: {
57238
57283
  const: "job"
57239
57284
  },
@@ -57253,7 +57298,7 @@ var experimentalServicesServiceConfigSchema = {
57253
57298
  additionalProperties: false,
57254
57299
  required: ["type", "trigger", "entrypoint"],
57255
57300
  properties: {
57256
- ...experimentalServicesCommonProperties,
57301
+ ...getExperimentalServicesCommonProperties(),
57257
57302
  type: {
57258
57303
  const: "job"
57259
57304
  },
@@ -57267,7 +57312,7 @@ var experimentalServicesServiceConfigSchema = {
57267
57312
  additionalProperties: false,
57268
57313
  required: ["type"],
57269
57314
  properties: {
57270
- ...experimentalServicesCommonProperties,
57315
+ ...getExperimentalServicesCommonProperties(),
57271
57316
  type: {
57272
57317
  const: "worker"
57273
57318
  },
@@ -57292,7 +57337,7 @@ var experimentalServicesServiceConfigSchema = {
57292
57337
  additionalProperties: false,
57293
57338
  required: ["type", "schedule"],
57294
57339
  properties: {
57295
- ...experimentalServicesCommonProperties,
57340
+ ...getExperimentalServicesCommonProperties(),
57296
57341
  type: {
57297
57342
  const: "cron"
57298
57343
  },
@@ -57300,15 +57345,15 @@ var experimentalServicesServiceConfigSchema = {
57300
57345
  }
57301
57346
  }
57302
57347
  ]
57303
- };
57304
- var experimentalServicesSchema = {
57348
+ });
57349
+ var getExperimentalServicesSchema = () => ({
57305
57350
  type: "object",
57306
57351
  propertyNames: {
57307
57352
  pattern: "^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$",
57308
57353
  maxLength: 64
57309
57354
  },
57310
- additionalProperties: experimentalServicesServiceConfigSchema
57311
- };
57355
+ additionalProperties: getExperimentalServicesServiceConfigSchema()
57356
+ });
57312
57357
  var experimentalServiceGroupsSchema = {
57313
57358
  type: "object",
57314
57359
  propertyNames: {
@@ -57358,7 +57403,7 @@ var experimentalServicesV2BindingsSchema = {
57358
57403
  maxItems: 100,
57359
57404
  items: experimentalServicesV2BindingSchema
57360
57405
  };
57361
- var experimentalServicesV2ServiceConfigSchema = {
57406
+ var getExperimentalServicesV2ServiceConfigSchema = () => ({
57362
57407
  type: "object",
57363
57408
  additionalProperties: false,
57364
57409
  required: ["root"],
@@ -57381,7 +57426,7 @@ var experimentalServicesV2ServiceConfigSchema = {
57381
57426
  ignoreCommand: experimentalServicesV2CommandSchema,
57382
57427
  outputDirectory: experimentalServicesV2PathSchema,
57383
57428
  bindings: experimentalServicesV2BindingsSchema,
57384
- functions: functionsSchema,
57429
+ functions: getFunctionsSchema(),
57385
57430
  headers: import_routing_utils.headersSchema,
57386
57431
  redirects: import_routing_utils.redirectsSchema,
57387
57432
  rewrites: import_routing_utils.rewritesSchema,
@@ -57389,40 +57434,52 @@ var experimentalServicesV2ServiceConfigSchema = {
57389
57434
  cleanUrls: import_routing_utils.cleanUrlsSchema,
57390
57435
  trailingSlash: import_routing_utils.trailingSlashSchema
57391
57436
  }
57392
- };
57393
- var experimentalServicesV2Schema = {
57437
+ });
57438
+ var getExperimentalServicesV2Schema = () => ({
57394
57439
  type: "object",
57395
57440
  propertyNames: {
57396
57441
  pattern: "^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$",
57397
57442
  maxLength: 64
57398
57443
  },
57399
- additionalProperties: experimentalServicesV2ServiceConfigSchema
57400
- };
57401
- var vercelConfigSchema = {
57402
- type: "object",
57403
- // These are not all possibilities because `vc dev`
57404
- // doesn't need to know about `regions`, `public`, etc.
57405
- additionalProperties: true,
57406
- properties: {
57407
- builds: buildsSchema,
57408
- routes: import_routing_utils.routesSchema,
57409
- cleanUrls: import_routing_utils.cleanUrlsSchema,
57410
- headers: import_routing_utils.headersSchema,
57411
- redirects: import_routing_utils.redirectsSchema,
57412
- rewrites: import_routing_utils.rewritesSchema,
57413
- trailingSlash: import_routing_utils.trailingSlashSchema,
57414
- functions: functionsSchema,
57415
- images: imagesSchema,
57416
- crons: cronsSchema,
57417
- bunVersion: { type: "string" },
57418
- experimentalServices: experimentalServicesSchema,
57419
- experimentalServiceGroups: experimentalServiceGroupsSchema,
57420
- experimentalServicesV2: experimentalServicesV2Schema
57421
- }
57422
- };
57444
+ additionalProperties: getExperimentalServicesV2ServiceConfigSchema()
57445
+ });
57446
+ function buildVercelConfigSchema() {
57447
+ return {
57448
+ type: "object",
57449
+ // These are not all possibilities because `vc dev`
57450
+ // doesn't need to know about `regions`, `public`, etc.
57451
+ additionalProperties: true,
57452
+ properties: {
57453
+ builds: buildsSchema,
57454
+ routes: import_routing_utils.routesSchema,
57455
+ cleanUrls: import_routing_utils.cleanUrlsSchema,
57456
+ headers: import_routing_utils.headersSchema,
57457
+ redirects: import_routing_utils.redirectsSchema,
57458
+ rewrites: import_routing_utils.rewritesSchema,
57459
+ trailingSlash: import_routing_utils.trailingSlashSchema,
57460
+ functions: getFunctionsSchema(),
57461
+ images: imagesSchema,
57462
+ crons: cronsSchema,
57463
+ bunVersion: { type: "string" },
57464
+ experimentalServices: getExperimentalServicesSchema(),
57465
+ experimentalServiceGroups: experimentalServiceGroupsSchema,
57466
+ experimentalServicesV2: getExperimentalServicesV2Schema()
57467
+ }
57468
+ };
57469
+ }
57423
57470
  var ajv = new import_ajv.default();
57424
- var validate = ajv.compile(vercelConfigSchema);
57471
+ var validatorCacheByLimit = /* @__PURE__ */ new Map();
57472
+ function getConfigValidator() {
57473
+ const cacheKey = getMaxDurationLimit() ?? "skipped";
57474
+ let validate = validatorCacheByLimit.get(cacheKey);
57475
+ if (!validate) {
57476
+ validate = ajv.compile(buildVercelConfigSchema());
57477
+ validatorCacheByLimit.set(cacheKey, validate);
57478
+ }
57479
+ return validate;
57480
+ }
57425
57481
  function validateConfig(config) {
57482
+ const validate = getConfigValidator();
57426
57483
  if (!validate(config)) {
57427
57484
  if (validate.errors && validate.errors[0]) {
57428
57485
  const error = validate.errors[0];
@@ -6,13 +6,13 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  writeProjectSettings
9
- } from "./chunk-HD23APLQ.js";
9
+ } from "./chunk-74I4AWLF.js";
10
10
  import {
11
11
  ensureLink
12
- } from "./chunk-GVYAYUAT.js";
12
+ } from "./chunk-FCJ5RCKQ.js";
13
13
  import {
14
14
  pullCommand
15
- } from "./chunk-DMKETFQS.js";
15
+ } from "./chunk-KXQCHXEP.js";
16
16
  import {
17
17
  help
18
18
  } from "./chunk-VNUNCNPE.js";
@@ -23,7 +23,7 @@ import {
23
23
  envPullCommandLogic,
24
24
  humanizePath,
25
25
  parseTarget
26
- } from "./chunk-T77OYIET.js";
26
+ } from "./chunk-4AYB4D6T.js";
27
27
  import {
28
28
  TelemetryClient
29
29
  } from "./chunk-J5273CSE.js";
@@ -7,7 +7,7 @@ const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  VERCEL_DIR,
9
9
  isVercelTomlEnabled
10
- } from "./chunk-T77OYIET.js";
10
+ } from "./chunk-4AYB4D6T.js";
11
11
  import {
12
12
  parseArguments
13
13
  } from "./chunk-6IQZVQV6.js";
@@ -8,7 +8,7 @@ import {
8
8
  VERCEL_DIR,
9
9
  VERCEL_DIR_PROJECT,
10
10
  require_lib
11
- } from "./chunk-T77OYIET.js";
11
+ } from "./chunk-4AYB4D6T.js";
12
12
  import {
13
13
  require_dist
14
14
  } from "./chunk-Z5SBJH6L.js";
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  STANDARD_ENVIRONMENTS
9
- } from "./chunk-T77OYIET.js";
9
+ } from "./chunk-4AYB4D6T.js";
10
10
  import {
11
11
  getCommandName,
12
12
  require_lib
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  resolveAlertsScope
9
- } from "./chunk-Q3ZD22HR.js";
9
+ } from "./chunk-MSTGWZ4V.js";
10
10
  import {
11
11
  handleValidationError,
12
12
  outputError,