@vercel/cli-support 66.6.0 → 68.0.0-snapshot-c9dfd83f2293
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-NIIHCHGH.js +8 -0
- package/dist/chunks/add-ORZO4EJ7.js +8 -0
- package/dist/chunks/add-SKRNSMC6.js +8 -0
- package/dist/chunks/{alerts-72Q42HNT.js → alerts-MNMZH6BO.js} +1 -1
- package/dist/chunks/build-P7KKWO4O.js +7 -0
- package/dist/chunks/{chunk-ZZD5W5KT.js → chunk-23FY4PR3.js} +1 -1
- package/dist/chunks/{chunk-YTRKHRL3.js → chunk-27FVSW45.js} +1 -1
- package/dist/chunks/{chunk-IIK6GUVI.js → chunk-2BK7SZQA.js} +1 -1
- package/dist/chunks/{chunk-WJX5PGNN.js → chunk-2DH6LTUI.js} +1 -1
- package/dist/chunks/{chunk-D2TVI7KK.js → chunk-2HFP22IP.js} +4 -4
- package/dist/chunks/{chunk-7AVHDJSP.js → chunk-2KXLL3DX.js} +4 -4
- package/dist/chunks/{chunk-YEDS2UMW.js → chunk-2ZN4JRDA.js} +1 -1
- package/dist/chunks/{chunk-DJZBJC2A.js → chunk-3AFEVHHY.js} +1 -1
- package/dist/chunks/{chunk-FOFX7LHS.js → chunk-3OPLG6HM.js} +1 -1
- package/dist/chunks/{chunk-Q66LJNIV.js → chunk-3RFQ2NXZ.js} +1 -1
- package/dist/chunks/{chunk-F4UEGELU.js → chunk-3VNS4D7V.js} +1 -1
- package/dist/chunks/{chunk-XAGG5BJT.js → chunk-43XDA7ST.js} +1 -1
- package/dist/chunks/{chunk-OXS5VO4X.js → chunk-4D5DAM3D.js} +1 -1
- package/dist/chunks/chunk-4Z6R5KHZ.js +78 -0
- package/dist/chunks/{chunk-5KSBRQI2.js → chunk-5727HGA6.js} +1 -1
- package/dist/chunks/{chunk-6GE4V7MW.js → chunk-572VGS6P.js} +2 -2
- package/dist/chunks/{chunk-O7GNYVVM.js → chunk-5OGPMRRQ.js} +2 -2
- package/dist/chunks/{chunk-UUBPAYTG.js → chunk-5RMIM4S2.js} +1 -1
- package/dist/chunks/chunk-67GZ5REA.js +7 -0
- package/dist/chunks/{chunk-VHSAI6FS.js → chunk-6FEMU5YF.js} +1 -1
- package/dist/chunks/chunk-6JTZZSFH.js +7 -0
- package/dist/chunks/{chunk-UDZJCD5W.js → chunk-6KNWKZR4.js} +1 -1
- package/dist/chunks/{chunk-ZKNEIE44.js → chunk-6NC2JFUQ.js} +1 -1
- package/dist/chunks/{chunk-5O4AXCN7.js → chunk-6OJVCMG5.js} +1 -1
- package/dist/chunks/{chunk-X7KKWUPS.js → chunk-6WBEU34Y.js} +1 -1
- package/dist/chunks/{chunk-NBTFAXL4.js → chunk-6Z5REGCM.js} +1 -1
- package/dist/chunks/{chunk-VPSR2O55.js → chunk-7AAYWDIZ.js} +3 -3
- package/dist/chunks/{chunk-WIF4VGYZ.js → chunk-7GJ37QPL.js} +1 -1
- package/dist/chunks/chunk-7HQZRU25.js +10 -0
- package/dist/chunks/{chunk-XECELSF5.js → chunk-7JU5RJ3H.js} +1 -1
- package/dist/chunks/{chunk-KSGN5OCV.js → chunk-7K5ZWVDL.js} +1 -1
- package/dist/chunks/{chunk-UQZZX2J7.js → chunk-7OZ7OKPS.js} +1 -1
- package/dist/chunks/{chunk-PFOOPXTN.js → chunk-7RABG6HV.js} +2 -2
- package/dist/chunks/{chunk-AMH5MXDW.js → chunk-7WDSOKOY.js} +1 -1
- package/dist/chunks/{chunk-ELM2KPYX.js → chunk-A4LOQ3UK.js} +1 -1
- package/dist/chunks/{chunk-SYJXONEV.js → chunk-A6CMQOL7.js} +1 -1
- package/dist/chunks/chunk-AOPFMMUK.js +13 -0
- package/dist/chunks/{chunk-2OMI3IUW.js → chunk-AVXX4Q6S.js} +1 -1
- package/dist/chunks/{chunk-YEUIG3JC.js → chunk-AZVSMIPP.js} +1 -1
- package/dist/chunks/{chunk-XLYO5QNG.js → chunk-B7IUFV5P.js} +2 -2
- package/dist/chunks/{chunk-IF6GA273.js → chunk-BGIGZUFG.js} +1 -1
- package/dist/chunks/{chunk-YLLFLPNA.js → chunk-BHL2HM6I.js} +1 -1
- package/dist/chunks/{chunk-YIOMTAUF.js → chunk-BKFRN6C2.js} +1 -1
- package/dist/chunks/chunk-BS32OUOC.js +7 -0
- package/dist/chunks/{chunk-YJNMDXEG.js → chunk-BUBVZ6SQ.js} +1 -1
- package/dist/chunks/{chunk-VZ4URN3U.js → chunk-BYBELFCP.js} +1 -1
- package/dist/chunks/{chunk-B7GCRM5I.js → chunk-BYYNR34Q.js} +1 -1
- package/dist/chunks/{chunk-5TMHRECT.js → chunk-CAJ2OUSR.js} +1 -1
- package/dist/chunks/chunk-CDJ25IKC.js +7 -0
- package/dist/chunks/chunk-CJMNUD2I.js +12 -0
- package/dist/chunks/chunk-CSNP5RIM.js +11 -0
- package/dist/chunks/{chunk-REJLEESP.js → chunk-CTMTO2W4.js} +1 -1
- package/dist/chunks/{chunk-K3MGQQEP.js → chunk-D5JQZXL7.js} +1 -1
- package/dist/chunks/{chunk-6PDKIOAO.js → chunk-DEFA6XAB.js} +1 -1
- package/dist/chunks/{chunk-OE26EQSH.js → chunk-DEX4QU4S.js} +1 -1
- package/dist/chunks/{chunk-W2L24GM7.js → chunk-DMA77UYG.js} +1 -1
- package/dist/chunks/{chunk-LM3YPF3K.js → chunk-DOOBZO4W.js} +1 -1
- package/dist/chunks/chunk-DORCX7UB.js +7 -0
- package/dist/chunks/{chunk-C335SWOB.js → chunk-DUSMVY4N.js} +1 -1
- package/dist/chunks/{chunk-XDYVJWGX.js → chunk-E5A7E7X6.js} +1 -1
- package/dist/chunks/{chunk-GLCSWIB4.js → chunk-E7IN2DGU.js} +1 -1
- package/dist/chunks/chunk-EYRBV6RM.js +25 -0
- package/dist/chunks/{chunk-AKOYIH3A.js → chunk-F4KY2TOK.js} +1 -1
- package/dist/chunks/{chunk-DZ77BIEV.js → chunk-F4ZKTFQH.js} +1 -1
- package/dist/chunks/chunk-F7X6O4ZC.js +7 -0
- package/dist/chunks/{chunk-TSNRTRIM.js → chunk-FB37TFVF.js} +1 -1
- package/dist/chunks/{chunk-BCAI7MED.js → chunk-FGWYM3SF.js} +1 -1
- package/dist/chunks/{chunk-SYVWRGFQ.js → chunk-FGXULLNK.js} +1 -1
- package/dist/chunks/{chunk-T7GKQYWA.js → chunk-FXLZM6Q7.js} +1 -1
- package/dist/chunks/{chunk-JBYROCAC.js → chunk-FYM5EUNW.js} +1 -1
- package/dist/chunks/{chunk-RVIJRFVD.js → chunk-G24EKATW.js} +1 -1
- package/dist/chunks/chunk-GQXKF3PR.js +7 -0
- package/dist/chunks/{chunk-2G2SALNN.js → chunk-H2QMSLKJ.js} +1 -1
- package/dist/chunks/{chunk-33HVDSWP.js → chunk-HMJR6RVF.js} +1 -1
- package/dist/chunks/{chunk-S4AANAHX.js → chunk-HQ3ZFXXQ.js} +1 -1
- package/dist/chunks/chunk-HYGWJQN6.js +8 -0
- package/dist/chunks/chunk-I4O53MKV.js +8 -0
- package/dist/chunks/{chunk-TOTTVS5P.js → chunk-ID663OJ7.js} +1 -1
- package/dist/chunks/{chunk-FFN3EGSF.js → chunk-IKNAOU5O.js} +1 -1
- package/dist/chunks/{chunk-CINNNQDJ.js → chunk-INIZJZ3O.js} +1 -1
- package/dist/chunks/{chunk-LNZEYUEC.js → chunk-IVZNPSHU.js} +1 -1
- package/dist/chunks/{chunk-YOAQNRBN.js → chunk-IY7OKDHU.js} +3 -3
- package/dist/chunks/{chunk-2D5PTFAY.js → chunk-J7POLUHY.js} +1 -1
- package/dist/chunks/{chunk-6CJFPT4F.js → chunk-JDDPCL3K.js} +1 -1
- package/dist/chunks/chunk-JR25PLC7.js +13 -0
- package/dist/chunks/chunk-JV3YIOCO.js +7 -0
- package/dist/chunks/{chunk-RBW62SOU.js → chunk-JXE7GYE3.js} +1 -1
- package/dist/chunks/{chunk-EFP3LK4G.js → chunk-K5SM5NIY.js} +1 -1
- package/dist/chunks/chunk-K6KS5GZD.js +16 -0
- package/dist/chunks/chunk-K7TSWIKR.js +12 -0
- package/dist/chunks/{chunk-FEJD7MRH.js → chunk-KA2KG3SY.js} +1 -1
- package/dist/chunks/{chunk-GUGP6OY2.js → chunk-KFBA2MAV.js} +1 -1
- package/dist/chunks/{table-W6LOHWWF.js → chunk-KG526MHL.js} +1 -1
- package/dist/chunks/chunk-KHMNANEN.js +7 -0
- package/dist/chunks/chunk-KVXEYKIX.js +7 -0
- package/dist/chunks/{chunk-F37XFLFP.js → chunk-L3YEI2RW.js} +1 -1
- package/dist/chunks/{chunk-54FY6GJ5.js → chunk-L46V6VL3.js} +1 -1
- package/dist/chunks/chunk-LD25KYMI.js +30 -0
- package/dist/chunks/{chunk-ANIA2G6F.js → chunk-LDDXXDN5.js} +1 -1
- package/dist/chunks/{chunk-M7FED5YP.js → chunk-M2Q2DUHO.js} +1 -1
- package/dist/chunks/{chunk-5ZCSFPWG.js → chunk-MDRI27KN.js} +1 -1
- package/dist/chunks/{chunk-2AU6O6Z5.js → chunk-MJ77FDK2.js} +1 -1
- package/dist/chunks/{chunk-GHNHUSVK.js → chunk-MMMJO2M3.js} +1 -1
- package/dist/chunks/chunk-N4PID4SD.js +7 -0
- package/dist/chunks/chunk-N6MNUNZ4.js +37 -0
- package/dist/chunks/chunk-NMY2YZ6M.js +8 -0
- package/dist/chunks/{chunk-QRG24GJG.js → chunk-NOAZDAOU.js} +1 -1
- package/dist/chunks/{chunk-ZJNDLFZ7.js → chunk-OOPF73RV.js} +1 -1
- package/dist/chunks/{chunk-YRKW42CD.js → chunk-OQXHBPPS.js} +1 -1
- package/dist/chunks/{chunk-SQCVI2EG.js → chunk-OVWS4CFW.js} +1 -1
- package/dist/chunks/{chunk-WAFBTC45.js → chunk-PHPJS2G2.js} +1 -1
- package/dist/chunks/{chunk-TNQUCTJH.js → chunk-PPCZYUSO.js} +1 -1
- package/dist/chunks/chunk-PZL7NSDA.js +24 -0
- package/dist/chunks/{chunk-OISNKAC6.js → chunk-Q45SQL44.js} +2 -2
- package/dist/chunks/{chunk-XDWAUOFO.js → chunk-Q4XCBBWK.js} +1 -1
- package/dist/chunks/chunk-Q7HFUXJ4.js +10 -0
- package/dist/chunks/chunk-QFE3RPMA.js +19 -0
- package/dist/chunks/{chunk-L5PIUIUM.js → chunk-QFSIUMC6.js} +1 -1
- package/dist/chunks/{chunk-CSCUVSJM.js → chunk-QG5UBKDA.js} +1 -1
- package/dist/chunks/{chunk-KLYFOXYH.js → chunk-QGS3ERDZ.js} +3 -3
- package/dist/chunks/{chunk-3UZE566G.js → chunk-QSL6AG2B.js} +1 -1
- package/dist/chunks/chunk-QU74BFN2.js +10 -0
- package/dist/chunks/{chunk-ACN6DBTC.js → chunk-R3QHEJL6.js} +1 -1
- package/dist/chunks/{chunk-BDXK4TCN.js → chunk-RHFNVIFD.js} +1 -1
- package/dist/chunks/chunk-RPYIWRSN.js +7 -0
- package/dist/chunks/{chunk-AP6DZGTK.js → chunk-RYSO5U3E.js} +1 -1
- package/dist/chunks/{chunk-N6JHFCWC.js → chunk-S7Y24A5X.js} +1 -1
- package/dist/chunks/chunk-SGNDE4YS.js +7 -0
- package/dist/chunks/{chunk-OF32Z3UP.js → chunk-SHJ3XTD3.js} +1 -1
- package/dist/chunks/{chunk-R33HJGYA.js → chunk-SHL6BPBV.js} +1 -1
- package/dist/chunks/{chunk-GLIQ4KNY.js → chunk-SQ62IODX.js} +1 -1
- package/dist/chunks/{chunk-PIDEH4SJ.js → chunk-T44RB754.js} +1 -1
- package/dist/chunks/{chunk-DHKWTBF6.js → chunk-T4DOV5S4.js} +1 -1
- package/dist/chunks/chunk-T5JHWXS5.js +8 -0
- package/dist/chunks/{chunk-TJUZVODP.js → chunk-TLKBGAOL.js} +1 -1
- package/dist/chunks/{chunk-ZA5O22ZY.js → chunk-TOCPUQ6N.js} +1 -1
- package/dist/chunks/{chunk-CJZE7647.js → chunk-U5SZQUYO.js} +1 -1
- package/dist/chunks/chunk-UAS3WUFB.js +11 -0
- package/dist/chunks/chunk-VIOIR6II.js +7 -0
- package/dist/chunks/{chunk-3A3GU62R.js → chunk-VMRFCU6F.js} +1 -1
- package/dist/chunks/{chunk-Y77DXGGN.js → chunk-VQZ773A2.js} +1 -1
- package/dist/chunks/chunk-VWKA6RKB.js +7 -0
- package/dist/chunks/{chunk-FCTTEFC5.js → chunk-WAOS5OCB.js} +1 -1
- package/dist/chunks/chunk-WBEPIG4S.js +31 -0
- package/dist/chunks/{chunk-AFHZC47H.js → chunk-WBXM3W44.js} +1 -1
- package/dist/chunks/{chunk-MINTHN6C.js → chunk-WEL2Y6OH.js} +1 -1
- package/dist/chunks/{chunk-RDDIWY3O.js → chunk-WGU2IQPY.js} +3 -3
- package/dist/chunks/{chunk-DOMBKOLJ.js → chunk-WLD4SGKM.js} +1 -1
- package/dist/chunks/{chunk-6FYPSSL4.js → chunk-X6JQI64G.js} +1 -1
- package/dist/chunks/{chunk-L75A5BMY.js → chunk-X755TPX6.js} +1 -1
- package/dist/chunks/{chunk-QZKRVE44.js → chunk-XQZBXQZ2.js} +1 -1
- package/dist/chunks/{chunk-AB4WXRCO.js → chunk-Y3V4JYK6.js} +1 -1
- package/dist/chunks/{chunk-LKW6GVP2.js → chunk-Y4YBQUQM.js} +1 -1
- package/dist/chunks/{chunk-I5KIA2XV.js → chunk-YBAGKQXC.js} +1 -1
- package/dist/chunks/{chunk-3OZCZF4N.js → chunk-YFOBGEOW.js} +1 -1
- package/dist/chunks/{chunk-E4VPDMRQ.js → chunk-YJJCELMY.js} +1 -1
- package/dist/chunks/chunk-YLXXGQQQ.js +7 -0
- package/dist/chunks/{chunk-BMIYC2MH.js → chunk-YN3HZJXW.js} +1 -1
- package/dist/chunks/chunk-YNMTP26U.js +7 -0
- package/dist/chunks/chunk-YTSGFU5T.js +7 -0
- package/dist/chunks/{chunk-Z2PTPD6J.js → chunk-YTSUDTAK.js} +1 -1
- package/dist/chunks/{chunk-QZJOKECY.js → chunk-YYDI5Q5K.js} +2 -2
- package/dist/chunks/{chunk-DOBV3XLO.js → chunk-Z3YQZSU4.js} +1 -1
- package/dist/chunks/chunk-Z643WTC4.js +15 -0
- package/dist/chunks/{chunk-D2E4COIY.js → chunk-ZBZQEDZY.js} +1 -1
- package/dist/chunks/chunk-ZRFDZO7Y.js +7 -0
- package/dist/chunks/chunk-ZSEFELXB.js +23 -0
- package/dist/chunks/{chunk-UECFEOOH.js → chunk-ZXSZH7N5.js} +1 -1
- package/dist/chunks/clear-B3I7ZYEY.js +8 -0
- package/dist/chunks/cli-embedded-NR5F35LW.js +87 -0
- package/dist/chunks/compile-vercel-config-ZQMPTEM6.js +7 -0
- package/dist/chunks/config-4GZY5MR4.js +7 -0
- package/dist/chunks/config-ZY22VRFX.js +8 -0
- package/dist/chunks/config-validator.mjs +1 -1
- package/dist/chunks/{connect-git-provider-CIRRFPI2.js → connect-git-provider-WGKVFXW2.js} +1 -1
- package/dist/chunks/create-project-BTOHPKZB.js +7 -0
- package/dist/chunks/delete-K2HS7YCM.js +10 -0
- package/dist/chunks/delete-RVTGE4BU.js +9 -0
- package/dist/chunks/describe-5ZCOXUID.js +25 -0
- package/dist/chunks/detect-projects-AZXG6BRD.js +7 -0
- package/dist/chunks/detect-services-FLNYWWJS.js +7 -0
- package/dist/chunks/disable-AS6DQMHM.js +7 -0
- package/dist/chunks/discard-PYU5CG67.js +14 -0
- package/dist/chunks/edit-HSMIPVPN.js +9 -0
- package/dist/chunks/edit-RLRJSNZY.js +8 -0
- package/dist/chunks/enable-JPWR5EPC.js +7 -0
- package/dist/chunks/{engine-D8YAsQS_-WNPHYRQF.js → engine-C8wCzkw--PYVABGU4.js} +1 -1
- package/dist/chunks/esm-5GQXHN7C.js +9 -0
- package/dist/chunks/esm-FJCIOBBV.js +7 -0
- package/dist/chunks/{esm-FSME24KA.js → esm-IYH32MTQ.js} +1 -1
- package/dist/chunks/esm-LEQXRLFV.js +9 -0
- package/dist/chunks/esm-NHCCFW7Z.js +7 -0
- package/dist/chunks/esm-QQ3MUOW4.js +7 -0
- package/dist/chunks/esm-T655CG6O.js +7 -0
- package/dist/chunks/{exec-ALB7WFEF.js → exec-PCSP64LR.js} +1 -1
- package/dist/chunks/{export-TOSUN6JO.js → export-6WFWSAO4.js} +2 -3
- package/dist/chunks/future-QLQMHIPL.js +7 -0
- package/dist/chunks/generate-cert-for-deploy-JKVOVQ3B.js +7 -0
- package/dist/chunks/image-POIJ2G2Y.js +7 -0
- package/dist/chunks/import-builders-YF5MX6ZA.js +7 -0
- package/dist/chunks/{inspect-SX3QQUEQ.js → inspect-4CURZZPU.js} +1 -1
- package/dist/chunks/{inspect-DFYVVIJW.js → inspect-BAYMK22S.js} +1 -1
- package/dist/chunks/inspect-JTBMNWWI.js +13 -0
- package/dist/chunks/{inspect-GBH7FAW6.js → inspect-TBQRBTX3.js} +1 -1
- package/dist/chunks/inspect-W4WSFBOF.js +9 -0
- package/dist/chunks/{inspect-4Y2OD5MI.js → inspect-YKSWSH3T.js} +1 -1
- package/dist/chunks/{list-HD6KXAIG.js → list-E65OFWSS.js} +1 -1
- package/dist/chunks/list-EWYN3F4Y.js +12 -0
- package/dist/chunks/{list-MW2FV253.js → list-ZHES2WYK.js} +1 -1
- package/dist/chunks/{list-4RRL326Z.js → list-ZWJDFJNY.js} +1 -1
- package/dist/chunks/login-JAKNSTW3.js +9 -0
- package/dist/chunks/login-JRGX6HGZ.js +7 -0
- package/dist/chunks/logs-3DPLX3CB.js +7 -0
- package/dist/chunks/{ls-VFE7PE25.js → ls-5YLM3ICH.js} +1 -1
- package/dist/chunks/ls-6HPMZVYA.js +11 -0
- package/dist/chunks/{ls-RKOM46KV.js → ls-FWOTN6V6.js} +1 -1
- package/dist/chunks/{ls-I767MTW4.js → ls-MW3WIHH5.js} +1 -1
- package/dist/chunks/{ls-Q4WGEEBZ.js → ls-RAVFLQTQ.js} +1 -1
- package/dist/chunks/ls-SY2FW3WA.js +8 -0
- package/dist/chunks/{ls-TLEAYYXQ.js → ls-ZX5FNEK2.js} +1 -1
- package/dist/chunks/migrate-experimental-services-XYUCY2G6.js +7 -0
- package/dist/chunks/mutate-4KTZMM3X.js +9 -0
- package/dist/chunks/{native-self-update-JDTL3IBF.js → native-self-update-Q3EN6NZK.js} +1 -1
- package/dist/chunks/notifications-LBZ7KWGS.js +7 -0
- package/dist/chunks/open-PXLVSFII.js +7 -0
- package/dist/chunks/{openapi-NEYEIRF2.js → openapi-6RKKA6JG.js} +1 -1
- package/dist/chunks/permissions-DQ5AF6XL.js +7 -0
- package/dist/chunks/{plugin-offer-NPJAEILN.js → plugin-offer-VU3R572E.js} +1 -1
- package/dist/chunks/prompt-missing-credentials-AJH3HM36.js +7 -0
- package/dist/chunks/publish-QJJL3IHG.js +15 -0
- package/dist/chunks/pull-3PQHXMPB.js +7 -0
- package/dist/chunks/purchase-domain-if-available-IFCQ4QFP.js +7 -0
- package/dist/chunks/push-4VIQFKP3.js +7 -0
- package/dist/chunks/query-BQ4HYVQ7.js +7 -0
- package/dist/chunks/raw-query-VA6VVMR4.js +8 -0
- package/dist/chunks/reauthenticate-2SMCQQHF.js +7 -0
- package/dist/chunks/{remove-IEEZGRB2.js → remove-CSIMGLLS.js} +1 -1
- package/dist/chunks/reorder-ERRB7OJL.js +10 -0
- package/dist/chunks/reply-XCBWXFWS.js +9 -0
- package/dist/chunks/repo-root-DZ6WFHMP.js +7 -0
- package/dist/chunks/resolve-VWGZ632M.js +12 -0
- package/dist/chunks/resolve-agent-team-NWELD5FN.js +7 -0
- package/dist/chunks/{resolve-deployment-framework-preset-4TKUU6AH.js → resolve-deployment-framework-preset-BLMQLCIN.js} +1 -1
- package/dist/chunks/restore-SXZUZGZE.js +16 -0
- package/dist/chunks/rm-5TRC5YND.js +8 -0
- package/dist/chunks/rm-IQ33QTQ2.js +8 -0
- package/dist/chunks/rm-KURYLLD6.js +8 -0
- package/dist/chunks/rm-WCE3ISB2.js +8 -0
- package/dist/chunks/rm-XMWM76JA.js +8 -0
- package/dist/chunks/routes-SBMN6SDF.js +7 -0
- package/dist/chunks/rule-inspect-USW6K7Y7.js +8 -0
- package/dist/chunks/schema-2G5VJ7EY.js +14 -0
- package/dist/chunks/{schema-L5VCG6FJ.js → schema-LRRKG2KJ.js} +1 -1
- package/dist/chunks/select-org-JG6GRWTS.js +7 -0
- package/dist/chunks/{serving-aOQsBok0-OL36TMZU.js → serving-C1mhZQqH-73TMEGEB.js} +1 -1
- package/dist/chunks/set-4JTH62JO.js +7 -0
- package/dist/chunks/{set-6U4QIX7A.js → set-BS5KCRE4.js} +1 -1
- package/dist/chunks/setup-and-link-GY4O7UJP.js +7 -0
- package/dist/chunks/{skills-ZMFZGPQL.js → skills-SUGA6D3G.js} +4 -19
- package/dist/chunks/table-SCLK33K7.js +7 -0
- package/dist/chunks/tags-B7MKMQKJ.js +7 -0
- package/dist/chunks/{types-CVLZCTL2.js → types-YFDB4QZA.js} +1 -1
- package/dist/chunks/{update-A727QN7H.js → update-LWRCCEXG.js} +1 -1
- package/dist/chunks/usage-HABW5VJ7.js +15 -0
- package/dist/chunks/validate-config-LDOYJ4LL.js +7 -0
- package/dist/commands/build/index.js +1 -1
- package/dist/commands/deploy/index.js +28 -25
- package/dist/commands/dev/index.js +7 -7
- package/dist/commands/env/index.js +12 -11
- package/dist/commands/link/index.js +3 -3
- package/dist/commands/list/index.js +1 -1
- package/dist/commands/project/index.js +4 -4
- package/dist/commands/tunnel/index.js +1 -1
- package/dist/commands-account.js +18 -12
- package/dist/commands-ai.js +18 -11
- package/dist/commands-blob.js +6 -6
- package/dist/commands-core.js +34 -48
- package/dist/commands-deployments.js +12 -11
- package/dist/commands-flags.js +27 -22
- package/dist/commands-integrations.js +7 -10
- package/dist/commands-observability.js +38 -28
- package/dist/commands-routing.js +6 -7
- package/dist/help.js +1 -1
- package/dist/index.js +6 -6
- package/dist/internal-build-worker.js +1 -1
- package/dist/internal-build.js +1 -1
- package/dist/package.json +43 -43
- package/dist/version.mjs +1 -1
- package/package.json +44 -44
- package/dist/chunks/add-563RV6JX.js +0 -8
- package/dist/chunks/add-HRB6XY33.js +0 -8
- package/dist/chunks/add-IUTGTBA4.js +0 -8
- package/dist/chunks/build-OMIYCGMR.js +0 -7
- package/dist/chunks/chunk-2GBU6ULJ.js +0 -7
- package/dist/chunks/chunk-2RRZCRWX.js +0 -7
- package/dist/chunks/chunk-4SS6W6JK.js +0 -11
- package/dist/chunks/chunk-5J4E2W4F.js +0 -12
- package/dist/chunks/chunk-76DSBD4X.js +0 -7
- package/dist/chunks/chunk-7W565DJB.js +0 -8
- package/dist/chunks/chunk-AIXEVICT.js +0 -37
- package/dist/chunks/chunk-AM46JVVN.js +0 -7
- package/dist/chunks/chunk-BULSRTQE.js +0 -7
- package/dist/chunks/chunk-C35SG42R.js +0 -7
- package/dist/chunks/chunk-CFJBDBYH.js +0 -7
- package/dist/chunks/chunk-DDPH26ZO.js +0 -7
- package/dist/chunks/chunk-EAQAV7UZ.js +0 -8
- package/dist/chunks/chunk-EFFJUYYS.js +0 -31
- package/dist/chunks/chunk-GOI2VVI7.js +0 -19
- package/dist/chunks/chunk-GYUNOFDD.js +0 -10
- package/dist/chunks/chunk-H2KNSYPR.js +0 -16
- package/dist/chunks/chunk-KDCODXVL.js +0 -25
- package/dist/chunks/chunk-KMTHGHJV.js +0 -8
- package/dist/chunks/chunk-KQ6X77WP.js +0 -7
- package/dist/chunks/chunk-KRP4EMD2.js +0 -10
- package/dist/chunks/chunk-NLK7NGVP.js +0 -7
- package/dist/chunks/chunk-OCR5CRTH.js +0 -10
- package/dist/chunks/chunk-PKR32I2N.js +0 -30
- package/dist/chunks/chunk-QGHAD5A5.js +0 -12
- package/dist/chunks/chunk-SPVOJ3HW.js +0 -7
- package/dist/chunks/chunk-SXW2G4WD.js +0 -10
- package/dist/chunks/chunk-TC4E2TFA.js +0 -8
- package/dist/chunks/chunk-TUB3APDV.js +0 -7
- package/dist/chunks/chunk-UG3FZ5Q7.js +0 -7
- package/dist/chunks/chunk-VF7XWPXA.js +0 -7
- package/dist/chunks/chunk-VKVH7LHB.js +0 -7
- package/dist/chunks/chunk-VUUU4KDL.js +0 -7
- package/dist/chunks/chunk-W3ZH27MN.js +0 -13
- package/dist/chunks/chunk-X47GV5HM.js +0 -15
- package/dist/chunks/chunk-XBHAU2M3.js +0 -9
- package/dist/chunks/chunk-XR2J7PQN.js +0 -12
- package/dist/chunks/chunk-YI7NKOCU.js +0 -23
- package/dist/chunks/chunk-Z2KANBOU.js +0 -69
- package/dist/chunks/chunk-Z7WZVEPP.js +0 -7
- package/dist/chunks/clear-TH6G33QK.js +0 -8
- package/dist/chunks/cli-embedded-FD3CAPRY.js +0 -84
- package/dist/chunks/compile-vercel-config-24IXPM4W.js +0 -7
- package/dist/chunks/config-2SBML7OY.js +0 -8
- package/dist/chunks/config-BCKJNJPS.js +0 -7
- package/dist/chunks/create-project-I7UXVWIR.js +0 -7
- package/dist/chunks/delete-RGHXL4JH.js +0 -9
- package/dist/chunks/delete-ZV4SHUTR.js +0 -10
- package/dist/chunks/describe-442UUQIF.js +0 -25
- package/dist/chunks/detect-projects-NBZSMQ5C.js +0 -7
- package/dist/chunks/detect-services-CRZW6FKM.js +0 -7
- package/dist/chunks/disable-MYGA6HVS.js +0 -7
- package/dist/chunks/discard-I5TKYCDJ.js +0 -14
- package/dist/chunks/edit-KGCUTTOZ.js +0 -8
- package/dist/chunks/edit-ZRNGGRVL.js +0 -9
- package/dist/chunks/enable-NODSFDKF.js +0 -7
- package/dist/chunks/esm-CF5UHWPM.js +0 -7
- package/dist/chunks/esm-EYOXGOVF.js +0 -7
- package/dist/chunks/esm-IUATPKKB.js +0 -9
- package/dist/chunks/esm-L6OKDFWP.js +0 -7
- package/dist/chunks/esm-ORQC2ZSA.js +0 -7
- package/dist/chunks/esm-PYIZNQIK.js +0 -9
- package/dist/chunks/future-RXI2OW2C.js +0 -7
- package/dist/chunks/generate-cert-for-deploy-7BX47IPD.js +0 -7
- package/dist/chunks/image-6A2EJP4N.js +0 -7
- package/dist/chunks/import-builders-I4JB6BA6.js +0 -7
- package/dist/chunks/inspect-STKCC3MC.js +0 -9
- package/dist/chunks/inspect-VFUV7BDM.js +0 -13
- package/dist/chunks/list-6ENV2ZGG.js +0 -12
- package/dist/chunks/login-O6NLJ42W.js +0 -7
- package/dist/chunks/login-U5VDJURN.js +0 -9
- package/dist/chunks/logs-X3KGHA3J.js +0 -7
- package/dist/chunks/ls-HRSD6VNW.js +0 -8
- package/dist/chunks/ls-OLJMGFTV.js +0 -11
- package/dist/chunks/migrate-experimental-services-7ZYHE5WA.js +0 -7
- package/dist/chunks/mutate-BJXJON5E.js +0 -9
- package/dist/chunks/notifications-F3NRNUHQ.js +0 -7
- package/dist/chunks/open-JK42ZTLB.js +0 -7
- package/dist/chunks/permissions-3AQO3DCH.js +0 -7
- package/dist/chunks/prompt-missing-credentials-AHAH27TZ.js +0 -7
- package/dist/chunks/publish-7SCXBVZR.js +0 -15
- package/dist/chunks/pull-LAPD5XJG.js +0 -7
- package/dist/chunks/purchase-domain-if-available-7MI52MFD.js +0 -7
- package/dist/chunks/push-BCSGQBAM.js +0 -7
- package/dist/chunks/query-U72BDMAK.js +0 -7
- package/dist/chunks/raw-query-4UAW7M5Q.js +0 -8
- package/dist/chunks/reauthenticate-HGOLSK2M.js +0 -7
- package/dist/chunks/reorder-YL6L6IWC.js +0 -10
- package/dist/chunks/reply-7Y5TN5UV.js +0 -9
- package/dist/chunks/resolve-C62436YM.js +0 -12
- package/dist/chunks/resolve-agent-team-SR3ALPCH.js +0 -7
- package/dist/chunks/restore-Z63JM5CN.js +0 -16
- package/dist/chunks/rm-C6QSHEA2.js +0 -8
- package/dist/chunks/rm-DDKE62T7.js +0 -8
- package/dist/chunks/rm-IUB55CCM.js +0 -8
- package/dist/chunks/rm-NZX43GMQ.js +0 -8
- package/dist/chunks/rm-UBUI7JNY.js +0 -8
- package/dist/chunks/routes-TME3VYIF.js +0 -7
- package/dist/chunks/rule-inspect-KF4BLH4K.js +0 -8
- package/dist/chunks/schema-P7DFLXCG.js +0 -14
- package/dist/chunks/select-org-MBBMOUK2.js +0 -7
- package/dist/chunks/set-SCKMJ7LZ.js +0 -7
- package/dist/chunks/setup-and-link-5TPDTJIN.js +0 -7
- package/dist/chunks/tags-7M2EW6LU.js +0 -7
- package/dist/chunks/usage-HT5JXVAA.js +0 -13
- package/dist/chunks/validate-config-Q77XESW5.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{buildCommandWithGlobalFlags}from"./chunk-
|
|
7
|
+
import{buildCommandWithGlobalFlags}from"./chunk-CSNP5RIM.js";import{getCommandName,packageName}from"./chunk-B4KA3ZH2.js";function scopedBudgetCommand(client,owner,subcommand){return getCommandName(scopedBudgetSubcommand(client,owner,subcommand))}function scopedBudgetSubcommand(client,owner,subcommand){return buildCommandWithGlobalFlags(client.argv,owner.type==="organization"?subcommand:`--scope ${owner.slug} ${subcommand}`,packageName,{prependGlobalFlags:!0,excludeFlags:["--scope","-S","--team","-T"]}).slice(packageName.length+1)}export{scopedBudgetCommand};
|
|
@@ -0,0 +1,10 @@
|
|
|
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{require_balanced_match}from"./chunk-YTSGFU5T.js";import{__commonJS}from"./chunk-BZENIQ7N.js";var require_path=__commonJS({"../../node_modules/.pnpm/minimatch@5.0.1/node_modules/minimatch/lib/path.js"(exports,module){var isWindows=typeof process=="object"&&process&&process.platform==="win32";module.exports=isWindows?{sep:"\\"}:{sep:"/"}}});var require_brace_expansion=__commonJS({"../../node_modules/.pnpm/brace-expansion@2.1.1/node_modules/brace-expansion/index.js"(exports,module){var balanced=require_balanced_match();module.exports=expandTop;var escSlash="\0SLASH"+Math.random()+"\0",escOpen="\0OPEN"+Math.random()+"\0",escClose="\0CLOSE"+Math.random()+"\0",escComma="\0COMMA"+Math.random()+"\0",escPeriod="\0PERIOD"+Math.random()+"\0";function numeric(str){return parseInt(str,10)==str?parseInt(str,10):str.charCodeAt(0)}function escapeBraces(str){return str.split("\\\\").join(escSlash).split("\\{").join(escOpen).split("\\}").join(escClose).split("\\,").join(escComma).split("\\.").join(escPeriod)}function unescapeBraces(str){return str.split(escSlash).join("\\").split(escOpen).join("{").split(escClose).join("}").split(escComma).join(",").split(escPeriod).join(".")}function parseCommaParts(str){if(!str)return[""];var parts=[],m=balanced("{","}",str);if(!m)return str.split(",");var pre=m.pre,body=m.body,post=m.post,p=pre.split(",");p[p.length-1]+="{"+body+"}";var postParts=parseCommaParts(post);return post.length&&(p[p.length-1]+=postParts.shift(),p.push.apply(p,postParts)),parts.push.apply(parts,p),parts}function expandTop(str,options){if(!str)return[];options=options||{};var max=options.max==null?1/0:options.max;return str.substr(0,2)==="{}"&&(str="\\{\\}"+str.substr(2)),expand(escapeBraces(str),max,!0).map(unescapeBraces)}function embrace(str){return"{"+str+"}"}function isPadded(el){return/^-?0\d/.test(el)}function lte(i,y){return i<=y}function gte(i,y){return i>=y}function expand(str,max,isTop){var expansions=[],m=balanced("{","}",str);if(!m)return[str];var pre=m.pre,post=m.post.length?expand(m.post,max,!1):[""];if(/\$$/.test(m.pre))for(var k=0;k<post.length&&k<max;k++){var expansion=pre+"{"+m.body+"}"+post[k];expansions.push(expansion)}else{var isNumericSequence=/^-?\d+\.\.-?\d+(?:\.\.-?\d+)?$/.test(m.body),isAlphaSequence=/^[a-zA-Z]\.\.[a-zA-Z](?:\.\.-?\d+)?$/.test(m.body),isSequence=isNumericSequence||isAlphaSequence,isOptions=m.body.indexOf(",")>=0;if(!isSequence&&!isOptions)return m.post.match(/,(?!,).*\}/)?(str=m.pre+"{"+m.body+escClose+m.post,expand(str,max,!0)):[str];var n;if(isSequence)n=m.body.split(/\.\./);else if(n=parseCommaParts(m.body),n.length===1&&(n=expand(n[0],max,!1).map(embrace),n.length===1))return post.map(function(p){return m.pre+n[0]+p});var N;if(isSequence){var x=numeric(n[0]),y=numeric(n[1]),width=Math.max(n[0].length,n[1].length),incr=n.length==3?Math.max(Math.abs(numeric(n[2])),1):1,test=lte,reverse=y<x;reverse&&(incr*=-1,test=gte);var pad=n.some(isPadded);N=[];for(var i=x;test(i,y)&&N.length<max;i+=incr){var c;if(isAlphaSequence)c=String.fromCharCode(i),c==="\\"&&(c="");else if(c=String(i),pad){var need=width-c.length;if(need>0){var z=new Array(need+1).join("0");i<0?c="-"+z+c.slice(1):c=z+c}}N.push(c)}}else{N=[];for(var j=0;j<n.length;j++)N.push.apply(N,expand(n[j],max,!1))}for(var j=0;j<N.length;j++)for(var k=0;k<post.length&&expansions.length<max;k++){var expansion=pre+N[j]+post[k];(!isTop||isSequence||expansion)&&expansions.push(expansion)}}return expansions}}});var require_minimatch=__commonJS({"../../node_modules/.pnpm/minimatch@5.0.1/node_modules/minimatch/minimatch.js"(exports,module){var minimatch=module.exports=(p,pattern,options={})=>(assertValidPattern(pattern),!options.nocomment&&pattern.charAt(0)==="#"?!1:new Minimatch(pattern,options).match(p));module.exports=minimatch;var path=require_path();minimatch.sep=path.sep;var GLOBSTAR=Symbol("globstar **");minimatch.GLOBSTAR=GLOBSTAR;var expand=require_brace_expansion(),plTypes={"!":{open:"(?:(?!(?:",close:"))[^/]*?)"},"?":{open:"(?:",close:")?"},"+":{open:"(?:",close:")+"},"*":{open:"(?:",close:")*"},"@":{open:"(?:",close:")"}},qmark="[^/]",star=qmark+"*?",twoStarDot="(?:(?!(?:\\/|^)(?:\\.{1,2})($|\\/)).)*?",twoStarNoDot="(?:(?!(?:\\/|^)\\.).)*?",charSet=s=>s.split("").reduce((set,c)=>(set[c]=!0,set),{}),reSpecials=charSet("().*{}+?[]^$\\!"),addPatternStartSet=charSet("[.("),slashSplit=/\/+/;minimatch.filter=(pattern,options={})=>(p,i,list)=>minimatch(p,pattern,options);var ext=(a,b={})=>{let t={};return Object.keys(a).forEach(k=>t[k]=a[k]),Object.keys(b).forEach(k=>t[k]=b[k]),t};minimatch.defaults=def=>{if(!def||typeof def!="object"||!Object.keys(def).length)return minimatch;let orig=minimatch,m=(p,pattern,options)=>orig(p,pattern,ext(def,options));return m.Minimatch=class extends orig.Minimatch{constructor(pattern,options){super(pattern,ext(def,options))}},m.Minimatch.defaults=options=>orig.defaults(ext(def,options)).Minimatch,m.filter=(pattern,options)=>orig.filter(pattern,ext(def,options)),m.defaults=options=>orig.defaults(ext(def,options)),m.makeRe=(pattern,options)=>orig.makeRe(pattern,ext(def,options)),m.braceExpand=(pattern,options)=>orig.braceExpand(pattern,ext(def,options)),m.match=(list,pattern,options)=>orig.match(list,pattern,ext(def,options)),m};minimatch.braceExpand=(pattern,options)=>braceExpand(pattern,options);var braceExpand=(pattern,options={})=>(assertValidPattern(pattern),options.nobrace||!/\{(?:(?!\{).)*\}/.test(pattern)?[pattern]:expand(pattern)),MAX_PATTERN_LENGTH=1024*64,assertValidPattern=pattern=>{if(typeof pattern!="string")throw new TypeError("invalid pattern");if(pattern.length>MAX_PATTERN_LENGTH)throw new TypeError("pattern is too long")},SUBPARSE=Symbol("subparse");minimatch.makeRe=(pattern,options)=>new Minimatch(pattern,options||{}).makeRe();minimatch.match=(list,pattern,options={})=>{let mm=new Minimatch(pattern,options);return list=list.filter(f=>mm.match(f)),mm.options.nonull&&!list.length&&list.push(pattern),list};var globUnescape=s=>s.replace(/\\(.)/g,"$1"),regExpEscape=s=>s.replace(/[-[\]{}()*+?.,\\^$|#\s]/g,"\\$&"),Minimatch=class{constructor(pattern,options){assertValidPattern(pattern),options||(options={}),this.options=options,this.set=[],this.pattern=pattern,this.regexp=null,this.negate=!1,this.comment=!1,this.empty=!1,this.partial=!!options.partial,this.make()}debug(){}make(){let pattern=this.pattern,options=this.options;if(!options.nocomment&&pattern.charAt(0)==="#"){this.comment=!0;return}if(!pattern){this.empty=!0;return}this.parseNegate();let set=this.globSet=this.braceExpand();options.debug&&(this.debug=(...args)=>console.error(...args)),this.debug(this.pattern,set),set=this.globParts=set.map(s=>s.split(slashSplit)),this.debug(this.pattern,set),set=set.map((s,si,set2)=>s.map(this.parse,this)),this.debug(this.pattern,set),set=set.filter(s=>s.indexOf(!1)===-1),this.debug(this.pattern,set),this.set=set}parseNegate(){if(this.options.nonegate)return;let pattern=this.pattern,negate=!1,negateOffset=0;for(let i=0;i<pattern.length&&pattern.charAt(i)==="!";i++)negate=!negate,negateOffset++;negateOffset&&(this.pattern=pattern.substr(negateOffset)),this.negate=negate}matchOne(file,pattern,partial){var options=this.options;this.debug("matchOne",{this:this,file,pattern}),this.debug("matchOne",file.length,pattern.length);for(var fi=0,pi=0,fl=file.length,pl=pattern.length;fi<fl&&pi<pl;fi++,pi++){this.debug("matchOne loop");var p=pattern[pi],f=file[fi];if(this.debug(pattern,p,f),p===!1)return!1;if(p===GLOBSTAR){this.debug("GLOBSTAR",[pattern,p,f]);var fr=fi,pr=pi+1;if(pr===pl){for(this.debug("** at the end");fi<fl;fi++)if(file[fi]==="."||file[fi]===".."||!options.dot&&file[fi].charAt(0)===".")return!1;return!0}for(;fr<fl;){var swallowee=file[fr];if(this.debug(`
|
|
8
|
+
globstar while`,file,fr,pattern,pr,swallowee),this.matchOne(file.slice(fr),pattern.slice(pr),partial))return this.debug("globstar found match!",fr,fl,swallowee),!0;if(swallowee==="."||swallowee===".."||!options.dot&&swallowee.charAt(0)==="."){this.debug("dot detected!",file,fr,pattern,pr);break}this.debug("globstar swallow a segment, and continue"),fr++}return!!(partial&&(this.debug(`
|
|
9
|
+
>>> no match, partial?`,file,fr,pattern,pr),fr===fl))}var hit;if(typeof p=="string"?(hit=f===p,this.debug("string match",p,f,hit)):(hit=f.match(p),this.debug("pattern match",p,f,hit)),!hit)return!1}if(fi===fl&&pi===pl)return!0;if(fi===fl)return partial;if(pi===pl)return fi===fl-1&&file[fi]==="";throw new Error("wtf?")}braceExpand(){return braceExpand(this.pattern,this.options)}parse(pattern,isSub){assertValidPattern(pattern);let options=this.options;if(pattern==="**")if(options.noglobstar)pattern="*";else return GLOBSTAR;if(pattern==="")return"";let re="",hasMagic=!!options.nocase,escaping=!1,patternListStack=[],negativeLists=[],stateChar,inClass=!1,reClassStart=-1,classStart=-1,cs,pl,sp,patternStart=pattern.charAt(0)==="."?"":options.dot?"(?!(?:^|\\/)\\.{1,2}(?:$|\\/))":"(?!\\.)",clearStateChar=()=>{if(stateChar){switch(stateChar){case"*":re+=star,hasMagic=!0;break;case"?":re+=qmark,hasMagic=!0;break;default:re+="\\"+stateChar;break}this.debug("clearStateChar %j %j",stateChar,re),stateChar=!1}};for(let i=0,c;i<pattern.length&&(c=pattern.charAt(i));i++){if(this.debug("%s %s %s %j",pattern,i,re,c),escaping){if(c==="/")return!1;reSpecials[c]&&(re+="\\"),re+=c,escaping=!1;continue}switch(c){case"/":return!1;case"\\":clearStateChar(),escaping=!0;continue;case"?":case"*":case"+":case"@":case"!":if(this.debug("%s %s %s %j <-- stateChar",pattern,i,re,c),inClass){this.debug(" in class"),c==="!"&&i===classStart+1&&(c="^"),re+=c;continue}this.debug("call clearStateChar %j",stateChar),clearStateChar(),stateChar=c,options.noext&&clearStateChar();continue;case"(":if(inClass){re+="(";continue}if(!stateChar){re+="\\(";continue}patternListStack.push({type:stateChar,start:i-1,reStart:re.length,open:plTypes[stateChar].open,close:plTypes[stateChar].close}),re+=stateChar==="!"?"(?:(?!(?:":"(?:",this.debug("plType %j %j",stateChar,re),stateChar=!1;continue;case")":if(inClass||!patternListStack.length){re+="\\)";continue}clearStateChar(),hasMagic=!0,pl=patternListStack.pop(),re+=pl.close,pl.type==="!"&&negativeLists.push(pl),pl.reEnd=re.length;continue;case"|":if(inClass||!patternListStack.length){re+="\\|";continue}clearStateChar(),re+="|";continue;case"[":if(clearStateChar(),inClass){re+="\\"+c;continue}inClass=!0,classStart=i,reClassStart=re.length,re+=c;continue;case"]":if(i===classStart+1||!inClass){re+="\\"+c;continue}cs=pattern.substring(classStart+1,i);try{RegExp("["+cs+"]")}catch{sp=this.parse(cs,SUBPARSE),re=re.substr(0,reClassStart)+"\\["+sp[0]+"\\]",hasMagic=hasMagic||sp[1],inClass=!1;continue}hasMagic=!0,inClass=!1,re+=c;continue;default:clearStateChar(),reSpecials[c]&&!(c==="^"&&inClass)&&(re+="\\"),re+=c;break}}for(inClass&&(cs=pattern.substr(classStart+1),sp=this.parse(cs,SUBPARSE),re=re.substr(0,reClassStart)+"\\["+sp[0],hasMagic=hasMagic||sp[1]),pl=patternListStack.pop();pl;pl=patternListStack.pop()){let tail;tail=re.slice(pl.reStart+pl.open.length),this.debug("setting tail",re,pl),tail=tail.replace(/((?:\\{2}){0,64})(\\?)\|/g,(_,$1,$2)=>($2||($2="\\"),$1+$1+$2+"|")),this.debug(`tail=%j
|
|
10
|
+
%s`,tail,tail,pl,re);let t=pl.type==="*"?star:pl.type==="?"?qmark:"\\"+pl.type;hasMagic=!0,re=re.slice(0,pl.reStart)+t+"\\("+tail}clearStateChar(),escaping&&(re+="\\\\");let addPatternStart=addPatternStartSet[re.charAt(0)];for(let n=negativeLists.length-1;n>-1;n--){let nl=negativeLists[n],nlBefore=re.slice(0,nl.reStart),nlFirst=re.slice(nl.reStart,nl.reEnd-8),nlAfter=re.slice(nl.reEnd),nlLast=re.slice(nl.reEnd-8,nl.reEnd)+nlAfter,openParensBefore=nlBefore.split("(").length-1,cleanAfter=nlAfter;for(let i=0;i<openParensBefore;i++)cleanAfter=cleanAfter.replace(/\)[+*?]?/,"");nlAfter=cleanAfter;let dollar=nlAfter===""&&isSub!==SUBPARSE?"$":"";re=nlBefore+nlFirst+nlAfter+dollar+nlLast}if(re!==""&&hasMagic&&(re="(?=.)"+re),addPatternStart&&(re=patternStart+re),isSub===SUBPARSE)return[re,hasMagic];if(!hasMagic)return globUnescape(pattern);let flags=options.nocase?"i":"";try{return Object.assign(new RegExp("^"+re+"$",flags),{_glob:pattern,_src:re})}catch{return new RegExp("$.")}}makeRe(){if(this.regexp||this.regexp===!1)return this.regexp;let set=this.set;if(!set.length)return this.regexp=!1,this.regexp;let options=this.options,twoStar=options.noglobstar?star:options.dot?twoStarDot:twoStarNoDot,flags=options.nocase?"i":"",re=set.map(pattern=>(pattern=pattern.map(p=>typeof p=="string"?regExpEscape(p):p===GLOBSTAR?GLOBSTAR:p._src).reduce((set2,p)=>(set2[set2.length-1]===GLOBSTAR&&p===GLOBSTAR||set2.push(p),set2),[]),pattern.forEach((p,i)=>{p!==GLOBSTAR||pattern[i-1]===GLOBSTAR||(i===0?pattern.length>1?pattern[i+1]="(?:\\/|"+twoStar+"\\/)?"+pattern[i+1]:pattern[i]=twoStar:i===pattern.length-1?pattern[i-1]+="(?:\\/|"+twoStar+")?":(pattern[i-1]+="(?:\\/|\\/"+twoStar+"\\/)"+pattern[i+1],pattern[i+1]=GLOBSTAR))}),pattern.filter(p=>p!==GLOBSTAR).join("/"))).join("|");re="^(?:"+re+")$",this.negate&&(re="^(?!"+re+").*$");try{this.regexp=new RegExp(re,flags)}catch{this.regexp=!1}return this.regexp}match(f,partial=this.partial){if(this.debug("match",f,this.pattern),this.comment)return!1;if(this.empty)return f==="";if(f==="/"&&partial)return!0;let options=this.options;path.sep!=="/"&&(f=f.split(path.sep).join("/")),f=f.split(slashSplit),this.debug(this.pattern,"split",f);let set=this.set;this.debug(this.pattern,"set",set);let filename;for(let i=f.length-1;i>=0&&(filename=f[i],!filename);i--);for(let i=0;i<set.length;i++){let pattern=set[i],file=f;if(options.matchBase&&pattern.length===1&&(file=[filename]),this.matchOne(file,pattern,partial))return options.flipNegate?!0:!this.negate}return options.flipNegate?!1:this.negate}static defaults(def){return minimatch.defaults(def).Minimatch}};minimatch.Minimatch=Minimatch}});export{require_minimatch};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{packageName}from"./chunk-B4KA3ZH2.js";import{formatOption,gitBranchOption,jsonOption,limitOption,nextCursorOption,projectOption,yesOption}from"./chunk-
|
|
7
|
+
import{packageName}from"./chunk-B4KA3ZH2.js";import{formatOption,gitBranchOption,jsonOption,limitOption,nextCursorOption,projectOption,yesOption}from"./chunk-DORCX7UB.js";var commentsProjectOption={...projectOption,shorthand:"p",description:"Project ID or name (default: linked project)"},messageContentOption={name:"message",shorthand:null,deprecatedShorthand:"m",type:String,argument:"TEXT",deprecated:!1,description:"Markdown message content"},fileOption={name:"file",shorthand:null,type:String,argument:"PATH",deprecated:!1,description:"Read Markdown content from a file; use `-` for stdin"},attachOption={name:"attach",shorthand:null,type:[String],argument:"URL",deprecated:!1,description:"Attach a file by https URL (repeatable, max 10)"},listSubcommand={name:"list",aliases:["ls"],default:!0,description:"List comments for a project",arguments:[],options:[commentsProjectOption,{...gitBranchOption,type:[String],description:"Filter by Git branch (repeatable) (default: the current branch when inferable)"},{name:"branch",shorthand:null,type:[String],argument:"BRANCH",deprecated:!0,description:"Deprecated alias for `--git-branch`"},{name:"all-branches",shorthand:null,type:Boolean,deprecated:!1,description:"Show comments from every branch"},{name:"status",shorthand:null,type:String,argument:"STATUS",deprecated:!1,description:"unresolved, resolved, or all (default: unresolved)"},{name:"page-path",shorthand:null,type:[String],argument:"PATH",deprecated:!1,description:"Filter by recorded page path or glob (repeatable). Note: rewrites may record a different path than the browser URL"},{name:"page",shorthand:null,type:[String],argument:"PATH",deprecated:!0,description:"Filter by recorded page path or glob"},{name:"author",shorthand:null,type:[String],argument:"USER",deprecated:!1,description:"Filter by author user ID, or `me` (repeatable)"},{name:"content",shorthand:null,type:[String],argument:"CONTENT",deprecated:!1,description:"Filter by CMS content ID (repeatable)"},{name:"content-id",shorthand:null,type:[String],argument:"ID",deprecated:!0,description:"Deprecated alias for `--content`"},{name:"query",shorthand:"q",type:String,argument:"TEXT",deprecated:!1,description:"Search comment content"},{name:"search",shorthand:null,type:String,argument:"TEXT",deprecated:!0,description:"Deprecated alias for `--query`"},limitOption,nextCursorOption,formatOption,jsonOption],examples:[{name:"List unresolved comments for the linked project",value:`${packageName} comments`},{name:"List comments on every branch",value:`${packageName} comments --all-branches --status all`},{name:"List comments as JSON",value:`${packageName} comments --json | jq '.threads[].id'`}]},inspectSubcommand={name:"inspect",aliases:["get"],description:"Show a comment thread with its full conversation",arguments:[{name:"thread",required:!1}],options:[commentsProjectOption,{name:"context",shorthand:null,type:Boolean,deprecated:!1,description:"Include framework and device context"},formatOption,jsonOption],examples:[{name:"Inspect a comment thread",value:`${packageName} comments inspect icZ9BnPPINuK`},{name:"Inspect a comment from its URL",value:`${packageName} comments inspect https://vercel.com/team/project/c/icZ9BnPPINuK`},{name:"Pick a comment interactively",value:`${packageName} comments inspect`},{name:"Inspect a thread whose ID starts with a dash",value:`${packageName} comments inspect -- -ULOL`}]},openSubcommand={name:"open",aliases:[],description:"Open a comment thread on vercel.com",arguments:[{name:"thread",required:!0}],options:[commentsProjectOption],examples:[{name:"Open a comment in the browser",value:`${packageName} comments open icZ9BnPPINuK`}]},replySubcommand={name:"reply",aliases:[],description:"Reply to a comment thread",arguments:[{name:"thread",required:!0}],options:[commentsProjectOption,messageContentOption,fileOption,attachOption,formatOption,jsonOption],examples:[{name:"Reply to a comment",value:`${packageName} comments reply icZ9BnPPINuK --message 'Fixed in **main**.'`},{name:"Reply from stdin",value:`git log -1 --format=%s | ${packageName} comments reply icZ9BnPPINuK`}]},resolveSubcommand={name:"resolve",aliases:[],description:"Resolve comment threads, optionally with a closing reply",arguments:[{name:"thread",required:!0,multiple:!0}],options:[commentsProjectOption,messageContentOption,yesOption,formatOption,jsonOption],examples:[{name:"Resolve a comment",value:`${packageName} comments resolve icZ9BnPPINuK`},{name:"Reply and resolve in one step",value:`${packageName} comments resolve icZ9BnPPINuK --message 'Fixed in the latest deployment'`}]},reopenSubcommand={name:"reopen",aliases:[],description:"Reopen resolved comment threads",arguments:[{name:"thread",required:!0,multiple:!0}],options:[commentsProjectOption,yesOption,formatOption,jsonOption],examples:[{name:"Reopen a comment",value:`${packageName} comments reopen icZ9BnPPINuK`}]},editSubcommand={name:"update",aliases:["edit"],description:"Update a comment message while preserving its attachments",arguments:[{name:"thread",required:!0},{name:"message-id",required:!0}],options:[commentsProjectOption,messageContentOption,fileOption,formatOption,jsonOption],examples:[{name:"Update a message",value:`${packageName} comments update icZ9BnPPINuK VvkhYF6dTqbpm7K --message 'Updated wording'`}]},deleteSubcommand={name:"delete",aliases:["rm","del"],description:"Delete a comment message",arguments:[{name:"thread",required:!0},{name:"message-id",required:!0}],options:[commentsProjectOption,yesOption,formatOption,jsonOption],examples:[{name:"Delete a message",value:`${packageName} comments delete icZ9BnPPINuK VvkhYF6dTqbpm7K`}]},commentsCommand={name:"comments",aliases:[],description:"Review and act on Vercel Toolbar comments from the command line",arguments:[],subcommands:[listSubcommand,inspectSubcommand,openSubcommand,replySubcommand,resolveSubcommand,reopenSubcommand,editSubcommand,deleteSubcommand],options:[],examples:[{name:"Review unresolved comments for the linked project",value:`${packageName} comments`},{name:"Inspect a comment and reply",value:`${packageName} comments inspect icZ9BnPPINuK`},{name:"Reply and resolve in one step",value:`${packageName} comments resolve icZ9BnPPINuK --message 'Fixed!'`}]};export{listSubcommand,inspectSubcommand,openSubcommand,replySubcommand,resolveSubcommand,reopenSubcommand,editSubcommand,deleteSubcommand,commentsCommand};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{require_dist}from"./chunk-
|
|
7
|
+
import{require_dist}from"./chunk-7AAYWDIZ.js";import{__commonJS}from"./chunk-BZENIQ7N.js";var require_dist2=__commonJS({"../service-topology/dist/index.js"(exports,module){"use strict";var __defProp=Object.defineProperty,__getOwnPropDesc=Object.getOwnPropertyDescriptor,__getOwnPropNames=Object.getOwnPropertyNames,__hasOwnProp=Object.prototype.hasOwnProperty,__export=(target,all)=>{for(var name in all)__defProp(target,name,{get:all[name],enumerable:!0})},__copyProps=(to,from,except,desc)=>{if(from&&typeof from=="object"||typeof from=="function")for(let key of __getOwnPropNames(from))!__hasOwnProp.call(to,key)&&key!==except&&__defProp(to,key,{get:()=>from[key],enumerable:!(desc=__getOwnPropDesc(from,key))||desc.enumerable});return to},__toCommonJS=mod=>__copyProps(__defProp({},"__esModule",{value:!0}),mod),src_exports={};__export(src_exports,{INTERNAL_SERVICE_PREFIX:()=>import_fs_detectors.INTERNAL_SERVICE_PREFIX,autoDetectServices:()=>import_fs_detectors.autoDetectServices,detectDaemons:()=>import_fs_detectors.detectDaemons,detectServices:()=>import_fs_detectors.detectServices,generateServiceRewrites:()=>import_fs_detectors.generateServiceRewrites,generateServicesRoutes:()=>import_fs_detectors.generateServicesRoutes,getInternalServiceCronPath:()=>import_fs_detectors.getInternalServiceCronPath,getInternalServiceCronPathPrefix:()=>import_fs_detectors.getInternalServiceCronPathPrefix,getInternalServiceFunctionPath:()=>import_fs_detectors.getInternalServiceFunctionPath,getInternalServiceWorkerPath:()=>import_fs_detectors.getInternalServiceWorkerPath,getInternalServiceWorkerPathPrefix:()=>import_fs_detectors.getInternalServiceWorkerPathPrefix,hasLegacyServicesConfig:()=>import_fs_detectors.hasLegacyServicesConfig,isExperimentalService:()=>import_fs_detectors.isExperimentalService,isExperimentalServiceV2:()=>import_fs_detectors.isExperimentalServiceV2,isRouteOwningBuilder:()=>import_fs_detectors.isRouteOwningBuilder,isStaticBuild:()=>import_fs_detectors.isStaticBuild,migrateExperimentalServices:()=>import_fs_detectors.migrateExperimentalServices,planExperimentalServicesMigration:()=>import_fs_detectors.planExperimentalServicesMigration,resolveAllConfiguredServices:()=>import_fs_detectors.resolveAllConfiguredServices,resolveAllConfiguredServicesV2:()=>import_fs_detectors.resolveAllConfiguredServicesV2,resolveConfiguredServiceV2:()=>import_fs_detectors.resolveConfiguredServiceV2,validateServiceConfigV2:()=>import_fs_detectors.validateServiceConfigV2});module.exports=__toCommonJS(src_exports);var import_fs_detectors=require_dist()}});export{require_dist2 as require_dist};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{packageName}from"./chunk-B4KA3ZH2.js";import{formatOption,jsonOption}from"./chunk-
|
|
7
|
+
import{packageName}from"./chunk-B4KA3ZH2.js";import{formatOption,jsonOption}from"./chunk-DORCX7UB.js";var listSubcommand={name:"list",aliases:["ls"],description:"List all available API endpoints",arguments:[],options:[formatOption,jsonOption,{name:"refresh",shorthand:null,type:Boolean,deprecated:!1,description:"Force refresh the cached OpenAPI spec"}],examples:[{name:"List all endpoints in table format",value:`${packageName} api list`},{name:"List all endpoints as JSON",value:`${packageName} api list --json`}]},apiCommand={name:"api",aliases:[],description:"Make authenticated HTTP requests to the Vercel API",arguments:[{name:"endpoint",required:!1}],subcommands:[listSubcommand],options:[{name:"method",shorthand:"X",type:String,argument:"METHOD",deprecated:!1,description:"HTTP method (GET, POST, PUT, PATCH, DELETE) (default: GET, or POST if body is provided)"},{name:"field",shorthand:"F",type:[String],argument:"KEY=VALUE",deprecated:!1,description:"Add a typed parameter (numbers, booleans parsed). Use @file for file contents"},{name:"raw-field",shorthand:"f",type:[String],argument:"KEY=VALUE",deprecated:!1,description:"Add a string option (no type parsing)"},{name:"header",shorthand:"H",type:[String],argument:"KEY:VALUE",deprecated:!1,description:"Add a custom HTTP header"},{name:"input",shorthand:null,type:String,argument:"FILE",deprecated:!1,description:"Read request body from file (use - for stdin)"},{name:"paginate",shorthand:null,type:Boolean,deprecated:!1,description:"Fetch all pages of results"},{name:"include",shorthand:"i",type:Boolean,deprecated:!1,description:"Include response headers in output"},{name:"silent",shorthand:null,type:Boolean,deprecated:!1,description:"Suppress response output"},{name:"verbose",shorthand:null,type:Boolean,deprecated:!1,description:"Show debug information including full request/response"},{name:"raw",shorthand:null,type:Boolean,deprecated:!1,description:"Output raw JSON without pretty-printing (default: on when output is piped)"},{name:"refresh",shorthand:null,type:Boolean,deprecated:!1,description:"Force refresh the cached OpenAPI spec"},{name:"generate",shorthand:null,type:String,argument:"FORMAT",deprecated:!1,description:"Generate output instead of executing (e.g., --generate=curl)"},{name:"dangerously-skip-permissions",shorthand:null,type:Boolean,deprecated:!1,description:"Skip confirmation prompts for DELETE operations (use with caution)"}],examples:[{name:"Get current user information",value:`${packageName} api /v2/user`},{name:"List projects with team scope",value:`${packageName} api /v9/projects --scope my-team`},{name:"Create a new project",value:`${packageName} api /v10/projects -X POST -F name=my-project`},{name:"Delete a deployment",value:`${packageName} api /v13/deployments/dpl_abc123 -X DELETE`},{name:"Paginate through all deployments",value:`${packageName} api /v6/deployments --paginate`},{name:"Post JSON from file",value:`${packageName} api /v10/projects -X POST --input config.json`},{name:"Add custom header",value:`${packageName} api /v2/user -H "X-Custom-Header: value"`},{name:"Interactive mode (select endpoint)",value:`${packageName} api`}]};export{listSubcommand,apiCommand};
|
|
@@ -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{packageName}from"./chunk-B4KA3ZH2.js";import{output_manager_default}from"./chunk-
|
|
8
|
-
${
|
|
7
|
+
import{packageName}from"./chunk-B4KA3ZH2.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{normalizeFlagName,stripSensitiveAuthArgs}from"./chunk-DORCX7UB.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var DEFAULT_LIST_LIMIT=20,MAX_LIST_LIMIT=100;function parseListLimit(value,{defaultLimit=DEFAULT_LIST_LIMIT,maxLimit=MAX_LIST_LIMIT}={}){if(value===void 0)return defaultLimit;if(!Number.isInteger(value)||value<1||value>maxLimit)throw new Error(`The --limit option must be an integer from 1 to ${maxLimit}.`);return value}var PaginationError=class extends Error{constructor(message){super(message),this.name="PaginationError"}};async function fetchAllPages(fetchPage,{maxPages=1e3}={}){let items=[],seen=new Set,next;for(let pages=0;pages<maxPages;pages++){let page=await fetchPage(next);if(items.push(...page.items),!page.next)return items;if(seen.has(page.next))throw new PaginationError("Pagination returned a cursor it already returned. The list is incomplete.");seen.add(page.next),next=page.next}throw new PaginationError(`Stopped after ${maxPages} pages. The list is incomplete. Use --limit and --next to page through it manually.`)}var CURSOR_FLAGS=["--next","-N"];function quoteShellArg(value){return/^[A-Za-z0-9_./@:,=+-]+$/.test(value)?value:`'${value.replace(/'/g,"'\\''")}'`}function splitInvocation(argv,dropFlags,clusterLetters){let args=stripSensitiveAuthArgs(argv.slice(2)),delimiter=args.indexOf("--"),own=delimiter===-1?args:args.slice(0,delimiter),passthrough=delimiter===-1?[]:args.slice(delimiter),letters=new RegExp(`[${clusterLetters}]`,"g"),kept=[];for(let i=0;i<own.length;i++){let arg=own[i];if(dropFlags.includes(normalizeFlagName(arg))){!arg.includes("=")&&i+1<own.length&&i++;continue}if(/^-[A-Za-z]{2,}$/.test(arg)&&arg.search(letters)!==-1){kept.push(arg.replace(letters,"")),i+1<own.length&&i++;continue}kept.push(arg)}return{kept,passthrough}}function getNextPageCommand(argv,next,dropFlags=[]){let{kept,passthrough}=splitInvocation(argv,[...CURSOR_FLAGS,...dropFlags],"N");return kept.push(`--next=${next}`,...passthrough),`${packageName} ${kept.map(quoteShellArg).join(" ")}`}function getCommandFromArgv(argv,added=[],dropFlags=[]){let drop=[...CURSOR_FLAGS,...dropFlags],{kept,passthrough}=splitInvocation(argv,drop,drop.filter(flag=>/^-[A-Za-z]$/.test(flag)).map(flag=>flag[1]).join("")),args=[...kept,...added,...passthrough],shown=args.map(arg=>added.includes(arg)&&/^<[A-Z_]+>$/.test(arg)?arg:quoteShellArg(arg));return{command:[packageName,...shown].join(" "),argv:[packageName,...args]}}function printNextPageCommand(command,label="Next page",options){let rendered=options?.template?command:import_chalk.default.cyan(command);output_manager_default.print(` ${label}:
|
|
8
|
+
${rendered}
|
|
9
9
|
`)}function printNextPageHint(client,next,dropFlags=[]){next&&(output_manager_default.print(`
|
|
10
10
|
`),printNextPageCommand(getNextPageCommand(client.argv,next,dropFlags)))}export{DEFAULT_LIST_LIMIT,MAX_LIST_LIMIT,parseListLimit,PaginationError,fetchAllPages,quoteShellArg,getNextPageCommand,getCommandFromArgv,printNextPageCommand,printNextPageHint};
|
|
@@ -4,6 +4,6 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{output_manager_default}from"./chunk-
|
|
7
|
+
import{output_manager_default}from"./chunk-RYSO5U3E.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);function suggestNextCommands(commands){output_manager_default.print(import_chalk.default.dim(["Next steps:",...commands.flatMap(({command,description})=>[`- ${description}:`,` ${command}`])].join(`
|
|
8
8
|
`))),output_manager_default.print(`
|
|
9
9
|
`)}export{suggestNextCommands};
|
|
@@ -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{getShortFlags,globalCommandOptions}from"./chunk-
|
|
7
|
+
import{getShortFlags,globalCommandOptions}from"./chunk-DORCX7UB.js";var COMMAND_SHORTHANDS=new Set(["-d"]);function walkCommandArgs(commands,args,start,visit){let command={name:"",aliases:[],subcommands:commands},options=[...globalCommandOptions],argumentCount=0;for(let i=start;i<args.length;i++){let token=args[i];if(token==="--")return;if(token.length>1&&token.startsWith("-")){(visit(i,command,argumentCount)||!token.includes("=")&&takesValue(token,options))&&i++;continue}let subcommand=argumentCount===0?command.subcommands?.find(candidate=>candidate.name===token||candidate.aliases.includes(token)):void 0;subcommand?(command=subcommand,options.push(...subcommand.options??[])):argumentCount++}}function takesValue(token,options){let flag=/^-[A-Za-z]{2,}$/.test(token)?`-${token.slice(-1)}`:token,option=options.find(candidate=>`--${candidate.name}`===flag||getShortFlags(candidate).includes(flag));return option!==void 0&&option.type!==Boolean}function findHiddenOption(command,flag){return command.options?.find(option=>`-${option.deprecatedShorthand}`===flag)}function findCommandShorthands(commands,args,start=0){let found=new Set;return walkCommandArgs(commands,args,start,(index,command,argumentCount)=>{let next=args[index+1],required=(command.arguments??[]).filter(argument=>argument.required).length;return!COMMAND_SHORTHANDS.has(args[index])||!findHiddenOption(command,args[index])||argumentCount<required||next===void 0||next.startsWith("-")?!1:(found.add(index),!0)}),found}function findHiddenShorthandOption(commands,args,flag,start=0){let found;return walkCommandArgs(commands,args,start,(index,command)=>(args[index]===flag&&(found??=findHiddenOption(command,flag)),!1)),found}export{findCommandShorthands,findHiddenShorthandOption};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{packageName}from"./chunk-B4KA3ZH2.js";import{allOption,confirmOption,formatOption,jsonOption,limitOption,nextCursorOption,yesOption}from"./chunk-
|
|
7
|
+
import{packageName}from"./chunk-B4KA3ZH2.js";import{allOption,confirmOption,formatOption,jsonOption,limitOption,nextCursorOption,yesOption}from"./chunk-DORCX7UB.js";var listCommand={name:"list",aliases:["ls"],description:"List deployments.",arguments:[{name:"app",required:!1}],options:[allOption,{name:"meta",description:"Filter deployments by metadata (e.g. `--meta KEY=value`). Can appear many times.",argument:"KEY=VALUE",shorthand:null,deprecatedShorthand:"m",type:[String],deprecated:!1},{name:"policy",description:"See deployments with provided Deployment Retention policies (e.g. `--policy KEY=value`). Can appear many times.",argument:"KEY=VALUE",shorthand:null,deprecatedShorthand:"p",type:[String],deprecated:!1},{name:"environment",description:"Filter deployments by environment",argument:"ENVIRONMENT",shorthand:"e",type:String,deprecated:!1},{name:"status",description:"Filter deployments by their status. Can be comma-separated for multiple statuses (e.g.: `--status BUILDING,READY`)",argument:"STATUS",shorthand:null,deprecatedShorthand:"s",type:String,deprecated:!1},nextCursorOption,limitOption,{name:"prod",shorthand:null,type:Boolean,deprecated:!0},{...yesOption,description:"Accepted for scripts. Listing never asks for confirmation"},confirmOption,formatOption,jsonOption],examples:[{name:"List all deployments for the currently linked project",value:`${packageName} list`},{name:"List all deployments across all projects",value:`${packageName} list --all`},{name:"List all deployments for the project `my-app`",value:`${packageName} list my-app`},{name:"Filter deployments by metadata",value:`${packageName} list --meta key1=value1 --meta key2=value2`},{name:"Show the next page, using the cursor from the previous output",placeholders:["<CURSOR>"],value:`${packageName} list my-app --next <CURSOR>`},{name:"Filter deployments by status",value:`${packageName} list --status READY`},{name:"Filter deployments by multiple statuses",value:`${packageName} list --status BUILDING,ERROR`}]};export{listCommand};
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __dirname_(__filename);
|
|
7
|
+
import{getOrCreateDeploymentProtectionToken}from"./chunk-572VGS6P.js";import{getProtectionForProductionDomain,readEnabledProtection}from"./chunk-BYYNR34Q.js";import{ensureLink}from"./chunk-Q7HFUXJ4.js";import{toHost}from"./chunk-6Z5REGCM.js";import{getTeams}from"./chunk-WLD4SGKM.js";import{curlCommand}from"./chunk-JR25PLC7.js";import{detectExplicitScope,getScope}from"./chunk-VIOIR6II.js";import{TelemetryClient}from"./chunk-EYRBV6RM.js";import{getLinkedProject,getUser,introspectToken,resolveAppFromToken}from"./chunk-4Z6R5KHZ.js";import{getGlobalPathConfig}from"./chunk-ZRFDZO7Y.js";import{printError}from"./chunk-HMJR6RVF.js";import{parseArguments}from"./chunk-INIZJZ3O.js";import{InvalidToken,isAPIError}from"./chunk-QFE3RPMA.js";import{cmd,getCommandName}from"./chunk-B4KA3ZH2.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{require_dist}from"./chunk-MCYG7CCE.js";import{createHelpTheme,help,helpCommand}from"./chunk-5727HGA6.js";import{CONTROL_CHARACTERS,FORMAT_CHARACTERS}from"./chunk-SQ62IODX.js";import{getFlagsSpecification,normalizeFlagName}from"./chunk-DORCX7UB.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";import{spawn as spawn2}from"child_process";var CURL_SHORT_OPTIONS_WITH_VALUE="EKCbcdDFPHhmoUQreXYytzTuAwx",CURL_LONG_OPTIONS_WITH_VALUE=new Set(["--aws-sigv4","--cert","--config","--continue-at","--cookie","--cookie-jar","--data","--data-ascii","--data-binary","--data-raw","--data-urlencode","--dump-header","--form","--form-string","--ftp-port","--header","--json","--key","--max-time","--oauth2-bearer","--output","--pass","--proxy","--proxy-cert","--proxy-header","--proxy-key","--proxy-pass","--proxy-user","--quote","--range","--referer","--request","--speed-limit","--speed-time","--telnet-option","--time-cond","--upload-file","--url","--url-query","--user","--user-agent","--variable","--write-out"]),LONG_OPTION_NAME=/^--[A-Za-z0-9][A-Za-z0-9.-]*$/,SHORT_OPTIONS=/^-[A-Za-z0-9:#]+$/,REDACTED="[REDACTED]",HEADER_OPTIONS=new Set(["--header","-H","--proxy-header"]),KEPT_VALUE_OPTIONS=new Set(["--url"]),HEADER_NAME=/^([!#$%&'*+.^_`|~0-9A-Za-z-]+):/;function redactValue(value,option){if(option!==void 0&&KEPT_VALUE_OPTIONS.has(option))return value;if(option!==void 0&&HEADER_OPTIONS.has(option)){let name=HEADER_NAME.exec(value)?.[1];if(name)return`${name}: ${REDACTED}`}return REDACTED}function redactCurlArgs(args){let out=[],option,takesNext=!1;for(let arg of args){if(takesNext){out.push(redactValue(arg,option)),option=void 0,takesNext=!1;continue}let name=normalizeFlagName(arg);if(LONG_OPTION_NAME.test(name)){arg.includes("=")?(out.push(`${name}=${redactValue(arg.slice(name.length+1),name)}`),option=void 0):(out.push(name),option=name,takesNext=CURL_LONG_OPTIONS_WITH_VALUE.has(name));continue}if(arg!=="--"&&SHORT_OPTIONS.test(arg.slice(0,2))){option=void 0;let short=SHORT_OPTIONS.test(arg)?arg:REDACTED;for(let i=1;i<arg.length;i++){if(!CURL_SHORT_OPTIONS_WITH_VALUE.includes(arg[i]))continue;let letter=`-${arg[i]}`;i===arg.length-1?(option=letter,takesNext=!0):short=`${arg.slice(0,i+1)}${redactValue(arg.slice(i+1),letter)}`;break}out.push(short);continue}out.push(arg==="--"?arg:redactValue(arg,option)),option=void 0}return out}var requoteArgs=arg=>arg.includes(" ")?arg.includes('"')?`'${arg}'`:`"${arg}"`:arg;var CurlTelemetryClient=class extends TelemetryClient{trackCliArgumentPath(path){if(path){let value=path.startsWith("/")?"slash":"no-slash";this.trackCliArgument({arg:"path",value})}}trackCliOptionDeployment(deploymentId){if(deploymentId){let value=deploymentId.startsWith("http://")||deploymentId.startsWith("https://")?"url":deploymentId.startsWith("dpl_")?"dpl_":"no-prefix";this.trackCliOption({option:"deployment",value})}}trackCliOptionProtectionBypass(secret){secret&&this.trackCliOption({option:"protection-bypass",value:this.redactedValue})}trackCliFlagYes(yes){yes&&this.trackCliFlag("yes")}trackCliFlagTrace(trace2){trace2&&this.trackCliFlag("trace")}trackCliFlagJson(json){json&&this.trackCliFlag("json")}trackCliFlagYesOnProduction(value){value&&this.trackCliFlag("yes-on-production")}};var import_chalk=__toESM(require_source(),1),import_error_utils=__toESM(require_dist(),1);function getDeploymentSelectorUrl(selector){try{return new URL(selector.startsWith("http://")||selector.startsWith("https://")?selector:`https://${selector}`)}catch{return null}}function getDeploymentLookupHost(selector){return selector.includes(".")?getDeploymentSelectorUrl(selector)?.hostname??selector:selector}async function getDeploymentAccounts(client){if(detectExplicitScope(client))return client.config.currentTeam?[client.config.currentTeam]:[];let currentTeam=client.config.currentTeam;try{return(await getTeams(client)).filter(team=>!team.limited).map(team=>team.id).sort((a,b)=>+(b===currentTeam)-+(a===currentTeam))}catch(err){if(!(err instanceof InvalidToken))throw err;let token=await introspectToken(client).catch(()=>null);if(token&&resolveAppFromToken(token))return token.team?[token.team.id]:[];if(currentTeam)return[currentTeam];throw err}}async function resolveDeployment(client,selector,accountId){let hostOrId=getDeploymentLookupHost(selector),endpoint=`/v13/deployments/${encodeURIComponent(hostOrId)}`,lookup=async accountId2=>{try{let deployment2=await client.fetch(endpoint,{useCurrentTeam:!1,...accountId2?{accountId:accountId2}:{},bailOn429:!0});return deployment2?{...deployment2,ownerId:deployment2.ownerId??deployment2.team?.id}:null}catch(err){if(!isAPIError(err)||err.status!==403&&err.status!==404)throw err;return output_manager_default.debug(`Deployment lookup failed for ${hostOrId}: ${err}`),null}};if(accountId||detectExplicitScope(client))return lookup(accountId??client.config.currentTeam);let deployment=await lookup();if(deployment?.projectId&&deployment.ownerId)return deployment;let accounts;try{accounts=await getDeploymentAccounts(client)}catch(err){if(deployment?.url)return deployment;throw err}for(let account of accounts){let scoped=await lookup(account);if(scoped?.projectId&&scoped.ownerId)return scoped;deployment??=scoped}return deployment}async function getDeploymentUrlById(client,deploymentIdOrUrl,accountId){try{if(deploymentIdOrUrl.startsWith("http://")||deploymentIdOrUrl.startsWith("https://"))try{return new URL(deploymentIdOrUrl).origin}catch{return output_manager_default.debug(`Invalid deployment URL provided: ${deploymentIdOrUrl}`),null}if(deploymentIdOrUrl.includes("vercel.app")){let url=getDeploymentSelectorUrl(deploymentIdOrUrl);return url?url.origin:(output_manager_default.debug(`Invalid deployment URL provided: ${deploymentIdOrUrl}`),null)}let fullDeploymentId=deploymentIdOrUrl;fullDeploymentId.startsWith("dpl_")||(fullDeploymentId=`dpl_${deploymentIdOrUrl}`);let deployment=await resolveDeployment(client,fullDeploymentId,accountId);return!deployment||!deployment.url?null:`https://${deployment.url}`}catch(error){return output_manager_default.debug(`Failed to fetch deployment by ID: ${error}`),null}}function looksLikeHostname(path){let firstSegment=path.split("/")[0];return firstSegment.includes(".")&&!firstSegment.startsWith(".")}function orgFromOwner(id,slug=id){return{type:id.startsWith("team_")?"team":"user",id,slug}}var VC_STRING_FLAGS=new Set(["--deployment","--protection-bypass"]),VC_IGNORED_STRING_FLAGS=new Set(["--scope","--team","--token","-t"]),VC_IGNORED_BOOLEAN_FLAGS=new Set(["--debug"]),VC_BOOLEAN_FLAGS=new Set(["--yes","--help","--trace","--json"]);function flagName(arg){let eqIdx=arg.indexOf("=");return eqIdx===-1?arg:arg.slice(0,eqIdx)}function flagValue(args,index){let arg=args[index],eqIdx=arg.indexOf("=");if(eqIdx!==-1)return arg.slice(eqIdx+1);let next=args[index+1];return next&&!next.startsWith("-")?next:void 0}function getCurlLikeArgs(rawArgs,commandName){if(rawArgs[0]===commandName)return rawArgs.slice(1);let commandIndex=0;for(;commandIndex<rawArgs.length;){let arg=rawArgs[commandIndex];if(VC_IGNORED_BOOLEAN_FLAGS.has(flagName(arg))){commandIndex++;continue}if(!VC_IGNORED_STRING_FLAGS.has(flagName(arg)))break;commandIndex++,!arg.includes("=")&&commandIndex<rawArgs.length&&commandIndex++}return rawArgs[commandIndex]===commandName?rawArgs.slice(commandIndex+1):[...rawArgs]}function parseCurlLikeArgs(rawArgs,commandName){let result={target:void 0,deployment:void 0,protectionBypass:void 0,yes:!1,help:!1,trace:!1,json:!1,toolFlags:[]},args=getCurlLikeArgs(rawArgs,commandName),separatorIndex=args.indexOf("--"),beforeSeparator=separatorIndex===-1?args:args.slice(0,separatorIndex),afterSeparator=separatorIndex===-1?[]:args.slice(separatorIndex+1);for(let i=0;i<beforeSeparator.length;i++){let arg=beforeSeparator[i],name=flagName(arg);if(VC_STRING_FLAGS.has(name)){let value=flagValue(beforeSeparator,i);!arg.includes("=")&&value!==void 0&&i++,name==="--deployment"?result.deployment=value:result.protectionBypass=value;continue}if(!VC_IGNORED_BOOLEAN_FLAGS.has(name)){if(VC_IGNORED_STRING_FLAGS.has(name)){let value=flagValue(beforeSeparator,i);!arg.includes("=")&&value!==void 0&&i++;continue}if(VC_BOOLEAN_FLAGS.has(name)){name==="--yes"?result.yes=!0:name==="--trace"?result.trace=!0:name==="--json"?result.json=!0:result.help=!0;continue}if(!result.target&&name==="--url"){let value=flagValue(beforeSeparator,i);!arg.includes("=")&&value!==void 0&&i++,result.target=value;continue}!result.target&&!arg.startsWith("-")?result.target=arg:result.toolFlags.push(arg)}}return result.toolFlags.push(...afterSeparator),result}function setupCurlLikeCommand(client,command,telemetryClient,options={}){let{print}=output_manager_default;if(options.allowFullUrl){let parsed=parseCurlLikeArgs(options.args??client.argv.slice(2),command.name);if(parsed.help)return print(help(command,{stream:client.stderr,columns:client.stderr.columns})),0;let path2=parsed.target;if(telemetryClient.trackCliArgumentPath(path2),parsed.deployment&&telemetryClient.trackCliOptionDeployment(parsed.deployment),parsed.protectionBypass&&telemetryClient.trackCliOptionProtectionBypass(parsed.protectionBypass),!path2)return output_manager_default.error(`${getCommandName(`${command.name} <url|path>`)} requires a URL or API path (e.g., 'https://example.vercel.app/api/hello' or '/api/hello')`),print(help(command,{stream:client.stderr,columns:client.stderr.columns})),2;let isFullUrl2=path2.startsWith("http://")||path2.startsWith("https://");return!isFullUrl2&&looksLikeHostname(path2)&&(isFullUrl2=!0),output_manager_default.debug(`${command.name} options (${parsed.toolFlags.length} args): ${JSON.stringify(redactCurlArgs(parsed.toolFlags))}`),{path:isFullUrl2&&!path2.startsWith("http")?`https://${path2}`:path2,isFullUrl:isFullUrl2,deploymentFlag:parsed.deployment,protectionBypassFlag:parsed.protectionBypass,toolFlags:parsed.toolFlags,yes:parsed.yes,trace:parsed.trace,json:parsed.json}}let parsedArgs=null,flagsSpecification=getFlagsSpecification(command.options);try{parsedArgs=parseArguments(client.argv.slice(2),flagsSpecification)}catch(err){return printError(err),2}let{flags}=parsedArgs;if(parsedArgs.flags["--help"])return print(help(command,{stream:client.stderr,columns:client.stderr.columns})),0;parsedArgs.args[0]===command.name&&parsedArgs.args.shift();let separatorIndex=process.argv.indexOf("--"),path=parsedArgs.args[0];telemetryClient.trackCliArgumentPath(path);let deploymentFlag=flags["--deployment"];deploymentFlag&&telemetryClient.trackCliOptionDeployment(deploymentFlag);let protectionBypassFlag=flags["--protection-bypass"];if(protectionBypassFlag&&telemetryClient.trackCliOptionProtectionBypass(protectionBypassFlag),!path||path==="--"||path.startsWith("-"))return options.allowFullUrl?output_manager_default.error(`${getCommandName(`${command.name} <url|path>`)} requires a URL or API path (e.g., 'https://example.vercel.app/api/hello' or '/api/hello')`):output_manager_default.error(`${getCommandName(`${command.name} <path>`)} requires an API path (e.g., '/' or '/api/hello' or 'api/hello')`),print(help(command,{stream:client.stderr,columns:client.stderr.columns})),1;let isFullUrl=path.startsWith("http://")||path.startsWith("https://");if(!isFullUrl&&looksLikeHostname(path)&&(isFullUrl=!0),isFullUrl&&!options.allowFullUrl)return output_manager_default.error("The <path> argument must be a relative API path (e.g., '/' or '/api/hello'), not a full URL."),output_manager_default.print("To target a specific deployment within the currently linked project, use the --deployment <id|url> option."),print(help(command,{stream:client.stderr,columns:client.stderr.columns})),1;let toolFlags=separatorIndex!==-1?process.argv.slice(separatorIndex+1):[];return output_manager_default.debug(`${command.name} options (${toolFlags.length} args): ${JSON.stringify(redactCurlArgs(toolFlags))}`),{path:isFullUrl&&!path.startsWith("http")?`https://${path}`:path,isFullUrl,deploymentFlag,protectionBypassFlag,toolFlags,yes:!!flags["--yes"],trace:!!flags["--trace"],json:!!flags["--json"]}}function requestHost(url){let authority=/^[a-z][a-z0-9+.-]*:\/\/([^/?#]*)/i.exec(url)?.[1];if(!authority)return null;try{let parsed=new URL(url);return parsed.hostname===authority.toLowerCase()?parsed.hostname:null}catch{return null}}async function resolveProjectFromUrl(client,host){try{let deployment=await resolveDeployment(client,host);if(deployment){let link=await linkFromDeployment(client,deployment);if(link)return link}}catch(err){if(output_manager_default.debug(`Deployment lookup failed for ${host}: ${err}`),isAPIError(err)&&err.status===429)return null}try{let aliasUrl=`/now/aliases/${encodeURIComponent(host)}`;try{let alias=await client.fetch(aliasUrl,{useCurrentTeam:!1,...detectExplicitScope(client)?{accountId:client.config.currentTeam}:{}});if(alias.projectId&&alias.ownerId)return{status:"linked",project:await client.fetch(`/v9/projects/${encodeURIComponent(alias.projectId)}`,{accountId:alias.ownerId}),org:orgFromOwner(alias.ownerId)}}catch(err){output_manager_default.debug(`User alias lookup failed for ${host}: ${err}`)}for(let accountId of await getDeploymentAccounts(client))try{let alias=await client.fetch(aliasUrl,{accountId}),projectId=alias.projectId,ownerId=alias.ownerId||accountId;if(projectId)return{status:"linked",project:await client.fetch(`/v9/projects/${encodeURIComponent(projectId)}`,{accountId:ownerId}),org:orgFromOwner(ownerId)}}catch(err){output_manager_default.debug(`Alias lookup failed for ${host} in ${accountId}: ${err}`)}}catch(err){output_manager_default.debug(`Team lookup failed for ${host}: ${err}`)}return null}async function getFullUrlAndToken(client,fullUrl,protectionBypassFlag){if(protectionBypassFlag)return{fullUrl,deploymentProtectionToken:omitBypassOnPlainHttp(fullUrl,protectionBypassFlag),link:null};if(process.env.VERCEL_AUTOMATION_BYPASS_SECRET){let secret=process.env.VERCEL_AUTOMATION_BYPASS_SECRET;return await isEnvironmentSecretBoundTo(client,fullUrl,secret)?(output_manager_default.debug("Using protection bypass secret from environment variable"),{fullUrl,deploymentProtectionToken:secret,link:null}):(output_manager_default.warn("Not sending VERCEL_AUTOMATION_BYPASS_SECRET: the URL is not an HTTPS deployment or alias of the project that owns it."),{fullUrl,deploymentProtectionToken:null,link:null})}let url;try{url=new URL(fullUrl)}catch{return{fullUrl,deploymentProtectionToken:null,link:null}}let link=await resolveProjectFromUrl(client,url.hostname),deploymentProtectionToken=null;if(link&&isHttpsUrl(fullUrl))try{deploymentProtectionToken=await getOrCreateDeploymentProtectionToken(client,link,{readinessUrl:url.href})}catch(err){output_manager_default.debug(`Failed to get deployment protection bypass token: ${err}`)}return{fullUrl:url.href,deploymentProtectionToken,link}}async function linkFromDeployment(client,deployment){return!deployment.projectId||!deployment.ownerId?null:{status:"linked",project:await client.fetch(`/v9/projects/${encodeURIComponent(deployment.projectId)}`,{accountId:deployment.ownerId}),org:orgFromOwner(deployment.ownerId)}}async function resolveTargetProject(client,deployment,deploymentFlag){try{let link=await linkFromDeployment(client,deployment);return link||output_manager_default.warn(`Deployment "${deploymentFlag}" is missing project metadata; proceeding without an automatic protection bypass token.`),link}catch(err){return output_manager_default.debug(`Failed to resolve deployment project: ${err}`),output_manager_default.warn(`Failed to load project for deployment "${deploymentFlag}"; proceeding without an automatic protection bypass token.`),null}}async function tryGetDeployment(client,selector){try{return await resolveDeployment(client,selector)}catch(err){return output_manager_default.debug(`Failed to resolve deployment: ${err}`),null}}async function tryLinkFromSelector(client,selector){try{let deployment=await resolveDeployment(client,selector);return deployment?await linkFromDeployment(client,deployment):null}catch(err){return output_manager_default.debug(`Failed to resolve trace project context: ${err}`),null}}async function getLinkedProjectOrNull(client){try{let linked=await getLinkedProject(client,{cwd:client.cwd});return linked.status==="linked"?linked:null}catch(err){return output_manager_default.debug(`Failed to load linked project: ${err}`),null}}function hasAutomationBypassToken(project){return Object.values(project.protectionBypass??{}).some(token=>token.scope==="automation-bypass")}function isHttpsUrl(url){try{return new URL(url).protocol==="https:"}catch{return!1}}function omitBypassOnPlainHttp(fullUrl,token){return token&&!isHttpsUrl(fullUrl)?(output_manager_default.warn("Not sending the protection bypass secret over a non-HTTPS URL."),null):token}async function isEnvironmentSecretBoundTo(client,fullUrl,secret){if(!isHttpsUrl(fullUrl))return!1;let host=requestHost(fullUrl);if(!host)return!1;let link=await resolveProjectFromUrl(client,host);return link!==null&&link.project.protectionBypass?.[secret]?.scope==="automation-bypass"}async function getDeploymentUrlAndToken(client,commandName,path,options){let{deploymentFlag,protectionBypassFlag,autoConfirm,resolveProjectForTrace}=options,environmentProtectionBypass=deploymentFlag&&!protectionBypassFlag&&process.env.VERCEL_AUTOMATION_BYPASS_SECRET||void 0,suppliedProtectionBypass=deploymentFlag?protectionBypassFlag??environmentProtectionBypass:protectionBypassFlag,link=null,createProtectionBypassIfMissing=!deploymentFlag,baseUrl;if(deploymentFlag){let requestedBaseUrl=deploymentFlag.startsWith("http://")||deploymentFlag.startsWith("https://")||deploymentFlag.includes("vercel.app")?await getDeploymentUrlById(client,deploymentFlag):null,deploymentSelector=deploymentFlag.includes(".")||deploymentFlag.startsWith("dpl_")?deploymentFlag:`dpl_${deploymentFlag}`;if(suppliedProtectionBypass!==void 0){if(baseUrl=requestedBaseUrl??await getDeploymentUrlById(client,deploymentFlag)??"",!baseUrl)return output_manager_default.error(`No deployment found for ID "${deploymentFlag}"`),1;resolveProjectForTrace&&(link=await tryLinkFromSelector(client,deploymentSelector)??await getLinkedProjectOrNull(client))}else{let deployment=await tryGetDeployment(client,deploymentSelector);if(baseUrl=requestedBaseUrl??(deployment?.url?`https://${deployment.url}`:""),!baseUrl)return output_manager_default.error(`No deployment found for ID "${deploymentFlag}"`),1;deployment?(link=await resolveTargetProject(client,deployment,deploymentFlag),link&&!hasAutomationBypassToken(link.project)&&(createProtectionBypassIfMissing=(await getLinkedProjectOrNull(client))?.project.id===link.project.id)):output_manager_default.warn(`Could not resolve project information for deployment "${deploymentFlag}"; proceeding without an automatic protection bypass token.`)}}else{try{await getScope(client)}catch(err){if((0,import_error_utils.isErrnoException)(err)&&(err.code==="NOT_AUTHORIZED"||err.code==="TEAM_DELETED"))return output_manager_default.error(err.message),1;throw err}let ensuredLink;try{ensuredLink=await ensureLink(commandName,client,client.cwd,{autoConfirm})}catch(err){if((0,import_error_utils.isErrnoException)(err)&&err.code==="NOT_AUTHORIZED")return output_manager_default.error(err.message),1;throw err}if(typeof ensuredLink=="number")return ensuredLink;link=ensuredLink;let{project}=ensuredLink;if(!project.targets&&!project.latestDeployments){let linkedProject=await getLinkedProject(client,{cwd:client.cwd});if(linkedProject.status!=="linked")return output_manager_default.error("This command requires a linked project. Please run:"),output_manager_default.print(" vercel link"),1;if(!linkedProject.project||!linkedProject.org)return output_manager_default.error("Failed to get project information"),1;project=linkedProject.project}let preferredAlias=project.targets?.production?.alias?.[0],backupAlias=project.latestDeployments?.[0]?.url,target=preferredAlias||backupAlias;if(!target)throw new Error("No deployment URL found for the project");baseUrl=`https://${target}`}let fullUrl=`${baseUrl}${path.startsWith("/")?path:`/${path}`}`;output_manager_default.debug(`${import_chalk.default.cyan("Target URL:")} ${import_chalk.default.bold(fullUrl)}`);let deploymentProtectionToken=suppliedProtectionBypass??null;if(suppliedProtectionBypass===void 0&&link?.project.id&&isHttpsUrl(fullUrl))try{deploymentProtectionToken=await getOrCreateDeploymentProtectionToken(client,link,{createIfMissing:createProtectionBypassIfMissing,readinessUrl:fullUrl})}catch(err){return output_manager_default.error(`Failed to get deployment protection bypass token: ${err instanceof Error?err.message:String(err)}`),1}return environmentProtectionBypass?await isEnvironmentSecretBoundTo(client,fullUrl,environmentProtectionBypass)||(output_manager_default.warn("Not sending VERCEL_AUTOMATION_BYPASS_SECRET: the URL is not an HTTPS deployment or alias of the project that owns it."),deploymentProtectionToken=null):deploymentProtectionToken=omitBypassOnPlainHttp(fullUrl,deploymentProtectionToken),{fullUrl,deploymentProtectionToken,link}}function traceCurl(root){let span=root?.child("vc.cli.curl"),finished=!1;return code=>{finished||(finished=!0,code!==0&&span?.setAttributes({error:"true"}),span?.stop())}}var import_error_utils2=__toESM(require_dist(),1);import{spawn}from"child_process";import{tmpdir}from"os";import{join as join2}from"path";import{mkdtemp,readFile as readFile2,rm}from"fs/promises";async function confirmProduction(client,{deploymentTarget,yes,isTTY}){return deploymentTarget!=="production"||yes?"proceed":isTTY?await client.input.confirm("You are about to capture a trace against a production deployment. Continue?",!1)?"proceed":"declined":(output_manager_default.error("Use --yes to capture traces on production from non-interactive contexts."),"non-tty-no-yes")}import{createHash}from"crypto";import{chmod,mkdir,readFile,unlink,writeFile}from"fs/promises";import{dirname,join}from"path";var FALLBACK_TTL_MS=5*60*1e3,EXPIRY_BUFFER_MS=30*1e3,CACHE_SCHEMA_VERSION=1;function resolveCacheDir(override){return override||join(getGlobalPathConfig(),"cache","traces")}function cacheFilename(teamId,host){let key=`${teamId??""}:${host}`;return`${createHash("sha256").update(key).digest("hex")}.json`}function cachePath(cacheDir,teamId,host){return join(cacheDir,cacheFilename(teamId,host))}async function readCache(path){let raw;try{raw=await readFile(path,"utf8")}catch{return null}try{let parsed=JSON.parse(raw);return!parsed||typeof parsed.token!="string"||typeof parsed.expiresAt!="number"||parsed.schemaVersion!==CACHE_SCHEMA_VERSION?null:parsed}catch{return output_manager_default.debug(`Trace cookie cache file is corrupt at ${path}; re-issuing.`),null}}async function writeCache(path,entry){await mkdir(dirname(path),{recursive:!0}),await writeFile(path,JSON.stringify(entry),{mode:384}),await chmod(path,384)}async function issueToken(client,{teamId,projectId,hostname}){let body=JSON.stringify({projectId,hostname}),response=await client.fetch("/v1/projects/traces/session",{method:"POST",body,headers:{"Content-Type":"application/json"},accountId:teamId});if(!response?.token)throw new Error("Trace session response is missing a token");let expiresAt=typeof response.expiresAt=="number"?response.expiresAt:Date.now()+FALLBACK_TTL_MS;return{token:response.token,expiresAt}}async function getTraceSessionToken({client,teamId,projectId,host,evictedToken,cacheDir}){let dir=resolveCacheDir(cacheDir),hostname=toHost(host),path=cachePath(dir,teamId,hostname),cached=await readCache(path);if(cached&&evictedToken&&cached.token===evictedToken)await unlink(path).catch(()=>{});else if(cached&&Date.now()<cached.expiresAt-EXPIRY_BUFFER_MS)return{token:cached.token,expiresAt:cached.expiresAt,fromCache:!0};let issued=await issueToken(client,{teamId,projectId,hostname});try{await writeCache(path,{token:issued.token,expiresAt:issued.expiresAt,schemaVersion:CACHE_SCHEMA_VERSION})}catch(err){output_manager_default.debug(`Failed to write trace cookie cache: ${err}`)}return{token:issued.token,expiresAt:issued.expiresAt,fromCache:!1}}var TRACE_COOKIE_NAME="_vercel_tracing",SESSION_COOKIE_NAME="_vercel_session";async function lookupDeployment(client,fullUrl,accountId){let deployment=await resolveDeployment(client,fullUrl,accountId);if(!deployment)throw new Error("Deployment not found");return deployment}function resolveTeamId(link,deployment){if(link?.org.type==="team")return link.org.id;if(deployment.ownerId?.startsWith("team_"))return deployment.ownerId}function extractVercelId(headerDump){let lines=headerDump.split(/\r?\n/),lastValue;for(let line of lines){let idx=line.indexOf(":");if(idx===-1)continue;line.slice(0,idx).trim().toLowerCase()==="x-vercel-id"&&(lastValue=line.slice(idx+1).trim())}if(!lastValue)return;let sepIdx=lastValue.lastIndexOf("::");return sepIdx===-1?lastValue:lastValue.slice(sepIdx+2)}function extractFinalStatus(headerDump){let lines=headerDump.split(/\r?\n/),lastStatus;for(let line of lines){let match=line.match(/^HTTP\/[\d.]+\s+(\d{3})/);match&&(lastStatus=Number(match[1]))}return lastStatus}async function runCurlAndCaptureHeaders(client,curlFlags,json){let tmpDir=await mkdtemp(join2(tmpdir(),"vc-curl-trace-")),headerFile=join2(tmpDir,"headers"),flags=["--dump-header",headerFile,...curlFlags];try{let{exitCode,capturedBody}=await new Promise(resolve=>{let finishTrace=traceCurl(client.telemetryEventStore.enabled?client.rootSpan:void 0),child=spawn("curl",flags,{stdio:json?["inherit","pipe","inherit"]:"inherit",shell:!1}),buf="";json&&child.stdout&&(child.stdout.setEncoding("utf8"),child.stdout.on("data",chunk=>{buf+=chunk})),child.on("error",err=>{finishTrace(1),err.code==="ENOENT"?output_manager_default.error("curl command not found. Please install curl."):output_manager_default.error(`Failed to execute curl: ${err.message}`),resolve({exitCode:1,capturedBody:buf})}),child.on("close",code=>{finishTrace(code),resolve({exitCode:code??1,capturedBody:buf})})}),headerDump="";try{headerDump=await readFile2(headerFile,"utf8")}catch(err){output_manager_default.debug(`Failed to read curl header dump: ${err}`)}return{exitCode,headerDump,capturedBody}}finally{await rm(tmpDir,{recursive:!0,force:!0}).catch(()=>{})}}async function trace(client,{fullUrl,link,curlFlags,json,yes,telemetry}){telemetry.trackCliFlagTrace(!0),json&&telemetry.trackCliFlagJson(!0);let accountId=link?.org.id,deployment;try{deployment=await lookupDeployment(client,fullUrl,accountId)}catch(err){return output_manager_default.error(`Failed to look up deployment for tracing: ${err instanceof Error?err.message:String(err)}`),1}let projectId=link?.project.id??deployment.projectId;if(!projectId)return output_manager_default.error("Could not resolve project for trace session. Run `vercel link` and retry."),1;let teamId=resolveTeamId(link,deployment),userId;try{userId=client.authConfig.userId??(await getUser(client)).id}catch(err){return output_manager_default.error(`Failed to resolve user for trace session: ${(0,import_error_utils2.errorToString)(err)}`),1}let deploymentTarget=deployment.target==="production"?"production":"preview",confirmation=await confirmProduction(client,{deploymentTarget,yes,isTTY:!!client.stdin.isTTY});if(confirmation==="non-tty-no-yes")return 1;if(confirmation==="declined")return output_manager_default.log("Trace cancelled."),0;deploymentTarget==="production"&&yes&&telemetry.trackCliFlagYesOnProduction(!0);let session;try{session=await getTraceSessionToken({client,teamId,projectId,host:fullUrl})}catch(err){return output_manager_default.error(`Failed to acquire trace session: ${err instanceof Error?err.message:String(err)}`),1}let{exitCode,headerDump,capturedBody}=await runCurlWithCookie(client,session.token,userId,curlFlags,json);if(session.fromCache&&extractFinalStatus(headerDump)===401&&exitCode===0){output_manager_default.debug("Trace cookie returned 401; evicting cache and retrying.");let refreshed;try{refreshed=await getTraceSessionToken({client,teamId,projectId,host:fullUrl,evictedToken:session.token})}catch(err){return output_manager_default.error(`Failed to refresh trace session after 401: ${err instanceof Error?err.message:String(err)}`),1}({exitCode,headerDump,capturedBody}=await runCurlWithCookie(client,refreshed.token,userId,curlFlags,json))}let requestId=extractVercelId(headerDump);return json?(client.stdout.write(`${JSON.stringify({response:capturedBody,requestId:requestId??null},null,2)}
|
|
8
|
+
`),requestId?exitCode:exitCode===0?1:exitCode):requestId?(client.stderr.write(`
|
|
9
|
+
Run \`vercel traces inspect ${requestId}\` to fetch the trace.
|
|
10
|
+
`),exitCode):(output_manager_default.error("Trace cookie was set but the response did not include an x-vercel-id header."),exitCode===0?1:exitCode)}async function runCurlWithCookie(client,token,userId,curlFlags,json){let flagsWithCookie=["--header",`Cookie: ${TRACE_COOKIE_NAME}=${token}; ${SESSION_COOKIE_NAME}=${userId}`,...curlFlags];return output_manager_default.debug(`Executing: curl ${redactCurlArgs(flagsWithCookie).map(requoteArgs).join(" ")}`),runCurlAndCaptureHeaders(client,flagsWithCookie,json)}async function curl(client){return runCurl(client,{})}async function runCurl(client,{forceTrace=!1,args}){let telemetryClient=new CurlTelemetryClient({opts:{store:client.telemetryEventStore}}),setup=setupCurlLikeCommand(client,curlCommand,telemetryClient,{allowFullUrl:!0,args});if(typeof setup=="number")return setup;let{path,isFullUrl,deploymentFlag,protectionBypassFlag,toolFlags,json:jsonFlag}=setup,unsupportedFlag=toolFlags.find(escapesRedirectLimit);if(unsupportedFlag)return output_manager_default.error(`${cmd(unsupportedFlag)} is not supported by ${getCommandName("curl")}.`),2;let traceFlag=forceTrace||setup.trace,result=isFullUrl?await getFullUrlAndToken(client,path,protectionBypassFlag):await getDeploymentUrlAndToken(client,"curl",path,{deploymentFlag,protectionBypassFlag,autoConfirm:setup.yes,resolveProjectForTrace:traceFlag});if(typeof result=="number")return result;let{fullUrl,deploymentProtectionToken}=result;if(deploymentProtectionToken){let secondDestination=toolFlags.find(isSecondDestination);if(secondDestination)return output_manager_default.error(`${nameSecondDestination(secondDestination)} would be a second destination, and every destination receives the Deployment Protection header. Pass one URL per request.`),2}let curlFlags=[...toolFlags];if(deploymentProtectionToken&&(curlFlags.unshift("--header",`x-vercel-protection-bypass: ${deploymentProtectionToken}`),curlFlags.push("--max-redirs","0")),curlFlags.unshift("--url",fullUrl),traceFlag)return trace(client,{fullUrl,link:result.link??null,curlFlags,json:jsonFlag,yes:setup.yes,telemetry:telemetryClient});if(output_manager_default.debug(`Executing: curl ${redactCurlArgs(curlFlags).map(requoteArgs).join(" ")}`),deploymentProtectionToken&&bypassesProtection(result.link,fullUrl)){output_manager_default.warning("This request bypasses Deployment Protection, so its response doesn't show whether the URL is public.");let hint=helpCommand(`curl ${shellQuote(encodeHiddenCharacters(fullUrl))}`,[],createHelpTheme(client.stderr));output_manager_default.print(`
|
|
11
|
+
To check public access:
|
|
12
|
+
${hint}
|
|
13
|
+
`)}return new Promise(resolve=>{let finishTrace=traceCurl(client.telemetryEventStore.enabled?client.rootSpan:void 0),curlProcess=spawn2("curl",curlFlags,{stdio:"inherit",shell:!1});curlProcess.on("error",err=>{finishTrace(1),"code"in err&&err.code==="ENOENT"?(output_manager_default.error("curl command not found. Please install curl."),resolve(1)):(output_manager_default.error(`Failed to execute curl: ${err.message}`),resolve(1))}),curlProcess.on("close",code=>{finishTrace(code),resolve(code??1)})})}function bypassesProtection(link,url){if(!link)return!0;let methods=readEnabledProtection(link.project),productionDomain=link.project.targets?.production?.alias?.[0];return(productionDomain&&toHost(url).toLowerCase()===productionDomain?getProtectionForProductionDomain(methods):methods).length>0}function isSecondDestination(arg){return arg==="--url"||arg.startsWith("--url=")||/^https?:\/\//i.test(arg)}function nameSecondDestination(arg){if(arg==="--url"||arg.startsWith("--url="))return cmd("--url");try{return cmd(new URL(arg).origin)}catch{return"A second URL"}}function escapesRedirectLimit(flag){if(flag==="--"||flag==="--next"||flag==="--config")return!0;if(!flag.startsWith("-")||flag.startsWith("--"))return!1;for(let option of flag.slice(1)){if(option===":"||option==="K")return!0;if(CURL_SHORT_OPTIONS_WITH_VALUE.includes(option))return!1}return!1}function encodeHiddenCharacters(url){return url.replace(CONTROL_CHARACTERS,encodeURIComponent).replace(FORMAT_CHARACTERS,encodeURIComponent)}function shellQuote(value){return/^[\w./:@%+=,-]+$/.test(value)?value:`'${value.replace(/'/g,"'\\''")}'`}export{redactCurlArgs,requoteArgs,setupCurlLikeCommand,getDeploymentUrlAndToken,curl,runCurl};
|
|
@@ -4,6 +4,6 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{decodeListCursor}from"./chunk-
|
|
7
|
+
import{decodeListCursor}from"./chunk-ZBZQEDZY.js";import{external_exports}from"./chunk-2AMO2VMV.js";import{parseListLimit}from"./chunk-7RABG6HV.js";import{AGENT_ACTION,AGENT_REASON,AGENT_STATUS,getExitCodeForReason,outputActionRequired,outputAgentError}from"./chunk-CSNP5RIM.js";import{validateJsonOutput}from"./chunk-KA2KG3SY.js";import{isAPIError}from"./chunk-QFE3RPMA.js";import{getCommandName,getCommandNamePlain}from"./chunk-B4KA3ZH2.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{getGlobalFlagsFromArgs}from"./chunk-DORCX7UB.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var OrganizationResponseError=class extends Error{};function handleOrganizationApiError(client,err,failed){if(!isAPIError(err)){output_manager_default.debug(`Organization request failed: ${err}`);let cause=err instanceof OrganizationResponseError?err.message:"";return report(client,{reason:AGENT_REASON.API_ERROR,message:`Failed to ${failed.action}.${cause?` ${cause}`:""}`})}let remote=stripControlCharacters(err.serverMessage||"");if(err.status===404)return report(client,{reason:AGENT_REASON.NOT_FOUND,message:failed.notFound??`Couldn't ${failed.action}. It wasn't found.`});if(err.status===403)return report(client,{reason:AGENT_REASON.PERMISSION_DENIED,message:`You can't ${failed.action}.`,remote,action:err.action,resource:typeof err.resource=="string"?err.resource:void 0});let plan=typeof err.code=="string"&&PLAN_CAUSES[err.code];if(plan)return report(client,{reason:AGENT_REASON.PLAN_LIMIT,message:`Can't ${failed.action}. ${plan}.`,remote});if(err.status===409){let conflict=typeof err.code=="string"&&CONFLICT_CAUSES[err.code];return report(client,{reason:AGENT_REASON.CONFLICT,message:`Can't ${failed.action}. ${conflict||"It conflicts with the current state of the organization or team"}.`,remote})}return err.status===429?report(client,{reason:AGENT_REASON.RATE_LIMITED,message:"Too many requests to the Vercel API. Try again later."}):report(client,{reason:AGENT_REASON.API_ERROR,message:`Failed to ${failed.action}.`,remote})}var CONFLICT_CAUSES={already_exists:"Another organization uses this slug",slug_conflict:"Another team uses this slug",team_already_in_organization:"The team already belongs to an organization",team_organization_transfer_in_progress:"The team is already moving to an organization"},PLAN_CAUSES={invalid_billing_plan:"The team's billing plan doesn't allow it",child_team_limit_reached:"The organization has reached its limit of enterprise child teams",team_already_enterprise:"An existing Enterprise team can't become an enterprise child team"};function stripControlCharacters(text){return text.replace(/[\u0000-\u001f\u007f-\u009f]/g," ").trim()}function report(client,failure){let payload={status:AGENT_STATUS.ERROR,reason:failure.reason,message:failure.message};return failure.remote&&(payload.data={remoteMessage:failure.remote}),failure.action&&(payload.action=failure.action),failure.resource&&(payload.resource=failure.resource),outputAgentError(client,payload,1),output_manager_default.error(failure.message),failure.remote&&output_manager_default.log(` Vercel API: ${failure.remote}`),1}var organizationSchema=external_exports.looseObject({organizationId:external_exports.string(),slug:external_exports.string(),name:external_exports.string().optional(),teamId:external_exports.string(),teamCount:external_exports.number(),createdAt:external_exports.string(),updatedAt:external_exports.string()}),teamSchema=external_exports.looseObject({organizationId:external_exports.string(),teamId:external_exports.string(),ssoMode:external_exports.string(),billingPlan:external_exports.string().optional(),createdAt:external_exports.string(),updatedAt:external_exports.string()}),teamsSchema=external_exports.object({teams:external_exports.array(teamSchema.extend({slug:external_exports.string(),name:external_exports.string().nullable(),avatar:external_exports.string().nullable()})),cursor:external_exports.string().nullable().optional()});async function request(client,path,schema,options={}){let fetchOptions={...options,useCurrentTeam:!1};options.method&&options.method!=="GET"&&(fetchOptions.retry={retries:0},fetchOptions.bailOn429=!0);let data=await client.fetch(`/v1/organizations${path}`,fetchOptions),result=schema.safeParse(data);if(!result.success){let paths=[...new Set(result.error.issues.map(issue=>issue.path.length?issue.path.join("."):"<root>"))].slice(0,5);throw new OrganizationResponseError(`The Organizations API returned an invalid response at ${paths.join(", ")}.`)}return result.data}function listOrganizations(client){return request(client,"",external_exports.object({organizations:external_exports.array(organizationSchema)}))}function getOrganization(client,id){return request(client,`/${encodeURIComponent(id)}`,organizationSchema)}function createOrganization(client,rootTeamId,body){let query=new URLSearchParams({teamId:rootTeamId});return request(client,`?${query}`,organizationSchema,{method:"POST",body})}function updateOrganization(client,id,slug){return request(client,`/${encodeURIComponent(id)}`,organizationSchema,{method:"PATCH",body:{slug}})}function listOrganizationTeams(client,id,cursor){let query=cursor===void 0?"":`?${new URLSearchParams({cursor})}`;return request(client,`/${encodeURIComponent(id)}/teams${query}`,teamsSchema)}function addOrganizationTeam(client,id,body){return request(client,`/${encodeURIComponent(id)}/teams`,teamSchema,{method:"POST",body})}var import_chalk=__toESM(require_source(),1);var idSchema=external_exports.string().max(256).regex(/^[a-zA-Z0-9_-]+$/),slugSchema=external_exports.string().min(1).max(48).regex(/^[a-z0-9](?:[a-z0-9-]*[a-z0-9])?$/),nameSchema=external_exports.string().min(1).max(256).refine(value=>value.trim().length>0&&!/[\x00-\x1f\x7f]/.test(value)),billingPlanSchema=external_exports.enum(["platform","enterprise"]),ORGANIZATION_ID_PREFIX="org_",TEAM_ID_PREFIX="team_";function isPrefixedId(value,prefix){return value.startsWith(prefix)&&value.length>prefix.length&&idSchema.safeParse(value).success}var SLUG_MESSAGE="Provide --slug with 1-48 lowercase letters, numbers, or hyphens, beginning and ending with a letter or number.",NAME_MESSAGE="Provide --name with 1-256 characters and no control characters.",PLAN_MESSAGE="Use --billing-plan platform or --billing-plan enterprise.";function organizationsSuggestion(subcommand,argv){let globalFlags=getGlobalFlagsFromArgs(argv.slice(2)),full=globalFlags.length?`${subcommand} ${globalFlags.join(" ")}`:subcommand;return getCommandNamePlain(full)}function missingArgument(client,options){let next=[];return options.suggestList&&next.push({command:organizationsSuggestion("organizations list",client.argv),when:"List organizations to find an ID"}),next.push({command:organizationsSuggestion(options.usage,client.argv)}),outputActionRequired(client,{status:AGENT_STATUS.ACTION_REQUIRED,action:AGENT_ACTION.MISSING_ARGUMENTS,reason:options.reason,message:options.message,next}),output_manager_default.error(options.message),output_manager_default.log(`Usage: ${import_chalk.default.cyan(getCommandName(options.usage))}`),getExitCodeForReason(options.reason)}function invalidArgument(client,message){return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message}),output_manager_default.error(message),2}function invalidArgumentCount(client,usage){let message=`Too many arguments. Usage: ${getCommandNamePlain(usage)}`;return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message}),output_manager_default.error(`Invalid number of arguments. Usage: ${import_chalk.default.cyan(getCommandName(usage))}`),2}function validate(client,schema,value,options){if(value===void 0)return{status:"error",exitCode:missingArgument(client,{...options,reason:AGENT_REASON.MISSING_ARGUMENTS})};let parsed=schema.safeParse(value);return parsed.success?{status:"ok",value:parsed.data}:{status:"error",exitCode:invalidArgument(client,options.message)}}function validateOptional(client,schema,value,message){if(value===void 0)return{status:"ok",value:void 0};let parsed=schema.safeParse(value);return parsed.success?{status:"ok",value:parsed.data}:{status:"error",exitCode:invalidArgument(client,message)}}function outputFormat(client,flags){let format=validateJsonOutput(flags);return format.valid?{status:"ok",value:format.jsonOutput}:{status:"error",exitCode:invalidArgument(client,format.error)}}function noArguments(client,args,usage){return args.length?{status:"error",exitCode:invalidArgumentCount(client,usage)}:{status:"ok",value:void 0}}function unknownCommand(client,group,segment){let path=getCommandNamePlain(group),message=segment?`Unknown command ${segment} for ${path}.`:`Missing command for ${path}.`;return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:segment?"unknown_command":"missing_command",message,next:[{command:`${path} --help`,when:"See all commands"}]}),output_manager_default.error(message),output_manager_default.log(`
|
|
8
8
|
See all commands:
|
|
9
9
|
${path} --help`),2}function listWindow(client,flags){let limit;try{limit=parseListLimit(flags["--limit"])}catch(err){let message=err instanceof Error?err.message:String(err);return{status:"error",exitCode:invalidArgument(client,message)}}let next=flags["--next"];if(next===void 0)return{status:"ok",value:{limit,start:{offset:0}}};let start=decodeListCursor(next);return start?{status:"ok",value:{limit,start}}:{status:"error",exitCode:invalidArgument(client,"Provide --next with the cursor from the previous page.")}}export{OrganizationResponseError,handleOrganizationApiError,listOrganizations,getOrganization,createOrganization,updateOrganization,listOrganizationTeams,addOrganizationTeam,slugSchema,nameSchema,billingPlanSchema,ORGANIZATION_ID_PREFIX,TEAM_ID_PREFIX,isPrefixedId,SLUG_MESSAGE,NAME_MESSAGE,PLAN_MESSAGE,missingArgument,invalidArgument,invalidArgumentCount,validate,validateOptional,outputFormat,noArguments,unknownCommand,listWindow};
|
|
@@ -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{STANDARD_ENVIRONMENTS}from"./chunk-7YKFF6CE.js";import{require_lib}from"./chunk-B4KA3ZH2.js";import{output_manager_default}from"./chunk-
|
|
7
|
+
import{STANDARD_ENVIRONMENTS}from"./chunk-7YKFF6CE.js";import{require_lib}from"./chunk-B4KA3ZH2.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var import_title=__toESM(require_lib(),1);function formatEnvironment(orgSlug,projectSlug,environment){let projectUrl=`https://vercel.com/${orgSlug}/${projectSlug}`,boldName=import_chalk.default.bold(STANDARD_ENVIRONMENTS.includes(environment.slug)?(0,import_title.default)(environment.slug):environment.slug);return output_manager_default.link(boldName,`${projectUrl}/settings/environments/${environment.slug}`,{fallback:()=>boldName,color:!1})}export{formatEnvironment};
|
|
@@ -4,11 +4,11 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{HttpError,MESSAGE_TEXT_MAX,
|
|
7
|
+
import{HttpError,MESSAGE_TEXT_MAX,NewLabels}from"./chunk-NMY2YZ6M.js";import{external_exports}from"./chunk-2AMO2VMV.js";var hex=bytes=>Array.from(bytes,byte=>byte.toString(16).padStart(2,"0")).join("");async function sha256(text2){return hex(new Uint8Array(await crypto.subtle.digest("SHA-256",new TextEncoder().encode(text2))))}async function derivedId(...parts){let bytes=new Uint8Array(await crypto.subtle.digest("SHA-256",new TextEncoder().encode(JSON.stringify(parts)))).slice(0,16);bytes[6]=bytes[6]&15|128,bytes[8]=bytes[8]&63|128;let text2=hex(bytes);return`${text2.slice(0,8)}-${text2.slice(8,12)}-${text2.slice(12,16)}-${text2.slice(16,20)}-${text2.slice(20,32)}`}var DERIVED_ID=/^[0-9a-f]{8}-[0-9a-f]{4}-8[0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/,keyId=async(principal,derived)=>`key:${principal}:${(await sha256(`board-key${derived}`)).slice(0,32)}`;function platformProfile(profile){let colon=profile?.indexOf(":")??-1;return profile&&colon>0?{key:profile.slice(0,colon),user:profile.slice(colon+1)}:null}function typableHandle(handle,userId){return typable(handle)||typable(userId)}var typable=value=>trimmed(value.normalize("NFKD").replace(/\p{M}+/gu,"").toLowerCase().replace(/[^a-z0-9._-]+/g,"-"));function trimmed(value){let start=0,end=value.length;for(;start<end&&"-._".includes(value[start]);)start++;for(;end>start&&"-._".includes(value[end-1]);)end--;return value.slice(start,end)}var HANDLE_MAX=128;function underPrincipal(principal,part){let room=HANDLE_MAX-Array.from(principal).length-1,chars=Array.from(part);return`${principal}/${chars.length<=room?part:trimmed(chars.slice(0,Math.max(room,1)).join(""))}`}var userIdOf=id=>id.slice(id.indexOf(":")+1),importedHandle=(principal,handle,userId)=>underPrincipal(principal,typableHandle(handle,userId));function actorParts(actor){let plus=actor.indexOf("+");return plus===-1?{principal:actor,profile:null}:{principal:actor.slice(0,plus),profile:actor.slice(plus+1)}}var viaText=via=>`via ${via.name}${via.environment!==null&&via.environment!=="production"?` (${via.environment})`:""}`,shownName=actor=>actor.via?`${actor.name} ${viaText(actor.via)}`:actor.name;function waitUntil(task){try{Reflect.get(globalThis,Symbol.for("@vercel/request-context"))?.get?.()?.waitUntil?.(task)}catch{}}var afterRetry=attempt=>attempt>10,DroppedError=class extends HttpError{responses;constructor(responses){super(422,"dropped",responses.join(`
|
|
8
8
|
`)||"the board dropped this message"),this.responses=responses}},Patch=external_exports.object({text:external_exports.string().max(MESSAGE_TEXT_MAX).optional(),labels:NewLabels.optional()}).strict();async function runMiddleware(middleware,input,commit){let responses=[],committed=null,step=async(i,write)=>{if(i===middleware.length){if(write.text.trim()===""&&(write.kind==="edit"||write.attachments.length===0))return;committed={value:await commit(write)};return}let next=null;await middleware[i]({write:Object.freeze({...write}),author:Object.freeze({...input.author}),source:Object.freeze({...input.source}),board:input.board(),respond:async text2=>{responses.push(text2)},next:(patch={})=>{if(next)throw new Error("next() was already called");let{text:text2,labels}=Patch.parse(patch);return next=step(i+1,{...write,...text2!==void 0?{text:text2}:{},...write.kind==="post"&&labels?{labels:{...write.labels,...labels}}:{}}),next}}),next&&await next};if(await step(0,input.write),!committed)throw new DroppedError(responses);return committed.value}var NAME="[a-z][a-z0-9._-]{0,79}",SCHEMA_NAME=new RegExp(`^${NAME}$`),SCHEMA_ID=new RegExp(`^(${NAME})@([1-9][0-9]{0,4})$`);function parseSchemaId(id){let found=SCHEMA_ID.exec(id);return found?{name:found[1],version:Number(found[2])}:null}var TYPES=new Set(["object","array","string","number","integer","boolean","null"]),SCHEMA_FORMATS=["date-time","date","time","email","uri","uuid","hostname","ipv4","ipv6"],FORMATS=new Set(SCHEMA_FORMATS),isObject=value=>typeof value=="object"&&value!==null&&!Array.isArray(value),isSubschema=value=>isObject(value)||typeof value=="boolean",count=value=>typeof value=="number"&&Number.isInteger(value)&&value>=0,finite=value=>typeof value=="number"&&Number.isFinite(value),text=value=>typeof value=="string",distinct=values=>new Set(values).size===values.length,KEYWORDS={$schema:{takes:"a string",ok:text},title:{takes:"a string",ok:text},description:{takes:"a string",ok:text},type:{takes:"object, array, string, number, integer, boolean, or null, or a list of them",ok:value=>TYPES.has(value)||Array.isArray(value)&&value.length>0&&value.every(one=>TYPES.has(one))&&distinct(value)},properties:{takes:"an object of schemas, by property",ok:value=>isObject(value)&&Object.values(value).every(isSubschema)},required:{takes:"a list of property names, each once",ok:value=>Array.isArray(value)&&value.every(text)&&distinct(value)},additionalProperties:{takes:"a schema, or true or false",ok:isSubschema},items:{takes:"one schema for every item",ok:isSubschema},minItems:{takes:"a whole number, 0 or more",ok:count},maxItems:{takes:"a whole number, 0 or more",ok:count},minLength:{takes:"a whole number, 0 or more",ok:count},maxLength:{takes:"a whole number, 0 or more",ok:count},minimum:{takes:"a number",ok:finite},maximum:{takes:"a number",ok:finite},exclusiveMinimum:{takes:"a number",ok:finite},exclusiveMaximum:{takes:"a number",ok:finite},multipleOf:{takes:"a number above 0",ok:value=>finite(value)&&value>0},enum:{takes:"a list of at least one value",ok:value=>Array.isArray(value)&&value.length>0},const:{takes:"any value",ok:()=>!0},oneOf:{takes:"a list of at least one schema",ok:value=>Array.isArray(value)&&value.length>0&&value.every(isSubschema)},anyOf:{takes:"a list of at least one schema",ok:value=>Array.isArray(value)&&value.length>0&&value.every(isSubschema)},allOf:{takes:"a list of at least one schema",ok:value=>Array.isArray(value)&&value.length>0&&value.every(isSubschema)},not:{takes:"a schema",ok:isSubschema},format:{takes:`one of ${SCHEMA_FORMATS.join(", ")}`,ok:value=>FORMATS.has(value)}};function canonical(value){return JSON.stringify(value,(_key,child)=>isObject(child)?Object.fromEntries(Object.entries(child).sort(([a],[b])=>a<b?-1:a>b?1:0)):child)}var OPENING=/^( {0,3})(`{3,}|~{3,})(.*)$/,BLOCK_INFO=/^json#(\S*)/,QUOTED=/^ {0,3}>[ \t]?/,ITEM=/^ {0,3}(?:[-*+]|\d{1,9}[.)])(?: {1,4}|\t|$)/,INTERRUPTS=/^ {0,3}(?:#{1,6}(?:[ \t]|$)|([-*_])(?:[ \t]*\1){2,}[ \t]*$|<)/;function opens(line){let found=OPENING.exec(line);return found&&!(found[2][0]==="`"&&found[3].includes("`"))?{fence:found[2],info:found[3].trim()}:null}function closes(line,open){let found=/^ {0,3}(`{3,}|~{3,})[ \t]*$/.exec(line);return found!==null&&found[1][0]===open.fence[0]&&found[1].length>=open.fence.length}function read(id,source){let named=parseSchemaId(id);if(!named)return{problem:`${id||"json#"} names no schema: one is name@version, like sandbox@1`};let parsed;try{parsed=JSON.parse(source)}catch{return{...named,problem:`the ${id} block isn't JSON`}}return typeof parsed!="object"||parsed===null||Array.isArray(parsed)?{...named,problem:`the ${id} block isn't a JSON object`}:{...named,data:parsed}}function findBlocks(text2){let blocks=[],open=null,container=null,item=0,nested=null,paragraph=!1,at=0,emit=(to,sourceEnd,end,unclosed=!1)=>{let id=BLOCK_INFO.exec(to.info)?.[1];if(id===void 0)return;let source=text2.slice(to.content,Math.max(to.content,sourceEnd));blocks.push({id,source,...unclosed?{...parseSchemaId(id)??{},problem:`the ${id} block's fence never closes`}:read(id,source),start:to.start,end})},plain=line=>line.trim()!==""&&opens(line)===null&&!QUOTED.test(line)&&!ITEM.test(line)&&!INTERRUPTS.test(line),within=line=>{let quoted=QUOTED.exec(line);if(quoted)return container!=="quote"&&(nested=null),container="quote",line.slice(quoted[0].length);if(container==="item"&&(line.trim()===""||line.length-line.trimStart().length>=item))return line.slice(Math.min(item,line.length));if(container!==null&¶graph&&nested===null&&plain(line))return line;let started=ITEM.exec(line);return nested=null,container=started?"item":null,started?(item=started[0].length===line.length?line.length+1:started[0].length,line.slice(item)):null};for(;at<=text2.length;){let newline=text2.indexOf(`
|
|
9
9
|
`,at),end=newline===-1?text2.length:newline,line=text2.slice(at,end).replace(/\r$/,"");if(open)closes(line,open)&&(emit(open,at-1,at+line.length),open=null);else{let inner=within(line);if(inner===null){let found=opens(line);found&&(open={...found,start:at,content:Math.min(text2.length,end+1)})}else nested?closes(inner,nested)&&(nested=null):nested=opens(inner);paragraph=inner!==null&&nested===null&&plain(inner)}if(newline===-1)break;at=newline+1}return open&&emit(open,text2.length,text2.length,!0),blocks}function blocksIn(text2){return text2.includes("json#")?findBlocks(text2).flatMap(({name,version,data})=>name!==void 0&&version!==void 0&&data!==void 0?[{schema:name,version,data}]:[]):[]}function block(id,data){if(!parseSchemaId(id))throw new TypeError(`${id} names no schema: one is name@version, like sandbox@1`);return`\`\`\`json#${id}
|
|
10
10
|
${JSON.stringify(data,null,2)}
|
|
11
11
|
\`\`\``}var FENCED_CODE=/```[\s\S]*?```/g,INLINE_CODE=/`[^`\n]*`/g,NAME2="[a-z0-9](?:[a-z0-9._-]*[a-z0-9])?",MENTION=new RegExp(`(?<![\\w@.-])@(${NAME2}(?:/${NAME2})?)(?!:\\S|[a-z0-9_/-]|\\.(?=[a-z0-9]))`,"gi"),EXACT=/(?<![\w@.-])@\[([^\]\s]+)\]/g;function proseOnly(text2){let prose=text2.replace(FENCED_CODE,match=>" ".repeat(match.length)).replace(INLINE_CODE,match=>" ".repeat(match.length));if(text2.includes("json#"))for(let{start,end}of findBlocks(text2))prose=`${prose.slice(0,start)}${" ".repeat(end-start)}${prose.slice(end)}`;return prose}function extractMentions(text2){let prose=proseOnly(text2),found=[];for(let match of prose.matchAll(EXACT)){let actor=match[1];actor!==void 0&&found.push({index:match.index,token:{kind:"actor",actor},key:`actor:${actor}`})}for(let match of prose.replace(EXACT,m=>" ".repeat(m.length)).matchAll(MENTION)){let handle=match[1]?.toLowerCase();handle!==void 0&&found.push({index:match.index,token:{kind:"handle",handle},key:`handle:${handle}`})}let seen=new Set;return found.sort((a,b)=>a.index-b.index).filter(({key})=>!seen.has(key)&&seen.add(key)).map(({token})=>token)}var isEmail=value=>/^[^\s@:]+@[^\s@:]+$/.test(value),mentionTerm=name=>name.includes(":")?name:name.toLowerCase(),mentionTerms=text2=>[...new Set(extractMentions(text2).map(token=>mentionTerm(token.kind==="handle"?token.handle:token.actor)))];function replaceMentions(text2,replace){let prose=proseOnly(text2),found=[];for(let match of prose.matchAll(EXACT))found.push({index:match.index,length:match[0].length,token:{kind:"actor",actor:match[1]}});for(let match of prose.replace(EXACT,m=>" ".repeat(m.length)).matchAll(MENTION))found.push({index:match.index,length:match[0].length,token:{kind:"handle",handle:match[1].toLowerCase()}});let out="",at=0;for(let{index,length,token}of found.sort((a,b)=>a.index-b.index)){let written=text2.slice(index,index+length);out+=text2.slice(at,index)+(replace(token,written)??written),at=index+length}return out+text2.slice(at)}var HOLDABLE=/^[^\]\s]+$/;function settleMentions(text2,actors,prefer=()=>null){let found=new Map;return{text:replaceMentions(text2,(token,written)=>{if(token.kind!=="handle")return null;let mention=found.get(token.handle);if(!mention){let named=of=>actors.filter(actor2=>of(actor2.handle.toLowerCase())===token.handle&&HOLDABLE.test(actor2.id)),full=named(handle=>handle),actor=full.length===1?full[0]:full.length>1?prefer(full):null,under=full.length>0||token.handle.includes("/")?full:named(handle=>handle.slice(handle.indexOf("/")+1));mention={written,actor,candidates:actor?[]:under},found.set(token.handle,mention)}return mention.actor?`@[${mention.actor.id}]`:null}),mentions:[...found.values()]}}var VERCEL_MARKER=/^\[vc\]: #\S*\r?\n/,LINK=/\[([^\]]+)\]\((https?:\/\/[^)\s]+)\)/g,STATUS=/!\[([^\]]+)\]\(https:\/\/vercel\.com\/static\/status\/[^)]+\)\s*(?:\[[^\]]*\]\((https?:\/\/[^)\s]+)\))?/;function vercelDeployments(text2){if(!VERCEL_MARKER.test(text2))return null;let skippedAt=text2.search(/<details><summary>\d+ Skipped Deployments?<\/summary>/),deployments=[],offset=0;for(let line of text2.split(/\r?\n/)){let at=offset;if(offset=text2.indexOf(`
|
|
12
12
|
`,offset)+1||text2.length,!line.startsWith("|")||/^\|\s*(Project|Name)\s*\|/.test(line)||/^\|\s*:?-/.test(line))continue;let cells=line.split("|").slice(1,-1).map(cell=>cell.trim());if(cells.length<2)continue;let status=STATUS.exec(cells[1]);if(!status)continue;let projectLink=[...cells[0].matchAll(LINK)].at(-1),project=projectLink?.[1]??cells[0].replace(/<[^>]*>/g,"").trim();if(!project)continue;let preview=cells[2]?[...cells[2].matchAll(LINK)].find(link2=>/preview/i.test(link2[1])):void 0,updated=cells[3]?.match(/<relative-time[^>]*>([^<]+)<\/relative-time>/)?.[1]?.trim()??(cells[3]?.replace(/<[^>]*>/g,"").trim()||null),time=cells[3]?.match(/<relative-time[^>]*\sdatetime="([^"]+)"/)?.[1]??null;deployments.push({project,projectUrl:projectLink?.[2]??null,status:status[1].trim(),deploymentUrl:status[2]??null,previewUrl:preview?.[2]??null,updated,updatedAt:time!==null&&!Number.isNaN(Date.parse(time))?time:null,skipped:skippedAt!==-1&&at>skippedAt})}return deployments.length>0?deployments:null}var ICONS={ready:"\u2705",building:"\u23F3",queued:"\u23F3",initializing:"\u23F3",error:"\u274C",failed:"\u274C",canceled:"\u26AA",ignored:"\u26AA"},link=(label,url)=>url?`[${label}](${url})`:label;function formatVercelDeployments(deployments){return deployments.map(d=>`- ${[`${ICONS[d.status.toLowerCase()]??"\u25B2"} **${link(d.project,d.projectUrl)}**`,`${link(d.status,d.deploymentUrl)}${d.skipped?" (skipped)":""}`,...d.previewUrl?[link("Preview",d.previewUrl)]:[],...d.updated?[d.updated]:[]].join(" \xB7 ")}`).join(`
|
|
13
13
|
`)}function byVercelBot(written,author){return written.by.actor==="github:user:35613825"?!0:written.by.profile==="github:user:35613825"&&!!written.from&&author?.kind==="external"&&author.verified===!0&&author.platform==="github"}function displayText(text2,bot){let deployments=bot?vercelDeployments(text2):null;return deployments?`**\u25B2 Vercel**
|
|
14
|
-
${formatVercelDeployments(deployments)}`:text2}export{
|
|
14
|
+
${formatVercelDeployments(deployments)}`:text2}export{sha256,derivedId,DERIVED_ID,keyId,platformProfile,underPrincipal,userIdOf,importedHandle,actorParts,viaText,shownName,waitUntil,afterRetry,DroppedError,runMiddleware,parseSchemaId,canonical,findBlocks,blocksIn,block,extractMentions,isEmail,mentionTerm,mentionTerms,replaceMentions,settleMentions,vercelDeployments,byVercelBot,displayText};
|
|
@@ -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{getSubcommand}from"./chunk-ETV3C2CV.js";import{monitorsCommand,monitorsNotificationsAggregateCommand}from"./chunk-
|
|
7
|
+
import{getSubcommand}from"./chunk-ETV3C2CV.js";import{monitorsCommand,monitorsNotificationsAggregateCommand}from"./chunk-MDRI27KN.js";import{TelemetryClient}from"./chunk-EYRBV6RM.js";import{takeCommand}from"./chunk-INIZJZ3O.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-CSNP5RIM.js";import{warnDeprecatedSubcommand}from"./chunk-KA2KG3SY.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{getFlagsSpecification}from"./chunk-DORCX7UB.js";var MonitorsTelemetryClient=class extends TelemetryClient{trackCliSubcommandLs(actual){this.trackCliSubcommand({subcommand:"ls",value:actual})}trackCliSubcommandSchema(actual){this.trackCliSubcommand({subcommand:"schema",value:actual})}trackCliSubcommandAdd(actual){this.trackCliSubcommand({subcommand:"add",value:actual})}trackCliSubcommandInspect(actual){this.trackCliSubcommand({subcommand:"inspect",value:actual})}trackCliSubcommandRemove(actual){this.trackCliSubcommand({subcommand:"remove",value:actual})}trackCliSubcommandUpdate(actual){this.trackCliSubcommand({subcommand:"update",value:actual})}trackCliSubcommandNotifications(actual){this.trackCliSubcommand({subcommand:"notifications",value:actual})}trackCliOptionType(v){v&&v.length>0&&this.trackCliOption({option:"type",value:v.join(",")})}trackCliFlagAll(v){v&&this.trackCliFlag("all")}trackCliFlagJson(v){v&&this.trackCliFlag("json")}};var MONITORS_CONFIG={ls:["ls","list"],schema:["schema"],add:["add","create"],inspect:["inspect","get"],remove:["remove","rm","delete"],update:["update","patch"],notifications:["notifications"]},monitorsRoutingFlags=getFlagsSpecification([...monitorsCommand.subcommands,...monitorsNotificationsAggregateCommand.subcommands].flatMap(command=>[...command.options]));async function runMonitors(client,argv,api){let{command,args:argsWithoutCommand}=takeCommand(argv,monitorsRoutingFlags),found=command?getSubcommand([command],MONITORS_CONFIG):void 0;if(command&&found?.subcommand==null)return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:`Unknown "monitors" subcommand "${command}".`,next:[{command:buildCommandWithGlobalFlags(client.argv,"monitors --help"),when:"Show valid monitors subcommands"}]},2),output_manager_default.error(`Unknown "monitors" subcommand "${command}". Run \`vercel monitors --help\`.`),2;let resolved=found?.subcommand??"ls",original=found?.subcommandOriginal??"ls",args=found?argsWithoutCommand:argv,telemetry=new MonitorsTelemetryClient({opts:{store:client.telemetryEventStore}});switch(resolved){case"ls":return telemetry.trackCliSubcommandLs(original),(await import("./ls-SY2FW3WA.js")).default(client,args,api,telemetry);case"schema":return telemetry.trackCliSubcommandSchema(original),(await import("./schema-LRRKG2KJ.js")).default(client,args,api);case"add":return telemetry.trackCliSubcommandAdd(original),original==="create"&&warnDeprecatedSubcommand(client,"monitors create","monitors add"),(await import("./add-ORZO4EJ7.js")).default(client,args,api);case"inspect":return telemetry.trackCliSubcommandInspect(original),original==="get"&&warnDeprecatedSubcommand(client,"monitors get","monitors inspect"),(await import("./rule-inspect-USW6K7Y7.js")).default(client,args,api);case"remove":return telemetry.trackCliSubcommandRemove(original),original==="delete"&&warnDeprecatedSubcommand(client,"monitors delete","monitors remove"),(await import("./rm-IQ33QTQ2.js")).default(client,args,api);case"update":return telemetry.trackCliSubcommandUpdate(original),original==="patch"&&warnDeprecatedSubcommand(client,"monitors patch","monitors update"),(await import("./update-LWRCCEXG.js")).default(client,args,api);case"notifications":return(await import("./notifications-LBZ7KWGS.js")).default(client,args,api,telemetry);default:return output_manager_default.error(`Unhandled monitors subcommand: ${String(resolved)}`),1}}export{monitorsRoutingFlags,runMonitors};
|
|
@@ -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{getOrganization}from"./chunk-
|
|
7
|
+
import{getOrganization}from"./chunk-AVXX4Q6S.js";import{budgetPauses,formatUsd,formatUsdWhole,listBudgetProducts,percentUsed}from"./chunk-3VNS4D7V.js";import{table}from"./chunk-U5SZQUYO.js";import{getProjectByNameOrId}from"./chunk-3AFEVHHY.js";import{ProjectNotFound}from"./chunk-QFE3RPMA.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);function webhookLabel(budget){return budget.webhook?budget.webhook.url??"configured (unavailable)":"\u2014"}function scopeCells(budget,names){let{scope,scopeId}=budget;return[scope,scopeId?names?.get(scopeId)??scopeId:"\u2014"]}function printBudgetsTable(budgets,spentFor,names){let spendHeaders=spentFor?["spent","used"]:[],spendAlign=spentFor?["r","r"]:[];return`${table([["type","name","amount",...spendHeaders,"status","pause","webhook"].map(header=>import_chalk.default.gray(header)),...budgets.map(budget=>{let spendCells=[];if(spentFor){let spent=spentFor(budget),used=percentUsed(spent,budget.amount);spendCells.push(spent===null?"\u2014":formatUsd(spent),used===null?"\u2014":`${used}%`)}return[...scopeCells(budget,names),formatUsdWhole(budget.amount),...spendCells,budget.status,budgetPauses(budget)?"yes":"no",webhookLabel(budget)]})],{align:["l","l","r",...spendAlign,"l","l","l"],hsep:4}).replace(/^/gm," ")}
|
|
8
8
|
|
|
9
9
|
`}function warnUnavailableWebhooks(budgets){budgets.some(budget=>budget.webhook&&budget.webhook.url===null)&&output_manager_default.warn("A webhook is configured, but its URL could not be loaded. That is not the same as having no webhook.")}function formatAlertTime(ms){return Number.isFinite(ms)?`${new Date(ms).toISOString().slice(0,16).replace("T"," ")} UTC`:"\u2014"}function formatUsdString(value){let dollars=Number(value);return Number.isFinite(dollars)?formatUsd(dollars):value}function alertThresholdLabel(alert){return`${alert.threshold.percent}%`}function alertActionsLabel(alert){let{sendNotifications,triggerWebhook,pauseUsage}=alert.threshold,actions=[sendNotifications&&"notify",triggerWebhook&&"webhook",pauseUsage&&"pause"].filter(Boolean);return actions.length>0?actions.join(", "):"\u2014"}function printBudgetAlertsTable(alerts,names){return`${table([["date","type","name","threshold","spent","budget amount","actions configured"].map(header=>import_chalk.default.gray(header)),...alerts.map(alert=>[formatAlertTime(alert.triggeredAt),...scopeCells(alert,names),alertThresholdLabel(alert),formatUsdString(alert.spent),formatUsdWhole(alert.budgetAmount),alertActionsLabel(alert)])],{align:["l","l","l","r","r","r","l"],hsep:4}).replace(/^/gm," ")}
|
|
10
10
|
|
|
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{table}from"./chunk-
|
|
7
|
+
import{table}from"./chunk-U5SZQUYO.js";import{require_source}from"./chunk-NB2WLB3J.js";import{require_strip_ansi}from"./chunk-BS32OUOC.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var import_strip_ansi=__toESM(require_strip_ansi(),1);function strlen(str){return(0,import_strip_ansi.default)(str).length}function formatTable(header,align,blocks){let nrCols=header.length,padding=[],out=`
|
|
8
8
|
`;for(let i=0;i<nrCols;i++)padding[i]=blocks.reduce((acc,block)=>{let maxLen=Math.max(...block.rows.map(row=>strlen(`${row[i]}`)));return Math.max(acc,Math.ceil(maxLen/8))},1);for(let block of blocks){block.name&&(out+=`${block.name}
|
|
9
9
|
`);let rows=[header.map(s=>import_chalk.default.dim(s))].concat(block.rows);if(rows.length>0){rows[0][0]=` ${rows[0][0]}`;for(let i=1;i<rows.length;i++){let row=rows[i].slice(0);row[0]=` ${row[0]}`;for(let j=0;j<nrCols;j++){let col=`${row[j]}`,al=align[j]||"l",repeat=padding[j]>1?padding[j]*8-strlen(col):0,pad=repeat>0?" ".repeat(repeat):"";rows[i][j]=al==="l"?col+pad:pad+col}}out+=table(rows,{align,hsep:4})}out+=`
|
|
10
10
|
|
|
@@ -0,0 +1,7 @@
|
|
|
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{__commonJS}from"./chunk-BZENIQ7N.js";var require_ansi_regex=__commonJS({"../../node_modules/.pnpm/ansi-regex@5.0.1/node_modules/ansi-regex/index.js"(exports,module){"use strict";module.exports=({onlyFirst=!1}={})=>{let pattern=["[\\u001B\\u009B][[\\]()#;?]*(?:(?:(?:(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]+)*|[a-zA-Z\\d]+(?:;[-a-zA-Z\\d\\/#&.:=?%@~_]*)*)?\\u0007)","(?:(?:\\d{1,4}(?:;\\d{0,4})*)?[\\dA-PR-TZcf-ntqry=><~]))"].join("|");return new RegExp(pattern,onlyFirst?void 0:"g")}}});var require_strip_ansi=__commonJS({"../../node_modules/.pnpm/strip-ansi@6.0.1/node_modules/strip-ansi/index.js"(exports,module){"use strict";var ansiRegex=require_ansi_regex();module.exports=string=>typeof string=="string"?string.replace(ansiRegex(),""):string}});export{require_strip_ansi};
|
|
@@ -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{TelemetryClient}from"./chunk-
|
|
7
|
+
import{TelemetryClient}from"./chunk-EYRBV6RM.js";var CreatedIdTelemetryClient=class extends TelemetryClient{trackCreatedId(entity,id){this.trackCommandOutput({key:`${entity}-id`,value:id})}};function trackCreatedId(client,entity,id){!id||!client.telemetryEventStore||new CreatedIdTelemetryClient({opts:{store:client.telemetryEventStore}}).trackCreatedId(entity,id)}export{trackCreatedId};
|