vercel 59.4.0 → 59.6.2

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 (137) hide show
  1. package/dist/chunks/{add-FQMB3XPM.js → add-4GQZ22ZN.js} +20 -16
  2. package/dist/chunks/{add-73X2SKBH.js → add-HJSEM4YJ.js} +17 -13
  3. package/dist/chunks/{add-QJ3WT4FW.js → add-SIGUSM3Y.js} +21 -17
  4. package/dist/chunks/{build-YUYCLCXD.js → build-XOMJDX4M.js} +18 -15
  5. package/dist/chunks/{chunk-F7OXZLY2.js → chunk-26XDDLXM.js} +2 -2
  6. package/dist/chunks/{chunk-VCE6QKFE.js → chunk-2O5J3KMT.js} +4 -4
  7. package/dist/chunks/{chunk-XI6NJLI4.js → chunk-2YRAWYGE.js} +3 -3
  8. package/dist/chunks/{chunk-X6O6XJEA.js → chunk-37V5P4VO.js} +16 -14
  9. package/dist/chunks/{chunk-EB7NJKPL.js → chunk-3F5EGINT.js} +3 -3
  10. package/dist/chunks/{chunk-RIB4S2IB.js → chunk-3HZLXCVL.js} +1 -1
  11. package/dist/chunks/{chunk-KQRVZWJU.js → chunk-3T7WSWZH.js} +1 -1
  12. package/dist/chunks/{chunk-3KNPVXJ3.js → chunk-4KD5BYHB.js} +1 -1
  13. package/dist/chunks/{chunk-XLKFJPMT.js → chunk-57RHXXXG.js} +1 -1
  14. package/dist/chunks/chunk-5GGUB4EO.js +31 -0
  15. package/dist/chunks/{chunk-R6IGDGX3.js → chunk-5XECIWME.js} +1 -1
  16. package/dist/chunks/{chunk-KAYSW4CJ.js → chunk-6JPVTPTU.js} +3 -3
  17. package/dist/chunks/{chunk-ZFWNMVNR.js → chunk-6M2KZUED.js} +19 -8
  18. package/dist/chunks/{chunk-HT2XWSAJ.js → chunk-7AEEQOD4.js} +2 -29
  19. package/dist/chunks/{chunk-HURL5EBN.js → chunk-7HE63HCR.js} +124 -161
  20. package/dist/chunks/chunk-7Q45OKWR.js +149 -0
  21. package/dist/chunks/{chunk-RI7KKKII.js → chunk-7R6M3BHM.js} +4 -18
  22. package/dist/chunks/{chunk-XBN2O34P.js → chunk-7ST552E3.js} +17 -4
  23. package/dist/chunks/{chunk-JKQWQA2T.js → chunk-AINIBIP4.js} +1 -1
  24. package/dist/chunks/{chunk-CV4S27SS.js → chunk-ASBP32T6.js} +1 -1
  25. package/dist/chunks/chunk-AYLY3ZVL.js +104 -0
  26. package/dist/chunks/{chunk-SOFC4MLS.js → chunk-BMKU5KEL.js} +9 -569
  27. package/dist/chunks/{chunk-KDYRLN6H.js → chunk-C5HKWXRR.js} +1 -1
  28. package/dist/chunks/{chunk-2MF3ZAVW.js → chunk-CJV7J7B5.js} +6 -6
  29. package/dist/chunks/{chunk-HJVTLJHO.js → chunk-DE7MBNHQ.js} +6 -6
  30. package/dist/chunks/{chunk-3L2YLLHC.js → chunk-DWIC7MRV.js} +2 -2
  31. package/dist/chunks/{chunk-GFCTRJI5.js → chunk-EZKW5YJ2.js} +1 -1
  32. package/dist/chunks/{chunk-MWYQ24FO.js → chunk-FRAXI2WT.js} +3 -3
  33. package/dist/chunks/{chunk-DDIZGOCK.js → chunk-FRZULOVH.js} +8 -6
  34. package/dist/chunks/{chunk-Y3J4VU2H.js → chunk-FWKSJYDV.js} +2 -2
  35. package/dist/chunks/chunk-FXD67VN5.js +467 -0
  36. package/dist/chunks/{chunk-EB5NBVTV.js → chunk-GISTGGBO.js} +8 -8
  37. package/dist/chunks/chunk-GY5I4AYD.js +122 -0
  38. package/dist/chunks/{chunk-PD4DYNSB.js → chunk-GZQQNLF5.js} +5 -5
  39. package/dist/chunks/{chunk-PIMIKY4X.js → chunk-IJ4X426J.js} +1 -1
  40. package/dist/chunks/{chunk-KSZ4MNHO.js → chunk-JH4WQRIU.js} +2 -2
  41. package/dist/chunks/{chunk-TVXCXIRO.js → chunk-L3UXB2CW.js} +1 -1
  42. package/dist/chunks/{chunk-O5DLWLT7.js → chunk-LXZVOR6F.js} +9 -9
  43. package/dist/chunks/{chunk-EG5BSAXD.js → chunk-MTWHQEXI.js} +1 -1
  44. package/dist/chunks/{chunk-WC7IINFV.js → chunk-NFU4XJIR.js} +1 -1
  45. package/dist/chunks/{chunk-TH2XUVDP.js → chunk-NGGLYKNU.js} +30 -6
  46. package/dist/chunks/{chunk-2PX6N4FE.js → chunk-NGNN6WF2.js} +10 -10
  47. package/dist/chunks/{chunk-GGPE5377.js → chunk-O26N2UPI.js} +1 -1
  48. package/dist/chunks/chunk-O75LSD3C.js +34 -0
  49. package/dist/chunks/{chunk-BBSS3XIW.js → chunk-OQ3C5VXZ.js} +1 -1
  50. package/dist/chunks/{chunk-M22O6CYY.js → chunk-POOO7W47.js} +1 -1
  51. package/dist/chunks/{chunk-LKTQR5JE.js → chunk-PRH6KRUT.js} +2 -2
  52. package/dist/chunks/chunk-Q2DGFCO7.js +579 -0
  53. package/dist/chunks/{chunk-OX7KI3LF.js → chunk-QFAS4OVW.js} +18 -0
  54. package/dist/chunks/{chunk-CHEZBD7H.js → chunk-R5PULMHT.js} +3 -3
  55. package/dist/chunks/{chunk-VAFU7DXZ.js → chunk-RKDCNQ4S.js} +1 -91
  56. package/dist/chunks/{chunk-BLYBHFIE.js → chunk-SF3AYAIF.js} +61 -24
  57. package/dist/chunks/{chunk-GMWRTZVZ.js → chunk-SLPSPYVR.js} +1 -1
  58. package/dist/chunks/{chunk-J5Y2QGGU.js → chunk-SWI6F4X3.js} +2 -2
  59. package/dist/chunks/chunk-V3MDDR2X.js +249 -0
  60. package/dist/chunks/{chunk-HMJVUXE6.js → chunk-VJ5NAOWB.js} +867 -625
  61. package/dist/chunks/{chunk-O5GNPPTU.js → chunk-VP5Y3SZG.js} +1 -1
  62. package/dist/chunks/{chunk-G75NFPIT.js → chunk-WNAKOXGK.js} +1 -1
  63. package/dist/chunks/{chunk-NP6BQPCN.js → chunk-WZ2S3A2A.js} +8 -6
  64. package/dist/chunks/{chunk-7QVJTI5H.js → chunk-XDGOOW3K.js} +1 -1
  65. package/dist/chunks/{chunk-UMA66MKW.js → chunk-XM3LOQIX.js} +1 -1
  66. package/dist/chunks/{chunk-CYNB6LL4.js → chunk-XNFHNTS2.js} +1 -1
  67. package/dist/chunks/{chunk-VDJN4WKH.js → chunk-XRWOTCDO.js} +1 -1
  68. package/dist/chunks/{chunk-UV2ZMFVG.js → chunk-YJKZQEHS.js} +2 -2
  69. package/dist/chunks/{chunk-STPH4Y62.js → chunk-YJUO3EKH.js} +1 -1
  70. package/dist/chunks/{chunk-Y42SPI2H.js → chunk-ZNMTDLYH.js} +6 -6
  71. package/dist/chunks/{chunk-VLPLCJZC.js → chunk-ZSFEACZU.js} +1 -1
  72. package/dist/chunks/{clear-USQM5VW5.js → clear-BWT2FJY4.js} +17 -13
  73. package/dist/chunks/{compile-vercel-config-2JNYMI6W.js → compile-vercel-config-DGM4NISW.js} +10 -7
  74. package/dist/chunks/{config-VTRIDLY4.js → config-NJAN3RMU.js} +20 -16
  75. package/dist/chunks/config-RSE6Z4LB.js +122 -0
  76. package/dist/chunks/{constants-YMCRE6IG.js → constants-WEQVJSYS.js} +1 -1
  77. package/dist/chunks/{delete-ILLSBCVQ.js → delete-LROBRBAH.js} +15 -11
  78. package/dist/chunks/{delete-VTPHK3EB.js → delete-SSL2PK2F.js} +12 -9
  79. package/dist/chunks/{disable-VTOMO64V.js → disable-ASG5JDZR.js} +12 -9
  80. package/dist/chunks/{discard-ZIOZ34ZI.js → discard-PV47B6IL.js} +12 -9
  81. package/dist/chunks/{edit-E3AMR4KM.js → edit-5ATYIOLX.js} +14 -11
  82. package/dist/chunks/{edit-JMZ5XWVW.js → edit-REI7HXGG.js} +16 -12
  83. package/dist/chunks/{enable-A4PMZ7QZ.js → enable-LZXL7XAG.js} +12 -9
  84. package/dist/chunks/{exec-CNBOV577.js → exec-XH4K34JM.js} +3 -3
  85. package/dist/chunks/{export-Y6AJ3WRZ.js → export-ZAZFQU2E.js} +12 -9
  86. package/dist/chunks/{image-26BKPAUB.js → image-QPHN5V7L.js} +7 -6
  87. package/dist/chunks/{import-builders-3H7J2SEK.js → import-builders-W3YE2V6A.js} +12 -9
  88. package/dist/chunks/{inspect-7DGKYHKW.js → inspect-BFGK72WY.js} +18 -14
  89. package/dist/chunks/{inspect-OEY4DJRI.js → inspect-FRXJRM6T.js} +18 -14
  90. package/dist/chunks/{inspect-ZW5N6O5P.js → inspect-RDMC2Z3Q.js} +17 -13
  91. package/dist/chunks/{inspect-GJFVAZIJ.js → inspect-SJEZVGPK.js} +20 -16
  92. package/dist/chunks/{inspect-N3E2PO6K.js → inspect-SSOM3FXS.js} +17 -13
  93. package/dist/chunks/{list-MIQ5D6PM.js → list-2HTR7Q3J.js} +18 -14
  94. package/dist/chunks/{list-2VTCNQEB.js → list-PHDUZVMR.js} +15 -11
  95. package/dist/chunks/{list-DTJBW7OQ.js → list-W33GXKDA.js} +18 -14
  96. package/dist/chunks/{login-L34UHAU5.js → login-JWAFHVDG.js} +30 -17
  97. package/dist/chunks/{ls-OBUDC4SB.js → ls-3AN2DZHN.js} +20 -15
  98. package/dist/chunks/{ls-SXJFBLUT.js → ls-3MH2OCP3.js} +20 -15
  99. package/dist/chunks/ls-D2POUHI7.js +176 -0
  100. package/dist/chunks/{ls-VDYUFSSC.js → ls-KDFU224B.js} +20 -15
  101. package/dist/chunks/{ls-OKO4IHWB.js → ls-KX2VBOGV.js} +18 -14
  102. package/dist/chunks/{ls-NCPQY4FV.js → ls-RWKNJQNT.js} +23 -18
  103. package/dist/chunks/{open-V5JDGXUP.js → open-IEYRB6RL.js} +15 -11
  104. package/dist/chunks/{permissions-6CPRPPBY.js → permissions-ZWZUMEHR.js} +10 -9
  105. package/dist/chunks/{publish-R27DPHFO.js → publish-UWZYBDHK.js} +12 -9
  106. package/dist/chunks/{push-VLVTBS42.js → push-IAEQ3FBF.js} +18 -15
  107. package/dist/chunks/{query-IVVRYMJN.js → query-NNOZYSED.js} +18 -14
  108. package/dist/chunks/{reorder-LJ2RBZM2.js → reorder-TKBM244W.js} +12 -9
  109. package/dist/chunks/{reply-USAISZYC.js → reply-FLBSBMTW.js} +16 -12
  110. package/dist/chunks/{resolve-CRCJYVS5.js → resolve-GJYPMWUE.js} +15 -11
  111. package/dist/chunks/{restore-6PBPEAMU.js → restore-PNI3TM3U.js} +12 -9
  112. package/dist/chunks/{rm-HHELZB7R.js → rm-76CSSSSV.js} +17 -13
  113. package/dist/chunks/{rm-TWU3JR6Z.js → rm-FN7LTIIL.js} +17 -13
  114. package/dist/chunks/{rm-KGOEOWVK.js → rm-FTE33UHE.js} +16 -12
  115. package/dist/chunks/rm-FXA5DLXQ.js +315 -0
  116. package/dist/chunks/{rm-EOD7RDSO.js → rm-PGJ4KR6U.js} +20 -16
  117. package/dist/chunks/{routes-SZI2G4SE.js → routes-2OLIBRYX.js} +3 -3
  118. package/dist/chunks/{rule-inspect-WFTVRK6B.js → rule-inspect-LJIGPTWS.js} +18 -14
  119. package/dist/chunks/{rules-AQYTFJI6.js → rules-6BMNO6M5.js} +11 -10
  120. package/dist/chunks/{schema-LUVFYPWN.js → schema-45SJNY5L.js} +9 -7
  121. package/dist/chunks/{schema-ZCDCJC7E.js → schema-HATXEQDP.js} +14 -11
  122. package/dist/chunks/set-C3UQUQ42.js +243 -0
  123. package/dist/chunks/{tags-RCNRFX7U.js → tags-BTVDROFG.js} +6 -5
  124. package/dist/chunks/{types-AJHILHO5.js → types-JGANJ5EQ.js} +12 -8
  125. package/dist/chunks/{update-I7QGAOYF.js → update-B6PSOHUW.js} +19 -15
  126. package/dist/commands/build/builder-worker.cjs +281 -0
  127. package/dist/commands/build/index.js +695 -236
  128. package/dist/commands/deploy/index.js +131 -50
  129. package/dist/commands/dev/index.js +677 -144
  130. package/dist/commands/env/index.js +1199 -565
  131. package/dist/commands/link/index.js +27 -22
  132. package/dist/commands/list/index.js +21 -14
  133. package/dist/commands-bulk.js +2051 -1019
  134. package/dist/help.js +1 -1
  135. package/dist/index.js +39 -33
  136. package/dist/version.mjs +1 -1
  137. package/package.json +48 -48
@@ -4,11 +4,13 @@ import { dirname as __dirname_ } from 'node:path';
4
4
  const require = __createRequire(import.meta.url);
5
5
  const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
+ import {
8
+ pullSubcommand
9
+ } from "./chunk-FXD67VN5.js";
7
10
  import {
8
11
  TelemetryClient,
9
- require_dist as require_dist2,
10
12
  require_graceful_fs
11
- } from "./chunk-CYNB6LL4.js";
13
+ } from "./chunk-XNFHNTS2.js";
12
14
  import {
13
15
  AGENT_REASON,
14
16
  AGENT_STATUS,
@@ -19,19 +21,21 @@ import {
19
21
  outputActionRequired,
20
22
  outputAgentError,
21
23
  shouldEmitNonInteractiveCommandError
22
- } from "./chunk-TH2XUVDP.js";
24
+ } from "./chunk-NGGLYKNU.js";
23
25
  import {
24
26
  require_ms
25
27
  } from "./chunk-GGP5R3FU.js";
26
28
  import {
27
- printError,
29
+ printError
30
+ } from "./chunk-AYLY3ZVL.js";
31
+ import {
32
+ parseArguments
33
+ } from "./chunk-57RHXXXG.js";
34
+ import {
28
35
  require_string_width,
29
36
  require_strip_ansi,
30
37
  table
31
- } from "./chunk-VAFU7DXZ.js";
32
- import {
33
- parseArguments
34
- } from "./chunk-XLKFJPMT.js";
38
+ } from "./chunk-RKDCNQ4S.js";
35
39
  import {
36
40
  APIError,
37
41
  CantParseJSONFile,
@@ -50,18 +54,14 @@ import {
50
54
  TeamDeleted,
51
55
  TooManyRequests,
52
56
  code,
53
- forceOption,
54
- formatOption,
57
+ isAPIError
58
+ } from "./chunk-BMKU5KEL.js";
59
+ import {
55
60
  getCommandName,
56
61
  getCommandNamePlain,
57
62
  getFlagsSpecification,
58
- isAPIError,
59
- jsonOption,
60
- packageName,
61
- projectOption,
62
- require_lib,
63
- yesOption
64
- } from "./chunk-SOFC4MLS.js";
63
+ packageName
64
+ } from "./chunk-Q2DGFCO7.js";
65
65
  import {
66
66
  pkg_default
67
67
  } from "./chunk-P4QNYOFB.js";
@@ -81,7 +81,7 @@ import {
81
81
  require_cli_spinners,
82
82
  require_dist,
83
83
  require_escape_string_regexp
84
- } from "./chunk-OX7KI3LF.js";
84
+ } from "./chunk-QFAS4OVW.js";
85
85
  import {
86
86
  require_ansi_styles,
87
87
  require_source,
@@ -8025,7 +8025,7 @@ var require_jsonfile = __commonJS({
8025
8025
  }
8026
8026
  return obj;
8027
8027
  }
8028
- var readFile7 = universalify.fromPromise(_readFile);
8028
+ var readFile8 = universalify.fromPromise(_readFile);
8029
8029
  function readFileSync(file, options = {}) {
8030
8030
  if (typeof options === "string") {
8031
8031
  options = { encoding: options };
@@ -8057,7 +8057,7 @@ var require_jsonfile = __commonJS({
8057
8057
  return fs5.writeFileSync(file, str, options);
8058
8058
  }
8059
8059
  module.exports = {
8060
- readFile: readFile7,
8060
+ readFile: readFile8,
8061
8061
  readFileSync,
8062
8062
  writeFile: writeFile5,
8063
8063
  writeFileSync
@@ -8327,7 +8327,7 @@ var require_move2 = __commonJS({
8327
8327
  });
8328
8328
 
8329
8329
  // ../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/index.js
8330
- var require_lib2 = __commonJS({
8330
+ var require_lib = __commonJS({
8331
8331
  "../../node_modules/.pnpm/fs-extra@10.0.0/node_modules/fs-extra/lib/index.js"(exports, module) {
8332
8332
  "use strict";
8333
8333
  module.exports = {
@@ -8857,7 +8857,7 @@ var require_wrap_ansi = __commonJS({
8857
8857
  });
8858
8858
 
8859
8859
  // ../../node_modules/.pnpm/mute-stream@1.0.0/node_modules/mute-stream/lib/index.js
8860
- var require_lib3 = __commonJS({
8860
+ var require_lib2 = __commonJS({
8861
8861
  "../../node_modules/.pnpm/mute-stream@1.0.0/node_modules/mute-stream/lib/index.js"(exports, module) {
8862
8862
  var Stream = __require("stream");
8863
8863
  var _isTTY, _destSrc, destSrc_fn, _proxy, proxy_fn;
@@ -13753,10 +13753,10 @@ var require_read_config_file = __commonJS({
13753
13753
  var import_smol_toml3 = __require("smol-toml");
13754
13754
  var import_fs6 = __require("fs");
13755
13755
  var import_error_utils5 = require_dist();
13756
- var { readFile: readFile7 } = import_fs6.promises;
13756
+ var { readFile: readFile8 } = import_fs6.promises;
13757
13757
  async function readFileOrNull(file) {
13758
13758
  try {
13759
- const data = await readFile7(file);
13759
+ const data = await readFile8(file);
13760
13760
  return data;
13761
13761
  } catch (error) {
13762
13762
  if (!(0, import_error_utils5.isErrnoException)(error)) {
@@ -13835,7 +13835,7 @@ var require_frameworks = __commonJS({
13835
13835
  var frameworks_exports = {};
13836
13836
  __export2(frameworks_exports, {
13837
13837
  default: () => frameworks_default,
13838
- frameworkList: () => frameworkList5,
13838
+ frameworkList: () => frameworkList6,
13839
13839
  frameworks: () => frameworks
13840
13840
  });
13841
13841
  module.exports = __toCommonJS2(frameworks_exports);
@@ -13843,7 +13843,7 @@ var require_frameworks = __commonJS({
13843
13843
  var import_fs6 = __require("fs");
13844
13844
  var import_read_config_file = require_read_config_file();
13845
13845
  __reExport(frameworks_exports, require_types(), module.exports);
13846
- var { readdir, readFile: readFile7, unlink: unlink2 } = import_fs6.promises;
13846
+ var { readdir, readFile: readFile8, unlink: unlink2 } = import_fs6.promises;
13847
13847
  var frameworks = [
13848
13848
  {
13849
13849
  // A `Dockerfile.vercel` / `Containerfile.vercel` is an explicit opt-in to
@@ -14015,7 +14015,7 @@ var require_frameworks = __commonJS({
14015
14015
  "public",
14016
14016
  "__now_routes_g4t5bY.json"
14017
14017
  );
14018
- const content = await readFile7(nowRoutesPath, "utf8");
14018
+ const content = await readFile8(nowRoutesPath, "utf8");
14019
14019
  const nowRoutes = JSON.parse(content);
14020
14020
  try {
14021
14021
  await unlink2(nowRoutesPath);
@@ -17819,7 +17819,6 @@ var require_frameworks = __commonJS({
17819
17819
  {
17820
17820
  name: "Rust",
17821
17821
  slug: "rust",
17822
- experimental: true,
17823
17822
  runtimeFramework: true,
17824
17823
  logo: "https://api-frameworks.vercel.sh/framework-logos/rust.svg",
17825
17824
  tagline: "A language empowering everyone to build reliable and efficient software.",
@@ -17828,6 +17827,8 @@ var require_frameworks = __commonJS({
17828
17827
  useRuntime: { src: "src/main.rs", use: "@vercel/rust" },
17829
17828
  ignoreRuntimes: ["@vercel/rust"],
17830
17829
  detectors: {
17830
+ // Do not detect on `[[bin]]` declarations: `api/**/*.rs` projects
17831
+ // declare one per handler and must stay framework-less.
17831
17832
  every: [
17832
17833
  {
17833
17834
  path: "Cargo.toml"
@@ -18229,8 +18230,8 @@ var require_frameworks = __commonJS({
18229
18230
  getOutputDirName: async () => "public"
18230
18231
  }
18231
18232
  ];
18232
- var frameworkList5 = frameworks;
18233
- var frameworks_default = frameworkList5;
18233
+ var frameworkList6 = frameworks;
18234
+ var frameworks_default = frameworkList6;
18234
18235
  }
18235
18236
  });
18236
18237
 
@@ -20341,7 +20342,7 @@ var require_detect_builders = __commonJS({
20341
20342
  var import_minimatch = __toESM2(require_minimatch());
20342
20343
  var import_semver = require_semver();
20343
20344
  var import_path19 = __require("path");
20344
- var import_frameworks5 = require_frameworks();
20345
+ var import_frameworks6 = require_frameworks();
20345
20346
  var import_is_official_runtime = require_is_official_runtime();
20346
20347
  var import_build_utils11 = __require("@vercel/build-utils");
20347
20348
  var import_python = require_python();
@@ -20371,11 +20372,11 @@ var require_detect_builders = __commonJS({
20371
20372
  }
20372
20373
  var REGEX_NON_VERCEL_PLATFORM_FILES2 = getStaticFilesPattern();
20373
20374
  var slugToFramework = new Map(
20374
- import_frameworks5.frameworkList.map((f) => [f.slug, f])
20375
+ import_frameworks6.frameworkList.map((f) => [f.slug, f])
20375
20376
  );
20376
20377
  var builderToFrameworks2 = (() => {
20377
20378
  const map = /* @__PURE__ */ new Map();
20378
- for (const f of import_frameworks5.frameworkList) {
20379
+ for (const f of import_frameworks6.frameworkList) {
20379
20380
  if (!f.useRuntime?.use)
20380
20381
  continue;
20381
20382
  const builder = f.useRuntime.use;
@@ -20458,7 +20459,10 @@ var require_detect_builders = __commonJS({
20458
20459
  const absolutePathCache = /* @__PURE__ */ new Map();
20459
20460
  const { buildCommand, outputDirectory } = projectSettings;
20460
20461
  const frameworkConfig = slugToFramework.get(framework || "");
20461
- const ignoreRuntimes = new Set(frameworkConfig?.ignoreRuntimes);
20462
+ const rustStaticOutput = isRustStaticOutput(framework, projectSettings);
20463
+ const ignoreRuntimes = new Set(
20464
+ rustStaticOutput ? void 0 : frameworkConfig?.ignoreRuntimes
20465
+ );
20462
20466
  const withTag = options.tag ? `@${options.tag}` : "";
20463
20467
  const apiMatches = getApiMatches().filter(
20464
20468
  (b) => (
@@ -20533,7 +20537,8 @@ var require_detect_builders = __commonJS({
20533
20537
  addToUsedFunctions(proxyBuilder);
20534
20538
  apiBuilders.unshift(proxyBuilder);
20535
20539
  }
20536
- if (!makeFrontendStatic && (hasBuildScript(pkg) || buildCommand || framework)) {
20540
+ const rustStaticPrebuilt = rustStaticOutput && !pkg && !buildCommand;
20541
+ if (!makeFrontendStatic && !rustStaticPrebuilt && (hasBuildScript(pkg) || buildCommand || framework)) {
20537
20542
  frontendBuilder = detectFrontBuilder(
20538
20543
  pkg,
20539
20544
  files,
@@ -20830,6 +20835,10 @@ var require_detect_builders = __commonJS({
20830
20835
  const { scripts = {} } = pkg || {};
20831
20836
  return Boolean(scripts && scripts["build"]);
20832
20837
  }
20838
+ function isRustStaticOutput(framework, projectSettings) {
20839
+ return framework === "rust" && typeof projectSettings.outputDirectory === "string" && projectSettings.outputDirectory !== "" && // The framework preset's display default; not a real directory.
20840
+ projectSettings.outputDirectory !== "N/A";
20841
+ }
20833
20842
  function detectFrontBuilder(pkg, files, usedFunctions, fallbackEntrypoint, options) {
20834
20843
  const { tag, projectSettings = {} } = options;
20835
20844
  const withTag = tag ? `@${tag}` : "";
@@ -20875,7 +20884,7 @@ var require_detect_builders = __commonJS({
20875
20884
  });
20876
20885
  }
20877
20886
  const f = slugToFramework.get(framework || "");
20878
- if (f && f.useRuntime) {
20887
+ if (f && f.useRuntime && !isRustStaticOutput(framework, projectSettings)) {
20879
20888
  const { src, use } = f.useRuntime;
20880
20889
  const shouldUseUnifiedBackend = (0, import_build_utils11.isExperimentalBackendsEnabled)() && import_build_utils11.BACKEND_BUILDERS.includes(use);
20881
20890
  const finalUse = shouldUseUnifiedBackend ? import_build_utils11.UNIFIED_BACKEND_BUILDER : use;
@@ -21310,7 +21319,7 @@ var require_detect_file_system_api = __commonJS({
21310
21319
  });
21311
21320
  module.exports = __toCommonJS2(detect_file_system_api_exports);
21312
21321
  var import_semver = __toESM2(require_semver());
21313
- var import__2 = require_dist3();
21322
+ var import__2 = require_dist2();
21314
21323
  async function detectFileSystemAPI2({
21315
21324
  files,
21316
21325
  projectSettings,
@@ -21506,11 +21515,11 @@ var require_detect_framework = __commonJS({
21506
21515
  const isEnabled = (val) => val === "1" || typeof val === "string" && val.toLowerCase() === "true";
21507
21516
  return isEnabled(experimentalEnv);
21508
21517
  }
21509
- function filterFrameworkList(frameworkList5, useExperimentalFrameworks) {
21518
+ function filterFrameworkList(frameworkList6, useExperimentalFrameworks) {
21510
21519
  if (shouldIncludeExperimentalFrameworks(useExperimentalFrameworks)) {
21511
- return frameworkList5;
21520
+ return frameworkList6;
21512
21521
  }
21513
- return frameworkList5.filter((f) => {
21522
+ return frameworkList6.filter((f) => {
21514
21523
  const experimental = f.experimental;
21515
21524
  return !experimental;
21516
21525
  });
@@ -21627,11 +21636,11 @@ var require_detect_framework = __commonJS({
21627
21636
  }
21628
21637
  async function detectFramework2({
21629
21638
  fs: fs5,
21630
- frameworkList: frameworkList5,
21639
+ frameworkList: frameworkList6,
21631
21640
  useExperimentalFrameworks
21632
21641
  }) {
21633
21642
  const filteredList = filterFrameworkList(
21634
- frameworkList5,
21643
+ frameworkList6,
21635
21644
  useExperimentalFrameworks
21636
21645
  );
21637
21646
  const result = await Promise.all(
@@ -21647,11 +21656,11 @@ var require_detect_framework = __commonJS({
21647
21656
  }
21648
21657
  async function detectFrameworks3({
21649
21658
  fs: fs5,
21650
- frameworkList: frameworkList5,
21659
+ frameworkList: frameworkList6,
21651
21660
  useExperimentalFrameworks
21652
21661
  }) {
21653
21662
  const filteredList = filterFrameworkList(
21654
- frameworkList5,
21663
+ frameworkList6,
21655
21664
  useExperimentalFrameworks
21656
21665
  );
21657
21666
  const result = await Promise.all(
@@ -21667,11 +21676,11 @@ var require_detect_framework = __commonJS({
21667
21676
  }
21668
21677
  async function detectFrameworkRecord2({
21669
21678
  fs: fs5,
21670
- frameworkList: frameworkList5,
21679
+ frameworkList: frameworkList6,
21671
21680
  useExperimentalFrameworks
21672
21681
  }) {
21673
21682
  const filteredList = filterFrameworkList(
21674
- frameworkList5,
21683
+ frameworkList6,
21675
21684
  useExperimentalFrameworks
21676
21685
  );
21677
21686
  const result = await Promise.all(
@@ -21746,7 +21755,7 @@ var require_get_project_paths = __commonJS({
21746
21755
  });
21747
21756
  module.exports = __toCommonJS2(get_project_paths_exports);
21748
21757
  var import_detect_framework = require_detect_framework();
21749
- var import_frameworks5 = require_frameworks();
21758
+ var import_frameworks6 = require_frameworks();
21750
21759
  var MAX_DEPTH_TRAVERSE = 3;
21751
21760
  var getProjectPaths2 = async ({
21752
21761
  fs: fs5,
@@ -21763,7 +21772,7 @@ var require_get_project_paths = __commonJS({
21763
21772
  }
21764
21773
  const framework = await (0, import_detect_framework.detectFramework)({
21765
21774
  fs: fs5.chdir(topPath),
21766
- frameworkList: import_frameworks5.frameworkList
21775
+ frameworkList: import_frameworks6.frameworkList
21767
21776
  });
21768
21777
  if (framework !== null)
21769
21778
  allPaths.push(topPath);
@@ -21925,7 +21934,7 @@ var require_local_file_system_detector = __commonJS({
21925
21934
  LocalFileSystemDetector: () => LocalFileSystemDetector6
21926
21935
  });
21927
21936
  module.exports = __toCommonJS2(local_file_system_detector_exports);
21928
- var import_promises4 = __toESM2(__require("fs/promises"));
21937
+ var import_promises5 = __toESM2(__require("fs/promises"));
21929
21938
  var import_path19 = __require("path");
21930
21939
  var import_filesystem = require_filesystem();
21931
21940
  var import_error_utils5 = require_dist();
@@ -21936,7 +21945,7 @@ var require_local_file_system_detector = __commonJS({
21936
21945
  }
21937
21946
  async _hasPath(name) {
21938
21947
  try {
21939
- await import_promises4.default.stat(this.getFilePath(name));
21948
+ await import_promises5.default.stat(this.getFilePath(name));
21940
21949
  return true;
21941
21950
  } catch (err) {
21942
21951
  if ((0, import_error_utils5.isErrnoException)(err) && err.code === "ENOENT") {
@@ -21946,15 +21955,15 @@ var require_local_file_system_detector = __commonJS({
21946
21955
  }
21947
21956
  }
21948
21957
  _readFile(name) {
21949
- return import_promises4.default.readFile(this.getFilePath(name));
21958
+ return import_promises5.default.readFile(this.getFilePath(name));
21950
21959
  }
21951
21960
  async _isFile(name) {
21952
- const stat2 = await import_promises4.default.stat(this.getFilePath(name));
21961
+ const stat2 = await import_promises5.default.stat(this.getFilePath(name));
21953
21962
  return stat2.isFile();
21954
21963
  }
21955
21964
  async _readdir(dir) {
21956
21965
  const dirPath = this.getFilePath(dir);
21957
- const entries = await import_promises4.default.readdir(dirPath, { withFileTypes: true });
21966
+ const entries = await import_promises5.default.readdir(dirPath, { withFileTypes: true });
21958
21967
  const result = [];
21959
21968
  for (const entry of entries) {
21960
21969
  let type;
@@ -28309,7 +28318,7 @@ var require_stringify = __commonJS({
28309
28318
  });
28310
28319
 
28311
28320
  // ../../node_modules/.pnpm/json5@2.2.2/node_modules/json5/lib/index.js
28312
- var require_lib4 = __commonJS({
28321
+ var require_lib3 = __commonJS({
28313
28322
  "../../node_modules/.pnpm/json5@2.2.2/node_modules/json5/lib/index.js"(exports, module) {
28314
28323
  var parse3 = require_parse();
28315
28324
  var stringify = require_stringify();
@@ -28457,7 +28466,7 @@ var require_get_workspace_package_paths = __commonJS({
28457
28466
  var import_path19 = __toESM2(__require("path"));
28458
28467
  var import_js_yaml = __toESM2(require_js_yaml3());
28459
28468
  var import_glob = __toESM2(require_glob());
28460
- var import_json5 = __toESM2(require_lib4());
28469
+ var import_json5 = __toESM2(require_lib3());
28461
28470
  var import_get_glob_fs = require_get_glob_fs();
28462
28471
  var posixPath = import_path19.default.posix;
28463
28472
  async function getWorkspacePackagePaths3({
@@ -28830,7 +28839,7 @@ var require_get_monorepo_default_settings = __commonJS({
28830
28839
  var import_monorepo_managers = require_monorepo_managers();
28831
28840
  var import_package_managers = require_package_managers();
28832
28841
  var import_detect_framework = require_detect_framework();
28833
- var import_json5 = __toESM2(require_lib4());
28842
+ var import_json5 = __toESM2(require_lib3());
28834
28843
  var import_semver = __toESM2(require_semver());
28835
28844
  var MissingBuildPipeline = class extends Error {
28836
28845
  constructor(usesTasks) {
@@ -29049,7 +29058,7 @@ var require_detect_instrumentation = __commonJS({
29049
29058
  });
29050
29059
 
29051
29060
  // ../fs-detectors/dist/index.js
29052
- var require_dist3 = __commonJS({
29061
+ var require_dist2 = __commonJS({
29053
29062
  "../fs-detectors/dist/index.js"(exports, module) {
29054
29063
  "use strict";
29055
29064
  var __defProp = Object.defineProperty;
@@ -29476,7 +29485,7 @@ var require_json_parse_better_errors = __commonJS({
29476
29485
  });
29477
29486
 
29478
29487
  // ../../node_modules/.pnpm/path-to-regexp@6.1.0/node_modules/path-to-regexp/dist/index.js
29479
- var require_dist4 = __commonJS({
29488
+ var require_dist3 = __commonJS({
29480
29489
  "../../node_modules/.pnpm/path-to-regexp@6.1.0/node_modules/path-to-regexp/dist/index.js"(exports) {
29481
29490
  "use strict";
29482
29491
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -29846,7 +29855,7 @@ var require_dist4 = __commonJS({
29846
29855
  });
29847
29856
 
29848
29857
  // ../../node_modules/.pnpm/path-to-regexp@6.3.0/node_modules/path-to-regexp/dist/index.js
29849
- var require_dist5 = __commonJS({
29858
+ var require_dist4 = __commonJS({
29850
29859
  "../../node_modules/.pnpm/path-to-regexp@6.3.0/node_modules/path-to-regexp/dist/index.js"(exports) {
29851
29860
  "use strict";
29852
29861
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -30271,8 +30280,8 @@ var require_superstatic = __commonJS({
30271
30280
  });
30272
30281
  module.exports = __toCommonJS2(superstatic_exports);
30273
30282
  var import_url4 = __require("url");
30274
- var import_path_to_regexp = require_dist4();
30275
- var import_path_to_regexp_updated = require_dist5();
30283
+ var import_path_to_regexp = require_dist3();
30284
+ var import_path_to_regexp_updated = require_dist4();
30276
30285
  function cloneKeys(keys) {
30277
30286
  if (typeof keys === "undefined") {
30278
30287
  return void 0;
@@ -30774,7 +30783,7 @@ var require_append = __commonJS({
30774
30783
  appendRoutesToPhase: () => appendRoutesToPhase2
30775
30784
  });
30776
30785
  module.exports = __toCommonJS2(append_exports);
30777
- var import_index = require_dist6();
30786
+ var import_index = require_dist5();
30778
30787
  function appendRoutesToPhase2({
30779
30788
  routes: prevRoutes,
30780
30789
  newRoutes,
@@ -30842,7 +30851,7 @@ var require_merge3 = __commonJS({
30842
30851
  mergeRoutes: () => mergeRoutes2
30843
30852
  });
30844
30853
  module.exports = __toCommonJS2(merge_exports);
30845
- var import_index = require_dist6();
30854
+ var import_index = require_dist5();
30846
30855
  function getBuilderRoutesMapping(builds) {
30847
30856
  const builderRoutes = {};
30848
30857
  for (const { entrypoint, routes, use } of builds) {
@@ -31811,7 +31820,7 @@ var require_types2 = __commonJS({
31811
31820
  });
31812
31821
 
31813
31822
  // ../routing-utils/dist/index.js
31814
- var require_dist6 = __commonJS({
31823
+ var require_dist5 = __commonJS({
31815
31824
  "../routing-utils/dist/index.js"(exports, module) {
31816
31825
  "use strict";
31817
31826
  var __defProp = Object.defineProperty;
@@ -32365,9 +32374,9 @@ var require_utils3 = __commonJS({
32365
32374
  });
32366
32375
  module.exports = __toCommonJS2(utils_exports);
32367
32376
  var import_build_utils11 = __require("@vercel/build-utils");
32368
- var import_frameworks5 = require_frameworks();
32377
+ var import_frameworks6 = require_frameworks();
32369
32378
  var import_types = require_types3();
32370
- var DETECTION_FRAMEWORKS = import_frameworks5.frameworkList.filter(
32379
+ var DETECTION_FRAMEWORKS = import_frameworks6.frameworkList.filter(
32371
32380
  (framework) => !framework.experimental || framework.runtimeFramework
32372
32381
  );
32373
32382
  function stripTrailingSlash(p) {
@@ -32581,11 +32590,11 @@ var require_resolve2 = __commonJS({
32581
32590
  var import_build_utils11 = __require("@vercel/build-utils");
32582
32591
  var import_types = require_types3();
32583
32592
  var import_utils4 = require_utils3();
32584
- var import_frameworks5 = require_frameworks();
32585
- var import_fs_detectors6 = require_dist3();
32586
- var import_routing_utils2 = require_dist6();
32593
+ var import_frameworks6 = require_frameworks();
32594
+ var import_fs_detectors6 = require_dist2();
32595
+ var import_routing_utils2 = require_dist5();
32587
32596
  var import_build_utils22 = __require("@vercel/build-utils");
32588
- var frameworksBySlug2 = new Map(import_frameworks5.frameworkList.map((f) => [f.slug, f]));
32597
+ var frameworksBySlug2 = new Map(import_frameworks6.frameworkList.map((f) => [f.slug, f]));
32589
32598
  var PYTHON_MODULE_ATTR_RE = /^([A-Za-z_][\w]*(?:\.[A-Za-z_][\w]*)*):([A-Za-z_][\w]*)$/;
32590
32599
  function parsePyModuleAttrEntrypoint(entrypoint) {
32591
32600
  const match = PYTHON_MODULE_ATTR_RE.exec(entrypoint);
@@ -32761,7 +32770,7 @@ var require_resolve2 = __commonJS({
32761
32770
  runtime
32762
32771
  }) {
32763
32772
  const serviceFs = workspace === "." ? fs5 : fs5.chdir(workspace);
32764
- const frameworkCandidates = (0, import_utils4.filterFrameworksByRuntime)(import_frameworks5.frameworkList, runtime);
32773
+ const frameworkCandidates = (0, import_utils4.filterFrameworksByRuntime)(import_frameworks6.frameworkList, runtime);
32765
32774
  const frameworks = await (0, import_fs_detectors6.detectFrameworks)({
32766
32775
  fs: serviceFs,
32767
32776
  frameworkList: frameworkCandidates
@@ -33481,11 +33490,11 @@ var require_resolve_v2 = __commonJS({
33481
33490
  module.exports = __toCommonJS2(resolve_v2_exports);
33482
33491
  var import_path19 = __require("path");
33483
33492
  var import_build_utils11 = __require("@vercel/build-utils");
33484
- var import_frameworks5 = require_frameworks();
33493
+ var import_frameworks6 = require_frameworks();
33485
33494
  var import_types = require_types3();
33486
33495
  var import_resolve = require_resolve2();
33487
33496
  var import_utils4 = require_utils3();
33488
- var frameworksBySlug2 = new Map(import_frameworks5.frameworkList.map((f) => [f.slug, f]));
33497
+ var frameworksBySlug2 = new Map(import_frameworks6.frameworkList.map((f) => [f.slug, f]));
33489
33498
  var MAX_SERVICE_NAME_LENGTH = 64;
33490
33499
  var SERVICE_NAME_REGEX = /^[a-z]([a-z_-]*[a-z])?$/;
33491
33500
  function isValidServiceName(name) {
@@ -33872,8 +33881,8 @@ var require_auto_detect = __commonJS({
33872
33881
  autoDetectServices: () => autoDetectServices2
33873
33882
  });
33874
33883
  module.exports = __toCommonJS2(auto_detect_exports);
33875
- var import_fs_detectors6 = require_dist3();
33876
- var import_frameworks5 = require_frameworks();
33884
+ var import_fs_detectors6 = require_dist2();
33885
+ var import_frameworks6 = require_frameworks();
33877
33886
  var import_utils4 = require_utils3();
33878
33887
  var FRONTEND_DIR = "frontend";
33879
33888
  var APPS_WEB_DIR = "apps/web";
@@ -33884,7 +33893,7 @@ var require_auto_detect = __commonJS({
33884
33893
  const { fs: fs5, detectEntrypoint } = options;
33885
33894
  const rootFrameworks = await (0, import_fs_detectors6.detectFrameworks)({
33886
33895
  fs: fs5,
33887
- frameworkList: import_frameworks5.frameworkList
33896
+ frameworkList: import_frameworks6.frameworkList
33888
33897
  });
33889
33898
  if (rootFrameworks.length > 1) {
33890
33899
  const frameworkNames = rootFrameworks.map((f) => f.name).join(", ");
@@ -33910,7 +33919,7 @@ var require_auto_detect = __commonJS({
33910
33919
  const frontendFs = fs5.chdir(frontendLocation);
33911
33920
  const frontendFrameworks = await (0, import_fs_detectors6.detectFrameworks)({
33912
33921
  fs: frontendFs,
33913
- frameworkList: import_frameworks5.frameworkList
33922
+ frameworkList: import_frameworks6.frameworkList
33914
33923
  });
33915
33924
  if (frontendFrameworks.length > 1) {
33916
33925
  const frameworkNames = frontendFrameworks.map((f) => f.name).join(", ");
@@ -34154,7 +34163,7 @@ var require_detect_railway = __commonJS({
34154
34163
  module.exports = __toCommonJS2(detect_railway_exports);
34155
34164
  var import_path19 = __require("path");
34156
34165
  var import_smol_toml3 = __toESM2(__require("smol-toml"));
34157
- var import_fs_detectors6 = require_dist3();
34166
+ var import_fs_detectors6 = require_dist2();
34158
34167
  var import_utils4 = require_utils3();
34159
34168
  var RAILWAY_JSON = "railway.json";
34160
34169
  var RAILWAY_TOML = "railway.toml";
@@ -34396,7 +34405,7 @@ var require_detect_render = __commonJS({
34396
34405
  });
34397
34406
  module.exports = __toCommonJS2(detect_render_exports);
34398
34407
  var import_js_yaml = __toESM2(require_js_yaml3());
34399
- var import_fs_detectors6 = require_dist3();
34408
+ var import_fs_detectors6 = require_dist2();
34400
34409
  var import_types = require_types3();
34401
34410
  var import_utils4 = require_utils3();
34402
34411
  var RENDER_YAML = "render.yaml";
@@ -34617,7 +34626,7 @@ var require_detect_procfile = __commonJS({
34617
34626
  detectProcfileServices: () => detectProcfileServices
34618
34627
  });
34619
34628
  module.exports = __toCommonJS2(detect_procfile_exports);
34620
- var import_fs_detectors6 = require_dist3();
34629
+ var import_fs_detectors6 = require_dist2();
34621
34630
  var import_utils4 = require_utils3();
34622
34631
  var PROCFILE = "Procfile";
34623
34632
  var PROCFILE_LINE_RE = /^\s*([A-Za-z_][A-Za-z0-9_-]*):\s*(.+)/;
@@ -34871,7 +34880,7 @@ var require_detect_services = __commonJS({
34871
34880
  });
34872
34881
  module.exports = __toCommonJS2(detect_services_exports);
34873
34882
  var import_build_utils11 = __require("@vercel/build-utils");
34874
- var import_routing_utils2 = require_dist6();
34883
+ var import_routing_utils2 = require_dist5();
34875
34884
  var import_utils4 = require_utils3();
34876
34885
  var import_resolve = require_resolve2();
34877
34886
  var import_resolve_v2 = require_resolve_v2();
@@ -35266,7 +35275,7 @@ var require_detect_services = __commonJS({
35266
35275
  });
35267
35276
 
35268
35277
  // ../../internals/service-topology/dist/index.js
35269
- var require_dist7 = __commonJS({
35278
+ var require_dist6 = __commonJS({
35270
35279
  "../../internals/service-topology/dist/index.js"(exports, module) {
35271
35280
  "use strict";
35272
35281
  var __defProp = Object.defineProperty;
@@ -36906,7 +36915,7 @@ var require_jsonfile3 = __commonJS({
36906
36915
  } catch (_) {
36907
36916
  _fs = __require("fs");
36908
36917
  }
36909
- function readFile7(file, options, callback) {
36918
+ function readFile8(file, options, callback) {
36910
36919
  if (callback == null) {
36911
36920
  callback = options;
36912
36921
  options = {};
@@ -37005,7 +37014,7 @@ var require_jsonfile3 = __commonJS({
37005
37014
  return content;
37006
37015
  }
37007
37016
  var jsonfile = {
37008
- readFile: readFile7,
37017
+ readFile: readFile8,
37009
37018
  readFileSync,
37010
37019
  writeFile: writeFile5,
37011
37020
  writeFileSync
@@ -37281,7 +37290,7 @@ var require_output2 = __commonJS({
37281
37290
  });
37282
37291
 
37283
37292
  // ../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/index.js
37284
- var require_lib5 = __commonJS({
37293
+ var require_lib4 = __commonJS({
37285
37294
  "../../node_modules/.pnpm/fs-extra@8.0.1/node_modules/fs-extra/lib/index.js"(exports, module) {
37286
37295
  "use strict";
37287
37296
  module.exports = Object.assign(
@@ -37313,7 +37322,7 @@ var require_lib5 = __commonJS({
37313
37322
  });
37314
37323
 
37315
37324
  // ../../node_modules/.pnpm/async-sema@3.0.0/node_modules/async-sema/lib/index.js
37316
- var require_lib6 = __commonJS({
37325
+ var require_lib5 = __commonJS({
37317
37326
  "../../node_modules/.pnpm/async-sema@3.0.0/node_modules/async-sema/lib/index.js"(exports) {
37318
37327
  "use strict";
37319
37328
  var __importDefault = exports && exports.__importDefault || function(mod) {
@@ -37513,8 +37522,8 @@ var require_hashes = __commonJS({
37513
37522
  });
37514
37523
  module.exports = __toCommonJS2(hashes_exports);
37515
37524
  var import_crypto = __require("crypto");
37516
- var import_fs_extra11 = __toESM2(require_lib5());
37517
- var import_async_sema = require_lib6();
37525
+ var import_fs_extra11 = __toESM2(require_lib4());
37526
+ var import_async_sema = require_lib5();
37518
37527
  var MAX_BUFFER_FILE_SIZE = 2 ** 31 - 1;
37519
37528
  function hash(buf) {
37520
37529
  return (0, import_crypto.createHash)("sha1").update(Uint8Array.from(buf)).digest("hex");
@@ -38000,7 +38009,7 @@ var require_package = __commonJS({
38000
38009
  "../client/package.json"(exports, module) {
38001
38010
  module.exports = {
38002
38011
  name: "@vercel/client",
38003
- version: "18.2.15",
38012
+ version: "18.2.18",
38004
38013
  main: "dist/index.js",
38005
38014
  typings: "dist/index.d.ts",
38006
38015
  homepage: "https://vercel.com",
@@ -45686,14 +45695,14 @@ var require_utils8 = __commonJS({
45686
45695
  });
45687
45696
  module.exports = __toCommonJS2(utils_exports);
45688
45697
  var import_node_fs2 = __toESM2(__require("fs"), 1);
45689
- var import_node_path2 = __require("path");
45698
+ var import_node_path3 = __require("path");
45690
45699
  var CONFIGURATION_FILENAMES = [
45691
45700
  "microfrontends.jsonc",
45692
45701
  "microfrontends.json"
45693
45702
  ];
45694
45703
  function findConfig({ dir }) {
45695
45704
  for (const filename of CONFIGURATION_FILENAMES) {
45696
- const maybeConfig = (0, import_node_path2.join)(dir, filename);
45705
+ const maybeConfig = (0, import_node_path3.join)(dir, filename);
45697
45706
  if (import_node_fs2.default.existsSync(maybeConfig)) {
45698
45707
  return maybeConfig;
45699
45708
  }
@@ -45920,8 +45929,8 @@ var require_utils9 = __commonJS({
45920
45929
  var import_ignore = __toESM2(require_ignore());
45921
45930
  var import_pkg2 = require_pkg();
45922
45931
  var import_build_utils11 = __require("@vercel/build-utils");
45923
- var import_async_sema = require_lib6();
45924
- var import_fs_extra11 = require_lib5();
45932
+ var import_async_sema = require_lib5();
45933
+ var import_fs_extra11 = require_lib4();
45925
45934
  var import_readdir_recursive = __toESM2(require_readdir_recursive());
45926
45935
  var import_utils4 = require_utils8();
45927
45936
  var semaphore = new import_async_sema.Sema(10);
@@ -47082,7 +47091,7 @@ var require_retry2 = __commonJS({
47082
47091
  });
47083
47092
 
47084
47093
  // ../../node_modules/.pnpm/async-retry@1.2.3/node_modules/async-retry/lib/index.js
47085
- var require_lib7 = __commonJS({
47094
+ var require_lib6 = __commonJS({
47086
47095
  "../../node_modules/.pnpm/async-retry@1.2.3/node_modules/async-retry/lib/index.js"(exports, module) {
47087
47096
  var retrier = require_retry2();
47088
47097
  function retry(fn, opts) {
@@ -47201,8 +47210,8 @@ var require_upload = __commonJS({
47201
47210
  var import_fs6 = __require("fs");
47202
47211
  var import_stream = __require("stream");
47203
47212
  var import_node_events = __require("events");
47204
- var import_async_retry = __toESM2(require_lib7());
47205
- var import_async_sema = require_lib6();
47213
+ var import_async_retry = __toESM2(require_lib6());
47214
+ var import_async_sema = require_lib5();
47206
47215
  var import_utils4 = require_utils9();
47207
47216
  var import_errors3 = require_errors();
47208
47217
  var import_deploy = require_deploy();
@@ -47805,7 +47814,7 @@ var require_BufferList = __commonJS({
47805
47814
  this.head = this.tail = null;
47806
47815
  this.length = 0;
47807
47816
  };
47808
- BufferList.prototype.join = function join14(s) {
47817
+ BufferList.prototype.join = function join15(s) {
47809
47818
  if (this.length === 0)
47810
47819
  return "";
47811
47820
  var p = this.head;
@@ -52813,7 +52822,7 @@ var require_archive = __commonJS({
52813
52822
  createTgzFiles: () => createTgzFiles
52814
52823
  });
52815
52824
  module.exports = __toCommonJS2(archive_exports);
52816
- var import_node_path2 = __require("path");
52825
+ var import_node_path3 = __require("path");
52817
52826
  var import_node_zlib = __require("zlib");
52818
52827
  var import_build_utils11 = __require("@vercel/build-utils");
52819
52828
  var import_tar_fs = __toESM2(require_tar_fs());
@@ -52822,7 +52831,7 @@ var require_archive = __commonJS({
52822
52831
  const filesToArchive = exclude ? fileList.filter((file) => !exclude.includes(file)) : fileList;
52823
52832
  debug?.("Packing tarball");
52824
52833
  const tarStream = import_tar_fs.default.pack(workPath, {
52825
- entries: filesToArchive.map((file) => (0, import_node_path2.relative)(workPath, file))
52834
+ entries: filesToArchive.map((file) => (0, import_node_path3.relative)(workPath, file))
52826
52835
  }).pipe((0, import_node_zlib.createGzip)());
52827
52836
  const chunkedTarBuffers = await (0, import_build_utils11.streamToBufferChunks)(tarStream);
52828
52837
  debug?.(`Packed tarball into ${chunkedTarBuffers.length} chunks`);
@@ -52830,7 +52839,7 @@ var require_archive = __commonJS({
52830
52839
  chunkedTarBuffers.map((chunk, index) => [
52831
52840
  (0, import_hashes.hash)(chunk),
52832
52841
  {
52833
- names: [(0, import_node_path2.join)(workPath, `.vercel/source.tgz.part${index + 1}`)],
52842
+ names: [(0, import_node_path3.join)(workPath, `.vercel/source.tgz.part${index + 1}`)],
52834
52843
  data: chunk,
52835
52844
  mode: 438
52836
52845
  }
@@ -52868,7 +52877,7 @@ var require_collect_deployment_files = __commonJS({
52868
52877
  });
52869
52878
  module.exports = __toCommonJS2(collect_deployment_files_exports);
52870
52879
  var import_error_utils5 = require_dist();
52871
- var import_fs_extra11 = require_lib5();
52880
+ var import_fs_extra11 = require_lib4();
52872
52881
  var import_path19 = __require("path");
52873
52882
  var import_errors3 = require_errors();
52874
52883
  var import_utils4 = require_utils9();
@@ -53068,7 +53077,7 @@ var require_continue = __commonJS({
53068
53077
  });
53069
53078
  module.exports = __toCommonJS2(continue_exports);
53070
53079
  var import_path19 = __require("path");
53071
- var import_fs_extra11 = __toESM2(require_lib5());
53080
+ var import_fs_extra11 = __toESM2(require_lib4());
53072
53081
  var import_check_deployment_status = require_check_deployment_status();
53073
53082
  var import_utils4 = require_utils9();
53074
53083
  var import_hashes = require_hashes();
@@ -53357,7 +53366,7 @@ var require_types4 = __commonJS({
53357
53366
  });
53358
53367
 
53359
53368
  // ../client/dist/index.js
53360
- var require_dist8 = __commonJS({
53369
+ var require_dist7 = __commonJS({
53361
53370
  "../client/dist/index.js"(exports, module) {
53362
53371
  "use strict";
53363
53372
  var __create = Object.create;
@@ -53411,16 +53420,16 @@ var require_dist8 = __commonJS({
53411
53420
 
53412
53421
  // src/util/compile-vercel-config.ts
53413
53422
  var import_dotenv = __toESM(require_main(), 1);
53414
- import { mkdir, readFile as readFile6, writeFile as writeFile4, unlink, access } from "fs/promises";
53415
- import { join as join13, basename as basename4 } from "path";
53423
+ import { mkdir, readFile as readFile7, writeFile as writeFile4, unlink, access } from "fs/promises";
53424
+ import { join as join14, basename as basename4 } from "path";
53416
53425
  import { fork } from "child_process";
53417
53426
  import { parse as tomlParse2 } from "smol-toml";
53418
53427
 
53419
53428
  // src/util/projects/link.ts
53420
53429
  var import_ajv = __toESM(require_ajv(), 1);
53421
- var import_fs_extra10 = __toESM(require_lib2(), 1);
53430
+ var import_fs_extra10 = __toESM(require_lib(), 1);
53422
53431
  import fs4 from "fs";
53423
- import { join as join12, relative as relative5 } from "path";
53432
+ import { join as join13, relative as relative5 } from "path";
53424
53433
  import { promisify } from "util";
53425
53434
 
53426
53435
  // src/util/projects/get-project-by-id-or-name.ts
@@ -53900,7 +53909,7 @@ var CancelablePromise = class _CancelablePromise extends Promise {
53900
53909
  };
53901
53910
 
53902
53911
  // ../../node_modules/.pnpm/@inquirer+core@7.1.3/node_modules/@inquirer/core/dist/esm/lib/create-prompt.mjs
53903
- var import_mute_stream = __toESM(require_lib3(), 1);
53912
+ var import_mute_stream = __toESM(require_lib2(), 1);
53904
53913
 
53905
53914
  // ../../node_modules/.pnpm/signal-exit@4.1.0/node_modules/signal-exit/dist/mjs/signals.js
53906
53915
  var signals = [];
@@ -54764,7 +54773,7 @@ ${error}${import_ansi_escapes2.default.cursorHide}`;
54764
54773
  // src/util/link/repo.ts
54765
54774
  var import_pluralize = __toESM(require_pluralize(), 1);
54766
54775
  var import_slugify = __toESM(require_slugify(), 1);
54767
- var import_fs_extra3 = __toESM(require_lib2(), 1);
54776
+ var import_fs_extra3 = __toESM(require_lib(), 1);
54768
54777
  import { homedir as homedir2 } from "os";
54769
54778
  import { basename, join as join5 } from "path";
54770
54779
  import { normalizePath, traverseUpDirectories } from "@vercel/build-utils";
@@ -54779,7 +54788,7 @@ function humanizePath(path3) {
54779
54788
  }
54780
54789
 
54781
54790
  // src/util/create-git-meta.ts
54782
- var import_fs_extra = __toESM(require_lib2(), 1);
54791
+ var import_fs_extra = __toESM(require_lib(), 1);
54783
54792
  var import_ini = __toESM(require_ini(), 1);
54784
54793
  var import_git_last_commit = __toESM(require_source3(), 1);
54785
54794
  var import_error_utils = __toESM(require_dist(), 1);
@@ -55089,14 +55098,14 @@ async function selectOrg(client, question, autoConfirm, searchable = false, meta
55089
55098
  output_manager_default.stopSpinner();
55090
55099
  }
55091
55100
  const formatChoiceName = (name, slug, isCurrent, limited) => {
55092
- let title2 = `${name} (${slug})`;
55101
+ let title = `${name} (${slug})`;
55093
55102
  if (isCurrent) {
55094
- title2 += ` ${import_chalk6.default.bold("(current)")}`;
55103
+ title += ` ${import_chalk6.default.bold("(current)")}`;
55095
55104
  }
55096
55105
  if (limited) {
55097
- title2 += ` ${emoji("locked")}`;
55106
+ title += ` ${emoji("locked")}`;
55098
55107
  }
55099
- return title2;
55108
+ return title;
55100
55109
  };
55101
55110
  const personalAccountChoice = user.version === "northstar" ? [] : [
55102
55111
  {
@@ -55207,7 +55216,7 @@ ${import_chalk6.default.dim(` ${description}`)}` : "";
55207
55216
  }
55208
55217
 
55209
55218
  // src/util/link/add-to-gitignore.ts
55210
- var import_fs_extra2 = __toESM(require_lib2(), 1);
55219
+ var import_fs_extra2 = __toESM(require_lib(), 1);
55211
55220
  import os from "os";
55212
55221
  import { join as join3 } from "path";
55213
55222
  async function addToGitIgnore(path3, ignore = VERCEL_DIR) {
@@ -55250,7 +55259,7 @@ async function createProject(client, settings) {
55250
55259
 
55251
55260
  // src/util/projects/detect-projects.ts
55252
55261
  var import_frameworks = __toESM(require_frameworks(), 1);
55253
- var import_fs_detectors = __toESM(require_dist3(), 1);
55262
+ var import_fs_detectors = __toESM(require_dist2(), 1);
55254
55263
  import { join as join4 } from "path";
55255
55264
  async function detectProjects(cwd) {
55256
55265
  const fs5 = new import_fs_detectors.LocalFileSystemDetector(cwd);
@@ -56154,7 +56163,7 @@ function findProjectsFromPath(projects, path3) {
56154
56163
 
56155
56164
  // src/commands/env/pull.ts
56156
56165
  var import_chalk19 = __toESM(require_source(), 1);
56157
- var import_fs_extra9 = __toESM(require_lib2(), 1);
56166
+ var import_fs_extra9 = __toESM(require_lib(), 1);
56158
56167
  import { closeSync, openSync, readSync } from "fs";
56159
56168
  import { resolve as resolve5 } from "path";
56160
56169
 
@@ -56752,7 +56761,7 @@ async function pullEnvRecords(client, projectIdOrDeploymentId, source, { target,
56752
56761
  }
56753
56762
 
56754
56763
  // src/util/env/diff-env-files.ts
56755
- var import_fs_extra4 = __toESM(require_lib2(), 1);
56764
+ var import_fs_extra4 = __toESM(require_lib(), 1);
56756
56765
 
56757
56766
  // src/util/parse-env.ts
56758
56767
  var parseEnv = (env) => {
@@ -56826,6 +56835,610 @@ function addDeltaSection(prefix, arr, changed = false) {
56826
56835
 
56827
56836
  // src/util/env/constants.ts
56828
56837
  var VERCEL_OIDC_TOKEN = "VERCEL_OIDC_TOKEN";
56838
+ var SENSITIVE_ENV_VALUE_PLACEHOLDER = "[SENSITIVE]";
56839
+
56840
+ // src/util/env/validate-env.ts
56841
+ var import_frameworks2 = __toESM(require_frameworks(), 1);
56842
+ import { readFile as readFile3 } from "fs/promises";
56843
+ import { join as join6 } from "path";
56844
+
56845
+ // src/util/env/secret-detection.ts
56846
+ var SERVER_ONLY_KEY_PATTERNS = [
56847
+ "access_token",
56848
+ "refresh_token",
56849
+ "client_secret",
56850
+ "webhook_secret",
56851
+ "api_key",
56852
+ "private_key",
56853
+ "service_account",
56854
+ "service_role",
56855
+ "database_url",
56856
+ "database_uri",
56857
+ "db_url",
56858
+ "postgres_url",
56859
+ "postgres_uri",
56860
+ "mysql_url",
56861
+ "mongo_url",
56862
+ "mongo_uri",
56863
+ "redis_url",
56864
+ "redis_uri",
56865
+ "amqp_url",
56866
+ "kafka_url",
56867
+ "elasticsearch_url",
56868
+ "password",
56869
+ "passwd",
56870
+ "pwd",
56871
+ "secret",
56872
+ "private",
56873
+ "key",
56874
+ "apikey",
56875
+ "auth",
56876
+ "token",
56877
+ "jwt",
56878
+ "signature",
56879
+ "cert",
56880
+ "pem",
56881
+ "salt",
56882
+ "bearer",
56883
+ "credential",
56884
+ "credentials",
56885
+ "creds"
56886
+ ];
56887
+ var SAFE_KEY_HINT_TOKENS = ["public", "publishable", "anon"];
56888
+ var WELL_KNOWN_SECRET_NAMES = /* @__PURE__ */ new Set([
56889
+ "DATABASE_URL",
56890
+ "DATABASE_URL_UNPOOLED",
56891
+ "POSTGRES_URL",
56892
+ "POSTGRES_URL_NON_POOLING",
56893
+ "POSTGRES_URL_NO_SSL",
56894
+ "POSTGRES_URL_UNPOOLED",
56895
+ "POSTGRES_PRISMA_URL",
56896
+ "MONGODB_URI",
56897
+ "MONGODB_URL",
56898
+ "MONGO_URI",
56899
+ "MONGO_URL",
56900
+ "MYSQL_URL",
56901
+ "MYSQL_URI",
56902
+ "REDIS_URL",
56903
+ "REDIS_TLS_URL",
56904
+ "KV_URL",
56905
+ "KV_REST_API_URL",
56906
+ "UPSTASH_REDIS_REST_URL",
56907
+ "GOOGLE_APPLICATION_CREDENTIALS",
56908
+ "AWS_ACCESS_KEY_ID"
56909
+ ]);
56910
+ var SECRET_SEGMENT_PATTERN = /(?:^|[_-])(SECRET|PASSWORD|PASSWD|PASSPHRASE|PWD|PGPASSWORD|TOKEN|CREDENTIAL|JWT|DSN|APIKEY|PRIVATEKEY|SALT|PEPPER|MNEMONIC|PEM|CIPHER)S?(?:[_-]|$)/i;
56911
+ var EXPLICIT_SECRET_TOKEN_PATTERN = /(?:^|[_-])(SECRET|PASSWORD|PASSWD|PASSPHRASE|PWD|PGPASSWORD|TOKEN|CREDENTIAL|MNEMONIC|PRIVATEKEY|APIKEY)S?(?:[_-]|$)/i;
56912
+ var SECRET_COMPOUND_PATTERNS = [
56913
+ /(?:^|[_-])(?:API|PRIVATE|SIGNING|ENCRYPTION|SESSION|COOKIE|CSRF|HMAC|ACCESS|APP|WRITE)[_-]?(?:KEY|SECRET)S?(?:[_-]|$)/i,
56914
+ /(?:^|[_-])(?:ACCESS|REFRESH|BEARER|AUTH)[_-]?TOKENS?(?:[_-]|$)/i,
56915
+ /(?:^|[_-])(?:WEBHOOK|SIGNING)[_-]?SECRETS?(?:[_-]|$)/i,
56916
+ /(?:^|[_-])SERVICE[_-]?(?:ROLE(?:[_-]?KEYS?)?|ACCOUNTS?)(?:[_-]|$)/i
56917
+ ];
56918
+ var NON_CREDENTIAL_KEY_TOKENS = /* @__PURE__ */ new Set([
56919
+ "PUBLIC",
56920
+ "PUBLISHABLE",
56921
+ "ANON",
56922
+ "PRIMARY",
56923
+ "PARTITION",
56924
+ "FOREIGN",
56925
+ "SORT",
56926
+ "HASH",
56927
+ "COMPOSITE",
56928
+ "INDEX",
56929
+ "UNIQUE",
56930
+ "NATURAL",
56931
+ "SURROGATE",
56932
+ "CACHE",
56933
+ "IDEMPOTENCY",
56934
+ "LOOKUP",
56935
+ "ROW",
56936
+ "SHARD",
56937
+ "CLUSTER",
56938
+ "LICENSE",
56939
+ "LICENCE",
56940
+ "PRODUCT",
56941
+ "TRANSLATION",
56942
+ "TRANSLATIONS",
56943
+ "I18N",
56944
+ "LOCALE",
56945
+ "RBAC",
56946
+ "ACL",
56947
+ "ROLE",
56948
+ "ROLES",
56949
+ "PERMISSION",
56950
+ "PERMISSIONS",
56951
+ "SCOPE",
56952
+ "SCOPES",
56953
+ "POLICY",
56954
+ "POLICIES"
56955
+ ]);
56956
+ var GENERIC_KEY_SUFFIX_PATTERN = /(?:^|[_-])([A-Z0-9]+)[_-]KEYS?$/i;
56957
+ var GENERIC_KEY_PREFIX_PATTERN = /^KEYS?[_-]([A-Z0-9]+)(?:[_-]|$)/i;
56958
+ var DB_URL_PATTERN = /(?:^|_)(?:DATABASE|POSTGRES|MONGO|MONGODB|MYSQL|REDIS|NEON|PLANETSCALE|TURSO|RDS)(?:_[A-Z0-9_]*)?_(?:URL|URI)(?:_[A-Z0-9_]+)?$/i;
56959
+ var SECRET_VALUE_PATTERNS = [
56960
+ /gh[opsru]_[A-Za-z0-9_]{20,}/,
56961
+ /github_pat_[A-Za-z0-9_]{20,}/,
56962
+ /glpat-[A-Za-z0-9_-]{20,}/,
56963
+ /(?:sk|rk)_(?:live|test)_[A-Za-z0-9]{20,}/,
56964
+ /whsec_[A-Za-z0-9]{20,}/,
56965
+ /xox[abprs]-[A-Za-z0-9-]{20,}/,
56966
+ /xapp-[A-Za-z0-9-]{20,}/,
56967
+ /\b(?:AKIA|ASIA)[A-Z0-9]{16}\b/,
56968
+ /\bAIza[A-Za-z0-9_-]{30,}/,
56969
+ /sk-ant-[A-Za-z0-9_-]{20,}/,
56970
+ /sk-(?:proj|svcacct|admin)-[A-Za-z0-9_-]{20,}/,
56971
+ /\bsk-[A-Za-z0-9]{32,}\b/,
56972
+ /shp(?:at|ss|ca)_[a-fA-F0-9]{32}/,
56973
+ /npm_[A-Za-z0-9]{30,}/,
56974
+ /\bhf_[A-Za-z0-9_]{30,}/,
56975
+ /nvapi-[A-Za-z0-9_-]{40,}/,
56976
+ /SG\.[A-Za-z0-9_-]{22}\.[A-Za-z0-9_-]{43}/,
56977
+ /key-[a-f0-9]{32}/,
56978
+ /glsa_[A-Za-z0-9_]{32}_[a-f0-9]{8}/,
56979
+ /pscale_pw_[A-Za-z0-9_-]{20,}/,
56980
+ /\bre_[A-Za-z0-9_]{30,}/,
56981
+ /dop_v1_[a-f0-9]{64}/,
56982
+ /sntrys_[A-Za-z0-9_-]{30,}/,
56983
+ /FlyV1 [A-Za-z0-9_-]{20,}/,
56984
+ /AccountKey=[A-Za-z0-9+/]{40,}=*/,
56985
+ /-----BEGIN [A-Z0-9 ]*PRIVATE KEY[A-Z0-9 ]*-----/,
56986
+ /-----BEGIN PGP MESSAGE-----/,
56987
+ /\beyJ[A-Za-z0-9_-]{10,}\.eyJ[A-Za-z0-9_-]{10,}\.[A-Za-z0-9_-]{8,}\b/,
56988
+ /[a-zA-Z][a-zA-Z0-9+.-]*:\/\/[A-Za-z0-9_.%-]*:[^@\s/]+(?<!\.\.)@/,
56989
+ /\bBearer\s+[A-Za-z0-9_+=/.-]{20,}/i,
56990
+ /(?:password|passwd|pwd|secret|token|api[_-]?key|access[_-]?token|refresh[_-]?token|private[_-]?key|auth)\s*[=:]\s*["']?[A-Za-z0-9_+=/.-]{12,}/i
56991
+ ];
56992
+ function tokenize(key) {
56993
+ return new Set(
56994
+ key.split(/(?<=[a-z])(?=[A-Z])/).flatMap((part) => part.split(/[_\-.]+/)).map((token) => token.toLowerCase()).filter(Boolean)
56995
+ );
56996
+ }
56997
+ function hasSafeKeyHint(key) {
56998
+ const tokens = tokenize(key);
56999
+ return SAFE_KEY_HINT_TOKENS.some((token) => tokens.has(token));
57000
+ }
57001
+ function hasGenericKeySuffix(key) {
57002
+ const precedingToken = GENERIC_KEY_SUFFIX_PATTERN.exec(key)?.[1]?.toUpperCase();
57003
+ return Boolean(
57004
+ precedingToken && !NON_CREDENTIAL_KEY_TOKENS.has(precedingToken)
57005
+ );
57006
+ }
57007
+ function hasGenericKeyPrefix(key) {
57008
+ const followingToken = GENERIC_KEY_PREFIX_PATTERN.exec(key)?.[1]?.toUpperCase();
57009
+ return Boolean(
57010
+ followingToken && !NON_CREDENTIAL_KEY_TOKENS.has(followingToken)
57011
+ );
57012
+ }
57013
+ function getMatchingServerOnlyKey(key) {
57014
+ const normalized = key.replace(/(?<=[a-z])(?=[A-Z])/g, "_").toLowerCase().replace(/[-.]+/g, "_");
57015
+ for (const pattern of SERVER_ONLY_KEY_PATTERNS) {
57016
+ if (pattern.includes("_") && normalized.includes(pattern))
57017
+ return pattern;
57018
+ }
57019
+ const tokens = tokenize(key);
57020
+ return SERVER_ONLY_KEY_PATTERNS.find(
57021
+ (pattern) => !pattern.includes("_") && tokens.has(pattern)
57022
+ ) ?? null;
57023
+ }
57024
+ function looksLikeSecret(key) {
57025
+ if (!key || hasSafeKeyHint(key))
57026
+ return false;
57027
+ if (WELL_KNOWN_SECRET_NAMES.has(key.toUpperCase()))
57028
+ return true;
57029
+ if (SECRET_SEGMENT_PATTERN.test(key))
57030
+ return true;
57031
+ if (SECRET_COMPOUND_PATTERNS.some((pattern) => pattern.test(key)))
57032
+ return true;
57033
+ if (DB_URL_PATTERN.test(key))
57034
+ return true;
57035
+ return hasGenericKeySuffix(key) || hasGenericKeyPrefix(key);
57036
+ }
57037
+ function looksLikeSecretValue(value) {
57038
+ const trimmed = value.trim();
57039
+ return Boolean(
57040
+ trimmed && SECRET_VALUE_PATTERNS.some((pattern) => pattern.test(trimmed))
57041
+ );
57042
+ }
57043
+ function shouldConfirmRotationBeforeDelete(env) {
57044
+ if (env.type === "system")
57045
+ return false;
57046
+ if (EXPLICIT_SECRET_TOKEN_PATTERN.test(env.key))
57047
+ return true;
57048
+ if (env.hasPublicPrefix || hasSafeKeyHint(env.key))
57049
+ return false;
57050
+ return looksLikeSecret(env.key);
57051
+ }
57052
+ function isFlagsSecretNeedingSplit(env) {
57053
+ if (env.key !== "FLAGS_SECRET")
57054
+ return false;
57055
+ if (env.type !== "plain" && env.type !== "encrypted")
57056
+ return false;
57057
+ return env.targets.length + (env.customEnvironmentIds?.length ?? 0) > 1;
57058
+ }
57059
+
57060
+ // src/util/env/validate-env.ts
57061
+ function getEnvValueWarnings(value) {
57062
+ const warnings = [];
57063
+ const normalized = value.replace(/\n$/, "");
57064
+ if (/^[ \t]+/.test(normalized)) {
57065
+ warnings.push({
57066
+ message: "starts with whitespace",
57067
+ requiresConfirmation: false
57068
+ });
57069
+ }
57070
+ if (/[ \t]+$/.test(normalized)) {
57071
+ warnings.push({
57072
+ message: "ends with whitespace",
57073
+ requiresConfirmation: false
57074
+ });
57075
+ }
57076
+ if (normalized.includes("\r") || normalized.includes("\n")) {
57077
+ warnings.push({
57078
+ message: "contains newlines",
57079
+ requiresConfirmation: false
57080
+ });
57081
+ }
57082
+ if (value.includes("\0")) {
57083
+ warnings.push({
57084
+ message: "contains null characters",
57085
+ requiresConfirmation: false
57086
+ });
57087
+ }
57088
+ if (value === "") {
57089
+ warnings.push({
57090
+ message: "is empty",
57091
+ requiresConfirmation: true
57092
+ });
57093
+ }
57094
+ if (value.length > 2 && (value.startsWith('"') && value.endsWith('"') || value.startsWith("'") && value.endsWith("'"))) {
57095
+ warnings.push({
57096
+ message: "includes surrounding quotes (these will be stored literally)",
57097
+ requiresConfirmation: false
57098
+ });
57099
+ }
57100
+ return warnings;
57101
+ }
57102
+ function formatWarnings(warnings) {
57103
+ if (warnings.length === 0)
57104
+ return null;
57105
+ const messages = warnings.map((w) => w.message);
57106
+ const startsIdx = messages.indexOf("starts with whitespace");
57107
+ const endsIdx = messages.indexOf("ends with whitespace");
57108
+ if (startsIdx !== -1 && endsIdx !== -1) {
57109
+ messages.splice(Math.max(startsIdx, endsIdx), 1);
57110
+ messages[Math.min(startsIdx, endsIdx)] = "starts and ends with whitespace";
57111
+ }
57112
+ if (messages.length === 1) {
57113
+ return `Value ${messages[0]}`;
57114
+ }
57115
+ if (messages.length === 2) {
57116
+ return `Value ${messages[0]} and ${messages[1]}`;
57117
+ }
57118
+ const last = messages.pop();
57119
+ return `Value ${messages.join(", ")}, and ${last}`;
57120
+ }
57121
+ var API_PUBLIC_PREFIXES = [
57122
+ "NEXT_PUBLIC_",
57123
+ "VUE_APP_",
57124
+ "REACT_APP_",
57125
+ "GATSBY_",
57126
+ "GRIDSOME_",
57127
+ "NUXT_PUBLIC_",
57128
+ "STORYBOOK_",
57129
+ "VITE_",
57130
+ "PUBLIC_",
57131
+ "EXPO_PUBLIC_",
57132
+ "NG_APP_",
57133
+ "REDWOOD_ENV_"
57134
+ ];
57135
+ var PUBLIC_PREFIXES = [
57136
+ .../* @__PURE__ */ new Set([
57137
+ ...API_PUBLIC_PREFIXES,
57138
+ ...import_frameworks2.frameworkList.map((f) => f.envPrefix).filter((prefix) => !!prefix)
57139
+ ])
57140
+ ];
57141
+ function hasOnlyWhitespaceWarnings(warnings) {
57142
+ return warnings.length > 0 && warnings.every(
57143
+ (w) => w.message === "starts with whitespace" || w.message === "ends with whitespace"
57144
+ );
57145
+ }
57146
+ function trimValue(value) {
57147
+ return value.replace(/\n$/, "").trim();
57148
+ }
57149
+ function normalizeStdinEnvValue(value) {
57150
+ let valueWithoutTrailingNewline = value;
57151
+ if (value.endsWith("\r\n")) {
57152
+ valueWithoutTrailingNewline = value.slice(0, -2);
57153
+ } else if (value.endsWith("\n")) {
57154
+ valueWithoutTrailingNewline = value.slice(0, -1);
57155
+ } else {
57156
+ return {
57157
+ value,
57158
+ strippedTrailingNewline: false
57159
+ };
57160
+ }
57161
+ if (valueWithoutTrailingNewline.includes("\n") || valueWithoutTrailingNewline.includes("\r")) {
57162
+ return {
57163
+ value,
57164
+ strippedTrailingNewline: false
57165
+ };
57166
+ }
57167
+ return {
57168
+ value: valueWithoutTrailingNewline,
57169
+ strippedTrailingNewline: true
57170
+ };
57171
+ }
57172
+ function getPublicPrefix(key) {
57173
+ const upperKey = key.toUpperCase();
57174
+ return PUBLIC_PREFIXES.find((p) => upperKey.startsWith(p)) || null;
57175
+ }
57176
+ function getFrameworkPublicPrefix(frameworkSlug, key) {
57177
+ const prefix = import_frameworks2.frameworkList.find(
57178
+ (framework) => framework.slug === frameworkSlug
57179
+ )?.envPrefix;
57180
+ return prefix && key.toUpperCase().startsWith(prefix.toUpperCase()) ? prefix : null;
57181
+ }
57182
+ function getApiPublicPrefix(key) {
57183
+ const upperKey = key.toUpperCase();
57184
+ return API_PUBLIC_PREFIXES.find((prefix) => upperKey.startsWith(prefix)) ?? null;
57185
+ }
57186
+ function parseSvelteKitPublicEnvVarPrefix(config) {
57187
+ if (!config.includes("publicPrefix")) {
57188
+ return { status: "ready", prefix: null };
57189
+ }
57190
+ const match = /publicPrefix:\s*(?:'(?<single>[^']*)'|"(?<double>[^"]*)"|`(?<template>[^`$]*)`)/.exec(
57191
+ config
57192
+ );
57193
+ const prefix = match?.groups?.single ?? match?.groups?.double ?? match?.groups?.template;
57194
+ return prefix === void 0 ? { status: "unavailable" } : { status: "ready", prefix };
57195
+ }
57196
+ async function getLocalSvelteKitPublicPrefixes(cwd, rootDirectory) {
57197
+ const projectRoot = rootDirectory ? join6(cwd, rootDirectory) : cwd;
57198
+ let config;
57199
+ try {
57200
+ config = await readFile3(join6(projectRoot, "svelte.config.js"), "utf8");
57201
+ } catch {
57202
+ return void 0;
57203
+ }
57204
+ const parsed = parseSvelteKitPublicEnvVarPrefix(config);
57205
+ if (parsed.status === "unavailable")
57206
+ return void 0;
57207
+ return [parsed.prefix ?? "PUBLIC_", "VITE_"];
57208
+ }
57209
+ function removePublicPrefix(key) {
57210
+ const prefix = getPublicPrefix(key);
57211
+ if (!prefix)
57212
+ return key;
57213
+ return key.slice(prefix.length);
57214
+ }
57215
+ async function validateEnvValue(opts) {
57216
+ let finalValue = opts.initialValue;
57217
+ let alreadyConfirmed = false;
57218
+ if (!opts.skipConfirm) {
57219
+ let valueAccepted = false;
57220
+ while (!valueAccepted) {
57221
+ const valueWarnings = getEnvValueWarnings(finalValue);
57222
+ const warningMessage = formatWarnings(valueWarnings);
57223
+ if (!warningMessage) {
57224
+ valueAccepted = true;
57225
+ break;
57226
+ }
57227
+ opts.showWarning(warningMessage);
57228
+ const canTrim = hasOnlyWhitespaceWarnings(valueWarnings);
57229
+ const choices = canTrim ? [
57230
+ { name: "Leave as is", value: "c" },
57231
+ { name: "Re-enter", value: "r" },
57232
+ { name: "Trim whitespace", value: "t" }
57233
+ ] : [
57234
+ { name: "Leave as is", value: "c" },
57235
+ { name: "Re-enter", value: "r" }
57236
+ ];
57237
+ const action = await opts.selectAction(choices);
57238
+ if (action === "c") {
57239
+ valueAccepted = true;
57240
+ if (valueWarnings.some((w) => w.requiresConfirmation)) {
57241
+ alreadyConfirmed = true;
57242
+ }
57243
+ } else if (action === "t") {
57244
+ finalValue = trimValue(finalValue);
57245
+ opts.showLog("Trimmed whitespace");
57246
+ } else {
57247
+ finalValue = await opts.promptForValue();
57248
+ }
57249
+ }
57250
+ } else {
57251
+ const valueWarnings = getEnvValueWarnings(finalValue);
57252
+ const warningMessage = formatWarnings(valueWarnings);
57253
+ if (warningMessage) {
57254
+ opts.showWarning(warningMessage);
57255
+ }
57256
+ }
57257
+ return { finalValue, alreadyConfirmed };
57258
+ }
57259
+ function getEnvKeyWarnings(key) {
57260
+ const warnings = [];
57261
+ const matchingPrefix = getPublicPrefix(key);
57262
+ if (matchingPrefix) {
57263
+ const nameWithoutPrefix = key.slice(matchingPrefix.length);
57264
+ const sensitiveMatch = looksLikeSecret(nameWithoutPrefix) && getMatchingServerOnlyKey(nameWithoutPrefix);
57265
+ if (sensitiveMatch) {
57266
+ warnings.push({
57267
+ message: `\`${matchingPrefix}\` exposes \`${key}\` to anyone visiting your site`,
57268
+ requiresConfirmation: true
57269
+ });
57270
+ } else {
57271
+ warnings.push({
57272
+ message: `\`${matchingPrefix}\` exposes this value to anyone visiting your site`,
57273
+ requiresConfirmation: false
57274
+ });
57275
+ }
57276
+ }
57277
+ return warnings;
57278
+ }
57279
+
57280
+ // src/util/env/env-var-config-secret-ui.ts
57281
+ var ENV_VISIBILITY_DEPRECATION_MESSAGE = "`--visibility` is deprecated. Use `--type` instead.";
57282
+ function invalidTypeOptionError(optionName, value) {
57283
+ if (value === "config" || value === "secret") {
57284
+ return void 0;
57285
+ }
57286
+ if (value === "sensitive") {
57287
+ return `The \`${optionName}\` flag accepts \`config\` or \`secret\`. Use \`--type secret\` or the legacy \`--sensitive\` flag.`;
57288
+ }
57289
+ if (value === "plain" || value === "encrypted") {
57290
+ return `The \`${optionName}\` flag accepts \`config\` or \`secret\`. Use \`--type config\` for readable values.`;
57291
+ }
57292
+ return `The \`${optionName}\` flag must be either \`config\` or \`secret\`.`;
57293
+ }
57294
+ function resolveEnvVarTypeOption(options) {
57295
+ const usedDeprecatedVisibility = options.visibility !== void 0;
57296
+ if (options.type !== void 0) {
57297
+ const error = invalidTypeOptionError("--type", options.type);
57298
+ if (error) {
57299
+ return {
57300
+ usedDeprecatedVisibility,
57301
+ error,
57302
+ errorReason: "invalid_type"
57303
+ };
57304
+ }
57305
+ }
57306
+ if (options.visibility !== void 0) {
57307
+ const error = invalidTypeOptionError("--visibility", options.visibility);
57308
+ if (error) {
57309
+ return {
57310
+ usedDeprecatedVisibility,
57311
+ error,
57312
+ errorReason: "invalid_visibility"
57313
+ };
57314
+ }
57315
+ }
57316
+ if (options.type !== void 0 && options.visibility !== void 0 && options.type !== options.visibility) {
57317
+ return {
57318
+ usedDeprecatedVisibility,
57319
+ error: `\`--type ${options.type}\` conflicts with \`--visibility ${options.visibility}\`. \`--visibility\` is a deprecated alias of \`--type\`; remove it.`,
57320
+ errorReason: "conflicting_type_visibility"
57321
+ };
57322
+ }
57323
+ if (options.type !== void 0) {
57324
+ return {
57325
+ explicitVisibility: options.type,
57326
+ source: "type",
57327
+ usedDeprecatedVisibility
57328
+ };
57329
+ }
57330
+ if (options.visibility !== void 0) {
57331
+ return {
57332
+ explicitVisibility: options.visibility,
57333
+ source: "visibility",
57334
+ usedDeprecatedVisibility
57335
+ };
57336
+ }
57337
+ return { usedDeprecatedVisibility };
57338
+ }
57339
+ function isSecretEnvVar(env) {
57340
+ return env.type === "sensitive" || env.visibility === "secret";
57341
+ }
57342
+ function formatVisibilityLabel(visibility, type) {
57343
+ const resolved = visibility ?? visibilityFromEnvType(type);
57344
+ if (resolved === "config") {
57345
+ return "Config";
57346
+ }
57347
+ if (resolved === "secret") {
57348
+ return "Secret";
57349
+ }
57350
+ return void 0;
57351
+ }
57352
+ function visibilityFromEnvType(type) {
57353
+ if (type === "sensitive") {
57354
+ return "secret";
57355
+ }
57356
+ if (type === "plain" || type === "encrypted") {
57357
+ return "config";
57358
+ }
57359
+ return void 0;
57360
+ }
57361
+ function hasNonDevelopmentTarget(envTargets) {
57362
+ return envTargets.some((target) => target !== "development");
57363
+ }
57364
+ function getPublicPrefixSecretVisibilityError(key, options) {
57365
+ const publicPrefix = getApiPublicPrefix(key);
57366
+ if (!publicPrefix) {
57367
+ return null;
57368
+ }
57369
+ const wouldBeSecret = options.visibility === "secret" || options.type === "sensitive";
57370
+ if (!wouldBeSecret) {
57371
+ return null;
57372
+ }
57373
+ const privateKey = key.slice(publicPrefix.length);
57374
+ if (options.context === "update") {
57375
+ return `\`${publicPrefix}\` exposes this value to anyone visiting your site, so \`${key}\` cannot be a Secret. To keep it private, add \`${privateKey}\` as a Secret, then remove \`${key}\`. If the value is safe to expose, keep it as Config.`;
57376
+ }
57377
+ return `\`${publicPrefix}\` exposes this value to anyone visiting your site, so \`${key}\` cannot be a Secret. To keep it private, rename the variable to \`${privateKey}\` and keep the Secret type. If the value is safe to expose, use \`--type config\`.`;
57378
+ }
57379
+ function shouldOmitInferredVisibility(key, envTargets, teamSensitivePolicyOn) {
57380
+ if (!getApiPublicPrefix(key)) {
57381
+ return false;
57382
+ }
57383
+ if (!hasNonDevelopmentTarget(envTargets)) {
57384
+ return false;
57385
+ }
57386
+ return teamSensitivePolicyOn;
57387
+ }
57388
+ function resolveEnvVarVisibility(options) {
57389
+ if (options.explicitVisibility !== void 0) {
57390
+ if (options.explicitVisibility !== "config" && options.explicitVisibility !== "secret") {
57391
+ const optionName = options.explicitOptionSource === "visibility" ? "--visibility" : "--type";
57392
+ return {
57393
+ error: options.explicitVisibility === "sensitive" ? `The \`${optionName}\` flag accepts \`config\` or \`secret\`. Use \`--type secret\` or the legacy \`--sensitive\` flag.` : options.explicitVisibility === "plain" || options.explicitVisibility === "encrypted" ? `The \`${optionName}\` flag accepts \`config\` or \`secret\`. Use \`--type config\` for readable values.` : `The \`${optionName}\` flag must be either \`config\` or \`secret\`.`
57394
+ };
57395
+ }
57396
+ const publicPrefixError2 = getPublicPrefixSecretVisibilityError(
57397
+ options.key,
57398
+ {
57399
+ visibility: options.explicitVisibility,
57400
+ type: options.type,
57401
+ context: options.context
57402
+ }
57403
+ );
57404
+ if (publicPrefixError2) {
57405
+ return { error: publicPrefixError2 };
57406
+ }
57407
+ return { visibility: options.explicitVisibility };
57408
+ }
57409
+ const inferred = visibilityFromEnvType(options.type);
57410
+ if (inferred === void 0) {
57411
+ return {};
57412
+ }
57413
+ if (shouldOmitInferredVisibility(
57414
+ options.key,
57415
+ options.envTargets,
57416
+ options.teamSensitivePolicyOn
57417
+ )) {
57418
+ return {};
57419
+ }
57420
+ const publicPrefixError = getPublicPrefixSecretVisibilityError(options.key, {
57421
+ visibility: inferred,
57422
+ type: options.type,
57423
+ context: options.context
57424
+ });
57425
+ if (publicPrefixError) {
57426
+ return { error: publicPrefixError };
57427
+ }
57428
+ return { visibility: inferred };
57429
+ }
57430
+
57431
+ // src/util/env/secret-read-guidance.ts
57432
+ function getUnavailableSecretValuesMessage(environment, count) {
57433
+ const values = count === 1 ? "value" : "values";
57434
+ if (environment === "development") {
57435
+ return `${count} Development Secret ${values} ${count === 1 ? "was" : "were"} not returned by Vercel.`;
57436
+ }
57437
+ return `${count} Secret ${values} cannot be pulled from the \`${environment}\` Environment.`;
57438
+ }
57439
+ function getLocalSecretFallbackMessage(count) {
57440
+ return ` Define ${count === 1 ? "it" : "them"} in a local .env file.`;
57441
+ }
56829
57442
 
56830
57443
  // src/util/env/update-oidc-token-contents.ts
56831
57444
  var CONTENTS_HEADER = "# Created by Vercel CLI";
@@ -56863,9 +57476,9 @@ function escapeValue(value) {
56863
57476
  var import_error_utils3 = __toESM(require_dist(), 1);
56864
57477
 
56865
57478
  // src/util/link/setup-and-link.ts
56866
- var import_fs_extra7 = __toESM(require_lib2(), 1);
56867
- var import_fs_detectors5 = __toESM(require_dist3(), 1);
56868
- import { join as join10, basename as basename3 } from "path";
57479
+ var import_fs_extra7 = __toESM(require_lib(), 1);
57480
+ var import_fs_detectors5 = __toESM(require_dist2(), 1);
57481
+ import { join as join11, basename as basename3 } from "path";
56869
57482
  import { getPlatformEnv as getPlatformEnv2 } from "@vercel/build-utils";
56870
57483
 
56871
57484
  // src/util/input/input-project.ts
@@ -57183,7 +57796,7 @@ async function inputProject(client, org, detectedProjectName, autoConfirm = fals
57183
57796
  }
57184
57797
 
57185
57798
  // src/util/validate-paths.ts
57186
- var import_fs_extra5 = __toESM(require_lib2(), 1);
57799
+ var import_fs_extra5 = __toESM(require_lib(), 1);
57187
57800
  var import_chalk13 = __toESM(require_source(), 1);
57188
57801
  import { homedir as homedir3 } from "os";
57189
57802
  import { resolve as resolve4, sep } from "path";
@@ -57286,7 +57899,7 @@ async function inputRootDirectory(client, cwd, autoConfirm = false) {
57286
57899
 
57287
57900
  // src/util/input/edit-project-settings.ts
57288
57901
  var import_chalk15 = __toESM(require_source(), 1);
57289
- var import_frameworks2 = __toESM(require_frameworks(), 1);
57902
+ var import_frameworks3 = __toESM(require_frameworks(), 1);
57290
57903
 
57291
57904
  // src/util/is-setting-value.ts
57292
57905
  function isSettingValue(setting) {
@@ -57336,7 +57949,7 @@ async function editProjectSettings(client, projectSettings, framework, autoConfi
57336
57949
  }
57337
57950
  }
57338
57951
  if (localConfigurationOverrides.framework) {
57339
- const overrideFramework = import_frameworks2.frameworkList.find(
57952
+ const overrideFramework = import_frameworks3.frameworkList.find(
57340
57953
  (f) => f.slug === localConfigurationOverrides.framework
57341
57954
  );
57342
57955
  if (overrideFramework) {
@@ -57412,7 +58025,7 @@ async function editProjectSettings(client, projectSettings, framework, autoConfi
57412
58025
  }
57413
58026
 
57414
58027
  // src/util/read-json-file.ts
57415
- var import_fs_extra6 = __toESM(require_lib2(), 1);
58028
+ var import_fs_extra6 = __toESM(require_lib(), 1);
57416
58029
  var import_json_parse_better_errors = __toESM(require_json_parse_better_errors(), 1);
57417
58030
  var import_error_utils2 = __toESM(require_dist(), 1);
57418
58031
  async function readJSONFile(file) {
@@ -57495,7 +58108,7 @@ async function readConfig(dir) {
57495
58108
  }
57496
58109
 
57497
58110
  // src/util/link/setup-and-link.ts
57498
- var import_frameworks4 = __toESM(require_frameworks(), 1);
58111
+ var import_frameworks5 = __toESM(require_frameworks(), 1);
57499
58112
 
57500
58113
  // src/util/input/vercel-auth.ts
57501
58114
  var import_chalk16 = __toESM(require_source(), 1);
@@ -57530,17 +58143,17 @@ async function vercelAuth(client, {
57530
58143
  }
57531
58144
 
57532
58145
  // src/util/link/services-setup.ts
57533
- var import_fs_detectors4 = __toESM(require_dist3(), 1);
57534
- var import_service_topology2 = __toESM(require_dist7(), 1);
58146
+ var import_fs_detectors4 = __toESM(require_dist2(), 1);
58147
+ var import_service_topology2 = __toESM(require_dist6(), 1);
57535
58148
  import {
57536
58149
  isExperimentalService as isExperimentalService2,
57537
58150
  isExperimentalServiceV2 as isExperimentalServiceV23,
57538
58151
  normalizePath as normalizePath4
57539
58152
  } from "@vercel/build-utils";
57540
- import { join as join8, relative as relative2 } from "path";
58153
+ import { join as join9, relative as relative2 } from "path";
57541
58154
 
57542
58155
  // src/util/input/display-services.ts
57543
- var import_frameworks3 = __toESM(require_frameworks(), 1);
58156
+ var import_frameworks4 = __toESM(require_frameworks(), 1);
57544
58157
  import {
57545
58158
  getServiceQueueTopics,
57546
58159
  isExperimentalServiceV2 as isExperimentalServiceV22,
@@ -57549,7 +58162,7 @@ import {
57549
58162
  isWorkflowTriggeredService
57550
58163
  } from "@vercel/build-utils";
57551
58164
  var chalk17 = require_source();
57552
- var frameworksBySlug = new Map(import_frameworks3.frameworkList.map((f) => [f.slug, f]));
58165
+ var frameworksBySlug = new Map(import_frameworks4.frameworkList.map((f) => [f.slug, f]));
57553
58166
  var frameworkColors = {
57554
58167
  // JavaScript/TypeScript frameworks
57555
58168
  nextjs: chalk17.white,
@@ -57687,16 +58300,16 @@ function displayServiceErrors(errors) {
57687
58300
  }
57688
58301
 
57689
58302
  // src/util/projects/detect-services.ts
57690
- var import_fs_detectors3 = __toESM(require_dist3(), 1);
57691
- var import_service_topology = __toESM(require_dist7(), 1);
57692
- import { readFile as readFile3, writeFile as writeFile2 } from "fs/promises";
57693
- import { basename as basename2, join as join7 } from "path";
58303
+ var import_fs_detectors3 = __toESM(require_dist2(), 1);
58304
+ var import_service_topology = __toESM(require_dist6(), 1);
58305
+ import { readFile as readFile4, writeFile as writeFile2 } from "fs/promises";
58306
+ import { basename as basename2, join as join8 } from "path";
57694
58307
  import { parse as tomlParse, stringify as tomlStringify } from "smol-toml";
57695
58308
 
57696
58309
  // src/util/validate-config.ts
57697
- var import_routing_utils = __toESM(require_dist6(), 1);
57698
- var import_client = __toESM(require_dist8(), 1);
57699
- var import_fs_detectors2 = __toESM(require_dist3(), 1);
58310
+ var import_routing_utils = __toESM(require_dist5(), 1);
58311
+ var import_client = __toESM(require_dist7(), 1);
58312
+ var import_fs_detectors2 = __toESM(require_dist2(), 1);
57700
58313
  import {
57701
58314
  getFunctionsSchema,
57702
58315
  buildsSchema,
@@ -58408,7 +59021,7 @@ function validateConfig(config) {
58408
59021
  }
58409
59022
 
58410
59023
  // src/util/projects/detect-entrypoint.ts
58411
- import { join as join6 } from "path";
59024
+ import { join as join7 } from "path";
58412
59025
  import {
58413
59026
  isPythonFramework,
58414
59027
  isNodeBackendFramework,
@@ -58416,7 +59029,7 @@ import {
58416
59029
  } from "@vercel/build-utils";
58417
59030
  function createDetectEntrypoint(projectRoot) {
58418
59031
  return async ({ workPath, framework }) => {
58419
- const absWorkPath = normalizePath3(join6(projectRoot, workPath));
59032
+ const absWorkPath = normalizePath3(join7(projectRoot, workPath));
58420
59033
  let builderName;
58421
59034
  if (isPythonFramework(framework)) {
58422
59035
  builderName = "@vercel/python";
@@ -58446,7 +59059,7 @@ function createDetectEntrypoint(projectRoot) {
58446
59059
  };
58447
59060
  }
58448
59061
  async function loadBuilderDetectEntrypoint(name, projectRoot) {
58449
- const { importBuilders } = await import("./import-builders-3H7J2SEK.js");
59062
+ const { importBuilders } = await import("./import-builders-W3YE2V6A.js");
58450
59063
  const builders = await importBuilders(/* @__PURE__ */ new Set([name]), projectRoot);
58451
59064
  const loaded = builders.get(name);
58452
59065
  if (!loaded) {
@@ -58525,9 +59138,9 @@ function toProjectServicesConfigPatch(config) {
58525
59138
  }
58526
59139
  async function prepareServicesConfigWrite(cwd, config) {
58527
59140
  const compileResult = await compileVercelConfig(cwd);
58528
- const configPath = join7(cwd, "vercel.json");
59141
+ const configPath = join8(cwd, "vercel.json");
58529
59142
  if (compileResult.sourceFile === "vercel.toml") {
58530
- return prepareTomlServicesConfigWrite(join7(cwd, "vercel.toml"), config);
59143
+ return prepareTomlServicesConfigWrite(join8(cwd, "vercel.toml"), config);
58531
59144
  }
58532
59145
  if (compileResult.wasCompiled) {
58533
59146
  throw new Error(
@@ -58568,7 +59181,7 @@ async function prepareTomlServicesConfigWrite(configPath, config) {
58568
59181
  const patchKeys = Object.keys(patch);
58569
59182
  let existingContent;
58570
59183
  try {
58571
- existingContent = await readFile3(configPath, "utf8");
59184
+ existingContent = await readFile4(configPath, "utf8");
58572
59185
  } catch {
58573
59186
  existingContent = "";
58574
59187
  }
@@ -58706,7 +59319,7 @@ async function promptForInferredServicesSetup({
58706
59319
  const serviceRoot = isExperimentalServiceV23(service) ? service.root : service.workspace;
58707
59320
  choice = {
58708
59321
  type: "single-app",
58709
- selectedPath: serviceRoot === "." ? workPath : join8(workPath, serviceRoot)
59322
+ selectedPath: serviceRoot === "." ? workPath : join9(workPath, serviceRoot)
58710
59323
  };
58711
59324
  }
58712
59325
  }
@@ -58725,7 +59338,7 @@ async function promptForInferredServicesSetup({
58725
59338
 
58726
59339
  // src/util/projects/search-project-across-teams.ts
58727
59340
  var import_slugify3 = __toESM(require_slugify(), 1);
58728
- import { join as join9, relative as relative3 } from "path";
59341
+ import { join as join10, relative as relative3 } from "path";
58729
59342
  async function searchProjectsByRepoRoot({
58730
59343
  client,
58731
59344
  cwd,
@@ -58738,7 +59351,7 @@ async function searchProjectsByRepoRoot({
58738
59351
  if (!rootPath) {
58739
59352
  return empty;
58740
59353
  }
58741
- const gitConfigPath = getGitConfigPath({ cwd: rootPath }) ?? join9(rootPath, ".git/config");
59354
+ const gitConfigPath = getGitConfigPath({ cwd: rootPath }) ?? join10(rootPath, ".git/config");
58742
59355
  const remoteUrls = await getRemoteUrls(gitConfigPath);
58743
59356
  const remoteNames = remoteUrls ? Object.keys(remoteUrls).sort() : [];
58744
59357
  let remote;
@@ -58996,8 +59609,8 @@ async function setupAndLink(client, path3, {
58996
59609
  }
58997
59610
  if (forceDelete) {
58998
59611
  const vercelDir = getVercelDirectory(path3);
58999
- (0, import_fs_extra7.remove)(join10(vercelDir, VERCEL_DIR_README));
59000
- (0, import_fs_extra7.remove)(join10(vercelDir, VERCEL_DIR_PROJECT));
59612
+ (0, import_fs_extra7.remove)(join11(vercelDir, VERCEL_DIR_README));
59613
+ (0, import_fs_extra7.remove)(join11(vercelDir, VERCEL_DIR_PROJECT));
59001
59614
  }
59002
59615
  output_manager_default.print("\n");
59003
59616
  printAlignedLabel("Directory", humanizePath(path3));
@@ -59167,7 +59780,7 @@ async function setupAndLink(client, path3, {
59167
59780
  });
59168
59781
  if (shouldPromptRoot) {
59169
59782
  rootDirectory = await inputRootDirectory(client, path3, autoConfirm);
59170
- if (rootDirectory && !await validateRootDirectory(path3, join10(path3, rootDirectory))) {
59783
+ if (rootDirectory && !await validateRootDirectory(path3, join11(path3, rootDirectory))) {
59171
59784
  return {
59172
59785
  status: "error",
59173
59786
  exitCode: 1,
@@ -59176,7 +59789,7 @@ async function setupAndLink(client, path3, {
59176
59789
  }
59177
59790
  }
59178
59791
  }
59179
- pathWithRootDirectory = rootDirectory ? join10(path3, rootDirectory) : path3;
59792
+ pathWithRootDirectory = rootDirectory ? join11(path3, rootDirectory) : path3;
59180
59793
  const selectedRootServicesSetup = pathWithRootDirectory === path3 ? null : await getServicesSetupState(pathWithRootDirectory);
59181
59794
  let selectedRootInferredServicesChoice = null;
59182
59795
  if (!skipSelectedRootInferredServicesPrompt) {
@@ -59203,7 +59816,7 @@ async function setupAndLink(client, path3, {
59203
59816
  path3,
59204
59817
  selectedRootInferredServicesChoice.selectedPath
59205
59818
  );
59206
- pathWithRootDirectory = rootDirectory ? join10(path3, rootDirectory) : path3;
59819
+ pathWithRootDirectory = rootDirectory ? join11(path3, rootDirectory) : path3;
59207
59820
  }
59208
59821
  const localConfig = await readConfig(pathWithRootDirectory);
59209
59822
  if (localConfig instanceof CantParseJSONFile) {
@@ -59224,7 +59837,7 @@ async function setupAndLink(client, path3, {
59224
59837
  pathWithRootDirectory
59225
59838
  );
59226
59839
  const detectedProjects = detectedProjectsForWorkspace.get("") || [];
59227
- const framework = detectedProjects[0] ?? import_frameworks4.frameworkList.find((f) => f.slug === null);
59840
+ const framework = detectedProjects[0] ?? import_frameworks5.frameworkList.find((f) => f.slug === null);
59228
59841
  settings = await editProjectSettings(
59229
59842
  client,
59230
59843
  {},
@@ -59274,7 +59887,12 @@ async function setupAndLink(client, path3, {
59274
59887
  autoConfirm,
59275
59888
  org
59276
59889
  );
59277
- return { status: "linked", org, project };
59890
+ return {
59891
+ status: "linked",
59892
+ org,
59893
+ project,
59894
+ ...gitConnectIntent?.offered && { gitConnectOffered: true }
59895
+ };
59278
59896
  } catch (err) {
59279
59897
  if (isPromptCanceledError(err)) {
59280
59898
  throw err;
@@ -59292,7 +59910,8 @@ async function setupAndLink(client, path3, {
59292
59910
  }
59293
59911
  async function resolveGitConnectIntent(client, path3, autoConfirm) {
59294
59912
  try {
59295
- const gitConfig = await parseGitConfig(join10(path3, ".git/config"));
59913
+ const gitConfigPath = getGitConfigPath({ cwd: path3 }) ?? join11(path3, ".git/config");
59914
+ const gitConfig = await parseGitConfig(gitConfigPath);
59296
59915
  if (!gitConfig) {
59297
59916
  return null;
59298
59917
  }
@@ -59301,15 +59920,18 @@ async function resolveGitConnectIntent(client, path3, autoConfirm) {
59301
59920
  return null;
59302
59921
  }
59303
59922
  const skipPrompts = autoConfirm || client.nonInteractive;
59304
- const shouldConnect = skipPrompts || await client.input.confirm(`Connect detected Git repository?`, false);
59923
+ const shouldConnect = skipPrompts || await client.input.confirm(
59924
+ `Connect this Git repository to automatically deploy changes on every push?`,
59925
+ false
59926
+ );
59305
59927
  if (!shouldConnect) {
59306
- return null;
59928
+ return { offered: true };
59307
59929
  }
59308
59930
  const repoInfo = skipPrompts ? parseRepoUrl(remoteUrls.origin ?? Object.values(remoteUrls)[0]) : await selectAndParseRemoteUrl(client, remoteUrls);
59309
59931
  if (!repoInfo) {
59310
59932
  return null;
59311
59933
  }
59312
- return { repoInfo };
59934
+ return { repoInfo, offered: !skipPrompts };
59313
59935
  } catch (error) {
59314
59936
  if (isPromptCanceledError(error)) {
59315
59937
  throw error;
@@ -59319,7 +59941,7 @@ async function resolveGitConnectIntent(client, path3, autoConfirm) {
59319
59941
  }
59320
59942
  }
59321
59943
  async function applyGitConnectIntent(client, intent, project, autoConfirm, org) {
59322
- if (!intent) {
59944
+ if (!intent?.repoInfo) {
59323
59945
  return;
59324
59946
  }
59325
59947
  const { repoInfo } = intent;
@@ -59346,9 +59968,9 @@ async function applyGitConnectIntent(client, intent, project, autoConfirm, org)
59346
59968
 
59347
59969
  // src/util/projects/find-project-root.ts
59348
59970
  var import_chalk17 = __toESM(require_source(), 1);
59349
- var import_fs_extra8 = __toESM(require_lib2(), 1);
59971
+ var import_fs_extra8 = __toESM(require_lib(), 1);
59350
59972
  import { stat } from "fs/promises";
59351
- import { join as join11, dirname } from "path";
59973
+ import { join as join12, dirname } from "path";
59352
59974
  async function findProjectRoot(startDir) {
59353
59975
  let cwdDev;
59354
59976
  try {
@@ -59365,10 +59987,10 @@ async function findProjectRoot(startDir) {
59365
59987
  } catch {
59366
59988
  return null;
59367
59989
  }
59368
- const hasVercelDir = await (0, import_fs_extra8.pathExists)(join11(dir, ".vercel"));
59369
- const hasVercelJson = await (0, import_fs_extra8.pathExists)(join11(dir, "vercel.json"));
59370
- const hasVercelToml = await (0, import_fs_extra8.pathExists)(join11(dir, "vercel.toml"));
59371
- const hasGit = await (0, import_fs_extra8.pathExists)(join11(dir, ".git"));
59990
+ const hasVercelDir = await (0, import_fs_extra8.pathExists)(join12(dir, ".vercel"));
59991
+ const hasVercelJson = await (0, import_fs_extra8.pathExists)(join12(dir, "vercel.json"));
59992
+ const hasVercelToml = await (0, import_fs_extra8.pathExists)(join12(dir, "vercel.toml"));
59993
+ const hasGit = await (0, import_fs_extra8.pathExists)(join12(dir, ".git"));
59372
59994
  if (hasVercelDir || hasVercelJson || hasVercelToml || hasGit) {
59373
59995
  return dir;
59374
59996
  }
@@ -59811,422 +60433,6 @@ var EnvPullTelemetryClient = class extends TelemetryClient {
59811
60433
  }
59812
60434
  };
59813
60435
 
59814
- // src/util/env/env-target.ts
59815
- var import_constants2 = __toESM(require_dist2(), 1);
59816
- var import_title = __toESM(require_lib(), 1);
59817
- var envTargetChoices = import_constants2.PROJECT_ENV_TARGET.map((t) => ({
59818
- name: (0, import_title.default)(t),
59819
- value: t
59820
- }));
59821
- function isValidEnvTarget(target) {
59822
- return typeof target === "undefined" || envTargetChoices.map((c) => c.value).includes(target);
59823
- }
59824
- function getEnvTargetPlaceholder() {
59825
- return `<${envTargetChoices.map((c) => c.value).join(" | ")}>`;
59826
- }
59827
- function parseEnvTargetArg(arg) {
59828
- return Array.from(
59829
- new Set(
59830
- arg.split(",").map((t) => t.trim()).filter(Boolean)
59831
- )
59832
- );
59833
- }
59834
-
59835
- // src/commands/env/command.ts
59836
- var targetPlaceholder = getEnvTargetPlaceholder();
59837
- var listSubcommand = {
59838
- name: "list",
59839
- aliases: ["ls"],
59840
- description: "List all Environment Variables for a Project",
59841
- arguments: [
59842
- {
59843
- name: "environment",
59844
- required: false
59845
- },
59846
- {
59847
- name: "git-branch",
59848
- required: false
59849
- }
59850
- ],
59851
- options: [
59852
- formatOption,
59853
- jsonOption,
59854
- projectOption,
59855
- {
59856
- name: "guidance",
59857
- description: "Receive command suggestions once command is complete",
59858
- shorthand: null,
59859
- type: Boolean,
59860
- deprecated: false
59861
- }
59862
- ],
59863
- examples: []
59864
- };
59865
- var addSubcommand = {
59866
- name: "add",
59867
- aliases: [],
59868
- description: "Add an Environment Variable",
59869
- arguments: [
59870
- {
59871
- name: "name",
59872
- required: true
59873
- },
59874
- {
59875
- name: "environment",
59876
- required: false
59877
- }
59878
- ],
59879
- options: [
59880
- projectOption,
59881
- {
59882
- name: "git-branch",
59883
- description: "Set the Git branch for a Preview Environment Variable",
59884
- shorthand: null,
59885
- type: String,
59886
- argument: "NAME",
59887
- deprecated: false
59888
- },
59889
- {
59890
- name: "sensitive",
59891
- description: "Store the value as sensitive for Production or Preview",
59892
- shorthand: null,
59893
- type: Boolean,
59894
- deprecated: false
59895
- },
59896
- {
59897
- name: "no-sensitive",
59898
- description: "Store the value as non-sensitive when policy allows",
59899
- shorthand: null,
59900
- type: Boolean,
59901
- deprecated: false
59902
- },
59903
- {
59904
- name: "visibility",
59905
- description: "Set config/secret visibility (`config` or `secret`). Inferred from type when omitted",
59906
- shorthand: null,
59907
- type: String,
59908
- argument: "VISIBILITY",
59909
- deprecated: false
59910
- },
59911
- {
59912
- ...forceOption,
59913
- description: "Overwrite an existing variable for the same target",
59914
- shorthand: null
59915
- },
59916
- {
59917
- ...yesOption,
59918
- description: "Accept default choices when adding an Environment Variable"
59919
- },
59920
- {
59921
- name: "guidance",
59922
- description: "Show command suggestions after completion",
59923
- shorthand: null,
59924
- type: Boolean,
59925
- deprecated: false
59926
- },
59927
- {
59928
- name: "value",
59929
- description: "Set the variable value for non-interactive use; otherwise use stdin or the prompt",
59930
- shorthand: null,
59931
- type: String,
59932
- argument: "VALUE",
59933
- deprecated: false
59934
- }
59935
- ],
59936
- examples: [
59937
- {
59938
- name: "Add a new variable (prompts for value and Environments)",
59939
- value: [
59940
- `${packageName} env add <name>`,
59941
- `${packageName} env add API_TOKEN`
59942
- ]
59943
- },
59944
- {
59945
- name: "Add a new Environment Variable to a specific Environment",
59946
- value: [
59947
- `${packageName} env add <name> ${targetPlaceholder}`,
59948
- `${packageName} env add DB_PASS production`
59949
- ]
59950
- },
59951
- {
59952
- name: "Add one variable to multiple Environments (comma-separated)",
59953
- value: [
59954
- `${packageName} env add <name> <environment>[,<environment>]`,
59955
- `${packageName} env add API_URL production,preview,development`
59956
- ]
59957
- },
59958
- {
59959
- name: "Override an existing Environment Variable of same target (production, preview, deployment)",
59960
- value: `${packageName} env add API_TOKEN --force`
59961
- },
59962
- {
59963
- name: "Add a regular (non-sensitive) Environment Variable that remains readable later",
59964
- value: `${packageName} env add API_TOKEN --no-sensitive`
59965
- },
59966
- {
59967
- name: "Add a new Environment Variable for a specific Environment and Git Branch",
59968
- value: [
59969
- `${packageName} env add <name> ${targetPlaceholder} --git-branch <name>`,
59970
- `${packageName} env add DB_PASS preview --git-branch feat1`
59971
- ]
59972
- },
59973
- {
59974
- name: "Add a new Environment Variable from stdin",
59975
- value: [
59976
- `cat <file> | ${packageName} env add <name> ${targetPlaceholder}`,
59977
- `cat ~/.npmrc | ${packageName} env add NPM_RC preview`,
59978
- `${packageName} env add API_URL production < url.txt`
59979
- ]
59980
- },
59981
- {
59982
- name: "Add with --value for non-interactive use",
59983
- value: `${packageName} env add API_TOKEN production --value "<value>" --yes`
59984
- }
59985
- ]
59986
- };
59987
- var removeSubcommand = {
59988
- name: "remove",
59989
- aliases: ["rm"],
59990
- description: "Remove an Environment Variable (see examples below)",
59991
- arguments: [
59992
- {
59993
- name: "name",
59994
- required: true
59995
- },
59996
- {
59997
- name: "environment",
59998
- required: false
59999
- }
60000
- ],
60001
- options: [
60002
- projectOption,
60003
- {
60004
- ...yesOption,
60005
- description: "Skip the confirmation prompt when removing an Environment Variable"
60006
- }
60007
- ],
60008
- examples: [
60009
- {
60010
- name: "Remove a variable from multiple Environments",
60011
- value: [
60012
- `${packageName} env rm <name>`,
60013
- `${packageName} env rm API_TOKEN`
60014
- ]
60015
- },
60016
- {
60017
- name: "Remove a variable from a specific Environment",
60018
- value: [
60019
- `${packageName} env rm <name> ${targetPlaceholder}`,
60020
- `${packageName} env rm NPM_RC preview`
60021
- ]
60022
- },
60023
- {
60024
- name: "Remove a variable from a specific Environment and Git Branch",
60025
- value: [
60026
- `${packageName} env rm <name> ${targetPlaceholder} <gitbranch>`,
60027
- `${packageName} env rm NPM_RC preview feat1`
60028
- ]
60029
- }
60030
- ]
60031
- };
60032
- var pullSubcommand = {
60033
- name: "pull",
60034
- aliases: [],
60035
- description: "Pull all Development Environment Variables from the cloud and write to a file [.env.local]",
60036
- arguments: [
60037
- {
60038
- name: "filename",
60039
- required: false
60040
- }
60041
- ],
60042
- options: [
60043
- projectOption,
60044
- {
60045
- name: "environment",
60046
- description: "Set the Environment when pulling Environment Variables",
60047
- shorthand: null,
60048
- type: String,
60049
- argument: "TARGET",
60050
- deprecated: false
60051
- },
60052
- {
60053
- name: "git-branch",
60054
- description: "Specify the Git branch to pull specific Environment Variables for",
60055
- shorthand: null,
60056
- type: String,
60057
- argument: "NAME",
60058
- deprecated: false
60059
- },
60060
- {
60061
- name: "id",
60062
- description: "Pull environment variables for a specific deployment (e.g. dpl_xxx)",
60063
- shorthand: null,
60064
- type: String,
60065
- argument: "ID",
60066
- deprecated: false
60067
- },
60068
- {
60069
- ...yesOption,
60070
- description: "Skip the confirmation prompt when removing an environment variable"
60071
- }
60072
- ],
60073
- examples: [
60074
- {
60075
- name: "Pull all Development Environment Variables down from the cloud",
60076
- value: [
60077
- `${packageName} env pull <file>`,
60078
- `${packageName} env pull .env.development.local`
60079
- ]
60080
- },
60081
- {
60082
- name: "Pull environment variables for a specific deployment",
60083
- value: `${packageName} env pull --id dpl_xxx`
60084
- }
60085
- ]
60086
- };
60087
- var runSubcommand = {
60088
- name: "run",
60089
- aliases: [],
60090
- description: "Run a command with environment variables from the linked Vercel project",
60091
- arguments: [
60092
- {
60093
- name: "command",
60094
- required: true,
60095
- multiple: true
60096
- }
60097
- ],
60098
- options: [
60099
- projectOption,
60100
- {
60101
- name: "environment",
60102
- description: "Specify the environment to pull variables from (default: development)",
60103
- shorthand: "e",
60104
- type: String,
60105
- argument: "TARGET",
60106
- deprecated: false
60107
- },
60108
- {
60109
- name: "git-branch",
60110
- description: "Specify the Git branch to pull specific Environment Variables for",
60111
- shorthand: null,
60112
- type: String,
60113
- argument: "NAME",
60114
- deprecated: false
60115
- }
60116
- ],
60117
- examples: [
60118
- {
60119
- name: "Run Next.js dev server with development environment variables",
60120
- value: `${packageName} env run -- next dev`
60121
- },
60122
- {
60123
- name: "Run tests with preview environment variables for a specific branch",
60124
- value: `${packageName} env run -e preview --git-branch feature-x -- npm test`
60125
- }
60126
- ]
60127
- };
60128
- var updateSubcommand = {
60129
- name: "update",
60130
- aliases: [],
60131
- description: "Update the value of an existing Environment Variable (see examples below)",
60132
- arguments: [
60133
- {
60134
- name: "name",
60135
- required: true
60136
- },
60137
- {
60138
- name: "environment",
60139
- required: false
60140
- }
60141
- ],
60142
- options: [
60143
- projectOption,
60144
- {
60145
- name: "sensitive",
60146
- description: "Update to a sensitive Environment Variable",
60147
- shorthand: null,
60148
- type: Boolean,
60149
- deprecated: false
60150
- },
60151
- {
60152
- name: "visibility",
60153
- description: "Set config/secret visibility (`config` or `secret`). Inferred from type when omitted",
60154
- shorthand: null,
60155
- type: String,
60156
- argument: "VISIBILITY",
60157
- deprecated: false
60158
- },
60159
- {
60160
- ...yesOption,
60161
- description: "Skip the confirmation prompt when updating an Environment Variable"
60162
- },
60163
- {
60164
- name: "value",
60165
- description: "New value for the variable (non-interactive). Otherwise use stdin or you will be prompted.",
60166
- shorthand: null,
60167
- type: String,
60168
- argument: "VALUE",
60169
- deprecated: false
60170
- }
60171
- ],
60172
- examples: [
60173
- {
60174
- name: "Update a variable in all Environments",
60175
- value: [
60176
- `${packageName} env update <name>`,
60177
- `${packageName} env update API_TOKEN`
60178
- ]
60179
- },
60180
- {
60181
- name: "Update a variable in a specific Environment",
60182
- value: [
60183
- `${packageName} env update <name> ${targetPlaceholder}`,
60184
- `${packageName} env update DB_PASS production`
60185
- ]
60186
- },
60187
- {
60188
- name: "Update a variable for a specific Environment and Git Branch",
60189
- value: [
60190
- `${packageName} env update <name> ${targetPlaceholder} <gitbranch>`,
60191
- `${packageName} env update NPM_RC preview feat1`
60192
- ]
60193
- },
60194
- {
60195
- name: "Update a variable from stdin",
60196
- value: [
60197
- `cat <file> | ${packageName} env update <name> ${targetPlaceholder}`,
60198
- `cat ~/.npmrc | ${packageName} env update NPM_RC preview`,
60199
- `${packageName} env update API_URL production < url.txt`
60200
- ]
60201
- }
60202
- ]
60203
- };
60204
- var envCommand = {
60205
- name: "env",
60206
- aliases: [],
60207
- description: "Interact with Environment Variables for a Project",
60208
- arguments: [],
60209
- subcommands: [
60210
- addSubcommand,
60211
- listSubcommand,
60212
- pullSubcommand,
60213
- removeSubcommand,
60214
- runSubcommand,
60215
- updateSubcommand
60216
- ],
60217
- options: [],
60218
- examples: [
60219
- {
60220
- name: "Run a command with Environment Variables from the linked Project",
60221
- value: `${packageName} env run -- <command>`
60222
- },
60223
- {
60224
- name: "Add one variable to multiple Environments",
60225
- value: `${packageName} env add API_URL production,preview,development`
60226
- }
60227
- ]
60228
- };
60229
-
60230
60436
  // src/util/parse-target.ts
60231
60437
  function parseTarget({
60232
60438
  flagName,
@@ -60354,6 +60560,10 @@ async function getDeployment(client, contextName, hostOrId) {
60354
60560
 
60355
60561
  // src/commands/env/pull.ts
60356
60562
  var CONTENTS_PREFIX = "# Created by Vercel CLI\n";
60563
+ function printEnvPullWarning(message) {
60564
+ output_manager_default.print(`${import_chalk19.default.yellow("!")} ${message}
60565
+ `);
60566
+ }
60357
60567
  function readHeadSync(path3, length) {
60358
60568
  const buffer = Buffer.alloc(length);
60359
60569
  const fd = openSync(path3, "r");
@@ -60384,7 +60594,7 @@ var VARIABLES_TO_IGNORE = [
60384
60594
  "VERCEL_SPEED_INSIGHTS_ID",
60385
60595
  "VERCEL_WEB_ANALYTICS_ID"
60386
60596
  ];
60387
- var SENSITIVE_PLACEHOLDER = "[SENSITIVE]";
60597
+ var SENSITIVE_PLACEHOLDER = SENSITIVE_ENV_VALUE_PLACEHOLDER;
60388
60598
  async function getRedactedSensitiveKeys(client, projectId, source, target, gitBranch, records) {
60389
60599
  const emptyKeys = Object.keys(records).filter((key) => !records[key]);
60390
60600
  if (!projectId || emptyKeys.length === 0) {
@@ -60396,7 +60606,7 @@ async function getRedactedSensitiveKeys(client, projectId, source, target, gitBr
60396
60606
  gitBranch
60397
60607
  });
60398
60608
  const sensitiveKeys = new Set(
60399
- envs.filter((env) => env.type === "sensitive").map((env) => env.key)
60609
+ envs.filter(isSecretEnvVar).map((env) => env.key)
60400
60610
  );
60401
60611
  return new Set(emptyKeys.filter((key) => sensitiveKeys.has(key)));
60402
60612
  } catch {
@@ -60455,9 +60665,9 @@ async function pull(client, argv, source = "vercel-cli:env:pull", options = {})
60455
60665
  {
60456
60666
  status: "error",
60457
60667
  reason: "not_linked",
60458
- message: `Your codebase isn't linked to a project on Vercel. Run ${getCommandNamePlain(
60668
+ message: `Your codebase isn't linked to a project on Vercel. Run \`${getCommandNamePlain(
60459
60669
  "link"
60460
- )} to begin. Use --yes for non-interactive; use --scope or --project to specify team or project.`,
60670
+ )}\` to begin. Use \`--yes\` for non-interactive; use \`--scope\` or \`--project\` to specify team or project.`,
60461
60671
  next: [
60462
60672
  { command: buildCommandWithYes(linkArgv) },
60463
60673
  { command: buildCommandWithYes(client.argv) }
@@ -60576,6 +60786,9 @@ async function envPullCommandLogic(client, filename, skipConfirmation, environme
60576
60786
  let contents;
60577
60787
  let fileChanged = true;
60578
60788
  const keptLocalKeys = [];
60789
+ const preservedLocalSecretKeys = [];
60790
+ let redactedSecretCount = 0;
60791
+ let placeholderSecretCount = 0;
60579
60792
  if (oidcTokenOnly) {
60580
60793
  const existingContents = exists ? await (0, import_fs_extra9.readFile)(fullPath, "utf8") : "";
60581
60794
  contents = updateOidcTokenContents(
@@ -60592,9 +60805,17 @@ async function envPullCommandLogic(client, filename, skipConfirmation, environme
60592
60805
  gitBranch,
60593
60806
  records
60594
60807
  );
60808
+ redactedSecretCount = sensitiveKeys.size;
60595
60809
  const mergedRecords = { ...records };
60596
60810
  for (const key of sensitiveKeys) {
60597
- mergedRecords[key] = SENSITIVE_PLACEHOLDER;
60811
+ const localValue = oldEnv?.[key];
60812
+ if (localValue && localValue !== SENSITIVE_PLACEHOLDER) {
60813
+ mergedRecords[key] = localValue;
60814
+ preservedLocalSecretKeys.push(key);
60815
+ } else {
60816
+ mergedRecords[key] = SENSITIVE_PLACEHOLDER;
60817
+ placeholderSecretCount++;
60818
+ }
60598
60819
  }
60599
60820
  if (oldEnv) {
60600
60821
  for (const [key, value] of Object.entries(oldEnv)) {
@@ -60627,6 +60848,16 @@ async function envPullCommandLogic(client, filename, skipConfirmation, environme
60627
60848
  )} Environment)`
60628
60849
  );
60629
60850
  }
60851
+ if (redactedSecretCount > 0) {
60852
+ const preservedMessage = preservedLocalSecretKeys.length > 0 ? ` Kept ${preservedLocalSecretKeys.length} existing local ${preservedLocalSecretKeys.length === 1 ? "value" : "values"}.` : "";
60853
+ const placeholderMessage = placeholderSecretCount > 0 ? ` Wrote "${SENSITIVE_PLACEHOLDER}" ${placeholderSecretCount === 1 ? "as a placeholder" : "as placeholders"} for the remaining ${placeholderSecretCount === 1 ? "value" : "values"}; replace ${placeholderSecretCount === 1 ? "it" : "them"} with local-only values.` : "";
60854
+ printEnvPullWarning(
60855
+ `${getUnavailableSecretValuesMessage(
60856
+ environment,
60857
+ redactedSecretCount
60858
+ )}${preservedMessage}${placeholderMessage}`
60859
+ );
60860
+ }
60630
60861
  let isGitIgnoreUpdated = false;
60631
60862
  const fileExistsAfterPull = exists || contents.length > 0;
60632
60863
  if (filename === ".env.local" && fileExistsAfterPull) {
@@ -60653,7 +60884,7 @@ function escapeValue2(value) {
60653
60884
  }
60654
60885
 
60655
60886
  // src/util/projects/link.ts
60656
- var readFile5 = promisify(fs4.readFile);
60887
+ var readFile6 = promisify(fs4.readFile);
60657
60888
  var writeFile3 = promisify(fs4.writeFile);
60658
60889
  var VERCEL_DIR = ".vercel";
60659
60890
  var VERCEL_DIR_FALLBACK = ".now";
@@ -60688,7 +60919,7 @@ var linkSchema = {
60688
60919
  }
60689
60920
  };
60690
60921
  function getVercelDirectory(cwd) {
60691
- const possibleDirs = [join12(cwd, VERCEL_DIR), join12(cwd, VERCEL_DIR_FALLBACK)];
60922
+ const possibleDirs = [join13(cwd, VERCEL_DIR), join13(cwd, VERCEL_DIR_FALLBACK)];
60692
60923
  const existingDirs = possibleDirs.filter((d) => isDirectory(d));
60693
60924
  if (existingDirs.length > 1) {
60694
60925
  throw new NowBuildError2({
@@ -60781,7 +61012,7 @@ async function getProjectLinkFromRepoLink(client, path3, projectName, projectNam
60781
61012
  }
60782
61013
  async function getLinkFromDir(dir) {
60783
61014
  try {
60784
- const json = await readFile5(join12(dir, VERCEL_DIR_PROJECT), "utf8");
61015
+ const json = await readFile6(join13(dir, VERCEL_DIR_PROJECT), "utf8");
60785
61016
  const ajv = new import_ajv.default();
60786
61017
  const link = JSON.parse(json);
60787
61018
  if (!ajv.validate(linkSchema, link)) {
@@ -61045,7 +61276,7 @@ Upon creation, it will be automatically added to your ".gitignore" file.
61045
61276
  `;
61046
61277
  async function writeReadme(path3) {
61047
61278
  await writeFile3(
61048
- join12(path3, VERCEL_DIR, VERCEL_DIR_README),
61279
+ join13(path3, VERCEL_DIR, VERCEL_DIR_README),
61049
61280
  VERCEL_DIR_README_CONTENT
61050
61281
  );
61051
61282
  }
@@ -61054,7 +61285,7 @@ async function linkFolderToProject(client, path3, projectLink, projectName, orgS
61054
61285
  return;
61055
61286
  }
61056
61287
  try {
61057
- await (0, import_fs_extra10.ensureDir)(join12(path3, VERCEL_DIR));
61288
+ await (0, import_fs_extra10.ensureDir)(join13(path3, VERCEL_DIR));
61058
61289
  } catch (err) {
61059
61290
  if ((0, import_error_utils4.isErrnoException)(err) && err.code === "ENOTDIR") {
61060
61291
  return;
@@ -61062,7 +61293,7 @@ async function linkFolderToProject(client, path3, projectLink, projectName, orgS
61062
61293
  throw err;
61063
61294
  }
61064
61295
  await writeFile3(
61065
- join12(path3, VERCEL_DIR, VERCEL_DIR_PROJECT),
61296
+ join13(path3, VERCEL_DIR, VERCEL_DIR_PROJECT),
61066
61297
  JSON.stringify({
61067
61298
  ...projectLink,
61068
61299
  projectName
@@ -61187,7 +61418,7 @@ async function fileExists(filePath) {
61187
61418
  async function findAllVercelConfigFiles(workPath) {
61188
61419
  const foundFiles = [];
61189
61420
  for (const ext of VERCEL_CONFIG_EXTENSIONS) {
61190
- const configPath = join13(workPath, `vercel.${ext}`);
61421
+ const configPath = join14(workPath, `vercel.${ext}`);
61191
61422
  if (await fileExists(configPath)) {
61192
61423
  foundFiles.push(configPath);
61193
61424
  }
@@ -61196,12 +61427,12 @@ async function findAllVercelConfigFiles(workPath) {
61196
61427
  }
61197
61428
  async function findSourceVercelConfigFile(workPath) {
61198
61429
  for (const ext of VERCEL_CONFIG_EXTENSIONS) {
61199
- const configPath = join13(workPath, `vercel.${ext}`);
61430
+ const configPath = join14(workPath, `vercel.${ext}`);
61200
61431
  if (await fileExists(configPath)) {
61201
61432
  return basename4(configPath);
61202
61433
  }
61203
61434
  }
61204
- const tomlPath = join13(workPath, "vercel.toml");
61435
+ const tomlPath = join14(workPath, "vercel.toml");
61205
61436
  if (await fileExists(tomlPath)) {
61206
61437
  return "vercel.toml";
61207
61438
  }
@@ -61242,15 +61473,15 @@ function parseConfigLoaderError(stderr) {
61242
61473
  return stderr.trim();
61243
61474
  }
61244
61475
  async function compileVercelConfig(workPath) {
61245
- const vercelJsonPath = join13(workPath, "vercel.json");
61246
- const nowJsonPath = join13(workPath, "now.json");
61247
- const vercelTomlPath = join13(workPath, "vercel.toml");
61476
+ const vercelJsonPath = join14(workPath, "vercel.json");
61477
+ const nowJsonPath = join14(workPath, "now.json");
61478
+ const vercelTomlPath = join14(workPath, "vercel.toml");
61248
61479
  const hasVercelJson = await fileExists(vercelJsonPath);
61249
61480
  const hasNowJson = await fileExists(nowJsonPath);
61250
61481
  const hasVercelToml = await fileExists(vercelTomlPath);
61251
61482
  const vercelConfigPath = await findVercelConfigFile(workPath);
61252
- const vercelDir = join13(workPath, VERCEL_DIR);
61253
- const compiledConfigPath = join13(vercelDir, "vercel.json");
61483
+ const vercelDir = join14(workPath, VERCEL_DIR);
61484
+ const compiledConfigPath = join14(vercelDir, "vercel.json");
61254
61485
  if (hasNowJson) {
61255
61486
  throw new DeprecatedNowJson(nowJsonPath);
61256
61487
  }
@@ -61289,7 +61520,7 @@ async function compileVercelConfig(workPath) {
61289
61520
  }
61290
61521
  if (hasVercelToml) {
61291
61522
  try {
61292
- const tomlContent = await readFile6(vercelTomlPath, "utf8");
61523
+ const tomlContent = await readFile7(vercelTomlPath, "utf8");
61293
61524
  const config = tomlParse2(tomlContent);
61294
61525
  const normalizedConfig = normalizeConfig(config);
61295
61526
  await mkdir(vercelDir, { recursive: true });
@@ -61313,10 +61544,10 @@ async function compileVercelConfig(workPath) {
61313
61544
  }
61314
61545
  }
61315
61546
  const sourceConfigPath = vercelConfigPath;
61316
- (0, import_dotenv.config)({ path: join13(workPath, ".env") });
61317
- (0, import_dotenv.config)({ path: join13(workPath, ".env.local") });
61318
- const tempOutPath = join13(vercelDir, "vercel-temp.mjs");
61319
- const loaderPath = join13(vercelDir, "vercel-loader.mjs");
61547
+ (0, import_dotenv.config)({ path: join14(workPath, ".env") });
61548
+ (0, import_dotenv.config)({ path: join14(workPath, ".env.local") });
61549
+ const tempOutPath = join14(vercelDir, "vercel-temp.mjs");
61550
+ const loaderPath = join14(vercelDir, "vercel-loader.mjs");
61320
61551
  try {
61321
61552
  const { build } = await import("esbuild");
61322
61553
  await mkdir(vercelDir, { recursive: true });
@@ -61420,9 +61651,9 @@ async function compileVercelConfig(workPath) {
61420
61651
  }
61421
61652
  }
61422
61653
  async function getVercelConfigPath(workPath) {
61423
- const vercelJsonPath = join13(workPath, "vercel.json");
61424
- const vercelTomlPath = join13(workPath, "vercel.toml");
61425
- const compiledConfigPath = join13(workPath, VERCEL_DIR, "vercel.json");
61654
+ const vercelJsonPath = join14(workPath, "vercel.json");
61655
+ const vercelTomlPath = join14(workPath, "vercel.toml");
61656
+ const compiledConfigPath = join14(workPath, VERCEL_DIR, "vercel.json");
61426
61657
  if (await fileExists(vercelJsonPath)) {
61427
61658
  return vercelJsonPath;
61428
61659
  }
@@ -61436,19 +61667,8 @@ async function getVercelConfigPath(workPath) {
61436
61667
  }
61437
61668
 
61438
61669
  export {
61439
- require_lib2 as require_lib,
61670
+ require_lib,
61440
61671
  humanizePath,
61441
- envTargetChoices,
61442
- isValidEnvTarget,
61443
- getEnvTargetPlaceholder,
61444
- parseEnvTargetArg,
61445
- listSubcommand,
61446
- addSubcommand,
61447
- removeSubcommand,
61448
- pullSubcommand,
61449
- runSubcommand,
61450
- updateSubcommand,
61451
- envCommand,
61452
61672
  param,
61453
61673
  getUser,
61454
61674
  ua_default,
@@ -61470,7 +61690,7 @@ export {
61470
61690
  useKeypress,
61471
61691
  require_cli_width,
61472
61692
  require_wrap_ansi,
61473
- require_lib3 as require_lib2,
61693
+ require_lib2,
61474
61694
  onExit,
61475
61695
  createPrompt,
61476
61696
  esm_default,
@@ -61487,11 +61707,12 @@ export {
61487
61707
  require_tar_stream,
61488
61708
  require_pump,
61489
61709
  require_mkdirp,
61490
- require_dist8 as require_dist,
61710
+ require_dist7 as require_dist,
61491
61711
  require_fast_deep_equal,
61492
61712
  require_ajv,
61493
61713
  getProjectByNameOrId,
61494
61714
  require_pluralize,
61715
+ getGitConfigPath,
61495
61716
  createGitMeta,
61496
61717
  parseGitConfig,
61497
61718
  pluckRemoteUrls,
@@ -61503,7 +61724,7 @@ export {
61503
61724
  require_frameworks,
61504
61725
  require_brace_expansion,
61505
61726
  require_minimatch,
61506
- require_dist3 as require_dist2,
61727
+ require_dist2,
61507
61728
  list,
61508
61729
  disconnectGitProvider,
61509
61730
  parseRepoUrl,
@@ -61519,6 +61740,27 @@ export {
61519
61740
  parseEnv,
61520
61741
  createEnvObject,
61521
61742
  VERCEL_OIDC_TOKEN,
61743
+ SENSITIVE_ENV_VALUE_PLACEHOLDER,
61744
+ looksLikeSecret,
61745
+ looksLikeSecretValue,
61746
+ shouldConfirmRotationBeforeDelete,
61747
+ isFlagsSecretNeedingSplit,
61748
+ normalizeStdinEnvValue,
61749
+ getPublicPrefix,
61750
+ getFrameworkPublicPrefix,
61751
+ getApiPublicPrefix,
61752
+ getLocalSvelteKitPublicPrefixes,
61753
+ removePublicPrefix,
61754
+ validateEnvValue,
61755
+ getEnvKeyWarnings,
61756
+ ENV_VISIBILITY_DEPRECATION_MESSAGE,
61757
+ resolveEnvVarTypeOption,
61758
+ isSecretEnvVar,
61759
+ formatVisibilityLabel,
61760
+ getPublicPrefixSecretVisibilityError,
61761
+ resolveEnvVarVisibility,
61762
+ getUnavailableSecretValuesMessage,
61763
+ getLocalSecretFallbackMessage,
61522
61764
  PromptCanceledError,
61523
61765
  PromptBackError,
61524
61766
  isPromptCanceledError,
@@ -61534,8 +61776,8 @@ export {
61534
61776
  compileVercelConfig,
61535
61777
  getVercelConfigPath,
61536
61778
  readConfig,
61537
- require_dist6 as require_dist3,
61538
- require_dist7 as require_dist4,
61779
+ require_dist5 as require_dist3,
61780
+ require_dist6 as require_dist4,
61539
61781
  displayDetectedServices,
61540
61782
  validateConfig,
61541
61783
  tryDetectServices,