vercel 65.0.0 → 65.2.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/add-6XE2EK66.js +8 -0
- package/dist/chunks/add-WITOGFYA.js +8 -0
- package/dist/chunks/add-YSIECJTJ.js +8 -0
- package/dist/chunks/build-DNYYPGF2.js +7 -0
- package/dist/chunks/{chunk-VO36D4U4.js → chunk-22FDWPWY.js} +1 -1
- package/dist/chunks/chunk-2NABMKFV.js +29 -0
- package/dist/chunks/chunk-2PKEEQ5W.js +25 -0
- package/dist/chunks/{chunk-VAZQS475.js → chunk-3ADDGPEN.js} +1 -1
- package/dist/chunks/{chunk-LJIQZ3LU.js → chunk-3AYYFYZG.js} +1 -1
- package/dist/chunks/{chunk-27QCVNMI.js → chunk-3LIKVGFT.js} +1 -1
- package/dist/chunks/chunk-3XCXKOBR.js +7 -0
- package/dist/chunks/{chunk-RRWEIG6B.js → chunk-3XW7N4W3.js} +1 -1
- package/dist/chunks/{chunk-XD2FF2PZ.js → chunk-4MTD47Y2.js} +1 -1
- package/dist/chunks/{detect-projects-CHMBPFSE.js → chunk-4VFYJU37.js} +1 -1
- package/dist/chunks/chunk-5IASAERQ.js +7 -0
- package/dist/chunks/chunk-5RMIM4S2.js +7 -0
- package/dist/chunks/chunk-65TGOMRK.js +8 -0
- package/dist/chunks/chunk-6IDNVZZR.js +7 -0
- package/dist/chunks/{chunk-DBNQ45J5.js → chunk-6OVX3PWM.js} +1 -1
- package/dist/chunks/chunk-6URZLHEK.js +7 -0
- package/dist/chunks/{chunk-AZ5OUZPP.js → chunk-6VH56CX2.js} +1 -1
- package/dist/chunks/chunk-6Y2ZL5XJ.js +98 -0
- package/dist/chunks/{chunk-KUGFILF5.js → chunk-76KGQU2G.js} +1 -1
- package/dist/chunks/{chunk-F4ZFLPMT.js → chunk-7EC6KLFJ.js} +1 -1
- package/dist/chunks/chunk-7N67TEDX.js +10 -0
- package/dist/chunks/{chunk-43T3YKNH.js → chunk-7SYW5HXA.js} +1 -1
- package/dist/chunks/chunk-7YKFF6CE.js +7 -0
- package/dist/chunks/chunk-7Z3WUAO5.js +10 -0
- package/dist/chunks/chunk-ABZEMNDR.js +7 -0
- package/dist/chunks/{chunk-WDWYKX2I.js → chunk-ADLBLGT3.js} +1 -1
- package/dist/chunks/{chunk-BFJC3UDU.js → chunk-AGBNDJBH.js} +1 -1
- package/dist/chunks/chunk-AJCM43E4.js +7 -0
- package/dist/chunks/chunk-ANMDN3EG.js +9 -0
- package/dist/chunks/chunk-AWMQGOS2.js +7 -0
- package/dist/chunks/{chunk-JDVUKDX3.js → chunk-BBKEP7RO.js} +1 -1
- package/dist/chunks/{chunk-X5J7LOJK.js → chunk-BL3GEBL6.js} +1 -1
- package/dist/chunks/chunk-BLUPZPAS.js +7 -0
- package/dist/chunks/chunk-BNQXEQWO.js +7 -0
- package/dist/chunks/chunk-BTI5TG6Q.js +7 -0
- package/dist/chunks/chunk-BUJITHGZ.js +8 -0
- package/dist/chunks/chunk-BZXSCHI7.js +7 -0
- package/dist/chunks/chunk-C6GY2G73.js +7 -0
- package/dist/chunks/chunk-CEMPU323.js +7 -0
- package/dist/chunks/{chunk-Z6JDXW4A.js → chunk-CF2FOU7X.js} +1 -1
- package/dist/chunks/{chunk-EKMQNUO4.js → chunk-CLFCR4UZ.js} +1 -1
- package/dist/chunks/{chunk-WFSQ3OSN.js → chunk-CVDK3IYT.js} +6 -9
- package/dist/chunks/{chunk-VF2WX27D.js → chunk-DA37HMCW.js} +2 -2
- package/dist/chunks/{chunk-YPX7BXJ6.js → chunk-DGG3YML4.js} +2 -2
- package/dist/chunks/chunk-DGYHWXD2.js +10 -0
- package/dist/chunks/{chunk-RTWGDRYT.js → chunk-DHSOA6LP.js} +1 -1
- package/dist/chunks/chunk-DWZBL4NK.js +7 -0
- package/dist/chunks/chunk-E2SADN6I.js +7 -0
- package/dist/chunks/chunk-ECQIO5K3.js +7 -0
- package/dist/chunks/{chunk-7OMWRRY4.js → chunk-EEEYN6B4.js} +1 -1
- package/dist/chunks/{chunk-T5LBVZWY.js → chunk-F6FTWDLS.js} +1 -1
- package/dist/chunks/chunk-F7AVGV4Y.js +7 -0
- package/dist/chunks/{chunk-FN7TTXXY.js → chunk-FDNYYENK.js} +1 -1
- package/dist/chunks/chunk-FEI6O5QD.js +7 -0
- package/dist/chunks/{chunk-FPC5LINQ.js → chunk-FGFLTLEA.js} +1 -1
- package/dist/chunks/{chunk-JT273F22.js → chunk-FI4SNRSM.js} +1 -1
- package/dist/chunks/chunk-FUX6LKNP.js +7 -0
- package/dist/chunks/{chunk-OVV5MV5M.js → chunk-G4T7VBGN.js} +1 -1
- package/dist/chunks/{chunk-L5ANBZTX.js → chunk-GA277JFB.js} +1 -1
- package/dist/chunks/chunk-GD7AV7BO.js +9 -0
- package/dist/chunks/{chunk-W7J5HTTY.js → chunk-GENZ5QV5.js} +1 -1
- package/dist/chunks/chunk-GG5RME4X.js +7 -0
- package/dist/chunks/{chunk-PXU645V7.js → chunk-GGSM5AHN.js} +1 -1
- package/dist/chunks/{chunk-7G72V52B.js → chunk-GVTXA6HG.js} +1 -1
- package/dist/chunks/{chunk-ZIWS57E4.js → chunk-H2HV2IWG.js} +1 -1
- package/dist/chunks/{chunk-EJINOHL3.js → chunk-HCRD3JFL.js} +1 -1
- package/dist/chunks/chunk-HRR57QNP.js +7 -0
- package/dist/chunks/chunk-IA3MXJRC.js +8 -0
- package/dist/chunks/chunk-IEPW2YRH.js +7 -0
- package/dist/chunks/{chunk-HBPSZHXX.js → chunk-IGDG5CWT.js} +1 -1
- package/dist/chunks/chunk-IKQTP764.js +7 -0
- package/dist/chunks/{chunk-WTBGMDQ7.js → chunk-IQKGQ2Y2.js} +1 -1
- package/dist/chunks/chunk-IUXSJWL3.js +7 -0
- package/dist/chunks/{chunk-6CXHR2ND.js → chunk-JELLVPCM.js} +2 -2
- package/dist/chunks/{chunk-CTKJQTC5.js → chunk-JLEJB6KM.js} +1 -1
- package/dist/chunks/chunk-JNVVIU6L.js +9 -0
- package/dist/chunks/{chunk-SSKMT5SL.js → chunk-JVKIWEPJ.js} +1 -1
- package/dist/chunks/{chunk-WFEEUZ6B.js → chunk-K3FFPKIV.js} +1 -1
- package/dist/chunks/{chunk-66ODHUGV.js → chunk-KECUEAMH.js} +1 -1
- package/dist/chunks/{chunk-PNUH3XXW.js → chunk-KH6565YH.js} +2 -2
- package/dist/chunks/chunk-KRPY5FHJ.js +7 -0
- package/dist/chunks/chunk-KTNBXM43.js +7 -0
- package/dist/chunks/{chunk-YXZGKFF3.js → chunk-KW6GSQXV.js} +1 -1
- package/dist/chunks/{chunk-KDABXEHF.js → chunk-L7AHFYDS.js} +1 -1
- package/dist/chunks/{chunk-HNF2BEOE.js → chunk-LBNOOFB6.js} +1 -1
- package/dist/chunks/chunk-LC6D6S24.js +7 -0
- package/dist/chunks/chunk-LCHECISY.js +7 -0
- package/dist/chunks/{chunk-KXHUMVXD.js → chunk-LH7X2ZJQ.js} +1 -1
- package/dist/chunks/chunk-LJBUJ23M.js +7 -0
- package/dist/chunks/{chunk-IYM5GO57.js → chunk-LKLH6DZP.js} +1 -1
- package/dist/chunks/{chunk-WYJGP5QW.js → chunk-LUBUI5GF.js} +1 -1
- package/dist/chunks/chunk-LZWQBY2I.js +17 -0
- package/dist/chunks/{chunk-IKSZMJKB.js → chunk-MBDXRSHX.js} +2 -2
- package/dist/chunks/{chunk-VO2XAQFF.js → chunk-MX3RY7HH.js} +8 -9
- package/dist/chunks/chunk-N4HJGVRB.js +10 -0
- package/dist/chunks/{chunk-4T22AQTB.js → chunk-NQWGRKF4.js} +1 -1
- package/dist/chunks/{chunk-52JGR5SZ.js → chunk-NTZ5WWYV.js} +1 -1
- package/dist/chunks/chunk-OAM5NJCU.js +9 -0
- package/dist/chunks/chunk-OCR5CRTH.js +10 -0
- package/dist/chunks/chunk-OFDTADPQ.js +7 -0
- package/dist/chunks/chunk-OKEBIUKZ.js +7 -0
- package/dist/chunks/{chunk-X7CLBXWL.js → chunk-OPORM35X.js} +1 -1
- package/dist/chunks/{chunk-MTETAZA4.js → chunk-P6ZHH3HQ.js} +1 -1
- package/dist/chunks/chunk-PFD7LETF.js +7 -0
- package/dist/chunks/chunk-PFNYWWLI.js +7 -0
- package/dist/chunks/chunk-PFPJLIFF.js +33 -0
- package/dist/chunks/chunk-PSOVLGHP.js +7 -0
- package/dist/chunks/{chunk-B6U5434D.js → chunk-Q5ODLDCU.js} +1 -1
- package/dist/chunks/{chunk-2BAAJZBZ.js → chunk-QEAQNRWM.js} +1 -1
- package/dist/chunks/{chunk-DGDNI76L.js → chunk-QMCHGGDX.js} +2 -2
- package/dist/chunks/{chunk-X3VSVBXT.js → chunk-QMGXVTLQ.js} +2 -2
- package/dist/chunks/chunk-QOCZPYRV.js +12 -0
- package/dist/chunks/chunk-QQVGXIFM.js +7 -0
- package/dist/chunks/chunk-QYCGL36Q.js +7 -0
- package/dist/chunks/{chunk-AGDMSAYW.js → chunk-QZX7VG2V.js} +1 -1
- package/dist/chunks/chunk-R5B5ISRX.js +15 -0
- package/dist/chunks/{chunk-CZ2KEML2.js → chunk-R6BEOVTU.js} +1 -1
- package/dist/chunks/chunk-RLKS5G6C.js +12 -0
- package/dist/chunks/chunk-RTQ6ERZF.js +10 -0
- package/dist/chunks/{chunk-JWX2YZVC.js → chunk-RUA6EEAJ.js} +1 -1
- package/dist/chunks/{chunk-NYKEU7DQ.js → chunk-RW3X523R.js} +1 -1
- package/dist/chunks/chunk-S3L2OHPO.js +7 -0
- package/dist/chunks/{chunk-VY63XWWU.js → chunk-S5IWVPYT.js} +1 -1
- package/dist/chunks/{chunk-JETQEZ24.js → chunk-SQE63XFX.js} +2 -2
- package/dist/chunks/{chunk-UDMEPP3K.js → chunk-SXOSF4O6.js} +1 -1
- package/dist/chunks/chunk-TAAWMNNL.js +7 -0
- package/dist/chunks/chunk-TO5PJDEN.js +7 -0
- package/dist/chunks/{chunk-66262IYI.js → chunk-TZFDVQ72.js} +1 -1
- package/dist/chunks/chunk-U4Z2MMOF.js +301 -0
- package/dist/chunks/chunk-UC2SUUL2.js +7 -0
- package/dist/chunks/{chunk-VCV3H73W.js → chunk-UNEGQPD3.js} +1 -1
- package/dist/chunks/chunk-UVHKXCR5.js +11 -0
- package/dist/chunks/{chunk-3XDTQFBL.js → chunk-VBWQRK3O.js} +7 -7
- package/dist/chunks/chunk-VOCZ34ON.js +7 -0
- package/dist/chunks/chunk-VT6RIZJH.js +7 -0
- package/dist/chunks/{chunk-KCVCGYAR.js → chunk-WBF36MYT.js} +2 -2
- package/dist/chunks/{chunk-GRVLQZFQ.js → chunk-WGXKX24Q.js} +1 -1
- package/dist/chunks/chunk-WUORIKOE.js +7 -0
- package/dist/chunks/{chunk-7C5JHTHO.js → chunk-X4762EE4.js} +1 -1
- package/dist/chunks/chunk-XGTKHQTT.js +7 -0
- package/dist/chunks/chunk-XK6SNITB.js +21 -0
- package/dist/chunks/{chunk-UGZ3HFHI.js → chunk-XP3FT56R.js} +3 -3
- package/dist/chunks/chunk-XR6QY7RR.js +7 -0
- package/dist/chunks/{chunk-2UBZCG4F.js → chunk-XSE75NFU.js} +1 -1
- package/dist/chunks/chunk-XXXRTHTP.js +8 -0
- package/dist/chunks/{chunk-ENWROHWX.js → chunk-Y54GKXGG.js} +1 -1
- package/dist/chunks/chunk-YHQ7PPXP.js +7 -0
- package/dist/chunks/chunk-ZF27J6FQ.js +7 -0
- package/dist/chunks/chunk-ZFRNVIHI.js +7 -0
- package/dist/chunks/clear-KLE7JYWS.js +8 -0
- package/dist/chunks/compile-vercel-config-QHWJCKJV.js +7 -0
- package/dist/chunks/{config-XH532PP3.js → config-3ZSKJULZ.js} +1 -1
- package/dist/chunks/config-F5QZ5IGE.js +8 -0
- package/dist/chunks/config-validator.mjs +1 -1
- package/dist/chunks/connect-git-provider-FS5Q2HO4.js +7 -0
- package/dist/chunks/delete-GKUCUSHP.js +9 -0
- package/dist/chunks/delete-TLC65SZD.js +10 -0
- package/dist/chunks/detect-projects-NLAYKNQX.js +7 -0
- package/dist/chunks/detect-services-D6HLLAI4.js +7 -0
- package/dist/chunks/disable-ORTTESHC.js +7 -0
- package/dist/chunks/discard-TGWEOYRT.js +14 -0
- package/dist/chunks/dist-33WTJLVQ.js +7 -0
- package/dist/chunks/dist-RXYNZPEA.js +7 -0
- package/dist/chunks/edit-3XLIA7OG.js +8 -0
- package/dist/chunks/edit-IE2X5ZQD.js +9 -0
- package/dist/chunks/enable-DK3YZA4V.js +7 -0
- package/dist/chunks/{exec-5ZWP5NC6.js → exec-OZSY46V6.js} +1 -1
- package/dist/chunks/{export-3OE2RWU7.js → export-XOMKFSVY.js} +1 -1
- package/dist/chunks/fetch-proxy-45DGILKR.js +67 -0
- package/dist/chunks/future-XGH5EADE.js +7 -0
- package/dist/chunks/generate-cert-for-deploy-RGFAQHRI.js +7 -0
- package/dist/chunks/image-J2SIGGGB.js +7 -0
- package/dist/chunks/import-builders-MBKD4ERV.js +7 -0
- package/dist/chunks/inspect-CPXTLLSJ.js +13 -0
- package/dist/chunks/{inspect-JWDH7C6F.js → inspect-MR3XFJSZ.js} +1 -1
- package/dist/chunks/{inspect-HYJULYCV.js → inspect-MY3WMAQO.js} +1 -1
- package/dist/chunks/inspect-Q7D2TTXV.js +9 -0
- package/dist/chunks/{inspect-GD6JJPWG.js → inspect-SNN4G5IH.js} +1 -1
- package/dist/chunks/{list-4SZS2TB7.js → list-5HYYTOOF.js} +1 -1
- package/dist/chunks/list-6WEW57IO.js +12 -0
- package/dist/chunks/{list-AGS47O5P.js → list-7LMA6KKH.js} +1 -1
- package/dist/chunks/login-PFJ4ZSUI.js +9 -0
- package/dist/chunks/login-TVTT7VFC.js +7 -0
- package/dist/chunks/logs-WAOHH4MP.js +7 -0
- package/dist/chunks/{ls-ZPUNJ7ND.js → ls-6NO2RHSW.js} +1 -1
- package/dist/chunks/{ls-WQX2DS4X.js → ls-BHP75R3B.js} +1 -1
- package/dist/chunks/{ls-Y2JQYSVO.js → ls-NBMLWOON.js} +1 -1
- package/dist/chunks/{ls-KNRG7G5K.js → ls-QPOCM5P2.js} +1 -1
- package/dist/chunks/ls-VDMCJ53V.js +11 -0
- package/dist/chunks/{ls-LGL5ZKEJ.js → ls-WHEKRXAT.js} +1 -1
- package/dist/chunks/ls-ZL4DBDXR.js +8 -0
- package/dist/chunks/mutate-C6FYX2DM.js +9 -0
- package/dist/chunks/{notifications-557GW5KI.js → notifications-F7GGQGPQ.js} +1 -1
- package/dist/chunks/open-EX4PGTAE.js +7 -0
- package/dist/chunks/{openapi-IVXUCJPM.js → openapi-JGYEFJJV.js} +1 -1
- package/dist/chunks/{permissions-2XHSDRNE.js → permissions-KSPXNTFT.js} +1 -1
- package/dist/chunks/plugin-offer-4U77LNYA.js +9 -0
- package/dist/chunks/prompt-missing-credentials-JJP6AV5V.js +7 -0
- package/dist/chunks/publish-UZES2VJC.js +15 -0
- package/dist/chunks/pull-WUTJTCOT.js +7 -0
- package/dist/chunks/purchase-domain-if-available-XMNJGSPL.js +7 -0
- package/dist/chunks/push-ST6KQ2OK.js +7 -0
- package/dist/chunks/{query-JA5OWDSP.js → query-XCRX43SR.js} +1 -1
- package/dist/chunks/reauthenticate-LRJ5APNU.js +7 -0
- package/dist/chunks/reorder-QSZPOIBU.js +10 -0
- package/dist/chunks/reply-CAWLLEJ6.js +9 -0
- package/dist/chunks/resolve-GO4RFRQY.js +12 -0
- package/dist/chunks/resolve-agent-team-OGT4SLRJ.js +7 -0
- package/dist/chunks/{resolve-deployment-framework-preset-JPT2MRPA.js → resolve-deployment-framework-preset-AXXYBFCL.js} +1 -1
- package/dist/chunks/restore-NHHAVT4H.js +16 -0
- package/dist/chunks/rm-5FFPHHK6.js +8 -0
- package/dist/chunks/rm-7WHWMHAY.js +8 -0
- package/dist/chunks/rm-IFTLVW4R.js +8 -0
- package/dist/chunks/rm-TDUKZY7D.js +8 -0
- package/dist/chunks/rm-XIN5CPXB.js +8 -0
- package/dist/chunks/routes-P6LKQCWH.js +7 -0
- package/dist/chunks/rule-inspect-4EIDKQL6.js +8 -0
- package/dist/chunks/{schema-OV4SUO52.js → schema-NSGCBPHF.js} +1 -1
- package/dist/chunks/schema-NYKJCOCR.js +14 -0
- package/dist/chunks/select-org-AZVHP7AQ.js +7 -0
- package/dist/chunks/set-OC6KN3G4.js +7 -0
- package/dist/chunks/setup-and-link-WEXKJDAQ.js +7 -0
- package/dist/chunks/{skills-6EFE7KH7.js → skills-4J2NC2QI.js} +2 -2
- package/dist/chunks/tags-CCM7IGNC.js +7 -0
- package/dist/chunks/token-W6P2KNI5.js +7 -0
- package/dist/chunks/token-util-JDQI37VN.js +7 -0
- package/dist/chunks/{types-2DDQTYAO.js → types-SK6J2HFE.js} +1 -1
- package/dist/chunks/{update-XUMH6CAJ.js → update-TFDQQXYZ.js} +1 -1
- package/dist/chunks/zod-2C2SXNIK.js +7 -0
- package/dist/commands/build/index.js +1 -1
- package/dist/commands/deploy/index.js +7 -7
- package/dist/commands/dev/index.js +17 -15
- package/dist/commands/env/index.js +8 -8
- package/dist/commands/link/index.js +1 -1
- package/dist/commands/list/index.js +1 -1
- package/dist/commands/project/index.js +113 -0
- package/dist/commands-account.js +209 -0
- package/dist/commands-ai.js +200 -0
- package/dist/commands-blob.js +107 -0
- package/dist/commands-core.js +222 -0
- package/dist/commands-deployments.js +84 -0
- package/dist/commands-flags.js +377 -0
- package/dist/commands-integrations.js +143 -0
- package/dist/commands-observability.js +93 -0
- package/dist/commands-routing.js +273 -0
- package/dist/index.js +5 -5
- package/dist/internal-build-worker.js +1 -1
- package/dist/internal-build.js +2 -2
- package/dist/root-help-commands.mjs +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +61 -59
- package/dist/chunks/add-2HOGPYWC.js +0 -8
- package/dist/chunks/add-2RYLJ442.js +0 -8
- package/dist/chunks/add-PAQE7CT2.js +0 -8
- package/dist/chunks/build-77Q2YPHO.js +0 -7
- package/dist/chunks/chunk-36N6VMW4.js +0 -7
- package/dist/chunks/chunk-3GXZPT7T.js +0 -7
- package/dist/chunks/chunk-3L4MAGRI.js +0 -31
- package/dist/chunks/chunk-732WJANV.js +0 -15
- package/dist/chunks/chunk-AW7DEWIM.js +0 -7
- package/dist/chunks/chunk-BHWEIKSP.js +0 -10
- package/dist/chunks/chunk-BJ5APZ6X.js +0 -7
- package/dist/chunks/chunk-BZQ7YWSB.js +0 -10
- package/dist/chunks/chunk-CLKHGKJA.js +0 -7
- package/dist/chunks/chunk-FRSHC2HN.js +0 -7
- package/dist/chunks/chunk-IMMMID5G.js +0 -7
- package/dist/chunks/chunk-INDGZ3JK.js +0 -30
- package/dist/chunks/chunk-KNTBWMVA.js +0 -7
- package/dist/chunks/chunk-MIKNK3B6.js +0 -7
- package/dist/chunks/chunk-MVCAUS4F.js +0 -36
- package/dist/chunks/chunk-O3AL3QFA.js +0 -7
- package/dist/chunks/chunk-ODB7LEAO.js +0 -7
- package/dist/chunks/chunk-PS3KKHSI.js +0 -7
- package/dist/chunks/chunk-R3MRIQMO.js +0 -7
- package/dist/chunks/chunk-RAN5LUZY.js +0 -7
- package/dist/chunks/chunk-RH2SQQWH.js +0 -10
- package/dist/chunks/chunk-RUOOZ574.js +0 -7
- package/dist/chunks/chunk-UMUPJDWU.js +0 -7
- package/dist/chunks/chunk-VWK26HHN.js +0 -7
- package/dist/chunks/chunk-WKC7S5IW.js +0 -9
- package/dist/chunks/chunk-XBTLXKOI.js +0 -7
- package/dist/chunks/chunk-XDKCDGJF.js +0 -25
- package/dist/chunks/chunk-YNOLLMOG.js +0 -9
- package/dist/chunks/chunk-YTDK6AHS.js +0 -7
- package/dist/chunks/chunk-ZVRKM3UD.js +0 -12
- package/dist/chunks/clear-HPHGW2CD.js +0 -8
- package/dist/chunks/compile-vercel-config-YG2E5LXN.js +0 -7
- package/dist/chunks/config-PZ7HFZQZ.js +0 -8
- package/dist/chunks/connect-git-provider-WEFO2ESM.js +0 -7
- package/dist/chunks/delete-UPHMMYEJ.js +0 -10
- package/dist/chunks/delete-Z7PXYHTL.js +0 -9
- package/dist/chunks/detect-services-ZYHOOBMO.js +0 -7
- package/dist/chunks/disable-34LCZPFL.js +0 -7
- package/dist/chunks/discard-HDUCYAHG.js +0 -14
- package/dist/chunks/edit-4F7DADVN.js +0 -9
- package/dist/chunks/edit-5WKAHKCW.js +0 -8
- package/dist/chunks/enable-YV6I32W6.js +0 -7
- package/dist/chunks/fetch-proxy-OC6B22AW.js +0 -7
- package/dist/chunks/future-N2ZTDYVW.js +0 -7
- package/dist/chunks/generate-cert-for-deploy-ORS7XL64.js +0 -7
- package/dist/chunks/image-WTWQT7A4.js +0 -7
- package/dist/chunks/import-builders-XBGAW4MC.js +0 -7
- package/dist/chunks/inspect-ISRYYL7L.js +0 -13
- package/dist/chunks/inspect-MEYRAEVT.js +0 -9
- package/dist/chunks/list-O7FAMXMT.js +0 -12
- package/dist/chunks/login-KNE2BGUB.js +0 -9
- package/dist/chunks/login-NCAGHBZD.js +0 -7
- package/dist/chunks/logs-7H5XDI44.js +0 -7
- package/dist/chunks/ls-RI6BNJO7.js +0 -8
- package/dist/chunks/ls-UJHETSDA.js +0 -11
- package/dist/chunks/mutate-QHSLJCQU.js +0 -9
- package/dist/chunks/open-IYLA5OZF.js +0 -7
- package/dist/chunks/prompt-missing-credentials-BLT57RIR.js +0 -7
- package/dist/chunks/publish-MQ56IB4K.js +0 -15
- package/dist/chunks/pull-K3JVXGZM.js +0 -7
- package/dist/chunks/purchase-domain-if-available-VDMLT3J2.js +0 -7
- package/dist/chunks/push-YXUJGMP4.js +0 -7
- package/dist/chunks/reauthenticate-YZXHWSEC.js +0 -7
- package/dist/chunks/reorder-UNU63VF3.js +0 -10
- package/dist/chunks/reply-CTLC5KAK.js +0 -9
- package/dist/chunks/resolve-HTKF4MMV.js +0 -12
- package/dist/chunks/resolve-agent-team-DLIROIXX.js +0 -7
- package/dist/chunks/restore-CSZYM5WU.js +0 -16
- package/dist/chunks/rm-BGLDOP4N.js +0 -8
- package/dist/chunks/rm-O2XVUZOW.js +0 -8
- package/dist/chunks/rm-OSMI52XV.js +0 -8
- package/dist/chunks/rm-SZIT75ZY.js +0 -8
- package/dist/chunks/rm-WJERY4WM.js +0 -8
- package/dist/chunks/routes-ZNPZJERJ.js +0 -7
- package/dist/chunks/rule-inspect-NGI6XURL.js +0 -8
- package/dist/chunks/schema-JLQ7SNYR.js +0 -14
- package/dist/chunks/select-org-URO7GRAY.js +0 -7
- package/dist/chunks/set-RU227EQQ.js +0 -7
- package/dist/chunks/setup-and-link-WX6IEZZO.js +0 -7
- package/dist/chunks/tags-KJINDQSV.js +0 -7
- package/dist/commands-bulk.js +0 -1673
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "vercel",
|
|
3
|
-
"version": "65.
|
|
3
|
+
"version": "65.2.0",
|
|
4
4
|
"type": "module",
|
|
5
5
|
"preferGlobal": true,
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,51 +35,51 @@
|
|
|
35
35
|
"undici": "5.29.0",
|
|
36
36
|
"uuid": "14.0.1",
|
|
37
37
|
"zod": "4.1.11",
|
|
38
|
-
"@vercel/backends": "
|
|
39
|
-
"@vercel/build-utils": "
|
|
40
|
-
"@vercel/cli-auth": "0.3.
|
|
41
|
-
"@vercel/cli-config": "0.3.
|
|
42
|
-
"@vercel/container": "
|
|
38
|
+
"@vercel/backends": "22.0.1",
|
|
39
|
+
"@vercel/build-utils": "15.0.1",
|
|
40
|
+
"@vercel/cli-auth": "0.3.12",
|
|
41
|
+
"@vercel/cli-config": "0.3.3",
|
|
42
|
+
"@vercel/container": "22.0.1",
|
|
43
43
|
"@vercel/detect-agent": "1.2.7",
|
|
44
|
-
"@vercel/elysia": "
|
|
45
|
-
"@vercel/express": "
|
|
46
|
-
"@vercel/fastify": "
|
|
47
|
-
"@vercel/go": "
|
|
48
|
-
"@vercel/h3": "
|
|
49
|
-
"@vercel/hono": "
|
|
50
|
-
"@vercel/hydrogen": "
|
|
51
|
-
"@vercel/koa": "
|
|
52
|
-
"@vercel/nestjs": "
|
|
53
|
-
"@vercel/next": "
|
|
54
|
-
"@vercel/
|
|
55
|
-
"@vercel/python": "27.0.0",
|
|
44
|
+
"@vercel/elysia": "22.0.1",
|
|
45
|
+
"@vercel/express": "22.0.1",
|
|
46
|
+
"@vercel/fastify": "22.0.1",
|
|
47
|
+
"@vercel/go": "25.0.1",
|
|
48
|
+
"@vercel/h3": "22.0.1",
|
|
49
|
+
"@vercel/hono": "22.0.1",
|
|
50
|
+
"@vercel/hydrogen": "23.0.1",
|
|
51
|
+
"@vercel/koa": "22.0.1",
|
|
52
|
+
"@vercel/nestjs": "22.0.1",
|
|
53
|
+
"@vercel/next": "26.0.1",
|
|
54
|
+
"@vercel/python": "28.0.1",
|
|
56
55
|
"@vercel/python-analysis": "0.15.2",
|
|
57
|
-
"@vercel/redwood": "
|
|
58
|
-
"@vercel/remix-builder": "
|
|
59
|
-
"@vercel/ruby": "
|
|
60
|
-
"@vercel/rust": "
|
|
61
|
-
"@vercel/static-build": "
|
|
56
|
+
"@vercel/redwood": "24.0.1",
|
|
57
|
+
"@vercel/remix-builder": "27.0.1",
|
|
58
|
+
"@vercel/ruby": "24.0.1",
|
|
59
|
+
"@vercel/rust": "23.0.1",
|
|
60
|
+
"@vercel/static-build": "24.0.1",
|
|
61
|
+
"@vercel/node": "27.0.1"
|
|
62
62
|
},
|
|
63
63
|
"builders": {
|
|
64
|
-
"@vercel/backends": "
|
|
65
|
-
"@vercel/container": "
|
|
66
|
-
"@vercel/elysia": "
|
|
67
|
-
"@vercel/express": "
|
|
68
|
-
"@vercel/fastify": "
|
|
69
|
-
"@vercel/go": "
|
|
70
|
-
"@vercel/h3": "
|
|
71
|
-
"@vercel/hono": "
|
|
72
|
-
"@vercel/hydrogen": "
|
|
73
|
-
"@vercel/koa": "
|
|
74
|
-
"@vercel/nestjs": "
|
|
75
|
-
"@vercel/next": "
|
|
76
|
-
"@vercel/node": "
|
|
77
|
-
"@vercel/python": "
|
|
78
|
-
"@vercel/redwood": "
|
|
79
|
-
"@vercel/remix-builder": "
|
|
80
|
-
"@vercel/ruby": "
|
|
81
|
-
"@vercel/rust": "
|
|
82
|
-
"@vercel/static-build": "
|
|
64
|
+
"@vercel/backends": "22.0.1",
|
|
65
|
+
"@vercel/container": "22.0.1",
|
|
66
|
+
"@vercel/elysia": "22.0.1",
|
|
67
|
+
"@vercel/express": "22.0.1",
|
|
68
|
+
"@vercel/fastify": "22.0.1",
|
|
69
|
+
"@vercel/go": "25.0.1",
|
|
70
|
+
"@vercel/h3": "22.0.1",
|
|
71
|
+
"@vercel/hono": "22.0.1",
|
|
72
|
+
"@vercel/hydrogen": "23.0.1",
|
|
73
|
+
"@vercel/koa": "22.0.1",
|
|
74
|
+
"@vercel/nestjs": "22.0.1",
|
|
75
|
+
"@vercel/next": "26.0.1",
|
|
76
|
+
"@vercel/node": "27.0.1",
|
|
77
|
+
"@vercel/python": "28.0.1",
|
|
78
|
+
"@vercel/redwood": "24.0.1",
|
|
79
|
+
"@vercel/remix-builder": "27.0.1",
|
|
80
|
+
"@vercel/ruby": "24.0.1",
|
|
81
|
+
"@vercel/rust": "23.0.1",
|
|
82
|
+
"@vercel/static-build": "24.0.1"
|
|
83
83
|
},
|
|
84
84
|
"devDependencies": {
|
|
85
85
|
"@bufbuild/protobuf": "2.12.0",
|
|
@@ -128,6 +128,7 @@
|
|
|
128
128
|
"@types/ws": "8.18.1",
|
|
129
129
|
"@types/yauzl-promise": "2.1.0",
|
|
130
130
|
"@vercel/agent-eval": "^0.7.1",
|
|
131
|
+
"@vercel/sandbox": "3.3.0",
|
|
131
132
|
"@vercel/sdk": "^1.19.6",
|
|
132
133
|
"@vltpkg/graph": "1.0.6",
|
|
133
134
|
"@vltpkg/package-info": "1.0.6",
|
|
@@ -212,36 +213,37 @@
|
|
|
212
213
|
"ws": "8.18.0",
|
|
213
214
|
"xdg-app-paths": "5.1.0",
|
|
214
215
|
"yauzl-promise": "2.1.3",
|
|
215
|
-
"@vercel-internals/builder-orchestration": "1.0.
|
|
216
|
-
"@vercel-internals/cli-builder-integration": "1.0.29",
|
|
216
|
+
"@vercel-internals/builder-orchestration": "1.0.28",
|
|
217
217
|
"@vercel-internals/constants": "1.0.4",
|
|
218
|
+
"@vercel-internals/cli-builder-integration": "1.0.31",
|
|
218
219
|
"@vercel-internals/get-package-json": "1.0.0",
|
|
220
|
+
"@vercel-internals/runtimes": "1.2.2",
|
|
219
221
|
"@vercel-internals/local-schedules": "0.0.4",
|
|
220
|
-
"@vercel-internals/
|
|
221
|
-
"@vercel-internals/
|
|
222
|
-
"@vercel
|
|
223
|
-
"@vercel/client": "18.9.0",
|
|
222
|
+
"@vercel-internals/service-topology": "1.0.26",
|
|
223
|
+
"@vercel-internals/types": "3.0.30",
|
|
224
|
+
"@vercel/client": "18.9.2",
|
|
224
225
|
"@vercel/error-utils": "2.2.1",
|
|
225
|
-
"@vercel/fs-detectors": "7.10.0",
|
|
226
226
|
"@vercel/frameworks": "3.35.0",
|
|
227
|
-
"@vercel/
|
|
228
|
-
"@vercel/routing-utils": "6.6.0"
|
|
227
|
+
"@vercel/fs-detectors": "7.10.2",
|
|
228
|
+
"@vercel/routing-utils": "6.6.0",
|
|
229
|
+
"@vercel/functions": "3.10.3"
|
|
229
230
|
},
|
|
230
231
|
"optionalDependencies": {
|
|
231
|
-
"@vercel/vc-native-darwin-arm64": "65.
|
|
232
|
-
"@vercel/vc-native-darwin-x64": "65.
|
|
233
|
-
"@vercel/vc-native-linux-arm64": "65.
|
|
234
|
-
"@vercel/vc-native-linux-arm64-musl": "65.
|
|
235
|
-
"@vercel/vc-native-linux-x64": "65.
|
|
236
|
-
"@vercel/vc-native-linux-x64-musl": "65.
|
|
237
|
-
"@vercel/vc-native-win32-arm64": "65.
|
|
238
|
-
"@vercel/vc-native-win32-x64": "65.
|
|
232
|
+
"@vercel/vc-native-darwin-arm64": "65.2.0",
|
|
233
|
+
"@vercel/vc-native-darwin-x64": "65.2.0",
|
|
234
|
+
"@vercel/vc-native-linux-arm64": "65.2.0",
|
|
235
|
+
"@vercel/vc-native-linux-arm64-musl": "65.2.0",
|
|
236
|
+
"@vercel/vc-native-linux-x64": "65.2.0",
|
|
237
|
+
"@vercel/vc-native-linux-x64-musl": "65.2.0",
|
|
238
|
+
"@vercel/vc-native-win32-arm64": "65.2.0",
|
|
239
|
+
"@vercel/vc-native-win32-x64": "65.2.0"
|
|
239
240
|
},
|
|
240
241
|
"scripts": {
|
|
241
242
|
"test": "node scripts/test.mjs --run",
|
|
242
243
|
"test-e2e": "node scripts/test.mjs --run test/e2e-",
|
|
243
244
|
"test-e2e-node-all-versions": "rimraf test/fixtures/integration && vitest run --config ./vitest.config.mts test/integration-1.test.ts test/integration-2.test.ts test/integration-3.test.ts test/integration-link-env-pull.test.ts",
|
|
244
245
|
"test-dev": "vitest run --config ./vitest.config.mts test/dev/",
|
|
246
|
+
"test-testserver": "node scripts/start-testserver-sandbox.mjs -- vitest run --config ./vitest.testserver.config.mts",
|
|
245
247
|
"coverage": "codecov",
|
|
246
248
|
"build": "node scripts/build.mjs",
|
|
247
249
|
"build-binary": "node scripts/build-binary.mjs",
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{printRuleMutationReceipt}from"./chunk-UDMEPP3K.js";import"./chunk-RRWEIG6B.js";import{resolveRulesProject,resolveRulesTeam}from"./chunk-SSKMT5SL.js";import"./chunk-KXHUMVXD.js";import"./chunk-YTDK6AHS.js";import{emitRulesArgParseError,getBodyType,handleRulesApiError,outputRulesError,readRuleBody,rulesCollectionPath}from"./chunk-7OMWRRY4.js";import"./chunk-GZNDA6SV.js";import"./chunk-NYKEU7DQ.js";import"./chunk-GHAY4PSD.js";import"./chunk-ID663OJ7.js";import{monitorsAddSubcommand}from"./chunk-AGDMSAYW.js";import"./chunk-773GOZIR.js";import{printError}from"./chunk-OVV5MV5M.js";import"./chunk-67GZ5REA.js";import"./chunk-BS32OUOC.js";import"./chunk-T5LBVZWY.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-FPC5LINQ.js";import"./chunk-RH2SQQWH.js";import"./chunk-FRSHC2HN.js";import"./chunk-3XDTQFBL.js";import"./chunk-WDWYKX2I.js";import"./chunk-X7CLBXWL.js";import"./chunk-JDVUKDX3.js";import"./chunk-4NTBYNFR.js";import{parseArguments}from"./chunk-XBTLXKOI.js";import"./chunk-F53OKXYI.js";import{validateJsonOutput}from"./chunk-RAN5LUZY.js";import{getFlagsSpecification}from"./chunk-ODB7LEAO.js";import"./chunk-4SAVH3H7.js";import{isAPIError}from"./chunk-AZ5OUZPP.js";import"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-UGZ3HFHI.js";import"./chunk-RM3ZDRYE.js";import"./chunk-OO572JUC.js";import"./chunk-D3AHZ5LI.js";import"./chunk-2GHZGOWT.js";import"./chunk-YHPPP3SF.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BZENIQ7N.js";function applyScopeFlag(client,body,type,scope,flags,jsonOutput){if(Object.hasOwn(body,"ruleScope"))return flags["--project"]||flags["--all"]?outputRulesError(client,jsonOutput,"SCOPE_CONFLICT","Specify monitor scope either in the body or with --project/--all, not both."):void 0;if(flags["--project"]){body.ruleScope=type==="custom"?{type:"project",projectId:scope.projectId}:{type:"include",projectIds:[scope.projectId]};return}if(flags["--all"]){if(type==="custom")return outputRulesError(client,jsonOutput,"INVALID_SCOPE","Custom monitors must target one project. Use --project <name-or-id>.");body.ruleScope={type:"all"};return}return outputRulesError(client,jsonOutput,"MISSING_SCOPE","Missing monitor scope. Add ruleScope to the body, or pass --project or --all.")}async function resolveCreateScope(client,flags,jsonOutput){return flags["--project"]&&flags["--all"]?outputRulesError(client,jsonOutput,"MUTUAL_EXCLUSIVITY","Cannot specify both --all and --project. Use one or the other."):flags["--project"]?resolveRulesProject(client,flags["--project"],jsonOutput,"monitors add"):resolveRulesTeam(client,jsonOutput)}async function add(client,argv,api){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(monitorsAddSubcommand.options))}catch(error){return emitRulesArgParseError(client,error,"monitors add --project <name-or-id> --body <path>"),printError(error),2}let flags=parsedArgs.flags,format=validateJsonOutput(flags);if(!format.valid)return outputRulesError(client,!1,"INVALID_ARGUMENTS",format.error);if(!flags["--body"])return outputRulesError(client,format.jsonOutput,"MISSING_ARGUMENTS","Missing required flag: --body <PATH>.");let body=readRuleBody(client,flags["--body"],format.jsonOutput);if(typeof body=="number")return body;let type=getBodyType(body);if(!type)return outputRulesError(client,format.jsonOutput,"INVALID_RULE_TYPE","Create body must set a supported monitor type.");if(Object.hasOwn(body,"ruleScope")&&(flags["--project"]||flags["--all"]))return outputRulesError(client,format.jsonOutput,"SCOPE_CONFLICT","Specify monitor scope either in the body or with --project/--all, not both.");if(type==="custom"&&flags["--all"])return outputRulesError(client,format.jsonOutput,"INVALID_SCOPE","Custom monitors must target one project. Use --project <name-or-id>.");let scope=await resolveCreateScope(client,flags,format.jsonOutput);if(typeof scope=="number")return scope;let scopeError=applyScopeFlag(client,body,type,scope,flags,format.jsonOutput);if(scopeError!==void 0)return scopeError;output_manager_default.spinner("Creating monitor\u2026");try{let response=await client.fetch(rulesCollectionPath(api,scope.teamId),{method:"POST",body});return format.jsonOutput?client.stdout.write(`${JSON.stringify(response,null,2)}
|
|
8
|
-
`):printRuleMutationReceipt("Created",response[api.itemKey],client.argv),0}catch(error){if(isAPIError(error))return handleRulesApiError(client,error,format.jsonOutput);throw error}finally{output_manager_default.stopSpinner()}}export{add as default};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{emitVcrArgParseError,handleVcrApiError,resolveVcrScope,validateVcrJsonOutput}from"./chunk-XD2FF2PZ.js";import{outputError}from"./chunk-NYKEU7DQ.js";import"./chunk-BHWEIKSP.js";import{addSubcommand}from"./chunk-3GXZPT7T.js";import"./chunk-VCV3H73W.js";import"./chunk-LJIQZ3LU.js";import"./chunk-KUGFILF5.js";import"./chunk-FBYA6LLM.js";import"./chunk-SCV7XEEO.js";import{printError}from"./chunk-OVV5MV5M.js";import"./chunk-T5LBVZWY.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-FPC5LINQ.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-RH2SQQWH.js";import"./chunk-FRSHC2HN.js";import"./chunk-3XDTQFBL.js";import"./chunk-WDWYKX2I.js";import"./chunk-X7CLBXWL.js";import"./chunk-JDVUKDX3.js";import"./chunk-4NTBYNFR.js";import{parseArguments}from"./chunk-XBTLXKOI.js";import"./chunk-F53OKXYI.js";import"./chunk-RAN5LUZY.js";import{getFlagsSpecification}from"./chunk-ODB7LEAO.js";import"./chunk-4SAVH3H7.js";import{isAPIError}from"./chunk-AZ5OUZPP.js";import{packageName}from"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-UGZ3HFHI.js";import"./chunk-RM3ZDRYE.js";import"./chunk-OO572JUC.js";import"./chunk-D3AHZ5LI.js";import"./chunk-2GHZGOWT.js";import"./chunk-YHPPP3SF.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BZENIQ7N.js";async function add(client,argv,telemetry){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(addSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,"vcr create <name> --project <name-or-id>"),printError(err),2}let fr=validateVcrJsonOutput(client,parsedArgs.flags);if(typeof fr=="number")return fr;let name=parsedArgs.args[0],project=parsedArgs.flags["--project"];if(telemetry.trackCliOptionProject(project),telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]),!name)return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message:`Missing repository name. Example: ${packageName} vcr create <name>`,next:[{command:buildCommandWithGlobalFlags(client.argv,"vcr create <name>"),when:"Replace <name> with the repository name to create"}]},2),outputError(client,fr.jsonOutput,"MISSING_ARGUMENTS","Usage: `vercel vcr create <name>`");let scope=await resolveVcrScope(client,{project,jsonOutput:fr.jsonOutput});if(typeof scope=="number")return scope;let path=`/v1/vcr/repository?teamId=${encodeURIComponent(scope.teamId)}`;output_manager_default.spinner("Creating repository...");try{let created=await client.fetch(path,{method:"POST",body:{projectId:scope.projectId,name}});return fr.jsonOutput?client.stdout.write(`${JSON.stringify(created,null,2)}
|
|
8
|
-
`):output_manager_default.success(`Created repository ${created.repository?.name??name}`),0}catch(err){if(isAPIError(err))return handleVcrApiError(client,err,fr.jsonOutput,{retry:{command:buildCommandWithGlobalFlags(client.argv,"vcr ls"),when:"List existing repositories (a name conflict means it already exists)"}});throw err}finally{output_manager_default.stopSpinner()}}export{add as default};
|
|
@@ -1,8 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{parseTeamRefs,teamRefBody}from"./chunk-LSF7FY6X.js";import{repositoryPermissionsPath}from"./chunk-DFVNL5ML.js";import{emitVcrArgParseError,resolveVcrScope,validateVcrJsonOutput}from"./chunk-XD2FF2PZ.js";import{outputError}from"./chunk-NYKEU7DQ.js";import{require_async_sema}from"./chunk-NZ2TFADV.js";import"./chunk-BHWEIKSP.js";import{permissionsAddSubcommand}from"./chunk-LJIQZ3LU.js";import"./chunk-FBYA6LLM.js";import"./chunk-SCV7XEEO.js";import{printError}from"./chunk-OVV5MV5M.js";import"./chunk-T5LBVZWY.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-FPC5LINQ.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-RH2SQQWH.js";import"./chunk-FRSHC2HN.js";import"./chunk-3XDTQFBL.js";import"./chunk-WDWYKX2I.js";import"./chunk-X7CLBXWL.js";import"./chunk-JDVUKDX3.js";import"./chunk-4NTBYNFR.js";import{parseArguments}from"./chunk-XBTLXKOI.js";import"./chunk-F53OKXYI.js";import"./chunk-RAN5LUZY.js";import{getFlagsSpecification}from"./chunk-ODB7LEAO.js";import"./chunk-4SAVH3H7.js";import{isAPIError}from"./chunk-AZ5OUZPP.js";import{packageName}from"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-UGZ3HFHI.js";import"./chunk-RM3ZDRYE.js";import"./chunk-OO572JUC.js";import"./chunk-D3AHZ5LI.js";import"./chunk-2GHZGOWT.js";import"./chunk-YHPPP3SF.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_async_sema=__toESM(require_async_sema(),1);var USAGE="vcr permissions <repository> add <team>[,<team>...]";async function add(client,argv,telemetry){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(permissionsAddSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,USAGE),printError(err),2}let fr=validateVcrJsonOutput(client,parsedArgs.flags);if(typeof fr=="number")return fr;let repository=parsedArgs.args[0],teamRefs=parseTeamRefs(parsedArgs.args.slice(2)),project=parsedArgs.flags["--project"];if(telemetry.trackCliOptionProject(project),telemetry.trackCliOptionFormat(parsedArgs.flags["--format"]),teamRefs.length===0)return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message:`Missing team. Example: ${packageName} vcr permissions ${repository} add team_1a2b3c4d`,next:[{command:buildCommandWithGlobalFlags(client.argv,USAGE),when:"Replace <team> with a team id or slug (comma-separate multiple teams)"}]},2),outputError(client,fr.jsonOutput,"MISSING_ARGUMENTS",`Usage: \`vercel ${USAGE}\``);let scope=await resolveVcrScope(client,{project,jsonOutput:fr.jsonOutput});if(typeof scope=="number")return scope;let path=repositoryPermissionsPath(scope,repository),added=[],failed=[];output_manager_default.spinner(`Sharing ${repository} with ${teamRefs.length===1?teamRefs[0]:`${teamRefs.length} teams`}...`);let sema=new import_async_sema.default(10),results;try{results=await Promise.all(teamRefs.map(async team=>{await sema.acquire();try{let result=await client.fetch(path,{method:"POST",body:teamRefBody(team)});return{ok:!0,team,permission:result.permission}}catch(err){if(!isAPIError(err))throw err;let message=err.serverMessage||`API error (${err.status}).`;return{ok:!1,team,failure:{team,code:err.code||"API_ERROR",message}}}finally{sema.release()}}))}finally{output_manager_default.stopSpinner()}for(let result of results)result.ok?(added.push(result.permission),fr.jsonOutput||output_manager_default.success(`Shared ${repository} with ${result.permission?.teamSlug??result.team}`)):(failed.push(result.failure),fr.jsonOutput||output_manager_default.error(`Failed to share ${repository} with ${result.team}: ${result.failure.message}`));return failed.length>0&&outputAgentError(client,{status:"error",reason:AGENT_REASON.API_ERROR,message:`Failed to share ${repository} with ${failed.map(f=>`${f.team} (${f.message})`).join(", ")}`},1),fr.jsonOutput&&client.stdout.write(`${JSON.stringify({permissions:added,failed},null,2)}
|
|
8
|
-
`),failed.length>0?1:0}export{add as default};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{DEFAULT_TAG,buildRepositoryReference,parseNameArg,validateImageParts}from"./chunk-HEGJZJO7.js";import{VCR_ENGINES,emitVcrArgParseError,isBuildxAvailable,isEngineInstalled,pushCompressionArgs,reportEngineCommandFailure,reportEnginePushFailure,resolveRegistry,resolveVcrScope,runEngine,splitPassthrough,validateVcrChoice}from"./chunk-XD2FF2PZ.js";import{outputError}from"./chunk-NYKEU7DQ.js";import"./chunk-BHWEIKSP.js";import{buildSubcommand}from"./chunk-3GXZPT7T.js";import"./chunk-VCV3H73W.js";import"./chunk-LJIQZ3LU.js";import"./chunk-KUGFILF5.js";import"./chunk-FBYA6LLM.js";import"./chunk-SCV7XEEO.js";import{printError}from"./chunk-OVV5MV5M.js";import"./chunk-T5LBVZWY.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-FPC5LINQ.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-RH2SQQWH.js";import"./chunk-FRSHC2HN.js";import"./chunk-3XDTQFBL.js";import"./chunk-WDWYKX2I.js";import"./chunk-X7CLBXWL.js";import"./chunk-JDVUKDX3.js";import"./chunk-4NTBYNFR.js";import{parseArguments}from"./chunk-XBTLXKOI.js";import"./chunk-F53OKXYI.js";import"./chunk-RAN5LUZY.js";import{getFlagsSpecification}from"./chunk-ODB7LEAO.js";import"./chunk-4SAVH3H7.js";import"./chunk-AZ5OUZPP.js";import"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-UGZ3HFHI.js";import"./chunk-RM3ZDRYE.js";import"./chunk-OO572JUC.js";import"./chunk-D3AHZ5LI.js";import"./chunk-2GHZGOWT.js";import"./chunk-YHPPP3SF.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BZENIQ7N.js";var DEFAULT_PLATFORM="linux/amd64";async function build(client,telemetry){let{own,passthrough}=splitPassthrough(client.argv),parsedArgs;try{parsedArgs=parseArguments(own,getFlagsSpecification(buildSubcommand.options))}catch(err){return emitVcrArgParseError(client,err,"vcr build <engine> [path] [name[:tag]]"),printError(err),2}let[engineArg,pathArg,nameArg]=parsedArgs.args.slice(2),project=parsedArgs.flags["--project"],platform=parsedArgs.flags["--platform"],push=!!parsedArgs.flags["--push"];if(telemetry.trackCliArgumentEngine(engineArg),telemetry.trackCliArgumentPath(pathArg),telemetry.trackCliArgumentName(nameArg),telemetry.trackCliOptionProject(project),telemetry.trackCliOptionPlatform(platform),telemetry.trackCliFlagPush(push),!engineArg){let message=`Missing engine. Choose one of: ${VCR_ENGINES.join(", ")}.`;return outputAgentError(client,{status:"error",reason:AGENT_REASON.MISSING_ARGUMENTS,message,next:[{command:buildCommandWithGlobalFlags(client.argv,"vcr build docker"),when:"Replace docker with the container tool you use"}]},2),outputError(client,!1,"MISSING_ARGUMENTS",message)}let choiceError=validateVcrChoice(client,"engine",engineArg,VCR_ENGINES,!1);if(typeof choiceError=="number")return choiceError;let engine=engineArg;if(!isEngineInstalled(engine)){let message=`\`${engine}\` is not installed or not on your PATH. Install it and try again.`;return outputAgentError(client,{status:"error",reason:"engine_not_found",message},1),outputError(client,!1,"ENGINE_NOT_FOUND",message)}let scope=await resolveVcrScope(client,{project,jsonOutput:!1});if(typeof scope=="number")return scope;let parsed=parseNameArg(nameArg,scope.projectName);if("error"in parsed)return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:parsed.error},2),outputError(client,!1,"INVALID_ARGUMENTS",parsed.error);let validationError=validateImageParts(parsed);if(validationError)return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:validationError},2),outputError(client,!1,"INVALID_ARGUMENTS",validationError);let ref=`${buildRepositoryReference({registry:resolveRegistry(),teamSlug:scope.teamSlug,projectName:scope.projectName,repository:parsed.repository})}:${parsed.tag??DEFAULT_TAG}`,contextPath=pathArg??".",buildPlatform=platform??DEFAULT_PLATFORM;if(push&&engine==="docker"&&await isBuildxAvailable()){let outputSpec=`type=image,name=${ref},push=true,oci-mediatypes=true,compression=zstd,compression-level=3,force-compression=true`,engineArgs2=["buildx","build","--platform",buildPlatform,"--output",outputSpec,...passthrough,contextPath];output_manager_default.log(`Running: ${engine} ${engineArgs2.join(" ")}`);let result2=await runEngine(engine,engineArgs2,{cwd:client.cwd,captureStderr:!0});return result2.exitCode!==0?reportEnginePushFailure(client,engine,"buildx build",result2):(output_manager_default.success(`Built and pushed ${ref} (zstd compression)`),0)}push&&engine==="docker"&&output_manager_default.warn("Docker Buildx is not available; building and pushing without zstd compression. Install Buildx for smaller, faster image pushes.");let engineArgs=["build","--platform",buildPlatform,"--tag",ref,...passthrough,contextPath];output_manager_default.log(`Running: ${engine} ${engineArgs.join(" ")}`);let result=await runEngine(engine,engineArgs,{cwd:client.cwd});if(result.exitCode!==0)return reportEngineCommandFailure(client,engine,"build",result);if(!push)return output_manager_default.success(`Built ${ref}`),output_manager_default.log(`Push it with \`${buildCommandWithGlobalFlags(client.argv,`vcr push ${engine}${nameArg?` ${nameArg}`:""}`)}\`.`),0;let pushArgs=["push",...pushCompressionArgs(engine),ref];output_manager_default.log(`Running: ${engine} ${pushArgs.join(" ")}`);let pushResult=await runEngine(engine,pushArgs,{cwd:client.cwd,captureStderr:!0});if(pushResult.exitCode!==0)return reportEnginePushFailure(client,engine,"push",pushResult);let compressed=engine!=="docker";return output_manager_default.success(`Built and pushed ${ref}${compressed?" (zstd compression)":""}`),0}export{build as default};
|
|
@@ -1,7 +0,0 @@
|
|
|
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{getEnvTargetPlaceholder}from"./chunk-AW7DEWIM.js";import{deploymentOption,environmentOption,projectOption,targetOption,yesOption}from"./chunk-ODB7LEAO.js";import{packageName}from"./chunk-JESNVRVR.js";var buildCommand={name:"build",aliases:[],description:"Build the project.",arguments:[],options:[{name:"prod",description:"Build a production deployment",shorthand:null,type:Boolean,deprecated:!1},{...environmentOption,description:"Environment to build for: production, preview, or a custom environment (default: preview)"},targetOption,{name:"output",description:"Directory where built assets will be written to",shorthand:null,argument:"DIR",type:String,deprecated:!1},{...yesOption,description:"Skip the confirmation prompt about pulling environment variables and project settings when not found locally"},{name:"standalone",description:"Create a standalone build with all dependencies inlined into function output folders",shorthand:null,type:Boolean,deprecated:!1},{...deploymentOption,description:"Deployment ID to pull environment variables from (e.g. dpl_xxx)"},{name:"id",shorthand:null,type:String,deprecated:!0},projectOption],examples:[{name:"Build the project",value:`${packageName} build`},{name:"Build the project in a specific directory",value:`${packageName} build --cwd ./path-to-project`},{name:"Build with deployment-scoped environment variables",value:`${packageName} build --deployment dpl_xxx`}]};var pullCommand={name:"pull",aliases:[],description:"Pull Environment Variables and project settings into .vercel",arguments:[{name:"project-path",required:!1}],options:[{name:"environment",description:"Deployment environment (default: development)",argument:"ENVIRONMENT",shorthand:"e",type:String,deprecated:!1},{name:"git-branch",description:"Specify the Git branch to pull specific Environment Variables for",argument:"NAME",shorthand:null,type:String,deprecated:!1},{name:"prod",shorthand:null,type:Boolean,deprecated:!0},{...yesOption,description:"Skip questions when setting up new project using default scope and settings"},projectOption],examples:[{name:"Pull the latest Environment Variables and Project Settings from the cloud",value:`${packageName} pull`},{name:"Pull the latest Environment Variables and Project Settings from the cloud targeting a directory",value:`${packageName} pull ./path-to-project`},{name:"Pull for a specific environment",value:`${packageName} pull --environment=${getEnvTargetPlaceholder()}`},{name:"Pull for a preview feature branch",value:`${packageName} pull --environment=preview --git-branch=feature-branch`},{name:"Pull Environment Variables into an application env file with `vercel env pull`",value:`${packageName} env pull`}]};export{buildCommand,pullCommand};
|
|
@@ -1,7 +0,0 @@
|
|
|
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{imageAggregateCommand}from"./chunk-VCV3H73W.js";import{permissionsAggregateCommand}from"./chunk-LJIQZ3LU.js";import{tagsAggregateCommand}from"./chunk-KUGFILF5.js";import{formatOption,jsonOption,limitOption,projectOption,yesOption}from"./chunk-ODB7LEAO.js";import{packageName}from"./chunk-JESNVRVR.js";var projectScopeOption={...projectOption,shorthand:"p",description:"Project name or ID (default: linked project)."},nextOption={name:"next",shorthand:null,type:String,deprecated:!1,description:"Continue from a previous response",argument:"CURSOR"},cursorOption={name:"cursor",shorthand:"c",type:String,deprecated:!0,description:"Cursor from a previous page to continue listing from",argument:"STRING"},platformOption={name:"platform",shorthand:null,type:String,deprecated:!1,description:"Target platform for the build (default: linux/amd64).",argument:"PLATFORM"},pushOption={name:"push",shorthand:null,type:Boolean,deprecated:!1,description:"Push the image after building. With Docker this builds and pushes in one step (Buildx enables zstd compression); Podman and Buildah build, then push with zstd compression."},publicOption={name:"public",shorthand:null,type:String,deprecated:!1,description:"Set the repository visibility: `true` for public, `false` for private.",argument:"BOOLEAN",choices:["true","false"]},listSubcommand={name:"ls",aliases:["list"],description:"List container registry repositories for a project",arguments:[],options:[projectScopeOption,limitOption,nextOption,cursorOption,formatOption,jsonOption],examples:[{name:"List repositories in the linked project",value:`${packageName} vcr ls`},{name:"List repositories for a specific project as JSON",value:`${packageName} vcr ls --project my-app --json`}]},inspectSubcommand={name:"inspect",aliases:["get"],description:"Show details for a single repository",arguments:[{name:"repository",required:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Inspect a repository by name",value:`${packageName} vcr inspect my-repository`}]},addSubcommand={name:"create",aliases:["add"],description:"Create a container registry repository",arguments:[{name:"name",required:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Create a repository",value:`${packageName} vcr create my-repository`}]},configSubcommand={name:"update",aliases:["config"],description:"Update a container registry repository, such as the repository's visibility",arguments:[{name:"repository",required:!0}],options:[publicOption,projectScopeOption,formatOption,jsonOption],examples:[{name:"Make a repository public",value:`${packageName} vcr update my-repository --public true`},{name:"Make a repository private",value:`${packageName} vcr update my-repository --public false`}]},removeSubcommand={name:"delete",aliases:["rm","del","remove"],description:"Delete a container registry repository",arguments:[{name:"repository",required:!0}],options:[projectScopeOption,yesOption,formatOption,jsonOption],examples:[{name:"Delete a repository",value:`${packageName} vcr delete my-repository`},{name:"Delete a repository without the confirmation prompt",value:`${packageName} vcr delete my-repository --yes`}]},loginSubcommand={name:"login",aliases:[],description:"Authenticate a container tool (docker, podman, or buildah) with the Vercel Container Registry",arguments:[{name:"engine",required:!0}],options:[projectScopeOption,formatOption,jsonOption],examples:[{name:"Log in with Docker",value:`${packageName} vcr login docker`},{name:"Log in with Podman",value:`${packageName} vcr login podman`},{name:"Log in with Buildah",value:`${packageName} vcr login buildah`},{name:"Log in for a specific project",value:`${packageName} vcr login docker --project my-app`}]},buildSubcommand={name:"build",aliases:[],description:"Build a container image tagged for the Vercel Container Registry by shelling out to your container tool (docker, podman, or buildah)",arguments:[{name:"engine",required:!0},{name:"path",required:!1},{name:"name",required:!1}],options:[projectScopeOption,platformOption,pushOption],examples:[{name:"Build the current directory into the linked project (repository defaults to the project name, tag to latest)",value:`${packageName} vcr build docker`},{name:"Build and push in one step (Docker Buildx enables zstd compression)",value:`${packageName} vcr build docker --push`},{name:"Build a specific context path with a repository and tag",value:`${packageName} vcr build docker ./app my-api:1.2.3`},{name:"Pass extra flags through to the container tool",value:`${packageName} vcr build docker . -- --no-cache --build-arg KEY=value`}]},pushSubcommand={name:"push",aliases:[],description:"Push a container image to the Vercel Container Registry by shelling out to your container tool (docker, podman, or buildah)",arguments:[{name:"engine",required:!0},{name:"name",required:!1}],options:[projectScopeOption],examples:[{name:"Push the linked project image (repository defaults to the project name, tag to latest)",value:`${packageName} vcr push docker`},{name:"Push a specific repository and tag",value:`${packageName} vcr push docker my-api:1.2.3`}]},vcrCommand={name:"vcr",aliases:[],description:"Manage Vercel Container Registry repositories and images (see `vcr image`).",arguments:[],subcommands:[listSubcommand,inspectSubcommand,addSubcommand,configSubcommand,removeSubcommand,loginSubcommand,buildSubcommand,pushSubcommand,tagsAggregateCommand,imageAggregateCommand,permissionsAggregateCommand],options:[],examples:[{name:"List repositories in the linked project",value:`${packageName} vcr ls`},{name:"Create a repository",value:`${packageName} vcr create my-app`},{name:"List images in a repository",value:`${packageName} vcr image ls my-app`}]};export{listSubcommand,inspectSubcommand,addSubcommand,configSubcommand,removeSubcommand,loginSubcommand,buildSubcommand,pushSubcommand,vcrCommand};
|
|
@@ -1,31 +0,0 @@
|
|
|
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{applyEdits,init_main,modify,parse,printParseErrorCode}from"./chunk-J24BABG4.js";import{output_manager_default}from"./chunk-UGZ3HFHI.js";import{readFile as readFile3,writeFile as writeFile3}from"node:fs/promises";import{access as access2}from"node:fs/promises";import{dirname as dirname3,join as join3,resolve}from"node:path";import{homedir}from"node:os";import{spawn}from"node:child_process";import{KNOWN_AGENTS}from"@vercel/detect-agent";import{z}from"zod";import{join as join2}from"node:path";init_main();import{readFile,writeFile,mkdir,copyFile,access,chmod,lstat,stat,link,unlink}from"node:fs/promises";import{isDeepStrictEqual}from"node:util";import{dirname}from"node:path";import{parse as tomlParse,stringify as tomlStringify}from"smol-toml";async function pathExists(path){try{return await access(path),!0}catch{return!1}}async function isFile(path){try{return(await stat(path)).isFile()}catch{return!1}}async function isSymlink(path){try{return(await lstat(path)).isSymbolicLink()}catch{return!1}}async function readFileOrNull(path){try{return await readFile(path,"utf8")}catch(err){if(err.code==="ENOENT")return null;throw err}}function isPlainObject(value){return typeof value=="object"&&value!==null&&!Array.isArray(value)&&Object.getPrototypeOf(value)===Object.prototype}function deepMerge(base,patch){let out={...base};for(let[key,patchValue]of Object.entries(patch)){let baseValue=out[key];isPlainObject(baseValue)&&isPlainObject(patchValue)?out[key]=deepMerge(baseValue,patchValue):out[key]=patchValue}return out}function detectJsonFormatting(text){let eol=text.includes(`\r
|
|
8
|
-
`)?`\r
|
|
9
|
-
`:`
|
|
10
|
-
`,indent=text.match(/^([ \t]+)\S/m)?.[1];return indent?.startsWith(" ")?{eol,insertSpaces:!1,tabSize:1}:{eol,insertSpaces:!0,tabSize:indent?.length||2}}function parseJsonObjectOrNull(current,parse2=JSON.parse){if(!current||!current.trim())return null;let raw;try{raw=parse2(current)}catch(err){throw new Error(`existing file is not valid JSON (${err.message})`)}if(!isPlainObject(raw))throw new Error("existing file is not a JSON object");return raw}function mergeJson(current,patch,parse2=JSON.parse){let raw=parseJsonObjectOrNull(current,parse2);if(!current||raw===null)return`${JSON.stringify(deepMerge({},patch),null,2)}
|
|
11
|
-
`;let merged=deepMerge(raw,patch),modifyOptions=current.trim().includes(`
|
|
12
|
-
`)?{formattingOptions:detectJsonFormatting(current)}:{};try{let text=current,splice=(existing,subPatch,path)=>{for(let[key,patchValue]of Object.entries(subPatch)){let existingValue=existing?.[key];isPlainObject(patchValue)&&isPlainObject(existingValue)?splice(existingValue,patchValue,[...path,key]):isDeepStrictEqual(existingValue,patchValue)||(text=applyEdits(text,modify(text,[...path,key],patchValue,modifyOptions)))}};if(splice(raw,patch,[]),isDeepStrictEqual(parse2(text),merged))return text}catch{}return`${JSON.stringify(merged,null,2)}
|
|
13
|
-
`}function mergeJsonc(current,patch){return mergeJson(current,patch,text=>{let errors=[],value=parse(text,errors,{allowTrailingComma:!0}),first=errors[0];if(first)throw new Error(`${printParseErrorCode(first.error)} at offset ${first.offset}`);return value})}function patchSatisfied(existing,patch){for(let[key,patchValue]of Object.entries(patch)){let existingValue=isPlainObject(existing)?existing[key]:void 0;if(isPlainObject(patchValue)&&isPlainObject(existingValue)){if(!patchSatisfied(existingValue,patchValue))return!1}else if(!isDeepStrictEqual(existingValue,patchValue))return!1}return!0}function tomlScalar(value){switch(typeof value){case"string":return JSON.stringify(value);case"number":return Number.isFinite(value)?String(value):null;case"boolean":return String(value);default:return null}}var TOML_BARE_KEY=/^[A-Za-z0-9_-]+$/;function flattenTomlPatch(patch,prefix="",out=new Map){for(let[key,value]of Object.entries(patch)){if(!TOML_BARE_KEY.test(key))return null;if(isPlainObject(value)){if(!flattenTomlPatch(value,prefix?`${prefix}.${key}`:key,out))return null}else{let scalar=tomlScalar(value);if(scalar===null)return null;let section=out.get(prefix);section||(section=new Map,out.set(prefix,section)),section.set(key,scalar)}}return out}var TOML_HEADER=/^\s*\[\[?\s*([^\]]*?)\s*\]\]?\s*(?:#.*)?$/;function mergeToml(current,patch){let parsed={};if(current&¤t.trim())try{parsed=tomlParse(current)}catch(err){throw new Error(`existing file is not valid TOML (${err.message})`)}let legacy=()=>`${tomlStringify(deepMerge(parsed,patch))}
|
|
14
|
-
`;if(!current||!current.trim())return legacy();if(patchSatisfied(parsed,patch))return current;let flat=flattenTomlPatch(patch);if(!flat)return legacy();let crlf=current.includes(`\r
|
|
15
|
-
`),lines=current.split(`
|
|
16
|
-
`),content=line=>line.endsWith("\r")?line.slice(0,-1):line,finish=(line,i)=>i<lines.length&&lines[i]?.endsWith("\r")?`${line}\r`:line,headerAt=i=>{let m=content(lines[i]).match(TOML_HEADER);return m?m[1].split(".").map(s=>s.trim()).join("."):null},sectionRange=name=>{let start=name===""?0:-1;for(let i=0;i<lines.length;i++){let header=headerAt(i);if(header!==null){if(start!==-1)return[start,i];if(name==="")return[0,i];header===name&&(start=i+1)}}return start===-1?null:[start,lines.length]},appendSections=[];for(let[name,keys]of flat){let range=sectionRange(name);if(!range){appendSections.push(`[${name}]`,...[...keys].map(([k,v])=>`${k} = ${v}`));continue}let[start,end]=range,inserts=[];for(let[key,value]of keys){let assignment=new RegExp(`^(\\s*)${key}\\s*=`),replaced=!1;for(let i=start;i<end;i++){let m=content(lines[i]).match(assignment);if(m){lines[i]=finish(`${m[1]}${key} = ${value}`,i),replaced=!0;break}}replaced||inserts.push(`${key} = ${value}`)}if(inserts.length>0){let at=start;for(let i=start;i<end;i++)content(lines[i]).trim()!==""&&(at=i+1);lines.splice(at,0,...inserts.map(l=>finish(l,at)))}}if(appendSections.length>0){for(;lines.length>0&&content(lines[lines.length-1]).trim()==="";)lines.pop();let eol=crlf?"\r":"";lines.push(...["",...appendSections,""].map(l=>l===""?l:`${l}${eol}`))}let result=lines.join(`
|
|
17
|
-
`);try{if(isDeepStrictEqual(tomlParse(result),deepMerge(parsed,patch)))return result}catch{}return legacy()}var MANAGED_BLOCK_START="# >>> vercel ai-gateway >>>",MANAGED_BLOCK_END="# <<< vercel ai-gateway <<<";function upsertManagedBlock(current,body){let block=`${MANAGED_BLOCK_START}
|
|
18
|
-
${body}
|
|
19
|
-
${MANAGED_BLOCK_END}`,existing=current??"",start=existing.indexOf(MANAGED_BLOCK_START),end=existing.indexOf(MANAGED_BLOCK_END);if(start!==-1&&end!==-1&&end>start){let before=existing.slice(0,start),after=existing.slice(end+MANAGED_BLOCK_END.length);return`${before}${block}${after}`}if(existing.length===0)return`${block}
|
|
20
|
-
`;let prefix=existing.endsWith(`
|
|
21
|
-
|
|
22
|
-
`)?"":existing.endsWith(`
|
|
23
|
-
`)?`
|
|
24
|
-
`:`
|
|
25
|
-
|
|
26
|
-
`;return`${existing}${prefix}${block}
|
|
27
|
-
`}async function publishNoClobber(temporary,destination){try{return await link(temporary,destination),!0}catch(error){if(error.code==="EEXIST")return!1;throw error}finally{await unlink(temporary).catch(()=>{})}}async function ensureMode(path,mode){try{await chmod(path,mode)}catch{}}async function backupFile(path,mode){let backupPath=`${path}.bak`;return mode===void 0?(await copyFile(path,backupPath),backupPath):(await ensureMode(backupPath,mode),await writeFile(backupPath,await readFile(path,"utf8"),{mode}),backupPath)}async function writeConfigFile(path,content,mode){await mkdir(dirname(path),{recursive:!0}),mode!==void 0&&await ensureMode(path,mode),await writeFile(path,content,mode===void 0?"utf8":{mode})}var GATEWAY_ANTHROPIC_BASE_URL="https://ai-gateway.vercel.sh",GATEWAY_CODING_AGENT_BASE_URL="https://ai-gateway.vercel.sh/coding-agent/v1",GATEWAY_CURSOR_BASE_URL="https://ai-gateway.vercel.sh/cursor/v1",GATEWAY_CODEX_BASE_URL="https://ai-gateway.vercel.sh/codex/v1",GATEWAY_CLAUDE_CODE_BASE_URL="https://ai-gateway.vercel.sh/claude-code",GATEWAY_API_KEY_ENV="AI_GATEWAY_API_KEY",GATEWAY_DEFAULT_MODEL="anthropic/claude-fable-5",KEY_PLACEHOLDER="__AI_GATEWAY_API_KEY__";function resolveGatewayBaseUrl(override,agentDefault){let trimmed=override?.trim();return trimmed||agentDefault}function maskSecret(secret){return secret&&(secret===KEY_PLACEHOLDER||secret.length<=8?"\u2022\u2022\u2022\u2022":`${secret.slice(0,4)}\u2022\u2022\u2022\u2022${secret.slice(-4)}`)}import{randomUUID}from"node:crypto";import*as fs from"node:fs/promises";import{dirname as dirname2,join}from"node:path";var MAX_RECORD_BYTES=1024*1024;function codeSpan(value){return`\`${value.replace(/[`\r\n]/g,"")}\``}var RECORD_PATTERN=/\.json$/;function claudeAppSupportRoot(home){return process.platform==="darwin"?join(home,"Library","Application Support"):process.platform==="win32"?process.env.APPDATA||join(home,"AppData","Roaming"):join(home,".config")}function toGatewayModelId(model){return model.includes("/")?model:`anthropic/${model}`}async function listSubdirectories(path){try{return(await fs.readdir(path,{withFileTypes:!0})).filter(e=>e.isDirectory()).map(e=>e.name)}catch{return[]}}async function findDestinationIdentity(root){let best=null;for(let account of await listSubdirectories(root))for(let org of await listSubdirectories(join(root,account))){let path=join(root,account,org);try{let stat3=await fs.stat(path);(!best||stat3.mtimeMs>best.mtime)&&(best={path,mtime:stat3.mtimeMs})}catch{}}return best?.path??null}async function readRecord(path){let stat3;try{stat3=await fs.stat(path)}catch{return null}if(!stat3.isFile()||stat3.size>MAX_RECORD_BYTES)return null;try{let raw=await fs.readFile(path,"utf8"),record=JSON.parse(raw);return typeof record!="object"||record===null||Array.isArray(record)?null:{record,bytes:stat3.size}}catch{return null}}async function writeRecordNoClobber(destination,contents){if(await pathExists(destination))return"skipped";await fs.mkdir(dirname2(destination),{recursive:!0});let temp=join(dirname2(destination),`.migrate-${randomUUID()}.tmp`);return await fs.writeFile(temp,contents,{mode:384}),await publishNoClobber(temp,destination)?"copied":"skipped"}async function planClaudeDesktopSessionMigration(home,appSupportRoot=claudeAppSupportRoot(home)){let subscriptionRoot=join(appSupportRoot,"Claude","claude-code-sessions"),gatewayRoot=join(appSupportRoot,"Claude-3p","claude-code-sessions"),destinationDir=await findDestinationIdentity(gatewayRoot);if(!destinationDir)return null;let copies=[],totalBytes=0;for(let account of await listSubdirectories(subscriptionRoot))for(let org of await listSubdirectories(join(subscriptionRoot,account))){let identityDir=join(subscriptionRoot,account,org),names;try{names=await fs.readdir(identityDir)}catch{continue}for(let name of names){if(!RECORD_PATTERN.test(name))continue;let source=join(identityDir,name),destination=join(destinationDir,name);if(await pathExists(destination))continue;let read=await readRecord(source);read&&(copies.push({source,destination,bytes:read.bytes}),totalBytes+=read.bytes)}}return copies.length===0?null:{label:"Claude Desktop sessions",itemCount:copies.length,totalBytes,sourceRoots:[subscriptionRoot],destinationRoots:[destinationDir],prompt:[`Copy the ${copies.length} Claude Desktop session record${copies.length===1?"":"s"} (per-session \`.json\` files) under ${codeSpan(subscriptionRoot)} into ${codeSpan(destinationDir)}, keeping each filename.`,"In each copy, rewrite the top-level `model` field to its AI Gateway id by prefixing `anthropic/` when the value has no provider prefix (e.g. `claude-opus-4-8` \u2192 `anthropic/claude-opus-4-8`); keep any suffix such as `[1m]` intact. Leave every other field unchanged.","Use atomic, no-clobber writes with mode 0600; skip records whose destination already exists. Never move, edit, delete, or overwrite an original record."],async apply(){let copied=0,skipped=0,errors=[];for(let copy of copies)try{let read=await readRecord(copy.source);if(!read){skipped+=1;continue}let record={...read.record};typeof record.model=="string"&&(record.model=toGatewayModelId(record.model)),await writeRecordNoClobber(copy.destination,`${JSON.stringify(record)}
|
|
28
|
-
`)==="copied"?copied+=1:skipped+=1}catch(error){errors.push(`${copy.source}: ${error instanceof Error?error.message:String(error)}`)}return errors.length>0?{copied,skipped,errors}:{copied,skipped}}}}function claudeDir(home){let dir=process.env.CLAUDE_CONFIG_DIR;return dir&&dir.trim()?dir:join2(home,".claude")}var claudeCode={id:"claude-code",displayName:"Claude Code",sessionMigration:{plan:({home})=>planClaudeDesktopSessionMigration(home)},async detect(home){return pathExists(claudeDir(home))},configPath(ctx){return ctx.overrides?.["claude-code"]??join2(claudeDir(ctx.home),"settings.json")},buildPlan(ctx){let path=this.configPath(ctx),env={ANTHROPIC_BASE_URL:resolveGatewayBaseUrl(ctx.baseUrlOverride,GATEWAY_CLAUDE_CODE_BASE_URL),ANTHROPIC_API_KEY:"",CLAUDE_CODE_ENABLE_GATEWAY_MODEL_DISCOVERY:"1",ENABLE_TOOL_SEARCH:"true"},envExports=[];return ctx.useKeychain?envExports.push({name:"ANTHROPIC_AUTH_TOKEN",value:ctx.apiKey}):env.ANTHROPIC_AUTH_TOKEN=ctx.apiKey,{fileChanges:[{path,label:"Claude Code settings",format:"json",...ctx.useKeychain?{}:{mode:384},transform:current=>mergeJson(current,{env})}],envExports,notes:[...ctx.useKeychain?["The Anthropic auth token is read from your shell environment (Keychain-backed).","Open a new terminal so ANTHROPIC_AUTH_TOKEN is loaded, then restart Claude Code."]:["Restart Claude Code to pick up the new settings."],"The Claude Desktop app switches providers in its own settings (Developer \u2192 Configure Third-Party Inference\u2026). After its first gateway launch, re-run this command to copy your existing desktop sessions over."]}}};var PREFS_FILE="agent-preferences.json",CLAUDE_LEGACY_PLUGIN_ID="vercel-plugin@vercel",CLAUDE_OFFICIAL_PLUGIN_ID="vercel@claude-plugins-official",VERCEL_PLUGIN_VERSION_URL="https://raw.githubusercontent.com/vercel/vercel-plugin/main/.claude-plugin/plugin.json",AGENT_TO_TARGET={[KNOWN_AGENTS.CLAUDE]:"claude-code",[KNOWN_AGENTS.COWORK]:"claude-code"};function getPluginTargetForAgent(agentName){if(agentName)return agentName===KNOWN_AGENTS.CLAUDE||agentName.startsWith("claude-code")||agentName===KNOWN_AGENTS.COWORK?"claude-code":AGENT_TO_TARGET[agentName]}var promptedAtSchema=z.codec(z.union([z.iso.date(),z.iso.datetime()]),z.date(),{decode:value=>new Date(value),encode:value=>value.toISOString()}),agentPreferencesSchema=z.object({pluginDeclined:z.boolean().optional(),pluginAutoUpdate:z.boolean().optional(),lastPromptedAt:promptedAtSchema.optional(),lastPluginAutoUpdateAttemptedAt:promptedAtSchema.optional(),lastPluginAutoUpdateAttemptedKey:z.string().optional()});async function fileExists(filePath){try{return await access2(filePath),!0}catch{return!1}}async function readPrefs(client){return await client.maybeReadConfig(PREFS_FILE,agentPreferencesSchema)??{}}async function writePrefs(client,prefs){try{await client.writeConfig(PREFS_FILE,agentPreferencesSchema,prefs)}catch{}}function encodeClaudeProjectDir(projectPath){return projectPath.replace(/[^A-Za-z0-9]/g,"-")}async function projectHasUsedClaudeCode(cwd){let home=homedir(),projectsDir=join3(home,".claude","projects"),dir=resolve(cwd);for(;dir!==home;){if(await fileExists(join3(projectsDir,encodeClaudeProjectDir(dir))))return!0;let parent=dirname3(dir);if(parent===dir)break;dir=parent}return!1}async function getPluginTargets(agentName,cwd){let targetForAgent=getPluginTargetForAgent(agentName);return targetForAgent?[targetForAgent]:agentName?[]:cwd&&await projectHasUsedClaudeCode(cwd)?["claude-code"]:[]}async function readClaudeInstalledPluginsFromRegistry(){try{let raw=await readFile3(getClaudeInstalledPluginsRegistryPath(),"utf-8"),plugins=JSON.parse(raw)?.plugins??{},entries=[];for(let[id,installs]of Object.entries(plugins))if(Array.isArray(installs))for(let install of installs)!install||typeof install!="object"||entries.push({id,...install,enabled:!0});return entries}catch{return[]}}function getClaudeInstalledPluginsRegistryPath(){return join3(homedir(),".claude","plugins","installed_plugins.json")}async function markStaleClaudePluginInstalls(plugins){return Promise.all(plugins.map(async plugin=>plugin.installPath&&!await fileExists(plugin.installPath)?{...plugin,stale:!0}:plugin))}async function removeClaudePluginFromRegistry(pluginId){try{let registryPath=getClaudeInstalledPluginsRegistryPath(),raw=await readFile3(registryPath,"utf-8"),data=JSON.parse(raw);return!data.plugins||!(pluginId in data.plugins)?!1:(delete data.plugins[pluginId],await writeFile3(registryPath,`${JSON.stringify(data,null,2)}
|
|
29
|
-
`,"utf-8"),!0)}catch(err){return output_manager_default.debug(`Failed to remove Claude plugin registry entry: ${err}`),!1}}async function isPluginInstalledForTarget(target){return target==="claude-code"?(await getClaudePluginStatus()).state==="official-only":!1}async function confirm(client,message){return client.nonInteractive||!client.stdin.isTTY?!1:client.input.confirm(message,!0)}function isSameDay(left,right){return left.getFullYear()===right.getFullYear()&&left.getMonth()===right.getMonth()&&left.getDate()===right.getDate()}function wasPromptedToday(prefs){return prefs.lastPromptedAt?isSameDay(prefs.lastPromptedAt,new Date):!1}function wasPluginAutoUpdateAttemptedToday(prefs,attemptKey){return prefs.lastPluginAutoUpdateAttemptedKey===attemptKey&&!!prefs.lastPluginAutoUpdateAttemptedAt&&isSameDay(prefs.lastPluginAutoUpdateAttemptedAt,new Date)}async function markPromptedToday(client,prefs){prefs.lastPromptedAt=new Date,await writePrefs(client,prefs)}function markPluginAutoUpdateAttempted(prefs,attemptKey){attemptKey&&(prefs.lastPluginAutoUpdateAttemptedAt=new Date,prefs.lastPluginAutoUpdateAttemptedKey=attemptKey)}async function runCommand(command,args){return await new Promise(resolve2=>{let child=spawn(command,args,{stdio:"pipe"}),stdout="",stderr="";child.stdout.on("data",chunk=>{stdout+=chunk.toString()}),child.stderr.on("data",chunk=>{stderr+=chunk.toString()}),child.on("close",code=>{resolve2({exitCode:code??1,stdout,stderr})}),child.on("error",err=>{resolve2({exitCode:1,stdout,stderr:`${stderr}${String(err)}`})})})}async function getClaudeInstalledPlugins(){let result=await runCommand("claude",["plugins","list","--json"]);if(result.exitCode===0)try{let parsed=JSON.parse(result.stdout);if(Array.isArray(parsed))return markStaleClaudePluginInstalls(parsed)}catch(err){output_manager_default.debug(`Failed to parse Claude plugin list JSON: ${err}`)}else result.stderr.trim().length>0&&output_manager_default.debug(`Failed to run 'claude plugins list --json': ${result.stderr}`);return markStaleClaudePluginInstalls(await readClaudeInstalledPluginsFromRegistry())}async function fetchLatestVercelPluginVersion(){try{let response=await fetch(VERCEL_PLUGIN_VERSION_URL);if(!response.ok){output_manager_default.debug(`Failed to fetch latest Vercel plugin version: ${response.status}`);return}let manifest=await response.json();return typeof manifest.version=="string"?manifest.version:void 0}catch(err){output_manager_default.debug(`Failed to fetch latest Vercel plugin version: ${err}`);return}}function comparePluginVersions(a,b){if(!a&&!b)return 0;if(!a)return-1;if(!b)return 1;let parse2=value=>value.split(".").map(part=>Number.parseInt(part,10)||0),left=parse2(a),right=parse2(b),maxLength=Math.max(left.length,right.length);for(let i=0;i<maxLength;i++){let l=left[i]??0,r=right[i]??0;if(l>r)return 1;if(l<r)return-1}return 0}function buildClaudePluginStatus(installedPlugins,latestVersion){let legacy=installedPlugins.find(plugin=>plugin.id===CLAUDE_LEGACY_PLUGIN_ID),official=installedPlugins.find(plugin=>plugin.id===CLAUDE_OFFICIAL_PLUGIN_ID),state="none";return legacy&&official?state="both":legacy?state="legacy-only":official&&(state="official-only"),{state,legacy,official,latestVersion}}function buildClaudePluginMigrationPlan(status){let plan={installOfficial:!1,updateOfficial:!1,removeLegacy:!1,removeLegacyMarketplace:!1};switch(status.state){case"none":plan.installOfficial=!0;break;case"legacy-only":plan.installOfficial=!0,plan.removeLegacy=!0,plan.removeLegacyMarketplace=!0;break;case"both":plan.removeLegacy=!0,plan.removeLegacyMarketplace=!0;break;case"official-only":break}return status.official?.version&&status.latestVersion&&comparePluginVersions(status.official.version,status.latestVersion)<0&&(plan.updateOfficial=!0),plan}function hasClaudeMigrationActions(plan){return plan.installOfficial||plan.updateOfficial||plan.removeLegacy||plan.removeLegacyMarketplace}function getClaudeAutoUpdateAttemptKey(status,plan){return[status.state,status.legacy?.version??"none",status.official?.version??"none",status.latestVersion??"unknown",plan.installOfficial?"install":"",plan.updateOfficial?"update":"",plan.removeLegacy?"remove-legacy":"",plan.removeLegacyMarketplace?"remove-marketplace":""].join(":")}function buildClaudePromptCopy(status,plan){if(plan.installOfficial&&status.state==="none")return{message:"Vercel Plugin for Claude Code is not installed.",confirm:"Would you like to install it now?"};if(plan.installOfficial&&status.state==="legacy-only")return{message:"Update available for Vercel Plugin for Claude Code (legacy -> official).",confirm:"Would you like to update now?"};if(status.state==="both"&&plan.removeLegacy)return{message:"Vercel Plugin for Claude Code has a legacy install to clean up.",confirm:"Would you like to update now?"};if(plan.updateOfficial){let fromVersion=status.official?.version,toVersion=status.latestVersion;return{message:`Update available for Vercel Plugin for Claude Code${fromVersion&&toVersion?` (v${fromVersion} -> v${toVersion})`:""}.`,confirm:"Would you like to update now?"}}return{message:"The Vercel plugin needs attention in Claude Code before your agent harness is fully up to date.",confirm:"Apply the Vercel plugin changes for Claude Code?"}}async function runClaudeCommand(spinnerMessage,successMessage,failureMessage,args,options){output_manager_default.spinner(spinnerMessage);let result=await runCommand("claude",args);return output_manager_default.stopSpinner(),result.exitCode===0?(options?.quietSuccess||output_manager_default.success(successMessage),!0):(output_manager_default.warn(failureMessage),output_manager_default.debug(`Claude command failed: claude ${args.join(" ")}
|
|
30
|
-
${result.stderr||result.stdout}`),!1)}async function removeStaleLegacyClaudePlugin(removeMarketplace){output_manager_default.spinner("Removing the stale legacy Vercel Claude plugin...");let removedRegistryEntry=await removeClaudePluginFromRegistry(CLAUDE_LEGACY_PLUGIN_ID);if(output_manager_default.stopSpinner(),!removedRegistryEntry)return output_manager_default.warn("Could not remove the stale legacy Vercel Claude plugin registry entry."),{removedPlugin:!1,complete:!1};if(output_manager_default.success("Removed the stale legacy Vercel Claude plugin"),removeMarketplace){let removedMarketplace=await runClaudeCommand("Removing the legacy Vercel marketplace...","Removed the legacy Vercel marketplace","Removed the stale legacy Vercel plugin, but could not remove the legacy marketplace.",["plugins","marketplace","remove","vercel"],{quietSuccess:!0});return removedMarketplace||output_manager_default.log("Cleanup command: claude plugins marketplace remove vercel"),{removedPlugin:!0,complete:removedMarketplace}}return{removedPlugin:!0,complete:!0}}async function runClaudeMigration(plan){let removedStaleLegacy=!1,complete=!0;if(plan.removeLegacy&&(await getClaudePluginStatus()).legacy?.stale){let cleanup=await removeStaleLegacyClaudePlugin(plan.removeLegacyMarketplace);removedStaleLegacy=cleanup.removedPlugin,complete=cleanup.complete}if(plan.installOfficial){if(!await runClaudeCommand("Installing the official Vercel Claude plugin...","Updated the Vercel plugin","Failed to install the official Vercel Claude plugin.",["plugins","install",CLAUDE_OFFICIAL_PLUGIN_ID]))return!1}else if(plan.updateOfficial&&!await runClaudeCommand("Updating the official Vercel Claude plugin...","Updated the Vercel plugin","Failed to update the official Vercel Claude plugin.",["plugins","update",CLAUDE_OFFICIAL_PLUGIN_ID]))return!1;let statusAfterInstall=await getClaudePluginStatus();return statusAfterInstall.official?plan.removeLegacy&&statusAfterInstall.legacy&&!await runClaudeCommand("Removing the legacy Vercel Claude plugin...","Removed the legacy Vercel Claude plugin","Installed the official Vercel Claude plugin, but could not remove the legacy install.",["plugins","uninstall",CLAUDE_LEGACY_PLUGIN_ID],{quietSuccess:!0})?(output_manager_default.log(`Cleanup command: claude plugins uninstall ${CLAUDE_LEGACY_PLUGIN_ID}`),!1):plan.removeLegacyMarketplace&&!removedStaleLegacy&&!(await getClaudePluginStatus()).legacy&&!await runClaudeCommand("Removing the legacy Vercel marketplace...","Removed the legacy Vercel marketplace","Removed the legacy Vercel plugin, but could not remove the legacy marketplace.",["plugins","marketplace","remove","vercel"],{quietSuccess:!0})?(output_manager_default.log("Cleanup command: claude plugins marketplace remove vercel"),!1):complete:(output_manager_default.warn("Skipping Claude cleanup because the official Vercel plugin is not installed."),!1)}async function getClaudePluginStatus(){let[installedPlugins,latestVersion]=await Promise.all([getClaudeInstalledPlugins(),fetchLatestVercelPluginVersion()]);return buildClaudePluginStatus(installedPlugins,latestVersion)}async function applyPluginActions(targets,claudePlan){for(let target of targets)target==="claude-code"&&claudePlan?await runClaudeMigration(claudePlan):output_manager_default.debug(`Skipping unsupported plugin target: ${target}`)}function describeClaudePlan(plan){let actions=[];return plan.installOfficial&&actions.push("install the official plugin"),plan.updateOfficial&&actions.push("update the official plugin"),plan.removeLegacy&&actions.push("remove the legacy plugin"),plan.removeLegacyMarketplace&&actions.push("remove the legacy marketplace"),actions.join(", ")}async function setupVercelPlugin(client,opts){if(!await claudeCode.detect(opts.home))return{status:"not_detected",message:"Claude Code was not detected on this machine."};let status=await getClaudePluginStatus();if(status.official?.stale)return{status:"failed",message:"The installed Vercel plugin files are missing. Run `claude plugins uninstall vercel@claude-plugins-official`, then run `vercel setup plugin --agent claude-code` to reinstall it."};let plan=buildClaudePluginMigrationPlan(status);if(!hasClaudeMigrationActions(plan))return{status:"up_to_date",message:`Vercel plugin for Claude Code is installed${status.official?.version?` (v${status.official.version})`:""}.`};let copy=buildClaudePromptCopy(status,plan);if(opts.dryRun)return{status:"dry_run",message:`${copy.message} Setup would ${describeClaudePlan(plan)}.`,action:plan.installOfficial?"install":"update"};let prefs=await readPrefs(client);if(!opts.yes){if(!opts.canPrompt)return{status:"confirmation_required",message:`${copy.message} Re-run with --yes to apply it.`};output_manager_default.print(` ${copy.message}
|
|
31
|
-
`);let accepted=await client.input.confirm(copy.confirm,!0);if(await markPromptedToday(client,prefs),!accepted)return prefs.pluginDeclined=!0,prefs.pluginAutoUpdate=!1,await writePrefs(client,prefs),{status:"declined",message:"Skipped the Vercel plugin for Claude Code."}}prefs.pluginDeclined=!1,prefs.pluginAutoUpdate=!0,await writePrefs(client,prefs);let migrated=await runClaudeMigration(plan),after=await getClaudePluginStatus();if(!after.official)return{status:"failed",message:"Failed to install the Vercel plugin for Claude Code. Run `claude plugins install vercel@claude-plugins-official` to install it manually."};let remaining=buildClaudePluginMigrationPlan({...after,latestVersion:status.latestVersion});if(!migrated||after.official.stale||hasClaudeMigrationActions(remaining))return{status:"failed",message:"Failed to complete Vercel plugin setup for Claude Code. Re-run `vercel setup plugin --agent claude-code --yes` to retry."};let version=after.official.version?` v${after.official.version}`:"";return{status:plan.installOfficial?"installed":"updated",message:`${plan.installOfficial?"Installed":"Updated"} the Vercel plugin for Claude Code${version}.`}}async function autoInstallVercelPlugin(client,options){try{let prefs=await readPrefs(client),applyMode=options?.mode==="apply";if(!prefs.pluginDeclined||prefs.pluginAutoUpdate||applyMode){let targets=await getPluginTargets(client.agentName,client.cwd),uninstalledTargets=[],claudeStatus=targets.includes("claude-code")?await getClaudePluginStatus():void 0,claudePlan=claudeStatus?buildClaudePluginMigrationPlan(claudeStatus):void 0,claudeAutoUpdateAttemptKey=claudeStatus&&claudePlan?getClaudeAutoUpdateAttemptKey(claudeStatus,claudePlan):void 0;for(let target of targets){if(target==="claude-code"){claudePlan&&hasClaudeMigrationActions(claudePlan)&&uninstalledTargets.push(target);continue}await isPluginInstalledForTarget(target)||uninstalledTargets.push(target)}if(uninstalledTargets.length>0){if(prefs.pluginAutoUpdate){if(claudeAutoUpdateAttemptKey&&wasPluginAutoUpdateAttemptedToday(prefs,claudeAutoUpdateAttemptKey))return;prefs.pluginDeclined=!1,markPluginAutoUpdateAttempted(prefs,claudeAutoUpdateAttemptKey),await writePrefs(client,prefs),await applyPluginActions(uninstalledTargets,claudePlan);return}if(!applyMode&&wasPromptedToday(prefs))return;if(applyMode){prefs.pluginDeclined=!1,prefs.pluginAutoUpdate=!0,await writePrefs(client,prefs),await applyPluginActions(uninstalledTargets,claudePlan);return}let promptMessages=[],confirmMessage="Install the Vercel plugin?";if(uninstalledTargets.includes("claude-code")&&claudeStatus&&claudePlan){let claudePrompt=buildClaudePromptCopy(claudeStatus,claudePlan);promptMessages.push(claudePrompt.message),confirmMessage=claudePrompt.confirm}let promptMessage=promptMessages.join(" ").trim();promptMessage&&output_manager_default.log(promptMessage);let accepted=await confirm(client,confirmMessage);await markPromptedToday(client,prefs),accepted?(prefs.pluginDeclined=!1,prefs.pluginAutoUpdate=!0,await writePrefs(client,prefs),await applyPluginActions(uninstalledTargets,claudePlan)):(prefs.pluginDeclined=!0,prefs.pluginAutoUpdate=!1,await writePrefs(client,prefs))}}}catch(err){output_manager_default.debug(`Auto-install agent tooling failed: ${err}`)}}export{pathExists,isFile,isSymlink,readFileOrNull,parseJsonObjectOrNull,mergeJson,mergeJsonc,mergeToml,MANAGED_BLOCK_START,MANAGED_BLOCK_END,upsertManagedBlock,publishNoClobber,ensureMode,backupFile,writeConfigFile,GATEWAY_ANTHROPIC_BASE_URL,GATEWAY_CODING_AGENT_BASE_URL,GATEWAY_CURSOR_BASE_URL,GATEWAY_CODEX_BASE_URL,GATEWAY_API_KEY_ENV,GATEWAY_DEFAULT_MODEL,KEY_PLACEHOLDER,resolveGatewayBaseUrl,maskSecret,claudeCode,setupVercelPlugin,autoInstallVercelPlugin};
|