@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
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{require_dist}from"./chunk-
|
|
7
|
+
import{require_dist}from"./chunk-MCYG7CCE.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_error_utils=__toESM(require_dist(),1);import{randomUUID}from"crypto";import{chmod,lstat,mkdir,readFile,readdir,realpath,rename,rm,writeFile}from"fs/promises";import{isAbsolute,join}from"path";var LOCAL_SCHEDULES_SESSION_HEADER="x-vercel-schedules-dev-session",uuidPattern=/^[0-9a-f]{8}-[0-9a-f]{4}-[1-8][0-9a-f]{3}-[89ab][0-9a-f]{3}-[0-9a-f]{12}$/i;function isLocalSchedulesOrigin(origin){if(typeof origin!="string")return!1;let match=/^http:\/\/127\.0\.0\.1:([1-9][0-9]{0,4})$/.exec(origin);return!!match&&match[0]===origin&&Number(match[1])<=65535}async function createLocalSchedulesSession(cwd,origin,projectId){if(!isLocalSchedulesOrigin(origin)||!projectId.trim())throw new Error("Cannot publish local Schedules: expected an HTTP 127.0.0.1 origin with a valid port and a project ID.");let canonicalCwd=await realpath(cwd),directory=join(canonicalCwd,".vercel","dev","schedules");await mkdir(directory,{recursive:!0,mode:448}),await chmod(directory,448);let session={version:1,id:randomUUID(),pid:process.pid,cwd:canonicalCwd,origin,projectId},filename=join(directory,`${session.id}.json`),temporary=join(directory,`${session.id}.tmp`);try{await writeFile(temporary,JSON.stringify(session),{flag:"wx",mode:384}),await rename(temporary,filename)}catch(error){throw await rm(temporary,{force:!0}),error}return{session,dispose:()=>rm(filename,{force:!0})}}async function readLocalSchedulesSessions(cwd){let canonicalCwd=await realpath(cwd),directory=join(canonicalCwd,".vercel","dev","schedules"),filenames;try{filenames=await readdir(directory)}catch(error){if((0,import_error_utils.isErrnoException)(error)&&error.code==="ENOENT")return[];throw error}let sessions=[];for(let filename of filenames.sort()){if(!filename.endsWith(".json"))continue;let path=join(directory,filename),session;try{if(filename.length!==41||!uuidPattern.test(filename.slice(0,-5)))throw new Error("expected a UUID filename");if(!(await lstat(path)).isFile())throw new Error("expected a regular session file");if(session=JSON.parse(await readFile(path,"utf8")),!session||session.version!==1)throw new Error("unsupported session version (expected version 1)");if(session.id!==filename.slice(0,-5)||!Number.isSafeInteger(session.pid)||session.pid<=0||typeof session.cwd!="string"||!isAbsolute(session.cwd)||!isLocalSchedulesOrigin(session.origin)||typeof session.projectId!="string"||!session.projectId.trim())throw new Error("invalid session descriptor");try{process.kill(session.pid,0)}catch(error){if((0,import_error_utils.isErrnoException)(error)&&error.code==="ESRCH")continue;if(!(0,import_error_utils.isErrnoException)(error)||error.code!=="EPERM")throw error}if(await realpath(session.cwd)!==canonicalCwd)throw new Error("session directory does not match the current directory")}catch(error){if((0,import_error_utils.isErrnoException)(error)&&error.code==="ENOENT")try{await lstat(path)}catch(missing){if((0,import_error_utils.isErrnoException)(missing)&&missing.code==="ENOENT")continue;throw missing}throw new Error(`Cannot read local Schedules session ${path}: ${error instanceof Error?error.message:String(error)}. Stop vercel dev, remove this descriptor, and restart vercel dev in the current directory.`)}sessions.push(session)}return sessions}export{LOCAL_SCHEDULES_SESSION_HEADER,isLocalSchedulesOrigin,createLocalSchedulesSession,readLocalSchedulesSessions};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{packageName}from"./chunk-
|
|
7
|
+
import{packageName}from"./chunk-B4KA3ZH2.js";import{formatOption,gitBranchOption,jsonOption,limitOption,nextCursorOption,projectOption,yesOption}from"./chunk-EZVNGJN5.js";var commentsProjectOption={...projectOption,shorthand:"p",description:"Project ID or name (default: linked project)"},messageContentOption={name:"message",shorthand:null,deprecatedShorthand:"m",type:String,argument:"TEXT",deprecated:!1,description:"Markdown message content"},fileOption={name:"file",shorthand:null,type:String,argument:"PATH",deprecated:!1,description:"Read Markdown content from a file; use `-` for stdin"},attachOption={name:"attach",shorthand:null,type:[String],argument:"URL",deprecated:!1,description:"Attach a file by https URL (repeatable, max 10)"},listSubcommand={name:"list",aliases:["ls"],default:!0,description:"List comments for a project",arguments:[],options:[commentsProjectOption,{...gitBranchOption,type:[String],description:"Filter by Git branch (repeatable) (default: the current branch when inferable)"},{name:"branch",shorthand:null,type:[String],argument:"BRANCH",deprecated:!0,description:"Deprecated alias for `--git-branch`"},{name:"all-branches",shorthand:null,type:Boolean,deprecated:!1,description:"Show comments from every branch"},{name:"status",shorthand:null,type:String,argument:"STATUS",deprecated:!1,description:"unresolved, resolved, or all (default: unresolved)"},{name:"page-path",shorthand:null,type:[String],argument:"PATH",deprecated:!1,description:"Filter by recorded page path or glob (repeatable). Note: rewrites may record a different path than the browser URL"},{name:"page",shorthand:null,type:[String],argument:"PATH",deprecated:!0,description:"Filter by recorded page path or glob"},{name:"author",shorthand:null,type:[String],argument:"USER",deprecated:!1,description:"Filter by author user ID, or `me` (repeatable)"},{name:"content",shorthand:null,type:[String],argument:"CONTENT",deprecated:!1,description:"Filter by CMS content ID (repeatable)"},{name:"content-id",shorthand:null,type:[String],argument:"ID",deprecated:!0,description:"Deprecated alias for `--content`"},{name:"query",shorthand:"q",type:String,argument:"TEXT",deprecated:!1,description:"Search comment content"},{name:"search",shorthand:null,type:String,argument:"TEXT",deprecated:!0,description:"Deprecated alias for `--query`"},limitOption,nextCursorOption,formatOption,jsonOption],examples:[{name:"List unresolved comments for the linked project",value:`${packageName} comments`},{name:"List comments on every branch",value:`${packageName} comments --all-branches --status all`},{name:"List comments as JSON",value:`${packageName} comments --json | jq '.threads[].id'`}]},inspectSubcommand={name:"inspect",aliases:["get"],description:"Show a comment thread with its full conversation",arguments:[{name:"thread",required:!1}],options:[commentsProjectOption,{name:"context",shorthand:null,type:Boolean,deprecated:!1,description:"Include framework and device context"},formatOption,jsonOption],examples:[{name:"Inspect a comment thread",value:`${packageName} comments inspect icZ9BnPPINuK`},{name:"Inspect a comment from its URL",value:`${packageName} comments inspect https://vercel.com/team/project/c/icZ9BnPPINuK`},{name:"Pick a comment interactively",value:`${packageName} comments inspect`},{name:"Inspect a thread whose ID starts with a dash",value:`${packageName} comments inspect -- -ULOL`}]},openSubcommand={name:"open",aliases:[],description:"Open a comment thread on vercel.com",arguments:[{name:"thread",required:!0}],options:[commentsProjectOption],examples:[{name:"Open a comment in the browser",value:`${packageName} comments open icZ9BnPPINuK`}]},replySubcommand={name:"reply",aliases:[],description:"Reply to a comment thread",arguments:[{name:"thread",required:!0}],options:[commentsProjectOption,messageContentOption,fileOption,attachOption,formatOption,jsonOption],examples:[{name:"Reply to a comment",value:`${packageName} comments reply icZ9BnPPINuK --message 'Fixed in **main**.'`},{name:"Reply from stdin",value:`git log -1 --format=%s | ${packageName} comments reply icZ9BnPPINuK`}]},resolveSubcommand={name:"resolve",aliases:[],description:"Resolve comment threads, optionally with a closing reply",arguments:[{name:"thread",required:!0,multiple:!0}],options:[commentsProjectOption,messageContentOption,yesOption,formatOption,jsonOption],examples:[{name:"Resolve a comment",value:`${packageName} comments resolve icZ9BnPPINuK`},{name:"Reply and resolve in one step",value:`${packageName} comments resolve icZ9BnPPINuK --message 'Fixed in the latest deployment'`}]},reopenSubcommand={name:"reopen",aliases:[],description:"Reopen resolved comment threads",arguments:[{name:"thread",required:!0,multiple:!0}],options:[commentsProjectOption,yesOption,formatOption,jsonOption],examples:[{name:"Reopen a comment",value:`${packageName} comments reopen icZ9BnPPINuK`}]},editSubcommand={name:"update",aliases:["edit"],description:"Update a comment message while preserving its attachments",arguments:[{name:"thread",required:!0},{name:"message-id",required:!0}],options:[commentsProjectOption,messageContentOption,fileOption,formatOption,jsonOption],examples:[{name:"Update a message",value:`${packageName} comments update icZ9BnPPINuK VvkhYF6dTqbpm7K --message 'Updated wording'`}]},deleteSubcommand={name:"delete",aliases:["rm","del"],description:"Delete a comment message",arguments:[{name:"thread",required:!0},{name:"message-id",required:!0}],options:[commentsProjectOption,yesOption,formatOption,jsonOption],examples:[{name:"Delete a message",value:`${packageName} comments delete icZ9BnPPINuK VvkhYF6dTqbpm7K`}]},commentsCommand={name:"comments",aliases:[],description:"Review and act on Vercel Toolbar comments from the command line",arguments:[],subcommands:[listSubcommand,inspectSubcommand,openSubcommand,replySubcommand,resolveSubcommand,reopenSubcommand,editSubcommand,deleteSubcommand],options:[],examples:[{name:"Review unresolved comments for the linked project",value:`${packageName} comments`},{name:"Inspect a comment and reply",value:`${packageName} comments inspect icZ9BnPPINuK`},{name:"Reply and resolve in one step",value:`${packageName} comments resolve icZ9BnPPINuK --message 'Fixed!'`}]};export{listSubcommand,inspectSubcommand,openSubcommand,replySubcommand,resolveSubcommand,reopenSubcommand,editSubcommand,deleteSubcommand,commentsCommand};
|
|
@@ -0,0 +1,12 @@
|
|
|
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{amountMatchesPrice,formatAmountArg,parseAmount}from"./chunk-FZLCDLWD.js";import{formatUsd}from"./chunk-RAQ6EUNL.js";import{canPrompt}from"./chunk-IQ7FPAI4.js";import{quoteShellArg}from"./chunk-QBHTNUM5.js";import{getTeams}from"./chunk-Y2FVJ7YO.js";import{AGENT_ACTION,AGENT_REASON,AGENT_STATUS,shouldEmitNonInteractiveCommandError,writeActionRequired,writeAgentError}from"./chunk-GORL5DZC.js";import{printAlignedLabel}from"./chunk-K46QQRUN.js";import{parseArguments}from"./chunk-VM6X5BTK.js";import{wantsMachineReadableOutput}from"./chunk-JONZUKWX.js";import{packageName}from"./chunk-B4KA3ZH2.js";import{output_manager_default}from"./chunk-YNCWSPPJ.js";import{require_build_utils}from"./chunk-5MDNVAE6.js";import{stripSensitiveAuthArgs}from"./chunk-EZVNGJN5.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_build_utils=__toESM(require_build_utils(),1);import{createHash,randomUUID}from"node:crypto";var APPROVAL_OPTIONS=new Set(["--confirm-name","--amount","--effects-digest"]),LEGACY_CONSENT_FLAGS=new Set(["--yes","-y","--confirm"]);async function requireApproval(client,consequence,details,flags,{legacy:commandLegacy}={}){let approval=describeApproval(consequence,details),agent=client.isAgent,noPrompts=isAgentRun(client),terminal=!noPrompts&&canPrompt(client),legacy=agent?void 0:commandLegacy,check=approval.check(flags);if(check.given&&"invalid"in check)return track(client,approval,"invalid"),refuse(client,approval,{reason:AGENT_REASON.INVALID_ARGUMENTS,message:check.invalid,exitCode:2,noPrompts});if(check.given&&!check.matches)return track(client,approval,"mismatch"),refuse(client,approval,{reason:check.reason,message:check.message,exitCode:check.reason===AGENT_REASON.PRICE_CHANGED?1:2,noPrompts,teamMissing:await isTeamMissing(client,approval)});let digest=flags["--effects-digest"];if(approval.digest!==void 0&&digest!==void 0&&digest!==approval.digest)return track(client,approval,"effects_changed"),refuse(client,approval,{reason:AGENT_REASON.EFFECTS_CHANGED,message:`Can't ${approval.action}. What it does changed since it was approved. Nothing was changed.`,exitCode:1,noPrompts,teamMissing:await isTeamMissing(client,approval)});let digestMissing=agent&&approval.digest!==void 0&&digest===void 0;if(check.given&&!digestMissing){if(!approval.teamForApproval||await isTeamExplicit(client))return track(client,approval,"approved"),{approved:!0,warnings:[]};if(!terminal)return refuseMissingTeam(client,approval,noPrompts)}else if(flags["--yes"]&&!agent){if(!legacy?.yesNeedsTeam||await isTeamExplicit(client))return track(client,approval,"yes"),{approved:!0,warnings:[await deprecateYes(client,approval)]};if(!terminal)return refuseMissingTeam(client,approval,noPrompts)}return terminal?promptForApproval(client,approval,legacy):legacy?.pipedAnswer&&!client.nonInteractive&&!client.stdin.isTTY?readPipedAnswer(client,approval):(track(client,approval,agent&&flags["--yes"]?"yes_ignored":"stopped"),refuse(client,approval,{reason:AGENT_REASON.CONFIRMATION_REQUIRED,message:`Can't ${approval.action} without approval.`,exitCode:legacy?.stopExitCode??2,status:legacy?legacy.stopStatus:AGENT_STATUS.ACTION_REQUIRED,noPrompts,teamMissing:await isTeamMissing(client,approval),yesIgnored:agent&&!!flags["--yes"]}))}function effectsDigest(value){return createHash("sha256").update(stableStringify(value)).digest("hex").slice(0,16)}function stableStringify(value){return Array.isArray(value)?`[${value.map(stableStringify).join(",")}]`:value!==null&&typeof value=="object"?`{${Object.entries(value).filter(([,item])=>item!==void 0).sort(([a],[b])=>a<b?-1:a>b?1:0).map(([key,item])=>`${JSON.stringify(key)}:${stableStringify(item)}`).join(",")}}`:JSON.stringify(value)??"null"}function describeApproval(consequence,details){return consequence==="purchase"?describePurchase(details):describeTarget(consequence,details)}function describeTarget(consequence,details){let{noun,target}=details,severe=consequence==="severe",action=details.kind==="delete"?`delete ${noun} ${target}`:`${details.action} for ${noun} ${target}`,effects=severe?[...details.effects,"This cannot be undone."]:details.effects;return{consequence,action,question:`${capitalize(action)}?`,typedName:severe?{prompt:`To confirm, type the ${noun} name "${target}":`,target}:void 0,rows:async agent=>[[capitalize(noun),await withTeam(details.team,target,agent)]],effects,approvalArgs:["--confirm-name",target],scopeHint:"<TEAM>",teamForApproval:severe,digest:details.digest,data:{consequence,kind:details.kind,noun,target,effects,...details.digest!==void 0&&{effectsDigest:details.digest}},check:flags=>checkName(flags,noun,target,action)}}function describePurchase(details){let{item,amountUsd,team,renews}=details,price=formatUsd(amountUsd),charge=`Charges ${price} to ${team} now${renews?`, then renews ${renews}`:", one time"}.`;return{consequence:"purchase",action:`buy ${item}`,question:`Buy ${item} for ${team}?`,rows:async()=>[["Team",team],["Charge",`${price} now`],["Renews",renews??"No, one-time charge"]],effects:[charge],approvalArgs:["--amount",formatAmountArg(amountUsd)],scopeHint:team,teamForApproval:!0,data:{consequence:"purchase",item,team,amount:amountUsd,currency:"USD",renews:renews??null,effects:[charge]},check:flags=>{let raw=flags["--amount"];if(raw===void 0)return{given:!1};let amount=parseAmount(raw);return amount instanceof Error?{given:!0,invalid:amount.message}:amount===void 0||amountMatchesPrice(amount,amountUsd)?{given:!0,matches:!0}:{given:!0,matches:!1,reason:AGENT_REASON.PRICE_CHANGED,message:`Can't buy ${item}. It costs ${price}, not ${formatUsd(amount)}. Nothing was charged.`}}}}function checkName(flags,noun,target,action){let name=flags["--confirm-name"];return name===void 0?{given:!1}:name===target?{given:!0,matches:!0}:{given:!0,matches:!1,reason:AGENT_REASON.INVALID_ARGUMENTS,message:`Can't ${action}. --confirm-name is "${name}", not the ${noun} name "${target}". Nothing was changed.`}}async function promptForApproval(client,approval,legacy){return await printPreview(approval,!1),(approval.typedName?await client.input.text({message:approval.typedName.prompt})===approval.typedName.target:await client.input.confirm(approval.question,!1))?(track(client,approval,"prompt"),{approved:!0,warnings:[]}):(track(client,approval,"declined"),output_manager_default.log("Canceled. Nothing was changed."),{approved:!1,exitCode:legacy?.declineExitCode??130})}async function readPipedAnswer(client,approval){let[option]=approval.approvalArgs;return output_manager_default.warning(`Without a terminal, this will need ${option}${approval.teamForApproval?" and --scope":""} in a future major version.`),await printPreview(approval,!1),await client.input.confirm(approval.question,!1)?(track(client,approval,"piped"),{approved:!0,warnings:[]}):(track(client,approval,"declined"),output_manager_default.log("Canceled. Nothing was changed."),{approved:!1,exitCode:0})}function refuseMissingTeam(client,approval,noPrompts){return track(client,approval,"missing_scope"),refuse(client,approval,{reason:AGENT_REASON.MISSING_SCOPE,message:`Can't ${approval.action} without a team in non-interactive mode.`,exitCode:2,noPrompts,teamMissing:!0})}async function refuse(client,approval,opts){let command=buildApprovalCommand(client.argv,approvalArgsFor(approval),opts.teamMissing?"<TEAM>":void 0),when=`Only after a human approves: ${approval.effects.join(" ")}${opts.teamMissing?" Replace <TEAM> with the team it belongs to.":""}`,status=opts.status??AGENT_STATUS.ACTION_REQUIRED;if(status!==!1&&shouldEmitNonInteractiveCommandError(client)){let document={reason:opts.reason,action:AGENT_ACTION.CONFIRMATION_REQUIRED,message:opts.message,userActionRequired:!0,hint:`Show the user what this does (data.effects) and run next[] only after they approve.${opts.yesIgnored?" --yes doesn't approve this command.":""}`,data:approval.data,next:[{command,when}]};return status===AGENT_STATUS.ACTION_REQUIRED?writeActionRequired(client,{status,...document}):writeAgentError(client,{status,...document}),{approved:!1,exitCode:opts.exitCode}}return output_manager_default.error(opts.message),await printPreview(approval,opts.noPrompts),output_manager_default.print(`
|
|
8
|
+
Once a person approves, run:
|
|
9
|
+
${command}
|
|
10
|
+
`),{approved:!1,exitCode:opts.exitCode}}function approvalArgsFor(approval){return approval.digest===void 0?approval.approvalArgs:[...approval.approvalArgs,"--effects-digest",approval.digest]}async function printPreview(approval,agent){for(let[label,value]of await approval.rows(agent))printAlignedLabel(label,value);output_manager_default.print(`
|
|
11
|
+
${approval.effects.map(line=>` ${line}
|
|
12
|
+
`).join("")}`)}async function deprecateYes(client,approval){let message=`--yes is deprecated for this command. Use ${buildApprovalArgs(approval.approvalArgs,await isTeamMissing(client,approval)?approval.scopeHint:void 0).join(" ")}.`;return wantsMachineReadableOutput(void 0,client.argv)||output_manager_default.warning(message),{reason:AGENT_REASON.DEPRECATED,message}}function buildApprovalCommand(argv,approvalArgs,scope){let args=stripSensitiveAuthArgs(argv.slice(2)),kept=[];for(let i=0;i<args.length;i++){let arg=args[i];if(arg==="--"){kept.push(...args.slice(i));break}if(LEGACY_CONSENT_FLAGS.has(arg))continue;let name=arg.split("=")[0];if(APPROVAL_OPTIONS.has(name)){arg.includes("=")||i++;continue}kept.push(arg)}let delimiter=kept.indexOf("--"),before=delimiter===-1?kept:kept.slice(0,delimiter),after=delimiter===-1?[]:kept.slice(delimiter);return[packageName,...before.map(quoteShellArg),...buildApprovalArgs(approvalArgs,scope),...after.map(quoteShellArg)].join(" ")}function buildApprovalArgs(approvalArgs,scope){let quoted=approvalArgs.map(quoteShellArg);return scope===void 0?quoted:[...quoted,"--scope",scope==="<TEAM>"?scope:quoteShellArg(scope)]}async function isTeamMissing(client,approval){return approval.teamForApproval&&!await isTeamExplicit(client)}async function isTeamExplicit(client){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)return!1;let orgId=(0,import_build_utils.getPlatformEnv)("ORG_ID");if(orgId)return orgId===team;try{let teams=await getTeams(client);return teams.length===1&&teams[0].id===team}catch(err){return output_manager_default.debug(`Couldn't list teams: ${err}`),!1}}function isAgentRun(client){if(!client.isAgent)return!1;let{argv}=client,index=argv.indexOf("--non-interactive");return!((argv.includes("--non-interactive=false")||argv.includes("--no-non-interactive")||index!==-1&&argv[index+1]==="false")&&client.stdin.isTTY)}async function withTeam(team,target,agent){return team===void 0||agent&&typeof team=="function"?target:`${typeof team=="function"?await team():team}/${target}`}function track(client,approval,outcome){client.telemetryEventStore?.add({id:randomUUID(),eventTime:Date.now(),key:"approval",value:`${approval.consequence}:${outcome}`})}function capitalize(text){return text.charAt(0).toUpperCase()+text.slice(1)}export{requireApproval,effectsDigest};
|
|
@@ -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{getScope}from"./chunk-XSQZ35V6.js";import{sleep}from"./chunk-BC74BRVP.js";import{require_ms}from"./chunk-MXTC4ZAQ.js";import{isAPIError}from"./chunk-GOI2VVI7.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_ms=__toESM(require_ms(),1);var DEFAULT_ORDER_WAIT="1m",DEFAULT_ORDER_WAIT_MS=(0,import_ms.default)(DEFAULT_ORDER_WAIT);function getOrderOutcome(order,domain){let item=order.domains.find(d=>d.domainName===domain);return order.status==="completed"&&item?.status==="completed"?"completed":order.error?.code==="payment-failed"?order.error.details?.reason==="authentication-required"?"payment_authentication_required":"payment_failed":item?.status==="refund-failed"?"refund_failed":item?.status==="refunded"?"refunded":item?.status==="failed"?"failed":"unknown"}async function getOrder(client,orderId,{signal}={}){let{team}=await getScope(client),teamParam=team?`?teamId=${team.slug}`:"";try{return await client.fetch(`/v1/registrar/orders/${orderId}${teamParam}`,{retry:{retries:0},bailOn429:!0,signal})}catch(err){if(isAPIError(err)){if(err.status===404)return null;if(err.status<500)return err}throw err}}function remainingWait(waitMs,sentAt){return Math.max(waitMs-(Date.now()-sentAt),0)}var ORDER_READ_TIMING={minReadMs:5*1e3},pollForOrder=async(client,orderId,timeoutMs)=>{let intervalMs=500,lastStatus=null,startTime=Date.now();for(;;){let sleepMs=intervalMs,order;try{let leftMs2=timeoutMs-(Date.now()-startTime);order=await getOrder(client,orderId,{signal:AbortSignal.timeout(Math.max(leftMs2,ORDER_READ_TIMING.minReadMs))})}catch{order=null}if(order instanceof Error)if(order.status===429)typeof order.retryAfterMs=="number"&&(sleepMs=Math.max(sleepMs,order.retryAfterMs));else return{order:null,lastStatus,readError:{status:order.status,code:order.code}};else if(order!==null){let pending=order.domains.some(d=>d.status==="pending");if(order.status==="failed"||order.status==="completed"&&!pending)return{order};order.status!=="completed"&&(lastStatus=order.status)}let leftMs=timeoutMs-(Date.now()-startTime);if(leftMs<=0)break;await sleep(Math.min(sleepMs,leftMs)),intervalMs=Math.min(intervalMs*2,5e3)}return{order:null,lastStatus}};export{DEFAULT_ORDER_WAIT,DEFAULT_ORDER_WAIT_MS,getOrderOutcome,remainingWait,ORDER_READ_TIMING,pollForOrder};
|
|
@@ -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{parseSubcommandArguments}from"./chunk-
|
|
7
|
+
import{parseSubcommandArguments}from"./chunk-FXOKM2RM.js";import{printError}from"./chunk-NYJTWSSD.js";import{AGENT_REASON,AGENT_STATUS,buildCommandWithYes,outputAgentError,withGlobalFlags}from"./chunk-GORL5DZC.js";import{getCommandNamePlain}from"./chunk-B4KA3ZH2.js";import{output_manager_default}from"./chunk-YNCWSPPJ.js";import{getGlobalFlagsFromArgs}from"./chunk-EZVNGJN5.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var ROUTE_TYPE_LABELS={rewrite:"Rewrite",redirect:"Redirect",set_status:"Set Status",transform:"Transform"};function getRouteTypeLabel(rule){return rule.routeType?ROUTE_TYPE_LABELS[rule.routeType]??"-":"-"}var SRC_SYNTAX_LABELS={equals:"Exact Match","path-to-regexp":"Pattern",regex:"Regex"};function getSrcSyntaxLabel(rule){let syntax=rule.srcSyntax??"regex";return SRC_SYNTAX_LABELS[syntax]}function isTargetTransform(transform){return"target"in transform}var import_chalk=__toESM(require_source(),1);function withGlobalFlags2(client,commandTemplate){return withGlobalFlags(client,commandTemplate,{preserveProject:!0})}function shellQuoteRouteIdentifierForSuggestion(identifier){return identifier.includes(" ")?identifier.includes("'")?identifier.includes('"')?`"${identifier.replace(/"/g,'\\"')}"`:`"${identifier}"`:`'${identifier}'`:identifier}async function parseSubcommandArgs(argv,command,client){let parsedArgs;try{parsedArgs=parseSubcommandArguments(argv,command)}catch(err){if(client?.nonInteractive){let rawMessage=err instanceof Error?err.message:String(err),flags=getGlobalFlagsFromArgs(client.argv.slice(2),{preserveProject:!0}),message=rawMessage,next=[{command:getCommandNamePlain(`routes ${command.name} ${flags.join(" ")}`.trim()),when:"fix options and retry"}],aiIdx=argv.indexOf("--ai");return(aiIdx!==-1&&(aiIdx===argv.length-1||argv[aiIdx+1]!==void 0&&argv[aiIdx+1].startsWith("-"))||/option requires argument.*--ai|--ai.*requires argument/i.test(rawMessage))&&(command.name==="add"||command.name==="update")&&(message=command.name==="add"?'--ai requires a description. Example: routes add --ai <description> --yes --non-interactive. Replace <description> with your text; use shell quotes if it contains spaces (e.g. --ai "Redirect /old to /new").':"--ai requires a description. Example: routes update <name-or-id> --ai <description> --yes --non-interactive. Replace placeholders; use shell quotes for <description> if it contains spaces.",next=[{command:withGlobalFlags2(client,command.name==="add"?"routes add --ai <description> --yes":"routes update <name-or-id> --ai <description> --yes"),when:"replace <description> with your text (quote it in the shell if it contains spaces), then run"},{command:getCommandNamePlain(`routes ${command.name} --help ${flags.join(" ")}`.trim()),when:"see all options"}]),outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message,next},2),2}return printError(err),2}return parsedArgs}async function confirmAction(client,skipConfirmation,message,details){return skipConfirmation?!0:client.nonInteractive?(outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.CONFIRMATION_REQUIRED,message:`${message} Re-run with --yes to confirm.`,next:[{command:buildCommandWithYes(client.argv),when:"re-run with --yes to confirm"}]}),process.exit(1),!1):(details&&output_manager_default.print(` ${details}
|
|
8
8
|
`),await client.input.confirm(message,!1))}function formatCondition(condition){let parts=[import_chalk.default.gray(`[${condition.type}]`)];if(condition.key&&parts.push(import_chalk.default.cyan(condition.key)),condition.value!==void 0){let formatted=typeof condition.value=="string"?condition.value:JSON.stringify(condition.value);parts.push(condition.key?`= ${formatted}`:formatted)}return parts.join(" ")}var TRANSFORM_TYPE_LABELS={"request.headers":"Request Header","request.query":"Request Query","response.headers":"Response Header","request.path":"Request Path"},TRANSFORM_OP_LABELS={set:"set",append:"append",delete:"delete"};function formatTransform(transform,includeType=!0){let opLabel=TRANSFORM_OP_LABELS[transform.op]??transform.op,key=isTargetTransform(transform)?typeof transform.target.key=="string"?transform.target.key:JSON.stringify(transform.target.key):"path",parts=[];if(includeType){let typeLabel=TRANSFORM_TYPE_LABELS[transform.type]??transform.type;parts.push(import_chalk.default.gray(`[${typeLabel}]`))}if(parts.push(import_chalk.default.yellow(opLabel),import_chalk.default.cyan(key)),transform.args!==void 0&&transform.op!=="delete"){let argsStr=Array.isArray(transform.args)?transform.args.join(", "):transform.args;parts.push(`= ${argsStr}`)}return parts.join(" ")}function parsePosition(position){if(position==="start")return{placement:"start"};if(position==="end")return{placement:"end"};if(position.startsWith("after:")){let referenceId=position.slice(6);if(!referenceId)throw new Error('Position "after:" requires a route ID');return{placement:"after",referenceId}}if(position.startsWith("before:")){let referenceId=position.slice(7);if(!referenceId)throw new Error('Position "before:" requires a route ID');return{placement:"before",referenceId}}throw new Error(`Invalid position: "${position}". Use: start, end, after:<id>, or before:<id>`)}async function offerAutoPromote(client,projectId,version,hadExistingStagingVersion,opts){let{default:updateRouteVersion}=await import("./update-route-version-KWK5S4UW.js"),{default:stamp}=await import("./stamp-TKONNIJ5.js");if(output_manager_default.print(`
|
|
9
9
|
${import_chalk.default.gray(`This change is staged. Run ${import_chalk.default.cyan(withGlobalFlags2(client,"routes publish"))} to make it live, or ${import_chalk.default.cyan(withGlobalFlags2(client,"routes discard-staging"))} to undo.`)}
|
|
10
10
|
`),!hadExistingStagingVersion&&!opts.skipPrompts){if(output_manager_default.print(`
|
|
@@ -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{require_dist,require_dist2}from"./chunk-66TKNVRG.js";import{require_types}from"./chunk-AW33SRYY.js";import{require_build_utils}from"./chunk-5MDNVAE6.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_routing_utils=__toESM(require_dist(),1),import_build_utils=__toESM(require_build_utils(),1),import_types=__toESM(require_types(),1),import_fs_detectors=__toESM(require_dist2(),1);import{getConfigValidator}from"./config-validator.mjs";var imagesSchema={type:"object",additionalProperties:!1,required:["sizes"],properties:{contentDispositionType:{enum:["inline","attachment"]},contentSecurityPolicy:{type:"string",minLength:1,maxLength:256},dangerouslyAllowSVG:{type:"boolean"},domains:{type:"array",minItems:0,maxItems:50,items:{type:"string",minLength:1,maxLength:256}},formats:{type:"array",minItems:1,maxItems:4,items:{enum:["image/avif","image/webp","image/jpeg","image/png"]}},localPatterns:{type:"array",minItems:0,maxItems:25,items:{type:"object",additionalProperties:!1,properties:{pathname:{type:"string",minLength:1,maxLength:256},search:{type:"string",minLength:0,maxLength:256}}}},minimumCacheTTL:{type:"integer",minimum:1,maximum:31536e4},qualities:{type:"array",minItems:1,maxItems:20,items:{type:"integer",minimum:1,maximum:100}},remotePatterns:{type:"array",minItems:0,maxItems:50,items:{type:"object",additionalProperties:!1,required:["hostname"],properties:{protocol:{enum:["http","https"]},hostname:{type:"string",minLength:1,maxLength:256},port:{type:"string",minLength:0,maxLength:5},pathname:{type:"string",minLength:1,maxLength:256},search:{type:"string",minLength:0,maxLength:256}}}},sizes:{type:"array",minItems:1,maxItems:50,items:{type:"number"}}}},cronsSchema={type:"array",minItems:0,items:{type:"object",additionalProperties:!1,required:["path","schedule"],properties:{path:{type:"string",minLength:1,maxLength:512,pattern:"^/.*"},schedule:{type:"string",minLength:9,maxLength:256}}}},scheduleNameSchema={type:"string",minLength:1,maxLength:256,pattern:"^[0-9A-Za-z][0-9A-Za-z._-]*$"},scheduleDefinitionSchema={type:"object",additionalProperties:!1,required:["schedule"],properties:{schedule:{type:"string",minLength:9,maxLength:256},timezone:{type:"string",minLength:1,maxLength:50,description:"IANA timezone for cron evaluation. Defaults to UTC."},jitter:{type:"integer",minimum:1,maximum:15},path:{description:"Deployment path to invoke over HTTP, like `crons[].path`. Must start with `/`.",type:"string",maxLength:512,pattern:"^/"},requestMethod:{description:"HTTP method used to invoke `path`. Only valid with `path`. Defaults to `POST`.",enum:["GET","POST"]},function:{type:"string",minLength:1},service:{description:"Service that owns `function`, from `services`. When set, `function` is the path within that service. Only valid with `function`.",type:"string",minLength:1,maxLength:64,pattern:"^[a-z]([a-z_-]*[a-z])?$"},topic:{type:"string",minLength:1,maxLength:256,pattern:"^[A-Za-z0-9_-]+$"},command:{description:"Command to run for each firing. Only valid with a Dockerfile or Containerfile entrypoint.",type:"array",minItems:1,items:[{type:"string",pattern:"\\S"}],additionalItems:{type:"string"}},root:{description:"Directory of the service that runs `command`. `entrypoint` is relative to it. Only valid with `command`.",type:"string",minLength:1,maxLength:512},entrypoint:{type:"string",minLength:1,maxLength:512}},dependencies:{requestMethod:["path"],service:["function"],command:["entrypoint","root"],root:["command"]},oneOf:[{required:["path"]},{required:["function"]},{required:["topic"]},{required:["entrypoint"]}]},maxSchedules=500,schedulesSchema={type:"object",maxProperties:maxSchedules,propertyNames:scheduleNameSchema,additionalProperties:scheduleDefinitionSchema},experimentalServicesMountSchema={oneOf:[{type:"string",minLength:1,maxLength:512},{type:"object",additionalProperties:!1,properties:{path:{type:"string",minLength:1,maxLength:512},subdomain:{type:"string",minLength:1,maxLength:63}},anyOf:[{required:["path"]},{required:["subdomain"]}]}]},staticExperimentalServiceScheduleSchema={type:"string",minLength:9,maxLength:256,not:{const:"<dynamic>"}},experimentalServiceScheduleSchema={oneOf:[{type:"string",minLength:9,maxLength:256},{type:"array",minItems:1,items:staticExperimentalServiceScheduleSchema}]},experimentalServiceQueueTopicSchema={type:"object",additionalProperties:!1,required:["topic"],properties:{topic:{type:"string",minLength:1,maxLength:256},retryAfterSeconds:{type:"integer",minimum:1,maximum:86400},initialDelaySeconds:{type:"integer",minimum:0,maximum:86400}}},experimentalServiceTopicsSchema={oneOf:[{type:"array",minItems:1,items:{type:"string",minLength:1,maxLength:256}},{type:"array",minItems:1,items:experimentalServiceQueueTopicSchema}]},envVarNamesSchema={pattern:"^[A-Za-z_][A-Za-z0-9_]*$",maxLength:256},getExperimentalServicesCommonProperties=()=>({entrypoint:{type:"string",minLength:1,maxLength:512},root:{type:"string",minLength:1,maxLength:512},workspace:{type:"string",minLength:1,maxLength:512},framework:{type:"string",minLength:1,maxLength:256},builder:{type:"string",minLength:1,maxLength:256},runtime:{type:"string",minLength:1,maxLength:256},buildCommand:{type:"string",minLength:1,maxLength:2048},installCommand:{type:"string",minLength:1,maxLength:2048},preDeployCommand:{type:"string",minLength:1,maxLength:2048},command:{oneOf:[{type:"string",minLength:1,maxLength:2048},{type:"array",minItems:1,items:{type:"string",minLength:1,maxLength:2048}}]},memory:{type:"integer",minimum:128,maximum:10240},maxDuration:(0,import_build_utils.getMaxDurationSchema)(),includeFiles:{oneOf:[{type:"string",minLength:1},{type:"array",items:{type:"string",minLength:1}}]},excludeFiles:{oneOf:[{type:"string",minLength:1},{type:"array",items:{type:"string",minLength:1}}]}}),experimentalServicesRoutableProperties={mount:experimentalServicesMountSchema,routePrefix:{type:"string",minLength:1,maxLength:512},subdomain:{type:"string",minLength:1,maxLength:63}},getExperimentalServicesServiceConfigSchema=()=>({oneOf:[{type:"object",additionalProperties:!1,properties:{...getExperimentalServicesCommonProperties(),...experimentalServicesRoutableProperties,type:{enum:["web"]}}},{type:"object",additionalProperties:!1,required:["type","trigger","schedule"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"job"},trigger:{const:"schedule"},schedule:experimentalServiceScheduleSchema}},{type:"object",additionalProperties:!1,required:["type","trigger","topics"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"job"},trigger:{const:"queue"},topics:experimentalServiceTopicsSchema,consumer:{type:"string",minLength:1,maxLength:256}}},{type:"object",additionalProperties:!1,required:["type","trigger","entrypoint"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"job"},trigger:{const:"workflow"}}},{type:"object",additionalProperties:!1,required:["type"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"worker"},topics:{type:"array",items:{type:"string",minLength:1,maxLength:256},minItems:1},consumer:{type:"string",minLength:1,maxLength:256}}},{type:"object",additionalProperties:!1,required:["type","schedule"],properties:{...getExperimentalServicesCommonProperties(),type:{const:"cron"},schedule:experimentalServiceScheduleSchema}}]}),getExperimentalServicesSchema=()=>({type:"object",propertyNames:{pattern:"^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$",maxLength:64},additionalProperties:getExperimentalServicesServiceConfigSchema()}),experimentalServiceGroupsSchema={type:"object",propertyNames:{pattern:"^[a-zA-Z]([a-zA-Z0-9_-]*[a-zA-Z0-9])?$",maxLength:64},additionalProperties:{type:"array",items:{type:"string",minLength:1,maxLength:256}}},servicesPathSchema={type:"string",minLength:1,maxLength:512},servicesCommandSchema={type:"string",minLength:1,maxLength:2048},servicesBindingSchema={type:"object",additionalProperties:!1,required:["service","format","env"],properties:{type:{description:"Optional binding type marker. Currently the only supported type is `service`. When present this must be `service`.",const:"service"},service:{type:"string",minLength:1,maxLength:64,pattern:import_build_utils.SERVICE_NAME_PATTERN},format:{const:"url"},env:{type:"string",...envVarNamesSchema}}},servicesBindingsSchema={type:"array",maxItems:100,items:servicesBindingSchema},getServicesServiceConfigSchema=()=>({type:"object",additionalProperties:!1,required:["root"],properties:{root:servicesPathSchema,framework:{type:"string",minLength:1,maxLength:256},runtime:{type:"string",minLength:1,maxLength:256},entrypoint:servicesPathSchema,command:{oneOf:[{type:"string",minLength:1,maxLength:4096},{type:"array",minItems:1,maxItems:128,items:{type:"string",minLength:1,maxLength:4096}}]},installCommand:servicesCommandSchema,buildCommand:servicesCommandSchema,devCommand:servicesCommandSchema,ignoreCommand:servicesCommandSchema,outputDirectory:servicesPathSchema,bindings:servicesBindingsSchema,functions:(0,import_build_utils.getFunctionsSchema)(),headers:import_routing_utils.headersSchema,redirects:import_routing_utils.redirectsSchema,rewrites:import_routing_utils.rewritesSchema,routes:import_routing_utils.routesSchema,cleanUrls:import_routing_utils.cleanUrlsSchema,trailingSlash:import_routing_utils.trailingSlashSchema}}),daemonConfigSchema={type:"object",additionalProperties:!1,required:["root","entrypoint"],anyOf:[{required:["instances"]},{required:["replicas"]}],properties:{root:servicesPathSchema,entrypoint:servicesPathSchema,command:{type:"array",minItems:1,maxItems:128,items:{type:"string",minLength:1,maxLength:4096}},instances:{type:"object",additionalProperties:{type:"integer",minimum:0}},replicas:{description:"Deprecated. Use `instances`. Ignored when `instances` is set.",deprecated:!0,type:"object",additionalProperties:{type:"integer",minimum:0}},resources:{type:"object",additionalProperties:!1,required:["requests"],properties:{requests:{type:"object",additionalProperties:!1,required:["memory"],properties:{memory:{enum:["1Gi","2Gi","4Gi","8Gi"]}}}}},terminationGracePeriodSeconds:{type:"integer",minimum:0},livenessProbe:{type:"object",additionalProperties:!1,required:["httpGet"],properties:{httpGet:{type:"object",additionalProperties:!1,required:["port"],properties:{path:{type:"string",minLength:1},port:{type:"integer",minimum:1,maximum:65535},host:{type:"string",minLength:1},scheme:{enum:["HTTP","HTTPS"]},httpHeaders:{type:"array",items:{type:"object",additionalProperties:!1,required:["name","value"],properties:{name:{type:"string",minLength:1},value:{type:"string"}}}}}},initialDelaySeconds:{type:"integer",minimum:0,maximum:86400},periodSeconds:{type:"integer",minimum:1,maximum:86400},timeoutSeconds:{type:"integer",minimum:1,maximum:86400},successThreshold:{type:"integer",minimum:1,maximum:10},failureThreshold:{type:"integer",minimum:1,maximum:10}}},bindings:{...servicesBindingsSchema,items:{...servicesBindingSchema,required:["type",...servicesBindingSchema.required]}}}},getServicesSchema=()=>({type:"object",propertyNames:{pattern:import_build_utils.SERVICE_NAME_PATTERN,maxLength:64},additionalProperties:getServicesServiceConfigSchema()}),maxDaemons=100,daemonsSchema={type:"object",maxProperties:maxDaemons,propertyNames:{pattern:import_build_utils.DAEMON_NAME_PATTERN,maxLength:64},additionalProperties:daemonConfigSchema},proxySchema={type:"object",additionalProperties:!1,required:["entrypoint"],properties:{entrypoint:{type:"string",minLength:1},matcher:{oneOf:[{type:"string",minLength:1},{type:"array",minItems:1,items:{type:"string",minLength:1}}]}}};function buildVercelConfigSchema(){return{type:"object",additionalProperties:!0,properties:{builds:import_build_utils.buildsSchema,routes:import_routing_utils.routesSchema,cleanUrls:import_routing_utils.cleanUrlsSchema,headers:import_routing_utils.headersSchema,redirects:import_routing_utils.redirectsSchema,rewrites:import_routing_utils.rewritesSchema,trailingSlash:import_routing_utils.trailingSlashSchema,functions:(0,import_build_utils.getFunctionsSchema)(),images:imagesSchema,crons:cronsSchema,schedules:schedulesSchema,bunVersion:{type:"string"},proxy:proxySchema,experimentalServices:getExperimentalServicesSchema(),experimentalServiceGroups:experimentalServiceGroupsSchema,services:getServicesSchema(),experimentalServicesV2:getServicesSchema(),daemons:daemonsSchema}}}var isDockerfilePath=entrypoint=>/(docker|container)file/i.test((0,import_build_utils.splitDockerfileEntrypoint)(entrypoint).path.split(/[\\/]/).pop()??""),hasInvalidDockerfileStage=entrypoint=>{let{buildTarget}=(0,import_build_utils.splitDockerfileEntrypoint)(entrypoint);return buildTarget!==void 0&&!(0,import_build_utils.isValidDockerfileStage)(buildTarget)};function validateConfig(config){let validate=getConfigValidator(buildVercelConfigSchema);if(!validate(config)&&validate.errors&&validate.errors[0]){let error=validate.errors[0],fileName=config[import_types.fileNameSymbol]||"vercel.json",niceError=(0,import_build_utils.getPrettyError)(error);return niceError.message=`Invalid ${fileName} - ${niceError.message}`,niceError}let serviceNames=new Set([...Object.keys(config.services??{}),...Object.keys(config.daemons??{})]),invalidCommand=message=>new import_build_utils.NowBuildError({code:"INVALID_SCHEDULE_COMMAND",message:`Invalid ${config[import_types.fileNameSymbol]||"vercel.json"} - ${message}`});for(let[name,schedule]of Object.entries(config.schedules??{})){let path=`schedules.${name}`;if("command"in schedule){if(!isDockerfilePath(schedule.entrypoint))return invalidCommand(`\`${path}.command\` requires a Dockerfile or Containerfile \`entrypoint\`.`);if(hasInvalidDockerfileStage(schedule.entrypoint))return invalidCommand(`\`${path}.entrypoint\` "${schedule.entrypoint}" is invalid. ${import_build_utils.DOCKERFILE_STAGE_HINT}`);if(name.length>64||!new RegExp(import_build_utils.SERVICE_NAME_PATTERN).test(name))return invalidCommand(`\`${path}\` runs a command, so its name must be a valid service name: lowercase letters, \`-\` and \`_\`, at most 64 characters.`);if(serviceNames.has(name))return invalidCommand(`\`${path}\` runs a command as service "${name}", which is already the name of a service or daemon.`)}if(schedule.timezone!==void 0)try{if(!/^[A-Za-z][A-Za-z0-9_+/-]*$/.test(schedule.timezone))throw new RangeError("Expected a named timezone");new Intl.DateTimeFormat("en-US",{timeZone:schedule.timezone})}catch{return new import_build_utils.NowBuildError({code:"INVALID_SCHEDULE_TIMEZONE",message:`Invalid ${config[import_types.fileNameSymbol]||"vercel.json"} - \`schedules.${name}.timezone\` must be a valid IANA timezone, such as "America/New_York". Omit it to use UTC.`})}}let functionMaps=[config.functions,...Object.values(config.services??{}).map(service=>service.functions),...Object.values(config.experimentalServicesV2??{}).map(service=>service.functions)];for(let functions of functionMaps)for(let[pattern,fn]of Object.entries(functions??{})){let regions=[...new Set(fn.regions)];if(fn.affinity?.mode==="strict"&&(regions.includes("all")||regions.length>1))return new import_build_utils.NowBuildError({code:"INVALID_FUNCTION_AFFINITY_REGIONS",message:`Function affinity mode "strict" requires at most one statically configured region. Update \`functions[${JSON.stringify(pattern)}].regions\` to contain a single region.`,link:"https://vercel.com/docs/concepts/projects/project-configuration#functions"})}if(config.proxy){let proxyError=(0,import_fs_detectors.validateProxyConfig)(config.proxy);if(proxyError)return new import_build_utils.NowBuildError({code:proxyError.code.toUpperCase(),message:proxyError.message})}if(config.functions&&config.builds)return new import_build_utils.NowBuildError({code:"FUNCTIONS_AND_BUILDS",message:"The `functions` property cannot be used in conjunction with the `builds` property. Please remove one of them.",link:"https://vercel.link/functions-and-builds"});if(config.proxy&&config.builds)return new import_build_utils.NowBuildError({code:"PROXY_AND_BUILDS",message:"The `proxy` property cannot be used with the `builds` property. Remove `builds` to use an explicit proxy entrypoint."});let hasExperimentalServices=!!config.experimentalServices;if(hasExperimentalServices&&config.builds)return new import_build_utils.NowBuildError({code:"EXPERIMENTAL_SERVICES_AND_BUILDS",message:"The `experimentalServices` property cannot be used in conjunction with the `builds` property. Please remove one of them."});if(hasExperimentalServices&&config.functions)return new import_build_utils.NowBuildError({code:"EXPERIMENTAL_SERVICES_AND_FUNCTIONS",message:"The `experimentalServices` property cannot be used in conjunction with the `functions` property. Please remove one of them."});if(config.experimentalServiceGroups&&!config.experimentalServices)return new import_build_utils.NowBuildError({code:"SERVICE_GROUPS_WITHOUT_SERVICES",message:"The `experimentalServiceGroups` property requires `experimentalServices` to be defined. Service groups reference services by name."});let hasServices=config.services!=null,hasExperimentalServicesV2=config.experimentalServicesV2!=null;if(hasServices&&hasExperimentalServicesV2)return new import_build_utils.NowBuildError({code:"SERVICES_AND_EXPERIMENTAL_SERVICES_V2",message:"The `services` property cannot be used in conjunction with its deprecated alias `experimentalServicesV2`. Please use only `services`."});let servicesConfig=config.services??config.experimentalServicesV2,servicesConfigKey=hasServices?"services":"experimentalServicesV2",servicesErrorCodePrefix=hasServices?"SERVICES":"EXPERIMENTAL_SERVICES_V2";if(servicesConfig&&hasExperimentalServices)return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_AND_EXPERIMENTAL_SERVICES`,message:`The \`${servicesConfigKey}\` property cannot be used in conjunction with the \`experimentalServices\` property. Please use only one services configuration.`});if(servicesConfig&&config.builds)return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_AND_BUILDS`,message:`The \`${servicesConfigKey}\` property cannot be used in conjunction with the \`builds\` property. Please remove one of them.`});if(servicesConfig){let ambiguousTopLevel=[];if(config.functions!=null&&ambiguousTopLevel.push("functions"),config.installCommand!=null&&ambiguousTopLevel.push("installCommand"),config.buildCommand!=null&&ambiguousTopLevel.push("buildCommand"),config.devCommand!=null&&ambiguousTopLevel.push("devCommand"),config.ignoreCommand!=null&&ambiguousTopLevel.push("ignoreCommand"),config.outputDirectory!=null&&ambiguousTopLevel.push("outputDirectory"),config.framework!=null&&ambiguousTopLevel.push("framework"),ambiguousTopLevel.length>0){let count=ambiguousTopLevel.length,fields=ambiguousTopLevel.map(field=>`\`${field}\``).join(", ");return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_AND_TOP_LEVEL_BUILD_SETTINGS`,message:`The top-level ${count>1?"properties":"property"} ${fields} cannot be used with \`${servicesConfigKey}\` because the owning service is ambiguous. Move ${count>1?"them":"it"} under the relevant service in \`${servicesConfigKey}\`.`})}}if(config.daemons){let daemonError=validateDaemons(config,config.daemons);if(daemonError)return daemonError}if(servicesConfig){let serviceNames2=new Set(Object.keys(servicesConfig));for(let[serviceName,serviceConfig]of Object.entries(servicesConfig))for(let binding of serviceConfig.bindings??[])if(!serviceNames2.has(binding.service))return new import_build_utils.NowBuildError({code:`${servicesErrorCodePrefix}_BINDING_UNKNOWN_SERVICE`,message:`Service "${serviceName}" declares a binding to unknown service "${binding.service}". Add "${binding.service}" to \`${servicesConfigKey}\` or fix the binding.`})}return null}function validateDaemons(config,daemons){let invalid=message=>new import_build_utils.NowBuildError({code:"INVALID_DAEMON",message}),daemonNames=new Set(Object.keys(daemons));for(let[name,daemon]of Object.entries(daemons)){if(!isDockerfilePath(daemon.entrypoint))return invalid(`Daemon "${name}" must set \`entrypoint\` to a Dockerfile or Containerfile.`);if(hasInvalidDockerfileStage(daemon.entrypoint))return invalid(`Daemon "${name}" has invalid \`entrypoint\` "${daemon.entrypoint}". ${import_build_utils.DOCKERFILE_STAGE_HINT}`)}let services={...config.experimentalServicesV2,...config.services},isDaemonTarget=name=>daemonNames.has(name)&&!Object.prototype.hasOwnProperty.call(services,name);for(let[name,service]of Object.entries(services)){let binding=service.bindings?.find(binding2=>isDaemonTarget(binding2.service));if(binding)return invalid(`Service "${name}" cannot bind to daemon "${binding.service}" because daemons do not receive traffic.`)}for(let[name,daemon]of Object.entries(daemons)){let envs=new Set;for(let binding of daemon.bindings??[]){if(!Object.prototype.hasOwnProperty.call(services,binding.service))return invalid(`Daemon "${name}" declares a binding to unknown service "${binding.service}". Add "${binding.service}" to \`services\` or fix the binding.`);if(envs.has(binding.env))return invalid(`Daemon "${name}" declares more than one binding for the environment variable "${binding.env}".`);envs.add(binding.env)}}let destinations=[...config.rewrites??[],...config.routes??[],...Object.values(services).flatMap(service=>[...service.rewrites??[],...service.routes??[]])].map(entry=>"destination"in entry?entry.destination:void 0);for(let destination of destinations)if(typeof destination=="object"&&destination!==null&&isDaemonTarget(destination.service))return invalid(`Rewrites and routes cannot target daemon "${destination.service}" because daemons do not receive traffic.`);return null}export{buildVercelConfigSchema,validateConfig};
|
|
@@ -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
|
-
var DEPRECATED_SHORTHANDS=Symbol("deprecated shorthands"),SHORT_FLAG_LONG_NAMES={"-p":"--project","-n":"--limit"},commandFlagsSpecification;function setCommandFlagsSpecification(spec){commandFlagsSpecification=spec}function getShortFlagLongName(flag,spec=commandFlagsSpecification){if(!/^-[A-Za-z]+$/.test(flag))return;let letter=`-${flag.slice(-1)}`,name=SHORT_FLAG_LONG_NAMES[letter];if(!(name===void 0||spec!==void 0&&spec[letter]!==name))return name}function getShortFlags(option){return[option.shorthand,option.deprecatedShorthand].filter(letter=>!!letter).map(letter=>`-${letter}`)}function getFlagsSpecification(options){let flagsSpecification={},deprecatedShorthands=new Set;for(let option of options)flagsSpecification[`--${option.name}`]=option.type,option.shorthand&&(flagsSpecification[`-${option.shorthand}`]=`--${option.name}`),option.deprecatedShorthand&&(flagsSpecification[`-${option.deprecatedShorthand}`]=`--${option.name}`,deprecatedShorthands.add(`-${option.deprecatedShorthand}`));return flagsSpecification["--next"]&&!flagsSpecification["-N"]&&(flagsSpecification["-N"]="--next",deprecatedShorthands.add("-N")),deprecatedShorthands.size>0&&(flagsSpecification[DEPRECATED_SHORTHANDS]=[...deprecatedShorthands]),flagsSpecification}function quoteArg(value){return/^[A-Za-z0-9_./@:-]+$/.test(value)?value:`'${value.replace(/'/g,"'\\''")}'`}var SENSITIVE_AUTH_FLAG_NAMES=new Set(["--token","-t"]),SDK_KEY_PATTERN=/^vf_(?:server|client)_/,ENV_PAIR_FLAG_NAMES=new Set(["--env","-e","--build-env","-b"]),ATTACHED_TOKEN=/^-t[^-=]/,SHORT_FLAG_CLUSTER=/^-[A-Za-z]{2,}$/;function normalizeFlagName(flag){return flag.includes("=")?flag.slice(0,flag.indexOf("=")):flag}var ENV_PLACEHOLDER="<VALUE>";function withoutEnvValue(pair){let equals=pair.indexOf("=");return equals<0||equals===pair.length-1?pair:`${pair.slice(0,equals+1)}${ENV_PLACEHOLDER}`}function quoteEnvPlaceholder(arg){return arg.endsWith(`=${ENV_PLACEHOLDER}`)?quoteArg(arg):arg}function stripSensitiveAuthArgs(args){let out=[],passthrough=!1;for(let i=0;i<args.length;i++){let arg=args[i];if(arg==="--"&&(passthrough=!0),!passthrough&&(arg.startsWith("--sdk-key=")||SDK_KEY_PATTERN.test(arg)))continue;if(!passthrough&&ATTACHED_TOKEN.test(arg)){SHORT_FLAG_CLUSTER.test(arg)&&i+1<args.length&&i++;continue}if(!passthrough&&SHORT_FLAG_CLUSTER.test(arg)){let letters=arg.slice(1),token=letters.indexOf("t");if(token>0){out.push(`-${letters.slice(0,token)}`),token===letters.length-1&&i+1<args.length&&i++;continue}out.push(arg);let last=`-${letters[letters.length-1]}`;ENV_PAIR_FLAG_NAMES.has(last)&&i+1<args.length&&!args[i+1].startsWith("-")&&out.push(withoutEnvValue(args[++i]));continue}let name=normalizeFlagName(arg);if(SENSITIVE_AUTH_FLAG_NAMES.has(name)){!arg.includes("=")&&i+1<args.length&&i++;continue}if(!passthrough&&ENV_PAIR_FLAG_NAMES.has(name)){if(arg.includes("=")){out.push(`${name}=${withoutEnvValue(arg.slice(name.length+1))}`);continue}out.push(arg),i+1<args.length&&!args[i+1].startsWith("-")&&out.push(withoutEnvValue(args[++i]));continue}out.push(arg)}return out}var globalCommandOptions=[{name:"help",shorthand:"h",type:Boolean,description:"Output usage information",deprecated:!1},{name:"version",shorthand:"v",type:Boolean,description:"Output the version number",deprecated:!1},{name:"cwd",shorthand:null,type:String,argument:"DIR",description:"Run the command in another directory",deprecated:!1},{name:"local-config",shorthand:"A",type:String,argument:"FILE",description:"Path to the local `vercel.json` file",deprecated:!1},{name:"global-config",shorthand:"Q",type:String,argument:"DIR",description:"Path to the global `.vercel` directory",deprecated:!1},{name:"debug",shorthand:"d",type:Boolean,description:"Debug mode (default: off)",deprecated:!1},{name:"no-color",shorthand:null,type:Boolean,description:"No color mode (default: off)",deprecated:!1},{name:"non-interactive",shorthand:null,type:Boolean,description:"Run without interactive prompts (default: on when an agent is detected)",deprecated:!1},{name:"scope",shorthand:"S",type:String,argument:"TEAM",description:"Team to run the command in (slug or ID)",deprecated:!1},{name:"token",shorthand:"t",type:String,argument:"TOKEN",description:"Login token",deprecated:!1},{name:"team",shorthand:"T",type:String,deprecated:!1},{name:"api",shorthand:null,type:String,deprecated:!1}],GLOBAL_CLI_FLAG_NAMES=(()=>{let set=new Set;for(let opt of globalCommandOptions){set.add(`--${opt.name}`);for(let flag of getShortFlags(opt))set.add(flag)}return set})();function globalCliFlagTakesValue(flagName){let normalized=normalizeFlagName(flagName);for(let opt of globalCommandOptions)if(`--${opt.name}`===normalized||getShortFlags(opt).includes(normalized))return opt.type===String;return!1}var SUGGESTION_FLAGS_TAKING_VALUE=new Set(["--config","--deployment","--environment","--git-branch","--id","--value","--status","--name","--slug","--version","--search","--format","--project","--page","--per-page","--type","--visibility"]);function suggestionFlagTakesSeparateValue(flagName){let name=normalizeFlagName(flagName);return globalCliFlagTakesValue(name)?!0:SUGGESTION_FLAGS_TAKING_VALUE.has(getShortFlagLongName(name)??name)}function getSameSubcommandSuggestionFlags(args){let safeArgs=stripSensitiveAuthArgs(args),out=[];for(let i=0;i<safeArgs.length;i++){let a=safeArgs[i];if(!a.startsWith("-")||(out.push(a),a.includes("=")))continue;suggestionFlagTakesSeparateValue(a)&&i+1<safeArgs.length&&!safeArgs[i+1].startsWith("-")&&out.push(safeArgs[++i])}return out}var GLOBAL_OPTIONS=getFlagsSpecification(globalCommandOptions),arg_common_default=()=>GLOBAL_OPTIONS,yesOption={name:"yes",shorthand:"y",type:Boolean,deprecated:!1,description:"Accept default value for all prompts"},nextCursorOption={name:"next",shorthand:null,type:String,deprecated:!1,description:"Show the next page using the cursor from the previous output",argument:"CURSOR"},confirmOption={name:"confirm",shorthand:"c",type:Boolean,deprecated:!0},confirmNameOption={name:"confirm-name",shorthand:null,type:String,deprecated:!1,description:"Approve by naming what this acts on, without its team",argument:"NAME"},effectsDigestOption={name:"effects-digest",shorthand:null,type:String,deprecated:!1,description:"The effects digest from the preview. Agents must pass it; nothing changes if the effects changed since",argument:"DIGEST"},chargeAmountOption={name:"amount",shorthand:null,type:String,argument:"USD",deprecated:!1,description:"Price a person approved for this charge, in USD. Required without a terminal; nothing is charged if the price changed"},limitOption={name:"limit",shorthand:"n",type:Number,deprecated:!1,description:"Number of results to return per page (default: 20, max: 100)",argument:"NUMBER"},sinceOption={name:"since",shorthand:"s",type:String,argument:"TIME",deprecated:!1,description:"Start time: ISO 8601 or relative, like 1h or 7d"},untilOption={name:"until",shorthand:"u",type:String,argument:"TIME",deprecated:!1,description:"End time: ISO 8601 or relative (default: now)"},environmentOption={name:"environment",shorthand:"e",type:String,argument:"ENVIRONMENT",deprecated:!1,description:"Environment: production, preview, development, or a custom environment"},targetOption={name:"target",shorthand:null,type:String,argument:"ENVIRONMENT",deprecated:!0,description:"Deprecated alias for `--environment`"},gitBranchOption={name:"git-branch",shorthand:null,type:String,argument:"BRANCH",deprecated:!1,description:"Git branch"},userOption={name:"user",shorthand:null,type:String,argument:"USER",deprecated:!1,description:"User"},forceOption={name:"force",shorthand:null,type:Boolean,deprecated:!1},formatOption={name:"format",shorthand:"F",type:String,argument:"FORMAT",description:"Specify the output format (json)",deprecated:!0},jsonOption={name:"json",shorthand:null,type:Boolean,deprecated:!1,description:"Output as JSON"};var allOption={name:"all",shorthand:"a",type:Boolean,deprecated:!1,description:"List resources across all projects"},projectOption={name:"project",shorthand:"p",type:String,argument:"NAME_OR_ID",description:"Project name or ID (default: linked project)",deprecated:!1},deploymentOption={name:"deployment",shorthand:null,type:String,deprecated:!1,description:"The deployment ID or URL to target",argument:"DEPLOYMENT"},protectionBypassOption={name:"protection-bypass",shorthand:null,type:String,deprecated:!1,description:"Protection bypass secret for accessing protected deployments",argument:"SECRET"},GLOBAL_LONG_TO_OPT=new Map,GLOBAL_SHORT_TO_OPT=new Map;for(let opt of globalCommandOptions){GLOBAL_LONG_TO_OPT.set(`--${opt.name}`,opt);for(let flag of getShortFlags(opt))GLOBAL_SHORT_TO_OPT.set(flag,opt)}function getGlobalFlagsFromArgs(args,options){let delimiterIndex=args.indexOf("--"),cliArgs=delimiterIndex===-1?args:args.slice(0,delimiterIndex),safeArgs=stripSensitiveAuthArgs(cliArgs),out=[];for(let i=0;i<safeArgs.length;i++){let a=safeArgs[i];if(options?.preserveYes&&(a==="--yes"||a==="-y")){out.push(a);continue}if(options?.preserveConfig&&(a==="--config"||a.startsWith("--config="))){if(out.push(a),a==="--config"){let next=safeArgs[i+1];next&&!next.startsWith("-")&&(out.push(next),i++)}continue}let opt;if(a.startsWith("--")&&a.includes("=")){let name=a.slice(2).split("=")[0];opt=GLOBAL_LONG_TO_OPT.get(`--${name}`),opt&&out.push(a);continue}if(opt=GLOBAL_LONG_TO_OPT.get(a)||GLOBAL_SHORT_TO_OPT.get(a),!!opt&&(out.push(a),opt.type===String&&!a.includes("="))){let next=safeArgs[i+1];next&&!next.startsWith("-")&&(out.push(next),i++)}}if(options?.preserveProject){let projectOption2=findProjectOption(safeArgs);projectOption2&&out.push(...projectOption2.args)}return out}function findProjectOption(args){for(let i=0;i<args.length;i++){let arg=args[i];if(arg==="--")return;if(arg.startsWith("--project="))return{value:arg.slice(10),args:[arg]};if(arg==="--project"||getShortFlagLongName(arg)==="--project"){let value=args[i+1];return value&&!value.startsWith("-")?{value,args:["--project",value]}:void 0}}}function getProjectOptionFromArgs(args){return findProjectOption(args)?.value}export{DEPRECATED_SHORTHANDS,setCommandFlagsSpecification,getShortFlagLongName,getShortFlags,getFlagsSpecification,quoteArg,SDK_KEY_PATTERN,normalizeFlagName,quoteEnvPlaceholder,stripSensitiveAuthArgs,globalCommandOptions,GLOBAL_CLI_FLAG_NAMES,globalCliFlagTakesValue,suggestionFlagTakesSeparateValue,getSameSubcommandSuggestionFlags,arg_common_default,yesOption,nextCursorOption,confirmOption,confirmNameOption,effectsDigestOption,chargeAmountOption,limitOption,sinceOption,untilOption,environmentOption,targetOption,gitBranchOption,userOption,forceOption,formatOption,jsonOption,allOption,projectOption,deploymentOption,protectionBypassOption,getGlobalFlagsFromArgs,getProjectOptionFromArgs};
|
|
7
|
+
var DEPRECATED_SHORTHANDS=Symbol("deprecated shorthands"),SHORT_FLAG_LONG_NAMES={"-p":"--project","-n":"--limit"},commandFlagsSpecification;function setCommandFlagsSpecification(spec){commandFlagsSpecification=spec}function getShortFlagLongName(flag,spec=commandFlagsSpecification){if(!/^-[A-Za-z]+$/.test(flag))return;let letter=`-${flag.slice(-1)}`,name=SHORT_FLAG_LONG_NAMES[letter];if(!(name===void 0||spec!==void 0&&spec[letter]!==name))return name}function getShortFlags(option){return[option.shorthand,option.deprecatedShorthand].filter(letter=>!!letter).map(letter=>`-${letter}`)}function getFlagsSpecification(options){let flagsSpecification={},deprecatedShorthands=new Set;for(let option of options)flagsSpecification[`--${option.name}`]=option.type,option.shorthand&&(flagsSpecification[`-${option.shorthand}`]=`--${option.name}`),option.deprecatedShorthand&&(flagsSpecification[`-${option.deprecatedShorthand}`]=`--${option.name}`,deprecatedShorthands.add(`-${option.deprecatedShorthand}`));return flagsSpecification["--next"]&&!flagsSpecification["-N"]&&(flagsSpecification["-N"]="--next",deprecatedShorthands.add("-N")),deprecatedShorthands.size>0&&(flagsSpecification[DEPRECATED_SHORTHANDS]=[...deprecatedShorthands]),flagsSpecification}function quoteArg(value){return/^[A-Za-z0-9_./@:-]+$/.test(value)?value:`'${value.replace(/'/g,"'\\''")}'`}var SENSITIVE_AUTH_FLAG_NAMES=new Set(["--token","-t"]),SDK_KEY_PATTERN=/^vf_(?:server|client)_/,ENV_PAIR_FLAG_NAMES=new Set(["--env","-e","--build-env","-b"]),ATTACHED_TOKEN=/^-t[^-=]/,SHORT_FLAG_CLUSTER=/^-[A-Za-z]{2,}$/;function normalizeFlagName(flag){return flag.includes("=")?flag.slice(0,flag.indexOf("=")):flag}var ENV_PLACEHOLDER="<VALUE>";function withoutEnvValue(pair){let equals=pair.indexOf("=");return equals<0||equals===pair.length-1?pair:`${pair.slice(0,equals+1)}${ENV_PLACEHOLDER}`}function quoteEnvPlaceholder(arg){return arg.endsWith(`=${ENV_PLACEHOLDER}`)?quoteArg(arg):arg}function stripSensitiveAuthArgs(args){let out=[],passthrough=!1;for(let i=0;i<args.length;i++){let arg=args[i];if(arg==="--"&&(passthrough=!0),!passthrough&&(arg.startsWith("--sdk-key=")||SDK_KEY_PATTERN.test(arg)))continue;if(!passthrough&&ATTACHED_TOKEN.test(arg)){SHORT_FLAG_CLUSTER.test(arg)&&i+1<args.length&&i++;continue}if(!passthrough&&SHORT_FLAG_CLUSTER.test(arg)){let letters=arg.slice(1),token=letters.indexOf("t");if(token>0){out.push(`-${letters.slice(0,token)}`),token===letters.length-1&&i+1<args.length&&i++;continue}out.push(arg);let last=`-${letters[letters.length-1]}`;ENV_PAIR_FLAG_NAMES.has(last)&&i+1<args.length&&!args[i+1].startsWith("-")&&out.push(withoutEnvValue(args[++i]));continue}let name=normalizeFlagName(arg);if(SENSITIVE_AUTH_FLAG_NAMES.has(name)){!arg.includes("=")&&i+1<args.length&&i++;continue}if(!passthrough&&ENV_PAIR_FLAG_NAMES.has(name)){if(arg.includes("=")){out.push(`${name}=${withoutEnvValue(arg.slice(name.length+1))}`);continue}out.push(arg),i+1<args.length&&!args[i+1].startsWith("-")&&out.push(withoutEnvValue(args[++i]));continue}out.push(arg)}return out}var globalCommandOptions=[{name:"help",shorthand:"h",type:Boolean,description:"Output usage information",deprecated:!1},{name:"version",shorthand:"v",type:Boolean,description:"Output the version number",deprecated:!1},{name:"cwd",shorthand:null,type:String,argument:"DIR",description:"Run the command in another directory",deprecated:!1},{name:"local-config",shorthand:"A",type:String,argument:"FILE",description:"Path to the local `vercel.json` file",deprecated:!1},{name:"global-config",shorthand:"Q",type:String,argument:"DIR",description:"Path to the global `.vercel` directory",deprecated:!1},{name:"debug",shorthand:"d",type:Boolean,description:"Debug mode (default: off)",deprecated:!1},{name:"no-color",shorthand:null,type:Boolean,description:"No color mode (default: off)",deprecated:!1},{name:"non-interactive",shorthand:null,type:Boolean,description:"Run without interactive prompts (default: on when an agent is detected)",deprecated:!1},{name:"scope",shorthand:"S",type:String,argument:"TEAM",description:"Team to run the command in (slug or ID)",deprecated:!1},{name:"token",shorthand:"t",type:String,argument:"TOKEN",description:"Login token",deprecated:!1},{name:"team",shorthand:"T",type:String,deprecated:!1},{name:"api",shorthand:null,type:String,deprecated:!1}],GLOBAL_CLI_FLAG_NAMES=(()=>{let set=new Set;for(let opt of globalCommandOptions){set.add(`--${opt.name}`);for(let flag of getShortFlags(opt))set.add(flag)}return set})();function globalCliFlagTakesValue(flagName){let normalized=normalizeFlagName(flagName);for(let opt of globalCommandOptions)if(`--${opt.name}`===normalized||getShortFlags(opt).includes(normalized))return opt.type===String;return!1}var SUGGESTION_FLAGS_TAKING_VALUE=new Set(["--config","--deployment","--environment","--git-branch","--id","--value","--status","--name","--slug","--version","--search","--format","--project","--page","--per-page","--type","--visibility"]);function suggestionFlagTakesSeparateValue(flagName){let name=normalizeFlagName(flagName);return globalCliFlagTakesValue(name)?!0:SUGGESTION_FLAGS_TAKING_VALUE.has(getShortFlagLongName(name)??name)}function getSameSubcommandSuggestionFlags(args){let safeArgs=stripSensitiveAuthArgs(args),out=[];for(let i=0;i<safeArgs.length;i++){let a=safeArgs[i];if(!a.startsWith("-")||(out.push(a),a.includes("=")))continue;suggestionFlagTakesSeparateValue(a)&&i+1<safeArgs.length&&!safeArgs[i+1].startsWith("-")&&out.push(safeArgs[++i])}return out}var GLOBAL_OPTIONS=getFlagsSpecification(globalCommandOptions),arg_common_default=()=>GLOBAL_OPTIONS,yesOption={name:"yes",shorthand:"y",type:Boolean,deprecated:!1,description:"Accept default value for all prompts"},nextCursorOption={name:"next",shorthand:null,type:String,deprecated:!1,description:"Show the next page using the cursor from the previous output",argument:"CURSOR"},confirmOption={name:"confirm",shorthand:"c",type:Boolean,deprecated:!0},confirmNameOption={name:"confirm-name",shorthand:null,type:String,deprecated:!1,description:"Approve by naming what this acts on, without its team",argument:"NAME"},effectsDigestOption={name:"effects-digest",shorthand:null,type:String,deprecated:!1,description:"The effects digest from the preview. Agents must pass it; nothing changes if the effects changed since",argument:"DIGEST"},chargeAmountOption={name:"amount",shorthand:null,type:String,argument:"USD",deprecated:!1,description:"Exact price a person approved for this charge, in USD. Not a maximum: any other amount charges nothing. Required without a terminal"},limitOption={name:"limit",shorthand:"n",type:Number,deprecated:!1,description:"Number of results to return per page (default: 20, max: 100)",argument:"NUMBER"},sinceOption={name:"since",shorthand:"s",type:String,argument:"TIME",deprecated:!1,description:"Start time: ISO 8601 or relative, like 1h or 7d"},untilOption={name:"until",shorthand:"u",type:String,argument:"TIME",deprecated:!1,description:"End time: ISO 8601 or relative (default: now)"},environmentOption={name:"environment",shorthand:"e",type:String,argument:"ENVIRONMENT",deprecated:!1,description:"Environment: production, preview, development, or a custom environment"},targetOption={name:"target",shorthand:null,type:String,argument:"ENVIRONMENT",deprecated:!0,description:"Deprecated alias for `--environment`"},gitBranchOption={name:"git-branch",shorthand:null,type:String,argument:"BRANCH",deprecated:!1,description:"Git branch"},userOption={name:"user",shorthand:null,type:String,argument:"USER",deprecated:!1,description:"User"},forceOption={name:"force",shorthand:null,type:Boolean,deprecated:!1},formatOption={name:"format",shorthand:"F",type:String,argument:"FORMAT",description:"Specify the output format (json)",deprecated:!0},jsonOption={name:"json",shorthand:null,type:Boolean,deprecated:!1,description:"Output as JSON"};var allOption={name:"all",shorthand:"a",type:Boolean,deprecated:!1,description:"List resources across all projects"},projectOption={name:"project",shorthand:"p",type:String,argument:"NAME_OR_ID",description:"Project name or ID (default: linked project)",deprecated:!1},deploymentOption={name:"deployment",shorthand:null,type:String,deprecated:!1,description:"The deployment ID or URL to target",argument:"DEPLOYMENT"},protectionBypassOption={name:"protection-bypass",shorthand:null,type:String,deprecated:!1,description:"Protection bypass secret for accessing protected deployments",argument:"SECRET"},GLOBAL_LONG_TO_OPT=new Map,GLOBAL_SHORT_TO_OPT=new Map;for(let opt of globalCommandOptions){GLOBAL_LONG_TO_OPT.set(`--${opt.name}`,opt);for(let flag of getShortFlags(opt))GLOBAL_SHORT_TO_OPT.set(flag,opt)}function getGlobalFlagsFromArgs(args,options){let delimiterIndex=args.indexOf("--"),cliArgs=delimiterIndex===-1?args:args.slice(0,delimiterIndex),safeArgs=stripSensitiveAuthArgs(cliArgs),out=[];for(let i=0;i<safeArgs.length;i++){let a=safeArgs[i];if(options?.preserveYes&&(a==="--yes"||a==="-y")){out.push(a);continue}if(options?.preserveConfig&&(a==="--config"||a.startsWith("--config="))){if(out.push(a),a==="--config"){let next=safeArgs[i+1];next&&!next.startsWith("-")&&(out.push(next),i++)}continue}let opt;if(a.startsWith("--")&&a.includes("=")){let name=a.slice(2).split("=")[0];opt=GLOBAL_LONG_TO_OPT.get(`--${name}`),opt&&out.push(a);continue}if(opt=GLOBAL_LONG_TO_OPT.get(a)||GLOBAL_SHORT_TO_OPT.get(a),!!opt&&(out.push(a),opt.type===String&&!a.includes("="))){let next=safeArgs[i+1];next&&!next.startsWith("-")&&(out.push(next),i++)}}if(options?.preserveProject){let projectOption2=findProjectOption(safeArgs);projectOption2&&out.push(...projectOption2.args)}return out}function findProjectOption(args){for(let i=0;i<args.length;i++){let arg=args[i];if(arg==="--")return;if(arg.startsWith("--project="))return{value:arg.slice(10),args:[arg]};if(arg==="--project"||getShortFlagLongName(arg)==="--project"){let value=args[i+1];return value&&!value.startsWith("-")?{value,args:["--project",value]}:void 0}}}function getProjectOptionFromArgs(args){return findProjectOption(args)?.value}export{DEPRECATED_SHORTHANDS,setCommandFlagsSpecification,getShortFlagLongName,getShortFlags,getFlagsSpecification,quoteArg,SDK_KEY_PATTERN,normalizeFlagName,quoteEnvPlaceholder,stripSensitiveAuthArgs,globalCommandOptions,GLOBAL_CLI_FLAG_NAMES,globalCliFlagTakesValue,suggestionFlagTakesSeparateValue,getSameSubcommandSuggestionFlags,arg_common_default,yesOption,nextCursorOption,confirmOption,confirmNameOption,effectsDigestOption,chargeAmountOption,limitOption,sinceOption,untilOption,environmentOption,targetOption,gitBranchOption,userOption,forceOption,formatOption,jsonOption,allOption,projectOption,deploymentOption,protectionBypassOption,getGlobalFlagsFromArgs,getProjectOptionFromArgs};
|
|
@@ -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,formatUsdWhole,percentUsed}from"./chunk-RAQ6EUNL.js";import{table}from"./chunk-
|
|
7
|
+
import{formatUsd,formatUsdWhole,percentUsed}from"./chunk-RAQ6EUNL.js";import{table}from"./chunk-CJZE7647.js";import{output_manager_default}from"./chunk-YNCWSPPJ.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);function webhookLabel(state){return state.webhookStatus==="unavailable"?"configured (unavailable)":state.webhookUrl??"\u2014"}function printBudgetsTable(states,spentFor){let spendHeaders=spentFor?["spent","used"]:[],spendAlign=spentFor?["r","r"]:[];return`${table([["scope","amount",...spendHeaders,"status","pause","webhook"].map(header=>import_chalk.default.gray(header)),...states.map(state=>{let spendCells=[];if(spentFor){let spent=spentFor(state),used=percentUsed(spent,state.amount);spendCells.push(spent===null?"\u2014":formatUsd(spent),used===null?"\u2014":`${used}%`)}return[state.scopeId?`${state.scope} ${state.scopeId}`:state.scope,formatUsdWhole(state.amount),...spendCells,state.status,state.pause?"yes":"no",webhookLabel(state)]})],{align:["l","r",...spendAlign,"l","l","l"],hsep:4}).replace(/^/gm," ")}
|
|
8
8
|
|
|
9
9
|
`}function warnUnavailableWebhooks(states){states.some(state=>state.webhookStatus==="unavailable")&&output_manager_default.warn("A webhook is configured, but its URL could not be loaded. That is not the same as having no webhook.")}function formatAlertTime(ms){return Number.isFinite(ms)?`${new Date(ms).toISOString().slice(0,16).replace("T"," ")} UTC`:"\u2014"}function formatUsdString(value,{whole}){let dollars=Number(value);return Number.isFinite(dollars)?whole&&Number.isInteger(dollars)?formatUsdWhole(dollars):formatUsd(dollars):value}function alertThresholdLabel(alert){return`${alert.threshold.percent}%`}function alertActionsLabel(alert){let{sendNotifications,triggerWebhook,pauseUsage}=alert.threshold,actions=[sendNotifications&&"notify",triggerWebhook&&"webhook",pauseUsage&&"pause"].filter(Boolean);return actions.length>0?actions.join(", "):"\u2014"}function printBudgetAlertsTable(alerts){return`${table([["date","budget","threshold","spent","budget amount","actions configured"].map(header=>import_chalk.default.gray(header)),...alerts.map(alert=>[formatAlertTime(alert.triggeredAt),alert.scope,alertThresholdLabel(alert),formatUsdString(alert.spent,{whole:!1}),formatUsdString(alert.budgetAmount,{whole:!0}),alertActionsLabel(alert)])],{align:["l","l","r","r","r","l"],hsep:4}).replace(/^/gm," ")}
|
|
10
10
|
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{packageName}from"./chunk-
|
|
7
|
+
import{packageName}from"./chunk-B4KA3ZH2.js";var loginCommand={name:"login",aliases:[],description:"Sign in to your Vercel account.",arguments:[],options:[{name:"github",description:"Log in with GitHub",shorthand:null,type:Boolean,deprecated:!0},{name:"oob",description:'Log in with "out of band" authentication',shorthand:null,type:Boolean,deprecated:!0},{name:"gitlab",shorthand:null,type:Boolean,deprecated:!0},{name:"bitbucket",shorthand:null,type:Boolean,deprecated:!0},{name:"future",description:"Sign in using OAuth Device Authorization",shorthand:null,type:Boolean,deprecated:!0}],examples:[{name:"Sign in to your Vercel account.",value:`${packageName} login`}],disabledGlobalOptions:["token"]};export{loginCommand};
|
|
@@ -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{require_dist as require_dist2}from"./chunk-
|
|
7
|
+
import{require_dist as require_dist2}from"./chunk-5KL6UFII.js";import{validateConfig}from"./chunk-EM3U6PRB.js";import{compileVercelConfig,findSourceVercelConfigFile}from"./chunk-33OMDQTW.js";import{applyEdits,findNodeAtLocation,init_main,modify,parse,parseTree}from"./chunk-J24BABG4.js";import{init_dist,stringify}from"./chunk-U4Z2MMOF.js";import{require_dist2 as require_dist}from"./chunk-66TKNVRG.js";import{printAlignedLabel}from"./chunk-K46QQRUN.js";import{code}from"./chunk-GOI2VVI7.js";import{link_default,output_manager_default}from"./chunk-YNCWSPPJ.js";import{require_build_utils}from"./chunk-5MDNVAE6.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);init_main();init_dist();var import_build_utils=__toESM(require_build_utils(),1),import_fs_detectors=__toESM(require_dist(),1),import_service_topology=__toESM(require_dist2(),1);import{readFile,writeFile}from"fs/promises";import{basename}from"path";var EXPERIMENTAL_SERVICES_DOCS_URL="https://vercel.com/docs/services/experimental";async function prepareExperimentalServicesMigration(cwd,detectServicesResult){let compileResult=await compileVercelConfig(cwd);if(!compileResult.configPath)return null;let rawConfig=await readFile(compileResult.configPath,"utf8"),config=parse(rawConfig);if(!config||!(0,import_service_topology.hasLegacyServicesConfig)(config))return null;let resolvedServices=detectServicesResult?.resolved?.source==="configured"?detectServicesResult.services.filter(s=>(0,import_build_utils.isExperimentalService)(s)):void 0,plan=await(0,import_service_topology.migrateExperimentalServices)({fs:new import_fs_detectors.LocalFileSystemDetector(cwd),config,resolvedServices:resolvedServices&&resolvedServices.length>0?resolvedServices:void 0}),sourceFile=compileResult.sourceFile??basename(compileResult.configPath),preparation={plan,sourceFile,snippet:renderSnippet(sourceFile,plan)};if(plan.errors.length>0)return preparation;if(compileResult.wasCompiled)return preparation.writeBlocker=`${sourceFile} can't be updated automatically.`,preparation;let content=applyPlanToJson(rawConfig,config,plan),parseErrors=[],nextConfig=parse(content,parseErrors);if(parseErrors.length>0)return preparation.writeBlocker=`Couldn't produce a valid ${sourceFile}.`,preparation;let validationError=validateConfig(nextConfig);return validationError?(preparation.writeBlocker=validationError.message,preparation):(preparation.write={configPath:compileResult.configPath,content},preparation)}function applyPlanToJson(rawConfig,config,plan){let eol=rawConfig.includes(`\r
|
|
8
8
|
`)?`\r
|
|
9
9
|
`:`
|
|
10
10
|
`,indent2=/^([ \t]+)\S/m.exec(rawConfig)?.[1]??" ",formattingOptions={eol,insertSpaces:!indent2.startsWith(" "),tabSize:indent2.startsWith(" ")?1:indent2.length},legacyKey=config.experimentalServices?"experimentalServices":"experimentalServicesV2",key=findNodeAtLocation(parseTree(rawConfig),[legacyKey]).parent.children[0],text=applyEdits(rawConfig,[{offset:key.offset,length:key.length,content:'"services"'}]);text=applyEdits(text,modify(text,["services"],plan.patch.services,{formattingOptions}));for(let key2 of plan.removeKeys)key2!==legacyKey&&(text=applyEdits(text,modify(text,[key2],void 0,{formattingOptions})));for(let[key2,value]of Object.entries(plan.patch.build?.env??{}))text=applyEdits(text,modify(text,["build","env",key2],value,{formattingOptions}));if(plan.patch.rewrites.length>0)if(Array.isArray(config.rewrites))for(let rewrite of plan.patch.rewrites)text=applyEdits(text,modify(text,["rewrites",-1],rewrite,{formattingOptions}));else text=applyEdits(text,modify(text,["rewrites"],plan.patch.rewrites,{formattingOptions,getInsertionIndex:keys=>keys.indexOf("services")+1}));return text.endsWith(`
|
|
@@ -29,4 +29,4 @@ import{require_dist as require_dist2}from"./chunk-XRIM4BUF.js";import{validateCo
|
|
|
29
29
|
`),output_manager_default.print(`
|
|
30
30
|
`),!0):(!interactive&&!autoConfirm&&output_manager_default.print(` Run this command in a terminal to apply it, pass ${code("--yes")} to accept the migration, or update ${preparation.sourceFile} manually.
|
|
31
31
|
|
|
32
|
-
`),!1)}export{promptExperimentalServicesMigration};
|
|
32
|
+
`),!1)}export{prepareExperimentalServicesMigration,applyPlanToJson,displayExperimentalServicesMigration,promptExperimentalServicesMigration};
|
|
@@ -4,6 +4,6 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{RULE_ENVIRONMENTS}from"./chunk-
|
|
7
|
+
import{RULE_ENVIRONMENTS}from"./chunk-OKKG2FUS.js";import{AGENT_STATUS}from"./chunk-GORL5DZC.js";import{warnDeprecatedInput}from"./chunk-JONZUKWX.js";function writeConfigJson(client,{project,bare,envelope,message,next}){if(!client.nonInteractive){client.stdout.write(`${JSON.stringify(bare,null,2)}
|
|
8
8
|
`);return}client.stdout.write(`${JSON.stringify({status:AGENT_STATUS.OK,projectId:project.id,projectName:project.name,...envelope,message,next},null,2)}
|
|
9
9
|
`)}var RULE_LIMIT=10,MIN_SAMPLE_RATE=1,MAX_SAMPLE_RATE=100;function isRuleEnvironment(value){return RULE_ENVIRONMENTS.includes(value)}var ENVIRONMENT_ERROR=`\`environment\` must be one of: ${RULE_ENVIRONMENTS.join(", ")}.`,RATE_ERROR=`\`rate\` must be a whole number from ${MIN_SAMPLE_RATE} to ${MAX_SAMPLE_RATE}.`,EMPTY_PATH_ERROR="`requestPath` cannot be empty.";function parseSampleRate(value){if(!/^\d+$/.test(value.trim()))return;let rate=Number(value);return rate>=MIN_SAMPLE_RATE&&rate<=MAX_SAMPLE_RATE?rate:void 0}function toRow(rule){return{environment:rule.env??"any",requestPath:rule.requestPath??null,sampleRate:Math.round(rule.rate*100)}}function toApiRate(sampleRate){return sampleRate/100}function toRule(row){return{type:"head_sampling",rate:toApiRate(row.sampleRate),...row.environment==="any"?{}:{env:row.environment},...row.requestPath===null?{}:{requestPath:row.requestPath}}}var ALL_PATHS_LABEL="(all paths)";function formatPath(requestPath){return requestPath??ALL_PATHS_LABEL}function formatRate(sampleRate){return`${sampleRate}%`}function formatRuleTarget(environment,requestPath){return`${environment} ${formatPath(requestPath)}`}function formatRuleLine(row){return`${formatRuleTarget(row.environment,row.requestPath)} ${formatRate(row.sampleRate)}`}var COMMAND_WORD_COUNT=3;function subcommandArguments(positional){return positional.slice(COMMAND_WORD_COUNT)}function resolveRuleEnvironment(client,environmentFlag,args){if(environmentFlag===void 0){let[environment,...rest]=args;return environment!==void 0&&isRuleEnvironment(environment)?(warnDeprecatedInput(client,"The environment argument","--environment"),{environment,args:rest}):{environment:void 0,args}}return args[0]!==void 0&&isRuleEnvironment(args[0])?{error:"Can't use an environment argument with --environment. Use --environment."}:{environment:environmentFlag,args}}function hasSameKey(a,b){return a.environment===b.environment&&a.requestPath===b.requestPath}async function readTracingConfig({client,teamId,projectId,projectName}){let config=await client.fetch(`/v1/drains/tracing/config?${new URLSearchParams({projectId})}`,{accountId:teamId}),sampling=config.enabled&&config.sampling.length===0?[{type:"head_sampling",rate:1}]:config.sampling;return{project:{id:projectId,name:projectName},enabled:config.enabled,entries:sampling.map(rule=>({rule,row:toRow(rule)}))}}async function writeSamplingRules({client,teamId,projectId,rules}){await client.fetch(`/v1/drains/tracing/config?${new URLSearchParams({projectId})}`,{accountId:teamId,method:"PUT",body:{enabled:rules.length>0,...rules.length>0?{sampling:rules}:{}}})}export{writeConfigJson,RULE_LIMIT,isRuleEnvironment,ENVIRONMENT_ERROR,RATE_ERROR,EMPTY_PATH_ERROR,parseSampleRate,toApiRate,toRule,formatPath,formatRate,formatRuleTarget,formatRuleLine,subcommandArguments,resolveRuleEnvironment,hasSameKey,readTracingConfig,writeSamplingRules};
|
|
@@ -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{resolveProjectContext}from"./chunk-B3IBBNIR.js";import{AGENT_REASON,AGENT_STATUS,outputAgentError}from"./chunk-GORL5DZC.js";import{parseArguments}from"./chunk-VM6X5BTK.js";import{getCommandName,getCommandNamePlain}from"./chunk-B4KA3ZH2.js";import{output_manager_default}from"./chunk-YNCWSPPJ.js";import{getFlagsSpecification,getGlobalFlagsFromArgs}from"./chunk-EZVNGJN5.js";async function requireProjectContext(client,command,projectName){let link=await resolveProjectContext({client,projectNameOrId:projectName});if(link.status==="error")return link.exitCode;if(link.status==="not_linked"){if(client.nonInteractive)if(command==="redirects"){let linkCmd=getCommandNamePlain("link");outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.NOT_LINKED,message:`Your codebase isn't linked to a project on Vercel. Run ${linkCmd} to begin.`,next:[{command:linkCmd}]},1)}else{let flags=getGlobalFlagsFromArgs(client.argv.slice(2)),cmd=getCommandNamePlain(`link ${flags.join(" ")}`.trim());return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.NOT_LINKED,userActionRequired:!0,message:`Your codebase is not linked to a Vercel project. Run link first, then retry ${command} commands.`,next:[{command:cmd,when:"to link this directory to a project"}]},1),1}return output_manager_default.error(`Your codebase isn't linked to a project on Vercel. Run ${getCommandName("link")} to begin.`),1}return client.config.currentTeam=link.org.type==="team"?link.org.id:void 0,link}function parseSubcommandArguments(argv,command){let flagsSpecification=getFlagsSpecification(command.options);return parseArguments(argv,flagsSpecification)}function validateRequiredArguments(args,required){for(let i=0;i<required.length;i++)if(!args[i])return`Missing required argument: ${required[i]}`;return null}export{requireProjectContext,parseSubcommandArguments,validateRequiredArguments};
|
|
@@ -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-RAQ6EUNL.js";import{DEFAULT_ORDER_WAIT,DEFAULT_ORDER_WAIT_MS}from"./chunk-
|
|
7
|
+
import{formatUsd}from"./chunk-RAQ6EUNL.js";import{DEFAULT_ORDER_WAIT,DEFAULT_ORDER_WAIT_MS}from"./chunk-EDO66J3L.js";import{canPrompt}from"./chunk-IQ7FPAI4.js";import{scopeFlagPassed}from"./chunk-XSQZ35V6.js";import{AGENT_ACTION,AGENT_REASON,AGENT_STATUS,buildCommandWithGlobalFlags,getExitCodeForReason,outputActionRequired,outputAgentError}from"./chunk-GORL5DZC.js";import{require_ms}from"./chunk-MXTC4ZAQ.js";import{output_manager_default}from"./chunk-YNCWSPPJ.js";import{require_build_utils}from"./chunk-5MDNVAE6.js";import{__toESM}from"./chunk-BZENIQ7N.js";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,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{getScope}from"./chunk-
|
|
7
|
+
import{getScope}from"./chunk-XSQZ35V6.js";import{DeploymentNotFound,DeploymentPermissionDenied,InvalidDeploymentId,isAPIError}from"./chunk-GOI2VVI7.js";async function getAliases(client,deploymentId,next,limit=20){let aliasUrl=`/v3/now/aliases?limit=${limit}`;next&&(aliasUrl+=`&until=${next}`);let to=deploymentId?`/now/deployments/${deploymentId}/aliases`:aliasUrl;try{return await client.fetch(to)}catch(err){if(isAPIError(err)){let contextName=await getScope(client).then(scope=>scope.contextName);if(err.status===404)throw new DeploymentNotFound({id:deploymentId,context:contextName});if(err.status===403&&deploymentId)throw new DeploymentPermissionDenied(deploymentId,contextName);if(err.status===400&&err.message.includes("`id`")&&deploymentId)throw new InvalidDeploymentId(deploymentId)}throw err}}export{getAliases};
|
|
@@ -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{toGranularityMsFromDuration}from"./chunk-
|
|
7
|
+
import{toGranularityMsFromDuration}from"./chunk-YLCIOXSX.js";var VALUE_ALIAS="value",COUNT_ALIAS="__seriesCount";function alignTimeRangeToGranularity(startTime,endTime,granularity){let bucketMs=toGranularityMsFromDuration(granularity);return{startTime:new Date(Math.floor(startTime.getTime()/bucketMs)*bucketMs),endTime:new Date(Math.ceil(endTime.getTime()/bucketMs)*bucketMs)}}function createCanonicalMetricsRequest(options){let metrics={[VALUE_ALIAS]:options.selection},rankMetric=VALUE_ALIAS;return options.groupBy.length>0&&options.orderBy==="count"&&options.selection.aggregation!=="count"&&(metrics[COUNT_ALIAS]={metric:options.metric,aggregation:"count"},rankMetric=COUNT_ALIAS),{scope:{ownerId:options.scope.ownerId,...options.scope.type==="project"?{projectIds:options.scope.projectIds}:{}},timeRange:{start:options.startTime.toISOString(),end:options.endTime.toISOString()},bucketSeconds:toGranularityMsFromDuration(options.granularity)/1e3,...options.groupBy.length>0?{groupBy:options.groupBy}:{},...options.filter?{filter:options.filter}:{},metrics,outputs:[VALUE_ALIAS],...options.groupBy.length>0?{seriesSelection:{limit:options.limit,mode:"exact",rankBy:[{metric:rankMetric,direction:options.orderDirection??"desc"}]}}:{}}}function canonicalResponseToMetricsResponse(response,rollupColumn,orderBy,orderDirection){let toRow=point=>({...point.dimensions,[rollupColumn]:point.values[VALUE_ALIAS]??null});return{...response.series?{data:response.series.map(point=>({timestamp:point.timestamp,...toRow(point)}))}:{},summary:response.summary.map(toRow),statistics:{rowsRead:response.meta.statistics.rowsRead,bytesRead:response.meta.statistics.bytesRead,dbTimeSeconds:response.meta.statistics.databaseElapsedMs/1e3,engineTimeSeconds:response.meta.statistics.elapsedMs/1e3,queryTable:[...new Set(response.meta.sources.map(source=>source.id))].sort().join(",")},...orderBy?{orderBy}:{},...orderDirection?{orderDirection}:{}}}var FILTER_DEPRECATION_WARNING="OData support in --query is deprecated and will be removed soon. KQL will be the only supported filter syntax.";function usesODataSyntax(filters){return filters?.some(filter=>{let unquoted=filter.replace(/"(?:\\.|[^"\\])*"|'(?:''|[^'])*'/g,"");return/\s(?:eq|ne|gt|ge|lt|le|in)\s/i.test(unquoted)||/\b(?:contains|startswith|endswith)\s*\(/i.test(unquoted)})??!1}export{alignTimeRangeToGranularity,createCanonicalMetricsRequest,canonicalResponseToMetricsResponse,FILTER_DEPRECATION_WARNING,usesODataSyntax};
|
|
@@ -4,6 +4,6 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{
|
|
7
|
+
import{humanizeIdentifier}from"./chunk-GHAY4PSD.js";import{indent_default}from"./chunk-GZNDA6SV.js";import{table}from"./chunk-CJZE7647.js";function renderAlertTable(rows,hsep=3){return indent_default(table(rows,{hsep}).split(`
|
|
8
8
|
`).map(line=>line.trimEnd()).join(`
|
|
9
9
|
`),2)}function normalizeTimestamp(value){if(!(value===void 0||!Number.isFinite(value)))return Math.abs(value)<1e12?value*1e3:value}function getPrimaryAlert(group){return group.alerts?.[0]}function getGroupTitle(group){return group.ai?.title||group.title||getPrimaryAlert(group)?.title||"Alert group"}function getGroupType(group){return group.type||getPrimaryAlert(group)?.type||"-"}function getGroupStartedAt(group){let primaryAlert=getPrimaryAlert(group);return normalizeTimestamp(group.recordedStartedAt??primaryAlert?.recordedStartedAt??primaryAlert?.startedAt)}function formatTriggerOperator(value){switch(value){case"gt":return">";case"gte":return">=";case"lt":return"<";case"lte":return"<=";default:return}}function humanizeReference(value,opts={}){return value.split("/").map(part=>{let label=humanizeIdentifier(part);return opts.case==="title"?label:label.toLowerCase()}).join(" / ")}export{renderAlertTable,normalizeTimestamp,getGroupTitle,getGroupType,getGroupStartedAt,formatTriggerOperator,humanizeReference};
|
|
@@ -4,9 +4,9 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{getCommandName}from"./chunk-VRH7LWOC.js";import{require_build_utils}from"./chunk-5MDNVAE6.js";import{require_dist}from"./chunk-RM3ZDRYE.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__commonJS,__toESM}from"./chunk-BZENIQ7N.js";var require_bytes=__commonJS({"../../node_modules/.pnpm/bytes@3.0.0/node_modules/bytes/index.js"(exports,module){"use strict";module.exports=bytes2;module.exports.format=format;module.exports.parse=parse;var formatThousandsRegExp=/\B(?=(\d{3})+(?!\d))/g,formatDecimalsRegExp=/(?:\.0*|(\.[^0]+)0+)$/,map={b:1,kb:1024,mb:1<<20,gb:1<<30,tb:(1<<30)*1024},parseRegExp=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb)$/i;function bytes2(value,options){return typeof value=="string"?parse(value):typeof value=="number"?format(value,options):null}function format(value,options){if(!Number.isFinite(value))return null;var mag=Math.abs(value),thousandsSeparator=options&&options.thousandsSeparator||"",unitSeparator=options&&options.unitSeparator||"",decimalPlaces=options&&options.decimalPlaces!==void 0?options.decimalPlaces:2,fixedDecimals=!!(options&&options.fixedDecimals),unit=options&&options.unit||"";(!unit||!map[unit.toLowerCase()])&&(mag>=map.tb?unit="TB":mag>=map.gb?unit="GB":mag>=map.mb?unit="MB":mag>=map.kb?unit="KB":unit="B");var val=value/map[unit.toLowerCase()],str=val.toFixed(decimalPlaces);return fixedDecimals||(str=str.replace(formatDecimalsRegExp,"$1")),thousandsSeparator&&(str=str.replace(formatThousandsRegExp,thousandsSeparator)),str+unitSeparator+unit}function parse(val){if(typeof val=="number"&&!isNaN(val))return val;if(typeof val!="string")return null;var results=parseRegExp.exec(val),floatValue,unit="b";return results?(floatValue=parseFloat(results[1]),unit=results[4].toLowerCase()):(floatValue=parseInt(val,10),unit="b"),Math.floor(map[unit]*floatValue)}}});var NowError=class extends Error{constructor({code:code2,message,meta}){super(message);this.code=code2,this.meta=meta}};var import_chalk=__toESM(require_source(),1);function code(cmd,{backticks=!0}={}){let tick=backticks?import_chalk.default.gray("`"):"";return`${tick}${import_chalk.default.bold(cmd)}${tick}`}var import_bytes=__toESM(require_bytes(),1),import_build_utils=__toESM(require_build_utils(),1);var import_chalk2=__toESM(require_source(),1),import_error_utils=__toESM(require_dist(),1),APIError=class extends Error{constructor(message,response,body){super();if(this.message=`${message} (${response.status})`,this.status=response.status,this.serverMessage=message,this.wwwAuthenticate=response.headers.get("WWW-Authenticate")??void 0,body)for(let field of Object.keys(body))field!=="message"&&(this[field]=body[field]);if(response.status===429||response.status===503){let parsed=parseRetryAfterHeaderAsMillis(response.headers.get("Retry-After"));this.retryAfterMs=parsed??(response.status===429?0:void 0)}}};function parseRetryAfterHeaderAsMillis(header){if(!header)return;let retryAfterMs=Number(header)*1e3;if(Number.isNaN(retryAfterMs)){if(retryAfterMs=Date.parse(header),Number.isNaN(retryAfterMs))return;retryAfterMs=retryAfterMs-Date.now()}return Math.max(retryAfterMs,0)}function isAPIError(v){return(0,import_error_utils.isError)(v)&&"status"in v}var TeamDeleted=class extends NowError{constructor(){super({code:"TEAM_DELETED",message:`Your team was deleted or you were removed from the team. You can switch to a different one using ${getCommandName("switch")}.`,meta:{}})}},InvalidToken=class extends NowError{constructor(tokenSource){let message;tokenSource==="flag"?message="The token provided via the `--token` option is not valid. Please provide a valid token.":tokenSource==="env"?message="The token provided via VERCEL_TOKEN environment variable is not valid. Please provide a valid token.":message=`The specified token is not valid. Use ${getCommandName("login")} to generate a new token.`,super({code:"NOT_AUTHORIZED",message,meta:{}})}},MissingUser=class extends NowError{constructor(){super({code:"MISSING_USER",message:"Not able to load user, missing from response",meta:{}})}},DomainAlreadyExists=class extends NowError{constructor(domain){super({code:"DOMAIN_ALREADY_EXISTS",meta:{domain},message:`The domain ${domain} already exists under a different context.`})}},DomainPermissionDenied=class extends NowError{constructor(domain,context){super({code:"DOMAIN_PERMISSION_DENIED",meta:{domain,context},message:`You don't have access to the domain ${domain} under ${context}.`})}},DomainExternal=class extends NowError{constructor(domain){super({code:"DOMAIN_EXTERNAL",meta:{domain},message:`The domain ${domain} must point to zeit.world.`})}},SourceNotFound=class extends NowError{constructor(){super({code:"SOURCE_NOT_FOUND",meta:{},message:"Not able to purchase. Please add a payment method using the dashboard."})}};var DomainNotFound=class extends NowError{constructor(domain,contextName){super({code:"DOMAIN_NOT_FOUND",meta:{domain},message:`Domain not found by "${domain}"${contextName?` under ${import_chalk2.default.bold(contextName)}`:""}.`})}},DomainNotVerified=class extends NowError{constructor(domain){super({code:"DOMAIN_NOT_VERIFIED",meta:{domain},message:`The domain ${domain} is not verified.`})}},DomainVerificationFailed=class extends NowError{constructor({domain,nsVerification,txtVerification,purchased=!1}){super({code:"DOMAIN_VERIFICATION_FAILED",meta:{domain,nsVerification,txtVerification,purchased},message:`We can't verify the domain ${domain}. Both Name Servers and DNS TXT verifications failed.`})}},InvalidDomain=class extends NowError{constructor(domain,message){super({code:"INVALID_DOMAIN",meta:{domain},message:message||`The domain ${domain} is not valid.`})}},NotDomainOwner=class extends NowError{constructor(message){super({code:"NOT_DOMAIN_OWNER",meta:{},message})}},InvalidDeploymentId=class extends NowError{constructor(id,message){super({code:"INVALID_DEPLOYMENT_ID",meta:{id},message:message||`The deployment id "${id}" is not valid.`})}},UnsupportedTLD=class extends NowError{constructor(domain){super({code:"UNSUPPORTED_TLD",meta:{domain},message:`The TLD for domain name ${domain} is not supported.`})}},TLDNotSupportedViaCLI=class extends NowError{constructor(domain){super({code:"UNSUPPORTED_TLD_VIA_CLI",meta:{domain},message:`Purchases for the TLD of ${domain} are not supported via the CLI. Use the REST API or the dashboard to buy it.`})}},DomainNotAvailable=class extends NowError{constructor(domain){super({code:"DOMAIN_NOT_AVAILABLE",meta:{domain},message:`The domain ${domain} is not available to be purchased.`})}};var UnexpectedDomainPurchaseError=class extends NowError{constructor(domain){super({code:"UNEXPECTED_DOMAIN_PURCHASE_ERROR",meta:{domain},message:`The order for ${domain} failed.`})}},UnexpectedDomainTransferError=class extends NowError{constructor(domain){super({code:"UNEXPECTED_DOMAIN_TRANSFER_ERROR",meta:{domain},message:"An unexpected error happened while transferring."})}},DomainPaymentError=class extends NowError{constructor(){super({code:"DOMAIN_PAYMENT_ERROR",meta:{},message:"Your card was declined. Nothing was charged."})}},DomainChargeOutcomeUnknown=class extends NowError{constructor(domain,verb,orderId){super({code:"DOMAIN_CHARGE_OUTCOME_UNKNOWN",meta:{domain,verb,...orderId&&{orderId}},message:`Can't confirm whether ${domain} was ${verb==="buy"?"bought":"renewed"}.${orderId?` Order ${orderId} finished without confirming ${domain}.`:""} Run ${getCommandName(`domains inspect ${domain}`)} before trying again, or you may be charged twice.`})}},DomainOrderPending=class extends NowError{constructor(domain,orderId,checkCommand){super({code:"DOMAIN_ORDER_PENDING",meta:{domain,orderId},message:`Order ${orderId} for ${domain} is still processing, so the domain can't be used yet. Check the order with ${checkCommand} instead of buying again, or you may be charged twice.`})}},DomainPurchaseInProgress=class extends NowError{constructor(domain,orderId,checkCommand){super({code:"DOMAIN_PURCHASE_IN_PROGRESS",meta:{domain,...orderId&&{orderId}},message:`Can't buy ${domain}: another purchase of it${orderId?` (order ${orderId})`:""} is still in progress, with different details. This run sent no new order. ${checkCommand?`Check that order with ${checkCommand}`:`Run ${getCommandName(`domains inspect ${domain}`)}`} instead of buying again, or you may be charged twice.`})}},DomainPurchaseRefunded=class extends NowError{constructor(domain){super({code:"DOMAIN_PURCHASE_REFUNDED",meta:{domain},message:`The purchase of ${domain} failed, and the charge was refunded.`})}},DomainPurchaseRefundFailed=class extends NowError{constructor(domain){super({code:"DOMAIN_PURCHASE_REFUND_FAILED",meta:{domain},message:`The purchase of ${domain} failed, and refunding the charge also failed. Contact Vercel support about the charge.`})}},DomainPriceChanged=class extends NowError{constructor(domain){super({code:"DOMAIN_PRICE_CHANGED",meta:{domain},message:`The price of ${domain} changed. Nothing was charged.`})}},DomainPurchasePending=class extends NowError{constructor(domain){super({code:"DOMAIN_PURCHASE_PENDING",meta:{domain},message:`The domain purchase for ${domain} is pending.`})}},UserAborted=class extends NowError{constructor(){super({code:"USER_ABORTED",meta:{},message:"The user canceled the operation."})}},CertNotFound=class extends NowError{constructor(id){super({code:"CERT_NOT_FOUND",meta:{id},message:`The cert ${id} can't be found.`})}},CertsPermissionDenied=class extends NowError{constructor(context,domain){super({code:"CERTS_PERMISSION_DENIED",meta:{domain},message:`You don't have access to ${domain}'s certs under ${context}.`})}},CertOrderNotFound=class extends NowError{constructor(cns){super({code:"CERT_ORDER_NOT_FOUND",meta:{cns},message:`No cert order could be found for cns ${cns.join(" ,")}`})}},TooManyRequests=class extends NowError{constructor(api,retryAfterMs){super({code:"TOO_MANY_REQUESTS",meta:{api,retryAfterMs},message:"Rate limited. Too many requests to the same endpoint."})}},CertError=class extends NowError{constructor({cns,code:code2,message,helpUrl}){super({code:"CERT_ERROR",meta:{cns,code:code2,helpUrl},message})}},CertConfigurationError=class extends NowError{constructor({cns,message,external,type,helpUrl}){super({code:"CERT_CONFIGURATION_ERROR",meta:{cns,helpUrl,external,type},message})}},DeploymentNotFound=class extends NowError{constructor({context,id=""}){super({code:"DEPLOYMENT_NOT_FOUND",meta:{id,context},message:`Can't find the deployment "${id}" under the context "${context}"`})}},DeploymentNotReady=class extends NowError{constructor({url=""}){super({code:"DEPLOYMENT_NOT_READY",meta:{url},message:`The deployment https://${url} is not ready.`})}},DeploymentFailedAliasImpossible=class extends NowError{constructor(){super({code:"DEPLOYMENT_FAILED_ALIAS_IMPOSSIBLE",meta:{},message:"The deployment build has failed and cannot be aliased"})}},DeploymentPermissionDenied=class extends NowError{constructor(id,context){super({code:"DEPLOYMENT_PERMISSION_DENIED",meta:{id,context},message:`You don't have access to the deployment ${id} under ${context}.`})}},InvalidAlias=class extends NowError{constructor(alias){super({code:"INVALID_ALIAS",meta:{alias},message:`The given alias ${alias} is not valid`})}},AliasInUse=class extends NowError{constructor(alias){super({code:"ALIAS_IN_USE",meta:{alias},message:"The alias is already in use"})}},CertMissing=class extends NowError{constructor(domain){super({code:"CERT_MISSING",meta:{domain},message:`The certificate for domain ${domain} is missing`})}},CantParseJSONFile=class extends NowError{constructor(file,parseErrorLocation){let message=`Can't parse json file ${file}: ${parseErrorLocation}`;super({code:"CANT_PARSE_JSON_FILE",meta:{file,parseErrorLocation},message})}},ConflictingConfigFiles=class extends import_build_utils.NowBuildError{constructor(files,message,link){super({code:"CONFLICTING_CONFIG_FILES",message:message||"Multiple config files found. Please use only one configuration file.",link:link||"https://vercel.link/combining-old-and-new-config"});this.files=files}},DeprecatedNowJson=class extends import_build_utils.NowBuildError{constructor(_file){super({code:"DEPRECATED_NOW_JSON",message:"The `now.json` file is deprecated and no longer supported. Please rename it to `vercel.json`.",link:"https://vercel.com/docs/projects/project-configuration"})}},CantFindConfig=class extends NowError{constructor(paths){super({code:"CANT_FIND_CONFIG",meta:{paths},message:"Can't find a configuration file in the given locations."})}},WorkingDirectoryDoesNotExist=class extends NowError{constructor(){super({code:"CWD_DOES_NOT_EXIST",meta:{},message:"The current working directory does not exist."})}};var NoAliasInConfig=class extends NowError{constructor(){super({code:"NO_ALIAS_IN_CONFIG",meta:{},message:"There is no alias set up in config file."})}},InvalidAliasInConfig=class extends NowError{constructor(value){super({code:"INVALID_ALIAS_IN_CONFIG",meta:{value},message:"Invalid alias option in configuration."})}};var DNSPermissionDenied=class extends NowError{constructor(domain){super({code:"DNS_PERMISSION_DENIED",meta:{domain},message:`You don't have access to the DNS records of ${domain}.`})}},DNSInvalidPort=class extends NowError{constructor(){super({code:"DNS_INVALID_PORT",meta:{},message:"Invalid <port> parameter. A number was expected"})}},DNSInvalidType=class extends NowError{constructor(type){super({code:"DNS_INVALID_TYPE",meta:{type},message:`Invalid <type> parameter "${type}". Expected one of A, AAAA, ALIAS, CAA, CNAME, MX, SRV, TXT`})}},DNSConflictingRecord=class extends NowError{constructor(record){super({code:"DNS_CONFLICTING_RECORD",meta:{record},message:` A conflicting record exists "${record}".`})}},DomainRemovalConflict=class extends NowError{constructor({aliases,certs,message,pendingAsyncPurchase,resolvable,suffix,transferring}){super({code:"domain_removal_conflict",meta:{aliases,certs,pendingAsyncPurchase,suffix,transferring,resolvable},message})}},DomainMoveConflict=class extends NowError{constructor({message,pendingAsyncPurchase,resolvable,suffix}){super({code:"domain_move_conflict",meta:{pendingAsyncPurchase,resolvable,suffix},message})}};var InvalidMoveDestination=class extends NowError{constructor(destination){super({code:"INVALID_MOVE_DESTINATION",message:`Invalid move destination "${destination}"`,meta:{destination}})}};var LambdaSizeExceededError=class extends NowError{constructor(size,maxLambdaSize){super({code:"MAX_LAMBDA_SIZE_EXCEEDED",message:`The lambda function size (${(0,import_bytes.default)(size).toLowerCase()}) exceeds the maximum size limit (${(0,import_bytes.default)(maxLambdaSize).toLowerCase()}).`,meta:{size,maxLambdaSize}})}},MissingDotenvVarsError=class extends NowError{constructor(type,missing){let message;missing.length===1?message=`Env var ${JSON.stringify(missing[0])} is not defined in ${code(type)} file`:message=[`The following env vars are not defined in ${code(type)} file:`,...missing.map(name=>` - ${JSON.stringify(name)}`)].join(`
|
|
7
|
+
import{getCommandName}from"./chunk-B4KA3ZH2.js";import{require_build_utils}from"./chunk-5MDNVAE6.js";import{require_dist}from"./chunk-MCYG7CCE.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__commonJS,__toESM}from"./chunk-BZENIQ7N.js";var require_bytes=__commonJS({"../../node_modules/.pnpm/bytes@3.0.0/node_modules/bytes/index.js"(exports,module){"use strict";module.exports=bytes2;module.exports.format=format;module.exports.parse=parse;var formatThousandsRegExp=/\B(?=(\d{3})+(?!\d))/g,formatDecimalsRegExp=/(?:\.0*|(\.[^0]+)0+)$/,map={b:1,kb:1024,mb:1<<20,gb:1<<30,tb:(1<<30)*1024},parseRegExp=/^((-|\+)?(\d+(?:\.\d+)?)) *(kb|mb|gb|tb)$/i;function bytes2(value,options){return typeof value=="string"?parse(value):typeof value=="number"?format(value,options):null}function format(value,options){if(!Number.isFinite(value))return null;var mag=Math.abs(value),thousandsSeparator=options&&options.thousandsSeparator||"",unitSeparator=options&&options.unitSeparator||"",decimalPlaces=options&&options.decimalPlaces!==void 0?options.decimalPlaces:2,fixedDecimals=!!(options&&options.fixedDecimals),unit=options&&options.unit||"";(!unit||!map[unit.toLowerCase()])&&(mag>=map.tb?unit="TB":mag>=map.gb?unit="GB":mag>=map.mb?unit="MB":mag>=map.kb?unit="KB":unit="B");var val=value/map[unit.toLowerCase()],str=val.toFixed(decimalPlaces);return fixedDecimals||(str=str.replace(formatDecimalsRegExp,"$1")),thousandsSeparator&&(str=str.replace(formatThousandsRegExp,thousandsSeparator)),str+unitSeparator+unit}function parse(val){if(typeof val=="number"&&!isNaN(val))return val;if(typeof val!="string")return null;var results=parseRegExp.exec(val),floatValue,unit="b";return results?(floatValue=parseFloat(results[1]),unit=results[4].toLowerCase()):(floatValue=parseInt(val,10),unit="b"),Math.floor(map[unit]*floatValue)}}});var NowError=class extends Error{constructor({code:code2,message,meta}){super(message);this.code=code2,this.meta=meta}};var import_chalk=__toESM(require_source(),1);function code(cmd,{backticks=!0}={}){let tick=backticks?import_chalk.default.gray("`"):"";return`${tick}${import_chalk.default.bold(cmd)}${tick}`}var import_bytes=__toESM(require_bytes(),1),import_build_utils=__toESM(require_build_utils(),1);var import_chalk2=__toESM(require_source(),1),import_error_utils=__toESM(require_dist(),1),APIError=class extends Error{constructor(message,response,body){super();if(this.message=`${message} (${response.status})`,this.status=response.status,this.serverMessage=message,this.wwwAuthenticate=response.headers.get("WWW-Authenticate")??void 0,body)for(let field of Object.keys(body))field!=="message"&&(this[field]=body[field]);if(response.status===429||response.status===503){let parsed=parseRetryAfterHeaderAsMillis(response.headers.get("Retry-After"));this.retryAfterMs=parsed??(response.status===429?0:void 0)}}};function parseRetryAfterHeaderAsMillis(header){if(!header)return;let retryAfterMs=Number(header)*1e3;if(Number.isNaN(retryAfterMs)){if(retryAfterMs=Date.parse(header),Number.isNaN(retryAfterMs))return;retryAfterMs=retryAfterMs-Date.now()}return Math.max(retryAfterMs,0)}function isAPIError(v){return(0,import_error_utils.isError)(v)&&"status"in v}var TeamDeleted=class extends NowError{constructor(){super({code:"TEAM_DELETED",message:`Your team was deleted or you were removed from the team. You can switch to a different one using ${getCommandName("switch")}.`,meta:{}})}},InvalidToken=class extends NowError{constructor(tokenSource){let message;tokenSource==="flag"?message="The token provided via the `--token` option is not valid. Please provide a valid token.":tokenSource==="env"?message="The token provided via VERCEL_TOKEN environment variable is not valid. Please provide a valid token.":message=`The specified token is not valid. Use ${getCommandName("login")} to generate a new token.`,super({code:"NOT_AUTHORIZED",message,meta:{}})}},MissingUser=class extends NowError{constructor(){super({code:"MISSING_USER",message:"Not able to load user, missing from response",meta:{}})}},DomainAlreadyExists=class extends NowError{constructor(domain){super({code:"DOMAIN_ALREADY_EXISTS",meta:{domain},message:`The domain ${domain} already exists under a different context.`})}},DomainPermissionDenied=class extends NowError{constructor(domain,context){super({code:"DOMAIN_PERMISSION_DENIED",meta:{domain,context},message:`You don't have access to the domain ${domain} under ${context}.`})}},DomainExternal=class extends NowError{constructor(domain){super({code:"DOMAIN_EXTERNAL",meta:{domain},message:`The domain ${domain} must point to zeit.world.`})}},SourceNotFound=class extends NowError{constructor(){super({code:"SOURCE_NOT_FOUND",meta:{},message:"Not able to purchase. Please add a payment method using the dashboard."})}};var DomainNotFound=class extends NowError{constructor(domain,contextName){super({code:"DOMAIN_NOT_FOUND",meta:{domain},message:`Domain not found by "${domain}"${contextName?` under ${import_chalk2.default.bold(contextName)}`:""}.`})}},DomainNotVerified=class extends NowError{constructor(domain){super({code:"DOMAIN_NOT_VERIFIED",meta:{domain},message:`The domain ${domain} is not verified.`})}},DomainVerificationFailed=class extends NowError{constructor({domain,nsVerification,txtVerification,purchased=!1}){super({code:"DOMAIN_VERIFICATION_FAILED",meta:{domain,nsVerification,txtVerification,purchased},message:`We can't verify the domain ${domain}. Both Name Servers and DNS TXT verifications failed.`})}},InvalidDomain=class extends NowError{constructor(domain,message){super({code:"INVALID_DOMAIN",meta:{domain},message:message||`The domain ${domain} is not valid.`})}},NotDomainOwner=class extends NowError{constructor(message){super({code:"NOT_DOMAIN_OWNER",meta:{},message})}},InvalidDeploymentId=class extends NowError{constructor(id,message){super({code:"INVALID_DEPLOYMENT_ID",meta:{id},message:message||`The deployment id "${id}" is not valid.`})}},UnsupportedTLD=class extends NowError{constructor(domain){super({code:"UNSUPPORTED_TLD",meta:{domain},message:`The TLD for domain name ${domain} is not supported.`})}},TLDNotSupportedViaCLI=class extends NowError{constructor(domain){super({code:"UNSUPPORTED_TLD_VIA_CLI",meta:{domain},message:`Purchases for the TLD of ${domain} are not supported via the CLI. Use the REST API or the dashboard to buy it.`})}},DomainNotAvailable=class extends NowError{constructor(domain){super({code:"DOMAIN_NOT_AVAILABLE",meta:{domain},message:`The domain ${domain} is not available to be purchased.`})}};var UnexpectedDomainPurchaseError=class extends NowError{constructor(domain){super({code:"UNEXPECTED_DOMAIN_PURCHASE_ERROR",meta:{domain},message:`The order for ${domain} failed.`})}},UnexpectedDomainTransferError=class extends NowError{constructor(domain){super({code:"UNEXPECTED_DOMAIN_TRANSFER_ERROR",meta:{domain},message:"An unexpected error happened while transferring."})}},DomainPaymentError=class extends NowError{constructor(){super({code:"DOMAIN_PAYMENT_ERROR",meta:{},message:"Your card was declined. Nothing was charged."})}},DomainPaymentAuthenticationRequired=class extends NowError{constructor(domain,teamSlug){let url=`https://vercel.com/domains/search?${new URLSearchParams({q:domain,...teamSlug&&{teamSlug}})}`;super({code:"DOMAIN_PAYMENT_AUTHENTICATION_REQUIRED",meta:{domain,url},message:`Your bank requires 3-D Secure verification, which can't be completed from the CLI. Nothing was charged. Buy ${domain} in your browser instead: ${url}`})}},DomainChargeOutcomeUnknown=class extends NowError{constructor(domain,verb,orderId){super({code:"DOMAIN_CHARGE_OUTCOME_UNKNOWN",meta:{domain,verb,...orderId&&{orderId}},message:`Can't confirm whether ${domain} was ${verb==="buy"?"bought":"renewed"}.${orderId?` Order ${orderId} finished without confirming ${domain}.`:""} Run ${getCommandName(`domains inspect ${domain}`)} before trying again, or you may be charged twice.`})}},DomainOrderPending=class extends NowError{constructor(domain,orderId,checkCommand){super({code:"DOMAIN_ORDER_PENDING",meta:{domain,orderId},message:`Order ${orderId} for ${domain} is still processing, so the domain can't be used yet. Check the order with ${checkCommand} instead of buying again, or you may be charged twice.`})}},DomainPurchaseInProgress=class extends NowError{constructor(domain,orderId,checkCommand){super({code:"DOMAIN_PURCHASE_IN_PROGRESS",meta:{domain,...orderId&&{orderId}},message:`Can't buy ${domain}: another purchase of it${orderId?` (order ${orderId})`:""} is still in progress, with different details. This run sent no new order. ${checkCommand?`Check that order with ${checkCommand}`:`Run ${getCommandName(`domains inspect ${domain}`)}`} instead of buying again, or you may be charged twice.`})}},DomainPurchaseRefunded=class extends NowError{constructor(domain){super({code:"DOMAIN_PURCHASE_REFUNDED",meta:{domain},message:`The purchase of ${domain} failed, and the charge was refunded.`})}},DomainPurchaseRefundFailed=class extends NowError{constructor(domain){super({code:"DOMAIN_PURCHASE_REFUND_FAILED",meta:{domain},message:`The purchase of ${domain} failed, and refunding the charge also failed. Contact Vercel support about the charge.`})}},DomainPriceChanged=class extends NowError{constructor(domain){super({code:"DOMAIN_PRICE_CHANGED",meta:{domain},message:`The price of ${domain} changed. Nothing was charged.`})}},DomainPurchasePending=class extends NowError{constructor(domain){super({code:"DOMAIN_PURCHASE_PENDING",meta:{domain},message:`The domain purchase for ${domain} is pending.`})}},UserAborted=class extends NowError{constructor(){super({code:"USER_ABORTED",meta:{},message:"The user canceled the operation."})}},CertNotFound=class extends NowError{constructor(id){super({code:"CERT_NOT_FOUND",meta:{id},message:`The cert ${id} can't be found.`})}},CertsPermissionDenied=class extends NowError{constructor(context,domain){super({code:"CERTS_PERMISSION_DENIED",meta:{domain},message:`You don't have access to ${domain}'s certs under ${context}.`})}},CertOrderNotFound=class extends NowError{constructor(cns){super({code:"CERT_ORDER_NOT_FOUND",meta:{cns},message:`No cert order could be found for cns ${cns.join(" ,")}`})}},TooManyRequests=class extends NowError{constructor(api,retryAfterMs){super({code:"TOO_MANY_REQUESTS",meta:{api,retryAfterMs},message:"Rate limited. Too many requests to the same endpoint."})}},CertError=class extends NowError{constructor({cns,code:code2,message,helpUrl}){super({code:"CERT_ERROR",meta:{cns,code:code2,helpUrl},message})}},CertConfigurationError=class extends NowError{constructor({cns,message,external,type,helpUrl}){super({code:"CERT_CONFIGURATION_ERROR",meta:{cns,helpUrl,external,type},message})}},DeploymentNotFound=class extends NowError{constructor({context,id=""}){super({code:"DEPLOYMENT_NOT_FOUND",meta:{id,context},message:`Can't find the deployment "${id}" under the context "${context}"`})}},DeploymentNotReady=class extends NowError{constructor({url=""}){super({code:"DEPLOYMENT_NOT_READY",meta:{url},message:`The deployment https://${url} is not ready.`})}},DeploymentFailedAliasImpossible=class extends NowError{constructor(){super({code:"DEPLOYMENT_FAILED_ALIAS_IMPOSSIBLE",meta:{},message:"The deployment build has failed and cannot be aliased"})}},DeploymentPermissionDenied=class extends NowError{constructor(id,context){super({code:"DEPLOYMENT_PERMISSION_DENIED",meta:{id,context},message:`You don't have access to the deployment ${id} under ${context}.`})}},InvalidAlias=class extends NowError{constructor(alias){super({code:"INVALID_ALIAS",meta:{alias},message:`The given alias ${alias} is not valid`})}},AliasInUse=class extends NowError{constructor(alias){super({code:"ALIAS_IN_USE",meta:{alias},message:"The alias is already in use"})}},CertMissing=class extends NowError{constructor(domain){super({code:"CERT_MISSING",meta:{domain},message:`The certificate for domain ${domain} is missing`})}},CantParseJSONFile=class extends NowError{constructor(file,parseErrorLocation){let message=`Can't parse json file ${file}: ${parseErrorLocation}`;super({code:"CANT_PARSE_JSON_FILE",meta:{file,parseErrorLocation},message})}},ConflictingConfigFiles=class extends import_build_utils.NowBuildError{constructor(files,message,link){super({code:"CONFLICTING_CONFIG_FILES",message:message||"Multiple config files found. Please use only one configuration file.",link:link||"https://vercel.link/combining-old-and-new-config"});this.files=files}},DeprecatedNowJson=class extends import_build_utils.NowBuildError{constructor(_file){super({code:"DEPRECATED_NOW_JSON",message:"The `now.json` file is deprecated and no longer supported. Please rename it to `vercel.json`.",link:"https://vercel.com/docs/projects/project-configuration"})}},CantFindConfig=class extends NowError{constructor(paths){super({code:"CANT_FIND_CONFIG",meta:{paths},message:"Can't find a configuration file in the given locations."})}},WorkingDirectoryDoesNotExist=class extends NowError{constructor(){super({code:"CWD_DOES_NOT_EXIST",meta:{},message:"The current working directory does not exist."})}};var NoAliasInConfig=class extends NowError{constructor(){super({code:"NO_ALIAS_IN_CONFIG",meta:{},message:"There is no alias set up in config file."})}},InvalidAliasInConfig=class extends NowError{constructor(value){super({code:"INVALID_ALIAS_IN_CONFIG",meta:{value},message:"Invalid alias option in configuration."})}};var DNSPermissionDenied=class extends NowError{constructor(domain){super({code:"DNS_PERMISSION_DENIED",meta:{domain},message:`You don't have access to the DNS records of ${domain}.`})}},DNSInvalidPort=class extends NowError{constructor(){super({code:"DNS_INVALID_PORT",meta:{},message:"Invalid <port> parameter. A number was expected"})}},DNSInvalidType=class extends NowError{constructor(type){super({code:"DNS_INVALID_TYPE",meta:{type},message:`Invalid <type> parameter "${type}". Expected one of A, AAAA, ALIAS, CAA, CNAME, MX, SRV, TXT`})}},DNSConflictingRecord=class extends NowError{constructor(record){super({code:"DNS_CONFLICTING_RECORD",meta:{record},message:` A conflicting record exists "${record}".`})}},DomainRemovalConflict=class extends NowError{constructor({aliases,certs,message,pendingAsyncPurchase,resolvable,suffix,transferring}){super({code:"domain_removal_conflict",meta:{aliases,certs,pendingAsyncPurchase,suffix,transferring,resolvable},message})}},DomainMoveConflict=class extends NowError{constructor({message,pendingAsyncPurchase,resolvable,suffix}){super({code:"domain_move_conflict",meta:{pendingAsyncPurchase,resolvable,suffix},message})}};var InvalidMoveDestination=class extends NowError{constructor(destination){super({code:"INVALID_MOVE_DESTINATION",message:`Invalid move destination "${destination}"`,meta:{destination}})}};var LambdaSizeExceededError=class extends NowError{constructor(size,maxLambdaSize){super({code:"MAX_LAMBDA_SIZE_EXCEEDED",message:`The lambda function size (${(0,import_bytes.default)(size).toLowerCase()}) exceeds the maximum size limit (${(0,import_bytes.default)(maxLambdaSize).toLowerCase()}).`,meta:{size,maxLambdaSize}})}},MissingDotenvVarsError=class extends NowError{constructor(type,missing){let message;missing.length===1?message=`Env var ${JSON.stringify(missing[0])} is not defined in ${code(type)} file`:message=[`The following env vars are not defined in ${code(type)} file:`,...missing.map(name=>` - ${JSON.stringify(name)}`)].join(`
|
|
8
8
|
`),message+=`
|
|
9
|
-
Read more: https://err.sh/vercel/missing-env-file`,super({code:"MISSING_DOTENV_VARS",message,meta:{type,missing}})}},DeploymentsRateLimited=class extends NowError{constructor(message){super({code:"DEPLOYMENTS_RATE_LIMITED",meta:{},message})}},BuildsRateLimited=class extends NowError{constructor(message,meta={}){super({code:"BUILDS_RATE_LIMITED",meta,message})}},ProjectNotFound=class extends NowError{constructor(nameOrId){super({code:"PROJECT_NOT_FOUND",meta:{},message:`There is no project for "${nameOrId}"`})}},LinkRequiredError=class extends NowError{constructor(message="No project is linked in this directory. Run `vercel link` or pass a project name."){super({code:"LINK_REQUIRED",meta:{},message})}},AliasDomainConfigured=class extends NowError{constructor({message}){super({code:"DOMAIN_CONFIGURED",meta:{},message})}},MissingBuildScript=class extends NowError{constructor({message}){super({code:"MISSING_BUILD_SCRIPT",meta:{},message})}},ConflictingFilePath=class extends NowError{constructor({message}){super({code:"CONFLICTING_FILE_PATH",meta:{},message})}},ConflictingPathSegment=class extends NowError{constructor({message}){super({code:"CONFLICTING_PATH_SEGMENT",meta:{},message})}},BuildError=class extends NowError{constructor({message,meta}){super({code:"BUILD_ERROR",meta,message})}},SchemaValidationFailed=class extends NowError{constructor(message,keyword,dataPath,params){super({code:"SCHEMA_VALIDATION_FAILED",meta:{message,keyword,dataPath,params},message:"Schema verification failed"})}},InvalidLocalConfig=class extends NowError{constructor(value){super({code:"INVALID_LOCAL_CONFIG",meta:{value},message:`Invalid local config parameter [${value.map(localConfig=>`"${localConfig}"`).join(", ")}]. A string was expected.`})}};export{require_bytes,NowError,code,APIError,parseRetryAfterHeaderAsMillis,isAPIError,TeamDeleted,InvalidToken,MissingUser,DomainAlreadyExists,DomainPermissionDenied,DomainExternal,SourceNotFound,DomainNotFound,DomainNotVerified,DomainVerificationFailed,InvalidDomain,NotDomainOwner,InvalidDeploymentId,UnsupportedTLD,TLDNotSupportedViaCLI,DomainNotAvailable,UnexpectedDomainPurchaseError,UnexpectedDomainTransferError,DomainPaymentError,DomainChargeOutcomeUnknown,DomainOrderPending,DomainPurchaseInProgress,DomainPurchaseRefunded,DomainPurchaseRefundFailed,DomainPriceChanged,DomainPurchasePending,UserAborted,CertNotFound,CertsPermissionDenied,CertOrderNotFound,TooManyRequests,CertError,CertConfigurationError,DeploymentNotFound,DeploymentNotReady,DeploymentFailedAliasImpossible,DeploymentPermissionDenied,InvalidAlias,AliasInUse,CertMissing,CantParseJSONFile,ConflictingConfigFiles,DeprecatedNowJson,CantFindConfig,WorkingDirectoryDoesNotExist,NoAliasInConfig,InvalidAliasInConfig,DNSPermissionDenied,DNSInvalidPort,DNSInvalidType,DNSConflictingRecord,DomainRemovalConflict,DomainMoveConflict,InvalidMoveDestination,LambdaSizeExceededError,MissingDotenvVarsError,DeploymentsRateLimited,BuildsRateLimited,ProjectNotFound,LinkRequiredError,AliasDomainConfigured,MissingBuildScript,ConflictingFilePath,ConflictingPathSegment,BuildError,SchemaValidationFailed,InvalidLocalConfig};
|
|
9
|
+
Read more: https://err.sh/vercel/missing-env-file`,super({code:"MISSING_DOTENV_VARS",message,meta:{type,missing}})}},DeploymentsRateLimited=class extends NowError{constructor(message){super({code:"DEPLOYMENTS_RATE_LIMITED",meta:{},message})}},BuildsRateLimited=class extends NowError{constructor(message,meta={}){super({code:"BUILDS_RATE_LIMITED",meta,message})}},ProjectNotFound=class extends NowError{constructor(nameOrId){super({code:"PROJECT_NOT_FOUND",meta:{},message:`There is no project for "${nameOrId}"`})}},LinkRequiredError=class extends NowError{constructor(message="No project is linked in this directory. Run `vercel link` or pass a project name."){super({code:"LINK_REQUIRED",meta:{},message})}},AliasDomainConfigured=class extends NowError{constructor({message}){super({code:"DOMAIN_CONFIGURED",meta:{},message})}},MissingBuildScript=class extends NowError{constructor({message}){super({code:"MISSING_BUILD_SCRIPT",meta:{},message})}},ConflictingFilePath=class extends NowError{constructor({message}){super({code:"CONFLICTING_FILE_PATH",meta:{},message})}},ConflictingPathSegment=class extends NowError{constructor({message}){super({code:"CONFLICTING_PATH_SEGMENT",meta:{},message})}},BuildError=class extends NowError{constructor({message,meta}){super({code:"BUILD_ERROR",meta,message})}},SchemaValidationFailed=class extends NowError{constructor(message,keyword,dataPath,params){super({code:"SCHEMA_VALIDATION_FAILED",meta:{message,keyword,dataPath,params},message:"Schema verification failed"})}},InvalidLocalConfig=class extends NowError{constructor(value){super({code:"INVALID_LOCAL_CONFIG",meta:{value},message:`Invalid local config parameter [${value.map(localConfig=>`"${localConfig}"`).join(", ")}]. A string was expected.`})}};export{require_bytes,NowError,code,APIError,parseRetryAfterHeaderAsMillis,isAPIError,TeamDeleted,InvalidToken,MissingUser,DomainAlreadyExists,DomainPermissionDenied,DomainExternal,SourceNotFound,DomainNotFound,DomainNotVerified,DomainVerificationFailed,InvalidDomain,NotDomainOwner,InvalidDeploymentId,UnsupportedTLD,TLDNotSupportedViaCLI,DomainNotAvailable,UnexpectedDomainPurchaseError,UnexpectedDomainTransferError,DomainPaymentError,DomainPaymentAuthenticationRequired,DomainChargeOutcomeUnknown,DomainOrderPending,DomainPurchaseInProgress,DomainPurchaseRefunded,DomainPurchaseRefundFailed,DomainPriceChanged,DomainPurchasePending,UserAborted,CertNotFound,CertsPermissionDenied,CertOrderNotFound,TooManyRequests,CertError,CertConfigurationError,DeploymentNotFound,DeploymentNotReady,DeploymentFailedAliasImpossible,DeploymentPermissionDenied,InvalidAlias,AliasInUse,CertMissing,CantParseJSONFile,ConflictingConfigFiles,DeprecatedNowJson,CantFindConfig,WorkingDirectoryDoesNotExist,NoAliasInConfig,InvalidAliasInConfig,DNSPermissionDenied,DNSInvalidPort,DNSInvalidType,DNSConflictingRecord,DomainRemovalConflict,DomainMoveConflict,InvalidMoveDestination,LambdaSizeExceededError,MissingDotenvVarsError,DeploymentsRateLimited,BuildsRateLimited,ProjectNotFound,LinkRequiredError,AliasDomainConfigured,MissingBuildScript,ConflictingFilePath,ConflictingPathSegment,BuildError,SchemaValidationFailed,InvalidLocalConfig};
|
|
10
10
|
/*! Bundled license information:
|
|
11
11
|
|
|
12
12
|
bytes/index.js:
|