@vercel/cli-support 65.11.0 → 65.12.0-snapshot-801db9d533c3
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/README.md +8 -120
- package/dist/chunks/add-BDJYCIBT.js +8 -0
- package/dist/chunks/add-LZR4CD7O.js +8 -0
- package/dist/chunks/add-MR6YZTRQ.js +8 -0
- package/dist/chunks/{alerts-JGRRCQA4.js → alerts-VOYMO6NJ.js} +1 -1
- package/dist/chunks/build-H2U56DYB.js +7 -0
- package/dist/chunks/{chunk-UF2E5BDE.js → chunk-23PO6JK6.js} +1 -1
- package/dist/chunks/{chunk-PUKYAALC.js → chunk-24SIHFEW.js} +1 -1
- package/dist/chunks/{chunk-EBIJ26IV.js → chunk-2C6TLXE5.js} +1 -1
- package/dist/chunks/{chunk-QROI2U32.js → chunk-2CQJKBKV.js} +2 -4
- package/dist/chunks/{chunk-7MZLV3KK.js → chunk-2CZL3GJU.js} +1 -1
- package/dist/chunks/{chunk-XH2R2EIK.js → chunk-2EV53VB5.js} +1 -1
- package/dist/chunks/{chunk-5B5CLOKM.js → chunk-2FNOYPRB.js} +1 -1
- package/dist/chunks/{chunk-4E6BGQWR.js → chunk-2LOA3LC6.js} +1 -1
- package/dist/chunks/{chunk-M3Z6NSC2.js → chunk-2V6UURUN.js} +1 -1
- package/dist/chunks/{chunk-B6QVH6IG.js → chunk-32EEQITR.js} +1 -1
- package/dist/chunks/{chunk-4VP57TOJ.js → chunk-33OMDQTW.js} +1 -1
- package/dist/chunks/{chunk-CFYLTZSV.js → chunk-3AGRCSWN.js} +1 -1
- package/dist/chunks/{chunk-42J2KCDF.js → chunk-3EFPSM6M.js} +1 -1
- package/dist/chunks/{chunk-DQASZDQT.js → chunk-3SNWIYU7.js} +1 -1
- package/dist/chunks/{chunk-EVBGFSK5.js → chunk-42Y46TZ3.js} +1 -1
- package/dist/chunks/{chunk-KV3QXTRZ.js → chunk-4OO6TXBM.js} +1 -1
- package/dist/chunks/{chunk-UUDE44NV.js → chunk-54FY6GJ5.js} +1 -1
- package/dist/chunks/{chunk-RIJ45N7C.js → chunk-5HQEYPDO.js} +1 -1
- package/dist/chunks/chunk-5KL6UFII.js +7 -0
- package/dist/chunks/{chunk-ECFLIVEE.js → chunk-5L566FZB.js} +1 -1
- package/dist/chunks/{chunk-NZW3RIQM.js → chunk-5MFGTXWC.js} +1 -1
- package/dist/chunks/{chunk-4ELZOAQH.js → chunk-5TMHRECT.js} +1 -1
- package/dist/chunks/{chunk-74VQ7PQV.js → chunk-5YLKPSZI.js} +1 -1
- package/dist/chunks/chunk-66TKNVRG.js +60 -0
- package/dist/chunks/{chunk-RDWLLSPU.js → chunk-6737KAJP.js} +1 -1
- package/dist/chunks/{chunk-V5TOMLK4.js → chunk-6Q2XEYCJ.js} +1 -1
- package/dist/chunks/{chunk-7VGBGUX7.js → chunk-6S6UZV3V.js} +1 -1
- package/dist/chunks/{chunk-EZLPMOHM.js → chunk-6WTGR7UP.js} +1 -1
- package/dist/chunks/chunk-7BDQUBSO.js +7 -0
- package/dist/chunks/chunk-7M6EHM5B.js +7 -0
- package/dist/chunks/{chunk-42FOKWGX.js → chunk-7PGDJTAH.js} +1 -1
- package/dist/chunks/{chunk-BZIC36KP.js → chunk-7TVNKTN2.js} +1 -1
- package/dist/chunks/{chunk-IIGNDMLO.js → chunk-ABSFPYM4.js} +1 -1
- package/dist/chunks/{chunk-MBXLL2HF.js → chunk-AGLOVMPC.js} +3 -3
- package/dist/chunks/{chunk-B56SRT5W.js → chunk-AIZIVXNX.js} +1 -1
- package/dist/chunks/{chunk-WBSFE6IE.js → chunk-AQBK55BT.js} +1 -1
- package/dist/chunks/chunk-AW33SRYY.js +7 -0
- package/dist/chunks/{chunk-UNPK7LVC.js → chunk-B3IBBNIR.js} +1 -1
- package/dist/chunks/{chunk-VRH7LWOC.js → chunk-B4KA3ZH2.js} +1 -1
- package/dist/chunks/{chunk-2J35YKA2.js → chunk-BC74BRVP.js} +12 -12
- package/dist/chunks/{chunk-PFZCGMJ7.js → chunk-BH5OASEJ.js} +1 -1
- package/dist/chunks/chunk-BIGJEDOA.js +11 -0
- package/dist/chunks/chunk-BOJDM3O7.js +7 -0
- package/dist/chunks/{chunk-375JVQYK.js → chunk-CJZE7647.js} +1 -1
- package/dist/chunks/{chunk-YZKARZ2B.js → chunk-CKJZSRAC.js} +1 -1
- package/dist/chunks/{chunk-TUAS3L5I.js → chunk-D5JRYYTT.js} +1 -1
- package/dist/chunks/{chunk-SF4E3AQ3.js → chunk-E3WP42P2.js} +1 -1
- package/dist/chunks/{chunk-6UMVJ7RL.js → chunk-E7CEQ2PO.js} +1 -1
- package/dist/chunks/chunk-E7IFYSQT.js +12 -0
- package/dist/chunks/chunk-EDO66J3L.js +7 -0
- package/dist/chunks/{chunk-C5QEQSEX.js → chunk-EIFBF3JQ.js} +1 -1
- package/dist/chunks/chunk-EM3U6PRB.js +7 -0
- package/dist/chunks/{chunk-AMPJ6RWT.js → chunk-EZVNGJN5.js} +1 -1
- package/dist/chunks/{chunk-ZPBGAZC2.js → chunk-F6KURUPQ.js} +1 -1
- package/dist/chunks/{chunk-5DXC4TE2.js → chunk-F7L5SXJM.js} +1 -1
- package/dist/chunks/{chunk-ZTHW5VNH.js → chunk-FFS3QJCU.js} +2 -2
- package/dist/chunks/{chunk-FNH3T3CF.js → chunk-FGZXIHGN.js} +1 -1
- package/dist/chunks/chunk-FXOKM2RM.js +7 -0
- package/dist/chunks/{chunk-NUSKXXZZ.js → chunk-FZLCDLWD.js} +1 -1
- package/dist/chunks/{chunk-CD6ZWCKT.js → chunk-G63MSB6N.js} +1 -1
- package/dist/chunks/{chunk-HNH3DPIZ.js → chunk-GAILIG45.js} +1 -1
- package/dist/chunks/{chunk-FVVOHGQE.js → chunk-GHNHUSVK.js} +1 -1
- package/dist/chunks/{chunk-4DMKP6AO.js → chunk-GOI2VVI7.js} +2 -2
- package/dist/chunks/chunk-GORL5DZC.js +11 -0
- package/dist/chunks/{chunk-WMWB7QKG.js → chunk-GP3KGUCK.js} +1 -1
- package/dist/chunks/{chunk-GL66K54F.js → chunk-GPDERS2D.js} +1 -1
- package/dist/chunks/{chunk-CU3LNJZV.js → chunk-GUSOYIW6.js} +1 -1
- package/dist/chunks/{chunk-AO6AMYBF.js → chunk-GY44CQXK.js} +1 -1
- package/dist/chunks/chunk-H64GR57G.js +7 -0
- package/dist/chunks/{chunk-VKCBEW6R.js → chunk-HBWRIR42.js} +1 -1
- package/dist/chunks/{chunk-4U6ACPA4.js → chunk-HR66URIC.js} +1 -1
- package/dist/chunks/chunk-HRGJO4HK.js +7 -0
- package/dist/chunks/chunk-HU5NUOWH.js +7 -0
- package/dist/chunks/{chunk-4KM733OB.js → chunk-HVJN2SSK.js} +1 -1
- package/dist/chunks/chunk-HXLOBW75.js +10 -0
- package/dist/chunks/{chunk-4T57TXQ3.js → chunk-IBBLLUXD.js} +1 -1
- package/dist/chunks/{chunk-MO2G2ND2.js → chunk-IJBRT2AD.js} +1 -1
- package/dist/chunks/{chunk-NT2N5UR4.js → chunk-IRIFXCZW.js} +1 -1
- package/dist/chunks/{chunk-ECGY67NB.js → chunk-J7RNU6AO.js} +1 -1
- package/dist/chunks/{chunk-SDYCW5JM.js → chunk-JONZUKWX.js} +1 -1
- package/dist/chunks/{chunk-P24YBQ6H.js → chunk-JVGENO2R.js} +1 -1
- package/dist/chunks/{chunk-PKNEWN4W.js → chunk-K46QQRUN.js} +1 -1
- package/dist/chunks/{chunk-BJXLR2RE.js → chunk-KKYNEEM7.js} +1 -1
- package/dist/chunks/{chunk-3TDFSO4X.js → chunk-KPSINH7T.js} +1 -1
- package/dist/chunks/chunk-KR4DMT3I.js +7 -0
- package/dist/chunks/{chunk-RCUDI7OF.js → chunk-M32HBBPK.js} +1 -1
- package/dist/chunks/{chunk-ZQXXESKG.js → chunk-MAA5GRIM.js} +1 -1
- package/dist/chunks/chunk-MCYG7CCE.js +7 -0
- package/dist/chunks/{chunk-VAZ7JG2Z.js → chunk-MNZYFYYH.js} +1 -1
- package/dist/chunks/{chunk-HDISAMDF.js → chunk-MQJ4MINN.js} +1 -1
- package/dist/chunks/{chunk-ITQPDXXA.js → chunk-MTZYPCZ7.js} +1 -1
- package/dist/chunks/{chunk-NE6PKR2J.js → chunk-MWWMY5R6.js} +1 -1
- package/dist/chunks/{chunk-UBJVL3NJ.js → chunk-MWXL6HYB.js} +3 -3
- package/dist/chunks/{chunk-UFXIPUNI.js → chunk-MXALPSIX.js} +1 -1
- package/dist/chunks/{chunk-7JMN657A.js → chunk-NBTFAXL4.js} +1 -1
- package/dist/chunks/{chunk-HYOWFNOP.js → chunk-NIZW6D6D.js} +1 -1
- package/dist/chunks/{chunk-KBVYN635.js → chunk-NREH4VSU.js} +1 -1
- package/dist/chunks/{chunk-TPJV5UNE.js → chunk-NTYBDY24.js} +1 -1
- package/dist/chunks/{chunk-NDMQVBTV.js → chunk-NYJTWSSD.js} +1 -1
- package/dist/chunks/{chunk-7ZJ7VUIR.js → chunk-O3DAPRJ3.js} +1 -1
- package/dist/chunks/chunk-O7TFWXLZ.js +13 -0
- package/dist/chunks/{chunk-K7ARJYAG.js → chunk-OFOZ5DBA.js} +1 -1
- package/dist/chunks/{chunk-FYE7ILRR.js → chunk-OFZUWHZW.js} +1 -1
- package/dist/chunks/{chunk-RI6DJAFI.js → chunk-OHEM2CSW.js} +1 -1
- package/dist/chunks/{chunk-6ORJPXDQ.js → chunk-OHK3Y5NS.js} +1 -1
- package/dist/chunks/{chunk-IHTWZEQW.js → chunk-OKKG2FUS.js} +1 -1
- package/dist/chunks/{chunk-7NMC4E66.js → chunk-OR3ZEVBW.js} +1 -1
- package/dist/chunks/{chunk-QDHTI5WK.js → chunk-POR6KNXT.js} +1 -1
- package/dist/chunks/{chunk-JUSNW3IF.js → chunk-PSFHYOLD.js} +1 -1
- package/dist/chunks/{chunk-TZE4CS4K.js → chunk-QBHTNUM5.js} +1 -1
- package/dist/chunks/chunk-QJDWNTYH.js +7 -0
- package/dist/chunks/{chunk-YUHKH4TK.js → chunk-QKOLFLLP.js} +1 -1
- package/dist/chunks/chunk-REJLEESP.js +10 -0
- package/dist/chunks/{chunk-EIMHC5UY.js → chunk-ROKZIMRO.js} +1 -1
- package/dist/chunks/{chunk-DR6OJB6P.js → chunk-RPIBJRIT.js} +1 -1
- package/dist/chunks/chunk-SEHERY6U.js +7 -0
- package/dist/chunks/{chunk-RR5SDYNN.js → chunk-SHMHL6W7.js} +1 -1
- package/dist/chunks/{chunk-5FIY443M.js → chunk-SMETSNPH.js} +1 -1
- package/dist/chunks/{chunk-NMIZSQDN.js → chunk-SP6E7PHW.js} +1 -1
- package/dist/chunks/chunk-SQBDW5FO.js +10 -0
- package/dist/chunks/chunk-SWFG73OS.js +8 -0
- package/dist/chunks/{chunk-CHIYT3V4.js → chunk-TA7KTIDV.js} +1 -1
- package/dist/chunks/{chunk-W24TLPO5.js → chunk-TJBVFVXK.js} +1 -1
- package/dist/chunks/{chunk-JTAUWH5V.js → chunk-TJUZVODP.js} +1 -1
- package/dist/chunks/{chunk-VWJXV5ZM.js → chunk-TKVUWTBK.js} +1 -1
- package/dist/chunks/chunk-U7ZEFVSQ.js +8 -0
- package/dist/chunks/{chunk-WTFD4MDT.js → chunk-UZQJQXGJ.js} +1 -1
- package/dist/chunks/{chunk-UIMJNASP.js → chunk-V7G4VDZI.js} +1 -1
- package/dist/chunks/{chunk-WNDR5HCU.js → chunk-VCJIB3FB.js} +1 -1
- package/dist/chunks/{chunk-EGTJTCCW.js → chunk-VFBELAGX.js} +1 -1
- package/dist/chunks/{chunk-AYZ52QDF.js → chunk-VM6X5BTK.js} +1 -1
- package/dist/chunks/{chunk-HZEKH3RO.js → chunk-VVTMF2AY.js} +1 -1
- package/dist/chunks/{chunk-N65H4JMJ.js → chunk-W25UARQV.js} +1 -1
- package/dist/chunks/chunk-WLMW7K7F.js +7 -0
- package/dist/chunks/{chunk-IHCYNUI2.js → chunk-XJYDISH3.js} +1 -1
- package/dist/chunks/chunk-XSQZ35V6.js +7 -0
- package/dist/chunks/{chunk-YODQLETL.js → chunk-XVDUP67R.js} +1 -1
- package/dist/chunks/{chunk-SLCPSRDR.js → chunk-Y2FVJ7YO.js} +1 -1
- package/dist/chunks/chunk-Y2SQC4GV.js +10 -0
- package/dist/chunks/{chunk-FVTRIRML.js → chunk-Y5S2OEJH.js} +1 -1
- package/dist/chunks/{chunk-EJN55YDV.js → chunk-YANOBY2G.js} +1 -1
- package/dist/chunks/{chunk-2RXUQ72I.js → chunk-YIOMTAUF.js} +1 -1
- package/dist/chunks/{chunk-BW25OFQG.js → chunk-YLCIOXSX.js} +1 -1
- package/dist/chunks/{chunk-GZLYNPNU.js → chunk-YNCWSPPJ.js} +1 -1
- package/dist/chunks/chunk-YQQ3A3YC.js +13 -0
- package/dist/chunks/{chunk-UI2H2EIM.js → chunk-YTRKHRL3.js} +1 -1
- package/dist/chunks/{chunk-MIIHBRKV.js → chunk-Z2K2JR7F.js} +1 -1
- package/dist/chunks/{chunk-F7AVGV4Y.js → chunk-Z73UJVGD.js} +1 -1
- package/dist/chunks/{chunk-6Y2ZL5XJ.js → chunk-ZKNEIE44.js} +2 -2
- package/dist/chunks/chunk-ZXEWWSTH.js +10 -0
- package/dist/chunks/chunk-ZZLCRSES.js +11 -0
- package/dist/chunks/clear-7QUM5KH7.js +8 -0
- package/dist/chunks/{cli-embedded-Y74S252S.js → cli-embedded-ABHGJLYX.js} +1 -1
- package/dist/chunks/compile-vercel-config-RDISBTDC.js +7 -0
- package/dist/chunks/config-2YNYR6YI.js +7 -0
- package/dist/chunks/config-4AOTKKGI.js +8 -0
- package/dist/chunks/config-validator.mjs +1 -1
- package/dist/chunks/{connect-git-provider-GFAJLQLU.js → connect-git-provider-BMUUC7ND.js} +1 -1
- package/dist/chunks/contract-3VSUIBEY.js +10 -0
- package/dist/chunks/delete-EJNR4UYC.js +10 -0
- package/dist/chunks/delete-OYOBFPEG.js +9 -0
- package/dist/chunks/describe-ORIEHT3R.js +25 -0
- package/dist/chunks/detect-projects-AKK2XI76.js +7 -0
- package/dist/chunks/detect-services-3LYPKUVL.js +7 -0
- package/dist/chunks/disable-U6JU546S.js +7 -0
- package/dist/chunks/discard-6SHAFQ2H.js +14 -0
- package/dist/chunks/edit-YMWKFN3H.js +8 -0
- package/dist/chunks/edit-YTTKJFTG.js +9 -0
- package/dist/chunks/enable-A6KBPFXJ.js +7 -0
- package/dist/chunks/{esm-4ZHGYTUV.js → esm-CF5UHWPM.js} +1 -1
- package/dist/chunks/{esm-LNIAU767.js → esm-EYOXGOVF.js} +1 -1
- package/dist/chunks/{esm-IBY43SSX.js → esm-FSME24KA.js} +1 -1
- package/dist/chunks/{esm-7FVTQHRH.js → esm-IUATPKKB.js} +1 -1
- package/dist/chunks/{esm-GTSUYLKG.js → esm-L6OKDFWP.js} +1 -1
- package/dist/chunks/{esm-TEM4KPXZ.js → esm-ORQC2ZSA.js} +1 -1
- package/dist/chunks/{esm-TLAM7FSK.js → esm-PYIZNQIK.js} +1 -1
- package/dist/chunks/{exec-H3X7U4P3.js → exec-RQ257MTR.js} +1 -1
- package/dist/chunks/{export-25TQ3YBT.js → export-MMU6VVFK.js} +1 -1
- package/dist/chunks/future-ANILGGFQ.js +7 -0
- package/dist/chunks/generate-cert-for-deploy-LKKZUKWF.js +7 -0
- package/dist/chunks/image-OWWKVBTU.js +7 -0
- package/dist/chunks/import-builders-VENL23EH.js +7 -0
- package/dist/chunks/{inspect-3W3TUJ6P.js → inspect-BPIJT4OX.js} +1 -1
- package/dist/chunks/inspect-GDZJZGHW.js +13 -0
- package/dist/chunks/{inspect-TN2QY3BP.js → inspect-H7JGEVL7.js} +1 -1
- package/dist/chunks/inspect-I6LQLOBG.js +8 -0
- package/dist/chunks/{inspect-BRYVSQBD.js → inspect-IGFAKTAX.js} +1 -1
- package/dist/chunks/inspect-U6V4UQXC.js +9 -0
- package/dist/chunks/list-763XVNFH.js +8 -0
- package/dist/chunks/{list-WA6Q7DUN.js → list-OX2N4JK7.js} +1 -1
- package/dist/chunks/list-WHZXMZJ5.js +12 -0
- package/dist/chunks/{list-6W4UQBY4.js → list-XLPMNNI7.js} +1 -1
- package/dist/chunks/login-2PGWWOKB.js +7 -0
- package/dist/chunks/login-T63WJL4S.js +9 -0
- package/dist/chunks/logs-S2KJGEIG.js +7 -0
- package/dist/chunks/ls-5HXYPIFR.js +11 -0
- package/dist/chunks/ls-M4GJOBZP.js +8 -0
- package/dist/chunks/ls-N56BWH2L.js +8 -0
- package/dist/chunks/{ls-L5LLKZBV.js → ls-O5B3LY4D.js} +1 -1
- package/dist/chunks/{ls-MAJ4QZTY.js → ls-PNGTHVUK.js} +1 -1
- package/dist/chunks/{ls-UXE5RSZN.js → ls-Q7FAOSVD.js} +1 -1
- package/dist/chunks/{ls-4WP6LHLL.js → ls-R4UDBWS3.js} +1 -1
- package/dist/chunks/migrate-experimental-services-HWJXO4AJ.js +7 -0
- package/dist/chunks/mutate-FM6BLE46.js +9 -0
- package/dist/chunks/{native-self-update-DEVBYOH2.js → native-self-update-7LL6RPJW.js} +1 -1
- package/dist/chunks/notifications-ZSZN35BQ.js +7 -0
- package/dist/chunks/open-4RXUUYQP.js +7 -0
- package/dist/chunks/openapi-457MABMI.js +7 -0
- package/dist/chunks/permissions-UJRTMOT7.js +7 -0
- package/dist/chunks/{plugin-offer-JUYWL4I7.js → plugin-offer-KJCRPUU5.js} +1 -1
- package/dist/chunks/prompt-missing-credentials-B5DGQFI7.js +7 -0
- package/dist/chunks/publish-I3APOD3N.js +15 -0
- package/dist/chunks/pull-2YUNTVPQ.js +7 -0
- package/dist/chunks/purchase-domain-if-available-3YOXUXII.js +7 -0
- package/dist/chunks/push-4QQJQRGZ.js +7 -0
- package/dist/chunks/query-2JO6HH5N.js +12 -0
- package/dist/chunks/reauthenticate-COYQMMAG.js +7 -0
- package/dist/chunks/remove-PWS5EJ7F.js +9 -0
- package/dist/chunks/reorder-COZQX64R.js +10 -0
- package/dist/chunks/reply-XDYZNHW2.js +9 -0
- package/dist/chunks/resolve-6KUFCZRX.js +12 -0
- package/dist/chunks/resolve-agent-team-NOT235ZN.js +7 -0
- package/dist/chunks/{resolve-deployment-framework-preset-AXXYBFCL.js → resolve-deployment-framework-preset-4TKUU6AH.js} +1 -1
- package/dist/chunks/restore-GSSD4ZWH.js +16 -0
- package/dist/chunks/rm-AUNVZPJ5.js +8 -0
- package/dist/chunks/rm-EIMUYBJT.js +8 -0
- package/dist/chunks/rm-EJH37HYN.js +8 -0
- package/dist/chunks/rm-O5NMCBC3.js +8 -0
- package/dist/chunks/rm-PHTOXG4E.js +8 -0
- package/dist/chunks/{routes-BP54NO3Z.js → routes-NEZJKMR5.js} +1 -1
- package/dist/chunks/rule-inspect-7HNYKQ6X.js +8 -0
- package/dist/chunks/{schema-753JMRZA.js → schema-5P7HROXE.js} +1 -1
- package/dist/chunks/schema-MZM5MN5V.js +14 -0
- package/dist/chunks/select-org-3BZWQD6R.js +7 -0
- package/dist/chunks/set-2RH74ZC3.js +7 -0
- package/dist/chunks/set-Q2EJ3V44.js +9 -0
- package/dist/chunks/setup-and-link-BT5TNY4J.js +7 -0
- package/dist/chunks/{skills-QZ4AMS2K.js → skills-DUOUHPBY.js} +1 -1
- package/dist/chunks/{statuspage-KHTMA4WL.js → statuspage-K5SC7KAQ.js} +1 -1
- package/dist/chunks/{detect-projects-K7SVMH5T.js → table-W6LOHWWF.js} +1 -1
- package/dist/chunks/tags-QOJEEMKS.js +7 -0
- package/dist/chunks/{types-NPUAHKSK.js → types-7L6HBXAU.js} +1 -1
- package/dist/chunks/{update-7XH7HM5F.js → update-HS6QFTQK.js} +1 -1
- package/dist/chunks/usage-3N6IA5SX.js +13 -0
- package/dist/chunks/validate-config-YLL6RPCP.js +7 -0
- package/dist/commands/build/index.js +1 -1
- package/dist/commands/deploy/index.js +19 -37
- package/dist/commands/dev/index.js +4 -4
- package/dist/commands/env/index.js +1 -1
- package/dist/commands/link/index.js +1 -1
- package/dist/commands/list/index.js +1 -1
- package/dist/commands/project/index.js +1 -1
- package/dist/commands-account.js +3 -3
- package/dist/commands-ai.js +6 -6
- package/dist/commands-blob.js +1 -1
- package/dist/commands-core.js +20 -20
- package/dist/commands-deployments.js +5 -5
- package/dist/commands-flags.js +1 -1
- package/dist/commands-integrations.js +1 -1
- package/dist/commands-observability.js +15 -8
- package/dist/commands-routing.js +5 -4
- package/dist/help.js +1 -1
- package/dist/index.js +5 -5
- package/dist/internal-build.js +1 -1
- package/dist/package.json +45 -245
- package/dist/vc.js +47 -695
- package/dist/version.mjs +1 -1
- package/package.json +51 -196
- package/dist/chunks/add-4R6FUHQT.js +0 -8
- package/dist/chunks/add-F3H4BFJZ.js +0 -8
- package/dist/chunks/add-TCOJ4SIQ.js +0 -8
- package/dist/chunks/build-GOLTZF6S.js +0 -7
- package/dist/chunks/chunk-3KJ6HWSX.js +0 -7
- package/dist/chunks/chunk-5X635INY.js +0 -11
- package/dist/chunks/chunk-7LPNDK2O.js +0 -7
- package/dist/chunks/chunk-A3M2BHWR.js +0 -13
- package/dist/chunks/chunk-BUFEV3T4.js +0 -11
- package/dist/chunks/chunk-BVR6OIU5.js +0 -7
- package/dist/chunks/chunk-D7BB5BPA.js +0 -10
- package/dist/chunks/chunk-DBT6PGEH.js +0 -7
- package/dist/chunks/chunk-DRZVM7CB.js +0 -12
- package/dist/chunks/chunk-EICEQXVS.js +0 -7
- package/dist/chunks/chunk-F2R7L3ZB.js +0 -7
- package/dist/chunks/chunk-FHMCTV5E.js +0 -7
- package/dist/chunks/chunk-FOE3MWES.js +0 -7
- package/dist/chunks/chunk-HKU6D7DU.js +0 -8
- package/dist/chunks/chunk-IOTKHTZH.js +0 -7
- package/dist/chunks/chunk-K4JTCVNW.js +0 -13
- package/dist/chunks/chunk-LALPOYIA.js +0 -8
- package/dist/chunks/chunk-M3R7F2N4.js +0 -7
- package/dist/chunks/chunk-MUKXOI2K.js +0 -8
- package/dist/chunks/chunk-NIS66BFX.js +0 -63
- package/dist/chunks/chunk-NSPW47RU.js +0 -7
- package/dist/chunks/chunk-NTDP6RTQ.js +0 -11
- package/dist/chunks/chunk-Q2QVK3TH.js +0 -7
- package/dist/chunks/chunk-RM3ZDRYE.js +0 -7
- package/dist/chunks/chunk-UCRMJMH6.js +0 -10
- package/dist/chunks/chunk-XQDHMFQY.js +0 -7
- package/dist/chunks/chunk-XRIM4BUF.js +0 -7
- package/dist/chunks/chunk-Z64MQIOE.js +0 -10
- package/dist/chunks/chunk-ZS2WS4AM.js +0 -7
- package/dist/chunks/clear-PECHXMV5.js +0 -8
- package/dist/chunks/compile-vercel-config-EM3HYOQC.js +0 -7
- package/dist/chunks/config-DA2NZUDH.js +0 -8
- package/dist/chunks/config-X6O3DT7V.js +0 -7
- package/dist/chunks/contract-RHMWRX4W.js +0 -10
- package/dist/chunks/delete-5RN5VW5L.js +0 -9
- package/dist/chunks/delete-MT6I7R7K.js +0 -10
- package/dist/chunks/detect-services-HSA4JHJX.js +0 -7
- package/dist/chunks/disable-LXPZDQMC.js +0 -7
- package/dist/chunks/discard-PW65T65S.js +0 -14
- package/dist/chunks/edit-WFSONASO.js +0 -8
- package/dist/chunks/edit-YID3FOJ3.js +0 -9
- package/dist/chunks/enable-X2EKQCIY.js +0 -7
- package/dist/chunks/future-DQBK457G.js +0 -7
- package/dist/chunks/generate-cert-for-deploy-OMEACY5G.js +0 -7
- package/dist/chunks/image-AO2OZG4W.js +0 -7
- package/dist/chunks/import-builders-GSDV4K4A.js +0 -7
- package/dist/chunks/inspect-4244CRHI.js +0 -13
- package/dist/chunks/inspect-C43IV7X4.js +0 -9
- package/dist/chunks/inspect-RP5KXOYQ.js +0 -8
- package/dist/chunks/list-2SY6PZLC.js +0 -12
- package/dist/chunks/list-WBKZGIMQ.js +0 -8
- package/dist/chunks/login-K6XBWOFD.js +0 -9
- package/dist/chunks/login-OGMXEW5N.js +0 -7
- package/dist/chunks/logs-R3ZERQ7M.js +0 -7
- package/dist/chunks/ls-EVAQD3LI.js +0 -8
- package/dist/chunks/ls-O5DKK3TY.js +0 -8
- package/dist/chunks/ls-PTHGXQLK.js +0 -11
- package/dist/chunks/mutate-EKZWPQQJ.js +0 -9
- package/dist/chunks/notifications-F5S3RKZF.js +0 -7
- package/dist/chunks/open-KGVG54NN.js +0 -7
- package/dist/chunks/openapi-7TPDTMCU.js +0 -7
- package/dist/chunks/permissions-5K7JZOMB.js +0 -7
- package/dist/chunks/prompt-missing-credentials-DX2KJB5X.js +0 -7
- package/dist/chunks/publish-KIRTO2ZO.js +0 -15
- package/dist/chunks/pull-3CRJK7BX.js +0 -7
- package/dist/chunks/purchase-domain-if-available-55IXEF43.js +0 -7
- package/dist/chunks/push-4YG5HKSD.js +0 -7
- package/dist/chunks/query-67KQVLTR.js +0 -12
- package/dist/chunks/reauthenticate-SWSBFGDU.js +0 -7
- package/dist/chunks/remove-SYTIFVWW.js +0 -9
- package/dist/chunks/reorder-TX5MXJEB.js +0 -10
- package/dist/chunks/reply-XVK33N5T.js +0 -9
- package/dist/chunks/resolve-JZ262ZF4.js +0 -12
- package/dist/chunks/resolve-agent-team-BG5YW55B.js +0 -7
- package/dist/chunks/restore-IPFL7TKT.js +0 -16
- package/dist/chunks/rm-2BCAZGQU.js +0 -8
- package/dist/chunks/rm-3CCU3CE6.js +0 -8
- package/dist/chunks/rm-5CQV5LYG.js +0 -8
- package/dist/chunks/rm-OV4OU6H2.js +0 -8
- package/dist/chunks/rm-WFGMOZ3G.js +0 -8
- package/dist/chunks/rule-inspect-RFJIIXZH.js +0 -8
- package/dist/chunks/schema-SUNFQGUL.js +0 -14
- package/dist/chunks/select-org-MPHPWWPU.js +0 -7
- package/dist/chunks/set-BR6EEOPB.js +0 -7
- package/dist/chunks/set-I3NWZRSI.js +0 -9
- package/dist/chunks/setup-and-link-MRTKVOWD.js +0 -7
- package/dist/chunks/tags-7DIZEAVE.js +0 -7
- package/dist/chunks/usage-3BS7JCCU.js +0 -13
- package/dist/chunks/validate-config-LAD7BU3B.js +0 -7
- package/dist/launcher-errors.js +0 -11
- package/dist/native-download.js +0 -8
package/README.md
CHANGED
|
@@ -1,123 +1,11 @@
|
|
|
1
|
-
|
|
2
|
-
<a href="https://vercel.com">
|
|
3
|
-
<img src="https://assets.vercel.com/image/upload/v1588805858/repositories/vercel/logo.png" height="96">
|
|
4
|
-
<h3 align="center">Vercel</h3>
|
|
5
|
-
</a>
|
|
6
|
-
<p align="center">Develop. Preview. Ship.</p>
|
|
7
|
-
</p>
|
|
1
|
+
# @vercel/cli-support
|
|
8
2
|
|
|
9
|
-
|
|
3
|
+
The JavaScript build of [Vercel CLI](https://vercel.com/docs/cli). Install
|
|
4
|
+
[`vercel`](https://www.npmjs.com/package/vercel), not this package.
|
|
10
5
|
|
|
11
|
-
|
|
6
|
+
`vercel` installs this package and runs it where its native binary can't run:
|
|
7
|
+
on operating systems and CPUs without one, and as a fallback when the native
|
|
8
|
+
binary can't be installed, downloaded or started. It has no `bin` of its own.
|
|
12
9
|
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
To install the latest version of Vercel CLI, run this command:
|
|
16
|
-
|
|
17
|
-
```bash
|
|
18
|
-
npm i -g vercel
|
|
19
|
-
```
|
|
20
|
-
|
|
21
|
-
To quickly start a new project, run the following commands:
|
|
22
|
-
|
|
23
|
-
```bash
|
|
24
|
-
vercel init # Pick an example project
|
|
25
|
-
cd <PROJECT> # Change directory to the new project
|
|
26
|
-
vercel # Deploy to the cloud
|
|
27
|
-
```
|
|
28
|
-
|
|
29
|
-
Finally, [connect your Git repository to Vercel](https://vercel.com/docs/git) and deploy with `git push`.
|
|
30
|
-
|
|
31
|
-
## Documentation
|
|
32
|
-
|
|
33
|
-
For details on how to use Vercel CLI, check out our [documentation](https://vercel.com/docs/cli).
|
|
34
|
-
|
|
35
|
-
To manage schedules in a running development session, see [local schedules](docs/local-schedules.md).
|
|
36
|
-
|
|
37
|
-
For how `vercel` picks the runtime for each platform, see [launcher](docs/launcher.md).
|
|
38
|
-
|
|
39
|
-
## Telemetry
|
|
40
|
-
|
|
41
|
-
Vercel CLI collects telemetry about how the CLI is used. We use it to find bugs and decide what to work on next.
|
|
42
|
-
|
|
43
|
-
The CLI records:
|
|
44
|
-
|
|
45
|
-
- The command and subcommand you ran, and the names of the options and flags you passed. The values you pass are left out or replaced with `[REDACTED]`, except for a few fixed choices such as the target environment.
|
|
46
|
-
- Whether the command succeeded, how long it took, and, if it failed, the error code and the error message returned by the Vercel API.
|
|
47
|
-
- Your team and user IDs when you're logged in, and the IDs of the projects and deployments the command works with.
|
|
48
|
-
- A random device ID that is created on the first run and stored in the CLI's global config folder. It is sent on every run, including before you log in.
|
|
49
|
-
- Your CLI version, operating system, CPU architecture, CI provider, how the CLI was installed, and the name of the AI agent that ran the command, if any. The agent name can include its version.
|
|
50
|
-
|
|
51
|
-
To turn telemetry off, run:
|
|
52
|
-
|
|
53
|
-
```bash
|
|
54
|
-
vercel telemetry disable
|
|
55
|
-
```
|
|
56
|
-
|
|
57
|
-
You can also set the `VERCEL_TELEMETRY_DISABLED=1` environment variable. To check whether telemetry is on, run `vercel telemetry status`.
|
|
58
|
-
|
|
59
|
-
To learn more, see [Vercel CLI telemetry](https://vercel.com/docs/cli/about-telemetry).
|
|
60
|
-
|
|
61
|
-
## Local Development
|
|
62
|
-
|
|
63
|
-
To develop Vercel CLI, first check out the source code, install dependencies, and build all packages:
|
|
64
|
-
|
|
65
|
-
```bash
|
|
66
|
-
git clone https://github.com/vercel/vercel.git
|
|
67
|
-
cd vercel
|
|
68
|
-
pnpm install
|
|
69
|
-
pnpm build
|
|
70
|
-
```
|
|
71
|
-
|
|
72
|
-
At this point you can make modifications to the CLI source code and test them out locally. The CLI source code is located in the `packages/cli` directory.
|
|
73
|
-
|
|
74
|
-
```bash
|
|
75
|
-
cd packages/cli
|
|
76
|
-
```
|
|
77
|
-
|
|
78
|
-
Before you add or rename a command, flag, or output, read [AGENTS.md](AGENTS.md) and the CLI design system in [`.agents/skills/cli-ux`](.agents/skills/cli-ux/SKILL.md).
|
|
79
|
-
|
|
80
|
-
### `pnpm vercel <cli-commands...>`
|
|
81
|
-
|
|
82
|
-
From within the `packages/cli` directory, you can use the "vercel" script to quickly execute Vercel CLI from its TypeScript source code directly (without having to manually compile first). For example:
|
|
83
|
-
|
|
84
|
-
```bash
|
|
85
|
-
pnpm vercel deploy
|
|
86
|
-
pnpm vercel whoami
|
|
87
|
-
pnpm vercel login
|
|
88
|
-
pnpm vercel switch --debug
|
|
89
|
-
```
|
|
90
|
-
|
|
91
|
-
When you are satisfied with your changes, make a commit and create a pull request!
|
|
92
|
-
|
|
93
|
-
## Publishing
|
|
94
|
-
|
|
95
|
-
### Production Releases
|
|
96
|
-
|
|
97
|
-
Production releases are automated via the [`release.yml`](../../.github/workflows/release.yml) workflow, which runs on every push to `main`. It uses [changesets](https://github.com/changesets/changesets) to determine which packages need new versions. If there are pending changesets, the workflow either creates a "Version Packages" PR or publishes to npm with the `latest` dist-tag.
|
|
98
|
-
|
|
99
|
-
To include your changes in a release, add a changeset before merging your PR:
|
|
100
|
-
|
|
101
|
-
```bash
|
|
102
|
-
pnpm changeset
|
|
103
|
-
```
|
|
104
|
-
|
|
105
|
-
### Full Testing
|
|
106
|
-
|
|
107
|
-
`pnpm vercel` executes a locally built dist. Because this dist lives locally in this monorepo,
|
|
108
|
-
the existence of node_modules can sometimes affect the behavior of how `vercel` CLI picking
|
|
109
|
-
up dependencies. To test the full user experience of downloading the CLI from the npm registry:
|
|
110
|
-
|
|
111
|
-
```bash
|
|
112
|
-
# build the dist
|
|
113
|
-
monorepo_dir=$(pwd)
|
|
114
|
-
cd packages/cli && turbo build
|
|
115
|
-
# use pnpm pack to create the same tarball that is uploaded to the npm registry
|
|
116
|
-
# and store the tarball name in a variable
|
|
117
|
-
dist=$(pnpm pack)
|
|
118
|
-
|
|
119
|
-
# In your test project
|
|
120
|
-
cd ~/dev/test-nextjs-proj
|
|
121
|
-
|
|
122
|
-
npx -p $monorepo_dir/packages/cli/$dist vercel build
|
|
123
|
-
```
|
|
10
|
+
The source lives in
|
|
11
|
+
[`internals/cli-core`](https://github.com/vercel/vercel/tree/main/internals/cli-core).
|
|
@@ -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{parseTeamRefs,teamRefBody}from"./chunk-LSF7FY6X.js";import{repositoryPermissionsPath}from"./chunk-DFVNL5ML.js";import{emitVcrArgParseError,resolveVcrScope,validateVcrJsonOutput}from"./chunk-HXLOBW75.js";import{outputError}from"./chunk-7PGDJTAH.js";import"./chunk-D3M2JG5C.js";import{require_async_sema}from"./chunk-NZ2TFADV.js";import"./chunk-M32HBBPK.js";import"./chunk-GD7AV7BO.js";import{permissionsAddSubcommand}from"./chunk-SP6E7PHW.js";import{printError}from"./chunk-NYJTWSSD.js";import"./chunk-XSQZ35V6.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-GORL5DZC.js";import"./chunk-OFZUWHZW.js";import"./chunk-BC74BRVP.js";import"./chunk-4HR3I3ML.js";import"./chunk-K46QQRUN.js";import"./chunk-MTZYPCZ7.js";import"./chunk-GPDERS2D.js";import"./chunk-4NTBYNFR.js";import{parseArguments}from"./chunk-VM6X5BTK.js";import"./chunk-2VBFQZ72.js";import"./chunk-JONZUKWX.js";import"./chunk-LUX4PBJL.js";import"./chunk-OPORM35X.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-D6REP5QQ.js";import"./chunk-FBYA6LLM.js";import"./chunk-MY4MONOH.js";import"./chunk-4SAVH3H7.js";import{isAPIError}from"./chunk-GOI2VVI7.js";import{packageName}from"./chunk-B4KA3ZH2.js";import"./chunk-BOJDM3O7.js";import{output_manager_default}from"./chunk-YNCWSPPJ.js";import"./chunk-BLUPZPAS.js";import"./chunk-AW33SRYY.js";import"./chunk-5MDNVAE6.js";import"./chunk-OCR5CRTH.js";import"./chunk-7EJQLVWX.js";import"./chunk-SCV7XEEO.js";import"./chunk-MCYG7CCE.js";import"./chunk-YHPPP3SF.js";import{getFlagsSpecification}from"./chunk-EZVNGJN5.js";import"./chunk-2BKALEOP.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BULSRTQE.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_async_sema=__toESM(require_async_sema(),1);var USAGE="vcr permissions <repository> add <team>[,<team>...]";async function add(client,argv,telemetry){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(permissionsAddSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,USAGE),printError(err),2}let fr=validateVcrJsonOutput(client,parsedArgs.flags);if(typeof fr=="number")return fr;let repository=parsedArgs.args[0],teamRefs=parseTeamRefs(parsedArgs.args.slice(2)),project=parsedArgs.flags["--project"];if(telemetry.trackCliOptionProject(project),telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]),teamRefs.length===0)return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message:`Missing team. Example: ${packageName} vcr permissions ${repository} add team_1a2b3c4d`,next:[{command:buildCommandWithGlobalFlags(client.argv,USAGE),when:"Replace <team> with a team id or slug (comma-separate multiple teams)"}]},2),outputError(client,fr.jsonOutput,"MISSING_ARGUMENTS",`Usage: \`vercel ${USAGE}\``);let scope=await resolveVcrScope(client,{project,jsonOutput:fr.jsonOutput});if(typeof scope=="number")return scope;let path=repositoryPermissionsPath(scope,repository),added=[],failed=[];output_manager_default.spinner(`Sharing ${repository} with ${teamRefs.length===1?teamRefs[0]:`${teamRefs.length} teams`}...`);let sema=new import_async_sema.default(10),results;try{results=await Promise.all(teamRefs.map(async team=>{await sema.acquire();try{let result=await client.fetch(path,{method:"POST",body:teamRefBody(team)});return{ok:!0,team,permission:result.permission}}catch(err){if(!isAPIError(err))throw err;let message=err.serverMessage||`API error (${err.status}).`;return{ok:!1,team,failure:{team,code:err.code||"API_ERROR",message}}}finally{sema.release()}}))}finally{output_manager_default.stopSpinner()}for(let result of results)result.ok?(added.push(result.permission),fr.jsonOutput||output_manager_default.success(`Shared ${repository} with ${result.permission?.teamSlug??result.team}`)):(failed.push(result.failure),fr.jsonOutput||output_manager_default.error(`Failed to share ${repository} with ${result.team}: ${result.failure.message}`));return failed.length>0&&outputAgentError(client,{status:"error",reason:AGENT_REASON.API_ERROR,message:`Failed to share ${repository} with ${failed.map(f=>`${f.team} (${f.message})`).join(", ")}`},1),fr.jsonOutput&&client.stdout.write(`${JSON.stringify({permissions:added,failed},null,2)}
|
|
8
|
+
`),failed.length>0?1:0}export{add as default};
|
|
@@ -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{printRuleMutationReceipt}from"./chunk-Y5S2OEJH.js";import"./chunk-GHNHUSVK.js";import{resolveRulesProject,resolveRulesTeam}from"./chunk-HRGJO4HK.js";import"./chunk-HU5NUOWH.js";import{emitRulesArgParseError,getBodyType,handleRulesApiError,outputRulesError,readRuleBody,rulesCollectionPath}from"./chunk-MQJ4MINN.js";import"./chunk-7PGDJTAH.js";import"./chunk-GHAY4PSD.js";import"./chunk-D3M2JG5C.js";import"./chunk-TOTTVS5P.js";import"./chunk-HRR57QNP.js";import"./chunk-GZNDA6SV.js";import"./chunk-PFD7LETF.js";import"./chunk-CJZE7647.js";import{monitorsAddSubcommand}from"./chunk-W25UARQV.js";import{printError}from"./chunk-NYJTWSSD.js";import"./chunk-XSQZ35V6.js";import"./chunk-GORL5DZC.js";import"./chunk-OFZUWHZW.js";import"./chunk-BC74BRVP.js";import"./chunk-4HR3I3ML.js";import"./chunk-K46QQRUN.js";import"./chunk-MTZYPCZ7.js";import"./chunk-GPDERS2D.js";import"./chunk-4NTBYNFR.js";import{parseArguments}from"./chunk-VM6X5BTK.js";import"./chunk-2VBFQZ72.js";import{validateJsonOutput}from"./chunk-JONZUKWX.js";import"./chunk-LUX4PBJL.js";import"./chunk-OPORM35X.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-D6REP5QQ.js";import"./chunk-FBYA6LLM.js";import"./chunk-MY4MONOH.js";import"./chunk-4SAVH3H7.js";import{isAPIError}from"./chunk-GOI2VVI7.js";import"./chunk-B4KA3ZH2.js";import"./chunk-BOJDM3O7.js";import{output_manager_default}from"./chunk-YNCWSPPJ.js";import"./chunk-BLUPZPAS.js";import"./chunk-AW33SRYY.js";import"./chunk-5MDNVAE6.js";import"./chunk-OCR5CRTH.js";import"./chunk-7EJQLVWX.js";import"./chunk-SCV7XEEO.js";import"./chunk-MCYG7CCE.js";import"./chunk-YHPPP3SF.js";import{getFlagsSpecification}from"./chunk-EZVNGJN5.js";import"./chunk-2BKALEOP.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BULSRTQE.js";import"./chunk-BZENIQ7N.js";function applyScopeFlag(client,body,type,scope,flags,jsonOutput){if(Object.hasOwn(body,"ruleScope"))return flags["--project"]||flags["--all"]?outputRulesError(client,jsonOutput,"SCOPE_CONFLICT","Specify monitor scope either in the body or with --project/--all, not both."):void 0;if(flags["--project"]){body.ruleScope=type==="custom"?{type:"project",projectId:scope.projectId}:{type:"include",projectIds:[scope.projectId]};return}if(flags["--all"]){if(type==="custom")return outputRulesError(client,jsonOutput,"INVALID_SCOPE","Custom monitors must target one project. Use --project <name-or-id>.");body.ruleScope={type:"all"};return}return outputRulesError(client,jsonOutput,"MISSING_SCOPE","Missing monitor scope. Add ruleScope to the body, or pass --project or --all.")}async function resolveCreateScope(client,flags,jsonOutput){return flags["--project"]&&flags["--all"]?outputRulesError(client,jsonOutput,"MUTUAL_EXCLUSIVITY","Cannot specify both --all and --project. Use one or the other."):flags["--project"]?resolveRulesProject(client,flags["--project"],jsonOutput,"monitors add"):resolveRulesTeam(client,jsonOutput)}async function add(client,argv,api){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(monitorsAddSubcommand.options))}catch(error){return emitRulesArgParseError(client,error,"monitors add --project <name-or-id> --body <path>"),printError(error),2}let flags=parsedArgs.flags,format=validateJsonOutput(flags);if(!format.valid)return outputRulesError(client,!1,"INVALID_ARGUMENTS",format.error);if(!flags["--body"])return outputRulesError(client,format.jsonOutput,"MISSING_ARGUMENTS","Missing required option: --body <PATH>.");let body=readRuleBody(client,flags["--body"],format.jsonOutput);if(typeof body=="number")return body;let type=getBodyType(body);if(!type)return outputRulesError(client,format.jsonOutput,"INVALID_RULE_TYPE","Create body must set a supported monitor type.");if(Object.hasOwn(body,"ruleScope")&&(flags["--project"]||flags["--all"]))return outputRulesError(client,format.jsonOutput,"SCOPE_CONFLICT","Specify monitor scope either in the body or with --project/--all, not both.");if(type==="custom"&&flags["--all"])return outputRulesError(client,format.jsonOutput,"INVALID_SCOPE","Custom monitors must target one project. Use --project <name-or-id>.");let scope=await resolveCreateScope(client,flags,format.jsonOutput);if(typeof scope=="number")return scope;let scopeError=applyScopeFlag(client,body,type,scope,flags,format.jsonOutput);if(scopeError!==void 0)return scopeError;output_manager_default.spinner("Creating monitor\u2026");try{let response=await client.fetch(rulesCollectionPath(api,scope.teamId),{method:"POST",body});return format.jsonOutput?client.stdout.write(`${JSON.stringify(response,null,2)}
|
|
8
|
+
`):printRuleMutationReceipt("Created",response[api.itemKey],client.argv),0}catch(error){if(isAPIError(error))return handleRulesApiError(client,error,format.jsonOutput);throw error}finally{output_manager_default.stopSpinner()}}export{add as default};
|
|
@@ -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{emitVcrArgParseError,handleVcrApiError,resolveVcrScope,validateVcrJsonOutput}from"./chunk-HXLOBW75.js";import{outputError}from"./chunk-7PGDJTAH.js";import"./chunk-D3M2JG5C.js";import"./chunk-M32HBBPK.js";import"./chunk-GD7AV7BO.js";import{addSubcommand}from"./chunk-JVGENO2R.js";import"./chunk-SP6E7PHW.js";import"./chunk-OFOZ5DBA.js";import"./chunk-6Q2XEYCJ.js";import{printError}from"./chunk-NYJTWSSD.js";import"./chunk-XSQZ35V6.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-GORL5DZC.js";import"./chunk-OFZUWHZW.js";import"./chunk-BC74BRVP.js";import"./chunk-4HR3I3ML.js";import"./chunk-K46QQRUN.js";import"./chunk-MTZYPCZ7.js";import"./chunk-GPDERS2D.js";import"./chunk-4NTBYNFR.js";import{parseArguments}from"./chunk-VM6X5BTK.js";import"./chunk-2VBFQZ72.js";import"./chunk-JONZUKWX.js";import"./chunk-LUX4PBJL.js";import"./chunk-OPORM35X.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-D6REP5QQ.js";import"./chunk-FBYA6LLM.js";import"./chunk-MY4MONOH.js";import"./chunk-4SAVH3H7.js";import{isAPIError}from"./chunk-GOI2VVI7.js";import{packageName}from"./chunk-B4KA3ZH2.js";import"./chunk-BOJDM3O7.js";import{output_manager_default}from"./chunk-YNCWSPPJ.js";import"./chunk-BLUPZPAS.js";import"./chunk-AW33SRYY.js";import"./chunk-5MDNVAE6.js";import"./chunk-OCR5CRTH.js";import"./chunk-7EJQLVWX.js";import"./chunk-SCV7XEEO.js";import"./chunk-MCYG7CCE.js";import"./chunk-YHPPP3SF.js";import{getFlagsSpecification}from"./chunk-EZVNGJN5.js";import"./chunk-2BKALEOP.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BULSRTQE.js";import"./chunk-BZENIQ7N.js";async function add(client,argv,telemetry){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(addSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,"vcr create <name> --project <name-or-id>"),printError(err),2}let fr=validateVcrJsonOutput(client,parsedArgs.flags);if(typeof fr=="number")return fr;let name=parsedArgs.args[0],project=parsedArgs.flags["--project"];if(telemetry.trackCliOptionProject(project),telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]),!name)return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message:`Missing repository name. Example: ${packageName} vcr create <name>`,next:[{command:buildCommandWithGlobalFlags(client.argv,"vcr create <name>"),when:"Replace <name> with the repository name to create"}]},2),outputError(client,fr.jsonOutput,"MISSING_ARGUMENTS","Usage: `vercel vcr create <name>`");let scope=await resolveVcrScope(client,{project,jsonOutput:fr.jsonOutput});if(typeof scope=="number")return scope;let path=`/v1/vcr/repository?teamId=${encodeURIComponent(scope.teamId)}`;output_manager_default.spinner("Creating repository...");try{let created=await client.fetch(path,{method:"POST",body:{projectId:scope.projectId,name}});return fr.jsonOutput?client.stdout.write(`${JSON.stringify(created,null,2)}
|
|
8
|
+
`):output_manager_default.success(`Created repository ${created.repository?.name??name}`),0}catch(err){if(isAPIError(err))return handleVcrApiError(client,err,fr.jsonOutput,{retry:{command:buildCommandWithGlobalFlags(client.argv,"vcr ls"),when:"List existing repositories (a name conflict means it already exists)"}});throw err}finally{output_manager_default.stopSpinner()}}export{add as default};
|
|
@@ -4,5 +4,5 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{printBudgetAlertsTable}from"./chunk-
|
|
7
|
+
import{printBudgetAlertsTable}from"./chunk-F6KURUPQ.js";import{rejectUnexpectedArgs,resolveBudgetTeam}from"./chunk-3AGRCSWN.js";import{handleValidationError,outputError,validateOptionalIntegerRange,validateTimeBound,validateTimeOrder}from"./chunk-7PGDJTAH.js";import"./chunk-D3M2JG5C.js";import{TEAM_BUDGET,listBudgetAlerts}from"./chunk-RAQ6EUNL.js";import{INVALID_NEXT_MESSAGE}from"./chunk-C6GY2G73.js";import{getSubcommand}from"./chunk-ETV3C2CV.js";import{MAX_LIST_LIMIT,getNextPageCommand,printNextPageCommand}from"./chunk-QBHTNUM5.js";import"./chunk-CJZE7647.js";import{getCommandAliases}from"./chunk-2CQJKBKV.js";import"./chunk-2V6UURUN.js";import"./chunk-OKKG2FUS.js";import"./chunk-5L566FZB.js";import"./chunk-6737KAJP.js";import"./chunk-O3DAPRJ3.js";import"./chunk-UZQJQXGJ.js";import{alertsListSubcommand,alertsSubcommand}from"./chunk-5YLKPSZI.js";import"./chunk-SNGM6NSO.js";import"./chunk-JVGENO2R.js";import"./chunk-SP6E7PHW.js";import"./chunk-OFOZ5DBA.js";import"./chunk-6Q2XEYCJ.js";import"./chunk-SEHERY6U.js";import"./chunk-2LOA3LC6.js";import"./chunk-E7CEQ2PO.js";import"./chunk-W25UARQV.js";import"./chunk-7BDQUBSO.js";import"./chunk-ABSFPYM4.js";import"./chunk-YANOBY2G.js";import"./chunk-F7L5SXJM.js";import"./chunk-6S6UZV3V.js";import"./chunk-GUSOYIW6.js";import"./chunk-JALVF3C2.js";import"./chunk-7TVNKTN2.js";import"./chunk-HR66URIC.js";import{printError}from"./chunk-NYJTWSSD.js";import"./chunk-VVTMF2AY.js";import{TelemetryClient}from"./chunk-AGLOVMPC.js";import"./chunk-2EYYB6YN.js";import"./chunk-NWGBDBZI.js";import{AGENT_REASON}from"./chunk-GORL5DZC.js";import"./chunk-OFZUWHZW.js";import{require_pluralize}from"./chunk-4HR3I3ML.js";import"./chunk-4NTBYNFR.js";import{parseArguments,takeCommand}from"./chunk-VM6X5BTK.js";import"./chunk-2VBFQZ72.js";import{validateJsonOutput}from"./chunk-JONZUKWX.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-4SAVH3H7.js";import{isAPIError}from"./chunk-GOI2VVI7.js";import"./chunk-B4KA3ZH2.js";import"./chunk-BOJDM3O7.js";import{output_manager_default}from"./chunk-YNCWSPPJ.js";import"./chunk-BLUPZPAS.js";import"./chunk-5MDNVAE6.js";import"./chunk-MCYG7CCE.js";import"./chunk-YHPPP3SF.js";import"./chunk-24SIHFEW.js";import{getFlagsSpecification}from"./chunk-EZVNGJN5.js";import"./chunk-2BKALEOP.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BULSRTQE.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_pluralize=__toESM(require_pluralize(),1);function encodeBudgetAlertsCursor(value){return Buffer.from(JSON.stringify({c:value.cursor,t:value.teamId,s:value.since,u:value.until})).toString("base64url")}function decodeBudgetAlertsCursor(value){if(value===void 0)return{valid:!0,value:void 0};let invalid={valid:!1,code:"INVALID_NEXT",message:INVALID_NEXT_MESSAGE},raw;try{raw=JSON.parse(Buffer.from(value,"base64url").toString("utf8"))}catch{return invalid}if(typeof raw!="object"||raw===null)return invalid;let{c,t,s,u}=raw;return typeof c!="string"||typeof t!="string"||!isOptionalMs(s)||!isOptionalMs(u)?invalid:{valid:!0,value:{cursor:c,teamId:t,since:s,until:u}}}function isOptionalMs(value){return value===void 0||Number.isFinite(value)}var BudgetAlertsTelemetryClient=class extends TelemetryClient{trackCliSubcommandList(actual){this.trackCliSubcommand({subcommand:"list",value:actual})}trackCliOptionSince(since){since&&this.trackCliOption({option:"since",value:this.redactedValue})}trackCliOptionUntil(until){until&&this.trackCliOption({option:"until",value:this.redactedValue})}trackCliOptionLimit(limit){limit!==void 0&&this.trackCliOption({option:"limit",value:String(limit)})}trackCliOptionNext(next){next&&this.trackCliOption({option:"next",value:this.redactedValue})}trackCliOptionFormat(format){format&&this.trackCliOption({option:"format",value:format})}trackCliFlagJson(json){json&&this.trackCliFlag("json")}};async function alerts(client,argv){let telemetry=new BudgetAlertsTelemetryClient({opts:{store:client.telemetryEventStore}}),action,parsedArgs,flagsSpecification=getFlagsSpecification(alertsSubcommand.options);try{let selected=takeCommand(argv,flagsSpecification);action=getSubcommand(selected.command?[selected.command]:[],{list:getCommandAliases(alertsListSubcommand)}),parsedArgs=parseArguments(action.subcommand?selected.args:argv,flagsSpecification)}catch(error){return printError(error),2}let{flags:opts,args}=parsedArgs;if(action.subcommand==="list"&&telemetry.trackCliSubcommandList(action.subcommandOriginal),rejectUnexpectedArgs(args,"billing budgets alerts"))return 2;let formatResult=validateJsonOutput(opts);if(!formatResult.valid)return output_manager_default.error(formatResult.error),2;let asJson=formatResult.jsonOutput;telemetry.trackCliOptionSince(opts["--since"]),telemetry.trackCliOptionUntil(opts["--until"]),telemetry.trackCliOptionLimit(opts["--limit"]),telemetry.trackCliOptionNext(opts["--next"]),telemetry.trackCliOptionFormat(opts["--format"]?"json":void 0),telemetry.trackCliFlagJson(opts["--json"]);let nextResult=decodeBudgetAlertsCursor(opts["--next"]);if(!nextResult.valid)return handleValidationError(nextResult,asJson,client);let cursor=nextResult.value,warnings=[],limit=opts["--limit"];if(typeof limit=="number"&&Number.isInteger(limit)&&limit>MAX_LIST_LIMIT){let message=`--limit ${limit} is above the maximum of ${MAX_LIST_LIMIT}. Using ${MAX_LIST_LIMIT}.`;warnings.push({reason:AGENT_REASON.LIMIT_CLAMPED,message}),asJson||output_manager_default.warning(message),limit=MAX_LIST_LIMIT}let limitResult=validateOptionalIntegerRange(limit,{flag:"--limit",min:1,max:MAX_LIST_LIMIT});if(!limitResult.valid)return handleValidationError(limitResult,asJson,client);let sinceResult=validateTimeBound(opts["--since"]);if(!sinceResult.valid)return handleValidationError(sinceResult,asJson,client);let untilResult=validateTimeBound(opts["--until"]);if(!untilResult.valid)return handleValidationError(untilResult,asJson,client);let order=validateTimeOrder(sinceResult.value,untilResult.value);if(!order.valid)return handleValidationError(order,asJson,client);let team=await resolveBudgetTeam(client);if(!team)return 2;if(cursor&&cursor.teamId!==team.id)return outputError(client,asJson,"INVALID_NEXT",`This --next cursor is from another team, not ${team.slug}. Use the --scope it was printed with.`);let since=cursor?cursor.since:sinceResult.value?.getTime(),until=cursor?cursor.until:untilResult.value?.getTime();output_manager_default.spinner("Fetching budget alerts\u2026");let selector=TEAM_BUDGET,page;try{page=await listBudgetAlerts(client,selector,{since,until,limit:limitResult.value,cursor:cursor?.cursor})}catch(err){if(output_manager_default.stopSpinner(),isAPIError(err))return err.code==="invalid_cursor"?outputError(client,asJson,"INVALID_NEXT",INVALID_NEXT_MESSAGE):outputError(client,asJson,err.code||"API_ERROR",err.message);throw err}output_manager_default.stopSpinner();let next=page.nextCursor?encodeBudgetAlertsCursor({cursor:page.nextCursor,teamId:team.id,since,until}):null;if(asJson)return client.stdout.write(`${JSON.stringify({teamId:team.id,teamSlug:team.slug,alerts:page.data,pagination:{next},...warnings.length>0?{warnings}:{}},null,2)}
|
|
8
8
|
`),0;let where=`on team ${team.slug}`;return page.data.length===0?(output_manager_default.log(cursor?`No more budget alerts ${where}.`:`No budget alerts found ${where}.`),0):(output_manager_default.log(`${(0,import_pluralize.default)("budget alert",page.data.length,!0)} ${where}`),client.stdout.write(printBudgetAlertsTable(page.data)),next&&printNextPageCommand(getNextPageCommand(client.argv,next,WINDOW_FLAGS)),0)}var WINDOW_FLAGS=["--since","-s","--until","-u"];export{alerts as default};
|
|
@@ -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{DEFAULT_TAG,buildRepositoryReference,parseNameArg,validateImageParts}from"./chunk-HEGJZJO7.js";import{VCR_ENGINES,emitVcrArgParseError,isBuildxAvailable,isEngineInstalled,pushCompressionArgs,reportEngineCommandFailure,reportEnginePushFailure,resolveRegistry,resolveVcrScope,runEngine,splitPassthrough,validateVcrChoice}from"./chunk-HXLOBW75.js";import{outputError}from"./chunk-7PGDJTAH.js";import"./chunk-D3M2JG5C.js";import"./chunk-M32HBBPK.js";import"./chunk-GD7AV7BO.js";import{buildSubcommand}from"./chunk-JVGENO2R.js";import"./chunk-SP6E7PHW.js";import"./chunk-OFOZ5DBA.js";import"./chunk-6Q2XEYCJ.js";import{printError}from"./chunk-NYJTWSSD.js";import"./chunk-XSQZ35V6.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-GORL5DZC.js";import"./chunk-OFZUWHZW.js";import"./chunk-BC74BRVP.js";import"./chunk-4HR3I3ML.js";import"./chunk-K46QQRUN.js";import"./chunk-MTZYPCZ7.js";import"./chunk-GPDERS2D.js";import"./chunk-4NTBYNFR.js";import{parseArguments}from"./chunk-VM6X5BTK.js";import"./chunk-2VBFQZ72.js";import"./chunk-JONZUKWX.js";import"./chunk-LUX4PBJL.js";import"./chunk-OPORM35X.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-D6REP5QQ.js";import"./chunk-FBYA6LLM.js";import"./chunk-MY4MONOH.js";import"./chunk-4SAVH3H7.js";import"./chunk-GOI2VVI7.js";import"./chunk-B4KA3ZH2.js";import"./chunk-BOJDM3O7.js";import{output_manager_default}from"./chunk-YNCWSPPJ.js";import"./chunk-BLUPZPAS.js";import"./chunk-AW33SRYY.js";import"./chunk-5MDNVAE6.js";import"./chunk-OCR5CRTH.js";import"./chunk-7EJQLVWX.js";import"./chunk-SCV7XEEO.js";import"./chunk-MCYG7CCE.js";import"./chunk-YHPPP3SF.js";import{getFlagsSpecification}from"./chunk-EZVNGJN5.js";import"./chunk-2BKALEOP.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BULSRTQE.js";import"./chunk-BZENIQ7N.js";var DEFAULT_PLATFORM="linux/amd64";async function build(client,telemetry){let{own,passthrough}=splitPassthrough(client.argv),parsedArgs;try{parsedArgs=parseArguments(own,getFlagsSpecification(buildSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,"vcr build <engine> [path] [name[:tag]]"),printError(err),2}let[engineArg,pathArg,nameArg]=parsedArgs.args.slice(2),project=parsedArgs.flags["--project"],platform=parsedArgs.flags["--platform"],push=!!parsedArgs.flags["--push"];if(telemetry.trackCliArgumentEngine(engineArg),telemetry.trackCliArgumentPath(pathArg),telemetry.trackCliArgumentName(nameArg),telemetry.trackCliOptionProject(project),telemetry.trackCliOptionPlatform(platform),telemetry.trackCliFlagPush(push),!engineArg){let message=`Missing engine. Choose one of: ${VCR_ENGINES.join(", ")}.`;return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message,next:[{command:buildCommandWithGlobalFlags(client.argv,"vcr build docker"),when:"Replace docker with the container tool you use"}]},2),outputError(client,!1,"MISSING_ARGUMENTS",message)}let choiceError=validateVcrChoice(client,"engine",engineArg,VCR_ENGINES,!1);if(typeof choiceError=="number")return choiceError;let engine=engineArg;if(!isEngineInstalled(engine)){let message=`\`${engine}\` is not installed or not on your PATH. Install it and try again.`;return outputAgentError(client,{status:"error",reason:"engine_not_found",message},1),outputError(client,!1,"ENGINE_NOT_FOUND",message)}let scope=await resolveVcrScope(client,{project,jsonOutput:!1});if(typeof scope=="number")return scope;let parsed=parseNameArg(nameArg,scope.projectName);if("error"in parsed)return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:parsed.error},2),outputError(client,!1,"INVALID_ARGUMENTS",parsed.error);let validationError=validateImageParts(parsed);if(validationError)return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:validationError},2),outputError(client,!1,"INVALID_ARGUMENTS",validationError);let ref=`${buildRepositoryReference({registry:resolveRegistry(),teamSlug:scope.teamSlug,projectName:scope.projectName,repository:parsed.repository})}:${parsed.tag??DEFAULT_TAG}`,contextPath=pathArg??".",buildPlatform=platform??DEFAULT_PLATFORM;if(push&&engine==="docker"&&await isBuildxAvailable()){let outputSpec=`type=image,name=${ref},push=true,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true`,engineArgs2=["buildx","build","--platform",buildPlatform,"--output",outputSpec,...passthrough,contextPath];output_manager_default.log(`Running: ${engine} ${engineArgs2.join(" ")}`);let result2=await runEngine(engine,engineArgs2,{cwd:client.cwd,captureStderr:!0});return result2.exitCode!==0?reportEnginePushFailure(client,engine,"buildx build",result2):(output_manager_default.success(`Built and pushed ${ref} (zstd compression)`),0)}push&&engine==="docker"&&output_manager_default.warn("Docker Buildx is not available; building and pushing without zstd compression. Install Buildx for smaller, faster image pushes.");let engineArgs=["build","--platform",buildPlatform,"--tag",ref,...passthrough,contextPath];output_manager_default.log(`Running: ${engine} ${engineArgs.join(" ")}`);let result=await runEngine(engine,engineArgs,{cwd:client.cwd});if(result.exitCode!==0)return reportEngineCommandFailure(client,engine,"build",result);if(!push)return output_manager_default.success(`Built ${ref}`),output_manager_default.log(`Push it with \`${buildCommandWithGlobalFlags(client.argv,`vcr push ${engine}${nameArg?` ${nameArg}`:""}`)}\`.`),0;let pushArgs=["push",...pushCompressionArgs(engine),ref];output_manager_default.log(`Running: ${engine} ${pushArgs.join(" ")}`);let pushResult=await runEngine(engine,pushArgs,{cwd:client.cwd,captureStderr:!0});if(pushResult.exitCode!==0)return reportEnginePushFailure(client,engine,"push",pushResult);let compressed=engine!=="docker";return output_manager_default.success(`Built and pushed ${ref}${compressed?" (zstd compression)":""}`),0}export{build as default};
|
|
@@ -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{
|
|
7
|
+
import{outputError,writeJsonError}from"./chunk-7PGDJTAH.js";import{resolveProjectContext}from"./chunk-B3IBBNIR.js";import{printError}from"./chunk-NYJTWSSD.js";import{detectExplicitScope,getScope}from"./chunk-XSQZ35V6.js";import{getLinkedProject}from"./chunk-BC74BRVP.js";import{isAPIError}from"./chunk-GOI2VVI7.js";import{getCommandName}from"./chunk-B4KA3ZH2.js";import{output_manager_default}from"./chunk-YNCWSPPJ.js";function handleCommentsParseError(err,subcommandName){return printError(err),err instanceof Error&&/unknown or unexpected option: -[^-]/.test(err.message)&&output_manager_default.log(`An argument starting with "-"? Put it after \`--\`: ${getCommandName(`comments ${subcommandName} -- <arg>`)}`),output_manager_default.log(`Run ${getCommandName(`comments ${subcommandName} --help`)} for usage.`),2}function threadNotFoundMessage(threadId,scope){return`Comment not found: ${threadId} in team ${scope.teamSlug??scope.teamId}. If it belongs to another team, pass --scope <team>.`}function query(teamId,params={}){let search=new URLSearchParams({teamId});for(let[key,value]of Object.entries(params))if(value!==void 0)if(Array.isArray(value))for(let entry of value)search.append(key,entry);else search.set(key,String(value));return search.toString()}var fetchOpts={useCurrentTeam:!1};function listThreads(client,teamId,params){return client.fetch(`/toolbar/threads?${query(teamId,{...params})}`,fetchOpts)}function getThread(client,teamId,threadId){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}?${query(teamId)}`,fetchOpts)}function updateThread(client,teamId,threadId,resolved){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}?${query(teamId)}`,{...fetchOpts,method:"PATCH",body:{resolved}})}function listMessages(client,teamId,threadId,opts={}){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}/messages?${query(teamId,{...opts})}`,fetchOpts)}function addMessage(client,teamId,threadId,body){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}/messages?${query(teamId)}`,{...fetchOpts,method:"POST",body})}function updateMessage(client,teamId,threadId,messageId,body){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}/messages/${encodeURIComponent(messageId)}?${query(teamId)}`,{...fetchOpts,method:"PATCH",body})}function deleteMessage(client,teamId,threadId,messageId){return client.fetch(`/toolbar/threads/${encodeURIComponent(threadId)}/messages/${encodeURIComponent(messageId)}?${query(teamId)}`,{...fetchOpts,method:"DELETE"})}function toApiErrorParts(err){let apiErr=err;return{code:apiErr.code||"API_ERROR",message:apiErr.serverMessage||`API error (${apiErr.status??"unknown"}).`}}import{spawnSync}from"node:child_process";async function resolveCommentsScope(client,opts){if(opts.urlTeamSlug&&!opts.project&&!detectExplicitScope(client))return{teamId:opts.urlTeamSlug,teamSlug:opts.urlTeamSlug};if(opts.project){let context;try{context=await resolveProjectContext({client,projectNameOrId:opts.project,projectNotFoundHandling:opts.jsonOutput?"return":"report"})}catch(err){if(isAPIError(err))return outputError(client,opts.jsonOutput,err.code||"API_ERROR",err.serverMessage||`API error (${err.status}).`);throw err}return context.status==="error"?(opts.jsonOutput&&writeJsonError(client,"PROJECT_CONTEXT_ERROR","Could not resolve the project context."),context.exitCode):context.status==="not_linked"?outputError(client,opts.jsonOutput,"PROJECT_NOT_FOUND",`Project "${opts.project}" was not found in the current scope.`):{teamId:context.org.id,teamSlug:context.org.slug,projectId:context.project.id,projectName:context.project.name,linked:!!context.repoRoot}}let linked=await getLinkedProject(client);if(linked.status==="error")return linked.exitCode;if(linked.status==="linked"){if(detectExplicitScope(client)){let{team:team2}=await getScope(client);if(!team2)return outputError(client,opts.jsonOutput,"NO_TEAM","No team context found for --scope.");if(team2.id!==linked.org.id)return opts.requireProject?outputError(client,opts.jsonOutput,"SCOPE_PROJECT_MISMATCH",`--scope ${team2.slug} does not match the linked project's team (${linked.org.slug}). Pass --project <name-or-id> for a project in ${team2.slug}.`):{teamId:team2.id,teamSlug:team2.slug}}return{teamId:linked.org.id,teamSlug:linked.org.slug,projectId:linked.project.id,projectName:linked.project.name,linked:!0}}if(opts.requireProject)return outputError(client,opts.jsonOutput,"NOT_LINKED","No linked project found. Run `vercel link` to link a project, or pass --project <name-or-id>.");let{team}=await getScope(client);return team?{teamId:team.id,teamSlug:team.slug}:outputError(client,opts.jsonOutput,"NO_TEAM","No team context found. Run `vercel switch` to select a team, or run `vercel link` in a project directory.")}function inferBranch(cwd){let result=spawnSync("git",["rev-parse","--abbrev-ref","HEAD"],{cwd,encoding:"utf8"});if(result.status===0){let branch=result.stdout.trim();if(branch&&branch!=="HEAD")return{value:branch,source:"git"}}let ciRef=process.env.VERCEL_GIT_COMMIT_REF||process.env.GITHUB_HEAD_REF||process.env.GITHUB_REF_NAME;if(ciRef)return{value:ciRef,source:"ci"}}export{handleCommentsParseError,threadNotFoundMessage,listThreads,getThread,updateThread,listMessages,addMessage,updateMessage,deleteMessage,toApiErrorParts,resolveCommentsScope,inferBranch};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{__commonJS}from"./chunk-BZENIQ7N.js";var require_dist=__commonJS({"
|
|
7
|
+
import{__commonJS}from"./chunk-BZENIQ7N.js";var require_dist=__commonJS({"../constants/dist/index.js"(exports){"use strict";Object.defineProperty(exports,"__esModule",{value:!0});exports.TITLE=exports.NAME=exports.LOGO=exports.PROJECT_ENV_TARGET=void 0;exports.PROJECT_ENV_TARGET=["production","preview","development"];exports.LOGO="\u25B2";exports.NAME="vercel";exports.TITLE="Vercel"}});export{require_dist};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{require_json_parse_better_errors}from"./chunk-25565AGS.js";import{require_lib}from"./chunk-
|
|
7
|
+
import{require_json_parse_better_errors}from"./chunk-25565AGS.js";import{require_lib}from"./chunk-BC74BRVP.js";import{CantParseJSONFile}from"./chunk-GOI2VVI7.js";import{require_dist}from"./chunk-MCYG7CCE.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_fs_extra=__toESM(require_lib(),1);var import_json_parse_better_errors=__toESM(require_json_parse_better_errors(),1),import_error_utils=__toESM(require_dist(),1);async function readJSONFile(file){let content=await readFileSafe(file);if(content===null)return content;try{return(0,import_json_parse_better_errors.default)(content)}catch(error){return new CantParseJSONFile(file,(0,import_error_utils.errorToString)(error))}}async function readFileSafe(file){try{return await import_fs_extra.default.readFile(file,"utf8")}catch{return null}}export{readJSONFile};
|