@vercel/cli-support 65.10.0-snapshot-c80a43d75dc7 → 65.10.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.
- package/dist/chunks/{add-RFPJCD35.js → add-4MTUAI2X.js} +1 -1
- package/dist/chunks/{add-A3SN7KWS.js → add-JYLWBVVQ.js} +1 -1
- package/dist/chunks/{add-TOKTANDW.js → add-T5ERJ62Z.js} +1 -1
- package/dist/chunks/{build-25I6XOV7.js → build-OGWTTFLG.js} +1 -1
- package/dist/chunks/{chunk-SHY7P3C6.js → chunk-36XHIIUT.js} +1 -1
- package/dist/chunks/{chunk-3AX7ZZJ7.js → chunk-3PKL2PTF.js} +1 -1
- package/dist/chunks/{chunk-2HLYY3KF.js → chunk-3QFBVAHL.js} +1 -1
- package/dist/chunks/chunk-3QYXC4PH.js +11 -0
- package/dist/chunks/{chunk-BT5C6MCY.js → chunk-42J2KCDF.js} +1 -1
- package/dist/chunks/{chunk-NLKM5LR5.js → chunk-4E6BGQWR.js} +1 -1
- package/dist/chunks/{chunk-FAVZ6WVS.js → chunk-4U6ACPA4.js} +1 -1
- package/dist/chunks/{chunk-NAEY6HG5.js → chunk-4WXVKR43.js} +1 -1
- package/dist/chunks/{chunk-MKYFAYCD.js → chunk-52X4YVSG.js} +1 -1
- package/dist/chunks/{chunk-3WYSEF57.js → chunk-5IZ33FNL.js} +1 -1
- package/dist/chunks/{chunk-GPISCZ2P.js → chunk-5MPZSRYG.js} +1 -1
- package/dist/chunks/{chunk-AX3V7N44.js → chunk-5RSSGN2Q.js} +1 -1
- package/dist/chunks/{chunk-7ULLVH2G.js → chunk-5RYQH3XW.js} +1 -1
- package/dist/chunks/{chunk-KNAOHPOI.js → chunk-6NUH6ZPE.js} +6 -6
- package/dist/chunks/{chunk-EJ34DLV4.js → chunk-6RMW63GB.js} +1 -1
- package/dist/chunks/{chunk-BB5UMZMF.js → chunk-6UMVJ7RL.js} +1 -1
- package/dist/chunks/{chunk-HR462OEG.js → chunk-6YAYCEDT.js} +2 -2
- package/dist/chunks/{chunk-VYRMHE34.js → chunk-75DUL7VI.js} +1 -1
- package/dist/chunks/{chunk-TNNEKGGF.js → chunk-7LSH3MEB.js} +1 -1
- package/dist/chunks/{chunk-LQAQD5LG.js → chunk-7TR6H6NE.js} +3 -3
- package/dist/chunks/chunk-7VGBGUX7.js +7 -0
- package/dist/chunks/chunk-A3C67PNC.js +7 -0
- package/dist/chunks/{chunk-CKTLP5GX.js → chunk-AMPJ6RWT.js} +1 -1
- package/dist/chunks/{chunk-IZ4GFKGR.js → chunk-AO6AMYBF.js} +1 -1
- package/dist/chunks/chunk-AUIV7YJO.js +11 -0
- package/dist/chunks/chunk-AY523IYR.js +7 -0
- package/dist/chunks/{chunk-DBPN2VGJ.js → chunk-B4XGTAFO.js} +1 -1
- package/dist/chunks/{chunk-DRLGZXAL.js → chunk-BIRSJSAO.js} +1 -1
- package/dist/chunks/{chunk-WHUZRBYL.js → chunk-BK3TNLWO.js} +5 -5
- package/dist/chunks/chunk-BZIC36KP.js +7 -0
- package/dist/chunks/chunk-CBMWPDOL.js +8 -0
- package/dist/chunks/{chunk-G2BNLRPU.js → chunk-CHIYT3V4.js} +1 -1
- package/dist/chunks/chunk-CJ6XPDSS.js +11 -0
- package/dist/chunks/{chunk-T7HE23VK.js → chunk-CU3LNJZV.js} +1 -1
- package/dist/chunks/chunk-DIHB5BUY.js +8 -0
- package/dist/chunks/{chunk-TZ6MSTOI.js → chunk-DNLE3KPC.js} +1 -1
- package/dist/chunks/{chunk-R3D4M5RE.js → chunk-DQASZDQT.js} +1 -1
- package/dist/chunks/{chunk-TNUQME3L.js → chunk-DQNP7OQ5.js} +1 -1
- package/dist/chunks/{chunk-NGHFFOD2.js → chunk-DUCCC22H.js} +1 -1
- package/dist/chunks/{chunk-QCIIUQV3.js → chunk-E7WULWMX.js} +1 -1
- package/dist/chunks/{chunk-CZOD25BC.js → chunk-ECFLIVEE.js} +1 -1
- package/dist/chunks/{chunk-FI5O4WHD.js → chunk-ECGY67NB.js} +1 -1
- package/dist/chunks/{chunk-S5JBQCBA.js → chunk-EJN55YDV.js} +1 -1
- package/dist/chunks/{chunk-3PXE5BLH.js → chunk-ER7L7HYA.js} +1 -1
- package/dist/chunks/{chunk-7UFI6OYF.js → chunk-FOWAVQOH.js} +1 -1
- package/dist/chunks/{chunk-4JWAXIIN.js → chunk-FPREO4VS.js} +1 -1
- package/dist/chunks/{chunk-PXQAWH7E.js → chunk-FSJFWVUY.js} +1 -1
- package/dist/chunks/{chunk-Y57DK3ZN.js → chunk-FXHB7TTL.js} +1 -1
- package/dist/chunks/chunk-FYE7ILRR.js +7 -0
- package/dist/chunks/{chunk-V32V4SXB.js → chunk-GQ4CQDIL.js} +1 -1
- package/dist/chunks/{chunk-W634OFUG.js → chunk-GZLYNPNU.js} +6 -5
- package/dist/chunks/chunk-HTPNGLPH.js +7 -0
- package/dist/chunks/{chunk-W5GHMAHP.js → chunk-IHTWZEQW.js} +1 -1
- package/dist/chunks/{chunk-4LGAV2WN.js → chunk-IIGNDMLO.js} +1 -1
- package/dist/chunks/{chunk-F2LNGJOZ.js → chunk-JA6IGJ67.js} +1 -1
- package/dist/chunks/chunk-JBU72NEQ.js +7 -0
- package/dist/chunks/{chunk-U6XJYQJS.js → chunk-JLNF2QTR.js} +1 -1
- package/dist/chunks/{chunk-SODZSOOL.js → chunk-K5KVSA2A.js} +1 -1
- package/dist/chunks/{chunk-VD2FK6OF.js → chunk-K7ARJYAG.js} +1 -1
- package/dist/chunks/{chunk-5TI3ZXW3.js → chunk-KBVYN635.js} +1 -1
- package/dist/chunks/chunk-KKE55LTK.js +7 -0
- package/dist/chunks/{chunk-G5T6UQAL.js → chunk-KV3QXTRZ.js} +1 -1
- package/dist/chunks/{chunk-3F5BOG4A.js → chunk-KZLRIAAT.js} +1 -1
- package/dist/chunks/{chunk-L4QQTYUI.js → chunk-LE72YLCC.js} +2 -2
- package/dist/chunks/{chunk-HJ45TAM4.js → chunk-LIEWXPUC.js} +1 -1
- package/dist/chunks/{chunk-ANCWFEOM.js → chunk-M3R7F2N4.js} +1 -1
- package/dist/chunks/{chunk-MUNGQJGO.js → chunk-M3Z6NSC2.js} +1 -1
- package/dist/chunks/{chunk-VPUYTI5E.js → chunk-MBXLL2HF.js} +1 -1
- package/dist/chunks/{chunk-C24IKNZN.js → chunk-MKTZDEOJ.js} +1 -1
- package/dist/chunks/{chunk-VZGTL3YC.js → chunk-N5AN4JZL.js} +1 -1
- package/dist/chunks/{chunk-EJZNJN4N.js → chunk-N65H4JMJ.js} +1 -1
- package/dist/chunks/{chunk-LC4BSDDG.js → chunk-NAN5IE3B.js} +1 -1
- package/dist/chunks/{chunk-TD7AL545.js → chunk-NE6PKR2J.js} +1 -1
- package/dist/chunks/{chunk-2EFBGKRC.js → chunk-NLTZGQB2.js} +1 -1
- package/dist/chunks/{chunk-TL4ZLZ2Q.js → chunk-NMIZSQDN.js} +1 -1
- package/dist/chunks/{chunk-22UXDTCE.js → chunk-NZRBJB6T.js} +1 -1
- package/dist/chunks/chunk-OII46FDN.js +12 -0
- package/dist/chunks/{chunk-YOWMZJPA.js → chunk-OJWI6QJ3.js} +1 -1
- package/dist/chunks/{chunk-GKALP6QD.js → chunk-OYIDWI5Y.js} +1 -1
- package/dist/chunks/{chunk-QVMU7ZKQ.js → chunk-P24YBQ6H.js} +1 -1
- package/dist/chunks/{chunk-2JCJP43W.js → chunk-P6J22UJQ.js} +1 -1
- package/dist/chunks/{chunk-E7DYXF6G.js → chunk-PFZCGMJ7.js} +1 -1
- package/dist/chunks/{chunk-64UCX5JM.js → chunk-PKNEWN4W.js} +1 -1
- package/dist/chunks/{chunk-Q4GX2UTG.js → chunk-PKZK23PR.js} +1 -1
- package/dist/chunks/{chunk-56UH6NQ3.js → chunk-PL6IOUKW.js} +1 -1
- package/dist/chunks/{chunk-MBL7MWP5.js → chunk-Q2JNATRP.js} +1 -1
- package/dist/chunks/{chunk-KMPDQE4Q.js → chunk-Q46Q4Y4R.js} +1 -1
- package/dist/chunks/{chunk-NAJCRBQB.js → chunk-QXL353OB.js} +1 -1
- package/dist/chunks/{chunk-VR5ROBAO.js → chunk-RI6DJAFI.js} +1 -1
- package/dist/chunks/{chunk-2DHDKWYN.js → chunk-RIJ45N7C.js} +1 -1
- package/dist/chunks/{chunk-6AJWRPTY.js → chunk-RUBMVRT6.js} +1 -1
- package/dist/chunks/{chunk-6RUAAORO.js → chunk-S535FZTA.js} +1 -1
- package/dist/chunks/{chunk-5I7CC45F.js → chunk-SBEWZ65N.js} +1 -1
- package/dist/chunks/{chunk-GJCVOEC2.js → chunk-SDYCW5JM.js} +1 -1
- package/dist/chunks/chunk-SNGM6NSO.js +7 -0
- package/dist/chunks/chunk-SNNJRKD6.js +10 -0
- package/dist/chunks/{chunk-DX2OHM56.js → chunk-SR7BZA6N.js} +1 -1
- package/dist/chunks/{chunk-QXYCICNB.js → chunk-STKZTUGE.js} +1 -1
- package/dist/chunks/{chunk-XGOELSYA.js → chunk-SXYA7JSX.js} +1 -1
- package/dist/chunks/chunk-TILI4QBL.js +11 -0
- package/dist/chunks/{chunk-PMEYNJU2.js → chunk-TZE4CS4K.js} +1 -1
- package/dist/chunks/{chunk-BZV2S4H6.js → chunk-U2TQFAO3.js} +1 -1
- package/dist/chunks/chunk-U2ZNF6HN.js +8 -0
- package/dist/chunks/chunk-UIMJNASP.js +7 -0
- package/dist/chunks/{chunk-FQVIWQ6M.js → chunk-UQNBUXQA.js} +1 -1
- package/dist/chunks/{chunk-C4N4LKPM.js → chunk-US7YJ2RQ.js} +1 -1
- package/dist/chunks/{chunk-JVNIDSP5.js → chunk-V5TOMLK4.js} +1 -1
- package/dist/chunks/{chunk-L6CZL2IQ.js → chunk-VQSSVB6V.js} +1 -1
- package/dist/chunks/chunk-VTITZEPW.js +9 -0
- package/dist/chunks/chunk-WFS3XBAA.js +8 -0
- package/dist/chunks/{chunk-XEXOSJIU.js → chunk-WKIDCYKL.js} +1 -1
- package/dist/chunks/{chunk-UVHKXCR5.js → chunk-WKSXBH7X.js} +1 -2
- package/dist/chunks/{chunk-77LSSWXL.js → chunk-WTFD4MDT.js} +1 -1
- package/dist/chunks/{chunk-YO6SJCZP.js → chunk-WYGOYE6C.js} +1 -1
- package/dist/chunks/{chunk-UNASHUWQ.js → chunk-XFUUALZS.js} +1 -1
- package/dist/chunks/{chunk-SXEOJSZQ.js → chunk-XS3MNHFR.js} +1 -1
- package/dist/chunks/{chunk-ZGQNI22M.js → chunk-YGYUPPAL.js} +2 -2
- package/dist/chunks/{chunk-Q25FOMOX.js → chunk-YKLTNKQJ.js} +1 -1
- package/dist/chunks/{chunk-WFCGAYP5.js → chunk-YUHKH4TK.js} +1 -1
- package/dist/chunks/{chunk-D4TD2KWH.js → chunk-YZKARZ2B.js} +1 -1
- package/dist/chunks/chunk-ZCUUCYID.js +13 -0
- package/dist/chunks/{chunk-FPYHB76H.js → chunk-ZEUREQ4E.js} +1 -1
- package/dist/chunks/chunk-ZIC7VWFC.js +14 -0
- package/dist/chunks/{chunk-QGZZL6YY.js → chunk-ZPJHONCZ.js} +1 -1
- package/dist/chunks/{chunk-R2P4PNRQ.js → chunk-ZQXXESKG.js} +1 -1
- package/dist/chunks/{clear-B764MEAM.js → clear-Z5OO6URI.js} +1 -1
- package/dist/chunks/cli-embedded-Y74S252S.js +66 -0
- package/dist/chunks/{compile-vercel-config-EWCB7SIC.js → compile-vercel-config-ZKUTSDWV.js} +1 -1
- package/dist/chunks/{config-D4WY2HG4.js → config-AUTTHXQO.js} +1 -1
- package/dist/chunks/config-RJ7PLFQD.js +7 -0
- package/dist/chunks/{connect-git-provider-AWEOEEOO.js → connect-git-provider-YIX5ZOU6.js} +1 -1
- package/dist/chunks/{delete-W3GMFAKA.js → delete-QQOC63HV.js} +1 -1
- package/dist/chunks/{delete-SKYFHUWD.js → delete-WIGSOZR3.js} +1 -1
- package/dist/chunks/{detect-services-3TRRRLES.js → detect-services-J4LGLAHC.js} +1 -1
- package/dist/chunks/{disable-EBPZ2LYC.js → disable-L54VGY5A.js} +1 -1
- package/dist/chunks/{discard-SMVPENSP.js → discard-Q5UPTZR2.js} +1 -1
- package/dist/chunks/{edit-CGTNGJKY.js → edit-FRGMYBW3.js} +1 -1
- package/dist/chunks/{edit-A3M3GBGP.js → edit-QEDNQ33T.js} +1 -1
- package/dist/chunks/{enable-6A5THWDP.js → enable-TGQZWSBG.js} +1 -1
- package/dist/chunks/engine-DkdkXQEy-FDYYIXY7.js +17 -0
- package/dist/chunks/{exec-UV73J2ZB.js → exec-H3X7U4P3.js} +1 -1
- package/dist/chunks/{export-R5IUWAW5.js → export-YYQ2J5AT.js} +1 -1
- package/dist/chunks/{future-CPJUUZTU.js → future-RYEYLPCG.js} +1 -1
- package/dist/chunks/{generate-cert-for-deploy-Z3HCAR5H.js → generate-cert-for-deploy-Y4KDIFF2.js} +1 -1
- package/dist/chunks/image-PDPRURMH.js +7 -0
- package/dist/chunks/{import-builders-GPJQAMXT.js → import-builders-H54QCMQ4.js} +1 -1
- package/dist/chunks/{inspect-WC2C4MDP.js → inspect-6IBPIBIJ.js} +1 -1
- package/dist/chunks/{inspect-WWOHWQKS.js → inspect-AHHXHIIP.js} +1 -1
- package/dist/chunks/{inspect-BO2ACFEG.js → inspect-Q7FYDFL7.js} +1 -1
- package/dist/chunks/{inspect-6FEL5DYV.js → inspect-RPCDGIP3.js} +1 -1
- package/dist/chunks/{inspect-TEPB7KVC.js → inspect-SFM3NWDF.js} +1 -1
- package/dist/chunks/{list-C5GUZ35P.js → list-7WWUYCE6.js} +1 -1
- package/dist/chunks/{list-EZWZSVM4.js → list-GSVERG4S.js} +1 -1
- package/dist/chunks/{list-4KSJEP23.js → list-NXZXKKAR.js} +1 -1
- package/dist/chunks/{login-ZNCCVA4H.js → login-HEHHQO3F.js} +1 -1
- package/dist/chunks/{login-PDZT4PQR.js → login-XKLPSZNN.js} +1 -1
- package/dist/chunks/{logs-YKQMUTMG.js → logs-NJ46ZSNZ.js} +1 -1
- package/dist/chunks/{ls-3HUS6KS6.js → ls-5SKRXNSI.js} +1 -1
- package/dist/chunks/{ls-WX4BJRDV.js → ls-FOFJU2JJ.js} +1 -1
- package/dist/chunks/{ls-TASQJDLF.js → ls-ITWXAWSZ.js} +1 -1
- package/dist/chunks/{ls-LYVPEIIT.js → ls-LCUOBWY2.js} +1 -1
- package/dist/chunks/{ls-KQJYKADC.js → ls-MWGIT2YH.js} +1 -1
- package/dist/chunks/{ls-RBPRE6BF.js → ls-OY5YTZGN.js} +1 -1
- package/dist/chunks/{ls-ZP7OBTTV.js → ls-TZN53EJL.js} +1 -1
- package/dist/chunks/{mutate-5N6DMBYS.js → mutate-ZYXVL22A.js} +1 -1
- package/dist/chunks/{native-self-update-7OAY4AVR.js → native-self-update-DEVBYOH2.js} +1 -1
- package/dist/chunks/{notifications-OVFMQLHL.js → notifications-XAPB2F2T.js} +1 -1
- package/dist/chunks/{open-DOBOKUEK.js → open-WPRHI6ND.js} +1 -1
- package/dist/chunks/{openapi-YAZA3237.js → openapi-UUFKDKGC.js} +1 -1
- package/dist/chunks/{permissions-PHCOVDWK.js → permissions-FU5OET67.js} +1 -1
- package/dist/chunks/{plugin-offer-M7KJSJU6.js → plugin-offer-E5JOW442.js} +1 -1
- package/dist/chunks/{prompt-missing-credentials-RTNCHH6Y.js → prompt-missing-credentials-ZZVTEQQB.js} +1 -1
- package/dist/chunks/{publish-JIFRJNDV.js → publish-R5IV2BH2.js} +1 -1
- package/dist/chunks/pull-CQVHIIAN.js +7 -0
- package/dist/chunks/{purchase-domain-if-available-3EBONBX3.js → purchase-domain-if-available-VMWCMYC2.js} +1 -1
- package/dist/chunks/{push-ZN6CBJLJ.js → push-Y5CUOISM.js} +1 -1
- package/dist/chunks/{query-MT6ID6C7.js → query-VMKIOI3W.js} +1 -1
- package/dist/chunks/{reauthenticate-OXFB64PS.js → reauthenticate-5K7LBTOW.js} +1 -1
- package/dist/chunks/{reorder-N2L43LXD.js → reorder-W3MXHSGZ.js} +1 -1
- package/dist/chunks/{reply-WBR3XXBJ.js → reply-YH7HRIWQ.js} +1 -1
- package/dist/chunks/{resolve-NMR24Y67.js → resolve-FWVMWJTG.js} +1 -1
- package/dist/chunks/{resolve-agent-team-KRTLBC5D.js → resolve-agent-team-6L7AQUA2.js} +1 -1
- package/dist/chunks/{restore-AKAVSLAK.js → restore-I7L3EOS4.js} +1 -1
- package/dist/chunks/{rm-Q3ZXEMGI.js → rm-AWUMNWQU.js} +1 -1
- package/dist/chunks/{rm-DGMHU3CU.js → rm-HVGUK55W.js} +1 -1
- package/dist/chunks/{rm-ERBTFH3G.js → rm-M3EMCKSN.js} +1 -1
- package/dist/chunks/{rm-H2T7HB3F.js → rm-RFCTWU5R.js} +1 -1
- package/dist/chunks/{rm-TNGYCAFJ.js → rm-VREBRM5D.js} +1 -1
- package/dist/chunks/{routes-4WGST7VN.js → routes-BP54NO3Z.js} +1 -1
- package/dist/chunks/{rule-inspect-ZVHPS2PL.js → rule-inspect-SQUCRRGA.js} +1 -1
- package/dist/chunks/{schema-TSHU5NN6.js → schema-AKVIKCFT.js} +1 -1
- package/dist/chunks/{schema-YUXTIJSB.js → schema-S36QQNJP.js} +1 -1
- package/dist/chunks/{select-org-35NFUKXO.js → select-org-PRWYXAWW.js} +1 -1
- package/dist/chunks/serving-DKny38LK-UNINNTL5.js +8 -0
- package/dist/chunks/{set-PP5K4NBO.js → set-ZJAC44LV.js} +1 -1
- package/dist/chunks/{setup-and-link-ACSPPTME.js → setup-and-link-VD53JFQI.js} +1 -1
- package/dist/chunks/{skills-X5TPVYXW.js → skills-JG4MGVKX.js} +1 -1
- package/dist/chunks/{tags-6QB3FP3B.js → tags-4Y4UBA5S.js} +1 -1
- package/dist/chunks/token-3ILJZPAZ.js +7 -0
- package/dist/chunks/token-JJLQVXPI.js +7 -0
- package/dist/chunks/{token-util-JDQI37VN.js → token-util-A4BSB3KP.js} +1 -1
- package/dist/chunks/token-util-KL35LHLQ.js +7 -0
- package/dist/chunks/{types-SENK43U4.js → types-DSN6Q6HW.js} +1 -1
- package/dist/chunks/{update-QA3NLSTV.js → update-R42CXSVE.js} +1 -1
- package/dist/commands/build/index.js +1 -1
- package/dist/commands/deploy/index.js +9 -9
- package/dist/commands/dev/index.js +2 -2
- package/dist/commands/env/index.js +12 -12
- package/dist/commands/link/index.js +4 -4
- package/dist/commands/list/index.js +1 -1
- package/dist/commands/project/index.js +8 -14
- package/dist/commands-account.js +2 -2
- package/dist/commands-ai.js +4 -4
- package/dist/commands-blob.js +7 -7
- package/dist/commands-core.js +62 -32
- package/dist/commands-deployments.js +4 -4
- package/dist/commands-flags.js +3 -3
- package/dist/commands-integrations.js +1 -1
- package/dist/commands-observability.js +2 -2
- package/dist/commands-routing.js +5 -5
- package/dist/help.js +1 -1
- package/dist/index.js +5 -5
- package/dist/internal-build.js +1 -1
- package/dist/launcher-errors.js +1 -1
- package/dist/package.json +31 -30
- package/dist/version.mjs +1 -1
- package/package.json +22 -21
- package/dist/chunks/chunk-5KE67O45.js +0 -7
- package/dist/chunks/chunk-CFYTFXX6.js +0 -7
- package/dist/chunks/chunk-CUBRYWA2.js +0 -7
- package/dist/chunks/chunk-FOQD62WW.js +0 -17
- package/dist/chunks/chunk-FTACGWII.js +0 -14
- package/dist/chunks/chunk-FY4ORPZH.js +0 -7
- package/dist/chunks/chunk-G7H33IKQ.js +0 -10
- package/dist/chunks/chunk-KWXJIVBG.js +0 -7
- package/dist/chunks/chunk-MOF4QNZH.js +0 -9
- package/dist/chunks/chunk-O4CQRV2G.js +0 -7
- package/dist/chunks/chunk-UWJ3UPS5.js +0 -11
- package/dist/chunks/chunk-ZUI5EMXD.js +0 -11
- package/dist/chunks/config-CW4JO67Q.js +0 -7
- package/dist/chunks/image-VNSN2SKE.js +0 -7
- package/dist/chunks/pull-HLJSW3W4.js +0 -7
- package/dist/chunks/token-W6P2KNI5.js +0 -7
|
@@ -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{resolveProjectContext}from"./chunk-
|
|
7
|
+
import{resolveProjectContext}from"./chunk-SR7BZA6N.js";import{outputError,writeJsonError}from"./chunk-5RSSGN2Q.js";import{printError}from"./chunk-PKZK23PR.js";import{detectExplicitScope,getScope}from"./chunk-DNLE3KPC.js";import{getLinkedProject}from"./chunk-6NUH6ZPE.js";import{isAPIError}from"./chunk-T2FCF46I.js";import{getCommandName}from"./chunk-VRH7LWOC.js";import{output_manager_default}from"./chunk-GZLYNPNU.js";function handleCommentsParseError(err,subcommandName){return printError(err),err instanceof Error&&/unknown or unexpected option: -[^-]/.test(err.message)&&output_manager_default.log(`An argument starting with "-"? Put it after \`--\`: ${getCommandName(`comments ${subcommandName} -- <arg>`)}`),output_manager_default.log(`Run ${getCommandName(`comments ${subcommandName} --help`)} for usage.`),2}function threadNotFoundMessage(threadId,scope){return`Comment not found: ${threadId} in team ${scope.teamSlug??scope.teamId}. If it belongs to another team, pass --scope <team>.`}function query(teamId,params={}){let search=new URLSearchParams({teamId});for(let[key,value]of Object.entries(params))if(value!==void 0)if(Array.isArray(value))for(let entry of value)search.append(key,entry);else search.set(key,String(value));return search.toString()}var fetchOpts={useCurrentTeam:!1};function listThreads(client,teamId,params){return client.fetch(`/toolbar/threads?${query(teamId,{...params})}`,fetchOpts)}function getThread(client,teamId,threadId){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}?${query(teamId)}`,fetchOpts)}function updateThread(client,teamId,threadId,resolved){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}?${query(teamId)}`,{...fetchOpts,method:"PATCH",body:{resolved}})}function listMessages(client,teamId,threadId,opts={}){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}/messages?${query(teamId,{...opts})}`,fetchOpts)}function addMessage(client,teamId,threadId,body){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}/messages?${query(teamId)}`,{...fetchOpts,method:"POST",body})}function updateMessage(client,teamId,threadId,messageId,body){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}/messages/${encodeURIComponent(messageId)}?${query(teamId)}`,{...fetchOpts,method:"PATCH",body})}function deleteMessage(client,teamId,threadId,messageId){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}/messages/${encodeURIComponent(messageId)}?${query(teamId)}`,{...fetchOpts,method:"DELETE"})}function toApiErrorParts(err){let apiErr=err;return{code:apiErr.code||"API_ERROR",message:apiErr.serverMessage||`API error (${apiErr.status??"unknown"}).`}}import{spawnSync}from"node:child_process";async function resolveCommentsScope(client,opts){if(opts.urlTeamSlug&&!opts.project&&!detectExplicitScope(client))return{teamId:opts.urlTeamSlug,teamSlug:opts.urlTeamSlug};if(opts.project){let context;try{context=await resolveProjectContext({client,projectNameOrId:opts.project,projectNotFoundHandling:opts.jsonOutput?"return":"report"})}catch(err){if(isAPIError(err))return outputError(client,opts.jsonOutput,err.code||"API_ERROR",err.serverMessage||`API error (${err.status}).`);throw err}return context.status==="error"?(opts.jsonOutput&&writeJsonError(client,"PROJECT_CONTEXT_ERROR","Could not resolve the project context."),context.exitCode):context.status==="not_linked"?outputError(client,opts.jsonOutput,"PROJECT_NOT_FOUND",`Project "${opts.project}" was not found in the current scope.`):{teamId:context.org.id,teamSlug:context.org.slug,projectId:context.project.id,projectName:context.project.name,linked:!!context.repoRoot}}let linked=await getLinkedProject(client);if(linked.status==="error")return linked.exitCode;if(linked.status==="linked"){if(detectExplicitScope(client)){let{team:team2}=await getScope(client);if(!team2)return outputError(client,opts.jsonOutput,"NO_TEAM","No team context found for --scope.");if(team2.id!==linked.org.id)return opts.requireProject?outputError(client,opts.jsonOutput,"SCOPE_PROJECT_MISMATCH",`--scope ${team2.slug} does not match the linked project's team (${linked.org.slug}). Pass --project <name-or-id> for a project in ${team2.slug}.`):{teamId:team2.id,teamSlug:team2.slug}}return{teamId:linked.org.id,teamSlug:linked.org.slug,projectId:linked.project.id,projectName:linked.project.name,linked:!0}}if(opts.requireProject)return outputError(client,opts.jsonOutput,"NOT_LINKED","No linked project found. Run `vercel link` to link a project, or pass --project <name-or-id>.");let{team}=await getScope(client);return team?{teamId:team.id,teamSlug:team.slug}:outputError(client,opts.jsonOutput,"NO_TEAM","No team context found. Run `vercel switch` to select a team, or run `vercel link` in a project directory.")}function inferBranch(cwd){let result=spawnSync("git",["rev-parse","--abbrev-ref","HEAD"],{cwd,encoding:"utf8"});if(result.status===0){let branch=result.stdout.trim();if(branch&&branch!=="HEAD")return{value:branch,source:"git"}}let ciRef=process.env.VERCEL_GIT_COMMIT_REF||process.env.GITHUB_HEAD_REF||process.env.GITHUB_REF_NAME;if(ciRef)return{value:ciRef,source:"ci"}}export{handleCommentsParseError,threadNotFoundMessage,listThreads,getThread,updateThread,listMessages,addMessage,updateMessage,deleteMessage,toApiErrorParts,resolveCommentsScope,inferBranch};
|
|
@@ -4,9 +4,9 @@ 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{getNativePackageName,withDirectoryLock}from"./chunk-R3D4M5RE.js";import{HOMEBREW_UPGRADE_COMMAND,getUpdateCommandInfo,getUpgradePackageManager,isGlobal,trustedUpgradeDirectory,trustedUpgradeEnvironment}from"./chunk-KWXJIVBG.js";import{require_semver}from"./chunk-BPUANOGW.js";import{progress}from"./chunk-U56NHYAH.js";import{require_ci_info}from"./chunk-2EYYB6YN.js";import{getInstallRoot,isNativeBinaryInstall}from"./chunk-NWGBDBZI.js";import{getCachedUsername,require_lib}from"./chunk-KNAOHPOI.js";import{pkg_default}from"./chunk-DBT6PGEH.js";import{output_manager_default}from"./chunk-W634OFUG.js";import{__commonJS,__require,__toESM}from"./chunk-BZENIQ7N.js";var require_lib2=__commonJS({"../../node_modules/.pnpm/os-paths@4.4.0/node_modules/os-paths/src/lib/index.js"(exports,module){"use strict";var os=__require("os"),paths=__require("path"),isWinOS=/^win/i.test(process.platform);function normalize_path(path){return paths.normalize(paths.join(path,"."))}var base=()=>{let{env}=process,object={};return object.home=()=>normalize_path(os.homedir?os.homedir():env.HOME),object.temp=()=>normalize_path(os.tmpdir?os.tmpdir():env.TMPDIR||env.TEMP||env.TMP),object},windows=()=>{let{env}=process,object={};return object.home=()=>normalize_path(os.homedir?os.homedir():env.USERPROFILE||paths.join(env.HOMEDRIVE,env.HOMEPATH)||env.HOME),object.temp=()=>normalize_path(os.tmpdir?os.tmpdir():env.TEMP||env.TMP||paths.join(env.LOCALAPPDATA||env.SystemRoot||env.windir,"Temp")),object},_OSPaths=class __OSPaths{constructor(){let OSPaths=function(){return new __OSPaths};this._fn=OSPaths;let extension=isWinOS?windows():base();return Object.keys(extension).forEach(key=>{this._fn[key]=extension[key]}),this._fn}};module.exports=new _OSPaths}});var require_lib3=__commonJS({"../../node_modules/.pnpm/xdg-portable@7.3.0/node_modules/xdg-portable/src/lib/index.js"(exports,module){"use strict";var path=__require("path"),osPaths=require_lib2(),linux=()=>{let object={};return object.cache=()=>process.env.XDG_CACHE_HOME||path.join(osPaths.home()||osPaths.temp(),".cache"),object.config=()=>process.env.XDG_CONFIG_HOME||path.join(osPaths.home()||osPaths.temp(),".config"),object.data=()=>process.env.XDG_DATA_HOME||path.join(osPaths.home()||osPaths.temp(),".local","share"),object.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,object.state=()=>process.env.XDG_STATE_HOME||path.join(osPaths.home()||osPaths.temp(),".local","state"),object},macos=()=>{let object={};return object.cache=()=>process.env.XDG_CACHE_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"Caches"),object.config=()=>process.env.XDG_CONFIG_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"Preferences"),object.data=()=>process.env.XDG_DATA_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"Application Support"),object.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,object.state=()=>process.env.XDG_STATE_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"State"),object},windows=()=>{let object={};return object.cache=()=>{let localAppData=process.env.LOCALAPPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Local");return process.env.XDG_CACHE_HOME||path.join(localAppData,"xdg.cache")},object.config=()=>{let appData=process.env.APPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Roaming");return process.env.XDG_CONFIG_HOME||path.join(appData,"xdg.config")},object.data=()=>{let appData=process.env.APPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Roaming");return process.env.XDG_DATA_HOME||path.join(appData,"xdg.data")},object.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,object.state=()=>{let localAppData=process.env.LOCALAPPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Local");return process.env.XDG_STATE_HOME||path.join(localAppData,"xdg.state")},object},_XDGPortable=()=>{let XDGPortable=function(){return _XDGPortable()},extension={};return/^darwin$/i.test(process.platform)?extension=macos():/^win/i.test(process.platform)?extension=windows():extension=linux(),extension.configDirs=()=>{let dirs=[];return dirs.push(extension.config()),process.env.XDG_CONFIG_DIRS&&dirs.push(...process.env.XDG_CONFIG_DIRS.split(path.delimiter)),dirs},extension.dataDirs=()=>{let dirs=[];return dirs.push(extension.data()),process.env.XDG_DATA_DIRS&&dirs.push(...process.env.XDG_DATA_DIRS.split(path.delimiter)),dirs},Object.keys(extension).forEach(key=>{XDGPortable[key]=extension[key]}),XDGPortable};module.exports=_XDGPortable()}});var require_xdg_app_paths=__commonJS({"../../node_modules/.pnpm/xdg-app-paths@5.1.0/node_modules/xdg-app-paths/index.js"(exports,module){"use strict";var path=__require("path"),os=__require("os"),xdg=require_lib3(),isWinOS=/^win/i.test(process.platform);function _normalizeOptions(options,isolated){if(options=options||{},typeof options!="object"&&(options={isolated:options}),options.isolated=options.isolated===void 0||options.isolated===null?isolated:options.isolated,typeof options.isolated!="boolean")throw new TypeError(`Expected boolean for "isolated" argument, got ${typeof options.isolated}`);return options}var base=(name,isolated)=>{let object={};return object.cache=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.cache(),options.isolated?name:"")),object.config=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.config(),options.isolated?name:"")),object.data=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.data(),options.isolated?name:"")),object.runtime=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.runtime()?path.join(xdg.runtime(),options.isolated?name:""):void 0),object.state=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.state(),options.isolated?name:"")),object.configDirs=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.configDirs().map(s=>path.join(s,options.isolated?name:""))),object.dataDirs=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.dataDirs().map(s=>path.join(s,options.isolated?name:""))),object},windows=(name,isolated)=>{let{env}=process,homedir=os.homedir(),tmpdir=os.tmpdir(),appData=env.APPDATA||path.join(homedir||tmpdir,"AppData","Roaming"),localAppData=env.LOCALAPPDATA||path.join(homedir||tmpdir,"AppData","Local"),object={};return object.cache=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_CACHE_HOME?path.join(xdg.cache(),options.isolated?name:""):path.join(localAppData,options.isolated?name:"","Cache")),object.config=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_CONFIG_HOME?path.join(xdg.config(),options.isolated?name:""):path.join(appData,options.isolated?name:"","Config")),object.data=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_DATA_HOME?path.join(xdg.data(),options.isolated?name:""):path.join(appData,options.isolated?name:"","Data")),object.runtime=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.runtime()?path.join(xdg.runtime(),options.isolated?name:""):void 0),object.state=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_STATE_HOME?path.join(xdg.state(),options.isolated?name:""):path.join(localAppData,options.isolated?name:"","State")),object.configDirs=(options={isolated:null})=>{options=_normalizeOptions(options,isolated);let dirs=[object.config(options)];return env.XDG_CONFIG_DIRS&&dirs.push(...env.XDG_CONFIG_DIRS.split(path.delimiter).map(s=>path.join(s,options.isolated?name:""))),dirs},object.dataDirs=(options={isolated:null})=>{options=_normalizeOptions(options,isolated);let dirs=[object.data(options)];return env.XDG_DATA_DIRS&&dirs.push(...env.XDG_DATA_DIRS.split(path.delimiter).map(s=>path.join(s,options.isolated?name:""))),dirs},object},_XDGAppPaths=class __XDGAppPaths{constructor(options={name:null,suffix:null,isolated:!0}){let XDGAppPaths2=function(options2={name:null,suffix:null,isolated:!0}){return new __XDGAppPaths(options2)};this._fn=XDGAppPaths2,options=options||{},typeof options!="object"&&(options={name:options});let name=options.name||"";if(typeof name!="string")throw new TypeError(`Expected string for "name" argument, got ${typeof name}`);let suffix=options.suffix||"";if(typeof suffix!="string")throw new TypeError(`Expected string for "suffix" argument, got ${typeof suffix}`);let isolated=options.isolated===void 0||options.isolated===null?!0:options.isolated;if(typeof isolated!="boolean")throw new TypeError(`Expected boolean for "isolated" argument, got ${typeof isolated}`);name||(name=path.parse(process.pkg?process.execPath:__require.main?__require.main.filename:process.argv[0]).name),suffix&&(name+=suffix),this._fn.$name=()=>name,this._fn.$isolated=()=>isolated;let extension=isWinOS?windows(name,isolated):base(name,isolated);return Object.keys(extension).forEach(key=>{this._fn[key]=extension[key]}),this._fn}};module.exports=new _XDGAppPaths}});var require_fetch_dist_tags=__commonJS({"src/util/get-latest-version/fetch-dist-tags.cjs"(exports,module){"use strict";var https=__require("https");function fetchDistTags(name,options){let timeout=options&&options.timeout||3e3,agent=new https.Agent({keepAlive:!0,maxSockets:15}),headers={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},url=`https://registry.npmjs.org/-/package/${name}/dist-tags`;return new Promise(resolve2=>{let timer=setTimeout(()=>{req.destroy(),resolve2(void 0)},timeout),req=https.get(url,{agent,headers},res=>{let buf="";res.on("data",chunk=>{buf+=chunk}),res.on("end",()=>{clearTimeout(timer);try{if(res.statusCode&&res.statusCode>=400){resolve2(void 0);return}resolve2(JSON.parse(buf))}catch{resolve2(void 0)}})});req.on("error",()=>{clearTimeout(timer),resolve2(void 0)})})}module.exports={fetchDistTags}}});function getWhoamiCachedAnswer(args,authConfig){return args.includes("--cached")?getCachedUsername(authConfig):void 0}var import_semver=__toESM(require_semver(),1);import{spawn,execFile}from"child_process";function renderUpgradeProgress(current,total,phase){let bar=progress(current,total);output_manager_default.spinner(bar?`Upgrading Vercel CLI [${bar}] (${current}/${total})${phase?` ${phase}`:""}`:phase||"Upgrading Vercel CLI\u2026",0)}function execFileStdout(command,args,cwd,env=trustedUpgradeEnvironment){return new Promise((resolve2,reject)=>{execFile(command,args,{encoding:"utf8",windowsHide:!0,cwd,timeout:15e3,env:{...env}},(error,stdout)=>{if(error){reject(error);return}resolve2(stdout.toString())})})}function parseVersionOutput(stdout){for(let line of[stdout.trim(),...stdout.trim().split(`
|
|
7
|
+
import{getNativePackageName,withDirectoryLock}from"./chunk-DQASZDQT.js";import{HOMEBREW_UPGRADE_COMMAND,execPackageManager,getUpdateCommandInfo,getUpgradePackageManager,isGlobal,packageManagerInvocation,trustedUpgradeDirectory,trustedUpgradeEnvironment}from"./chunk-HTPNGLPH.js";import{require_semver}from"./chunk-BPUANOGW.js";import{progress}from"./chunk-U56NHYAH.js";import{require_ci_info}from"./chunk-2EYYB6YN.js";import{getInstallRoot,isNativeBinaryInstall}from"./chunk-NWGBDBZI.js";import{getCachedUsername,require_lib}from"./chunk-6NUH6ZPE.js";import{pkg_default}from"./chunk-DBT6PGEH.js";import{output_manager_default}from"./chunk-GZLYNPNU.js";import{__commonJS,__require,__toESM}from"./chunk-BZENIQ7N.js";var require_lib2=__commonJS({"../../node_modules/.pnpm/os-paths@4.4.0/node_modules/os-paths/src/lib/index.js"(exports,module){"use strict";var os=__require("os"),paths=__require("path"),isWinOS=/^win/i.test(process.platform);function normalize_path(path){return paths.normalize(paths.join(path,"."))}var base=()=>{let{env}=process,object={};return object.home=()=>normalize_path(os.homedir?os.homedir():env.HOME),object.temp=()=>normalize_path(os.tmpdir?os.tmpdir():env.TMPDIR||env.TEMP||env.TMP),object},windows=()=>{let{env}=process,object={};return object.home=()=>normalize_path(os.homedir?os.homedir():env.USERPROFILE||paths.join(env.HOMEDRIVE,env.HOMEPATH)||env.HOME),object.temp=()=>normalize_path(os.tmpdir?os.tmpdir():env.TEMP||env.TMP||paths.join(env.LOCALAPPDATA||env.SystemRoot||env.windir,"Temp")),object},_OSPaths=class __OSPaths{constructor(){let OSPaths=function(){return new __OSPaths};this._fn=OSPaths;let extension=isWinOS?windows():base();return Object.keys(extension).forEach(key=>{this._fn[key]=extension[key]}),this._fn}};module.exports=new _OSPaths}});var require_lib3=__commonJS({"../../node_modules/.pnpm/xdg-portable@7.3.0/node_modules/xdg-portable/src/lib/index.js"(exports,module){"use strict";var path=__require("path"),osPaths=require_lib2(),linux=()=>{let object={};return object.cache=()=>process.env.XDG_CACHE_HOME||path.join(osPaths.home()||osPaths.temp(),".cache"),object.config=()=>process.env.XDG_CONFIG_HOME||path.join(osPaths.home()||osPaths.temp(),".config"),object.data=()=>process.env.XDG_DATA_HOME||path.join(osPaths.home()||osPaths.temp(),".local","share"),object.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,object.state=()=>process.env.XDG_STATE_HOME||path.join(osPaths.home()||osPaths.temp(),".local","state"),object},macos=()=>{let object={};return object.cache=()=>process.env.XDG_CACHE_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"Caches"),object.config=()=>process.env.XDG_CONFIG_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"Preferences"),object.data=()=>process.env.XDG_DATA_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"Application Support"),object.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,object.state=()=>process.env.XDG_STATE_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"State"),object},windows=()=>{let object={};return object.cache=()=>{let localAppData=process.env.LOCALAPPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Local");return process.env.XDG_CACHE_HOME||path.join(localAppData,"xdg.cache")},object.config=()=>{let appData=process.env.APPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Roaming");return process.env.XDG_CONFIG_HOME||path.join(appData,"xdg.config")},object.data=()=>{let appData=process.env.APPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Roaming");return process.env.XDG_DATA_HOME||path.join(appData,"xdg.data")},object.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,object.state=()=>{let localAppData=process.env.LOCALAPPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Local");return process.env.XDG_STATE_HOME||path.join(localAppData,"xdg.state")},object},_XDGPortable=()=>{let XDGPortable=function(){return _XDGPortable()},extension={};return/^darwin$/i.test(process.platform)?extension=macos():/^win/i.test(process.platform)?extension=windows():extension=linux(),extension.configDirs=()=>{let dirs=[];return dirs.push(extension.config()),process.env.XDG_CONFIG_DIRS&&dirs.push(...process.env.XDG_CONFIG_DIRS.split(path.delimiter)),dirs},extension.dataDirs=()=>{let dirs=[];return dirs.push(extension.data()),process.env.XDG_DATA_DIRS&&dirs.push(...process.env.XDG_DATA_DIRS.split(path.delimiter)),dirs},Object.keys(extension).forEach(key=>{XDGPortable[key]=extension[key]}),XDGPortable};module.exports=_XDGPortable()}});var require_xdg_app_paths=__commonJS({"../../node_modules/.pnpm/xdg-app-paths@5.1.0/node_modules/xdg-app-paths/index.js"(exports,module){"use strict";var path=__require("path"),os=__require("os"),xdg=require_lib3(),isWinOS=/^win/i.test(process.platform);function _normalizeOptions(options,isolated){if(options=options||{},typeof options!="object"&&(options={isolated:options}),options.isolated=options.isolated===void 0||options.isolated===null?isolated:options.isolated,typeof options.isolated!="boolean")throw new TypeError(`Expected boolean for "isolated" argument, got ${typeof options.isolated}`);return options}var base=(name,isolated)=>{let object={};return object.cache=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.cache(),options.isolated?name:"")),object.config=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.config(),options.isolated?name:"")),object.data=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.data(),options.isolated?name:"")),object.runtime=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.runtime()?path.join(xdg.runtime(),options.isolated?name:""):void 0),object.state=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.state(),options.isolated?name:"")),object.configDirs=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.configDirs().map(s=>path.join(s,options.isolated?name:""))),object.dataDirs=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.dataDirs().map(s=>path.join(s,options.isolated?name:""))),object},windows=(name,isolated)=>{let{env}=process,homedir=os.homedir(),tmpdir=os.tmpdir(),appData=env.APPDATA||path.join(homedir||tmpdir,"AppData","Roaming"),localAppData=env.LOCALAPPDATA||path.join(homedir||tmpdir,"AppData","Local"),object={};return object.cache=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_CACHE_HOME?path.join(xdg.cache(),options.isolated?name:""):path.join(localAppData,options.isolated?name:"","Cache")),object.config=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_CONFIG_HOME?path.join(xdg.config(),options.isolated?name:""):path.join(appData,options.isolated?name:"","Config")),object.data=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_DATA_HOME?path.join(xdg.data(),options.isolated?name:""):path.join(appData,options.isolated?name:"","Data")),object.runtime=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.runtime()?path.join(xdg.runtime(),options.isolated?name:""):void 0),object.state=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_STATE_HOME?path.join(xdg.state(),options.isolated?name:""):path.join(localAppData,options.isolated?name:"","State")),object.configDirs=(options={isolated:null})=>{options=_normalizeOptions(options,isolated);let dirs=[object.config(options)];return env.XDG_CONFIG_DIRS&&dirs.push(...env.XDG_CONFIG_DIRS.split(path.delimiter).map(s=>path.join(s,options.isolated?name:""))),dirs},object.dataDirs=(options={isolated:null})=>{options=_normalizeOptions(options,isolated);let dirs=[object.data(options)];return env.XDG_DATA_DIRS&&dirs.push(...env.XDG_DATA_DIRS.split(path.delimiter).map(s=>path.join(s,options.isolated?name:""))),dirs},object},_XDGAppPaths=class __XDGAppPaths{constructor(options={name:null,suffix:null,isolated:!0}){let XDGAppPaths2=function(options2={name:null,suffix:null,isolated:!0}){return new __XDGAppPaths(options2)};this._fn=XDGAppPaths2,options=options||{},typeof options!="object"&&(options={name:options});let name=options.name||"";if(typeof name!="string")throw new TypeError(`Expected string for "name" argument, got ${typeof name}`);let suffix=options.suffix||"";if(typeof suffix!="string")throw new TypeError(`Expected string for "suffix" argument, got ${typeof suffix}`);let isolated=options.isolated===void 0||options.isolated===null?!0:options.isolated;if(typeof isolated!="boolean")throw new TypeError(`Expected boolean for "isolated" argument, got ${typeof isolated}`);name||(name=path.parse(process.pkg?process.execPath:__require.main?__require.main.filename:process.argv[0]).name),suffix&&(name+=suffix),this._fn.$name=()=>name,this._fn.$isolated=()=>isolated;let extension=isWinOS?windows(name,isolated):base(name,isolated);return Object.keys(extension).forEach(key=>{this._fn[key]=extension[key]}),this._fn}};module.exports=new _XDGAppPaths}});var require_fetch_dist_tags=__commonJS({"src/util/get-latest-version/fetch-dist-tags.cjs"(exports,module){"use strict";var https=__require("https");function fetchDistTags(name,options){let timeout=options&&options.timeout||3e3,agent=new https.Agent({keepAlive:!0,maxSockets:15}),headers={accept:"application/vnd.npm.install-v1+json; q=1.0, application/json; q=0.8, */*"},url=`https://registry.npmjs.org/-/package/${name}/dist-tags`;return new Promise(resolve2=>{let timer=setTimeout(()=>{req.destroy(),resolve2(void 0)},timeout),req=https.get(url,{agent,headers},res=>{let buf="";res.on("data",chunk=>{buf+=chunk}),res.on("end",()=>{clearTimeout(timer);try{if(res.statusCode&&res.statusCode>=400){resolve2(void 0);return}resolve2(JSON.parse(buf))}catch{resolve2(void 0)}})});req.on("error",()=>{clearTimeout(timer),resolve2(void 0)})})}module.exports={fetchDistTags}}});function getWhoamiCachedAnswer(args,authConfig){return args.includes("--cached")?getCachedUsername(authConfig):void 0}var import_semver=__toESM(require_semver(),1);import{spawn}from"child_process";function renderUpgradeProgress(current,total,phase){let bar=progress(current,total);output_manager_default.spinner(bar?`Upgrading Vercel CLI [${bar}] (${current}/${total})${phase?` ${phase}`:""}`:phase||"Upgrading Vercel CLI\u2026",0)}function execFileStdout(command,args,cwd,env=trustedUpgradeEnvironment){return execPackageManager(command,args,{cwd,env,timeout:15e3})}function parseVersionOutput(stdout){for(let line of[stdout.trim(),...stdout.trim().split(`
|
|
8
8
|
`).reverse()])try{let value=JSON.parse(line),parsed=Array.isArray(value)&&value.length===1?value[0]:value,version=typeof parsed=="string"?parsed:typeof parsed?.data=="string"?parsed.data:void 0;if(version&&import_semver.default.valid(version))return version}catch{let version=line.trim();if(import_semver.default.valid(version))return version}}async function getLatestPackageVersion(packageManager,installArgs,cwd,global,env,bypassMinReleaseAge=!0){let packageSpecifier=installArgs.find(arg=>arg.endsWith("@latest"));if(!packageSpecifier)return;let manager=getUpgradePackageManager(packageManager),queryArgs=[...manager.metadataArgs(packageSpecifier),...bypassMinReleaseAge?manager.releaseAgeBypassArgs:[]];try{let stdout=await execFileStdout(packageManager,queryArgs,cwd,env);return parseVersionOutput(stdout)}catch(error){output_manager_default.debug(`Failed to resolve the latest Vercel CLI version: ${error instanceof Error?error.message:String(error)}`);return}}async function getInstalledPackageVersion(packageManager,installArgs,cwd,global){let packageSpecifier=installArgs.find(arg=>arg.endsWith("@latest"));if(!packageSpecifier)return;let packageName=packageSpecifier.slice(0,-7);try{let stdout=await execFileStdout(packageManager,["list",packageName,"--depth=0","--json",...global?["--global"]:[]],cwd),parsed=JSON.parse(stdout),projects=Array.isArray(parsed)?parsed:[parsed];for(let project of projects){let version=project?.dependencies?.[packageName]?.version??project?.devDependencies?.[packageName]?.version??project?.optionalDependencies?.[packageName]?.version;if(typeof version=="string"&&import_semver.default.valid(version))return version}}catch(error){output_manager_default.debug(`Failed to read the installed Vercel CLI version: ${error instanceof Error?error.message:String(error)}`)}}function isVersionCurrent(current,latest){return import_semver.default.valid(current)&&import_semver.default.valid(latest)?import_semver.default.gte(current,latest):current===latest}function pinPackageVersion(args,version){return args.map(arg=>arg.endsWith("@latest")?`${arg.slice(0,-6)}${version}`:arg)}async function getMinReleaseAgeContext(packageManager,cwd,global){let setting=packageManager==="pnpm"?"minimumReleaseAge":"min-release-age";try{let raw=(await execFileStdout(packageManager,["config","get",setting,"--json",...global?["--global"]:[]],cwd)).trim(),value=raw===""||raw==="undefined"?void 0:JSON.parse(raw);if(!(value==null||value===""||value==="undefined")){let age=typeof value=="number"||typeof value=="string"&&value.trim()!==""?Number(value):NaN;if(!Number.isFinite(age)||age<0)return`Could not determine ${packageManager}'s configured minimum release age.`;let minutes=packageManager==="pnpm"?age:age*1440,duration=minutes>0&&minutes%60===0?`${minutes/60} ${minutes===60?"hour":"hours"}`:`${minutes} ${minutes===1?"minute":"minutes"}`;return`${packageManager} ${setting} is configured to ${duration}.`}if(packageManager==="pnpm"){let version=parseVersionOutput(await execFileStdout(packageManager,["--version"],cwd));if(version&&!import_semver.default.prerelease(version)&&import_semver.default.gte(version,"11.0.0"))return`pnpm ${version} defaults to a minimum release age of 24 hours (1440 minutes); no explicit minimumReleaseAge setting was reported.`}return`${packageManager} did not report a configured minimum release age.`}catch{return`Could not determine ${packageManager}'s configured minimum release age.`}}function isMinReleaseAgeError(packageManager,stdout,stderr){let installerOutput=`${stdout}
|
|
9
|
-
${stderr}`;return packageManager==="pnpm"?installerOutput.includes("ERR_PNPM_NO_MATURE_MATCHING_VERSION")||installerOutput.includes("ERR_PNPM_NO_MATCHING_VERSION")&&installerOutput.includes("satisfies the specs but was released at"):packageManager==="npm"?/\bETARGET\b/.test(installerOutput)&&installerOutput.includes("with a date before")||/min-release-age cannot be provided/i.test(installerOutput):!1}function setMinReleaseAgeBypass(client,enabled){client.config={...client.config,updates:{...client.config.updates,bypassMinReleaseAge:enabled}},client.writeToConfigFile()}async function executeHomebrewUpgrade(env=trustedUpgradeEnvironment){let[brew,...args]=HOMEBREW_UPGRADE_COMMAND.split(" ");output_manager_default.debug(`Executing: ${HOMEBREW_UPGRADE_COMMAND}`);let result=await new Promise(resolve2=>{let settled=!1,brewProcess=spawn(brew,args,{cwd:trustedUpgradeDirectory,env:{...env},stdio:"inherit",shell:!1});brewProcess.on("error",spawnError=>{settled||(settled=!0,resolve2({code:1,spawnError}))}),brewProcess.on("close",code=>{settled||(settled=!0,resolve2({code:code??1}))})});return result.spawnError?(output_manager_default.error(`Failed to run Homebrew: ${result.spawnError.message}`),output_manager_default.log(`You can try running the command manually: ${HOMEBREW_UPGRADE_COMMAND}`),1):(result.code!==0&&(output_manager_default.error(`Homebrew upgrade failed with exit code ${result.code}`),output_manager_default.log(`You can try running the command manually: ${HOMEBREW_UPGRADE_COMMAND}`)),result.code)}function executeAutomaticUpgrade(client,env=trustedUpgradeEnvironment){return executeUpgrade("latest",client,!1,!0,env,"package-manager")}async function executeUpgrade(targetVersion,client,bypassMinReleaseAge=!1,explicitTarget=!1,env=trustedUpgradeEnvironment,releaseAgePolicy="newest"){let totalSteps=targetVersion?2:3;renderUpgradeProgress(0,totalSteps,"Resolving installer\u2026");let{command:updateCommand,global,packageManager}=await getUpdateCommandInfo(env).catch(error=>{throw output_manager_default.stopSpinner(),error}),[command,...args]=updateCommand.split(" "),cwd=global?trustedUpgradeDirectory:process.cwd(),bypassArgs=getUpgradePackageManager(packageManager).releaseAgeBypassArgs;if(bypassMinReleaseAge&&bypassArgs.length===0)return output_manager_default.stopSpinner(),output_manager_default.error(`Minimum release-age bypass is not supported for ${packageManager}. Run the upgrade without --bypass-min-release-age, or configure release-age settings in ${packageManager} directly.`),1;bypassMinReleaseAge&&client&&client.config.updates?.bypassMinReleaseAge!==!0&&setMinReleaseAgeBypass(client,!0);let versionBefore=pkg_default.version,installLatestTag=explicitTarget&&targetVersion==="latest",resolvedTargetVersion=installLatestTag?void 0:targetVersion;if(targetVersion||(renderUpgradeProgress(1,totalSteps,"Checking for updates\u2026"),resolvedTargetVersion=await getLatestPackageVersion(packageManager,args,cwd,global,env,releaseAgePolicy==="newest")),!resolvedTargetVersion&&!installLatestTag)return output_manager_default.stopSpinner(),output_manager_default.error("Failed to resolve the latest Vercel CLI version."),1;if(!explicitTarget&&resolvedTargetVersion&&isVersionCurrent(versionBefore,resolvedTargetVersion))return renderUpgradeProgress(totalSteps,totalSteps),output_manager_default.stopSpinner(),output_manager_default.log(`No upgrade available. Vercel CLI is already up to date (v${versionBefore}).`),0;let installArgs=resolvedTargetVersion?pinPackageVersion(args,resolvedTargetVersion):args,shouldBypass=releaseAgePolicy==="newest"&&bypassArgs.length>0&&(bypassMinReleaseAge||client?.config.updates?.bypassMinReleaseAge===!0);shouldBypass&&(installArgs=[...installArgs,...bypassArgs]);let runInstall=currentArgs=>{let installCommand=[command,...currentArgs].join(" ");return output_manager_default.debug(`Executing: ${installCommand} (cwd: ${cwd})`),new Promise(resolve2=>{let stdout=[],stderr=[],
|
|
9
|
+
${stderr}`;return packageManager==="pnpm"?installerOutput.includes("ERR_PNPM_NO_MATURE_MATCHING_VERSION")||installerOutput.includes("ERR_PNPM_NO_MATCHING_VERSION")&&installerOutput.includes("satisfies the specs but was released at"):packageManager==="npm"?/\bETARGET\b/.test(installerOutput)&&installerOutput.includes("with a date before")||/min-release-age cannot be provided/i.test(installerOutput):!1}function setMinReleaseAgeBypass(client,enabled){client.config={...client.config,updates:{...client.config.updates,bypassMinReleaseAge:enabled}},client.writeToConfigFile()}async function executeHomebrewUpgrade(env=trustedUpgradeEnvironment){let[brew,...args]=HOMEBREW_UPGRADE_COMMAND.split(" ");output_manager_default.debug(`Executing: ${HOMEBREW_UPGRADE_COMMAND}`);let result=await new Promise(resolve2=>{let settled=!1,brewProcess=spawn(brew,args,{cwd:trustedUpgradeDirectory,env:{...env},stdio:"inherit",shell:!1});brewProcess.on("error",spawnError=>{settled||(settled=!0,resolve2({code:1,spawnError}))}),brewProcess.on("close",code=>{settled||(settled=!0,resolve2({code:code??1}))})});return result.spawnError?(output_manager_default.error(`Failed to run Homebrew: ${result.spawnError.message}`),output_manager_default.log(`You can try running the command manually: ${HOMEBREW_UPGRADE_COMMAND}`),1):(result.code!==0&&(output_manager_default.error(`Homebrew upgrade failed with exit code ${result.code}`),output_manager_default.log(`You can try running the command manually: ${HOMEBREW_UPGRADE_COMMAND}`)),result.code)}function executeAutomaticUpgrade(client,env=trustedUpgradeEnvironment){return executeUpgrade("latest",client,!1,!0,env,"package-manager")}async function executeUpgrade(targetVersion,client,bypassMinReleaseAge=!1,explicitTarget=!1,env=trustedUpgradeEnvironment,releaseAgePolicy="newest"){let totalSteps=targetVersion?2:3;renderUpgradeProgress(0,totalSteps,"Resolving installer\u2026");let{command:updateCommand,global,packageManager}=await getUpdateCommandInfo(env).catch(error=>{throw output_manager_default.stopSpinner(),error}),[command,...args]=updateCommand.split(" "),cwd=global?trustedUpgradeDirectory:process.cwd(),bypassArgs=getUpgradePackageManager(packageManager).releaseAgeBypassArgs;if(bypassMinReleaseAge&&bypassArgs.length===0)return output_manager_default.stopSpinner(),output_manager_default.error(`Minimum release-age bypass is not supported for ${packageManager}. Run the upgrade without --bypass-min-release-age, or configure release-age settings in ${packageManager} directly.`),1;bypassMinReleaseAge&&client&&client.config.updates?.bypassMinReleaseAge!==!0&&setMinReleaseAgeBypass(client,!0);let versionBefore=pkg_default.version,installLatestTag=explicitTarget&&targetVersion==="latest",resolvedTargetVersion=installLatestTag?void 0:targetVersion;if(targetVersion||(renderUpgradeProgress(1,totalSteps,"Checking for updates\u2026"),resolvedTargetVersion=await getLatestPackageVersion(packageManager,args,cwd,global,env,releaseAgePolicy==="newest")),!resolvedTargetVersion&&!installLatestTag)return output_manager_default.stopSpinner(),output_manager_default.error("Failed to resolve the latest Vercel CLI version."),1;if(!explicitTarget&&resolvedTargetVersion&&isVersionCurrent(versionBefore,resolvedTargetVersion))return renderUpgradeProgress(totalSteps,totalSteps),output_manager_default.stopSpinner(),output_manager_default.log(`No upgrade available. Vercel CLI is already up to date (v${versionBefore}).`),0;let installArgs=resolvedTargetVersion?pinPackageVersion(args,resolvedTargetVersion):args,shouldBypass=releaseAgePolicy==="newest"&&bypassArgs.length>0&&(bypassMinReleaseAge||client?.config.updates?.bypassMinReleaseAge===!0);shouldBypass&&(installArgs=[...installArgs,...bypassArgs]);let runInstall=currentArgs=>{let installCommand=[command,...currentArgs].join(" ");return output_manager_default.debug(`Executing: ${installCommand} (cwd: ${cwd})`),new Promise(resolve2=>{let stdout=[],stderr=[],invocation;try{invocation=packageManagerInvocation(command,currentArgs,env)}catch(spawnError){resolve2({code:1,stdout:"",stderr:"",spawnError});return}let upgradeProcess=spawn(invocation.file,invocation.args,{cwd,env:{...env},stdio:["inherit","pipe","pipe"],shell:!1,windowsVerbatimArguments:invocation.windowsVerbatimArguments});upgradeProcess.stdout?.on("data",data=>{stdout.push(Uint8Array.from(data)),output_manager_default.debug(`[upgrade stdout] ${data.toString().trimEnd()}`)}),upgradeProcess.stderr?.on("data",data=>{stderr.push(Uint8Array.from(data)),output_manager_default.debug(`[upgrade stderr] ${data.toString().trimEnd()}`)});let settled=!1;upgradeProcess.on("error",spawnError=>{settled||(settled=!0,resolve2({code:1,stdout:"",stderr:"",spawnError}))}),upgradeProcess.on("close",code=>{settled||(settled=!0,resolve2({code:code??1,stdout:Buffer.concat(stdout).toString(),stderr:Buffer.concat(stderr).toString()}))})})};renderUpgradeProgress(targetVersion?1:2,totalSteps,"Installing\u2026");let result=await runInstall(installArgs),usedAllowedRelease=!1;if(result.code!==0&&!result.spawnError&&releaseAgePolicy==="newest"&&!shouldBypass&&bypassArgs.length>0&&isMinReleaseAgeError(packageManager,result.stdout,result.stderr)){let context=await getMinReleaseAgeContext(packageManager,cwd,global);output_manager_default.stopSpinner();let blockedMessage=`The package manager blocked this Vercel CLI release because of its minimum release-age setting. ${context}`;if(!client||client.nonInteractive||!client.stdin.isTTY)return output_manager_default.error(`${blockedMessage}
|
|
10
10
|
To install the newest release allowed by your settings:
|
|
11
11
|
vc upgrade latest
|
|
12
12
|
To bypass the minimum release age for this and future foreground upgrades:
|
|
@@ -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{resolveProjectContext}from"./chunk-
|
|
7
|
+
import{resolveProjectContext}from"./chunk-SR7BZA6N.js";function getProjectNameFromFlags(flags){return flags["--project"]}function getLinkedFlagsProject(client,projectName,options){return resolveProjectContext({client,projectNameOrId:projectName,projectNotFoundHandling:options?.projectNotFoundHandling})}export{getProjectNameFromFlags,getLinkedFlagsProject};
|
|
@@ -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{output_manager_default}from"./chunk-
|
|
7
|
+
import{output_manager_default}from"./chunk-GZLYNPNU.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var FID_METRIC_ID="vercel.speed_insights.fid_ms",FID_DEPRECATION_WARNING="First Input Delay will be sunset on November 1st. Use Interaction to Next Paint instead (vercel.speed_insights.inp_ms). Learn more: https://web.dev/articles/fid";function warnIfFidMetric(metric){metric===FID_METRIC_ID&&output_manager_default.print(`${import_chalk.default.yellow("!")} ${FID_DEPRECATION_WARNING}
|
|
8
8
|
`)}export{warnIfFidMetric};
|
|
@@ -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{warnDeprecatedInput}from"./chunk-
|
|
7
|
+
import{warnDeprecatedInput}from"./chunk-SDYCW5JM.js";import{output_manager_default}from"./chunk-GZLYNPNU.js";function parseTarget({flagName,flags}){let targetFlagName=`--${flagName}`,targetFlagValue=flags[targetFlagName],prodFlagValue=flags["--prod"];if(prodFlagValue&&targetFlagValue){let typedFlagName=flags["--target"]!==void 0?"--target":targetFlagName;output_manager_default.warning(`Ignoring --prod because ${typedFlagName} is also set. Pass only one of them.`)}if(typeof targetFlagValue=="string")return output_manager_default.debug(`Setting target to ${targetFlagValue}`),targetFlagValue;if(prodFlagValue)return output_manager_default.debug("Setting target to production"),"production"}function applyDeprecatedTargetFlag(client,flags){let target=flags["--target"];return target===void 0?!0:flags["--environment"]!==void 0?(output_manager_default.error("Can't use --target with --environment. Use --environment."),!1):(warnDeprecatedInput(client,"--target","--environment"),flags["--environment"]=target,!0)}function warnDeprecatedProdFlag(client,flags){flags["--prod"]&&warnDeprecatedInput(client,"--prod","--environment production")}export{parseTarget,applyDeprecatedTargetFlag,warnDeprecatedProdFlag};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __dirname_(__filename);
|
|
7
|
+
import{canPrompt}from"./chunk-IQ7FPAI4.js";import{scopeFlagPassed}from"./chunk-DNLE3KPC.js";import{outputActionRequired,outputAgentError}from"./chunk-AUIV7YJO.js";import{output_manager_default}from"./chunk-GZLYNPNU.js";import{require_build_utils}from"./chunk-5MDNVAE6.js";import{AGENT_ACTION,AGENT_REASON,AGENT_STATUS,getExitCodeForReason}from"./chunk-JBU72NEQ.js";import{__toESM}from"./chunk-BZENIQ7N.js";async function getWebhook(client,webhookId){return await client.fetch(`/v1/webhooks/${encodeURIComponent(webhookId)}`)}var TEAM_BUDGET={scope:"team"},BUDGET_THRESHOLD_PERCENTS=[50,75,100],PAUSE_AT_PERCENT=100;function buildThresholds({pause,webhookUrl}){return BUDGET_THRESHOLD_PERCENTS.map(percent=>({percent,sendNotifications:!0,triggerWebhook:!!webhookUrl,pauseUsage:percent===PAUSE_AT_PERCENT?!!pause:!1}))}function thresholdsForSet({existing,pause,pauseSpecified,webhookUrl,webhookSpecified}){if(!existing?.length)return buildThresholds({pause,webhookUrl});let next=existing.map(threshold=>({...threshold}));if(pauseSpecified&&(next=applyPauseToThresholds(next,pause)),webhookSpecified){let triggerWebhook=!!webhookUrl;next=next.map(threshold=>({...threshold,triggerWebhook}))}return next}function hasPauseThreshold(thresholds){return thresholds.some(threshold=>threshold.percent===PAUSE_AT_PERCENT)}function pausePercentsOutside100(thresholds){return thresholds.filter(threshold=>threshold.pauseUsage&&threshold.percent!==PAUSE_AT_PERCENT).map(threshold=>threshold.percent)}function applyPauseToThresholds(thresholds,pause){return pause?thresholds.map(threshold=>({...threshold,pauseUsage:threshold.percent===PAUSE_AT_PERCENT})):thresholds.map(threshold=>({...threshold,pauseUsage:!1}))}function budgetAmountDollars(budget){let n=Number(budget.amount);return Number.isFinite(n)?n:0}function spendDollars(spend){return spend?.currentSpend==null?null:spend.currentSpend/100}function percentUsed(spent,amount){return spent!==null&&amount>0?Math.round(spent/amount*100):null}function spendPayload(spent,amount){return{currentSpend:spent,percentUsed:amount===null?null:percentUsed(spent,amount),unit:"usd"}}var NO_RETRY={retries:0};function budgetPauses(budget){return budget.thresholds.some(t=>t.pauseUsage)}function budgetStatePayload(state){return{id:state.id,teamId:state.teamId,scope:state.scope,scopeId:state.scopeId,amount:state.amount,amountUnit:state.amountUnit,status:state.status,pause:state.pause,webhookId:state.webhookId,webhookUrl:state.webhookUrl,webhookStatus:state.webhookStatus,thresholds:state.thresholds}}function setSavedReceipt({team,reloaded,webhookSecret,amount,scope}){let secret=webhookSecret?{webhookSecret}:{};return reloaded?{ok:!0,saved:!0,reloaded:!0,teamSlug:team.slug,...budgetStatePayload(reloaded),...secret}:{ok:!0,saved:!0,reloaded:!1,teamId:team.id,teamSlug:team.slug,scope,amount,amountUnit:"usd",...secret}}function removeReceipt({team,alreadyAbsent,disabled,scope}){return{ok:!0,alreadyAbsent,disabled,teamId:team.id,teamSlug:team.slug,scope}}function selectorQuery(selector){return new URLSearchParams({scope:selector.scope}).toString()}function matchesSelector(budget,selector){return(budget.scope??selector.scope)===selector.scope}function resolvedBudgetScope(budget,selector=TEAM_BUDGET){return budget.scope??selector.scope}async function toBudgetState(client,budget,selector=TEAM_BUDGET){let webhook=await resolveBudgetWebhook(client,budget);return{id:budget.id,teamId:budget.ownerId,scope:resolvedBudgetScope(budget,selector),scopeId:budget.scopeId??null,amount:budgetAmountDollars(budget),amountUnit:"usd",status:budget.status,pause:budgetPauses(budget),webhookId:webhook.webhookId,webhookUrl:webhook.webhookUrl,webhookStatus:webhook.webhookStatus,thresholds:budget.thresholds.map(threshold=>({...threshold}))}}async function resolveBudgetWebhook(client,budget){if(!budget.webhookId)return{webhookId:null,webhookUrl:null,webhookStatus:"absent"};try{let webhook=await getWebhook(client,budget.webhookId);return{webhookId:budget.webhookId,webhookUrl:webhook.url,webhookStatus:"resolved"}}catch{return{webhookId:budget.webhookId,webhookUrl:null,webhookStatus:"unavailable"}}}function formatUsdWhole(dollars){return`$${dollars.toLocaleString("en-US",{maximumFractionDigits:0})}`}function formatUsd(dollars){return`$${dollars.toLocaleString("en-US",{minimumFractionDigits:2,maximumFractionDigits:2})}`}async function listBudgets(client,selector){let{data}=await client.fetch(selector?`/v1/budgets?${selectorQuery(selector)}`:"/v1/budgets",{method:"GET"});return data??[]}async function findBudget(client,selector=TEAM_BUDGET){let budgets=(await listBudgets(client,selector)).filter(budget=>matchesSelector(budget,selector));return budgets.find(b=>b.status==="active")??budgets[0]}async function setBudget(client,input){let selector={scope:input.scope};return client.fetch("/v1/budgets",{method:"POST",retry:{retries:0},body:{amount:input.amount,thresholds:input.thresholds,scope:selector.scope,...input.webhookUrl?{webhookUrl:input.webhookUrl}:{}}})}async function removeBudget(client,budgetId){await client.fetch(`/v1/budgets/${encodeURIComponent(budgetId)}`,{method:"DELETE"})}async function getTeamSpend(client,teamId,selector=TEAM_BUDGET,{retry}={}){let params=new URLSearchParams;selector.scope!=="team"&¶ms.set("scope",selector.scope);let qs=params.toString(),{data}=await client.fetch(`/teams/${encodeURIComponent(teamId)}/spend${qs?`?${qs}`:""}`,{method:"GET",...retry?{retry}:{}});return data??{currentSpend:null,avgSpend:null}}async function listBudgetAlerts(client,selector=TEAM_BUDGET,query={},{retry}={}){let params=new URLSearchParams(selectorQuery(selector));for(let[key,value]of Object.entries(query))value!==void 0&¶ms.set(key,String(value));let page=await client.fetch(`/v1/budgets/alerts?${params}`,{method:"GET",...retry?{retry}:{}});return{data:page.data??[],nextCursor:page.nextCursor}}var import_build_utils=__toESM(require_build_utils(),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
|
+
|
|
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)}
|
|
12
|
+
`);let headline=opts.apiMessage?`${payload.message}
|
|
13
|
+
${opts.apiMessage}`:payload.message;return opts.recovery?printChargeRecovery(headline,opts.recovery.instruction,opts.recovery.command):output_manager_default.fatal(headline),1}function reportUnknownOutcome(client,json,opts){let done=opts.verb==="buy"?"was bought":"was renewed",action=opts.verb==="buy"?"purchase":"renewal";return reportChargeFailure(client,json,{reason:AGENT_REASON.UNKNOWN_OUTCOME,message:`Can't confirm whether ${opts.domain} ${done}. Check the domain before running ${opts.verb} again, or you may be charged twice.`,next:[{command:opts.inspectCommand,when:`Check whether the ${action} went through before retrying`}]},{recovery:{instruction:`Check whether the ${action} went through`,command:opts.inspectCommand}})}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}})}export{getWebhook,TEAM_BUDGET,thresholdsForSet,hasPauseThreshold,pausePercentsOutside100,budgetAmountDollars,spendDollars,percentUsed,spendPayload,NO_RETRY,budgetPauses,budgetStatePayload,setSavedReceipt,removeReceipt,toBudgetState,formatUsdWhole,formatUsd,listBudgets,findBudget,setBudget,removeBudget,getTeamSpend,listBudgetAlerts,chargeFailureReason,parseAmount,amountMatchesPrice,formatAmountArg,formatTerm,canPromptForCharge,chargeFlagWithValue,printChargeRecovery,writeChargeAction,reportUsageError,reportChargeFailure,reportUnknownOutcome,refuseUnnamedTeam,reportPriceChanged};
|
|
@@ -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_dist as require_dist2}from"./chunk-XRIM4BUF.js";import{validateConfig}from"./chunk-RBIHS5QI.js";import{init_dist,parse,stringify}from"./chunk-U4Z2MMOF.js";import{require_dist2 as require_dist}from"./chunk-NIS66BFX.js";import{compileVercelConfig}from"./chunk-
|
|
7
|
+
import{require_dist as require_dist2}from"./chunk-XRIM4BUF.js";import{validateConfig}from"./chunk-RBIHS5QI.js";import{init_dist,parse,stringify}from"./chunk-U4Z2MMOF.js";import{require_dist2 as require_dist}from"./chunk-NIS66BFX.js";import{compileVercelConfig}from"./chunk-SBEWZ65N.js";import{readJSONFile}from"./chunk-UQNBUXQA.js";import{CantParseJSONFile}from"./chunk-T2FCF46I.js";import{require_build_utils}from"./chunk-5MDNVAE6.js";import{__toESM}from"./chunk-BZENIQ7N.js";init_dist();var import_fs_detectors=__toESM(require_dist(),1),import_service_topology=__toESM(require_dist2(),1);import{readFile,writeFile}from"fs/promises";import{basename,join as join2}from"path";var import_build_utils=__toESM(require_build_utils(),1);import{join}from"path";function createDetectEntrypoint(projectRoot){return async({workPath,framework})=>{let absWorkPath=(0,import_build_utils.normalizePath)(join(projectRoot,workPath)),builderName;if((0,import_build_utils.isPythonFramework)(framework))builderName="@vercel/python";else if((0,import_build_utils.isNodeBackendFramework)(framework))builderName="@vercel/backends";else if(framework==="go")builderName="@vercel/go";else if(framework==="rust")builderName="@vercel/rust";else return null;let detectEntrypoint=await loadBuilderDetectEntrypoint(builderName,projectRoot);return detectEntrypoint?detectEntrypoint(builderName==="@vercel/python"?{workPath:absWorkPath,framework}:{workPath:absWorkPath}):null}}async function loadBuilderDetectEntrypoint(name,projectRoot){let{importBuilders}=await import("./import-builders-H54QCMQ4.js"),loaded=(await importBuilders(new Set([name]),projectRoot)).get(name);if(!loaded)return;let detect=loaded.builder.detectEntrypoint;return typeof detect=="function"?detect:void 0}function getServicesConfiguration(config){let configuredServices=config?.services??config?.experimentalServicesV2??config?.experimentalServices,configuredServicesType=config?.services?"services":config?.experimentalServicesV2?"experimentalServicesV2":config?.experimentalServices?"experimentalServices":void 0;return{configuredServices,configuredServicesType}}async function loadVercelConfig(cwd){try{let{configPath}=await compileVercelConfig(cwd);if(!configPath)return null;let config=await readJSONFile(configPath);return config instanceof Error?null:config}catch{return null}}function isServicesEnvEnabled(){let value=process.env.VERCEL_USE_EXPERIMENTAL_SERVICES;return value==="1"||value?.toLowerCase()==="true"}async function isExperimentalServicesEnabled(cwd){let{configuredServices}=getServicesConfiguration(await loadVercelConfig(cwd));return isServicesEnvEnabled()||configuredServices!==void 0}async function tryDetectServices(cwd,config){config===void 0&&(config=await loadVercelConfig(cwd));let configuration=getServicesConfiguration(config);if(!isServicesEnvEnabled()&&!configuration.configuredServices)return null;let fs=new import_fs_detectors.LocalFileSystemDetector(cwd),result=await(0,import_service_topology.detectServices)({fs,configuredServices:configuration.configuredServices,configuredServicesType:configuration.configuredServicesType,detectEntrypoint:createDetectEntrypoint(cwd)});return result.errors.some(e=>e.code==="NO_SERVICES_CONFIGURED")?null:result}async function writeServicesConfig(cwd,config){let prepared=await prepareServicesConfigWrite(cwd,config);return await writeFile(prepared.configPath,prepared.content,"utf8"),{configFileName:basename(prepared.configPath)}}async function getServicesConfigWriteBlocker(cwd,config){try{return await prepareServicesConfigWrite(cwd,config),null}catch(error){return getServicesConfigWriteBlockerFromError(error)}}function toProjectServicesConfigPatch(config){let services={};for(let[name,svc]of Object.entries(config)){let buildCommand=svc.preDeployCommand&&svc.buildCommand?`${svc.buildCommand} && ${svc.preDeployCommand}`:svc.preDeployCommand||svc.buildCommand;services[name]={root:svc.root,...svc.framework?{framework:svc.framework}:{},...svc.entrypoint?{entrypoint:svc.entrypoint}:{},...buildCommand?{buildCommand}:{}}}let rewrites=(0,import_service_topology.generateServiceRewrites)(config);return{services,...rewrites.length>0?{rewrites}:{}}}async function prepareServicesConfigWrite(cwd,config){let compileResult=await compileVercelConfig(cwd),configPath=join2(cwd,"vercel.json");if(compileResult.sourceFile==="vercel.toml")return prepareTomlServicesConfigWrite(join2(cwd,"vercel.toml"),config);if(compileResult.wasCompiled)throw new Error(`Cannot automatically update ${compileResult.sourceFile??"the current Vercel config"}.`);let existingConfig={};if(compileResult.configPath&&basename(compileResult.configPath)==="vercel.json"){let result=await readJSONFile(configPath);if(result instanceof CantParseJSONFile)throw result;existingConfig=result??{}}let patch=toProjectServicesConfigPatch(config),nextConfig={...existingConfig,...patch,...patch.rewrites?{rewrites:[...existingConfig.rewrites??[],...patch.rewrites]}:{}},validationError=validateConfig(nextConfig);if(validationError)throw validationError;return{configPath,content:JSON.stringify(nextConfig,null,2)+`
|
|
8
8
|
`}}async function prepareTomlServicesConfigWrite(configPath,config){let patch=toProjectServicesConfigPatch(config),patchKeys=Object.keys(patch),existingContent;try{existingContent=await readFile(configPath,"utf8")}catch{existingContent=""}if(existingContent.trim()){let existingParsed=parse(existingContent),overlapping=patchKeys.filter(key=>key in existingParsed);if(overlapping.length>0){let plural=overlapping.length>1,keyList=overlapping.map(k=>`"${k}"`).join(", ");throw new Error(`Cannot automatically update vercel.toml: key${plural?"s":""} ${keyList} already exist${plural?"":"s"}.`)}}let patchToml=stringify(patch),content=existingContent.trim()?existingContent.trimEnd()+`
|
|
9
9
|
|
|
10
10
|
`+patchToml+`
|