vercel 59.0.0 → 59.1.3

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 (107) hide show
  1. package/dist/chunks/{add-SQ6ERCFZ.js → add-CUGPQYFW.js} +8 -8
  2. package/dist/chunks/{add-QZUQNL2C.js → add-PP3PJPJV.js} +5 -5
  3. package/dist/chunks/{add-3LO3UMYC.js → add-PRG4KKYH.js} +9 -11
  4. package/dist/chunks/{build-WMUKZEFH.js → build-T22GMLY6.js} +8 -8
  5. package/dist/chunks/{chunk-ELA5VN3A.js → chunk-2MF3ZAVW.js} +13 -4
  6. package/dist/chunks/{chunk-ZFTRB6AB.js → chunk-43DD2KNM.js} +1 -1
  7. package/dist/chunks/{chunk-N5DK7EMY.js → chunk-4HI7G6KG.js} +1 -1
  8. package/dist/chunks/{chunk-DQDJVHA5.js → chunk-4JKZ7SRX.js} +4 -4
  9. package/dist/chunks/{chunk-ZRWSSPW5.js → chunk-57G6HBJ4.js} +2 -2
  10. package/dist/chunks/{chunk-RWRSUGXY.js → chunk-5DVMXOFT.js} +2 -2
  11. package/dist/chunks/{chunk-SHR6DYA5.js → chunk-7NQLRE5V.js} +1 -1
  12. package/dist/chunks/{chunk-JLWQWYKO.js → chunk-BBSS3XIW.js} +2 -4
  13. package/dist/chunks/{chunk-V42UVZDX.js → chunk-BCZFZETZ.js} +5 -5
  14. package/dist/chunks/{chunk-MZ3L3SGZ.js → chunk-DAWJOQF6.js} +4 -6
  15. package/dist/chunks/{chunk-W34XLJ44.js → chunk-DEB45ND4.js} +3 -3
  16. package/dist/chunks/{chunk-QGQX7BYN.js → chunk-DOMLWKKZ.js} +38 -15
  17. package/dist/chunks/{chunk-TEQKKTJQ.js → chunk-F7OXZLY2.js} +2 -2
  18. package/dist/chunks/{chunk-J6LK45HT.js → chunk-GFCTRJI5.js} +16 -2
  19. package/dist/chunks/{chunk-O26N2UPI.js → chunk-GGPE5377.js} +1 -1
  20. package/dist/chunks/{chunk-4LDQIDRM.js → chunk-GMWRTZVZ.js} +9 -1
  21. package/dist/chunks/{chunk-LT5UQNTC.js → chunk-IKKUCZE7.js} +3 -3
  22. package/dist/chunks/{chunk-XIG4GH62.js → chunk-JYEO6OJS.js} +188 -102
  23. package/dist/chunks/{chunk-DMLU5KQE.js → chunk-KTLFN5FV.js} +1 -1
  24. package/dist/chunks/{chunk-L6NIIAB7.js → chunk-LNVZ3T7X.js} +6 -8
  25. package/dist/chunks/{chunk-UQVOFOP2.js → chunk-M34ZRNDQ.js} +1 -1
  26. package/dist/chunks/{chunk-2SFMOCWR.js → chunk-PD7ZUXE7.js} +1 -1
  27. package/dist/chunks/chunk-QCVKGY2A.js +151 -0
  28. package/dist/chunks/{chunk-S3H7ITUR.js → chunk-QD5NX7RG.js} +1 -1
  29. package/dist/chunks/{chunk-4N7XLXM2.js → chunk-QQ6PH4RY.js} +1 -0
  30. package/dist/chunks/{chunk-A5KP5HAI.js → chunk-RIB4S2IB.js} +10 -1
  31. package/dist/chunks/{chunk-ZX2FSPWV.js → chunk-SJQEGGH7.js} +4 -4
  32. package/dist/chunks/{chunk-5KI3SUJI.js → chunk-SOKQBFF7.js} +609 -73
  33. package/dist/chunks/{chunk-PSZQNYEV.js → chunk-SQGMTRZD.js} +91 -43
  34. package/dist/chunks/{chunk-TJJ562C5.js → chunk-TJLBCLEX.js} +15 -0
  35. package/dist/chunks/{chunk-WE3TFESA.js → chunk-TM3F7PLR.js} +2 -2
  36. package/dist/chunks/{chunk-SD2QZHZA.js → chunk-TNKRSTMB.js} +1 -1
  37. package/dist/chunks/{chunk-KT4XXKJK.js → chunk-VAFU7DXZ.js} +195 -3
  38. package/dist/chunks/{chunk-RQ7H43CJ.js → chunk-VDJN4WKH.js} +1 -1
  39. package/dist/chunks/{chunk-3R5JGMHV.js → chunk-VE545BR3.js} +4473 -2796
  40. package/dist/chunks/{chunk-B3JTF4CF.js → chunk-WC7IINFV.js} +10 -1
  41. package/dist/chunks/{chunk-SQAQED4U.js → chunk-XZLI27ES.js} +2 -2
  42. package/dist/chunks/{chunk-CMR5KQVR.js → chunk-ZUVJISHS.js} +3 -3
  43. package/dist/chunks/{clear-W2B4CHTP.js → clear-Z4IKUIN7.js} +5 -5
  44. package/dist/chunks/{compile-vercel-config-HTWOS7DZ.js → compile-vercel-config-PSVXFAZW.js} +3 -3
  45. package/dist/chunks/{config-EGJY4UUE.js → config-M5GMZ2X5.js} +8 -8
  46. package/dist/chunks/{constants-WEQVJSYS.js → constants-YMCRE6IG.js} +1 -1
  47. package/dist/chunks/{delete-BVMID4W2.js → delete-5GRRDJSF.js} +4 -4
  48. package/dist/chunks/{delete-6I7V5AGV.js → delete-P4XIBY7T.js} +5 -5
  49. package/dist/chunks/{disable-I54JNXJE.js → disable-NT5NYVO7.js} +4 -4
  50. package/dist/chunks/{discard-6TSJJCUQ.js → discard-TBNIEAJZ.js} +4 -4
  51. package/dist/chunks/{edit-YS2SWHFJ.js → edit-DJ6MT6HA.js} +5 -5
  52. package/dist/chunks/{edit-KCWYQ2YT.js → edit-UF3D2CCH.js} +5 -5
  53. package/dist/chunks/{enable-RYXRIGQN.js → enable-JTQBQMBO.js} +4 -4
  54. package/dist/chunks/{export-G3NYOADE.js → export-OKMRGRVM.js} +4 -4
  55. package/dist/chunks/{image-RJBLSUES.js → image-ARUJH4H5.js} +4 -4
  56. package/dist/chunks/{import-builders-M6F3F4DH.js → import-builders-3NTMZM64.js} +6 -4
  57. package/dist/chunks/{inspect-YTCVTZHY.js → inspect-5NETOGAI.js} +6 -7
  58. package/dist/chunks/{inspect-AE4YIJYS.js → inspect-CHFKZKKP.js} +5 -5
  59. package/dist/chunks/{inspect-Z74NZZ2A.js → inspect-FXZTQY62.js} +6 -6
  60. package/dist/chunks/{inspect-E7TBGK7D.js → inspect-PTXIBSYW.js} +8 -8
  61. package/dist/chunks/{inspect-7XUEVBDM.js → inspect-UXP2HDES.js} +5 -5
  62. package/dist/chunks/{list-SGPLL4KJ.js → list-2WMIVJ2R.js} +15 -10
  63. package/dist/chunks/{list-KJNC3NOE.js → list-ADI55WKW.js} +6 -7
  64. package/dist/chunks/{list-WXS2AFQD.js → list-DYCZA2VX.js} +3 -3
  65. package/dist/chunks/{login-XD3CFPBF.js → login-YCSIQG6B.js} +8 -8
  66. package/dist/chunks/{ls-5DSOTTYX.js → ls-2TKUIUK4.js} +11 -12
  67. package/dist/chunks/{ls-KE5I7BZO.js → ls-EOMIQLRH.js} +11 -12
  68. package/dist/chunks/{ls-SVSO3677.js → ls-PQFDGOJL.js} +7 -8
  69. package/dist/chunks/{ls-5A4327XJ.js → ls-RZVTIP5U.js} +11 -12
  70. package/dist/chunks/{ls-NBKSDTWX.js → ls-VIOMDUGW.js} +14 -15
  71. package/dist/chunks/{open-M2MOAE2K.js → open-JYPWOXQD.js} +5 -5
  72. package/dist/chunks/{permissions-ADPY554K.js → permissions-SGJWGEVD.js} +6 -6
  73. package/dist/chunks/{publish-OBIOOL7T.js → publish-ZUQHJAXL.js} +4 -4
  74. package/dist/chunks/{push-5237XBTO.js → push-XMVKG5A5.js} +8 -8
  75. package/dist/chunks/{query-ILL74HIA.js → query-ZLJZEGZB.js} +237 -49
  76. package/dist/chunks/{reorder-GAUAO4LW.js → reorder-NVHDWMRU.js} +4 -4
  77. package/dist/chunks/{reply-IZJHEULD.js → reply-PUUPUQ3V.js} +5 -5
  78. package/dist/chunks/{resolve-HTIT7CGL.js → resolve-5U2LJVE6.js} +5 -5
  79. package/dist/chunks/{restore-IKL74HSE.js → restore-OXIUY2UI.js} +4 -4
  80. package/dist/chunks/{rm-QAVNP5KX.js → rm-3IOCBNPE.js} +5 -5
  81. package/dist/chunks/{rm-5Y6BL47T.js → rm-BZNKJRXU.js} +5 -5
  82. package/dist/chunks/{rm-C37ZORQV.js → rm-OUI4ZB5R.js} +5 -5
  83. package/dist/chunks/{rm-XJU5SBGH.js → rm-Z2KYJ7XT.js} +8 -8
  84. package/dist/chunks/{rule-inspect-DYHWWROS.js → rule-inspect-ZBJJCDQV.js} +7 -8
  85. package/dist/chunks/{rules-M6EJ2Y6S.js → rules-HEGAXXUN.js} +8 -8
  86. package/dist/chunks/{schema-LLBDZNIC.js → schema-7GVL3BNP.js} +63 -31
  87. package/dist/chunks/{schema-ZNPIMQL5.js → schema-ZYIJYA2E.js} +2 -3
  88. package/dist/chunks/{tags-HR5RVQFA.js → tags-3SCWCMNQ.js} +3 -3
  89. package/dist/chunks/{types-UWI4HETD.js → types-AJHILHO5.js} +2 -4
  90. package/dist/chunks/{update-6A5V6HBH.js → update-YR2GCCJN.js} +7 -8
  91. package/dist/commands/build/index.js +10 -15
  92. package/dist/commands/deploy/index.js +310 -302
  93. package/dist/commands/dev/index.js +254 -181
  94. package/dist/commands/env/index.js +15 -16
  95. package/dist/commands/link/index.js +14 -20
  96. package/dist/commands/list/index.js +7 -9
  97. package/dist/commands-bulk.js +4408 -1246
  98. package/dist/help.js +1 -1
  99. package/dist/index.js +30 -22
  100. package/dist/version.mjs +1 -1
  101. package/package.json +41 -40
  102. package/dist/chunks/chunk-BGILSKZ5.js +0 -85
  103. package/dist/chunks/chunk-GFG6QDIE.js +0 -101
  104. package/dist/chunks/chunk-KBEX5MYS.js +0 -208
  105. package/dist/chunks/chunk-PBECT5BN.js +0 -107
  106. package/dist/chunks/chunk-PVCJIMVY.js +0 -1552
  107. /package/dist/{commands/dev/next-dev-websocket-shim-preload.cjs → runtime-assets/node-preloads/next-dev-websocket.cjs} +0 -0
@@ -9,7 +9,7 @@ import {
9
9
  } from "../../chunks/chunk-2HSQ7YUK.js";
10
10
  import {
11
11
  getUpdateCommand
12
- } from "../../chunks/chunk-UQVOFOP2.js";
12
+ } from "../../chunks/chunk-M34ZRNDQ.js";
13
13
  import {
14
14
  getGlobalPathConfig,
15
15
  highlight
@@ -25,38 +25,32 @@ import {
25
25
  getStaticServiceSchedules,
26
26
  require_mime_types,
27
27
  staticFiles
28
- } from "../../chunks/chunk-ZFTRB6AB.js";
28
+ } from "../../chunks/chunk-43DD2KNM.js";
29
29
  import {
30
30
  importBuilders,
31
31
  require_npa
32
- } from "../../chunks/chunk-PSZQNYEV.js";
32
+ } from "../../chunks/chunk-SQGMTRZD.js";
33
33
  import "../../chunks/chunk-IB5L4LKZ.js";
34
34
  import {
35
35
  pickOverrides
36
- } from "../../chunks/chunk-N5DK7EMY.js";
36
+ } from "../../chunks/chunk-4HI7G6KG.js";
37
37
  import "../../chunks/chunk-R6IGDGX3.js";
38
- import {
39
- displayDetectedServices,
40
- readConfig,
41
- setupAndLink
42
- } from "../../chunks/chunk-PVCJIMVY.js";
43
- import {
44
- getLocalPathConfig
45
- } from "../../chunks/chunk-BGILSKZ5.js";
46
38
  import {
47
39
  help
48
- } from "../../chunks/chunk-ZX2FSPWV.js";
49
- import "../../chunks/chunk-KT4XXKJK.js";
40
+ } from "../../chunks/chunk-SJQEGGH7.js";
50
41
  import {
51
42
  VERCEL_DIR,
52
43
  VERCEL_OIDC_TOKEN,
53
44
  detectExplicitScope,
45
+ displayDetectedServices,
54
46
  findRepoRoot,
55
47
  getLinkedProject,
48
+ getLocalPathConfig,
56
49
  getVercelDirectory,
57
50
  param,
58
51
  printProjectNotFoundError,
59
52
  pullEnvRecords,
53
+ readConfig,
60
54
  readJSONFile,
61
55
  require_brace_expansion,
62
56
  require_dist as require_dist2,
@@ -71,22 +65,23 @@ import {
71
65
  require_minimatch,
72
66
  require_pluralize,
73
67
  resolveProjectCwd,
68
+ setupAndLink,
74
69
  tryDetectServices,
75
70
  validateConfig
76
- } from "../../chunks/chunk-3R5JGMHV.js";
71
+ } from "../../chunks/chunk-VE545BR3.js";
77
72
  import {
78
73
  TelemetryClient
79
74
  } from "../../chunks/chunk-ECCWJHC6.js";
80
75
  import {
81
76
  buildCommandWithYes,
82
77
  outputActionRequired
83
- } from "../../chunks/chunk-TJJ562C5.js";
78
+ } from "../../chunks/chunk-TJLBCLEX.js";
84
79
  import {
85
80
  require_ms
86
81
  } from "../../chunks/chunk-GGP5R3FU.js";
87
82
  import {
88
83
  printError
89
- } from "../../chunks/chunk-KBEX5MYS.js";
84
+ } from "../../chunks/chunk-VAFU7DXZ.js";
90
85
  import {
91
86
  parseArguments
92
87
  } from "../../chunks/chunk-XLKFJPMT.js";
@@ -6846,9 +6841,9 @@ var require_urlparser = __commonJS({
6846
6841
  if (hasTrailingSlash && srcPath.join("/").substr(-1) !== "/") {
6847
6842
  srcPath.push("");
6848
6843
  }
6849
- var isAbsolute2 = srcPath[0] === "" || srcPath[0] && srcPath[0].charCodeAt(0) === 47;
6844
+ var isAbsolute3 = srcPath[0] === "" || srcPath[0] && srcPath[0].charCodeAt(0) === 47;
6850
6845
  if (psychotic) {
6851
- result.hostname = result.host = isAbsolute2 ? "" : srcPath.length ? srcPath.shift() : "";
6846
+ result.hostname = result.host = isAbsolute3 ? "" : srcPath.length ? srcPath.shift() : "";
6852
6847
  var authInHost = result.host && result.host.indexOf("@") > 0 ? result.host.split("@") : false;
6853
6848
  if (authInHost) {
6854
6849
  result.auth = authInHost.shift();
@@ -6856,7 +6851,7 @@ var require_urlparser = __commonJS({
6856
6851
  }
6857
6852
  }
6858
6853
  mustEndAbs = mustEndAbs || result.host && srcPath.length;
6859
- if (mustEndAbs && !isAbsolute2) {
6854
+ if (mustEndAbs && !isAbsolute3) {
6860
6855
  srcPath.unshift("");
6861
6856
  }
6862
6857
  result.pathname = srcPath.length === 0 ? null : srcPath.join("/");
@@ -7117,13 +7112,13 @@ var require_urlparser = __commonJS({
7117
7112
  this.pathname = prePath === "" ? "/" : prePath;
7118
7113
  return;
7119
7114
  }
7120
- var path7;
7115
+ var path6;
7121
7116
  if (escape2) {
7122
- path7 = this._getComponentEscaped(str, pathStart, pathEnd, false);
7117
+ path6 = this._getComponentEscaped(str, pathStart, pathEnd, false);
7123
7118
  } else {
7124
- path7 = str.slice(pathStart, pathEnd + 1);
7119
+ path6 = str.slice(pathStart, pathEnd + 1);
7125
7120
  }
7126
- this.pathname = prePath === "" ? this._prependSlash ? "/" + path7 : path7 : prePath + path7;
7121
+ this.pathname = prePath === "" ? this._prependSlash ? "/" + path6 : path6 : prePath + path6;
7127
7122
  };
7128
7123
  Url.prototype._parseQuery = function Url$_parseQuery(str, start, end, disableAutoEscapeChars) {
7129
7124
  var queryStart = start;
@@ -7426,10 +7421,10 @@ var require_urlparser = __commonJS({
7426
7421
  // ../../node_modules/.pnpm/serve-handler@6.1.1/node_modules/serve-handler/src/glob-slash.js
7427
7422
  var require_glob_slash = __commonJS({
7428
7423
  "../../node_modules/.pnpm/serve-handler@6.1.1/node_modules/serve-handler/src/glob-slash.js"(exports2, module2) {
7429
- var path7 = __require("path");
7430
- var normalize = (value) => path7.posix.normalize(path7.posix.join("/", value));
7431
- module2.exports = (value) => value.charAt(0) === "!" ? `!${normalize(value.substr(1))}` : normalize(value);
7432
- module2.exports.normalize = normalize;
7424
+ var path6 = __require("path");
7425
+ var normalize2 = (value) => path6.posix.normalize(path6.posix.join("/", value));
7426
+ module2.exports = (value) => value.charAt(0) === "!" ? `!${normalize2(value.substr(1))}` : normalize2(value);
7427
+ module2.exports.normalize = normalize2;
7433
7428
  }
7434
7429
  });
7435
7430
 
@@ -7438,9 +7433,9 @@ var require_minimatch2 = __commonJS({
7438
7433
  "../../node_modules/.pnpm/minimatch@3.0.4/node_modules/minimatch/minimatch.js"(exports2, module2) {
7439
7434
  module2.exports = minimatch3;
7440
7435
  minimatch3.Minimatch = Minimatch;
7441
- var path7 = { sep: "/" };
7436
+ var path6 = { sep: "/" };
7442
7437
  try {
7443
- path7 = __require("path");
7438
+ path6 = __require("path");
7444
7439
  } catch (er) {
7445
7440
  }
7446
7441
  var GLOBSTAR = minimatch3.GLOBSTAR = Minimatch.GLOBSTAR = {};
@@ -7523,8 +7518,8 @@ var require_minimatch2 = __commonJS({
7523
7518
  if (!options)
7524
7519
  options = {};
7525
7520
  pattern = pattern.trim();
7526
- if (path7.sep !== "/") {
7527
- pattern = pattern.split(path7.sep).join("/");
7521
+ if (path6.sep !== "/") {
7522
+ pattern = pattern.split(path6.sep).join("/");
7528
7523
  }
7529
7524
  this.options = options;
7530
7525
  this.set = [];
@@ -7891,8 +7886,8 @@ var require_minimatch2 = __commonJS({
7891
7886
  if (f === "/" && partial)
7892
7887
  return true;
7893
7888
  var options = this.options;
7894
- if (path7.sep !== "/") {
7895
- f = f.split(path7.sep).join("/");
7889
+ if (path6.sep !== "/") {
7890
+ f = f.split(path6.sep).join("/");
7896
7891
  }
7897
7892
  f = f.split(slashSplit);
7898
7893
  this.debug(this.pattern, "split", f);
@@ -8029,7 +8024,7 @@ var require_path_to_regexp = __commonJS({
8029
8024
  var tokens = [];
8030
8025
  var key = 0;
8031
8026
  var index = 0;
8032
- var path7 = "";
8027
+ var path6 = "";
8033
8028
  var defaultDelimiter = options && options.delimiter || DEFAULT_DELIMITER;
8034
8029
  var delimiters = options && options.delimiters || DEFAULT_DELIMITERS;
8035
8030
  var pathEscaped = false;
@@ -8038,10 +8033,10 @@ var require_path_to_regexp = __commonJS({
8038
8033
  var m = res[0];
8039
8034
  var escaped = res[1];
8040
8035
  var offset = res.index;
8041
- path7 += str.slice(index, offset);
8036
+ path6 += str.slice(index, offset);
8042
8037
  index = offset + m.length;
8043
8038
  if (escaped) {
8044
- path7 += escaped[1];
8039
+ path6 += escaped[1];
8045
8040
  pathEscaped = true;
8046
8041
  continue;
8047
8042
  }
@@ -8051,16 +8046,16 @@ var require_path_to_regexp = __commonJS({
8051
8046
  var capture = res[3];
8052
8047
  var group = res[4];
8053
8048
  var modifier = res[5];
8054
- if (!pathEscaped && path7.length) {
8055
- var k = path7.length - 1;
8056
- if (delimiters.indexOf(path7[k]) > -1) {
8057
- prev = path7[k];
8058
- path7 = path7.slice(0, k);
8049
+ if (!pathEscaped && path6.length) {
8050
+ var k = path6.length - 1;
8051
+ if (delimiters.indexOf(path6[k]) > -1) {
8052
+ prev = path6[k];
8053
+ path6 = path6.slice(0, k);
8059
8054
  }
8060
8055
  }
8061
- if (path7) {
8062
- tokens.push(path7);
8063
- path7 = "";
8056
+ if (path6) {
8057
+ tokens.push(path6);
8058
+ path6 = "";
8064
8059
  pathEscaped = false;
8065
8060
  }
8066
8061
  var partial = prev !== "" && next !== void 0 && next !== prev;
@@ -8078,8 +8073,8 @@ var require_path_to_regexp = __commonJS({
8078
8073
  pattern: pattern ? escapeGroup(pattern) : "[^" + escapeString(delimiter2) + "]+?"
8079
8074
  });
8080
8075
  }
8081
- if (path7 || index < str.length) {
8082
- tokens.push(path7 + str.substr(index));
8076
+ if (path6 || index < str.length) {
8077
+ tokens.push(path6 + str.substr(index));
8083
8078
  }
8084
8079
  return tokens;
8085
8080
  }
@@ -8094,12 +8089,12 @@ var require_path_to_regexp = __commonJS({
8094
8089
  }
8095
8090
  }
8096
8091
  return function(data, options) {
8097
- var path7 = "";
8092
+ var path6 = "";
8098
8093
  var encode = options && options.encode || encodeURIComponent;
8099
8094
  for (var i2 = 0; i2 < tokens.length; i2++) {
8100
8095
  var token = tokens[i2];
8101
8096
  if (typeof token === "string") {
8102
- path7 += token;
8097
+ path6 += token;
8103
8098
  continue;
8104
8099
  }
8105
8100
  var value = data ? data[token.name] : void 0;
@@ -8118,7 +8113,7 @@ var require_path_to_regexp = __commonJS({
8118
8113
  if (!matches[i2].test(segment)) {
8119
8114
  throw new TypeError('Expected all "' + token.name + '" to match "' + token.pattern + '"');
8120
8115
  }
8121
- path7 += (j === 0 ? token.prefix : token.delimiter) + segment;
8116
+ path6 += (j === 0 ? token.prefix : token.delimiter) + segment;
8122
8117
  }
8123
8118
  continue;
8124
8119
  }
@@ -8127,17 +8122,17 @@ var require_path_to_regexp = __commonJS({
8127
8122
  if (!matches[i2].test(segment)) {
8128
8123
  throw new TypeError('Expected "' + token.name + '" to match "' + token.pattern + '", but got "' + segment + '"');
8129
8124
  }
8130
- path7 += token.prefix + segment;
8125
+ path6 += token.prefix + segment;
8131
8126
  continue;
8132
8127
  }
8133
8128
  if (token.optional) {
8134
8129
  if (token.partial)
8135
- path7 += token.prefix;
8130
+ path6 += token.prefix;
8136
8131
  continue;
8137
8132
  }
8138
8133
  throw new TypeError('Expected "' + token.name + '" to be ' + (token.repeat ? "an array" : "a string"));
8139
8134
  }
8140
- return path7;
8135
+ return path6;
8141
8136
  };
8142
8137
  }
8143
8138
  function escapeString(str) {
@@ -8149,10 +8144,10 @@ var require_path_to_regexp = __commonJS({
8149
8144
  function flags(options) {
8150
8145
  return options && options.sensitive ? "" : "i";
8151
8146
  }
8152
- function regexpToRegexp(path7, keys) {
8147
+ function regexpToRegexp(path6, keys) {
8153
8148
  if (!keys)
8154
- return path7;
8155
- var groups = path7.source.match(/\((?!\?)/g);
8149
+ return path6;
8150
+ var groups = path6.source.match(/\((?!\?)/g);
8156
8151
  if (groups) {
8157
8152
  for (var i = 0; i < groups.length; i++) {
8158
8153
  keys.push({
@@ -8166,17 +8161,17 @@ var require_path_to_regexp = __commonJS({
8166
8161
  });
8167
8162
  }
8168
8163
  }
8169
- return path7;
8164
+ return path6;
8170
8165
  }
8171
- function arrayToRegexp(path7, keys, options) {
8166
+ function arrayToRegexp(path6, keys, options) {
8172
8167
  var parts = [];
8173
- for (var i = 0; i < path7.length; i++) {
8174
- parts.push(pathToRegexp(path7[i], keys, options).source);
8168
+ for (var i = 0; i < path6.length; i++) {
8169
+ parts.push(pathToRegexp(path6[i], keys, options).source);
8175
8170
  }
8176
8171
  return new RegExp("(?:" + parts.join("|") + ")", flags(options));
8177
8172
  }
8178
- function stringToRegexp(path7, keys, options) {
8179
- return tokensToRegExp(parse2(path7, options), keys, options);
8173
+ function stringToRegexp(path6, keys, options) {
8174
+ return tokensToRegExp(parse2(path6, options), keys, options);
8180
8175
  }
8181
8176
  function tokensToRegExp(tokens, keys, options) {
8182
8177
  options = options || {};
@@ -8220,21 +8215,21 @@ var require_path_to_regexp = __commonJS({
8220
8215
  }
8221
8216
  return new RegExp("^" + route, flags(options));
8222
8217
  }
8223
- function pathToRegexp(path7, keys, options) {
8224
- if (path7 instanceof RegExp) {
8225
- return regexpToRegexp(path7, keys);
8218
+ function pathToRegexp(path6, keys, options) {
8219
+ if (path6 instanceof RegExp) {
8220
+ return regexpToRegexp(path6, keys);
8226
8221
  }
8227
- if (Array.isArray(path7)) {
8222
+ if (Array.isArray(path6)) {
8228
8223
  return arrayToRegexp(
8229
8224
  /** @type {!Array} */
8230
- path7,
8225
+ path6,
8231
8226
  keys,
8232
8227
  options
8233
8228
  );
8234
8229
  }
8235
8230
  return stringToRegexp(
8236
8231
  /** @type {string} */
8237
- path7,
8232
+ path6,
8238
8233
  keys,
8239
8234
  options
8240
8235
  );
@@ -15399,11 +15394,11 @@ var require_mime_types2 = __commonJS({
15399
15394
  }
15400
15395
  return exts[0];
15401
15396
  }
15402
- function lookup(path7) {
15403
- if (!path7 || typeof path7 !== "string") {
15397
+ function lookup(path6) {
15398
+ if (!path6 || typeof path6 !== "string") {
15404
15399
  return false;
15405
15400
  }
15406
- var extension2 = extname2("x." + path7).toLowerCase().substr(1);
15401
+ var extension2 = extname2("x." + path6).toLowerCase().substr(1);
15407
15402
  if (!extension2) {
15408
15403
  return false;
15409
15404
  }
@@ -15440,7 +15435,7 @@ var require_content_disposition = __commonJS({
15440
15435
  "use strict";
15441
15436
  module2.exports = contentDisposition;
15442
15437
  module2.exports.parse = parse2;
15443
- var basename3 = __require("path").basename;
15438
+ var basename2 = __require("path").basename;
15444
15439
  var ENCODE_URL_ATTR_CHAR_REGEXP = /[\x00-\x20"'()*,/:;<=>?@[\\\]{}\x7f]/g;
15445
15440
  var HEX_ESCAPE_REGEXP = /%[0-9A-Fa-f]{2}/;
15446
15441
  var HEX_ESCAPE_REPLACE_REGEXP = /%([0-9A-Fa-f]{2})/g;
@@ -15475,9 +15470,9 @@ var require_content_disposition = __commonJS({
15475
15470
  if (typeof fallback === "string" && NON_LATIN1_REGEXP.test(fallback)) {
15476
15471
  throw new TypeError("fallback must be ISO-8859-1 string");
15477
15472
  }
15478
- var name = basename3(filename);
15473
+ var name = basename2(filename);
15479
15474
  var isQuotedString = TEXT_REGEXP.test(name);
15480
- var fallbackName = typeof fallback !== "string" ? fallback && getlatin1(name) : basename3(fallback);
15475
+ var fallbackName = typeof fallback !== "string" ? fallback && getlatin1(name) : basename2(fallback);
15481
15476
  var hasFallback = typeof fallbackName === "string" && fallbackName !== name;
15482
15477
  if (hasFallback || !isQuotedString || HEX_ESCAPE_REGEXP.test(name)) {
15483
15478
  params["filename*"] = name;
@@ -15601,7 +15596,7 @@ var require_content_disposition = __commonJS({
15601
15596
  var require_path_is_inside = __commonJS({
15602
15597
  "../../node_modules/.pnpm/path-is-inside@1.0.2/node_modules/path-is-inside/lib/path-is-inside.js"(exports2, module2) {
15603
15598
  "use strict";
15604
- var path7 = __require("path");
15599
+ var path6 = __require("path");
15605
15600
  module2.exports = function(thePath, potentialParent) {
15606
15601
  thePath = stripTrailingSep(thePath);
15607
15602
  potentialParent = stripTrailingSep(potentialParent);
@@ -15609,10 +15604,10 @@ var require_path_is_inside = __commonJS({
15609
15604
  thePath = thePath.toLowerCase();
15610
15605
  potentialParent = potentialParent.toLowerCase();
15611
15606
  }
15612
- return thePath.lastIndexOf(potentialParent, 0) === 0 && (thePath[potentialParent.length] === path7.sep || thePath[potentialParent.length] === void 0);
15607
+ return thePath.lastIndexOf(potentialParent, 0) === 0 && (thePath[potentialParent.length] === path6.sep || thePath[potentialParent.length] === void 0);
15613
15608
  };
15614
15609
  function stripTrailingSep(thePath) {
15615
- if (thePath[thePath.length - 1] === path7.sep) {
15610
+ if (thePath[thePath.length - 1] === path6.sep) {
15616
15611
  return thePath.slice(0, -1);
15617
15612
  }
15618
15613
  return thePath;
@@ -15788,7 +15783,7 @@ var require_error = __commonJS({
15788
15783
  var require_src2 = __commonJS({
15789
15784
  "../../node_modules/.pnpm/serve-handler@6.1.1/node_modules/serve-handler/src/index.js"(exports2, module2) {
15790
15785
  var { promisify } = __require("util");
15791
- var path7 = __require("path");
15786
+ var path6 = __require("path");
15792
15787
  var { createHash } = __require("crypto");
15793
15788
  var { realpath, lstat, createReadStream, readdir } = __require("fs");
15794
15789
  var url4 = require_urlparser();
@@ -15805,7 +15800,7 @@ var require_src2 = __commonJS({
15805
15800
  var etags = /* @__PURE__ */ new Map();
15806
15801
  var calculateSha = (handlers, absolutePath) => new Promise((resolve2, reject) => {
15807
15802
  const hash = createHash("sha1");
15808
- hash.update(path7.extname(absolutePath));
15803
+ hash.update(path6.extname(absolutePath));
15809
15804
  hash.update("-");
15810
15805
  const rs = handlers.createReadStream(absolutePath);
15811
15806
  rs.on("error", reject);
@@ -15818,7 +15813,7 @@ var require_src2 = __commonJS({
15818
15813
  var sourceMatches = (source, requestPath, allowSegments) => {
15819
15814
  const keys = [];
15820
15815
  const slashed = slasher(source);
15821
- const resolvedPath = path7.posix.resolve(requestPath);
15816
+ const resolvedPath = path6.posix.resolve(requestPath);
15822
15817
  let results = null;
15823
15818
  if (allowSegments) {
15824
15819
  const normalized = slashed.replace("*", "(.*)");
@@ -15882,7 +15877,7 @@ var require_src2 = __commonJS({
15882
15877
  cleanedUrl = true;
15883
15878
  }
15884
15879
  if (slashing) {
15885
- const { ext, name } = path7.parse(decodedPath);
15880
+ const { ext, name } = path6.parse(decodedPath);
15886
15881
  const isTrailed = decodedPath.endsWith("/");
15887
15882
  const isDotfile = name.startsWith(".");
15888
15883
  let target = null;
@@ -15928,8 +15923,8 @@ var require_src2 = __commonJS({
15928
15923
  var getHeaders = async (handlers, config, current, absolutePath, stats) => {
15929
15924
  const { headers: customHeaders = [], etag = false } = config;
15930
15925
  const related = {};
15931
- const { base } = path7.parse(absolutePath);
15932
- const relativePath = path7.relative(current, absolutePath);
15926
+ const { base } = path6.parse(absolutePath);
15927
+ const relativePath = path6.relative(current, absolutePath);
15933
15928
  if (customHeaders.length > 0) {
15934
15929
  for (let index = 0; index < customHeaders.length; index++) {
15935
15930
  const { source, headers: headers2 } = customHeaders[index];
@@ -15989,15 +15984,15 @@ var require_src2 = __commonJS({
15989
15984
  return true;
15990
15985
  };
15991
15986
  var getPossiblePaths = (relativePath, extension) => [
15992
- path7.join(relativePath, `index${extension}`),
15987
+ path6.join(relativePath, `index${extension}`),
15993
15988
  relativePath.endsWith("/") ? relativePath.replace(/\/$/g, extension) : relativePath + extension
15994
- ].filter((item) => path7.basename(item) !== extension);
15989
+ ].filter((item) => path6.basename(item) !== extension);
15995
15990
  var findRelated = async (current, relativePath, rewrittenPath, originalStat) => {
15996
15991
  const possible = rewrittenPath ? [rewrittenPath] : getPossiblePaths(relativePath, ".html");
15997
15992
  let stats = null;
15998
15993
  for (let index = 0; index < possible.length; index++) {
15999
15994
  const related = possible[index];
16000
- const absolutePath = path7.join(current, related);
15995
+ const absolutePath = path6.join(current, related);
16001
15996
  try {
16002
15997
  stats = await originalStat(absolutePath);
16003
15998
  } catch (err) {
@@ -16042,15 +16037,15 @@ var require_src2 = __commonJS({
16042
16037
  const canRenderSingle = renderSingle && files.length === 1;
16043
16038
  for (let index = 0; index < files.length; index++) {
16044
16039
  const file = files[index];
16045
- const filePath = path7.resolve(absolutePath, file);
16046
- const details = path7.parse(filePath);
16040
+ const filePath = path6.resolve(absolutePath, file);
16041
+ const details = path6.parse(filePath);
16047
16042
  let stats = null;
16048
16043
  if (methods.lstat) {
16049
16044
  stats = await handlers.lstat(filePath, true);
16050
16045
  } else {
16051
16046
  stats = await handlers.lstat(filePath);
16052
16047
  }
16053
- details.relative = path7.join(relativePath, details.base);
16048
+ details.relative = path6.join(relativePath, details.base);
16054
16049
  if (stats.isDirectory()) {
16055
16050
  details.base += slashSuffix;
16056
16051
  details.relative += slashSuffix;
@@ -16077,9 +16072,9 @@ var require_src2 = __commonJS({
16077
16072
  delete files[index];
16078
16073
  }
16079
16074
  }
16080
- const toRoot = path7.relative(current, absolutePath);
16081
- const directory = path7.join(path7.basename(current), toRoot, slashSuffix);
16082
- const pathParts = directory.split(path7.sep).filter(Boolean);
16075
+ const toRoot = path6.relative(current, absolutePath);
16076
+ const directory = path6.join(path6.basename(current), toRoot, slashSuffix);
16077
+ const pathParts = directory.split(path6.sep).filter(Boolean);
16083
16078
  files = files.sort((a, b) => {
16084
16079
  const aIsDir = a.type === "directory";
16085
16080
  const bIsDir = b.type === "directory";
@@ -16096,7 +16091,7 @@ var require_src2 = __commonJS({
16096
16091
  }).filter(Boolean);
16097
16092
  if (toRoot.length > 0) {
16098
16093
  const directoryPath = [...pathParts].slice(1);
16099
- const relative3 = path7.join("/", ...directoryPath, "..", slashSuffix);
16094
+ const relative3 = path6.join("/", ...directoryPath, "..", slashSuffix);
16100
16095
  files.unshift({
16101
16096
  type: "directory",
16102
16097
  base: "..",
@@ -16145,7 +16140,7 @@ var require_src2 = __commonJS({
16145
16140
  return;
16146
16141
  }
16147
16142
  let stats = null;
16148
- const errorPage = path7.join(current, `${statusCode}.html`);
16143
+ const errorPage = path6.join(current, `${statusCode}.html`);
16149
16144
  try {
16150
16145
  stats = await handlers.lstat(errorPage);
16151
16146
  } catch (err) {
@@ -16190,7 +16185,7 @@ var require_src2 = __commonJS({
16190
16185
  }, methods);
16191
16186
  module2.exports = async (request, response, config = {}, methods = {}) => {
16192
16187
  const cwd = process.cwd();
16193
- const current = config.public ? path7.resolve(cwd, config.public) : cwd;
16188
+ const current = config.public ? path6.resolve(cwd, config.public) : cwd;
16194
16189
  const handlers = getHandlers(methods);
16195
16190
  let relativePath = null;
16196
16191
  let acceptsJSON = null;
@@ -16206,7 +16201,7 @@ var require_src2 = __commonJS({
16206
16201
  message: "Bad Request"
16207
16202
  });
16208
16203
  }
16209
- let absolutePath = path7.join(current, relativePath);
16204
+ let absolutePath = path6.join(current, relativePath);
16210
16205
  if (!isPathInside(absolutePath, current)) {
16211
16206
  return sendError(absolutePath, response, acceptsJSON, current, handlers, config, {
16212
16207
  statusCode: 400,
@@ -16224,7 +16219,7 @@ var require_src2 = __commonJS({
16224
16219
  return;
16225
16220
  }
16226
16221
  let stats = null;
16227
- if (path7.extname(relativePath) !== "") {
16222
+ if (path6.extname(relativePath) !== "") {
16228
16223
  try {
16229
16224
  stats = await handlers.lstat(absolutePath);
16230
16225
  } catch (err) {
@@ -16754,7 +16749,7 @@ var require_escape_html = __commonJS({
16754
16749
 
16755
16750
  // src/commands/dev/index.ts
16756
16751
  var import_chalk4 = __toESM(require_source(), 1);
16757
- import path6 from "path";
16752
+ import path5 from "path";
16758
16753
 
16759
16754
  // src/commands/dev/dev.ts
16760
16755
  var import_chalk3 = __toESM(require_source(), 1);
@@ -16782,7 +16777,7 @@ var import_get_port2 = __toESM(require_get_port(), 1);
16782
16777
  var import_fast_deep_equal = __toESM(require_fast_deep_equal(), 1);
16783
16778
  import { randomBytes as randomBytes2 } from "crypto";
16784
16779
  import { watch } from "chokidar";
16785
- import path5, { isAbsolute, basename as basename2, dirname as dirname2, extname, join as join3 } from "path";
16780
+ import path4, { isAbsolute as isAbsolute2, basename, dirname as dirname3, extname, join as join3 } from "path";
16786
16781
 
16787
16782
  // src/util/dev/port-utils.ts
16788
16783
  var import_is_port_reachable = __toESM(require_is_port_reachable(), 1);
@@ -17056,18 +17051,18 @@ function applyTransform(data, transform, isHeader) {
17056
17051
  break;
17057
17052
  }
17058
17053
  }
17059
- function isValidRequestPath(path7) {
17060
- if (path7 === "" || path7.length > 2048) {
17054
+ function isValidRequestPath(path6) {
17055
+ if (path6 === "" || path6.length > 2048) {
17061
17056
  return false;
17062
17057
  }
17063
- if (path7[0] !== "/" || path7.startsWith("//")) {
17058
+ if (path6[0] !== "/" || path6.startsWith("//")) {
17064
17059
  return false;
17065
17060
  }
17066
- if (/[?#]/.test(path7)) {
17061
+ if (/[?#]/.test(path6)) {
17067
17062
  return false;
17068
17063
  }
17069
- for (let i = 0; i < path7.length; i++) {
17070
- const code = path7.charCodeAt(i);
17064
+ for (let i = 0; i < path6.length; i++) {
17065
+ const code = path6.charCodeAt(i);
17071
17066
  if (code <= 32 || code === 127) {
17072
17067
  return false;
17073
17068
  }
@@ -17075,13 +17070,13 @@ function isValidRequestPath(path7) {
17075
17070
  return true;
17076
17071
  }
17077
17072
  function getRequestPath(transforms) {
17078
- let path7;
17073
+ let path6;
17079
17074
  for (const transform of transforms) {
17080
17075
  if (transform.type === "request.path" && transform.op === "set" && typeof transform.args === "string" && isValidRequestPath(transform.args)) {
17081
- path7 = transform.args;
17076
+ path6 = transform.args;
17082
17077
  }
17083
17078
  }
17084
- return path7;
17079
+ return path6;
17085
17080
  }
17086
17081
  function findMatchingKeys(data, keyPattern) {
17087
17082
  const matched = [];
@@ -17707,18 +17702,18 @@ Please run \`${await getUpdateCommand()}\` to update to the latest CLI.`
17707
17702
  const { output: buildOutput } = result;
17708
17703
  const { cleanUrls } = vercelConfig;
17709
17704
  for (const [originalPath, value] of Object.entries(buildOutput)) {
17710
- let path7 = normalizePath2(originalPath);
17711
- if (cleanUrls && path7.endsWith(".html")) {
17712
- path7 = path7.slice(0, -5);
17705
+ let path6 = normalizePath2(originalPath);
17706
+ if (cleanUrls && path6.endsWith(".html")) {
17707
+ path6 = path6.slice(0, -5);
17713
17708
  if (value.type === "FileBlob" || value.type === "FileFsRef") {
17714
17709
  value.contentType = value.contentType || "text/html; charset=utf-8";
17715
17710
  }
17716
17711
  }
17717
- const extensionless = devServer.getExtensionlessFile(path7);
17712
+ const extensionless = devServer.getExtensionlessFile(path6);
17718
17713
  if (extensionless) {
17719
- path7 = extensionless;
17714
+ path6 = extensionless;
17720
17715
  }
17721
- buildOutput[path7] = value;
17716
+ buildOutput[path6] = value;
17722
17717
  }
17723
17718
  const deserializedOutput = await deserializeBuildOutputs(
17724
17719
  buildOutput
@@ -17749,10 +17744,10 @@ Please run \`${await getUpdateCommand()}\` to update to the latest CLI.`
17749
17744
  }
17750
17745
  await Promise.all(
17751
17746
  Object.entries(result.output).map(async (entry) => {
17752
- const path7 = entry[0];
17747
+ const path6 = entry[0];
17753
17748
  const asset = entry[1];
17754
17749
  if (asset.type === "Lambda" && asset.runtime !== "container") {
17755
- const oldAsset = match.buildOutput && match.buildOutput[path7];
17750
+ const oldAsset = match.buildOutput && match.buildOutput[path6];
17756
17751
  if (oldAsset && oldAsset.type === "Lambda" && oldAsset.fn) {
17757
17752
  await oldAsset.fn.destroy();
17758
17753
  }
@@ -17818,7 +17813,7 @@ async function getBuildMatches(vercelConfig, cwd, devServer, fileList) {
17818
17813
  if (buildConfig.config?.framework === "node" && !fileList.includes(src)) {
17819
17814
  const originalSrc = src;
17820
17815
  const existing = fileList.find(
17821
- (path7) => /^(?:src\/)?server\.[cm]?[jt]s$/.test(path7)
17816
+ (path6) => /^(?:src\/)?server\.[cm]?[jt]s$/.test(path6)
17822
17817
  );
17823
17818
  if (existing) {
17824
17819
  src = existing;
@@ -18047,7 +18042,7 @@ var import_get_port = __toESM(require_get_port(), 1);
18047
18042
  var import_chalk = __toESM(require_source(), 1);
18048
18043
  var import_fs_detectors2 = __toESM(require_dist4(), 1);
18049
18044
  var import_frameworks = __toESM(require_frameworks(), 1);
18050
- import path3 from "path";
18045
+ import path2 from "path";
18051
18046
  import { Transform, Writable } from "stream";
18052
18047
 
18053
18048
  // src/util/dev/cron.ts
@@ -18174,37 +18169,115 @@ import {
18174
18169
  getExperimentalServiceUrlEnvVars
18175
18170
  } from "@vercel/build-utils";
18176
18171
 
18177
- // src/util/dev/next-dev-websocket-shim-injection.ts
18178
- import path2 from "path";
18172
+ // src/util/runtime-assets.ts
18173
+ import {
18174
+ chmodSync,
18175
+ mkdirSync,
18176
+ readFileSync as readFileSync2,
18177
+ renameSync,
18178
+ rmSync,
18179
+ writeFileSync
18180
+ } from "fs";
18181
+ import { randomUUID } from "crypto";
18182
+ import { dirname as dirname2, isAbsolute, join as join2, normalize, sep } from "path";
18183
+
18184
+ // src/runtime-assets/manifest.json
18185
+ var manifest_default = {
18186
+ nextDevWebSocketPreload: {
18187
+ source: "node-preloads/next-dev-websocket.cjs",
18188
+ destination: "node-preloads/next-dev-websocket.cjs"
18189
+ }
18190
+ };
18179
18191
 
18180
18192
  // src/util/runtime-assets.ts
18181
- import { copyFileSync, mkdirSync } from "fs";
18182
- import { basename, join as join2 } from "path";
18193
+ var runtimeAssets = manifest_default;
18183
18194
  function getRuntimeAssetsDir(version = pkg_default.version, globalRoot = getGlobalPathConfig()) {
18184
- return join2(globalRoot, "runtime", version);
18195
+ return join2(globalRoot, "runtime-assets", version);
18185
18196
  }
18186
- function ensureRuntimeAssetOnDisk(sourcePath, options = {}) {
18187
- const destDir = getRuntimeAssetsDir(
18188
- options.version ?? pkg_default.version,
18189
- options.globalRoot ?? getGlobalPathConfig()
18197
+ function materializeRuntimeAsset(id, options = {}) {
18198
+ const definition = runtimeAssets[id];
18199
+ if (!definition) {
18200
+ throw new Error(`Unknown runtime asset: ${String(id)}`);
18201
+ }
18202
+ const source = validateRelativePath(id, "source", definition.source);
18203
+ const destination = validateRelativePath(
18204
+ id,
18205
+ "destination",
18206
+ definition.destination
18190
18207
  );
18191
- const destPath = join2(destDir, basename(sourcePath));
18192
- mkdirSync(destDir, { recursive: true });
18193
- copyFileSync(sourcePath, destPath);
18194
- return destPath;
18208
+ const data = readRuntimeAsset(source);
18209
+ const destinationPath = join2(
18210
+ getRuntimeAssetsDir(
18211
+ options.version ?? pkg_default.version,
18212
+ options.globalRoot ?? getGlobalPathConfig()
18213
+ ),
18214
+ destination
18215
+ );
18216
+ const destinationDir = dirname2(destinationPath);
18217
+ const temporaryPath = `${destinationPath}.${process.pid}.${randomUUID()}.tmp`;
18218
+ mkdirSync(destinationDir, { recursive: true });
18219
+ try {
18220
+ writeFileSync(
18221
+ temporaryPath,
18222
+ new Uint8Array(data.buffer, data.byteOffset, data.byteLength)
18223
+ );
18224
+ if (definition.executable) {
18225
+ chmodSync(temporaryPath, 493);
18226
+ }
18227
+ try {
18228
+ renameSync(temporaryPath, destinationPath);
18229
+ } catch (error2) {
18230
+ const code = error2.code;
18231
+ if (code !== "EEXIST" && code !== "EPERM") {
18232
+ throw error2;
18233
+ }
18234
+ rmSync(destinationPath, { force: true });
18235
+ renameSync(temporaryPath, destinationPath);
18236
+ }
18237
+ } finally {
18238
+ rmSync(temporaryPath, { force: true });
18239
+ }
18240
+ return destinationPath;
18241
+ }
18242
+ function readRuntimeAsset(source, moduleDir = __dirname) {
18243
+ const candidates = [
18244
+ // Built root entry points: dist/*.js -> dist/runtime-assets/...
18245
+ join2(moduleDir, "runtime-assets", source),
18246
+ // Source and built chunk layouts: src/util/*.ts or dist/chunks/*.js.
18247
+ join2(moduleDir, "..", "runtime-assets", source),
18248
+ // Built priority commands: dist/commands/<command>/index.js.
18249
+ join2(moduleDir, "..", "..", "runtime-assets", source)
18250
+ ];
18251
+ let lastError;
18252
+ for (const candidate of candidates) {
18253
+ try {
18254
+ return readFileSync2(candidate);
18255
+ } catch (error2) {
18256
+ if (error2.code !== "ENOENT") {
18257
+ throw error2;
18258
+ }
18259
+ lastError = error2;
18260
+ }
18261
+ }
18262
+ throw lastError;
18263
+ }
18264
+ function validateRelativePath(id, field, value) {
18265
+ const normalized = normalize(value);
18266
+ if (!value || isAbsolute(value) || normalized === ".." || normalized.startsWith(`..${sep}`)) {
18267
+ throw new Error(
18268
+ `Runtime asset "${id}" has an invalid ${field} path: ${JSON.stringify(value)}`
18269
+ );
18270
+ }
18271
+ return normalized;
18195
18272
  }
18196
18273
 
18197
18274
  // src/util/dev/next-dev-websocket-shim-injection.ts
18198
- var NEXT_DEV_WEBSOCKET_SHIM = path2.join(
18199
- __dirname,
18200
- "next-dev-websocket-shim-preload.cjs"
18201
- );
18202
18275
  function injectNextDevWebSocketShimIfNeeded(env, command, projectSettings, runtimeOptions) {
18203
18276
  if (!shouldInjectNextDevWebSocketShim(command, projectSettings)) {
18204
18277
  return void 0;
18205
18278
  }
18206
- const shimPath = ensureRuntimeAssetOnDisk(
18207
- NEXT_DEV_WEBSOCKET_SHIM,
18279
+ const shimPath = materializeRuntimeAsset(
18280
+ "nextDevWebSocketPreload",
18208
18281
  runtimeOptions
18209
18282
  );
18210
18283
  env.NODE_OPTIONS = prependNodeRequireOption(env.NODE_OPTIONS, shimPath);
@@ -18375,7 +18448,7 @@ var ServicesOrchestrator = class {
18375
18448
  this.preferServiceBuilder = options.preferServiceBuilder ?? false;
18376
18449
  this.onQueueSubscriptions = options.onQueueSubscriptions;
18377
18450
  const pythonWorkspaces = options.services.filter((service) => service.runtime === "python").map(
18378
- (service) => path3.resolve(
18451
+ (service) => path2.resolve(
18379
18452
  this.cwd,
18380
18453
  (0, import_fs_detectors2.isExperimentalServiceV2)(service) ? service.root || "." : service.workspace || "."
18381
18454
  )
@@ -18668,7 +18741,7 @@ var ServicesOrchestrator = class {
18668
18741
  }
18669
18742
  const workspace = service.workspace || ".";
18670
18743
  return {
18671
- rootPath: path3.join(this.cwd, workspace),
18744
+ rootPath: path2.join(this.cwd, workspace),
18672
18745
  rootLabel: workspace,
18673
18746
  framework,
18674
18747
  builderSpec: this.preferServiceBuilder ? service.builder?.use || framework?.useRuntime?.use : framework?.useRuntime?.use || service.builder?.use,
@@ -18727,7 +18800,7 @@ var ServicesOrchestrator = class {
18727
18800
  }
18728
18801
  const root = service.root || ".";
18729
18802
  return {
18730
- rootPath: path3.join(this.cwd, root),
18803
+ rootPath: path2.join(this.cwd, root),
18731
18804
  rootLabel: root,
18732
18805
  framework,
18733
18806
  builderSpec: framework?.useRuntime?.use || service.builder?.use,
@@ -18836,8 +18909,8 @@ var ServicesOrchestrator = class {
18836
18909
  base: this.repoRoot,
18837
18910
  start: workspacePath
18838
18911
  });
18839
- const nodeBinPath = nodeBinPaths.join(path3.delimiter);
18840
- env.PATH = `${nodeBinPath}${path3.delimiter}${env.PATH}`;
18912
+ const nodeBinPath = nodeBinPaths.join(path2.delimiter);
18913
+ env.PATH = `${nodeBinPath}${path2.delimiter}${env.PATH}`;
18841
18914
  output_manager_default.debug(
18842
18915
  `Starting ${import_chalk.default.bold(name)} with ${import_chalk.default.cyan.bold(`"${devCommand2}"`)}`
18843
18916
  );
@@ -19482,7 +19555,7 @@ var QueueBroker = class {
19482
19555
  };
19483
19556
 
19484
19557
  // src/util/dev/dev-sidecars.ts
19485
- import path4 from "path";
19558
+ import path3 from "path";
19486
19559
  function toOrchestratorService(sidecar) {
19487
19560
  const { type: _type, ...subscriber } = sidecar;
19488
19561
  return {
@@ -19511,7 +19584,7 @@ async function collectBuilderDevSidecars({
19511
19584
  const service = servicesByBuilder.get(build);
19512
19585
  const serviceRoot = service?.root ?? ".";
19513
19586
  const sidecars2 = await builder.getDevSidecars?.({
19514
- workPath: path4.join(workPath, serviceRoot),
19587
+ workPath: path3.join(workPath, serviceRoot),
19515
19588
  build,
19516
19589
  ...service ? { service } : {}
19517
19590
  }) ?? [];
@@ -19713,10 +19786,10 @@ var DevServer = class {
19713
19786
  this.clearVercelConfigPromise = () => {
19714
19787
  this.getVercelConfigPromise = null;
19715
19788
  };
19716
- this.getExtensionlessFile = (path7) => {
19717
- const ext = extname(path7);
19718
- if (this.apiDir && path7.startsWith(this.apiDir + "/") && this.apiExtensions.has(ext)) {
19719
- return path7.slice(0, -ext.length);
19789
+ this.getExtensionlessFile = (path6) => {
19790
+ const ext = extname(path6);
19791
+ if (this.apiDir && path6.startsWith(this.apiDir + "/") && this.apiExtensions.has(ext)) {
19792
+ return path6.slice(0, -ext.length);
19720
19793
  }
19721
19794
  return null;
19722
19795
  };
@@ -20537,8 +20610,8 @@ Please ensure that ${cmd(err.path)} is properly installed`;
20537
20610
  if (value !== void 0)
20538
20611
  res.setHeader(name, value);
20539
20612
  }
20540
- req.url = `/${basename2(asset.fsPath)}`;
20541
- return serveStaticFile(req, res, dirname2(asset.fsPath), {
20613
+ req.url = `/${basename(asset.fsPath)}`;
20614
+ return serveStaticFile(req, res, dirname3(asset.fsPath), {
20542
20615
  headers: [
20543
20616
  {
20544
20617
  source: "**/*",
@@ -20580,12 +20653,12 @@ Please ensure that ${cmd(err.path)} is properly installed`;
20580
20653
  search: origUrl.search
20581
20654
  });
20582
20655
  applyRequestTransforms(req, requestTransforms);
20583
- const path7 = req.url || "/";
20656
+ const path6 = req.url || "/";
20584
20657
  const body = await (0, import_raw_body.default)(req);
20585
20658
  const payload = {
20586
20659
  method: req.method || "GET",
20587
20660
  host: req.headers.host,
20588
- path: path7,
20661
+ path: path6,
20589
20662
  headers: {
20590
20663
  ...req.headers,
20591
20664
  ...this.getProxyHeaders(req, requestId, true)
@@ -20593,7 +20666,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
20593
20666
  encoding: "base64",
20594
20667
  body: body.toString("base64")
20595
20668
  };
20596
- debug(`Invoking lambda: "${assetKey}" with ${path7}`);
20669
+ debug(`Invoking lambda: "${assetKey}" with ${path6}`);
20597
20670
  let result;
20598
20671
  try {
20599
20672
  result = await asset.fn({
@@ -20686,7 +20759,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
20686
20759
  this.watchAggregationId = null;
20687
20760
  this.watchAggregationEvents = [];
20688
20761
  this.watchAggregationTimeout = 500;
20689
- this.filter = (path7) => Boolean(path7);
20762
+ this.filter = (path6) => Boolean(path6);
20690
20763
  this.podId = Math.random().toString(32).slice(-5);
20691
20764
  this.shutdownCallbacks = /* @__PURE__ */ new Map();
20692
20765
  }
@@ -20771,8 +20844,8 @@ Please ensure that ${cmd(err.path)} is properly installed`;
20771
20844
  await this.stop(code);
20772
20845
  process.exit(code);
20773
20846
  }
20774
- enqueueFsEvent(type, path7) {
20775
- this.watchAggregationEvents.push({ type, path: path7 });
20847
+ enqueueFsEvent(type, path6) {
20848
+ this.watchAggregationEvents.push({ type, path: path6 });
20776
20849
  if (this.watchAggregationId === null) {
20777
20850
  this.watchAggregationId = setTimeout(() => {
20778
20851
  const events = this.watchAggregationEvents.slice();
@@ -21029,7 +21102,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
21029
21102
  return void 0;
21030
21103
  }
21031
21104
  async _getVercelConfig() {
21032
- const { compileVercelConfig } = await import("../../chunks/compile-vercel-config-HTWOS7DZ.js");
21105
+ const { compileVercelConfig } = await import("../../chunks/compile-vercel-config-PSVXFAZW.js");
21033
21106
  await compileVercelConfig(this.cwd);
21034
21107
  const configPath = getLocalPathConfig(this.cwd);
21035
21108
  const [
@@ -21062,6 +21135,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
21062
21135
  );
21063
21136
  const detectedBuilders = await (0, import_fs_detectors3.detectBuilders)(files, pkg, {
21064
21137
  tag: "latest",
21138
+ bunVersion: vercelConfig.bunVersion,
21065
21139
  functions: vercelConfig.functions,
21066
21140
  projectSettings: projectSettings || this.projectSettings,
21067
21141
  featHandleMiss,
@@ -21147,7 +21221,6 @@ Please ensure that ${cmd(err.path)} is properly installed`;
21147
21221
  }
21148
21222
  vercelConfig.builds.sort(sortBuilders);
21149
21223
  }
21150
- await this.validateVercelConfig(vercelConfig);
21151
21224
  vercelConfig.routes = (vercelConfig.routes || []).filter((route) => {
21152
21225
  if ("has" in route) {
21153
21226
  if (!this.vercelConfigWarning) {
@@ -21212,8 +21285,8 @@ Please ensure that ${cmd(err.path)} is properly installed`;
21212
21285
  }
21213
21286
  async readJsonFile(filePath) {
21214
21287
  let rel, abs;
21215
- if (isAbsolute(filePath)) {
21216
- rel = path5.relative(this.cwd, filePath);
21288
+ if (isAbsolute2(filePath)) {
21289
+ rel = path4.relative(this.cwd, filePath);
21217
21290
  abs = filePath;
21218
21291
  } else {
21219
21292
  rel = filePath;
@@ -21409,10 +21482,10 @@ Please ensure that ${cmd(err.path)} is properly installed`;
21409
21482
  const files = await staticFiles(this.cwd, {});
21410
21483
  this.files = {};
21411
21484
  for (const fsPath of files) {
21412
- const path7 = relative2(this.cwd, fsPath);
21485
+ const path6 = relative2(this.cwd, fsPath);
21413
21486
  const { mode } = await import_fs_extra.default.stat(fsPath);
21414
- this.files[path7] = new FileFsRef2({ mode, fsPath });
21415
- const extensionless = this.getExtensionlessFile(path7);
21487
+ this.files[path6] = new FileFsRef2({ mode, fsPath });
21488
+ const extensionless = this.getExtensionlessFile(path6);
21416
21489
  if (extensionless) {
21417
21490
  this.files[extensionless] = new FileFsRef2({ mode, fsPath });
21418
21491
  }
@@ -21434,19 +21507,19 @@ Please ensure that ${cmd(err.path)} is properly installed`;
21434
21507
  }
21435
21508
  await import_fs_extra.default.mkdirp(this.devCacheDir);
21436
21509
  this.watcher = watch(this.cwd, {
21437
- ignored: (path7) => !this.filter(path7),
21510
+ ignored: (path6) => !this.filter(path6),
21438
21511
  ignoreInitial: true,
21439
21512
  usePolling: false,
21440
21513
  persistent: true
21441
21514
  });
21442
- this.watcher.on("add", (path7) => {
21443
- this.enqueueFsEvent("add", path7);
21515
+ this.watcher.on("add", (path6) => {
21516
+ this.enqueueFsEvent("add", path6);
21444
21517
  });
21445
- this.watcher.on("change", (path7) => {
21446
- this.enqueueFsEvent("change", path7);
21518
+ this.watcher.on("change", (path6) => {
21519
+ this.enqueueFsEvent("change", path6);
21447
21520
  });
21448
- this.watcher.on("unlink", (path7) => {
21449
- this.enqueueFsEvent("unlink", path7);
21521
+ this.watcher.on("unlink", (path6) => {
21522
+ this.enqueueFsEvent("unlink", path6);
21450
21523
  });
21451
21524
  this.watcher.on("error", (err) => {
21452
21525
  output_manager_default.error(`Watcher error: ${err}`);
@@ -21503,7 +21576,7 @@ Please ensure that ${cmd(err.path)} is properly installed`;
21503
21576
  const pathname = url3.parse(req.url || "/").pathname || "/";
21504
21577
  for (const match of this.buildMatches.values()) {
21505
21578
  const { builder } = match.builderWithPkg;
21506
- if ((builder.version === 3 || builder.version === -1) && typeof builder.startDevServer === "function") {
21579
+ if (typeof builder.startDevServer === "function") {
21507
21580
  try {
21508
21581
  const result = await builder.startDevServer({
21509
21582
  files: this.files,
@@ -21932,7 +22005,7 @@ ${error_code}
21932
22005
  }
21933
22006
  const dirs = /* @__PURE__ */ new Set();
21934
22007
  const files = Array.from(this.buildMatches.keys()).filter((p) => {
21935
- const base = basename2(p);
22008
+ const base = basename(p);
21936
22009
  if (base === "now.json" || base === "vercel.json" || base === "vercel.toml" || base === ".nowignore" || base === ".vercelignore" || !p.startsWith(prefix)) {
21937
22010
  return false;
21938
22011
  }
@@ -21946,7 +22019,7 @@ ${error_code}
21946
22019
  }
21947
22020
  return true;
21948
22021
  }).map((p) => {
21949
- let base = basename2(p);
22022
+ let base = basename(p);
21950
22023
  let ext = "";
21951
22024
  let type = "file";
21952
22025
  let href;
@@ -22044,8 +22117,8 @@ ${error_code}
22044
22117
  }
22045
22118
  );
22046
22119
  const nodeBinPaths = getNodeBinPaths2({ base: this.repoRoot, start: cwd });
22047
- const nodeBinPath = nodeBinPaths.join(path5.delimiter);
22048
- env.PATH = `${nodeBinPath}${path5.delimiter}${env.PATH}`;
22120
+ const nodeBinPath = nodeBinPaths.join(path4.delimiter);
22121
+ env.PATH = `${nodeBinPath}${path4.delimiter}${env.PATH}`;
22049
22122
  const command = devCommand2.replace(/\$PORT/g, `${port}`).replace(/%PORT%/g, `${port}`);
22050
22123
  injectNextDevWebSocketShimIfNeeded(env, command, this.projectSettings);
22051
22124
  output_manager_default.debug(
@@ -22244,16 +22317,16 @@ function findAsset(match, requestPath, vercelConfig) {
22244
22317
  return { asset, assetKey };
22245
22318
  }
22246
22319
  }
22247
- function dirnameWithoutDot(path7) {
22248
- let dir = dirname2(path7);
22320
+ function dirnameWithoutDot(path6) {
22321
+ let dir = dirname3(path6);
22249
22322
  if (dir === ".") {
22250
22323
  dir = "";
22251
22324
  }
22252
22325
  return dir;
22253
22326
  }
22254
- function isIndex(path7) {
22255
- const ext = extname(path7);
22256
- const name = basename2(path7, ext);
22327
+ function isIndex(path6) {
22328
+ const ext = extname(path6);
22329
+ const name = basename(path6, ext);
22257
22330
  return name === "index";
22258
22331
  }
22259
22332
  function minimatches(files, pattern) {
@@ -22823,7 +22896,7 @@ async function main(client) {
22823
22896
  }
22824
22897
  const hasBuilds = vercelConfig && "builds" in vercelConfig && vercelConfig.builds && vercelConfig.builds.length > 0;
22825
22898
  if (!vercelConfig || !hasBuilds) {
22826
- const pkg = await readJSONFile(path6.join(dir, "package.json"));
22899
+ const pkg = await readJSONFile(path5.join(dir, "package.json"));
22827
22900
  if (pkg instanceof CantParseJSONFile) {
22828
22901
  output_manager_default.error(pkg.message);
22829
22902
  return 1;