@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{__commonJS}from"./chunk-BZENIQ7N.js";var require_is_date=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/is_date/index.js"(exports,module){function isDate(argument){return argument instanceof Date}module.exports=isDate}});var require_parse=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/parse/index.js"(exports,module){var isDate=require_is_date(),MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_MINUTE=6e4,DEFAULT_ADDITIONAL_DIGITS=2,parseTokenDateTimeDelimeter=/[T ]/,parseTokenPlainTime=/:/,parseTokenYY=/^(\d{2})$/,parseTokensYYY=[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],parseTokenYYYY=/^(\d{4})/,parseTokensYYYYY=[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],parseTokenMM=/^-(\d{2})$/,parseTokenDDD=/^-?(\d{3})$/,parseTokenMMDD=/^-?(\d{2})-?(\d{2})$/,parseTokenWww=/^-?W(\d{2})$/,parseTokenWwwD=/^-?W(\d{2})-?(\d{1})$/,parseTokenHH=/^(\d{2}([.,]\d*)?)$/,parseTokenHHMM=/^(\d{2}):?(\d{2}([.,]\d*)?)$/,parseTokenHHMMSS=/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,parseTokenTimezone=/([Z+-].*)$/,parseTokenTimezoneZ=/^(Z)$/,parseTokenTimezoneHH=/^([+-])(\d{2})$/,parseTokenTimezoneHHMM=/^([+-])(\d{2}):?(\d{2})$/;function parse(argument,dirtyOptions){if(isDate(argument))return new Date(argument.getTime());if(typeof argument!="string")return new Date(argument);var options=dirtyOptions||{},additionalDigits=options.additionalDigits;additionalDigits==null?additionalDigits=DEFAULT_ADDITIONAL_DIGITS:additionalDigits=Number(additionalDigits);var dateStrings=splitDateString(argument),parseYearResult=parseYear(dateStrings.date,additionalDigits),year=parseYearResult.year,restDateString=parseYearResult.restDateString,date=parseDate(restDateString,year);if(date){var timestamp=date.getTime(),time=0,offset;return dateStrings.time&&(time=parseTime(dateStrings.time)),dateStrings.timezone?offset=parseTimezone(dateStrings.timezone):(offset=new Date(timestamp+time).getTimezoneOffset(),offset=new Date(timestamp+time+offset*MILLISECONDS_IN_MINUTE).getTimezoneOffset()),new Date(timestamp+time+offset*MILLISECONDS_IN_MINUTE)}else return new Date(argument)}function splitDateString(dateString){var dateStrings={},array=dateString.split(parseTokenDateTimeDelimeter),timeString;if(parseTokenPlainTime.test(array[0])?(dateStrings.date=null,timeString=array[0]):(dateStrings.date=array[0],timeString=array[1]),timeString){var token=parseTokenTimezone.exec(timeString);token?(dateStrings.time=timeString.replace(token[1],""),dateStrings.timezone=token[1]):dateStrings.time=timeString}return dateStrings}function parseYear(dateString,additionalDigits){var parseTokenYYY=parseTokensYYY[additionalDigits],parseTokenYYYYY=parseTokensYYYYY[additionalDigits],token;if(token=parseTokenYYYY.exec(dateString)||parseTokenYYYYY.exec(dateString),token){var yearString=token[1];return{year:parseInt(yearString,10),restDateString:dateString.slice(yearString.length)}}if(token=parseTokenYY.exec(dateString)||parseTokenYYY.exec(dateString),token){var centuryString=token[1];return{year:parseInt(centuryString,10)*100,restDateString:dateString.slice(centuryString.length)}}return{year:null}}function parseDate(dateString,year){if(year===null)return null;var token,date,month,week;if(dateString.length===0)return date=new Date(0),date.setUTCFullYear(year),date;if(token=parseTokenMM.exec(dateString),token)return date=new Date(0),month=parseInt(token[1],10)-1,date.setUTCFullYear(year,month),date;if(token=parseTokenDDD.exec(dateString),token){date=new Date(0);var dayOfYear=parseInt(token[1],10);return date.setUTCFullYear(year,0,dayOfYear),date}if(token=parseTokenMMDD.exec(dateString),token){date=new Date(0),month=parseInt(token[1],10)-1;var day=parseInt(token[2],10);return date.setUTCFullYear(year,month,day),date}if(token=parseTokenWww.exec(dateString),token)return week=parseInt(token[1],10)-1,dayOfISOYear(year,week);if(token=parseTokenWwwD.exec(dateString),token){week=parseInt(token[1],10)-1;var dayOfWeek=parseInt(token[2],10)-1;return dayOfISOYear(year,week,dayOfWeek)}return null}function parseTime(timeString){var token,hours,minutes;if(token=parseTokenHH.exec(timeString),token)return hours=parseFloat(token[1].replace(",",".")),hours%24*MILLISECONDS_IN_HOUR;if(token=parseTokenHHMM.exec(timeString),token)return hours=parseInt(token[1],10),minutes=parseFloat(token[2].replace(",",".")),hours%24*MILLISECONDS_IN_HOUR+minutes*MILLISECONDS_IN_MINUTE;if(token=parseTokenHHMMSS.exec(timeString),token){hours=parseInt(token[1],10),minutes=parseInt(token[2],10);var seconds=parseFloat(token[3].replace(",","."));return hours%24*MILLISECONDS_IN_HOUR+minutes*MILLISECONDS_IN_MINUTE+seconds*1e3}return null}function parseTimezone(timezoneString){var token,absoluteOffset;return token=parseTokenTimezoneZ.exec(timezoneString),token?0:(token=parseTokenTimezoneHH.exec(timezoneString),token?(absoluteOffset=parseInt(token[2],10)*60,token[1]==="+"?-absoluteOffset:absoluteOffset):(token=parseTokenTimezoneHHMM.exec(timezoneString),token?(absoluteOffset=parseInt(token[2],10)*60+parseInt(token[3],10),token[1]==="+"?-absoluteOffset:absoluteOffset):0))}function dayOfISOYear(isoYear,week,day){week=week||0,day=day||0;var date=new Date(0);date.setUTCFullYear(isoYear,0,4);var fourthOfJanuaryDay=date.getUTCDay()||7,diff=week*7+day+1-fourthOfJanuaryDay;return date.setUTCDate(date.getUTCDate()+diff),date}module.exports=parse}});var require_start_of_year=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/start_of_year/index.js"(exports,module){var parse=require_parse();function startOfYear(dirtyDate){var cleanDate=parse(dirtyDate),date=new Date(0);return date.setFullYear(cleanDate.getFullYear(),0,1),date.setHours(0,0,0,0),date}module.exports=startOfYear}});var require_start_of_day=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/start_of_day/index.js"(exports,module){var parse=require_parse();function startOfDay(dirtyDate){var date=parse(dirtyDate);return date.setHours(0,0,0,0),date}module.exports=startOfDay}});var require_difference_in_calendar_days=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/difference_in_calendar_days/index.js"(exports,module){var startOfDay=require_start_of_day(),MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_DAY=864e5;function differenceInCalendarDays(dirtyDateLeft,dirtyDateRight){var startOfDayLeft=startOfDay(dirtyDateLeft),startOfDayRight=startOfDay(dirtyDateRight),timestampLeft=startOfDayLeft.getTime()-startOfDayLeft.getTimezoneOffset()*MILLISECONDS_IN_MINUTE,timestampRight=startOfDayRight.getTime()-startOfDayRight.getTimezoneOffset()*MILLISECONDS_IN_MINUTE;return Math.round((timestampLeft-timestampRight)/MILLISECONDS_IN_DAY)}module.exports=differenceInCalendarDays}});var require_get_day_of_year=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/get_day_of_year/index.js"(exports,module){var parse=require_parse(),startOfYear=require_start_of_year(),differenceInCalendarDays=require_difference_in_calendar_days();function getDayOfYear(dirtyDate){var date=parse(dirtyDate),diff=differenceInCalendarDays(date,startOfYear(date)),dayOfYear=diff+1;return dayOfYear}module.exports=getDayOfYear}});var require_start_of_week=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/start_of_week/index.js"(exports,module){var parse=require_parse();function startOfWeek(dirtyDate,dirtyOptions){var weekStartsOn=dirtyOptions&&Number(dirtyOptions.weekStartsOn)||0,date=parse(dirtyDate),day=date.getDay(),diff=(day<weekStartsOn?7:0)+day-weekStartsOn;return date.setDate(date.getDate()-diff),date.setHours(0,0,0,0),date}module.exports=startOfWeek}});var require_start_of_iso_week=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/start_of_iso_week/index.js"(exports,module){var startOfWeek=require_start_of_week();function startOfISOWeek(dirtyDate){return startOfWeek(dirtyDate,{weekStartsOn:1})}module.exports=startOfISOWeek}});var require_get_iso_year=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/get_iso_year/index.js"(exports,module){var parse=require_parse(),startOfISOWeek=require_start_of_iso_week();function getISOYear(dirtyDate){var date=parse(dirtyDate),year=date.getFullYear(),fourthOfJanuaryOfNextYear=new Date(0);fourthOfJanuaryOfNextYear.setFullYear(year+1,0,4),fourthOfJanuaryOfNextYear.setHours(0,0,0,0);var startOfNextYear=startOfISOWeek(fourthOfJanuaryOfNextYear),fourthOfJanuaryOfThisYear=new Date(0);fourthOfJanuaryOfThisYear.setFullYear(year,0,4),fourthOfJanuaryOfThisYear.setHours(0,0,0,0);var startOfThisYear=startOfISOWeek(fourthOfJanuaryOfThisYear);return date.getTime()>=startOfNextYear.getTime()?year+1:date.getTime()>=startOfThisYear.getTime()?year:year-1}module.exports=getISOYear}});var require_start_of_iso_year=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/start_of_iso_year/index.js"(exports,module){var getISOYear=require_get_iso_year(),startOfISOWeek=require_start_of_iso_week();function startOfISOYear(dirtyDate){var year=getISOYear(dirtyDate),fourthOfJanuary=new Date(0);fourthOfJanuary.setFullYear(year,0,4),fourthOfJanuary.setHours(0,0,0,0);var date=startOfISOWeek(fourthOfJanuary);return date}module.exports=startOfISOYear}});var require_get_iso_week=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/get_iso_week/index.js"(exports,module){var parse=require_parse(),startOfISOWeek=require_start_of_iso_week(),startOfISOYear=require_start_of_iso_year(),MILLISECONDS_IN_WEEK=6048e5;function getISOWeek(dirtyDate){var date=parse(dirtyDate),diff=startOfISOWeek(date).getTime()-startOfISOYear(date).getTime();return Math.round(diff/MILLISECONDS_IN_WEEK)+1}module.exports=getISOWeek}});var require_is_valid=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/is_valid/index.js"(exports,module){var isDate=require_is_date();function isValid(dirtyDate){if(isDate(dirtyDate))return!isNaN(dirtyDate);throw new TypeError(toString.call(dirtyDate)+" is not an instance of Date")}module.exports=isValid}});var require_build_distance_in_words_locale=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/locale/en/build_distance_in_words_locale/index.js"(exports,module){function buildDistanceInWordsLocale(){var distanceInWordsLocale={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function localize(token,count,options){options=options||{};var result;return typeof distanceInWordsLocale[token]=="string"?result=distanceInWordsLocale[token]:count===1?result=distanceInWordsLocale[token].one:result=distanceInWordsLocale[token].other.replace("{{count}}",count),options.addSuffix?options.comparison>0?"in "+result:result+" ago":result}return{localize}}module.exports=buildDistanceInWordsLocale}});var require_build_formatting_tokens_reg_exp=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/locale/_lib/build_formatting_tokens_reg_exp/index.js"(exports,module){var commonFormatterKeys=["M","MM","Q","D","DD","DDD","DDDD","d","E","W","WW","YY","YYYY","GG","GGGG","H","HH","h","hh","m","mm","s","ss","S","SS","SSS","Z","ZZ","X","x"];function buildFormattingTokensRegExp(formatters){var formatterKeys=[];for(var key in formatters)formatters.hasOwnProperty(key)&&formatterKeys.push(key);var formattingTokens=commonFormatterKeys.concat(formatterKeys).sort().reverse(),formattingTokensRegExp=new RegExp("(\\[[^\\[]*\\])|(\\\\)?("+formattingTokens.join("|")+"|.)","g");return formattingTokensRegExp}module.exports=buildFormattingTokensRegExp}});var require_build_format_locale=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/locale/en/build_format_locale/index.js"(exports,module){var buildFormattingTokensRegExp=require_build_formatting_tokens_reg_exp();function buildFormatLocale(){var months3char=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthsFull=["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays2char=["Su","Mo","Tu","We","Th","Fr","Sa"],weekdays3char=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysFull=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],meridiemUppercase=["AM","PM"],meridiemLowercase=["am","pm"],meridiemFull=["a.m.","p.m."],formatters={MMM:function(date){return months3char[date.getMonth()]},MMMM:function(date){return monthsFull[date.getMonth()]},dd:function(date){return weekdays2char[date.getDay()]},ddd:function(date){return weekdays3char[date.getDay()]},dddd:function(date){return weekdaysFull[date.getDay()]},A:function(date){return date.getHours()/12>=1?meridiemUppercase[1]:meridiemUppercase[0]},a:function(date){return date.getHours()/12>=1?meridiemLowercase[1]:meridiemLowercase[0]},aa:function(date){return date.getHours()/12>=1?meridiemFull[1]:meridiemFull[0]}},ordinalFormatters=["M","D","DDD","d","Q","W"];return ordinalFormatters.forEach(function(formatterToken){formatters[formatterToken+"o"]=function(date,formatters2){return ordinal(formatters2[formatterToken](date))}}),{formatters,formattingTokensRegExp:buildFormattingTokensRegExp(formatters)}}function ordinal(number){var rem100=number%100;if(rem100>20||rem100<10)switch(rem100%10){case 1:return number+"st";case 2:return number+"nd";case 3:return number+"rd"}return number+"th"}module.exports=buildFormatLocale}});var require_en=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/locale/en/index.js"(exports,module){var buildDistanceInWordsLocale=require_build_distance_in_words_locale(),buildFormatLocale=require_build_format_locale();module.exports={distanceInWords:buildDistanceInWordsLocale(),format:buildFormatLocale()}}});var require_format=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/format/index.js"(exports,module){var getDayOfYear=require_get_day_of_year(),getISOWeek=require_get_iso_week(),getISOYear=require_get_iso_year(),parse=require_parse(),isValid=require_is_valid(),enLocale=require_en();function format(dirtyDate,dirtyFormatStr,dirtyOptions){var formatStr=dirtyFormatStr?String(dirtyFormatStr):"YYYY-MM-DDTHH:mm:ss.SSSZ",options=dirtyOptions||{},locale=options.locale,localeFormatters=enLocale.format.formatters,formattingTokensRegExp=enLocale.format.formattingTokensRegExp;locale&&locale.format&&locale.format.formatters&&(localeFormatters=locale.format.formatters,locale.format.formattingTokensRegExp&&(formattingTokensRegExp=locale.format.formattingTokensRegExp));var date=parse(dirtyDate);if(!isValid(date))return"Invalid Date";var formatFn=buildFormatFn(formatStr,localeFormatters,formattingTokensRegExp);return formatFn(date)}var formatters={M:function(date){return date.getMonth()+1},MM:function(date){return addLeadingZeros(date.getMonth()+1,2)},Q:function(date){return Math.ceil((date.getMonth()+1)/3)},D:function(date){return date.getDate()},DD:function(date){return addLeadingZeros(date.getDate(),2)},DDD:function(date){return getDayOfYear(date)},DDDD:function(date){return addLeadingZeros(getDayOfYear(date),3)},d:function(date){return date.getDay()},E:function(date){return date.getDay()||7},W:function(date){return getISOWeek(date)},WW:function(date){return addLeadingZeros(getISOWeek(date),2)},YY:function(date){return addLeadingZeros(date.getFullYear(),4).substr(2)},YYYY:function(date){return addLeadingZeros(date.getFullYear(),4)},GG:function(date){return String(getISOYear(date)).substr(2)},GGGG:function(date){return getISOYear(date)},H:function(date){return date.getHours()},HH:function(date){return addLeadingZeros(date.getHours(),2)},h:function(date){var hours=date.getHours();return hours===0?12:hours>12?hours%12:hours},hh:function(date){return addLeadingZeros(formatters.h(date),2)},m:function(date){return date.getMinutes()},mm:function(date){return addLeadingZeros(date.getMinutes(),2)},s:function(date){return date.getSeconds()},ss:function(date){return addLeadingZeros(date.getSeconds(),2)},S:function(date){return Math.floor(date.getMilliseconds()/100)},SS:function(date){return addLeadingZeros(Math.floor(date.getMilliseconds()/10),2)},SSS:function(date){return addLeadingZeros(date.getMilliseconds(),3)},Z:function(date){return formatTimezone(date.getTimezoneOffset(),":")},ZZ:function(date){return formatTimezone(date.getTimezoneOffset())},X:function(date){return Math.floor(date.getTime()/1e3)},x:function(date){return date.getTime()}};function buildFormatFn(formatStr,localeFormatters,formattingTokensRegExp){var array=formatStr.match(formattingTokensRegExp),length=array.length,i,formatter;for(i=0;i<length;i++)formatter=localeFormatters[array[i]]||formatters[array[i]],formatter?array[i]=formatter:array[i]=removeFormattingTokens(array[i]);return function(date){for(var output="",i2=0;i2<length;i2++)array[i2]instanceof Function?output+=array[i2](date,formatters):output+=array[i2];return output}}function removeFormattingTokens(input){return input.match(/\[[\s\S]/)?input.replace(/^\[|]$/g,""):input.replace(/\\/g,"")}function formatTimezone(offset,delimeter){delimeter=delimeter||"";var sign=offset>0?"-":"+",absOffset=Math.abs(offset),hours=Math.floor(absOffset/60),minutes=absOffset%60;return sign+addLeadingZeros(hours,2)+delimeter+addLeadingZeros(minutes,2)}function addLeadingZeros(number,targetLength){for(var output=Math.abs(number).toString();output.length<targetLength;)output="0"+output;return output}module.exports=format}});export{require_format};
|
|
7
|
+
import{__commonJS}from"./chunk-NBPLUP7C.js";var require_is_date=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/is_date/index.js"(exports,module){function isDate(argument){return argument instanceof Date}module.exports=isDate}});var require_parse=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/parse/index.js"(exports,module){var isDate=require_is_date(),MILLISECONDS_IN_HOUR=36e5,MILLISECONDS_IN_MINUTE=6e4,DEFAULT_ADDITIONAL_DIGITS=2,parseTokenDateTimeDelimeter=/[T ]/,parseTokenPlainTime=/:/,parseTokenYY=/^(\d{2})$/,parseTokensYYY=[/^([+-]\d{2})$/,/^([+-]\d{3})$/,/^([+-]\d{4})$/],parseTokenYYYY=/^(\d{4})/,parseTokensYYYYY=[/^([+-]\d{4})/,/^([+-]\d{5})/,/^([+-]\d{6})/],parseTokenMM=/^-(\d{2})$/,parseTokenDDD=/^-?(\d{3})$/,parseTokenMMDD=/^-?(\d{2})-?(\d{2})$/,parseTokenWww=/^-?W(\d{2})$/,parseTokenWwwD=/^-?W(\d{2})-?(\d{1})$/,parseTokenHH=/^(\d{2}([.,]\d*)?)$/,parseTokenHHMM=/^(\d{2}):?(\d{2}([.,]\d*)?)$/,parseTokenHHMMSS=/^(\d{2}):?(\d{2}):?(\d{2}([.,]\d*)?)$/,parseTokenTimezone=/([Z+-].*)$/,parseTokenTimezoneZ=/^(Z)$/,parseTokenTimezoneHH=/^([+-])(\d{2})$/,parseTokenTimezoneHHMM=/^([+-])(\d{2}):?(\d{2})$/;function parse(argument,dirtyOptions){if(isDate(argument))return new Date(argument.getTime());if(typeof argument!="string")return new Date(argument);var options=dirtyOptions||{},additionalDigits=options.additionalDigits;additionalDigits==null?additionalDigits=DEFAULT_ADDITIONAL_DIGITS:additionalDigits=Number(additionalDigits);var dateStrings=splitDateString(argument),parseYearResult=parseYear(dateStrings.date,additionalDigits),year=parseYearResult.year,restDateString=parseYearResult.restDateString,date=parseDate(restDateString,year);if(date){var timestamp=date.getTime(),time=0,offset;return dateStrings.time&&(time=parseTime(dateStrings.time)),dateStrings.timezone?offset=parseTimezone(dateStrings.timezone):(offset=new Date(timestamp+time).getTimezoneOffset(),offset=new Date(timestamp+time+offset*MILLISECONDS_IN_MINUTE).getTimezoneOffset()),new Date(timestamp+time+offset*MILLISECONDS_IN_MINUTE)}else return new Date(argument)}function splitDateString(dateString){var dateStrings={},array=dateString.split(parseTokenDateTimeDelimeter),timeString;if(parseTokenPlainTime.test(array[0])?(dateStrings.date=null,timeString=array[0]):(dateStrings.date=array[0],timeString=array[1]),timeString){var token=parseTokenTimezone.exec(timeString);token?(dateStrings.time=timeString.replace(token[1],""),dateStrings.timezone=token[1]):dateStrings.time=timeString}return dateStrings}function parseYear(dateString,additionalDigits){var parseTokenYYY=parseTokensYYY[additionalDigits],parseTokenYYYYY=parseTokensYYYYY[additionalDigits],token;if(token=parseTokenYYYY.exec(dateString)||parseTokenYYYYY.exec(dateString),token){var yearString=token[1];return{year:parseInt(yearString,10),restDateString:dateString.slice(yearString.length)}}if(token=parseTokenYY.exec(dateString)||parseTokenYYY.exec(dateString),token){var centuryString=token[1];return{year:parseInt(centuryString,10)*100,restDateString:dateString.slice(centuryString.length)}}return{year:null}}function parseDate(dateString,year){if(year===null)return null;var token,date,month,week;if(dateString.length===0)return date=new Date(0),date.setUTCFullYear(year),date;if(token=parseTokenMM.exec(dateString),token)return date=new Date(0),month=parseInt(token[1],10)-1,date.setUTCFullYear(year,month),date;if(token=parseTokenDDD.exec(dateString),token){date=new Date(0);var dayOfYear=parseInt(token[1],10);return date.setUTCFullYear(year,0,dayOfYear),date}if(token=parseTokenMMDD.exec(dateString),token){date=new Date(0),month=parseInt(token[1],10)-1;var day=parseInt(token[2],10);return date.setUTCFullYear(year,month,day),date}if(token=parseTokenWww.exec(dateString),token)return week=parseInt(token[1],10)-1,dayOfISOYear(year,week);if(token=parseTokenWwwD.exec(dateString),token){week=parseInt(token[1],10)-1;var dayOfWeek=parseInt(token[2],10)-1;return dayOfISOYear(year,week,dayOfWeek)}return null}function parseTime(timeString){var token,hours,minutes;if(token=parseTokenHH.exec(timeString),token)return hours=parseFloat(token[1].replace(",",".")),hours%24*MILLISECONDS_IN_HOUR;if(token=parseTokenHHMM.exec(timeString),token)return hours=parseInt(token[1],10),minutes=parseFloat(token[2].replace(",",".")),hours%24*MILLISECONDS_IN_HOUR+minutes*MILLISECONDS_IN_MINUTE;if(token=parseTokenHHMMSS.exec(timeString),token){hours=parseInt(token[1],10),minutes=parseInt(token[2],10);var seconds=parseFloat(token[3].replace(",","."));return hours%24*MILLISECONDS_IN_HOUR+minutes*MILLISECONDS_IN_MINUTE+seconds*1e3}return null}function parseTimezone(timezoneString){var token,absoluteOffset;return token=parseTokenTimezoneZ.exec(timezoneString),token?0:(token=parseTokenTimezoneHH.exec(timezoneString),token?(absoluteOffset=parseInt(token[2],10)*60,token[1]==="+"?-absoluteOffset:absoluteOffset):(token=parseTokenTimezoneHHMM.exec(timezoneString),token?(absoluteOffset=parseInt(token[2],10)*60+parseInt(token[3],10),token[1]==="+"?-absoluteOffset:absoluteOffset):0))}function dayOfISOYear(isoYear,week,day){week=week||0,day=day||0;var date=new Date(0);date.setUTCFullYear(isoYear,0,4);var fourthOfJanuaryDay=date.getUTCDay()||7,diff=week*7+day+1-fourthOfJanuaryDay;return date.setUTCDate(date.getUTCDate()+diff),date}module.exports=parse}});var require_start_of_year=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/start_of_year/index.js"(exports,module){var parse=require_parse();function startOfYear(dirtyDate){var cleanDate=parse(dirtyDate),date=new Date(0);return date.setFullYear(cleanDate.getFullYear(),0,1),date.setHours(0,0,0,0),date}module.exports=startOfYear}});var require_start_of_day=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/start_of_day/index.js"(exports,module){var parse=require_parse();function startOfDay(dirtyDate){var date=parse(dirtyDate);return date.setHours(0,0,0,0),date}module.exports=startOfDay}});var require_difference_in_calendar_days=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/difference_in_calendar_days/index.js"(exports,module){var startOfDay=require_start_of_day(),MILLISECONDS_IN_MINUTE=6e4,MILLISECONDS_IN_DAY=864e5;function differenceInCalendarDays(dirtyDateLeft,dirtyDateRight){var startOfDayLeft=startOfDay(dirtyDateLeft),startOfDayRight=startOfDay(dirtyDateRight),timestampLeft=startOfDayLeft.getTime()-startOfDayLeft.getTimezoneOffset()*MILLISECONDS_IN_MINUTE,timestampRight=startOfDayRight.getTime()-startOfDayRight.getTimezoneOffset()*MILLISECONDS_IN_MINUTE;return Math.round((timestampLeft-timestampRight)/MILLISECONDS_IN_DAY)}module.exports=differenceInCalendarDays}});var require_get_day_of_year=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/get_day_of_year/index.js"(exports,module){var parse=require_parse(),startOfYear=require_start_of_year(),differenceInCalendarDays=require_difference_in_calendar_days();function getDayOfYear(dirtyDate){var date=parse(dirtyDate),diff=differenceInCalendarDays(date,startOfYear(date)),dayOfYear=diff+1;return dayOfYear}module.exports=getDayOfYear}});var require_start_of_week=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/start_of_week/index.js"(exports,module){var parse=require_parse();function startOfWeek(dirtyDate,dirtyOptions){var weekStartsOn=dirtyOptions&&Number(dirtyOptions.weekStartsOn)||0,date=parse(dirtyDate),day=date.getDay(),diff=(day<weekStartsOn?7:0)+day-weekStartsOn;return date.setDate(date.getDate()-diff),date.setHours(0,0,0,0),date}module.exports=startOfWeek}});var require_start_of_iso_week=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/start_of_iso_week/index.js"(exports,module){var startOfWeek=require_start_of_week();function startOfISOWeek(dirtyDate){return startOfWeek(dirtyDate,{weekStartsOn:1})}module.exports=startOfISOWeek}});var require_get_iso_year=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/get_iso_year/index.js"(exports,module){var parse=require_parse(),startOfISOWeek=require_start_of_iso_week();function getISOYear(dirtyDate){var date=parse(dirtyDate),year=date.getFullYear(),fourthOfJanuaryOfNextYear=new Date(0);fourthOfJanuaryOfNextYear.setFullYear(year+1,0,4),fourthOfJanuaryOfNextYear.setHours(0,0,0,0);var startOfNextYear=startOfISOWeek(fourthOfJanuaryOfNextYear),fourthOfJanuaryOfThisYear=new Date(0);fourthOfJanuaryOfThisYear.setFullYear(year,0,4),fourthOfJanuaryOfThisYear.setHours(0,0,0,0);var startOfThisYear=startOfISOWeek(fourthOfJanuaryOfThisYear);return date.getTime()>=startOfNextYear.getTime()?year+1:date.getTime()>=startOfThisYear.getTime()?year:year-1}module.exports=getISOYear}});var require_start_of_iso_year=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/start_of_iso_year/index.js"(exports,module){var getISOYear=require_get_iso_year(),startOfISOWeek=require_start_of_iso_week();function startOfISOYear(dirtyDate){var year=getISOYear(dirtyDate),fourthOfJanuary=new Date(0);fourthOfJanuary.setFullYear(year,0,4),fourthOfJanuary.setHours(0,0,0,0);var date=startOfISOWeek(fourthOfJanuary);return date}module.exports=startOfISOYear}});var require_get_iso_week=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/get_iso_week/index.js"(exports,module){var parse=require_parse(),startOfISOWeek=require_start_of_iso_week(),startOfISOYear=require_start_of_iso_year(),MILLISECONDS_IN_WEEK=6048e5;function getISOWeek(dirtyDate){var date=parse(dirtyDate),diff=startOfISOWeek(date).getTime()-startOfISOYear(date).getTime();return Math.round(diff/MILLISECONDS_IN_WEEK)+1}module.exports=getISOWeek}});var require_is_valid=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/is_valid/index.js"(exports,module){var isDate=require_is_date();function isValid(dirtyDate){if(isDate(dirtyDate))return!isNaN(dirtyDate);throw new TypeError(toString.call(dirtyDate)+" is not an instance of Date")}module.exports=isValid}});var require_build_distance_in_words_locale=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/locale/en/build_distance_in_words_locale/index.js"(exports,module){function buildDistanceInWordsLocale(){var distanceInWordsLocale={lessThanXSeconds:{one:"less than a second",other:"less than {{count}} seconds"},xSeconds:{one:"1 second",other:"{{count}} seconds"},halfAMinute:"half a minute",lessThanXMinutes:{one:"less than a minute",other:"less than {{count}} minutes"},xMinutes:{one:"1 minute",other:"{{count}} minutes"},aboutXHours:{one:"about 1 hour",other:"about {{count}} hours"},xHours:{one:"1 hour",other:"{{count}} hours"},xDays:{one:"1 day",other:"{{count}} days"},aboutXMonths:{one:"about 1 month",other:"about {{count}} months"},xMonths:{one:"1 month",other:"{{count}} months"},aboutXYears:{one:"about 1 year",other:"about {{count}} years"},xYears:{one:"1 year",other:"{{count}} years"},overXYears:{one:"over 1 year",other:"over {{count}} years"},almostXYears:{one:"almost 1 year",other:"almost {{count}} years"}};function localize(token,count,options){options=options||{};var result;return typeof distanceInWordsLocale[token]=="string"?result=distanceInWordsLocale[token]:count===1?result=distanceInWordsLocale[token].one:result=distanceInWordsLocale[token].other.replace("{{count}}",count),options.addSuffix?options.comparison>0?"in "+result:result+" ago":result}return{localize}}module.exports=buildDistanceInWordsLocale}});var require_build_formatting_tokens_reg_exp=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/locale/_lib/build_formatting_tokens_reg_exp/index.js"(exports,module){var commonFormatterKeys=["M","MM","Q","D","DD","DDD","DDDD","d","E","W","WW","YY","YYYY","GG","GGGG","H","HH","h","hh","m","mm","s","ss","S","SS","SSS","Z","ZZ","X","x"];function buildFormattingTokensRegExp(formatters){var formatterKeys=[];for(var key in formatters)formatters.hasOwnProperty(key)&&formatterKeys.push(key);var formattingTokens=commonFormatterKeys.concat(formatterKeys).sort().reverse(),formattingTokensRegExp=new RegExp("(\\[[^\\[]*\\])|(\\\\)?("+formattingTokens.join("|")+"|.)","g");return formattingTokensRegExp}module.exports=buildFormattingTokensRegExp}});var require_build_format_locale=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/locale/en/build_format_locale/index.js"(exports,module){var buildFormattingTokensRegExp=require_build_formatting_tokens_reg_exp();function buildFormatLocale(){var months3char=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"],monthsFull=["January","February","March","April","May","June","July","August","September","October","November","December"],weekdays2char=["Su","Mo","Tu","We","Th","Fr","Sa"],weekdays3char=["Sun","Mon","Tue","Wed","Thu","Fri","Sat"],weekdaysFull=["Sunday","Monday","Tuesday","Wednesday","Thursday","Friday","Saturday"],meridiemUppercase=["AM","PM"],meridiemLowercase=["am","pm"],meridiemFull=["a.m.","p.m."],formatters={MMM:function(date){return months3char[date.getMonth()]},MMMM:function(date){return monthsFull[date.getMonth()]},dd:function(date){return weekdays2char[date.getDay()]},ddd:function(date){return weekdays3char[date.getDay()]},dddd:function(date){return weekdaysFull[date.getDay()]},A:function(date){return date.getHours()/12>=1?meridiemUppercase[1]:meridiemUppercase[0]},a:function(date){return date.getHours()/12>=1?meridiemLowercase[1]:meridiemLowercase[0]},aa:function(date){return date.getHours()/12>=1?meridiemFull[1]:meridiemFull[0]}},ordinalFormatters=["M","D","DDD","d","Q","W"];return ordinalFormatters.forEach(function(formatterToken){formatters[formatterToken+"o"]=function(date,formatters2){return ordinal(formatters2[formatterToken](date))}}),{formatters,formattingTokensRegExp:buildFormattingTokensRegExp(formatters)}}function ordinal(number){var rem100=number%100;if(rem100>20||rem100<10)switch(rem100%10){case 1:return number+"st";case 2:return number+"nd";case 3:return number+"rd"}return number+"th"}module.exports=buildFormatLocale}});var require_en=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/locale/en/index.js"(exports,module){var buildDistanceInWordsLocale=require_build_distance_in_words_locale(),buildFormatLocale=require_build_format_locale();module.exports={distanceInWords:buildDistanceInWordsLocale(),format:buildFormatLocale()}}});var require_format=__commonJS({"../../node_modules/.pnpm/date-fns@1.29.0/node_modules/date-fns/format/index.js"(exports,module){var getDayOfYear=require_get_day_of_year(),getISOWeek=require_get_iso_week(),getISOYear=require_get_iso_year(),parse=require_parse(),isValid=require_is_valid(),enLocale=require_en();function format(dirtyDate,dirtyFormatStr,dirtyOptions){var formatStr=dirtyFormatStr?String(dirtyFormatStr):"YYYY-MM-DDTHH:mm:ss.SSSZ",options=dirtyOptions||{},locale=options.locale,localeFormatters=enLocale.format.formatters,formattingTokensRegExp=enLocale.format.formattingTokensRegExp;locale&&locale.format&&locale.format.formatters&&(localeFormatters=locale.format.formatters,locale.format.formattingTokensRegExp&&(formattingTokensRegExp=locale.format.formattingTokensRegExp));var date=parse(dirtyDate);if(!isValid(date))return"Invalid Date";var formatFn=buildFormatFn(formatStr,localeFormatters,formattingTokensRegExp);return formatFn(date)}var formatters={M:function(date){return date.getMonth()+1},MM:function(date){return addLeadingZeros(date.getMonth()+1,2)},Q:function(date){return Math.ceil((date.getMonth()+1)/3)},D:function(date){return date.getDate()},DD:function(date){return addLeadingZeros(date.getDate(),2)},DDD:function(date){return getDayOfYear(date)},DDDD:function(date){return addLeadingZeros(getDayOfYear(date),3)},d:function(date){return date.getDay()},E:function(date){return date.getDay()||7},W:function(date){return getISOWeek(date)},WW:function(date){return addLeadingZeros(getISOWeek(date),2)},YY:function(date){return addLeadingZeros(date.getFullYear(),4).substr(2)},YYYY:function(date){return addLeadingZeros(date.getFullYear(),4)},GG:function(date){return String(getISOYear(date)).substr(2)},GGGG:function(date){return getISOYear(date)},H:function(date){return date.getHours()},HH:function(date){return addLeadingZeros(date.getHours(),2)},h:function(date){var hours=date.getHours();return hours===0?12:hours>12?hours%12:hours},hh:function(date){return addLeadingZeros(formatters.h(date),2)},m:function(date){return date.getMinutes()},mm:function(date){return addLeadingZeros(date.getMinutes(),2)},s:function(date){return date.getSeconds()},ss:function(date){return addLeadingZeros(date.getSeconds(),2)},S:function(date){return Math.floor(date.getMilliseconds()/100)},SS:function(date){return addLeadingZeros(Math.floor(date.getMilliseconds()/10),2)},SSS:function(date){return addLeadingZeros(date.getMilliseconds(),3)},Z:function(date){return formatTimezone(date.getTimezoneOffset(),":")},ZZ:function(date){return formatTimezone(date.getTimezoneOffset())},X:function(date){return Math.floor(date.getTime()/1e3)},x:function(date){return date.getTime()}};function buildFormatFn(formatStr,localeFormatters,formattingTokensRegExp){var array=formatStr.match(formattingTokensRegExp),length=array.length,i,formatter;for(i=0;i<length;i++)formatter=localeFormatters[array[i]]||formatters[array[i]],formatter?array[i]=formatter:array[i]=removeFormattingTokens(array[i]);return function(date){for(var output="",i2=0;i2<length;i2++)array[i2]instanceof Function?output+=array[i2](date,formatters):output+=array[i2];return output}}function removeFormattingTokens(input){return input.match(/\[[\s\S]/)?input.replace(/^\[|]$/g,""):input.replace(/\\/g,"")}function formatTimezone(offset,delimeter){delimeter=delimeter||"";var sign=offset>0?"-":"+",absOffset=Math.abs(offset),hours=Math.floor(absOffset/60),minutes=absOffset%60;return sign+addLeadingZeros(hours,2)+delimeter+addLeadingZeros(minutes,2)}function addLeadingZeros(number,targetLength){for(var output=Math.abs(number).toString();output.length<targetLength;)output="0"+output;return output}module.exports=format}});export{require_format};
|
|
@@ -4,9 +4,9 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{apiServerMessage}from"./chunk-
|
|
7
|
+
import{apiServerMessage}from"./chunk-YU33PPKX.js";import{parseSubcommandArguments,requireProjectContext}from"./chunk-OD4RCBDD.js";import{generateSparkline}from"./chunk-57H5KQGN.js";import{stamp_default}from"./chunk-LY3EY2VG.js";import{resolveProjectContext}from"./chunk-KVZR24QI.js";import{table}from"./chunk-QCYCLWNG.js";import{getScope}from"./chunk-HG7NRFC5.js";import{printError}from"./chunk-Y2J2ESAE.js";import{AGENT_REASON,AGENT_STATUS,buildCommandWithGlobalFlags,buildCommandWithYes,clientObservabilityPlanRecovery,getExitCodeForReason,outputAgentError,shouldEmitNonInteractiveCommandError,teamCache,writeAgentError}from"./chunk-NVU7XTNI.js";import{isAPIError}from"./chunk-MTPHHAPR.js";import{getCommandName,getCommandNamePlain,packageName}from"./chunk-EFGZK6OY.js";import{output_manager_default}from"./chunk-RIXTYUYN.js";import{getGlobalFlagsFromArgs,quoteArg}from"./chunk-DORCX7UB.js";import{require_source}from"./chunk-UJ7YUIEJ.js";import{__toESM}from"./chunk-NBPLUP7C.js";var PROJECT_TIER_RANK={priority:1,critical:2};function hasProjectTier(project,tier){let rank=project?.tier===void 0?void 0:PROJECT_TIER_RANK[project.tier];return rank!==void 0&&rank>=PROJECT_TIER_RANK[tier]}function projectScope(project,teamId,teamSlug){return{type:"project",projectId:project.id,teamId,...teamSlug?{teamSlug}:{},displayName:project.name,...project.tier?{tier:project.tier}:{}}}function isPriorityScope(scope){return scope.type==="team"||hasProjectTier(scope,"priority")}function firewallConfigUrl(scope,path=""){let query=new URLSearchParams;return scope.type==="project"?(query.set("projectId",scope.projectId),scope.teamId&&query.set("teamId",scope.teamId),`/v1/security/firewall/config${path}?${query.toString()}`):(query.set("teamId",scope.teamId),`/v1/security/firewall/team-config${path}?${query.toString()}`)}var import_chalk=__toESM(require_source(),1);var ACTION_COLORS={allow:import_chalk.default.blue,deny:import_chalk.default.red,challenge:import_chalk.default.yellow,log:import_chalk.default.magenta,rate_limit:import_chalk.default.cyan,"rate-limit":import_chalk.default.cyan,bypass:import_chalk.default.green};function labelForAction(action){return action==="rate_limit"||action==="rate-limit"?"Rate Limited":action.split(/[-_]/).filter(Boolean).map(word=>word.charAt(0).toUpperCase()+word.slice(1)).join(" ")}var MONTHS=["Jan","Feb","Mar","Apr","May","Jun","Jul","Aug","Sep","Oct","Nov","Dec"];function formatCount(n){return n>=1e6?`${(n/1e6).toFixed(1)}M`:n>=1e3?`${(n/1e3).toFixed(1)}k`:String(Math.round(n))}function pad2(n){return String(n).padStart(2,"0")}function formatUtcTime(ms,withDate){let d=new Date(ms),hm=`${pad2(d.getUTCHours())}:${pad2(d.getUTCMinutes())}`;return withDate?`${MONTHS[d.getUTCMonth()]} ${d.getUTCDate()} ${hm}`:hm}function relativeTime(ts){let diff=Date.now()-ts;return diff<6e4?"just now":diff<36e5?`${Math.floor(diff/6e4)}m ago`:diff<864e5?`${Math.floor(diff/36e5)}h ago`:`${Math.floor(diff/864e5)}d ago`}function formatUtcDateTime(ms){return`${formatUtcTime(ms,!0)} UTC (${relativeTime(ms)})`}function colorizeDetail(detail){return detail.split(" \xB7 ").map(part=>{let color=ACTION_COLORS[part.toLowerCase().replace(/ /g,"_")];return color?color(part):part}).join(" \xB7 ")}function windowNeedsDate(startMs,endMs){return endMs-startMs>25*36e5}function granularityLabel(granularity){return"minutes"in granularity?`${granularity.minutes}m`:"hours"in granularity?`${granularity.hours}h`:`${granularity.days}d`}function formatActionTrendTable(series){let allTs=new Set;for(let s of series)for(let p of s.timeseries)allTs.add(p.timestamp);let axis=[...allTs].sort(),hasAnyTraffic=series.some(s=>s.total>0||s.timeseries.some(p=>p.value>0));if(series.length===0||axis.length===0||!hasAnyTraffic)return import_chalk.default.dim(" No request data for this period.");let startMs=new Date(axis[0]).getTime(),endMs=new Date(axis[axis.length-1]).getTime(),needsDate=windowNeedsDate(startMs,endMs),rows=[["Action","Trend","Total","Peak","Peak at"].map(h=>import_chalk.default.bold(import_chalk.default.cyan(h)))];for(let s of series){let byTs=new Map(s.timeseries.map(p=>[p.timestamp,p.value])),values=axis.map(t=>byTs.get(t)??0),peak=0,peakTs="";for(let i=0;i<axis.length;i++)values[i]>peak&&(peak=values[i],peakTs=axis[i]);let plain=x=>x,color=s.total>0?ACTION_COLORS[s.action]??plain:import_chalk.default.dim,trend=s.total>0?plain:import_chalk.default.dim;rows.push([color(labelForAction(s.action)),trend(generateSparkline(values)),formatCount(s.total),peak>0?formatCount(peak):"--",peak>0?formatUtcTime(new Date(peakTs).getTime(),needsDate):"--"])}return table(rows,{align:["l","l","r","r","r"],hsep:3}).split(`
|
|
8
8
|
`).map(line=>` ${line}`.trimEnd()).join(`
|
|
9
|
-
`)}var FIREWALL_O11Y_ALERT_TYPES=["botId_anomaly","firewallSystemRule_anomaly","firewallCustomRule_anomaly"],FIREWALL_ANOMALY_TYPE="firewall_anomaly",SYS_DOS_MITIGATION_RULE_ID="sys_dos_mitigation",SYSTEM_RULE_ANOMALY_TYPE="firewallSystemRule_anomaly",FIREWALL_ACTIVITY_PLAN_MESSAGE="Traffic and alerts need Observability Plus.",FIREWALL_ALERTS_PARTIAL_ERROR_MESSAGE="Couldn't load every alert source.";function reduceAttackAnomaly(anomaly){return Object.keys(anomaly.affectedHostMap).reduce((acc,host)=>{acc.hosts.push(host);let challenged=anomaly.affectedHostMap[host].ddosAlerts?.["sys_dos_mitigation:challenge"]?.totalReqs||0,denied=anomaly.affectedHostMap[host].ddosAlerts?.["sys_dos_mitigation:deny"]?.totalReqs||0;return acc.challenged+=challenged,acc.denied+=denied,acc.count+=challenged+denied,acc},{hosts:[],challenged:0,denied:0,count:0})}function hostsFromAnomaly(anomaly){return Object.entries(anomaly.affectedHostMap).map(([host,data])=>{let challenged=data.ddosAlerts?.["sys_dos_mitigation:challenge"]?.totalReqs||0,denied=data.ddosAlerts?.["sys_dos_mitigation:deny"]?.totalReqs||0;return{name:host,count:challenged+denied}}).filter(row=>row.count>0).sort((a,b)=>b.count-a.count)}function mapAttackAnomaly(anomaly){let reduced=reduceAttackAnomaly(anomaly),parts=["System rule"];return reduced.denied>0&&parts.push(labelForAction("deny")),reduced.challenged>0&&parts.push(labelForAction("challenge")),{id:`${anomaly.ownerId}-${anomaly.projectId}-${anomaly.startTime}`,title:"DDoS Mitigation",type:FIREWALL_ANOMALY_TYPE,startedAt:anomaly.startTime,resolvedAt:anomaly.endTime||void 0,count:reduced.count,detail:parts.join(" \xB7 "),action:reduced.denied>=reduced.challenged?"deny":"challenge",ruleId:SYS_DOS_MITIGATION_RULE_ID,host:reduced.hosts[0]}}function mapO11yAlert(alert){if(!alert.startedAt)return null;let action=alert.data?.action,ruleId=alert.data?.ruleId,detailParts=[alert.type,action?labelForAction(action):void 0,ruleId].filter(Boolean);return{id:alert.id||`${alert.type}-${alert.startedAt}`,title:alert.title||alert.type||"Firewall alert",type:alert.type||"unknown",startedAt:alert.startedAt,resolvedAt:alert.resolvedAt,count:alert.data?.count,detail:detailParts.filter(p=>p!==alert.title).join(" \xB7 ")||void 0,action,ruleId,path:alert.data?.path}}var ATTACK_STATUS_MAX_DAYS=7;async function getAttackStatus(client,opts){let query=new URLSearchParams;if(query.set("projectId",opts.projectId),query.set("teamId",opts.teamId),opts.sinceDays!==void 0){let sinceDays=Math.min(ATTACK_STATUS_MAX_DAYS,Math.max(1,Math.ceil(opts.sinceDays)));query.set("since",String(sinceDays))}return client.fetch(`/v1/security/firewall/attack-status?${query.toString()}`,{accountId:opts.teamId,signal:opts.signal})}var O11Y_ALERTS_LIMIT=200;async function getFirewallO11yAlerts(client,opts){let query=new URLSearchParams;query.set("teamId",opts.teamId),query.set("projectId",opts.projectId),query.set("from",opts.from.toISOString()),query.set("to",opts.to.toISOString()),query.set("limit",String(O11Y_ALERTS_LIMIT));for(let type of FIREWALL_O11Y_ALERT_TYPES)query.append("types",type);return(await client.fetch(`/alerts/v3/groups?${query.toString()}`,{accountId:opts.teamId,signal:opts.signal})).flatMap(g=>g.alerts??[]).map(mapO11yAlert).filter(a=>a!==null)}var ALERTS_TIMEOUT_MS=2e4;function sourceFailureReason(err){return isAPIError(err)&&err.status===408||err instanceof Error&&(err.name==="TimeoutError"||err.name==="AbortError")?"timed out":isAPIError(err)&&err.status===402?"needs Observability Plus":isAPIError(err)&&typeof err.status=="number"?`HTTP ${err.status}`:err instanceof Error&&err.message?err.message:"unknown error"}function resolveAlertsWindow(opts){let now=Date.now(),to=opts.to??new Date(now),from=opts.from??new Date(to.getTime()-864e5*(opts.sinceDays??1)),sinceDays=opts.sinceDays??Math.max(1,Math.ceil((now-from.getTime())/864e5));return{from,to,sinceDays}}function classifyAlertSourceError(err){if(isAPIError(err)&&(err.status===401||err.status===403))throw err;return isAPIError(err)&&err.status===402?{reason:"plan",message:FIREWALL_ACTIVITY_PLAN_MESSAGE}:{reason:"error",message:apiServerMessage(err)||!isAPIError(err)&&err instanceof Error&&err.message||FIREWALL_ALERTS_PARTIAL_ERROR_MESSAGE}}async function getFirewallAlertsDetailed(client,opts){let{from,to,sinceDays}=resolveAlertsWindow(opts),timeoutMs=opts.timeoutMs??ALERTS_TIMEOUT_MS,signal=AbortSignal.timeout(timeoutMs),[o11yResult,attackResult]=await Promise.allSettled([getFirewallO11yAlerts(client,{...opts,from,to,signal}),getAttackStatus(client,{...opts,sinceDays,signal})]),errors=[],o11yAlerts=[],o11y;o11yResult.status==="fulfilled"?o11yAlerts=o11yResult.value:(o11y=classifyAlertSourceError(o11yResult.reason),errors.push({source:"alerts",message:sourceFailureReason(o11yResult.reason)}));let mappedAttacks=[],attackStatus;attackResult.status==="fulfilled"?mappedAttacks=(attackResult.value.anomalies||[]).map(mapAttackAnomaly):(attackStatus=classifyAlertSourceError(attackResult.reason),errors.push({source:"attackStatus",message:sourceFailureReason(attackResult.reason)}));let resolvedCutoff=from.getTime();return{alerts:mappedAttacks.concat(o11yAlerts.filter(a=>!a.resolvedAt||a.resolvedAt>resolvedCutoff)).sort((a,b)=>!a.resolvedAt&&b.resolvedAt?-1:a.resolvedAt&&!b.resolvedAt?1:b.startedAt-a.startedAt),o11y,attackStatus,errors}}function alertsIncompleteMessage(errors){return`Attack count and alerts may be incomplete: ${errors.map(e=>`${e.source==="alerts"?"alerts":"attack history"} ${e.message}`).join("; ")}.`}function countAttacksMitigated(alerts,windowStartMs,windowEndMs){return alerts.filter(alert=>isAttackAlert(alert)&&alertOverlapsWindow(alert,windowStartMs,windowEndMs)).length}function alertOverlapsWindow(alert,windowStartMs,windowEndMs){return alert.startedAt<=windowEndMs&&(alert.resolvedAt??Number.POSITIVE_INFINITY)>=windowStartMs}function isAttackAlert(alert){return alert.type===FIREWALL_ANOMALY_TYPE?!0:alert.type===SYSTEM_RULE_ANOMALY_TYPE&&alert.ruleId===SYS_DOS_MITIGATION_RULE_ID}var O11Y_ALERT_ID_PREFIX="al_",INSPECT_FALLBACK_DAYS=7;function isO11yAlertId(id){return id.startsWith(O11Y_ALERT_ID_PREFIX)}function parseLegacyAlertStartTime(id){let match=id.match(/-(\d{13})$/);return match?Number(match[1]):void 0}function daysCovering(startMs,endMs){return Math.max(1,Math.ceil((endMs-startMs)/864e5))}function mapGroupAsAlert(group,alertId){let nested=(group.alerts??[]).map(mapO11yAlert).filter(a=>a!==null),hit=nested.find(a=>a.id===alertId)??nested[0];if(hit)return hit;let startedAt=group.recordedStartedAt;return startedAt?mapO11yAlert({id:alertId,title:group.title,type:group.type,startedAt,resolvedAt:group.recordedResolvedAt,data:group.alerts?.[0]?.data}):null}async function getO11yAlertById(client,opts){let query=new URLSearchParams;query.set("teamId",opts.teamId),query.set("projectId",opts.projectId);try{let group=await client.fetch(`/alerts/v3/groups/${encodeURIComponent(opts.alertId)}?${query.toString()}`,{accountId:opts.teamId,signal:opts.signal});return mapGroupAsAlert(group,opts.alertId)}catch(err){if(isAPIError(err)&&err.status===404)return null;throw err}}async function findFirewallAlert(client,opts){let timeoutMs=opts.timeoutMs??ALERTS_TIMEOUT_MS,budget=()=>AbortSignal.timeout(timeoutMs),now=Date.now();if(isO11yAlertId(opts.alertId)){let fromGroup2=await getO11yAlertById(client,{...opts,signal:budget()});if(fromGroup2)return{alert:fromGroup2};let from=new Date(now-864e5*INSPECT_FALLBACK_DAYS),hit=(await getFirewallO11yAlerts(client,{projectId:opts.projectId,teamId:opts.teamId,from,to:new Date(now),signal:budget()})).find(a=>a.id===opts.alertId);return hit?{alert:hit}:null}let startTime=parseLegacyAlertStartTime(opts.alertId),sinceDays=startTime?daysCovering(startTime,now)+1:INSPECT_FALLBACK_DAYS,anomaly=((await getAttackStatus(client,{projectId:opts.projectId,teamId:opts.teamId,sinceDays,signal:budget()}).catch(err=>{if(isAPIError(err)&&(err.status===401||err.status===403))throw err;return{anomalies:[]}})).anomalies||[]).find(a=>`${a.ownerId}-${a.projectId}-${a.startTime}`===opts.alertId);if(anomaly)return{alert:mapAttackAnomaly(anomaly),hosts:hostsFromAnomaly(anomaly)};let fromGroup=await getO11yAlertById(client,{...opts,signal:budget()}).catch(err=>{if(isAPIError(err)&&(err.status===401||err.status===403))throw err;return null});return fromGroup?{alert:fromGroup}:null}function aiBotsGroupAction(action){return action==="allow"?"off":action}var AI_BOTS_CATEGORY_ACTIONS=["allow","log","deny"];function getAiBotsCategories(ruleset,catalogGroups){return[...new Set([...Object.keys(catalogGroups??{}),...Object.keys(ruleset?.ruleGroups??{})])].sort().map(ruleGroupId=>({id:ruleGroupId.replace(/_/g,"-"),ruleGroupId,name:catalogGroups?.[ruleGroupId]?.name??formatCategoryName(ruleGroupId)}))}function formatCategoryName(ruleGroupId){return ruleGroupId.split("_").map(word=>word==="ai"?"AI":word[0].toUpperCase()+word.slice(1)).join(" ")}function getAiBotsCategoryAction(ruleset,ruleGroupId){if(!ruleset?.active)return"allow";let group=ruleset.ruleGroups?.[ruleGroupId];return group?.active===!1?"allow":group?.action??ruleset.action??"log"}function getAiBotsCategoryActionAfterEdit(ruleset,ruleGroupId){return getAiBotsCategoryAction({...ruleset,active:!0},ruleGroupId)}function getAiBotsCategoryActionForEdit(ruleset,ruleGroupId){return ruleset?.ruleGroups?.[ruleGroupId]?getAiBotsCategoryActionAfterEdit(ruleset,ruleGroupId):getAiBotsCategoryAction(ruleset,ruleGroupId)}function hasAiBotsCategories(ruleset){return Object.keys(ruleset?.ruleGroups??{}).length>0}function getAiBotsCategoryDetails(ruleset){if(hasAiBotsCategories(ruleset))return getAiBotsCategories(ruleset).map(category=>({...category,action:getAiBotsCategoryAction(ruleset,category.ruleGroupId)}))}function aiBotsJsonStatus(ruleset){let categories=getAiBotsCategoryDetails(ruleset);return{enabled:ruleset?.active??!1,action:categories?null:ruleset?.action??null,...categories?{categories}:{}}}var MANAGED_BOT_RULE_IDS=["bot-protection","ai-bots","bot-id"],ALIASES={"bot-protection":"bot-protection","bot protection":"bot-protection",bot_protection:"bot-protection",bot_filter:"bot-protection",managed_bot_protection:"bot-protection",managed_bot_filter:"bot-protection","ai-bots":"ai-bots","ai bots":"ai-bots",ai_bots:"ai-bots",managed_ai_bots:"ai-bots","bot-id":"bot-id",botid:"bot-id",bot_id:"bot-id"},ACTIONS={"bot-protection":["off","log","challenge"],"ai-bots":["allow","log","challenge","deny"],"bot-id":["basic","deep-analysis"]},NAMES={"bot-protection":"Bot Protection","ai-bots":"AI Bots","bot-id":"BotID"},WAF_RULE_IDS={"bot-protection":"managed_bot_protection","ai-bots":"managed_ai_bots"};function managedBotRuleName(id){return NAMES[id]}function resolveManagedBotRuleId(identifier){if(identifier)return ALIASES[identifier.trim().toLowerCase()]}function managedBotActions(id,category){return category?AI_BOTS_CATEGORY_ACTIONS:ACTIONS[id]}function formatManagedBotAction(action){return action==="deep-analysis"?"Deep Analysis":action.charAt(0).toUpperCase()+action.slice(1)}function getBotProtectionConfig(managedRules){return managedRules?.bot_filter??managedRules?.bot_protection}function currentBotProtectionAction(config){let ruleset=getBotProtectionConfig(config?.managedRules);return ruleset?.active?ruleset.action??"log":"off"}function currentAiBotsAction(config){let ruleset=config?.managedRules?.ai_bots;return ruleset?.active?ruleset.action==="challenge"?"challenge":ruleset.action==="deny"?"deny":"log":"allow"}function currentBotIdAction(config){return config?.botIdEnabled?"deep-analysis":"basic"}function getManagedBotRule(config,id){let categories=id==="ai-bots"?getAiBotsCategoryDetails(config?.managedRules?.ai_bots):void 0,action=categories?null:id==="bot-protection"?currentBotProtectionAction(config):id==="ai-bots"?currentAiBotsAction(config):currentBotIdAction(config);return{id,name:NAMES[id],action,wafRuleId:WAF_RULE_IDS[id],...categories?{categories}:{}}}function getManagedBotRules(config){return MANAGED_BOT_RULE_IDS.map(id=>getManagedBotRule(config,id))}function parseManagedBotAction(id,raw,category){let action=raw.trim().toLowerCase().replace(/\s+/g,"-"),valid=managedBotActions(id,category);return valid.includes(action)?{action}:{error:`Invalid action "${raw}" for ${category?.name??NAMES[id]}. Use ${valid.join(", ")}.`}}function buildManagedBotPatch(id,action,category){if(category)return{action:"managedRuleGroup.update",id:"ai_bots",value:{[category.ruleGroupId]:action==="allow"?{active:!1}:{active:!0,action}}};if(id==="bot-id")return{action:"botId.toggle",value:action==="deep-analysis"};let patchId=id==="bot-protection"?"bot_protection":"ai_bots";return action==="off"||action==="allow"?{action:"managedRules.update",id:patchId,value:{active:!1}}:{action:"managedRules.update",id:patchId,value:{active:!0,action}}}function suggestedManagedBotAction(rule){return rule.id==="bot-protection"?rule.action==="challenge"?"log":"challenge":rule.id==="ai-bots"?rule.action==="deny"?"allow":"deny":rule.action==="deep-analysis"?"basic":"deep-analysis"}function managedBotTrafficWarning(id,to,categoryName){if(id==="ai-bots"&&to==="deny")return categoryName?`Deny blocks known ${categoryName} traffic when published.`:"AI Bots deny blocks known AI crawlers from this project.";if(id==="bot-protection"&&to==="challenge")return"Bot Protection challenge will present a verification page to non-browser traffic."}function managedBotJson(rule){return{id:rule.id,name:rule.name,action:rule.action,wafRuleId:rule.wafRuleId??null,...rule.categories?{categories:rule.categories}:{}}}function suggestsManagedRulesetsList(rule){return rule.id==="ai-bots"&&!rule.categories?.[0]}function suggestedManagedBotEditCommand(rule,via="rules"){let rulesets=via==="managed-rulesets"&&rule.id!=="bot-id",base=rulesets?"firewall managed-rulesets update":"firewall rules update",category=rule.categories?.[0];if(suggestsManagedRulesetsList(rule))return rulesets?"firewall managed-rulesets list":`${base} ai-bots`;let action=suggestedManagedBotAction(category?{...rule,action:category.action}:rule),group=category?` ${rulesets?"--group":"--category"} ${category.id}`:"";return`${base} ${rule.id}${group} --action ${rulesets&&action==="allow"?aiBotsGroupAction(action):action}`}function aiBotsEnableWarning(ruleset,categories,edited){if(ruleset?.active)return;let changes=categories.flatMap(category=>{if(category.id===edited.id)return[];let action=getAiBotsCategoryActionAfterEdit(ruleset,category.ruleGroupId);return action==="allow"?[]:[`${category.name} action will be set to ${formatManagedBotAction(action)}`]});if(changes.length!==0)return`Publishing turns AI Bots ${ruleset?"back on":"on"}, so ${changes.join(" and ")}.`}async function listFirewallConfigs(client,scope){return client.fetch(firewallConfigUrl(scope))}async function activateFirewallConfig(client,scope,configVersion){return client.fetch(firewallConfigUrl(scope,`/${configVersion}/activate`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})}var import_chalk2=__toESM(require_source(),1);var PRIORITY_PROJECT_ENABLE_COMMAND="project priority enable",BUY_PRO_COMMAND="buy pro";function withGlobalFlags(client,commandTemplate,scope,options={}){let template=scope?.type==="team"?`${commandTemplate} --team-level`:commandTemplate;return buildCommandWithGlobalFlags(client.argv,template,void 0,{globalFlags:"all",preserveProject:options.preserveProject??!0,excludeFlags:options.excludeFlags})}async function resolveFirewallScope(client,flags,opts){let json=!!opts?.json&&!client.nonInteractive;if(flags["--team-level"]&&flags["--project"]){let message="Cannot specify both --team-level and --project. Use one or the other.";return json?failFirewall(client,{json,message,reason:AGENT_REASON.INVALID_ARGUMENTS}):client.nonInteractive?(outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message},2),2):(output_manager_default.error(message),2)}if(flags["--team-level"]){let{team}=await getScope(client);if(!team){let message="Team-level firewall requires a team scope. Personal accounts are not supported. Run `vercel switch` to select a team or pass --scope <team>.";return json?failFirewall(client,{json,message,reason:AGENT_REASON.MISSING_SCOPE}):client.nonInteractive?(outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.MISSING_SCOPE,message},1),1):(output_manager_default.error(message),1)}return{type:"team",teamId:team.id,displayName:team.slug}}let link=json?await requireProjectContextJson(client,flags["--project"]):await requireProjectContext(client,"firewall",flags["--project"]);if(typeof link=="number")return link;let{project,org}=link;return{type:"project",projectId:project.id,teamId:org.type==="team"?org.id:void 0,teamSlug:org.type==="team"?org.slug:void 0,displayName:project.name,tier:project.tier}}async function requireProjectContextJson(client,projectName){let link;try{link=await resolveProjectContext({client,projectNameOrId:projectName,projectNotFoundHandling:"return",quiet:!0})}catch(e){return failFirewallApi(client,e,{fallback:"Failed to resolve the project",permissionAction:"read project settings",projectName:projectName??"the linked project",json:!0})}return link.status==="error"?failFirewall(client,{json:!0,message:"VERCEL_ORG_ID and VERCEL_PROJECT_ID don't name a project you can access. Set both, or unset both and pass --project <name>.",reason:AGENT_REASON.PROJECT_NOT_FOUND}):link.status==="not_linked"?failFirewall(client,{json:!0,message:projectName?`Project ${quoteArg(projectName)} wasn't found in the current scope. Check --project, or pass --scope <team>.`:"Your codebase isn't linked to a project on Vercel. Run link first, or pass --project <name>.",reason:projectName?AGENT_REASON.PROJECT_NOT_FOUND:AGENT_REASON.NOT_LINKED,fix:projectName?void 0:{command:"link",hint:`Run ${getCommandName("link")} to link this directory.`,when:"to link this directory to a project"}}):(client.config.currentTeam=link.org.type==="team"?link.org.id:void 0,link)}function mentionsPriorityProject(message){return/priority\s+project/i.test(message)||/priority\s+tier/i.test(message)}function teamPlan(scope){return scope.teamId?teamCache.get(scope.teamId)?.billing?.plan:void 0}function priorityTeam(scope){let cached=scope.teamId?teamCache.get(scope.teamId):void 0;if(scope.type==="team")return{id:scope.teamId,slug:scope.displayName,name:cached?.name??null,scopeArg:scope.displayName};if(!scope.teamId)return null;let slug=scope.teamSlug??cached?.slug??null;return{id:scope.teamId,slug,name:cached?.name??null,scopeArg:slug??scope.teamId}}function teamLabel(team){return team.name&&team.name!==team.slug?`${team.slug} (${team.name})`:team.slug}function styledCommand(command,plain){return plain?getCommandNamePlain(command):getCommandName(command)}function priorityProjectFix(scope){let excludeFlags=["--non-interactive","--project","--yes","--scope","--team"],project=scope.type==="project"?{id:scope.projectId,name:scope.displayName}:null,team=priorityTeam(scope),plan=teamPlan(scope)??null,data={project,team:team&&{id:team.id,slug:team.slug,name:team.name},plan},projectToken=project?quoteArg(project.name):"<project>",scopeFlag=team?` --scope ${quoteArg(team.scopeArg)}`:"",enable=`${PRIORITY_PROJECT_ENABLE_COMMAND} ${projectToken}${scopeFlag}`;if(!team){let hint="Priority projects are only available on team accounts. Use --scope to specify one.";return{command:"",hint,plainHint:hint,when:hint,excludeFlags,preserveProject:!1,reason:AGENT_REASON.MISSING_SCOPE,data}}if(plan==="hobby"||plan==="oss"){let upgrade=`${BUY_PRO_COMMAND}${scopeFlag}`,hint=plain2=>`Priority Projects are only available on Pro or Enterprise team plans. Upgrade with ${styledCommand(upgrade,plain2)}, then run ${styledCommand(enable,plain2)}.`;return{command:upgrade,hint:hint(!1),plainHint:hint(!0),when:"a person has approved upgrading the plan",excludeFlags,preserveProject:!1,reason:AGENT_REASON.PLAN_UPGRADE_REQUIRED,scope:team.scopeArg,data}}let shown=styledCommand(enable,!1),plain=styledCommand(enable,!0),placeholder="Replace <project> with a project on this team.";return{command:enable,hint:project?shown:`${shown} ${placeholder}`,plainHint:project?plain:`${plain} ${placeholder}`,when:project?"user runs this command in an interactive terminal":"Replace <project> with a project on this team.",excludeFlags,preserveProject:!1,reason:AGENT_REASON.PLAN_UPGRADE_REQUIRED,scope:team.scopeArg,data}}function mapFirewallApiError(e,scope,fallback){let err=e;return scope.type==="team"&&err.status===403?err.code==="plan_not_supported"?`Team-level firewall requires an Enterprise plan (current team: "${scope.displayName}"). Pass --scope <team> or run \`vercel switch\` to target a different team.`:`You need to be a team owner to manage the team-level firewall for "${scope.displayName}".${err.message?` (${err.message})`:""}`:err.message||fallback}function priorityProjectMessage(scope,fix){let team=fix.data.team,label=team?.slug!=null?teamLabel({slug:team.slug,name:team.name}):void 0;return scope.type==="project"?label?`This rule requires a Priority project for ${scope.displayName} on team ${label}.`:`This rule requires a Priority project. ${fix.hint}`:label?`This rule requires a Priority project on team ${label}.`:"This rule requires a Priority project."}function failPriorityProjectGate(client,error,scope,opts){let serverMessage=apiServerMessage(error);if(!serverMessage||!mentionsPriorityProject(serverMessage))return null;let fix=priorityProjectFix(scope),message=opts?.message?fix.command?opts.message:`${opts.message} ${fix.hint}`:priorityProjectMessage(scope,fix),payload={status:AGENT_STATUS.ERROR,reason:fix.reason,message,userActionRequired:!0,hint:fix.plainHint,retryable:!1,...fix.scope?{scope:fix.scope}:{},data:fix.data,...fix.command?{next:[{command:buildCommandWithGlobalFlags(client.argv,fix.command,packageName,{globalFlags:"all",preserveProject:!1,excludeFlags:fix.excludeFlags}),when:fix.when}]}:{}};return shouldEmitNonInteractiveCommandError(client)&&outputAgentError(client,payload,1),opts?.json?(output_manager_default.stopSpinner(),writeAgentError(client,payload),1):(output_manager_default.error(message),fix.command&&output_manager_default.log(fix.hint),1)}function failOwaspPlanGate(client,error,scope,json){let message=apiServerMessage(error);if(!message)return null;if(/OWASP Core Ruleset must be enabled/i.test(message)){let dashboard=scope.type==="project"&&scope.teamSlug?`https://vercel.com/${scope.teamSlug}/${scope.displayName}/firewall`:scope.type==="team"?"the team's Firewall page":"the project's Firewall page";return failFirewall(client,{json,message:`OWASP Core Ruleset isn't on this team's plan yet. Add it from ${dashboard} in the dashboard (Managed Rulesets \u2192 Add to Plan).`,reason:AGENT_REASON.PLAN_UPGRADE_REQUIRED})}return scope.type==="project"&&/OWASP (Core Ruleset|rules) requires? a Priority project/i.test(message)?failPriorityProjectGate(client,error,scope,{json,message:`OWASP Core Ruleset requires a Priority project for ${scope.displayName}.`}):/OWASP (Core Ruleset is|rules are) not available/i.test(message)?failFirewall(client,{json,message:scope.type==="team"?"Team-level OWASP Core Ruleset requires an Enterprise plan.":"OWASP Core Ruleset requires an Enterprise plan.",reason:AGENT_REASON.PLAN_UPGRADE_REQUIRED}):null}function getRulePayload(flags){let legacy=flags["--json"];return legacy!==void 0&&flags["--data"]!==void 0?(output_manager_default.error("Can't use --data with --json."),2):(legacy!==void 0&&output_manager_default.warning("--json is deprecated for rule payloads. Use --data."),flags["--data"]??legacy)}async function parseSubcommandArgs(argv,command,client,commandPath){let parsedArgs,fullPath=commandPath||command.name;try{parsedArgs=parseSubcommandArguments(argv,command)}catch(err){if(client?.nonInteractive){let rawMessage=err instanceof Error?err.message:String(err),flags=getGlobalFlagsFromArgs(client.argv.slice(2),{preserveProject:!0});return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message:rawMessage,next:[{command:getCommandNamePlain(`firewall ${fullPath} ${flags.join(" ")}`.trim()),when:"fix options and retry"}]},2),2}return printError(err),2}return parsedArgs}var CONFIRM_ACTION_LEGACY={stopExitCode:1,stopStatus:"error",declineExitCode:0};function stagedEffects(scope,change){return[`Stages ${change} for ${scope.type} ${scope.displayName}.`,"Nothing is live until the draft is published."]}async function confirmAction(client,skipConfirmation,message,details){return skipConfirmation?!0:client.nonInteractive||!client.stdin.isTTY?(outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.CONFIRMATION_REQUIRED,message:`${message} Re-run with --yes to confirm.`,next:[{command:buildCommandWithYes(client.argv),when:"re-run with --yes to confirm"}]}),process.exit(1),!1):(details&&output_manager_default.print(` ${details}
|
|
9
|
+
`)}var FIREWALL_O11Y_ALERT_TYPES=["botId_anomaly","firewallSystemRule_anomaly","firewallCustomRule_anomaly"],FIREWALL_ANOMALY_TYPE="firewall_anomaly",SYS_DOS_MITIGATION_RULE_ID="sys_dos_mitigation",SYSTEM_RULE_ANOMALY_TYPE="firewallSystemRule_anomaly",FIREWALL_ACTIVITY_PLAN_MESSAGE="Traffic and alerts need Observability Plus.",FIREWALL_ALERTS_PARTIAL_ERROR_MESSAGE="Couldn't load every alert source.";function reduceAttackAnomaly(anomaly){return Object.keys(anomaly.affectedHostMap).reduce((acc,host)=>{acc.hosts.push(host);let challenged=anomaly.affectedHostMap[host].ddosAlerts?.["sys_dos_mitigation:challenge"]?.totalReqs||0,denied=anomaly.affectedHostMap[host].ddosAlerts?.["sys_dos_mitigation:deny"]?.totalReqs||0;return acc.challenged+=challenged,acc.denied+=denied,acc.count+=challenged+denied,acc},{hosts:[],challenged:0,denied:0,count:0})}function hostsFromAnomaly(anomaly){return Object.entries(anomaly.affectedHostMap).map(([host,data])=>{let challenged=data.ddosAlerts?.["sys_dos_mitigation:challenge"]?.totalReqs||0,denied=data.ddosAlerts?.["sys_dos_mitigation:deny"]?.totalReqs||0;return{name:host,count:challenged+denied}}).filter(row=>row.count>0).sort((a,b)=>b.count-a.count)}function mapAttackAnomaly(anomaly){let reduced=reduceAttackAnomaly(anomaly),parts=["System rule"];return reduced.denied>0&&parts.push(labelForAction("deny")),reduced.challenged>0&&parts.push(labelForAction("challenge")),{id:`${anomaly.ownerId}-${anomaly.projectId}-${anomaly.startTime}`,title:"DDoS Mitigation",type:FIREWALL_ANOMALY_TYPE,startedAt:anomaly.startTime,resolvedAt:anomaly.endTime||void 0,count:reduced.count,detail:parts.join(" \xB7 "),action:reduced.denied>=reduced.challenged?"deny":"challenge",ruleId:SYS_DOS_MITIGATION_RULE_ID,host:reduced.hosts[0]}}function mapO11yAlert(alert){if(!alert.startedAt)return null;let action=alert.data?.action,ruleId=alert.data?.ruleId,detailParts=[alert.type,action?labelForAction(action):void 0,ruleId].filter(Boolean);return{id:alert.id||`${alert.type}-${alert.startedAt}`,title:alert.title||alert.type||"Firewall alert",type:alert.type||"unknown",startedAt:alert.startedAt,resolvedAt:alert.resolvedAt,count:alert.data?.count,detail:detailParts.filter(p=>p!==alert.title).join(" \xB7 ")||void 0,action,ruleId,path:alert.data?.path}}var ATTACK_STATUS_MAX_DAYS=7;async function getAttackStatus(client,opts){let query=new URLSearchParams;if(query.set("projectId",opts.projectId),query.set("teamId",opts.teamId),opts.sinceDays!==void 0){let sinceDays=Math.min(ATTACK_STATUS_MAX_DAYS,Math.max(1,Math.ceil(opts.sinceDays)));query.set("since",String(sinceDays))}return client.fetch(`/v1/security/firewall/attack-status?${query.toString()}`,{accountId:opts.teamId,signal:opts.signal})}var O11Y_ALERTS_LIMIT=200;async function getFirewallO11yAlerts(client,opts){let query=new URLSearchParams;query.set("teamId",opts.teamId),query.set("projectId",opts.projectId),query.set("from",opts.from.toISOString()),query.set("to",opts.to.toISOString()),query.set("limit",String(O11Y_ALERTS_LIMIT));for(let type of FIREWALL_O11Y_ALERT_TYPES)query.append("types",type);return(await client.fetch(`/alerts/v3/groups?${query.toString()}`,{accountId:opts.teamId,signal:opts.signal})).flatMap(g=>g.alerts??[]).map(mapO11yAlert).filter(a=>a!==null)}var ALERTS_TIMEOUT_MS=2e4;function sourceFailureReason(err){return isAPIError(err)&&err.status===408||err instanceof Error&&(err.name==="TimeoutError"||err.name==="AbortError")?"timed out":isAPIError(err)&&err.status===402?"needs Observability Plus":isAPIError(err)&&typeof err.status=="number"?`HTTP ${err.status}`:err instanceof Error&&err.message?err.message:"unknown error"}function resolveAlertsWindow(opts){let now=Date.now(),to=opts.to??new Date(now),from=opts.from??new Date(to.getTime()-864e5*(opts.sinceDays??1)),sinceDays=opts.sinceDays??Math.max(1,Math.ceil((now-from.getTime())/864e5));return{from,to,sinceDays}}function classifyAlertSourceError(err){if(isAPIError(err)&&(err.status===401||err.status===403))throw err;return isAPIError(err)&&err.status===402?{reason:"plan",message:FIREWALL_ACTIVITY_PLAN_MESSAGE}:{reason:"error",message:apiServerMessage(err)||!isAPIError(err)&&err instanceof Error&&err.message||FIREWALL_ALERTS_PARTIAL_ERROR_MESSAGE}}async function getFirewallAlertsDetailed(client,opts){let{from,to,sinceDays}=resolveAlertsWindow(opts),timeoutMs=opts.timeoutMs??ALERTS_TIMEOUT_MS,signal=AbortSignal.timeout(timeoutMs),[o11yResult,attackResult]=await Promise.allSettled([getFirewallO11yAlerts(client,{...opts,from,to,signal}),getAttackStatus(client,{...opts,sinceDays,signal})]),errors=[],o11yAlerts=[],o11y;o11yResult.status==="fulfilled"?o11yAlerts=o11yResult.value:(o11y=classifyAlertSourceError(o11yResult.reason),errors.push({source:"alerts",message:sourceFailureReason(o11yResult.reason)}));let mappedAttacks=[],attackStatus;attackResult.status==="fulfilled"?mappedAttacks=(attackResult.value.anomalies||[]).map(mapAttackAnomaly):(attackStatus=classifyAlertSourceError(attackResult.reason),errors.push({source:"attackStatus",message:sourceFailureReason(attackResult.reason)}));let resolvedCutoff=from.getTime();return{alerts:mappedAttacks.concat(o11yAlerts.filter(a=>!a.resolvedAt||a.resolvedAt>resolvedCutoff)).sort((a,b)=>!a.resolvedAt&&b.resolvedAt?-1:a.resolvedAt&&!b.resolvedAt?1:b.startedAt-a.startedAt),o11y,attackStatus,errors}}function alertsIncompleteMessage(errors){return`Attack count and alerts may be incomplete: ${errors.map(e=>`${e.source==="alerts"?"alerts":"attack history"} ${e.message}`).join("; ")}.`}function countAttacksMitigated(alerts,windowStartMs,windowEndMs){return alerts.filter(alert=>isAttackAlert(alert)&&alertOverlapsWindow(alert,windowStartMs,windowEndMs)).length}function alertOverlapsWindow(alert,windowStartMs,windowEndMs){return alert.startedAt<=windowEndMs&&(alert.resolvedAt??Number.POSITIVE_INFINITY)>=windowStartMs}function isAttackAlert(alert){return alert.type===FIREWALL_ANOMALY_TYPE?!0:alert.type===SYSTEM_RULE_ANOMALY_TYPE&&alert.ruleId===SYS_DOS_MITIGATION_RULE_ID}var O11Y_ALERT_ID_PREFIX="al_",INSPECT_FALLBACK_DAYS=7;function isO11yAlertId(id){return id.startsWith(O11Y_ALERT_ID_PREFIX)}function parseLegacyAlertStartTime(id){let match=id.match(/-(\d{13})$/);return match?Number(match[1]):void 0}function daysCovering(startMs,endMs){return Math.max(1,Math.ceil((endMs-startMs)/864e5))}function mapGroupAsAlert(group,alertId){let nested=(group.alerts??[]).map(mapO11yAlert).filter(a=>a!==null),hit=nested.find(a=>a.id===alertId)??nested[0];if(hit)return hit;let startedAt=group.recordedStartedAt;return startedAt?mapO11yAlert({id:alertId,title:group.title,type:group.type,startedAt,resolvedAt:group.recordedResolvedAt,data:group.alerts?.[0]?.data}):null}async function getO11yAlertById(client,opts){let query=new URLSearchParams;query.set("teamId",opts.teamId),query.set("projectId",opts.projectId);try{let group=await client.fetch(`/alerts/v3/groups/${encodeURIComponent(opts.alertId)}?${query.toString()}`,{accountId:opts.teamId,signal:opts.signal});return mapGroupAsAlert(group,opts.alertId)}catch(err){if(isAPIError(err)&&err.status===404)return null;throw err}}async function findFirewallAlert(client,opts){let timeoutMs=opts.timeoutMs??ALERTS_TIMEOUT_MS,budget=()=>AbortSignal.timeout(timeoutMs),now=Date.now();if(isO11yAlertId(opts.alertId)){let fromGroup2=await getO11yAlertById(client,{...opts,signal:budget()});if(fromGroup2)return{alert:fromGroup2};let from=new Date(now-864e5*INSPECT_FALLBACK_DAYS),hit=(await getFirewallO11yAlerts(client,{projectId:opts.projectId,teamId:opts.teamId,from,to:new Date(now),signal:budget()})).find(a=>a.id===opts.alertId);return hit?{alert:hit}:null}let startTime=parseLegacyAlertStartTime(opts.alertId),sinceDays=startTime?daysCovering(startTime,now)+1:INSPECT_FALLBACK_DAYS,anomaly=((await getAttackStatus(client,{projectId:opts.projectId,teamId:opts.teamId,sinceDays,signal:budget()}).catch(err=>{if(isAPIError(err)&&(err.status===401||err.status===403))throw err;return{anomalies:[]}})).anomalies||[]).find(a=>`${a.ownerId}-${a.projectId}-${a.startTime}`===opts.alertId);if(anomaly)return{alert:mapAttackAnomaly(anomaly),hosts:hostsFromAnomaly(anomaly)};let fromGroup=await getO11yAlertById(client,{...opts,signal:budget()}).catch(err=>{if(isAPIError(err)&&(err.status===401||err.status===403))throw err;return null});return fromGroup?{alert:fromGroup}:null}function aiBotsGroupAction(action){return action==="allow"?"off":action}var AI_BOTS_CATEGORY_ACTIONS=["allow","log","deny"];function getAiBotsCategories(ruleset,catalogGroups){return[...new Set([...Object.keys(catalogGroups??{}),...Object.keys(ruleset?.ruleGroups??{})])].sort().map(ruleGroupId=>({id:ruleGroupId.replace(/_/g,"-"),ruleGroupId,name:catalogGroups?.[ruleGroupId]?.name??formatCategoryName(ruleGroupId)}))}function formatCategoryName(ruleGroupId){return ruleGroupId.split("_").map(word=>word==="ai"?"AI":word[0].toUpperCase()+word.slice(1)).join(" ")}function getAiBotsCategoryAction(ruleset,ruleGroupId){if(!ruleset?.active)return"allow";let group=ruleset.ruleGroups?.[ruleGroupId];return group?.active===!1?"allow":group?.action??ruleset.action??"log"}function getAiBotsCategoryActionAfterEdit(ruleset,ruleGroupId){return getAiBotsCategoryAction({...ruleset,active:!0},ruleGroupId)}function getAiBotsCategoryActionForEdit(ruleset,ruleGroupId){return ruleset?.ruleGroups?.[ruleGroupId]?getAiBotsCategoryActionAfterEdit(ruleset,ruleGroupId):getAiBotsCategoryAction(ruleset,ruleGroupId)}function hasAiBotsCategories(ruleset){return Object.keys(ruleset?.ruleGroups??{}).length>0}function getAiBotsCategoryDetails(ruleset){if(hasAiBotsCategories(ruleset))return getAiBotsCategories(ruleset).map(category=>({...category,action:getAiBotsCategoryAction(ruleset,category.ruleGroupId)}))}function aiBotsJsonStatus(ruleset){let categories=getAiBotsCategoryDetails(ruleset);return{enabled:ruleset?.active??!1,action:categories?null:ruleset?.action??null,...categories?{categories}:{}}}var MANAGED_BOT_RULE_IDS=["bot-protection","ai-bots","bot-id"],ALIASES={"bot-protection":"bot-protection","bot protection":"bot-protection",bot_protection:"bot-protection",bot_filter:"bot-protection",managed_bot_protection:"bot-protection",managed_bot_filter:"bot-protection","ai-bots":"ai-bots","ai bots":"ai-bots",ai_bots:"ai-bots",managed_ai_bots:"ai-bots","bot-id":"bot-id",botid:"bot-id",bot_id:"bot-id"},ACTIONS={"bot-protection":["off","log","challenge"],"ai-bots":["allow","log","challenge","deny"],"bot-id":["basic","deep-analysis"]},NAMES={"bot-protection":"Bot Protection","ai-bots":"AI Bots","bot-id":"BotID"},WAF_RULE_IDS={"bot-protection":"managed_bot_protection","ai-bots":"managed_ai_bots"};function managedBotRuleName(id){return NAMES[id]}function resolveManagedBotRuleId(identifier){if(identifier)return ALIASES[identifier.trim().toLowerCase()]}function managedBotActions(id,category){return category?AI_BOTS_CATEGORY_ACTIONS:ACTIONS[id]}function formatManagedBotAction(action){return action==="deep-analysis"?"Deep Analysis":action.charAt(0).toUpperCase()+action.slice(1)}function getBotProtectionConfig(managedRules){return managedRules?.bot_filter??managedRules?.bot_protection}function currentBotProtectionAction(config){let ruleset=getBotProtectionConfig(config?.managedRules);return ruleset?.active?ruleset.action??"log":"off"}function currentAiBotsAction(config){let ruleset=config?.managedRules?.ai_bots;return ruleset?.active?ruleset.action==="challenge"?"challenge":ruleset.action==="deny"?"deny":"log":"allow"}function currentBotIdAction(config){return config?.botIdEnabled?"deep-analysis":"basic"}function getManagedBotRule(config,id){let categories=id==="ai-bots"?getAiBotsCategoryDetails(config?.managedRules?.ai_bots):void 0,action=categories?null:id==="bot-protection"?currentBotProtectionAction(config):id==="ai-bots"?currentAiBotsAction(config):currentBotIdAction(config);return{id,name:NAMES[id],action,wafRuleId:WAF_RULE_IDS[id],...categories?{categories}:{}}}function getManagedBotRules(config){return MANAGED_BOT_RULE_IDS.map(id=>getManagedBotRule(config,id))}function parseManagedBotAction(id,raw,category){let action=raw.trim().toLowerCase().replace(/\s+/g,"-"),valid=managedBotActions(id,category);return valid.includes(action)?{action}:{error:`Invalid action "${raw}" for ${category?.name??NAMES[id]}. Use ${valid.join(", ")}.`}}function buildManagedBotPatch(id,action,category){if(category)return{action:"managedRuleGroup.update",id:"ai_bots",value:{[category.ruleGroupId]:action==="allow"?{active:!1}:{active:!0,action}}};if(id==="bot-id")return{action:"botId.toggle",value:action==="deep-analysis"};let patchId=id==="bot-protection"?"bot_protection":"ai_bots";return action==="off"||action==="allow"?{action:"managedRules.update",id:patchId,value:{active:!1}}:{action:"managedRules.update",id:patchId,value:{active:!0,action}}}function suggestedManagedBotAction(rule){return rule.id==="bot-protection"?rule.action==="challenge"?"log":"challenge":rule.id==="ai-bots"?rule.action==="deny"?"allow":"deny":rule.action==="deep-analysis"?"basic":"deep-analysis"}function managedBotTrafficWarning(id,to,categoryName){if(id==="ai-bots"&&to==="deny")return categoryName?`Deny blocks known ${categoryName} traffic when published.`:"AI Bots deny blocks known AI crawlers from this project.";if(id==="bot-protection"&&to==="challenge")return"Bot Protection challenge will present a verification page to non-browser traffic."}function managedBotJson(rule){return{id:rule.id,name:rule.name,action:rule.action,wafRuleId:rule.wafRuleId??null,...rule.categories?{categories:rule.categories}:{}}}function suggestsManagedRulesetsList(rule){return rule.id==="ai-bots"&&!rule.categories?.[0]}function suggestedManagedBotEditCommand(rule,via="rules"){let rulesets=via==="managed-rulesets"&&rule.id!=="bot-id",base=rulesets?"firewall managed-rulesets update":"firewall rules update",category=rule.categories?.[0];if(suggestsManagedRulesetsList(rule))return rulesets?"firewall managed-rulesets list":`${base} ai-bots`;let action=suggestedManagedBotAction(category?{...rule,action:category.action}:rule),group=category?` ${rulesets?"--group":"--category"} ${category.id}`:"";return`${base} ${rule.id}${group} --action ${rulesets&&action==="allow"?aiBotsGroupAction(action):action}`}function aiBotsEnableWarning(ruleset,categories,edited){if(ruleset?.active)return;let changes=categories.flatMap(category=>{if(category.id===edited.id)return[];let action=getAiBotsCategoryActionAfterEdit(ruleset,category.ruleGroupId);return action==="allow"?[]:[`${category.name} action will be set to ${formatManagedBotAction(action)}`]});if(changes.length!==0)return`Publishing turns AI Bots ${ruleset?"back on":"on"}, so ${changes.join(" and ")}.`}async function listFirewallConfigs(client,scope){return client.fetch(firewallConfigUrl(scope))}async function activateFirewallConfig(client,scope,configVersion){return client.fetch(firewallConfigUrl(scope,`/${configVersion}/activate`),{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify({})})}var import_chalk2=__toESM(require_source(),1);var PRIORITY_PROJECT_BUY_COMMAND="project buy priority",BUY_PRO_COMMAND="buy pro";function withGlobalFlags(client,commandTemplate,scope,options={}){let template=scope?.type==="team"?`${commandTemplate} --team-level`:commandTemplate;return buildCommandWithGlobalFlags(client.argv,template,void 0,{globalFlags:"all",preserveProject:options.preserveProject??!0,excludeFlags:options.excludeFlags})}async function resolveFirewallScope(client,flags,opts){let json=!!opts?.json&&!client.nonInteractive;if(flags["--team-level"]&&flags["--project"]){let message="Cannot specify both --team-level and --project. Use one or the other.";return json?failFirewall(client,{json,message,reason:AGENT_REASON.INVALID_ARGUMENTS}):client.nonInteractive?(outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message},2),2):(output_manager_default.error(message),2)}if(flags["--team-level"]){let{team}=await getScope(client);if(!team){let message="Team-level firewall requires a team scope. Personal accounts are not supported. Run `vercel switch` to select a team or pass --scope <team>.";return json?failFirewall(client,{json,message,reason:AGENT_REASON.MISSING_SCOPE}):client.nonInteractive?(outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.MISSING_SCOPE,message},1),1):(output_manager_default.error(message),1)}return{type:"team",teamId:team.id,displayName:team.slug}}let link=json?await requireProjectContextJson(client,flags["--project"]):await requireProjectContext(client,"firewall",flags["--project"]);if(typeof link=="number")return link;let{project,org}=link;return{type:"project",projectId:project.id,teamId:org.type==="team"?org.id:void 0,teamSlug:org.type==="team"?org.slug:void 0,displayName:project.name,tier:project.tier}}async function requireProjectContextJson(client,projectName){let link;try{link=await resolveProjectContext({client,projectNameOrId:projectName,projectNotFoundHandling:"return",quiet:!0})}catch(e){return failFirewallApi(client,e,{fallback:"Failed to resolve the project",permissionAction:"read project settings",projectName:projectName??"the linked project",json:!0})}return link.status==="error"?failFirewall(client,{json:!0,message:"VERCEL_ORG_ID and VERCEL_PROJECT_ID don't name a project you can access. Set both, or unset both and pass --project <name>.",reason:AGENT_REASON.PROJECT_NOT_FOUND}):link.status==="not_linked"?failFirewall(client,{json:!0,message:projectName?`Project ${quoteArg(projectName)} wasn't found in the current scope. Check --project, or pass --scope <team>.`:"Your codebase isn't linked to a project on Vercel. Run link first, or pass --project <name>.",reason:projectName?AGENT_REASON.PROJECT_NOT_FOUND:AGENT_REASON.NOT_LINKED,fix:projectName?void 0:{command:"link",hint:`Run ${getCommandName("link")} to link this directory.`,when:"to link this directory to a project"}}):(client.config.currentTeam=link.org.type==="team"?link.org.id:void 0,link)}function mentionsPriorityProject(message){return/priority\s+project/i.test(message)||/priority\s+tier/i.test(message)}function teamPlan(scope){return scope.teamId?teamCache.get(scope.teamId)?.billing?.plan:void 0}function priorityTeam(scope){let cached=scope.teamId?teamCache.get(scope.teamId):void 0;if(scope.type==="team")return{id:scope.teamId,slug:scope.displayName,name:cached?.name??null,scopeArg:scope.displayName};if(!scope.teamId)return null;let slug=scope.teamSlug??cached?.slug??null;return{id:scope.teamId,slug,name:cached?.name??null,scopeArg:slug??scope.teamId}}function teamLabel(team){return team.name&&team.name!==team.slug?`${team.slug} (${team.name})`:team.slug}function styledCommand(command,plain){return plain?getCommandNamePlain(command):getCommandName(command)}function priorityProjectFix(scope){let excludeFlags=["--non-interactive","--project","--yes","--scope","--team"],project=scope.type==="project"?{id:scope.projectId,name:scope.displayName}:null,team=priorityTeam(scope),plan=teamPlan(scope)??null,data={project,team:team&&{id:team.id,slug:team.slug,name:team.name},plan},projectToken=project?quoteArg(project.name):"<project>",scopeFlag=team?` --scope ${quoteArg(team.scopeArg)}`:"",buy=`${PRIORITY_PROJECT_BUY_COMMAND} ${projectToken}${scopeFlag}`;if(!team){let hint="Priority projects are only available on team accounts. Use --scope to specify one.";return{command:"",hint,plainHint:hint,when:hint,excludeFlags,preserveProject:!1,reason:AGENT_REASON.MISSING_SCOPE,data}}if(plan==="hobby"||plan==="oss"){let upgrade=`${BUY_PRO_COMMAND}${scopeFlag}`,hint=plain2=>`Priority Projects are only available on Pro or Enterprise team plans. Upgrade with ${styledCommand(upgrade,plain2)}, then run ${styledCommand(buy,plain2)}.`;return{command:upgrade,hint:hint(!1),plainHint:hint(!0),when:"a person has approved upgrading the plan",excludeFlags,preserveProject:!1,reason:AGENT_REASON.PLAN_UPGRADE_REQUIRED,scope:team.scopeArg,data}}let shown=styledCommand(buy,!1),plain=styledCommand(buy,!0),placeholder="Replace <project> with a project on this team.";return{command:buy,hint:project?shown:`${shown} ${placeholder}`,plainHint:project?plain:`${plain} ${placeholder}`,when:project?"user runs this command in an interactive terminal":"Replace <project> with a project on this team.",excludeFlags,preserveProject:!1,reason:AGENT_REASON.PLAN_UPGRADE_REQUIRED,scope:team.scopeArg,data}}function mapFirewallApiError(e,scope,fallback){let err=e;return scope.type==="team"&&err.status===403?err.code==="plan_not_supported"?`Team-level firewall requires an Enterprise plan (current team: "${scope.displayName}"). Pass --scope <team> or run \`vercel switch\` to target a different team.`:`You need to be a team owner to manage the team-level firewall for "${scope.displayName}".${err.message?` (${err.message})`:""}`:err.message||fallback}function priorityProjectMessage(scope,fix){let team=fix.data.team,label=team?.slug!=null?teamLabel({slug:team.slug,name:team.name}):void 0;return scope.type==="project"?label?`This rule requires a Priority project for ${scope.displayName} on team ${label}.`:`This rule requires a Priority project. ${fix.hint}`:label?`This rule requires a Priority project on team ${label}.`:"This rule requires a Priority project."}function failPriorityProjectGate(client,error,scope,opts){let serverMessage=apiServerMessage(error);if(!serverMessage||!mentionsPriorityProject(serverMessage))return null;let fix=priorityProjectFix(scope),message=opts?.message?fix.command?opts.message:`${opts.message} ${fix.hint}`:priorityProjectMessage(scope,fix),payload={status:AGENT_STATUS.ERROR,reason:fix.reason,message,userActionRequired:!0,hint:fix.plainHint,retryable:!1,...fix.scope?{scope:fix.scope}:{},data:fix.data,...fix.command?{next:[{command:buildCommandWithGlobalFlags(client.argv,fix.command,packageName,{globalFlags:"all",preserveProject:!1,excludeFlags:fix.excludeFlags}),when:fix.when}]}:{}};return shouldEmitNonInteractiveCommandError(client)&&outputAgentError(client,payload,1),opts?.json?(output_manager_default.stopSpinner(),writeAgentError(client,payload),1):(output_manager_default.error(message),fix.command&&output_manager_default.log(fix.hint),1)}function failOwaspPlanGate(client,error,scope,json){let message=apiServerMessage(error);if(!message)return null;if(/OWASP Core Ruleset must be enabled/i.test(message)){let dashboard=scope.type==="project"&&scope.teamSlug?`https://vercel.com/${scope.teamSlug}/${scope.displayName}/firewall`:scope.type==="team"?"the team's Firewall page":"the project's Firewall page";return failFirewall(client,{json,message:`OWASP Core Ruleset isn't on this team's plan yet. Add it from ${dashboard} in the dashboard (Managed Rulesets \u2192 Add to Plan).`,reason:AGENT_REASON.PLAN_UPGRADE_REQUIRED})}return scope.type==="project"&&/OWASP (Core Ruleset|rules) requires? a Priority project/i.test(message)?failPriorityProjectGate(client,error,scope,{json,message:`OWASP Core Ruleset requires a Priority project for ${scope.displayName}.`}):/OWASP (Core Ruleset is|rules are) not available/i.test(message)?failFirewall(client,{json,message:scope.type==="team"?"Team-level OWASP Core Ruleset requires an Enterprise plan.":"OWASP Core Ruleset requires an Enterprise plan.",reason:AGENT_REASON.PLAN_UPGRADE_REQUIRED}):null}function getRulePayload(flags){let legacy=flags["--json"];return legacy!==void 0&&flags["--data"]!==void 0?(output_manager_default.error("Can't use --data with --json."),2):(legacy!==void 0&&output_manager_default.warning("--json is deprecated for rule payloads. Use --data."),flags["--data"]??legacy)}async function parseSubcommandArgs(argv,command,client,commandPath){let parsedArgs,fullPath=commandPath||command.name;try{parsedArgs=parseSubcommandArguments(argv,command)}catch(err){if(client?.nonInteractive){let rawMessage=err instanceof Error?err.message:String(err),flags=getGlobalFlagsFromArgs(client.argv.slice(2),{preserveProject:!0});return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message:rawMessage,next:[{command:getCommandNamePlain(`firewall ${fullPath} ${flags.join(" ")}`.trim()),when:"fix options and retry"}]},2),2}return printError(err),2}return parsedArgs}var CONFIRM_ACTION_LEGACY={stopExitCode:1,stopStatus:"error",declineExitCode:0};function stagedEffects(scope,change){return[`Stages ${change} for ${scope.type} ${scope.displayName}.`,"Nothing is live until the draft is published."]}async function confirmAction(client,skipConfirmation,message,details){return skipConfirmation?!0:client.nonInteractive||!client.stdin.isTTY?(outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.CONFIRMATION_REQUIRED,message:`${message} Re-run with --yes to confirm.`,next:[{command:buildCommandWithYes(client.argv),when:"re-run with --yes to confirm"}]}),process.exit(1),!1):(details&&output_manager_default.print(` ${details}
|
|
10
10
|
`),await client.input.confirm(message,!1))}function firewallPermissionMessage(action,projectName){return`You don't have permission to ${action} for ${projectName}. Ask a team owner to grant access.`}function failFirewall(client,opts){let reason=opts.reason??AGENT_REASON.INVALID_ARGUMENTS,exitCode=getExitCodeForReason(reason);if(client.nonInteractive||opts.json){let payload={status:AGENT_STATUS.ERROR,reason,message:opts.message,...opts.fix?.hint?{hint:opts.fix.hint}:{},next:[...opts.fix?.command?[{command:withGlobalFlags(client,opts.fix.command,void 0,{excludeFlags:opts.fix.excludeFlags,preserveProject:opts.fix.preserveProject}),...opts.fix.when?{when:opts.fix.when}:{}}]:[],...opts.nextCommand?[{command:withGlobalFlags(client,opts.nextCommand)}]:[]]};return client.nonInteractive?outputAgentError(client,payload,exitCode):(output_manager_default.stopSpinner(),writeAgentError(client,payload)),exitCode}return output_manager_default.error(opts.message),opts.fix&&output_manager_default.log(opts.fix.hint),exitCode}function failFirewallObservabilityPlan(client,error,projectName){let message=apiServerMessage(error)??FIREWALL_ACTIVITY_PLAN_MESSAGE,fix=clientObservabilityPlanRecovery(client,error,message,projectName);return failFirewall(client,{message,fix,reason:AGENT_REASON.API_ERROR})}function refuseManagedBotMutation(client,scope,identifier,verb){if(scope.type!=="project")return null;let id=resolveManagedBotRuleId(identifier);if(!id)return null;let command=`firewall rules update ${id} --action <action>`;return failFirewall(client,{message:`Can't ${verb} "${identifier}". That's a managed bot rule.`,reason:AGENT_REASON.INVALID_ARGUMENTS,fix:{command,hint:`Use ${import_chalk2.default.cyan(withGlobalFlags(client,command,scope))} to change it.`,when:"change the managed bot rule instead"}})}function isRetryableApiError(error){return isAPIError(error)&&(error.status>=500||error.status===429)}function failFirewallApi(client,e,opts){if(isAPIError(e)&&(e.status===401||e.status===403))return failFirewall(client,{message:firewallPermissionMessage(opts.permissionAction,opts.projectName),reason:AGENT_REASON.PERMISSION_DENIED,json:opts.json});if(e instanceof Error&&(e.name==="TimeoutError"||e.name==="AbortError")){let job=opts.timeoutJob??"firewall data";return failFirewall(client,{message:`Timed out waiting for ${job}. Re-run the command \u2014 the next try is usually faster.`,nextCommand:opts.nextCommand,reason:AGENT_REASON.API_ERROR,json:opts.json})}let msg=e instanceof Error&&e.message?e.message:opts.fallback;return failFirewall(client,{message:msg,nextCommand:isRetryableApiError(e)?opts.nextCommand:void 0,reason:AGENT_REASON.API_ERROR,json:opts.json})}function outputJson(client,data){output_manager_default.stopSpinner(),client.stdout.write(JSON.stringify(data,null,2)+`
|
|
11
11
|
`)}async function detectExistingDraft(client,scope){let{draft}=await listFirewallConfigs(client,scope);return draft!==null&&draft.changes.length>0}async function offerAutoPublish(client,scope,hadExistingDraft,opts){if(output_manager_default.print(`
|
|
12
12
|
${import_chalk2.default.gray(`This change is staged. Run ${import_chalk2.default.cyan(withGlobalFlags(client,"firewall publish",scope))} to make it live, or ${import_chalk2.default.cyan(withGlobalFlags(client,"firewall discard",scope))} to undo.`)}
|
|
@@ -0,0 +1,8 @@
|
|
|
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{N,X,Z}from"./chunk-6OOJFAF5.js";import{d}from"./chunk-YBWLW6SW.js";var i=d(N());Z();var a=i.extendType(i.string,{displayName:"key=value",async from(e){if(!e.includes("="))return{key:e,value:process.env[e]};let[t,...n]=e.split("=");return{key:t,value:n.join("=")}}}),o=i.extendType(i.array(a),{async from(e){let n=Object.create(null),r=[];for(let{key:t,value:i2}of e)i2===void 0?r.push(t):n[t]=i2;if(r.length>0){let e2=r.length>1;console.error(X.yellow([`${X.bold("warn:")} env var${e2?"s were":" was"} not defined and ${e2?"were":"was"} not passed: ${r.join(", ")}`,`\u2570\u25B6 ${X.bold("hint:")} --env VAR is equivalent to --env VAR=$VAR`].join(`
|
|
8
|
+
`)))}return n}});export{o};
|
|
@@ -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{markOnboardingSeen}from"./chunk-DDZEKNQR.js";import{isInteractiveHumanRun}from"./chunk-FB37TFVF.js";import{isGuidanceEnabled}from"./chunk-TAAWMNNL.js";import{require_open}from"./chunk-PVASGBEF.js";import{getTeams}from"./chunk-BIABM3FB.js";import{TelemetryClient}from"./chunk-EYRBV6RM.js";import{createDpopKey,deleteDpopKey,deviceAccessTokenRequest,deviceAuthorizationRequest,getCachedUsername,getUser,isDpopLoginEnabled,isOAuthError,processDeviceAuthorizationResponse,processTokenResponse}from"./chunk-ZHGKJCQ2.js";import{printError}from"./chunk-UPDIZCP3.js";import{parseArguments}from"./chunk-INIZJZ3O.js";import{getTeamByIdOrSlug}from"./chunk-3ARTWVQV.js";import{humanizePath}from"./chunk-QFE3RPMA.js";import{getCommandName}from"./chunk-B4KA3ZH2.js";import{SPINNER,countRows,output_manager_default}from"./chunk-RYSO5U3E.js";import{require_dist}from"./chunk-MCYG7CCE.js";import{require_ansi_escapes}from"./chunk-YHPPP3SF.js";import{require_source}from"./chunk-NB2WLB3J.js";import{require_strip_ansi}from"./chunk-BS32OUOC.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk3=__toESM(require_source(),1),import_error_utils=__toESM(require_dist(),1),open=__toESM(require_open(),1),import_ansi_escapes=__toESM(require_ansi_escapes(),1);import readline from"node:readline";import{KNOWN_AGENTS}from"@vercel/detect-agent";async function updateCurrentTeamAfterLogin(client,ssoTeamId){if(ssoTeamId)client.updateConfig({currentTeam:ssoTeamId});else{let user=null;try{user=await getUser(client)}catch{return output_manager_default.error("Failed to fetch the logged in user. Please try again."),1}client.updateConfig({currentTeam:user.version==="northstar"&&user.defaultTeamId?user.defaultTeamId:void 0})}}var LoginTelemetryClient=class extends TelemetryClient{trackState(...args){this.trackLoginState(...args)}trackDpopKey(storage){this.trackDpopKeyStorage(storage)}};import{performance}from"node:perf_hooks";var{waitingFrame,settledFrame,entrance,period,finishFrame,finishDuration}=(()=>{let TURN=Math.PI*2.5,SPIN2=2,BIRTH=.02,LAG=.045,GROW=.34,PEAK=TURN*2.4/SPIN2,SETTLE=.5,DRAG=3,REACH=24,LABEL_AT=1.95,TYPE=.045,FADE=.1,T0=1.56,DWELL=.8,CLIMB=.12,PUSH=.7,LATE=.5,GLOW=.3,SHEEN=.85,LEN=Math.hypot(.507,.862),LX=-.507/LEN,LZ=-.862/LEN,LIT=-LZ,S=Math.SQRT1_2,NORMALS=[[0,-1],[S,-S],[1,0],[S,S],[0,1],[-S,S],[-1,0],[-S,-S]],entrance2=2.4,period2=7,clamp2=(n,lo=0,hi=1)=>Math.min(hi,Math.max(lo,n)),smooth=n=>n*n*(3-2*n),easeOut=n=>1-(1-n)**3,lerp=(a,b,s)=>a*(1-s)+b*s,toneOf=n=>Math.max(0,Math.min(255,Math.round(n))),bit=(u,r)=>{let h=Math.imul(u,374761393)^Math.imul(r+11,668265263);return h=Math.imul(h^h>>>13,1274126177),h>>>15&1?"1":"0"},checkTime=time=>{if(typeof time!="number"||!Number.isFinite(time)||time<0)throw new RangeError("time must be a finite number of seconds >= 0")},checkLayout=(width,alignment)=>{if(width!==30&&width!==60)throw new RangeError("width must be 30 or 60");if(alignment!=="left"&&alignment!=="center")throw new RangeError("alignment must be left or center")};function rowAt(t,r){let tau=t-BIRTH-(7-r)*LAG,q=1-clamp2(tau/SPIN2),E=TURN*(8*q**3-3*q**4)/5,vE=tau>0&&tau<SPIN2?-TURN*(24*q*q-12*q**3)/(5*SPIN2):0,phi=(t-T0-(8-1-r)*CLIMB)/period2,f=phi-Math.floor(phi),w=2*Math.PI*f,turn=(1-Math.cos(w))/2,g=easeOut(clamp2(tau/GROW)),settle=1-smooth(clamp2((tau-SPIN2+SETTLE)/SETTLE));return{th:E-Math.PI*f+DWELL/2*Math.sin(w),v:vE-Math.PI/period2*(1-DWELL*Math.cos(w)),g,e:g*Math.min(1,Math.abs(vE)/PEAK+GLOW*turn),live:settle+(1-settle)*SHEEN*turn,drag:E-PUSH*(1-Math.cos(w-LATE))/2,reach:tau/.45}}let restRow=()=>({th:0,v:0,g:1,e:0,live:0,drag:0,reach:9});function labelAt(t){let mix=[];for(let i=0;i<6;i++){let start=LABEL_AT+i*TYPE;mix.push(t<start?0:smooth(clamp2((t-start)/FADE)))}return{mix,keep:t<LABEL_AT?1:1-smooth(clamp2((t-LABEL_AT)/FADE))}}function render(rows,mix,keep,width,alignment){let c=alignment==="left"?12:width/2-4,span=Math.max(c,width-c),grid=[];for(let r=0;r<8;r++){let{th,g,e,live,drag,reach}=rows[r],row=[];for(let x=0;x<width;x++){let dx=x+.5-c,nx=dx/span,k=.35+.65/(1+(dx/REACH)**2),vis=smooth(clamp2((reach-Math.abs(nx))/.3)),tone=toneOf((20+30*e*k)*(1-.72*nx*nx)*vis);row.push(tone>=3?[bit(x-Math.round(drag*DRAG*k),r),tone]:[" ",0])}if(g>0){let hw=10.5*(r+.5)/8*g,hd=8/2*g,ch=Math.min(.5*g,hw/2,hd/2),cs=Math.cos(th),sn=Math.sin(th),at=(px,pz)=>c+px*cs+pz*sn,front=244-2.6*r,fade=.5+.5*g,loop=[[-hw+ch,-hd],[hw-ch,-hd],[hw,-hd+ch],[hw,hd-ch],[hw-ch,hd],[-hw+ch,hd],[-hw,hd-ch],[-hw,-hd+ch]],faces=[];for(let i=0;i<8;i++){let[n0,n1]=NORMALS[i],nx=n0*cs+n1*sn,nz=-n0*sn+n1*cs;if(nz>=-1e-9)continue;let lit=Math.max(0,nx*LX+nz*LZ),tone;i%4===0?tone=56+(front-56)*Math.min(1,lit/LIT)+12*smooth(clamp2((lit-LIT)/(1-LIT))):i%4===2?tone=40+104*lit:tone=front+(48+207*lit**6-front)*live;let p=at(...loop[i]),q=at(...loop[(i+1)%8]);faces.push([Math.min(p,q),Math.max(p,q),tone*fade])}let lo=1/0,hi=-1/0;for(let f of faces)lo=Math.min(lo,f[0]),hi=Math.max(hi,f[1]);let first=-1,last=-1;for(let x=Math.max(0,Math.floor(lo));x<Math.min(width,Math.ceil(hi));x++){let cover=0,ink=0;for(let[l,h,tone2]of faces){let k=Math.max(0,Math.min(x+1,h)-Math.max(x,l));cover+=k,ink+=k*tone2}if(cover<.34)continue;let tone=ink/cover,cell;cover>=.72?cell=["\u2588",tone]:lo>x&&hi>=x+1?cell=["\u2590",tone]:hi<x+1&&lo<=x?cell=["\u258C",tone]:cell=["\u2588",tone*cover];let v=toneOf(cell[1]);v<=0||(row[x]=[cell[0],v],first<0&&(first=x),last=x)}first>0&&(row[first-1]=[" ",0]),last>=0&&last<width-1&&(row[last+1]=[" ",0])}grid.push(row)}let ly=7,lx=c+12;for(let x of[lx-1,lx+6,lx+7]){if(x<0||x>=width)continue;let tone=toneOf(grid[ly][x][1]*keep);grid[ly][x]=tone>=3?[grid[ly][x][0],tone]:[" ",0]}for(let i=0;i<6;i++){let m=mix[i];if(m<=0)continue;let tone=toneOf(grid[ly][lx+i][1]*(1-m)+176*m);grid[ly][lx+i]=tone>0?["Vercel"[i],tone]:[" ",0]}return grid}function waitingFrame2(time,width=60,alignment="left"){checkTime(time),checkLayout(width,alignment);let rows=[];for(let r=0;r<8;r++)rows.push(rowAt(time,r));let{mix,keep}=labelAt(time);return render(rows,mix,keep,width,alignment)}function settledFrame2(width=60,alignment="left"){return checkLayout(width,alignment),render(Array.from({length:8},restRow),[1,1,1,1,1,1],0,width,alignment)}let finishDuration2=3,STEP=1/30,COMMIT=.25,DRIVE=.4,DRIVE_PER=.6,CATCH=2.1,SEAT=.4,LET_GO=.35,RISE=.5,SPEC=1,WARM=.5,WAKE=.9,INK_AT=.3,INK_LEN=.4,PEAK_N=60*.4**2*.6**3,A=s=>1-6*s*s+8*s**3-3*s**4,B=s=>4*s**3-3*s**4,N=s=>60*s*s*(1-s)**3,IA=s=>s-2*s**3+2*s**4-.6*s**5,IB=s=>s**4-.6*s**5,IN=s=>20*s**3-45*s**4+36*s**5-10*s**6,checkProgress=progress=>{if(typeof progress!="number"||!Number.isFinite(progress)||progress<0||progress>1)throw new RangeError("progress must be a number from 0 to 1")};function plan(time){let rows=[],sx=0,sy=0;for(let r=0;r<8;r++){let a=rowAt(time,r),lead=(8-1-r)*STEP,th=a.th+a.v*lead;rows.push({a,lead,th}),sx+=Math.cos(2*th),sy+=Math.sin(2*th)}let mean=Math.atan2(sy,sx)/2,travel=mean-Math.PI*Math.floor(mean/Math.PI);for(travel<COMMIT*Math.PI&&(travel+=Math.PI);;){let drive=DRIVE+DRIVE_PER*travel/Math.PI,forward=!0;for(let row of rows){row.target=Math.PI*Math.round((row.th-travel)/Math.PI),row.from=row.th-row.target,row.k=-row.from/drive-.4*(row.a.v-CATCH);for(let i=0;i<=64&&forward;i++){let s=i/64;row.a.v*A(s)-CATCH*B(s)+row.k*N(s)>0&&(forward=!1)}}if(forward)return{rows,travel,drive,rest:7*STEP+drive+SEAT};travel+=Math.PI}}function poseAt(p,t){let handover=smooth(clamp2(t/LET_GO)),rise=smooth(clamp2(t/RISE)),drive=p.drive;return p.rows.map(({a,lead,target,from,k})=>{let tau=t-lead;if(tau>=drive+SEAT)return{...restRow(),angle:target};let u,v,env=0,wake=0;if(tau<0)u=a.th+a.v*t-target,v=a.v;else if(tau<drive){let s=tau/drive;u=from+drive*(a.v*IA(s)-CATCH*IB(s)+k*IN(s)),v=a.v*A(s)-CATCH*B(s)+k*N(s),env=N(s)/PEAK_N,wake=16*s*s*(1-s)**2}else{let x=(tau-drive)/SEAT;u=-CATCH*SEAT*x*(1-x)**3,v=-CATCH*(1-x)**2*(1-4*x)}return{th:u,v,angle:target+u,g:lerp(a.g,1,rise),e:lerp(a.e,WARM*env,handover),live:lerp(a.live,SPEC*env,handover),drag:a.drag*(1-handover)-WAKE*p.travel/Math.PI*wake,reach:lerp(Math.min(a.reach,9),9,rise)}})}function finishFrame2(time,progress,width=60,alignment="left"){if(checkTime(time),checkLayout(width,alignment),checkProgress(progress),progress===0)return waitingFrame2(time,width,alignment);let p=plan(time),t=progress*finishDuration2;if(progress===1||t>=p.rest)return settledFrame2(width,alignment);let label=labelAt(time),mix=label.mix.map((m0,i)=>lerp(m0,1,smooth(clamp2((t-INK_AT-i*TYPE)/INK_LEN))));return render(poseAt(p,t),mix,lerp(label.keep,0,smooth(clamp2(t/(INK_AT+INK_LEN)))),width,alignment)}return{waitingFrame:waitingFrame2,settledFrame:settledFrame2,entrance:entrance2,period:period2,finishFrame:finishFrame2,finishDuration:finishDuration2}})(),BREATH=.3,VISIT=.5,LEAD=.2,STATUS=.6,SPIN=BREATH+LEAD+STATUS/2,revealDuration=BREATH+LEAD+STATUS,clamp=n=>Math.min(1,Math.max(0,n)),ramp=(time,start,length)=>{let s=clamp((time-start)/length);return s*s*(3-2*s)};function revealFrame(time,reduced=!1){if(typeof time!="number"||!Number.isFinite(time))throw new TypeError("time must be a finite number of seconds");if(typeof reduced!="boolean")throw new TypeError("reduced must be a boolean");return reduced?{visit:1,status:1,spinner:!1,ready:!0}:time>=revealDuration?{visit:1,status:1,spinner:!0,ready:!0}:{visit:ramp(time,BREATH,VISIT),status:ramp(time,BREATH+LEAD,STATUS),spinner:time>=SPIN,ready:!1}}var import_chalk=__toESM(require_source(),1);function encodeGrid(grid,width,colors){return grid.map((row,y)=>{let result="",previous="";for(let x=0;x<width;x++){let[ch,n]=row[x];if(ch===" "||n===0){result+=" ";continue}if(!colors&&(ch==="0"||ch==="1")){let h=Math.imul(x+1,73244475)^Math.imul(y+1,668265261);if(h=Math.imul(h^h>>>16,73244475),((h^h>>>16)>>>0)/4294967296>=n/96){result+=" ";continue}}let style=colors?`\x1B[22;38;2;${colors.background.map((bg,i)=>Math.round(bg+(colors.foreground[i]-bg)*n/255)).join(";")}m`:n<96?"\x1B[2;39m":"\x1B[22;39m";style!==previous&&(result+=style,previous=style),result+=ch}return"\r\x1B[2K"+result.trimEnd()+`\x1B[0m
|
|
7
|
+
import{markOnboardingSeen}from"./chunk-CX4WJVNY.js";import{isInteractiveHumanRun}from"./chunk-JEACGNHI.js";import{isGuidanceEnabled}from"./chunk-TAAWMNNL.js";import{require_open}from"./chunk-CSU46B7Q.js";import{getTeams}from"./chunk-SSOWIDKG.js";import{TelemetryClient}from"./chunk-LNRKGW7S.js";import{createDpopKey,deleteDpopKey,deviceAccessTokenRequest,deviceAuthorizationRequest,getCachedUsername,getUser,isDpopLoginEnabled,isOAuthError,processDeviceAuthorizationResponse,processTokenResponse}from"./chunk-G7RQVFID.js";import{printError}from"./chunk-Y2J2ESAE.js";import{parseArguments}from"./chunk-RDTWDVFO.js";import{getTeamByIdOrSlug}from"./chunk-NVU7XTNI.js";import{humanizePath}from"./chunk-MTPHHAPR.js";import{getCommandName}from"./chunk-EFGZK6OY.js";import{SPINNER,countRows,output_manager_default}from"./chunk-RIXTYUYN.js";import{require_dist}from"./chunk-4SIQE2W4.js";import{require_ansi_escapes}from"./chunk-MF43WTDT.js";import{require_source}from"./chunk-UJ7YUIEJ.js";import{require_strip_ansi}from"./chunk-LPYHYTYI.js";import{__toESM}from"./chunk-NBPLUP7C.js";var import_chalk3=__toESM(require_source(),1),import_error_utils=__toESM(require_dist(),1),open=__toESM(require_open(),1),import_ansi_escapes=__toESM(require_ansi_escapes(),1);import readline from"node:readline";import{KNOWN_AGENTS}from"@vercel/detect-agent";async function updateCurrentTeamAfterLogin(client,ssoTeamId){if(ssoTeamId)client.updateConfig({currentTeam:ssoTeamId});else{let user=null;try{user=await getUser(client)}catch{return output_manager_default.error("Failed to fetch the logged in user. Please try again."),1}client.updateConfig({currentTeam:user.version==="northstar"&&user.defaultTeamId?user.defaultTeamId:void 0})}}var LoginTelemetryClient=class extends TelemetryClient{trackState(...args){this.trackLoginState(...args)}trackDpopKey(storage){this.trackDpopKeyStorage(storage)}};import{performance}from"node:perf_hooks";var{waitingFrame,settledFrame,entrance,period,finishFrame,finishDuration}=(()=>{let TURN=Math.PI*2.5,SPIN2=2,BIRTH=.02,LAG=.045,GROW=.34,PEAK=TURN*2.4/SPIN2,SETTLE=.5,DRAG=3,REACH=24,LABEL_AT=1.95,TYPE=.045,FADE=.1,T0=1.56,DWELL=.8,CLIMB=.12,PUSH=.7,LATE=.5,GLOW=.3,SHEEN=.85,LEN=Math.hypot(.507,.862),LX=-.507/LEN,LZ=-.862/LEN,LIT=-LZ,S=Math.SQRT1_2,NORMALS=[[0,-1],[S,-S],[1,0],[S,S],[0,1],[-S,S],[-1,0],[-S,-S]],entrance2=2.4,period2=7,clamp2=(n,lo=0,hi=1)=>Math.min(hi,Math.max(lo,n)),smooth=n=>n*n*(3-2*n),easeOut=n=>1-(1-n)**3,lerp=(a,b,s)=>a*(1-s)+b*s,toneOf=n=>Math.max(0,Math.min(255,Math.round(n))),bit=(u,r)=>{let h=Math.imul(u,374761393)^Math.imul(r+11,668265263);return h=Math.imul(h^h>>>13,1274126177),h>>>15&1?"1":"0"},checkTime=time=>{if(typeof time!="number"||!Number.isFinite(time)||time<0)throw new RangeError("time must be a finite number of seconds >= 0")},checkLayout=(width,alignment)=>{if(width!==30&&width!==60)throw new RangeError("width must be 30 or 60");if(alignment!=="left"&&alignment!=="center")throw new RangeError("alignment must be left or center")};function rowAt(t,r){let tau=t-BIRTH-(7-r)*LAG,q=1-clamp2(tau/SPIN2),E=TURN*(8*q**3-3*q**4)/5,vE=tau>0&&tau<SPIN2?-TURN*(24*q*q-12*q**3)/(5*SPIN2):0,phi=(t-T0-(8-1-r)*CLIMB)/period2,f=phi-Math.floor(phi),w=2*Math.PI*f,turn=(1-Math.cos(w))/2,g=easeOut(clamp2(tau/GROW)),settle=1-smooth(clamp2((tau-SPIN2+SETTLE)/SETTLE));return{th:E-Math.PI*f+DWELL/2*Math.sin(w),v:vE-Math.PI/period2*(1-DWELL*Math.cos(w)),g,e:g*Math.min(1,Math.abs(vE)/PEAK+GLOW*turn),live:settle+(1-settle)*SHEEN*turn,drag:E-PUSH*(1-Math.cos(w-LATE))/2,reach:tau/.45}}let restRow=()=>({th:0,v:0,g:1,e:0,live:0,drag:0,reach:9});function labelAt(t){let mix=[];for(let i=0;i<6;i++){let start=LABEL_AT+i*TYPE;mix.push(t<start?0:smooth(clamp2((t-start)/FADE)))}return{mix,keep:t<LABEL_AT?1:1-smooth(clamp2((t-LABEL_AT)/FADE))}}function render(rows,mix,keep,width,alignment){let c=alignment==="left"?12:width/2-4,span=Math.max(c,width-c),grid=[];for(let r=0;r<8;r++){let{th,g,e,live,drag,reach}=rows[r],row=[];for(let x=0;x<width;x++){let dx=x+.5-c,nx=dx/span,k=.35+.65/(1+(dx/REACH)**2),vis=smooth(clamp2((reach-Math.abs(nx))/.3)),tone=toneOf((20+30*e*k)*(1-.72*nx*nx)*vis);row.push(tone>=3?[bit(x-Math.round(drag*DRAG*k),r),tone]:[" ",0])}if(g>0){let hw=10.5*(r+.5)/8*g,hd=8/2*g,ch=Math.min(.5*g,hw/2,hd/2),cs=Math.cos(th),sn=Math.sin(th),at=(px,pz)=>c+px*cs+pz*sn,front=244-2.6*r,fade=.5+.5*g,loop=[[-hw+ch,-hd],[hw-ch,-hd],[hw,-hd+ch],[hw,hd-ch],[hw-ch,hd],[-hw+ch,hd],[-hw,hd-ch],[-hw,-hd+ch]],faces=[];for(let i=0;i<8;i++){let[n0,n1]=NORMALS[i],nx=n0*cs+n1*sn,nz=-n0*sn+n1*cs;if(nz>=-1e-9)continue;let lit=Math.max(0,nx*LX+nz*LZ),tone;i%4===0?tone=56+(front-56)*Math.min(1,lit/LIT)+12*smooth(clamp2((lit-LIT)/(1-LIT))):i%4===2?tone=40+104*lit:tone=front+(48+207*lit**6-front)*live;let p=at(...loop[i]),q=at(...loop[(i+1)%8]);faces.push([Math.min(p,q),Math.max(p,q),tone*fade])}let lo=1/0,hi=-1/0;for(let f of faces)lo=Math.min(lo,f[0]),hi=Math.max(hi,f[1]);let first=-1,last=-1;for(let x=Math.max(0,Math.floor(lo));x<Math.min(width,Math.ceil(hi));x++){let cover=0,ink=0;for(let[l,h,tone2]of faces){let k=Math.max(0,Math.min(x+1,h)-Math.max(x,l));cover+=k,ink+=k*tone2}if(cover<.34)continue;let tone=ink/cover,cell;cover>=.72?cell=["\u2588",tone]:lo>x&&hi>=x+1?cell=["\u2590",tone]:hi<x+1&&lo<=x?cell=["\u258C",tone]:cell=["\u2588",tone*cover];let v=toneOf(cell[1]);v<=0||(row[x]=[cell[0],v],first<0&&(first=x),last=x)}first>0&&(row[first-1]=[" ",0]),last>=0&&last<width-1&&(row[last+1]=[" ",0])}grid.push(row)}let ly=7,lx=c+12;for(let x of[lx-1,lx+6,lx+7]){if(x<0||x>=width)continue;let tone=toneOf(grid[ly][x][1]*keep);grid[ly][x]=tone>=3?[grid[ly][x][0],tone]:[" ",0]}for(let i=0;i<6;i++){let m=mix[i];if(m<=0)continue;let tone=toneOf(grid[ly][lx+i][1]*(1-m)+176*m);grid[ly][lx+i]=tone>0?["Vercel"[i],tone]:[" ",0]}return grid}function waitingFrame2(time,width=60,alignment="left"){checkTime(time),checkLayout(width,alignment);let rows=[];for(let r=0;r<8;r++)rows.push(rowAt(time,r));let{mix,keep}=labelAt(time);return render(rows,mix,keep,width,alignment)}function settledFrame2(width=60,alignment="left"){return checkLayout(width,alignment),render(Array.from({length:8},restRow),[1,1,1,1,1,1],0,width,alignment)}let finishDuration2=3,STEP=1/30,COMMIT=.25,DRIVE=.4,DRIVE_PER=.6,CATCH=2.1,SEAT=.4,LET_GO=.35,RISE=.5,SPEC=1,WARM=.5,WAKE=.9,INK_AT=.3,INK_LEN=.4,PEAK_N=60*.4**2*.6**3,A=s=>1-6*s*s+8*s**3-3*s**4,B=s=>4*s**3-3*s**4,N=s=>60*s*s*(1-s)**3,IA=s=>s-2*s**3+2*s**4-.6*s**5,IB=s=>s**4-.6*s**5,IN=s=>20*s**3-45*s**4+36*s**5-10*s**6,checkProgress=progress=>{if(typeof progress!="number"||!Number.isFinite(progress)||progress<0||progress>1)throw new RangeError("progress must be a number from 0 to 1")};function plan(time){let rows=[],sx=0,sy=0;for(let r=0;r<8;r++){let a=rowAt(time,r),lead=(8-1-r)*STEP,th=a.th+a.v*lead;rows.push({a,lead,th}),sx+=Math.cos(2*th),sy+=Math.sin(2*th)}let mean=Math.atan2(sy,sx)/2,travel=mean-Math.PI*Math.floor(mean/Math.PI);for(travel<COMMIT*Math.PI&&(travel+=Math.PI);;){let drive=DRIVE+DRIVE_PER*travel/Math.PI,forward=!0;for(let row of rows){row.target=Math.PI*Math.round((row.th-travel)/Math.PI),row.from=row.th-row.target,row.k=-row.from/drive-.4*(row.a.v-CATCH);for(let i=0;i<=64&&forward;i++){let s=i/64;row.a.v*A(s)-CATCH*B(s)+row.k*N(s)>0&&(forward=!1)}}if(forward)return{rows,travel,drive,rest:7*STEP+drive+SEAT};travel+=Math.PI}}function poseAt(p,t){let handover=smooth(clamp2(t/LET_GO)),rise=smooth(clamp2(t/RISE)),drive=p.drive;return p.rows.map(({a,lead,target,from,k})=>{let tau=t-lead;if(tau>=drive+SEAT)return{...restRow(),angle:target};let u,v,env=0,wake=0;if(tau<0)u=a.th+a.v*t-target,v=a.v;else if(tau<drive){let s=tau/drive;u=from+drive*(a.v*IA(s)-CATCH*IB(s)+k*IN(s)),v=a.v*A(s)-CATCH*B(s)+k*N(s),env=N(s)/PEAK_N,wake=16*s*s*(1-s)**2}else{let x=(tau-drive)/SEAT;u=-CATCH*SEAT*x*(1-x)**3,v=-CATCH*(1-x)**2*(1-4*x)}return{th:u,v,angle:target+u,g:lerp(a.g,1,rise),e:lerp(a.e,WARM*env,handover),live:lerp(a.live,SPEC*env,handover),drag:a.drag*(1-handover)-WAKE*p.travel/Math.PI*wake,reach:lerp(Math.min(a.reach,9),9,rise)}})}function finishFrame2(time,progress,width=60,alignment="left"){if(checkTime(time),checkLayout(width,alignment),checkProgress(progress),progress===0)return waitingFrame2(time,width,alignment);let p=plan(time),t=progress*finishDuration2;if(progress===1||t>=p.rest)return settledFrame2(width,alignment);let label=labelAt(time),mix=label.mix.map((m0,i)=>lerp(m0,1,smooth(clamp2((t-INK_AT-i*TYPE)/INK_LEN))));return render(poseAt(p,t),mix,lerp(label.keep,0,smooth(clamp2(t/(INK_AT+INK_LEN)))),width,alignment)}return{waitingFrame:waitingFrame2,settledFrame:settledFrame2,entrance:entrance2,period:period2,finishFrame:finishFrame2,finishDuration:finishDuration2}})(),BREATH=.3,VISIT=.5,LEAD=.2,STATUS=.6,SPIN=BREATH+LEAD+STATUS/2,revealDuration=BREATH+LEAD+STATUS,clamp=n=>Math.min(1,Math.max(0,n)),ramp=(time,start,length)=>{let s=clamp((time-start)/length);return s*s*(3-2*s)};function revealFrame(time,reduced=!1){if(typeof time!="number"||!Number.isFinite(time))throw new TypeError("time must be a finite number of seconds");if(typeof reduced!="boolean")throw new TypeError("reduced must be a boolean");return reduced?{visit:1,status:1,spinner:!1,ready:!0}:time>=revealDuration?{visit:1,status:1,spinner:!0,ready:!0}:{visit:ramp(time,BREATH,VISIT),status:ramp(time,BREATH+LEAD,STATUS),spinner:time>=SPIN,ready:!1}}var import_chalk=__toESM(require_source(),1);function encodeGrid(grid,width,colors){return grid.map((row,y)=>{let result="",previous="";for(let x=0;x<width;x++){let[ch,n]=row[x];if(ch===" "||n===0){result+=" ";continue}if(!colors&&(ch==="0"||ch==="1")){let h=Math.imul(x+1,73244475)^Math.imul(y+1,668265261);if(h=Math.imul(h^h>>>16,73244475),((h^h>>>16)>>>0)/4294967296>=n/96){result+=" ";continue}}let style=colors?`\x1B[22;38;2;${colors.background.map((bg,i)=>Math.round(bg+(colors.foreground[i]-bg)*n/255)).join(";")}m`:n<96?"\x1B[2;39m":"\x1B[22;39m";style!==previous&&(result+=style,previous=style),result+=ch}return"\r\x1B[2K"+result.trimEnd()+`\x1B[0m
|
|
8
8
|
`}).join("")}function createSignInWelcome(stream,closeInputOnSignal,colors=()=>{},onShown,layout){let columns=stream.columns,rows=stream.rows,width=columns>=61?60:30,footerRows=layout?.footerRows??0,ownedRows=9+footerRows,skipFooter=footerRows?`\x1B[${footerRows}B\r`:"",spinnerIndex=0,formatSpinnerFrame=()=>`${import_chalk.default.gray(SPINNER.frames[spinnerIndex])} ${import_chalk.default.gray("Waiting for authentication...")}`,spinnerFrame=formatSpinnerFrame(),spinnerUpdated=0,shown=!1,stopped=!1,failed=!1,timer,start=0,finishStart,finishFrom=0,keepFinal=!1,finishPromise,resolveFinish,receipt,receiptRows=0,receiptPrinted=!1,receiptQueued=!1,onReceiptShown,authComplete=!1,instructionsReady=!1,instructionsVisible=!1,skipCompletion=!1,finishDeadline,pendingWrites=0,release;function releaseErrorsWhenIdle(){!stopped||pendingWrites||release||(release=setImmediate(()=>{release=void 0,stopped&&!pendingWrites&&stream.removeListener("error",errored)}))}function writePacket(packet,next){pendingWrites++;try{stream.write(packet,error=>{pendingWrites--,error?errored():next?.(),releaseErrorsWhenIdle()})}catch{pendingWrites--,errored(),releaseErrorsWhenIdle()}}let stop=()=>{if(stopped)return;stopped=!0,clearTimeout(timer),clearTimeout(finishDeadline),stream.removeListener("resize",resized),process.removeListener("exit",exiting),process.removeListener("SIGINT",finishInterrupted);for(let[signal,handler]of signals)process.removeListener(signal,handler);let showInstructions=!authComplete&&layout?.instructions&&!instructionsVisible;shown&&!keepFinal&&!receiptQueued&&!failed&&stream.columns===columns&&stream.rows===rows&&writePacket(layout?`\x1B[${ownedRows}A`+`\r\x1B[2K
|
|
9
9
|
`.repeat(8)+(showInstructions?layout.instructions:authComplete?`\r\x1B[2K
|
|
10
10
|
`.repeat(footerRows):skipFooter)+"\r\x1B[2K\x1B[0m":"\x1B[9A"+`\r\x1B[2K
|