@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{packageName}from"./chunk-B4KA3ZH2.js";import{environmentOption,formatOption,jsonOption,projectOption,sinceOption,untilOption}from"./chunk-
|
|
7
|
+
import{packageName}from"./chunk-B4KA3ZH2.js";import{environmentOption,formatOption,jsonOption,projectOption,sinceOption,untilOption}from"./chunk-DORCX7UB.js";var schemaSubcommand={name:"schema",aliases:[],description:"List available metrics or inspect a specific metric.",arguments:[{name:"metric-or-prefix",required:!1}],options:[formatOption,jsonOption],examples:[{name:"List all metrics",value:`${packageName} metrics schema`},{name:"Show metric details",value:`${packageName} metrics schema vercel.function_invocation`},{name:"Schema as JSON for agents",value:`${packageName} metrics schema vercel.request.count --json`}]},DATA_QUERY_EXAMPLE=["{",' "metrics": {',' "errors": {',' "metric": "vercel.function_invocation.count",',' "aggregation": "count",',' "filter": "httpStatus >= 500"'," },",' "total": {',' "metric": "vercel.function_invocation.count",',' "aggregation": "count"'," }"," },",' "formulas": { "errorRate": "errors / total * 100" },',' "outputs": ["errorRate"],',' "groupBy": ["route"],',' "bucketSeconds": 3600,',' "seriesSelection": {',' "limit": 5,',' "mode": "exact",',' "rankBy": [{ "metric": "total", "direction": "desc" }]'," }","}"],VIEWS_PER_VISITOR_QUERY={metrics:{views:{metric:"vercel.analytics.page_view.count",aggregation:"count"},visitors:{metric:"vercel.analytics.page_view.count",aggregation:"unique",dimensions:["visitorId"]}},formulas:{viewsPerVisitor:"views / visitors"}},metricsCommand={name:"metrics",aliases:[],description:"Query observability metrics for your Vercel project or team.",arguments:[{name:"metric-id",required:!1}],subcommands:[{name:"query",aliases:[],description:"",default:!0,hidden:!0,arguments:[],options:[],examples:[]},schemaSubcommand],options:[{name:"aggregation",shorthand:null,deprecatedShorthand:"a",type:String,deprecated:!1,description:"Aggregation function (default: sum for counts/bytes/currency, avg for durations/memory/ratios)",argument:"FN"},{name:"group-by",shorthand:null,type:[String],deprecated:!1,description:"Dimensions to group by (repeatable)",argument:"DIM"},{name:"limit",shorthand:"n",deprecatedShorthand:"l",type:Number,deprecated:!1,description:"Max groups per time bucket (default: 10)",argument:"N"},{name:"order-by",shorthand:null,type:String,deprecated:!1,description:"Order grouped results by value or count (default: count, or value when count is unsupported)",argument:"value|count"},{name:"order",shorthand:null,type:String,deprecated:!1,description:"Order direction for grouped results: asc or desc (default: desc)",argument:"asc|desc"},{name:"query",shorthand:"q",type:[String],deprecated:!1,description:"KQL filter expression (repeatable, ANDed together)",argument:"TEXT"},{name:"filter",shorthand:"f",type:[String],deprecated:!0,description:"Deprecated alias for `--query`",argument:"EXPR"},{name:"data",shorthand:null,type:String,deprecated:!1,description:'Query with several metrics and formulas as JSON, or - to read it from stdin. Replaces the metric argument and query-shape options; --project, --all, --since, and --until still apply. See "Query (--data)" below',argument:"JSON"},{...environmentOption,description:"Limit the query to one environment, such as production or preview"},{name:"prod",shorthand:null,type:Boolean,deprecated:!0,description:"Deprecated alias for `--environment production`"},{...sinceOption,description:`${sinceOption.description} (default: 1h ago)`},untilOption,{name:"granularity",shorthand:null,deprecatedShorthand:"g",type:String,deprecated:!1,description:"Time bucket size: 1m, 5m, 15m, 1h, 4h, 1d (default: auto; raised when too fine for the time range)",argument:"SIZE"},{name:"bucket-timezone",shorthand:null,type:String,deprecated:!1,description:"IANA timezone for calendar bucket alignment only; does not shift --since/--until or output timestamps (e.g., Europe/Paris)",argument:"ZONE"},{...projectOption,shorthand:"p"},{name:"all",shorthand:null,type:Boolean,deprecated:!1,description:"Query across all projects for the team"},formatOption,jsonOption],helpSections:[{title:"Query (--data)",placement:"afterOptions",rows:[{syntax:"metrics.<alias>",description:"Required. { metric, aggregation, filter? } with a KQL filter; also accepts per and normalize, or dimensions for unique"},{syntax:"formulas.<alias>",description:"Arithmetic over metric aliases, such as errors / total"},{syntax:"outputs",description:"Metric or formula aliases to return"},{syntax:"groupBy",description:"Dimensions to split results by"},{syntax:"filter",description:"KQL filter applied to every metric"},{syntax:"bucketSeconds",description:"Bucket width for a time series; omit for totals only"},{syntax:"orderBy, rowLimit",description:"Order and limit a totals-only query"},{syntax:"seriesSelection",description:"Top-N series; needs bucketSeconds and groupBy"},{syntax:"timeRange",description:"{ start, end } in RFC 3339 (default: --since and --until)"},{syntax:"scope",description:"{ ownerId, projectIds? } with IDs, not names (default: the linked project, --project <NAME_OR_ID>, or --all, in the --scope team)"}],body:["",'A unique aggregation counts distinct values of a dimension. Set "aggregation": "unique" with "dimensions", such as ["visitorId"]. The unique/<DIM> form works only with --aggregation.',"",`Run \`${packageName} metrics schema <metric>\` for metric IDs, aggregations, and dimensions. The API reports limits and invalid combinations as errors that name the field.`]},{title:"Query example (--data)",placement:"afterOptions",preformatted:!0,body:[...DATA_QUERY_EXAMPLE,"",{command:`cat query.json | ${packageName} metrics --since 24h --data -`}]}],examples:[{name:"5xx errors by error code in the last hour",value:`${packageName} metrics vercel.function_invocation.count --query "httpStatus >= 500" --group-by errorCode --since 1h`},{name:"Function invocations by HTTP status code",value:`${packageName} metrics vercel.function_invocation.count --group-by httpStatus --since 6h`},{name:"Function duration by route",value:`${packageName} metrics vercel.function_invocation.function_duration_ms --aggregation avg --group-by route --since 1h`},{name:"AI Gateway costs by provider",value:`${packageName} metrics vercel.ai_gateway.request.cost --aggregation sum --group-by aiProvider --since 7d`},{name:"Core Web Vitals (LCP) by route",value:`${packageName} metrics vercel.speed_insights.lcp_ms --aggregation p75 --environment production --group-by route --since 7d`},{name:"Routes with the lowest p75 LCP",value:`${packageName} metrics vercel.speed_insights.lcp_ms --aggregation p75 --environment production --group-by route --since 7d --order-by value --order asc`},{name:"Daily pageviews",value:`${packageName} metrics vercel.analytics.page_view.count --since 7d --granularity 1d`},{name:"Visitors time series from the top 5 countries",value:`${packageName} metrics vercel.analytics.page_view.count --aggregation unique/visitorId --group-by country --since 1d --granularity 1h --limit 5`},{name:"Daily bounced visitors (visitors with exactly one page view)",value:`${packageName} metrics vercel.analytics.page_view.count --aggregation singleton/visitorId --since 7d --granularity 1d`},{name:"Page views per unique visitor with a --data query",value:`${packageName} metrics --project acme-web --since 7d --data '${JSON.stringify(VIEWS_PER_VISITOR_QUERY)}'`},{name:"List available metrics",value:`${packageName} metrics schema`},{name:"Function executions matching an API route",value:`${packageName} metrics vercel.function_invocation.count --query 'route:"/api"' --group-by route --since 1h`},{name:"Function executions matching multiple filters",value:`${packageName} metrics vercel.function_invocation.count --query "httpStatus >= 500" --query 'route:"/api"' --since 1h`},{name:"Show schema for a metric prefix",value:`${packageName} metrics schema vercel.request`},{name:"Team-wide function executions by project",value:`${packageName} metrics --all vercel.function_invocation.count --group-by projectId --since 24h`}]};export{schemaSubcommand,metricsCommand};
|
|
@@ -0,0 +1,25 @@
|
|
|
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_graceful_fs,require_load_json_file,require_pify}from"./chunk-4NTBYNFR.js";import{UNCLASSIFIED_ERROR_CODE,output_manager_default,peekCliError}from"./chunk-RYSO5U3E.js";import{require_signal_exit}from"./chunk-BLUPZPAS.js";import{require_build_utils}from"./chunk-5MDNVAE6.js";import{require_dist}from"./chunk-24SIHFEW.js";import{__commonJS,__require,__toESM}from"./chunk-BZENIQ7N.js";var require_vendors=__commonJS({"../../node_modules/.pnpm/ci-info@4.1.0/node_modules/ci-info/vendors.json"(exports,module){module.exports=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE",pr:{env:"AC_GIT_PR",ne:"false"}},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN",pr:{env:"CODEBUILD_WEBHOOK_EVENT",any:["PULL_REQUEST_CREATED","PULL_REQUEST_UPDATED","PULL_REQUEST_REOPENED"]}},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}]}});var require_ci_info=__commonJS({"../../node_modules/.pnpm/ci-info@4.1.0/node_modules/ci-info/index.js"(exports){"use strict";var vendors=require_vendors(),env=process.env;Object.defineProperty(exports,"_vendors",{value:vendors.map(function(v){return v.constant})});exports.name=null;exports.isPR=null;exports.id=null;vendors.forEach(function(vendor){let isCI=(Array.isArray(vendor.env)?vendor.env:[vendor.env]).every(function(obj){return checkEnv(obj)});exports[vendor.constant]=isCI,isCI&&(exports.name=vendor.name,exports.isPR=checkPR(vendor),exports.id=vendor.constant)});exports.isCI=!!(env.CI!=="false"&&(env.BUILD_ID||env.BUILD_NUMBER||env.CI||env.CI_APP_ID||env.CI_BUILD_ID||env.CI_BUILD_NUMBER||env.CI_NAME||env.CONTINUOUS_INTEGRATION||env.RUN_ID||exports.name));function checkEnv(obj){return typeof obj=="string"?!!env[obj]:"env"in obj?env[obj.env]&&env[obj.env].includes(obj.includes):"any"in obj?obj.any.some(function(k){return!!env[k]}):Object.keys(obj).every(function(k){return env[k]===obj[k]})}function checkPR(vendor){switch(typeof vendor.pr){case"string":return!!env[vendor.pr];case"object":return"env"in vendor.pr?"any"in vendor.pr?vendor.pr.any.some(function(key){return env[vendor.pr.env]===key}):vendor.pr.env in env&&env[vendor.pr.env]!==vendor.pr.ne:"any"in vendor.pr?vendor.pr.any.some(function(key){return!!env[key]}):checkEnv(vendor.pr);default:return null}}}});var require_imurmurhash=__commonJS({"../../node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.js"(exports,module){(function(){var cache;function MurmurHash3(key,seed){var m=this instanceof MurmurHash3?this:cache;if(m.reset(seed),typeof key=="string"&&key.length>0&&m.hash(key),m!==this)return m}MurmurHash3.prototype.hash=function(key){var h1,k1,i,top,len;switch(len=key.length,this.len+=len,k1=this.k1,i=0,this.rem){case 0:k1^=len>i?key.charCodeAt(i++)&65535:0;case 1:k1^=len>i?(key.charCodeAt(i++)&65535)<<8:0;case 2:k1^=len>i?(key.charCodeAt(i++)&65535)<<16:0;case 3:k1^=len>i?(key.charCodeAt(i)&255)<<24:0,k1^=len>i?(key.charCodeAt(i++)&65280)>>8:0}if(this.rem=len+this.rem&3,len-=this.rem,len>0){for(h1=this.h1;k1=k1*11601+(k1&65535)*3432906752&4294967295,k1=k1<<15|k1>>>17,k1=k1*13715+(k1&65535)*461832192&4294967295,h1^=k1,h1=h1<<13|h1>>>19,h1=h1*5+3864292196&4294967295,!(i>=len);)k1=key.charCodeAt(i++)&65535^(key.charCodeAt(i++)&65535)<<8^(key.charCodeAt(i++)&65535)<<16,top=key.charCodeAt(i++),k1^=(top&255)<<24^(top&65280)>>8;switch(k1=0,this.rem){case 3:k1^=(key.charCodeAt(i+2)&65535)<<16;case 2:k1^=(key.charCodeAt(i+1)&65535)<<8;case 1:k1^=key.charCodeAt(i)&65535}this.h1=h1}return this.k1=k1,this},MurmurHash3.prototype.result=function(){var k1,h1;return k1=this.k1,h1=this.h1,k1>0&&(k1=k1*11601+(k1&65535)*3432906752&4294967295,k1=k1<<15|k1>>>17,k1=k1*13715+(k1&65535)*461832192&4294967295,h1^=k1),h1^=this.len,h1^=h1>>>16,h1=h1*51819+(h1&65535)*2246770688&4294967295,h1^=h1>>>13,h1=h1*44597+(h1&65535)*3266445312&4294967295,h1^=h1>>>16,h1>>>0},MurmurHash3.prototype.reset=function(seed){return this.h1=typeof seed=="number"?seed:0,this.rem=this.k1=this.len=0,this},cache=new MurmurHash3,typeof module<"u"?module.exports=MurmurHash3:this.MurmurHash3=MurmurHash3})()}});var require_write_file_atomic=__commonJS({"../../node_modules/.pnpm/write-file-atomic@2.4.3/node_modules/write-file-atomic/index.js"(exports,module){"use strict";module.exports=writeFile;module.exports.sync=writeFileSync2;module.exports._getTmpname=getTmpname;module.exports._cleanupOnExit=cleanupOnExit;var fs=require_graceful_fs(),MurmurHash3=require_imurmurhash(),onExit=require_signal_exit(),path=__require("path"),activeFiles={},threadId=function(){try{var workerThreads=__require("worker_threads");return workerThreads.threadId}catch{return 0}}(),invocations=0;function getTmpname(filename){return filename+"."+MurmurHash3(__filename).hash(String(process.pid)).hash(String(threadId)).hash(String(++invocations)).result()}function cleanupOnExit(tmpfile){return function(){try{fs.unlinkSync(typeof tmpfile=="function"?tmpfile():tmpfile)}catch{}}}function writeFile(filename,data,options,callback){options?options instanceof Function?(callback=options,options={}):typeof options=="string"&&(options={encoding:options}):options={};var Promise2=options.Promise||global.Promise,truename,fd,tmpfile,removeOnExitHandler=onExit(cleanupOnExit(()=>tmpfile)),absoluteName=path.resolve(filename);new Promise2(function(resolve){activeFiles[absoluteName]||(activeFiles[absoluteName]=[]),activeFiles[absoluteName].push(resolve),activeFiles[absoluteName].length===1&&resolve()}).then(function(){return new Promise2(function(resolve){fs.realpath(filename,function(_,realname){truename=realname||filename,tmpfile=getTmpname(truename),resolve()})})}).then(function(){return new Promise2(function(resolve){options.mode&&options.chown?resolve():fs.stat(truename,function(err,stats){err||!stats||(options=Object.assign({},options),options.mode==null&&(options.mode=stats.mode),options.chown==null&&process.getuid&&(options.chown={uid:stats.uid,gid:stats.gid})),resolve()})})}).then(function(){return new Promise2(function(resolve,reject){fs.open(tmpfile,"w",options.mode,function(err,_fd){fd=_fd,err?reject(err):resolve()})})}).then(function(){return new Promise2(function(resolve,reject){Buffer.isBuffer(data)?fs.write(fd,data,0,data.length,0,function(err){err?reject(err):resolve()}):data!=null?fs.write(fd,String(data),0,String(options.encoding||"utf8"),function(err){err?reject(err):resolve()}):resolve()})}).then(function(){return new Promise2(function(resolve,reject){options.fsync!==!1?fs.fsync(fd,function(err){err?fs.close(fd,()=>reject(err)):fs.close(fd,resolve)}):fs.close(fd,resolve)})}).then(function(){if(fd=null,options.chown)return new Promise2(function(resolve,reject){fs.chown(tmpfile,options.chown.uid,options.chown.gid,function(err){err?reject(err):resolve()})})}).then(function(){if(options.mode)return new Promise2(function(resolve,reject){fs.chmod(tmpfile,options.mode,function(err){err?reject(err):resolve()})})}).then(function(){return new Promise2(function(resolve,reject){fs.rename(tmpfile,truename,function(err){err?reject(err):resolve()})})}).then(function(){removeOnExitHandler(),callback()},function(err){return new Promise2(resolve=>fd?fs.close(fd,resolve):resolve()).then(()=>{removeOnExitHandler(),fs.unlink(tmpfile,function(){callback(err)})})}).then(function(){activeFiles[absoluteName].shift(),activeFiles[absoluteName].length>0?activeFiles[absoluteName][0]():delete activeFiles[absoluteName]})}function writeFileSync2(filename,data,options){typeof options=="string"?options={encoding:options}:options||(options={});try{filename=fs.realpathSync(filename)}catch{}var tmpfile=getTmpname(filename);if(!options.mode||!options.chown)try{var stats=fs.statSync(filename);options=Object.assign({},options),options.mode||(options.mode=stats.mode),!options.chown&&process.getuid&&(options.chown={uid:stats.uid,gid:stats.gid})}catch{}var fd,cleanup=cleanupOnExit(tmpfile),removeOnExitHandler=onExit(cleanup);try{fd=fs.openSync(tmpfile,"w",options.mode),Buffer.isBuffer(data)?fs.writeSync(fd,data,0,data.length,0):data!=null&&fs.writeSync(fd,String(data),0,String(options.encoding||"utf8")),options.fsync!==!1&&fs.fsyncSync(fd),fs.closeSync(fd),options.chown&&fs.chownSync(tmpfile,options.chown.uid,options.chown.gid),options.mode&&fs.chmodSync(tmpfile,options.mode),fs.renameSync(tmpfile,filename),removeOnExitHandler()}catch(err){if(fd)try{fs.closeSync(fd)}catch{}throw removeOnExitHandler(),cleanup(),err}}}});var require_is_plain_obj=__commonJS({"../../node_modules/.pnpm/is-plain-obj@1.1.0/node_modules/is-plain-obj/index.js"(exports,module){"use strict";var toString=Object.prototype.toString;module.exports=function(x){var prototype;return toString.call(x)==="[object Object]"&&(prototype=Object.getPrototypeOf(x),prototype===null||prototype===Object.getPrototypeOf({}))}}});var require_sort_keys=__commonJS({"../../node_modules/.pnpm/sort-keys@1.1.2/node_modules/sort-keys/index.js"(exports,module){"use strict";var isPlainObj=require_is_plain_obj();module.exports=function(obj,opts){if(!isPlainObj(obj))throw new TypeError("Expected a plain object");opts=opts||{},typeof opts=="function"&&(opts={compare:opts});var deep=opts.deep,seenInput=[],seenOutput=[],sortKeys=function(x){var seenIndex=seenInput.indexOf(x);if(seenIndex!==-1)return seenOutput[seenIndex];var ret={},keys=Object.keys(x).sort(opts.compare);seenInput.push(x),seenOutput.push(ret);for(var i=0;i<keys.length;i++){var key=keys[i],val=x[key];ret[key]=deep&&isPlainObj(val)?sortKeys(val):val}return ret};return sortKeys(obj)}}});var require_pify2=__commonJS({"../../node_modules/.pnpm/pify@3.0.0/node_modules/pify/index.js"(exports,module){"use strict";var processFn=(fn,opts)=>function(){let P=opts.promiseModule,args=new Array(arguments.length);for(let i=0;i<arguments.length;i++)args[i]=arguments[i];return new P((resolve,reject)=>{opts.errorFirst?args.push(function(err,result){if(opts.multiArgs){let results=new Array(arguments.length-1);for(let i=1;i<arguments.length;i++)results[i-1]=arguments[i];err?(results.unshift(err),reject(results)):resolve(results)}else err?reject(err):resolve(result)}):args.push(function(result){if(opts.multiArgs){let results=new Array(arguments.length-1);for(let i=0;i<arguments.length;i++)results[i]=arguments[i];resolve(results)}else resolve(result)}),fn.apply(this,args)})};module.exports=(obj,opts)=>{opts=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},opts);let filter=key=>{let match=pattern=>typeof pattern=="string"?key===pattern:pattern.test(key);return opts.include?opts.include.some(match):!opts.exclude.some(match)},ret;typeof obj=="function"?ret=function(){return opts.excludeMain?obj.apply(this,arguments):processFn(obj,opts).apply(this,arguments)}:ret=Object.create(Object.getPrototypeOf(obj));for(let key in obj){let x=obj[key];ret[key]=typeof x=="function"&&filter(key)?processFn(x,opts):x}return ret}}});var require_make_dir=__commonJS({"../../node_modules/.pnpm/make-dir@1.3.0/node_modules/make-dir/index.js"(exports,module){"use strict";var fs=__require("fs"),path=__require("path"),pify=require_pify2(),defaults={mode:511&~process.umask(),fs},checkPath=pth=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(pth.replace(path.parse(pth).root,""))){let err=new Error(`Path contains invalid characters: ${pth}`);throw err.code="EINVAL",err}};module.exports=(input,opts)=>Promise.resolve().then(()=>{checkPath(input),opts=Object.assign({},defaults,opts);let mkdir=pify(opts.fs.mkdir),stat=pify(opts.fs.stat),make=pth=>mkdir(pth,opts.mode).then(()=>pth).catch(err=>{if(err.code==="ENOENT"){if(err.message.includes("null bytes")||path.dirname(pth)===pth)throw err;return make(path.dirname(pth)).then(()=>make(pth))}return stat(pth).then(stats=>stats.isDirectory()?pth:Promise.reject()).catch(()=>{throw err})});return make(path.resolve(input))});module.exports.sync=(input,opts)=>{checkPath(input),opts=Object.assign({},defaults,opts);let make=pth=>{try{opts.fs.mkdirSync(pth,opts.mode)}catch(err){if(err.code==="ENOENT"){if(err.message.includes("null bytes")||path.dirname(pth)===pth)throw err;return make(path.dirname(pth)),make(pth)}try{if(!opts.fs.statSync(pth).isDirectory())throw new Error("The path is not a directory")}catch{throw err}}return pth};return make(path.resolve(input))}}});var require_detect_indent=__commonJS({"../../node_modules/.pnpm/detect-indent@5.0.0/node_modules/detect-indent/index.js"(exports,module){"use strict";var INDENT_RE=/^(?:( )+|\t+)/;function getMostUsed(indents){let result=0,maxUsed=0,maxWeight=0;for(let entry of indents){let key=entry[0],val=entry[1],u=val[0],w=val[1];(u>maxUsed||u===maxUsed&&w>maxWeight)&&(maxUsed=u,maxWeight=w,result=Number(key))}return result}module.exports=str=>{if(typeof str!="string")throw new TypeError("Expected a string");let tabs=0,spaces=0,prev=0,indents=new Map,current,isIndent;for(let line of str.split(/\n/g)){if(!line)continue;let indent2,matches=line.match(INDENT_RE);matches?(indent2=matches[0].length,matches[1]?spaces++:tabs++):indent2=0;let diff=indent2-prev;prev=indent2,diff?(isIndent=diff>0,current=indents.get(isIndent?diff:-diff),current?current[0]++:(current=[1,0],indents.set(diff,current))):current&&(current[1]+=Number(isIndent))}let amount=getMostUsed(indents),type,indent;return amount?spaces>=tabs?(type="space",indent=" ".repeat(amount)):(type="tab",indent=" ".repeat(amount)):(type=null,indent=""),{amount,type,indent}}}});var require_write_json_file=__commonJS({"../../node_modules/.pnpm/write-json-file@2.2.0/node_modules/write-json-file/index.js"(exports,module){"use strict";var path=__require("path"),fs=require_graceful_fs(),writeFileAtomic=require_write_file_atomic(),sortKeys=require_sort_keys(),makeDir=require_make_dir(),pify=require_pify(),detectIndent=require_detect_indent(),init=(fn,fp,data,opts)=>{if(!fp)throw new TypeError("Expected a filepath");if(data===void 0)throw new TypeError("Expected data to stringify");return opts=Object.assign({indent:" ",sortKeys:!1},opts),opts.sortKeys&&(data=sortKeys(data,{deep:!0,compare:typeof opts.sortKeys=="function"&&opts.sortKeys})),fn(fp,data,opts)},readFile=fp=>pify(fs.readFile)(fp,"utf8").catch(()=>{}),main=(fp,data,opts)=>(opts.detectIndent?readFile(fp):Promise.resolve()).then(str=>{let indent=str?detectIndent(str).indent:opts.indent,json=JSON.stringify(data,opts.replacer,indent);return pify(writeFileAtomic)(fp,`${json}
|
|
8
|
+
`,{mode:opts.mode})}),mainSync=(fp,data,opts)=>{let indent=opts.indent;if(opts.detectIndent)try{let file=fs.readFileSync(fp,"utf8");indent=detectIndent(file).indent}catch(err){if(err.code!=="ENOENT")throw err}let json=JSON.stringify(data,opts.replacer,indent);return writeFileAtomic.sync(fp,`${json}
|
|
9
|
+
`,{mode:opts.mode})};module.exports=(fp,data,opts)=>makeDir(path.dirname(fp),{fs}).then(()=>init(main,fp,data,opts));module.exports.sync=(fp,data,opts)=>{makeDir.sync(path.dirname(fp),{fs}),init(mainSync,fp,data,opts)}}});var import_ci_info=__toESM(require_ci_info(),1);var launchTargets=["cli-support","darwin-arm64","darwin-x64","linux-arm64","linux-arm64-musl","linux-x64","linux-x64-musl","win32-arm64","win32-x64"],launchFallbackReasons=["target_missing","ENOENT","EACCES","ENOEXEC","EPERM","EFTYPE","UNKNOWN","inherited_native_env","download_failed","cache_unwritable","cache_unresolved","not_in_node_modules"],launchSources=["download","cache"],nativePackageStates=["not_found","other_version","no_binary"],cacheErrors=["import","path"],installKinds=["npx","pnpm_dlx","bunx","project","global"];function nodeMajor(value){return typeof value=="string"&&/^\d{1,3}$/.test(value)?value:"other"}var downloadErrors=["timed_out","proxy_refused","proxy_auth_required","dns","connection_refused","connection_reset","connect_timeout","network","tls","http_403","http_404","http_other","checksum_mismatch","bad_metadata","no_binary","binary_did_not_start","binary_killed","binary_exited","version_mismatch","filesystem","other"],downloadPhases=["setup","metadata","tarball","extract","check","install"],downloadCodes=["ENOTFOUND","EAI_AGAIN","ECONNREFUSED","ECONNRESET","ETIMEDOUT","EHOSTUNREACH","ENETUNREACH","ENETDOWN","EPIPE","UND_ERR_CONNECT_TIMEOUT","UND_ERR_HEADERS_TIMEOUT","UND_ERR_BODY_TIMEOUT","UND_ERR_SOCKET","EACCES","EPERM","ENOSPC","EROFS","EEXIST","ENOENT","EISDIR","ENOTDIR","EDQUOT","EMFILE","Z_DATA_ERROR","Z_BUF_ERROR","SELF_SIGNED_CERT_IN_CHAIN","DEPTH_ZERO_SELF_SIGNED_CERT","UNABLE_TO_GET_ISSUER_CERT_LOCALLY","UNABLE_TO_VERIFY_LEAF_SIGNATURE","CERT_HAS_EXPIRED","ERR_TLS_CERT_ALTNAME_INVALID","ENOEXEC","E2BIG","SIGKILL","SIGTERM","SIGABRT","SIGSEGV","SIGBUS","SIGILL","SIGTRAP"],downloadTimeouts=["metadata","stall","total"],downloadAttempts=["1","2"],downloadFailures=["1","2","3_or_more"],downloadProgress=["none","under_half","over_half","complete","unknown"],launchValues=["native","cli-support","other","true","false","default","custom",...launchTargets,...launchFallbackReasons,...launchSources,...nativePackageStates,...installKinds,...cacheErrors,...downloadErrors,...downloadPhases,...downloadCodes,...downloadTimeouts,...downloadAttempts,...downloadFailures,...downloadProgress];function oneOf(value,allowed){return typeof value=="string"&&allowed.includes(value)?value:"other"}function readLaunch(){let launch=globalThis[Symbol.for("vercel.cli.launch")];if(launch?.runtime==="native")return launch.source===void 0?{runtime:"native"}:{runtime:"native",source:oneOf(launch.source,launchSources),...launch.downloadAttempts!==void 0&&{downloadAttempts:oneOf(launch.downloadAttempts,downloadAttempts)}};if(launch?.runtime==="cli-support")return launch.reason===void 0?{runtime:"cli-support"}:{runtime:"cli-support",...launch.target!==void 0&&{target:oneOf(launch.target,launchTargets)},reason:oneOf(launch.reason,launchFallbackReasons),...launch.nativePackage!==void 0&&{nativePackage:oneOf(launch.nativePackage,nativePackageStates)},...launch.cacheError!==void 0&&{cacheError:oneOf(launch.cacheError,cacheErrors)},...launch.install!==void 0&&{install:oneOf(launch.install,installKinds)},...launch.nodeMajor!==void 0&&{nodeMajor:nodeMajor(launch.nodeMajor)},...launch.downloadError!==void 0&&{downloadError:oneOf(launch.downloadError,downloadErrors)},...launch.downloadPhase!==void 0&&{downloadPhase:oneOf(launch.downloadPhase,downloadPhases)},...launch.downloadCode!==void 0&&{downloadCode:oneOf(launch.downloadCode,downloadCodes)},...launch.downloadAttempts!==void 0&&{downloadAttempts:oneOf(launch.downloadAttempts,downloadAttempts)},...launch.downloadFailures!==void 0&&{downloadFailures:oneOf(launch.downloadFailures,downloadFailures)},...launch.downloadTimeout!==void 0&&{downloadTimeout:oneOf(launch.downloadTimeout,downloadTimeouts)},...launch.downloadProgress!==void 0&&{downloadProgress:oneOf(launch.downloadProgress,downloadProgress)},...launch.downloadProxy!==void 0&&{downloadProxy:oneOf(launch.downloadProxy,["true","false"])},...launch.npmRegistry!==void 0&&{npmRegistry:oneOf(launch.npmRegistry,["default","custom"])},...launch.npmProxy!==void 0&&{npmProxy:oneOf(launch.npmProxy,["true","false"])},...launch.npmTls!==void 0&&{npmTls:oneOf(launch.npmTls,["true","false"])}}}function launchTags(launch){return launch?launch.runtime==="native"?{launcher:"native",...launch.source&&{launcher_source:launch.source}}:launch.reason?{launcher:"cli-support",...launch.target&&{launcher_target:launch.target},launcher_fallback:launch.reason,...launch.downloadError&&{launcher_download_error:launch.downloadError}}:{launcher:"cli-support"}:{}}var BRIDGE_TAG=/^[a-zA-Z0-9_.:-]{1,80}$/,ERROR_CODE=/^[A-Za-z][A-Za-z0-9_-]{0,79}$/;function getStartupDurationMs(excludedMs=0){let entryAt=Reflect.get(globalThis,Symbol.for("vercel.cli.entry-at"));return typeof entryAt=="number"?Math.max(0,performance.now()-entryAt-excludedMs):void 0}function getOutcome({exitCode,completion}){return exitCode===130?"canceled":exitCode!==0?"failure":completion==="process_exit"?"unknown":"success"}function toCommandTrace(event,context){let tags={command:context.command,invocation_id:context.invocationId,cli_version:context.cliVersion,release_channel:context.releaseChannel,platform:process.platform,arch:process.arch,is_agent:String(context.isAgent),exit_code:String(context.exitCode),completion:context.completion,outcome:getOutcome(context)};if(tags.outcome==="failure"){let details=peekCliError();tags.error_code=details?.code&&ERROR_CODE.test(details.code)?details.code:UNCLASSIFIED_ERROR_CODE,tags.error_source=context.errorSource??(details?"recorded":"unknown")}return context.agentName&&BRIDGE_TAG.test(context.agentName)&&(tags.agent_name=context.agentName),import_ci_info.default.id&&(tags.ci=import_ci_info.default.id),context.subcommand&&BRIDGE_TAG.test(context.subcommand)&&(tags.subcommand=context.subcommand),context.startupDurationMs!==void 0&&(tags.startup_duration_ms=context.startupDurationMs.toFixed(3)),Object.assign(tags,launchTags(readLaunch())),{id:event.id,name:event.name,timestamp:event.timestamp,startTime:event.startTime,duration:event.duration,tags}}var SPAN_NAME=/^vc(?:\.[a-zA-Z0-9_.]{1,77})?$/,safeCount=value=>/^(0|[1-9][0-9]{0,15})$/.test(value)&&Number.isSafeInteger(Number(value))?value:void 0,SAFE_TAGS={phase:value=>BRIDGE_TAG.test(value)?value:void 0,http_method:value=>/^[A-Z]{1,7}$/.test(value)?value:void 0,http_route:value=>/^[a-z0-9/:*_-]{1,80}$/i.test(value)?value:void 0,http_status_code:value=>/^[1-5][0-9]{2}$/.test(value)?value:void 0,error:()=>"true",file_count:safeCount,byte_count:safeCount,function_count:safeCount,layer_count:safeCount,attempt:safeCount,dropped_spans:safeCount,cache_hit:value=>["true","false"].includes(value)?value:void 0,deployment_state:value=>["INITIALIZING","ANALYZING","BUILDING","DEPLOYING","READY","QUEUED","CANCELED","ERROR"].includes(value)?value:void 0},MAX_SPANS=1e3;function localWaterfall(command,events){let runId=command.parentId;if(!runId)return[];let candidates=events.filter(event=>event.name!=="vc.cli.command"&&event.id!==runId&&SPAN_NAME.test(event.name)),byId=new Map(candidates.map(event=>[event.id,event])),selected=new Map;for(let span of candidates){let chain=[],seen=new Set,current=span,complete=!1;for(;current&&!(seen.has(current.id)||chain.length>=31);){if(seen.add(current.id),chain.push(current),current.parentId===runId||current.parentId===command.id){complete=!0;break}current=byId.get(current.parentId??"")}let missing=chain.filter(ancestor=>!selected.has(ancestor.id));if(!(!complete||selected.size+missing.length>MAX_SPANS))for(let ancestor of missing.reverse())selected.set(ancestor.id,ancestor)}let commandEnd=command.timestamp+command.duration,spans=[...selected.values()].sort((a,b)=>a.timestamp-b.timestamp).map(span=>({id:span.id,name:span.name,timestamp:span.timestamp,startTime:span.startTime,duration:span.duration,parentId:span.parentId===runId&&span.timestamp>=command.timestamp&&span.timestamp<commandEnd?command.id:span.parentId,tags:Object.fromEntries(Object.entries(SAFE_TAGS).flatMap(([key,safe])=>{let value=span.tags[key]&&safe(span.tags[key]);return value?[[key,value]]:[]}))}));if(!spans.length)return[];let start=Math.min(command.timestamp,...spans.map(span=>span.timestamp)),end=Math.max(command.timestamp+command.duration,...spans.map(span=>span.timestamp+span.duration));return[{id:runId,name:"vc.cli.run",timestamp:start,startTime:command.startTime+Math.floor((start-command.timestamp)/1e3),duration:end-start,tags:selected.size<candidates.length?{dropped_spans:String(candidates.length-selected.size)}:{}},...spans]}import{randomUUID}from"node:crypto";function timings(){return Reflect.get(globalThis,Symbol.for("vercel.cli.startup-timings"))}function markStartup(phase){timings()?.marks.push({phase,timestamp:Number(process.hrtime.bigint()/BigInt(1e3))})}function startupEvents(command){let marks=timings()?.marks.filter(mark=>mark.timestamp<=command.timestamp);if(!marks?.length||!command.parentId)return[];let group={id:randomUUID(),parentId:command.parentId,name:"vc.cli.startup",timestamp:marks[0].timestamp,startTime:command.startTime+Math.floor((marks[0].timestamp-command.timestamp)/1e3),duration:command.timestamp-marks[0].timestamp,tags:{}};return[group,...marks.map((mark,index)=>({id:randomUUID(),parentId:group.id,name:`vc.cli.startup.${mark.phase}`,timestamp:mark.timestamp,startTime:command.startTime+Math.floor((mark.timestamp-command.timestamp)/1e3),duration:(marks[index+1]?.timestamp??command.timestamp)-mark.timestamp,tags:{}}))]}import{randomUUID as randomUUID3}from"node:crypto";import os from"node:os";var import_constants=__toESM(require_dist(),1),import_build_utils=__toESM(require_build_utils(),1);import{spawn}from"node:child_process";var import_load_json_file=__toESM(require_load_json_file(),1),import_write_json_file=__toESM(require_write_json_file(),1);import{randomUUID as randomUUID2}from"node:crypto";import{mkdirSync,renameSync,rmSync,writeFileSync}from"node:fs";import{dirname}from"node:path";import{readdirSync}from"node:fs";function isLibc(value){return value==="glibc"||value==="musl"}function hasMuslLoader(){try{return readdirSync("/lib").some(name=>name.startsWith("ld-musl-")&&name.endsWith(".so.1"))}catch{return!1}}function detectLibcFromReport(){let report=process.report;if(!report||typeof report.getReport!="function")return;let originalExcludeNetwork=report.excludeNetwork;try{report.excludeNetwork=!0;let{header}=report.getReport();return header?.glibcVersionRuntime?"glibc":"musl"}catch{return}finally{report.excludeNetwork=originalExcludeNetwork}}function detectLibc(){if(process.platform==="linux")return detectLibcFromReport()??(hasMuslLoader()?"musl":"glibc")}var DEFAULT_CLI_SESSION_INACTIVITY_TIMEOUT_MS=30*60*1e3,DEFAULT_CLI_SESSION_MAX_LIFETIME_MS=24*60*60*1e3;function isPersistedCliSession(value){if(!value||typeof value!="object")return!1;let session=value;return typeof session.id=="string"&&typeof session.createdAt=="number"&&Number.isFinite(session.createdAt)&&typeof session.lastSeenAt=="number"&&Number.isFinite(session.lastSeenAt)}function isPersistedCliDevice(value){if(!value||typeof value!="object")return!1;let device=value;return typeof device.id=="string"&&(device.libc===void 0||isLibc(device.libc))}function readPersistedCliSession(filePath){try{let session=import_load_json_file.default.sync(filePath);return isPersistedCliSession(session)?session:null}catch{return null}}function writePersistedCliSession(filePath,session){let temporaryPath=`${filePath}.${process.pid}.${randomUUID2()}.tmp`;try{mkdirSync(dirname(filePath),{recursive:!0}),writeFileSync(temporaryPath,`${JSON.stringify(session,null,2)}
|
|
10
|
+
`,{flag:"wx",mode:384}),renameSync(temporaryPath,filePath)}catch{}finally{try{rmSync(temporaryPath,{force:!0})}catch{}}}function readPersistedCliDevice(filePath){try{let device=import_load_json_file.default.sync(filePath);return isPersistedCliDevice(device)?device:null}catch{return null}}function writePersistedCliDevice(filePath,device){try{mkdirSync(dirname(filePath),{recursive:!0}),import_write_json_file.default.sync(filePath,device,{indent:2})}catch{}}function getOrCreatePersistedCliSession(opts){let now=opts.now?.()??Date.now(),inactivityTimeoutMs=opts.inactivityTimeoutMs??DEFAULT_CLI_SESSION_INACTIVITY_TIMEOUT_MS,maxLifetimeMs=opts.maxLifetimeMs??DEFAULT_CLI_SESSION_MAX_LIFETIME_MS,existing=readPersistedCliSession(opts.filePath),session=existing&&now-existing.lastSeenAt<=inactivityTimeoutMs&&now-existing.createdAt<=maxLifetimeMs?{...existing,lastSeenAt:now}:{id:randomUUID2(),createdAt:now,lastSeenAt:now};return writePersistedCliSession(opts.filePath,session),session}function touchPersistedCliSession(opts,session){let nextSession={...session,lastSeenAt:opts.now?.()??Date.now()};return writePersistedCliSession(opts.filePath,nextSession),nextSession}function getOrCreatePersistedCliDevice(opts){let existing=readPersistedCliDevice(opts.filePath);if(existing?.libc)return existing;let libc=(opts.detectLibc??detectLibc)(),device={id:existing?.id??randomUUID2(),...libc?{libc}:{}};return(!existing||libc)&&writePersistedCliDevice(opts.filePath,device),device}import{gzipSync,gunzipSync}from"node:zlib";var COMPRESSION_THRESHOLD=64*1024,MAX_DECOMPRESSED_BYTES=4*1024*1024;function encodeHandoff(payload){let serialized=JSON.stringify(payload),bytes=Buffer.byteLength(serialized);return bytes>COMPRESSION_THRESHOLD&&bytes<=MAX_DECOMPRESSED_BYTES?gzipSync(serialized,{level:1}):serialized}function decodeHandoff(bytes){return(bytes[0]===31&&bytes[1]===139?gunzipSync(new Uint8Array(bytes),{maxOutputLength:MAX_DECOMPRESSED_BYTES}):bytes).toString("utf8")}var LogLabel="['telemetry']:",MAX_ERROR_SERVER_MESSAGE_LENGTH=500,TelemetryClient=class{constructor({opts}){this.redactedValue="[REDACTED]";this.noValueToTriggerPrompt="[TRIGGER_PROMPT]";this.redactedArgumentsLength=args=>args&&args.length===1?"ONE":args.length>1?"MANY":"NONE";this.redactedTargetName=target=>import_constants.PROJECT_ENV_TARGET.includes(target)?target:this.redactedValue;this.isDebug=opts.isDebug||!1,this.store=opts.store}track(eventData){this.isDebug&&output_manager_default.debug(`${LogLabel} ${eventData.key}:${eventData.value}`);let event={id:randomUUID3(),eventTime:Date.now(),...eventData};this.store.add(event)}trackCliCommand(eventData){this.track({key:`command:${eventData.command}`,value:eventData.value})}trackCliSubcommand(eventData){this.store.commandSubcommand=eventData.subcommand,this.track({key:`subcommand:${eventData.subcommand}`,value:eventData.value})}trackCliArgument(eventData){eventData.value&&this.track({key:`argument:${eventData.arg}`,value:eventData.value})}trackCliOption(eventData){this.track({key:`option:${eventData.option}`,value:eventData.value})}trackRedactedCliOption(option,value){value&&this.trackCliOption({option,value:this.redactedValue})}trackTargetEnvironment(targetEnvironment){this.track({key:"target_environment",value:targetEnvironment})}trackCommandOutput(eventData){this.track({key:`output:${eventData.key}`,value:eventData.value})}trackCliFlag(flag){this.track({key:`flag:${flag}`,value:"TRUE"})}trackDeprecatedShorthand(shorthand){this.track({key:"deprecated_shorthand",value:shorthand})}trackOidcTokenRefresh(count){this.track({key:"oidc-token-refresh",value:`${count}`})}trackDpopKeyStorage(storage){this.track({key:"dpop-key",value:storage})}trackPluginInstall(agent,status){this.track({key:`plugin_install:${agent}`,value:status})}trackPluginOffer(outcome){this.track({key:"plugin_offer",value:outcome})}trackCPUs(){this.track({key:"cpu_count",value:String(os.cpus().length)})}trackAgenticUse(agent){agent&&this.track({key:"agent",value:agent})}trackPlatform(){this.track({key:"platform",value:os.platform()})}trackArch(){this.track({key:"arch",value:os.arch()})}trackLibc(libc){libc&&this.track({key:"libc",value:libc})}trackLaunch(launch){this.track({key:"launcher",value:launch.runtime}),launch.runtime==="native"&&launch.source&&this.track({key:"launcher_source",value:launch.source}),launch.runtime==="native"&&launch.downloadAttempts&&this.track({key:"launcher_download_attempts",value:launch.downloadAttempts}),!(launch.runtime!=="cli-support"||!launch.reason)&&(launch.target&&this.track({key:"launcher_target",value:launch.target}),this.track({key:"launcher_fallback",value:launch.reason}),launch.nativePackage&&this.track({key:"launcher_native_package",value:launch.nativePackage}),launch.cacheError&&this.track({key:"launcher_cache_error",value:launch.cacheError}),launch.install&&this.track({key:"launcher_install",value:launch.install}),launch.nodeMajor&&this.track({key:"launcher_node_major",value:launch.nodeMajor}),launch.downloadError&&this.track({key:"launcher_download_error",value:launch.downloadError}),launch.downloadAttempts&&this.track({key:"launcher_download_attempts",value:launch.downloadAttempts}),launch.downloadFailures&&this.track({key:"launcher_download_failures",value:launch.downloadFailures}),launch.downloadPhase&&this.track({key:"launcher_download_phase",value:launch.downloadPhase}),launch.downloadCode&&this.track({key:"launcher_download_code",value:launch.downloadCode}),launch.downloadTimeout&&this.track({key:"launcher_download_timeout",value:launch.downloadTimeout}),launch.downloadProgress&&this.track({key:"launcher_download_progress",value:launch.downloadProgress}),launch.downloadProxy&&this.track({key:"launcher_download_proxy",value:launch.downloadProxy}),launch.npmRegistry&&this.track({key:"launcher_npm_registry",value:launch.npmRegistry}),launch.npmProxy&&this.track({key:"launcher_npm_proxy",value:launch.npmProxy}),launch.npmTls&&this.track({key:"launcher_npm_tls",value:launch.npmTls}))}trackCI(ciVendorName){ciVendorName&&this.track({key:"ci",value:ciVendorName})}trackStdinIsTTY(isTTY){this.track({key:"stdin_is_tty",value:isTTY?"true":"false"})}trackVersion(version){version&&this.track({key:"version",value:version})}trackDefaultDeploy(){this.track({key:"default-deploy",value:"TRUE"})}trackProjectId(projectId){projectId&&this.track({key:"project_id",value:projectId})}trackInvocationId(invocationId){invocationId&&this.track({key:"invocation_id",value:invocationId})}trackDeviceId(deviceId){deviceId&&this.track({key:"device_id",value:deviceId})}trackVercelPluginActiveSession(){this.track({key:"vercel_plugin_active_session",value:"TRUE"})}trackVercelPluginVersion(version){version&&this.track({key:"vercel_plugin_version",value:version})}trackErrorStatus(status){typeof status<"u"&&this.track({key:"error_status",value:String(status)})}trackErrorCode(code){code&&this.track({key:"error_code",value:code})}trackErrorSlug(slug){slug&&this.track({key:"error_slug",value:slug})}trackErrorAction(action){action&&this.track({key:"error_action",value:action})}trackErrorServerMessage(serverMessage){if(serverMessage){let normalizedServerMessage=serverMessage.trim().replace(/\s+/g," ");this.track({key:"error_server_message",value:normalizedServerMessage.slice(0,MAX_ERROR_SERVER_MESSAGE_LENGTH)})}}trackExtension(){this.track({key:"extension",value:this.redactedValue})}trackLoginState(state){state==="started"&&(this.loginAttempt=randomUUID3()),this.loginAttempt&&this.track({key:`login:attempt:${this.loginAttempt}`,value:state}),state!=="started"&&(this.loginAttempt=void 0)}trackCliFlagHelp(command,subcommands){let subcommand;subcommands&&(subcommand=Array.isArray(subcommands)?subcommands[0]:subcommands),this.track({key:"flag:help",value:subcommand?`${command}:${subcommand}`:command})}trackCliOptionFormat(format){if(format){let allowedFormat=["json"].includes(format)?format:this.redactedValue;this.trackCliOption({option:"format",value:allowedFormat})}}trackCliOptionProject(value){value&&(Array.isArray(value)&&value.length===0||this.trackCliOption({option:"project",value:this.redactedValue}))}};function currentDirectory(){try{return process.cwd()}catch{return}}var TelemetryEventStore=class{constructor(opts){this.localEvents=[];this.teamId="NO_TEAM_ID";this.userId="NO_USER_ID";this.projectId="NO_PROJECT_ID";this.sendOptOut=!1;this.#startupEnv={...process.env};this.#startupCwd=currentDirectory();this.isDebug=opts?.isDebug||!1,this.events=[],this.config=opts?.config,this.globalConfigDir=opts?.globalConfigDir,this.cliDeviceOptions=opts?.cliDevice,this.cliSessionOptions=opts?.cliSession,this.invocationId=randomUUID3(),this.deviceId=randomUUID3(),this.cliDeviceOptions&&(this.cliDevice=getOrCreatePersistedCliDevice(this.cliDeviceOptions),this.deviceId=this.cliDevice.id),this.cliSessionOptions?(this.cliSession=getOrCreatePersistedCliSession(this.cliSessionOptions),this.sessionId=this.cliSession.id):this.sessionId=randomUUID3()}#startupEnv;#startupCwd;add(event){event.sessionId=this.sessionId,event.invocationId=this.invocationId,event.teamId=this.teamId,event.userId=this.userId,event.projectId=this.projectId,this.events.push(event)}updateConfig(config){this.config=config}updateTeamId(teamId){teamId&&(this.teamId=teamId)}updateUserId(userId){userId&&(this.userId=userId)}updateProjectId(projectId){projectId&&(this.projectId=projectId)}get hasUserId(){return this.userId!=="NO_USER_ID"}get currentProjectId(){return this.projectId}get currentInvocationId(){return this.invocationId}get currentDeviceId(){return this.deviceId}get currentLibc(){return this.cliDevice?.libc}get currentSessionId(){return this.sessionId}get readonlyEvents(){return Array.from(this.events)}reset(){this.events=[],this.commandTrace=void 0,this.localCommandEvent=void 0,this.localEvents=[]}allowOptOutSend(){this.sendOptOut=!0}get enabled(){return process.env.VERCEL_TELEMETRY_DISABLED?!1:this.config?.enabled??!0}setCommandTrace(event,buildLabel,localEvent,localEvents=[]){this.commandTrace={event,buildLabel},this.localCommandEvent=localEvent,this.localEvents=localEvents}getCommandTrace(){let local=this.localCommandEvent;if(!this.commandTrace||!local)return this.commandTrace;let spans=localWaterfall(local,[...startupEvents(local),...this.localEvents]);return spans.length?{...this.commandTrace,event:{...this.commandTrace.event,parentId:local.parentId},spans}:this.commandTrace}async save({detach=!1}={}){if(this.cliSession&&this.cliSessionOptions&&(this.cliSession=touchPersistedCliSession(this.cliSessionOptions,this.cliSession)),this.isDebug){output_manager_default.log(`${LogLabel} Flushing Events`);for(let event of this.events)event.teamId=this.teamId,event.userId=this.userId,event.projectId=this.projectId,output_manager_default.log(JSON.stringify(event));let commandTrace=this.getCommandTrace();commandTrace&&output_manager_default.log(`${LogLabel} Command trace ${JSON.stringify(commandTrace)}`);return}if(this.enabled||this.sendOptOut){this.sendOptOut=!1;let commandTrace=this.getCommandTrace(),sessionId=this.events[0]?.sessionId;if(!sessionId){output_manager_default.debug("Unable to send metrics: no session ID");return}let events=this.events.map(event=>{let{eventTime,invocationId,...rest}=event;return delete rest.sessionId,delete rest.teamId,delete rest.userId,delete rest.projectId,{event_time:eventTime,invocation_id:invocationId,team_id:this.teamId,user_id:this.userId,project_id:this.projectId,...rest}});if(detach&&commandTrace?.spans&&Buffer.byteLength(JSON.stringify(commandTrace))>16384){let{parentId:_parentId,...event}=commandTrace.event;commandTrace={event,buildLabel:commandTrace.buildLabel}}let payload={invocationId:this.invocationId,headers:{"Client-id":"vercel-cli","x-vercel-cli-topic-id":"generic","x-vercel-cli-session-id":sessionId},body:events,...commandTrace?{commandTrace}:{}};await this.sendToSubprocess(payload,output_manager_default.debugEnabled&&!detach)}}async sendToSubprocess(payload,outputDebugEnabled){let serialized=encodeHandoff(payload),flushArgs=["telemetry","flush"];this.globalConfigDir&&flushArgs.push("--global-config",this.globalConfigDir);let script;if(readLaunch()?.runtime==="native")script=flushArgs;else{let cliEntryPoint=process.argv[1];if(!cliEntryPoint)return;script=[cliEntryPoint,...flushArgs]}let nodeBinaryPath=process.execPath,env=(0,import_build_utils.cloneEnv)(this.#startupEnv,{VERCEL_TELEMETRY_DISABLED:"1"});for(let key of Object.keys(env))key.toUpperCase()==="VERCEL_VC_NATIVE"&&delete env[key];if(outputDebugEnabled)return new Promise(resolve=>{let childProcess=spawn(nodeBinaryPath,script,{cwd:this.#startupCwd,env,stdio:["pipe","pipe","pipe"]});childProcess.stdin.on("error",()=>{}),childProcess.stdin.end(serialized),childProcess.stderr.on("data",data=>output_manager_default.debug(data.toString())),childProcess.stdout.on("data",data=>output_manager_default.debug(data.toString())),childProcess.on("error",d=>{output_manager_default.debug(d),clearTimeout(timeout),resolve()});let timeout=setTimeout(()=>{output_manager_default.debug("Telemetry subprocess killed due to timeout"),childProcess.kill()},2e3);childProcess.on("exit",code=>{output_manager_default.debug(`Telemetry subprocess exited with code ${code}`),childProcess.unref(),clearTimeout(timeout),resolve()})});{let childProcess=spawn(nodeBinaryPath,script,{stdio:["pipe","ignore","ignore"],cwd:this.#startupCwd,env,windowsHide:!0,detached:!0});childProcess.on("error",()=>{}),childProcess.stdin.on("error",()=>{}),childProcess.stdin.end(serialized),childProcess.unref()}}};export{readLaunch,require_ci_info,getStartupDurationMs,toCommandTrace,markStartup,decodeHandoff,TelemetryClient,TelemetryEventStore};
|
|
11
|
+
/*! Bundled license information:
|
|
12
|
+
|
|
13
|
+
imurmurhash/imurmurhash.js:
|
|
14
|
+
(**
|
|
15
|
+
* @preserve
|
|
16
|
+
* JS Implementation of incremental MurmurHash3 (r150) (as of May 10, 2013)
|
|
17
|
+
*
|
|
18
|
+
* @author <a href="mailto:jensyt@gmail.com">Jens Taylor</a>
|
|
19
|
+
* @see http://github.com/homebrewing/brauhaus-diff
|
|
20
|
+
* @author <a href="mailto:gary.court@gmail.com">Gary Court</a>
|
|
21
|
+
* @see http://github.com/garycourt/murmurhash-js
|
|
22
|
+
* @author <a href="mailto:aappleby@gmail.com">Austin Appleby</a>
|
|
23
|
+
* @see http://sites.google.com/site/murmurhash/
|
|
24
|
+
*)
|
|
25
|
+
*/
|
|
@@ -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{truncateEnd}from"./chunk-
|
|
7
|
+
import{truncateEnd}from"./chunk-ID663OJ7.js";function ellipsis(str,length){return truncateEnd(str,length,{omission:"\u2026"})}export{ellipsis};
|
|
@@ -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{ensureLink}from"./chunk-
|
|
7
|
+
import{ensureLink}from"./chunk-Q7HFUXJ4.js";import{getTeams}from"./chunk-WLD4SGKM.js";import{scopeFlagPassed}from"./chunk-VIOIR6II.js";import{getLinkedProject,getUser,resolveProjectCwd}from"./chunk-4Z6R5KHZ.js";import{getProjectByNameOrId}from"./chunk-3AFEVHHY.js";import{parseArguments}from"./chunk-INIZJZ3O.js";import{argvHasNonInteractive}from"./chunk-CSNP5RIM.js";import{LinkRequiredError,ProjectNotFound}from"./chunk-QFE3RPMA.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{require_build_utils}from"./chunk-5MDNVAE6.js";import{__toESM}from"./chunk-BZENIQ7N.js";async function getProjectByCwdOrLink({autoConfirm,nonInteractive,client,commandName,cwd,projectNameOrId,forReadOnlyCommand,skipOwnerLookup}){if(projectNameOrId){let project=await getProjectByNameOrId(client,projectNameOrId);if(project instanceof ProjectNotFound)throw project;return project}let effectiveNonInteractive=nonInteractive??client.nonInteractive??argvHasNonInteractive(client.argv);if(forReadOnlyCommand&&effectiveNonInteractive){let resolvedCwd=await resolveProjectCwd(cwd??client.cwd),link=await getLinkedProject(client,{cwd:resolvedCwd,skipOwnerLookup});if(link.status==="linked"&&link.project)return link.project;if(link.status==="error"){let err=new Error("Link project error");throw err.code="ERR_LINK_PROJECT",err}throw new LinkRequiredError}let linkedProject=await ensureLink(commandName,client,cwd??client.cwd,{autoConfirm,nonInteractive,skipOwnerLookup});if(typeof linkedProject=="number"){let err=new Error("Link project error");throw err.code="ERR_LINK_PROJECT",err}return linkedProject.project}var import_build_utils=__toESM(require_build_utils(),1);async function isTeamExplicit(client){if(scopeFlagPassed(client.argv)){let{flags}=parseArguments(client.argv.slice(2),{},{permissive:!0});if(flags["--scope"]||flags["--team"])return!0}let team=await client.resolveCurrentTeam({ask:!1});if(!team&&client.isTeamUnchosen())return!1;let orgId=(0,import_build_utils.getPlatformEnv)("ORG_ID");try{if(!team)return orgId?orgId===(await getUser(client)).id:(await getTeams(client)).length===0;if(orgId)return orgId===team;let teams=await getTeams(client);return teams.length===1&&teams[0].id===team}catch(err){return output_manager_default.debug(`Couldn't check the scope: ${err}`),!1}}export{getProjectByCwdOrLink,isTeamExplicit};
|
|
@@ -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{pullEnvRecords}from"./chunk-MJ77FDK2.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";var INTEGRATIONS_POLL_INTERVAL_MS=5e3,INTEGRATIONS_POLL_TIMEOUT_MS=3*60*1e3;async function fetchDeploymentBuildEnv(client,deploymentId,{quiet=!1}={}){let deadline=Date.now()+INTEGRATIONS_POLL_TIMEOUT_MS,isPolling=!1;for(;Date.now()<deadline;)try{return await pullEnvRecords(client,deploymentId,"vercel-cli:pull")}catch(err){if(err&&typeof err=="object"&&"integrationsStatus"in err&&err.integrationsStatus==="pending"){!isPolling&&!quiet&&(output_manager_default.spinner("Waiting for deployment integrations to finish provisioning..."),isPolling=!0),await new Promise(resolve=>setTimeout(resolve,INTEGRATIONS_POLL_INTERVAL_MS));continue}throw err}throw new Error("Timed out waiting for deployment integrations to complete provisioning.")}export{fetchDeploymentBuildEnv};
|
|
@@ -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_ci_info}from"./chunk-
|
|
7
|
+
import{require_ci_info}from"./chunk-EYRBV6RM.js";import{wantsMachineReadableOutput}from"./chunk-KA2KG3SY.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_ci_info=__toESM(require_ci_info(),1);function isInteractiveHumanRun(client,command,{allowAgentOverride=!1}={}){let argv=client.argv.slice(2),explicitInteraction=allowAgentOverride&&(argv.includes("--non-interactive=false")||argv.includes("--no-non-interactive")||argv.includes("--non-interactive")&&argv[argv.indexOf("--non-interactive")+1]==="false");return(!client.isAgent||explicitInteraction)&&!client.nonInteractive&&!import_ci_info.default.isCI&&client.stdin.isTTY===!0&&client.stderr.isTTY===!0&&!wantsMachineReadableOutput(command,client.argv)}export{isInteractiveHumanRun};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{DEFAULT_ORDER_WAIT_MS,ORDER_READ_TIMING,getOrderOutcome,pollForOrder,remainingWait}from"./chunk-
|
|
7
|
+
import{DEFAULT_ORDER_WAIT_MS,ORDER_READ_TIMING,getOrderOutcome,pollForOrder,remainingWait}from"./chunk-Q4XCBBWK.js";import{trackCreatedId}from"./chunk-BUBVZ6SQ.js";import{getScope}from"./chunk-VIOIR6II.js";import{sleep}from"./chunk-4Z6R5KHZ.js";import{buildCommandWithGlobalFlags}from"./chunk-CSNP5RIM.js";import{DomainChargeOutcomeUnknown,DomainNotAvailable,DomainPaymentAuthenticationRequired,DomainPaymentError,DomainPriceChanged,DomainPurchaseInProgress,DomainPurchaseRefundFailed,DomainPurchaseRefunded,InvalidDomain,TLDNotSupportedViaCLI,UnexpectedDomainPurchaseError,UnsupportedTLD,isAPIError}from"./chunk-QFE3RPMA.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";async function getDomainPrice(client,name){try{return await client.fetch(`/v1/registrar/domains/${name}/price`)}catch(err){if(isAPIError(err)){if(err.code==="tld_not_supported")return new UnsupportedTLD(name);if(err.status<500)return err}throw err}}async function getDomainStatus(client,domain){return client.fetch(`/v1/registrar/domains/${encodeURIComponent(domain)}/availability`)}var PURCHASE_TIMING={lostOrderReconcileMs:10*1e3},BOUGHT_AT_SKEW_MS=5*60*1e3;async function isPurchasedSince(client,name,since,{timeoutMs}={}){try{let{domain}=await client.fetch(`/v5/domains/${encodeURIComponent(name)}`,{bailOn429:!0,...timeoutMs!==void 0&&{retry:{retries:0},signal:AbortSignal.timeout(timeoutMs)}}),{boughtAt,expiresAt}=domain;return typeof boughtAt=="number"&&boughtAt>=since-BOUGHT_AT_SKEW_MS&&(typeof expiresAt!="number"||expiresAt>Date.now())}catch{return!1}}async function waitForPurchase(client,name,since,timeoutMs){let startTime=Date.now(),intervalMs=1e3,lookup=()=>isPurchasedSince(client,name,since,{timeoutMs:Math.max(timeoutMs-(Date.now()-startTime),1e3)});for(;Date.now()-startTime<timeoutMs;){if(await lookup())return!0;await sleep(Math.min(intervalMs,timeoutMs-(Date.now()-startTime))),intervalMs=Math.min(intervalMs*2,5e3)}return lookup()}async function purchaseDomain(client,name,expectedPrice,years,autoRenew=!0,contactInformation,{waitMs=DEFAULT_ORDER_WAIT_MS,onOrderAccepted}={}){let{team}=await getScope(client),teamParam=team?`?teamId=${team.slug}`:"",startedAt=Date.now(),orderId;try{({orderId}=await client.fetch(`/v1/registrar/domains/${name}/buy${teamParam}`,{body:{expectedPrice,autoRenew,years,contactInformation},method:"POST",retry:{retries:0},bailOn429:!0}))}catch(err){if(isAPIError(err)&&err.status<500){if(err.code==="invalid_domain")return new InvalidDomain(name);if(err.code==="domain_not_available")return new DomainNotAvailable(name);if(err.code==="tld_not_supported")return new UnsupportedTLD(name);if(err.code==="additional_contact_info_required")return new TLDNotSupportedViaCLI(name);if(err.code==="expected_price_mismatch")return new DomainPriceChanged(name);if(err.code==="purchase_in_progress"){let otherOrderId=typeof err.orderId=="string"?err.orderId:void 0;return new DomainPurchaseInProgress(name,otherOrderId,otherOrderId&&buildCommandWithGlobalFlags(client.argv,`api /v1/registrar/orders/${otherOrderId}`))}throw err}return await waitForPurchase(client,name,startedAt,PURCHASE_TIMING.lostOrderReconcileMs)?{status:"completed",orderId:null}:new DomainChargeOutcomeUnknown(name,"buy")}trackCreatedId(client,"domain-order",orderId),onOrderAccepted?.(orderId);let ownedSince=since=>isPurchasedSince(client,name,since,{timeoutMs:Math.max(startedAt+waitMs+ORDER_READ_TIMING.minReadMs-Date.now(),1e3)});if(waitMs<=0)return{status:"pending",orderId,lastStatus:null};let poll=await pollForOrder(client,orderId,remainingWait(waitMs,startedAt));if(poll.order===null)return await ownedSince(startedAt)?{status:"completed",orderId}:{status:"pending",orderId,lastStatus:poll.lastStatus,...poll.readError&&{readError:poll.readError}};let outcome=getOrderOutcome(poll.order,name);switch(outcome){case"completed":return{status:"completed",orderId};case"payment_failed":return new DomainPaymentError;case"payment_authentication_required":return new DomainPaymentAuthenticationRequired(name,team?.slug);case"refund_failed":return new DomainPurchaseRefundFailed(name);case"refunded":case"failed":return await ownedSince(0)?{status:"already_owned",orderId,orderOutcome:outcome}:outcome==="refunded"?new DomainPurchaseRefunded(name):new UnexpectedDomainPurchaseError(name);case"unknown":return await ownedSince(startedAt)?{status:"completed",orderId}:new DomainChargeOutcomeUnknown(name,"buy",orderId)}}var CONTACT_FIELDS=[{field:"firstName",flag:"--first-name",label:"First name",prompt:"First name:",validate:val=>val.length>0||"First name is required"},{field:"lastName",flag:"--last-name",label:"Last name",prompt:"Last name:",validate:val=>val.length>0||"Last name is required"},{field:"email",flag:"--email",label:"Email",prompt:"Email:",validate:val=>val.length===0?"Email is required":/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(val)?!0:"Invalid email format"},{field:"phone",flag:"--phone",label:"Phone",prompt:"Phone (include country code, e.g., +15551234567):",validate:val=>val.length===0?"Phone is required":/^\+\d{10,15}$/.test(val)?!0:"Phone must start with + and contain 10-15 digits"},{field:"address1",flag:"--address",label:"Address",prompt:"Address:",validate:val=>val.length>0||"Address is required"},{field:"city",flag:"--city",label:"City",prompt:"City:",validate:val=>val.length>0||"City is required"},{field:"state",flag:"--state",label:"State",prompt:"State/Province:",validate:val=>val.length>0||"State/Province is required"},{field:"zip",flag:"--zip",label:"ZIP",prompt:"Postal/ZIP code:",validate:val=>val.length>0||"Postal/ZIP code is required"},{field:"country",flag:"--country",label:"Country",prompt:"Country code (2 letters, e.g., US):",validate:val=>val.length===0?"Country code is required":/^[A-Z]{2}$/i.test(val)?!0:"Country code must be 2 letters"},{field:"companyName",flag:"--company",label:"Company",prompt:"Company name (optional):"}],ADDRESS_FIELDS=new Set(["address1","city","state","zip","country"]);function readContactFlags(flags){let contact={};for(let{field,flag,validate}of CONTACT_FIELDS){let raw=flags[flag];if(typeof raw!="string")continue;let value=raw.trim(),result=validate?validate(value):!0;if(result!==!0)return`Invalid ${flag}. ${result}.`;contact[field]=field==="country"?value.toUpperCase():value}return contact}function getBillingContact(team){let billing=team?.billing;if(!billing)return{};let address=billing.address,line1=address?.line1?.trim(),line2=address?.line2?.trim(),country=address?.country?.trim().toUpperCase(),rawState=address?.state?.trim(),state=country&&rawState?.toUpperCase().startsWith(`${country}-`)?rawState.slice(country.length+1):rawState,candidates={email:billing.email,address1:line1&&line2?`${line1}, ${line2}`:line1,city:address?.city,state:country==="US"&&!/^[A-Z]{2}$/i.test(state??"")?"":state,zip:address?.postalCode,country},contact={};for(let{field,validate}of CONTACT_FIELDS){let value=candidates[field]?.trim();value&&(!validate||validate(value)===!0)&&(contact[field]=value)}return contact}function mergeContact(fromFlags,billing){let ownAddress=[...ADDRESS_FIELDS].some(field=>fromFlags[field]!==void 0&&billing[field]!==void 0),merged={};for(let{field}of CONTACT_FIELDS){let fallback=ownAddress&&ADDRESS_FIELDS.has(field)?void 0:billing[field],value=fromFlags[field]??fallback;value!==void 0&&(merged[field]=value)}return merged}function billingFieldsUsed(fromFlags,billing){let merged=mergeContact(fromFlags,billing),used={};for(let{field}of CONTACT_FIELDS)fromFlags[field]===void 0&&merged[field]!==void 0&&(used[field]=merged[field]);return used}function missingContactFields(contact){return CONTACT_FIELDS.filter(({field,validate})=>validate&&!contact[field]).map(({field})=>field)}async function collectContactInformation(client,{provided={},defaults={}}={}){let contact={...provided},pending=CONTACT_FIELDS.filter(({field})=>!(field in provided));pending.length>0&&(output_manager_default.log(""),output_manager_default.log("Please provide contact information for domain registration:"));for(let{field,prompt,validate}of pending){let value=await client.input.text({message:prompt,default:defaults[field],validate});value&&(contact[field]=value)}return{...contact,country:contact.country.toUpperCase(),companyName:contact.companyName||void 0}}export{getDomainPrice,getDomainStatus,isPurchasedSince,purchaseDomain,CONTACT_FIELDS,readContactFlags,getBillingContact,mergeContact,billingFieldsUsed,missingContactFields,collectContactInformation};
|
|
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{formatUsd}from"./chunk-
|
|
7
|
+
import{formatUsd}from"./chunk-3VNS4D7V.js";import{DEFAULT_ORDER_WAIT,DEFAULT_ORDER_WAIT_MS}from"./chunk-Q4XCBBWK.js";import{canPrompt}from"./chunk-IQ7FPAI4.js";import{quoteShellArg}from"./chunk-7RABG6HV.js";import{getTeams}from"./chunk-WLD4SGKM.js";import{scopeFlagPassed}from"./chunk-VIOIR6II.js";import{printAlignedLabel}from"./chunk-M2Q2DUHO.js";import{require_ms}from"./chunk-MXTC4ZAQ.js";import{parseArguments}from"./chunk-INIZJZ3O.js";import{AGENT_ACTION,AGENT_REASON,AGENT_STATUS,buildCommandWithGlobalFlags,getExitCodeForReason,outputActionRequired,outputAgentError,shouldEmitNonInteractiveCommandError,writeActionRequired,writeAgentError}from"./chunk-CSNP5RIM.js";import{wantsMachineReadableOutput}from"./chunk-KA2KG3SY.js";import{packageName}from"./chunk-B4KA3ZH2.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{require_build_utils}from"./chunk-5MDNVAE6.js";import{stripSensitiveAuthArgs}from"./chunk-DORCX7UB.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_build_utils2=__toESM(require_build_utils(),1);import{createHash,randomUUID}from"node:crypto";var import_build_utils=__toESM(require_build_utils(),1),import_ms=__toESM(require_ms(),1);var AMOUNT_PATTERN=/^\d+(\.\d{1,2})?$/,REASON_BY_CODE={UNSUPPORTED_TLD:AGENT_REASON.TLD_NOT_SUPPORTED,UNSUPPORTED_TLD_VIA_CLI:AGENT_REASON.TLD_NOT_SUPPORTED,INVALID_DOMAIN:AGENT_REASON.INVALID_DOMAIN,DOMAIN_NOT_AVAILABLE:AGENT_REASON.DOMAIN_NOT_AVAILABLE,DOMAIN_PAYMENT_ERROR:AGENT_REASON.PAYMENT_FAILED};function chargeFailureReason(err){let code=err.code;return typeof code=="string"&&REASON_BY_CODE[code]||AGENT_REASON.API_ERROR}function parseAmount(raw){if(raw===void 0)return;let value=raw.trim();return!AMOUNT_PATTERN.test(value)||Number(value)<=0?new Error(`Invalid --amount "${raw}". Use the price in USD, such as 20.00.`):Number(value)}function amountMatchesPrice(amount,price){return Math.round(amount*100)===Math.round(price*100)}function formatAmountArg(price){return price.toFixed(2)}function formatTerm(years){return`${years} ${years===1?"year":"years"}`}function canPromptForCharge(client,json){return canPrompt(client)&&!process.env.CI&&!json}function chargeFlagWithValue(argv,flags){for(let arg of argv){if(arg==="--")break;let name=arg.split("=")[0];if(arg.includes("=")&&flags.includes(name))return`${name} doesn't take a value. Pass it on its own, or leave it out${name==="--auto-renew"?" and pass --no-auto-renew":""}.`}}function chargeTeamStatus(client,teamId){let orgId=(0,import_build_utils.getPlatformEnv)("ORG_ID");return orgId&&orgId!==teamId?"conflict":scopeFlagPassed(client.argv)||orgId===teamId?"named":"unnamed"}function printChargeRecovery(headline,instruction,command){output_manager_default.fatal(`${headline}
|
|
8
8
|
|
|
9
9
|
${instruction}:
|
|
10
10
|
${command}`)}function writeChargeAction(client,json,payload){outputActionRequired(client,payload,1),json&&client.stdout.write(`${JSON.stringify(payload,null,2)}
|
|
@@ -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{
|
|
7
|
+
import{withFileLock}from"./chunk-TABMJZVW.js";import{getInstallRoot,isNativeBinaryInstall}from"./chunk-NWGBDBZI.js";import{require_tar_fs}from"./chunk-KRPY5FHJ.js";import{require_semver}from"./chunk-BPUANOGW.js";import{fetch,toNodeReadable}from"./chunk-MY4MONOH.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_tar_fs=__toESM(require_tar_fs(),1),import_semver=__toESM(require_semver(),1);import{createGunzip}from"node:zlib";import{createHash}from"node:crypto";import{createWriteStream}from"node:fs";import{tmpdir}from"node:os";import{join as join2,sep as sep2}from"node:path";import{pipeline}from"node:stream/promises";import{chmod,copyFile,mkdir as mkdir2,mkdtemp,realpath,rename as rename2,rm as rm2,stat as stat2,writeFile as writeFile2}from"node:fs/promises";import{randomUUID}from"node:crypto";import{join,relative,resolve,sep}from"node:path";import{mkdir,readFile,readlink,rename,rm,stat,symlink,writeFile}from"node:fs/promises";var SLOTS=["a","b"],LOCK_RETRY_MS=50;function tracksDir(root){return join(root,"versions","tracks")}function slotBinaryPath(root,track,slot){return join(slotDir(root,track,slot),"vercel")}function slotDir(root,track,slot){return join(tracksDir(root),track,slot)}function isTrack(value){return value==="production"||value==="pr"}function isSlot(value){return value==="a"||value==="b"}async function atomicSymlink(target,path){let temporary=`${path}.tmp-${randomUUID()}`;await symlink(target,temporary);try{await rename(temporary,path)}catch(error){throw await rm(temporary,{force:!0}),error}}async function atomicWrite(path,contents){let temporary=`${path}.tmp-${randomUUID()}`;await writeFile(temporary,contents);try{await rename(temporary,path)}catch(error){throw await rm(temporary,{force:!0}),error}}async function readSlotMetadata(root,track,slot){try{let value=JSON.parse(await readFile(join(slotDir(root,track,slot),"metadata.json"),"utf8"));return value.track!==track||value.slot!==slot||typeof value.version!="string"?void 0:value}catch{return}}async function readPointer(root,path){try{let target=resolve(root,await readlink(path)),rel=relative(tracksDir(root),target).split(sep);return rel.length!==2||!isTrack(rel[0])||!isSlot(rel[1])?void 0:{track:rel[0],slot:rel[1]}}catch{return}}async function readActivePointer(root){return readPointer(root,join(root,"active"))}async function readTrackPointer(root,track){try{let slot=(await readlink(join(tracksDir(root),track,"active"))).split(sep).pop();return slot&&isSlot(slot)?slot:void 0}catch{return}}async function readNativeInstallState(root){let pointer=await readActivePointer(root);if(!pointer)return;let active=await readSlotMetadata(root,pointer.track,pointer.slot);if(!active)return;let pendingProduction;try{let pending=JSON.parse(await readFile(join(root,"pending-production.json"),"utf8"));pending.slot&&isSlot(pending.slot)&&pending.version&&(await readSlotMetadata(root,"production",pending.slot))?.version===pending.version&&!(pointer.track==="production"&&pointer.slot===pending.slot)&&(pendingProduction={slot:pending.slot,version:pending.version})}catch{}return{...active,pendingProduction}}async function ensureNativeBinLinks(root){let bin=join(root,"bin");await mkdir(bin,{recursive:!0});for(let name of["vercel","vc"]){let path=join(bin,name),expected=join("..","active","vercel");await readlink(path).catch(()=>{})!==expected&&await atomicSymlink(expected,path)}}async function markPendingProduction(root,slot,version){await atomicWrite(join(root,"pending-production.json"),`${JSON.stringify({slot,version})}
|
|
8
8
|
`)}async function activateSlot(root,track,slot){let metadata=await readSlotMetadata(root,track,slot),binary=await stat(join(slotDir(root,track,slot),"vercel")).catch(()=>{});if(!metadata||!binary?.isFile())throw new Error(`Cannot activate incomplete ${track}/${slot} slot`);let trackDir=join(tracksDir(root),track);await mkdir(trackDir,{recursive:!0}),await atomicSymlink(slot,join(trackDir,"active")),await atomicSymlink(relative(root,slotDir(root,track,slot)),join(root,"active")),track==="production"&&await rm(join(root,"pending-production.json"),{force:!0}),await ensureNativeBinLinks(root)}async function getInactiveSlot(root,track){let active=await readActivePointer(root);return(active?.track===track?active.slot:await readTrackPointer(root,track))==="a"?"b":"a"}async function writeTrackSlot(root,metadata,prepare,{signal}={}){signal?.throwIfAborted();let slot=await getInactiveSlot(root,metadata.track),trackDir=join(tracksDir(root),metadata.track),destination=slotDir(root,metadata.track,slot),temporary=join(trackDir,`.slot-${slot}-${randomUUID()}`),backup=join(trackDir,`.old-${slot}-${randomUUID()}`);signal?.throwIfAborted(),await mkdir(temporary,{recursive:!0});try{if(signal?.throwIfAborted(),await prepare(temporary),signal?.throwIfAborted(),!(await stat(join(temporary,"vercel")).catch(()=>{}))?.isFile())throw new Error("Prepared slot does not contain a Vercel CLI binary");signal?.throwIfAborted(),await atomicWrite(join(temporary,"metadata.json"),`${JSON.stringify({...metadata,slot})}
|
|
9
9
|
`),signal?.throwIfAborted();let hadDestination=!1;try{await rename(destination,backup),hadDestination=!0}catch(error){if(error.code!=="ENOENT")throw error}try{signal?.throwIfAborted(),await rename(temporary,destination)}catch(error){throw hadDestination&&await rename(backup,destination).catch(()=>{}),error}return hadDestination&&await rm(backup,{recursive:!0,force:!0}),slot}finally{await rm(temporary,{recursive:!0,force:!0})}}async function withNativeInstallLock(root,action,{wait=!0,waitMs=3e4}={}){let lock=join(root,"update.lock");return withFileLock(lock,action,{waitMs:wait?waitMs:0,retryMs:LOCK_RETRY_MS,busyMessage:(path,timedOut)=>timedOut?`Timed out waiting for another Vercel CLI update. If no update is running, remove the lock at ${path} and retry.`:"Native update already in progress"})}async function listNativeTrackSlots(root){let installed=[];for(let track of["production","pr"])for(let slot of SLOTS){let metadata=await readSlotMetadata(root,track,slot),binary=await stat(join(slotDir(root,track,slot),"vercel")).catch(()=>{});metadata&&binary?.isFile()&&installed.push(metadata)}return installed}var REGISTRY="https://registry.npmjs.org";function discardResponseBody(response){response.body?.cancel().catch(()=>{})}async function moveFile(source,destination){try{await rename2(source,destination)}catch(err){if(err.code!=="EXDEV")throw err;await copyFile(source,destination),await rm2(source,{force:!0})}}var CURL_INSTALL_COMMAND="curl -fsSL https://vercel.com/setup.sh | bash",SUPPORTED_PLATFORMS=new Set(["darwin-arm64","darwin-x64","linux-arm64","linux-arm64-musl","linux-x64","linux-x64-musl"]);function isMuslRuntime(){if(process.platform!=="linux")return!1;try{let report=process.report?.getReport();return report!==void 0&&!report.header?.glibcVersionRuntime}catch{return!1}}function platformTarget(){let target=`${process.platform}-${process.arch}`;return isMuslRuntime()?`${target}-musl`:target}function isSupportedPlatform(){return SUPPORTED_PLATFORMS.has(platformTarget())}function unsupportedPlatformMessage(){let supported=Array.from(SUPPORTED_PLATFORMS).join(", ");return`The native Vercel CLI binary is not available for your platform (${platformTarget()}). Supported platforms: ${supported}. You can install the CLI with a package manager instead: npm i -g vercel@latest`}function nativePackageSuffix(){return`vc-native-${platformTarget()}`}function getNativePackageName(){return`@vercel/${nativePackageSuffix()}`}async function isCurlInstall(){return isNativeBinaryInstall()?isInstallerManagedPath(process.execPath):!1}async function isInstallerManagedPath(file,root=getInstallRoot()){let realRoot=await realpath(root).catch(()=>root),managedPrefixes=[...new Set([root,realRoot])].map(dir=>join2(dir,"versions")+sep2);if(managedPrefixes.some(prefix=>file.startsWith(prefix)))return!0;try{let real=await realpath(file);return managedPrefixes.some(prefix=>real.startsWith(prefix))}catch{return!1}}async function resolveLatestVersion(pkgName,{signal}={}){let res=await fetch(`${REGISTRY}/${pkgName}/latest`,{signal});if(!res.ok)throw discardResponseBody(res),new Error(`Failed to fetch package metadata from the npm registry (HTTP ${res.status})`);let manifest=await res.json();if(!manifest.version||!import_semver.default.valid(manifest.version))throw new Error("Could not resolve the latest native binary version");return manifest.version}async function resolveLatestNativeVersion(options){return resolveLatestVersion(getNativePackageName(),options)}async function listAvailableVersions(pkgName){let res=await fetch(`${REGISTRY}/${pkgName}`,{headers:{accept:"application/vnd.npm.install-v1+json"}});if(!res.ok)throw new Error(`Failed to fetch package metadata from the npm registry (HTTP ${res.status})`);let manifest=await res.json();return Object.keys(manifest.versions??{}).filter(v=>import_semver.default.valid(v)).sort(import_semver.default.rcompare)}async function downloadAndExtractBinary(version,destination,{signal}={}){if(!isSupportedPlatform())throw new Error(unsupportedPlatformMessage());let suffix=nativePackageSuffix(),tarballUrl=`${REGISTRY}/@vercel/${suffix}/-/${suffix}-${version}.tgz`,res=await fetch(tarballUrl,{signal});if(res.status===404)throw discardResponseBody(res),new Error(`No native binary is available for Vercel CLI v${version} on ${platformTarget()}. Older versions may predate native binary builds. You can install that version with a package manager instead: npm i -g vercel@${version}`);if(!res.ok)throw discardResponseBody(res),new Error(`Failed to download ${tarballUrl} (HTTP ${res.status})`);let tmpDir=await mkdtemp(join2(tmpdir(),"vercel-upgrade-"));try{await pipeline(toNodeReadable(res.body),createGunzip(),import_tar_fs.default.extract(tmpDir,{ignore:(_name,header)=>header?.type!=="file"&&header?.type!=="directory"}),{signal}),signal?.throwIfAborted();let binary=join2(tmpDir,"package","bin","vercel");if(!(await stat2(binary).catch(()=>null))?.isFile())throw new Error("Downloaded tarball did not contain the expected binary (package/bin/vercel)");signal?.throwIfAborted(),await mkdir2(destination,{recursive:!0}),await chmod(binary,493),await moveFile(binary,join2(destination,"vercel"))}finally{await rm2(tmpDir,{recursive:!0,force:!0})}}var PR_BINARIES_URL=process.env.VERCEL_PR_BINARIES_URL||"https://api-frameworks.vercel.sh/pr-binaries";function parsePrTarget(target){let match=/^pr[/-](\d+)$/i.exec(target.trim());if(!match)return;let pr=Number(match[1]);return Number.isSafeInteger(pr)&&pr>0?pr:void 0}async function fetchPrBuildSha(pr){let url=`${PR_BINARIES_URL}/${pr}/current-sha`,res=await fetch(url);if(res.status===404)throw new Error(`Couldn't find a binary for PR #${pr}. The current-sha pointer is not published yet.`);if(!res.ok)throw new Error(`Failed to fetch the current build for PR #${pr} (HTTP ${res.status}).`);let sha=(await res.text()).trim().toLowerCase();if(!/^[0-9a-f]{40}$/.test(sha))throw new Error(`Unexpected build SHA format for PR #${pr}.`);return sha}function missingPrPlatformMessage(pr,buildSha){let platform=platformTarget(),shortSha=buildSha.slice(0,12);return`Couldn't find a ${platform} binary for PR #${pr} (${shortSha}). This SHA exists, but this platform isn't ready yet.`}function getPrBinaryBaseUrl(pr,buildSha){return`${PR_BINARIES_URL}/${pr}/shas/${buildSha}`}async function fetchPrChecksum(pr,buildSha){let url=`${getPrBinaryBaseUrl(pr,buildSha)}/vercel-${platformTarget()}.sha256`,res=await fetch(url);if(res.status===404)throw new Error(missingPrPlatformMessage(pr,buildSha));if(!res.ok)throw new Error(`Failed to fetch the checksum for PR #${pr} (HTTP ${res.status}).`);let sha=(await res.text()).trim().split(/\s+/)[0]?.toLowerCase();if(!/^[0-9a-f]{64}$/.test(sha??""))throw new Error(`Unexpected checksum format for PR #${pr}.`);return sha}async function downloadPrBinary(pr,buildSha,expectedSha,destination){if(!isSupportedPlatform())throw new Error(unsupportedPlatformMessage());let url=`${getPrBinaryBaseUrl(pr,buildSha)}/vercel-${platformTarget()}`,res=await fetch(url);if(res.status===404)throw new Error(missingPrPlatformMessage(pr,buildSha));if(!res.ok)throw new Error(`Failed to download ${url} (HTTP ${res.status})`);let tmpDir=await mkdtemp(join2(tmpdir(),"vercel-pr-"));try{let tmpBinary=join2(tmpDir,"vercel"),hash=createHash("sha256"),body=toNodeReadable(res.body);body.on("data",chunk=>hash.update(chunk)),await pipeline(body,createWriteStream(tmpBinary));let actualSha=hash.digest("hex");if(actualSha!==expectedSha)throw new Error(`Checksum mismatch for PR #${pr} binary. The build may have been updated mid-download; try again.`);await mkdir2(destination,{recursive:!0}),await chmod(tmpBinary,493),await moveFile(tmpBinary,join2(destination,"vercel")),await writeFile2(join2(destination,"vercel.sha256"),`${actualSha}
|
|
10
10
|
`)}finally{await rm2(tmpDir,{recursive:!0,force:!0})}}async function findTrackSlot(track,matches){let root=getInstallRoot();for(let slot of["a","b"]){let metadata=await readSlotMetadata(root,track,slot),binary=await stat2(join2(root,"versions","tracks",track,slot,"vercel")).catch(()=>{});if(metadata&&binary?.isFile()&&matches(metadata))return slot}}async function findNewestProductionSlotAtLeast(version){let root=getInstallRoot(),newest;for(let slot of["a","b"]){let metadata=await readSlotMetadata(root,"production",slot),binary=await stat2(join2(root,"versions","tracks","production",slot,"vercel")).catch(()=>{});metadata&&binary?.isFile()&&import_semver.default.valid(metadata.version)&&import_semver.default.gte(metadata.version,version)&&(!newest||import_semver.default.gt(metadata.version,newest.version))&&(newest={slot,version:metadata.version})}return newest}async function installAndActivateProductionVersion(version){let root=getInstallRoot();return withNativeInstallLock(root,async()=>{let existing=await findTrackSlot("production",metadata=>metadata.version===version);if(existing)return await activateSlot(root,"production",existing),{slot:existing,downloaded:!1};output_manager_default.spinner(`Downloading Vercel CLI v${version}\u2026`,0);let slot=await writeTrackSlot(root,{track:"production",version},directory=>downloadAndExtractBinary(version,directory));return await activateSlot(root,"production",slot),{slot,downloaded:!0}})}async function installAndActivatePrBinary(pr){let root=getInstallRoot();return withNativeInstallLock(root,async()=>{output_manager_default.spinner(`Checking latest build for PR #${pr}\u2026`,0);let buildSha=await fetchPrBuildSha(pr),remoteSha=await fetchPrChecksum(pr,buildSha),existing=await findTrackSlot("pr",metadata=>metadata.pr===pr&&metadata.buildSha===buildSha);if(existing)return await activateSlot(root,"pr",existing),{updated:!1,buildSha,slot:existing};output_manager_default.spinner(`Downloading Vercel CLI build for PR #${pr}\u2026`,0);let slot=await writeTrackSlot(root,{track:"pr",version:`pr/${pr}`,pr,buildSha},async directory=>{await downloadPrBinary(pr,buildSha,remoteSha,directory),await writeFile2(join2(directory,"build-sha"),`${buildSha}
|
|
@@ -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{purchaseDomainIfAvailable}from"./chunk-
|
|
7
|
+
import{purchaseDomainIfAvailable}from"./chunk-DEFA6XAB.js";import{addDomain,getDomainByName,require_cjs}from"./chunk-QFSIUMC6.js";import{mapCertError}from"./chunk-TLKBGAOL.js";import{trackCreatedId}from"./chunk-BUBVZ6SQ.js";import{require_dist as require_dist2}from"./chunk-4Z6R5KHZ.js";import{DomainNotFound,DomainPermissionDenied,InvalidDomain,NowError,isAPIError}from"./chunk-QFE3RPMA.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{require_dist}from"./chunk-MCYG7CCE.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var import_async_retry=__toESM(require_dist2(),1);var import_error_utils=__toESM(require_dist(),1);async function issueCert(client,cns){return(0,import_async_retry.default)(async bail=>{try{let cert=await client.fetch("/v3/certs",{method:"POST",body:{domains:cns}});return trackCreatedId(client,"cert",cert.uid),cert}catch(err){if(isAPIError(err)&&err.code==="configuration_error")throw err;if((0,import_error_utils.isError)(err))bail(err);else throw err}},{retries:3,minTimeout:5e3,maxTimeout:15e3})}async function createCertForCns(client,cns,context){output_manager_default.spinner(`Issuing a certificate for ${import_chalk.default.bold(cns.join(", "))}`);try{return await issueCert(client,cns)}catch(err){if(isAPIError(err)){if(err.code==="forbidden")return new DomainPermissionDenied(err.domain,context);let mappedError=mapCertError(err,cns);if(mappedError)return mappedError}throw err}finally{output_manager_default.stopSpinner()}}var import_tldts=__toESM(require_cjs(),1);async function maybeGetDomainByName(client,contextName,domainName){let maybeDomain=await getDomainByName(client,contextName,domainName);return maybeDomain instanceof DomainPermissionDenied?maybeDomain:maybeDomain instanceof DomainNotFound?null:maybeDomain}function isWildcardAlias(alias){return alias.startsWith("*.")}function extractDomain(alias){return isWildcardAlias(alias)?alias.slice(2):alias}async function setupDomain(client,alias,contextName){let aliasDomain=extractDomain(alias);output_manager_default.debug(`Trying to fetch domain ${aliasDomain} by name`);let info=await maybeGetDomainByName(client,contextName,aliasDomain);if(info instanceof DomainPermissionDenied)return info;if(info){let{name:domain2}=info;return output_manager_default.debug(`Domain ${domain2} found for the given context`),info}output_manager_default.debug(`The domain ${aliasDomain} was not found, trying to purchase it`);let purchased=await purchaseDomainIfAvailable(client,aliasDomain,contextName);if(purchased instanceof NowError)return purchased;if(!purchased){output_manager_default.debug(`Domain ${aliasDomain} is not available to be purchased. Trying to add it`);let parsedDomain=(0,import_tldts.parse)(aliasDomain);if(!parsedDomain.domain)return new InvalidDomain(alias);let{domain:domain2}=parsedDomain;output_manager_default.debug(`Adding ${domain2}`);let addResult=await addDomain(client,domain2,contextName);return addResult instanceof NowError||output_manager_default.debug(`Domain ${domain2} successfully added and automatically verified`),addResult}output_manager_default.debug(`The domain ${aliasDomain} was successfully purchased`);let purchasedDomain=await maybeGetDomainByName(client,contextName,aliasDomain),{name:domain}=purchasedDomain;return output_manager_default.debug(`Domain ${domain} was purchased and it is automatically verified`),maybeGetDomainByName(client,contextName,domain)}export{createCertForCns,isWildcardAlias,extractDomain,setupDomain};
|
|
@@ -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{getEnvTargetPlaceholder}from"./chunk-
|
|
7
|
+
import{getEnvTargetPlaceholder}from"./chunk-BYBELFCP.js";import{packageName}from"./chunk-B4KA3ZH2.js";import{deploymentOption,environmentOption,gitBranchOption,jsonOption,projectOption,targetOption,yesOption}from"./chunk-DORCX7UB.js";var buildCommand={name:"build",aliases:[],description:"Build the project.",arguments:[],options:[{name:"prod",description:"Build a production deployment",shorthand:null,type:Boolean,deprecated:!1},{...environmentOption,description:"Environment to build for: production, preview, or a custom environment (default: preview)"},targetOption,{name:"output",description:"Directory where built assets will be written to",shorthand:"o",argument:"DIR",type:String,deprecated:!1},{...yesOption,description:"Skip the confirmation prompt about pulling environment variables and project settings when not found locally"},{name:"standalone",description:"Create a standalone build with all dependencies inlined into function output folders",shorthand:null,type:Boolean,deprecated:!1},{...deploymentOption,description:"Deployment ID to pull environment variables from (e.g. dpl_xxx)"},{name:"id",shorthand:null,type:String,deprecated:!0},projectOption],examples:[{name:"Build the project",value:`${packageName} build`},{name:"Build the project in a specific directory",value:`${packageName} build --cwd ./path-to-project`},{name:"Build with deployment-scoped environment variables",value:`${packageName} build --deployment dpl_xxx`}]};var pullCommand={name:"pull",aliases:[],description:"Pull Environment Variables and project settings into .vercel",arguments:[{name:"project-path",required:!1}],options:[{name:"environment",description:"Deployment environment (default: development)",argument:"ENVIRONMENT",shorthand:"e",type:String,deprecated:!1},{...gitBranchOption,description:"Specify the Git branch to pull specific Environment Variables for"},{name:"prod",shorthand:null,type:Boolean,deprecated:!0},{...yesOption,description:"Skip questions when setting up new project using default scope and settings"},projectOption,jsonOption],examples:[{name:"Pull the latest Environment Variables and Project Settings from the cloud",value:`${packageName} pull`},{name:"Pull the latest Environment Variables and Project Settings from the cloud targeting a directory",value:`${packageName} pull ./path-to-project`},{name:"Pull for a specific environment",placeholders:[getEnvTargetPlaceholder()],value:`${packageName} pull --environment=${getEnvTargetPlaceholder()}`},{name:"Pull for a preview feature branch",value:`${packageName} pull --environment=preview --git-branch=feature-branch`},{name:"Pull Environment Variables into an application env file with `vercel env pull`",value:`${packageName} env pull`}]};export{buildCommand,pullCommand};
|
|
@@ -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{packageName}from"./chunk-B4KA3ZH2.js";import{formatOption,jsonOption,limitOption,nextCursorOption,projectOption,sinceOption,untilOption,yesOption}from"./chunk-DORCX7UB.js";var SCOPE_RULES={team:{perEntity:!1,canPause:!0},organization:{perEntity:!1,canPause:!1},project:{perEntity:!0,canPause:!0},product:{perEntity:!0,canPause:!0}},BUDGET_SCOPES=Object.keys(SCOPE_RULES),OPTION_SCOPES=BUDGET_SCOPES.filter(scope=>scope!=="team");function isBudgetScope(value){return typeof value=="string"&&Object.hasOwn(SCOPE_RULES,value)}function isPerEntityScope(scope){return isBudgetScope(scope)?SCOPE_RULES[scope].perEntity:!0}function scopeCanPause(scope){return SCOPE_RULES[scope].canPause}var organizationOption={name:"organization",shorthand:null,type:String,argument:"ORGANIZATION",deprecated:!1,description:"The organization budget, by organization slug or ID, from any team. Needs the organization admin or viewer role"},budgetProjectOption={...projectOption,description:"A project's budget, by project name or ID"},productOption={name:"product",shorthand:null,type:String,argument:"PRODUCT",deprecated:!1,description:"A product's budget, by product ID or name (case-insensitive), from the products that can have a budget"},scopeOptions=[organizationOption,budgetProjectOption,productOption],scopeFilterOptions=[{name:"type",shorthand:null,type:[String],argument:"TYPE",deprecated:!1,description:`Only budgets of these types: ${BUDGET_SCOPES.join(", ")}. Repeat or separate with commas for several`},{...organizationOption,description:"Only the organization budget, by organization slug or ID"},{...budgetProjectOption,description:"Only a project's budget, by name or ID"},{...productOption,description:"Only a product's budget, by product ID or name"}],inspectSubcommand={name:"inspect",aliases:["overview"],description:"Show a Spend Management budget and this cycle's spend against it: the team budget, or the one --organization, --project, or --product selects",arguments:[],options:[...scopeOptions,formatOption,jsonOption],examples:[{name:"Show this cycle's on-demand spend against the team budget",value:`${packageName} billing budgets inspect`},{name:"Show a project budget",value:`${packageName} billing budgets inspect --project my-app`}]},listSubcommand={name:"list",aliases:["ls"],description:"List Spend Management budgets on this team, from every scope unless --organization, --project, or --product narrows them",default:!0,arguments:[],options:[...scopeFilterOptions,formatOption,jsonOption],examples:[{name:"List Spend Management budgets",value:`${packageName} billing budgets`},{name:"List one project's budget",value:`${packageName} billing budgets list --project my-app`}]},setSubcommand={name:"set",aliases:["update"],description:"Create or update a Spend Management budget: the team budget, or the one --organization, --project, or --product selects",arguments:[],options:[...scopeOptions,{name:"amount",shorthand:null,type:Number,argument:"USD",deprecated:!1,description:"Budget amount in whole dollars (minimum 1). Creates with 50/75/100% alerts and notifications on; updates keep pause and webhook settings unless those options are also passed"},{name:"pause",shorthand:null,type:Boolean,deprecated:!1,description:"Pause at 100% of the budget amount: all projects for a team budget, the project for a project budget, or the product's usage for a product that can pause. Organization budgets only notify"},{name:"no-pause",shorthand:null,type:Boolean,deprecated:!1,description:"Do not pause when the budget is reached"},{name:"webhook",shorthand:null,type:String,argument:"URL",deprecated:!1,description:"Webhook URL to notify when a threshold is reached"},{name:"no-webhook",shorthand:null,type:Boolean,deprecated:!1,description:"Remove the budget webhook"},formatOption,jsonOption],examples:[{name:"Create a $500 budget with default 50/75/100% alerts",value:`${packageName} billing budgets set --amount 500`},{name:"Change the budget amount",value:`${packageName} billing budgets set --amount 800`},{name:"Pause all projects and production deployments at 100% of the existing budget",value:`${packageName} billing budgets set --pause`},{name:"Notify a webhook without changing the amount",value:`${packageName} billing budgets set --webhook https://example.com/hook`},{name:"Remove the webhook",value:`${packageName} billing budgets set --no-webhook`},{name:"Create a $200 budget that pauses one project at 100%",value:`${packageName} billing budgets set --project my-app --amount 200 --pause`},{name:"Create a $10,000 organization budget",value:`${packageName} billing budgets set --organization acme --amount 10000`},{name:"Create a $100 budget on one product",value:`${packageName} billing budgets set --product "Function Duration" --amount 100`}]},removeSubcommand={name:"remove",aliases:["rm","delete","disable"],description:"Remove a Spend Management budget: the team budget, or the one --organization, --project, or --product selects",arguments:[],options:[...scopeOptions,yesOption,formatOption,jsonOption],examples:[{name:"Remove the team budget without confirmation",value:`${packageName} billing budgets remove --yes`},{name:"Remove a project budget",value:`${packageName} billing budgets remove --project my-app`}]},alertsDescription="List Spend Management alerts: each budget threshold reached, newest first, from every scope unless --organization, --project, or --product narrows them. For observability alerts, see `vercel alerts`.",alertsOptions=[{...sinceOption,description:"Show alerts triggered after this time (ISO 8601 or relative: 1d, 7d, 30d)"},{...untilOption,description:"Show alerts triggered before this time (ISO 8601 or relative)"},...scopeFilterOptions,limitOption,nextCursorOption,formatOption,jsonOption],alertsListSubcommand={name:"list",aliases:["ls"],description:alertsDescription,default:!0,hidden:!0,arguments:[],options:alertsOptions,examples:[]},alertsSubcommand={name:"alerts",aliases:[],description:alertsDescription,arguments:[],subcommands:[alertsListSubcommand],options:alertsOptions,examples:[{name:"List recent Spend Management alerts for this team",value:`${packageName} billing budgets alerts`},{name:"List one project budget's alerts",value:`${packageName} billing budgets alerts --project my-app`},{name:"List alerts from the last 30 days",value:`${packageName} billing budgets alerts --since 30d`},{name:"Output alerts as JSON",value:`${packageName} billing budgets alerts --json`}]},budgetCommand={name:"budgets",aliases:["budget"],summary:"Manage spending beyond included credit",description:"Show and manage Spend Management for on-demand charges after included credit",arguments:[],subcommands:[inspectSubcommand,listSubcommand,setSubcommand,removeSubcommand,alertsSubcommand],options:[],examples:[{name:"List Spend Management budgets",value:`${packageName} billing budgets`},{name:"Show this cycle's on-demand spend against Spend Management",value:`${packageName} billing budgets inspect`},{name:"Set a $500 budget that pauses all projects and production deployments at 100%",value:`${packageName} billing budgets set --amount 500 --pause`},{name:"Set a $200 budget on one project",value:`${packageName} billing budgets set --project my-app --amount 200`},{name:"Pause all projects and production deployments at 100% of the existing budget",value:`${packageName} billing budgets set --pause`},{name:"Remove the Spend Management budget",value:`${packageName} billing budgets remove --yes`},{name:"List recent Spend Management alerts",value:`${packageName} billing budgets alerts`}]},DEPRECATED_BUDGET_ACTIONS={overview:"inspect",update:"set",delete:"remove",disable:"remove"};export{BUDGET_SCOPES,OPTION_SCOPES,isBudgetScope,isPerEntityScope,scopeCanPause,inspectSubcommand,listSubcommand,setSubcommand,removeSubcommand,alertsListSubcommand,alertsSubcommand,budgetCommand,DEPRECATED_BUDGET_ACTIONS};
|
|
@@ -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{formatCondition,formatTransform,isTargetTransform}from"./chunk-
|
|
7
|
+
import{formatCondition,formatTransform,isTargetTransform}from"./chunk-K6KS5GZD.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";function extractEnvVarNames(value){let names=new Set;for(let m of value.matchAll(/\$\{?([A-Z_][A-Z0-9_]*)\}?/g))names.add(m[1]);return Array.from(names)}function escapeRegex(value){return value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function referencesEnvVar(value,name){let escapedName=escapeRegex(name);return new RegExp(`\\$(?:\\{${escapedName}\\}|${escapedName}(?![A-Za-z0-9_]))`).test(value)}function referencesBracedEnvVar(value,name){return new RegExp(`\\$\\{${escapeRegex(name)}\\}`).test(value)}function collectReferencedEnvVars(values,explicitEnv=[],excludedNames=new Set){let names=new Set(explicitEnv.filter(name=>values.some(value=>referencesEnvVar(value,name))));for(let value of values)for(let name of extractEnvVarNames(value))(!excludedNames.has(name)||names.has(name)||referencesBracedEnvVar(value,name))&&names.add(name);return Array.from(names)}function collectNamedRegexCaptures(source){return new Set(Array.from(source.matchAll(/\(\?<([a-zA-Z][a-zA-Z0-9_]*)>/g),match=>match[1]))}function populateRouteEnv(route,srcSyntax="regex"){let excludedNames=srcSyntax==="regex"&&route.src?collectNamedRegexCaptures(route.src):new Set,routeValues=[...route.dest?[route.dest]:[],...Object.values(route.headers||{})],routeEnv=collectReferencedEnvVars(routeValues,route.env,excludedNames);if(route.env=routeEnv.length>0?routeEnv:void 0,route.transforms)for(let transform of route.transforms){let args=transform.args?Array.isArray(transform.args)?transform.args:[transform.args]:[],names=collectReferencedEnvVars(args,transform.env,excludedNames);transform.env=names.length>0?names:void 0}}async function generateRoute(client,projectId,input,options={}){let{teamId}=options,query=new URLSearchParams;teamId&&query.set("teamId",teamId);let queryString=query.toString(),url=`/v1/projects/${projectId}/routes/generate${queryString?`?${queryString}`:""}`;return await client.fetch(url,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(input)})}function parseTransforms(values,type,op){return values.map(value=>parseTransform(value,type,op))}function parseTransform(input,type,op){if(op==="delete"){let key2=input.trim();if(!key2)throw new Error("Delete operation requires a key");return{type,op,target:{key:key2}}}let eqIndex=input.indexOf("=");if(eqIndex===-1)throw new Error(`Invalid format: "${input}". Expected format: key=value`);let key=input.slice(0,eqIndex).trim(),args=input.slice(eqIndex+1);if(!key)throw new Error("Transform key cannot be empty");return{type,op,target:{key},args}}function collectTransforms(flags){let transforms=[];return flags.setResponseHeader&&transforms.push(...parseTransforms(flags.setResponseHeader,"response.headers","set")),flags.appendResponseHeader&&transforms.push(...parseTransforms(flags.appendResponseHeader,"response.headers","append")),flags.deleteResponseHeader&&transforms.push(...parseTransforms(flags.deleteResponseHeader,"response.headers","delete")),flags.setRequestHeader&&transforms.push(...parseTransforms(flags.setRequestHeader,"request.headers","set")),flags.appendRequestHeader&&transforms.push(...parseTransforms(flags.appendRequestHeader,"request.headers","append")),flags.deleteRequestHeader&&transforms.push(...parseTransforms(flags.deleteRequestHeader,"request.headers","delete")),flags.setRequestQuery&&transforms.push(...parseTransforms(flags.setRequestQuery,"request.query","set")),flags.appendRequestQuery&&transforms.push(...parseTransforms(flags.appendRequestQuery,"request.query","append")),flags.deleteRequestQuery&&transforms.push(...parseTransforms(flags.deleteRequestQuery,"request.query","delete")),transforms}function collectResponseHeaders(setHeaders){let headers={};for(let input of setHeaders){let eqIndex=input.indexOf("=");if(eqIndex===-1)throw new Error(`Invalid header format: "${input}". Expected format: key=value`);let key=input.slice(0,eqIndex).trim(),value=input.slice(eqIndex+1);if(!key)throw new Error("Header key cannot be empty");headers[key]=value}return headers}var MAX_NAME_LENGTH=256,MAX_DESCRIPTION_LENGTH=1024,MAX_CONDITIONS=16,VALID_SYNTAXES=["regex","path-to-regexp","equals"],REDIRECT_STATUS_CODES=[301,302,303,307,308],VALID_ACTION_TYPES=["rewrite","redirect","set-status"],ALL_ACTION_CHOICES=[{name:"Rewrite",value:"rewrite",exclusive:!0},{name:"Redirect",value:"redirect",exclusive:!0},{name:"Set Status Code",value:"set-status",exclusive:!0},{name:"Response Headers",value:"response-headers"},{name:"Request Headers",value:"request-headers"},{name:"Request Query",value:"request-query"}];function stripQuotes(str){return str.startsWith('"')&&str.endsWith('"')&&str.length>=2||str.startsWith("'")&&str.endsWith("'")&&str.length>=2?str.slice(1,-1):str}function extractTransformFlags(flags){return{setResponseHeader:flags["--set-response-header"],appendResponseHeader:flags["--append-response-header"],deleteResponseHeader:flags["--delete-response-header"],setRequestHeader:flags["--set-request-header"],appendRequestHeader:flags["--append-request-header"],deleteRequestHeader:flags["--delete-request-header"],setRequestQuery:flags["--set-request-query"],appendRequestQuery:flags["--append-request-query"],deleteRequestQuery:flags["--delete-request-query"]}}function collectHeadersAndTransforms(transformFlags){let headers=transformFlags.setResponseHeader?collectResponseHeaders(transformFlags.setResponseHeader):{},transforms=collectTransforms({...transformFlags,setResponseHeader:void 0});return{headers,transforms}}function hasAnyTransformFlags(flags){let tf=extractTransformFlags(flags);return!!(tf.setResponseHeader||tf.appendResponseHeader||tf.deleteResponseHeader||tf.setRequestHeader||tf.appendRequestHeader||tf.deleteRequestHeader||tf.setRequestQuery||tf.appendRequestQuery||tf.deleteRequestQuery)}function validateActionFlags(action,dest,status){if(!action)return dest||status!==void 0?"--action is required when using --dest or --status. Use --action rewrite, --action redirect, or --action set-status.":null;if(!VALID_ACTION_TYPES.includes(action))return`Invalid action type: "${action}". Valid types: ${VALID_ACTION_TYPES.join(", ")}`;switch(action){case"rewrite":if(!dest)return"--action rewrite requires --dest.";if(status!==void 0)return"--action rewrite does not accept --status.";break;case"redirect":if(!dest)return"--action redirect requires --dest.";if(status===void 0)return`--action redirect requires --status (${REDIRECT_STATUS_CODES.join(", ")}).`;if(!REDIRECT_STATUS_CODES.includes(status))return`Invalid redirect status: ${status}. Must be one of: ${REDIRECT_STATUS_CODES.join(", ")}`;break;case"set-status":if(dest)return"--action set-status does not accept --dest.";if(status===void 0)return"--action set-status requires --status.";if(status<100||status>599)return"Status code must be between 100 and 599.";break}return null}async function collectActionDetails(client,actionType,flags){switch(actionType){case"rewrite":{let dest=await client.input.text({message:"Destination URL:",validate:val=>val?!0:"Destination is required"});Object.assign(flags,{"--dest":dest});break}case"redirect":{let dest=await client.input.text({message:"Destination URL:",validate:val=>val?!0:"Destination is required"}),status=await client.input.select({message:"Status code:",choices:[{name:"307 - Temporary Redirect",value:307},{name:"308 - Permanent Redirect",value:308},{name:"301 - Moved Permanently",value:301},{name:"302 - Found",value:302},{name:"303 - See Other",value:303}]});Object.assign(flags,{"--dest":dest,"--status":status});break}case"set-status":{let statusCode=await client.input.text({message:"HTTP status code:",validate:val=>{let num=parseInt(val,10);return isNaN(num)||num<100||num>599?"Status code must be between 100 and 599":!0}});Object.assign(flags,{"--status":parseInt(statusCode,10)});break}case"response-headers":{await collectInteractiveHeaders(client,"response",flags);break}case"request-headers":{await collectInteractiveHeaders(client,"request-header",flags);break}case"request-query":{await collectInteractiveHeaders(client,"request-query",flags);break}}}async function collectInteractiveConditions(client,flags){let addMore=!0;for(;addMore;){let currentHas=flags["--has"]||[],currentMissing=flags["--missing"]||[];if(currentHas.length>0||currentMissing.length>0){output_manager_default.log(`
|
|
8
8
|
Current conditions:`);for(let c of currentHas)output_manager_default.print(` has: ${c}
|
|
9
9
|
`);for(let c of currentMissing)output_manager_default.print(` does not have: ${c}
|
|
10
10
|
`);output_manager_default.print(`
|
|
@@ -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{buildCorrectedCommand,isArgumentError}from"./chunk-
|
|
7
|
+
import{buildCorrectedCommand,isArgumentError}from"./chunk-INIZJZ3O.js";import{buildInvalidTokenAgentError,getErrorRecovery,getFlagExperimentConflict,isInvalidTokenApiError,isInvalidTokenError,shouldEmitNonInteractiveCommandError,trackAgentError,withGlobalFlags,writeAgentError}from"./chunk-CSNP5RIM.js";import{parseRetryAfterHeaderAsMillis,require_bytes}from"./chunk-QFE3RPMA.js";import{getCommandName,getCommandNamePlain}from"./chunk-B4KA3ZH2.js";import{pkg_default}from"./chunk-BOJDM3O7.js";import{cliErrorFromUnknown,output_manager_default,recordCliError}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_bytes=__toESM(require_bytes(),1);async function responseError(res,fallbackMessage=null,parsedBody={}){let message="",bodyError;if(res.status>=400&&res.status<500){let body;try{body=await res.json()}catch{body=parsedBody}bodyError=body.error||body.err||{},message=bodyError.message}message||(message=fallbackMessage===null?"Response Error":fallbackMessage);let err=new Error(`${message} (${res.status})`);if(err.status=res.status,err.serverMessage=message,bodyError)for(let field of Object.keys(bodyError))field!=="message"&&(err[field]=bodyError[field]);if(res.status===429||res.status===503){let parsed=parseRetryAfterHeaderAsMillis(res.headers.get("Retry-After"));err.retryAfterMs=parsed??(res.status===429?0:void 0)}return err}var MAX_SERIALIZED_ERROR_DEPTH=5;function isPlainObject(value){let proto=Object.getPrototypeOf(value);return proto===null||proto===Object.prototype}function toJsonSafe(value,ancestors,depth){if(typeof value=="bigint")return value.toString();if(!(typeof value=="function"||typeof value=="symbol")){if(value===null||typeof value!="object")return value;if(ancestors.has(value))return"[Circular]";if(depth>=MAX_SERIALIZED_ERROR_DEPTH)return"[Truncated]";if(value instanceof Error)return serializeError(value,ancestors,depth+1);if(!Array.isArray(value)&&!isPlainObject(value))return`[${value.constructor?.name||"Object"}]`;ancestors.add(value);try{if(Array.isArray(value))return value.map(item=>toJsonSafe(item,ancestors,depth+1));let copy={};for(let[key,child]of Object.entries(value))copy[key]=toJsonSafe(child,ancestors,depth+1);return copy}finally{ancestors.delete(value)}}}function serializeError(err,ancestors,depth){ancestors.add(err);try{let enumerable={name:err.name};for(let key of Object.getOwnPropertyNames(err))enumerable[key]=toJsonSafe(err[key],ancestors,depth);return enumerable}finally{ancestors.delete(err)}}function toEnumerableError(err){return err===null||typeof err!="object"?{name:"Error",message:String(err)}:serializeError(err,new WeakSet,0)}function printError(error2,client){if(typeof error2=="string"&&(error2=new Error(error2)),recordCliError(cliErrorFromUnknown(error2)),client&&shouldEmitNonInteractiveCommandError(client)&&isInvalidTokenError(error2)){output_manager_default.stopSpinner(),writeAgentError(client,buildInvalidTokenAgentError(client));return}let apiError=error2,{message,stack,status,code,sizeLimit}=apiError,argumentError=isArgumentError(error2)?error2:void 0,suggestion=argumentError?.suggestedOption&&argumentError.invalidOption,correction=suggestion&&client&&argumentError?buildCorrectedCommand(client.argv,argumentError.invalidOption,argumentError.suggestedOption,argumentError.flagsSpecification):void 0,recovery=getErrorRecovery(apiError,client),statusReason=isInvalidTokenApiError(error2)?"login_required":status===403?"forbidden":status===402?"payment_required":status===401?"not_authorized":status===429?"rate_limited":argumentError?"invalid_arguments":"api_error",conflict=getFlagExperimentConflict(apiError),reason=conflict?"conflict":statusReason,conflictCommand=conflict&&(client?withGlobalFlags(client,conflict.commandTemplate,{preserveProject:!0}):getCommandNamePlain(conflict.commandTemplate)),hint=conflictCommand?`An experiment uses this flag. To see the experiment, run \`${conflictCommand}\`.`:argumentError?.allowedOptions?`Vercel CLI ${pkg_default.version} accepts: ${argumentError.allowedOptions.join(", ")}.${suggestion?` Did you mean ${argumentError.suggestedOption}?`:""}`:recovery.hint;if(client&&(status||argumentError?.allowedOptions)){let payload={...recovery,status:"error",reason,message:conflict?.message??(apiError.serverMessage||message),hint,...conflict&&conflictCommand&&{data:{remoteMessage:conflict.remoteMessage},next:[{command:conflictCommand,when:conflict.commandTemplate.includes("<")?"Replace <experiment> with the experiment that uses the flag, then run the command":"To see the experiment that uses the flag"}]},...argumentError?.allowedOptions&&{allowedOptions:argumentError.allowedOptions,suggestedOption:argumentError.suggestedOption,cliVersion:pkg_default.version},...correction&&{next:[{command:correction,when:correction.includes("<")?"Replace placeholders with the intended values, then run the corrected command":"Run the corrected command"}]}};if(shouldEmitNonInteractiveCommandError(client)){output_manager_default.stopSpinner(),writeAgentError(client,payload);return}trackAgentError(client,payload)}if(conflict){output_manager_default.stopSpinner(),output_manager_default.fatal(conflict.message),conflict.remoteMessage&&output_manager_default.print(` Flags API: ${conflict.remoteMessage}
|
|
8
8
|
`),output_manager_default.print(`
|
|
9
9
|
To see the experiment, run:
|
|
10
10
|
${conflictCommand}
|
|
@@ -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{getConfigFilePath}from"./chunk-
|
|
7
|
+
import{getConfigFilePath}from"./chunk-4Z6R5KHZ.js";import{require_cli_config}from"./chunk-4SAVH3H7.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_cli_config=__toESM(require_cli_config(),1);function markOnboardingSeen(client,key){client.config[key]=!0;try{let path=getConfigFilePath();(0,import_cli_config.writeGlobalConfigFile)(path,{...(0,import_cli_config.readGlobalConfigFile)(path),[key]:!0})}catch{output_manager_default.debug(`Could not save ${key}.`)}}export{markOnboardingSeen};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __dirname_(__filename);
|
|
7
|
+
import{external_exports}from"./chunk-2AMO2VMV.js";import{recordLine}from"./chunk-4Z6R5KHZ.js";import{isAPIError}from"./chunk-QFE3RPMA.js";import{require_strip_ansi}from"./chunk-BS32OUOC.js";import{__toESM}from"./chunk-BZENIQ7N.js";var CONTINUATION_VERSION=1,continuationSchema=external_exports.object({v:external_exports.literal(CONTINUATION_VERSION),event:external_exports.string().min(1),ownerId:external_exports.string().min(1),projectIds:external_exports.array(external_exports.string().min(1)).optional(),timeRange:external_exports.object({start:external_exports.string().min(1),end:external_exports.string().min(1)}),filter:external_exports.string().optional(),order:external_exports.enum(["asc","desc"]),cursor:external_exports.string().min(1)});function encodeContinuation(continuation){let payload={v:CONTINUATION_VERSION,event:continuation.event,ownerId:continuation.ownerId,...continuation.projectIds?{projectIds:[...continuation.projectIds]}:{},timeRange:{start:continuation.timeRange.start,end:continuation.timeRange.end},...continuation.filter!==void 0?{filter:continuation.filter}:{},order:continuation.order,cursor:continuation.cursor};return Buffer.from(JSON.stringify(payload),"utf8").toString("base64url")}function decodeContinuation(token){if(!/^[A-Za-z0-9_-]+$/.test(token))return;let raw;try{raw=JSON.parse(Buffer.from(token,"base64url").toString("utf8"))}catch{return}let parsed=continuationSchema.safeParse(raw);if(!parsed.success)return;let{v:_version,...continuation}=parsed.data;return continuation}var MAX_PAGE_SIZE=1e3,QUERY_REASON_HEADER="x-vercel-observability-query-reason",responseSchema=external_exports.object({events:external_exports.array(external_exports.record(external_exports.string(),external_exports.unknown())),pagination:external_exports.object({hasMore:external_exports.boolean(),nextCursor:external_exports.string().nullable()}),meta:external_exports.object({excludedIntervals:external_exports.array(external_exports.object({start:external_exports.string(),end:external_exports.string()})).optional()}).passthrough().optional()}),InvalidEventsResponseError=class extends Error{constructor(){super("The Observability API returned an invalid events response."),this.name="InvalidEventsResponseError"}},RecordTooLargeError=class extends Error{constructor(){super("A single record exceeds the API response size limit and cannot be returned."),this.name="RecordTooLargeError"}};function isResultTooLarge(err){return isAPIError(err)&&err.status===413&&err.code==="result_too_large"}async function fetchEventsPage(client,request,limit,cursor){let body={event:request.event,scope:{ownerId:request.ownerId,...request.projectIds?{projectIds:[...request.projectIds]}:{}},timeRange:{start:request.timeRange.start,end:request.timeRange.end},select:[...request.select],order:"desc",limit};request.filter&&(body.filter=request.filter),cursor&&(body.cursor=cursor);let params=new URLSearchParams({teamId:request.ownerId}),response=await client.fetch(`/v1/observability/events?${params}`,{method:"POST",headers:{[QUERY_REASON_HEADER]:request.queryReason},body,useCurrentTeam:!1,...request.bailOn429?{bailOn429:!0}:{},...request.gatewayTimeoutRetries!==void 0?{gatewayTimeoutRetries:request.gatewayTimeoutRetries}:{}}),parsed=responseSchema.safeParse(response);if(!parsed.success)throw new InvalidEventsResponseError;return parsed.data}async function*fetchEventPages(client,request,limit,startCursor){let remaining=limit,maxPageSize=MAX_PAGE_SIZE,cursor=startCursor,lastNextCursor=null;for(;remaining>0;){let pageSize=Math.min(remaining,maxPageSize),response;for(;;)try{response=await fetchEventsPage(client,request,pageSize,cursor);break}catch(err){if(!isResultTooLarge(err))throw err;if(pageSize===1)throw new RecordTooLargeError;pageSize=Math.max(1,Math.floor(pageSize/2)),maxPageSize=pageSize}let events=response.events.slice(0,remaining);remaining-=events.length;let{hasMore,nextCursor}=response.pagination,continues=hasMore&&!!nextCursor&&nextCursor!==cursor;if(lastNextCursor=continues?nextCursor:null,yield{events,excludedIntervals:response.meta?.excludedIntervals??[],nextCursor:lastNextCursor},!continues)return{hasMore,nextCursor:null};cursor=nextCursor??void 0}return{hasMore:!0,nextCursor:lastNextCursor}}function sortIntervals(intervals){return[...intervals].sort((a,b)=>Date.parse(a.start)-Date.parse(b.start)||Date.parse(a.end)-Date.parse(b.end))}var import_strip_ansi=__toESM(require_strip_ansi(),1);function recordLine2(type,event){return recordLine(type,event)}function warningLine(warning){let line={type:"warning",reason:warning.reason,message:(0,import_strip_ansi.default)(warning.message),...warning.data?{data:warning.data}:{}};return`${JSON.stringify(line)}
|
|
8
|
+
`}function serializeTimeRange(range){return{start:range.start.toISOString(),end:range.end.toISOString()}}export{encodeContinuation,decodeContinuation,InvalidEventsResponseError,RecordTooLargeError,fetchEventPages,sortIntervals,recordLine2 as recordLine,warningLine,serializeTimeRange};
|
|
@@ -0,0 +1,8 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __dirname_(__filename);
|
|
7
|
+
import{VERCEL_DIR,VERCEL_DIR_PROJECT,require_lib,writeFileNoFollow}from"./chunk-4Z6R5KHZ.js";import{require_dist}from"./chunk-MCYG7CCE.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_fs_extra=__toESM(require_lib(),1);import{join}from"path";var import_error_utils=__toESM(require_dist(),1);async function writeProjectSettings(cwd,project,org,isRepoLinked,root=cwd){let analyticsId;project.analytics?.id&&(!project.analytics.disabledAt||project.analytics.enabledAt&&project.analytics.enabledAt>project.analytics.disabledAt)&&(analyticsId=project.analytics.id);let projectLinkAndSettings={projectId:isRepoLinked?void 0:project.id,orgId:isRepoLinked?void 0:org.id,projectName:isRepoLinked?void 0:project.name,settings:{createdAt:project.createdAt,framework:project.framework,devCommand:project.devCommand,installCommand:project.installCommand,buildCommand:project.buildCommand,outputDirectory:project.outputDirectory,rootDirectory:project.rootDirectory,directoryListing:project.directoryListing,nodeVersion:project.nodeVersion,vercelFlags:project.vercelFlags,analyticsId}},path=join(cwd,VERCEL_DIR,VERCEL_DIR_PROJECT);return await writeFileNoFollow(path,`${JSON.stringify(projectLinkAndSettings,null,2)}
|
|
8
|
+
`,root)}async function readProjectSettings(vercelDir){try{return JSON.parse(await(0,import_fs_extra.readFile)(join(vercelDir,VERCEL_DIR_PROJECT),"utf8"))}catch(err){if((0,import_error_utils.isErrnoException)(err)&&err.code&&["ENOENT","ENOTDIR"].includes(err.code)||(0,import_error_utils.isError)(err)&&err.name==="SyntaxError")return null;throw err}}function pickOverrides(vercelConfig){let overrides={};for(let prop of["buildCommand","devCommand","framework","ignoreCommand","installCommand","outputDirectory"])typeof vercelConfig[prop]<"u"&&(prop==="ignoreCommand"?overrides.commandForIgnoringBuildStep=vercelConfig[prop]:overrides[prop]=vercelConfig[prop]);return overrides}export{writeProjectSettings,readProjectSettings,pickOverrides};
|