@vercel/cli-support 68.0.0 → 68.1.0-snapshot-f8c293166d1f
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-RH3RQPGP.js → add-56T4ON6W.js} +1 -1
- package/dist/chunks/{add-4ZXS4RRN.js → add-CDHMIDYR.js} +1 -1
- package/dist/chunks/{add-G2LGF4HL.js → add-JC2KSFHX.js} +1 -1
- package/dist/chunks/{alerts-3352VWDL.js → alerts-TMFON3SU.js} +1 -1
- package/dist/chunks/{api-endpoints-2IYXPLEG.js → api-endpoints-EY2DO75S.js} +1 -1
- package/dist/chunks/auth-4A5CXZOA.js +7 -0
- package/dist/chunks/auth-ZJV6OHMS.js +7 -0
- package/dist/chunks/{build-3UFKTTS5.js → build-ALEGEJFV.js} +1 -1
- package/dist/chunks/{chunk-JDDPCL3K.js → chunk-245QYIHU.js} +1 -1
- package/dist/chunks/{chunk-SGNDE4YS.js → chunk-2ACABADL.js} +1 -1
- package/dist/chunks/{chunk-D6REP5QQ.js → chunk-2GXP676X.js} +1 -1
- package/dist/chunks/{chunk-MXTC4ZAQ.js → chunk-2ILZM77F.js} +1 -1
- package/dist/chunks/{chunk-OFDTADPQ.js → chunk-2K7U64CN.js} +1 -1
- package/dist/chunks/{chunk-DTCQWGHE.js → chunk-2KJIWBJQ.js} +2 -2
- package/dist/chunks/{chunk-T4DOV5S4.js → chunk-2V5IP6A5.js} +1 -1
- package/dist/chunks/{chunk-L46V6VL3.js → chunk-37SWAKIV.js} +1 -1
- package/dist/chunks/{chunk-ZXSZH7N5.js → chunk-3GKXXGSO.js} +1 -1
- package/dist/chunks/{chunk-QSL6AG2B.js → chunk-3HP6FOOL.js} +1 -1
- package/dist/chunks/{chunk-M32HBBPK.js → chunk-3WXQHKSS.js} +1 -1
- package/dist/chunks/{chunk-JELLVPCM.js → chunk-3XMKTJ5T.js} +1 -1
- package/dist/chunks/{chunk-KLBSCTLL.js → chunk-3YD5WA5R.js} +1 -1
- package/dist/chunks/{chunk-KIDGOY4F.js → chunk-3YNMC7FF.js} +1 -1
- package/dist/chunks/{chunk-YLXXGQQQ.js → chunk-42D3CPWB.js} +1 -1
- package/dist/chunks/{chunk-HRR57QNP.js → chunk-46R47IE5.js} +1 -1
- package/dist/chunks/{chunk-ZRFDZO7Y.js → chunk-4D4IP557.js} +1 -1
- package/dist/chunks/{chunk-OOPF73RV.js → chunk-4FPYV37P.js} +1 -1
- package/dist/chunks/{chunk-HR4ID3MU.js → chunk-4HNNFJLO.js} +1 -1
- package/dist/chunks/{chunk-5WYJSLCF.js → chunk-4HYZZASG.js} +1 -1
- package/dist/chunks/{chunk-AMZ7AUYX.js → chunk-4JPDCF2O.js} +1 -1
- package/dist/chunks/{chunk-CAJ2OUSR.js → chunk-4L7AKIX7.js} +1 -1
- package/dist/chunks/chunk-4SI66IFC.js +7 -0
- package/dist/chunks/{chunk-MCYG7CCE.js → chunk-4SIQE2W4.js} +1 -1
- package/dist/chunks/chunk-4WEKKDOL.js +8 -0
- package/dist/chunks/{chunk-Q6YPC3GK.js → chunk-57H5KQGN.js} +1 -1
- package/dist/chunks/{chunk-NWGBDBZI.js → chunk-5F4RJ32E.js} +1 -1
- package/dist/chunks/{chunk-GXWBL6YV.js → chunk-5KGALAC2.js} +1 -1
- package/dist/chunks/{chunk-KRPY5FHJ.js → chunk-5QC4IKRZ.js} +1 -1
- package/dist/chunks/{chunk-VBANKZWM.js → chunk-5RRSLENO.js} +1 -1
- package/dist/chunks/{chunk-2AMO2VMV.js → chunk-64GNDWWX.js} +1 -1
- package/dist/chunks/{chunk-J24BABG4.js → chunk-6G2AZBW5.js} +1 -1
- package/dist/chunks/{chunk-DY643UZ7.js → chunk-6JBKQ5LR.js} +2 -3
- package/dist/chunks/{chunk-X755TPX6.js → chunk-6O2LDFGJ.js} +1 -1
- package/dist/chunks/chunk-6OOJFAF5.js +20 -0
- package/dist/chunks/{chunk-T44RB754.js → chunk-6SX4TE7Y.js} +1 -1
- package/dist/chunks/{chunk-AW5KOUD7.js → chunk-6SYKGWTJ.js} +1 -1
- package/dist/chunks/chunk-6ZD6IARJ.js +33 -0
- package/dist/chunks/{chunk-O3YZLVC6.js → chunk-72CSJCJX.js} +3 -3
- package/dist/chunks/chunk-75TGTOZQ.js +8 -0
- package/dist/chunks/{chunk-GRRVPFSB.js → chunk-7JQBC2HB.js} +1 -1
- package/dist/chunks/{chunk-Y3V4JYK6.js → chunk-7MBJ4YIK.js} +1 -1
- package/dist/chunks/{chunk-PSOVLGHP.js → chunk-7O3D3XED.js} +1 -1
- package/dist/chunks/{chunk-FXLZM6Q7.js → chunk-7PK2JFEH.js} +1 -1
- package/dist/chunks/chunk-7Q5I3L37.js +68 -0
- package/dist/chunks/{chunk-24SIHFEW.js → chunk-7QHUMMBA.js} +1 -1
- package/dist/chunks/{chunk-4HR3I3ML.js → chunk-7TRHPXCG.js} +1 -1
- package/dist/chunks/{chunk-BLUPZPAS.js → chunk-7Y572CPZ.js} +1 -1
- package/dist/chunks/{chunk-ATSAMHUZ.js → chunk-A3WRF4AB.js} +1 -1
- package/dist/chunks/{chunk-6DBLXAJI.js → chunk-AGFG7WHE.js} +1 -1
- package/dist/chunks/{chunk-YFOBGEOW.js → chunk-AI32LWRL.js} +1 -1
- package/dist/chunks/chunk-AJ3KPZLM.js +18 -0
- package/dist/chunks/{chunk-MYVALJ4D.js → chunk-AJJIPBAG.js} +1 -1
- package/dist/chunks/{chunk-TGIIE2L3.js → chunk-AP2JY545.js} +1 -1
- package/dist/chunks/{chunk-Z73UJVGD.js → chunk-AU54JBLF.js} +1 -1
- package/dist/chunks/{chunk-SQ62IODX.js → chunk-AUCQKYL2.js} +1 -1
- package/dist/chunks/{chunk-ZBOTJT5S.js → chunk-AULX6RDR.js} +1 -1
- package/dist/chunks/{chunk-37P7O3AQ.js → chunk-AWB4IKVC.js} +1 -1
- package/dist/chunks/{chunk-SCV7XEEO.js → chunk-AX6UCTOC.js} +1 -1
- package/dist/chunks/{chunk-MDXG7T7M.js → chunk-B4IOZL3K.js} +1 -1
- package/dist/chunks/{chunk-Y4YBQUQM.js → chunk-B6QW2OXJ.js} +1 -1
- package/dist/chunks/{chunk-YBAGKQXC.js → chunk-BCD4TRQF.js} +1 -1
- package/dist/chunks/{chunk-OQXHBPPS.js → chunk-BCRZI5IM.js} +1 -1
- package/dist/chunks/chunk-BFS4K2RF.js +7 -0
- package/dist/chunks/chunk-BKJ4H6KK.js +8 -0
- package/dist/chunks/{chunk-O3GQG2ML.js → chunk-BLA6V5UN.js} +2 -2
- package/dist/chunks/{chunk-COD3WAUI.js → chunk-BNWEJZAC.js} +1 -1
- package/dist/chunks/{chunk-5MDNVAE6.js → chunk-BVFFSUG3.js} +1 -1
- package/dist/chunks/{chunk-X6JQI64G.js → chunk-C6AOL5RF.js} +1 -1
- package/dist/chunks/{chunk-F7L5SXJM.js → chunk-CDO5IECP.js} +1 -1
- package/dist/chunks/{chunk-XOETL6DB.js → chunk-CHY2NJU4.js} +1 -1
- package/dist/chunks/{chunk-H24KFNPB.js → chunk-CKPY7TAQ.js} +1 -1
- package/dist/chunks/chunk-COOA33HY.js +7 -0
- package/dist/chunks/{chunk-PVASGBEF.js → chunk-CSU46B7Q.js} +1 -1
- package/dist/chunks/{chunk-DDZEKNQR.js → chunk-CX4WJVNY.js} +1 -1
- package/dist/chunks/{chunk-AVCLYJNC.js → chunk-CX6QYE3Y.js} +1 -1
- package/dist/chunks/{chunk-4SAVH3H7.js → chunk-DCFCPAFQ.js} +1 -1
- package/dist/chunks/{chunk-2FUGD6J7.js → chunk-DTEWQLNP.js} +1 -1
- package/dist/chunks/chunk-DXFFWNK4.js +8 -0
- package/dist/chunks/{chunk-F4KY2TOK.js → chunk-EAQLOKZX.js} +1 -1
- package/dist/chunks/{chunk-ZGM4K3B5.js → chunk-ECQW2R5M.js} +1 -1
- package/dist/chunks/{chunk-B4KA3ZH2.js → chunk-EFGZK6OY.js} +1 -1
- package/dist/chunks/{chunk-N3ZNAMGR.js → chunk-EFQCGYZF.js} +1 -1
- package/dist/chunks/{chunk-ID663OJ7.js → chunk-EL65DTVZ.js} +1 -1
- package/dist/chunks/{chunk-PAHYNO73.js → chunk-ELQO7254.js} +1 -1
- package/dist/chunks/{chunk-3G3FQYMW.js → chunk-ERMHTPO4.js} +1 -1
- package/dist/chunks/chunk-EV2VKG2V.js +8 -0
- package/dist/chunks/{chunk-LDDXXDN5.js → chunk-EYCKXHL4.js} +1 -1
- package/dist/chunks/{chunk-5727HGA6.js → chunk-F2VXECRT.js} +1 -1
- package/dist/chunks/{chunk-NMY2YZ6M.js → chunk-F5FBLRH3.js} +1 -1
- package/dist/chunks/{chunk-TU54LHNW.js → chunk-F6BUBFV2.js} +1 -1
- package/dist/chunks/{chunk-VWKA6RKB.js → chunk-FHNHVEOX.js} +1 -1
- package/dist/chunks/{chunk-D3M2JG5C.js → chunk-FIICEEXO.js} +1 -1
- package/dist/chunks/{chunk-QPNTR3PA.js → chunk-FVMRKUWL.js} +1 -1
- package/dist/chunks/{chunk-H3ZSF2P3.js → chunk-FWYKEEQK.js} +1 -1
- package/dist/chunks/{chunk-ZHGKJCQ2.js → chunk-G7RQVFID.js} +5 -5
- package/dist/chunks/chunk-GB77JTTX.js +8 -0
- package/dist/chunks/{chunk-FTNLCQC6.js → chunk-GHZ4YQCI.js} +1 -1
- package/dist/chunks/{chunk-7RABG6HV.js → chunk-GOH7QCG3.js} +1 -1
- package/dist/chunks/{chunk-4NTBYNFR.js → chunk-GOXGA37R.js} +1 -1
- package/dist/chunks/{chunk-23FY4PR3.js → chunk-GTBPHJRJ.js} +1 -1
- package/dist/chunks/{chunk-YTSGFU5T.js → chunk-GUFRGEM5.js} +1 -1
- package/dist/chunks/{chunk-U43WXZBP.js → chunk-H2O53DAZ.js} +1 -1
- package/dist/chunks/chunk-HAM7ZPEC.js +7 -0
- package/dist/chunks/{chunk-4SWS7RKX.js → chunk-HG7NRFC5.js} +1 -1
- package/dist/chunks/{chunk-BTI5TG6Q.js → chunk-HGXM4UBQ.js} +1 -1
- package/dist/chunks/{chunk-PX3V7X3Q.js → chunk-HI5PLVKM.js} +1 -1
- package/dist/chunks/chunk-HIEFNLLO.js +7 -0
- package/dist/chunks/{chunk-NMIB4JYP.js → chunk-HJCMNBDK.js} +1 -1
- package/dist/chunks/{chunk-6WBEU34Y.js → chunk-HLJ2UIG6.js} +1 -1
- package/dist/chunks/{chunk-DH4A4QMD.js → chunk-HMNIFPU2.js} +1 -1
- package/dist/chunks/{chunk-2KXLL3DX.js → chunk-HSQPQ5RV.js} +1 -1
- package/dist/chunks/{chunk-6NC2JFUQ.js → chunk-I254SHTL.js} +1 -1
- package/dist/chunks/{chunk-YN3HZJXW.js → chunk-I3NEZRVW.js} +1 -1
- package/dist/chunks/{chunk-WHEA5VLX.js → chunk-ICPRMAKB.js} +1 -1
- package/dist/chunks/{chunk-OPORM35X.js → chunk-IFMPBA4K.js} +1 -1
- package/dist/chunks/{chunk-MCRKBVZA.js → chunk-IMLHRJ4K.js} +1 -1
- package/dist/chunks/{chunk-KA2KG3SY.js → chunk-IR3E37HD.js} +1 -1
- package/dist/chunks/chunk-IVJEYHF5.js +8 -0
- package/dist/chunks/{chunk-BPUANOGW.js → chunk-IZV6K7RR.js} +1 -1
- package/dist/chunks/{chunk-OZKP3WKT.js → chunk-J4WXRM2Y.js} +1 -1
- package/dist/chunks/chunk-J5MGMWRV.js +9 -0
- package/dist/chunks/{chunk-4FBOQLPZ.js → chunk-J7DIPT7M.js} +1 -1
- package/dist/chunks/{chunk-BOJDM3O7.js → chunk-JCDPMWKO.js} +1 -1
- package/dist/chunks/{chunk-FB37TFVF.js → chunk-JEACGNHI.js} +1 -1
- package/dist/chunks/{chunk-MGKNSTU4.js → chunk-JJNTYM7J.js} +1 -1
- package/dist/chunks/{chunk-76NL3ZRJ.js → chunk-K45TGFUJ.js} +1 -1
- package/dist/chunks/{chunk-LUX4PBJL.js → chunk-K5GE24PG.js} +1 -1
- package/dist/chunks/{chunk-25565AGS.js → chunk-K7YK4PZP.js} +1 -1
- package/dist/chunks/{chunk-D6NVKMRP.js → chunk-KEFF3BL3.js} +1 -1
- package/dist/chunks/{chunk-FBYA6LLM.js → chunk-KHJWQ4WP.js} +1 -1
- package/dist/chunks/{chunk-EHAS6SQB.js → chunk-KMTQYFJF.js} +1 -1
- package/dist/chunks/{chunk-JCHZRW4N.js → chunk-KVZR24QI.js} +1 -1
- package/dist/chunks/{chunk-BRQUZ5NC.js → chunk-L4CSJDG7.js} +1 -1
- package/dist/chunks/{chunk-ISWW3DKF.js → chunk-L6MWUMWZ.js} +1 -1
- package/dist/chunks/{chunk-KKYNEEM7.js → chunk-LKXPJLOP.js} +1 -1
- package/dist/chunks/{chunk-Q7D7RGXM.js → chunk-LLHXL3SV.js} +1 -1
- package/dist/chunks/{chunk-EYRBV6RM.js → chunk-LNRKGW7S.js} +1 -1
- package/dist/chunks/{chunk-BS32OUOC.js → chunk-LPYHYTYI.js} +1 -1
- package/dist/chunks/{chunk-A2RZZQEP.js → chunk-LY3EY2VG.js} +1 -1
- package/dist/chunks/chunk-M2XLLWK7.js +7 -0
- package/dist/chunks/{chunk-7WDSOKOY.js → chunk-MAAJGMXM.js} +1 -1
- package/dist/chunks/{chunk-DWZBL4NK.js → chunk-MAIZY5BV.js} +1 -1
- package/dist/chunks/{chunk-BUBVZ6SQ.js → chunk-MDWUJ7TA.js} +1 -1
- package/dist/chunks/{chunk-YHPPP3SF.js → chunk-MF43WTDT.js} +1 -1
- package/dist/chunks/{chunk-V3YNYCRV.js → chunk-MHVM4VKT.js} +2 -2
- package/dist/chunks/chunk-MJ2HLVVL.js +13 -0
- package/dist/chunks/{chunk-6Z5REGCM.js → chunk-MMMX3KE2.js} +1 -1
- package/dist/chunks/{chunk-ISSNEDG5.js → chunk-MN2F4NPH.js} +1 -1
- package/dist/chunks/{chunk-QFE3RPMA.js → chunk-MTPHHAPR.js} +1 -1
- package/dist/chunks/{slugify-NMMUASYK.js → chunk-N3COHC7T.js} +1 -1
- package/dist/chunks/{chunk-27FVSW45.js → chunk-N7IBUNFY.js} +1 -1
- package/dist/chunks/{chunk-BZENIQ7N.js → chunk-NBPLUP7C.js} +1 -1
- package/dist/chunks/chunk-NE5RTEMC.js +7 -0
- package/dist/chunks/{chunk-CTBSRTJW.js → chunk-NFPO75IP.js} +1 -1
- package/dist/chunks/{chunk-XE4SLG5H.js → chunk-NNPXYFMY.js} +1 -1
- package/dist/chunks/{chunk-D6O5O3CW.js → chunk-NQPQRYHS.js} +1 -1
- package/dist/chunks/{chunk-3SF3ILIT.js → chunk-NUS3WWST.js} +1 -1
- package/dist/chunks/chunk-NVU7XTNI.js +11 -0
- package/dist/chunks/{chunk-ZBZQEDZY.js → chunk-NXFYKZVZ.js} +1 -1
- package/dist/chunks/chunk-NXUDP37D.js +7 -0
- package/dist/chunks/chunk-O7AF7CLE.js +8 -0
- package/dist/chunks/{chunk-MWFHS4HV.js → chunk-O7FAYZU6.js} +1 -1
- package/dist/chunks/{chunk-MDRI27KN.js → chunk-OCX4QZ3X.js} +1 -1
- package/dist/chunks/{chunk-YOKTRWQX.js → chunk-OD4RCBDD.js} +1 -1
- package/dist/chunks/{chunk-OAM5NJCU.js → chunk-OK52DDU5.js} +1 -1
- package/dist/chunks/{chunk-PFD7LETF.js → chunk-OM6NML7C.js} +1 -1
- package/dist/chunks/{chunk-HYAIA5YC.js → chunk-OVIWCH3S.js} +2 -2
- package/dist/chunks/chunk-OVVHONX7.js +8 -0
- package/dist/chunks/{chunk-J5SINMVO.js → chunk-P5IKPNRJ.js} +1 -1
- package/dist/chunks/chunk-PG3WQGEK.js +181 -0
- package/dist/chunks/{chunk-AW33SRYY.js → chunk-PH2MLBQO.js} +1 -1
- package/dist/chunks/{chunk-XHBZITV4.js → chunk-PKECY4JZ.js} +1 -1
- package/dist/chunks/{chunk-DGLE44KA.js → chunk-PKWSWWVW.js} +1 -1
- package/dist/chunks/{chunk-RHFNVIFD.js → chunk-PNN2Y2ZQ.js} +1 -1
- package/dist/chunks/{chunk-5A3DDLQR.js → chunk-PNTKMD3A.js} +1 -1
- package/dist/chunks/{chunk-XC25DYA7.js → chunk-PQQRSUUG.js} +2 -2
- package/dist/chunks/{chunk-BKFRN6C2.js → chunk-PR4NNS3O.js} +1 -1
- package/dist/chunks/{chunk-QHGPFYWQ.js → chunk-PROENC6V.js} +1 -1
- package/dist/chunks/chunk-PW67ZNDU.js +8 -0
- package/dist/chunks/{chunk-Z436ZYLV.js → chunk-Q2FGBONA.js} +1 -1
- package/dist/chunks/{chunk-U5SZQUYO.js → chunk-QCYCLWNG.js} +1 -1
- package/dist/chunks/{chunk-6TEYSBCT.js → chunk-QDSDYOMV.js} +1 -1
- package/dist/chunks/{chunk-S3L2OHPO.js → chunk-QNMWYJQW.js} +1 -1
- package/dist/chunks/{chunk-MMMJO2M3.js → chunk-QOIG2FJP.js} +1 -1
- package/dist/chunks/{chunk-MTZYPCZ7.js → chunk-QRPBDCDH.js} +1 -1
- package/dist/chunks/{chunk-INIZJZ3O.js → chunk-RDTWDVFO.js} +1 -1
- package/dist/chunks/{chunk-GD7AV7BO.js → chunk-RFD7CEL6.js} +1 -1
- package/dist/chunks/{chunk-TSIKSHYG.js → chunk-RIVRPVTH.js} +1 -1
- package/dist/chunks/{chunk-RYSO5U3E.js → chunk-RIXTYUYN.js} +1 -1
- package/dist/chunks/{chunk-7HQZRU25.js → chunk-RRX2AMWY.js} +1 -1
- package/dist/chunks/{chunk-CEA5NDJC.js → chunk-RTIVLPN7.js} +1 -1
- package/dist/chunks/chunk-RWVYBRVF.js +13 -0
- package/dist/chunks/chunk-S4ARHJGW.js +9 -0
- package/dist/chunks/chunk-S7FMMAST.js +7 -0
- package/dist/chunks/{chunk-Q4R34AVE.js → chunk-SHLKM7EZ.js} +1 -1
- package/dist/chunks/chunk-SIWT2MBT.js +8 -0
- package/dist/chunks/{chunk-7SLMNM55.js → chunk-SPPOQ54P.js} +1 -1
- package/dist/chunks/{chunk-BIABM3FB.js → chunk-SSOWIDKG.js} +1 -1
- package/dist/chunks/{chunk-AZVSMIPP.js → chunk-STDRVWDW.js} +1 -1
- package/dist/chunks/{chunk-M2Q2DUHO.js → chunk-SUD5V67L.js} +1 -1
- package/dist/chunks/{chunk-7EJQLVWX.js → chunk-SUT2PTL3.js} +1 -1
- package/dist/chunks/chunk-SWWLPWX7.js +17 -0
- package/dist/chunks/chunk-SX2JJDHM.js +17 -0
- package/dist/chunks/{chunk-3RFQ2NXZ.js → chunk-T4257EDB.js} +1 -1
- package/dist/chunks/{chunk-G24EKATW.js → chunk-T5DQCNBC.js} +1 -1
- package/dist/chunks/chunk-TASNZYJU.js +14 -0
- package/dist/chunks/{chunk-YTSUDTAK.js → chunk-TNNCGRBK.js} +1 -1
- package/dist/chunks/{chunk-D5JQZXL7.js → chunk-TR3M42DX.js} +1 -1
- package/dist/chunks/chunk-TTM4VQ4T.js +7 -0
- package/dist/chunks/{chunk-BYBELFCP.js → chunk-UAPEASRH.js} +1 -1
- package/dist/chunks/{chunk-DXFP22OK.js → chunk-UE6M2VKP.js} +1 -1
- package/dist/chunks/chunk-UGJRAFRA.js +8 -0
- package/dist/chunks/{chunk-3AFEVHHY.js → chunk-UGVOMXYR.js} +1 -1
- package/dist/chunks/{chunk-NB2WLB3J.js → chunk-UJ7YUIEJ.js} +1 -1
- package/dist/chunks/{chunk-7OZ7OKPS.js → chunk-UJINL7VK.js} +1 -1
- package/dist/chunks/{chunk-6KNWKZR4.js → chunk-UVBRWYYJ.js} +1 -1
- package/dist/chunks/{chunk-KNNIA3PS.js → chunk-UXAPG6IX.js} +1 -1
- package/dist/chunks/{chunk-6FEMU5YF.js → chunk-V45KKYNK.js} +1 -1
- package/dist/chunks/{chunk-A6CMQOL7.js → chunk-V7EJ7O6E.js} +1 -1
- package/dist/chunks/chunk-VB6SQWSB.js +9 -0
- package/dist/chunks/{chunk-E5A7E7X6.js → chunk-VBCWRNS4.js} +1 -1
- package/dist/chunks/{chunk-5U2YLD56.js → chunk-VG44VJB5.js} +1 -1
- package/dist/chunks/{chunk-DOOBZO4W.js → chunk-VJM3WCEC.js} +1 -1
- package/dist/chunks/{chunk-BYYNR34Q.js → chunk-VNS4Z72T.js} +1 -1
- package/dist/chunks/{chunk-CTMTO2W4.js → chunk-VQAIH2X5.js} +1 -1
- package/dist/chunks/{chunk-D2JNI6UB.js → chunk-VSDLCOK3.js} +1 -1
- package/dist/chunks/chunk-VUB4NBD4.js +15 -0
- package/dist/chunks/{chunk-KXMFGDO4.js → chunk-VV5TYUAT.js} +1 -1
- package/dist/chunks/chunk-W2YAOE3Z.js +7 -0
- package/dist/chunks/{chunk-JALVF3C2.js → chunk-WMIZ6Y4E.js} +1 -1
- package/dist/chunks/{chunk-R43H4T4L.js → chunk-WPWGH5CA.js} +1 -1
- package/dist/chunks/{chunk-22ZRVWYP.js → chunk-WU22X5RO.js} +2 -2
- package/dist/chunks/{chunk-TLKBGAOL.js → chunk-WWEUGL6W.js} +1 -1
- package/dist/chunks/{chunk-S6TAO4MD.js → chunk-X3A324UF.js} +1 -1
- package/dist/chunks/{chunk-JUAHDOL6.js → chunk-X5YKQ2RJ.js} +1 -1
- package/dist/chunks/{chunk-VJNTVPUV.js → chunk-X5ZBXCCY.js} +1 -1
- package/dist/chunks/{chunk-J3U2QD2L.js → chunk-X72FHJ6W.js} +1 -1
- package/dist/chunks/{chunk-E3AML3VR.js → chunk-XBT7X2Q4.js} +1 -1
- package/dist/chunks/{chunk-CDJ25IKC.js → chunk-XGCCTSBW.js} +1 -1
- package/dist/chunks/chunk-XHXWUAJE.js +32 -0
- package/dist/chunks/{chunk-U4Z2MMOF.js → chunk-XKVKG7CW.js} +1 -1
- package/dist/chunks/{chunk-4F73GVJZ.js → chunk-XO2CZXGA.js} +1 -1
- package/dist/chunks/{chunk-E3WP42P2.js → chunk-XPEWDJV6.js} +1 -1
- package/dist/chunks/{chunk-DNONVY2L.js → chunk-XXPUBGJZ.js} +2 -2
- package/dist/chunks/{chunk-UPDIZCP3.js → chunk-Y2J2ESAE.js} +1 -1
- package/dist/chunks/chunk-Y2KAVMM4.js +10 -0
- package/dist/chunks/{chunk-46ISU3XI.js → chunk-Y3ETQZSK.js} +2 -2
- package/dist/chunks/{chunk-5RMIM4S2.js → chunk-Y7SZI3JV.js} +1 -1
- package/dist/chunks/chunk-YBWLW6SW.js +7 -0
- package/dist/chunks/{chunk-B7IUFV5P.js → chunk-YDCILYRC.js} +1 -1
- package/dist/chunks/{chunk-67GZ5REA.js → chunk-YHZXIBS7.js} +1 -1
- package/dist/chunks/{chunk-5CVEW3HD.js → chunk-YLQCB6XY.js} +1 -1
- package/dist/chunks/{chunk-47E5IB3C.js → chunk-YNNU3GPR.js} +1 -1
- package/dist/chunks/{chunk-IVZNPSHU.js → chunk-YTBNOSND.js} +1 -1
- package/dist/chunks/{chunk-WAOS5OCB.js → chunk-YU33PPKX.js} +1 -1
- package/dist/chunks/{chunk-7JU5RJ3H.js → chunk-ZEBOIM34.js} +1 -1
- package/dist/chunks/{chunk-E7IN2DGU.js → chunk-ZEGUFI44.js} +1 -1
- package/dist/chunks/{chunk-NZ2TFADV.js → chunk-ZOJI7HYA.js} +1 -1
- package/dist/chunks/{clear-GL4SZ2XR.js → clear-FQ4L2ACT.js} +1 -1
- package/dist/chunks/{cli-embedded-NR5F35LW.js → cli-embedded-CZYKFQ6U.js} +2 -2
- package/dist/chunks/cli-truncate-CylqKOGj-WE5OLB6Q.js +7 -0
- package/dist/chunks/commands-Bx-lrmie-KJI5MSFW.js +10 -0
- package/dist/chunks/compile-vercel-config-GUTXMJOP.js +7 -0
- package/dist/chunks/{config-U4GLPYDY.js → config-4KECSIYK.js} +1 -1
- package/dist/chunks/{config-KSQQQMQQ.js → config-EEYAOPDR.js} +1 -1
- package/dist/chunks/config-HiWLfXRQ-G4JC3PIR.js +43 -0
- package/dist/chunks/connect-U3yG4EtI-KWEUMGCU.js +7 -0
- package/dist/chunks/connect-git-provider-MPYSAOTH.js +7 -0
- package/dist/chunks/cp-aFe-HVrK-JGQPCT5R.js +12 -0
- package/dist/chunks/create-ilHWvzSk-MPW7HE43.js +7 -0
- package/dist/chunks/create-project-FMUOSSNP.js +7 -0
- package/dist/chunks/{delete-D2WLQHVB.js → delete-JRMGVHFJ.js} +1 -1
- package/dist/chunks/{delete-O2VWRQC3.js → delete-LP4N4BXX.js} +1 -1
- package/dist/chunks/{describe-N36SISDN.js → describe-5M3XKRMV.js} +1 -1
- package/dist/chunks/detect-projects-DHS2E3N4.js +7 -0
- package/dist/chunks/detect-services-HCUFI3RJ.js +7 -0
- package/dist/chunks/{disable-EHRVY24G.js → disable-ZFDARZAF.js} +1 -1
- package/dist/chunks/{discard-QW5TMTXX.js → discard-PE5SSIDJ.js} +1 -1
- package/dist/chunks/dist-BGUQ47VG.js +7 -0
- package/dist/chunks/{dist-33WTJLVQ.js → dist-E4BMK7BO.js} +1 -1
- package/dist/chunks/{dist-RXYNZPEA.js → dist-S7GEJ656.js} +1 -1
- package/dist/chunks/domain-DGvr_U55-AZYOJW3J.js +8 -0
- package/dist/chunks/drives-Bi-Mnt2z-JAGBYE6W.js +14 -0
- package/dist/chunks/{edit-WM6KJPSI.js → edit-7S67WBSE.js} +1 -1
- package/dist/chunks/{edit-IZR537PS.js → edit-BATH6ETJ.js} +1 -1
- package/dist/chunks/{enable-5Z72O3NI.js → enable-JWLWXAZP.js} +1 -1
- package/dist/chunks/{engine-C8wCzkw--PYVABGU4.js → engine-C8wCzkw--72P7UD6T.js} +1 -1
- package/dist/chunks/{esm-IYH32MTQ.js → esm-B3P7PUFJ.js} +1 -1
- package/dist/chunks/{esm-5GQXHN7C.js → esm-CMSQLK7G.js} +1 -1
- package/dist/chunks/{esm-LEQXRLFV.js → esm-KWMRMP74.js} +1 -1
- package/dist/chunks/{esm-NHCCFW7Z.js → esm-LRBNA4QO.js} +1 -1
- package/dist/chunks/{esm-FJCIOBBV.js → esm-NVIK2MSG.js} +1 -1
- package/dist/chunks/{esm-T655CG6O.js → esm-RAS56M3I.js} +1 -1
- package/dist/chunks/{esm-QQ3MUOW4.js → esm-WU2ZS2IW.js} +1 -1
- package/dist/chunks/{exec-PCSP64LR.js → exec-6WGVP2E2.js} +1 -1
- package/dist/chunks/exec-Bwv4MDyN-SMCC4JHS.js +7 -0
- package/dist/chunks/{export-IWVMWM2H.js → export-DASZMUUD.js} +1 -1
- package/dist/chunks/extend-D9tq9Cot-Z4ORB3B2.js +8 -0
- package/dist/chunks/{fetch-proxy-MOKBS56A.js → fetch-proxy-ZIHXTNFP.js} +1 -1
- package/dist/chunks/fork-DQ6qfKqB-AJCZOGQR.js +9 -0
- package/dist/chunks/future-CNLTCF2D.js +7 -0
- package/dist/chunks/generate-cert-for-deploy-TCH3OY6G.js +7 -0
- package/dist/chunks/groups-B8JVEeKk-J5CCQYWU.js +10 -0
- package/dist/chunks/image-CDRXKTJG.js +7 -0
- package/dist/chunks/import-builders-XI6CYID6.js +7 -0
- package/dist/chunks/{inspect-6Y672OQ3.js → inspect-DSTHAT43.js} +1 -1
- package/dist/chunks/{inspect-SW2I7D6E.js → inspect-FCJC7XCN.js} +1 -1
- package/dist/chunks/{inspect-QT3QEFBW.js → inspect-FODCPYHT.js} +1 -1
- package/dist/chunks/{inspect-6J5DGZZ4.js → inspect-I7NZH44Z.js} +1 -1
- package/dist/chunks/{inspect-ALC2J4BF.js → inspect-JFRSCAAW.js} +1 -1
- package/dist/chunks/{inspect-47FM3OWG.js → inspect-RSSQ5YKF.js} +1 -1
- package/dist/chunks/{list-CXXDI5UV.js → list-7K3LEJXV.js} +1 -1
- package/dist/chunks/{list-BIFH4KO5.js → list-HWDVPR4V.js} +1 -1
- package/dist/chunks/{list-TGDHJKDT.js → list-NT2RHNIB.js} +1 -1
- package/dist/chunks/{list-2CMCXXP4.js → list-QDBAXYKL.js} +1 -1
- package/dist/chunks/list-iqQFvOHx-EWWTMITV.js +7 -0
- package/dist/chunks/log-update-DsqoChS1-DG7F5XJ4.js +11 -0
- package/dist/chunks/login-DGxA9ez--ZRIJ24TS.js +13 -0
- package/dist/chunks/login-RWXYD2CO.js +7 -0
- package/dist/chunks/{login-IUQDG334.js → login-WHXNCPDU.js} +1 -1
- package/dist/chunks/logout-OEbPJLu2-7NPM6ALK.js +8 -0
- package/dist/chunks/logs-RDOQVAER.js +7 -0
- package/dist/chunks/{ls-YTKJRKD3.js → ls-2OYMFZIB.js} +1 -1
- package/dist/chunks/{ls-7D73WVOF.js → ls-2PCKZKR7.js} +1 -1
- package/dist/chunks/{ls-GC5MX2HZ.js → ls-7DUE3OKC.js} +1 -1
- package/dist/chunks/{ls-C75Z5FBX.js → ls-ASWAYYAI.js} +1 -1
- package/dist/chunks/{ls-ERDQLUT2.js → ls-PEFQHSG3.js} +1 -1
- package/dist/chunks/{ls-4DNFF35I.js → ls-UQZB42CA.js} +1 -1
- package/dist/chunks/{ls-IQUZ6GWG.js → ls-XJZFHHWA.js} +1 -1
- package/dist/chunks/migrate-experimental-services-2E5TRQU6.js +7 -0
- package/dist/chunks/{mutate-YJNE2733.js → mutate-QXTPOGVD.js} +1 -1
- package/dist/chunks/{native-self-update-Q3EN6NZK.js → native-self-update-T75AUBHJ.js} +1 -1
- package/dist/chunks/{notifications-2HU4L7WA.js → notifications-F2BUWHH4.js} +1 -1
- package/dist/chunks/{open-MA7QGJKO.js → open-5FUW57NF.js} +1 -1
- package/dist/chunks/{openapi-POBVCXS3.js → openapi-NZLMBOMR.js} +1 -1
- package/dist/chunks/{permissions-AU5M5A6G.js → permissions-ABXSL4I4.js} +1 -1
- package/dist/chunks/{plugin-offer-E53UQXXX.js → plugin-offer-IMTYE365.js} +1 -1
- package/dist/chunks/prompt-missing-credentials-3MKVB7HN.js +7 -0
- package/dist/chunks/{publish-G7NQESCE.js → publish-5AE7VXIO.js} +1 -1
- package/dist/chunks/pull-MGQ2TMA3.js +7 -0
- package/dist/chunks/purchase-domain-if-available-MU5TGXLG.js +7 -0
- package/dist/chunks/{push-BG7UEIKY.js → push-SBTMPRZE.js} +1 -1
- package/dist/chunks/query-5Q6ZV2TP.js +7 -0
- package/dist/chunks/{raw-query-QHFSKN55.js → raw-query-OAYC3OTN.js} +1 -1
- package/dist/chunks/read-BTA5slYO-TGRGDUB5.js +8 -0
- package/dist/chunks/{reauthenticate-U2LOFDFP.js → reauthenticate-PXEYMV7G.js} +1 -1
- package/dist/chunks/remove-CCa99nz9-52C5X3OV.js +7 -0
- package/dist/chunks/{remove-IB7C6LII.js → remove-WSK5OYNV.js} +1 -1
- package/dist/chunks/{reorder-E5UYNMML.js → reorder-DT32UBAI.js} +1 -1
- package/dist/chunks/{reply-DSDFBUAX.js → reply-AMZ3Y3U5.js} +1 -1
- package/dist/chunks/{repo-info-to-url-XQSULSEO.js → repo-info-to-url-S2YOQIRM.js} +1 -1
- package/dist/chunks/{repo-root-DZ6WFHMP.js → repo-root-STNOAHCH.js} +1 -1
- package/dist/chunks/{resolve-VK5QTUII.js → resolve-NPE5HKCT.js} +1 -1
- package/dist/chunks/{resolve-agent-team-D7RFR6WL.js → resolve-agent-team-75WZ2VDR.js} +1 -1
- package/dist/chunks/{resolve-deployment-framework-preset-BLMQLCIN.js → resolve-deployment-framework-preset-SCQCWANF.js} +1 -1
- package/dist/chunks/{restore-IVNZOVU3.js → restore-IZHGW3NV.js} +1 -1
- package/dist/chunks/{rm-LWEITUDD.js → rm-G4U54YJT.js} +1 -1
- package/dist/chunks/{rm-GYS4DS2Z.js → rm-HVDZJXME.js} +1 -1
- package/dist/chunks/{rm-L2KCHMLS.js → rm-ILDCA66K.js} +1 -1
- package/dist/chunks/{rm-PDJE63VV.js → rm-JWMYMOKD.js} +1 -1
- package/dist/chunks/{rm-PAI3WZXJ.js → rm-MBWOLQZJ.js} +1 -1
- package/dist/chunks/routes-GTTTHCOL.js +7 -0
- package/dist/chunks/rule-inspect-KZ7FNV26.js +8 -0
- package/dist/chunks/run-D8obqfKw-VBME5UHC.js +7 -0
- package/dist/chunks/{schema-ZIK2W4AX.js → schema-5FNNQEU5.js} +1 -1
- package/dist/chunks/{schema-ZOPJJLJC.js → schema-SKHPOMD7.js} +1 -1
- package/dist/chunks/select-org-YRCPH5Z5.js +7 -0
- package/dist/chunks/{serving-C1mhZQqH-73TMEGEB.js → serving-C1mhZQqH-XEQUVQZK.js} +1 -1
- package/dist/chunks/sessions-cvWvPgzc-XIYLOGFI.js +7 -0
- package/dist/chunks/{set-MC2CLSA2.js → set-V6QX5AZQ.js} +1 -1
- package/dist/chunks/{set-B5MPNYXG.js → set-WWREM57F.js} +1 -1
- package/dist/chunks/setup-and-link-STBOP67J.js +7 -0
- package/dist/chunks/sh-7olsIyJh-PKP4FF4F.js +7 -0
- package/dist/chunks/{skills-X5MN3OH2.js → skills-5TXXGKN5.js} +1 -1
- package/dist/chunks/slugify-OEOEYGDL.js +7 -0
- package/dist/chunks/snapshot-D9MAspub-SROFKNVE.js +9 -0
- package/dist/chunks/snapshots-DQjvm6St-4DTYO2IQ.js +9 -0
- package/dist/chunks/stamp-THWCZ5IQ.js +7 -0
- package/dist/chunks/{statuspage-K5SC7KAQ.js → statuspage-NCYXH7DR.js} +1 -1
- package/dist/chunks/stop-SQX-uC-Q-MCMKSJVQ.js +10 -0
- package/dist/chunks/table-3DCL552W.js +7 -0
- package/dist/chunks/{tags-WRVKKRN7.js → tags-SVOY7QEN.js} +1 -1
- package/dist/chunks/telemetry-KLbte3YE-OAFHJTWE.js +13 -0
- package/dist/chunks/token-DGNBXqnR-37H4S563.js +7 -0
- package/dist/chunks/token-EYEJQ7AP.js +7 -0
- package/dist/chunks/token-LNLX4V5J.js +7 -0
- package/dist/chunks/token-MZBD3R2S.js +7 -0
- package/dist/chunks/token-util-4P4GUSTT.js +7 -0
- package/dist/chunks/token-util-DAhLJ1X4-NJBLJROT.js +7 -0
- package/dist/chunks/token-util-XC5K3DNT.js +7 -0
- package/dist/chunks/token-util-XO4H5VLL.js +7 -0
- package/dist/chunks/{types-PC3JIYPX.js → types-NX7G6YBW.js} +1 -1
- package/dist/chunks/{update-QDIZFM4T.js → update-AVWVPYK5.js} +1 -1
- package/dist/chunks/{update-route-version-KWK5S4UW.js → update-route-version-MKFTZPKQ.js} +1 -1
- package/dist/chunks/{usage-JUP36KHN.js → usage-RUCM3AMF.js} +1 -1
- package/dist/chunks/users-CGEsQ4G8-BEKXN56N.js +9 -0
- package/dist/chunks/{utils-IQZEE4DT.js → utils-XXR7KIRB.js} +1 -1
- package/dist/chunks/validate-config-MJQI5EMD.js +7 -0
- package/dist/chunks/{vercel-cli-3UQLDU2S.js → vercel-cli-RW4WHHOS.js} +1 -1
- package/dist/chunks/{vlt-builder-graph-XL2XRO4V.js → vlt-builder-graph-EU5EX7KY.js} +1 -1
- package/dist/chunks/{vlt-builder-importer-RBUPAB6J.js → vlt-builder-importer-2YSRGPFC.js} +1 -1
- package/dist/chunks/wrap-ansi-CaN_P_HT-MAPHF26X.js +7 -0
- package/dist/chunks/write-DixEhGqz-D34NI34B.js +10 -0
- package/dist/chunks/{zod-Y3ZBY67C.js → zod-H7KW2D5Z.js} +1 -1
- package/dist/commands/build/index.js +1 -1
- package/dist/commands/deploy/index.js +11 -11
- package/dist/commands/dev/index.js +5 -9
- package/dist/commands/env/index.js +1 -1
- package/dist/commands/link/index.js +1 -1
- package/dist/commands/list/index.js +1 -1
- package/dist/commands/project/index.js +102 -80
- package/dist/commands/tunnel/index.js +1 -1
- package/dist/commands-account.js +5 -5
- package/dist/commands-ai.js +6 -6
- package/dist/commands-blob.js +3 -3
- package/dist/commands-core.js +9 -9
- package/dist/commands-deployments.js +1 -1
- package/dist/commands-flags.js +1 -1
- package/dist/commands-integrations.js +11 -11
- package/dist/commands-observability.js +2 -2
- package/dist/commands-routing.js +9 -9
- package/dist/help.js +1 -1
- package/dist/index.js +5 -5
- package/dist/internal-build-worker.js +1 -1
- package/dist/internal-build.js +2 -2
- package/dist/package.json +8 -8
- package/dist/version.mjs +1 -1
- package/package.json +16 -16
- package/dist/chunks/chunk-3ARTWVQV.js +0 -11
- package/dist/chunks/chunk-6UJIJLQC.js +0 -13
- package/dist/chunks/chunk-EMTZZXMH.js +0 -13
- package/dist/chunks/chunk-XKPB27SC.js +0 -8
- package/dist/chunks/chunk-Z3XKNZDP.js +0 -9
- package/dist/chunks/compile-vercel-config-HMKEDWC4.js +0 -7
- package/dist/chunks/connect-git-provider-WGKVFXW2.js +0 -7
- package/dist/chunks/create-project-BTOHPKZB.js +0 -7
- package/dist/chunks/detect-projects-I7NEHWSM.js +0 -7
- package/dist/chunks/detect-services-4ONC2DH3.js +0 -7
- package/dist/chunks/future-3AUPMPY7.js +0 -7
- package/dist/chunks/generate-cert-for-deploy-OZWVIWOO.js +0 -7
- package/dist/chunks/image-EFBQXTAP.js +0 -7
- package/dist/chunks/import-builders-2G4KVI4T.js +0 -7
- package/dist/chunks/login-WYDX5KZN.js +0 -7
- package/dist/chunks/logs-E3RZLAT2.js +0 -7
- package/dist/chunks/migrate-experimental-services-GPGYPN66.js +0 -7
- package/dist/chunks/prompt-missing-credentials-7F7MUAWK.js +0 -7
- package/dist/chunks/pull-4LISUHDN.js +0 -7
- package/dist/chunks/purchase-domain-if-available-QH2OHRLZ.js +0 -7
- package/dist/chunks/query-QCIU5IB4.js +0 -7
- package/dist/chunks/routes-SBMN6SDF.js +0 -7
- package/dist/chunks/rule-inspect-LQISNCBT.js +0 -8
- package/dist/chunks/select-org-EKDOS2CQ.js +0 -7
- package/dist/chunks/setup-and-link-FHHZAU65.js +0 -7
- package/dist/chunks/stamp-TKONNIJ5.js +0 -7
- package/dist/chunks/table-SCLK33K7.js +0 -7
- package/dist/chunks/token-MYYNOUIT.js +0 -7
- package/dist/chunks/token-util-OJHS52JP.js +0 -7
- package/dist/chunks/validate-config-K42CVRCZ.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{packageName}from"./chunk-
|
|
7
|
+
import{packageName}from"./chunk-EFGZK6OY.js";import{formatOption,jsonOption,sinceOption,untilOption}from"./chunk-DORCX7UB.js";var organizationOption={name:"organization",shorthand:null,type:String,argument:"ORGANIZATION",deprecated:!1,description:"Show usage for the whole organization, by organization slug or ID, from any team"},usageCommand={name:"usage",aliases:[],summary:"Show billing usage and costs",description:"Show billing usage and costs for the current billing cycle or a custom date range",arguments:[],options:[{...sinceOption,description:"Start time: YYYY-MM-DD (midnight LA time), ISO 8601, or relative, like 7d (default: start of the current billing cycle)"},{...untilOption,description:"End time: YYYY-MM-DD (end of day LA time), ISO 8601, or relative; requires --since (default: now)"},{name:"from",shorthand:null,type:String,deprecated:!0},{name:"to",shorthand:null,type:String,deprecated:!0},{name:"breakdown",shorthand:null,type:String,argument:"PERIOD",description:"Show usage breakdown by time period instead of aggregated totals (daily, weekly, monthly)",deprecated:!1},{name:"group-by",shorthand:null,type:String,argument:"DIMENSION",description:"Group usage by a dimension instead of aggregated totals (project, region, team)",deprecated:!1},organizationOption,formatOption,jsonOption],examples:[{name:"Show usage for the current billing period",value:`${packageName} billing usage`},{name:"Show usage for a custom date range",value:`${packageName} billing usage --since 2025-01-01 --until 2025-01-31`},{name:"Show usage for the last 7 days",value:`${packageName} billing usage --since 7d`},{name:"Show daily usage breakdown",value:`${packageName} billing usage --breakdown daily`},{name:"Show weekly usage breakdown",value:`${packageName} billing usage --breakdown weekly`},{name:"Show usage grouped by project",value:`${packageName} billing usage --group-by project`},{name:"Show usage grouped by region",value:`${packageName} billing usage --group-by region`},{name:"Show usage for the whole organization",value:`${packageName} billing usage --organization acme`},{name:"Show organization usage grouped by team",value:`${packageName} billing usage --organization acme --group-by team`},{name:"Output usage data as JSON",value:`${packageName} billing usage --json`}]};export{usageCommand};
|
|
@@ -0,0 +1,32 @@
|
|
|
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{c,m}from"./chunk-YBWLW6SW.js";var n=c((t,n2)=>{var r2=Object.defineProperty,i2=Object.getOwnPropertyDescriptor,a2=Object.getOwnPropertyNames,o2=Object.prototype.hasOwnProperty,s2=(e,t2)=>{for(var n3 in t2)r2(e,n3,{get:t2[n3],enumerable:!0})},c3=(e,t2,n3,s3)=>{if(t2&&typeof t2=="object"||typeof t2=="function")for(let c4 of a2(t2))!o2.call(e,c4)&&c4!==n3&&r2(e,c4,{get:()=>t2[c4],enumerable:!(s3=i2(t2,c4))||s3.enumerable});return e},l2=e=>c3(r2({},"__esModule",{value:!0}),e),u2={};s2(u2,{VercelCliError:()=>f2,assertValidCwd:()=>m3,getCliNotFoundMessage:()=>p2,toVercelCliError:()=>h2}),n2.exports=l2(u2);var d2=m("node:fs/promises"),f2=class extends Error{constructor(e){super(e.message),this.name="VercelCliError",this.code=e.code,this.invocation=e.invocation,this.stdout=e.stdout,this.stderr=e.stderr,this.exitCode=e.exitCode,e.cause!==void 0&&(this.cause=e.cause)}};function p2(e){let t2=[],{localBinSearch:n3}=e;n3.stopReason==="project-root-marker"?t2.push(`Local bin lookup stopped at ${JSON.stringify(n3.stoppedAt)} (${JSON.stringify(n3.markerPath)}).`):n3.stopReason==="filesystem-root"&&t2.push(`No project root marker was found from ${JSON.stringify(n3.searchRoot)}; local bin lookup reached the filesystem root.`);for(let e2 of n3.skippedNodeModules)t2.push(`Skipped ${JSON.stringify(e2.directory)}: ${e2.reason}.`);for(let n4 of e.skippedLocalBins)t2.push(`Skipped ${JSON.stringify(n4.candidate)}: ${n4.reason}.`);return t2.length===0?"Unable to find a usable Vercel CLI installation.":["Unable to find a usable Vercel CLI installation.",...t2].join(`
|
|
8
|
+
`)}async function m3(e){try{if(!(await(0,d2.stat)(e)).isDirectory())throw Error("not a directory")}catch{throw new f2({code:"VERCEL_CLI_INVALID_CWD",message:`Working directory ${JSON.stringify(e)} does not exist or is not a directory.`})}}function h2(e,t2){if(typeof t2=="object"&&t2){let n3=t2;if(n3.code==="ENOENT")return new f2({code:"VERCEL_CLI_NOT_FOUND",message:`Unable to find Vercel CLI command ${JSON.stringify(e.command)}.`,invocation:e,cause:t2});if(n3.code==="EACCES"||n3.code==="EPERM")return new f2({code:"VERCEL_CLI_PERMISSION_DENIED",message:`Permission denied while executing Vercel CLI command ${JSON.stringify(e.command)}.`,invocation:e,cause:t2});if(n3.timedOut)return new f2({code:"VERCEL_CLI_TIMED_OUT",message:`Timed out while executing Vercel CLI command ${JSON.stringify(e.command)}.`,invocation:e,stdout:n3.stdout,stderr:n3.stderr,cause:t2});if(n3.isCanceled)return new f2({code:"VERCEL_CLI_CANCELED",message:`Canceled while executing Vercel CLI command ${JSON.stringify(e.command)}.`,invocation:e,stdout:n3.stdout,stderr:n3.stderr,cause:t2});if(n3.signal)return new f2({code:"VERCEL_CLI_SIGNALED",message:`Vercel CLI command ${JSON.stringify(e.command)} exited due to signal ${n3.signal}.`,invocation:e,stdout:n3.stdout,stderr:n3.stderr,cause:t2});if(typeof n3.exitCode=="number")return new f2({code:"VERCEL_CLI_ERRORED",message:n3.shortMessage??n3.message??`Vercel CLI command ${JSON.stringify(e.command)} exited with code ${n3.exitCode}.`,invocation:e,stdout:n3.stdout,stderr:n3.stderr,exitCode:n3.exitCode,cause:t2})}return new f2({code:"VERCEL_CLI_EXEC_FAILED",message:`Could not execute Vercel CLI command ${JSON.stringify(e.command)}.`,invocation:e,cause:t2})}}),r=c((t,n2)=>{n2.exports=o2,o2.sync=s2;var r2=m("fs");function i2(e,t2){var n3=t2.pathExt===void 0?process.env.PATHEXT:t2.pathExt;if(!n3||(n3=n3.split(";"),n3.indexOf("")!==-1))return!0;for(var r3=0;r3<n3.length;r3++){var i3=n3[r3].toLowerCase();if(i3&&e.substr(-i3.length).toLowerCase()===i3)return!0}return!1}function a2(e,t2,n3){return!e.isSymbolicLink()&&!e.isFile()?!1:i2(t2,n3)}function o2(e,t2,n3){r2.stat(e,function(r3,i3){n3(r3,r3?!1:a2(i3,e,t2))})}function s2(e,t2){return a2(r2.statSync(e),e,t2)}}),i=c((t,n2)=>{n2.exports=i2,i2.sync=a2;var r2=m("fs");function i2(e,t2,n3){r2.stat(e,function(e2,r3){n3(e2,e2?!1:o2(r3,t2))})}function a2(e,t2){return o2(r2.statSync(e),t2)}function o2(e,t2){return e.isFile()&&s2(e,t2)}function s2(e,t2){var n3=e.mode,r3=e.uid,i3=e.gid,a3=t2.uid===void 0?process.getuid&&process.getuid():t2.uid,o3=t2.gid===void 0?process.getgid&&process.getgid():t2.gid,s3=64,c3=8,l2=1,u2=s3|c3;return n3&l2||n3&c3&&i3===o3||n3&s3&&r3===a3||n3&u2&&a3===0}}),a=c((t,n2)=>{m("fs");var a2=process.platform==="win32"||global.TESTING_WINDOWS?r():i();n2.exports=o2,o2.sync=s2;function o2(e,t2,n3){if(typeof t2=="function"&&(n3=t2,t2={}),!n3){if(typeof Promise!="function")throw TypeError("callback not provided");return new Promise(function(n4,r2){o2(e,t2||{},function(e2,t3){e2?r2(e2):n4(t3)})})}a2(e,t2||{},function(e2,r2){e2&&(e2.code==="EACCES"||t2&&t2.ignoreErrors)&&(e2=null,r2=!1),n3(e2,r2)})}function s2(e,t2){try{return a2.sync(e,t2||{})}catch(e2){if(t2&&t2.ignoreErrors||e2.code==="EACCES")return!1;throw e2}}}),o=c((t,n2)=>{let r2=process.platform==="win32"||process.env.OSTYPE==="cygwin"||process.env.OSTYPE==="msys",i2=m("path"),o2=r2?";":":",s2=a(),c3=e=>Object.assign(Error(`not found: ${e}`),{code:"ENOENT"}),l2=(e,t2)=>{let n3=t2.colon||o2,i3=e.match(/\//)||r2&&e.match(/\\/)?[""]:[...r2?[process.cwd()]:[],...(t2.path||process.env.PATH||"").split(n3)],a2=r2?t2.pathExt||process.env.PATHEXT||".EXE;.CMD;.BAT;.COM":"",s3=r2?a2.split(n3):[""];return r2&&e.indexOf(".")!==-1&&s3[0]!==""&&s3.unshift(""),{pathEnv:i3,pathExt:s3,pathExtExe:a2}},u2=(e,t2,n3)=>{typeof t2=="function"&&(n3=t2,t2={}),t2||(t2={});let{pathEnv:r3,pathExt:a2,pathExtExe:o3}=l2(e,t2),u3=[],d2=n4=>new Promise((a3,o4)=>{if(n4===r3.length)return t2.all&&u3.length?a3(u3):o4(c3(e));let s3=r3[n4],l3=/^".*"$/.test(s3)?s3.slice(1,-1):s3,d3=i2.join(l3,e);a3(f2(!l3&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d3:d3,n4,0))}),f2=(e2,n4,r4)=>new Promise((i3,c4)=>{if(r4===a2.length)return i3(d2(n4+1));let l3=a2[r4];s2(e2+l3,{pathExt:o3},(a3,o4)=>{if(!a3&&o4)if(t2.all)u3.push(e2+l3);else return i3(e2+l3);return i3(f2(e2,n4,r4+1))})});return n3?d2(0).then(e2=>n3(null,e2),n3):d2(0)};n2.exports=u2,u2.sync=(e,t2)=>{t2=t2||{};let{pathEnv:n3,pathExt:r3,pathExtExe:a2}=l2(e,t2),o3=[];for(let c4=0;c4<n3.length;c4++){let l3=n3[c4],u3=/^".*"$/.test(l3)?l3.slice(1,-1):l3,d2=i2.join(u3,e),f2=!u3&&/^\.[\\\/]/.test(e)?e.slice(0,2)+d2:d2;for(let e2=0;e2<r3.length;e2++){let n4=f2+r3[e2];try{if(s2.sync(n4,{pathExt:a2}))if(t2.all)o3.push(n4);else return n4}catch{}}}if(t2.all&&o3.length)return o3;if(t2.nothrow)return null;throw c3(e)}}),s=c((e,t)=>{let n2=(e2={})=>{let t2=e2.env||process.env;return(e2.platform||process.platform)==="win32"?Object.keys(t2).reverse().find(e3=>e3.toUpperCase()==="PATH")||"Path":"PATH"};t.exports=n2,t.exports.default=n2}),c2=c((t,n2)=>{let r2=m("path"),i2=o(),a2=s();function c3(e,t2){let n3=e.options.env||process.env,o2=process.cwd(),s2=e.options.cwd!=null,c4=s2&&process.chdir!==void 0&&!process.chdir.disabled;if(c4)try{process.chdir(e.options.cwd)}catch{}let l3;try{l3=i2.sync(e.command,{path:n3[a2({env:n3})],pathExt:t2?r2.delimiter:void 0})}catch{}finally{c4&&process.chdir(o2)}return l3&&(l3=r2.resolve(s2?e.options.cwd:"",l3)),l3}function l2(e){return c3(e)||c3(e,!0)}n2.exports=l2}),l=c((e,t)=>{let n2=/([()\][%!^"`<>&|;, *?])/g;function r2(e2){return e2=e2.replace(n2,"^$1"),e2}function i2(e2,t2){return e2=`${e2}`,e2=e2.replace(/(?=(\\+?)?)\1"/g,'$1$1\\"'),e2=e2.replace(/(?=(\\+?)?)\1$/,"$1$1"),e2=`"${e2}"`,e2=e2.replace(n2,"^$1"),t2&&(e2=e2.replace(n2,"^$1")),e2}t.exports.command=r2,t.exports.argument=i2}),u=c((e,t)=>{t.exports=/^#!(.*)/}),d=c((e,t)=>{let n2=u();t.exports=(e2="")=>{let t2=e2.match(n2);if(!t2)return null;let[r2,i2]=t2[0].replace(/#! ?/,"").split(" "),a2=r2.split("/").pop();return a2==="env"?i2:i2?`${a2} ${i2}`:a2}}),f=c((t,n2)=>{let r2=m("fs"),i2=d();function a2(e){let t2=Buffer.alloc(150),n3;try{n3=r2.openSync(e,"r"),r2.readSync(n3,t2,0,150,0),r2.closeSync(n3)}catch{}return i2(t2.toString())}n2.exports=a2}),p=c((t,n2)=>{let r2=m("path"),i2=c2(),a2=l(),o2=f(),s2=process.platform==="win32",u2=/\.(?:com|exe)$/i,d2=/node_modules[\\/].bin[\\/][^\\/]+\.cmd$/i;function p2(e){e.file=i2(e);let t2=e.file&&o2(e.file);return t2?(e.args.unshift(e.file),e.command=t2,i2(e)):e.file}function m3(e){if(!s2)return e;let t2=p2(e),n3=!u2.test(t2);if(e.options.forceShell||n3){let n4=d2.test(t2);e.command=r2.normalize(e.command),e.command=a2.command(e.command),e.args=e.args.map(e2=>a2.argument(e2,n4)),e.args=["/d","/s","/c",`"${[e.command].concat(e.args).join(" ")}"`],e.command=process.env.comspec||"cmd.exe",e.options.windowsVerbatimArguments=!0}return e}function h2(e,t2,n3){t2&&!Array.isArray(t2)&&(n3=t2,t2=null),t2=t2?t2.slice(0):[],n3=Object.assign({},n3);let r3={command:e,args:t2,options:n3,file:void 0,original:{command:e,args:t2}};return n3.shell?r3:m3(r3)}n2.exports=h2}),m2=c((e,t)=>{let n2=process.platform==="win32";function r2(e2,t2){return Object.assign(Error(`${t2} ${e2.command} ENOENT`),{code:"ENOENT",errno:"ENOENT",syscall:`${t2} ${e2.command}`,path:e2.command,spawnargs:e2.args})}function i2(e2,t2){if(!n2)return;let r3=e2.emit;e2.emit=function(n3,i3){if(n3==="exit"){let n4=a2(i3,t2);if(n4)return r3.call(e2,"error",n4)}return r3.apply(e2,arguments)}}function a2(e2,t2){return n2&&e2===1&&!t2.file?r2(t2.original,"spawn"):null}function o2(e2,t2){return n2&&e2===1&&!t2.file?r2(t2.original,"spawnSync"):null}t.exports={hookChildProcess:i2,verifyENOENT:a2,verifyENOENTSync:o2,notFoundError:r2}}),h=c((t,n2)=>{let r2=m("child_process"),i2=p(),a2=m2();function o2(e,t2,n3){let o3=i2(e,t2,n3),s3=r2.spawn(o3.command,o3.args,o3.options);return a2.hookChildProcess(s3,o3),s3}function s2(e,t2,n3){let o3=i2(e,t2,n3),s3=r2.spawnSync(o3.command,o3.args,o3.options);return s3.error=s3.error||a2.verifyENOENTSync(s3.status,o3),s3}n2.exports=o2,n2.exports.spawn=o2,n2.exports.sync=s2,n2.exports._parse=i2,n2.exports._enoent=a2}),g=c((e,t)=>{t.exports=e2=>{let t2=typeof e2=="string"?`
|
|
9
|
+
`:10,n2=typeof e2=="string"?"\r":13;return e2[e2.length-1]===t2&&(e2=e2.slice(0,e2.length-1)),e2[e2.length-1]===n2&&(e2=e2.slice(0,e2.length-1)),e2}}),_=c((t,n2)=>{let r2=m("path"),i2=s(),a2=e=>{e={cwd:process.cwd(),path:process.env[i2()],execPath:process.execPath,...e};let t2,n3=r2.resolve(e.cwd),a3=[];for(;t2!==n3;)a3.push(r2.join(n3,"node_modules/.bin")),t2=n3,n3=r2.resolve(n3,"..");let o2=r2.resolve(e.cwd,e.execPath,"..");return a3.push(o2),a3.concat(e.path).join(r2.delimiter)};n2.exports=a2,n2.exports.default=a2,n2.exports.env=e=>{e={env:process.env,...e};let t2={...e.env},r3=i2({env:t2});return e.path=t2[r3],t2[r3]=n2.exports(e),t2}}),v=c((e,t)=>{let n2=(e2,t2)=>{for(let n3 of Reflect.ownKeys(t2))Object.defineProperty(e2,n3,Object.getOwnPropertyDescriptor(t2,n3));return e2};t.exports=n2,t.exports.default=n2}),y=c((e,t)=>{let n2=v(),r2=new WeakMap,i2=(e2,t2={})=>{if(typeof e2!="function")throw TypeError("Expected a function");let i3,a2=0,o2=e2.displayName||e2.name||"<anonymous>",s2=function(...n3){if(r2.set(s2,++a2),a2===1)i3=e2.apply(this,n3),e2=null;else if(t2.throw===!0)throw Error(`Function \`${o2}\` can only be called once`);return i3};return n2(s2,e2),r2.set(s2,a2),s2};t.exports=i2,t.exports.default=i2,t.exports.callCount=e2=>{if(!r2.has(e2))throw Error(`The given function \`${e2.name}\` is not wrapped by the \`onetime\` package`);return r2.get(e2)}}),b=c(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SIGNALS=void 0,e.SIGNALS=[{name:"SIGHUP",number:1,action:"terminate",description:"Terminal closed",standard:"posix"},{name:"SIGINT",number:2,action:"terminate",description:"User interruption with CTRL-C",standard:"ansi"},{name:"SIGQUIT",number:3,action:"core",description:"User interruption with CTRL-\\",standard:"posix"},{name:"SIGILL",number:4,action:"core",description:"Invalid machine instruction",standard:"ansi"},{name:"SIGTRAP",number:5,action:"core",description:"Debugger breakpoint",standard:"posix"},{name:"SIGABRT",number:6,action:"core",description:"Aborted",standard:"ansi"},{name:"SIGIOT",number:6,action:"core",description:"Aborted",standard:"bsd"},{name:"SIGBUS",number:7,action:"core",description:"Bus error due to misaligned, non-existing address or paging error",standard:"bsd"},{name:"SIGEMT",number:7,action:"terminate",description:"Command should be emulated but is not implemented",standard:"other"},{name:"SIGFPE",number:8,action:"core",description:"Floating point arithmetic error",standard:"ansi"},{name:"SIGKILL",number:9,action:"terminate",description:"Forced termination",standard:"posix",forced:!0},{name:"SIGUSR1",number:10,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGSEGV",number:11,action:"core",description:"Segmentation fault",standard:"ansi"},{name:"SIGUSR2",number:12,action:"terminate",description:"Application-specific signal",standard:"posix"},{name:"SIGPIPE",number:13,action:"terminate",description:"Broken pipe or socket",standard:"posix"},{name:"SIGALRM",number:14,action:"terminate",description:"Timeout or timer",standard:"posix"},{name:"SIGTERM",number:15,action:"terminate",description:"Termination",standard:"ansi"},{name:"SIGSTKFLT",number:16,action:"terminate",description:"Stack is empty or overflowed",standard:"other"},{name:"SIGCHLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"posix"},{name:"SIGCLD",number:17,action:"ignore",description:"Child process terminated, paused or unpaused",standard:"other"},{name:"SIGCONT",number:18,action:"unpause",description:"Unpaused",standard:"posix",forced:!0},{name:"SIGSTOP",number:19,action:"pause",description:"Paused",standard:"posix",forced:!0},{name:"SIGTSTP",number:20,action:"pause",description:'Paused using CTRL-Z or "suspend"',standard:"posix"},{name:"SIGTTIN",number:21,action:"pause",description:"Background process cannot read terminal input",standard:"posix"},{name:"SIGBREAK",number:21,action:"terminate",description:"User interruption with CTRL-BREAK",standard:"other"},{name:"SIGTTOU",number:22,action:"pause",description:"Background process cannot write to terminal output",standard:"posix"},{name:"SIGURG",number:23,action:"ignore",description:"Socket received out-of-band data",standard:"bsd"},{name:"SIGXCPU",number:24,action:"core",description:"Process timed out",standard:"bsd"},{name:"SIGXFSZ",number:25,action:"core",description:"File too big",standard:"bsd"},{name:"SIGVTALRM",number:26,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGPROF",number:27,action:"terminate",description:"Timeout or timer",standard:"bsd"},{name:"SIGWINCH",number:28,action:"ignore",description:"Terminal window size changed",standard:"bsd"},{name:"SIGIO",number:29,action:"terminate",description:"I/O is available",standard:"other"},{name:"SIGPOLL",number:29,action:"terminate",description:"Watched event",standard:"other"},{name:"SIGINFO",number:29,action:"ignore",description:"Request for process information",standard:"other"},{name:"SIGPWR",number:30,action:"terminate",description:"Device running out of power",standard:"systemv"},{name:"SIGSYS",number:31,action:"core",description:"Invalid system call",standard:"other"},{name:"SIGUNUSED",number:31,action:"terminate",description:"Invalid system call",standard:"other"}]}),x=c(e=>{Object.defineProperty(e,"__esModule",{value:!0}),e.SIGRTMAX=e.getRealtimeSignals=void 0,e.getRealtimeSignals=function(){let e2=r2-n2+1;return Array.from({length:e2},t)};let t=function(e2,t2){return{name:`SIGRT${t2+1}`,number:n2+t2,action:"terminate",description:"Application-specific signal (realtime)",standard:"posix"}},n2=34,r2=64;e.SIGRTMAX=64}),S=c(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.getSignals=void 0;var n2=m("os"),r2=b(),i2=x();t.getSignals=function(){let e=(0,i2.getRealtimeSignals)();return[...r2.SIGNALS,...e].map(a2)};let a2=function({name:e,number:t2,description:r3,action:i3,forced:a3=!1,standard:o2}){let{signals:{[e]:s2}}=n2.constants,c3=s2!==void 0;return{name:e,number:c3?s2:t2,description:r3,supported:c3,action:i3,forced:a3,standard:o2}}}),C=c(t=>{Object.defineProperty(t,"__esModule",{value:!0}),t.signalsByNumber=t.signalsByName=void 0;var n2=m("os"),r2=S(),i2=x();let a2=function(){return(0,r2.getSignals)().reduce(o2,{})},o2=function(e,{name:t2,number:n3,description:r3,supported:i3,action:a3,forced:o3,standard:s3}){return{...e,[t2]:{name:t2,number:n3,description:r3,supported:i3,action:a3,forced:o3,standard:s3}}};t.signalsByName=a2();let s2=function(){let e=(0,r2.getSignals)(),t2=i2.SIGRTMAX+1,n3=Array.from({length:t2},(t3,n4)=>c3(n4,e));return Object.assign({},...n3)},c3=function(e,t2){let n3=l2(e,t2);if(n3===void 0)return{};let{name:r3,description:i3,supported:a3,action:o3,forced:s3,standard:c4}=n3;return{[e]:{name:r3,number:e,description:i3,supported:a3,action:o3,forced:s3,standard:c4}}},l2=function(e,t2){let r3=t2.find(({name:t3})=>n2.constants.signals[t3]===e);return r3===void 0?t2.find(t3=>t3.number===e):r3};t.signalsByNumber=s2()}),w=c((e,t)=>{let{signalsByName:n2}=C(),r2=({timedOut:e2,timeout:t2,errorCode:n3,signal:r3,signalDescription:i2,exitCode:a2,isCanceled:o2})=>e2?`timed out after ${t2} milliseconds`:o2?"was canceled":n3===void 0?r3===void 0?a2===void 0?"failed":`failed with exit code ${a2}`:`was killed with ${r3} (${i2})`:`failed with ${n3}`;t.exports=({stdout:e2,stderr:t2,all:i2,error:a2,signal:o2,exitCode:s2,command:c3,escapedCommand:l2,timedOut:u2,isCanceled:d2,killed:f2,parsed:{options:{timeout:p2}}})=>{s2=s2===null?void 0:s2,o2=o2===null?void 0:o2;let m3=o2===void 0?void 0:n2[o2].description,h2=`Command ${r2({timedOut:u2,timeout:p2,errorCode:a2&&a2.code,signal:o2,signalDescription:m3,exitCode:s2,isCanceled:d2})}: ${c3}`,g2=Object.prototype.toString.call(a2)==="[object Error]",_2=g2?`${h2}
|
|
10
|
+
${a2.message}`:h2,v2=[_2,t2,e2].filter(Boolean).join(`
|
|
11
|
+
`);return g2?(a2.originalMessage=a2.message,a2.message=v2):a2=Error(v2),a2.shortMessage=_2,a2.command=c3,a2.escapedCommand=l2,a2.exitCode=s2,a2.signal=o2,a2.signalDescription=m3,a2.stdout=e2,a2.stderr=t2,i2!==void 0&&(a2.all=i2),"bufferedData"in a2&&delete a2.bufferedData,a2.failed=!0,a2.timedOut=!!u2,a2.isCanceled=d2,a2.killed=f2&&!u2,a2}}),T=c((e,t)=>{let n2=["stdin","stdout","stderr"],r2=e2=>n2.some(t2=>e2[t2]!==void 0),i2=e2=>{if(!e2)return;let{stdio:t2}=e2;if(t2===void 0)return n2.map(t3=>e2[t3]);if(r2(e2))throw Error(`It's not possible to provide \`stdio\` in combination with one of ${n2.map(e3=>`\`${e3}\``).join(", ")}`);if(typeof t2=="string")return t2;if(!Array.isArray(t2))throw TypeError(`Expected \`stdio\` to be of type \`string\` or \`Array\`, got \`${typeof t2}\``);let i3=Math.max(t2.length,n2.length);return Array.from({length:i3},(e3,n3)=>t2[n3])};t.exports=i2,t.exports.node=e2=>{let t2=i2(e2);return t2==="ipc"?"ipc":t2===void 0||typeof t2=="string"?[t2,t2,t2,"ipc"]:t2.includes("ipc")?t2:[...t2,"ipc"]}}),E=c((e,t)=>{t.exports=["SIGABRT","SIGALRM","SIGHUP","SIGINT","SIGTERM"],process.platform!=="win32"&&t.exports.push("SIGVTALRM","SIGXCPU","SIGXFSZ","SIGUSR2","SIGTRAP","SIGSYS","SIGQUIT","SIGIOT"),process.platform==="linux"&&t.exports.push("SIGIO","SIGPOLL","SIGPWR","SIGSTKFLT","SIGUNUSED")}),ee=c((t,n2)=>{var r2=global.process;let i2=function(e){return e&&typeof e=="object"&&typeof e.removeListener=="function"&&typeof e.emit=="function"&&typeof e.reallyExit=="function"&&typeof e.listeners=="function"&&typeof e.kill=="function"&&typeof e.pid=="number"&&typeof e.on=="function"};if(!i2(r2))n2.exports=function(){return function(){}};else{var a2=m("assert"),o2=E(),s2=/^win/i.test(r2.platform),c3=m("events");typeof c3!="function"&&(c3=c3.EventEmitter);var l2;r2.__signal_exit_emitter__?l2=r2.__signal_exit_emitter__:(l2=r2.__signal_exit_emitter__=new c3,l2.count=0,l2.emitted={}),l2.infinite||(l2.setMaxListeners(1/0),l2.infinite=!0),n2.exports=function(e,t2){if(!i2(global.process))return function(){};a2.equal(typeof e,"function","a callback must be provided for exit handler"),p2===!1&&m3();var n3="exit";return t2&&t2.alwaysLast&&(n3="afterexit"),l2.on(n3,e),function(){l2.removeListener(n3,e),l2.listeners("exit").length===0&&l2.listeners("afterexit").length===0&&u2()}};var u2=function(){!p2||!i2(global.process)||(p2=!1,o2.forEach(function(e){try{r2.removeListener(e,f2[e])}catch{}}),r2.emit=_2,r2.reallyExit=h2,--l2.count)};n2.exports.unload=u2;var d2=function(e,t2,n3){l2.emitted[e]||(l2.emitted[e]=!0,l2.emit(e,t2,n3))},f2={};o2.forEach(function(e){f2[e]=function(){i2(global.process)&&r2.listeners(e).length===l2.count&&(u2(),d2("exit",null,e),d2("afterexit",null,e),s2&&e==="SIGHUP"&&(e="SIGINT"),r2.kill(r2.pid,e))}}),n2.exports.signals=function(){return o2};var p2=!1,m3=function(){p2||!i2(global.process)||(p2=!0,l2.count+=1,o2=o2.filter(function(e){try{return r2.on(e,f2[e]),!0}catch{return!1}}),r2.emit=v2,r2.reallyExit=g2)};n2.exports.load=m3;var h2=r2.reallyExit,g2=function(e){i2(global.process)&&(r2.exitCode=e||0,d2("exit",r2.exitCode,null),d2("afterexit",r2.exitCode,null),h2.call(r2,r2.exitCode))},_2=r2.emit,v2=function(e,t2){if(e==="exit"&&i2(global.process)){t2!==void 0&&(r2.exitCode=t2);var n3=_2.apply(this,arguments);return d2("exit",r2.exitCode,null),d2("afterexit",r2.exitCode,null),n3}else return _2.apply(this,arguments)}}}),te=c((t,n2)=>{let r2=m("os"),i2=ee(),a2=(e,t2="SIGTERM",n3={})=>{let r3=e(t2);return o2(e,t2,n3,r3),r3},o2=(e,t2,n3,r3)=>{if(!s2(t2,n3,r3))return;let i3=l2(n3),a3=setTimeout(()=>{e("SIGKILL")},i3);a3.unref&&a3.unref()},s2=(e,{forceKillAfterTimeout:t2},n3)=>c3(e)&&t2!==!1&&n3,c3=e=>e===r2.constants.signals.SIGTERM||typeof e=="string"&&e.toUpperCase()==="SIGTERM",l2=({forceKillAfterTimeout:e=!0})=>{if(e===!0)return 5e3;if(!Number.isFinite(e)||e<0)throw TypeError(`Expected the \`forceKillAfterTimeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`);return e},u2=(e,t2)=>{e.kill()&&(t2.isCanceled=!0)},d2=(e,t2,n3)=>{e.kill(t2),n3(Object.assign(Error("Timed out"),{timedOut:!0,signal:t2}))};n2.exports={spawnedKill:a2,spawnedCancel:u2,setupTimeout:(e,{timeout:t2,killSignal:n3="SIGTERM"},r3)=>{if(t2===0||t2===void 0)return r3;let i3,a3=new Promise((r4,a4)=>{i3=setTimeout(()=>{d2(e,n3,a4)},t2)}),o3=r3.finally(()=>{clearTimeout(i3)});return Promise.race([a3,o3])},validateTimeout:({timeout:e})=>{if(e!==void 0&&(!Number.isFinite(e)||e<0))throw TypeError(`Expected the \`timeout\` option to be a non-negative integer, got \`${e}\` (${typeof e})`)},setExitHandler:async(e,{cleanup:t2,detached:n3},r3)=>{if(!t2||n3)return r3;let a3=i2(()=>{e.kill()});return r3.finally(()=>{a3()})}}}),D=c((e,t)=>{let n2=e2=>typeof e2=="object"&&!!e2&&typeof e2.pipe=="function";n2.writable=e2=>n2(e2)&&e2.writable!==!1&&typeof e2._write=="function"&&typeof e2._writableState=="object",n2.readable=e2=>n2(e2)&&e2.readable!==!1&&typeof e2._read=="function"&&typeof e2._readableState=="object",n2.duplex=e2=>n2.writable(e2)&&n2.readable(e2),n2.transform=e2=>n2.duplex(e2)&&typeof e2._transform=="function",t.exports=n2}),O=c((t,n2)=>{let{PassThrough:r2}=m("stream");n2.exports=e=>{e={...e};let{array:t2}=e,{encoding:n3}=e,i2=n3==="buffer",a2=!1;t2?a2=!(n3||i2):n3=n3||"utf8",i2&&(n3=null);let o2=new r2({objectMode:a2});n3&&o2.setEncoding(n3);let s2=0,c3=[];return o2.on("data",e2=>{c3.push(e2),a2?s2=c3.length:s2+=e2.length}),o2.getBufferedValue=()=>t2?c3:i2?Buffer.concat(c3,s2):c3.join(""),o2.getBufferedLength=()=>s2,o2}}),k=c((t,n2)=>{let{constants:r2}=m("buffer"),i2=m("stream"),{promisify:a2}=m("util"),o2=O(),s2=a2(i2.pipeline);var c3=class extends Error{constructor(){super("maxBuffer exceeded"),this.name="MaxBufferError"}};async function l2(e,t2){if(!e)throw Error("Expected a stream");t2={maxBuffer:1/0,...t2};let{maxBuffer:n3}=t2,i3=o2(t2);return await new Promise((t3,a3)=>{let o3=e2=>{e2&&i3.getBufferedLength()<=r2.MAX_LENGTH&&(e2.bufferedData=i3.getBufferedValue()),a3(e2)};(async()=>{try{await s2(e,i3),t3()}catch(e2){o3(e2)}})(),i3.on("data",()=>{i3.getBufferedLength()>n3&&o3(new c3)})}),i3.getBufferedValue()}n2.exports=l2,n2.exports.buffer=(e,t2)=>l2(e,{...t2,encoding:"buffer"}),n2.exports.array=(e,t2)=>l2(e,{...t2,array:!0}),n2.exports.MaxBufferError=c3}),A=c((t,n2)=>{let{PassThrough:r2}=m("stream");n2.exports=function(){var e=[],t2=new r2({objectMode:!0});return t2.setMaxListeners(0),t2.add=n3,t2.isEmpty=i2,t2.on("unpipe",a2),Array.prototype.slice.call(arguments).forEach(n3),t2;function n3(r3){return Array.isArray(r3)?(r3.forEach(n3),this):(e.push(r3),r3.once("end",a2.bind(null,r3)),r3.once("error",t2.emit.bind(t2,"error")),r3.pipe(t2,{end:!1}),this)}function i2(){return e.length==0}function a2(n4){e=e.filter(function(e2){return e2!==n4}),!e.length&&t2.readable&&t2.end()}}}),ne=c((e,t)=>{let n2=D(),r2=k(),i2=A(),a2=(e2,t2)=>{t2===void 0||e2.stdin===void 0||(n2(t2)?t2.pipe(e2.stdin):e2.stdin.end(t2))},o2=(e2,{all:t2})=>{if(!t2||!e2.stdout&&!e2.stderr)return;let n3=i2();return e2.stdout&&n3.add(e2.stdout),e2.stderr&&n3.add(e2.stderr),n3},s2=async(e2,t2)=>{if(e2){e2.destroy();try{return await t2}catch(e3){return e3.bufferedData}}},c3=(e2,{encoding:t2,buffer:n3,maxBuffer:i3})=>{if(!(!e2||!n3))return t2?r2(e2,{encoding:t2,maxBuffer:i3}):r2.buffer(e2,{maxBuffer:i3})};t.exports={handleInput:a2,makeAllStream:o2,getSpawnedResult:async({stdout:e2,stderr:t2,all:n3},{encoding:r3,buffer:i3,maxBuffer:a3},o3)=>{let l2=c3(e2,{encoding:r3,buffer:i3,maxBuffer:a3}),u2=c3(t2,{encoding:r3,buffer:i3,maxBuffer:a3}),d2=c3(n3,{encoding:r3,buffer:i3,maxBuffer:a3*2});try{return await Promise.all([o3,l2,u2,d2])}catch(r4){return Promise.all([{error:r4,signal:r4.signal,timedOut:r4.timedOut},s2(e2,l2),s2(t2,u2),s2(n3,d2)])}},validateInputSync:({input:e2})=>{if(n2(e2))throw TypeError("The `input` option cannot be a stream in sync mode")}}}),j=c((e,t)=>{let n2=(async()=>{})().constructor.prototype,r2=["then","catch","finally"].map(e2=>[e2,Reflect.getOwnPropertyDescriptor(n2,e2)]);t.exports={mergePromise:(e2,t2)=>{for(let[n3,i2]of r2){let r3=typeof t2=="function"?(...e3)=>Reflect.apply(i2.value,t2(),e3):i2.value.bind(t2);Reflect.defineProperty(e2,n3,{...i2,value:r3})}return e2},getSpawnedPromise:e2=>new Promise((t2,n3)=>{e2.on("exit",(e3,n4)=>{t2({exitCode:e3,signal:n4})}),e2.on("error",e3=>{n3(e3)}),e2.stdin&&e2.stdin.on("error",e3=>{n3(e3)})})}}),re=c((e,t)=>{let n2=(e2,t2=[])=>Array.isArray(t2)?[e2,...t2]:[e2],r2=/^[\w.-]+$/,i2=/"/g,a2=e2=>typeof e2!="string"||r2.test(e2)?e2:`"${e2.replace(i2,'\\"')}"`,o2=(e2,t2)=>n2(e2,t2).join(" "),s2=(e2,t2)=>n2(e2,t2).map(e3=>a2(e3)).join(" "),c3=/ +/g;t.exports={joinCommand:o2,getEscapedCommand:s2,parseCommand:e2=>{let t2=[];for(let n3 of e2.trim().split(c3)){let e3=t2[t2.length-1];e3&&e3.endsWith("\\")?t2[t2.length-1]=`${e3.slice(0,-1)} ${n3}`:t2.push(n3)}return t2}}}),M=c((t,n2)=>{let r2=m("path"),i2=m("child_process"),a2=h(),o2=g(),s2=_(),c3=y(),l2=w(),u2=T(),{spawnedKill:d2,spawnedCancel:f2,setupTimeout:p2,validateTimeout:m3,setExitHandler:v2}=te(),{handleInput:b2,getSpawnedResult:x2,makeAllStream:S2,validateInputSync:C2}=ne(),{mergePromise:E2,getSpawnedPromise:ee2}=j(),{joinCommand:D2,parseCommand:O2,getEscapedCommand:k2}=re(),A2=({env:e,extendEnv:t2,preferLocal:n3,localDir:r3,execPath:i3})=>{let a3=t2?{...process.env,...e}:e;return n3?s2.env({env:a3,cwd:r3,execPath:i3}):a3},M2=(e,t2,n3={})=>{let i3=a2._parse(e,t2,n3);return e=i3.command,t2=i3.args,n3=i3.options,n3={maxBuffer:1e8,buffer:!0,stripFinalNewline:!0,extendEnv:!0,preferLocal:!1,localDir:n3.cwd||process.cwd(),execPath:process.execPath,encoding:"utf8",reject:!0,cleanup:!0,all:!1,windowsHide:!0,...n3},n3.env=A2(n3),n3.stdio=u2(n3),process.platform==="win32"&&r2.basename(e,".exe")==="cmd"&&t2.unshift("/q"),{file:e,args:t2,options:n3,parsed:i3}},N2=(e,t2,n3)=>typeof t2!="string"&&!Buffer.isBuffer(t2)?n3===void 0?void 0:"":e.stripFinalNewline?o2(t2):t2,P2=(e,t2,n3)=>{let r3=M2(e,t2,n3),a3=D2(e,t2),o3=k2(e,t2);m3(r3.options);let s3;try{s3=i2.spawn(r3.file,r3.args,r3.options)}catch(e2){return E2(new i2.ChildProcess,Promise.reject(l2({error:e2,stdout:"",stderr:"",all:"",command:a3,escapedCommand:o3,parsed:r3,timedOut:!1,isCanceled:!1,killed:!1})))}let u3=ee2(s3),h2=p2(s3,r3.options,u3),g2=v2(s3,r3.options,h2),_2={isCanceled:!1};s3.kill=d2.bind(null,s3.kill.bind(s3)),s3.cancel=f2.bind(null,s3,_2);let y2=c3(async()=>{let[{error:e2,exitCode:t3,signal:n4,timedOut:i3},c4,u4,d3]=await x2(s3,r3.options,g2),f3=N2(r3.options,c4),p3=N2(r3.options,u4),m4=N2(r3.options,d3);if(e2||t3!==0||n4!==null){let c5=l2({error:e2,exitCode:t3,signal:n4,stdout:f3,stderr:p3,all:m4,command:a3,escapedCommand:o3,parsed:r3,timedOut:i3,isCanceled:_2.isCanceled,killed:s3.killed});if(!r3.options.reject)return c5;throw c5}return{command:a3,escapedCommand:o3,exitCode:0,stdout:f3,stderr:p3,all:m4,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}});return b2(s3,r3.options.input),s3.all=S2(s3,r3.options),E2(s3,y2)};n2.exports=P2,n2.exports.sync=(e,t2,n3)=>{let r3=M2(e,t2,n3),a3=D2(e,t2),o3=k2(e,t2);C2(r3.options);let s3;try{s3=i2.spawnSync(r3.file,r3.args,r3.options)}catch(e2){throw l2({error:e2,stdout:"",stderr:"",all:"",command:a3,escapedCommand:o3,parsed:r3,timedOut:!1,isCanceled:!1,killed:!1})}let c4=N2(r3.options,s3.stdout,s3.error),u3=N2(r3.options,s3.stderr,s3.error);if(s3.error||s3.status!==0||s3.signal!==null){let e2=l2({stdout:c4,stderr:u3,error:s3.error,signal:s3.signal,exitCode:s3.status,command:a3,escapedCommand:o3,parsed:r3,timedOut:s3.error&&s3.error.code==="ETIMEDOUT",isCanceled:!1,killed:s3.signal!==null});if(!r3.options.reject)return e2;throw e2}return{command:a3,escapedCommand:o3,exitCode:0,stdout:c4,stderr:u3,failed:!1,timedOut:!1,isCanceled:!1,killed:!1}},n2.exports.command=(e,t2)=>{let[n3,...r3]=O2(e);return P2(n3,r3,t2)},n2.exports.commandSync=(e,t2)=>{let[n3,...r3]=O2(e);return P2.sync(n3,r3,t2)},n2.exports.node=(e,t2,n3={})=>{t2&&!Array.isArray(t2)&&typeof t2=="object"&&(n3=t2,t2=[]);let r3=u2.node(n3),i3=process.execArgv.filter(e2=>!e2.startsWith("--inspect")),{nodePath:a3=process.execPath,nodeOptions:o3=i3}=n3;return P2(a3,[...o3,e,...Array.isArray(t2)?t2:[]],{...n3,stdin:void 0,stdout:void 0,stderr:void 0,stdio:r3,shell:!1})}}),N=c((t,n2)=>{var r2=Object.create,i2=Object.defineProperty,a2=Object.getOwnPropertyDescriptor,o2=Object.getOwnPropertyNames,s2=Object.getPrototypeOf,c3=Object.prototype.hasOwnProperty,l2=(e,t2)=>{for(var n3 in t2)i2(e,n3,{get:t2[n3],enumerable:!0})},u2=(e,t2,n3,r3)=>{if(t2&&typeof t2=="object"||typeof t2=="function")for(let s3 of o2(t2))!c3.call(e,s3)&&s3!==n3&&i2(e,s3,{get:()=>t2[s3],enumerable:!(r3=a2(t2,s3))||r3.enumerable});return e},d2=(e,t2,n3)=>(n3=e==null?{}:r2(s2(e)),u2(t2||!e||!e.__esModule?i2(n3,"default",{value:e,enumerable:!0}):n3,e)),f2=e=>u2(i2({},"__esModule",{value:!0}),e),p2={};l2(p2,{getEnvPath:()=>_2,prependPathEntries:()=>h2,setEnvPath:()=>v2,splitPath:()=>g2}),n2.exports=f2(p2);var m3=d2(m("node:path"));function h2(e,t2){let n3=e.split(m3.default.delimiter).filter(Boolean),r3=[];for(let e2 of t2)!n3.includes(e2)&&!r3.includes(e2)&&r3.push(e2);return r3.length===0?e:e===""||e===m3.default.delimiter?`${r3.join(m3.default.delimiter)}${e}`:[...r3,e].join(m3.default.delimiter)}function g2(e){return e.split(m3.default.delimiter).filter(Boolean)}function _2(e=process.env){if(process.platform!=="win32")return e.PATH??"";let t2=Object.keys(e).filter(e2=>e2.toLowerCase()==="path");for(let n3=t2.length-1;n3>=0;n3--){let r3=e[t2[n3]];if(r3!==void 0)return r3}return""}function v2(e=process.env,t2){if(process.platform!=="win32")return{...e,PATH:t2};let n3={...e};for(let e2 of Object.keys(n3))e2!=="PATH"&&e2.toLowerCase()==="path"&&delete n3[e2];return n3.PATH=t2,n3}}),P=c((e,t)=>{var n2=Object.defineProperty,r2=Object.getOwnPropertyDescriptor,i2=Object.getOwnPropertyNames,a2=Object.prototype.hasOwnProperty,o2=(e2,t2)=>{for(var r3 in t2)n2(e2,r3,{get:t2[r3],enumerable:!0})},s2=(e2,t2,o3,s3)=>{if(t2&&typeof t2=="object"||typeof t2=="function")for(let c4 of i2(t2))!a2.call(e2,c4)&&c4!==o3&&n2(e2,c4,{get:()=>t2[c4],enumerable:!(s3=r2(t2,c4))||s3.enumerable});return e2},c3=e2=>s2(n2({},"__esModule",{value:!0}),e2),l2={};o2(l2,{getErrorMessage:()=>u2,isMissingPathError:()=>d2}),t.exports=c3(l2);function u2(e2){return e2 instanceof Error?e2.message:String(e2)}function d2(e2){return typeof e2=="object"&&!!e2&&"code"in e2&&(e2.code==="ENOENT"||e2.code==="ENOTDIR")}}),ie=c((t,n2)=>{var r2=Object.create,i2=Object.defineProperty,a2=Object.getOwnPropertyDescriptor,o2=Object.getOwnPropertyNames,s2=Object.getPrototypeOf,c3=Object.prototype.hasOwnProperty,l2=(e,t2)=>{for(var n3 in t2)i2(e,n3,{get:t2[n3],enumerable:!0})},u2=(e,t2,n3,r3)=>{if(t2&&typeof t2=="object"||typeof t2=="function")for(let s3 of o2(t2))!c3.call(e,s3)&&s3!==n3&&i2(e,s3,{get:()=>t2[s3],enumerable:!(r3=a2(t2,s3))||r3.enumerable});return e},d2=(e,t2,n3)=>(n3=e==null?{}:r2(s2(e)),u2(t2||!e||!e.__esModule?i2(n3,"default",{value:e,enumerable:!0}):n3,e)),f2=e=>u2(i2({},"__esModule",{value:!0}),e),p2={};l2(p2,{getCanonicalPath:()=>_2,getCommandBase:()=>S2,getDirectoriesBetween:()=>v2,isNodeScript:()=>b2,isSubpath:()=>x2,statIfExists:()=>y2}),n2.exports=f2(p2);var m3=m("node:fs/promises"),h2=d2(m("node:path")),g2=P();async function _2(e){try{return await(0,m3.realpath)(e)}catch{return e}}function v2(e,t2){let n3=[],r3=h2.default.resolve(t2),i3=h2.default.resolve(e);for(;;){if(n3.push(r3),r3===i3)return n3.reverse();let e2=h2.default.dirname(r3);if(e2===r3)return[];r3=e2}}async function y2(e){try{return{stats:await(0,m3.stat)(e)}}catch(e2){return(0,g2.isMissingPathError)(e2)?{missing:!0}:{reason:`could not inspect: ${(0,g2.getErrorMessage)(e2)}`}}}function b2(e){return[".js",".cjs",".mjs"].includes(h2.default.extname(e))}function x2(e,t2){let n3=h2.default.relative(e,t2);return n3===""||n3!==""&&!n3.startsWith("..")&&!h2.default.isAbsolute(n3)}function S2(e){let t2=h2.default.extname(e).toLowerCase();return process.platform==="win32"&&[".cmd",".exe"].includes(t2)?h2.default.basename(e,t2):h2.default.basename(e)}}),F=c((t,n2)=>{var r2=Object.create,i2=Object.defineProperty,a2=Object.getOwnPropertyDescriptor,o2=Object.getOwnPropertyNames,s2=Object.getPrototypeOf,c3=Object.prototype.hasOwnProperty,l2=(e,t2)=>{for(var n3 in t2)i2(e,n3,{get:t2[n3],enumerable:!0})},u2=(e,t2,n3,r3)=>{if(t2&&typeof t2=="object"||typeof t2=="function")for(let s3 of o2(t2))!c3.call(e,s3)&&s3!==n3&&i2(e,s3,{get:()=>t2[s3],enumerable:!(r3=a2(t2,s3))||r3.enumerable});return e},d2=(e,t2,n3)=>(n3=e==null?{}:r2(s2(e)),u2(t2||!e||!e.__esModule?i2(n3,"default",{value:e,enumerable:!0}):n3,e)),f2=e=>u2(i2({},"__esModule",{value:!0}),e),p2={};l2(p2,{getSkippedNodeModulesReason:()=>v2,getUnsafeDirectoryReason:()=>C2,getUnsafePackageBinReason:()=>b2,getUnsafePackageDirectoryReason:()=>x2,getUnsafePackageFileReason:()=>S2,getUnsafeStatsReason:()=>T2}),n2.exports=f2(p2);var m3=m("node:fs/promises"),h2=d2(m("node:path")),g2=P(),_2=ie();async function v2(e,t2){let n3=h2.default.dirname(e);t2??(t2=[n3]);for(let e2 of t2){let t3;try{t3=await C2(e2)}catch(e3){t3=`could not inspect: ${(0,g2.getErrorMessage)(e3)}`}if(t3)return`${e2} is ${t3}`}let r3=await(0,_2.statIfExists)(e);return"missing"in r3?null:"reason"in r3?r3.reason:r3.stats.isDirectory()?T2(r3.stats)||await y2(h2.default.join(e,".bin")):"not a directory"}async function y2(e){let t2=await(0,_2.statIfExists)(e);if("missing"in t2)return null;if("reason"in t2)return`${e} ${t2.reason}`;if(!t2.stats.isDirectory())return`${e} is not a directory`;let n3=T2(t2.stats);return n3?`${e} is ${n3}`:null}async function b2(e,t2,n3){return await x2(e,t2)||await S2(t2,n3)}async function x2(e,t2){let n3=(0,_2.getDirectoriesBetween)(e,t2);if(n3.length===0)return`${t2} resolves outside local node_modules`;for(let e2 of n3){let t3=await C2(e2);if(t3)return`${e2} is ${t3}`}return null}async function S2(e,t2){let n3=(0,_2.getDirectoriesBetween)(e,h2.default.dirname(t2));if(n3.length===0)return`${t2} resolves outside package`;for(let e2 of n3){let t3=await C2(e2);if(t3)return`${e2} is ${t3}`}let r3=await w2(t2);return r3?`${t2} is ${r3}`:null}async function C2(e){let t2=await(0,m3.stat)(e);return t2.isDirectory()?T2(t2):"not a directory"}async function w2(e){let t2=await(0,m3.stat)(e);return t2.isFile()?T2(t2):"not a file"}function T2(e){let t2=process.geteuid??process.getuid;if(typeof t2!="function")return null;let n3=t2();return e.mode&18?e.mode&2?"world-writable":"group-writable":e.uid===n3?null:`owned by uid ${e.uid}, current uid is ${n3}`}}),ae=c((t,n2)=>{var r2=Object.create,i2=Object.defineProperty,a2=Object.getOwnPropertyDescriptor,o2=Object.getOwnPropertyNames,s2=Object.getPrototypeOf,c3=Object.prototype.hasOwnProperty,l2=(e,t2)=>{for(var n3 in t2)i2(e,n3,{get:t2[n3],enumerable:!0})},u2=(e,t2,n3,r3)=>{if(t2&&typeof t2=="object"||typeof t2=="function")for(let s3 of o2(t2))!c3.call(e,s3)&&s3!==n3&&i2(e,s3,{get:()=>t2[s3],enumerable:!(r3=a2(t2,s3))||r3.enumerable});return e},d2=(e,t2,n3)=>(n3=e==null?{}:r2(s2(e)),u2(t2||!e||!e.__esModule?i2(n3,"default",{value:e,enumerable:!0}):n3,e)),f2=e=>u2(i2({},"__esModule",{value:!0}),e),p2={};l2(p2,{clearCachedCliInvocation:()=>T2,clearVercelCliLookupCache:()=>w2,findVercelCli:()=>x2,getLocalBinSearch:()=>j2,resolveCachedCliInvocation:()=>S2,toVercelCliInvocation:()=>C2}),n2.exports=f2(p2);var m3=m("node:fs/promises"),h2=d2(m("node:path")),g2=N(),_2=P(),v2=ie(),y2=F();let b2=new Map;async function x2(e={}){let t2=await S2(h2.default.resolve(e.cwd??process.cwd()),e.path??(0,g2.getEnvPath)(process.env));return t2.found?C2(t2):null}function S2(e,t2){let n3=z2(e,t2);if(b2.has(n3))return b2.get(n3);let r3=E2(e,t2).catch(e2=>{throw b2.delete(n3),e2});return b2.set(n3,r3),r3}function C2(e){return{command:e.command,commandArgs:e.commandArgs,source:e.source}}function w2(){b2.clear()}function T2(e,t2){b2.delete(z2(e,t2))}async function E2(e,t2){let n3=await j2(e),r3={localBinSearch:n3.diagnostics,skippedLocalBins:[]},i3=(0,g2.prependPathEntries)(t2,n3.directories);for(let t3 of ne2()){let a3=await ee2(t3,i3,e,n3,r3);if(a3)return(0,v2.isNodeScript)(a3.realPath)?{found:!0,command:process.execPath,commandArgs:[a3.realPath],source:a3.source,diagnostics:r3}:{found:!0,command:a3.realPath,commandArgs:[],source:a3.source,diagnostics:r3}}return{found:!1,diagnostics:r3}}async function ee2(e,t2,n3,r3,i3){for(let a3 of(0,g2.splitPath)(t2)){let t3=te2(a3,e,n3);try{if(await D2(t3,r3,i3)){let n4=await k2(e,t3,r3,i3);if(n4)return n4}}catch{}}return null}function te2(e,t2,n3){let r3=h2.default.isAbsolute(e)?e:h2.default.resolve(n3,e);return h2.default.join(r3,t2)}async function D2(e,t2,n3){try{return await(0,m3.access)(e,process.platform==="win32"?m3.constants.F_OK:m3.constants.F_OK|m3.constants.X_OK),!0}catch(r3){return(0,_2.isMissingPathError)(r3)||await O2(e,r3,t2,n3),!1}}async function O2(e,t2,n3,r3){let i3=await L2(e,n3.directories);i3&&A2(r3,e,"reason"in i3?i3.reason:`local bin is not accessible: ${(0,_2.getErrorMessage)(t2)}`)}async function k2(e,t2,n3,r3){if(!(await(0,m3.stat)(t2)).isFile())return null;let i3=await(0,m3.realpath)(t2),a3=await L2(t2,n3.directories);if(!a3)return{realPath:i3,source:"path"};if("reason"in a3)return A2(r3,t2,a3.reason),null;let o3=await oe2(e,a3.directory);return"reason"in o3?(A2(r3,t2,o3.reason),null):{realPath:o3.binPath,source:"local-bin"}}function A2(e,t2,n3){e.skippedLocalBins.push({candidate:t2,reason:n3})}function ne2(){let e=["vercel"];if(process.platform!=="win32")return e;let t2=[".cmd",".exe",""];return e.flatMap(e2=>t2.map(t3=>`${e2}${t3}`))}async function j2(e){let t2=await(0,v2.getCanonicalPath)(h2.default.resolve(e)),n3=await re2(t2),r3=[],i3=[];for(let e2 of n3.directories){let a3=h2.default.join(e2,"node_modules"),o3=n3.stopReason==="project-root-marker"?(0,v2.getDirectoriesBetween)(n3.stoppedAt,e2):(0,v2.getDirectoriesBetween)(e2,t2),s3=await(0,y2.getSkippedNodeModulesReason)(a3,o3);if(s3){r3.push({directory:a3,reason:s3});continue}i3.push(h2.default.join(a3,".bin"))}return{directories:i3,diagnostics:{searchRoot:t2,stoppedAt:n3.stoppedAt,stopReason:n3.stopReason,markerPath:n3.markerPath,skippedNodeModules:r3}}}async function re2(e){let t2=[],n3=h2.default.resolve(e);for(;;){t2.push(n3);let e2=await M2(n3);if(e2)return{directories:t2,stoppedAt:n3,stopReason:"project-root-marker",markerPath:e2.path};let r3=h2.default.dirname(n3);if(r3===n3)return{directories:t2,stoppedAt:n3,stopReason:"filesystem-root"};n3=r3}}async function M2(e){let t2=h2.default.join(e,".git");try{return await(0,m3.stat)(t2),{path:t2}}catch{}return null}async function ae2(e,t2){let n3=h2.default.resolve(e),r3=n3;try{r3=h2.default.join(await(0,m3.realpath)(h2.default.dirname(n3)),h2.default.basename(n3))}catch{}for(let e2 of t2){try{e2=await(0,m3.realpath)(e2)}catch{}if(r3.startsWith(`${e2}${h2.default.sep}`))return e2}return null}async function I2(e){let t2=h2.default.resolve(h2.default.dirname(e)),n3=[t2];try{let e2=await(0,m3.realpath)(t2);n3.includes(e2)||n3.push(e2)}catch{}for(let e2 of n3)if(h2.default.basename(e2)===".bin"&&h2.default.basename(h2.default.dirname(e2))==="node_modules")return e2;return null}async function L2(e,t2){let n3=await ae2(e,t2);if(n3)return{directory:n3};let r3=await I2(e);if(!r3)return null;let i3=h2.default.dirname(r3),a3=await(0,y2.getSkippedNodeModulesReason)(i3);return a3?{reason:`local node_modules is ${a3}`}:{reason:"local bin is outside project lookup boundary"}}async function oe2(e,t2){let n3=(0,v2.getCommandBase)(e),r3=h2.default.dirname(t2);if(n3!=="vercel"||h2.default.basename(r3)!=="node_modules")return{reason:"not a local vercel bin"};try{let e2=await se2(r3);if("reason"in e2)return e2;let t3=await ce2(e2.realPackageDirectory);return"reason"in t3?t3:(e2.packageJson=t3.packageJson,await le2(e2,n3))}catch(e2){return{reason:`could not validate local vercel package: ${(0,_2.getErrorMessage)(e2)}`}}}async function se2(e){let t2=h2.default.join(e,"vercel"),n3=await(0,m3.realpath)(e),r3=await(0,m3.realpath)(t2);if(!(0,v2.isSubpath)(n3,r3))return{reason:"local vercel package resolves outside local node_modules"};let i3=await(0,y2.getUnsafePackageDirectoryReason)(n3,r3);return i3?{reason:`local vercel package is unsafe: ${i3}`}:{realNodeModulesDirectory:n3,realPackageDirectory:r3,packageJson:{}}}async function ce2(e){let t2=h2.default.join(e,"package.json"),n3=await(0,m3.realpath)(t2);if(!(0,v2.isSubpath)(e,n3))return{reason:"local vercel package.json resolves outside package"};let r3=await(0,y2.getUnsafePackageFileReason)(e,n3);if(r3)return{reason:`local vercel package.json is unsafe: ${r3}`};let i3=JSON.parse(await(0,m3.readFile)(n3,"utf8"));return i3.name==="vercel"?{packageJson:i3}:{reason:'local vercel package.json does not have name "vercel"'}}async function le2(e,t2){let{packageJson:n3,realNodeModulesDirectory:r3,realPackageDirectory:i3}=e,a3=R2(n3,t2);if(!a3)return{reason:"local vercel package does not declare bin.vercel"};let o3=h2.default.resolve(i3,a3),s3=await(0,m3.realpath)(o3);if(!(0,v2.isSubpath)(i3,s3))return{reason:"local vercel package bin resolves outside package"};let c4=await(0,y2.getUnsafePackageBinReason)(r3,i3,s3);if(c4)return{reason:`local vercel package bin is unsafe: ${c4}`};if(process.platform!=="win32"&&!(0,v2.isNodeScript)(s3))try{await(0,m3.access)(s3,m3.constants.F_OK|m3.constants.X_OK)}catch(e2){return{reason:`local vercel package bin is not executable: ${(0,_2.getErrorMessage)(e2)}`}}return{binPath:s3}}function R2(e,t2){let n3=e.bin;if(typeof n3=="string")return t2==="vercel"?n3:null;if(n3&&typeof n3=="object"){let e2=n3[t2];if(typeof e2=="string")return e2}return null}function z2(e,t2){return`${e}\0${t2}`}}),I=c((t,r2)=>{var i2=Object.create,a2=Object.defineProperty,o2=Object.getOwnPropertyDescriptor,s2=Object.getOwnPropertyNames,c3=Object.getPrototypeOf,l2=Object.prototype.hasOwnProperty,u2=(e,t2)=>{for(var n2 in t2)a2(e,n2,{get:t2[n2],enumerable:!0})},d2=(e,t2,n2,r3)=>{if(t2&&typeof t2=="object"||typeof t2=="function")for(let i3 of s2(t2))!l2.call(e,i3)&&i3!==n2&&a2(e,i3,{get:()=>t2[i3],enumerable:!(r3=o2(t2,i3))||r3.enumerable});return e},f2=(e,t2,n2)=>(n2=e==null?{}:i2(c3(e)),d2(t2||!e||!e.__esModule?a2(n2,"default",{value:e,enumerable:!0}):n2,e)),p2=e=>d2(a2({},"__esModule",{value:!0}),e),m3={};u2(m3,{execVercelCli:()=>b2}),r2.exports=p2(m3);var h2=f2(m("node:path")),g2=f2(M()),_2=N(),v2=n(),y2=ae();async function b2(e,t2={}){let n2=h2.default.resolve(t2.cwd??process.cwd());await(0,v2.assertValidCwd)(n2);let r3=C2(t2.env),i3=(0,_2.getEnvPath)(r3);try{return await x2(e,t2,n2,r3,i3)}catch(a3){if(a3 instanceof v2.VercelCliError&&a3.code==="VERCEL_CLI_NOT_FOUND")return(0,y2.clearCachedCliInvocation)(n2,i3),await x2(e,t2,n2,r3,i3);throw a3}}async function x2(e,t2,n2,r3,i3){let a3=await S2(n2,i3);try{let i4={input:t2.input,stdio:t2.stdio,stdin:t2.stdin,stdout:t2.stdout,stderr:t2.stderr,timeout:t2.timeout,cwd:n2,env:await w2(n2,r3),windowsHide:!0};t2.signal&&(i4.signal=t2.signal);let{stdout:o3,stderr:s3}=await(0,g2.default)(a3.command,[...a3.commandArgs,...e],i4);return{stdout:o3,stderr:s3,invocation:a3}}catch(e2){throw(0,v2.toVercelCliError)(a3,e2)}}async function S2(e,t2){let n2=await(0,y2.resolveCachedCliInvocation)(e,t2);if(!n2.found)throw new v2.VercelCliError({code:"VERCEL_CLI_NOT_FOUND",message:(0,v2.getCliNotFoundMessage)(n2.diagnostics)});return(0,y2.toVercelCliInvocation)(n2)}function C2(e){return e?{...process.env,...e}:process.env}async function w2(e,t2=process.env){let n2=await T2(e,(0,_2.getEnvPath)(t2));return(0,_2.setEnvPath)(t2,(0,_2.prependPathEntries)(n2,[h2.default.dirname(process.execPath)]))}async function T2(e,t2=""){return(0,_2.prependPathEntries)(t2,(await(0,y2.getLocalBinSearch)(e)).directories)}}),L=c((e,t)=>{var r2=Object.defineProperty,i2=Object.getOwnPropertyDescriptor,a2=Object.getOwnPropertyNames,o2=Object.prototype.hasOwnProperty,s2=(e2,t2)=>{for(var n2 in t2)r2(e2,n2,{get:t2[n2],enumerable:!0})},c3=(e2,t2,n2,s3)=>{if(t2&&typeof t2=="object"||typeof t2=="function")for(let c4 of a2(t2))!o2.call(e2,c4)&&c4!==n2&&r2(e2,c4,{get:()=>t2[c4],enumerable:!(s3=i2(t2,c4))||s3.enumerable});return e2},l2=e2=>c3(r2({},"__esModule",{value:!0}),e2),u2={};s2(u2,{VercelCliError:()=>d2.VercelCliError,clearVercelCliLookupCache:()=>p2.clearVercelCliLookupCache,execVercelCli:()=>f2.execVercelCli,findVercelCli:()=>p2.findVercelCli}),t.exports=l2(u2);var d2=n(),f2=I(),p2=ae()}),oe=c((t,n2)=>{var r2=Object.create,i2=Object.defineProperty,a2=Object.getOwnPropertyDescriptor,o2=Object.getOwnPropertyNames,s2=Object.getPrototypeOf,c3=Object.prototype.hasOwnProperty,l2=(e,t2)=>function(){return t2||(0,e[o2(e)[0]])((t2={exports:{}}).exports,t2),t2.exports},u2=(e,t2)=>{for(var n3 in t2)i2(e,n3,{get:t2[n3],enumerable:!0})},d2=(e,t2,n3,r3)=>{if(t2&&typeof t2=="object"||typeof t2=="function")for(let s3 of o2(t2))!c3.call(e,s3)&&s3!==n3&&i2(e,s3,{get:()=>t2[s3],enumerable:!(r3=a2(t2,s3))||r3.enumerable});return e},f2=(e,t2,n3)=>(n3=e==null?{}:r2(s2(e)),d2(t2||!e||!e.__esModule?i2(n3,"default",{value:e,enumerable:!0}):n3,e)),p2=e=>d2(i2({},"__esModule",{value:!0}),e),m3=l2({"../../node_modules/.pnpm/os-paths@4.4.0/node_modules/os-paths/src/lib/index.js"(t2,n3){var r3=m("os"),i3=m("path"),a3=/^win/i.test(process.platform);function o3(e){return i3.normalize(i3.join(e,"."))}var s3=()=>{let{env:e}=process,t3={};return t3.home=()=>o3(r3.homedir?r3.homedir():e.HOME),t3.temp=()=>o3(r3.tmpdir?r3.tmpdir():e.TMPDIR||e.TEMP||e.TMP),t3},c4=()=>{let{env:e}=process,t3={};return t3.home=()=>o3(r3.homedir?r3.homedir():e.USERPROFILE||i3.join(e.HOMEDRIVE,e.HOMEPATH)||e.HOME),t3.temp=()=>o3(r3.tmpdir?r3.tmpdir():e.TEMP||e.TMP||i3.join(e.LOCALAPPDATA||e.SystemRoot||e.windir,"Temp")),t3};n3.exports=new class e{constructor(){this._fn=function(){return new e};let t3=a3?c4():s3();return Object.keys(t3).forEach(e2=>{this._fn[e2]=t3[e2]}),this._fn}}}}),h2=l2({"../../node_modules/.pnpm/xdg-portable@7.3.0/node_modules/xdg-portable/src/lib/index.js"(t2,n3){var r3=m("path"),i3=m3(),a3=()=>{let e={};return e.cache=()=>process.env.XDG_CACHE_HOME||r3.join(i3.home()||i3.temp(),".cache"),e.config=()=>process.env.XDG_CONFIG_HOME||r3.join(i3.home()||i3.temp(),".config"),e.data=()=>process.env.XDG_DATA_HOME||r3.join(i3.home()||i3.temp(),".local","share"),e.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,e.state=()=>process.env.XDG_STATE_HOME||r3.join(i3.home()||i3.temp(),".local","state"),e},o3=()=>{let e={};return e.cache=()=>process.env.XDG_CACHE_HOME||r3.join(r3.join(i3.home()||i3.temp(),"Library"),"Caches"),e.config=()=>process.env.XDG_CONFIG_HOME||r3.join(r3.join(i3.home()||i3.temp(),"Library"),"Preferences"),e.data=()=>process.env.XDG_DATA_HOME||r3.join(r3.join(i3.home()||i3.temp(),"Library"),"Application Support"),e.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,e.state=()=>process.env.XDG_STATE_HOME||r3.join(r3.join(i3.home()||i3.temp(),"Library"),"State"),e},s3=()=>{let e={};return e.cache=()=>{let e2=process.env.LOCALAPPDATA||r3.join(i3.home()||i3.temp(),"AppData","Local");return process.env.XDG_CACHE_HOME||r3.join(e2,"xdg.cache")},e.config=()=>{let e2=process.env.APPDATA||r3.join(i3.home()||i3.temp(),"AppData","Roaming");return process.env.XDG_CONFIG_HOME||r3.join(e2,"xdg.config")},e.data=()=>{let e2=process.env.APPDATA||r3.join(i3.home()||i3.temp(),"AppData","Roaming");return process.env.XDG_DATA_HOME||r3.join(e2,"xdg.data")},e.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,e.state=()=>{let e2=process.env.LOCALAPPDATA||r3.join(i3.home()||i3.temp(),"AppData","Local");return process.env.XDG_STATE_HOME||r3.join(e2,"xdg.state")},e},c4=()=>{let e=function(){return c4()},t3={};return t3=/^darwin$/i.test(process.platform)?o3():/^win/i.test(process.platform)?s3():a3(),t3.configDirs=()=>{let e2=[];return e2.push(t3.config()),process.env.XDG_CONFIG_DIRS&&e2.push(...process.env.XDG_CONFIG_DIRS.split(r3.delimiter)),e2},t3.dataDirs=()=>{let e2=[];return e2.push(t3.data()),process.env.XDG_DATA_DIRS&&e2.push(...process.env.XDG_DATA_DIRS.split(r3.delimiter)),e2},Object.keys(t3).forEach(n4=>{e[n4]=t3[n4]}),e};n3.exports=c4()}}),g2=l2({"../../node_modules/.pnpm/xdg-app-paths@5.1.0/node_modules/xdg-app-paths/index.js"(t2,n3){var r3=m("path"),i3=m("os"),a3=h2(),o3=/^win/i.test(process.platform);function s3(e,t3){if(e=e||{},typeof e!="object"&&(e={isolated:e}),e.isolated=e.isolated===void 0||e.isolated===null?t3:e.isolated,typeof e.isolated!="boolean")throw TypeError(`Expected boolean for "isolated" argument, got ${typeof e.isolated}`);return e}var c4=(e,t3)=>{let n4={};return n4.cache=(n5={isolated:null})=>(n5=s3(n5,t3),r3.join(a3.cache(),n5.isolated?e:"")),n4.config=(n5={isolated:null})=>(n5=s3(n5,t3),r3.join(a3.config(),n5.isolated?e:"")),n4.data=(n5={isolated:null})=>(n5=s3(n5,t3),r3.join(a3.data(),n5.isolated?e:"")),n4.runtime=(n5={isolated:null})=>(n5=s3(n5,t3),a3.runtime()?r3.join(a3.runtime(),n5.isolated?e:""):void 0),n4.state=(n5={isolated:null})=>(n5=s3(n5,t3),r3.join(a3.state(),n5.isolated?e:"")),n4.configDirs=(n5={isolated:null})=>(n5=s3(n5,t3),a3.configDirs().map(t4=>r3.join(t4,n5.isolated?e:""))),n4.dataDirs=(n5={isolated:null})=>(n5=s3(n5,t3),a3.dataDirs().map(t4=>r3.join(t4,n5.isolated?e:""))),n4},l3=(e,t3)=>{let{env:n4}=process,o4=i3.homedir(),c5=i3.tmpdir(),l4=n4.APPDATA||r3.join(o4||c5,"AppData","Roaming"),u3=n4.LOCALAPPDATA||r3.join(o4||c5,"AppData","Local"),d3={};return d3.cache=(i4={isolated:null})=>(i4=s3(i4,t3),!i4.isolated||n4.XDG_CACHE_HOME?r3.join(a3.cache(),i4.isolated?e:""):r3.join(u3,i4.isolated?e:"","Cache")),d3.config=(i4={isolated:null})=>(i4=s3(i4,t3),!i4.isolated||n4.XDG_CONFIG_HOME?r3.join(a3.config(),i4.isolated?e:""):r3.join(l4,i4.isolated?e:"","Config")),d3.data=(i4={isolated:null})=>(i4=s3(i4,t3),!i4.isolated||n4.XDG_DATA_HOME?r3.join(a3.data(),i4.isolated?e:""):r3.join(l4,i4.isolated?e:"","Data")),d3.runtime=(n5={isolated:null})=>(n5=s3(n5,t3),a3.runtime()?r3.join(a3.runtime(),n5.isolated?e:""):void 0),d3.state=(i4={isolated:null})=>(i4=s3(i4,t3),!i4.isolated||n4.XDG_STATE_HOME?r3.join(a3.state(),i4.isolated?e:""):r3.join(u3,i4.isolated?e:"","State")),d3.configDirs=(i4={isolated:null})=>{i4=s3(i4,t3);let a4=[d3.config(i4)];return n4.XDG_CONFIG_DIRS&&a4.push(...n4.XDG_CONFIG_DIRS.split(r3.delimiter).map(t4=>r3.join(t4,i4.isolated?e:""))),a4},d3.dataDirs=(i4={isolated:null})=>{i4=s3(i4,t3);let a4=[d3.data(i4)];return n4.XDG_DATA_DIRS&&a4.push(...n4.XDG_DATA_DIRS.split(r3.delimiter).map(t4=>r3.join(t4,i4.isolated?e:""))),a4},d3};n3.exports=new class t3{constructor(n4={name:null,suffix:null,isolated:!0}){this._fn=function(e={name:null,suffix:null,isolated:!0}){return new t3(e)},n4=n4||{},typeof n4!="object"&&(n4={name:n4});let i4=n4.name||"";if(typeof i4!="string")throw TypeError(`Expected string for "name" argument, got ${typeof i4}`);let a4=n4.suffix||"";if(typeof a4!="string")throw TypeError(`Expected string for "suffix" argument, got ${typeof a4}`);let s4=n4.isolated===void 0||n4.isolated===null?!0:n4.isolated;if(typeof s4!="boolean")throw TypeError(`Expected boolean for "isolated" argument, got ${typeof s4}`);i4||(i4=r3.parse(process.pkg?process.execPath:m.main?m.main.filename:process.argv[0]).name),a4&&(i4+=a4),this._fn.$name=()=>i4,this._fn.$isolated=()=>s4;let u3=o3?l3(i4,s4):c4(i4,s4);return Object.keys(u3).forEach(e=>{this._fn[e]=u3[e]}),this._fn}}}}),_2={};u2(_2,{CRED_STORAGE_CONFIG_VALUES:()=>v2,CRED_STORAGE_VALUES:()=>y2,DEFAULT_CRED_STORAGE:()=>b2,authConfigHasUsableTokenData:()=>Ko,authConfigSchema:()=>io,credStorageSchema:()=>no,defaultAuthConfig:()=>So,defaultGlobalConfig:()=>bo,deleteAuthConfig:()=>Bo,deleteAuthConfigFile:()=>zo,getAuthConfigFilePath:()=>vo,getCachePath:()=>ho,getConfigFilePath:()=>_o,getDataPath:()=>mo,getDefaultAuthConfig:()=>xo,getGlobalPathConfig:()=>go,getLikelyEffectiveCredStorage:()=>Yo,globalConfigSchema:()=>ro,guidanceConfigSchema:()=>eo,parseAuthConfig:()=>To,parseAuthFileConfig:()=>Eo,parseGlobalConfig:()=>wo,readAuthConfig:()=>Fo,readAuthConfigFile:()=>No,readAuthFileConfig:()=>Po,readConfigFile:()=>ko,readGlobalConfigFile:()=>jo,telemetryConfigSchema:()=>$a,tryReadAuthConfig:()=>Io,updatesConfigSchema:()=>to,writeAuthConfig:()=>Ro,writeAuthConfigFile:()=>Lo,writeConfigFile:()=>Ao,writeGlobalConfigFile:()=>Mo}),n2.exports=p2(_2);var v2=["auto","file","keyring"],y2=v2.filter(e=>e!=="auto"),b2="file";Object.freeze({status:"aborted"});function x2(e,t2,n3){function r3(n4,r4){var i4;for(let a4 in Object.defineProperty(n4,"_zod",{value:n4._zod??{},enumerable:!1}),(i4=n4._zod).traits??(i4.traits=new Set),n4._zod.traits.add(e),t2(n4,r4),o3.prototype)a4 in n4||Object.defineProperty(n4,a4,{value:o3.prototype[a4].bind(n4)});n4._zod.constr=o3,n4._zod.def=r4}let i3=n3?.Parent??Object;class a3 extends i3{}Object.defineProperty(a3,"name",{value:e});function o3(e2){var t3;let i4=n3?.Parent?new a3:this;r3(i4,e2),(t3=i4._zod).deferred??(t3.deferred=[]);for(let e3 of i4._zod.deferred)e3();return i4}return Object.defineProperty(o3,"init",{value:r3}),Object.defineProperty(o3,Symbol.hasInstance,{value:t3=>n3?.Parent&&t3 instanceof n3.Parent?!0:t3?._zod?.traits?.has(e)}),Object.defineProperty(o3,"name",{value:e}),o3}var S2=class extends Error{constructor(){super("Encountered Promise during synchronous parse. Use .parseAsync() instead.")}},C2=class extends Error{constructor(e){super(`Encountered unidirectional transform during encode: ${e}`),this.name="ZodEncodeError"}},w2={};function T2(e){return e&&Object.assign(w2,e),w2}var E2={};u2(E2,{BIGINT_FORMAT_RANGES:()=>xe,Class:()=>Ve,NUMBER_FORMAT_RANGES:()=>be,aborted:()=>W,allowsEval:()=>de,assert:()=>k2,assertEqual:()=>ee2,assertIs:()=>D2,assertNever:()=>O2,assertNotEqual:()=>te2,assignProp:()=>I2,base64ToUint8Array:()=>Fe,base64urlToUint8Array:()=>Le,cached:()=>re2,captureStackTrace:()=>z2,cleanEnum:()=>Pe,cleanRegex:()=>N2,clone:()=>H,cloneDef:()=>oe2,createTransparentProxy:()=>_e,defineLazy:()=>F2,esc:()=>R2,escapeRegex:()=>V,extend:()=>we,finalizeIssue:()=>G,floatSafeRemainder:()=>P2,getElementAtPath:()=>se2,getEnumValues:()=>A2,getLengthableOrigin:()=>Me,getParsedType:()=>me,getSizableOrigin:()=>je,hexToUint8Array:()=>ze,isObject:()=>ue,isPlainObject:()=>B,issue:()=>Ne,joinValues:()=>ne2,jsonStringifyReplacer:()=>j2,merge:()=>Ee,mergeDefs:()=>L2,normalizeParams:()=>U,nullish:()=>M2,numKeys:()=>pe,objectClone:()=>ae2,omit:()=>Ce,optionalKeys:()=>ye,partial:()=>De,pick:()=>Se,prefixIssues:()=>ke,primitiveTypes:()=>ge,promiseAllObject:()=>ce2,propertyKeyTypes:()=>he,randomString:()=>le2,required:()=>Oe,safeExtend:()=>Te,shallowClone:()=>fe,stringifyPrimitive:()=>ve,uint8ArrayToBase64:()=>Ie,uint8ArrayToBase64url:()=>Re,uint8ArrayToHex:()=>Be,unwrapMessage:()=>Ae});function ee2(e){return e}function te2(e){return e}function D2(e){}function O2(e){throw Error()}function k2(e){}function A2(e){let t2=Object.values(e).filter(e2=>typeof e2=="number");return Object.entries(e).filter(([e2,n3])=>t2.indexOf(+e2)===-1).map(([e2,t3])=>t3)}function ne2(e,t2="|"){return e.map(e2=>ve(e2)).join(t2)}function j2(e,t2){return typeof t2=="bigint"?t2.toString():t2}function re2(e){return{get value(){{let t2=e();return Object.defineProperty(this,"value",{value:t2}),t2}throw Error("cached value already set")}}}function M2(e){return e==null}function N2(e){let t2=e.startsWith("^")?1:0,n3=e.endsWith("$")?e.length-1:e.length;return e.slice(t2,n3)}function P2(e,t2){let n3=(e.toString().split(".")[1]||"").length,r3=t2.toString(),i3=(r3.split(".")[1]||"").length;if(i3===0&&/\d?e-\d?/.test(r3)){let e2=r3.match(/\d?e-(\d?)/);e2?.[1]&&(i3=Number.parseInt(e2[1]))}let a3=n3>i3?n3:i3;return Number.parseInt(e.toFixed(a3).replace(".",""))%Number.parseInt(t2.toFixed(a3).replace(".",""))/10**a3}var ie2=Symbol("evaluating");function F2(e,t2,n3){let r3;Object.defineProperty(e,t2,{get(){if(r3!==ie2)return r3===void 0&&(r3=ie2,r3=n3()),r3},set(n4){Object.defineProperty(e,t2,{value:n4})},configurable:!0})}function ae2(e){return Object.create(Object.getPrototypeOf(e),Object.getOwnPropertyDescriptors(e))}function I2(e,t2,n3){Object.defineProperty(e,t2,{value:n3,writable:!0,enumerable:!0,configurable:!0})}function L2(...e){let t2={};for(let n3 of e){let e2=Object.getOwnPropertyDescriptors(n3);Object.assign(t2,e2)}return Object.defineProperties({},t2)}function oe2(e){return L2(e._zod.def)}function se2(e,t2){return t2?t2.reduce((e2,t3)=>e2?.[t3],e):e}function ce2(e){let t2=Object.keys(e),n3=t2.map(t3=>e[t3]);return Promise.all(n3).then(e2=>{let n4={};for(let r3=0;r3<t2.length;r3++)n4[t2[r3]]=e2[r3];return n4})}function le2(e=10){let t2="";for(let n3=0;n3<e;n3++)t2+="abcdefghijklmnopqrstuvwxyz"[Math.floor(Math.random()*26)];return t2}function R2(e){return JSON.stringify(e)}var z2="captureStackTrace"in Error?Error.captureStackTrace:(...e)=>{};function ue(e){return typeof e=="object"&&!!e&&!Array.isArray(e)}var de=re2(()=>{if(typeof navigator<"u"&&navigator?.userAgent?.includes("Cloudflare"))return!1;try{return Function(""),!0}catch{return!1}});function B(e){if(ue(e)===!1)return!1;let t2=e.constructor;if(t2===void 0)return!0;let n3=t2.prototype;return!(ue(n3)===!1||Object.prototype.hasOwnProperty.call(n3,"isPrototypeOf")===!1)}function fe(e){return B(e)?{...e}:Array.isArray(e)?[...e]:e}function pe(e){let t2=0;for(let n3 in e)Object.prototype.hasOwnProperty.call(e,n3)&&t2++;return t2}var me=e=>{let t2=typeof e;switch(t2){case"undefined":return"undefined";case"string":return"string";case"number":return Number.isNaN(e)?"nan":"number";case"boolean":return"boolean";case"function":return"function";case"bigint":return"bigint";case"symbol":return"symbol";case"object":return Array.isArray(e)?"array":e===null?"null":e.then&&typeof e.then=="function"&&e.catch&&typeof e.catch=="function"?"promise":typeof Map<"u"&&e instanceof Map?"map":typeof Set<"u"&&e instanceof Set?"set":typeof Date<"u"&&e instanceof Date?"date":typeof File<"u"&&e instanceof File?"file":"object";default:throw Error(`Unknown data type: ${t2}`)}},he=new Set(["string","number","symbol"]),ge=new Set(["string","number","bigint","boolean","symbol","undefined"]);function V(e){return e.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function H(e,t2,n3){let r3=new e._zod.constr(t2??e._zod.def);return(!t2||n3?.parent)&&(r3._zod.parent=e),r3}function U(e){let t2=e;if(!t2)return{};if(typeof t2=="string")return{error:()=>t2};if(t2?.message!==void 0){if(t2?.error!==void 0)throw Error("Cannot specify both `message` and `error` params");t2.error=t2.message}return delete t2.message,typeof t2.error=="string"?{...t2,error:()=>t2.error}:t2}function _e(e){let t2;return new Proxy({},{get(n3,r3,i3){return t2??(t2=e()),Reflect.get(t2,r3,i3)},set(n3,r3,i3,a3){return t2??(t2=e()),Reflect.set(t2,r3,i3,a3)},has(n3,r3){return t2??(t2=e()),Reflect.has(t2,r3)},deleteProperty(n3,r3){return t2??(t2=e()),Reflect.deleteProperty(t2,r3)},ownKeys(n3){return t2??(t2=e()),Reflect.ownKeys(t2)},getOwnPropertyDescriptor(n3,r3){return t2??(t2=e()),Reflect.getOwnPropertyDescriptor(t2,r3)},defineProperty(n3,r3,i3){return t2??(t2=e()),Reflect.defineProperty(t2,r3,i3)}})}function ve(e){return typeof e=="bigint"?e.toString()+"n":typeof e=="string"?`"${e}"`:`${e}`}function ye(e){return Object.keys(e).filter(t2=>e[t2]._zod.optin==="optional"&&e[t2]._zod.optout==="optional")}var be={safeint:[-(2**53-1),2**53-1],int32:[-2147483648,2147483647],uint32:[0,4294967295],float32:[-34028234663852886e22,34028234663852886e22],float64:[-Number.MAX_VALUE,Number.MAX_VALUE]},xe={int64:[BigInt("-9223372036854775808"),BigInt("9223372036854775807")],uint64:[BigInt(0),BigInt("18446744073709551615")]};function Se(e,t2){let n3=e._zod.def;return H(e,L2(e._zod.def,{get shape(){let e2={};for(let r3 in t2){if(!(r3 in n3.shape))throw Error(`Unrecognized key: "${r3}"`);t2[r3]&&(e2[r3]=n3.shape[r3])}return I2(this,"shape",e2),e2},checks:[]}))}function Ce(e,t2){let n3=e._zod.def;return H(e,L2(e._zod.def,{get shape(){let r3={...e._zod.def.shape};for(let e2 in t2){if(!(e2 in n3.shape))throw Error(`Unrecognized key: "${e2}"`);t2[e2]&&delete r3[e2]}return I2(this,"shape",r3),r3},checks:[]}))}function we(e,t2){if(!B(t2))throw Error("Invalid input to extend: expected a plain object");let n3=e._zod.def.checks;if(n3&&n3.length>0)throw Error("Object schemas containing refinements cannot be extended. Use `.safeExtend()` instead.");return H(e,L2(e._zod.def,{get shape(){let n4={...e._zod.def.shape,...t2};return I2(this,"shape",n4),n4},checks:[]}))}function Te(e,t2){if(!B(t2))throw Error("Invalid input to safeExtend: expected a plain object");return H(e,{...e._zod.def,get shape(){let n3={...e._zod.def.shape,...t2};return I2(this,"shape",n3),n3},checks:e._zod.def.checks})}function Ee(e,t2){return H(e,L2(e._zod.def,{get shape(){let n3={...e._zod.def.shape,...t2._zod.def.shape};return I2(this,"shape",n3),n3},get catchall(){return t2._zod.def.catchall},checks:[]}))}function De(e,t2,n3){return H(t2,L2(t2._zod.def,{get shape(){let r3=t2._zod.def.shape,i3={...r3};if(n3)for(let t3 in n3){if(!(t3 in r3))throw Error(`Unrecognized key: "${t3}"`);n3[t3]&&(i3[t3]=e?new e({type:"optional",innerType:r3[t3]}):r3[t3])}else for(let t3 in r3)i3[t3]=e?new e({type:"optional",innerType:r3[t3]}):r3[t3];return I2(this,"shape",i3),i3},checks:[]}))}function Oe(e,t2,n3){return H(t2,L2(t2._zod.def,{get shape(){let r3=t2._zod.def.shape,i3={...r3};if(n3)for(let t3 in n3){if(!(t3 in i3))throw Error(`Unrecognized key: "${t3}"`);n3[t3]&&(i3[t3]=new e({type:"nonoptional",innerType:r3[t3]}))}else for(let t3 in r3)i3[t3]=new e({type:"nonoptional",innerType:r3[t3]});return I2(this,"shape",i3),i3},checks:[]}))}function W(e,t2=0){if(e.aborted===!0)return!0;for(let n3=t2;n3<e.issues.length;n3++)if(e.issues[n3]?.continue!==!0)return!0;return!1}function ke(e,t2){return t2.map(t3=>{var n3;return(n3=t3).path??(n3.path=[]),t3.path.unshift(e),t3})}function Ae(e){return typeof e=="string"?e:e?.message}function G(e,t2,n3){let r3={...e,path:e.path??[]};return e.message||(r3.message=Ae(e.inst?._zod.def?.error?.(e))??Ae(t2?.error?.(e))??Ae(n3.customError?.(e))??Ae(n3.localeError?.(e))??"Invalid input"),delete r3.inst,delete r3.continue,t2?.reportInput||delete r3.input,r3}function je(e){return e instanceof Set?"set":e instanceof Map?"map":e instanceof File?"file":"unknown"}function Me(e){return Array.isArray(e)?"array":typeof e=="string"?"string":"unknown"}function Ne(...e){let[t2,n3,r3]=e;return typeof t2=="string"?{message:t2,code:"custom",input:n3,inst:r3}:{...t2}}function Pe(e){return Object.entries(e).filter(([e2,t2])=>Number.isNaN(Number.parseInt(e2,10))).map(e2=>e2[1])}function Fe(e){let t2=atob(e),n3=new Uint8Array(t2.length);for(let e2=0;e2<t2.length;e2++)n3[e2]=t2.charCodeAt(e2);return n3}function Ie(e){let t2="";for(let n3=0;n3<e.length;n3++)t2+=String.fromCharCode(e[n3]);return btoa(t2)}function Le(e){let t2=e.replace(/-/g,"+").replace(/_/g,"/");return Fe(t2+"=".repeat((4-t2.length%4)%4))}function Re(e){return Ie(e).replace(/\+/g,"-").replace(/\//g,"_").replace(/=/g,"")}function ze(e){let t2=e.replace(/^0x/,"");if(t2.length%2!=0)throw Error("Invalid hex string length");let n3=new Uint8Array(t2.length/2);for(let e2=0;e2<t2.length;e2+=2)n3[e2/2]=Number.parseInt(t2.slice(e2,e2+2),16);return n3}function Be(e){return Array.from(e).map(e2=>e2.toString(16).padStart(2,"0")).join("")}var Ve=class{constructor(...e){}},He=(e,t2)=>{e.name="$ZodError",Object.defineProperty(e,"_zod",{value:e._zod,enumerable:!1}),Object.defineProperty(e,"issues",{value:t2,enumerable:!1}),e.message=JSON.stringify(t2,j2,2),Object.defineProperty(e,"toString",{value:()=>e.message,enumerable:!1})},Ue=x2("$ZodError",He),We=x2("$ZodError",He,{Parent:Error});function Ge(e,t2=e2=>e2.message){let n3={},r3=[];for(let i3 of e.issues)i3.path.length>0?(n3[i3.path[0]]=n3[i3.path[0]]||[],n3[i3.path[0]].push(t2(i3))):r3.push(t2(i3));return{formErrors:r3,fieldErrors:n3}}function Ke(e,t2){let n3=t2||function(e2){return e2.message},r3={_errors:[]},i3=e2=>{for(let t3 of e2.issues)if(t3.code==="invalid_union"&&t3.errors.length)t3.errors.map(e3=>i3({issues:e3}));else if(t3.code==="invalid_key")i3({issues:t3.issues});else if(t3.code==="invalid_element")i3({issues:t3.issues});else if(t3.path.length===0)r3._errors.push(n3(t3));else{let e3=r3,i4=0;for(;i4<t3.path.length;){let r4=t3.path[i4];i4===t3.path.length-1?(e3[r4]=e3[r4]||{_errors:[]},e3[r4]._errors.push(n3(t3))):e3[r4]=e3[r4]||{_errors:[]},e3=e3[r4],i4++}}};return i3(e),r3}var qe=e=>(t2,n3,r3,i3)=>{let a3=r3?Object.assign(r3,{async:!1}):{async:!1},o3=t2._zod.run({value:n3,issues:[]},a3);if(o3 instanceof Promise)throw new S2;if(o3.issues.length){let t3=new(i3?.Err??e)(o3.issues.map(e2=>G(e2,a3,T2())));throw z2(t3,i3?.callee),t3}return o3.value},Je=e=>async(t2,n3,r3,i3)=>{let a3=r3?Object.assign(r3,{async:!0}):{async:!0},o3=t2._zod.run({value:n3,issues:[]},a3);if(o3 instanceof Promise&&(o3=await o3),o3.issues.length){let t3=new(i3?.Err??e)(o3.issues.map(e2=>G(e2,a3,T2())));throw z2(t3,i3?.callee),t3}return o3.value},Ye=e=>(t2,n3,r3)=>{let i3=r3?{...r3,async:!1}:{async:!1},a3=t2._zod.run({value:n3,issues:[]},i3);if(a3 instanceof Promise)throw new S2;return a3.issues.length?{success:!1,error:new(e??Ue)(a3.issues.map(e2=>G(e2,i3,T2())))}:{success:!0,data:a3.value}},Xe=Ye(We),Ze=e=>async(t2,n3,r3)=>{let i3=r3?Object.assign(r3,{async:!0}):{async:!0},a3=t2._zod.run({value:n3,issues:[]},i3);return a3 instanceof Promise&&(a3=await a3),a3.issues.length?{success:!1,error:new e(a3.issues.map(e2=>G(e2,i3,T2())))}:{success:!0,data:a3.value}},Qe=Ze(We),$e=e=>(t2,n3,r3)=>{let i3=r3?Object.assign(r3,{direction:"backward"}):{direction:"backward"};return qe(e)(t2,n3,i3)},et=e=>(t2,n3,r3)=>qe(e)(t2,n3,r3),tt=e=>async(t2,n3,r3)=>{let i3=r3?Object.assign(r3,{direction:"backward"}):{direction:"backward"};return Je(e)(t2,n3,i3)},nt=e=>async(t2,n3,r3)=>Je(e)(t2,n3,r3),rt=e=>(t2,n3,r3)=>{let i3=r3?Object.assign(r3,{direction:"backward"}):{direction:"backward"};return Ye(e)(t2,n3,i3)},it=e=>(t2,n3,r3)=>Ye(e)(t2,n3,r3),at=e=>async(t2,n3,r3)=>{let i3=r3?Object.assign(r3,{direction:"backward"}):{direction:"backward"};return Ze(e)(t2,n3,i3)},ot=e=>async(t2,n3,r3)=>Ze(e)(t2,n3,r3),st=/^[cC][^\s-]{8,}$/,ct=/^[0-9a-z]+$/,lt=/^[0-9A-HJKMNP-TV-Za-hjkmnp-tv-z]{26}$/,ut=/^[0-9a-vA-V]{20}$/,dt=/^[A-Za-z0-9]{27}$/,ft=/^[a-zA-Z0-9_-]{21}$/,pt=/^P(?:(\d+W)|(?!.*W)(?=\d|T\d)(\d+Y)?(\d+M)?(\d+D)?(T(?=\d)(\d+H)?(\d+M)?(\d+([.,]\d+)?S)?)?)$/,mt=/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{4}-[0-9a-fA-F]{12})$/,ht=e=>e?RegExp(`^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-${e}[0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12})$`):/^([0-9a-fA-F]{8}-[0-9a-fA-F]{4}-[1-8][0-9a-fA-F]{3}-[89abAB][0-9a-fA-F]{3}-[0-9a-fA-F]{12}|00000000-0000-0000-0000-000000000000|ffffffff-ffff-ffff-ffff-ffffffffffff)$/,gt=/^(?!\.)(?!.*\.\.)([A-Za-z0-9_'+\-\.]*)[A-Za-z0-9_+-]@([A-Za-z0-9][A-Za-z0-9\-]*\.)+[A-Za-z]{2,}$/,_t="^(\\p{Extended_Pictographic}|\\p{Emoji_Component})+$";function vt(){return new RegExp(_t,"u")}var yt=/^(?:(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(?:25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])$/,bt=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,7}:|([0-9a-fA-F]{1,4}:){1,6}:[0-9a-fA-F]{1,4}|([0-9a-fA-F]{1,4}:){1,5}(:[0-9a-fA-F]{1,4}){1,2}|([0-9a-fA-F]{1,4}:){1,4}(:[0-9a-fA-F]{1,4}){1,3}|([0-9a-fA-F]{1,4}:){1,3}(:[0-9a-fA-F]{1,4}){1,4}|([0-9a-fA-F]{1,4}:){1,2}(:[0-9a-fA-F]{1,4}){1,5}|[0-9a-fA-F]{1,4}:((:[0-9a-fA-F]{1,4}){1,6})|:((:[0-9a-fA-F]{1,4}){1,7}|:))$/,xt=/^((25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\.){3}(25[0-5]|2[0-4][0-9]|1[0-9][0-9]|[1-9][0-9]|[0-9])\/([0-9]|[1-2][0-9]|3[0-2])$/,St=/^(([0-9a-fA-F]{1,4}:){7}[0-9a-fA-F]{1,4}|::|([0-9a-fA-F]{1,4})?::([0-9a-fA-F]{1,4}:?){0,6})\/(12[0-8]|1[01][0-9]|[1-9]?[0-9])$/,Ct=/^$|^(?:[0-9a-zA-Z+/]{4})*(?:(?:[0-9a-zA-Z+/]{2}==)|(?:[0-9a-zA-Z+/]{3}=))?$/,wt=/^[A-Za-z0-9_-]*$/,Tt=/^(?=.{1,253}\.?$)[a-zA-Z0-9](?:[a-zA-Z0-9-]{0,61}[a-zA-Z0-9])?(?:\.[a-zA-Z0-9](?:[-0-9a-zA-Z]{0,61}[0-9a-zA-Z])?)*\.?$/,Et=/^\+(?:[0-9]){6,14}[0-9]$/,Dt="(?:(?:\\d\\d[2468][048]|\\d\\d[13579][26]|\\d\\d0[48]|[02468][048]00|[13579][26]00)-02-29|\\d{4}-(?:(?:0[13578]|1[02])-(?:0[1-9]|[12]\\d|3[01])|(?:0[469]|11)-(?:0[1-9]|[12]\\d|30)|(?:02)-(?:0[1-9]|1\\d|2[0-8])))",Ot=RegExp(`^${Dt}$`);function kt(e){let t2="(?:[01]\\d|2[0-3]):[0-5]\\d";return typeof e.precision=="number"?e.precision===-1?`${t2}`:e.precision===0?`${t2}:[0-5]\\d`:`${t2}:[0-5]\\d\\.\\d{${e.precision}}`:`${t2}(?::[0-5]\\d(?:\\.\\d+)?)?`}function At(e){return RegExp(`^${kt(e)}$`)}function jt(e){let t2=kt({precision:e.precision}),n3=["Z"];e.local&&n3.push(""),e.offset&&n3.push("([+-](?:[01]\\d|2[0-3]):[0-5]\\d)");let r3=`${t2}(?:${n3.join("|")})`;return RegExp(`^${Dt}T(?:${r3})$`)}var Mt=e=>{let t2=e?`[\\s\\S]{${e?.minimum??0},${e?.maximum??""}}`:"[\\s\\S]*";return RegExp(`^${t2}$`)},Nt=/^-?\d+$/,Pt=/^-?\d+(?:\.\d+)?/,Ft=/^(?:true|false)$/i,It=/^[^A-Z]*$/,Lt=/^[^a-z]*$/,K=x2("$ZodCheck",(e,t2)=>{var n3;e._zod??(e._zod={}),e._zod.def=t2,(n3=e._zod).onattach??(n3.onattach=[])}),Rt={number:"number",bigint:"bigint",object:"date"},zt=x2("$ZodCheckLessThan",(e,t2)=>{K.init(e,t2);let n3=Rt[typeof t2.value];e._zod.onattach.push(e2=>{let n4=e2._zod.bag,r3=(t2.inclusive?n4.maximum:n4.exclusiveMaximum)??1/0;t2.value<r3&&(t2.inclusive?n4.maximum=t2.value:n4.exclusiveMaximum=t2.value)}),e._zod.check=r3=>{(t2.inclusive?r3.value<=t2.value:r3.value<t2.value)||r3.issues.push({origin:n3,code:"too_big",maximum:t2.value,input:r3.value,inclusive:t2.inclusive,inst:e,continue:!t2.abort})}}),Bt=x2("$ZodCheckGreaterThan",(e,t2)=>{K.init(e,t2);let n3=Rt[typeof t2.value];e._zod.onattach.push(e2=>{let n4=e2._zod.bag,r3=(t2.inclusive?n4.minimum:n4.exclusiveMinimum)??-1/0;t2.value>r3&&(t2.inclusive?n4.minimum=t2.value:n4.exclusiveMinimum=t2.value)}),e._zod.check=r3=>{(t2.inclusive?r3.value>=t2.value:r3.value>t2.value)||r3.issues.push({origin:n3,code:"too_small",minimum:t2.value,input:r3.value,inclusive:t2.inclusive,inst:e,continue:!t2.abort})}}),Vt=x2("$ZodCheckMultipleOf",(e,t2)=>{K.init(e,t2),e._zod.onattach.push(e2=>{var n3;(n3=e2._zod.bag).multipleOf??(n3.multipleOf=t2.value)}),e._zod.check=n3=>{if(typeof n3.value!=typeof t2.value)throw Error("Cannot mix number and bigint in multiple_of check.");(typeof n3.value=="bigint"?n3.value%t2.value===BigInt(0):P2(n3.value,t2.value)===0)||n3.issues.push({origin:typeof n3.value,code:"not_multiple_of",divisor:t2.value,input:n3.value,inst:e,continue:!t2.abort})}}),Ht=x2("$ZodCheckNumberFormat",(e,t2)=>{K.init(e,t2),t2.format=t2.format||"float64";let n3=t2.format?.includes("int"),r3=n3?"int":"number",[i3,a3]=be[t2.format];e._zod.onattach.push(e2=>{let r4=e2._zod.bag;r4.format=t2.format,r4.minimum=i3,r4.maximum=a3,n3&&(r4.pattern=Nt)}),e._zod.check=o3=>{let s3=o3.value;if(n3){if(!Number.isInteger(s3)){o3.issues.push({expected:r3,format:t2.format,code:"invalid_type",continue:!1,input:s3,inst:e});return}if(!Number.isSafeInteger(s3)){s3>0?o3.issues.push({input:s3,code:"too_big",maximum:2**53-1,note:"Integers must be within the safe integer range.",inst:e,origin:r3,continue:!t2.abort}):o3.issues.push({input:s3,code:"too_small",minimum:-(2**53-1),note:"Integers must be within the safe integer range.",inst:e,origin:r3,continue:!t2.abort});return}}s3<i3&&o3.issues.push({origin:"number",input:s3,code:"too_small",minimum:i3,inclusive:!0,inst:e,continue:!t2.abort}),s3>a3&&o3.issues.push({origin:"number",input:s3,code:"too_big",maximum:a3,inst:e})}}),Ut=x2("$ZodCheckMaxLength",(e,t2)=>{var n3;K.init(e,t2),(n3=e._zod.def).when??(n3.when=e2=>{let t3=e2.value;return!M2(t3)&&t3.length!==void 0}),e._zod.onattach.push(e2=>{let n4=e2._zod.bag.maximum??1/0;t2.maximum<n4&&(e2._zod.bag.maximum=t2.maximum)}),e._zod.check=n4=>{let r3=n4.value;if(r3.length<=t2.maximum)return;let i3=Me(r3);n4.issues.push({origin:i3,code:"too_big",maximum:t2.maximum,inclusive:!0,input:r3,inst:e,continue:!t2.abort})}}),Wt=x2("$ZodCheckMinLength",(e,t2)=>{var n3;K.init(e,t2),(n3=e._zod.def).when??(n3.when=e2=>{let t3=e2.value;return!M2(t3)&&t3.length!==void 0}),e._zod.onattach.push(e2=>{let n4=e2._zod.bag.minimum??-1/0;t2.minimum>n4&&(e2._zod.bag.minimum=t2.minimum)}),e._zod.check=n4=>{let r3=n4.value;if(r3.length>=t2.minimum)return;let i3=Me(r3);n4.issues.push({origin:i3,code:"too_small",minimum:t2.minimum,inclusive:!0,input:r3,inst:e,continue:!t2.abort})}}),Gt=x2("$ZodCheckLengthEquals",(e,t2)=>{var n3;K.init(e,t2),(n3=e._zod.def).when??(n3.when=e2=>{let t3=e2.value;return!M2(t3)&&t3.length!==void 0}),e._zod.onattach.push(e2=>{let n4=e2._zod.bag;n4.minimum=t2.length,n4.maximum=t2.length,n4.length=t2.length}),e._zod.check=n4=>{let r3=n4.value,i3=r3.length;if(i3===t2.length)return;let a3=Me(r3),o3=i3>t2.length;n4.issues.push({origin:a3,...o3?{code:"too_big",maximum:t2.length}:{code:"too_small",minimum:t2.length},inclusive:!0,exact:!0,input:n4.value,inst:e,continue:!t2.abort})}}),Kt=x2("$ZodCheckStringFormat",(e,t2)=>{var n3,r3;K.init(e,t2),e._zod.onattach.push(e2=>{let n4=e2._zod.bag;n4.format=t2.format,t2.pattern&&(n4.patterns??(n4.patterns=new Set),n4.patterns.add(t2.pattern))}),t2.pattern?(n3=e._zod).check??(n3.check=n4=>{t2.pattern.lastIndex=0,!t2.pattern.test(n4.value)&&n4.issues.push({origin:"string",code:"invalid_format",format:t2.format,input:n4.value,...t2.pattern?{pattern:t2.pattern.toString()}:{},inst:e,continue:!t2.abort})}):(r3=e._zod).check??(r3.check=()=>{})}),qt=x2("$ZodCheckRegex",(e,t2)=>{Kt.init(e,t2),e._zod.check=n3=>{t2.pattern.lastIndex=0,!t2.pattern.test(n3.value)&&n3.issues.push({origin:"string",code:"invalid_format",format:"regex",input:n3.value,pattern:t2.pattern.toString(),inst:e,continue:!t2.abort})}}),Jt=x2("$ZodCheckLowerCase",(e,t2)=>{t2.pattern??(t2.pattern=It),Kt.init(e,t2)}),Yt=x2("$ZodCheckUpperCase",(e,t2)=>{t2.pattern??(t2.pattern=Lt),Kt.init(e,t2)}),Xt=x2("$ZodCheckIncludes",(e,t2)=>{K.init(e,t2);let n3=V(t2.includes),r3=new RegExp(typeof t2.position=="number"?`^.{${t2.position}}${n3}`:n3);t2.pattern=r3,e._zod.onattach.push(e2=>{let t3=e2._zod.bag;t3.patterns??(t3.patterns=new Set),t3.patterns.add(r3)}),e._zod.check=n4=>{n4.value.includes(t2.includes,t2.position)||n4.issues.push({origin:"string",code:"invalid_format",format:"includes",includes:t2.includes,input:n4.value,inst:e,continue:!t2.abort})}}),Zt=x2("$ZodCheckStartsWith",(e,t2)=>{K.init(e,t2);let n3=RegExp(`^${V(t2.prefix)}.*`);t2.pattern??(t2.pattern=n3),e._zod.onattach.push(e2=>{let t3=e2._zod.bag;t3.patterns??(t3.patterns=new Set),t3.patterns.add(n3)}),e._zod.check=n4=>{n4.value.startsWith(t2.prefix)||n4.issues.push({origin:"string",code:"invalid_format",format:"starts_with",prefix:t2.prefix,input:n4.value,inst:e,continue:!t2.abort})}}),Qt=x2("$ZodCheckEndsWith",(e,t2)=>{K.init(e,t2);let n3=RegExp(`.*${V(t2.suffix)}$`);t2.pattern??(t2.pattern=n3),e._zod.onattach.push(e2=>{let t3=e2._zod.bag;t3.patterns??(t3.patterns=new Set),t3.patterns.add(n3)}),e._zod.check=n4=>{n4.value.endsWith(t2.suffix)||n4.issues.push({origin:"string",code:"invalid_format",format:"ends_with",suffix:t2.suffix,input:n4.value,inst:e,continue:!t2.abort})}}),$t=x2("$ZodCheckOverwrite",(e,t2)=>{K.init(e,t2),e._zod.check=e2=>{e2.value=t2.tx(e2.value)}}),en=class{constructor(e=[]){this.content=[],this.indent=0,this&&(this.args=e)}indented(e){this.indent+=1,e(this),--this.indent}write(e){if(typeof e=="function"){e(this,{execution:"sync"}),e(this,{execution:"async"});return}let t2=e.split(`
|
|
12
|
+
`).filter(e2=>e2),n3=Math.min(...t2.map(e2=>e2.length-e2.trimStart().length)),r3=t2.map(e2=>e2.slice(n3)).map(e2=>" ".repeat(this.indent*2)+e2);for(let e2 of r3)this.content.push(e2)}compile(){let e=Function,t2=this?.args,n3=[...(this?.content??[""]).map(e2=>` ${e2}`)];return new e(...t2,n3.join(`
|
|
13
|
+
`))}},tn={major:4,minor:1,patch:11},q=x2("$ZodType",(e,t2)=>{var n3;e??(e={}),e._zod.def=t2,e._zod.bag=e._zod.bag||{},e._zod.version=tn;let r3=[...e._zod.def.checks??[]];e._zod.traits.has("$ZodCheck")&&r3.unshift(e);for(let t3 of r3)for(let n4 of t3._zod.onattach)n4(e);if(r3.length===0)(n3=e._zod).deferred??(n3.deferred=[]),e._zod.deferred?.push(()=>{e._zod.run=e._zod.parse});else{let t3=(e2,t4,n5)=>{let r4=W(e2),i3;for(let a3 of t4){if(a3._zod.def.when){if(!a3._zod.def.when(e2))continue}else if(r4)continue;let t5=e2.issues.length,o3=a3._zod.check(e2);if(o3 instanceof Promise&&n5?.async===!1)throw new S2;if(i3||o3 instanceof Promise)i3=(i3??Promise.resolve()).then(async()=>{await o3,e2.issues.length!==t5&&(r4||(r4=W(e2,t5)))});else{if(e2.issues.length===t5)continue;r4||(r4=W(e2,t5))}}return i3?i3.then(()=>e2):e2},n4=(n5,i3,a3)=>{if(W(n5))return n5.aborted=!0,n5;let o3=t3(i3,r3,a3);if(o3 instanceof Promise){if(a3.async===!1)throw new S2;return o3.then(t4=>e._zod.parse(t4,a3))}return e._zod.parse(o3,a3)};e._zod.run=(i3,a3)=>{if(a3.skipChecks)return e._zod.parse(i3,a3);if(a3.direction==="backward"){let t4=e._zod.parse({value:i3.value,issues:[]},{...a3,skipChecks:!0});return t4 instanceof Promise?t4.then(e2=>n4(e2,i3,a3)):n4(t4,i3,a3)}let o3=e._zod.parse(i3,a3);if(o3 instanceof Promise){if(a3.async===!1)throw new S2;return o3.then(e2=>t3(e2,r3,a3))}return t3(o3,r3,a3)}}e["~standard"]={validate:t3=>{try{let n4=Xe(e,t3);return n4.success?{value:n4.data}:{issues:n4.error?.issues}}catch{return Qe(e,t3).then(e2=>e2.success?{value:e2.data}:{issues:e2.error?.issues})}},vendor:"zod",version:1}}),nn=x2("$ZodString",(e,t2)=>{q.init(e,t2),e._zod.pattern=[...e?._zod.bag?.patterns??[]].pop()??Mt(e._zod.bag),e._zod.parse=(n3,r3)=>{if(t2.coerce)try{n3.value=String(n3.value)}catch{}return typeof n3.value=="string"||n3.issues.push({expected:"string",code:"invalid_type",input:n3.value,inst:e}),n3}}),J=x2("$ZodStringFormat",(e,t2)=>{Kt.init(e,t2),nn.init(e,t2)}),rn=x2("$ZodGUID",(e,t2)=>{t2.pattern??(t2.pattern=mt),J.init(e,t2)}),an=x2("$ZodUUID",(e,t2)=>{if(t2.version){let e2={v1:1,v2:2,v3:3,v4:4,v5:5,v6:6,v7:7,v8:8}[t2.version];if(e2===void 0)throw Error(`Invalid UUID version: "${t2.version}"`);t2.pattern??(t2.pattern=ht(e2))}else t2.pattern??(t2.pattern=ht());J.init(e,t2)}),on=x2("$ZodEmail",(e,t2)=>{t2.pattern??(t2.pattern=gt),J.init(e,t2)}),sn=x2("$ZodURL",(e,t2)=>{J.init(e,t2),e._zod.check=n3=>{try{let r3=n3.value.trim(),i3=new URL(r3);t2.hostname&&(t2.hostname.lastIndex=0,t2.hostname.test(i3.hostname)||n3.issues.push({code:"invalid_format",format:"url",note:"Invalid hostname",pattern:Tt.source,input:n3.value,inst:e,continue:!t2.abort})),t2.protocol&&(t2.protocol.lastIndex=0,t2.protocol.test(i3.protocol.endsWith(":")?i3.protocol.slice(0,-1):i3.protocol)||n3.issues.push({code:"invalid_format",format:"url",note:"Invalid protocol",pattern:t2.protocol.source,input:n3.value,inst:e,continue:!t2.abort})),t2.normalize?n3.value=i3.href:n3.value=r3;return}catch{n3.issues.push({code:"invalid_format",format:"url",input:n3.value,inst:e,continue:!t2.abort})}}}),cn=x2("$ZodEmoji",(e,t2)=>{t2.pattern??(t2.pattern=vt()),J.init(e,t2)}),ln=x2("$ZodNanoID",(e,t2)=>{t2.pattern??(t2.pattern=ft),J.init(e,t2)}),un=x2("$ZodCUID",(e,t2)=>{t2.pattern??(t2.pattern=st),J.init(e,t2)}),dn=x2("$ZodCUID2",(e,t2)=>{t2.pattern??(t2.pattern=ct),J.init(e,t2)}),fn=x2("$ZodULID",(e,t2)=>{t2.pattern??(t2.pattern=lt),J.init(e,t2)}),pn=x2("$ZodXID",(e,t2)=>{t2.pattern??(t2.pattern=ut),J.init(e,t2)}),mn=x2("$ZodKSUID",(e,t2)=>{t2.pattern??(t2.pattern=dt),J.init(e,t2)}),hn=x2("$ZodISODateTime",(e,t2)=>{t2.pattern??(t2.pattern=jt(t2)),J.init(e,t2)}),gn=x2("$ZodISODate",(e,t2)=>{t2.pattern??(t2.pattern=Ot),J.init(e,t2)}),_n=x2("$ZodISOTime",(e,t2)=>{t2.pattern??(t2.pattern=At(t2)),J.init(e,t2)}),vn=x2("$ZodISODuration",(e,t2)=>{t2.pattern??(t2.pattern=pt),J.init(e,t2)}),yn=x2("$ZodIPv4",(e,t2)=>{t2.pattern??(t2.pattern=yt),J.init(e,t2),e._zod.onattach.push(e2=>{let t3=e2._zod.bag;t3.format="ipv4"})}),bn=x2("$ZodIPv6",(e,t2)=>{t2.pattern??(t2.pattern=bt),J.init(e,t2),e._zod.onattach.push(e2=>{let t3=e2._zod.bag;t3.format="ipv6"}),e._zod.check=n3=>{try{new URL(`http://[${n3.value}]`)}catch{n3.issues.push({code:"invalid_format",format:"ipv6",input:n3.value,inst:e,continue:!t2.abort})}}}),xn=x2("$ZodCIDRv4",(e,t2)=>{t2.pattern??(t2.pattern=xt),J.init(e,t2)}),Sn=x2("$ZodCIDRv6",(e,t2)=>{t2.pattern??(t2.pattern=St),J.init(e,t2),e._zod.check=n3=>{let r3=n3.value.split("/");try{if(r3.length!==2)throw Error();let[e2,t3]=r3;if(!t3)throw Error();let n4=Number(t3);if(`${n4}`!==t3||n4<0||n4>128)throw Error();new URL(`http://[${e2}]`)}catch{n3.issues.push({code:"invalid_format",format:"cidrv6",input:n3.value,inst:e,continue:!t2.abort})}}});function Cn(e){if(e==="")return!0;if(e.length%4!=0)return!1;try{return atob(e),!0}catch{return!1}}var wn=x2("$ZodBase64",(e,t2)=>{t2.pattern??(t2.pattern=Ct),J.init(e,t2),e._zod.onattach.push(e2=>{e2._zod.bag.contentEncoding="base64"}),e._zod.check=n3=>{Cn(n3.value)||n3.issues.push({code:"invalid_format",format:"base64",input:n3.value,inst:e,continue:!t2.abort})}});function Tn(e){if(!wt.test(e))return!1;let t2=e.replace(/[-_]/g,e2=>e2==="-"?"+":"/");return Cn(t2.padEnd(Math.ceil(t2.length/4)*4,"="))}var En=x2("$ZodBase64URL",(e,t2)=>{t2.pattern??(t2.pattern=wt),J.init(e,t2),e._zod.onattach.push(e2=>{e2._zod.bag.contentEncoding="base64url"}),e._zod.check=n3=>{Tn(n3.value)||n3.issues.push({code:"invalid_format",format:"base64url",input:n3.value,inst:e,continue:!t2.abort})}}),Dn=x2("$ZodE164",(e,t2)=>{t2.pattern??(t2.pattern=Et),J.init(e,t2)});function On(e,t2=null){try{let n3=e.split(".");if(n3.length!==3)return!1;let[r3]=n3;if(!r3)return!1;let i3=JSON.parse(atob(r3));return!("typ"in i3&&i3?.typ!=="JWT"||!i3.alg||t2&&(!("alg"in i3)||i3.alg!==t2))}catch{return!1}}var kn=x2("$ZodJWT",(e,t2)=>{J.init(e,t2),e._zod.check=n3=>{On(n3.value,t2.alg)||n3.issues.push({code:"invalid_format",format:"jwt",input:n3.value,inst:e,continue:!t2.abort})}}),An=x2("$ZodNumber",(e,t2)=>{q.init(e,t2),e._zod.pattern=e._zod.bag.pattern??Pt,e._zod.parse=(n3,r3)=>{if(t2.coerce)try{n3.value=Number(n3.value)}catch{}let i3=n3.value;if(typeof i3=="number"&&!Number.isNaN(i3)&&Number.isFinite(i3))return n3;let a3=typeof i3=="number"?Number.isNaN(i3)?"NaN":Number.isFinite(i3)?void 0:"Infinity":void 0;return n3.issues.push({expected:"number",code:"invalid_type",input:i3,inst:e,...a3?{received:a3}:{}}),n3}}),jn=x2("$ZodNumber",(e,t2)=>{Ht.init(e,t2),An.init(e,t2)}),Mn=x2("$ZodBoolean",(e,t2)=>{q.init(e,t2),e._zod.pattern=Ft,e._zod.parse=(n3,r3)=>{if(t2.coerce)try{n3.value=!!n3.value}catch{}let i3=n3.value;return typeof i3=="boolean"||n3.issues.push({expected:"boolean",code:"invalid_type",input:i3,inst:e}),n3}}),Nn=x2("$ZodUnknown",(e,t2)=>{q.init(e,t2),e._zod.parse=e2=>e2}),Pn=x2("$ZodNever",(e,t2)=>{q.init(e,t2),e._zod.parse=(t3,n3)=>(t3.issues.push({expected:"never",code:"invalid_type",input:t3.value,inst:e}),t3)});function Fn(e,t2,n3){e.issues.length&&t2.issues.push(...ke(n3,e.issues)),t2.value[n3]=e.value}var In=x2("$ZodArray",(e,t2)=>{q.init(e,t2),e._zod.parse=(n3,r3)=>{let i3=n3.value;if(!Array.isArray(i3))return n3.issues.push({expected:"array",code:"invalid_type",input:i3,inst:e}),n3;n3.value=Array(i3.length);let a3=[];for(let e2=0;e2<i3.length;e2++){let o3=i3[e2],s3=t2.element._zod.run({value:o3,issues:[]},r3);s3 instanceof Promise?a3.push(s3.then(t3=>Fn(t3,n3,e2))):Fn(s3,n3,e2)}return a3.length?Promise.all(a3).then(()=>n3):n3}});function Ln(e,t2,n3,r3){e.issues.length&&t2.issues.push(...ke(n3,e.issues)),e.value===void 0?n3 in r3&&(t2.value[n3]=void 0):t2.value[n3]=e.value}function Rn(e){let t2=Object.keys(e.shape);for(let n4 of t2)if(!e.shape?.[n4]?._zod?.traits?.has("$ZodType"))throw Error(`Invalid element at key "${n4}": expected a Zod schema`);let n3=ye(e.shape);return{...e,keys:t2,keySet:new Set(t2),numKeys:t2.length,optionalKeys:new Set(n3)}}function zn(e,t2,n3,r3,i3,a3){let o3=[],s3=i3.keySet,c4=i3.catchall._zod,l3=c4.def.type;for(let i4 of Object.keys(t2)){if(s3.has(i4))continue;if(l3==="never"){o3.push(i4);continue}let a4=c4.run({value:t2[i4],issues:[]},r3);a4 instanceof Promise?e.push(a4.then(e2=>Ln(e2,n3,i4,t2))):Ln(a4,n3,i4,t2)}return o3.length&&n3.issues.push({code:"unrecognized_keys",keys:o3,input:t2,inst:a3}),e.length?Promise.all(e).then(()=>n3):n3}var Bn=x2("$ZodObject",(e,t2)=>{if(q.init(e,t2),!Object.getOwnPropertyDescriptor(t2,"shape")?.get){let e2=t2.shape;Object.defineProperty(t2,"shape",{get:()=>{let n4={...e2};return Object.defineProperty(t2,"shape",{value:n4}),n4}})}let n3=re2(()=>Rn(t2));F2(e._zod,"propValues",()=>{let e2=t2.shape,n4={};for(let t3 in e2){let r4=e2[t3]._zod;if(r4.values){n4[t3]??(n4[t3]=new Set);for(let e3 of r4.values)n4[t3].add(e3)}}return n4});let r3=ue,i3=t2.catchall,a3;e._zod.parse=(t3,o3)=>{a3??(a3=n3.value);let s3=t3.value;if(!r3(s3))return t3.issues.push({expected:"object",code:"invalid_type",input:s3,inst:e}),t3;t3.value={};let c4=[],l3=a3.shape;for(let e2 of a3.keys){let n4=l3[e2]._zod.run({value:s3[e2],issues:[]},o3);n4 instanceof Promise?c4.push(n4.then(n5=>Ln(n5,t3,e2,s3))):Ln(n4,t3,e2,s3)}return i3?zn(c4,s3,t3,o3,n3.value,e):c4.length?Promise.all(c4).then(()=>t3):t3}}),Vn=x2("$ZodObjectJIT",(e,t2)=>{Bn.init(e,t2);let n3=e._zod.parse,r3=re2(()=>Rn(t2)),i3=e2=>{let t3=new en(["shape","payload","ctx"]),n4=r3.value,i4=e3=>{let t4=R2(e3);return`shape[${t4}]._zod.run({ value: input[${t4}], issues: [] }, ctx)`};t3.write("const input = payload.value;");let a4=Object.create(null),o4=0;for(let e3 of n4.keys)a4[e3]=`key_${o4++}`;t3.write("const newResult = {};");for(let e3 of n4.keys){let n5=a4[e3],r4=R2(e3);t3.write(`const ${n5} = ${i4(e3)};`),t3.write(`
|
|
14
|
+
if (${n5}.issues.length) {
|
|
15
|
+
payload.issues = payload.issues.concat(${n5}.issues.map(iss => ({
|
|
16
|
+
...iss,
|
|
17
|
+
path: iss.path ? [${r4}, ...iss.path] : [${r4}]
|
|
18
|
+
})));
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
|
|
22
|
+
if (${n5}.value === undefined) {
|
|
23
|
+
if (${r4} in input) {
|
|
24
|
+
newResult[${r4}] = undefined;
|
|
25
|
+
}
|
|
26
|
+
} else {
|
|
27
|
+
newResult[${r4}] = ${n5}.value;
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
`)}t3.write("payload.value = newResult;"),t3.write("return payload;");let s4=t3.compile();return(t4,n5)=>s4(e2,t4,n5)},a3,o3=ue,s3=!w2.jitless,c4=s3&&de.value,l3=t2.catchall,u3;e._zod.parse=(d3,f3)=>{u3??(u3=r3.value);let p3=d3.value;return o3(p3)?s3&&c4&&f3?.async===!1&&f3.jitless!==!0?(a3||(a3=i3(t2.shape)),d3=a3(d3,f3),l3?zn([],p3,d3,f3,u3,e):d3):n3(d3,f3):(d3.issues.push({expected:"object",code:"invalid_type",input:p3,inst:e}),d3)}});function Hn(e,t2,n3,r3){for(let n4 of e)if(n4.issues.length===0)return t2.value=n4.value,t2;let i3=e.filter(e2=>!W(e2));return i3.length===1?(t2.value=i3[0].value,i3[0]):(t2.issues.push({code:"invalid_union",input:t2.value,inst:n3,errors:e.map(e2=>e2.issues.map(e3=>G(e3,r3,T2())))}),t2)}var Un=x2("$ZodUnion",(e,t2)=>{q.init(e,t2),F2(e._zod,"optin",()=>t2.options.some(e2=>e2._zod.optin==="optional")?"optional":void 0),F2(e._zod,"optout",()=>t2.options.some(e2=>e2._zod.optout==="optional")?"optional":void 0),F2(e._zod,"values",()=>{if(t2.options.every(e2=>e2._zod.values))return new Set(t2.options.flatMap(e2=>Array.from(e2._zod.values)))}),F2(e._zod,"pattern",()=>{if(t2.options.every(e2=>e2._zod.pattern)){let e2=t2.options.map(e3=>e3._zod.pattern);return RegExp(`^(${e2.map(e3=>N2(e3.source)).join("|")})$`)}});let n3=t2.options.length===1,r3=t2.options[0]._zod.run;e._zod.parse=(i3,a3)=>{if(n3)return r3(i3,a3);let o3=!1,s3=[];for(let e2 of t2.options){let t3=e2._zod.run({value:i3.value,issues:[]},a3);if(t3 instanceof Promise)s3.push(t3),o3=!0;else{if(t3.issues.length===0)return t3;s3.push(t3)}}return o3?Promise.all(s3).then(t3=>Hn(t3,i3,e,a3)):Hn(s3,i3,e,a3)}}),Wn=x2("$ZodIntersection",(e,t2)=>{q.init(e,t2),e._zod.parse=(e2,n3)=>{let r3=e2.value,i3=t2.left._zod.run({value:r3,issues:[]},n3),a3=t2.right._zod.run({value:r3,issues:[]},n3);return i3 instanceof Promise||a3 instanceof Promise?Promise.all([i3,a3]).then(([t3,n4])=>Kn(e2,t3,n4)):Kn(e2,i3,a3)}});function Gn(e,t2){if(e===t2||e instanceof Date&&t2 instanceof Date&&+e==+t2)return{valid:!0,data:e};if(B(e)&&B(t2)){let n3=Object.keys(t2),r3=Object.keys(e).filter(e2=>n3.indexOf(e2)!==-1),i3={...e,...t2};for(let n4 of r3){let r4=Gn(e[n4],t2[n4]);if(!r4.valid)return{valid:!1,mergeErrorPath:[n4,...r4.mergeErrorPath]};i3[n4]=r4.data}return{valid:!0,data:i3}}if(Array.isArray(e)&&Array.isArray(t2)){if(e.length!==t2.length)return{valid:!1,mergeErrorPath:[]};let n3=[];for(let r3=0;r3<e.length;r3++){let i3=e[r3],a3=t2[r3],o3=Gn(i3,a3);if(!o3.valid)return{valid:!1,mergeErrorPath:[r3,...o3.mergeErrorPath]};n3.push(o3.data)}return{valid:!0,data:n3}}return{valid:!1,mergeErrorPath:[]}}function Kn(e,t2,n3){if(t2.issues.length&&e.issues.push(...t2.issues),n3.issues.length&&e.issues.push(...n3.issues),W(e))return e;let r3=Gn(t2.value,n3.value);if(!r3.valid)throw Error(`Unmergable intersection. Error path: ${JSON.stringify(r3.mergeErrorPath)}`);return e.value=r3.data,e}var qn=x2("$ZodEnum",(e,t2)=>{q.init(e,t2);let n3=A2(t2.entries),r3=new Set(n3);e._zod.values=r3,e._zod.pattern=RegExp(`^(${n3.filter(e2=>he.has(typeof e2)).map(e2=>typeof e2=="string"?V(e2):e2.toString()).join("|")})$`),e._zod.parse=(t3,i3)=>{let a3=t3.value;return r3.has(a3)||t3.issues.push({code:"invalid_value",values:n3,input:a3,inst:e}),t3}}),Jn=x2("$ZodLiteral",(e,t2)=>{if(q.init(e,t2),t2.values.length===0)throw Error("Cannot create literal schema with no valid values");e._zod.values=new Set(t2.values),e._zod.pattern=RegExp(`^(${t2.values.map(e2=>typeof e2=="string"?V(e2):e2?V(e2.toString()):String(e2)).join("|")})$`),e._zod.parse=(n3,r3)=>{let i3=n3.value;return e._zod.values.has(i3)||n3.issues.push({code:"invalid_value",values:t2.values,input:i3,inst:e}),n3}}),Yn=x2("$ZodTransform",(e,t2)=>{q.init(e,t2),e._zod.parse=(n3,r3)=>{if(r3.direction==="backward")throw new C2(e.constructor.name);let i3=t2.transform(n3.value,n3);if(r3.async)return(i3 instanceof Promise?i3:Promise.resolve(i3)).then(e2=>(n3.value=e2,n3));if(i3 instanceof Promise)throw new S2;return n3.value=i3,n3}});function Xn(e,t2){return e.issues.length&&t2===void 0?{issues:[],value:void 0}:e}var Zn=x2("$ZodOptional",(e,t2)=>{q.init(e,t2),e._zod.optin="optional",e._zod.optout="optional",F2(e._zod,"values",()=>t2.innerType._zod.values?new Set([...t2.innerType._zod.values,void 0]):void 0),F2(e._zod,"pattern",()=>{let e2=t2.innerType._zod.pattern;return e2?RegExp(`^(${N2(e2.source)})?$`):void 0}),e._zod.parse=(e2,n3)=>{if(t2.innerType._zod.optin==="optional"){let r3=t2.innerType._zod.run(e2,n3);return r3 instanceof Promise?r3.then(t3=>Xn(t3,e2.value)):Xn(r3,e2.value)}return e2.value===void 0?e2:t2.innerType._zod.run(e2,n3)}}),Qn=x2("$ZodNullable",(e,t2)=>{q.init(e,t2),F2(e._zod,"optin",()=>t2.innerType._zod.optin),F2(e._zod,"optout",()=>t2.innerType._zod.optout),F2(e._zod,"pattern",()=>{let e2=t2.innerType._zod.pattern;return e2?RegExp(`^(${N2(e2.source)}|null)$`):void 0}),F2(e._zod,"values",()=>t2.innerType._zod.values?new Set([...t2.innerType._zod.values,null]):void 0),e._zod.parse=(e2,n3)=>e2.value===null?e2:t2.innerType._zod.run(e2,n3)}),$n=x2("$ZodDefault",(e,t2)=>{q.init(e,t2),e._zod.optin="optional",F2(e._zod,"values",()=>t2.innerType._zod.values),e._zod.parse=(e2,n3)=>{if(n3.direction==="backward")return t2.innerType._zod.run(e2,n3);if(e2.value===void 0)return e2.value=t2.defaultValue,e2;let r3=t2.innerType._zod.run(e2,n3);return r3 instanceof Promise?r3.then(e3=>er(e3,t2)):er(r3,t2)}});function er(e,t2){return e.value===void 0&&(e.value=t2.defaultValue),e}var tr=x2("$ZodPrefault",(e,t2)=>{q.init(e,t2),e._zod.optin="optional",F2(e._zod,"values",()=>t2.innerType._zod.values),e._zod.parse=(e2,n3)=>(n3.direction==="backward"||e2.value===void 0&&(e2.value=t2.defaultValue),t2.innerType._zod.run(e2,n3))}),nr=x2("$ZodNonOptional",(e,t2)=>{q.init(e,t2),F2(e._zod,"values",()=>{let e2=t2.innerType._zod.values;return e2?new Set([...e2].filter(e3=>e3!==void 0)):void 0}),e._zod.parse=(n3,r3)=>{let i3=t2.innerType._zod.run(n3,r3);return i3 instanceof Promise?i3.then(t3=>rr(t3,e)):rr(i3,e)}});function rr(e,t2){return!e.issues.length&&e.value===void 0&&e.issues.push({code:"invalid_type",expected:"nonoptional",input:e.value,inst:t2}),e}var ir=x2("$ZodCatch",(e,t2)=>{q.init(e,t2),F2(e._zod,"optin",()=>t2.innerType._zod.optin),F2(e._zod,"optout",()=>t2.innerType._zod.optout),F2(e._zod,"values",()=>t2.innerType._zod.values),e._zod.parse=(e2,n3)=>{if(n3.direction==="backward")return t2.innerType._zod.run(e2,n3);let r3=t2.innerType._zod.run(e2,n3);return r3 instanceof Promise?r3.then(r4=>(e2.value=r4.value,r4.issues.length&&(e2.value=t2.catchValue({...e2,error:{issues:r4.issues.map(e3=>G(e3,n3,T2()))},input:e2.value}),e2.issues=[]),e2)):(e2.value=r3.value,r3.issues.length&&(e2.value=t2.catchValue({...e2,error:{issues:r3.issues.map(e3=>G(e3,n3,T2()))},input:e2.value}),e2.issues=[]),e2)}}),ar=x2("$ZodPipe",(e,t2)=>{q.init(e,t2),F2(e._zod,"values",()=>t2.in._zod.values),F2(e._zod,"optin",()=>t2.in._zod.optin),F2(e._zod,"optout",()=>t2.out._zod.optout),F2(e._zod,"propValues",()=>t2.in._zod.propValues),e._zod.parse=(e2,n3)=>{if(n3.direction==="backward"){let r4=t2.out._zod.run(e2,n3);return r4 instanceof Promise?r4.then(e3=>or(e3,t2.in,n3)):or(r4,t2.in,n3)}let r3=t2.in._zod.run(e2,n3);return r3 instanceof Promise?r3.then(e3=>or(e3,t2.out,n3)):or(r3,t2.out,n3)}});function or(e,t2,n3){return e.issues.length?(e.aborted=!0,e):t2._zod.run({value:e.value,issues:e.issues},n3)}var sr=x2("$ZodReadonly",(e,t2)=>{q.init(e,t2),F2(e._zod,"propValues",()=>t2.innerType._zod.propValues),F2(e._zod,"values",()=>t2.innerType._zod.values),F2(e._zod,"optin",()=>t2.innerType._zod.optin),F2(e._zod,"optout",()=>t2.innerType._zod.optout),e._zod.parse=(e2,n3)=>{if(n3.direction==="backward")return t2.innerType._zod.run(e2,n3);let r3=t2.innerType._zod.run(e2,n3);return r3 instanceof Promise?r3.then(cr):cr(r3)}});function cr(e){return e.value=Object.freeze(e.value),e}var lr=x2("$ZodCustom",(e,t2)=>{K.init(e,t2),q.init(e,t2),e._zod.parse=(e2,t3)=>e2,e._zod.check=n3=>{let r3=n3.value,i3=t2.fn(r3);if(i3 instanceof Promise)return i3.then(t3=>ur(t3,n3,r3,e));ur(i3,n3,r3,e)}});function ur(e,t2,n3,r3){if(!e){let e2={code:"custom",input:n3,inst:r3,path:[...r3._zod.def.path??[]],continue:!r3._zod.def.abort};r3._zod.def.params&&(e2.params=r3._zod.def.params),t2.issues.push(Ne(e2))}}var dr=class{constructor(){this._map=new WeakMap,this._idmap=new Map}add(e,...t2){let n3=t2[0];if(this._map.set(e,n3),n3&&typeof n3=="object"&&"id"in n3){if(this._idmap.has(n3.id))throw Error(`ID ${n3.id} already exists in the registry`);this._idmap.set(n3.id,e)}return this}clear(){return this._map=new WeakMap,this._idmap=new Map,this}remove(e){let t2=this._map.get(e);return t2&&typeof t2=="object"&&"id"in t2&&this._idmap.delete(t2.id),this._map.delete(e),this}get(e){let t2=e._zod.parent;if(t2){let n3={...this.get(t2)??{}};delete n3.id;let r3={...n3,...this._map.get(e)};return Object.keys(r3).length?r3:void 0}return this._map.get(e)}has(e){return this._map.has(e)}};function fr(){return new dr}var pr=fr();function mr(e,t2){return new e({type:"string",...U(t2)})}function hr(e,t2){return new e({type:"string",format:"email",check:"string_format",abort:!1,...U(t2)})}function gr(e,t2){return new e({type:"string",format:"guid",check:"string_format",abort:!1,...U(t2)})}function _r(e,t2){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,...U(t2)})}function vr(e,t2){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v4",...U(t2)})}function yr(e,t2){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v6",...U(t2)})}function br(e,t2){return new e({type:"string",format:"uuid",check:"string_format",abort:!1,version:"v7",...U(t2)})}function xr(e,t2){return new e({type:"string",format:"url",check:"string_format",abort:!1,...U(t2)})}function Sr(e,t2){return new e({type:"string",format:"emoji",check:"string_format",abort:!1,...U(t2)})}function Cr(e,t2){return new e({type:"string",format:"nanoid",check:"string_format",abort:!1,...U(t2)})}function wr(e,t2){return new e({type:"string",format:"cuid",check:"string_format",abort:!1,...U(t2)})}function Tr(e,t2){return new e({type:"string",format:"cuid2",check:"string_format",abort:!1,...U(t2)})}function Er(e,t2){return new e({type:"string",format:"ulid",check:"string_format",abort:!1,...U(t2)})}function Dr(e,t2){return new e({type:"string",format:"xid",check:"string_format",abort:!1,...U(t2)})}function Or(e,t2){return new e({type:"string",format:"ksuid",check:"string_format",abort:!1,...U(t2)})}function kr(e,t2){return new e({type:"string",format:"ipv4",check:"string_format",abort:!1,...U(t2)})}function Ar(e,t2){return new e({type:"string",format:"ipv6",check:"string_format",abort:!1,...U(t2)})}function jr(e,t2){return new e({type:"string",format:"cidrv4",check:"string_format",abort:!1,...U(t2)})}function Mr(e,t2){return new e({type:"string",format:"cidrv6",check:"string_format",abort:!1,...U(t2)})}function Nr(e,t2){return new e({type:"string",format:"base64",check:"string_format",abort:!1,...U(t2)})}function Pr(e,t2){return new e({type:"string",format:"base64url",check:"string_format",abort:!1,...U(t2)})}function Fr(e,t2){return new e({type:"string",format:"e164",check:"string_format",abort:!1,...U(t2)})}function Ir(e,t2){return new e({type:"string",format:"jwt",check:"string_format",abort:!1,...U(t2)})}function Lr(e,t2){return new e({type:"string",format:"datetime",check:"string_format",offset:!1,local:!1,precision:null,...U(t2)})}function Rr(e,t2){return new e({type:"string",format:"date",check:"string_format",...U(t2)})}function zr(e,t2){return new e({type:"string",format:"time",check:"string_format",precision:null,...U(t2)})}function Br(e,t2){return new e({type:"string",format:"duration",check:"string_format",...U(t2)})}function Vr(e,t2){return new e({type:"number",checks:[],...U(t2)})}function Hr(e,t2){return new e({type:"number",check:"number_format",abort:!1,format:"safeint",...U(t2)})}function Ur(e,t2){return new e({type:"boolean",...U(t2)})}function Wr(e){return new e({type:"unknown"})}function Gr(e,t2){return new e({type:"never",...U(t2)})}function Kr(e,t2){return new zt({check:"less_than",...U(t2),value:e,inclusive:!1})}function qr(e,t2){return new zt({check:"less_than",...U(t2),value:e,inclusive:!0})}function Jr(e,t2){return new Bt({check:"greater_than",...U(t2),value:e,inclusive:!1})}function Yr(e,t2){return new Bt({check:"greater_than",...U(t2),value:e,inclusive:!0})}function Xr(e,t2){return new Vt({check:"multiple_of",...U(t2),value:e})}function Zr(e,t2){return new Ut({check:"max_length",...U(t2),maximum:e})}function Qr(e,t2){return new Wt({check:"min_length",...U(t2),minimum:e})}function $r(e,t2){return new Gt({check:"length_equals",...U(t2),length:e})}function ei(e,t2){return new qt({check:"string_format",format:"regex",...U(t2),pattern:e})}function ti(e){return new Jt({check:"string_format",format:"lowercase",...U(e)})}function ni(e){return new Yt({check:"string_format",format:"uppercase",...U(e)})}function ri(e,t2){return new Xt({check:"string_format",format:"includes",...U(t2),includes:e})}function ii(e,t2){return new Zt({check:"string_format",format:"starts_with",...U(t2),prefix:e})}function ai(e,t2){return new Qt({check:"string_format",format:"ends_with",...U(t2),suffix:e})}function oi(e){return new $t({check:"overwrite",tx:e})}function si(e){return oi(t2=>t2.normalize(e))}function ci(){return oi(e=>e.trim())}function li(){return oi(e=>e.toLowerCase())}function ui(){return oi(e=>e.toUpperCase())}function di(e,t2,n3){return new e({type:"array",element:t2,...U(n3)})}function fi(e,t2,n3){return new e({type:"custom",check:"custom",fn:t2,...U(n3)})}function pi(e){let t2=mi(n3=>(n3.addIssue=e2=>{if(typeof e2=="string")n3.issues.push(Ne(e2,n3.value,t2._zod.def));else{let r3=e2;r3.fatal&&(r3.continue=!1),r3.code??(r3.code="custom"),r3.input??(r3.input=n3.value),r3.inst??(r3.inst=t2),r3.continue??(r3.continue=!t2._zod.def.abort),n3.issues.push(Ne(r3))}},e(n3.value,n3)));return t2}function mi(e,t2){let n3=new K({check:"custom",...U(t2)});return n3._zod.check=e,n3}var hi=x2("ZodISODateTime",(e,t2)=>{hn.init(e,t2),Q.init(e,t2)});function gi(e){return Lr(hi,e)}var _i=x2("ZodISODate",(e,t2)=>{gn.init(e,t2),Q.init(e,t2)});function vi(e){return Rr(_i,e)}var yi=x2("ZodISOTime",(e,t2)=>{_n.init(e,t2),Q.init(e,t2)});function bi(e){return zr(yi,e)}var xi=x2("ZodISODuration",(e,t2)=>{vn.init(e,t2),Q.init(e,t2)});function Si(e){return Br(xi,e)}var Ci=(e,t2)=>{Ue.init(e,t2),e.name="ZodError",Object.defineProperties(e,{format:{value:t3=>Ke(e,t3)},flatten:{value:t3=>Ge(e,t3)},addIssue:{value:t3=>{e.issues.push(t3),e.message=JSON.stringify(e.issues,j2,2)}},addIssues:{value:t3=>{e.issues.push(...t3),e.message=JSON.stringify(e.issues,j2,2)}},isEmpty:{get(){return e.issues.length===0}}})},wi=x2("ZodError",Ci),Y=x2("ZodError",Ci,{Parent:Error}),Ti=qe(Y),Ei=Je(Y),Di=Ye(Y),Oi=Ze(Y),ki=$e(Y),Ai=et(Y),ji=tt(Y),Mi=nt(Y),Ni=rt(Y),Pi=it(Y),Fi=at(Y),Ii=ot(Y),X=x2("ZodType",(e,t2)=>(q.init(e,t2),e.def=t2,e.type=t2.type,Object.defineProperty(e,"_def",{value:t2}),e.check=(...n3)=>e.clone(E2.mergeDefs(t2,{checks:[...t2.checks??[],...n3.map(e2=>typeof e2=="function"?{_zod:{check:e2,def:{check:"custom"},onattach:[]}}:e2)]})),e.clone=(t3,n3)=>H(e,t3,n3),e.brand=()=>e,e.register=(t3,n3)=>(t3.add(e,n3),e),e.parse=(t3,n3)=>Ti(e,t3,n3,{callee:e.parse}),e.safeParse=(t3,n3)=>Di(e,t3,n3),e.parseAsync=async(t3,n3)=>Ei(e,t3,n3,{callee:e.parseAsync}),e.safeParseAsync=async(t3,n3)=>Oi(e,t3,n3),e.spa=e.safeParseAsync,e.encode=(t3,n3)=>ki(e,t3,n3),e.decode=(t3,n3)=>Ai(e,t3,n3),e.encodeAsync=async(t3,n3)=>ji(e,t3,n3),e.decodeAsync=async(t3,n3)=>Mi(e,t3,n3),e.safeEncode=(t3,n3)=>Ni(e,t3,n3),e.safeDecode=(t3,n3)=>Pi(e,t3,n3),e.safeEncodeAsync=async(t3,n3)=>Fi(e,t3,n3),e.safeDecodeAsync=async(t3,n3)=>Ii(e,t3,n3),e.refine=(t3,n3)=>e.check(Wa(t3,n3)),e.superRefine=t3=>e.check(Ga(t3)),e.overwrite=t3=>e.check(oi(t3)),e.optional=()=>Oa(e),e.nullable=()=>Aa(e),e.nullish=()=>Oa(Aa(e)),e.nonoptional=t3=>Ia(e,t3),e.array=()=>ma(e),e.or=t3=>va([e,t3]),e.and=t3=>ba(e,t3),e.transform=t3=>Ba(e,Ea(t3)),e.default=t3=>Ma(e,t3),e.prefault=t3=>Pa(e,t3),e.catch=t3=>Ra(e,t3),e.pipe=t3=>Ba(e,t3),e.readonly=()=>Ha(e),e.describe=t3=>{let n3=e.clone();return pr.add(n3,{description:t3}),n3},Object.defineProperty(e,"description",{get(){return pr.get(e)?.description},configurable:!0}),e.meta=(...t3)=>{if(t3.length===0)return pr.get(e);let n3=e.clone();return pr.add(n3,t3[0]),n3},e.isOptional=()=>e.safeParse(void 0).success,e.isNullable=()=>e.safeParse(null).success,e)),Li=x2("_ZodString",(e,t2)=>{nn.init(e,t2),X.init(e,t2);let n3=e._zod.bag;e.format=n3.format??null,e.minLength=n3.minimum??null,e.maxLength=n3.maximum??null,e.regex=(...t3)=>e.check(ei(...t3)),e.includes=(...t3)=>e.check(ri(...t3)),e.startsWith=(...t3)=>e.check(ii(...t3)),e.endsWith=(...t3)=>e.check(ai(...t3)),e.min=(...t3)=>e.check(Qr(...t3)),e.max=(...t3)=>e.check(Zr(...t3)),e.length=(...t3)=>e.check($r(...t3)),e.nonempty=(...t3)=>e.check(Qr(1,...t3)),e.lowercase=t3=>e.check(ti(t3)),e.uppercase=t3=>e.check(ni(t3)),e.trim=()=>e.check(ci()),e.normalize=(...t3)=>e.check(si(...t3)),e.toLowerCase=()=>e.check(li()),e.toUpperCase=()=>e.check(ui())}),Ri=x2("ZodString",(e,t2)=>{nn.init(e,t2),Li.init(e,t2),e.email=t3=>e.check(hr(zi,t3)),e.url=t3=>e.check(xr(Hi,t3)),e.jwt=t3=>e.check(Ir(ra,t3)),e.emoji=t3=>e.check(Sr(Ui,t3)),e.guid=t3=>e.check(gr(Bi,t3)),e.uuid=t3=>e.check(_r(Vi,t3)),e.uuidv4=t3=>e.check(vr(Vi,t3)),e.uuidv6=t3=>e.check(yr(Vi,t3)),e.uuidv7=t3=>e.check(br(Vi,t3)),e.nanoid=t3=>e.check(Cr(Wi,t3)),e.guid=t3=>e.check(gr(Bi,t3)),e.cuid=t3=>e.check(wr(Gi,t3)),e.cuid2=t3=>e.check(Tr(Ki,t3)),e.ulid=t3=>e.check(Er(qi,t3)),e.base64=t3=>e.check(Nr(ea,t3)),e.base64url=t3=>e.check(Pr(ta,t3)),e.xid=t3=>e.check(Dr(Ji,t3)),e.ksuid=t3=>e.check(Or(Yi,t3)),e.ipv4=t3=>e.check(kr(Xi,t3)),e.ipv6=t3=>e.check(Ar(Zi,t3)),e.cidrv4=t3=>e.check(jr(Qi,t3)),e.cidrv6=t3=>e.check(Mr($i,t3)),e.e164=t3=>e.check(Fr(na,t3)),e.datetime=t3=>e.check(gi(t3)),e.date=t3=>e.check(vi(t3)),e.time=t3=>e.check(bi(t3)),e.duration=t3=>e.check(Si(t3))});function Z(e){return mr(Ri,e)}var Q=x2("ZodStringFormat",(e,t2)=>{J.init(e,t2),Li.init(e,t2)}),zi=x2("ZodEmail",(e,t2)=>{on.init(e,t2),Q.init(e,t2)}),Bi=x2("ZodGUID",(e,t2)=>{rn.init(e,t2),Q.init(e,t2)}),Vi=x2("ZodUUID",(e,t2)=>{an.init(e,t2),Q.init(e,t2)}),Hi=x2("ZodURL",(e,t2)=>{sn.init(e,t2),Q.init(e,t2)}),Ui=x2("ZodEmoji",(e,t2)=>{cn.init(e,t2),Q.init(e,t2)}),Wi=x2("ZodNanoID",(e,t2)=>{ln.init(e,t2),Q.init(e,t2)}),Gi=x2("ZodCUID",(e,t2)=>{un.init(e,t2),Q.init(e,t2)}),Ki=x2("ZodCUID2",(e,t2)=>{dn.init(e,t2),Q.init(e,t2)}),qi=x2("ZodULID",(e,t2)=>{fn.init(e,t2),Q.init(e,t2)}),Ji=x2("ZodXID",(e,t2)=>{pn.init(e,t2),Q.init(e,t2)}),Yi=x2("ZodKSUID",(e,t2)=>{mn.init(e,t2),Q.init(e,t2)}),Xi=x2("ZodIPv4",(e,t2)=>{yn.init(e,t2),Q.init(e,t2)}),Zi=x2("ZodIPv6",(e,t2)=>{bn.init(e,t2),Q.init(e,t2)}),Qi=x2("ZodCIDRv4",(e,t2)=>{xn.init(e,t2),Q.init(e,t2)}),$i=x2("ZodCIDRv6",(e,t2)=>{Sn.init(e,t2),Q.init(e,t2)}),ea=x2("ZodBase64",(e,t2)=>{wn.init(e,t2),Q.init(e,t2)}),ta=x2("ZodBase64URL",(e,t2)=>{En.init(e,t2),Q.init(e,t2)}),na=x2("ZodE164",(e,t2)=>{Dn.init(e,t2),Q.init(e,t2)}),ra=x2("ZodJWT",(e,t2)=>{kn.init(e,t2),Q.init(e,t2)}),ia=x2("ZodNumber",(e,t2)=>{An.init(e,t2),X.init(e,t2),e.gt=(t3,n4)=>e.check(Jr(t3,n4)),e.gte=(t3,n4)=>e.check(Yr(t3,n4)),e.min=(t3,n4)=>e.check(Yr(t3,n4)),e.lt=(t3,n4)=>e.check(Kr(t3,n4)),e.lte=(t3,n4)=>e.check(qr(t3,n4)),e.max=(t3,n4)=>e.check(qr(t3,n4)),e.int=t3=>e.check(sa(t3)),e.safe=t3=>e.check(sa(t3)),e.positive=t3=>e.check(Jr(0,t3)),e.nonnegative=t3=>e.check(Yr(0,t3)),e.negative=t3=>e.check(Kr(0,t3)),e.nonpositive=t3=>e.check(qr(0,t3)),e.multipleOf=(t3,n4)=>e.check(Xr(t3,n4)),e.step=(t3,n4)=>e.check(Xr(t3,n4)),e.finite=()=>e;let n3=e._zod.bag;e.minValue=Math.max(n3.minimum??-1/0,n3.exclusiveMinimum??-1/0)??null,e.maxValue=Math.min(n3.maximum??1/0,n3.exclusiveMaximum??1/0)??null,e.isInt=(n3.format??"").includes("int")||Number.isSafeInteger(n3.multipleOf??.5),e.isFinite=!0,e.format=n3.format??null});function aa(e){return Vr(ia,e)}var oa=x2("ZodNumberFormat",(e,t2)=>{jn.init(e,t2),ia.init(e,t2)});function sa(e){return Hr(oa,e)}var ca=x2("ZodBoolean",(e,t2)=>{Mn.init(e,t2),X.init(e,t2)});function $(e){return Ur(ca,e)}var la=x2("ZodUnknown",(e,t2)=>{Nn.init(e,t2),X.init(e,t2)});function ua(){return Wr(la)}var da=x2("ZodNever",(e,t2)=>{Pn.init(e,t2),X.init(e,t2)});function fa(e){return Gr(da,e)}var pa=x2("ZodArray",(e,t2)=>{In.init(e,t2),X.init(e,t2),e.element=t2.element,e.min=(t3,n3)=>e.check(Qr(t3,n3)),e.nonempty=t3=>e.check(Qr(1,t3)),e.max=(t3,n3)=>e.check(Zr(t3,n3)),e.length=(t3,n3)=>e.check($r(t3,n3)),e.unwrap=()=>e.element});function ma(e,t2){return di(pa,e,t2)}var ha=x2("ZodObject",(e,t2)=>{Vn.init(e,t2),X.init(e,t2),E2.defineLazy(e,"shape",()=>t2.shape),e.keyof=()=>Sa(Object.keys(e._zod.def.shape)),e.catchall=t3=>e.clone({...e._zod.def,catchall:t3}),e.passthrough=()=>e.clone({...e._zod.def,catchall:ua()}),e.loose=()=>e.clone({...e._zod.def,catchall:ua()}),e.strict=()=>e.clone({...e._zod.def,catchall:fa()}),e.strip=()=>e.clone({...e._zod.def,catchall:void 0}),e.extend=t3=>E2.extend(e,t3),e.safeExtend=t3=>E2.safeExtend(e,t3),e.merge=t3=>E2.merge(e,t3),e.pick=t3=>E2.pick(e,t3),e.omit=t3=>E2.omit(e,t3),e.partial=(...t3)=>E2.partial(Da,e,t3[0]),e.required=(...t3)=>E2.required(Fa,e,t3[0])});function ga(e,t2){return new ha({type:"object",shape:e??{},...E2.normalizeParams(t2)})}var _a=x2("ZodUnion",(e,t2)=>{Un.init(e,t2),X.init(e,t2),e.options=t2.options});function va(e,t2){return new _a({type:"union",options:e,...E2.normalizeParams(t2)})}var ya=x2("ZodIntersection",(e,t2)=>{Wn.init(e,t2),X.init(e,t2)});function ba(e,t2){return new ya({type:"intersection",left:e,right:t2})}var xa=x2("ZodEnum",(e,t2)=>{qn.init(e,t2),X.init(e,t2),e.enum=t2.entries,e.options=Object.values(t2.entries);let n3=new Set(Object.keys(t2.entries));e.extract=(e2,r3)=>{let i3={};for(let r4 of e2)if(n3.has(r4))i3[r4]=t2.entries[r4];else throw Error(`Key ${r4} not found in enum`);return new xa({...t2,checks:[],...E2.normalizeParams(r3),entries:i3})},e.exclude=(e2,r3)=>{let i3={...t2.entries};for(let t3 of e2)if(n3.has(t3))delete i3[t3];else throw Error(`Key ${t3} not found in enum`);return new xa({...t2,checks:[],...E2.normalizeParams(r3),entries:i3})}});function Sa(e,t2){return new xa({type:"enum",entries:Array.isArray(e)?Object.fromEntries(e.map(e2=>[e2,e2])):e,...E2.normalizeParams(t2)})}var Ca=x2("ZodLiteral",(e,t2)=>{Jn.init(e,t2),X.init(e,t2),e.values=new Set(t2.values),Object.defineProperty(e,"value",{get(){if(t2.values.length>1)throw Error("This schema contains multiple valid literal values. Use `.values` instead.");return t2.values[0]}})});function wa(e,t2){return new Ca({type:"literal",values:Array.isArray(e)?e:[e],...E2.normalizeParams(t2)})}var Ta=x2("ZodTransform",(e,t2)=>{Yn.init(e,t2),X.init(e,t2),e._zod.parse=(n3,r3)=>{if(r3.direction==="backward")throw new C2(e.constructor.name);n3.addIssue=r4=>{if(typeof r4=="string")n3.issues.push(E2.issue(r4,n3.value,t2));else{let t3=r4;t3.fatal&&(t3.continue=!1),t3.code??(t3.code="custom"),t3.input??(t3.input=n3.value),t3.inst??(t3.inst=e),n3.issues.push(E2.issue(t3))}};let i3=t2.transform(n3.value,n3);return i3 instanceof Promise?i3.then(e2=>(n3.value=e2,n3)):(n3.value=i3,n3)}});function Ea(e){return new Ta({type:"transform",transform:e})}var Da=x2("ZodOptional",(e,t2)=>{Zn.init(e,t2),X.init(e,t2),e.unwrap=()=>e._zod.def.innerType});function Oa(e){return new Da({type:"optional",innerType:e})}var ka=x2("ZodNullable",(e,t2)=>{Qn.init(e,t2),X.init(e,t2),e.unwrap=()=>e._zod.def.innerType});function Aa(e){return new ka({type:"nullable",innerType:e})}var ja=x2("ZodDefault",(e,t2)=>{$n.init(e,t2),X.init(e,t2),e.unwrap=()=>e._zod.def.innerType,e.removeDefault=e.unwrap});function Ma(e,t2){return new ja({type:"default",innerType:e,get defaultValue(){return typeof t2=="function"?t2():E2.shallowClone(t2)}})}var Na=x2("ZodPrefault",(e,t2)=>{tr.init(e,t2),X.init(e,t2),e.unwrap=()=>e._zod.def.innerType});function Pa(e,t2){return new Na({type:"prefault",innerType:e,get defaultValue(){return typeof t2=="function"?t2():E2.shallowClone(t2)}})}var Fa=x2("ZodNonOptional",(e,t2)=>{nr.init(e,t2),X.init(e,t2),e.unwrap=()=>e._zod.def.innerType});function Ia(e,t2){return new Fa({type:"nonoptional",innerType:e,...E2.normalizeParams(t2)})}var La=x2("ZodCatch",(e,t2)=>{ir.init(e,t2),X.init(e,t2),e.unwrap=()=>e._zod.def.innerType,e.removeCatch=e.unwrap});function Ra(e,t2){return new La({type:"catch",innerType:e,catchValue:typeof t2=="function"?t2:()=>t2})}var za=x2("ZodPipe",(e,t2)=>{ar.init(e,t2),X.init(e,t2),e.in=t2.in,e.out=t2.out});function Ba(e,t2){return new za({type:"pipe",in:e,out:t2})}var Va=x2("ZodReadonly",(e,t2)=>{sr.init(e,t2),X.init(e,t2),e.unwrap=()=>e._zod.def.innerType});function Ha(e){return new Va({type:"readonly",innerType:e})}var Ua=x2("ZodCustom",(e,t2)=>{lr.init(e,t2),X.init(e,t2)});function Wa(e,t2={}){return fi(Ua,e,t2)}function Ga(e){return pi(e)}var Ka=ga({enabled:$().optional()}),qa=ga({enabled:$().optional()}),Ja=ga({auto:$().optional(),bypassMinReleaseAge:$().optional()}),Ya=va([wa("auto"),wa("file"),wa("keyring")]),Xa=ga({"// Note":Z().optional(),"// Docs":Z().optional(),skipWrite:$().optional(),token:Z().optional(),userId:Z().optional(),refreshToken:Z().optional(),expiresAt:aa().optional(),tokenSource:va([wa("flag"),wa("env")]).optional()});Xa.omit({tokenSource:!0});var Za=ga({"// Note":Z().optional(),"// Docs":Z().optional(),credStorage:Ya.optional(),currentTeam:Z().optional(),api:Z().optional(),telemetry:Ka.optional(),guidance:qa.optional(),updates:Ja.optional(),useNativeBinary:$().optional(),nativeBinaryAutoOptIn:$().optional()});function Qa(e){return`Invalid value for \`credStorage\`: ${JSON.stringify(e)}. Expected one of: ${v2.map(e2=>JSON.stringify(e2)).join(", ")}.`}var $a=Ka.passthrough(),eo=qa.passthrough(),to=Ja.passthrough(),no=Sa(v2,{error:e=>Qa(e.input)}).optional(),ro=Za.extend({credStorage:no,telemetry:$a.optional(),guidance:eo.optional(),updates:to.optional()}).passthrough(),io=Xa.passthrough(),ao=f2(m("fs")),oo=f2(m("path")),so=f2(m("fs")),co=f2(m("path")),lo=m("os");function uo(e){try{return so.default.lstatSync(e).isDirectory()}catch{return!1}}function fo(e){return g2()(e)}function po(e){return fo(e).dataDirs()}function mo(){return po("com.vercel.cli")[0]}function ho(){return fo("com.vercel.cli").cache()}function go(){let e=po("com.vercel.cli");return[...e,co.default.join((0,lo.homedir)(),".now"),...po("now")].find(e2=>uo(e2))||e[0]}function _o(e){return co.default.join(e,"config.json")}function vo(e){return co.default.join(e,"auth.json")}var yo="https://vercel.com/docs/projects/project-configuration/global-configuration",bo={"// Note":"This is your Vercel config file. For more information see the global configuration documentation.","// Docs":`${yo}#config.json`};function xo(){return{"// Note":"This is your Vercel credentials file. DO NOT SHARE!","// Docs":`${yo}#auth.json`}}var So=xo();function Co(e){if(e instanceof wi){let t2=e.issues.find(e2=>e2.path[0]==="credStorage");if(t2)throw Error(t2.message)}throw e}function wo(e){try{return ro.parse(e)}catch(e2){Co(e2)}}function To(e){return io.parse(e)}function Eo(e){let{tokenSource:t2,...n3}=To(e);return n3}function Do(e){let t2=ao.default.readFileSync(e,"utf8").replace(/^\uFEFF/,"");return JSON.parse(t2)}function Oo(e,t2,n3={}){let r3=oo.default.dirname(e),i3=oo.default.join(r3,`.${oo.default.basename(e)}.${process.pid}.${Date.now()}.tmp`),a3=`${JSON.stringify(t2,null,n3.indent??2)}
|
|
31
|
+
`;ao.default.mkdirSync(r3,{recursive:!0});try{ao.default.writeFileSync(i3,a3,{encoding:"utf8",mode:n3.mode}),ao.default.renameSync(i3,e)}catch(e2){try{ao.default.rmSync(i3,{force:!0})}catch{}throw e2}}function ko(e,t2){return t2.parse(Do(e))}function Ao(e,t2,n3,r3){Oo(e,ki(t2,n3),{indent:2,...r3})}function jo(e){try{return ko(e,ro)}catch(e2){Co(e2)}}function Mo(e,t2){Ao(e,ro,t2)}function No(e){return ko(e,io)}function Po(e){return Eo(Do(e))}function Fo(e){return No(vo(e))}function Io(e){try{return Fo(e)}catch{return null}}function Lo(e,t2){t2.skipWrite||Ao(e,io,t2,{mode:384})}function Ro(e,t2){Lo(vo(e),t2)}function zo(e){ao.default.rmSync(e,{force:!0})}function Bo(e){zo(vo(e))}var Vo="VERCEL_TOKEN_STORAGE";function Ho(e){return typeof e=="object"&&!!e&&"code"in e}function Uo(e){return v2.includes(e)}function Wo(e,t2){return`Invalid value for \`${t2}\`: ${JSON.stringify(e)}. Expected one of: ${v2.map(e2=>JSON.stringify(e2)).join(", ")}.`}function Go(e,t2="credStorage"){if(!(typeof e>"u")){if(Uo(e))return e;throw Error(Wo(e,t2))}}function Ko(e){if(!e||typeof e!="object")return!1;let t2=e;return typeof t2.token=="string"&&t2.token.length>0||typeof t2.refreshToken=="string"&&t2.refreshToken.length>0}function qo(e){try{return Ko(No(vo(e)))?"file":"keyring"}catch{return"keyring"}}function Jo(e,t2){return t2==="keyring"?"keyring":t2==="auto"?qo(e):b2}function Yo(e){let t2={},n3=process.env[Vo];if(typeof n3<"u")return Jo(e,Go(n3,Vo));try{let n4=jo(_o(e));t2={...n4,credStorage:Go(n4.credStorage)}}catch(e2){if(!(Ho(e2)&&e2.code==="ENOENT"))throw e2}return Jo(e,t2.credStorage)}}),se=c((e,t)=>{var n2=Object.defineProperty,r2=Object.getOwnPropertyDescriptor,i2=Object.getOwnPropertyNames,a2=Object.prototype.hasOwnProperty,o2=(e2,t2)=>{for(var r3 in t2)n2(e2,r3,{get:t2[r3],enumerable:!0})},s2=(e2,t2,o3,s3)=>{if(t2&&typeof t2=="object"||typeof t2=="function")for(let c4 of i2(t2))!a2.call(e2,c4)&&c4!==o3&&n2(e2,c4,{get:()=>t2[c4],enumerable:!(s3=r2(t2,c4))||s3.enumerable});return e2},c3=e2=>s2(n2({},"__esModule",{value:!0}),e2),l2={};o2(l2,{VercelOidcTokenError:()=>u2}),t.exports=c3(l2);var u2=class extends Error{constructor(e2,t2){super(e2),this.name="VercelOidcTokenError",this.cause=t2}toString(){return this.cause?`${this.name}: ${this.message}: ${this.cause}`:`${this.name}: ${this.message}`}}}),ce=c((t,n2)=>{var r2=Object.create,i2=Object.defineProperty,a2=Object.getOwnPropertyDescriptor,o2=Object.getOwnPropertyNames,s2=Object.getPrototypeOf,c3=Object.prototype.hasOwnProperty,l2=(e,t2)=>{for(var n3 in t2)i2(e,n3,{get:t2[n3],enumerable:!0})},u2=(e,t2,n3,r3)=>{if(t2&&typeof t2=="object"||typeof t2=="function")for(let s3 of o2(t2))!c3.call(e,s3)&&s3!==n3&&i2(e,s3,{get:()=>t2[s3],enumerable:!(r3=a2(t2,s3))||r3.enumerable});return e},d2=(e,t2,n3)=>(n3=e==null?{}:r2(s2(e)),u2(t2||!e||!e.__esModule?i2(n3,"default",{value:e,enumerable:!0}):n3,e)),f2=e=>u2(i2({},"__esModule",{value:!0}),e),p2={};l2(p2,{findRootDir:()=>v2,getUserDataDir:()=>y2}),n2.exports=f2(p2);var m3=d2(m("path")),h2=d2(m("fs")),g2=d2(m("os")),_2=se();function v2(){try{let e=process.cwd();for(;e!==m3.default.dirname(e);){let t2=m3.default.join(e,".vercel");if(h2.default.existsSync(t2))return e;e=m3.default.dirname(e)}}catch{throw new _2.VercelOidcTokenError("Token refresh only supported in node server environments")}return null}function y2(){if(process.env.XDG_DATA_HOME)return process.env.XDG_DATA_HOME;switch(g2.default.platform()){case"darwin":return m3.default.join(g2.default.homedir(),"Library/Application Support");case"linux":return m3.default.join(g2.default.homedir(),".local/share");case"win32":return process.env.LOCALAPPDATA?process.env.LOCALAPPDATA:null;default:return null}}}),le=c((t,n2)=>{var r2=Object.defineProperty,i2=Object.getOwnPropertyDescriptor,a2=Object.getOwnPropertyNames,o2=Object.prototype.hasOwnProperty,s2=(e,t2)=>{for(var n3 in t2)r2(e,n3,{get:t2[n3],enumerable:!0})},c3=(e,t2,n3,s3)=>{if(t2&&typeof t2=="object"||typeof t2=="function")for(let c4 of a2(t2))!o2.call(e,c4)&&c4!==n3&&r2(e,c4,{get:()=>t2[c4],enumerable:!(s3=i2(t2,c4))||s3.enumerable});return e},l2=e=>c3(r2({},"__esModule",{value:!0}),e),u2={};s2(u2,{processTokenResponse:()=>g2,refreshTokenRequest:()=>h2}),n2.exports=l2(u2);var d2=m("os");let f2=`@vercel/oidc node-${process.version} ${(0,d2.platform)()} (${(0,d2.arch)()}) ${(0,d2.hostname)()}`,p2=null;async function m3(){if(p2)return p2;let e=await fetch("https://vercel.com/.well-known/openid-configuration",{headers:{"user-agent":f2}});if(!e.ok)throw Error("Failed to discover OAuth endpoints");let t2=await e.json();if(!t2||typeof t2.token_endpoint!="string")throw Error("Invalid OAuth discovery response");let n3=t2.token_endpoint;return p2=n3,n3}async function h2(e){let t2=await m3();return await fetch(t2,{method:"POST",headers:{"Content-Type":"application/x-www-form-urlencoded","user-agent":f2},body:new URLSearchParams({client_id:"cl_HYyOPBNtFMfHhaUn9L4QPfTZz6TP47bp",grant_type:"refresh_token",...e})})}async function g2(e){let t2=await e.json();if(!e.ok){let e2=typeof t2=="object"&&t2&&"error"in t2?String(t2.error):"Token refresh failed";return[Error(e2)]}return typeof t2!="object"||!t2?[Error("Invalid token response")]:typeof t2.access_token=="string"?t2.token_type==="Bearer"?typeof t2.expires_in=="number"?[null,t2]:[Error("Missing expires_in in response")]:[Error("Invalid token_type in response")]:[Error("Missing access_token in response")]}}),R=c((e,t)=>{var n2=Object.defineProperty,r2=Object.getOwnPropertyDescriptor,i2=Object.getOwnPropertyNames,a2=Object.prototype.hasOwnProperty,o2=(e2,t2)=>{for(var r3 in t2)n2(e2,r3,{get:t2[r3],enumerable:!0})},s2=(e2,t2,o3,s3)=>{if(t2&&typeof t2=="object"||typeof t2=="function")for(let c4 of i2(t2))!a2.call(e2,c4)&&c4!==o3&&n2(e2,c4,{get:()=>t2[c4],enumerable:!(s3=r2(t2,c4))||s3.enumerable});return e2},c3=e2=>s2(n2({},"__esModule",{value:!0}),e2),l2={};o2(l2,{AccessTokenMissingError:()=>u2,RefreshAccessTokenFailedError:()=>d2}),t.exports=c3(l2);var u2=class extends Error{constructor(){super("No authentication found. Please log in with the Vercel CLI (vercel login)."),this.name="AccessTokenMissingError"}},d2=class extends Error{constructor(e2){super("Failed to refresh authentication token."),this.name="RefreshAccessTokenFailedError",e2!==void 0&&(this.cause=e2)}}}),z=c((t,n2)=>{var r2=Object.create,i2=Object.defineProperty,a2=Object.getOwnPropertyDescriptor,o2=Object.getOwnPropertyNames,s2=Object.getPrototypeOf,c3=Object.prototype.hasOwnProperty,l2=(e,t2)=>{for(var n3 in t2)i2(e,n3,{get:t2[n3],enumerable:!0})},u2=(e,t2,n3,r3)=>{if(t2&&typeof t2=="object"||typeof t2=="function")for(let s3 of o2(t2))!c3.call(e,s3)&&s3!==n3&&i2(e,s3,{get:()=>t2[s3],enumerable:!(r3=a2(t2,s3))||r3.enumerable});return e},d2=(e,t2,n3)=>(n3=e==null?{}:r2(s2(e)),u2(t2||!e||!e.__esModule?i2(n3,"default",{value:e,enumerable:!0}):n3,e)),f2=e=>u2(i2({},"__esModule",{value:!0}),e),p2={};l2(p2,{assertVercelOidcTokenResponse:()=>E2,findProjectInfo:()=>ee2,getTokenPayload:()=>O2,getVercelOidcToken:()=>T2,getVercelOidcTokenFromCli:()=>w2,getVercelToken:()=>S2,isExpired:()=>k2,loadToken:()=>D2,saveToken:()=>te2}),n2.exports=f2(p2);var m3=d2(m("path")),h2=d2(m("fs")),g2=L(),_2=oe(),v2=se(),y2=ce(),b2=le(),x2=R();async function S2(e){let t2=(0,_2.getGlobalPathConfig)(),n3=(0,_2.tryReadAuthConfig)(t2);if(!n3||!n3.token&&!n3.refreshToken)throw new x2.AccessTokenMissingError;if(C2(n3,e?.expirationBufferMs))return n3.token;if(!n3.refreshToken)throw(0,_2.writeAuthConfig)(t2,{}),new x2.RefreshAccessTokenFailedError("No refresh token available");try{let e2=await(0,b2.refreshTokenRequest)({refresh_token:n3.refreshToken}),[r3,i3]=await(0,b2.processTokenResponse)(e2);if(r3||!i3)throw(0,_2.writeAuthConfig)(t2,{}),new x2.RefreshAccessTokenFailedError(r3);let a3={token:i3.access_token,expiresAt:Math.floor(Date.now()/1e3)+i3.expires_in,refreshToken:i3.refresh_token};return(0,_2.writeAuthConfig)(t2,a3),a3.token}catch(e2){throw(0,_2.writeAuthConfig)(t2,{}),e2 instanceof x2.AccessTokenMissingError||e2 instanceof x2.RefreshAccessTokenFailedError?e2:new x2.RefreshAccessTokenFailedError(e2)}}function C2(e,t2=0){if(!e.token)return!1;if(typeof e.expiresAt!="number")return!0;let n3=Math.floor(Date.now()/1e3),r3=t2/1e3;return e.expiresAt>=n3+r3}async function w2(e,t2){let n3=["project","token",e,"--format=json"];t2&&n3.push("--scope",t2);try{let{stdout:e2}=await(0,g2.execVercelCli)(n3),t3;if(typeof e2!="string")throw new v2.VercelOidcTokenError("Failed to refresh OIDC token: `vercel project token` did not return stdout");try{t3=JSON.parse(e2)}catch{throw new v2.VercelOidcTokenError("Failed to refresh OIDC token: `vercel project token` returned invalid JSON: "+e2)}return E2(t3),t3}catch(e2){if(e2 instanceof v2.VercelOidcTokenError)throw e2;let t3=e2 instanceof Error?e2.message:"",n4=e2 instanceof g2.VercelCliError?e2.stderr?.trim():void 0;throw n4&&!t3.includes(n4)&&(t3=`${t3}
|
|
32
|
+
${n4}`.trim()),new v2.VercelOidcTokenError(t3?`Failed to refresh OIDC token with the Vercel CLI: ${t3}`:"Failed to refresh OIDC token with the Vercel CLI")}}async function T2(e,t2,n3){let r3=`https://api.vercel.com/v1/projects/${t2}/token?source=vercel-oidc-refresh${n3?`&teamId=${n3}`:""}`,i3=await fetch(r3,{method:"POST",headers:{Authorization:`Bearer ${e}`}});if(!i3.ok)throw new v2.VercelOidcTokenError(`Failed to refresh OIDC token: ${i3.statusText}`);let a3=await i3.json();return E2(a3),a3}function E2(e){if(!e||typeof e!="object")throw TypeError("Vercel OIDC token is malformed. Expected an object.");if(!("token"in e)||typeof e.token!="string")throw TypeError("Vercel OIDC token is malformed. Expected a string-valued token property.")}function ee2(){let e=(0,y2.findRootDir)();if(!e)throw new v2.VercelOidcTokenError("Unable to find project root directory. Have you linked your project with `vc link?`");let t2=m3.join(e,".vercel","project.json");if(!h2.existsSync(t2))throw new v2.VercelOidcTokenError("project.json not found, have you linked your project with `vc link?`");let n3=JSON.parse(h2.readFileSync(t2,"utf8"));if(typeof n3.projectId!="string"&&typeof n3.orgId!="string")throw TypeError("Expected a string-valued projectId property. Try running `vc link` to re-link your project.");return{projectId:n3.projectId,teamId:n3.orgId}}function te2(e,t2){let n3=(0,y2.getUserDataDir)();if(!n3)throw new v2.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let r3=m3.join(n3,"com.vercel.token",`${t2}.json`),i3=JSON.stringify(e);h2.mkdirSync(m3.dirname(r3),{mode:504,recursive:!0}),h2.writeFileSync(r3,i3),h2.chmodSync(r3,432)}function D2(e){let t2=(0,y2.getUserDataDir)();if(!t2)throw new v2.VercelOidcTokenError("Unable to find user data directory. Please reach out to Vercel support.");let n3=m3.join(t2,"com.vercel.token",`${e}.json`);if(!h2.existsSync(n3))return null;let r3=JSON.parse(h2.readFileSync(n3,"utf8"));return E2(r3),r3}function O2(e){let t2=e.split(".");if(t2.length!==3)throw new v2.VercelOidcTokenError("Invalid token.");let n3=t2[1].replace(/-/g,"+").replace(/_/g,"/"),r3=n3.padEnd(n3.length+(4-n3.length%4)%4,"=");return JSON.parse(Buffer.from(r3,"base64").toString("utf8"))}function k2(e,t2=0){return e.exp*1e3<Date.now()+t2}});export{oe,se,R,z};
|
|
@@ -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{__esm}from"./chunk-
|
|
7
|
+
import{__esm}from"./chunk-NBPLUP7C.js";function getLineColFromPtr(string,ptr){let lines=string.slice(0,ptr).split(/\r\n|\n|\r/g);return[lines.length,lines.pop().length+1]}function makeCodeBlock(string,line,column){let lines=string.split(/\r\n|\n|\r/g),codeblock="",numberLen=(Math.log10(line+1)|0)+1;for(let i=line-1;i<=line+1;i++){let l=lines[i-1];l&&(codeblock+=i.toString().padEnd(numberLen," "),codeblock+=": ",codeblock+=l,codeblock+=`
|
|
8
8
|
`,i===line&&(codeblock+=" ".repeat(numberLen+column+2),codeblock+=`^
|
|
9
9
|
`))}return codeblock}var TomlError,init_error=__esm({"../../node_modules/.pnpm/smol-toml@1.5.2/node_modules/smol-toml/dist/error.js"(){TomlError=class extends Error{line;column;codeblock;constructor(message,options){let[line,column]=getLineColFromPtr(options.toml,options.ptr),codeblock=makeCodeBlock(options.toml,line,column);super(`Invalid TOML document: ${message}
|
|
10
10
|
|
|
@@ -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{BUDGET_SCOPES}from"./chunk-L74PQVPL.js";import{packageName}from"./chunk-
|
|
7
|
+
import{BUDGET_SCOPES}from"./chunk-L74PQVPL.js";import{packageName}from"./chunk-EFGZK6OY.js";import{formatOption,jsonOption,limitOption,nextCursorOption,projectOption,sinceOption,untilOption,yesOption}from"./chunk-DORCX7UB.js";var organizationOption={name:"organization",shorthand:null,type:String,argument:"ORGANIZATION",deprecated:!1,description:"The organization budget, by organization slug or ID, from any team. Needs the organization admin or viewer role"},budgetProjectOption={...projectOption,description:"A project's budget, by project name or ID"},productOption={name:"product",shorthand:null,type:String,argument:"PRODUCT",deprecated:!1,description:"A product's budget, by product ID or name (case-insensitive), from the products that can have a budget"},scopeOptions=[organizationOption,budgetProjectOption,productOption],scopeFilterOptions=[{name:"type",shorthand:null,type:[String],argument:"TYPE",deprecated:!1,description:`Only budgets of these types: ${BUDGET_SCOPES.join(", ")}. Repeat or separate with commas for several`},{...organizationOption,description:"Only the organization budget, by organization slug or ID"},{...budgetProjectOption,description:"Only a project's budget, by name or ID"},{...productOption,description:"Only a product's budget, by product ID or name"}],inspectSubcommand={name:"inspect",aliases:["overview"],description:"Show a Spend Management budget and this cycle's spend against it: the team budget, or the one --organization, --project, or --product selects",arguments:[],options:[...scopeOptions,formatOption,jsonOption],examples:[{name:"Show this cycle's on-demand spend against the team budget",value:`${packageName} billing budgets inspect`},{name:"Show a project budget",value:`${packageName} billing budgets inspect --project my-app`}]},listSubcommand={name:"list",aliases:["ls"],description:"List Spend Management budgets on this team, from every scope unless --organization, --project, or --product narrows them",default:!0,arguments:[],options:[...scopeFilterOptions,formatOption,jsonOption],examples:[{name:"List Spend Management budgets",value:`${packageName} billing budgets`},{name:"List one project's budget",value:`${packageName} billing budgets list --project my-app`}]},setSubcommand={name:"set",aliases:["update"],description:"Create or update a Spend Management budget: the team budget, or the one --organization, --project, or --product selects",arguments:[],options:[...scopeOptions,{name:"amount",shorthand:null,type:Number,argument:"USD",deprecated:!1,description:"Budget amount in whole dollars (minimum 1). Creates with 50/75/100% alerts and notifications on; updates keep pause and webhook settings unless those options are also passed"},{name:"pause",shorthand:null,type:Boolean,deprecated:!1,description:"Pause at 100% of the budget amount: all projects for a team budget, the project for a project budget, or the product's usage for a product that can pause. Organization budgets only notify"},{name:"no-pause",shorthand:null,type:Boolean,deprecated:!1,description:"Do not pause when the budget is reached"},{name:"webhook",shorthand:null,type:String,argument:"URL",deprecated:!1,description:"Webhook URL to notify when a threshold is reached"},{name:"no-webhook",shorthand:null,type:Boolean,deprecated:!1,description:"Remove the budget webhook"},formatOption,jsonOption],examples:[{name:"Create a $500 budget with default 50/75/100% alerts",value:`${packageName} billing budgets set --amount 500`},{name:"Change the budget amount",value:`${packageName} billing budgets set --amount 800`},{name:"Pause all projects and production deployments at 100% of the existing budget",value:`${packageName} billing budgets set --pause`},{name:"Notify a webhook without changing the amount",value:`${packageName} billing budgets set --webhook https://example.com/hook`},{name:"Remove the webhook",value:`${packageName} billing budgets set --no-webhook`},{name:"Create a $200 budget that pauses one project at 100%",value:`${packageName} billing budgets set --project my-app --amount 200 --pause`},{name:"Create a $10,000 organization budget",value:`${packageName} billing budgets set --organization acme --amount 10000`},{name:"Create a $100 budget on one product",value:`${packageName} billing budgets set --product "Function Duration" --amount 100`}]},removeSubcommand={name:"remove",aliases:["rm","delete","disable"],description:"Remove a Spend Management budget: the team budget, or the one --organization, --project, or --product selects",arguments:[],options:[...scopeOptions,yesOption,formatOption,jsonOption],examples:[{name:"Remove the team budget without confirmation",value:`${packageName} billing budgets remove --yes`},{name:"Remove a project budget",value:`${packageName} billing budgets remove --project my-app`}]},alertsDescription="List Spend Management alerts: each budget threshold reached, newest first, from every scope unless --organization, --project, or --product narrows them. For observability alerts, see `vercel alerts`.",alertsOptions=[{...sinceOption,description:"Show alerts triggered after this time (ISO 8601 or relative: 1d, 7d, 30d)"},{...untilOption,description:"Show alerts triggered before this time (ISO 8601 or relative)"},...scopeFilterOptions,limitOption,nextCursorOption,formatOption,jsonOption],alertsListSubcommand={name:"list",aliases:["ls"],description:alertsDescription,default:!0,hidden:!0,arguments:[],options:alertsOptions,examples:[]},alertsSubcommand={name:"alerts",aliases:[],description:alertsDescription,arguments:[],subcommands:[alertsListSubcommand],options:alertsOptions,examples:[{name:"List recent Spend Management alerts for this team",value:`${packageName} billing budgets alerts`},{name:"List one project budget's alerts",value:`${packageName} billing budgets alerts --project my-app`},{name:"List alerts from the last 30 days",value:`${packageName} billing budgets alerts --since 30d`},{name:"Output alerts as JSON",value:`${packageName} billing budgets alerts --json`}]},budgetCommand={name:"budgets",aliases:["budget"],summary:"Manage spending beyond included credit",description:"Show and manage Spend Management for on-demand charges after included credit",arguments:[],subcommands:[inspectSubcommand,listSubcommand,setSubcommand,removeSubcommand,alertsSubcommand],options:[],examples:[{name:"List Spend Management budgets",value:`${packageName} billing budgets`},{name:"Show this cycle's on-demand spend against Spend Management",value:`${packageName} billing budgets inspect`},{name:"Set a $500 budget that pauses all projects and production deployments at 100%",value:`${packageName} billing budgets set --amount 500 --pause`},{name:"Set a $200 budget on one project",value:`${packageName} billing budgets set --project my-app --amount 200`},{name:"Pause all projects and production deployments at 100% of the existing budget",value:`${packageName} billing budgets set --pause`},{name:"Remove the Spend Management budget",value:`${packageName} billing budgets remove --yes`},{name:"List recent Spend Management alerts",value:`${packageName} billing budgets alerts`}]},DEPRECATED_BUDGET_ACTIONS={overview:"inspect",update:"set",delete:"remove",disable:"remove"};export{inspectSubcommand,listSubcommand,setSubcommand,removeSubcommand,alertsListSubcommand,alertsSubcommand,budgetCommand,DEPRECATED_BUDGET_ACTIONS};
|
|
@@ -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{require_dist}from"./chunk-
|
|
7
|
+
import{require_dist}from"./chunk-4SIQE2W4.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_error_utils=__toESM(require_dist(),1);import{randomUUID}from"crypto";import{chmod,lstat,mkdir,readFile,readdir,realpath,rename,rm,writeFile}from"fs/promises";import{isAbsolute,join}from"path";var LOCAL_SCHEDULES_SESSION_HEADER="x-vercel-schedules-dev-session",uuidPattern=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function isLocalSchedulesOrigin(origin){if(typeof origin!="string")return!1;let match=/^http:\/\/127\.0\.0\.1:([1-9][0-9]{0,4})$/.exec(origin);return!!match&&match[0]===origin&&Number(match[1])<=65535}async function createLocalSchedulesSession(cwd,origin,projectId){if(!isLocalSchedulesOrigin(origin)||!projectId.trim())throw new Error("Cannot publish local Schedules: expected an HTTP 127.0.0.1 origin with a valid port and a project ID.");let canonicalCwd=await realpath(cwd),directory=join(canonicalCwd,".vercel","dev","schedules");await mkdir(directory,{recursive:!0,mode:448}),await chmod(directory,448);let session={version:1,id:randomUUID(),pid:process.pid,cwd:canonicalCwd,origin,projectId},filename=join(directory,`${session.id}.json`),temporary=join(directory,`${session.id}.tmp`);try{await writeFile(temporary,JSON.stringify(session),{flag:"wx",mode:384}),await rename(temporary,filename)}catch(error){throw await rm(temporary,{force:!0}),error}return{session,dispose:()=>rm(filename,{force:!0})}}async function readLocalSchedulesSessions(cwd){let canonicalCwd=await realpath(cwd),directory=join(canonicalCwd,".vercel","dev","schedules"),filenames;try{filenames=await readdir(directory)}catch(error){if((0,import_error_utils.isErrnoException)(error)&&error.code==="ENOENT")return[];throw error}let sessions=[];for(let filename of filenames.sort()){if(!filename.endsWith(".json"))continue;let path=join(directory,filename),session;try{if(filename.length!==41||!uuidPattern.test(filename.slice(0,-5)))throw new Error("expected a UUID filename");if(!(await lstat(path)).isFile())throw new Error("expected a regular session file");if(session=JSON.parse(await readFile(path,"utf8")),!session||session.version!==1)throw new Error("unsupported session version (expected version 1)");if(session.id!==filename.slice(0,-5)||!Number.isSafeInteger(session.pid)||session.pid<=0||typeof session.cwd!="string"||!isAbsolute(session.cwd)||!isLocalSchedulesOrigin(session.origin)||typeof session.projectId!="string"||!session.projectId.trim())throw new Error("invalid session descriptor");try{process.kill(session.pid,0)}catch(error){if((0,import_error_utils.isErrnoException)(error)&&error.code==="ESRCH")continue;if(!(0,import_error_utils.isErrnoException)(error)||error.code!=="EPERM")throw error}if(await realpath(session.cwd)!==canonicalCwd)throw new Error("session directory does not match the current directory")}catch(error){if((0,import_error_utils.isErrnoException)(error)&&error.code==="ENOENT")try{await lstat(path)}catch(missing){if((0,import_error_utils.isErrnoException)(missing)&&missing.code==="ENOENT")continue;throw missing}throw new Error(`Cannot read local Schedules session ${path}: ${error instanceof Error?error.message:String(error)}. Stop vercel dev, remove this descriptor, and restart vercel dev in the current directory.`)}sessions.push(session)}return sessions}export{LOCAL_SCHEDULES_SESSION_HEADER,isLocalSchedulesOrigin,createLocalSchedulesSession,readLocalSchedulesSessions};
|
|
@@ -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{getNativePackageName}from"./chunk-FXLZM6Q7.js";import{HOMEBREW_UPGRADE_COMMAND,execPackageManager,findTrustedExecutable,getUpdateCommandInfo,getUpgradePackageManager,isGlobal,packageManagerInvocation,requireTrustedUpgradeDirectory,trustedUpgradeEnvironment,withEnvironmentOverrides}from"./chunk-AVCLYJNC.js";import{withDirectoryLock}from"./chunk-TABMJZVW.js";import{progress}from"./chunk-U56NHYAH.js";import{getInstallRoot,isNativeBinaryInstall}from"./chunk-NWGBDBZI.js";import{require_semver}from"./chunk-BPUANOGW.js";import{require_ci_info}from"./chunk-EYRBV6RM.js";import{getCachedUsername,require_lib}from"./chunk-ZHGKJCQ2.js";import{pkg_default}from"./chunk-BOJDM3O7.js";import{output_manager_default}from"./chunk-RYSO5U3E.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 packageManagerEnvironment(packageManager,env){return withEnvironmentOverrides(env,getUpgradePackageManager(packageManager).env)}async function requireExecutable(name,env){let executable=await findTrustedExecutable(name,env);if(!executable)throw new Error(`${name} is not in a directory that PATH names in full`);return executable}async function execFileStdout(packageManager,args,cwd,env=trustedUpgradeEnvironment){return execPackageManager(await requireExecutable(packageManager,env),args,{cwd,env:packageManagerEnvironment(packageManager,env),timeout:15e3})}function parseVersionOutput(stdout){for(let line of[stdout.trim(),...stdout.trim().split(`
|
|
7
|
+
import{require_xdg_app_paths}from"./chunk-BFS4K2RF.js";import{getNativePackageName}from"./chunk-7PK2JFEH.js";import{HOMEBREW_UPGRADE_COMMAND,execPackageManager,findTrustedExecutable,getUpdateCommandInfo,getUpgradePackageManager,isGlobal,packageManagerInvocation,requireTrustedUpgradeDirectory,trustedUpgradeEnvironment,withEnvironmentOverrides}from"./chunk-CX6QYE3Y.js";import{withDirectoryLock}from"./chunk-TABMJZVW.js";import{progress}from"./chunk-U56NHYAH.js";import{getInstallRoot,isNativeBinaryInstall}from"./chunk-5F4RJ32E.js";import{require_semver}from"./chunk-IZV6K7RR.js";import{require_ci_info}from"./chunk-LNRKGW7S.js";import{getCachedUsername,require_lib}from"./chunk-G7RQVFID.js";import{pkg_default}from"./chunk-JCDPMWKO.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import{__commonJS,__require,__toESM}from"./chunk-NBPLUP7C.js";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 packageManagerEnvironment(packageManager,env){return withEnvironmentOverrides(env,getUpgradePackageManager(packageManager).env)}async function requireExecutable(name,env){let executable=await findTrustedExecutable(name,env);if(!executable)throw new Error(`${name} is not in a directory that PATH names in full`);return executable}async function execFileStdout(packageManager,args,cwd,env=trustedUpgradeEnvironment){return execPackageManager(await requireExecutable(packageManager,env),args,{cwd,env:packageManagerEnvironment(packageManager,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
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(" "),cwd=requireTrustedUpgradeDirectory();output_manager_default.debug(`Executing: ${HOMEBREW_UPGRADE_COMMAND}`);let executable=await requireExecutable(brew,env).catch(error=>error),result=await new Promise(resolve2=>{if(typeof executable!="string"){resolve2({code:1,spawnError:executable});return}let settled=!1,brewProcess=spawn(executable,args,{cwd,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",outcome){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?requireTrustedUpgradeDirectory():process.cwd(),executable=await requireExecutable(command,env).catch(error=>error),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{if(typeof executable!="string")throw executable;invocation=packageManagerInvocation(executable,currentArgs,env)}catch(spawnError){resolve2({code:1,stdout:"",stderr:"",spawnError});return}let upgradeProcess=spawn(invocation.file,invocation.args,{cwd,env:packageManagerEnvironment(packageManager,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:
|
|
@@ -12,4 +12,4 @@ To install the newest release allowed by your settings:
|
|
|
12
12
|
To bypass the minimum release age for this and future foreground upgrades:
|
|
13
13
|
vc upgrade --bypass-min-release-age`),outcome&&(outcome.releaseAgeBlocked=!0),1;output_manager_default.print(`! ${blockedMessage}
|
|
14
14
|
`);let action=await client.input.select({message:"Which upgrade option?",choices:[{name:"Install the newest release allowed by my settings",value:"allowed"},{name:"Bypass the minimum release age for this and future foreground upgrades",value:"bypass"},{name:"Cancel",value:"cancel"}],default:"allowed"});if(action==="allowed")resolvedTargetVersion=void 0,installArgs=args,usedAllowedRelease=!0;else if(action==="bypass")setMinReleaseAgeBypass(client,!0),output_manager_default.log("To restore release-age checks, run `vc upgrade --no-bypass-min-release-age`."),installArgs=[...installArgs,...bypassArgs];else return output_manager_default.log("Upgrade canceled."),0;renderUpgradeProgress(targetVersion?1:2,totalSteps,"Installing\u2026"),result=await runInstall(installArgs)}return result.spawnError?(output_manager_default.stopSpinner(),output_manager_default.error(`Failed to execute upgrade command: ${result.spawnError.message}`),output_manager_default.log(`You can try running the command manually: ${[command,...installArgs].join(" ")}`),1):result.code!==0?(output_manager_default.stopSpinner(),result.stdout&&output_manager_default.print(result.stdout),result.stderr&&output_manager_default.print(result.stderr),output_manager_default.error(`Upgrade failed with exit code ${result.code}`),output_manager_default.log(`You can try running the command manually: ${[command,...installArgs].join(" ")}`),result.code):usedAllowedRelease&&(resolvedTargetVersion=await getInstalledPackageVersion(packageManager,args,cwd,global),resolvedTargetVersion===versionBefore)?(output_manager_default.stopSpinner(),output_manager_default.log(`Vercel CLI remains at v${versionBefore} under your package manager settings.`),0):(renderUpgradeProgress(totalSteps,totalSteps),output_manager_default.stopSpinner(),output_manager_default.success(resolvedTargetVersion?`Upgraded Vercel CLI to v${resolvedTargetVersion}.`:"Upgraded Vercel CLI."),0)}var import_semver2=__toESM(require_semver(),1),import_ci_info=__toESM(require_ci_info(),1),import_xdg_app_paths=__toESM(require_xdg_app_paths(),1),import_fs_extra=__toESM(require_lib(),1);import{randomUUID}from"node:crypto";import{mkdir,rename,rm,writeFile}from"node:fs/promises";import{dirname,isAbsolute,relative,resolve}from"node:path";import{spawn as spawn2}from"node:child_process";var NATIVE_UPDATE_CHILD_ENV="VERCEL_NATIVE_UPDATE_CHILD",NATIVE_UPDATE_VERSION_ENV="VERCEL_NATIVE_UPDATE_VERSION",NATIVE_UPDATE_SELECT_PRODUCTION_ENV="VERCEL_NATIVE_UPDATE_SELECT_PRODUCTION";function isNativeUpdateChild(){return process.env[NATIVE_UPDATE_CHILD_ENV]==="1"}function spawnDetachedUpdate(env){let child=spawn2(process.execPath,["version","check"],{detached:!0,stdio:"ignore",windowsHide:!0,env});child.on("error",()=>{}),child.unref()}function spawnNativeUpdateCheck(){let env={...process.env,[NATIVE_UPDATE_CHILD_ENV]:"1",[NATIVE_UPDATE_SELECT_PRODUCTION_ENV]:"0"};delete env[NATIVE_UPDATE_VERSION_ENV],spawnDetachedUpdate(env)}function spawnNativeUpdateChild(version,selectProduction){spawnDetachedUpdate({...process.env,[NATIVE_UPDATE_CHILD_ENV]:"1",[NATIVE_UPDATE_VERSION_ENV]:version,[NATIVE_UPDATE_SELECT_PRODUCTION_ENV]:selectProduction?"1":"0"})}var NATIVE_UPDATE_CHECK_INTERVAL=1e3*60*60*24,NATIVE_UPDATE_DISCOVERY_LEASE=1e3*60;function isNativeAutoUpdateEnabled(config){return config.updates?.auto!==!1}var CACHE_LOCK_RETRY_MS=10,CACHE_LOCK_ABANDONED_MS=1e4;function getNativeUpdateCacheFile(cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache()){let packageName=getNativePackageName().replaceAll("/","-");return resolve(cacheDir,"package-updates",`${packageName}-latest.json`)}function readNativeUpdateCache(cacheDir){try{let cache=(0,import_fs_extra.readJSONSync)(getNativeUpdateCacheFile(cacheDir));if(typeof cache?.expireAt=="number"&&(cache.version===void 0||typeof cache.version=="string"&&import_semver2.default.valid(cache.version)))return cache}catch{}}async function atomicWriteCache(cacheDir,cache){let cacheFile=getNativeUpdateCacheFile(cacheDir);await mkdir(dirname(cacheFile),{recursive:!0});let temporary=`${cacheFile}.tmp-${randomUUID()}`;await writeFile(temporary,`${JSON.stringify(cache)}
|
|
15
|
-
`);try{await rename(temporary,cacheFile)}catch(error){throw await rm(temporary,{force:!0}),error}}async function withNativeUpdateCacheLock(cacheDir,action,{waitMs=5e3}={}){let lock=`${getNativeUpdateCacheFile(cacheDir)}.lock`;await withDirectoryLock(lock,action,{waitMs,retryMs:CACHE_LOCK_RETRY_MS,abandonedAfterMs:CACHE_LOCK_ABANDONED_MS,busyMessage:path=>`Timed out waiting for the native update cache. If no Vercel update is running, remove the lock at ${path} and retry.`})}async function cacheNativeUpdateVersion(version,{cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),now=Date.now(),selectProduction=!1}={}){await withNativeUpdateCacheLock(cacheDir,async()=>{let existing=readNativeUpdateCache(cacheDir),keepNewerExisting=!!(existing?.version&&import_semver2.default.gt(existing.version,version)),nextVersion=keepNewerExisting?existing?.version:version,shouldSelectProduction=selectProduction||existing?.selectProduction===!0,staged=shouldSelectProduction?!1:keepNewerExisting||existing?.version===version?existing?.staged===!0:!1;await atomicWriteCache(cacheDir,{expireAt:now+NATIVE_UPDATE_CHECK_INTERVAL,selectProduction:shouldSelectProduction,staged,version:nextVersion})})}async function cacheNativeUpdateDiscoveryAttempt({cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),now=Date.now()}={}){await withNativeUpdateCacheLock(cacheDir,async()=>{let existing=readNativeUpdateCache(cacheDir);await atomicWriteCache(cacheDir,{...existing,discoveryStartedAt:now,expireAt:now+NATIVE_UPDATE_CHECK_INTERVAL,staged:existing?.selectProduction===!0?existing.staged===!0:!0})})}async function restoreNativeUpdateAfterDiscoveryFailure({cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache()}={}){await withNativeUpdateCacheLock(cacheDir,async()=>{let cache=readNativeUpdateCache(cacheDir);cache?.version&&await atomicWriteCache(cacheDir,{...cache,discoveryStartedAt:void 0,staged:!1})})}async function markNativeUpdateStaged(version,{cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),selectedProduction=!1}={}){await withNativeUpdateCacheLock(cacheDir,async()=>{let cache=readNativeUpdateCache(cacheDir);cache?.version===version&&(cache.selectProduction!==!0||selectedProduction)&&await atomicWriteCache(cacheDir,{...cache,discoveryStartedAt:void 0,selectProduction:!1,staged:!0})})}function isWithinInstallRoot(executablePath,installRoot){let pathFromRoot=relative(resolve(installRoot),resolve(executablePath));return pathFromRoot!==""&&pathFromRoot!==".."&&!pathFromRoot.startsWith(`..${process.platform==="win32"?"\\":"/"}`)&&!isAbsolute(pathFromRoot)}function scheduleNativeAutoUpdate(client,exitCode,{cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),executablePath=process.execPath,installRoot=getInstallRoot(),now=Date.now()}={}){if(exitCode!==0||import_ci_info.default.isCI||client.isAgent||client.nonInteractive||isNativeUpdateChild()||!isNativeBinaryInstall()||!isWithinInstallRoot(executablePath,installRoot))return;let cache=readNativeUpdateCache(cacheDir);if(!isNativeAutoUpdateEnabled(client.config)&&cache?.selectProduction!==!0)return;if(!cache?.expireAt||cache.expireAt<=now){spawnNativeUpdateCheck();return}let abandonedDiscovery=!!(cache.version&&cache.staged===!0&&cache.discoveryStartedAt&&cache.discoveryStartedAt+NATIVE_UPDATE_DISCOVERY_LEASE<=now);cache.version&&(cache.staged!==!0||abandonedDiscovery)&&spawnNativeUpdateChild(cache.version,cache.selectProduction===!0)}var import_ci_info2=__toESM(require_ci_info(),1);function isAutoUpdateEnabled(config){return config.updates?.auto===!0}function hasAutoUpdatePreference(config){return typeof config.updates?.auto=="boolean"}function setAutoUpdate(client,enabled){client.config={...client.config,updates:{...client.config.updates,auto:enabled}},client.writeToConfigFile()}async function canAutoUpdate(client,exitCode,command){return isNativeBinaryInstall()||!isAutoUpdateEnabled(client.config)||exitCode!==0||import_ci_info2.default.isCI||client.nonInteractive||client.isAgent||command==="upgrade"?!1:isGlobal()}export{
|
|
15
|
+
`);try{await rename(temporary,cacheFile)}catch(error){throw await rm(temporary,{force:!0}),error}}async function withNativeUpdateCacheLock(cacheDir,action,{waitMs=5e3}={}){let lock=`${getNativeUpdateCacheFile(cacheDir)}.lock`;await withDirectoryLock(lock,action,{waitMs,retryMs:CACHE_LOCK_RETRY_MS,abandonedAfterMs:CACHE_LOCK_ABANDONED_MS,busyMessage:path=>`Timed out waiting for the native update cache. If no Vercel update is running, remove the lock at ${path} and retry.`})}async function cacheNativeUpdateVersion(version,{cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),now=Date.now(),selectProduction=!1}={}){await withNativeUpdateCacheLock(cacheDir,async()=>{let existing=readNativeUpdateCache(cacheDir),keepNewerExisting=!!(existing?.version&&import_semver2.default.gt(existing.version,version)),nextVersion=keepNewerExisting?existing?.version:version,shouldSelectProduction=selectProduction||existing?.selectProduction===!0,staged=shouldSelectProduction?!1:keepNewerExisting||existing?.version===version?existing?.staged===!0:!1;await atomicWriteCache(cacheDir,{expireAt:now+NATIVE_UPDATE_CHECK_INTERVAL,selectProduction:shouldSelectProduction,staged,version:nextVersion})})}async function cacheNativeUpdateDiscoveryAttempt({cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),now=Date.now()}={}){await withNativeUpdateCacheLock(cacheDir,async()=>{let existing=readNativeUpdateCache(cacheDir);await atomicWriteCache(cacheDir,{...existing,discoveryStartedAt:now,expireAt:now+NATIVE_UPDATE_CHECK_INTERVAL,staged:existing?.selectProduction===!0?existing.staged===!0:!0})})}async function restoreNativeUpdateAfterDiscoveryFailure({cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache()}={}){await withNativeUpdateCacheLock(cacheDir,async()=>{let cache=readNativeUpdateCache(cacheDir);cache?.version&&await atomicWriteCache(cacheDir,{...cache,discoveryStartedAt:void 0,staged:!1})})}async function markNativeUpdateStaged(version,{cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),selectedProduction=!1}={}){await withNativeUpdateCacheLock(cacheDir,async()=>{let cache=readNativeUpdateCache(cacheDir);cache?.version===version&&(cache.selectProduction!==!0||selectedProduction)&&await atomicWriteCache(cacheDir,{...cache,discoveryStartedAt:void 0,selectProduction:!1,staged:!0})})}function isWithinInstallRoot(executablePath,installRoot){let pathFromRoot=relative(resolve(installRoot),resolve(executablePath));return pathFromRoot!==""&&pathFromRoot!==".."&&!pathFromRoot.startsWith(`..${process.platform==="win32"?"\\":"/"}`)&&!isAbsolute(pathFromRoot)}function scheduleNativeAutoUpdate(client,exitCode,{cacheDir=(0,import_xdg_app_paths.default)("com.vercel.cli").cache(),executablePath=process.execPath,installRoot=getInstallRoot(),now=Date.now()}={}){if(exitCode!==0||import_ci_info.default.isCI||client.isAgent||client.nonInteractive||isNativeUpdateChild()||!isNativeBinaryInstall()||!isWithinInstallRoot(executablePath,installRoot))return;let cache=readNativeUpdateCache(cacheDir);if(!isNativeAutoUpdateEnabled(client.config)&&cache?.selectProduction!==!0)return;if(!cache?.expireAt||cache.expireAt<=now){spawnNativeUpdateCheck();return}let abandonedDiscovery=!!(cache.version&&cache.staged===!0&&cache.discoveryStartedAt&&cache.discoveryStartedAt+NATIVE_UPDATE_DISCOVERY_LEASE<=now);cache.version&&(cache.staged!==!0||abandonedDiscovery)&&spawnNativeUpdateChild(cache.version,cache.selectProduction===!0)}var import_ci_info2=__toESM(require_ci_info(),1);function isAutoUpdateEnabled(config){return config.updates?.auto===!0}function hasAutoUpdatePreference(config){return typeof config.updates?.auto=="boolean"}function setAutoUpdate(client,enabled){client.config={...client.config,updates:{...client.config.updates,auto:enabled}},client.writeToConfigFile()}async function canAutoUpdate(client,exitCode,command){return isNativeBinaryInstall()||!isAutoUpdateEnabled(client.config)||exitCode!==0||import_ci_info2.default.isCI||client.nonInteractive||client.isAgent||command==="upgrade"?!1:isGlobal()}export{require_fetch_dist_tags,getWhoamiCachedAnswer,pinPackageVersion,setMinReleaseAgeBypass,executeHomebrewUpgrade,executeAutomaticUpgrade,executeUpgrade,NATIVE_UPDATE_VERSION_ENV,NATIVE_UPDATE_SELECT_PRODUCTION_ENV,isNativeUpdateChild,spawnNativeUpdateChild,isNativeAutoUpdateEnabled,cacheNativeUpdateVersion,cacheNativeUpdateDiscoveryAttempt,restoreNativeUpdateAfterDiscoveryFailure,markNativeUpdateStaged,scheduleNativeAutoUpdate,isAutoUpdateEnabled,hasAutoUpdatePreference,setAutoUpdate,canAutoUpdate};
|