@vercel/cli-support 0.0.0 → 65.3.1
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/LICENSE +202 -0
- package/README.md +100 -3
- package/dist/chunks/add-5YZQTIQM.js +8 -0
- package/dist/chunks/add-A524QQ2H.js +8 -0
- package/dist/chunks/add-V4JMUHKO.js +8 -0
- package/dist/chunks/build-K2PVDJZ4.js +7 -0
- package/dist/chunks/chunk-22FDWPWY.js +7 -0
- package/dist/chunks/chunk-25565AGS.js +7 -0
- package/dist/chunks/chunk-2ACMWVTB.js +12 -0
- package/dist/chunks/chunk-2EYYB6YN.js +7 -0
- package/dist/chunks/chunk-2GHZGOWT.js +7 -0
- package/dist/chunks/chunk-2H3SB5RP.js +9 -0
- package/dist/chunks/chunk-2NABMKFV.js +29 -0
- package/dist/chunks/chunk-2PKEEQ5W.js +25 -0
- package/dist/chunks/chunk-2S6PE6GB.js +7 -0
- package/dist/chunks/chunk-2U7DJZSQ.js +21 -0
- package/dist/chunks/chunk-2WYYGGEO.js +7 -0
- package/dist/chunks/chunk-3ADDGPEN.js +7 -0
- package/dist/chunks/chunk-3AYYFYZG.js +7 -0
- package/dist/chunks/chunk-3G3FQYMW.js +7 -0
- package/dist/chunks/chunk-3JGBBS6V.js +7 -0
- package/dist/chunks/chunk-3KKFLKQG.js +7 -0
- package/dist/chunks/chunk-3LIKVGFT.js +8 -0
- package/dist/chunks/chunk-3XW7N4W3.js +9 -0
- package/dist/chunks/chunk-43GBAKL2.js +86 -0
- package/dist/chunks/chunk-4CACOKMS.js +7 -0
- package/dist/chunks/chunk-4NTBYNFR.js +17 -0
- package/dist/chunks/chunk-4SAVH3H7.js +7 -0
- package/dist/chunks/chunk-4UGHFESV.js +8 -0
- package/dist/chunks/chunk-4VFYJU37.js +7 -0
- package/dist/chunks/chunk-5IASAERQ.js +7 -0
- package/dist/chunks/chunk-5RMIM4S2.js +7 -0
- package/dist/chunks/chunk-67GZ5REA.js +7 -0
- package/dist/chunks/chunk-6IDNVZZR.js +7 -0
- package/dist/chunks/chunk-6ISAISGD.js +16 -0
- package/dist/chunks/chunk-6KVHNQW4.js +17 -0
- package/dist/chunks/chunk-6OVX3PWM.js +7 -0
- package/dist/chunks/chunk-6QKS6QK7.js +7 -0
- package/dist/chunks/chunk-6VH56CX2.js +19 -0
- package/dist/chunks/chunk-6Y2ZL5XJ.js +98 -0
- package/dist/chunks/chunk-76KGQU2G.js +7 -0
- package/dist/chunks/chunk-76SVVWPH.js +7 -0
- package/dist/chunks/chunk-773GOZIR.js +13 -0
- package/dist/chunks/chunk-7BGKE3JW.js +10 -0
- package/dist/chunks/chunk-7EJQLVWX.js +7 -0
- package/dist/chunks/chunk-7HV7O6DM.js +7 -0
- package/dist/chunks/chunk-7L2K4OKM.js +63 -0
- package/dist/chunks/chunk-7Y46LB43.js +14 -0
- package/dist/chunks/chunk-7YKFF6CE.js +7 -0
- package/dist/chunks/chunk-7Z3WUAO5.js +10 -0
- package/dist/chunks/chunk-A2RZZQEP.js +7 -0
- package/dist/chunks/chunk-ABZEMNDR.js +7 -0
- package/dist/chunks/chunk-ADLBLGT3.js +8 -0
- package/dist/chunks/chunk-AM46JVVN.js +7 -0
- package/dist/chunks/chunk-ANMDN3EG.js +9 -0
- package/dist/chunks/chunk-APZULWJC.js +8 -0
- package/dist/chunks/chunk-AWMQGOS2.js +7 -0
- package/dist/chunks/chunk-B4UE4LVE.js +7 -0
- package/dist/chunks/chunk-B4YYOSPY.js +7 -0
- package/dist/chunks/chunk-BBKEP7RO.js +7 -0
- package/dist/chunks/chunk-BL3HBRF6.js +12 -0
- package/dist/chunks/chunk-BLUPZPAS.js +7 -0
- package/dist/chunks/chunk-BPUANOGW.js +7 -0
- package/dist/chunks/chunk-BRQUZ5NC.js +7 -0
- package/dist/chunks/chunk-BS32OUOC.js +7 -0
- package/dist/chunks/chunk-BTI5TG6Q.js +7 -0
- package/dist/chunks/chunk-BUJITHGZ.js +8 -0
- package/dist/chunks/chunk-BVH2AEFE.js +7 -0
- package/dist/chunks/chunk-BZENIQ7N.js +7 -0
- package/dist/chunks/chunk-C6GY2G73.js +7 -0
- package/dist/chunks/chunk-CEMPU323.js +7 -0
- package/dist/chunks/chunk-COD3WAUI.js +7 -0
- package/dist/chunks/chunk-COM5YCHF.js +9 -0
- package/dist/chunks/chunk-CZSOZKHX.js +7 -0
- package/dist/chunks/chunk-D2BZMGHP.js +7 -0
- package/dist/chunks/chunk-D3AHZ5LI.js +7 -0
- package/dist/chunks/chunk-D6REP5QQ.js +15 -0
- package/dist/chunks/chunk-DFVNL5ML.js +7 -0
- package/dist/chunks/chunk-DGYHWXD2.js +10 -0
- package/dist/chunks/chunk-DUT4U5YY.js +7 -0
- package/dist/chunks/chunk-DWZBL4NK.js +7 -0
- package/dist/chunks/chunk-E2SADN6I.js +7 -0
- package/dist/chunks/chunk-E6CO6TUM.js +7 -0
- package/dist/chunks/chunk-EAUDC24V.js +9 -0
- package/dist/chunks/chunk-ECQIO5K3.js +7 -0
- package/dist/chunks/chunk-ETV3C2CV.js +7 -0
- package/dist/chunks/chunk-F2SWJEYV.js +8 -0
- package/dist/chunks/chunk-F4KY2TOK.js +7 -0
- package/dist/chunks/chunk-F53OKXYI.js +7 -0
- package/dist/chunks/chunk-F7AVGV4Y.js +7 -0
- package/dist/chunks/chunk-FBYA6LLM.js +7 -0
- package/dist/chunks/chunk-FDNYYENK.js +11 -0
- package/dist/chunks/chunk-FGFLTLEA.js +7 -0
- package/dist/chunks/chunk-FUX6LKNP.js +7 -0
- package/dist/chunks/chunk-G4T7VBGN.js +9 -0
- package/dist/chunks/chunk-GA277JFB.js +20 -0
- package/dist/chunks/chunk-GD7AV7BO.js +9 -0
- package/dist/chunks/chunk-GG5RME4X.js +7 -0
- package/dist/chunks/chunk-GHAY4PSD.js +7 -0
- package/dist/chunks/chunk-GVTXA6HG.js +7 -0
- package/dist/chunks/chunk-GYVJIIYL.js +7 -0
- package/dist/chunks/chunk-GZNDA6SV.js +8 -0
- package/dist/chunks/chunk-HCRD3JFL.js +7 -0
- package/dist/chunks/chunk-HEGJZJO7.js +7 -0
- package/dist/chunks/chunk-HRR57QNP.js +7 -0
- package/dist/chunks/chunk-IA3MXJRC.js +8 -0
- package/dist/chunks/chunk-ID663OJ7.js +7 -0
- package/dist/chunks/chunk-IEPW2YRH.js +7 -0
- package/dist/chunks/chunk-IGDG5CWT.js +7 -0
- package/dist/chunks/chunk-IKQTP764.js +7 -0
- package/dist/chunks/chunk-IQ7FPAI4.js +7 -0
- package/dist/chunks/chunk-IQKGQ2Y2.js +15 -0
- package/dist/chunks/chunk-ISWW3DKF.js +7 -0
- package/dist/chunks/chunk-IUXSJWL3.js +7 -0
- package/dist/chunks/chunk-IVSC7ZFJ.js +7 -0
- package/dist/chunks/chunk-IVSSTHB6.js +7 -0
- package/dist/chunks/chunk-J24BABG4.js +21 -0
- package/dist/chunks/chunk-JALVF3C2.js +7 -0
- package/dist/chunks/chunk-JELLVPCM.js +8 -0
- package/dist/chunks/chunk-JESNVRVR.js +7 -0
- package/dist/chunks/chunk-JLEJB6KM.js +7 -0
- package/dist/chunks/chunk-KH6565YH.js +8 -0
- package/dist/chunks/chunk-KNLGWGUE.js +57 -0
- package/dist/chunks/chunk-KRPY5FHJ.js +7 -0
- package/dist/chunks/chunk-KW6GSQXV.js +7 -0
- package/dist/chunks/chunk-L4NSF346.js +22 -0
- package/dist/chunks/chunk-LCHECISY.js +7 -0
- package/dist/chunks/chunk-LJBUJ23M.js +7 -0
- package/dist/chunks/chunk-LKLH6DZP.js +9 -0
- package/dist/chunks/chunk-LRYGNQ6C.js +8 -0
- package/dist/chunks/chunk-LSF7FY6X.js +7 -0
- package/dist/chunks/chunk-LSQREJXO.js +11 -0
- package/dist/chunks/chunk-LT3UK4K6.js +10 -0
- package/dist/chunks/chunk-LUBUI5GF.js +7 -0
- package/dist/chunks/chunk-MCRKBVZA.js +7 -0
- package/dist/chunks/chunk-MVGTMPMI.js +23 -0
- package/dist/chunks/chunk-MXTC4ZAQ.js +7 -0
- package/dist/chunks/chunk-NB2WLB3J.js +12 -0
- package/dist/chunks/chunk-NEFDNROD.js +7 -0
- package/dist/chunks/chunk-NQWGRKF4.js +7 -0
- package/dist/chunks/chunk-NTZ5WWYV.js +7 -0
- package/dist/chunks/chunk-NWGBDBZI.js +7 -0
- package/dist/chunks/chunk-NZ2TFADV.js +7 -0
- package/dist/chunks/chunk-OAM5NJCU.js +9 -0
- package/dist/chunks/chunk-OCQPXOTX.js +11 -0
- package/dist/chunks/chunk-OCR5CRTH.js +10 -0
- package/dist/chunks/chunk-OFDTADPQ.js +7 -0
- package/dist/chunks/chunk-OGPENBY2.js +7 -0
- package/dist/chunks/chunk-OKEBIUKZ.js +7 -0
- package/dist/chunks/chunk-OMCGXRSA.js +21 -0
- package/dist/chunks/chunk-OO572JUC.js +7 -0
- package/dist/chunks/chunk-OPORM35X.js +7 -0
- package/dist/chunks/chunk-OQCMRU3J.js +10 -0
- package/dist/chunks/chunk-OQPXJCMK.js +32 -0
- package/dist/chunks/chunk-OWOWPOIE.js +23 -0
- package/dist/chunks/chunk-PADL3C6Z.js +7 -0
- 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-PUKYAALC.js +7 -0
- package/dist/chunks/chunk-PVASGBEF.js +7 -0
- package/dist/chunks/chunk-Q5ODLDCU.js +7 -0
- package/dist/chunks/chunk-Q7D7RGXM.js +7 -0
- package/dist/chunks/chunk-QB7F3UAP.js +7 -0
- package/dist/chunks/chunk-QHJLRTVY.js +7 -0
- package/dist/chunks/chunk-QMCHGGDX.js +10 -0
- package/dist/chunks/chunk-QZX7VG2V.js +9 -0
- package/dist/chunks/chunk-R6BEOVTU.js +7 -0
- package/dist/chunks/chunk-RLKS5G6C.js +12 -0
- package/dist/chunks/chunk-RM3ZDRYE.js +7 -0
- package/dist/chunks/chunk-RRDNKB2X.js +7 -0
- package/dist/chunks/chunk-RRREFECI.js +7 -0
- package/dist/chunks/chunk-RUXO73ON.js +7 -0
- package/dist/chunks/chunk-RW3X523R.js +8 -0
- package/dist/chunks/chunk-S3L2OHPO.js +7 -0
- package/dist/chunks/chunk-S4SJ7GIZ.js +7 -0
- package/dist/chunks/chunk-S5IWVPYT.js +32 -0
- package/dist/chunks/chunk-SACGQMVQ.js +13 -0
- package/dist/chunks/chunk-SCV7XEEO.js +7 -0
- package/dist/chunks/chunk-SF4E3AQ3.js +7 -0
- package/dist/chunks/chunk-SKYDLHEZ.js +7 -0
- package/dist/chunks/chunk-SLI2O5X7.js +63 -0
- package/dist/chunks/chunk-SXOSF4O6.js +39 -0
- package/dist/chunks/chunk-TAAWMNNL.js +7 -0
- package/dist/chunks/chunk-TG2RCYTH.js +7 -0
- package/dist/chunks/chunk-TKBORMUF.js +7 -0
- package/dist/chunks/chunk-TO5PJDEN.js +7 -0
- package/dist/chunks/chunk-TPNOSQZ3.js +15 -0
- package/dist/chunks/chunk-TZFDVQ72.js +27 -0
- package/dist/chunks/chunk-U4Z2MMOF.js +301 -0
- package/dist/chunks/chunk-U56NHYAH.js +7 -0
- package/dist/chunks/chunk-UJSW56GS.js +9 -0
- package/dist/chunks/chunk-UKQMYTWW.js +9 -0
- package/dist/chunks/chunk-ULHNMQ7C.js +7 -0
- package/dist/chunks/chunk-UNEGQPD3.js +7 -0
- package/dist/chunks/chunk-URPEIX6M.js +7 -0
- package/dist/chunks/chunk-UVHKXCR5.js +11 -0
- package/dist/chunks/chunk-V6Y6UK6B.js +43 -0
- package/dist/chunks/chunk-V7BEC3E4.js +10 -0
- package/dist/chunks/chunk-VMMMBWD3.js +7 -0
- package/dist/chunks/chunk-VOCZ34ON.js +7 -0
- package/dist/chunks/chunk-VQSLPYAF.js +7 -0
- package/dist/chunks/chunk-VT6RIZJH.js +7 -0
- package/dist/chunks/chunk-WBF36MYT.js +16 -0
- package/dist/chunks/chunk-WCWP4GBR.js +7 -0
- package/dist/chunks/chunk-WGXKX24Q.js +7 -0
- package/dist/chunks/chunk-X4762EE4.js +7 -0
- package/dist/chunks/chunk-XB4SKARZ.js +29 -0
- package/dist/chunks/chunk-XGTKHQTT.js +7 -0
- package/dist/chunks/chunk-XOETL6DB.js +96 -0
- package/dist/chunks/chunk-XP3FT56R.js +27 -0
- package/dist/chunks/chunk-XR6QY7RR.js +7 -0
- package/dist/chunks/chunk-XXXRTHTP.js +8 -0
- package/dist/chunks/chunk-XZV4BFM5.js +7 -0
- package/dist/chunks/chunk-Y6AGOERS.js +8 -0
- package/dist/chunks/chunk-YHPPP3SF.js +7 -0
- package/dist/chunks/chunk-YHQ7PPXP.js +7 -0
- package/dist/chunks/chunk-YK7XLFU2.js +24 -0
- package/dist/chunks/chunk-YN3C5BL5.js +7 -0
- package/dist/chunks/chunk-ZF27J6FQ.js +7 -0
- package/dist/chunks/chunk-ZFRNVIHI.js +7 -0
- package/dist/chunks/chunk-ZH6KHD55.js +20 -0
- package/dist/chunks/cjs-2SMN43VH.js +54 -0
- package/dist/chunks/clear-ZS4KQ7OT.js +8 -0
- package/dist/chunks/compile-vercel-config-3IYM2CHC.js +7 -0
- package/dist/chunks/config-N2SBVW4T.js +8 -0
- package/dist/chunks/config-ZFIC7N4D.js +7 -0
- package/dist/chunks/config-validator.mjs +1 -0
- package/dist/chunks/connect-git-provider-FS5Q2HO4.js +7 -0
- package/dist/chunks/constants-ICJL2EO5.js +7 -0
- package/dist/chunks/create-project-IKCB6MB2.js +7 -0
- package/dist/chunks/delete-2ZE2NVHI.js +10 -0
- package/dist/chunks/delete-AL57HZDQ.js +9 -0
- package/dist/chunks/detect-projects-OD4JEAW2.js +7 -0
- package/dist/chunks/detect-services-MOXTX5XG.js +7 -0
- package/dist/chunks/disable-MKI3BKNH.js +7 -0
- package/dist/chunks/discard-SI4H7ST3.js +14 -0
- package/dist/chunks/dist-33WTJLVQ.js +7 -0
- package/dist/chunks/dist-RXYNZPEA.js +7 -0
- package/dist/chunks/edit-DNWH6SPE.js +8 -0
- package/dist/chunks/edit-WYNWDFUJ.js +9 -0
- package/dist/chunks/enable-J6MMYPYF.js +7 -0
- package/dist/chunks/esm-33752ISR.js +7 -0
- package/dist/chunks/esm-4JKEE7PC.js +7 -0
- package/dist/chunks/esm-BYG5BWYH.js +9 -0
- package/dist/chunks/esm-DFFBNKNU.js +20 -0
- package/dist/chunks/esm-IF453UWS.js +7 -0
- package/dist/chunks/esm-LABWDJ72.js +7 -0
- package/dist/chunks/esm-TG37FXTU.js +9 -0
- package/dist/chunks/exec-OZSY46V6.js +16372 -0
- package/dist/chunks/export-MHSH7QCX.js +19 -0
- package/dist/chunks/fetch-proxy-45DGILKR.js +67 -0
- package/dist/chunks/future-FFOGTKMF.js +7 -0
- package/dist/chunks/generate-cert-for-deploy-YZKNGAEQ.js +7 -0
- package/dist/chunks/image-7METSS6F.js +7 -0
- package/dist/chunks/import-builders-GM2SERWV.js +7 -0
- package/dist/chunks/inspect-A7WJQQZO.js +15 -0
- package/dist/chunks/inspect-DI434TAM.js +19 -0
- package/dist/chunks/inspect-H2Q7XOWN.js +13 -0
- package/dist/chunks/inspect-H5JC2XKI.js +9 -0
- package/dist/chunks/inspect-IAWVHJXQ.js +20 -0
- package/dist/chunks/list-ELEUTZWJ.js +12 -0
- package/dist/chunks/list-INRPH25K.js +10 -0
- package/dist/chunks/list-WWU734RK.js +16 -0
- package/dist/chunks/login-R5NQRPQC.js +7 -0
- package/dist/chunks/login-ZF2TLCQB.js +9 -0
- package/dist/chunks/logs-UD7FEXZ7.js +7 -0
- package/dist/chunks/ls-5ZEAKKPQ.js +8 -0
- package/dist/chunks/ls-IXRLAJ4L.js +11 -0
- package/dist/chunks/ls-LIGIBVAT.js +12 -0
- package/dist/chunks/ls-MCQ2NS65.js +8 -0
- package/dist/chunks/ls-S5E2NQMI.js +12 -0
- package/dist/chunks/ls-V2ZSIVO3.js +12 -0
- package/dist/chunks/ls-VXH4QYF5.js +12 -0
- package/dist/chunks/mutate-OQWOKLIW.js +9 -0
- package/dist/chunks/notifications-KFZ333V5.js +7 -0
- package/dist/chunks/open-HH6K7ZRC.js +7 -0
- package/dist/chunks/openapi-JGYEFJJV.js +7 -0
- package/dist/chunks/permissions-ZSHKMXBZ.js +7 -0
- package/dist/chunks/pkg-EDJQLCNP.js +7 -0
- package/dist/chunks/plugin-offer-Z6FCPQFD.js +9 -0
- package/dist/chunks/prompt-missing-credentials-KOA7C4QC.js +7 -0
- package/dist/chunks/publish-FPNQ2US4.js +15 -0
- package/dist/chunks/pull-7OGOIKB3.js +7 -0
- package/dist/chunks/purchase-domain-if-available-F4LKHVBD.js +7 -0
- package/dist/chunks/push-NY3SIK2C.js +7 -0
- package/dist/chunks/query-JGPO7TNY.js +12 -0
- package/dist/chunks/reauthenticate-OZRQFR66.js +7 -0
- package/dist/chunks/reorder-4J2STFUS.js +10 -0
- package/dist/chunks/reply-EO4NTTPW.js +9 -0
- package/dist/chunks/repo-info-to-url-XQSULSEO.js +7 -0
- package/dist/chunks/resolve-RPHHRPNM.js +12 -0
- package/dist/chunks/resolve-agent-team-KX77HEAF.js +7 -0
- package/dist/chunks/resolve-deployment-framework-preset-AXXYBFCL.js +7 -0
- package/dist/chunks/restore-TEA6TSVK.js +16 -0
- package/dist/chunks/rm-BPILSPUI.js +8 -0
- package/dist/chunks/rm-F6XVUDBM.js +8 -0
- package/dist/chunks/rm-JCPXV2FN.js +8 -0
- package/dist/chunks/rm-LPQRGX7N.js +8 -0
- package/dist/chunks/rm-WHUGT6TE.js +8 -0
- package/dist/chunks/routes-P6LKQCWH.js +7 -0
- package/dist/chunks/rule-inspect-BOETGPFO.js +8 -0
- package/dist/chunks/schema-BEUO7G52.js +44 -0
- package/dist/chunks/schema-YOEAK4VX.js +14 -0
- package/dist/chunks/select-org-OMLGQEKK.js +7 -0
- package/dist/chunks/set-5XY27S7R.js +7 -0
- package/dist/chunks/setup-and-link-A7M3QT52.js +7 -0
- package/dist/chunks/skills-4J2NC2QI.js +590 -0
- package/dist/chunks/slugify-NMMUASYK.js +7 -0
- package/dist/chunks/stamp-TKONNIJ5.js +7 -0
- package/dist/chunks/tags-ZXZQEXOV.js +7 -0
- package/dist/chunks/token-W6P2KNI5.js +7 -0
- package/dist/chunks/token-util-JDQI37VN.js +7 -0
- package/dist/chunks/types-SK6J2HFE.js +14 -0
- package/dist/chunks/update-25CKNOY5.js +8 -0
- package/dist/chunks/update-route-version-KWK5S4UW.js +7 -0
- package/dist/chunks/utils-IQZEE4DT.js +86 -0
- package/dist/chunks/vlt-builder-graph-XL2XRO4V.js +7 -0
- package/dist/chunks/vlt-builder-importer-RBUPAB6J.js +11 -0
- package/dist/chunks/zod-2C2SXNIK.js +7 -0
- package/dist/commands/build/builder-worker.cjs +281 -0
- package/dist/commands/build/index.js +34 -0
- package/dist/commands/deploy/index.js +72 -0
- package/dist/commands/dev/builder-worker.cjs +110 -0
- package/dist/commands/dev/index.js +157 -0
- package/dist/commands/env/index.js +40 -0
- package/dist/commands/link/index.js +10 -0
- package/dist/commands/list/index.js +14 -0
- 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 +122 -0
- package/dist/commands-routing.js +273 -0
- package/dist/fetch-dist-tags.cjs +60 -0
- package/dist/get-latest-worker.cjs +222 -0
- package/dist/help.js +7 -0
- package/dist/index.js +25 -0
- package/dist/internal-build-worker.js +10 -0
- package/dist/internal-build.js +11 -0
- package/dist/package.json +265 -0
- package/dist/root-help-commands.mjs +1 -0
- package/dist/runtime-assets/dev-tunnel/api/tunnel.ts +443 -0
- package/dist/runtime-assets/dev-tunnel/lib/env.ts +25 -0
- package/dist/runtime-assets/dev-tunnel/lib/tunnel_pb.ts +505 -0
- package/dist/runtime-assets/node-preloads/next-dev-websocket.cjs +220 -0
- package/dist/vc.js +393 -0
- package/dist/version.mjs +2 -0
- package/package.json +224 -14
- package/index.js +0 -1
|
@@ -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{formatOption,jsonOption,yesOption}from"./chunk-AWMQGOS2.js";import{packageName}from"./chunk-JESNVRVR.js";var agentOption={name:"agent",shorthand:null,type:[String],argument:"NAME",deprecated:!1,description:"Select a coding agent (repeatable); plugin setup supports claude-code, codex, and opencode"},dryRunOption={name:"dry-run",shorthand:null,type:Boolean,deprecated:!1,description:"Show what would change without writing any files"},pluginSubcommand={name:"plugin",aliases:[],description:"Install or update the Vercel plugin for Claude Code, Codex, and OpenCode",arguments:[],options:[{...agentOption,description:"Select claude-code, codex, or opencode (repeatable)"},dryRunOption,yesOption],examples:[{name:"Install the Vercel plugin for every detected agent",value:`${packageName} setup plugin`},{name:"Install the Vercel plugin for Codex",value:`${packageName} setup plugin --agent codex`}]},gatewaySubcommand={name:"gateway",aliases:[],description:"Connect local coding agents to the AI Gateway",arguments:[],options:[{...agentOption,description:"Select a coding agent (repeatable)"},{name:"all",shorthand:null,type:Boolean,deprecated:!1,description:"Configure every supported coding agent"},{name:"key",shorthand:null,type:String,argument:"KEY",deprecated:!1,description:"Use an existing AI Gateway API key instead of creating one"},{name:"reconfigure",shorthand:null,type:Boolean,deprecated:!1,description:"Re-run even if already configured, to rotate the key or switch team"},{name:"no-session-migration",shorthand:null,type:Boolean,deprecated:!1,description:"Do not copy existing Codex Desktop sessions for use with the Vercel AI Gateway provider."},dryRunOption,yesOption],examples:[{name:"Connect detected coding agents to the AI Gateway",value:`${packageName} setup gateway`},{name:"Preview the AI Gateway changes for Claude Code",value:`${packageName} setup gateway --agent claude-code --dry-run`}]},skillsSubcommand={name:"skills",aliases:[],description:"Write the vercel-cli agent skill that ships with this CLI version to ~/.agents/skills, or to --output",arguments:[],options:[{name:"output",shorthand:"o",type:String,argument:"PATH",deprecated:!1,description:"Directory to write the skill into (default: ~/.agents/skills/vercel-cli)"},{name:"dry-run",shorthand:null,type:Boolean,deprecated:!1,description:"Show what would change without writing any files"},formatOption,jsonOption],examples:[{name:"Write the Vercel CLI skill to ~/.agents/skills/vercel-cli",value:`${packageName} setup skills`},{name:"Update the skill after upgrading the CLI",value:`${packageName} setup skills`},{name:"Preview what would change",value:`${packageName} setup skills --dry-run`},{name:"Write the skill into a project or custom agent directory",value:`${packageName} setup skills --output .agents/skills/vercel-cli`}]},setupCommand={name:"setup",aliases:[],description:"Set up your machine for Vercel: install the Vercel plugin for Claude Code, Codex, and OpenCode and connect local coding agents to the AI Gateway",arguments:[],runsWithoutSubcommand:!0,subcommands:[pluginSubcommand,gatewaySubcommand,skillsSubcommand],options:[{name:"plugin",shorthand:null,type:Boolean,deprecated:!0,description:"DEPRECATED: Use `vercel setup plugin` instead"},{name:"gateway",shorthand:null,type:Boolean,deprecated:!0,description:"DEPRECATED: Use `vercel setup gateway` instead"},agentOption,dryRunOption,yesOption],examples:[{name:"Set up everything (prompts for each step)",value:`${packageName} setup`},{name:"Only connect coding agents to the AI Gateway",value:`${packageName} setup gateway`},{name:"Install the Vercel plugin for Codex",value:`${packageName} setup plugin --agent codex`},{name:"Preview what setup would change",value:`${packageName} setup --dry-run`},{name:"Run setup without prompts",value:`${packageName} setup --yes`},{name:"Write the Vercel CLI skill that matches this CLI version",value:`${packageName} setup skills`}]};export{pluginSubcommand,gatewaySubcommand,skillsSubcommand,setupCommand};
|
|
@@ -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{warnDeprecatedInput}from"./chunk-AWMQGOS2.js";import{output_manager_default}from"./chunk-XP3FT56R.js";function parseTarget({flagName,flags}){let targetFlagName=`--${flagName}`,targetFlagValue=flags[targetFlagName],prodFlagValue=flags["--prod"];if(prodFlagValue&&targetFlagValue){let typedFlagName=flags["--target"]!==void 0?"--target":targetFlagName;output_manager_default.warning(`Ignoring --prod because ${typedFlagName} is also set. Pass only one of them.`)}if(typeof targetFlagValue=="string")return output_manager_default.debug(`Setting target to ${targetFlagValue}`),targetFlagValue;if(prodFlagValue)return output_manager_default.debug("Setting target to production"),"production"}function applyDeprecatedTargetFlag(client,flags){let target=flags["--target"];return target===void 0?!0:flags["--environment"]!==void 0?(output_manager_default.error("Can't use --target with --environment. Use --environment."),!1):(warnDeprecatedInput(client,"--target","--environment"),flags["--environment"]=target,!0)}function warnDeprecatedProdFlag(client,flags){flags["--prod"]&&warnDeprecatedInput(client,"--prod","--environment production")}export{parseTarget,applyDeprecatedTargetFlag,warnDeprecatedProdFlag};
|
|
@@ -0,0 +1,29 @@
|
|
|
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{createDetectEntrypoint,getServicesConfigWriteBlocker,writeServicesConfig}from"./chunk-2ACMWVTB.js";import{require_slugify}from"./chunk-COD3WAUI.js";import{detectProjects}from"./chunk-QB7F3UAP.js";import{createProject}from"./chunk-QHJLRTVY.js";import{singleFileProjectSettings,validateRootDirectory}from"./chunk-APZULWJC.js";import{require_dist as require_dist2}from"./chunk-RUXO73ON.js";import{readJSONFile}from"./chunk-OGPENBY2.js";import{compileVercelConfig,findSourceVercelConfigFile}from"./chunk-7Y46LB43.js";import{checkExistsAndConnect,parseRepoUrl,selectAndParseRemoteUrl}from"./chunk-IQKGQ2Y2.js";import{Separator}from"./chunk-MVGTMPMI.js";import{selectOrg}from"./chunk-Y6AGOERS.js";import{require_dist2 as require_dist}from"./chunk-7L2K4OKM.js";import{pull}from"./chunk-OWOWPOIE.js";import{require_frameworks}from"./chunk-6Y2ZL5XJ.js";import{table}from"./chunk-773GOZIR.js";import{printError}from"./chunk-G4T7VBGN.js";import{VERCEL_DIR_PROJECT,VERCEL_DIR_README,fetchProjectsForRepoUrl,findProjectsFromPath,findRepoRoot,getGitConfigPath,getLinkedProject,getLocalPathConfig,getProjectByNameOrId,getRemoteUrls,getVercelDirectory,humanizePath,isDirectory,isPromptBackError,isPromptCanceledError,linkFolderToProject,linkRepoProject,localConfigFlagPath,parseGitConfig,pluckRemoteUrls,require_lib,resolveGitRemote}from"./chunk-KNLGWGUE.js";import{printAlignedLabel}from"./chunk-ADLBLGT3.js";import{CantParseJSONFile,ProjectNotFound,isAPIError}from"./chunk-6VH56CX2.js";import{output_manager_default,require_build_utils}from"./chunk-XP3FT56R.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_fs_extra=__toESM(require_lib(),1),import_slugify3=__toESM(require_slugify(),1),import_build_utils4=__toESM(require_build_utils(),1),import_fs_detectors2=__toESM(require_dist(),1);import{join as join3,basename,extname}from"path";var import_chalk=__toESM(require_source(),1);var import_slugify=__toESM(require_slugify(),1);var SEARCH_ALL_PROJECTS="search-all-projects",CREATE_NEW_PROJECT="create-new-project",BACK_TO_PROJECT_SELECTION=Symbol("back-to-project-selection"),BACK_TO_TEAM_SELECTION=Symbol("back-to-team-selection"),SWITCH_GIT_REMOTE=Symbol("switch-git-remote"),NO_EXISTING_PROJECTS=Symbol("no-existing-projects");async function inputProjectDecision(client,defaultDecision){let createChoice={name:"Create new project",value:"create"},existingChoice={name:"Link existing project",value:"existing"};return await client.input.select({message:"Project?",choices:defaultDecision==="existing"?[existingChoice,createChoice]:[createChoice,existingChoice]})}function randomNameSuffix(){return Math.random().toString(36).slice(2,6).padEnd(4,"0")}async function suggestNewProjectName(client,org,slugifiedName,knownTaken){let taken=knownTaken;if(!taken)try{taken=!(await getProjectByNameOrId(client,slugifiedName,org.id)instanceof ProjectNotFound)}catch{taken=!1}return taken?`${slugifiedName}-${randomNameSuffix()}`:slugifiedName}function promptForProjectName(client,org,defaultName,message="Name?"){return client.input.text({message,default:defaultName,validate:async val=>val?await getProjectByNameOrId(client,val,org.id)instanceof ProjectNotFound?!0:"Project already exists":"Project name cannot be empty"})}async function promptForProjectNameWithBack(client,org,defaultName){try{return await client.withPromptBackNavigation(()=>promptForProjectName(client,org,defaultName,`Name? ${import_chalk.default.dim("Press \u2191 to return to project options")}`))}catch(error){if(isPromptBackError(error))return BACK_TO_PROJECT_SELECTION;throw error}}async function searchExistingProjects(client,org,allowBack){let firstPage=await client.fetch("/v9/projects?limit=100",{accountId:org.id}),projects=firstPage.projects,hasMoreProjects=firstPage.pagination.next!=null;if(projects.length===0)return output_manager_default.log(`No existing projects found under ${import_chalk.default.bold(org.slug)}. Creating new project.`),NO_EXISTING_PROJECTS;let pageSize=15,countHint=projects.length>pageSize?` ${import_chalk.default.dim(`(${hasMoreProjects?"100+":projects.length} projects)`)}`:"";return await client.input.search({message:`Which project?${countHint}`,pageSize,source:async(term,{signal})=>{let searchTerm=term?.trim(),matchingProjects=projects;if(searchTerm)if(hasMoreProjects)matchingProjects=(await client.fetch(`/v9/projects?search=${encodeURIComponent(searchTerm)}&limit=20`,{accountId:org.id,signal})).projects;else{let normalizedSearchTerm=searchTerm.toLowerCase();matchingProjects=projects.filter(project=>project.name.toLowerCase().includes(normalizedSearchTerm)||project.id===searchTerm)}let choices=matchingProjects.slice().sort((a,b)=>b.updatedAt-a.updatedAt).map(project=>({name:project.name,value:project}));if(!allowBack)return choices;let backChoice={name:"Back to project options",value:BACK_TO_PROJECT_SELECTION};return choices.length===0?[backChoice]:searchTerm?choices:[...choices,new Separator,backChoice]}})}async function inputProject(client,org,detectedProjectName,autoConfirm=!1,skipAutoDetect=!1,showProjectSuggestions=!1,allowTeamSelectionBack=!1,repoMatches=[],gitRemoteOptions){let slugifiedName=(0,import_slugify.default)(detectedProjectName),canSwitchGitRemote=(gitRemoteOptions?.remoteNames.length??0)>1,detectedProject=null;if(!skipAutoDetect&&repoMatches.length===0){output_manager_default.spinner("Searching for existing projects\u2026",1e3);let[project,slugifiedProject]=await Promise.all([getProjectByNameOrId(client,detectedProjectName,org.id),slugifiedName!==detectedProjectName?getProjectByNameOrId(client,slugifiedName,org.id):null]);if(detectedProject=project instanceof ProjectNotFound?slugifiedProject instanceof ProjectNotFound?null:slugifiedProject:project,detectedProject&&!detectedProject.id)throw new Error('Detected linked project does not have "id".');output_manager_default.stopSpinner()}if(autoConfirm)return repoMatches.length===1?repoMatches[0]:detectedProject||detectedProjectName;if(client.nonInteractive){if(detectedProject)return detectedProject;let err=new Error("Confirmation required");throw err.code="HEADLESS",err}let slugifiedNameKnownFree=!skipAutoDetect&&repoMatches.length===0&&!detectedProject,memoizedDefaultName;async function defaultNewProjectName(){return memoizedDefaultName===void 0&&(memoizedDefaultName=slugifiedNameKnownFree?slugifiedName:await suggestNewProjectName(client,org,slugifiedName,detectedProject?.name===slugifiedName)),memoizedDefaultName}let shouldLinkProject;if(showProjectSuggestions&&!skipAutoDetect)for(;;){let choices=[];if(repoMatches.length>0?choices.push(...repoMatches.map(match=>({name:`${match.project.name} ${import_chalk.default.gray("(linked by git)")}`,value:match})),new Separator):detectedProject&&choices.push({name:`${detectedProject.name} ${import_chalk.default.gray("(folder name)")}`,value:detectedProject},new Separator),choices.push({name:"Search all projects",value:SEARCH_ALL_PROJECTS,description:"Browse or search every project in this team"},{name:"Create a new project",value:CREATE_NEW_PROJECT,description:`Create it under ${org.slug}`}),canSwitchGitRemote){let current=gitRemoteOptions?.currentRemoteName;choices.push({name:"Switch Git remote",value:SWITCH_GIT_REMOTE,description:current?`Suggestions are from ${current}`:"Search projects linked to a different remote"})}allowTeamSelectionBack&&choices.push({name:"Choose a different team",value:BACK_TO_TEAM_SELECTION,description:"Return to team selection"});let selected=await client.input.select({message:"Which project?",choices});if(selected===BACK_TO_TEAM_SELECTION)return BACK_TO_TEAM_SELECTION;if(selected===SWITCH_GIT_REMOTE)return SWITCH_GIT_REMOTE;if(selected===CREATE_NEW_PROJECT){let projectName=await promptForProjectNameWithBack(client,org,await defaultNewProjectName());if(projectName===BACK_TO_PROJECT_SELECTION)continue;return projectName}if(selected!==SEARCH_ALL_PROJECTS)return selected;let existingProject=await searchExistingProjects(client,org,!0);if(existingProject!==BACK_TO_PROJECT_SELECTION){if(existingProject===NO_EXISTING_PROJECTS){let projectName=await promptForProjectNameWithBack(client,org,slugifiedName);if(projectName===BACK_TO_PROJECT_SELECTION)continue;return projectName}return existingProject}}else if(!detectedProject)shouldLinkProject=await inputProjectDecision(client,skipAutoDetect?"existing":"create")==="existing";else{if(output_manager_default.print(` ${import_chalk.default.bold("Found existing project")}
|
|
8
|
+
`),printAlignedLabel("Project",`${org.slug}/${detectedProject.name}`),await client.input.confirm("Link directory to project?",!0))return detectedProject;shouldLinkProject=await inputProjectDecision(client,"existing")==="existing"}if(shouldLinkProject){let existingProject=await searchExistingProjects(client,org,!1);if(existingProject!==NO_EXISTING_PROJECTS&&existingProject!==BACK_TO_PROJECT_SELECTION)return existingProject}return await promptForProjectName(client,org,await defaultNewProjectName())}var import_build_utils=__toESM(require_build_utils(),1),import_chalk2=__toESM(require_source(),1);import path from"path";async function inputRootDirectory(client,cwd,autoConfirm=!1){if(autoConfirm)return null;for(;;){let rootDirectory=await client.input.text({message:"Code directory?",transformer:input=>`${import_chalk2.default.dim("./")}${input}`});if(!rootDirectory)return null;let normal=path.normalize(rootDirectory);if(normal==="."||normal==="./")return null;let fullPath=path.join(cwd,normal);if(await validateRootDirectory(cwd,fullPath,"Please choose a different one.")!==!1)return(0,import_build_utils.normalizePath)(normal)}}var import_chalk3=__toESM(require_source(),1),import_frameworks=__toESM(require_frameworks(),1);function isSettingValue(setting){return setting&&typeof setting.value=="string"}var settingMap={buildCommand:"Build Command",devCommand:"Development Command",commandForIgnoringBuildStep:"Ignore Command",installCommand:"Install Command",outputDirectory:"Output Directory",framework:"Framework"},settingKeys=Object.keys(settingMap).sort();async function editProjectSettings(client,projectSettings,framework,autoConfirm,localConfigurationOverrides,configFileName="vercel.json"){let settings=Object.assign({buildCommand:null,devCommand:null,framework:null,commandForIgnoringBuildStep:null,installCommand:null,outputDirectory:null},projectSettings);if(localConfigurationOverrides&&Object.values(localConfigurationOverrides??{}).some(Boolean)){for(let setting of settingKeys){let localConfigValue=localConfigurationOverrides[setting];localConfigValue&&(settings[setting]=localConfigValue)}output_manager_default.print(` Local settings detected in ${configFileName}:
|
|
9
|
+
`);for(let setting of settingKeys){let override=localConfigurationOverrides[setting];override&&output_manager_default.print(` ${import_chalk3.default.dim(`${import_chalk3.default.bold(`${settingMap[setting]}:`)} ${override}`)}
|
|
10
|
+
`)}if(localConfigurationOverrides.framework){let overrideFramework=import_frameworks.frameworkList.find(f=>f.slug===localConfigurationOverrides.framework);overrideFramework&&(framework=overrideFramework,output_manager_default.print(` Merging default Project Settings for ${framework.name}. Previously listed overrides are prioritized.
|
|
11
|
+
`))}}if(!framework)return settings.framework=null,settings;if(output_manager_default.print(`
|
|
12
|
+
`),!framework.slug)output_manager_default.print(` No framework detected. Default Project Settings:
|
|
13
|
+
`);else{let buildCmd=framework.settings.buildCommand?.value??null,outputSetting=framework.settings.outputDirectory,outputDir=outputSetting?isSettingValue(outputSetting)?outputSetting.value:outputSetting.placeholder:null,inline=[buildCmd?`${settingMap.buildCommand}: ${buildCmd}`:null,outputDir?`${settingMap.outputDirectory}: ${outputDir}`:null].filter(Boolean),detail=inline.length?import_chalk3.default.dim(` (${inline.join(", ")})`):"";output_manager_default.print(` ${import_chalk3.default.bold("Detected")} ${framework.name}${detail}
|
|
14
|
+
`)}if(settings.framework=framework.slug,!framework.slug)for(let setting of settingKeys){if(setting==="framework"||setting==="commandForIgnoringBuildStep")continue;let defaultSetting=framework.settings[setting];!localConfigurationOverrides?.[setting]&&defaultSetting&&output_manager_default.print(` ${import_chalk3.default.dim(`${import_chalk3.default.bold(`${settingMap[setting]}:`)} ${isSettingValue(defaultSetting)?defaultSetting.value:import_chalk3.default.italic(`${defaultSetting.placeholder}`)}`)}
|
|
15
|
+
`)}if(autoConfirm||!await client.input.confirm("Customize settings?",!1))return settings;let choices=settingKeys.reduce((acc,setting)=>setting==="framework"||setting==="commandForIgnoringBuildStep"||setting==="installCommand"||localConfigurationOverrides?.[setting]?acc:[...acc,{name:settingMap[setting],value:setting}],[]),settingFields=await client.input.checkbox({message:"Which settings would you like to overwrite (select multiple)?",choices});for(let setting of settingFields){let field=settingMap[setting];settings[setting]=await client.input.text({message:`${import_chalk3.default.bold(field)}?`})}return settings}async function readConfig(dir){let pkgFilePath;try{let localConfigPath=localConfigFlagPath();localConfigPath?pkgFilePath=localConfigPath:pkgFilePath=(await compileVercelConfig(dir)).configPath||getLocalPathConfig(dir)}catch(err){if(err instanceof Error)return err;throw err}let result=await readJSONFile(pkgFilePath);return result instanceof CantParseJSONFile||result?result:null}var import_frameworks3=__toESM(require_frameworks(),1);var import_chalk4=__toESM(require_source(),1),DEFAULT_VERCEL_AUTH_SETTING="standard",OPTIONS={message:"What setting do you want to use for Vercel Authentication?",default:DEFAULT_VERCEL_AUTH_SETTING,choices:[{description:"Standard Protection (recommended)",name:"standard",value:"standard"},{description:"No Protection (all deployments will be public)",name:"none",value:"none"}]};async function vercelAuth(client,{autoConfirm=!1}){return autoConfirm||await client.input.confirm(`Want to use the default Deployment Protection settings? ${import_chalk4.default.dim("(Vercel Authentication: Standard Protection)")}`,!0)?DEFAULT_VERCEL_AUTH_SETTING:await client.input.select(OPTIONS)}var import_build_utils3=__toESM(require_build_utils(),1),import_fs_detectors=__toESM(require_dist(),1),import_service_topology=__toESM(require_dist2(),1);import{join,relative}from"path";var import_frameworks2=__toESM(require_frameworks(),1),import_build_utils2=__toESM(require_build_utils(),1);var chalk5=require_source(),frameworksBySlug=new Map(import_frameworks2.frameworkList.map(f=>[f.slug,f])),frameworkColors={nextjs:chalk5.white,vite:chalk5.magenta,nuxtjs:chalk5.green,remix:chalk5.cyan,astro:chalk5.magenta,gatsby:chalk5.magenta,svelte:chalk5.red,sveltekit:chalk5.red,solidstart:chalk5.blue,angular:chalk5.red,vue:chalk5.green,ember:chalk5.red,preact:chalk5.magenta,fastapi:chalk5.green,flask:chalk5.cyan,express:chalk5.yellow,nest:chalk5.red,hono:chalk5.yellowBright},runtimeColors={node:chalk5.green,python:chalk5.blue,go:chalk5.cyan,ruby:chalk5.red,rust:chalk5.yellowBright};function getFrameworkName(slug){if(slug)return frameworksBySlug.get(slug)?.name}function formatRoutePrefix(routePrefix){return routePrefix==="/"?"/":`${routePrefix.startsWith("/")?routePrefix:`/${routePrefix}`}/*`}var jobTriggerLabels={queue:"Job/Queue",schedule:"Job/Schedule",workflow:"Job/Workflow"};function getServiceDescriptionInfo(service){if(service.type==="worker"||service.type==="job"||service.type==="cron"){let typeLabel=service.type==="worker"?"Worker":jobTriggerLabels[service.trigger??""]??"Job",typeColorFn=service.type==="worker"?chalk5.magenta:chalk5.cyan;if(service.runtime){let runtimeName=service.runtime.charAt(0).toUpperCase()+service.runtime.slice(1),runtimeColorFn=runtimeColors[service.runtime]||chalk5.yellow;return{label:`${typeLabel}${chalk5.white("/")}${runtimeColorFn(runtimeName)}`,colorFn:typeColorFn}}return{label:typeLabel,colorFn:typeColorFn}}return getFrameworkRuntimeBuilderInfo(service)}function getFrameworkRuntimeBuilderInfo(service){let frameworkName=getFrameworkName(service.framework);if(frameworkName&&service.framework){let colorFn=frameworkColors[service.framework]||chalk5.cyan;return{label:frameworkName,colorFn}}else if(service.runtime){let normalizedRuntime=service.runtime.toLowerCase().replace(/@.*$/,""),colorFn=runtimeColors[normalizedRuntime]||chalk5.yellow;return{label:service.runtime,colorFn}}else if(service.builder?.use)return{label:service.builder.use,colorFn:chalk5.magenta};return{label:"unknown",colorFn:chalk5.dim}}function getServiceTarget(service){return(0,import_build_utils2.isScheduleTriggeredService)(service)?`schedule: ${service.schedule??"none"}`:(0,import_build_utils2.isQueueTriggeredService)(service)?`topics: ${(0,import_build_utils2.getServiceQueueTopics)(service).join(", ")}`:(0,import_build_utils2.isWorkflowTriggeredService)(service)?"workflow":service.routePrefix?formatRoutePrefix(service.routePrefix):"no route"}function displayDetectedServices(services,nameWidth=0){output_manager_default.print(`Detected services:
|
|
16
|
+
`);let rows=services.some(import_build_utils2.isExperimentalServiceV2)?buildServiceRowsV2(services.filter(import_build_utils2.isExperimentalServiceV2),nameWidth):buildServiceRowsV1(services,nameWidth),tableOutput=table(rows,{align:["l","l","l","l"],hsep:2});output_manager_default.print(`${tableOutput}
|
|
17
|
+
`)}function displayDetectedDaemons(daemons,nameWidth=0){output_manager_default.print(`Detected daemons:
|
|
18
|
+
`);let rows=daemons.map(daemon=>[formatName(daemon.name,nameWidth),daemon.entrypoint?chalk5.blue(`[${daemon.entrypoint}]`):chalk5.dim("[unknown]")]),tableOutput=table(rows,{align:["l","l"],hsep:2});output_manager_default.print(`${tableOutput}
|
|
19
|
+
`)}function formatName(name,nameWidth=0){return`\u2022 ${name}`.padEnd(nameWidth)}function getNameColumnWidth(names){return Math.max(0,...names.map(name=>formatName(name).length))}function buildServiceRowsV1(services,nameWidth){let outputOrder={web:0,cron:1,job:1,worker:2};return[...services].sort((a,b)=>(outputOrder[a.type]??3)-(outputOrder[b.type]??3)).map(service=>{let descInfo=getServiceDescriptionInfo(service),target=getServiceTarget(service);return[formatName(service.name,nameWidth),descInfo.colorFn(`[${descInfo.label}]`),chalk5.dim("\u2192"),target]})}function buildServiceRowsV2(services,nameWidth){return services.map(service=>{let descInfo=getFrameworkRuntimeBuilderInfo(service);return[formatName(service.name,nameWidth),descInfo.colorFn(`[${descInfo.label}]`)]})}function displayServicesConfigNote(configFileName="vercel.json",hasDaemons=!1){let subject=hasDaemons?"Services and daemons":"Services";output_manager_default.print(`
|
|
20
|
+
${chalk5.dim(`${subject} are configured via ${configFileName}.`)}
|
|
21
|
+
`)}function displayServiceErrors(errors){for(let error of errors)output_manager_default.warn(error.message)}var SERVICES_DOCS_URL="https://vercel.com/docs/services",INFERRED_SERVICES_PROMPT="Multiple services were detected. How would you like to set up this project?";async function getServicesSetupState(workPath){let fs=new import_fs_detectors.LocalFileSystemDetector(workPath),detectServicesResult=await(0,import_service_topology.detectServices)({fs,detectEntrypoint:createDetectEntrypoint(workPath)}),hasConfiguredServices=detectServicesResult.resolved?.source==="configured",inferredServices=hasConfiguredServices?null:detectServicesResult.inferred,inferredServicesWriteBlocker=inferredServices?await getServicesConfigWriteBlocker(workPath,inferredServices.config):null,daemons=hasConfiguredServices?await(0,import_service_topology.detectDaemons)({fs}):[];return{detectServicesResult,hasConfiguredServices,daemons,inferredServices,inferredServicesWriteBlocker}}function displayConfiguredServicesSetup({detectServicesResult,daemons},configFileName="vercel.json"){let{services}=detectServicesResult,nameWidth=getNameColumnWidth([...services,...daemons].map(({name})=>name));services.length>0&&displayDetectedServices(services,nameWidth),daemons.length>0&&(services.length>0&&output_manager_default.print(`
|
|
22
|
+
`),displayDetectedDaemons(daemons,nameWidth)),detectServicesResult.errors.length>0&&displayServiceErrors(detectServicesResult.errors),displayServicesConfigNote(configFileName,daemons.length>0)}function formatDetectedServicesSummary(services){if(services.length===0)return"";if(services.length===1)return`"${services[0].name}"`;if(services.length===2)return`"${services[0].name}" + "${services[1].name}"`;let othersCount=services.length-2;return`"${services[0].name}" + "${services[1].name}" + ${othersCount} ${othersCount===1?"other":"others"}`}function toProjectRootDirectory(projectPath,selectedPath){let rootDirectory=(0,import_build_utils3.normalizePath)(relative(projectPath,selectedPath));return rootDirectory===""?null:rootDirectory}async function promptForInferredServicesSetup({client,autoConfirm,nonInteractive,workPath,inferred,inferredWriteBlocker,allowChooseDifferentProjectDirectory=!1}){if(!inferred)return null;if(inferredWriteBlocker)return output_manager_default.warn(`Multiple services were detected, but your existing project config uses \`${inferredWriteBlocker}\`. To deploy multiple services in one project, see ${output_manager_default.link("Services",SERVICES_DOCS_URL)}.`),null;displayDetectedServices(inferred.services);let choice=null;if(autoConfirm)choice={type:"services"};else if(!nonInteractive){let webServices=inferred.services.filter(service=>(0,import_build_utils3.isExperimentalService)(service)?service.type==="web":!0),choices=[{name:`Set up project with all detected services: ${formatDetectedServicesSummary(inferred.services)}`,value:"services"},...webServices.map((service,index)=>({name:`Set up project with "${service.name}"`,value:`single-app:${index}`})),...allowChooseDifferentProjectDirectory?[{name:"Choose a different root directory",value:"project-directory"}]:[]],selected=await client.input.select({message:INFERRED_SERVICES_PROMPT,choices});if(selected==="services")choice={type:"services"};else if(selected==="project-directory")choice={type:"project-directory"};else if(typeof selected=="string"&&selected.startsWith("single-app:")){let index=Number.parseInt(selected.slice(11),10),service=webServices[index];if(service){let serviceRoot=(0,import_build_utils3.isExperimentalServiceV2)(service)?service.root:service.workspace;choice={type:"single-app",selectedPath:serviceRoot==="."?workPath:join(workPath,serviceRoot)}}}}if(choice?.type!=="services")return choice;let{configFileName}=await writeServicesConfig(workPath,inferred.config);return output_manager_default.print(` Added services configuration to ${configFileName}.
|
|
23
|
+
`),{type:"services"}}var import_slugify2=__toESM(require_slugify(),1);import{join as join2,relative as relative2}from"path";async function searchProjectsByRepoRoot({client,cwd,gitProjectName,orgs,remoteName}){let empty={matches:[],remoteNames:[]},rootPath=await findRepoRoot(cwd);if(!rootPath)return empty;let gitConfigPath=getGitConfigPath({cwd:rootPath})??join2(rootPath,".git/config"),remoteUrls=await getRemoteUrls(gitConfigPath),remoteNames=remoteUrls?Object.keys(remoteUrls).sort():[],remote;try{remote=await resolveGitRemote(client,rootPath,{yes:!0,existingRemoteName:remoteName})}catch(error){if(isPromptCanceledError(error))throw error;return output_manager_default.debug(`Failed to resolve Git remote for project search: ${error}`),{matches:[],remoteNames}}if(!remote)return{matches:[],remoteNames};let relativePath=relative2(rootPath,cwd);return{matches:(await Promise.all(orgs.map(async org=>{try{let projects=await fetchProjectsForRepoUrl(client,remote.repoUrl,org.id),repoProjectConfigs=projects.filter(project=>!gitProjectName||project.id===gitProjectName||project.name===gitProjectName).map(project=>({id:project.id,name:project.name,directory:project.rootDirectory||".",orgId:org.id}));return findProjectsFromPath(repoProjectConfigs,relativePath).map(match=>{let project=projects.find(p=>p.id===match.id);return project?{project,org,reason:"repo-root",repo:{...remote,directory:match.directory}}:null}).filter(Boolean)}catch(error){if(isPromptCanceledError(error))throw error;return output_manager_default.debug(`Failed to search Git-linked projects under ${org.slug}: ${error}`),[]}}))).flat(),remote,remoteNames}}function isCrossTeamMatch(value){return typeof value=="object"&&value!==null&&"project"in value&&"org"in value&&"reason"in value}async function selectOrgForLink(client,autoConfirm,searchable=!1,meta){try{return await selectOrg(client,"Which team?",autoConfirm,searchable,meta)}catch(err){if(isAPIError(err)){if(err.code==="NOT_AUTHORIZED")return output_manager_default.prettyError(err),{status:"error",exitCode:1,reason:"NOT_AUTHORIZED"};if(err.code==="TEAM_DELETED")return output_manager_default.prettyError(err),{status:"error",exitCode:1,reason:"TEAM_DELETED"}}throw err}}function isErrnoException(err){return err instanceof Error&&typeof err.code=="string"}async function hasWorkspaces(cwd){try{let fs=new import_fs_detectors2.LocalFileSystemDetector(cwd);return(await(0,import_fs_detectors2.getWorkspaces)({fs})).length>0}catch(err){if(isErrnoException(err)&&err.code&&["ENOENT","EACCES","ENOTDIR"].includes(err.code))return output_manager_default.debug(`getWorkspaces failed for ${cwd}: ${err}`),!1;throw err}}async function shouldPromptForRootDirectory(opts){if(opts.servicesChoice?.type==="project-directory"||await hasWorkspaces(opts.path))return!0;try{return((await detectProjects(opts.path)).get("")??[]).length===0}catch(err){return output_manager_default.debug(`detectProjects failed at root: ${err}`),!0}}async function maybePullEnvAfterLink(client,path2,autoConfirm,pullEnv){if(!pullEnv||!client.stdin.isTTY||client.nonInteractive||(output_manager_default.print(`
|
|
24
|
+
`),!(autoConfirm||await client.input.confirm("Pull development environment variables into .env.local?",!0))))return;let originalCwd=client.cwd;try{client.cwd=path2,await pull(client,autoConfirm?["--yes"]:[],"vercel-cli:link")!==0&&output_manager_default.error("Failed to pull environment variables. You can run `vc env pull` manually.")}catch{output_manager_default.error("Failed to pull environment variables. You can run `vc env pull` manually.")}finally{client.cwd=originalCwd}}async function linkCrossTeamMatch({client,path:path2,match,successEmoji,autoConfirm,pullEnv}){return client.config.currentTeam=match.org.type==="team"?match.org.id:void 0,match.reason==="repo-root"&&match.repo?(await linkRepoProject(client,path2,{project:match.project,orgId:match.org.id,orgSlug:match.org.slug,remoteName:match.repo.remoteName,successEmoji}),await maybePullEnvAfterLink(client,path2,autoConfirm,pullEnv),{status:"linked",org:match.org,project:match.project,repoRoot:match.repo.rootPath}):(await linkFolderToProject(client,path2,{projectId:match.project.id,orgId:match.org.id},match.project.name,match.org.slug,successEmoji,autoConfirm,pullEnv),{status:"linked",org:match.org,project:match.project})}async function setupAndLink(client,path2,{autoConfirm=!1,forceDelete=!1,link,selectedOrg,successEmoji="link",projectName,singleFile,nonInteractive=!1,pullEnv=!0,v0,createIfNotFound=!1}){let{config}=client,gitProjectName=projectName;if(projectName=projectName??(singleFile?(0,import_slugify3.default)(basename(singleFile,extname(singleFile)))||"file":basename(path2)),!isDirectory(path2))return output_manager_default.error(`Expected directory but found file: ${path2}`),{status:"error",exitCode:1,reason:"PATH_IS_FILE"};link||(link=await getLinkedProject(client,{cwd:path2,skipProjectRootResolution:!!singleFile}));let isTTY=client.stdin.isTTY,rootDirectory=null,newProjectName,org=selectedOrg;if(!forceDelete&&link.status==="linked")return link;if((0,import_build_utils4.getPlatformEnv)("ORG_ID")&&(0,import_build_utils4.getPlatformEnv)("PROJECT_ID")){let envLink=await getLinkedProject(client,{cwd:path2,skipProjectRootResolution:!!singleFile});if(envLink.status==="error")return envLink;if(envLink.status==="linked")return config.currentTeam=envLink.org.type==="team"?envLink.org.id:void 0,output_manager_default.print(`
|
|
25
|
+
`),printAlignedLabel(singleFile?"File":"Directory",humanizePath(singleFile??path2)),printAlignedLabel("Source","VERCEL_ORG_ID and VERCEL_PROJECT_ID"),output_manager_default.print(`
|
|
26
|
+
`),printAlignedLabel("Linked",`${envLink.org.slug}/${envLink.project.name}`,{gutter:"\u2713"}),envLink}if(!isTTY&&!autoConfirm&&!nonInteractive)return{status:"error",exitCode:1,reason:"HEADLESS"};if(!org&&(nonInteractive||!isTTY)){let resolved=await selectOrgForLink(client,autoConfirm);if("status"in resolved)return resolved;org=resolved}if(forceDelete){let vercelDir=getVercelDirectory(path2);(0,import_fs_extra.remove)(join3(vercelDir,VERCEL_DIR_README)),(0,import_fs_extra.remove)(join3(vercelDir,VERCEL_DIR_PROJECT))}output_manager_default.print(`
|
|
27
|
+
`),printAlignedLabel(singleFile?"File":"Directory",humanizePath(singleFile??path2)),output_manager_default.print(`
|
|
28
|
+
`);let interactive=isTTY&&!nonInteractive,searchableTeamPicker=interactive,showProjectSuggestions=interactive&&!gitProjectName&&!singleFile,projectOrNewProjectName,teamAutoSelected=!1,selectedGitRemoteName;for(;;){if(!org){let orgMeta={},resolved=await selectOrgForLink(client,autoConfirm,searchableTeamPicker,orgMeta);if("status"in resolved)return resolved;org=resolved,teamAutoSelected=orgMeta.choiceCount===1}if(createIfNotFound){let existing=await getProjectByNameOrId(client,projectName,org.id);projectOrNewProjectName=existing instanceof ProjectNotFound?projectName:existing;break}let repoMatches=[],gitRemoteNames=[],currentGitRemoteName;if(showProjectSuggestions){output_manager_default.spinner("Searching for existing projects\u2026",1e3);try{let repoSearch=await searchProjectsByRepoRoot({client,cwd:path2,gitProjectName,orgs:[org],remoteName:selectedGitRemoteName});repoMatches=repoSearch.matches,gitRemoteNames=repoSearch.remoteNames,currentGitRemoteName=repoSearch.remote?.remoteName}catch(err){if(isPromptCanceledError(err))throw err;output_manager_default.debug(`Git-linked project search failed: ${err}`)}finally{output_manager_default.stopSpinner()}}try{projectOrNewProjectName=await inputProject(client,org,projectName,autoConfirm,!1,showProjectSuggestions,searchableTeamPicker&&!selectedOrg&&!teamAutoSelected,repoMatches,{remoteNames:gitRemoteNames,currentRemoteName:currentGitRemoteName})}catch(err){if(err instanceof Error&&err.code==="HEADLESS")return{status:"error",exitCode:1,reason:"HEADLESS"};throw err}if(projectOrNewProjectName===BACK_TO_TEAM_SELECTION){org=void 0,selectedGitRemoteName=void 0;continue}if(projectOrNewProjectName===SWITCH_GIT_REMOTE){let rootPath=await findRepoRoot(path2);if(!rootPath)continue;try{selectedGitRemoteName=(await resolveGitRemote(client,rootPath,{yes:!1}))?.remoteName}catch(err){if(isPromptCanceledError(err))throw err;output_manager_default.debug(`Failed to switch Git remote: ${err}`)}continue}break}if(typeof projectOrNewProjectName=="string")newProjectName=projectOrNewProjectName;else{if(isCrossTeamMatch(projectOrNewProjectName))return await linkCrossTeamMatch({client,path:path2,match:projectOrNewProjectName,successEmoji,autoConfirm,pullEnv});{let project=projectOrNewProjectName;return createIfNotFound||await linkFolderToProject(client,path2,{projectId:project.id,orgId:org.id},project.name,org.slug,successEmoji,autoConfirm,pullEnv),{status:"linked",org,project}}}config.currentTeam=org.type==="team"?org.id:void 0;let gitConnectIntent=singleFile||createIfNotFound?null:await resolveGitConnectIntent(client,path2,autoConfirm),rootServicesSetup=singleFile?null:await getServicesSetupState(path2),configFileName=(singleFile?void 0:await findSourceVercelConfigFile(path2))??"vercel.json";try{let settings={},pathWithRootDirectory=path2,rootInferredServicesChoice=null;if(rootServicesSetup&&!rootServicesSetup.hasConfiguredServices&&(rootInferredServicesChoice=await promptForInferredServicesSetup({client,autoConfirm,nonInteractive,workPath:path2,inferred:rootServicesSetup.inferredServices,inferredWriteBlocker:rootServicesSetup.inferredServicesWriteBlocker,allowChooseDifferentProjectDirectory:!0})),singleFile)settings={...singleFileProjectSettings};else if(rootServicesSetup?.hasConfiguredServices)displayConfiguredServicesSetup(rootServicesSetup,configFileName),settings.framework="services";else if(rootInferredServicesChoice?.type==="services")settings.framework="services";else{let skipSelectedRootInferredServicesPrompt=rootInferredServicesChoice?.type==="single-app";if(rootInferredServicesChoice?.type==="single-app")rootDirectory=toProjectRootDirectory(path2,rootInferredServicesChoice.selectedPath);else if(await shouldPromptForRootDirectory({path:path2,servicesChoice:rootInferredServicesChoice})&&(rootDirectory=await inputRootDirectory(client,path2,autoConfirm),rootDirectory&&!await validateRootDirectory(path2,join3(path2,rootDirectory))))return{status:"error",exitCode:1,reason:"INVALID_ROOT_DIRECTORY"};pathWithRootDirectory=rootDirectory?join3(path2,rootDirectory):path2;let selectedRootServicesSetup=pathWithRootDirectory===path2?null:await getServicesSetupState(pathWithRootDirectory),selectedRootInferredServicesChoice=null;if(skipSelectedRootInferredServicesPrompt||(selectedRootInferredServicesChoice=await promptForInferredServicesSetup({client,autoConfirm,nonInteractive,workPath:pathWithRootDirectory,inferred:selectedRootServicesSetup?.inferredServices??null,inferredWriteBlocker:selectedRootServicesSetup?.inferredServicesWriteBlocker??null})),selectedRootServicesSetup?.hasConfiguredServices)displayConfiguredServicesSetup(selectedRootServicesSetup,configFileName),settings.framework="services";else if(selectedRootInferredServicesChoice?.type==="services")settings.framework="services";else{selectedRootInferredServicesChoice?.type==="single-app"&&(rootDirectory=toProjectRootDirectory(path2,selectedRootInferredServicesChoice.selectedPath),pathWithRootDirectory=rootDirectory?join3(path2,rootDirectory):path2);let localConfig=await readConfig(pathWithRootDirectory);if(localConfig instanceof CantParseJSONFile)return output_manager_default.prettyError(localConfig),{status:"error",exitCode:1};if(!localConfig||!localConfig.builds||localConfig.builds.length===0){let localConfigurationOverrides={buildCommand:localConfig?.buildCommand,devCommand:localConfig?.devCommand,framework:localConfig?.framework,commandForIgnoringBuildStep:localConfig?.ignoreCommand,installCommand:localConfig?.installCommand,outputDirectory:localConfig?.outputDirectory},framework=((await detectProjects(pathWithRootDirectory)).get("")||[])[0]??import_frameworks3.frameworkList.find(f=>f.slug===null);settings=await editProjectSettings(client,{},framework,autoConfirm,localConfigurationOverrides,configFileName)}}}let changeAdditionalSettings=!1,vercelAuthSetting=DEFAULT_VERCEL_AUTH_SETTING;changeAdditionalSettings&&(vercelAuthSetting=await vercelAuth(client,{autoConfirm})),rootDirectory&&(settings.rootDirectory=rootDirectory);let project=await createProject(client,{...settings,name:newProjectName,vercelAuth:vercelAuthSetting,v0});return createIfNotFound?(output_manager_default.print(`
|
|
29
|
+
`),printAlignedLabel("Created",`${org.slug}/${project.name}`,{gutter:"\u2713"})):await linkFolderToProject(client,path2,{projectId:project.id,orgId:org.id},project.name,org.slug,successEmoji,autoConfirm,!1,"Created"),await applyGitConnectIntent(client,gitConnectIntent,project,autoConfirm,org),{status:"linked",org,project,...gitConnectIntent?.offered&&{gitConnectOffered:!0}}}catch(err){if(isPromptCanceledError(err))throw err;return isAPIError(err)&&err.code==="too_many_projects"?(output_manager_default.prettyError(err),{status:"error",exitCode:1,reason:"TOO_MANY_PROJECTS"}):err instanceof Error&&err.code==="HEADLESS"?{status:"error",exitCode:1,reason:"HEADLESS"}:(printError(err),{status:"error",exitCode:1})}}async function resolveGitConnectIntent(client,path2,autoConfirm){try{let gitConfigPath=getGitConfigPath({cwd:path2})??join3(path2,".git/config"),gitConfig=await parseGitConfig(gitConfigPath);if(!gitConfig)return null;let remoteUrls=pluckRemoteUrls(gitConfig);if(!remoteUrls||Object.keys(remoteUrls).length===0)return null;let skipPrompts=autoConfirm||client.nonInteractive;if(!(skipPrompts||await client.input.confirm("Connect this Git repository to automatically deploy changes on every push?",!1)))return{offered:!0};let repoInfo=skipPrompts?parseRepoUrl(remoteUrls.origin??Object.values(remoteUrls)[0]):await selectAndParseRemoteUrl(client,remoteUrls);return repoInfo?{repoInfo,offered:!skipPrompts}:null}catch(error){if(isPromptCanceledError(error))throw error;return output_manager_default.debug(`Failed to detect git repository: ${error}`),null}}async function applyGitConnectIntent(client,intent,project,autoConfirm,org){if(!intent?.repoInfo)return;let{repoInfo}=intent;try{await checkExistsAndConnect({client,confirm:autoConfirm,gitProviderLink:project.link,org,gitOrg:repoInfo.org,project,provider:repoInfo.provider,repo:repoInfo.repo,repoPath:`${repoInfo.org}/${repoInfo.repo}`})}catch(error){if(isPromptCanceledError(error))return;output_manager_default.debug(`Failed to connect git repository: ${error}`)}}async function connectGitRepository(client,path2,project,autoConfirm,org){let intent;try{intent=await resolveGitConnectIntent(client,path2,autoConfirm)}catch(error){if(isPromptCanceledError(error))return;throw error}await applyGitConnectIntent(client,intent,project,autoConfirm,org)}export{readConfig,displayDetectedServices,shouldPromptForRootDirectory,setupAndLink,resolveGitConnectIntent,applyGitConnectIntent,connectGitRepository};
|
|
@@ -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
|
+
function getCommandFlags(argv,excludeFlags=[]){let flags=Object.keys(argv).filter(key=>key!=="--token"&&!excludeFlags.includes(key)).map(key=>`${key}${typeof argv[key]!="boolean"?" "+argv[key]:""}`);return flags.length>0?` ${flags.join(" ")}`:""}export{getCommandFlags};
|