vercel 59.5.0 → 59.7.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (111) hide show
  1. package/dist/chunks/{add-Z5FM6TFI.js → add-7O4TM33A.js} +12 -12
  2. package/dist/chunks/{add-MH3WV6PV.js → add-UT6ZPA4F.js} +11 -11
  3. package/dist/chunks/{add-W3FFMTX4.js → add-UVMFKSSY.js} +11 -11
  4. package/dist/chunks/{build-VYYFBJL7.js → build-SKKT3DIB.js} +11 -11
  5. package/dist/chunks/{chunk-LLM3ZNXJ.js → chunk-2EH6SZRG.js} +2 -2
  6. package/dist/chunks/{chunk-UUVMIXT4.js → chunk-2T3IZZTJ.js} +4 -4
  7. package/dist/chunks/{chunk-RZ5NP6HN.js → chunk-2YRAWYGE.js} +1 -1
  8. package/dist/chunks/{chunk-TDXNNIZ6.js → chunk-3PA7LXYM.js} +2 -2
  9. package/dist/chunks/{chunk-KQRVZWJU.js → chunk-3T7WSWZH.js} +1 -1
  10. package/dist/chunks/{chunk-R6IGDGX3.js → chunk-5XECIWME.js} +1 -1
  11. package/dist/chunks/{chunk-PBHBX6UL.js → chunk-63OX2DER.js} +3 -3
  12. package/dist/chunks/{chunk-V4YLY44R.js → chunk-67IIZBBY.js} +2 -2
  13. package/dist/chunks/{chunk-AWSLWAOC.js → chunk-6JPVTPTU.js} +3 -3
  14. package/dist/chunks/{chunk-HT2XWSAJ.js → chunk-7AEEQOD4.js} +2 -29
  15. package/dist/chunks/{chunk-QG4PCM45.js → chunk-7HE63HCR.js} +102 -15
  16. package/dist/chunks/{chunk-FA3MO56Q.js → chunk-7IDPPWDN.js} +5 -5
  17. package/dist/chunks/{chunk-MRMNMFMD.js → chunk-7KSICC3A.js} +1 -1
  18. package/dist/chunks/{chunk-XBN2O34P.js → chunk-7ST552E3.js} +17 -4
  19. package/dist/chunks/{chunk-TAZ5ZAKG.js → chunk-AFKB6VMO.js} +2 -2
  20. package/dist/chunks/{chunk-CV4S27SS.js → chunk-ASBP32T6.js} +1 -1
  21. package/dist/chunks/{chunk-CQJRLNTX.js → chunk-AYLY3ZVL.js} +2 -2
  22. package/dist/chunks/{chunk-AWCID36T.js → chunk-BMKU5KEL.js} +1 -1
  23. package/dist/chunks/{chunk-E6LFKMI2.js → chunk-BQG777JE.js} +794 -124
  24. package/dist/chunks/{chunk-VWYNSJXI.js → chunk-CBHLLOGZ.js} +8 -8
  25. package/dist/chunks/{chunk-CSCSGSQG.js → chunk-CMRZ4KI4.js} +5 -5
  26. package/dist/chunks/{chunk-TIWAL2YU.js → chunk-DG6IMLCF.js} +6 -6
  27. package/dist/chunks/{chunk-YIHOS3ZF.js → chunk-FRAXI2WT.js} +1 -1
  28. package/dist/chunks/{chunk-7XX4ZEOV.js → chunk-FWKSJYDV.js} +1 -1
  29. package/dist/chunks/{chunk-OHER4DGX.js → chunk-FXD67VN5.js} +25 -9
  30. package/dist/chunks/{chunk-GUWPUX2Y.js → chunk-GK3RE3AC.js} +4 -4
  31. package/dist/chunks/{chunk-JNU3DTEV.js → chunk-IFNCPWH5.js} +9 -9
  32. package/dist/chunks/{chunk-PIMIKY4X.js → chunk-IJ4X426J.js} +1 -1
  33. package/dist/chunks/{chunk-NSU2BTRS.js → chunk-KD2N44NG.js} +4 -4
  34. package/dist/chunks/{chunk-TVXCXIRO.js → chunk-L3UXB2CW.js} +1 -1
  35. package/dist/chunks/{chunk-JJQP3PYM.js → chunk-MHCGKUI7.js} +5 -5
  36. package/dist/chunks/{chunk-47VQ6H2S.js → chunk-MUMITVZP.js} +2 -2
  37. package/dist/chunks/{chunk-L7CEMAJG.js → chunk-NGGLYKNU.js} +27 -5
  38. package/dist/chunks/{chunk-ZKUHCL6O.js → chunk-NJCM5JJN.js} +5 -5
  39. package/dist/chunks/{chunk-5LX2JDZP.js → chunk-O75LSD3C.js} +1 -1
  40. package/dist/chunks/{chunk-OX7KI3LF.js → chunk-QFAS4OVW.js} +18 -0
  41. package/dist/chunks/{chunk-4JTF6RD7.js → chunk-SSBYESJ5.js} +4 -4
  42. package/dist/chunks/{chunk-G75NFPIT.js → chunk-WNAKOXGK.js} +1 -1
  43. package/dist/chunks/{chunk-PPUWG2UB.js → chunk-WVPMR7XV.js} +58 -25
  44. package/dist/chunks/{chunk-CYNB6LL4.js → chunk-XNFHNTS2.js} +1 -1
  45. package/dist/chunks/{chunk-M3OSDZPY.js → chunk-XSYZDMUP.js} +16 -7
  46. package/dist/chunks/{chunk-VLPLCJZC.js → chunk-ZSFEACZU.js} +1 -1
  47. package/dist/chunks/{clear-TNGRDA7D.js → clear-X7M4WGBC.js} +11 -11
  48. package/dist/chunks/{compile-vercel-config-ERLXKKWW.js → compile-vercel-config-FBOZBWJC.js} +7 -7
  49. package/dist/chunks/{config-7EDKML5Q.js → config-KGW667XC.js} +9 -9
  50. package/dist/chunks/{config-H22EE765.js → config-RYPSCAR7.js} +11 -11
  51. package/dist/chunks/{delete-LORYIZHY.js → delete-OXYXXPHR.js} +8 -8
  52. package/dist/chunks/{delete-Q4S5F2AI.js → delete-VK6FTDBI.js} +9 -9
  53. package/dist/chunks/{disable-HKWCBDJC.js → disable-XRJTKNX4.js} +8 -8
  54. package/dist/chunks/{discard-UCCRF2JQ.js → discard-NAPSPR6Y.js} +8 -8
  55. package/dist/chunks/{edit-AWL35PYQ.js → edit-34GDLPQG.js} +10 -10
  56. package/dist/chunks/{edit-6IM6VRBR.js → edit-WLG4GLU3.js} +10 -10
  57. package/dist/chunks/{enable-GN3D3L3V.js → enable-IDKKVXKB.js} +8 -8
  58. package/dist/chunks/{exec-CNBOV577.js → exec-XH4K34JM.js} +3 -3
  59. package/dist/chunks/{export-HHRVFALV.js → export-MPMU3FYY.js} +8 -8
  60. package/dist/chunks/{image-4DCU4VPP.js → image-RZ2A4FWP.js} +6 -6
  61. package/dist/chunks/{import-builders-DVG3HOTF.js → import-builders-GZPE5N44.js} +9 -9
  62. package/dist/chunks/{inspect-B3OWUFLH.js → inspect-56S2DKPO.js} +11 -11
  63. package/dist/chunks/{inspect-VPME6UC7.js → inspect-EVDBNPP4.js} +11 -11
  64. package/dist/chunks/{inspect-TGOJDKIT.js → inspect-KGEMHV2T.js} +9 -9
  65. package/dist/chunks/{inspect-VLGKNHJW.js → inspect-OOV2ORKD.js} +11 -11
  66. package/dist/chunks/{inspect-TUW67CFZ.js → inspect-X2Y5FDKR.js} +10 -10
  67. package/dist/chunks/{list-K552ITMK.js → list-FWLSZYMO.js} +9 -9
  68. package/dist/chunks/{list-2DPKDHRV.js → list-H357CF7M.js} +10 -10
  69. package/dist/chunks/{list-TK2JO7BK.js → list-TWSOAQRB.js} +8 -8
  70. package/dist/chunks/{login-HRWEKW5P.js → login-54OPNB5E.js} +21 -12
  71. package/dist/chunks/{ls-JSV2WZVF.js → ls-6JHFSJBJ.js} +11 -11
  72. package/dist/chunks/{ls-O2WYF5UL.js → ls-DU3S2GBJ.js} +11 -11
  73. package/dist/chunks/{ls-IOXGXEY4.js → ls-VDFNIR5H.js} +10 -10
  74. package/dist/chunks/{ls-M5TYGFP5.js → ls-WFMTVJOO.js} +11 -11
  75. package/dist/chunks/{ls-YIF3KLF3.js → ls-WGIRTAVM.js} +11 -11
  76. package/dist/chunks/{ls-TM6NTZEB.js → ls-ZMR5RMU4.js} +9 -9
  77. package/dist/chunks/{open-FWAVEWGU.js → open-RCSCNKHF.js} +9 -9
  78. package/dist/chunks/{permissions-DPFYL47Z.js → permissions-XNN37R4N.js} +7 -7
  79. package/dist/chunks/{publish-63CGFKQR.js → publish-PLXEACYY.js} +8 -8
  80. package/dist/chunks/{push-T5ZTBW3P.js → push-EFYSB52Q.js} +11 -11
  81. package/dist/chunks/{query-B6O3EMEV.js → query-EKTXDOL7.js} +11 -11
  82. package/dist/chunks/{reorder-ANV4NMKH.js → reorder-OSA7D2RG.js} +8 -8
  83. package/dist/chunks/{reply-C73KGOCG.js → reply-6M2IYKLK.js} +10 -10
  84. package/dist/chunks/{resolve-IHSIVPEE.js → resolve-MCX5STKN.js} +9 -9
  85. package/dist/chunks/{restore-GSUNXP2O.js → restore-52OEP3NL.js} +8 -8
  86. package/dist/chunks/{rm-M7IJC2WZ.js → rm-2VAJFK25.js} +11 -11
  87. package/dist/chunks/{rm-RV5SQFQA.js → rm-4BJN2LJX.js} +11 -13
  88. package/dist/chunks/{rm-4O74PS4Q.js → rm-IYEDZOMN.js} +11 -11
  89. package/dist/chunks/{rm-PRINF4OU.js → rm-QW35WHSK.js} +11 -11
  90. package/dist/chunks/{rm-YDTK5ESZ.js → rm-TXV4GB4L.js} +10 -10
  91. package/dist/chunks/{routes-SZI2G4SE.js → routes-2OLIBRYX.js} +3 -3
  92. package/dist/chunks/{rule-inspect-ZZC53FLP.js → rule-inspect-WOBAN3Y2.js} +10 -10
  93. package/dist/chunks/{rules-SAOSSGFI.js → rules-CUJRAZYO.js} +10 -10
  94. package/dist/chunks/{schema-23ZFAKDU.js → schema-45SJNY5L.js} +4 -4
  95. package/dist/chunks/{schema-2Q3QRMRO.js → schema-VCGEJAOG.js} +9 -9
  96. package/dist/chunks/{set-L47ZCZBJ.js → set-2QSXMDVF.js} +9 -9
  97. package/dist/chunks/{tags-2TWLM77N.js → tags-NHX2VQ7E.js} +5 -5
  98. package/dist/chunks/{types-G3PEUIJH.js → types-JGANJ5EQ.js} +3 -3
  99. package/dist/chunks/{update-SZH2VBD6.js → update-EOHXTT4N.js} +12 -12
  100. package/dist/commands/build/builder-worker.cjs +281 -0
  101. package/dist/commands/build/index.js +798 -236
  102. package/dist/commands/deploy/index.js +103 -31
  103. package/dist/commands/dev/index.js +983 -176
  104. package/dist/commands/env/index.js +1167 -542
  105. package/dist/commands/link/index.js +10 -10
  106. package/dist/commands/list/index.js +10 -10
  107. package/dist/commands-bulk.js +2002 -962
  108. package/dist/index.js +16 -16
  109. package/dist/version.mjs +1 -1
  110. package/package.json +48 -48
  111. package/dist/chunks/chunk-HGRWPPYB.js +0 -18
@@ -6,7 +6,7 @@ const __filename = __fileURLToPath(import.meta.url);
6
6
  const __dirname = __dirname_(__filename);
7
7
  import {
8
8
  promptMissingCredentials
9
- } from "../../chunks/chunk-GUWPUX2Y.js";
9
+ } from "../../chunks/chunk-GK3RE3AC.js";
10
10
  import {
11
11
  Now,
12
12
  UploadErrorMissingArchive,
@@ -16,19 +16,21 @@ import {
16
16
  purchaseDomainIfAvailable,
17
17
  require_cjs,
18
18
  setupDomain
19
- } from "../../chunks/chunk-PPUWG2UB.js";
19
+ } from "../../chunks/chunk-WVPMR7XV.js";
20
20
  import "../../chunks/chunk-PRWJUY5U.js";
21
21
  import {
22
22
  login,
23
23
  require_ci_info
24
- } from "../../chunks/chunk-TIWAL2YU.js";
24
+ } from "../../chunks/chunk-DG6IMLCF.js";
25
25
  import {
26
26
  readLocalConfig
27
- } from "../../chunks/chunk-4JTF6RD7.js";
27
+ } from "../../chunks/chunk-SSBYESJ5.js";
28
28
  import {
29
29
  highlight
30
30
  } from "../../chunks/chunk-AINIBIP4.js";
31
- import "../../chunks/chunk-XBN2O34P.js";
31
+ import {
32
+ isGuidanceEnabled
33
+ } from "../../chunks/chunk-7ST552E3.js";
32
34
  import {
33
35
  parseMeta
34
36
  } from "../../chunks/chunk-EKPSCRJZ.js";
@@ -44,7 +46,7 @@ import {
44
46
  deprecatedArchiveSplitTgz,
45
47
  getCommandAliases,
46
48
  initSubcommand
47
- } from "../../chunks/chunk-QG4PCM45.js";
49
+ } from "../../chunks/chunk-7HE63HCR.js";
48
50
  import "../../chunks/chunk-7Q45OKWR.js";
49
51
  import "../../chunks/chunk-GY5I4AYD.js";
50
52
  import "../../chunks/chunk-CJV7J7B5.js";
@@ -61,16 +63,15 @@ import "../../chunks/chunk-XDGOOW3K.js";
61
63
  import "../../chunks/chunk-VP5Y3SZG.js";
62
64
  import {
63
65
  pickOverrides
64
- } from "../../chunks/chunk-TDXNNIZ6.js";
65
- import "../../chunks/chunk-HT2XWSAJ.js";
66
+ } from "../../chunks/chunk-3PA7LXYM.js";
66
67
  import {
67
68
  stamp_default
68
69
  } from "../../chunks/chunk-64IF634X.js";
69
70
  import "../../chunks/chunk-VXYGCOKL.js";
70
- import "../../chunks/chunk-7XX4ZEOV.js";
71
+ import "../../chunks/chunk-FWKSJYDV.js";
71
72
  import {
72
73
  help
73
- } from "../../chunks/chunk-RZ5NP6HN.js";
74
+ } from "../../chunks/chunk-2YRAWYGE.js";
74
75
  import {
75
76
  VERCEL_DIR,
76
77
  VERCEL_DIR_PROJECT,
@@ -79,6 +80,7 @@ import {
79
80
  createGitMeta,
80
81
  ensureLink,
81
82
  getDeployment,
83
+ getGitConfigPath,
82
84
  getLinkFromDir,
83
85
  getRepoLink,
84
86
  getVercelDirectory,
@@ -88,29 +90,33 @@ import {
88
90
  mapCertError,
89
91
  param,
90
92
  parseEnv,
93
+ parseGitConfig,
94
+ parseRepoUrl,
91
95
  parseTarget,
96
+ pluckRemoteUrls,
92
97
  printAlignedLabel,
93
98
  require_dist as require_dist2,
94
99
  require_frameworks,
95
100
  require_lib,
96
101
  validatePaths,
97
102
  validateRootDirectory
98
- } from "../../chunks/chunk-E6LFKMI2.js";
99
- import "../../chunks/chunk-OHER4DGX.js";
103
+ } from "../../chunks/chunk-BQG777JE.js";
104
+ import "../../chunks/chunk-FXD67VN5.js";
100
105
  import {
101
106
  TelemetryClient
102
- } from "../../chunks/chunk-CYNB6LL4.js";
107
+ } from "../../chunks/chunk-XNFHNTS2.js";
103
108
  import {
104
109
  AGENT_STATUS,
105
110
  outputAgentError,
111
+ quoteArg,
106
112
  withGlobalFlags
107
- } from "../../chunks/chunk-L7CEMAJG.js";
113
+ } from "../../chunks/chunk-NGGLYKNU.js";
108
114
  import {
109
115
  require_ms
110
116
  } from "../../chunks/chunk-GGP5R3FU.js";
111
117
  import {
112
118
  printError
113
- } from "../../chunks/chunk-CQJRLNTX.js";
119
+ } from "../../chunks/chunk-AYLY3ZVL.js";
114
120
  import {
115
121
  parseArguments
116
122
  } from "../../chunks/chunk-57RHXXXG.js";
@@ -141,7 +147,7 @@ import {
141
147
  code,
142
148
  isAPIError,
143
149
  require_bytes
144
- } from "../../chunks/chunk-AWCID36T.js";
150
+ } from "../../chunks/chunk-BMKU5KEL.js";
145
151
  import {
146
152
  getCommandName,
147
153
  getFlagsSpecification,
@@ -155,7 +161,7 @@ import {
155
161
  output_manager_default,
156
162
  prependEmoji,
157
163
  require_dist
158
- } from "../../chunks/chunk-OX7KI3LF.js";
164
+ } from "../../chunks/chunk-QFAS4OVW.js";
159
165
  import {
160
166
  require_source
161
167
  } from "../../chunks/chunk-S7KYDPEM.js";
@@ -176,7 +182,7 @@ import {
176
182
  getSupportedNodeVersion,
177
183
  scanParentDirs
178
184
  } from "@vercel/build-utils";
179
- import { join as join4, resolve } from "path";
185
+ import { join as join4, resolve as resolve2 } from "path";
180
186
 
181
187
  // src/util/deploy/generate-cert-for-deploy.ts
182
188
  var import_tldts = __toESM(require_cjs(), 1);
@@ -323,10 +329,10 @@ function parseNdjson(text) {
323
329
  }
324
330
  async function getDeploymentCheckRunLogs(client, deploymentId, checkRunId) {
325
331
  const url = `/v2/deployments/${encodeURIComponent(deploymentId)}/check-runs/${encodeURIComponent(checkRunId)}/logs`;
326
- await new Promise((resolve2) => setTimeout(resolve2, 1e3));
332
+ await new Promise((resolve3) => setTimeout(resolve3, 1e3));
327
333
  for (let attempt = 0; attempt < MAX_ATTEMPTS; attempt++) {
328
334
  if (attempt > 0)
329
- await new Promise((resolve2) => setTimeout(resolve2, POLL_INTERVAL_MS));
335
+ await new Promise((resolve3) => setTimeout(resolve3, POLL_INTERVAL_MS));
330
336
  const res = await client.fetch(url, { json: false });
331
337
  const text = typeof res === "string" ? res : await res.text();
332
338
  const entries = parseNdjson(text);
@@ -353,6 +359,49 @@ async function getPrebuiltJson(directory) {
353
359
  return null;
354
360
  }
355
361
 
362
+ // src/util/deploy/get-git-connect-recommendation.ts
363
+ import { resolve } from "path";
364
+ var SUPPORTED_PROVIDERS = /* @__PURE__ */ new Set(["github", "gitlab", "bitbucket"]);
365
+ var defaultDeps = {
366
+ getGitConfigPath,
367
+ parseGitConfig,
368
+ fetchProject: (client, project) => client.fetch(`/v9/projects/${encodeURIComponent(project.id)}`, {
369
+ accountId: project.accountId
370
+ }),
371
+ buildCommand: (client, command) => withGlobalFlags(client, command, { preserveProject: true })
372
+ };
373
+ async function getGitConnectRecommendation(client, cwd, project, options = {}) {
374
+ const { alreadyOffered = false, deps = defaultDeps } = options;
375
+ try {
376
+ if (project.link || alreadyOffered)
377
+ return void 0;
378
+ const gitConfigPath = deps.getGitConfigPath({ cwd });
379
+ if (!gitConfigPath)
380
+ return void 0;
381
+ const gitConfig = await deps.parseGitConfig(gitConfigPath);
382
+ const remoteUrls = gitConfig && pluckRemoteUrls(gitConfig);
383
+ if (!remoteUrls) {
384
+ return void 0;
385
+ }
386
+ const remotes = Object.values(remoteUrls);
387
+ const hasSupportedRemote = remotes.some((remoteUrl) => {
388
+ const repo = parseRepoUrl(remoteUrl);
389
+ return repo && SUPPORTED_PROVIDERS.has(repo.provider);
390
+ });
391
+ if (!hasSupportedRemote || client.nonInteractive && remotes.length !== 1) {
392
+ return void 0;
393
+ }
394
+ const remoteProject = await deps.fetchProject(client, project);
395
+ if (remoteProject.link)
396
+ return void 0;
397
+ const cwdFlag = resolve(cwd) === resolve(client.cwd) ? "" : ` --cwd ${quoteArg(cwd)}`;
398
+ return deps.buildCommand(client, `git connect${cwdFlag}`);
399
+ } catch (error) {
400
+ output_manager_default.debug(`Failed to resolve Git connection guidance: ${error}`);
401
+ return void 0;
402
+ }
403
+ }
404
+
356
405
  // src/util/deploy/validate-archive-format.ts
357
406
  var import_client = __toESM(require_dist2(), 1);
358
407
  var validArchiveFormats = new Set(import_client.VALID_ARCHIVE_FORMATS);
@@ -558,9 +607,6 @@ var DeployTelemetryClient = class extends TelemetryClient {
558
607
  }
559
608
  };
560
609
 
561
- // src/commands/deploy/index.ts
562
- import { determineAgent } from "@vercel/detect-agent";
563
-
564
610
  // src/commands/deploy/anonymous.ts
565
611
  var import_fs_extra3 = __toESM(require_lib(), 1);
566
612
  import { join as join3 } from "path";
@@ -751,7 +797,8 @@ async function handleAnonymousDeploymentError({
751
797
  }
752
798
  async function runImplicitBuild(client, cwd) {
753
799
  const projectJsonPath = join3(cwd, VERCEL_DIR, VERCEL_DIR_PROJECT);
754
- if (!await import_fs_extra3.default.pathExists(projectJsonPath)) {
800
+ const projectJsonExists = await import_fs_extra3.default.pathExists(projectJsonPath);
801
+ if (!projectJsonExists) {
755
802
  await import_fs_extra3.default.outputJSON(projectJsonPath, { settings: {} }, { spaces: 2 });
756
803
  }
757
804
  if (await import_fs_extra3.default.pathExists(join3(cwd, "package.json"))) {
@@ -760,8 +807,10 @@ async function runImplicitBuild(client, cwd) {
760
807
  const originalArgv = client.argv;
761
808
  const originalCwd = client.cwd;
762
809
  const originalStdout = client.stdout;
810
+ const previousVercelFirstDeployment = process.env.VERCEL_FIRST_DEPLOYMENT;
763
811
  client.cwd = cwd;
764
812
  client.setArgv([...originalArgv.slice(0, 2), "build", "--prod", "--yes"]);
813
+ process.env.VERCEL_FIRST_DEPLOYMENT = "1";
765
814
  client.stdout = createSinkStream();
766
815
  try {
767
816
  const build = (await import("../build/index.js")).default;
@@ -770,6 +819,14 @@ async function runImplicitBuild(client, cwd) {
770
819
  client.setArgv(originalArgv);
771
820
  client.cwd = originalCwd;
772
821
  client.stdout = originalStdout;
822
+ if (previousVercelFirstDeployment === void 0) {
823
+ delete process.env.VERCEL_FIRST_DEPLOYMENT;
824
+ } else {
825
+ process.env.VERCEL_FIRST_DEPLOYMENT = previousVercelFirstDeployment;
826
+ }
827
+ if (!projectJsonExists) {
828
+ await import_fs_extra3.default.remove(projectJsonPath);
829
+ }
773
830
  }
774
831
  }
775
832
  function createSinkStream() {
@@ -859,7 +916,7 @@ async function handleInitDeployment(client, telemetryClient) {
859
916
  args = args.slice(1);
860
917
  let paths;
861
918
  if (args.length > 0) {
862
- paths = args.map((item) => resolve(client.cwd, item));
919
+ paths = args.map((item) => resolve2(client.cwd, item));
863
920
  telemetryClient.trackCliArgumentProjectPath(paths[0]);
864
921
  } else {
865
922
  paths = [client.cwd];
@@ -1520,7 +1577,7 @@ async function handleDefaultDeploy(client, telemetryClient) {
1520
1577
  }
1521
1578
  let paths;
1522
1579
  if (parsedArguments.args.length > 0) {
1523
- paths = parsedArguments.args.map((item) => resolve(client.cwd, item));
1580
+ paths = parsedArguments.args.map((item) => resolve2(client.cwd, item));
1524
1581
  telemetryClient.trackCliArgumentProjectPath(paths[0]);
1525
1582
  } else {
1526
1583
  paths = [client.cwd];
@@ -1664,18 +1721,21 @@ async function handleDefaultDeploy(client, telemetryClient) {
1664
1721
  const { org, project } = link;
1665
1722
  const rootDirectory = project.rootDirectory;
1666
1723
  const sourceFilesOutsideRootDirectory = project.sourceFilesOutsideRootDirectory ?? true;
1724
+ const projectCwd = cwd;
1667
1725
  if (link.repoRoot) {
1668
1726
  cwd = link.repoRoot;
1669
1727
  }
1728
+ const postDeployGuidanceEnabled = !anonymousLink && (client.nonInteractive || !asJson) && isGuidanceEnabled(client, parsedArguments.flags["--guidance"], true);
1670
1729
  const prebuilt = isAnonymous || !!parsedArguments.flags["--prebuilt"];
1671
1730
  let vercelOutputDir;
1731
+ let prebuiltBuild = null;
1672
1732
  if (prebuilt) {
1673
1733
  vercelOutputDir = join4(cwd, ".vercel/output");
1674
1734
  if (link.repoRoot && link.project.rootDirectory) {
1675
1735
  vercelOutputDir = join4(cwd, link.project.rootDirectory, ".vercel/output");
1676
1736
  }
1677
1737
  let prebuiltExists = await import_fs_extra4.default.pathExists(vercelOutputDir);
1678
- if (!prebuiltExists && isAnonymous && !parsedArguments.flags["--dry"]) {
1738
+ if (isAnonymous && !parsedArguments.flags["--prebuilt"] && !parsedArguments.flags["--dry"]) {
1679
1739
  const buildExitCode = await runImplicitBuild(client, cwd);
1680
1740
  if (buildExitCode !== 0) {
1681
1741
  return buildExitCode;
@@ -1692,7 +1752,7 @@ async function handleDefaultDeploy(client, telemetryClient) {
1692
1752
  );
1693
1753
  return 1;
1694
1754
  }
1695
- const prebuiltBuild = await getPrebuiltJson(vercelOutputDir);
1755
+ prebuiltBuild = await getPrebuiltJson(vercelOutputDir);
1696
1756
  const prebuiltError = prebuiltBuild?.error || prebuiltBuild?.builds?.find((build) => "error" in build)?.error;
1697
1757
  if (prebuiltError) {
1698
1758
  output_manager_default.log(
@@ -1914,6 +1974,9 @@ async function handleDefaultDeploy(client, telemetryClient) {
1914
1974
  }
1915
1975
  if (!createArgs.projectSettings)
1916
1976
  createArgs.projectSettings = {};
1977
+ if (isAnonymous && !Object.hasOwn(localConfig, "framework") && createArgs.projectSettings.framework === void 0 && prebuiltBuild?.detectedFramework?.status === "detected" && prebuiltBuild.detectedFramework.slug) {
1978
+ createArgs.projectSettings.framework = prebuiltBuild.detectedFramework.slug;
1979
+ }
1917
1980
  createArgs.projectSettings.nodeVersion = nodeVersion;
1918
1981
  deployment = await createDeploy(
1919
1982
  client,
@@ -2305,6 +2368,9 @@ ${err.stack}`);
2305
2368
  printError(err);
2306
2369
  return 1;
2307
2370
  }
2371
+ const gitConnectCommand = postDeployGuidanceEnabled ? await getGitConnectRecommendation(client, projectCwd, project, {
2372
+ alreadyOffered: "gitConnectOffered" in link ? link.gitConnectOffered : false
2373
+ }) : void 0;
2308
2374
  if (asJson) {
2309
2375
  output_manager_default.stopSpinner();
2310
2376
  const anonymousUrl = anonymousLink ? deployment.alias?.[0] : void 0;
@@ -2334,6 +2400,12 @@ ${err.stack}`);
2334
2400
  when: "Create an account to keep deploying"
2335
2401
  }
2336
2402
  ] : [
2403
+ ...gitConnectCommand ? [
2404
+ {
2405
+ command: gitConnectCommand,
2406
+ when: "Automatically deploy changes on every push"
2407
+ }
2408
+ ] : [],
2337
2409
  {
2338
2410
  command: `${packageName} curl https://${deployment.url}`,
2339
2411
  when: "Verify deployment, including when Deployment Protection is enabled"
@@ -2354,8 +2426,6 @@ ${err.stack}`);
2354
2426
  `);
2355
2427
  return 0;
2356
2428
  }
2357
- const { isAgent } = await determineAgent();
2358
- const guidanceMode = (parsedArguments.flags["--guidance"] ?? isAgent) && !anonymousLink;
2359
2429
  if (anonymousLink) {
2360
2430
  output_manager_default.print("\n");
2361
2431
  log(
@@ -2371,7 +2441,9 @@ ${err.stack}`);
2371
2441
  deployment,
2372
2442
  deployStamp,
2373
2443
  noWait,
2374
- guidanceMode
2444
+ postDeployGuidanceEnabled,
2445
+ void 0,
2446
+ gitConnectCommand
2375
2447
  );
2376
2448
  }
2377
2449
  function handleCreateDeployError(error, localConfig) {