vercel 64.4.0 → 64.5.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 (142) hide show
  1. package/dist/chunks/{add-UXOTAL3N.js → add-CG73LA5A.js} +1 -1
  2. package/dist/chunks/{add-FRVZLYB5.js → add-KBBLLPHW.js} +1 -1
  3. package/dist/chunks/{add-5RV75RPG.js → add-U5U56FJR.js} +1 -1
  4. package/dist/chunks/{build-F5GOX2EV.js → build-7EWHBKAN.js} +1 -1
  5. package/dist/chunks/{chunk-ZVTI6BRR.js → chunk-2UPVIVAA.js} +1 -1
  6. package/dist/chunks/{chunk-MZLQY2EQ.js → chunk-3DP66SQ4.js} +1 -1
  7. package/dist/chunks/{chunk-AA434KXY.js → chunk-3GUO6F6P.js} +1 -1
  8. package/dist/chunks/{chunk-AQUDXMFH.js → chunk-3NNH2U5M.js} +1 -1
  9. package/dist/chunks/{chunk-FLBI6DY2.js → chunk-5AYB3JRL.js} +1 -1
  10. package/dist/chunks/{chunk-OUTCLR64.js → chunk-5NXYYFRL.js} +1 -1
  11. package/dist/chunks/{chunk-BLAIBYEU.js → chunk-5S2NK6K6.js} +1 -1
  12. package/dist/chunks/{chunk-6JGC4YDH.js → chunk-6CXHR2ND.js} +2 -2
  13. package/dist/chunks/{chunk-ZLWTPS5T.js → chunk-6QRT6USI.js} +1 -1
  14. package/dist/chunks/{chunk-ZVLDGT4O.js → chunk-6UCSM3CZ.js} +1 -1
  15. package/dist/chunks/{chunk-XW4ZWX3I.js → chunk-74QCXPNW.js} +1 -1
  16. package/dist/chunks/{chunk-G2IJOQR3.js → chunk-7QQIWMAT.js} +1 -1
  17. package/dist/chunks/{chunk-HTLGLTKD.js → chunk-ACVDKHVS.js} +1 -1
  18. package/dist/chunks/{chunk-YTEZO2SZ.js → chunk-BJXMXDBM.js} +1 -1
  19. package/dist/chunks/{chunk-E6R2QOOR.js → chunk-CITTRAYH.js} +1 -1
  20. package/dist/chunks/{chunk-OXAPCSYY.js → chunk-CMEEAXVV.js} +1 -1
  21. package/dist/chunks/{chunk-3E364MJE.js → chunk-D6REP5QQ.js} +1 -1
  22. package/dist/chunks/chunk-DDLM6CIQ.js +10 -0
  23. package/dist/chunks/{chunk-6ZRULOO3.js → chunk-DRXOTZSJ.js} +1 -1
  24. package/dist/chunks/{chunk-JV6IPUGX.js → chunk-DXLLC7ZM.js} +1 -1
  25. package/dist/chunks/{chunk-IIC2A4YN.js → chunk-GLH4PVMY.js} +1 -1
  26. package/dist/chunks/{chunk-JCTXRR4A.js → chunk-GVUB6QGX.js} +1 -1
  27. package/dist/chunks/{chunk-QAETJRKX.js → chunk-HARXQZV3.js} +1 -1
  28. package/dist/chunks/{chunk-GJP22N6R.js → chunk-JH257EDL.js} +1 -1
  29. package/dist/chunks/{chunk-U3NQZJQ4.js → chunk-JIGCN5QS.js} +3 -3
  30. package/dist/chunks/{chunk-OCOVCC5Q.js → chunk-JZ7FDBS4.js} +1 -1
  31. package/dist/chunks/{chunk-DNTQK2SW.js → chunk-LUJL3KFT.js} +1 -1
  32. package/dist/chunks/{chunk-DWEDXCBK.js → chunk-LYU4MVL5.js} +2 -2
  33. package/dist/chunks/{chunk-KKQL4AKH.js → chunk-MPZFMEVK.js} +1 -1
  34. package/dist/chunks/{chunk-NLCTF4EJ.js → chunk-MYHJNSCW.js} +3 -2
  35. package/dist/chunks/{chunk-IL7X6EKK.js → chunk-N2TNA2FE.js} +1 -1
  36. package/dist/chunks/{chunk-444RE4Z5.js → chunk-OHVPJNGY.js} +1 -1
  37. package/dist/chunks/{chunk-6GIP2YPX.js → chunk-OYMFOCD5.js} +1 -1
  38. package/dist/chunks/{chunk-QCWV7FML.js → chunk-P5BNAP5T.js} +1 -1
  39. package/dist/chunks/{chunk-TCYAAWLB.js → chunk-PAOR4MQZ.js} +1 -1
  40. package/dist/chunks/{chunk-WGOQGKS5.js → chunk-PTI3TP7P.js} +1 -1
  41. package/dist/chunks/{chunk-QC5AMRWR.js → chunk-QEXSF4NA.js} +1 -1
  42. package/dist/chunks/{chunk-6RVMAWKT.js → chunk-QOFK5PKB.js} +2 -2
  43. package/dist/chunks/{chunk-XJXX4QXA.js → chunk-SI7FQJIE.js} +1 -1
  44. package/dist/chunks/{chunk-GF7EG5IA.js → chunk-TCQZFIBR.js} +1 -1
  45. package/dist/chunks/{chunk-A63VVXW2.js → chunk-TE2EE7DR.js} +1 -1
  46. package/dist/chunks/{chunk-WKZ6JSGZ.js → chunk-TKBORMUF.js} +1 -1
  47. package/dist/chunks/{chunk-GLJH35MJ.js → chunk-TLEBLYBS.js} +1 -1
  48. package/dist/chunks/{chunk-MMPQC2N6.js → chunk-U73RXMGU.js} +1 -1
  49. package/dist/chunks/{chunk-6HOVHRWJ.js → chunk-V3RDOM3U.js} +3 -3
  50. package/dist/chunks/{chunk-GCSAJUL6.js → chunk-VEMJINMZ.js} +1 -1
  51. package/dist/chunks/{chunk-ELDHGU6N.js → chunk-VLDU2MDL.js} +1 -1
  52. package/dist/chunks/{chunk-QC3HEGFD.js → chunk-VRAMXFRB.js} +1 -1
  53. package/dist/chunks/{chunk-TDDZGUU6.js → chunk-VS7O22ED.js} +1 -1
  54. package/dist/chunks/{chunk-AALI66ML.js → chunk-WCBNKVVG.js} +1 -1
  55. package/dist/chunks/{chunk-GWZ4VPU3.js → chunk-WN7EJWN4.js} +2 -2
  56. package/dist/chunks/{chunk-MV4WHUIC.js → chunk-XEBMH33W.js} +1 -1
  57. package/dist/chunks/chunk-XOETL6DB.js +96 -0
  58. package/dist/chunks/{chunk-IYCHAIFZ.js → chunk-YQKURZ5W.js} +1 -1
  59. package/dist/chunks/{chunk-EXPLBM7J.js → chunk-ZDKSDWSO.js} +1 -1
  60. package/dist/chunks/{chunk-YS542RHZ.js → chunk-ZMY3GQBK.js} +1 -1
  61. package/dist/chunks/{clear-2VHJFFMM.js → clear-35NUHHDI.js} +1 -1
  62. package/dist/chunks/{compile-vercel-config-ADKZDUAU.js → compile-vercel-config-UQIYIVA6.js} +1 -1
  63. package/dist/chunks/{config-D22GD5IM.js → config-FZD3R5VT.js} +1 -1
  64. package/dist/chunks/{config-AZ2O2E4R.js → config-IQE5C7PZ.js} +1 -1
  65. package/dist/chunks/{constants-JAB7MRSK.js → constants-ICJL2EO5.js} +1 -1
  66. package/dist/chunks/{delete-4JCBFL7Y.js → delete-6LSSOF4X.js} +1 -1
  67. package/dist/chunks/{delete-UOY7IFZV.js → delete-IBRCB3S3.js} +1 -1
  68. package/dist/chunks/{detect-projects-LFEZ7BQU.js → detect-projects-THLTMO7V.js} +1 -1
  69. package/dist/chunks/{detect-services-A2B6KJO5.js → detect-services-GFVD2C3W.js} +1 -1
  70. package/dist/chunks/{disable-Q5BTSVR7.js → disable-4TODXYTB.js} +1 -1
  71. package/dist/chunks/{discard-5LQP6CPX.js → discard-WHC5FKWF.js} +1 -1
  72. package/dist/chunks/{edit-R5X24DJJ.js → edit-3DXOWQMF.js} +1 -1
  73. package/dist/chunks/{edit-3XGKBSUZ.js → edit-R2RUDKC4.js} +1 -1
  74. package/dist/chunks/{enable-V2IPH6TD.js → enable-2OAHPKCN.js} +1 -1
  75. package/dist/chunks/{export-WLJE6AJW.js → export-KTLACTAJ.js} +1 -1
  76. package/dist/chunks/{future-6UTK4EFE.js → future-JZ3RVO4B.js} +1 -1
  77. package/dist/chunks/{generate-cert-for-deploy-WDKFR34X.js → generate-cert-for-deploy-D4IHTKQS.js} +1 -1
  78. package/dist/chunks/{image-IL7IN7MD.js → image-UW5U6CRJ.js} +1 -1
  79. package/dist/chunks/{import-builders-FX2XXVRT.js → import-builders-JONKAYLL.js} +1 -1
  80. package/dist/chunks/{inspect-E2HPGMNI.js → inspect-2FS4PYBH.js} +1 -1
  81. package/dist/chunks/{inspect-F6NLCWHN.js → inspect-7IZ7M2TX.js} +1 -1
  82. package/dist/chunks/{inspect-DZMXSBMA.js → inspect-JDSFHP6X.js} +1 -1
  83. package/dist/chunks/{inspect-UNZR445S.js → inspect-PQNECP2Z.js} +1 -1
  84. package/dist/chunks/{inspect-VVYQWFTM.js → inspect-PWLUWUGV.js} +1 -1
  85. package/dist/chunks/{list-G4E6RG3V.js → list-2G2BWD4T.js} +1 -1
  86. package/dist/chunks/{list-GDI5O246.js → list-3N2CBVOG.js} +1 -1
  87. package/dist/chunks/{list-DXOVBT4F.js → list-Y3OA4KFK.js} +1 -1
  88. package/dist/chunks/{login-XPUGYRGM.js → login-LLM3Q6GJ.js} +1 -1
  89. package/dist/chunks/{login-HU5OFS7T.js → login-VQN3F7JU.js} +1 -1
  90. package/dist/chunks/{logs-EWXTZN4W.js → logs-XEJPLFXM.js} +1 -1
  91. package/dist/chunks/{ls-PF2XG6UU.js → ls-2DACOWSU.js} +1 -1
  92. package/dist/chunks/{ls-SZKDUJHV.js → ls-2M7QSW2F.js} +1 -1
  93. package/dist/chunks/{ls-CGZ3NL5R.js → ls-5YLXAARZ.js} +1 -1
  94. package/dist/chunks/{ls-A3HIPTF5.js → ls-7DJWHOK4.js} +1 -1
  95. package/dist/chunks/{ls-TCB7UUPP.js → ls-GY2YLYMD.js} +1 -1
  96. package/dist/chunks/{ls-A4NEYMKP.js → ls-NJEJSYSO.js} +1 -1
  97. package/dist/chunks/{ls-3GNX6IPE.js → ls-OAJKYQEL.js} +1 -1
  98. package/dist/chunks/{mutate-BQAP2S7A.js → mutate-G2I4ISF4.js} +1 -1
  99. package/dist/chunks/{notifications-WUCV63TE.js → notifications-6MXYY2V6.js} +1 -1
  100. package/dist/chunks/{open-QJE5QER2.js → open-YKOYB7PH.js} +1 -1
  101. package/dist/chunks/{openapi-BQSQNXQE.js → openapi-36GMGEXR.js} +1 -1
  102. package/dist/chunks/{permissions-6LOJKL5W.js → permissions-RRP6IEHS.js} +1 -1
  103. package/dist/chunks/{prompt-missing-credentials-IGTCFUA6.js → prompt-missing-credentials-WQUF6X6K.js} +1 -1
  104. package/dist/chunks/{publish-XR24NSTQ.js → publish-AQ3FYC3J.js} +1 -1
  105. package/dist/chunks/{pull-CXUNHWAO.js → pull-HT2MQ3ML.js} +1 -1
  106. package/dist/chunks/{purchase-domain-if-available-4YKWAHH5.js → purchase-domain-if-available-NDEUZYHK.js} +1 -1
  107. package/dist/chunks/{push-YOAY5F5X.js → push-6LE54BCC.js} +1 -1
  108. package/dist/chunks/{query-GHFOZV7K.js → query-SNY42BTX.js} +1 -1
  109. package/dist/chunks/{reauthenticate-W7QIXLZ3.js → reauthenticate-4SGT475I.js} +1 -1
  110. package/dist/chunks/{reorder-TQGSMCBZ.js → reorder-SRF3NE5U.js} +1 -1
  111. package/dist/chunks/{reply-G4EVGJQ3.js → reply-6HUIX4AX.js} +1 -1
  112. package/dist/chunks/{resolve-SNM6MK5J.js → resolve-TNBNGA3G.js} +1 -1
  113. package/dist/chunks/{resolve-agent-team-43HZCPF3.js → resolve-agent-team-XSXRT42F.js} +1 -1
  114. package/dist/chunks/{restore-3NDP224I.js → restore-HK4SWMZP.js} +1 -1
  115. package/dist/chunks/{rm-2TR2KBDP.js → rm-4VXZ3AIX.js} +1 -1
  116. package/dist/chunks/{rm-REZG7TP4.js → rm-ESSU4MS4.js} +1 -1
  117. package/dist/chunks/{rm-OI5VS7GG.js → rm-EWPYZXTX.js} +1 -1
  118. package/dist/chunks/{rm-N6ZUA66Z.js → rm-GNDGYUKQ.js} +1 -1
  119. package/dist/chunks/{rm-IGY6LD6H.js → rm-SKCAZTYN.js} +1 -1
  120. package/dist/chunks/{rule-inspect-NLEABBTP.js → rule-inspect-RHHD5UIR.js} +1 -1
  121. package/dist/chunks/{rules-XSLHADBV.js → rules-FF5FU7BV.js} +1 -1
  122. package/dist/chunks/{schema-KG4RWQBC.js → schema-HIKNWMV2.js} +1 -1
  123. package/dist/chunks/{schema-HWS2SOZS.js → schema-QHZO72DB.js} +1 -1
  124. package/dist/chunks/{select-org-AAB5RBSB.js → select-org-CK5CWC3A.js} +1 -1
  125. package/dist/chunks/{set-AJEMEBZU.js → set-5P44OPZP.js} +1 -1
  126. package/dist/chunks/{setup-and-link-6AIRWXXX.js → setup-and-link-OLSKD2HE.js} +1 -1
  127. package/dist/chunks/{tags-O6R6VWPP.js → tags-35DFWGDC.js} +1 -1
  128. package/dist/chunks/{types-Y3NJROKH.js → types-77UW6BI4.js} +1 -1
  129. package/dist/chunks/{update-C7XR7CHI.js → update-WHBFIV22.js} +1 -1
  130. package/dist/commands/build/index.js +1 -1
  131. package/dist/commands/deploy/index.js +4 -4
  132. package/dist/commands/dev/index.js +14 -101
  133. package/dist/commands/env/index.js +1 -1
  134. package/dist/commands/link/index.js +1 -1
  135. package/dist/commands/list/index.js +1 -1
  136. package/dist/commands-bulk.js +14 -13
  137. package/dist/index.js +2 -2
  138. package/dist/internal-build.js +1 -1
  139. package/dist/root-help-commands.mjs +1 -1
  140. package/dist/version.mjs +1 -1
  141. package/package.json +56 -54
  142. package/dist/chunks/chunk-BAT6SDBJ.js +0 -10
@@ -4,7 +4,7 @@ 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{fetchDeploymentBuildEnv,resolvePerDirectoryLinkRoot}from"../../chunks/chunk-A63VVXW2.js";import{isIgnoredFile,singleFileConfig,singleFileProjectSettings,validatePaths,validateRootDirectory}from"../../chunks/chunk-444RE4Z5.js";import{promptExperimentalServicesMigration}from"../../chunks/chunk-KKQL4AKH.js";import"../../chunks/chunk-QC5AMRWR.js";import{DeployTelemetryClient,Now,UploadErrorMissingArchive,getBuildMachineResourceConfig,getProductionUrl,printDeploymentStatus,printPrebuiltFilePathMapIgnoreWarning}from"../../chunks/chunk-6RVMAWKT.js";import{require_async_sema}from"../../chunks/chunk-NZ2TFADV.js";import"../../chunks/chunk-AQUDXMFH.js";import"../../chunks/chunk-V6Y6UK6B.js";import"../../chunks/chunk-IQ7FPAI4.js";import{parseRepoUrl}from"../../chunks/chunk-MZ3QGJH3.js";import"../../chunks/chunk-EAUDC24V.js";import{pickOverrides}from"../../chunks/chunk-6GIP2YPX.js";import{require_dist as require_dist2,require_ignore}from"../../chunks/chunk-GWZ4VPU3.js";import"../../chunks/chunk-BLAIBYEU.js";import{compileVercelConfig}from"../../chunks/chunk-OCOVCC5Q.js";import"../../chunks/chunk-RRDNKB2X.js";import"../../chunks/chunk-MVGTMPMI.js";import"../../chunks/chunk-SACGQMVQ.js";import"../../chunks/chunk-U56NHYAH.js";import{require_ci_info}from"../../chunks/chunk-2EYYB6YN.js";import{require_semver}from"../../chunks/chunk-BPUANOGW.js";import"../../chunks/chunk-3E364MJE.js";import"../../chunks/chunk-7EJQLVWX.js";import"../../chunks/chunk-6HOVHRWJ.js";import"../../chunks/chunk-O4FDRZ22.js";import"../../chunks/chunk-T3GQAMBJ.js";import"../../chunks/chunk-P2O5DOYE.js";import{isGuidanceEnabled}from"../../chunks/chunk-YROIQRYI.js";import{stamp_default}from"../../chunks/chunk-A2RZZQEP.js";import{getSubcommand}from"../../chunks/chunk-ETV3C2CV.js";import"../../chunks/chunk-J24BABG4.js";import{ensureLink,parseEnv}from"../../chunks/chunk-YS542RHZ.js";import"../../chunks/chunk-GCSAJUL6.js";import"../../chunks/chunk-E6R2QOOR.js";import"../../chunks/chunk-PVASGBEF.js";import"../../chunks/chunk-MVCAUS4F.js";import{continueSubcommand,deployCommand,deprecatedArchiveSplitTgz,describeSubcommand,getCommandAliases,initSubcommand}from"../../chunks/chunk-NLCTF4EJ.js";import"../../chunks/chunk-ZBDLYNUF.js";import"../../chunks/chunk-J6O6JW2K.js";import"../../chunks/chunk-BFRDBBSO.js";import"../../chunks/chunk-2UMWTCY7.js";import"../../chunks/chunk-Q5ZGA2RO.js";import"../../chunks/chunk-UGMTKOTN.js";import"../../chunks/chunk-UQIVF4Q2.js";import"../../chunks/chunk-ITKS32PG.js";import"../../chunks/chunk-7NNENHGN.js";import"../../chunks/chunk-Y24OSBXP.js";import"../../chunks/chunk-GVVIFYQE.js";import"../../chunks/chunk-W3TGCMRW.js";import"../../chunks/chunk-B4YYOSPY.js";import"../../chunks/chunk-LD5U73LA.js";import"../../chunks/chunk-VRWLNWNE.js";import"../../chunks/chunk-TPVAPVQC.js";import"../../chunks/chunk-JALVF3C2.js";import"../../chunks/chunk-FBYA6LLM.js";import"../../chunks/chunk-CMKLX4DC.js";import"../../chunks/chunk-EVQJ7SCV.js";import"../../chunks/chunk-SCV7XEEO.js";import{param}from"../../chunks/chunk-3G3FQYMW.js";import{parseMeta}from"../../chunks/chunk-CZSOZKHX.js";import"../../chunks/chunk-Q7D7RGXM.js";import{parseTarget}from"../../chunks/chunk-2B3A3MOX.js";import{getDeployment}from"../../chunks/chunk-IVIZLWZQ.js";import{mapCertError}from"../../chunks/chunk-HVUJNVPS.js";import"../../chunks/chunk-UCAE5Z5L.js";import{help}from"../../chunks/chunk-H3KYG32S.js";import{table}from"../../chunks/chunk-773GOZIR.js";import{printError}from"../../chunks/chunk-QAETJRKX.js";import"../../chunks/chunk-67GZ5REA.js";import"../../chunks/chunk-BS32OUOC.js";import{validateJsonOutput,wantsMachineReadableOutput}from"../../chunks/chunk-D4MW3RDW.js";import{highlight,readLocalConfig}from"../../chunks/chunk-IIC2A4YN.js";import{TelemetryClient}from"../../chunks/chunk-KUGXOLL7.js";import"../../chunks/chunk-MV4WHUIC.js";import"../../chunks/chunk-VKXEOL4K.js";import{require_ms}from"../../chunks/chunk-MXTC4ZAQ.js";import"../../chunks/chunk-NWGBDBZI.js";import"../../chunks/chunk-4SAVH3H7.js";import{require_types}from"../../chunks/chunk-ZS2WS4AM.js";import"../../chunks/chunk-AOWWC6WZ.js";import{getFetchDispatcher}from"../../chunks/chunk-MY4MONOH.js";import{isArgumentError,parseArguments}from"../../chunks/chunk-ELDHGU6N.js";import{AGENT_REASON,AGENT_STATUS,buildCommandWithYes,outputAgentError,quoteArg,withGlobalFlags}from"../../chunks/chunk-BAT6SDBJ.js";import{getFlagsSpecification}from"../../chunks/chunk-MI7W4QMV.js";import{VERCEL_DIR,VERCEL_DIR_PROJECT,addToGitIgnore,createGitMeta,findProjectsFromPath,getGitConfigPath,getGitExecutable,getLinkFromDir,getProjectLink,getRepoLink,getVercelDirectory,isOwnerLookupUnavailableLink,isRemoteLookupSkippedLink,linkFolderToProject,parseGitConfig,pluckRemoteUrls,require_lib}from"../../chunks/chunk-U3NQZJQ4.js";import"../../chunks/chunk-ROPQIBWJ.js";import"../../chunks/chunk-VKPZP4LC.js";import"../../chunks/chunk-PPCFQQSU.js";import{printAlignedLabel}from"../../chunks/chunk-IJCCFLCQ.js";import"../../chunks/chunk-ZQME5XUJ.js";import"../../chunks/chunk-2VBFQZ72.js";import{AliasDomainConfigured,BuildError,BuildsRateLimited,ConflictingConfigFiles,ConflictingFilePath,ConflictingPathSegment,DeploymentNotFound,DeploymentsRateLimited,DeprecatedNowJson,DomainNotFound,DomainNotVerified,DomainPermissionDenied,DomainVerificationFailed,InvalidDomain,InvalidToken,MissingBuildScript,NotDomainOwner,NowError,SchemaValidationFailed,TooManyRequests,UserAborted,code,isAPIError,require_bytes}from"../../chunks/chunk-XSDAUM4F.js";import{getCommandName,packageName}from"../../chunks/chunk-JESNVRVR.js";import{cliErrorFromUnknown,emoji,link_default,output_manager_default,prependEmoji,recordCliError,require_build_utils}from"../../chunks/chunk-M774HRX5.js";import{require_dist}from"../../chunks/chunk-RM3ZDRYE.js";import"../../chunks/chunk-OO572JUC.js";import"../../chunks/chunk-D3AHZ5LI.js";import"../../chunks/chunk-2GHZGOWT.js";import"../../chunks/chunk-YHPPP3SF.js";import{require_source}from"../../chunks/chunk-NB2WLB3J.js";import"../../chunks/chunk-ISWW3DKF.js";import"../../chunks/chunk-BRQUZ5NC.js";import{__toESM}from"../../chunks/chunk-BZENIQ7N.js";var import_build_utils11=__toESM(require_build_utils(),1),import_client=__toESM(require_dist2(),1),import_error_utils2=__toESM(require_dist(),1);var import_bytes=__toESM(require_bytes(),1),import_chalk=__toESM(require_source(),1),import_fs_extra4=__toESM(require_lib(),1),import_ms=__toESM(require_ms(),1);import{tmpdir}from"os";import{basename as basename3,dirname as dirname3,extname,join as join17,resolve as resolve3}from"path";async function createDeploy(client,now,contextName,path2,createArgs,org,isSettingUpProject,archive){try{return await now.create(path2,createArgs,org,isSettingUpProject,archive)}catch(err){if(isAPIError(err)){if(err.code==="rate_limited")throw new DeploymentsRateLimited(err.message);if(err.code==="domain_missing")throw new DomainNotFound(err.value);if(err.code==="domain_not_found"&&err.domain)throw new DomainNotFound(err.domain);if(err.code==="domain_not_verified"&&err.domain)throw new DomainNotVerified(err.domain);if(err.code==="domain_not_verified"&&err.value)throw new DomainVerificationFailed(err.value);if(err.code==="not_domain_owner")throw new NotDomainOwner(err.message);if(err.code==="builds_rate_limited")throw new BuildsRateLimited(err.message,{ctaLabel:err.ctaLabel,ctaUrl:err.ctaUrl,action:err.action,link:err.link});if(err.code==="forbidden")throw new DomainPermissionDenied(err.value,contextName);if(err.code==="bad_request"&&err.keyword)throw new SchemaValidationFailed(err.message,err.keyword,err.dataPath,err.params);if(err.code==="domain_configured")throw new AliasDomainConfigured(err);if(err.code==="missing_build_script")throw new MissingBuildScript(err);if(err.code==="conflicting_file_path")throw new ConflictingFilePath(err);if(err.code==="conflicting_path_segment")throw new ConflictingPathSegment(err);if(err.code==="cert_missing"){let{default:generateCertForDeploy}=await import("../../chunks/generate-cert-for-deploy-WDKFR34X.js"),result=await generateCertForDeploy(client,contextName,err.value);return result instanceof NowError?result:createDeploy(client,now,contextName,path2,createArgs,org,isSettingUpProject)}if(err.code==="not_found")throw new DeploymentNotFound({context:contextName});let certError=mapCertError(err);if(certError)return certError}throw err}}async function getDeploymentChecks(client,deploymentId){return await client.fetch(`/v1/deployments/${encodeURIComponent(deploymentId)}/checks`)}async function getDeploymentCheckRuns(client,deploymentId){return await client.fetch(`/v2/deployments/${encodeURIComponent(deploymentId)}/check-runs`)}function parseNdjson(text){let entries=[];for(let line of text.split(`
7
+ import{fetchDeploymentBuildEnv,resolvePerDirectoryLinkRoot}from"../../chunks/chunk-TE2EE7DR.js";import{isIgnoredFile,singleFileConfig,singleFileProjectSettings,validatePaths,validateRootDirectory}from"../../chunks/chunk-OHVPJNGY.js";import{promptExperimentalServicesMigration}from"../../chunks/chunk-MPZFMEVK.js";import"../../chunks/chunk-QEXSF4NA.js";import{DeployTelemetryClient,Now,UploadErrorMissingArchive,getBuildMachineResourceConfig,getProductionUrl,printDeploymentStatus,printPrebuiltFilePathMapIgnoreWarning}from"../../chunks/chunk-QOFK5PKB.js";import{require_async_sema}from"../../chunks/chunk-NZ2TFADV.js";import"../../chunks/chunk-3NNH2U5M.js";import"../../chunks/chunk-V6Y6UK6B.js";import"../../chunks/chunk-IQ7FPAI4.js";import{parseRepoUrl}from"../../chunks/chunk-MZ3QGJH3.js";import"../../chunks/chunk-EAUDC24V.js";import{pickOverrides}from"../../chunks/chunk-OYMFOCD5.js";import{require_dist as require_dist2,require_ignore}from"../../chunks/chunk-WN7EJWN4.js";import"../../chunks/chunk-5S2NK6K6.js";import{compileVercelConfig}from"../../chunks/chunk-JZ7FDBS4.js";import"../../chunks/chunk-RRDNKB2X.js";import"../../chunks/chunk-MVGTMPMI.js";import"../../chunks/chunk-SACGQMVQ.js";import"../../chunks/chunk-U56NHYAH.js";import{require_ci_info}from"../../chunks/chunk-2EYYB6YN.js";import{require_semver}from"../../chunks/chunk-BPUANOGW.js";import"../../chunks/chunk-D6REP5QQ.js";import"../../chunks/chunk-V3RDOM3U.js";import"../../chunks/chunk-O4FDRZ22.js";import"../../chunks/chunk-T3GQAMBJ.js";import"../../chunks/chunk-P2O5DOYE.js";import{isGuidanceEnabled}from"../../chunks/chunk-YROIQRYI.js";import{stamp_default}from"../../chunks/chunk-A2RZZQEP.js";import{getSubcommand}from"../../chunks/chunk-ETV3C2CV.js";import"../../chunks/chunk-J24BABG4.js";import{ensureLink,parseEnv}from"../../chunks/chunk-ZMY3GQBK.js";import"../../chunks/chunk-VEMJINMZ.js";import"../../chunks/chunk-CITTRAYH.js";import"../../chunks/chunk-PVASGBEF.js";import"../../chunks/chunk-MVCAUS4F.js";import{continueSubcommand,deployCommand,deprecatedArchiveSplitTgz,describeSubcommand,getCommandAliases,initSubcommand}from"../../chunks/chunk-MYHJNSCW.js";import"../../chunks/chunk-ZBDLYNUF.js";import"../../chunks/chunk-J6O6JW2K.js";import"../../chunks/chunk-BFRDBBSO.js";import"../../chunks/chunk-2UMWTCY7.js";import"../../chunks/chunk-Q5ZGA2RO.js";import"../../chunks/chunk-UGMTKOTN.js";import"../../chunks/chunk-UQIVF4Q2.js";import"../../chunks/chunk-ITKS32PG.js";import"../../chunks/chunk-7NNENHGN.js";import"../../chunks/chunk-Y24OSBXP.js";import"../../chunks/chunk-GVVIFYQE.js";import"../../chunks/chunk-W3TGCMRW.js";import"../../chunks/chunk-B4YYOSPY.js";import"../../chunks/chunk-LD5U73LA.js";import"../../chunks/chunk-VRWLNWNE.js";import"../../chunks/chunk-TPVAPVQC.js";import"../../chunks/chunk-JALVF3C2.js";import"../../chunks/chunk-FBYA6LLM.js";import"../../chunks/chunk-CMKLX4DC.js";import"../../chunks/chunk-EVQJ7SCV.js";import"../../chunks/chunk-7EJQLVWX.js";import"../../chunks/chunk-SCV7XEEO.js";import{param}from"../../chunks/chunk-3G3FQYMW.js";import{parseMeta}from"../../chunks/chunk-CZSOZKHX.js";import"../../chunks/chunk-Q7D7RGXM.js";import{parseTarget}from"../../chunks/chunk-2B3A3MOX.js";import{getDeployment}from"../../chunks/chunk-IVIZLWZQ.js";import{mapCertError}from"../../chunks/chunk-HVUJNVPS.js";import"../../chunks/chunk-UCAE5Z5L.js";import{help}from"../../chunks/chunk-H3KYG32S.js";import{table}from"../../chunks/chunk-773GOZIR.js";import{printError}from"../../chunks/chunk-HARXQZV3.js";import"../../chunks/chunk-67GZ5REA.js";import"../../chunks/chunk-BS32OUOC.js";import{validateJsonOutput,wantsMachineReadableOutput}from"../../chunks/chunk-D4MW3RDW.js";import{highlight,readLocalConfig}from"../../chunks/chunk-GLH4PVMY.js";import{TelemetryClient}from"../../chunks/chunk-KUGXOLL7.js";import"../../chunks/chunk-XEBMH33W.js";import"../../chunks/chunk-VKXEOL4K.js";import{require_ms}from"../../chunks/chunk-MXTC4ZAQ.js";import"../../chunks/chunk-NWGBDBZI.js";import"../../chunks/chunk-4SAVH3H7.js";import{require_types}from"../../chunks/chunk-ZS2WS4AM.js";import"../../chunks/chunk-AOWWC6WZ.js";import{getFetchDispatcher}from"../../chunks/chunk-MY4MONOH.js";import{isArgumentError,parseArguments}from"../../chunks/chunk-VLDU2MDL.js";import{AGENT_REASON,AGENT_STATUS,buildCommandWithYes,outputAgentError,quoteArg,withGlobalFlags}from"../../chunks/chunk-DDLM6CIQ.js";import{getFlagsSpecification}from"../../chunks/chunk-MI7W4QMV.js";import{VERCEL_DIR,VERCEL_DIR_PROJECT,addToGitIgnore,createGitMeta,findProjectsFromPath,getGitConfigPath,getGitExecutable,getLinkFromDir,getProjectLink,getRepoLink,getVercelDirectory,isOwnerLookupUnavailableLink,isRemoteLookupSkippedLink,linkFolderToProject,parseGitConfig,pluckRemoteUrls,require_lib}from"../../chunks/chunk-JIGCN5QS.js";import"../../chunks/chunk-ROPQIBWJ.js";import"../../chunks/chunk-VKPZP4LC.js";import"../../chunks/chunk-PPCFQQSU.js";import{printAlignedLabel}from"../../chunks/chunk-IJCCFLCQ.js";import"../../chunks/chunk-ZQME5XUJ.js";import"../../chunks/chunk-2VBFQZ72.js";import{AliasDomainConfigured,BuildError,BuildsRateLimited,ConflictingConfigFiles,ConflictingFilePath,ConflictingPathSegment,DeploymentNotFound,DeploymentsRateLimited,DeprecatedNowJson,DomainNotFound,DomainNotVerified,DomainPermissionDenied,DomainVerificationFailed,InvalidDomain,InvalidToken,MissingBuildScript,NotDomainOwner,NowError,SchemaValidationFailed,TooManyRequests,UserAborted,code,isAPIError,require_bytes}from"../../chunks/chunk-XSDAUM4F.js";import{getCommandName,packageName}from"../../chunks/chunk-JESNVRVR.js";import{cliErrorFromUnknown,emoji,link_default,output_manager_default,prependEmoji,recordCliError,require_build_utils}from"../../chunks/chunk-M774HRX5.js";import{require_dist}from"../../chunks/chunk-RM3ZDRYE.js";import"../../chunks/chunk-OO572JUC.js";import"../../chunks/chunk-D3AHZ5LI.js";import"../../chunks/chunk-2GHZGOWT.js";import"../../chunks/chunk-YHPPP3SF.js";import{require_source}from"../../chunks/chunk-NB2WLB3J.js";import"../../chunks/chunk-ISWW3DKF.js";import"../../chunks/chunk-BRQUZ5NC.js";import{__toESM}from"../../chunks/chunk-BZENIQ7N.js";var import_build_utils11=__toESM(require_build_utils(),1),import_client=__toESM(require_dist2(),1),import_error_utils2=__toESM(require_dist(),1);var import_bytes=__toESM(require_bytes(),1),import_chalk=__toESM(require_source(),1),import_fs_extra4=__toESM(require_lib(),1),import_ms=__toESM(require_ms(),1);import{tmpdir}from"os";import{basename as basename3,dirname as dirname3,extname,join as join17,resolve as resolve3}from"path";async function createDeploy(client,now,contextName,path2,createArgs,org,isSettingUpProject,archive){try{return await now.create(path2,createArgs,org,isSettingUpProject,archive)}catch(err){if(isAPIError(err)){if(err.code==="rate_limited")throw new DeploymentsRateLimited(err.message);if(err.code==="domain_missing")throw new DomainNotFound(err.value);if(err.code==="domain_not_found"&&err.domain)throw new DomainNotFound(err.domain);if(err.code==="domain_not_verified"&&err.domain)throw new DomainNotVerified(err.domain);if(err.code==="domain_not_verified"&&err.value)throw new DomainVerificationFailed(err.value);if(err.code==="not_domain_owner")throw new NotDomainOwner(err.message);if(err.code==="builds_rate_limited")throw new BuildsRateLimited(err.message,{ctaLabel:err.ctaLabel,ctaUrl:err.ctaUrl,action:err.action,link:err.link});if(err.code==="forbidden")throw new DomainPermissionDenied(err.value,contextName);if(err.code==="bad_request"&&err.keyword)throw new SchemaValidationFailed(err.message,err.keyword,err.dataPath,err.params);if(err.code==="domain_configured")throw new AliasDomainConfigured(err);if(err.code==="missing_build_script")throw new MissingBuildScript(err);if(err.code==="conflicting_file_path")throw new ConflictingFilePath(err);if(err.code==="conflicting_path_segment")throw new ConflictingPathSegment(err);if(err.code==="cert_missing"){let{default:generateCertForDeploy}=await import("../../chunks/generate-cert-for-deploy-D4IHTKQS.js"),result=await generateCertForDeploy(client,contextName,err.value);return result instanceof NowError?result:createDeploy(client,now,contextName,path2,createArgs,org,isSettingUpProject)}if(err.code==="not_found")throw new DeploymentNotFound({context:contextName});let certError=mapCertError(err);if(certError)return certError}throw err}}async function getDeploymentChecks(client,deploymentId){return await client.fetch(`/v1/deployments/${encodeURIComponent(deploymentId)}/checks`)}async function getDeploymentCheckRuns(client,deploymentId){return await client.fetch(`/v2/deployments/${encodeURIComponent(deploymentId)}/check-runs`)}function parseNdjson(text){let entries=[];for(let line of text.split(`
8
8
  `))if(line.trim())try{entries.push(JSON.parse(line))}catch{}return entries}async function getDeploymentCheckRunLogs(client,deploymentId,checkRunId){let url=`/v2/deployments/${encodeURIComponent(deploymentId)}/check-runs/${encodeURIComponent(checkRunId)}/logs`;await new Promise(resolve4=>setTimeout(resolve4,1e3));for(let attempt=0;attempt<5;attempt++){attempt>0&&await new Promise(resolve4=>setTimeout(resolve4,2e3));let res=await client.fetch(url,{json:!1}),text=typeof res=="string"?res:await res.text(),entries=parseNdjson(text);if(entries.some(e=>e.level==="eof"))return entries.filter(e=>e.level!=="eof"&&e.level!=="debug").map(({level,timestamp,message})=>({level,timestamp,message}))}return[]}var import_fs_extra=__toESM(require_lib(),1);import{join}from"path";async function getPrebuiltJson(directory){try{return await import_fs_extra.default.readJSON(join(directory,"builds.json"))}catch{}return null}var PROTECTION_METHODS=[{setting:"ssoProtection",id:"vercel_authentication",name:"Vercel Authentication"},{setting:"passwordProtection",id:"password",name:"Password Protection"}];async function getEnabledProtection(client,project){try{let settings=await client.fetch(`/v9/projects/${encodeURIComponent(project.id)}`,{accountId:project.accountId});return PROTECTION_METHODS.filter(method=>settings[method.setting])}catch(err){return output_manager_default.debug(`Could not read Deployment Protection settings: ${err}`),null}}import{resolve}from"path";var SUPPORTED_PROVIDERS=new Set(["github","gitlab","bitbucket"]),defaultDeps={getGitConfigPath,parseGitConfig,fetchProject:(client,project)=>client.fetch(`/v9/projects/${encodeURIComponent(project.id)}`,{accountId:project.accountId}),buildCommand:(client,command)=>withGlobalFlags(client,command,{preserveProject:!0})};async function getGitConnectRecommendation(client,cwd,project,options={}){let{alreadyOffered=!1,deps=defaultDeps}=options;try{if(project.link||alreadyOffered)return;let gitConfigPath=deps.getGitConfigPath({cwd});if(!gitConfigPath)return;let gitConfig=await deps.parseGitConfig(gitConfigPath),remoteUrls=gitConfig&&pluckRemoteUrls(gitConfig);if(!remoteUrls)return;let remotes=Object.values(remoteUrls);if(!remotes.some(remoteUrl=>{let repo=parseRepoUrl(remoteUrl);return repo&&SUPPORTED_PROVIDERS.has(repo.provider)})||client.nonInteractive&&remotes.length!==1||(await deps.fetchProject(client,project)).link)return;let cwdFlag=resolve(cwd)===resolve(client.cwd)?"":` --cwd ${quoteArg(cwd)}`;return deps.buildCommand(client,`git connect${cwdFlag}`)}catch(error){output_manager_default.debug(`Failed to resolve Git connection guidance: ${error}`);return}}var import_types=__toESM(require_types(),1),validArchiveFormats=new Set(import_types.VALID_ARCHIVE_FORMATS);function isValidArchive(archive){return validArchiveFormats.has(archive)}function getErrorCta(source){if(typeof source.ctaLabel=="string"&&typeof source.ctaUrl=="string")return{label:source.ctaLabel,url:source.ctaUrl};if(typeof source.action=="string"&&typeof source.link=="string")return{label:source.action,url:source.link}}var DescribeError=class extends Error{constructor(reason,message){super(message);this.reason=reason}};var DescribeTelemetryClient=class extends TelemetryClient{trackCliOptionId(value){value&&this.trackCliOption({option:"id",value:this.redactedValue})}trackCliOptionAwsAccountId(value){value&&this.trackCliOption({option:"aws-account-id",value:this.redactedValue})}trackCliFlagJson(value){value&&this.trackCliFlag("json")}};import{createHash as createHash3}from"node:crypto";import{createHash as createHash2}from"node:crypto";function getFunctionConfig(lambda){return{runtime:lambda.runtime,handler:lambda.handler,architecture:lambda.architecture,environment:Object.fromEntries(Object.entries(lambda.environment).filter(entry=>typeof entry[1]=="string")),..."launcherType"in lambda&&lambda.launcherType==="Nodejs"?{launcherType:lambda.launcherType,awsLambdaHandler:lambda.awsLambdaHandler,shouldAddHelpers:lambda.shouldAddHelpers,shouldAddSourcemapSupport:lambda.shouldAddSourcemapSupport,shouldDisableAutomaticFetchInstrumentation:lambda.shouldDisableAutomaticFetchInstrumentation,useWebApi:lambda.useWebApi}:{},memory:lambda.memory,affinity:lambda.affinity,maxConcurrency:lambda.maxConcurrency,maxDuration:lambda.maxDuration,regions:lambda.regions,functionFailoverRegions:lambda.functionFailoverRegions,supportsResponseStreaming:lambda.supportsResponseStreaming,framework:lambda.framework&&{...lambda.framework}}}var import_build_utils=__toESM(require_build_utils(),1),ROOT_BOOTSTRAP_PATH="bootstrap",USER_BOOTSTRAP_PATH="___vc_bootstrap",NATIVELY_WRAPPER_SUPPORTED_FAMILIES=["nodejs","python","ruby","java","dotnetcore","bun","executable"],BOOTSTRAP_SHIM=`#!/bin/sh
9
9
  USER_BOOTSTRAP="/var/task/${USER_BOOTSTRAP_PATH}"
10
10
 
@@ -20,7 +20,7 @@ exec "$USER_BOOTSTRAP" "$@"
20
20
  `):output_manager_default.error(message),code2),parsed;try{parsed=parseArguments(client.argv.slice(2),getFlagsSpecification(describeSubcommand.options))}catch(error){return fail("invalid_arguments",`${isArgumentError(error)?error.message:"Invalid describe options"}. Run \`vercel deploy describe --help\` for usage.`,2)}asJson=parsed.flags["--json"]===!0;let deploymentId=parsed.flags["--id"],awsAccountId=parsed.flags["--aws-account-id"];if((parsed.args[0]==="deploy"?parsed.args.slice(1):parsed.args).length>1)return fail("invalid_arguments","Unexpected positional arguments. Run `vercel deploy describe --help` for usage.",2);if(!deploymentId||!/^dpl_[a-zA-Z0-9]+$/.test(deploymentId))return fail("invalid_arguments","Provide a deployment ID with --id, such as --id dpl_xxx.",2);if(!awsAccountId||!/^\d{12}$/.test(awsAccountId))return fail("invalid_arguments","Provide a 12-digit AWS account ID with --aws-account-id.",2);if(process.platform==="win32")return fail("unsupported_platform","vercel deploy describe is not supported on Windows yet. Run it on macOS or Linux.");let telemetry=new DescribeTelemetryClient({opts:{store:client.telemetryEventStore}});telemetry.trackCliOptionId(deploymentId),telemetry.trackCliOptionAwsAccountId(awsAccountId),telemetry.trackCliFlagJson(parsed.flags["--json"]);try{let project=await resolveDescribeProject(client),explicitTeam=parsed.flags["--scope"]?client.config.currentTeam:process.env.VERCEL_ORG_ID;if(explicitTeam&&explicitTeam!==project.orgId)return fail("scope_mismatch","The selected team does not match the local project link. Use the linked team, or run `vercel pull --yes` with the intended VERCEL_ORG_ID and VERCEL_PROJECT_ID.");if(process.env.VERCEL_PROJECT_ID&&process.env.VERCEL_PROJECT_ID!==project.projectId)return fail("project_mismatch","VERCEL_PROJECT_ID differs from the linked project. Run `vercel pull --yes` to restore settings for the intended project.");client.config.currentTeam=project.orgId.startsWith("team_")?project.orgId:void 0,asJson||output_manager_default.log(`Preparing ${deploymentId} in team ${project.orgId} for AWS account ${awsAccountId}`);let directory=await describeDeployment(client,{directory:project.directory,repoRootPath:project.repoRootPath,deploymentId,awsAccountId,teamId:project.orgId,quiet:asJson}),descriptor=join14(directory,"descriptor.json");if(asJson)client.stdout.write(`${JSON.stringify({deployment:{id:deploymentId},awsAccountId,directory,descriptor})}
21
21
  `);else{client.stdout.write(`${descriptor}
22
22
  `),output_manager_default.log(`Prepared function packages in ${directory}`);let cwd=project.directory===client.cwd?"":` --cwd ${quoteArg(project.directory)}`;output_manager_default.log(`Provision the functions in descriptor.json, then run:
23
- vercel deploy continue --id ${deploymentId}${cwd}`)}return 0}catch(error){return output_manager_default.debug(error instanceof Error?error.stack??error.message:String(error)),error instanceof DescribeError?fail(error.reason,error.message):error instanceof InvalidToken||isAPIError(error)&&error.status===401?fail("not_authorized","Could not authenticate with Vercel. Check VERCEL_TOKEN in CI, or run `vercel login`."):isAPIError(error)&&error.status===403?fail("not_authorized","Vercel denied access to this deployment. Check that your token has access to the linked project and team."):isAPIError(error)&&error.status===404?fail("not_found",`Deployment ${deploymentId} was not found, or manual provisioning is not enabled for this team.`):isAPIError(error)&&error.status<500&&error.serverMessage?fail("api_error",error.serverMessage):fail("describe_failed","Could not prepare deployment functions. Check the local build and deployment access, then rerun this command.")}}var import_fs_extra3=__toESM(require_lib(),1);import{join as join16}from"path";var import_fs_extra2=__toESM(require_lib(),1),import_ci_info=__toESM(require_ci_info(),1),import_build_utils10=__toESM(require_build_utils(),1),import_error_utils=__toESM(require_dist(),1);import{join as join15}from"path";var VERCEL_DIR_ANONYMOUS="anonymous.json";function anonymousStatePath(cwd){return join15(cwd,VERCEL_DIR,VERCEL_DIR_ANONYMOUS)}async function readAnonymousState(cwd){try{let state=await(0,import_fs_extra2.readJSON)(anonymousStatePath(cwd));if(typeof state?.projectId=="string"&&typeof state.token=="string"&&typeof state.claimUrl=="string"&&typeof state.expiresAt=="number")return state}catch{}return null}async function writeAnonymousState(cwd,state){let path2=anonymousStatePath(cwd);await(0,import_fs_extra2.outputJSON)(path2,state,{spaces:2,mode:384}),await(0,import_fs_extra2.chmod)(path2,384),await addToGitIgnore(cwd)}async function clearAnonymousState(cwd){await(0,import_fs_extra2.remove)(anonymousStatePath(cwd))}async function bootstrapAnonymousProject(client){let{projectId,token,claimUrl,expiresAt}=await client.fetch("/v1/anonymous/projects?surface=cli",{method:"POST",body:{},useCurrentTeam:!1,retry:{retries:0}});return{projectId,token,claimUrl,expiresAt}}async function ensureAnonymousLink(client,cwd,{requireExistingState=!1,confirmed=!0}={}){if(import_ci_info.default.isCI||!!((0,import_build_utils10.getPlatformEnv)("ORG_ID")&&(0,import_build_utils10.getPlatformEnv)("PROJECT_ID"))||!!await getLinkFromDir(getVercelDirectory(cwd))||!!(await getRepoLink(client,cwd))?.repoConfig)return"refused";let state=await readAnonymousState(cwd);if(state&&state.expiresAt<=Date.now())return output_manager_default.prettyError({message:`Your temporary deployment has expired. Run ${getCommandName("login")} to create an account and keep deploying this app.`}),"failed";if(!state&&requireExistingState)return"refused";if(!confirmed&&!state)return"confirmation-required";if(!state){try{state=await bootstrapAnonymousProject(client)}catch(err){return output_manager_default.debug(`Anonymous bootstrap failed: ${(0,import_error_utils.errorToString)(err)}`),"refused"}await writeAnonymousState(cwd,state),output_manager_default.log("Not authenticated. Deploying anonymously.")}return client.authConfig={token:state.token,skipWrite:!0},delete process.env.VERCEL_TEAM_ID,{status:"linked",anonymous:!0,expiresAt:state.expiresAt,claimUrl:state.claimUrl,org:{type:"user",id:"",slug:"anonymous"},project:{id:state.projectId,name:state.projectId}}}function validateAnonymousTarget(isAnonymous,target){return isAnonymous&&target&&target!=="production"?(output_manager_default.error(`Anonymous deployments always target production, so "${target}" is not available. Remove the ${param("--target")} option, or run ${getCommandName("login")} to deploy to other environments.`),!1):!0}async function setupAnonymousDeployment(client,cwd,{isAnonymous,dryRun}){isAnonymous||await clearAnonymousState(cwd);let anonymousLink;if(isAnonymous){let anonymous=await ensureAnonymousLink(client,cwd,{requireExistingState:dryRun});if(anonymous==="refused"){output_manager_default.log("Temporary deployments aren't available for this attempt. Log in to continue.");let{default:promptMissingCredentials}=await import("../../chunks/prompt-missing-credentials-IGTCFUA6.js"),loginExitCode=await promptMissingCredentials(client);if(loginExitCode!==0)return loginExitCode;isAnonymous=!1}else{if(anonymous==="failed")return 1;if(anonymous==="confirmation-required")return 1;anonymousLink=anonymous}}return{isAnonymous,anonymousLink}}async function handleAnonymousDeploymentError({client,cwd,error,link,isV0,retry}){if(!(!link||!isAPIError(error))){if(error.code==="anonymous_project_claimed"){if(client.nonInteractive||!client.stdin.isTTY)return output_manager_default.prettyError({message:`This project was claimed successfully. Run ${getCommandName("login")} to continue deploying it.`}),1;output_manager_default.log("This project was claimed successfully. Log in to continue deploying it.");let loginExitCode;try{let{default:login}=await import("../../chunks/login-HU5OFS7T.js");loginExitCode=await login(client,{shouldParseArgs:!1})}catch(loginError){return printError(loginError),1}if(loginExitCode!==0)return loginExitCode;let claimedProjectLink=await ensureLink("deploy",client,cwd,{autoConfirm:!0,projectName:link.project.id,failIfNotFound:!0,allowOwnerLookupFallback:!0,v0:isV0});return typeof claimedProjectLink=="number"?claimedProjectLink:(await linkFolderToProject(client,cwd,{projectId:claimedProjectLink.project.id,orgId:claimedProjectLink.org.id},claimedProjectLink.project.name,claimedProjectLink.org.slug,"link",!0,!1),await clearAnonymousState(cwd),retry())}if(error.status===401||error.status===410)return await clearAnonymousState(cwd),output_manager_default.prettyError({message:`Your temporary deployment has expired. Run ${getCommandName("login")} to create an account and keep deploying this app.`}),1}}async function runImplicitBuild(client,cwd){let projectJsonPath=join16(cwd,VERCEL_DIR,VERCEL_DIR_PROJECT),projectJsonExists=await import_fs_extra3.default.pathExists(projectJsonPath);projectJsonExists||await import_fs_extra3.default.outputJSON(projectJsonPath,{settings:{}},{spaces:2}),await import_fs_extra3.default.pathExists(join16(cwd,"package.json"))&&output_manager_default.log("Building your project locally\u2026");let originalArgv=client.argv,originalCwd=client.cwd,originalStdout=client.stdout,previousVercelFirstDeployment=process.env.VERCEL_FIRST_DEPLOYMENT;client.cwd=cwd,client.setArgv([...originalArgv.slice(0,2),"build","--prod","--yes"]),process.env.VERCEL_FIRST_DEPLOYMENT="1",client.stdout=createSinkStream();try{let build=(await import("../build/index.js")).default;return await build(client)}finally{client.setArgv(originalArgv),client.cwd=originalCwd,client.stdout=originalStdout,previousVercelFirstDeployment===void 0?delete process.env.VERCEL_FIRST_DEPLOYMENT:process.env.VERCEL_FIRST_DEPLOYMENT=previousVercelFirstDeployment,projectJsonExists||await import_fs_extra3.default.remove(projectJsonPath)}}function createSinkStream(){return{isTTY:!1,write:()=>!0}}var COMMAND_CONFIG={init:getCommandAliases(initSubcommand),continue:getCommandAliases(continueSubcommand),describe:getCommandAliases(describeSubcommand)},deploy_default=async client=>{let telemetryClient=new DeployTelemetryClient({opts:{store:client.telemetryEventStore}}),parsedArguments=null,flagsSpecification=getFlagsSpecification(deployCommand.options);try{parsedArguments=parseArguments(client.argv.slice(2),flagsSpecification,{permissive:!0})}catch(error){return printError(error),2}let subArgs=parsedArguments.args[0]===deployCommand.name?parsedArguments.args.slice(1):parsedArguments.args,{subcommand,subcommandOriginal}=getSubcommand(subArgs,COMMAND_CONFIG);function printSubcommandHelp(command){output_manager_default.print(help(command,{parent:deployCommand,columns:client.stderr.columns}))}switch(subcommand){case"init":return parsedArguments.flags["--help"]?(telemetryClient.trackCliFlagHelp("deploy",subcommandOriginal),printSubcommandHelp(initSubcommand),0):(telemetryClient.trackCliSubcommandInit(subcommandOriginal),handleInitDeployment(client,telemetryClient));case"continue":return parsedArguments.flags["--help"]?(telemetryClient.trackCliFlagHelp("deploy",subcommandOriginal),printSubcommandHelp(continueSubcommand),0):(telemetryClient.trackCliSubcommandContinue(subcommandOriginal),handleContinueSubcommand(client,telemetryClient));case"describe":return parsedArguments.flags["--help"]?(telemetryClient.trackCliFlagHelp("deploy",subcommandOriginal),printSubcommandHelp(describeSubcommand),0):(telemetryClient.trackCliSubcommandDescribe(subcommandOriginal),describe(client));default:return parsedArguments.flags["--help"]?(telemetryClient.trackCliFlagHelp("deploy"),output_manager_default.print(help(deployCommand,{columns:client.stderr.columns})),0):handleDefaultDeploy(client,telemetryClient)}};async function handleInitDeployment(client,telemetryClient){let flagsSpecification=getFlagsSpecification(initSubcommand.options),parsedArguments;try{parsedArguments=parseArguments(client.argv.slice(2),flagsSpecification)}catch(error2){return printError(error2),2}telemetryClient.trackCliFlagJson(parsedArguments.flags["--json"]),telemetryClient.trackCliOptionFormat(parsedArguments.flags["--format"]),telemetryClient.trackCliOptionProject(parsedArguments.flags["--project"]);let projectNameOrId=parsedArguments.flags["--project"],formatResult=validateJsonOutput(parsedArguments.flags);if(!formatResult.valid)return output_manager_default.error(formatResult.error),2;let asJson=formatResult.jsonOutput||client.nonInteractive,args=parsedArguments.args;args[0]==="deploy"&&(args=args.slice(1)),args[0]==="init"&&(args=args.slice(1));let paths;args.length>0?(paths=args.map(item=>resolve3(client.cwd,item)),telemetryClient.trackCliArgumentProjectPath(paths[0])):paths=[client.cwd];let pathValidation=await validatePaths(client,paths);if(!pathValidation.valid)return pathValidation.exitCode;await compileVercelConfig(paths[0]);let localConfig=paths[0]===client.cwd?client.localConfig||readLocalConfig(paths[0]):readLocalConfig(paths[0]);if(localConfig){client.localConfig=localConfig;let{version}=localConfig,file=highlight(localConfig[import_client.fileNameSymbol]),prop=code("version");if(version)if(typeof version=="number"){if(version!==2){let two=code(String(2));return output_manager_default.error(`The value of the ${prop} property within ${file} can only be ${two}.`),1}}else return output_manager_default.error(`The ${prop} property inside your ${file} file must be a number.`),1}let{log,debug,error}=output_manager_default,quiet=!client.stdout.isTTY,{path:cwd}=pathValidation,autoConfirm=parsedArguments.flags["--yes"],target=parseTarget({flagName:"target",flags:parsedArguments.flags});telemetryClient.trackTargetEnvironment(target);let parsedArchive=parsedArguments.flags["--archive"];if(typeof parsedArchive=="string"&&!(isValidArchive(parsedArchive)||parsedArchive===deprecatedArchiveSplitTgz))return output_manager_default.error(`Format must be one of: ${import_client.VALID_ARCHIVE_FORMATS.join(", ")}`),2;parsedArchive===deprecatedArchiveSplitTgz&&output_manager_default.print(`${prependEmoji(`${param("--archive=tgz")} now has the same behavior as ${param("--archive=split-tgz")}. Please use ${param("--archive=tgz")} instead.`,emoji("warning"))}
23
+ vercel deploy continue --id ${deploymentId}${cwd}`)}return 0}catch(error){return output_manager_default.debug(error instanceof Error?error.stack??error.message:String(error)),error instanceof DescribeError?fail(error.reason,error.message):error instanceof InvalidToken||isAPIError(error)&&error.status===401?fail("not_authorized","Could not authenticate with Vercel. Check VERCEL_TOKEN in CI, or run `vercel login`."):isAPIError(error)&&error.status===403?fail("not_authorized","Vercel denied access to this deployment. Check that your token has access to the linked project and team."):isAPIError(error)&&error.status===404?fail("not_found",`Deployment ${deploymentId} was not found, or manual provisioning is not enabled for this team.`):isAPIError(error)&&error.status<500&&error.serverMessage?fail("api_error",error.serverMessage):fail("describe_failed","Could not prepare deployment functions. Check the local build and deployment access, then rerun this command.")}}var import_fs_extra3=__toESM(require_lib(),1);import{join as join16}from"path";var import_fs_extra2=__toESM(require_lib(),1),import_ci_info=__toESM(require_ci_info(),1),import_build_utils10=__toESM(require_build_utils(),1),import_error_utils=__toESM(require_dist(),1);import{join as join15}from"path";var VERCEL_DIR_ANONYMOUS="anonymous.json";function anonymousStatePath(cwd){return join15(cwd,VERCEL_DIR,VERCEL_DIR_ANONYMOUS)}async function readAnonymousState(cwd){try{let state=await(0,import_fs_extra2.readJSON)(anonymousStatePath(cwd));if(typeof state?.projectId=="string"&&typeof state.token=="string"&&typeof state.claimUrl=="string"&&typeof state.expiresAt=="number")return state}catch{}return null}async function writeAnonymousState(cwd,state){let path2=anonymousStatePath(cwd);await(0,import_fs_extra2.outputJSON)(path2,state,{spaces:2,mode:384}),await(0,import_fs_extra2.chmod)(path2,384),await addToGitIgnore(cwd)}async function clearAnonymousState(cwd){await(0,import_fs_extra2.remove)(anonymousStatePath(cwd))}async function bootstrapAnonymousProject(client){let{projectId,token,claimUrl,expiresAt}=await client.fetch("/v1/anonymous/projects?surface=cli",{method:"POST",body:{},useCurrentTeam:!1,retry:{retries:0}});return{projectId,token,claimUrl,expiresAt}}async function ensureAnonymousLink(client,cwd,{requireExistingState=!1,confirmed=!0}={}){if(import_ci_info.default.isCI||!!((0,import_build_utils10.getPlatformEnv)("ORG_ID")&&(0,import_build_utils10.getPlatformEnv)("PROJECT_ID"))||!!await getLinkFromDir(getVercelDirectory(cwd))||!!(await getRepoLink(client,cwd))?.repoConfig)return"refused";let state=await readAnonymousState(cwd);if(state&&state.expiresAt<=Date.now())return output_manager_default.prettyError({message:`Your temporary deployment has expired. Run ${getCommandName("login")} to create an account and keep deploying this app.`}),"failed";if(!state&&requireExistingState)return"refused";if(!confirmed&&!state)return"confirmation-required";if(!state){try{state=await bootstrapAnonymousProject(client)}catch(err){return output_manager_default.debug(`Anonymous bootstrap failed: ${(0,import_error_utils.errorToString)(err)}`),"refused"}await writeAnonymousState(cwd,state),output_manager_default.log("Not authenticated. Deploying anonymously.")}return client.authConfig={token:state.token,skipWrite:!0},delete process.env.VERCEL_TEAM_ID,{status:"linked",anonymous:!0,expiresAt:state.expiresAt,claimUrl:state.claimUrl,org:{type:"user",id:"",slug:"anonymous"},project:{id:state.projectId,name:state.projectId}}}function validateAnonymousTarget(isAnonymous,target){return isAnonymous&&target&&target!=="production"?(output_manager_default.error(`Anonymous deployments always target production, so "${target}" is not available. Remove the ${param("--target")} option, or run ${getCommandName("login")} to deploy to other environments.`),!1):!0}async function setupAnonymousDeployment(client,cwd,{isAnonymous,dryRun}){isAnonymous||await clearAnonymousState(cwd);let anonymousLink;if(isAnonymous){let anonymous=await ensureAnonymousLink(client,cwd,{requireExistingState:dryRun});if(anonymous==="refused"){output_manager_default.log("Temporary deployments aren't available for this attempt. Log in to continue.");let{default:promptMissingCredentials}=await import("../../chunks/prompt-missing-credentials-WQUF6X6K.js"),loginExitCode=await promptMissingCredentials(client);if(loginExitCode!==0)return loginExitCode;isAnonymous=!1}else{if(anonymous==="failed")return 1;if(anonymous==="confirmation-required")return 1;anonymousLink=anonymous}}return{isAnonymous,anonymousLink}}async function handleAnonymousDeploymentError({client,cwd,error,link,isV0,retry}){if(!(!link||!isAPIError(error))){if(error.code==="anonymous_project_claimed"){if(client.nonInteractive||!client.stdin.isTTY)return output_manager_default.prettyError({message:`This project was claimed successfully. Run ${getCommandName("login")} to continue deploying it.`}),1;output_manager_default.log("This project was claimed successfully. Log in to continue deploying it.");let loginExitCode;try{let{default:login}=await import("../../chunks/login-VQN3F7JU.js");loginExitCode=await login(client,{shouldParseArgs:!1})}catch(loginError){return printError(loginError),1}if(loginExitCode!==0)return loginExitCode;let claimedProjectLink=await ensureLink("deploy",client,cwd,{autoConfirm:!0,projectName:link.project.id,failIfNotFound:!0,allowOwnerLookupFallback:!0,v0:isV0});return typeof claimedProjectLink=="number"?claimedProjectLink:(await linkFolderToProject(client,cwd,{projectId:claimedProjectLink.project.id,orgId:claimedProjectLink.org.id},claimedProjectLink.project.name,claimedProjectLink.org.slug,"link",!0,!1),await clearAnonymousState(cwd),retry())}if(error.status===401||error.status===410)return await clearAnonymousState(cwd),output_manager_default.prettyError({message:`Your temporary deployment has expired. Run ${getCommandName("login")} to create an account and keep deploying this app.`}),1}}async function runImplicitBuild(client,cwd){let projectJsonPath=join16(cwd,VERCEL_DIR,VERCEL_DIR_PROJECT),projectJsonExists=await import_fs_extra3.default.pathExists(projectJsonPath);projectJsonExists||await import_fs_extra3.default.outputJSON(projectJsonPath,{settings:{}},{spaces:2}),await import_fs_extra3.default.pathExists(join16(cwd,"package.json"))&&output_manager_default.log("Building your project locally\u2026");let originalArgv=client.argv,originalCwd=client.cwd,originalStdout=client.stdout,previousVercelFirstDeployment=process.env.VERCEL_FIRST_DEPLOYMENT;client.cwd=cwd,client.setArgv([...originalArgv.slice(0,2),"build","--prod","--yes"]),process.env.VERCEL_FIRST_DEPLOYMENT="1",client.stdout=createSinkStream();try{let build=(await import("../build/index.js")).default;return await build(client)}finally{client.setArgv(originalArgv),client.cwd=originalCwd,client.stdout=originalStdout,previousVercelFirstDeployment===void 0?delete process.env.VERCEL_FIRST_DEPLOYMENT:process.env.VERCEL_FIRST_DEPLOYMENT=previousVercelFirstDeployment,projectJsonExists||await import_fs_extra3.default.remove(projectJsonPath)}}function createSinkStream(){return{isTTY:!1,write:()=>!0}}var COMMAND_CONFIG={init:getCommandAliases(initSubcommand),continue:getCommandAliases(continueSubcommand),describe:getCommandAliases(describeSubcommand)},deploy_default=async client=>{let telemetryClient=new DeployTelemetryClient({opts:{store:client.telemetryEventStore}}),parsedArguments=null,flagsSpecification=getFlagsSpecification(deployCommand.options);try{parsedArguments=parseArguments(client.argv.slice(2),flagsSpecification,{permissive:!0})}catch(error){return printError(error),2}let subArgs=parsedArguments.args[0]===deployCommand.name?parsedArguments.args.slice(1):parsedArguments.args,{subcommand,subcommandOriginal}=getSubcommand(subArgs,COMMAND_CONFIG);function printSubcommandHelp(command){output_manager_default.print(help(command,{parent:deployCommand,columns:client.stderr.columns}))}switch(subcommand){case"init":return parsedArguments.flags["--help"]?(telemetryClient.trackCliFlagHelp("deploy",subcommandOriginal),printSubcommandHelp(initSubcommand),0):(telemetryClient.trackCliSubcommandInit(subcommandOriginal),handleInitDeployment(client,telemetryClient));case"continue":return parsedArguments.flags["--help"]?(telemetryClient.trackCliFlagHelp("deploy",subcommandOriginal),printSubcommandHelp(continueSubcommand),0):(telemetryClient.trackCliSubcommandContinue(subcommandOriginal),handleContinueSubcommand(client,telemetryClient));case"describe":return parsedArguments.flags["--help"]?(telemetryClient.trackCliFlagHelp("deploy",subcommandOriginal),printSubcommandHelp(describeSubcommand),0):(telemetryClient.trackCliSubcommandDescribe(subcommandOriginal),describe(client));default:return parsedArguments.flags["--help"]?(telemetryClient.trackCliFlagHelp("deploy"),output_manager_default.print(help(deployCommand,{columns:client.stderr.columns})),0):handleDefaultDeploy(client,telemetryClient)}};async function handleInitDeployment(client,telemetryClient){let flagsSpecification=getFlagsSpecification(initSubcommand.options),parsedArguments;try{parsedArguments=parseArguments(client.argv.slice(2),flagsSpecification)}catch(error2){return printError(error2),2}telemetryClient.trackCliFlagJson(parsedArguments.flags["--json"]),telemetryClient.trackCliOptionFormat(parsedArguments.flags["--format"]),telemetryClient.trackCliOptionProject(parsedArguments.flags["--project"]);let projectNameOrId=parsedArguments.flags["--project"],formatResult=validateJsonOutput(parsedArguments.flags);if(!formatResult.valid)return output_manager_default.error(formatResult.error),2;let asJson=formatResult.jsonOutput||client.nonInteractive,args=parsedArguments.args;args[0]==="deploy"&&(args=args.slice(1)),args[0]==="init"&&(args=args.slice(1));let paths;args.length>0?(paths=args.map(item=>resolve3(client.cwd,item)),telemetryClient.trackCliArgumentProjectPath(paths[0])):paths=[client.cwd];let pathValidation=await validatePaths(client,paths);if(!pathValidation.valid)return pathValidation.exitCode;await compileVercelConfig(paths[0]);let localConfig=paths[0]===client.cwd?client.localConfig||readLocalConfig(paths[0]):readLocalConfig(paths[0]);if(localConfig){client.localConfig=localConfig;let{version}=localConfig,file=highlight(localConfig[import_client.fileNameSymbol]),prop=code("version");if(version)if(typeof version=="number"){if(version!==2){let two=code(String(2));return output_manager_default.error(`The value of the ${prop} property within ${file} can only be ${two}.`),1}}else return output_manager_default.error(`The ${prop} property inside your ${file} file must be a number.`),1}let{log,debug,error}=output_manager_default,quiet=!client.stdout.isTTY,{path:cwd}=pathValidation,autoConfirm=parsedArguments.flags["--yes"],target=parseTarget({flagName:"target",flags:parsedArguments.flags});telemetryClient.trackTargetEnvironment(target);let parsedArchive=parsedArguments.flags["--archive"];if(typeof parsedArchive=="string"&&!(isValidArchive(parsedArchive)||parsedArchive===deprecatedArchiveSplitTgz))return output_manager_default.error(`Format must be one of: ${import_client.VALID_ARCHIVE_FORMATS.join(", ")}`),2;parsedArchive===deprecatedArchiveSplitTgz&&output_manager_default.print(`${prependEmoji(`${param("--archive=tgz")} now has the same behavior as ${param("--archive=split-tgz")}. Please use ${param("--archive=tgz")} instead.`,emoji("warning"))}
24
24
  `);let cliMeta=parseMeta(parsedArguments.flags["--meta"]),isV0=cliMeta.v0==="true";getGitExecutable(cwd);let link=await ensureLink("deploy",client,cwd,{autoConfirm,projectName:projectNameOrId??localConfig?.name,failIfNotFound:!!projectNameOrId,v0:isV0});if(typeof link=="number")return link;let{org,project}=link,rootDirectory=project.rootDirectory,sourceFilesOutsideRootDirectory=project.sourceFilesOutsideRootDirectory??!0;link.repoRoot&&(cwd=link.repoRoot);let contextName=org.slug;if(client.config.currentTeam=org.type==="team"?org.id:void 0,rootDirectory&&await validateRootDirectory(cwd,join17(cwd,rootDirectory),project?`To change your Project Settings, go to https://vercel.com/${org?.slug}/${project.name}/settings`:"")===!1)return 1;if(await promptExperimentalServicesMigration({client,cwd:join17(cwd,rootDirectory||""),autoConfirm:!!parsedArguments.flags["--yes"],nonInteractive:client.nonInteractive})&&(localConfig=readLocalConfig(join17(cwd,rootDirectory||""))),rootDirectory){let rootDirectoryPath=join17(cwd,rootDirectory);await compileVercelConfig(rootDirectoryPath);let rootDirectoryConfig=readLocalConfig(rootDirectoryPath);rootDirectoryConfig?(debug(`Read local config from root directory (${rootDirectory})`),localConfig=rootDirectoryConfig):localConfig&&output_manager_default.print(`${prependEmoji(`The ${highlight(localConfig[import_client.fileNameSymbol])} file should be inside of the provided root directory.`,emoji("warning"))}
25
25
  `)}localConfig=localConfig||{},localConfig.name&&output_manager_default.print(`${prependEmoji(`The ${code("name")} property in ${highlight(localConfig[import_client.fileNameSymbol])} is deprecated (https://vercel.link/name-prop)`,emoji("warning"))}
26
26
  `);let isObject=item=>Object.prototype.toString.call(item)==="[object Object]";if(typeof localConfig.env<"u"&&!isObject(localConfig.env))return error(`The ${code("env")} property in ${highlight(localConfig[import_client.fileNameSymbol])} needs to be an object`),1;if(typeof localConfig.build<"u"){if(!isObject(localConfig.build))return error(`The ${code("build")} property in ${highlight(localConfig[import_client.fileNameSymbol])} needs to be an object`),1;if(typeof localConfig.build.env<"u"&&!isObject(localConfig.build.env))return error(`The ${code("build.env")} property in ${highlight(localConfig[import_client.fileNameSymbol])} needs to be an object`),1}let meta=Object.assign({},parseMeta(localConfig.meta),cliMeta),gitMetadata=createGitMeta(join17(cwd,project.rootDirectory||""),project);gitMetadata.catch(()=>{});let deploymentEnv=Object.assign({},parseEnv(localConfig.env),parseEnv(parsedArguments.flags["--env"])),deploymentBuildEnv=Object.assign({},parseEnv(localConfig.build&&localConfig.build.env),parseEnv(parsedArguments.flags["--build-env"]));try{await addProcessEnv(log,deploymentEnv),await addProcessEnv(log,deploymentBuildEnv)}catch(err){return error((0,import_error_utils2.errorToString)(err)),1}let regionFlag=(parsedArguments.flags["--regions"]||"").split(",").map(s=>s.trim()).filter(Boolean),regions=regionFlag.length>0?regionFlag:localConfig.regions,currentTeam=org.type==="team"?org.id:void 0,now=new Now({client,currentTeam}),deployStamp=stamp_default(),localConfigurationOverrides=pickOverrides(localConfig),name=project.name;if(!name)throw new Error("`name` not found on project or provided by existing project");let noWait=!0;try{let autoAssignCustomDomains=parsedArguments.flags["--skip-domain"]?!1:void 0,createArgs={name,env:deploymentEnv,build:{env:deploymentBuildEnv},forceNew:parsedArguments.flags["--force"],withCache:parsedArguments.flags["--with-cache"],prebuilt:!0,vercelOutputDir:void 0,rootDirectory,quiet,nowConfig:{...localConfig,images:void 0},regions,meta,gitMetadata,deployStamp,target,skipAutoDetectionConfirmation:autoConfirm,noWait,withFullLogs:!1,autoAssignCustomDomains,manual:!0,jsonOutput:asJson,linkedProject:project};(!localConfig.builds||localConfig.builds.length===0)&&(createArgs.projectSettings={sourceFilesOutsideRootDirectory,rootDirectory,...localConfigurationOverrides});let{packageJson}=await(0,import_build_utils11.findPackageJson)(join17(cwd,project?.rootDirectory??""),!0,cwd),nodeVersion;if(packageJson?.engines?.node)try{let{range}=await(0,import_build_utils11.getSupportedNodeVersion)(packageJson.engines.node);nodeVersion=range}catch(error2){error2 instanceof Error&&output_manager_default.warn(error2.message)}createArgs.projectSettings||(createArgs.projectSettings={}),createArgs.projectSettings.nodeVersion=nodeVersion;let deployment=await createDeploy(client,now,contextName,cwd,createArgs,org,!project,parsedArchive?"tgz":void 0);if(deployment instanceof NotDomainOwner)return recordCliError({code:"not_domain_owner"}),client.nonInteractive?(client.stdout.write(`${JSON.stringify({status:AGENT_STATUS.ERROR,reason:"not_domain_owner",message:deployment.message,next:[{command:withGlobalFlags(client,"deploy"),when:"retry deploy"}]},null,2)}
@@ -49,9 +49,9 @@ ${err.stack}`),err instanceof UploadErrorMissingArchive)return output_manager_de
49
49
  `),1):(error("Uploading failed. Please try again."),1)}catch(err){recordCliError(cliErrorFromUnknown(err)),(0,import_error_utils2.isError)(err)&&debug(`Error: ${err}
50
50
  ${err.stack}`);let anonymousExitCode=await handleAnonymousDeploymentError({client,cwd,error:err,link:anonymousLink,isV0,retry:()=>handleDefaultDeploy(client,telemetryClient)});if(anonymousExitCode!==void 0)return anonymousExitCode;if(err instanceof UploadErrorMissingArchive)return client.nonInteractive?(client.stdout.write(`${JSON.stringify({status:AGENT_STATUS.ERROR,reason:"missing_archive",message:err.message,next:[{command:redeployCommand,when:"retry deploy"}]},null,2)}
51
51
  `),1):(output_manager_default.prettyError(err),1);if(err instanceof NotDomainOwner)return recordCliError({code:"not_domain_owner"},{override:!0}),client.nonInteractive?(client.stdout.write(`${JSON.stringify({status:AGENT_STATUS.ERROR,reason:"not_domain_owner",message:err.message,next:[{command:redeployCommand,when:"retry deploy"}]},null,2)}
52
- `),1):(output_manager_default.error(err.message),1);if(err instanceof DomainNotFound&&err.meta&&err.meta.domain){output_manager_default.debug(`The domain ${err.meta.domain} was not found, trying to purchase it`);let{default:purchaseDomainIfAvailable}=await import("../../chunks/purchase-domain-if-available-4YKWAHH5.js"),purchase=await purchaseDomainIfAvailable(client,err.meta.domain,contextName);return purchase===!0?(output_manager_default.success(`Successfully purchased the domain ${err.meta.domain}!`),0):purchase===!1||purchase instanceof UserAborted?(handleCreateDeployError(deployment,localConfig),1):(handleCreateDeployError(purchase,localConfig)!==1&&output_manager_default.error(purchase.message),1)}if(err instanceof DomainNotFound||err instanceof DomainNotVerified||err instanceof NotDomainOwner||err instanceof DomainPermissionDenied||err instanceof DomainVerificationFailed||err instanceof SchemaValidationFailed||err instanceof InvalidDomain||err instanceof DeploymentNotFound||err instanceof BuildsRateLimited||err instanceof DeploymentsRateLimited||err instanceof AliasDomainConfigured||err instanceof MissingBuildScript||err instanceof ConflictingFilePath||err instanceof ConflictingPathSegment||err instanceof ConflictingConfigFiles)return client.nonInteractive&&client.stdout.write(`${JSON.stringify({status:AGENT_STATUS.ERROR,reason:"deploy_failed",message:err instanceof Error?err.message:String(err),next:[{command:redeployCommand,when:"retry deploy"}]},null,2)}
52
+ `),1):(output_manager_default.error(err.message),1);if(err instanceof DomainNotFound&&err.meta&&err.meta.domain){output_manager_default.debug(`The domain ${err.meta.domain} was not found, trying to purchase it`);let{default:purchaseDomainIfAvailable}=await import("../../chunks/purchase-domain-if-available-NDEUZYHK.js"),purchase=await purchaseDomainIfAvailable(client,err.meta.domain,contextName);return purchase===!0?(output_manager_default.success(`Successfully purchased the domain ${err.meta.domain}!`),0):purchase===!1||purchase instanceof UserAborted?(handleCreateDeployError(deployment,localConfig),1):(handleCreateDeployError(purchase,localConfig)!==1&&output_manager_default.error(purchase.message),1)}if(err instanceof DomainNotFound||err instanceof DomainNotVerified||err instanceof NotDomainOwner||err instanceof DomainPermissionDenied||err instanceof DomainVerificationFailed||err instanceof SchemaValidationFailed||err instanceof InvalidDomain||err instanceof DeploymentNotFound||err instanceof BuildsRateLimited||err instanceof DeploymentsRateLimited||err instanceof AliasDomainConfigured||err instanceof MissingBuildScript||err instanceof ConflictingFilePath||err instanceof ConflictingPathSegment||err instanceof ConflictingConfigFiles)return client.nonInteractive&&client.stdout.write(`${JSON.stringify({status:AGENT_STATUS.ERROR,reason:"deploy_failed",message:err instanceof Error?err.message:String(err),next:[{command:redeployCommand,when:"retry deploy"}]},null,2)}
53
53
  `),handleCreateDeployError(err,localConfig),1;if(err instanceof BuildError){let buildFailedNext=[...now.url?[{command:withGlobalFlags(client,`inspect ${now.url} --logs`),when:"read build logs"}]:[],{command:redeployCommand,when:"retry deploy"}];if(now.url)try{let failedDeployment=await getDeployment(client,contextName,now.url);if(asJson){output_manager_default.stopSpinner();let deploymentJson=getDeploymentOutputJson(failedDeployment,client.apiUrl,{name:"BUILD_ERROR",message:err.message}),payload=client.nonInteractive?{status:AGENT_STATUS.ERROR,reason:"build_failed",message:err.message,deployment:deploymentJson,next:buildFailedNext}:deploymentJson;client.stdout.write(`${JSON.stringify(payload,null,2)}
54
- `)}else if(withFullLogs===!1){let{displayBuildLogsUntilFinalError}=await import("../../chunks/logs-EWXTZN4W.js");await displayBuildLogsUntilFinalError(client,failedDeployment,err.message)}}catch{if(asJson){output_manager_default.stopSpinner();let payload=client.nonInteractive?{status:AGENT_STATUS.ERROR,reason:"build_failed",message:err.message,url:`https://${now.url}`,next:buildFailedNext}:{error:{name:"BUILD_ERROR",message:err.message},url:`https://${now.url}`};client.stdout.write(`${JSON.stringify(payload,null,2)}
54
+ `)}else if(withFullLogs===!1){let{displayBuildLogsUntilFinalError}=await import("../../chunks/logs-XEJPLFXM.js");await displayBuildLogsUntilFinalError(client,failedDeployment,err.message)}}catch{if(asJson){output_manager_default.stopSpinner();let payload=client.nonInteractive?{status:AGENT_STATUS.ERROR,reason:"build_failed",message:err.message,url:`https://${now.url}`,next:buildFailedNext}:{error:{name:"BUILD_ERROR",message:err.message},url:`https://${now.url}`};client.stdout.write(`${JSON.stringify(payload,null,2)}
55
55
  `)}else output_manager_default.log(`To check build logs run: ${getCommandName(`inspect ${now.url} --logs`)}`),output_manager_default.log(`Or inspect them in your browser at https://${now.url}/_logs`)}else client.nonInteractive&&(output_manager_default.stopSpinner(),client.stdout.write(`${JSON.stringify({status:AGENT_STATUS.ERROR,reason:"build_failed",message:err.message,next:buildFailedNext},null,2)}
56
56
  `));return 1}if(isAPIError(err)&&err.code==="size_limit_exceeded"){let{sizeLimit=0}=err,message=`File size limit exceeded (${(0,import_bytes.default)(sizeLimit)})`;return client.nonInteractive&&client.stdout.write(`${JSON.stringify({status:AGENT_STATUS.ERROR,reason:"size_limit_exceeded",message,next:[{command:redeployCommand,when:"retry deploy"}]},null,2)}
57
57
  `),error(message),1}return client.nonInteractive&&client.stdout.write(`${JSON.stringify({status:AGENT_STATUS.ERROR,reason:"deploy_failed",message:err instanceof Error?err.message:String(err),next:[{command:redeployCommand,when:"retry deploy"}]},null,2)}