@vercel/cli-support 68.1.0-snapshot-f8c293166d1f → 68.1.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 (291) hide show
  1. package/dist/chunks/add-57EE2LQO.js +8 -0
  2. package/dist/chunks/{add-CDHMIDYR.js → add-DNRNPUU7.js} +1 -1
  3. package/dist/chunks/{add-JC2KSFHX.js → add-FLVE2M3L.js} +1 -1
  4. package/dist/chunks/{alerts-TMFON3SU.js → alerts-26PDHRBL.js} +1 -1
  5. package/dist/chunks/{build-ALEGEJFV.js → build-6WTRWW2M.js} +1 -1
  6. package/dist/chunks/{chunk-B6QW2OXJ.js → chunk-2STLJAXZ.js} +1 -1
  7. package/dist/chunks/{chunk-ELQO7254.js → chunk-2TUJJIYU.js} +1 -1
  8. package/dist/chunks/{chunk-4SI66IFC.js → chunk-2XQO6C7Q.js} +1 -1
  9. package/dist/chunks/{chunk-HMNIFPU2.js → chunk-33ETNP4M.js} +1 -1
  10. package/dist/chunks/{chunk-GTBPHJRJ.js → chunk-3F3WNT5K.js} +1 -1
  11. package/dist/chunks/{chunk-PNTKMD3A.js → chunk-42RUDD27.js} +1 -1
  12. package/dist/chunks/{chunk-2ACABADL.js → chunk-4MAA4BQD.js} +1 -1
  13. package/dist/chunks/{chunk-GHZ4YQCI.js → chunk-4OOHXEKI.js} +1 -1
  14. package/dist/chunks/{chunk-HJCMNBDK.js → chunk-4R7ICESH.js} +1 -1
  15. package/dist/chunks/{chunk-F6BUBFV2.js → chunk-54W7S4EV.js} +1 -1
  16. package/dist/chunks/{chunk-CX6QYE3Y.js → chunk-6KI5LJIB.js} +1 -1
  17. package/dist/chunks/{chunk-ZEGUFI44.js → chunk-6XXXPJBV.js} +1 -1
  18. package/dist/chunks/{chunk-PG3WQGEK.js → chunk-732HWE3P.js} +1 -1
  19. package/dist/chunks/{chunk-J7DIPT7M.js → chunk-76AOTUM2.js} +1 -1
  20. package/dist/chunks/{chunk-VV5TYUAT.js → chunk-76XUBFXI.js} +1 -1
  21. package/dist/chunks/{chunk-5RRSLENO.js → chunk-7CLATJZX.js} +1 -1
  22. package/dist/chunks/{chunk-Y2J2ESAE.js → chunk-7EI554V5.js} +1 -1
  23. package/dist/chunks/{chunk-YTBNOSND.js → chunk-7IHVCKUV.js} +1 -1
  24. package/dist/chunks/{chunk-TNNCGRBK.js → chunk-7OOCSVWT.js} +1 -1
  25. package/dist/chunks/{chunk-F2VXECRT.js → chunk-7TREJIPV.js} +1 -1
  26. package/dist/chunks/{chunk-VUB4NBD4.js → chunk-7ZCM4LWL.js} +1 -1
  27. package/dist/chunks/{chunk-FWYKEEQK.js → chunk-A7XRIU6Z.js} +1 -1
  28. package/dist/chunks/{chunk-SWWLPWX7.js → chunk-AASXSNBW.js} +1 -1
  29. package/dist/chunks/{chunk-PROENC6V.js → chunk-B7LM2BNN.js} +1 -1
  30. package/dist/chunks/{chunk-XBT7X2Q4.js → chunk-BB27VKHS.js} +1 -1
  31. package/dist/chunks/{chunk-IR3E37HD.js → chunk-BDLZ6WL2.js} +1 -1
  32. package/dist/chunks/{chunk-EYCKXHL4.js → chunk-C2R5IEN6.js} +1 -1
  33. package/dist/chunks/{chunk-I3NEZRVW.js → chunk-CHTFRAXA.js} +1 -1
  34. package/dist/chunks/{chunk-AJJIPBAG.js → chunk-CNGI6Z2G.js} +1 -1
  35. package/dist/chunks/{chunk-HG7NRFC5.js → chunk-CRPZYLIL.js} +1 -1
  36. package/dist/chunks/{chunk-DORCX7UB.js → chunk-CUO3CYU3.js} +1 -1
  37. package/dist/chunks/{chunk-2DH6LTUI.js → chunk-DRDY2UZX.js} +1 -1
  38. package/dist/chunks/{chunk-VSDLCOK3.js → chunk-DWA7B7TB.js} +1 -1
  39. package/dist/chunks/chunk-E6VQXHBD.js +11 -0
  40. package/dist/chunks/chunk-E7ICSU45.js +7 -0
  41. package/dist/chunks/{chunk-X5ZBXCCY.js → chunk-EDXNAXEZ.js} +1 -1
  42. package/dist/chunks/{chunk-O7FAYZU6.js → chunk-EGXRQ73P.js} +1 -1
  43. package/dist/chunks/chunk-EK7U42I4.js +9 -0
  44. package/dist/chunks/{chunk-UXAPG6IX.js → chunk-EPCRR72R.js} +1 -1
  45. package/dist/chunks/{chunk-VBCWRNS4.js → chunk-EZ3HXFLB.js} +1 -1
  46. package/dist/chunks/{chunk-AULX6RDR.js → chunk-FMLRVSWK.js} +1 -1
  47. package/dist/chunks/chunk-FO7OSSLI.js +13 -0
  48. package/dist/chunks/{chunk-PQQRSUUG.js → chunk-FSM7YM4W.js} +1 -1
  49. package/dist/chunks/{chunk-6ZD6IARJ.js → chunk-FSMZPHAA.js} +1 -1
  50. package/dist/chunks/chunk-FUH5PBGR.js +7 -0
  51. package/dist/chunks/{chunk-SSOWIDKG.js → chunk-GILTW5RJ.js} +1 -1
  52. package/dist/chunks/{chunk-6SYKGWTJ.js → chunk-GNQ7KLCN.js} +1 -1
  53. package/dist/chunks/{chunk-3YD5WA5R.js → chunk-GO64LSUW.js} +1 -1
  54. package/dist/chunks/{chunk-PKWSWWVW.js → chunk-GPVXJI6X.js} +1 -1
  55. package/dist/chunks/{chunk-ICPRMAKB.js → chunk-H43XHICL.js} +1 -1
  56. package/dist/chunks/{chunk-H2O53DAZ.js → chunk-HAAKXJ4V.js} +1 -1
  57. package/dist/chunks/{chunk-G7RQVFID.js → chunk-HDKEES7E.js} +4 -4
  58. package/dist/chunks/{chunk-CX4WJVNY.js → chunk-HT3CQEAF.js} +1 -1
  59. package/dist/chunks/{chunk-ZEBOIM34.js → chunk-HT5EXCYX.js} +1 -1
  60. package/dist/chunks/{chunk-Z3YQZSU4.js → chunk-HXIOR7P6.js} +1 -1
  61. package/dist/chunks/{chunk-KMTQYFJF.js → chunk-IKOVY76G.js} +1 -1
  62. package/dist/chunks/{chunk-MDWUJ7TA.js → chunk-ILNTOWHG.js} +1 -1
  63. package/dist/chunks/{chunk-MJ2HLVVL.js → chunk-ILUU3SGP.js} +3 -3
  64. package/dist/chunks/{chunk-2KJIWBJQ.js → chunk-IMZD7QEB.js} +2 -2
  65. package/dist/chunks/{chunk-57H5KQGN.js → chunk-IZOKMWU5.js} +1 -1
  66. package/dist/chunks/{chunk-7MBJ4YIK.js → chunk-JGEJY7AC.js} +1 -1
  67. package/dist/chunks/chunk-JJTAADC5.js +7 -0
  68. package/dist/chunks/{chunk-J4WXRM2Y.js → chunk-JK3NTR7T.js} +1 -1
  69. package/dist/chunks/{chunk-K45TGFUJ.js → chunk-JM7KUCBM.js} +1 -1
  70. package/dist/chunks/chunk-JPJ6HGAN.js +7 -0
  71. package/dist/chunks/{chunk-72CSJCJX.js → chunk-JRUL67UC.js} +2 -2
  72. package/dist/chunks/{chunk-P5IKPNRJ.js → chunk-K4J43D5J.js} +1 -1
  73. package/dist/chunks/{chunk-NFPO75IP.js → chunk-KDCLHZYL.js} +1 -1
  74. package/dist/chunks/{chunk-5KGALAC2.js → chunk-KDIICSD5.js} +1 -1
  75. package/dist/chunks/{chunk-DTEWQLNP.js → chunk-KNKGJD5J.js} +1 -1
  76. package/dist/chunks/{chunk-V7EJ7O6E.js → chunk-LBJ7EOZM.js} +1 -1
  77. package/dist/chunks/{chunk-WU22X5RO.js → chunk-LHK6B4ER.js} +1 -1
  78. package/dist/chunks/{chunk-NXFYKZVZ.js → chunk-LKFQMY5V.js} +1 -1
  79. package/dist/chunks/{chunk-HLJ2UIG6.js → chunk-LVPY2RTU.js} +1 -1
  80. package/dist/chunks/chunk-M3LYYAQ6.js +7 -0
  81. package/dist/chunks/{chunk-VG44VJB5.js → chunk-MEF5BUJ5.js} +1 -1
  82. package/dist/chunks/{chunk-AI32LWRL.js → chunk-MJKDKZ2J.js} +1 -1
  83. package/dist/chunks/{chunk-4HYZZASG.js → chunk-N4FZIVIS.js} +1 -1
  84. package/dist/chunks/{chunk-UE6M2VKP.js → chunk-NFBFXM6X.js} +1 -1
  85. package/dist/chunks/{chunk-JEACGNHI.js → chunk-O256QMQM.js} +1 -1
  86. package/dist/chunks/{chunk-NQPQRYHS.js → chunk-OICSITNU.js} +1 -1
  87. package/dist/chunks/{chunk-6SX4TE7Y.js → chunk-OXQKWOLS.js} +1 -1
  88. package/dist/chunks/chunk-P7GA2C6N.js +7 -0
  89. package/dist/chunks/{chunk-NNPXYFMY.js → chunk-PG5BHJVH.js} +1 -1
  90. package/dist/chunks/{chunk-XXPUBGJZ.js → chunk-PIGJVJNM.js} +2 -2
  91. package/dist/chunks/chunk-PP7BNCIG.js +7 -0
  92. package/dist/chunks/{chunk-AJ3KPZLM.js → chunk-PSMKLDLV.js} +1 -1
  93. package/dist/chunks/{chunk-BLA6V5UN.js → chunk-Q3R4HAAA.js} +1 -1
  94. package/dist/chunks/chunk-Q4W3R6U2.js +12 -0
  95. package/dist/chunks/{chunk-A4LOQ3UK.js → chunk-QAVUE3TR.js} +1 -1
  96. package/dist/chunks/{chunk-JJNTYM7J.js → chunk-QMI7GTT2.js} +1 -1
  97. package/dist/chunks/{chunk-UAPEASRH.js → chunk-QPNYOR6O.js} +1 -1
  98. package/dist/chunks/{chunk-UVBRWYYJ.js → chunk-QPPFQREO.js} +1 -1
  99. package/dist/chunks/{chunk-LNRKGW7S.js → chunk-QROPMCL2.js} +1 -1
  100. package/dist/chunks/{chunk-WPWGH5CA.js → chunk-QYAXCGZA.js} +1 -1
  101. package/dist/chunks/{chunk-UJINL7VK.js → chunk-R3ZPLQDI.js} +1 -1
  102. package/dist/chunks/{chunk-QDSDYOMV.js → chunk-R5KBPWWS.js} +1 -1
  103. package/dist/chunks/{chunk-C6AOL5RF.js → chunk-RACUGILV.js} +1 -1
  104. package/dist/chunks/{chunk-PKECY4JZ.js → chunk-RJB5Y7M4.js} +1 -1
  105. package/dist/chunks/{chunk-SHLKM7EZ.js → chunk-SWABNAKZ.js} +1 -1
  106. package/dist/chunks/{chunk-245QYIHU.js → chunk-T2IZUTGY.js} +1 -1
  107. package/dist/chunks/{chunk-3YNMC7FF.js → chunk-TL4AEZXF.js} +1 -1
  108. package/dist/chunks/chunk-TUPVVZ4I.js +7 -0
  109. package/dist/chunks/{chunk-B4IOZL3K.js → chunk-U3IPJYB6.js} +1 -1
  110. package/dist/chunks/{chunk-4JPDCF2O.js → chunk-UFE4RBZV.js} +1 -1
  111. package/dist/chunks/chunk-UK3VTHT5.js +7 -0
  112. package/dist/chunks/{chunk-X3A324UF.js → chunk-V2J5U5KQ.js} +1 -1
  113. package/dist/chunks/{chunk-X72FHJ6W.js → chunk-V7VHLSYL.js} +1 -1
  114. package/dist/chunks/{chunk-A3WRF4AB.js → chunk-VTAH7VMY.js} +1 -1
  115. package/dist/chunks/{chunk-NUS3WWST.js → chunk-WA4CPW3H.js} +1 -1
  116. package/dist/chunks/chunk-WKEDN5SX.js +9 -0
  117. package/dist/chunks/{chunk-Q2FGBONA.js → chunk-WQBNOQUT.js} +1 -1
  118. package/dist/chunks/{chunk-OD4RCBDD.js → chunk-WRTBYD4I.js} +1 -1
  119. package/dist/chunks/{chunk-GOH7QCG3.js → chunk-WS6UOPMS.js} +1 -1
  120. package/dist/chunks/chunk-X2UJGCIC.js +9 -0
  121. package/dist/chunks/{chunk-TR3M42DX.js → chunk-XHWA436J.js} +1 -1
  122. package/dist/chunks/{chunk-OVIWCH3S.js → chunk-XL6PE4AA.js} +1 -1
  123. package/dist/chunks/{chunk-AP2JY545.js → chunk-XPWLEGWA.js} +1 -1
  124. package/dist/chunks/{chunk-SPPOQ54P.js → chunk-XY2GGCHC.js} +1 -1
  125. package/dist/chunks/{chunk-T5DQCNBC.js → chunk-XZYVBYUY.js} +1 -1
  126. package/dist/chunks/{chunk-7JQBC2HB.js → chunk-Y45NZT7C.js} +1 -1
  127. package/dist/chunks/{chunk-4D4IP557.js → chunk-YATYCZQJ.js} +1 -1
  128. package/dist/chunks/{chunk-CKPY7TAQ.js → chunk-YIKXLWSR.js} +1 -1
  129. package/dist/chunks/{chunk-MHVM4VKT.js → chunk-YVWIDLY4.js} +5 -5
  130. package/dist/chunks/{chunk-RTIVLPN7.js → chunk-Z2NPMUPM.js} +1 -1
  131. package/dist/chunks/{chunk-EFQCGYZF.js → chunk-Z62G57GC.js} +1 -1
  132. package/dist/chunks/{chunk-KEFF3BL3.js → chunk-ZG7A4P5U.js} +1 -1
  133. package/dist/chunks/{chunk-RIVRPVTH.js → chunk-ZSJU5MJP.js} +1 -1
  134. package/dist/chunks/{chunk-YNNU3GPR.js → chunk-ZWPASRC2.js} +1 -1
  135. package/dist/chunks/{clear-FQ4L2ACT.js → clear-4MDTHLLE.js} +1 -1
  136. package/dist/chunks/{cli-embedded-CZYKFQ6U.js → cli-embedded-OYBJM5SA.js} +1 -1
  137. package/dist/chunks/{commands-Bx-lrmie-KJI5MSFW.js → commands-Bx-lrmie-W7FCFL4P.js} +1 -1
  138. package/dist/chunks/{compile-vercel-config-GUTXMJOP.js → compile-vercel-config-A2DMFB2R.js} +1 -1
  139. package/dist/chunks/{config-EEYAOPDR.js → config-4R62ATWJ.js} +1 -1
  140. package/dist/chunks/{config-4KECSIYK.js → config-A7DCP25J.js} +1 -1
  141. package/dist/chunks/{config-HiWLfXRQ-G4JC3PIR.js → config-HiWLfXRQ-D7JA4E3D.js} +1 -1
  142. package/dist/chunks/{connect-U3yG4EtI-KWEUMGCU.js → connect-U3yG4EtI-XYHDJQT7.js} +1 -1
  143. package/dist/chunks/{cp-aFe-HVrK-JGQPCT5R.js → cp-aFe-HVrK-UAGAR2BC.js} +1 -1
  144. package/dist/chunks/{create-ilHWvzSk-MPW7HE43.js → create-ilHWvzSk-7KWZXBE2.js} +1 -1
  145. package/dist/chunks/{create-project-FMUOSSNP.js → create-project-OA7KBPVU.js} +1 -1
  146. package/dist/chunks/{delete-LP4N4BXX.js → delete-DN53BRH7.js} +1 -1
  147. package/dist/chunks/{delete-JRMGVHFJ.js → delete-G4MAUBXZ.js} +1 -1
  148. package/dist/chunks/{describe-5M3XKRMV.js → describe-Q5D5GYVG.js} +1 -1
  149. package/dist/chunks/{detect-services-HCUFI3RJ.js → detect-services-VBKVN4A2.js} +1 -1
  150. package/dist/chunks/{disable-ZFDARZAF.js → disable-CG3R2VAL.js} +1 -1
  151. package/dist/chunks/{discard-PE5SSIDJ.js → discard-REGFZXFU.js} +1 -1
  152. package/dist/chunks/{dist-BGUQ47VG.js → dist-4F3LAB5Z.js} +1 -1
  153. package/dist/chunks/{dist-E4BMK7BO.js → dist-T2AURD3P.js} +1 -1
  154. package/dist/chunks/{domain-DGvr_U55-AZYOJW3J.js → domain-DGvr_U55-PNXSOVDO.js} +1 -1
  155. package/dist/chunks/{drives-Bi-Mnt2z-JAGBYE6W.js → drives-Bi-Mnt2z-Z4T2YY4P.js} +1 -1
  156. package/dist/chunks/{edit-BATH6ETJ.js → edit-7AUE6GXE.js} +1 -1
  157. package/dist/chunks/{edit-7S67WBSE.js → edit-HHLQDVOP.js} +1 -1
  158. package/dist/chunks/{enable-JWLWXAZP.js → enable-BV3N6GEL.js} +1 -1
  159. package/dist/chunks/{exec-Bwv4MDyN-SMCC4JHS.js → exec-Bwv4MDyN-7YUAVBB2.js} +1 -1
  160. package/dist/chunks/{exec-6WGVP2E2.js → exec-NYLXYXB5.js} +2 -2
  161. package/dist/chunks/{export-DASZMUUD.js → export-WUPMMHSX.js} +1 -1
  162. package/dist/chunks/{extend-D9tq9Cot-Z4ORB3B2.js → extend-D9tq9Cot-QT72AXGH.js} +1 -1
  163. package/dist/chunks/{fork-DQ6qfKqB-AJCZOGQR.js → fork-DQ6qfKqB-XXTHHUMZ.js} +1 -1
  164. package/dist/chunks/{future-CNLTCF2D.js → future-DJOUGRV4.js} +1 -1
  165. package/dist/chunks/{generate-cert-for-deploy-TCH3OY6G.js → generate-cert-for-deploy-PZHDFX3W.js} +1 -1
  166. package/dist/chunks/{groups-B8JVEeKk-J5CCQYWU.js → groups-B8JVEeKk-K57VTXSS.js} +1 -1
  167. package/dist/chunks/{image-CDRXKTJG.js → image-DX2IAUKJ.js} +1 -1
  168. package/dist/chunks/{import-builders-XI6CYID6.js → import-builders-IUEC2WN2.js} +1 -1
  169. package/dist/chunks/{inspect-FODCPYHT.js → inspect-BS5UPI6W.js} +1 -1
  170. package/dist/chunks/{inspect-I7NZH44Z.js → inspect-GJXLYJC7.js} +1 -1
  171. package/dist/chunks/{inspect-DSTHAT43.js → inspect-IHVP2M4H.js} +1 -1
  172. package/dist/chunks/{inspect-RSSQ5YKF.js → inspect-PBSKPN4W.js} +1 -1
  173. package/dist/chunks/{inspect-FCJC7XCN.js → inspect-Y7VXJEI2.js} +1 -1
  174. package/dist/chunks/{inspect-JFRSCAAW.js → inspect-YGVXE4HR.js} +1 -1
  175. package/dist/chunks/{list-NT2RHNIB.js → list-27R4USBV.js} +1 -1
  176. package/dist/chunks/{list-HWDVPR4V.js → list-2ZCNO6DY.js} +1 -1
  177. package/dist/chunks/{list-7K3LEJXV.js → list-TUST62E6.js} +1 -1
  178. package/dist/chunks/{list-QDBAXYKL.js → list-ZSQVIQXC.js} +1 -1
  179. package/dist/chunks/{list-iqQFvOHx-EWWTMITV.js → list-iqQFvOHx-PNAUIUQL.js} +1 -1
  180. package/dist/chunks/{login-WHXNCPDU.js → login-CUEQHDT5.js} +1 -1
  181. package/dist/chunks/login-YCOZROC2.js +7 -0
  182. package/dist/chunks/{logs-RDOQVAER.js → logs-W4GZLDHE.js} +1 -1
  183. package/dist/chunks/ls-27K5BB7Z.js +11 -0
  184. package/dist/chunks/{ls-ASWAYYAI.js → ls-EEJQIKNI.js} +1 -1
  185. package/dist/chunks/ls-PAL6FQB6.js +8 -0
  186. package/dist/chunks/{ls-7DUE3OKC.js → ls-TDYTE4HM.js} +1 -1
  187. package/dist/chunks/{ls-2PCKZKR7.js → ls-UMSUUQCG.js} +1 -1
  188. package/dist/chunks/{ls-PEFQHSG3.js → ls-W7C5I555.js} +1 -1
  189. package/dist/chunks/{ls-UQZB42CA.js → ls-XYEJ5MR6.js} +1 -1
  190. package/dist/chunks/{migrate-experimental-services-2E5TRQU6.js → migrate-experimental-services-556MHJWK.js} +1 -1
  191. package/dist/chunks/mutate-IELSY6ED.js +9 -0
  192. package/dist/chunks/{notifications-F2BUWHH4.js → notifications-GZH7CFZY.js} +1 -1
  193. package/dist/chunks/{open-5FUW57NF.js → open-EVYPUPNZ.js} +1 -1
  194. package/dist/chunks/{openapi-NZLMBOMR.js → openapi-S6F32ZQD.js} +1 -1
  195. package/dist/chunks/{permissions-ABXSL4I4.js → permissions-EHF5MNZP.js} +1 -1
  196. package/dist/chunks/{plugin-offer-IMTYE365.js → plugin-offer-RZADKNYF.js} +1 -1
  197. package/dist/chunks/{prompt-missing-credentials-3MKVB7HN.js → prompt-missing-credentials-OSAV5B7N.js} +1 -1
  198. package/dist/chunks/{publish-5AE7VXIO.js → publish-ZB2Q2YSB.js} +1 -1
  199. package/dist/chunks/pull-WUFIVXEG.js +7 -0
  200. package/dist/chunks/{purchase-domain-if-available-MU5TGXLG.js → purchase-domain-if-available-YVVGT7MZ.js} +1 -1
  201. package/dist/chunks/{push-SBTMPRZE.js → push-YWKZ6SOO.js} +1 -1
  202. package/dist/chunks/{query-5Q6ZV2TP.js → query-G62G25HV.js} +1 -1
  203. package/dist/chunks/{raw-query-OAYC3OTN.js → raw-query-WTKAOYCP.js} +1 -1
  204. package/dist/chunks/{read-BTA5slYO-TGRGDUB5.js → read-BTA5slYO-IJLWMNSS.js} +1 -1
  205. package/dist/chunks/{reauthenticate-PXEYMV7G.js → reauthenticate-WQZ5HISG.js} +1 -1
  206. package/dist/chunks/remove-7PSNAEDY.js +9 -0
  207. package/dist/chunks/{remove-CCa99nz9-52C5X3OV.js → remove-CCa99nz9-LCSNBDLT.js} +1 -1
  208. package/dist/chunks/{reorder-DT32UBAI.js → reorder-OLCKSATY.js} +1 -1
  209. package/dist/chunks/{reply-AMZ3Y3U5.js → reply-OVHQNEBO.js} +1 -1
  210. package/dist/chunks/{resolve-NPE5HKCT.js → resolve-TUHO4FHT.js} +1 -1
  211. package/dist/chunks/{resolve-agent-team-75WZ2VDR.js → resolve-agent-team-NQCRA6ER.js} +1 -1
  212. package/dist/chunks/{restore-IZHGW3NV.js → restore-5RLBSVYQ.js} +1 -1
  213. package/dist/chunks/{rm-MBWOLQZJ.js → rm-5RGN33Y5.js} +1 -1
  214. package/dist/chunks/rm-D7CWGBTV.js +8 -0
  215. package/dist/chunks/{rm-ILDCA66K.js → rm-FYU3GBLC.js} +1 -1
  216. package/dist/chunks/rm-HA752TW6.js +8 -0
  217. package/dist/chunks/{rm-G4U54YJT.js → rm-P6AGSBXP.js} +1 -1
  218. package/dist/chunks/{routes-GTTTHCOL.js → routes-7VLRHXT4.js} +1 -1
  219. package/dist/chunks/rule-inspect-Y2MX7LQN.js +8 -0
  220. package/dist/chunks/{run-D8obqfKw-VBME5UHC.js → run-D8obqfKw-D2EGHTU2.js} +1 -1
  221. package/dist/chunks/{schema-SKHPOMD7.js → schema-AJAHECZG.js} +1 -1
  222. package/dist/chunks/{schema-5FNNQEU5.js → schema-UVTYLX6L.js} +2 -2
  223. package/dist/chunks/{select-org-YRCPH5Z5.js → select-org-JBKKKZSN.js} +1 -1
  224. package/dist/chunks/{sessions-cvWvPgzc-XIYLOGFI.js → sessions-cvWvPgzc-FBOQQPU5.js} +1 -1
  225. package/dist/chunks/{set-V6QX5AZQ.js → set-774P7GEL.js} +1 -1
  226. package/dist/chunks/{set-WWREM57F.js → set-OWNTI5SM.js} +1 -1
  227. package/dist/chunks/setup-and-link-3LD4LQGE.js +7 -0
  228. package/dist/chunks/{sh-7olsIyJh-PKP4FF4F.js → sh-7olsIyJh-NFO2QYTK.js} +1 -1
  229. package/dist/chunks/{skills-5TXXGKN5.js → skills-W45E2EWS.js} +1 -1
  230. package/dist/chunks/{snapshot-D9MAspub-SROFKNVE.js → snapshot-D9MAspub-UAVA2YSK.js} +1 -1
  231. package/dist/chunks/{snapshots-DQjvm6St-4DTYO2IQ.js → snapshots-DQjvm6St-DBG4H2HS.js} +1 -1
  232. package/dist/chunks/{stop-SQX-uC-Q-MCMKSJVQ.js → stop-SQX-uC-Q-CRDQOA5M.js} +1 -1
  233. package/dist/chunks/{tags-SVOY7QEN.js → tags-DEIOW5MM.js} +1 -1
  234. package/dist/chunks/{types-NX7G6YBW.js → types-SYUZH46V.js} +1 -1
  235. package/dist/chunks/update-VG2LHBRV.js +8 -0
  236. package/dist/chunks/usage-NF6S3DAZ.js +17 -0
  237. package/dist/chunks/{users-CGEsQ4G8-BEKXN56N.js → users-CGEsQ4G8-POYTVZJV.js} +1 -1
  238. package/dist/chunks/{write-DixEhGqz-D34NI34B.js → write-DixEhGqz-YYDLLSJE.js} +1 -1
  239. package/dist/commands/build/index.js +1 -1
  240. package/dist/commands/deploy/index.js +5 -5
  241. package/dist/commands/dev/index.js +2 -2
  242. package/dist/commands/env/index.js +1 -1
  243. package/dist/commands/link/index.js +1 -1
  244. package/dist/commands/list/index.js +1 -1
  245. package/dist/commands/project/index.js +1 -1
  246. package/dist/commands/tunnel/index.js +1 -1
  247. package/dist/commands-account.js +101 -67
  248. package/dist/commands-ai.js +12 -12
  249. package/dist/commands-blob.js +1 -1
  250. package/dist/commands-core.js +7 -7
  251. package/dist/commands-deployments.js +1 -1
  252. package/dist/commands-flags.js +7 -7
  253. package/dist/commands-integrations.js +1 -1
  254. package/dist/commands-observability.js +2 -2
  255. package/dist/commands-routing.js +2 -2
  256. package/dist/help.js +1 -1
  257. package/dist/index.js +10 -8
  258. package/dist/internal-build.js +1 -1
  259. package/dist/package.json +8 -8
  260. package/dist/root-help-commands.mjs +1 -1
  261. package/dist/version.mjs +1 -1
  262. package/package.json +17 -17
  263. package/dist/chunks/add-56T4ON6W.js +0 -8
  264. package/dist/chunks/chunk-2V5IP6A5.js +0 -7
  265. package/dist/chunks/chunk-4HNNFJLO.js +0 -7
  266. package/dist/chunks/chunk-AWB4IKVC.js +0 -9
  267. package/dist/chunks/chunk-HI5PLVKM.js +0 -12
  268. package/dist/chunks/chunk-KVZR24QI.js +0 -7
  269. package/dist/chunks/chunk-NVU7XTNI.js +0 -11
  270. package/dist/chunks/chunk-OCX4QZ3X.js +0 -9
  271. package/dist/chunks/chunk-OK52DDU5.js +0 -9
  272. package/dist/chunks/chunk-PNN2Y2ZQ.js +0 -7
  273. package/dist/chunks/chunk-RDTWDVFO.js +0 -7
  274. package/dist/chunks/chunk-RWVYBRVF.js +0 -13
  275. package/dist/chunks/chunk-V45KKYNK.js +0 -7
  276. package/dist/chunks/chunk-XGCCTSBW.js +0 -7
  277. package/dist/chunks/chunk-XO2CZXGA.js +0 -7
  278. package/dist/chunks/login-RWXYD2CO.js +0 -7
  279. package/dist/chunks/ls-2OYMFZIB.js +0 -8
  280. package/dist/chunks/ls-XJZFHHWA.js +0 -11
  281. package/dist/chunks/mutate-QXTPOGVD.js +0 -9
  282. package/dist/chunks/pull-MGQ2TMA3.js +0 -7
  283. package/dist/chunks/remove-WSK5OYNV.js +0 -9
  284. package/dist/chunks/rm-HVDZJXME.js +0 -8
  285. package/dist/chunks/rm-JWMYMOKD.js +0 -8
  286. package/dist/chunks/rule-inspect-KZ7FNV26.js +0 -8
  287. package/dist/chunks/setup-and-link-STBOP67J.js +0 -7
  288. package/dist/chunks/update-AVWVPYK5.js +0 -8
  289. package/dist/chunks/usage-RUCM3AMF.js +0 -15
  290. /package/dist/chunks/{chunk-COOA33HY.js → chunk-OTIERMC7.js} +0 -0
  291. /package/dist/chunks/{chunk-O7AF7CLE.js → chunk-TIU3WJH7.js} +0 -0
@@ -4,11 +4,11 @@ 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{DEFAULT_ORDER_WAIT,DEFAULT_ORDER_WAIT_MS}from"./chunk-UE6M2VKP.js";import{formatUsd}from"./chunk-NFPO75IP.js";import{canPrompt}from"./chunk-IQ7FPAI4.js";import{quoteShellArg}from"./chunk-GOH7QCG3.js";import{getTeams}from"./chunk-SSOWIDKG.js";import{scopeFlagPassed}from"./chunk-HG7NRFC5.js";import{printAlignedLabel}from"./chunk-SUD5V67L.js";import{require_ms}from"./chunk-2ILZM77F.js";import{parseArguments}from"./chunk-RDTWDVFO.js";import{AGENT_ACTION,AGENT_REASON,AGENT_STATUS,buildCommandWithGlobalFlags,getExitCodeForReason,outputActionRequired,outputAgentError,shouldEmitNonInteractiveCommandError,writeActionRequired,writeAgentError}from"./chunk-NVU7XTNI.js";import{wantsMachineReadableOutput}from"./chunk-IR3E37HD.js";import{packageName}from"./chunk-EFGZK6OY.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import{require_build_utils}from"./chunk-BVFFSUG3.js";import{stripSensitiveAuthArgs}from"./chunk-DORCX7UB.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_build_utils2=__toESM(require_build_utils(),1);import{createHash,randomUUID}from"node:crypto";var import_build_utils=__toESM(require_build_utils(),1),import_ms=__toESM(require_ms(),1);var AMOUNT_PATTERN=/^\d+(\.\d{1,2})?$/,REASON_BY_CODE={UNSUPPORTED_TLD:AGENT_REASON.TLD_NOT_SUPPORTED,UNSUPPORTED_TLD_VIA_CLI:AGENT_REASON.TLD_NOT_SUPPORTED,INVALID_DOMAIN:AGENT_REASON.INVALID_DOMAIN,DOMAIN_NOT_AVAILABLE:AGENT_REASON.DOMAIN_NOT_AVAILABLE,DOMAIN_PAYMENT_ERROR:AGENT_REASON.PAYMENT_FAILED};function chargeFailureReason(err){let code=err.code;return typeof code=="string"&&REASON_BY_CODE[code]||AGENT_REASON.API_ERROR}function parseAmount(raw){if(raw===void 0)return;let value=raw.trim();return!AMOUNT_PATTERN.test(value)||Number(value)<=0?new Error(`Invalid --amount "${raw}". Use the price in USD, such as 20.00.`):Number(value)}function amountMatchesPrice(amount,price){return Math.round(amount*100)===Math.round(price*100)}function formatAmountArg(price){return price.toFixed(2)}function formatTerm(years){return`${years} ${years===1?"year":"years"}`}function canPromptForCharge(client,json){return canPrompt(client)&&!process.env.CI&&!json}function chargeFlagWithValue(argv,flags){for(let arg of argv){if(arg==="--")break;let name=arg.split("=")[0];if(arg.includes("=")&&flags.includes(name))return`${name} doesn't take a value. Pass it on its own, or leave it out${name==="--auto-renew"?" and pass --no-auto-renew":""}.`}}function chargeTeamStatus(client,teamId){let orgId=(0,import_build_utils.getPlatformEnv)("ORG_ID");return orgId&&orgId!==teamId?"conflict":scopeFlagPassed(client.argv)||orgId===teamId?"named":"unnamed"}function printChargeRecovery(headline,instruction,command){output_manager_default.fatal(`${headline}
7
+ import{DEFAULT_ORDER_WAIT,DEFAULT_ORDER_WAIT_MS}from"./chunk-NFBFXM6X.js";import{formatUsd}from"./chunk-KDCLHZYL.js";import{canPrompt}from"./chunk-IQ7FPAI4.js";import{quoteShellArg}from"./chunk-WS6UOPMS.js";import{getTeams}from"./chunk-GILTW5RJ.js";import{scopeFlagPassed}from"./chunk-CRPZYLIL.js";import{printAlignedLabel}from"./chunk-SUD5V67L.js";import{require_ms}from"./chunk-2ILZM77F.js";import{parseArguments}from"./chunk-E7ICSU45.js";import{AGENT_ACTION,AGENT_REASON,AGENT_STATUS,buildCommandWithGlobalFlags,getExitCodeForReason,outputActionRequired,outputAgentError,shouldEmitNonInteractiveCommandError,writeActionRequired,writeAgentError}from"./chunk-E6VQXHBD.js";import{wantsMachineReadableOutput}from"./chunk-BDLZ6WL2.js";import{packageName}from"./chunk-EFGZK6OY.js";import{output_manager_default,recordCliError}from"./chunk-RIXTYUYN.js";import{require_build_utils}from"./chunk-BVFFSUG3.js";import{stripSensitiveAuthArgs}from"./chunk-CUO3CYU3.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_build_utils2=__toESM(require_build_utils(),1);import{createHash,randomUUID}from"node:crypto";var import_build_utils=__toESM(require_build_utils(),1),import_ms=__toESM(require_ms(),1);var AMOUNT_PATTERN=/^\d+(\.\d{1,2})?$/,REASON_BY_CODE={UNSUPPORTED_TLD:AGENT_REASON.TLD_NOT_SUPPORTED,UNSUPPORTED_TLD_VIA_CLI:AGENT_REASON.TLD_NOT_SUPPORTED,INVALID_DOMAIN:AGENT_REASON.INVALID_DOMAIN,DOMAIN_NOT_AVAILABLE:AGENT_REASON.DOMAIN_NOT_AVAILABLE,DOMAIN_PAYMENT_ERROR:AGENT_REASON.PAYMENT_FAILED};function chargeFailureReason(err){let code=err.code;return typeof code=="string"&&REASON_BY_CODE[code]||AGENT_REASON.API_ERROR}function parseAmount(raw){if(raw===void 0)return;let value=raw.trim();return!AMOUNT_PATTERN.test(value)||Number(value)<=0?new Error(`Invalid --amount "${raw}". Use the price in USD, such as 20.00.`):Number(value)}function amountMatchesPrice(amount,price){return Math.round(amount*100)===Math.round(price*100)}function formatAmountArg(price){return price.toFixed(2)}function formatTerm(years){return`${years} ${years===1?"year":"years"}`}function canPromptForCharge(client,json){return canPrompt(client)&&!process.env.CI&&!json}function chargeFlagWithValue(argv,flags){for(let arg of argv){if(arg==="--")break;let name=arg.split("=")[0];if(arg.includes("=")&&flags.includes(name))return`${name} doesn't take a value. Pass it on its own, or leave it out${name==="--auto-renew"?" and pass --no-auto-renew":""}.`}}function chargeTeamStatus(client,teamId){let orgId=(0,import_build_utils.getPlatformEnv)("ORG_ID");return orgId&&orgId!==teamId?"conflict":scopeFlagPassed(client.argv)||orgId===teamId?"named":"unnamed"}function printChargeRecovery(headline,instruction,command){output_manager_default.fatal(`${headline}
8
8
 
9
9
  ${instruction}:
10
- ${command}`)}function writeChargeAction(client,json,payload){outputActionRequired(client,payload,1),json&&client.stdout.write(`${JSON.stringify(payload,null,2)}
11
- `)}function reportUsageError(client,reason,message){let exitCode=getExitCodeForReason(reason);return outputAgentError(client,{status:"error",reason,message},exitCode),output_manager_default.error(message),exitCode}function reportChargeFailure(client,json,payload,opts={}){let document={status:"error",...payload,...opts.apiMessage&&{data:{...payload.data,apiMessage:opts.apiMessage}}};outputAgentError(client,document,1),json&&client.stdout.write(`${JSON.stringify(document,null,2)}
10
+ ${command}`)}function writeChargeAction(client,json,payload){outputActionRequired(client,payload,1),recordCliError({code:payload.reason}),json&&client.stdout.write(`${JSON.stringify(payload,null,2)}
11
+ `)}function reportUsageError(client,reason,message){let exitCode=getExitCodeForReason(reason);return outputAgentError(client,{status:"error",reason,message},exitCode),recordCliError({code:reason}),output_manager_default.error(message),exitCode}function reportChargeFailure(client,json,payload,opts={}){let document={status:"error",...payload,...opts.apiMessage&&{data:{...payload.data,apiMessage:opts.apiMessage}}};outputAgentError(client,document,1),recordCliError({code:payload.reason}),json&&client.stdout.write(`${JSON.stringify(document,null,2)}
12
12
  `);let headline=opts.apiMessage?`${payload.message}
13
13
  ${opts.apiMessage}`:payload.message;return opts.recovery?printChargeRecovery(headline,opts.recovery.instruction,opts.recovery.command):output_manager_default.fatal(headline),1}function orderStatusStep(client,opts){let action=opts.verb==="buy"?"purchase":"renewal";return{command:buildCommandWithGlobalFlags(client.argv,`api /v1/registrar/orders/${opts.orderId}`),when:`Read the order: the ${action} went through when its status and the ${opts.domain} item's status are both "completed". Safe to repeat`}}function reportUnknownOutcome(client,json,opts){let done=opts.verb==="buy"?"was bought":"was renewed",action=opts.verb==="buy"?"purchase":"renewal",{orderId}=opts,next=[...orderId?[orderStatusStep(client,{verb:opts.verb,domain:opts.domain,orderId})]:[],{command:opts.inspectCommand,when:`Check whether the ${action} went through before retrying`}];return reportChargeFailure(client,json,{reason:AGENT_REASON.UNKNOWN_OUTCOME,message:orderId?`Can't confirm whether ${opts.domain} ${done}. Order ${orderId} finished without confirming ${opts.domain}. Check the order before running ${opts.verb} again, or you may be charged twice.`:`Can't confirm whether ${opts.domain} ${done}. Check the domain before running ${opts.verb} again, or you may be charged twice.`,retryable:!1,data:{domain:opts.domain,remote:orderId?"may_continue":"unknown",...orderId&&{orderId}},next},{recovery:{instruction:orderId?`Check order ${orderId}, or the domain`:`Check whether the ${action} went through`,command:next.map(({command})=>command).join(`
14
14
  `)}})}function parseOrderWait(flags){let raw=flags["--timeout"];if(flags["--no-wait"])return raw===void 0?{waitMs:0,timeout:"0s",noWait:!0}:"Can't use --timeout with --no-wait.";if(raw===void 0)return{waitMs:DEFAULT_ORDER_WAIT_MS,timeout:DEFAULT_ORDER_WAIT,noWait:!1};let timeout=raw.trim(),waitMs=/^\d+(\.\d+)?$/.test(timeout)?void 0:(0,import_ms.default)(timeout);return typeof waitMs!="number"||!Number.isFinite(waitMs)||waitMs<=0?`Invalid --timeout "${raw}". Use a duration with a unit, such as 30s or 2m.`:{waitMs,timeout,noWait:!1}}function reportOrderPending(client,json,opts){let{verb,domain,orderId}=opts,action=verb==="buy"?"registration":"renewal",next=[orderStatusStep(client,{verb,domain,orderId}),{command:opts.inspectCommand,when:"Once the order completes, see the domain"}],doNotRepeat=`Check the order instead of running ${verb} again, or you may be charged twice.`,data={domain,orderId,remote:"may_continue",...opts.lastStatus&&{orderStatus:opts.lastStatus}},recovery={recovery:{instruction:`Check order ${orderId}`,command:next[0].command}};if(opts.readError){let{code}=opts.readError,checkDomainFirst=[{command:opts.inspectCommand,when:`Check whether the ${action} went through before retrying`},next[0]];return reportChargeFailure(client,json,{reason:AGENT_REASON.UNKNOWN_OUTCOME,message:`Can't confirm whether the ${action} of ${domain} finished. Couldn't read order ${orderId}${code?` (${code})`:""}, and it may still go through. Check the domain instead of running ${verb} again, or you may be charged twice.`,retryable:!1,data:{...data,readError:opts.readError},next:checkDomainFirst},{recovery:{instruction:`Check whether the ${action} went through`,command:checkDomainFirst.map(({command})=>command).join(`
@@ -18,8 +18,8 @@ ${opts.apiMessage}`:payload.message;return opts.recovery?printChargeRecovery(hea
18
18
  Check the order:
19
19
  ${next[0].command}
20
20
  `),0)}return reportChargeFailure(client,json,{reason:AGENT_REASON.TIMEOUT,message:`Can't confirm whether the ${action} of ${domain} finished. Waiting for order ${orderId} timed out after ${opts.wait.timeout}, and it may still go through. ${doNotRepeat}`,retryable:!1,data,next},recovery)}function refuseUnnamedTeam(client,json,opts){let{verb,domain,team}=opts,status=chargeTeamStatus(client,team.id);if(status==="named")return;if(status==="conflict")return reportChargeFailure(client,json,{reason:AGENT_REASON.CONFLICT,message:`Can't ${verb} ${domain}. VERCEL_ORG_ID names a different team than ${team.slug}, the team this run would charge. Nothing was charged.`,userActionRequired:!0,hint:"Set VERCEL_ORG_ID to the team to charge, or unset it and pass --scope with that team.",data:{domain,team:team.slug}});let message=`Can't ${verb} ${domain} without naming the team to charge in non-interactive mode. It would charge ${team.slug}. Nothing was charged.`;return writeChargeAction(client,json,{status:AGENT_STATUS.ACTION_REQUIRED,reason:AGENT_REASON.MISSING_SCOPE,action:AGENT_ACTION.CONFIRMATION_REQUIRED,message,userActionRequired:!0,data:{domain,team:team.slug},missing:["--scope"],next:[{command:opts.nextCommand,when:`Only after a human approves charging ${team.slug}`}]}),printChargeRecovery(message,"Once a person approves the team to charge, run",opts.nextCommand),1}function reportPriceChanged(client,opts){let{verb,domain,amount,price,nextCommand}=opts;return reportChargeFailure(client,opts.json,{reason:AGENT_REASON.PRICE_CHANGED,message:price===void 0?`Can't ${verb} ${domain}. Its price changed from ${formatUsd(amount)}. Nothing was charged.`:`Can't ${verb} ${domain}. Its price is ${formatUsd(price)}, not ${formatUsd(amount)}. Nothing was charged.`,userActionRequired:!0,data:price===void 0?{domain}:{domain,amount:price,currency:"USD"},next:[{command:nextCommand,when:price===void 0?"Get the current price, then ask a human to approve it":`Only after a human approves the price of ${formatUsd(price)}`}]},{recovery:{instruction:price===void 0?"Get the current price":"Once a person approves the price, run",command:nextCommand}})}var APPROVAL_OPTIONS=new Set(["--confirm-name","--amount","--effects-digest"]),LEGACY_CONSENT_FLAGS=new Set(["--yes","-y","--confirm"]);async function requireApproval(client,consequence,details,flags,{legacy:commandLegacy}={}){let approval=describeApproval(consequence,details),agent=client.isAgent,noPrompts=isAgentRun(client),terminal=canPromptForApproval(client),legacy=agent?void 0:commandLegacy,check=approval.check(flags);if(check.given&&"invalid"in check)return track(client,approval,"invalid"),refuse(client,approval,{reason:AGENT_REASON.INVALID_ARGUMENTS,message:check.invalid,exitCode:2,noPrompts});if(check.given&&!check.matches)return track(client,approval,"mismatch"),refuse(client,approval,{reason:check.reason,message:check.message,exitCode:check.reason===AGENT_REASON.PRICE_CHANGED?1:2,noPrompts,teamMissing:await isTeamMissing(client,approval)});let digest=flags["--effects-digest"];if(approval.digest!==void 0&&digest!==void 0&&digest!==approval.digest)return track(client,approval,"effects_changed"),refuse(client,approval,{reason:AGENT_REASON.EFFECTS_CHANGED,message:`Can't ${approval.action}. What it does changed since it was approved. Nothing was changed.`,exitCode:1,noPrompts,teamMissing:await isTeamMissing(client,approval)});let digestMissing=agent&&approval.digest!==void 0&&digest===void 0;if(check.given&&!digestMissing){if(!approval.teamForApproval||await isTeamExplicit(client))return track(client,approval,"approved"),{approved:!0,warnings:[],prompted:!1};if(!terminal)return refuseMissingTeam(client,approval,noPrompts)}else if(flags["--yes"]&&!agent){if(!legacy?.yesNeedsTeam||await isTeamExplicit(client))return track(client,approval,"yes"),{approved:!0,warnings:[await deprecateYes(client,approval)],prompted:!1};if(!terminal)return refuseMissingTeam(client,approval,noPrompts)}return terminal?promptForApproval(client,approval,legacy):legacy?.pipedAnswer&&!client.nonInteractive&&!client.stdin.isTTY?readPipedAnswer(client,approval,legacy):(track(client,approval,agent&&flags["--yes"]?"yes_ignored":"stopped"),refuse(client,approval,{reason:AGENT_REASON.CONFIRMATION_REQUIRED,message:`Can't ${approval.action} without approval.`,exitCode:legacy?.stopExitCode??2,status:legacy?legacy.stopStatus:AGENT_STATUS.ACTION_REQUIRED,noPrompts,teamMissing:await isTeamMissing(client,approval),yesIgnored:agent&&!!flags["--yes"]}))}function effectsDigest(value){return createHash("sha256").update(stableStringify(value)).digest("hex").slice(0,16)}function stableStringify(value){return Array.isArray(value)?`[${value.map(stableStringify).join(",")}]`:value!==null&&typeof value=="object"?`{${Object.entries(value).filter(([,item])=>item!==void 0).sort(([a],[b])=>a<b?-1:a>b?1:0).map(([key,item])=>`${JSON.stringify(key)}:${stableStringify(item)}`).join(",")}}`:JSON.stringify(value)??"null"}function describeApproval(consequence,details){return consequence==="purchase"?describePurchase(details):describeTarget(consequence,details)}function describeTarget(consequence,details){let{noun,target}=details;if(Array.isArray(target))return describeTargets(consequence,details,target);let severe=consequence==="severe",action=details.kind==="change"?`${details.action} for ${noun} ${target}`:`${details.kind} ${noun} ${target}`,effects=severe?[...details.effects,"This cannot be undone."]:details.effects;return{consequence,action,question:`${capitalize(action)}?`,typedName:severe?{prompt:`To confirm, type the ${noun} name "${target}":`,target}:void 0,rows:async agent=>[[details.label??capitalize(noun),await withTeam(details.team,target,agent)]],effects,approvalArgs:["--confirm-name",target],scopeHint:"<TEAM>",teamForApproval:severe,digest:details.digest,data:{consequence,kind:details.kind,noun,target,effects,...details.digest!==void 0&&{effectsDigest:details.digest}},check:flags=>checkName(flags,`${noun} ${details.identifier??"name"}`,target,action)}}var MAX_TARGETS_IN_HINT=3;function describeTargets(consequence,details,targets){let{noun}=details,action=details.kind==="change"?`${details.action} for ${noun}`:`${details.kind} ${noun}`,effects=consequence==="severe"?[...details.effects,"This cannot be undone."]:details.effects;return{consequence,action,question:`${capitalize(action)}?`,rows:async agent=>{let{team}=details;return team===void 0||agent&&typeof team=="function"?[]:[["Team",typeof team=="function"?await team():team]]},effects,summary:targets.length>MAX_TARGETS_IN_HINT?`${capitalize(action)}.`:void 0,approvalArgs:targets.flatMap(target=>["--confirm-name",target]),approvalHint:targets.length>MAX_TARGETS_IN_HINT?"--confirm-name <NAME> once for each":void 0,scopeHint:"<TEAM>",teamForApproval:consequence==="severe",digest:details.digest,data:{consequence,kind:details.kind,noun,targets,effects,...details.digest!==void 0&&{effectsDigest:details.digest}},check:flags=>checkNames(flags,targets,action)}}function describePurchase(details){let{item,amountUsd,team,renews}=details,price=formatUsd(amountUsd),charge=`Charges ${price} to ${team} now${renews?`, then renews ${renews}`:", one time"}.`;return{consequence:"purchase",action:`buy ${item}`,question:`Buy ${item} for ${team}?`,rows:async()=>[["Team",team],["Charge",`${price} now`],["Renews",renews??"No, one-time charge"]],effects:[charge],approvalArgs:["--amount",formatAmountArg(amountUsd)],scopeHint:team,teamForApproval:!0,data:{consequence:"purchase",item,team,amount:amountUsd,currency:"USD",renews:renews??null,effects:[charge]},check:flags=>{let raw=flags["--amount"];if(raw===void 0)return{given:!1};let amount=parseAmount(raw);return amount instanceof Error?{given:!0,invalid:amount.message}:amount===void 0||amountMatchesPrice(amount,amountUsd)?{given:!0,matches:!0}:{given:!0,matches:!1,reason:AGENT_REASON.PRICE_CHANGED,message:`Can't buy ${item}. It costs ${price}, not ${formatUsd(amount)}. Nothing was charged.`}}}}function checkName(flags,identity,target,action){let given=flags["--confirm-name"];if(given===void 0)return{given:!1};let name=Array.isArray(given)?given.find(value=>value!==target)??target:given;return name===target?{given:!0,matches:!0}:{given:!0,matches:!1,reason:AGENT_REASON.INVALID_ARGUMENTS,message:`Can't ${action}. --confirm-name is "${name}", not the ${identity} "${target}". Nothing was changed.`}}function checkNames(flags,targets,action){let given=flags["--confirm-name"];if(given===void 0)return{given:!1};let names=new Set(Array.isArray(given)?given:[given]);if(names.size===0)return{given:!1};let unknown=[...names].filter(name=>!targets.includes(name)),missing=targets.filter(target=>!names.has(target));if(unknown.length===0&&missing.length===0)return{given:!0,matches:!0};let problem=unknown.length>0?`--confirm-name ${quoteList(unknown)} isn't one of them`:`--confirm-name is missing for ${quoteList(missing)}`;return{given:!0,matches:!1,reason:AGENT_REASON.INVALID_ARGUMENTS,message:`Can't ${action}. ${problem}. Nothing was changed.`}}function quoteList(names){let shown=names.slice(0,MAX_TARGETS_IN_HINT).map(name=>`"${name}"`),rest=names.length-shown.length;return rest>0?`${shown.join(", ")} and ${rest} more`:shown.join(", ")}async function promptForApproval(client,approval,legacy){return await printPreview(approval,!1),(approval.typedName?await client.input.text({message:approval.typedName.prompt})===approval.typedName.target:await client.input.confirm(approval.question,!1))?(track(client,approval,"prompt"),{approved:!0,warnings:[],prompted:!0}):(track(client,approval,"declined"),output_manager_default.log("Canceled. Nothing was changed."),{approved:!1,exitCode:legacy?.declineExitCode??130})}async function readPipedAnswer(client,approval,legacy){let[option]=approval.approvalArgs;output_manager_default.warning(`Without a terminal, this will need ${option}${approval.teamForApproval?" and --scope":""} in a future major version.`),await printPreview(approval,!1),output_manager_default.print(`? ${approval.question} (y/N) `);let answer=await readLine(client);return output_manager_default.print(`
21
- `),answer===void 0?(track(client,approval,"stopped"),output_manager_default.log("No answer. Nothing was changed."),{approved:!1,exitCode:legacy.stopExitCode}):/^y(es)?$/i.test(answer)?(track(client,approval,"piped"),{approved:!0,warnings:[],prompted:!0}):(track(client,approval,"declined"),output_manager_default.log("Canceled. Nothing was changed."),{approved:!1,exitCode:legacy.pipedDeclineExitCode??0})}function readLine(client){return new Promise(resolve=>{let received="",finish=line=>{client.stdin.off("data",onData),client.stdin.off("end",onEnd),client.stdin.pause(),resolve(line)},onData=data=>{received+=data.toString();let newline=received.indexOf(`
22
- `);newline!==-1&&finish(received.slice(0,newline).trim())},onEnd=()=>finish(received===""?void 0:received.trim());client.stdin.on("data",onData).once("end",onEnd).resume()})}function refuseMissingTeam(client,approval,noPrompts){return track(client,approval,"missing_scope"),refuse(client,approval,{reason:AGENT_REASON.MISSING_SCOPE,message:`Can't ${approval.action} without a team in non-interactive mode.`,exitCode:2,noPrompts,teamMissing:!0})}async function refuse(client,approval,opts){let scope=opts.teamMissing?"<TEAM>":void 0,command=buildApprovalCommand(client.argv,approvalArgsFor(approval),scope),when=`Only after a human approves: ${approval.summary??approval.effects.join(" ")}${opts.teamMissing?" Replace <TEAM> with the team it belongs to.":""}`,status=opts.status??AGENT_STATUS.ACTION_REQUIRED;if(status!==!1&&shouldEmitNonInteractiveCommandError(client)){let document={reason:opts.reason,action:AGENT_ACTION.CONFIRMATION_REQUIRED,message:opts.message,userActionRequired:!0,hint:`Show the user what this does (data.effects) and run next[] only after they approve.${opts.yesIgnored?" --yes doesn't approve this command.":""}`,data:approval.data,next:[{command,...client.jsonMode&&{argv:buildApprovalArgv(client.argv,approvalArgsFor(approval),scope)},when}]};return status===AGENT_STATUS.ACTION_REQUIRED?writeActionRequired(client,{status,...document}):writeAgentError(client,{status,...document}),{approved:!1,exitCode:opts.exitCode}}return output_manager_default.error(opts.message),await printPreview(approval,opts.noPrompts),output_manager_default.print(`
21
+ `),answer===void 0?(track(client,approval,"stopped"),recordCliError({code:AGENT_REASON.CONFIRMATION_REQUIRED}),output_manager_default.log("No answer. Nothing was changed."),{approved:!1,exitCode:legacy.stopExitCode}):/^y(es)?$/i.test(answer)?(track(client,approval,"piped"),{approved:!0,warnings:[],prompted:!0}):(track(client,approval,"declined"),output_manager_default.log("Canceled. Nothing was changed."),{approved:!1,exitCode:legacy.pipedDeclineExitCode??0})}function readLine(client){return new Promise(resolve=>{let received="",finish=line=>{client.stdin.off("data",onData),client.stdin.off("end",onEnd),client.stdin.pause(),resolve(line)},onData=data=>{received+=data.toString();let newline=received.indexOf(`
22
+ `);newline!==-1&&finish(received.slice(0,newline).trim())},onEnd=()=>finish(received===""?void 0:received.trim());client.stdin.on("data",onData).once("end",onEnd).resume()})}function refuseMissingTeam(client,approval,noPrompts){return track(client,approval,"missing_scope"),refuse(client,approval,{reason:AGENT_REASON.MISSING_SCOPE,message:`Can't ${approval.action} without a team in non-interactive mode.`,exitCode:2,noPrompts,teamMissing:!0})}async function refuse(client,approval,opts){let scope=opts.teamMissing?"<TEAM>":void 0,command=buildApprovalCommand(client.argv,approvalArgsFor(approval),scope),when=`Only after a human approves: ${approval.summary??approval.effects.join(" ")}${opts.teamMissing?" Replace <TEAM> with the team it belongs to.":""}`,status=opts.status??AGENT_STATUS.ACTION_REQUIRED;if(status!==!1&&shouldEmitNonInteractiveCommandError(client)){let document={reason:opts.reason,action:AGENT_ACTION.CONFIRMATION_REQUIRED,message:opts.message,userActionRequired:!0,hint:`Show the user what this does (data.effects) and run next[] only after they approve.${opts.yesIgnored?" --yes doesn't approve this command.":""}`,data:approval.data,next:[{command,...client.jsonMode&&{argv:buildApprovalArgv(client.argv,approvalArgsFor(approval),scope)},when}]};return status===AGENT_STATUS.ACTION_REQUIRED?writeActionRequired(client,{status,...document}):writeAgentError(client,{status,...document}),{approved:!1,exitCode:opts.exitCode}}return recordCliError({code:opts.reason}),output_manager_default.error(opts.message),await printPreview(approval,opts.noPrompts),output_manager_default.print(`
23
23
  Once a person approves, run:
24
24
  ${command}
25
25
  `),{approved:!1,exitCode:opts.exitCode}}function approvalArgsFor(approval){return approval.digest===void 0?approval.approvalArgs:[...approval.approvalArgs,"--effects-digest",approval.digest]}async function printPreview(approval,agent){for(let[label,value]of await approval.rows(agent))printAlignedLabel(label,value);output_manager_default.print(`
@@ -4,6 +4,6 @@ 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{RULE_ENVIRONMENTS}from"./chunk-6SX4TE7Y.js";import{AGENT_STATUS}from"./chunk-NVU7XTNI.js";import{warnDeprecatedInput}from"./chunk-IR3E37HD.js";function writeConfigJson(client,{project,bare,envelope,message,next}){if(!client.nonInteractive){client.stdout.write(`${JSON.stringify(bare,null,2)}
7
+ import{RULE_ENVIRONMENTS}from"./chunk-OXQKWOLS.js";import{AGENT_STATUS}from"./chunk-E6VQXHBD.js";import{warnDeprecatedInput}from"./chunk-BDLZ6WL2.js";function writeConfigJson(client,{project,bare,envelope,message,next}){if(!client.nonInteractive){client.stdout.write(`${JSON.stringify(bare,null,2)}
8
8
  `);return}client.stdout.write(`${JSON.stringify({status:AGENT_STATUS.OK,projectId:project.id,projectName:project.name,...envelope,message,next},null,2)}
9
9
  `)}var RULE_LIMIT=10,MIN_SAMPLE_RATE=1,MAX_SAMPLE_RATE=100;function isRuleEnvironment(value){return RULE_ENVIRONMENTS.includes(value)}var ENVIRONMENT_ERROR=`\`environment\` must be one of: ${RULE_ENVIRONMENTS.join(", ")}.`,RATE_ERROR=`\`rate\` must be a whole number from ${MIN_SAMPLE_RATE} to ${MAX_SAMPLE_RATE}.`,EMPTY_PATH_ERROR="`requestPath` cannot be empty.";function parseSampleRate(value){if(!/^\d+$/.test(value.trim()))return;let rate=Number(value);return rate>=MIN_SAMPLE_RATE&&rate<=MAX_SAMPLE_RATE?rate:void 0}function toRow(rule){return{environment:rule.env??"any",requestPath:rule.requestPath??null,sampleRate:Math.round(rule.rate*100)}}function toApiRate(sampleRate){return sampleRate/100}function toRule(row){return{type:"head_sampling",rate:toApiRate(row.sampleRate),...row.environment==="any"?{}:{env:row.environment},...row.requestPath===null?{}:{requestPath:row.requestPath}}}var ALL_PATHS_LABEL="(all paths)";function formatPath(requestPath){return requestPath??ALL_PATHS_LABEL}function formatRate(sampleRate){return`${sampleRate}%`}function formatRuleTarget(environment,requestPath){return`${environment} ${formatPath(requestPath)}`}function formatRuleLine(row){return`${formatRuleTarget(row.environment,row.requestPath)} ${formatRate(row.sampleRate)}`}var COMMAND_WORD_COUNT=3;function subcommandArguments(positional){return positional.slice(COMMAND_WORD_COUNT)}function resolveRuleEnvironment(client,environmentFlag,args){if(environmentFlag===void 0){let[environment,...rest]=args;return environment!==void 0&&isRuleEnvironment(environment)?(warnDeprecatedInput(client,"The environment argument","--environment"),{environment,args:rest}):{environment:void 0,args}}return args[0]!==void 0&&isRuleEnvironment(args[0])?{error:"Can't use an environment argument with --environment. Use --environment."}:{environment:environmentFlag,args}}function hasSameKey(a,b){return a.environment===b.environment&&a.requestPath===b.requestPath}async function readTracingConfig({client,teamId,projectId,projectName}){let config=await client.fetch(`/v1/drains/tracing/config?${new URLSearchParams({projectId})}`,{accountId:teamId}),sampling=config.enabled&&config.sampling.length===0?[{type:"head_sampling",rate:1}]:config.sampling;return{project:{id:projectId,name:projectName},enabled:config.enabled,entries:sampling.map(rule=>({rule,row:toRow(rule)}))}}async function writeSamplingRules({client,teamId,projectId,rules}){await client.fetch(`/v1/drains/tracing/config?${new URLSearchParams({projectId})}`,{accountId:teamId,method:"PUT",body:{enabled:rules.length>0,...rules.length>0?{sampling:rules}:{}}})}export{writeConfigJson,RULE_LIMIT,isRuleEnvironment,ENVIRONMENT_ERROR,RATE_ERROR,EMPTY_PATH_ERROR,parseSampleRate,toApiRate,toRule,formatPath,formatRate,formatRuleTarget,formatRuleLine,subcommandArguments,resolveRuleEnvironment,hasSameKey,readTracingConfig,writeSamplingRules};
@@ -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{humanizeReference,renderAlertTable}from"./chunk-QOIG2FJP.js";import{truncateEnd,truncateMiddle}from"./chunk-EL65DTVZ.js";import{formatDate}from"./chunk-46R47IE5.js";import{printAlignedLabel}from"./chunk-SUD5V67L.js";import{buildCommandWithGlobalFlags}from"./chunk-NVU7XTNI.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import{quoteArg}from"./chunk-DORCX7UB.js";import{require_source}from"./chunk-UJ7YUIEJ.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_chalk=__toESM(require_source(),1);function formatBoolean(value){return value?"yes":"no"}function formatOperator(operator){return{gt:">",gte:">=",lt:"<",lte:"<="}[operator]??operator}function formatPublicRuleScope(rule){let scope=rule.ruleScope;return scope.type==="all"?"all projects":scope.type==="project"?`project: ${scope.projectId}`:`${scope.type}: ${scope.projectIds.join(", ")}`}function formatMetricSelection(metric){let modifiers=[metric.per?`per ${metric.per}`:void 0,metric.normalize?`normalize ${metric.normalize}`:void 0,metric.dimensions?.length?`dimensions ${metric.dimensions.join(", ")}`:void 0].filter(Boolean);return`${metric.aggregation} ${metric.metric}${modifiers.length?` (${modifiers.join("; ")})`:""}`}function formatCustomTrigger(trigger){let minimum=trigger.minimum?`; minimum ${trigger.minimum.output} >= ${trigger.minimum.threshold}`:"";return trigger.type==="anomaly"?`${trigger.output} ${formatAnomalyDirection(trigger)} anomaly at ${trigger.standardDeviations} standard deviations${minimum}`:`${trigger.output} ${formatOperator(trigger.operator)} ${trigger.threshold}${minimum}`}function formatAnomalyDirection(trigger){return trigger.direction==="below"?"drop":"spike"}function formatCustomCondition(rule){if(!rule.querySupported)return"Query unavailable via API";let query=rule.evaluation.query,output=query.outputs[0];return`${query.formulas?.[output]?`${output} = ${query.formulas[output]}`:query.metrics[output]?formatMetricSelection(query.metrics[output]):output}; ${formatCustomTrigger(rule.trigger)}; ${rule.evaluation.window}`}function formatBuiltInCondition(rule){return`${rule.triggers.mode==="all"?"all triggers":rule.triggers.items.map(trigger=>humanizeReference(trigger.type)).join(", ")}; minimum ${rule.matchMinimumSeverityLevel}`}function formatRuleCondition(rule){return rule.type==="built-in"?formatBuiltInCondition(rule):formatCustomCondition(rule)}function printRules(rules){let rows=[["Name","Monitor ID","Type","Scope","Condition"].map(header=>import_chalk.default.cyan(header)),...rules.map(rule=>[import_chalk.default.bold(truncateEnd(rule.name,36)),import_chalk.default.dim(rule.id),rule.isDefault?`${rule.type} (default)`:rule.type,truncateMiddle(formatPublicRuleScope(rule),38),truncateEnd(formatRuleCondition(rule),72)])];output_manager_default.print(`
7
+ import{humanizeReference,renderAlertTable}from"./chunk-QOIG2FJP.js";import{truncateEnd,truncateMiddle}from"./chunk-EL65DTVZ.js";import{formatDate}from"./chunk-46R47IE5.js";import{printAlignedLabel}from"./chunk-SUD5V67L.js";import{buildCommandWithGlobalFlags}from"./chunk-E6VQXHBD.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import{quoteArg}from"./chunk-CUO3CYU3.js";import{require_source}from"./chunk-UJ7YUIEJ.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_chalk=__toESM(require_source(),1);function formatBoolean(value){return value?"yes":"no"}function formatOperator(operator){return{gt:">",gte:">=",lt:"<",lte:"<="}[operator]??operator}function formatPublicRuleScope(rule){let scope=rule.ruleScope;return scope.type==="all"?"all projects":scope.type==="project"?`project: ${scope.projectId}`:`${scope.type}: ${scope.projectIds.join(", ")}`}function formatMetricSelection(metric){let modifiers=[metric.per?`per ${metric.per}`:void 0,metric.normalize?`normalize ${metric.normalize}`:void 0,metric.dimensions?.length?`dimensions ${metric.dimensions.join(", ")}`:void 0].filter(Boolean);return`${metric.aggregation} ${metric.metric}${modifiers.length?` (${modifiers.join("; ")})`:""}`}function formatCustomTrigger(trigger){let minimum=trigger.minimum?`; minimum ${trigger.minimum.output} >= ${trigger.minimum.threshold}`:"";return trigger.type==="anomaly"?`${trigger.output} ${formatAnomalyDirection(trigger)} anomaly at ${trigger.standardDeviations} standard deviations${minimum}`:`${trigger.output} ${formatOperator(trigger.operator)} ${trigger.threshold}${minimum}`}function formatAnomalyDirection(trigger){return trigger.direction==="below"?"drop":"spike"}function formatCustomCondition(rule){if(!rule.querySupported)return"Query unavailable via API";let query=rule.evaluation.query,output=query.outputs[0];return`${query.formulas?.[output]?`${output} = ${query.formulas[output]}`:query.metrics[output]?formatMetricSelection(query.metrics[output]):output}; ${formatCustomTrigger(rule.trigger)}; ${rule.evaluation.window}`}function formatBuiltInCondition(rule){return`${rule.triggers.mode==="all"?"all triggers":rule.triggers.items.map(trigger=>humanizeReference(trigger.type)).join(", ")}; minimum ${rule.matchMinimumSeverityLevel}`}function formatRuleCondition(rule){return rule.type==="built-in"?formatBuiltInCondition(rule):formatCustomCondition(rule)}function printRules(rules){let rows=[["Name","Monitor ID","Type","Scope","Condition"].map(header=>import_chalk.default.cyan(header)),...rules.map(rule=>[import_chalk.default.bold(truncateEnd(rule.name,36)),import_chalk.default.dim(rule.id),rule.isDefault?`${rule.type} (default)`:rule.type,truncateMiddle(formatPublicRuleScope(rule),38),truncateEnd(formatRuleCondition(rule),72)])];output_manager_default.print(`
8
8
  ${renderAlertTable(rows,2)}
9
9
  `)}function commonRows(rule){return[["Name",rule.name],["Monitor ID",rule.id],["Type",rule.type],["Scope",formatPublicRuleScope(rule)],["Default",formatBoolean(rule.isDefault)],...rule.createdAt?[["Created",formatDate(rule.createdAt)]]:[],...rule.updatedAt?[["Updated",formatDate(rule.updatedAt)]]:[]]}function notificationRows(rule){return[["Team owner notifications",formatBoolean(rule.notificationSettings.enableTeamOwnerNotifications)],...rule.notificationSettings.incidentIoRoutingKey?[["Incident.io routing key",rule.notificationSettings.incidentIoRoutingKey]]:[]]}function printBuiltInRule(rule){output_manager_default.print(`${import_chalk.default.cyan("Built-in conditions")}
10
10
 
@@ -4,5 +4,5 @@ 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{VERCEL_DIR,VERCEL_DIR_PROJECT,require_lib,writeFileNoFollow}from"./chunk-G7RQVFID.js";import{require_dist}from"./chunk-4SIQE2W4.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_fs_extra=__toESM(require_lib(),1);import{join}from"path";var import_error_utils=__toESM(require_dist(),1);async function writeProjectSettings(cwd,project,org,isRepoLinked,root=cwd){let analyticsId;project.analytics?.id&&(!project.analytics.disabledAt||project.analytics.enabledAt&&project.analytics.enabledAt>project.analytics.disabledAt)&&(analyticsId=project.analytics.id);let projectLinkAndSettings={projectId:isRepoLinked?void 0:project.id,orgId:isRepoLinked?void 0:org.id,projectName:isRepoLinked?void 0:project.name,settings:{createdAt:project.createdAt,framework:project.framework,devCommand:project.devCommand,installCommand:project.installCommand,buildCommand:project.buildCommand,outputDirectory:project.outputDirectory,rootDirectory:project.rootDirectory,directoryListing:project.directoryListing,nodeVersion:project.nodeVersion,vercelFlags:project.vercelFlags,analyticsId}},path=join(cwd,VERCEL_DIR,VERCEL_DIR_PROJECT);return await writeFileNoFollow(path,`${JSON.stringify(projectLinkAndSettings,null,2)}
7
+ import{VERCEL_DIR,VERCEL_DIR_PROJECT,require_lib,writeFileNoFollow}from"./chunk-HDKEES7E.js";import{require_dist}from"./chunk-4SIQE2W4.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_fs_extra=__toESM(require_lib(),1);import{join}from"path";var import_error_utils=__toESM(require_dist(),1);async function writeProjectSettings(cwd,project,org,isRepoLinked,root=cwd){let analyticsId;project.analytics?.id&&(!project.analytics.disabledAt||project.analytics.enabledAt&&project.analytics.enabledAt>project.analytics.disabledAt)&&(analyticsId=project.analytics.id);let projectLinkAndSettings={projectId:isRepoLinked?void 0:project.id,orgId:isRepoLinked?void 0:org.id,projectName:isRepoLinked?void 0:project.name,settings:{createdAt:project.createdAt,framework:project.framework,devCommand:project.devCommand,installCommand:project.installCommand,buildCommand:project.buildCommand,outputDirectory:project.outputDirectory,rootDirectory:project.rootDirectory,directoryListing:project.directoryListing,nodeVersion:project.nodeVersion,vercelFlags:project.vercelFlags,analyticsId}},path=join(cwd,VERCEL_DIR,VERCEL_DIR_PROJECT);return await writeFileNoFollow(path,`${JSON.stringify(projectLinkAndSettings,null,2)}
8
8
  `,root)}async function readProjectSettings(vercelDir){try{return JSON.parse(await(0,import_fs_extra.readFile)(join(vercelDir,VERCEL_DIR_PROJECT),"utf8"))}catch(err){if((0,import_error_utils.isErrnoException)(err)&&err.code&&["ENOENT","ENOTDIR"].includes(err.code)||(0,import_error_utils.isError)(err)&&err.name==="SyntaxError")return null;throw err}}function pickOverrides(vercelConfig){let overrides={};for(let prop of["buildCommand","devCommand","framework","ignoreCommand","installCommand","outputDirectory"])typeof vercelConfig[prop]<"u"&&(prop==="ignoreCommand"?overrides.commandForIgnoringBuildStep=vercelConfig[prop]:overrides[prop]=vercelConfig[prop]);return overrides}export{writeProjectSettings,readProjectSettings,pickOverrides};
@@ -4,4 +4,4 @@ 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{DEFAULT_ORDER_WAIT_MS,ORDER_READ_TIMING,getOrderOutcome,pollForOrder,remainingWait}from"./chunk-UE6M2VKP.js";import{trackCreatedId}from"./chunk-MDWUJ7TA.js";import{getScope}from"./chunk-HG7NRFC5.js";import{sleep}from"./chunk-G7RQVFID.js";import{buildCommandWithGlobalFlags}from"./chunk-NVU7XTNI.js";import{DomainChargeOutcomeUnknown,DomainNotAvailable,DomainPaymentAuthenticationRequired,DomainPaymentError,DomainPriceChanged,DomainPurchaseInProgress,DomainPurchaseRefundFailed,DomainPurchaseRefunded,InvalidDomain,TLDNotSupportedViaCLI,UnexpectedDomainPurchaseError,UnsupportedTLD,isAPIError}from"./chunk-MTPHHAPR.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";async function getDomainPrice(client,name){try{return await client.fetch(`/v1/registrar/domains/${name}/price`)}catch(err){if(isAPIError(err)){if(err.code==="tld_not_supported")return new UnsupportedTLD(name);if(err.status<500)return err}throw err}}async function getDomainStatus(client,domain){return client.fetch(`/v1/registrar/domains/${encodeURIComponent(domain)}/availability`)}var PURCHASE_TIMING={lostOrderReconcileMs:10*1e3},BOUGHT_AT_SKEW_MS=5*60*1e3;async function findPurchasedSince(client,name,since,{timeoutMs}={}){try{let{domain}=await client.fetch(`/v5/domains/${encodeURIComponent(name)}`,{bailOn429:!0,...timeoutMs!==void 0&&{retry:{retries:0},signal:AbortSignal.timeout(timeoutMs)}}),{boughtAt,expiresAt}=domain;return typeof boughtAt=="number"&&boughtAt>=since-BOUGHT_AT_SKEW_MS&&(typeof expiresAt!="number"||expiresAt>Date.now())?domain:null}catch{return null}}async function isPurchasedSince(client,name,since,opts={}){return await findPurchasedSince(client,name,since,opts)!==null}async function waitForPurchase(client,name,since,timeoutMs){let startTime=Date.now(),intervalMs=1e3,lookup=()=>findPurchasedSince(client,name,since,{timeoutMs:Math.max(timeoutMs-(Date.now()-startTime),1e3)});for(;Date.now()-startTime<timeoutMs;){let domain=await lookup();if(domain)return domain;await sleep(Math.min(intervalMs,timeoutMs-(Date.now()-startTime))),intervalMs=Math.min(intervalMs*2,5e3)}return lookup()}async function purchaseDomain(client,name,expectedPrice,years,autoRenew=!0,contactInformation,{waitMs=DEFAULT_ORDER_WAIT_MS,onOrderAccepted}={}){let{team}=await getScope(client),teamParam=team?`?teamId=${team.slug}`:"",startedAt=Date.now(),orderId;try{({orderId}=await client.fetch(`/v1/registrar/domains/${name}/buy${teamParam}`,{body:{expectedPrice,autoRenew,years,contactInformation},method:"POST",retry:{retries:0},bailOn429:!0}))}catch(err){if(isAPIError(err)&&err.status<500){if(err.code==="invalid_domain")return new InvalidDomain(name);if(err.code==="domain_not_available")return new DomainNotAvailable(name);if(err.code==="tld_not_supported")return new UnsupportedTLD(name);if(err.code==="additional_contact_info_required")return new TLDNotSupportedViaCLI(name);if(err.code==="expected_price_mismatch")return new DomainPriceChanged(name);if(err.code==="purchase_in_progress"){let otherOrderId=typeof err.orderId=="string"?err.orderId:void 0;return new DomainPurchaseInProgress(name,otherOrderId,otherOrderId&&buildCommandWithGlobalFlags(client.argv,`api /v1/registrar/orders/${otherOrderId}`))}throw err}let bought=await waitForPurchase(client,name,startedAt,PURCHASE_TIMING.lostOrderReconcileMs);return bought?(trackCreatedId(client,"domain",bought.id),{status:"completed",orderId:null}):new DomainChargeOutcomeUnknown(name,"buy")}trackCreatedId(client,"domain-order",orderId),onOrderAccepted?.(orderId);let ownedSince=since=>isPurchasedSince(client,name,since,{timeoutMs:Math.max(startedAt+waitMs+ORDER_READ_TIMING.minReadMs-Date.now(),1e3)});if(waitMs<=0)return{status:"pending",orderId,lastStatus:null};let poll=await pollForOrder(client,orderId,remainingWait(waitMs,startedAt));if(poll.order===null)return await ownedSince(startedAt)?{status:"completed",orderId}:{status:"pending",orderId,lastStatus:poll.lastStatus,...poll.readError&&{readError:poll.readError}};let outcome=getOrderOutcome(poll.order,name);switch(outcome){case"completed":return{status:"completed",orderId};case"payment_failed":return new DomainPaymentError;case"payment_authentication_required":return new DomainPaymentAuthenticationRequired(name,team?.slug);case"refund_failed":return new DomainPurchaseRefundFailed(name);case"refunded":case"failed":return await ownedSince(0)?{status:"already_owned",orderId,orderOutcome:outcome}:outcome==="refunded"?new DomainPurchaseRefunded(name):new UnexpectedDomainPurchaseError(name);case"unknown":return await ownedSince(startedAt)?{status:"completed",orderId}:new DomainChargeOutcomeUnknown(name,"buy",orderId)}}var CONTACT_FIELDS=[{field:"firstName",flag:"--first-name",label:"First name",prompt:"First name:",validate:val=>val.length>0||"First name is required"},{field:"lastName",flag:"--last-name",label:"Last name",prompt:"Last name:",validate:val=>val.length>0||"Last name is required"},{field:"email",flag:"--email",label:"Email",prompt:"Email:",validate:val=>val.length===0?"Email is required":/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(val)?!0:"Invalid email format"},{field:"phone",flag:"--phone",label:"Phone",prompt:"Phone (include country code, e.g., +15551234567):",validate:val=>val.length===0?"Phone is required":/^\+\d{10,15}$/.test(val)?!0:"Phone must start with + and contain 10-15 digits"},{field:"address1",flag:"--address",label:"Address",prompt:"Address:",validate:val=>val.length>0||"Address is required"},{field:"city",flag:"--city",label:"City",prompt:"City:",validate:val=>val.length>0||"City is required"},{field:"state",flag:"--state",label:"State",prompt:"State/Province:",validate:val=>val.length>0||"State/Province is required"},{field:"zip",flag:"--zip",label:"ZIP",prompt:"Postal/ZIP code:",validate:val=>val.length>0||"Postal/ZIP code is required"},{field:"country",flag:"--country",label:"Country",prompt:"Country code (2 letters, e.g., US):",validate:val=>val.length===0?"Country code is required":/^[A-Z]{2}$/i.test(val)?!0:"Country code must be 2 letters"},{field:"companyName",flag:"--company",label:"Company",prompt:"Company name (optional):"}],ADDRESS_FIELDS=new Set(["address1","city","state","zip","country"]);function readContactFlags(flags){let contact={};for(let{field,flag,validate}of CONTACT_FIELDS){let raw=flags[flag];if(typeof raw!="string")continue;let value=raw.trim(),result=validate?validate(value):!0;if(result!==!0)return`Invalid ${flag}. ${result}.`;contact[field]=field==="country"?value.toUpperCase():value}return contact}function getBillingContact(team){let billing=team?.billing;if(!billing)return{};let address=billing.address,line1=address?.line1?.trim(),line2=address?.line2?.trim(),country=address?.country?.trim().toUpperCase(),rawState=address?.state?.trim(),state=country&&rawState?.toUpperCase().startsWith(`${country}-`)?rawState.slice(country.length+1):rawState,candidates={email:billing.email,address1:line1&&line2?`${line1}, ${line2}`:line1,city:address?.city,state:country==="US"&&!/^[A-Z]{2}$/i.test(state??"")?"":state,zip:address?.postalCode,country},contact={};for(let{field,validate}of CONTACT_FIELDS){let value=candidates[field]?.trim();value&&(!validate||validate(value)===!0)&&(contact[field]=value)}return contact}function mergeContact(fromFlags,billing){let ownAddress=[...ADDRESS_FIELDS].some(field=>fromFlags[field]!==void 0&&billing[field]!==void 0),merged={};for(let{field}of CONTACT_FIELDS){let fallback=ownAddress&&ADDRESS_FIELDS.has(field)?void 0:billing[field],value=fromFlags[field]??fallback;value!==void 0&&(merged[field]=value)}return merged}function billingFieldsUsed(fromFlags,billing){let merged=mergeContact(fromFlags,billing),used={};for(let{field}of CONTACT_FIELDS)fromFlags[field]===void 0&&merged[field]!==void 0&&(used[field]=merged[field]);return used}function missingContactFields(contact){return CONTACT_FIELDS.filter(({field,validate})=>validate&&!contact[field]).map(({field})=>field)}async function collectContactInformation(client,{provided={},defaults={}}={}){let contact={...provided},pending=CONTACT_FIELDS.filter(({field})=>!(field in provided));pending.length>0&&(output_manager_default.log(""),output_manager_default.log("Please provide contact information for domain registration:"));for(let{field,prompt,validate}of pending){let value=await client.input.text({message:prompt,default:defaults[field],validate});value&&(contact[field]=value)}return{...contact,country:contact.country.toUpperCase(),companyName:contact.companyName||void 0}}export{getDomainPrice,getDomainStatus,isPurchasedSince,purchaseDomain,CONTACT_FIELDS,readContactFlags,getBillingContact,mergeContact,billingFieldsUsed,missingContactFields,collectContactInformation};
7
+ import{DEFAULT_ORDER_WAIT_MS,ORDER_READ_TIMING,getOrderOutcome,pollForOrder,remainingWait}from"./chunk-NFBFXM6X.js";import{trackCreatedId}from"./chunk-ILNTOWHG.js";import{getScope}from"./chunk-CRPZYLIL.js";import{sleep}from"./chunk-HDKEES7E.js";import{buildCommandWithGlobalFlags}from"./chunk-E6VQXHBD.js";import{DomainChargeOutcomeUnknown,DomainNotAvailable,DomainPaymentAuthenticationRequired,DomainPaymentError,DomainPriceChanged,DomainPurchaseInProgress,DomainPurchaseRefundFailed,DomainPurchaseRefunded,InvalidDomain,TLDNotSupportedViaCLI,UnexpectedDomainPurchaseError,UnsupportedTLD,isAPIError}from"./chunk-MTPHHAPR.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";async function getDomainPrice(client,name){try{return await client.fetch(`/v1/registrar/domains/${name}/price`)}catch(err){if(isAPIError(err)){if(err.code==="tld_not_supported")return new UnsupportedTLD(name);if(err.status<500)return err}throw err}}async function getDomainStatus(client,domain){return client.fetch(`/v1/registrar/domains/${encodeURIComponent(domain)}/availability`)}var PURCHASE_TIMING={lostOrderReconcileMs:10*1e3},BOUGHT_AT_SKEW_MS=5*60*1e3;async function findPurchasedSince(client,name,since,{timeoutMs}={}){try{let{domain}=await client.fetch(`/v5/domains/${encodeURIComponent(name)}`,{bailOn429:!0,...timeoutMs!==void 0&&{retry:{retries:0},signal:AbortSignal.timeout(timeoutMs)}}),{boughtAt,expiresAt}=domain;return typeof boughtAt=="number"&&boughtAt>=since-BOUGHT_AT_SKEW_MS&&(typeof expiresAt!="number"||expiresAt>Date.now())?domain:null}catch{return null}}async function isPurchasedSince(client,name,since,opts={}){return await findPurchasedSince(client,name,since,opts)!==null}async function waitForPurchase(client,name,since,timeoutMs){let startTime=Date.now(),intervalMs=1e3,lookup=()=>findPurchasedSince(client,name,since,{timeoutMs:Math.max(timeoutMs-(Date.now()-startTime),1e3)});for(;Date.now()-startTime<timeoutMs;){let domain=await lookup();if(domain)return domain;await sleep(Math.min(intervalMs,timeoutMs-(Date.now()-startTime))),intervalMs=Math.min(intervalMs*2,5e3)}return lookup()}async function purchaseDomain(client,name,expectedPrice,years,autoRenew=!0,contactInformation,{waitMs=DEFAULT_ORDER_WAIT_MS,onOrderAccepted}={}){let{team}=await getScope(client),teamParam=team?`?teamId=${team.slug}`:"",startedAt=Date.now(),orderId;try{({orderId}=await client.fetch(`/v1/registrar/domains/${name}/buy${teamParam}`,{body:{expectedPrice,autoRenew,years,contactInformation},method:"POST",retry:{retries:0},bailOn429:!0}))}catch(err){if(isAPIError(err)&&err.status<500){if(err.code==="invalid_domain")return new InvalidDomain(name);if(err.code==="domain_not_available")return new DomainNotAvailable(name);if(err.code==="tld_not_supported")return new UnsupportedTLD(name);if(err.code==="additional_contact_info_required")return new TLDNotSupportedViaCLI(name);if(err.code==="expected_price_mismatch")return new DomainPriceChanged(name);if(err.code==="purchase_in_progress"){let otherOrderId=typeof err.orderId=="string"?err.orderId:void 0;return new DomainPurchaseInProgress(name,otherOrderId,otherOrderId&&buildCommandWithGlobalFlags(client.argv,`api /v1/registrar/orders/${otherOrderId}`))}throw err}let bought=await waitForPurchase(client,name,startedAt,PURCHASE_TIMING.lostOrderReconcileMs);return bought?(trackCreatedId(client,"domain",bought.id),{status:"completed",orderId:null}):new DomainChargeOutcomeUnknown(name,"buy")}trackCreatedId(client,"domain-order",orderId),onOrderAccepted?.(orderId);let ownedSince=since=>isPurchasedSince(client,name,since,{timeoutMs:Math.max(startedAt+waitMs+ORDER_READ_TIMING.minReadMs-Date.now(),1e3)});if(waitMs<=0)return{status:"pending",orderId,lastStatus:null};let poll=await pollForOrder(client,orderId,remainingWait(waitMs,startedAt));if(poll.order===null)return await ownedSince(startedAt)?{status:"completed",orderId}:{status:"pending",orderId,lastStatus:poll.lastStatus,...poll.readError&&{readError:poll.readError}};let outcome=getOrderOutcome(poll.order,name);switch(outcome){case"completed":return{status:"completed",orderId};case"payment_failed":return new DomainPaymentError;case"payment_authentication_required":return new DomainPaymentAuthenticationRequired(name,team?.slug);case"refund_failed":return new DomainPurchaseRefundFailed(name);case"refunded":case"failed":return await ownedSince(0)?{status:"already_owned",orderId,orderOutcome:outcome}:outcome==="refunded"?new DomainPurchaseRefunded(name):new UnexpectedDomainPurchaseError(name);case"unknown":return await ownedSince(startedAt)?{status:"completed",orderId}:new DomainChargeOutcomeUnknown(name,"buy",orderId)}}var CONTACT_FIELDS=[{field:"firstName",flag:"--first-name",label:"First name",prompt:"First name:",validate:val=>val.length>0||"First name is required"},{field:"lastName",flag:"--last-name",label:"Last name",prompt:"Last name:",validate:val=>val.length>0||"Last name is required"},{field:"email",flag:"--email",label:"Email",prompt:"Email:",validate:val=>val.length===0?"Email is required":/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(val)?!0:"Invalid email format"},{field:"phone",flag:"--phone",label:"Phone",prompt:"Phone (include country code, e.g., +15551234567):",validate:val=>val.length===0?"Phone is required":/^\+\d{10,15}$/.test(val)?!0:"Phone must start with + and contain 10-15 digits"},{field:"address1",flag:"--address",label:"Address",prompt:"Address:",validate:val=>val.length>0||"Address is required"},{field:"city",flag:"--city",label:"City",prompt:"City:",validate:val=>val.length>0||"City is required"},{field:"state",flag:"--state",label:"State",prompt:"State/Province:",validate:val=>val.length>0||"State/Province is required"},{field:"zip",flag:"--zip",label:"ZIP",prompt:"Postal/ZIP code:",validate:val=>val.length>0||"Postal/ZIP code is required"},{field:"country",flag:"--country",label:"Country",prompt:"Country code (2 letters, e.g., US):",validate:val=>val.length===0?"Country code is required":/^[A-Z]{2}$/i.test(val)?!0:"Country code must be 2 letters"},{field:"companyName",flag:"--company",label:"Company",prompt:"Company name (optional):"}],ADDRESS_FIELDS=new Set(["address1","city","state","zip","country"]);function readContactFlags(flags){let contact={};for(let{field,flag,validate}of CONTACT_FIELDS){let raw=flags[flag];if(typeof raw!="string")continue;let value=raw.trim(),result=validate?validate(value):!0;if(result!==!0)return`Invalid ${flag}. ${result}.`;contact[field]=field==="country"?value.toUpperCase():value}return contact}function getBillingContact(team){let billing=team?.billing;if(!billing)return{};let address=billing.address,line1=address?.line1?.trim(),line2=address?.line2?.trim(),country=address?.country?.trim().toUpperCase(),rawState=address?.state?.trim(),state=country&&rawState?.toUpperCase().startsWith(`${country}-`)?rawState.slice(country.length+1):rawState,candidates={email:billing.email,address1:line1&&line2?`${line1}, ${line2}`:line1,city:address?.city,state:country==="US"&&!/^[A-Z]{2}$/i.test(state??"")?"":state,zip:address?.postalCode,country},contact={};for(let{field,validate}of CONTACT_FIELDS){let value=candidates[field]?.trim();value&&(!validate||validate(value)===!0)&&(contact[field]=value)}return contact}function mergeContact(fromFlags,billing){let ownAddress=[...ADDRESS_FIELDS].some(field=>fromFlags[field]!==void 0&&billing[field]!==void 0),merged={};for(let{field}of CONTACT_FIELDS){let fallback=ownAddress&&ADDRESS_FIELDS.has(field)?void 0:billing[field],value=fromFlags[field]??fallback;value!==void 0&&(merged[field]=value)}return merged}function billingFieldsUsed(fromFlags,billing){let merged=mergeContact(fromFlags,billing),used={};for(let{field}of CONTACT_FIELDS)fromFlags[field]===void 0&&merged[field]!==void 0&&(used[field]=merged[field]);return used}function missingContactFields(contact){return CONTACT_FIELDS.filter(({field,validate})=>validate&&!contact[field]).map(({field})=>field)}async function collectContactInformation(client,{provided={},defaults={}}={}){let contact={...provided},pending=CONTACT_FIELDS.filter(({field})=>!(field in provided));pending.length>0&&(output_manager_default.log(""),output_manager_default.log("Please provide contact information for domain registration:"));for(let{field,prompt,validate}of pending){let value=await client.input.text({message:prompt,default:defaults[field],validate});value&&(contact[field]=value)}return{...contact,country:contact.country.toUpperCase(),companyName:contact.companyName||void 0}}export{getDomainPrice,getDomainStatus,isPurchasedSince,purchaseDomain,CONTACT_FIELDS,readContactFlags,getBillingContact,mergeContact,billingFieldsUsed,missingContactFields,collectContactInformation};
@@ -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{require_slugify}from"./chunk-BNWEJZAC.js";import{createProject}from"./chunk-EYCKXHL4.js";import{printProjectNotFoundError}from"./chunk-HI5PLVKM.js";import{canPrompt}from"./chunk-IQ7FPAI4.js";import{detectExplicitScope,getScope,resolveOrg}from"./chunk-HG7NRFC5.js";import{getLinkedProject,getOrgById,isOwnerLookupUnavailableLink,require_dist2 as require_dist,require_lib}from"./chunk-G7RQVFID.js";import{printAlignedLabel}from"./chunk-SUD5V67L.js";import{printError}from"./chunk-Y2J2ESAE.js";import{AGENT_REASON,AGENT_STATUS,writeAgentError,writeTrackedActionRequired}from"./chunk-NVU7XTNI.js";import{isAPIError}from"./chunk-MTPHHAPR.js";import{packageName}from"./chunk-EFGZK6OY.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import{require_build_utils}from"./chunk-BVFFSUG3.js";import{normalizeFlagName,quoteArg,stripSensitiveAuthArgs}from"./chunk-DORCX7UB.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_fs_extra=__toESM(require_lib(),1);import{readdir}from"fs/promises";import{join}from"path";function isStaticFolderDeploy(project,localConfig,rootDirectory){if(rootDirectory||localConfig.builds?.length||localConfig.routes?.length||localConfig.rewrites?.length||localConfig.proxy)return!1;let setting=key=>Object.hasOwn(localConfig,key)?localConfig[key]:project[key],outputDirectory=setting("outputDirectory");return!setting("framework")&&!setting("buildCommand")&&(!outputDirectory||outputDirectory===".")}async function aliasLonePageInOutput(outputDir){if(!await isPlainStaticOutput(outputDir))return;let staticDir=join(outputDir,"static"),entries;try{entries=(await readdir(staticDir,{recursive:!0})).map(entry=>entry.split("\\").join("/"))}catch{return}let pages=entries.filter(entry=>/\.html?$/i.test(entry));if(pages.length!==1)return;let[page]=pages;page.includes("/")||page==="index.html"||page==="index.htm"||(await import_fs_extra.default.stat(join(staticDir,page))).isFile()&&await writeIndexCopy(staticDir,page)}async function isPlainStaticOutput(outputDir){if(await import_fs_extra.default.pathExists(join(outputDir,"functions")))return!1;let readJSON=name=>import_fs_extra.default.readJSON(join(outputDir,name)).catch(()=>null),builds=(await readJSON("builds.json"))?.builds;if(!Array.isArray(builds)||builds.length===0||builds.some(build=>build?.use!=="@vercel/static"))return!1;let config=await readJSON("config.json"),routes=config?.routes??[];return!config||!Array.isArray(routes)?!1:routes.findIndex(route=>route?.handle==="error")===0||routes.length===0}async function writeIndexCopy(dir,name){let page=join(dir,name),index=join(dir,"index.html"),existing=await import_fs_extra.default.stat(index).catch(()=>null);if(existing&&existing.ino===(await import_fs_extra.default.stat(page)).ino){await import_fs_extra.default.rename(page,index);return}await import_fs_extra.default.copy(page,index)}var import_fs_extra2=__toESM(require_lib(),1),import_slugify=__toESM(require_slugify(),1),import_build_utils=__toESM(require_build_utils(),1),import_client=__toESM(require_dist(),1);import{basename,dirname,extname,isAbsolute,join as join2,relative,sep}from"path";var singleFileConfig={framework:null,buildCommand:"",installCommand:"",outputDirectory:null},singleFileProjectSettings={...singleFileConfig,rootDirectory:null};async function stageSingleFile(file,dir){let name=basename(file);await import_fs_extra2.default.copy(file,join2(dir,name)),servesAtRoot(name)&&await writeIndexCopy(dir,name)}function getSingleFileNameError(name){if(name.includes("\\"))return"Can't deploy a file with a backslash in its name. Rename the file, or deploy its directory.";if(name===".vc-config.json")return"Can't deploy a file named .vc-config.json on its own, because Vercel reads that name as a function config. Rename the file, or deploy its directory."}function servesAtRoot(name){let ext=extname(name).toLowerCase();return(ext===".html"||ext===".htm")&&name!=="index.html"&&name!=="index.htm"}async function isIgnoredFile(file,cwd){let roots=new Set([dirname(file)]),fromCwd=relative(cwd,file);fromCwd&&!fromCwd.startsWith(`..${sep}`)&&!isAbsolute(fromCwd)&&roots.add(cwd);for(let root of roots){let{ig}=await(0,import_client.getVercelIgnore)(root);if(ig.ignores(relative(root,file).split(sep).join("/")))return!0}return!1}function getSingleFileProjectName(file){return(0,import_slugify.default)(basename(file,extname(file))).slice(0,100).replace(/-+$/,"")||void 0}var PROJECT_NAME_RULES="Project names can be up to 100 characters long and must be lowercase. They can include letters, digits, and the following characters: '.', '_', '-'. However, they cannot contain the sequence '---'.";function isValidProjectName(name){return/^[a-z0-9._-]{1,100}$/.test(name)&&!name.includes("---")}var singleFileMeta={singleFile:"1"};function isStaticProject(project){if(project.framework||project.link||project.rootDirectory||project.buildCommand||project.installCommand)return!1;if(project.outputDirectory===".")return!0;if(project.outputDirectory)return!1;let served=project.targets?.production??project.latestDeployments?.[0];return!served||served.meta?.singleFile===singleFileMeta.singleFile}var PROJECT_FLAGS=["--project","--name","-n"],SCOPE_FLAGS=["--scope","--team","-S","-T"];function rawArgsWithout(client,flags){let args=stripSensitiveAuthArgs(client.argv.slice(2)),kept=[];for(let i=0;i<args.length;i++){let arg=args[i];if(flags.includes(normalizeFlagName(arg))){arg.includes("=")||i++;continue}kept.push(arg)}return kept}function argsWithout(client,flags){return rawArgsWithout(client,flags).map(quoteArg).join(" ")}function retryWithProject(client,project){return`${packageName} ${argsWithout(client,PROJECT_FLAGS)} --project ${project}`}function singleFileTargetArgs(client,link){let{org,project}=link,scope=!detectExplicitScope(client)&&org.type==="team"&&org.slug&&!isOwnerLookupUnavailableLink(link)?` --scope ${quoteArg(org.slug)}`:"";return` --project ${quoteArg(project.id)}${scope}`}async function applyNameScope(client){if(detectExplicitScope(client))return;if(client.ignoresSavedTeam){await client.resolveCurrentTeam();return}let envOrgId=(0,import_build_utils.getPlatformEnv)("ORG_ID");if(envOrgId){client.config.currentTeam=envOrgId.startsWith("team_")?envOrgId:void 0;return}if(!client.config.currentTeam)try{await getScope(client)}catch(err){output_manager_default.debug(`Using the token's scope for single-file deploys: ${err}`)}}function fail(client,asJson,{headline,detail,next=[],...failure},exitCode){if(asJson){let{status,...rest}=failure,payload={...rest,message:detail?`${headline} ${detail}`:headline,...next.length>0&&{next:next.map(({command,when})=>({command,when}))}};status===AGENT_STATUS.ERROR?writeAgentError(client,{...payload,status}):writeTrackedActionRequired(client,{...payload,status})}else{output_manager_default.fatal(detail?`${headline}
7
+ import{require_slugify}from"./chunk-BNWEJZAC.js";import{createProject}from"./chunk-C2R5IEN6.js";import{printProjectNotFoundError}from"./chunk-Q4W3R6U2.js";import{canPrompt}from"./chunk-IQ7FPAI4.js";import{detectExplicitScope,getScope,resolveOrg}from"./chunk-CRPZYLIL.js";import{getLinkedProject,getOrgById,isOwnerLookupUnavailableLink,require_dist2 as require_dist,require_lib}from"./chunk-HDKEES7E.js";import{printAlignedLabel}from"./chunk-SUD5V67L.js";import{printError}from"./chunk-7EI554V5.js";import{AGENT_REASON,AGENT_STATUS,writeAgentError,writeTrackedActionRequired}from"./chunk-E6VQXHBD.js";import{isAPIError}from"./chunk-MTPHHAPR.js";import{packageName}from"./chunk-EFGZK6OY.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import{require_build_utils}from"./chunk-BVFFSUG3.js";import{normalizeFlagName,quoteArg,stripSensitiveAuthArgs}from"./chunk-CUO3CYU3.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_fs_extra=__toESM(require_lib(),1);import{readdir}from"fs/promises";import{join}from"path";function isStaticFolderDeploy(project,localConfig,rootDirectory){if(rootDirectory||localConfig.builds?.length||localConfig.routes?.length||localConfig.rewrites?.length||localConfig.proxy)return!1;let setting=key=>Object.hasOwn(localConfig,key)?localConfig[key]:project[key],outputDirectory=setting("outputDirectory");return!setting("framework")&&!setting("buildCommand")&&(!outputDirectory||outputDirectory===".")}async function aliasLonePageInOutput(outputDir){if(!await isPlainStaticOutput(outputDir))return;let staticDir=join(outputDir,"static"),entries;try{entries=(await readdir(staticDir,{recursive:!0})).map(entry=>entry.split("\\").join("/"))}catch{return}let pages=entries.filter(entry=>/\.html?$/i.test(entry));if(pages.length!==1)return;let[page]=pages;page.includes("/")||page==="index.html"||page==="index.htm"||(await import_fs_extra.default.stat(join(staticDir,page))).isFile()&&await writeIndexCopy(staticDir,page)}async function isPlainStaticOutput(outputDir){if(await import_fs_extra.default.pathExists(join(outputDir,"functions")))return!1;let readJSON=name=>import_fs_extra.default.readJSON(join(outputDir,name)).catch(()=>null),builds=(await readJSON("builds.json"))?.builds;if(!Array.isArray(builds)||builds.length===0||builds.some(build=>build?.use!=="@vercel/static"))return!1;let config=await readJSON("config.json"),routes=config?.routes??[];return!config||!Array.isArray(routes)?!1:routes.findIndex(route=>route?.handle==="error")===0||routes.length===0}async function writeIndexCopy(dir,name){let page=join(dir,name),index=join(dir,"index.html"),existing=await import_fs_extra.default.stat(index).catch(()=>null);if(existing&&existing.ino===(await import_fs_extra.default.stat(page)).ino){await import_fs_extra.default.rename(page,index);return}await import_fs_extra.default.copy(page,index)}var import_fs_extra2=__toESM(require_lib(),1),import_slugify=__toESM(require_slugify(),1),import_build_utils=__toESM(require_build_utils(),1),import_client=__toESM(require_dist(),1);import{basename,dirname,extname,isAbsolute,join as join2,relative,sep}from"path";var singleFileConfig={framework:null,buildCommand:"",installCommand:"",outputDirectory:null},singleFileProjectSettings={...singleFileConfig,rootDirectory:null};async function stageSingleFile(file,dir){let name=basename(file);await import_fs_extra2.default.copy(file,join2(dir,name)),servesAtRoot(name)&&await writeIndexCopy(dir,name)}function getSingleFileNameError(name){if(name.includes("\\"))return"Can't deploy a file with a backslash in its name. Rename the file, or deploy its directory.";if(name===".vc-config.json")return"Can't deploy a file named .vc-config.json on its own, because Vercel reads that name as a function config. Rename the file, or deploy its directory."}function servesAtRoot(name){let ext=extname(name).toLowerCase();return(ext===".html"||ext===".htm")&&name!=="index.html"&&name!=="index.htm"}async function isIgnoredFile(file,cwd){let roots=new Set([dirname(file)]),fromCwd=relative(cwd,file);fromCwd&&!fromCwd.startsWith(`..${sep}`)&&!isAbsolute(fromCwd)&&roots.add(cwd);for(let root of roots){let{ig}=await(0,import_client.getVercelIgnore)(root);if(ig.ignores(relative(root,file).split(sep).join("/")))return!0}return!1}function getSingleFileProjectName(file){return(0,import_slugify.default)(basename(file,extname(file))).slice(0,100).replace(/-+$/,"")||void 0}var PROJECT_NAME_RULES="Project names can be up to 100 characters long and must be lowercase. They can include letters, digits, and the following characters: '.', '_', '-'. However, they cannot contain the sequence '---'.";function isValidProjectName(name){return/^[a-z0-9._-]{1,100}$/.test(name)&&!name.includes("---")}var singleFileMeta={singleFile:"1"};function isStaticProject(project){if(project.framework||project.link||project.rootDirectory||project.buildCommand||project.installCommand)return!1;if(project.outputDirectory===".")return!0;if(project.outputDirectory)return!1;let served=project.targets?.production??project.latestDeployments?.[0];return!served||served.meta?.singleFile===singleFileMeta.singleFile}var PROJECT_FLAGS=["--project","--name","-n"],SCOPE_FLAGS=["--scope","--team","-S","-T"];function rawArgsWithout(client,flags){let args=stripSensitiveAuthArgs(client.argv.slice(2)),kept=[];for(let i=0;i<args.length;i++){let arg=args[i];if(flags.includes(normalizeFlagName(arg))){arg.includes("=")||i++;continue}kept.push(arg)}return kept}function argsWithout(client,flags){return rawArgsWithout(client,flags).map(quoteArg).join(" ")}function retryWithProject(client,project){return`${packageName} ${argsWithout(client,PROJECT_FLAGS)} --project ${project}`}function singleFileTargetArgs(client,link){let{org,project}=link,scope=!detectExplicitScope(client)&&org.type==="team"&&org.slug&&!isOwnerLookupUnavailableLink(link)?` --scope ${quoteArg(org.slug)}`:"";return` --project ${quoteArg(project.id)}${scope}`}async function applyNameScope(client){if(detectExplicitScope(client))return;if(client.ignoresSavedTeam){await client.resolveCurrentTeam();return}let envOrgId=(0,import_build_utils.getPlatformEnv)("ORG_ID");if(envOrgId){client.config.currentTeam=envOrgId.startsWith("team_")?envOrgId:void 0;return}if(!client.config.currentTeam)try{await getScope(client)}catch(err){output_manager_default.debug(`Using the token's scope for single-file deploys: ${err}`)}}function fail(client,asJson,{headline,detail,next=[],...failure},exitCode){if(asJson){let{status,...rest}=failure,payload={...rest,message:detail?`${headline} ${detail}`:headline,...next.length>0&&{next:next.map(({command,when})=>({command,when}))}};status===AGENT_STATUS.ERROR?writeAgentError(client,{...payload,status}):writeTrackedActionRequired(client,{...payload,status})}else{output_manager_default.fatal(detail?`${headline}
8
8
  ${detail}`:headline);for(let{instruction,command}of next)output_manager_default.print(`
9
9
  ${instruction}:
10
10
  ${command}
@@ -4,5 +4,5 @@ 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{repositoryPermissionsClearPath}from"./chunk-DFVNL5ML.js";import{emitVcrArgParseError,handleVcrApiError,requireVcrRepository,resolveVcrScope,validateVcrJsonOutput}from"./chunk-AJJIPBAG.js";import"./chunk-4FPYV37P.js";import"./chunk-3WXQHKSS.js";import"./chunk-FIICEEXO.js";import"./chunk-RFD7CEL6.js";import{permissionsClearSubcommand}from"./chunk-245QYIHU.js";import"./chunk-HG7NRFC5.js";import"./chunk-G7RQVFID.js";import"./chunk-SUD5V67L.js";import"./chunk-7TRHPXCG.js";import"./chunk-UGVOMXYR.js";import"./chunk-K5GE24PG.js";import"./chunk-QRPBDCDH.js";import"./chunk-IFMPBA4K.js";import"./chunk-2GXP676X.js";import"./chunk-KHJWQ4WP.js";import"./chunk-MY4MONOH.js";import"./chunk-4D4IP557.js";import"./chunk-2ILZM77F.js";import{printError}from"./chunk-Y2J2ESAE.js";import{parseArguments}from"./chunk-RDTWDVFO.js";import{AGENT_REASON,buildCommandWithYes,outputAgentError}from"./chunk-NVU7XTNI.js";import"./chunk-IR3E37HD.js";import"./chunk-PH2MLBQO.js";import"./chunk-DCFCPAFQ.js";import"./chunk-GOXGA37R.js";import{isAPIError}from"./chunk-MTPHHAPR.js";import"./chunk-EFGZK6OY.js";import"./chunk-JCDPMWKO.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import"./chunk-7Y572CPZ.js";import"./chunk-BVFFSUG3.js";import"./chunk-RRX2AMWY.js";import"./chunk-GUFRGEM5.js";import"./chunk-SUT2PTL3.js";import"./chunk-AX6UCTOC.js";import"./chunk-4SIQE2W4.js";import"./chunk-MF43WTDT.js";import"./chunk-AUCQKYL2.js";import{getFlagsSpecification}from"./chunk-DORCX7UB.js";import"./chunk-2BKALEOP.js";import"./chunk-UJ7YUIEJ.js";import"./chunk-L6MWUMWZ.js";import"./chunk-L4CSJDG7.js";import"./chunk-YHZXIBS7.js";import"./chunk-LPYHYTYI.js";import"./chunk-NBPLUP7C.js";async function clear(client,argv,telemetry){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(permissionsClearSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,"vcr permissions <repository> clear"),printError(err),2}let fr=validateVcrJsonOutput(client,parsedArgs.flags);if(typeof fr=="number")return fr;let repository=parsedArgs.args[0],project=parsedArgs.flags["--project"],skipConfirmation=!!parsedArgs.flags["--yes"];telemetry.trackCliOptionProject(project),telemetry.trackCliFlagYes(parsedArgs.flags["--yes"]),telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]);let missingRepository=requireVcrRepository(client,repository,fr.jsonOutput,"vcr permissions <repository> clear");if(typeof missingRepository=="number")return missingRepository;let scope=await resolveVcrScope(client,{project,jsonOutput:fr.jsonOutput});if(typeof scope=="number")return scope;if(!skipConfirmation&&(outputAgentError(client,{status:"error",reason:AGENT_REASON.CONFIRMATION_REQUIRED,message:"Clearing repository permissions removes access for every team. Re-run with --yes.",next:[{command:buildCommandWithYes(client.argv)}]},1),!await client.input.confirm(`Remove access to ${repository} for all teams? They will no longer be able to pull its images.`,!1)))return output_manager_default.log("Canceled"),0;let path=repositoryPermissionsClearPath(scope,repository);output_manager_default.spinner("Clearing repository permissions...");try{return await client.fetch(path,{method:"DELETE"}),fr.jsonOutput?client.stdout.write(`${JSON.stringify({repository,cleared:!0},null,2)}
7
+ import{repositoryPermissionsClearPath}from"./chunk-DFVNL5ML.js";import{emitVcrArgParseError,handleVcrApiError,requireVcrRepository,resolveVcrScope,validateVcrJsonOutput}from"./chunk-CNGI6Z2G.js";import"./chunk-4FPYV37P.js";import"./chunk-3WXQHKSS.js";import"./chunk-FIICEEXO.js";import"./chunk-RFD7CEL6.js";import{permissionsClearSubcommand}from"./chunk-T2IZUTGY.js";import"./chunk-CRPZYLIL.js";import"./chunk-HDKEES7E.js";import"./chunk-SUD5V67L.js";import"./chunk-7TRHPXCG.js";import"./chunk-UGVOMXYR.js";import"./chunk-QRPBDCDH.js";import"./chunk-2GXP676X.js";import"./chunk-K5GE24PG.js";import"./chunk-IFMPBA4K.js";import"./chunk-KHJWQ4WP.js";import"./chunk-MY4MONOH.js";import"./chunk-YATYCZQJ.js";import"./chunk-2ILZM77F.js";import{printError}from"./chunk-7EI554V5.js";import{parseArguments}from"./chunk-E7ICSU45.js";import{AGENT_REASON,buildCommandWithYes,outputAgentError}from"./chunk-E6VQXHBD.js";import"./chunk-BDLZ6WL2.js";import"./chunk-PH2MLBQO.js";import"./chunk-DCFCPAFQ.js";import"./chunk-GOXGA37R.js";import{isAPIError}from"./chunk-MTPHHAPR.js";import"./chunk-EFGZK6OY.js";import"./chunk-JCDPMWKO.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import"./chunk-7Y572CPZ.js";import"./chunk-BVFFSUG3.js";import"./chunk-RRX2AMWY.js";import"./chunk-GUFRGEM5.js";import"./chunk-SUT2PTL3.js";import"./chunk-AX6UCTOC.js";import"./chunk-4SIQE2W4.js";import"./chunk-MF43WTDT.js";import"./chunk-AUCQKYL2.js";import{getFlagsSpecification}from"./chunk-CUO3CYU3.js";import"./chunk-2BKALEOP.js";import"./chunk-UJ7YUIEJ.js";import"./chunk-L6MWUMWZ.js";import"./chunk-L4CSJDG7.js";import"./chunk-YHZXIBS7.js";import"./chunk-LPYHYTYI.js";import"./chunk-NBPLUP7C.js";async function clear(client,argv,telemetry){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(permissionsClearSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,"vcr permissions <repository> clear"),printError(err),2}let fr=validateVcrJsonOutput(client,parsedArgs.flags);if(typeof fr=="number")return fr;let repository=parsedArgs.args[0],project=parsedArgs.flags["--project"],skipConfirmation=!!parsedArgs.flags["--yes"];telemetry.trackCliOptionProject(project),telemetry.trackCliFlagYes(parsedArgs.flags["--yes"]),telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]);let missingRepository=requireVcrRepository(client,repository,fr.jsonOutput,"vcr permissions <repository> clear");if(typeof missingRepository=="number")return missingRepository;let scope=await resolveVcrScope(client,{project,jsonOutput:fr.jsonOutput});if(typeof scope=="number")return scope;if(!skipConfirmation&&(outputAgentError(client,{status:"error",reason:AGENT_REASON.CONFIRMATION_REQUIRED,message:"Clearing repository permissions removes access for every team. Re-run with --yes.",next:[{command:buildCommandWithYes(client.argv)}]},1),!await client.input.confirm(`Remove access to ${repository} for all teams? They will no longer be able to pull its images.`,!1)))return output_manager_default.log("Canceled"),0;let path=repositoryPermissionsClearPath(scope,repository);output_manager_default.spinner("Clearing repository permissions...");try{return await client.fetch(path,{method:"DELETE"}),fr.jsonOutput?client.stdout.write(`${JSON.stringify({repository,cleared:!0},null,2)}
8
8
  `):output_manager_default.success(`Cleared repository permissions for ${repository}`),0}catch(err){if(isAPIError(err))return handleVcrApiError(client,err,fr.jsonOutput);throw err}finally{output_manager_default.stopSpinner()}}export{clear as default};