@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,220 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
|
|
3
|
+
const http = require('node:http');
|
|
4
|
+
const { AsyncLocalStorage } = require('node:async_hooks');
|
|
5
|
+
|
|
6
|
+
const REQUEST_CONTEXT_SYMBOL = Symbol.for('@vercel/request-context');
|
|
7
|
+
const PATCHED_SYMBOL = Symbol.for('@vercel/next-dev-websocket-shim/patched');
|
|
8
|
+
const UPGRADE_LISTENER_SYMBOL = Symbol.for(
|
|
9
|
+
'@vercel/next-dev-websocket-shim/upgrade-listener'
|
|
10
|
+
);
|
|
11
|
+
|
|
12
|
+
if (!globalThis[PATCHED_SYMBOL]) {
|
|
13
|
+
globalThis[PATCHED_SYMBOL] = true;
|
|
14
|
+
|
|
15
|
+
const requestContext = new AsyncLocalStorage();
|
|
16
|
+
const previousRequestContext = globalThis[REQUEST_CONTEXT_SYMBOL];
|
|
17
|
+
|
|
18
|
+
Object.defineProperty(globalThis, REQUEST_CONTEXT_SYMBOL, {
|
|
19
|
+
enumerable: false,
|
|
20
|
+
configurable: true,
|
|
21
|
+
value: {
|
|
22
|
+
get: () => requestContext.getStore() ?? previousRequestContext?.get?.(),
|
|
23
|
+
},
|
|
24
|
+
});
|
|
25
|
+
|
|
26
|
+
const originalEmit = http.Server.prototype.emit;
|
|
27
|
+
const originalListen = http.Server.prototype.listen;
|
|
28
|
+
|
|
29
|
+
http.Server.prototype.listen = function listen(...args) {
|
|
30
|
+
if (!this[UPGRADE_LISTENER_SYMBOL]) {
|
|
31
|
+
this[UPGRADE_LISTENER_SYMBOL] = true;
|
|
32
|
+
this.on('upgrade', noop);
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
return originalListen.apply(this, args);
|
|
36
|
+
};
|
|
37
|
+
|
|
38
|
+
http.Server.prototype.emit = function emit(
|
|
39
|
+
event,
|
|
40
|
+
req,
|
|
41
|
+
socket,
|
|
42
|
+
head,
|
|
43
|
+
...args
|
|
44
|
+
) {
|
|
45
|
+
if (
|
|
46
|
+
event !== 'upgrade' ||
|
|
47
|
+
!isWebSocketUpgrade(req) ||
|
|
48
|
+
isNextInternalUpgrade(req)
|
|
49
|
+
) {
|
|
50
|
+
return originalEmit.call(this, event, req, socket, head, ...args);
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
const requestListeners = this.listeners('request');
|
|
54
|
+
if (requestListeners.length === 0) {
|
|
55
|
+
return originalEmit.call(this, event, req, socket, head, ...args);
|
|
56
|
+
}
|
|
57
|
+
|
|
58
|
+
const response = new http.ServerResponse(req);
|
|
59
|
+
|
|
60
|
+
return emitWebSocketRequest({
|
|
61
|
+
server: this,
|
|
62
|
+
req,
|
|
63
|
+
response,
|
|
64
|
+
socket,
|
|
65
|
+
head: head || Buffer.alloc(0),
|
|
66
|
+
requestContext,
|
|
67
|
+
originalEmit,
|
|
68
|
+
});
|
|
69
|
+
};
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
function emitWebSocketRequest({
|
|
73
|
+
server,
|
|
74
|
+
req,
|
|
75
|
+
response,
|
|
76
|
+
socket,
|
|
77
|
+
head,
|
|
78
|
+
requestContext,
|
|
79
|
+
originalEmit,
|
|
80
|
+
}) {
|
|
81
|
+
socket.setTimeout(0);
|
|
82
|
+
socket.setNoDelay(true);
|
|
83
|
+
|
|
84
|
+
if (typeof response.assignSocket === 'function' && !response.socket) {
|
|
85
|
+
response.assignSocket(socket);
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const abortController = new AbortController();
|
|
89
|
+
let consumed = false;
|
|
90
|
+
response.once('finish', () => {
|
|
91
|
+
if (!consumed) {
|
|
92
|
+
socket.end();
|
|
93
|
+
}
|
|
94
|
+
});
|
|
95
|
+
|
|
96
|
+
const context = {
|
|
97
|
+
waitUntil: promiseOrFunc => {
|
|
98
|
+
const promise =
|
|
99
|
+
typeof promiseOrFunc === 'function' ? promiseOrFunc() : promiseOrFunc;
|
|
100
|
+
Promise.resolve(promise).catch(() => {});
|
|
101
|
+
},
|
|
102
|
+
headers: Object.fromEntries(
|
|
103
|
+
Object.entries(req.headers).map(([key, value]) => [
|
|
104
|
+
key,
|
|
105
|
+
Array.isArray(value) ? value.join(',') : value,
|
|
106
|
+
])
|
|
107
|
+
),
|
|
108
|
+
method: req.method || 'GET',
|
|
109
|
+
url: new URL(req.url || '/', getRequestOrigin(req)).toString(),
|
|
110
|
+
signal: abortController.signal,
|
|
111
|
+
upgradeWebSocket: () => {
|
|
112
|
+
if (consumed) {
|
|
113
|
+
throw new Error(
|
|
114
|
+
'ctx.upgradeWebSocket() can only be called once per request'
|
|
115
|
+
);
|
|
116
|
+
}
|
|
117
|
+
consumed = true;
|
|
118
|
+
|
|
119
|
+
const closeResponse = createResponseCloseEmitter(response);
|
|
120
|
+
if (typeof response.detachSocket === 'function') {
|
|
121
|
+
response.detachSocket(socket);
|
|
122
|
+
}
|
|
123
|
+
suppressFrameworkResponse(response);
|
|
124
|
+
preserveAsyncContextOnSocket(socket, requestContext);
|
|
125
|
+
|
|
126
|
+
socket.once('close', () => {
|
|
127
|
+
requestContext.run(context, () => {
|
|
128
|
+
req.emit('aborted');
|
|
129
|
+
abortController.abort();
|
|
130
|
+
});
|
|
131
|
+
|
|
132
|
+
// Next dev treats ServerResponse "close" as the end of its request
|
|
133
|
+
// lifecycle. Let ws emit its user-facing "close" event first so those
|
|
134
|
+
// callbacks can register after() work before Next drains that work.
|
|
135
|
+
setImmediate(() => requestContext.run(context, closeResponse));
|
|
136
|
+
});
|
|
137
|
+
socket.once('error', noop);
|
|
138
|
+
|
|
139
|
+
return { req, socket, head };
|
|
140
|
+
},
|
|
141
|
+
};
|
|
142
|
+
|
|
143
|
+
requestContext.run(context, () => {
|
|
144
|
+
try {
|
|
145
|
+
originalEmit.call(server, 'request', req, response);
|
|
146
|
+
} catch (error) {
|
|
147
|
+
socket.destroy(error);
|
|
148
|
+
}
|
|
149
|
+
});
|
|
150
|
+
|
|
151
|
+
return true;
|
|
152
|
+
}
|
|
153
|
+
|
|
154
|
+
function isWebSocketUpgrade(req) {
|
|
155
|
+
const connection = req?.headers?.connection;
|
|
156
|
+
const upgrade = req?.headers?.upgrade;
|
|
157
|
+
return (
|
|
158
|
+
typeof connection === 'string' &&
|
|
159
|
+
connection
|
|
160
|
+
.split(',')
|
|
161
|
+
.some(token => token.trim().toLowerCase() === 'upgrade') &&
|
|
162
|
+
typeof upgrade === 'string' &&
|
|
163
|
+
upgrade.split(',').some(token => token.trim().toLowerCase() === 'websocket')
|
|
164
|
+
);
|
|
165
|
+
}
|
|
166
|
+
|
|
167
|
+
function isNextInternalUpgrade(req) {
|
|
168
|
+
const pathname = new URL(req?.url || '/', 'http://localhost').pathname;
|
|
169
|
+
return pathname.includes('/_next/') || pathname.startsWith('/__nextjs');
|
|
170
|
+
}
|
|
171
|
+
|
|
172
|
+
function suppressFrameworkResponse(response) {
|
|
173
|
+
response.writeHead = function writeHead() {
|
|
174
|
+
return this;
|
|
175
|
+
};
|
|
176
|
+
response.write = function write() {
|
|
177
|
+
return true;
|
|
178
|
+
};
|
|
179
|
+
response.end = function end() {
|
|
180
|
+
return this;
|
|
181
|
+
};
|
|
182
|
+
}
|
|
183
|
+
|
|
184
|
+
function createResponseCloseEmitter(response) {
|
|
185
|
+
let closed = false;
|
|
186
|
+
response.once('close', () => {
|
|
187
|
+
closed = true;
|
|
188
|
+
});
|
|
189
|
+
|
|
190
|
+
return () => {
|
|
191
|
+
if (closed) {
|
|
192
|
+
return;
|
|
193
|
+
}
|
|
194
|
+
closed = true;
|
|
195
|
+
// Frameworks like Next.js use ServerResponse "close" as their request
|
|
196
|
+
// lifecycle hook. Upgraded requests detach the socket, so bridge that
|
|
197
|
+
// hook to the WebSocket close.
|
|
198
|
+
response.emit('close');
|
|
199
|
+
};
|
|
200
|
+
}
|
|
201
|
+
|
|
202
|
+
function preserveAsyncContextOnSocket(socket, requestContext) {
|
|
203
|
+
const store = requestContext.getStore();
|
|
204
|
+
const runInSnapshot =
|
|
205
|
+
typeof AsyncLocalStorage.snapshot === 'function'
|
|
206
|
+
? AsyncLocalStorage.snapshot()
|
|
207
|
+
: callback => requestContext.run(store, callback);
|
|
208
|
+
const originalEmit = socket.emit;
|
|
209
|
+
socket.emit = function emit(...args) {
|
|
210
|
+
return runInSnapshot(() => originalEmit.apply(this, args));
|
|
211
|
+
};
|
|
212
|
+
}
|
|
213
|
+
|
|
214
|
+
function getRequestOrigin(req) {
|
|
215
|
+
const host = req.headers.host || 'localhost';
|
|
216
|
+
const proto = req.socket?.encrypted ? 'https' : 'http';
|
|
217
|
+
return `${proto}://${host}`;
|
|
218
|
+
}
|
|
219
|
+
|
|
220
|
+
function noop() {}
|
package/dist/vc.js
ADDED
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
#!/usr/bin/env node
|
|
2
|
+
/* biome-ignore-all lint/suspicious/noConsole: CLI entry point */
|
|
3
|
+
// This shim defers loading the real module until the compile cache is enabled.
|
|
4
|
+
// https://nodejs.org/api/module.html#moduleenablecompilecachecachedir
|
|
5
|
+
// enableCompileCache was added in Node.js 22.8.0, so we need to handle older versions.
|
|
6
|
+
const entryAt = performance.now();
|
|
7
|
+
try {
|
|
8
|
+
const { enableCompileCache } = await import('node:module');
|
|
9
|
+
if (enableCompileCache) {
|
|
10
|
+
enableCompileCache();
|
|
11
|
+
}
|
|
12
|
+
} catch {}
|
|
13
|
+
|
|
14
|
+
// Spawn the installed native binary for explicit opt-ins, macOS machines, or
|
|
15
|
+
// internal automatic enrollment. Explicit opt-outs always override defaults.
|
|
16
|
+
import { spawnSync } from 'node:child_process';
|
|
17
|
+
import { existsSync, statSync, writeFileSync } from 'node:fs';
|
|
18
|
+
import { dirname, join, resolve } from 'node:path';
|
|
19
|
+
import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
20
|
+
|
|
21
|
+
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
22
|
+
|
|
23
|
+
// Keep in sync with packages/vc-native/scripts/platforms.mjs.
|
|
24
|
+
const NATIVE_TARGETS = [
|
|
25
|
+
'darwin-arm64',
|
|
26
|
+
'darwin-x64',
|
|
27
|
+
'linux-arm64',
|
|
28
|
+
'linux-arm64-musl',
|
|
29
|
+
'linux-x64',
|
|
30
|
+
'linux-x64-musl',
|
|
31
|
+
'win32-arm64',
|
|
32
|
+
'win32-x64',
|
|
33
|
+
];
|
|
34
|
+
|
|
35
|
+
// musl's `ldd` names itself. npm and pnpm skip the other libc's package via
|
|
36
|
+
// its `libc` field, but Yarn classic installs both, so the launcher must pick
|
|
37
|
+
// one.
|
|
38
|
+
function isMusl() {
|
|
39
|
+
const ldd = spawnSync('ldd', ['--version'], { encoding: 'utf8' });
|
|
40
|
+
return `${ldd.stdout ?? ''}${ldd.stderr ?? ''}`.includes('musl');
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
function nativeTarget() {
|
|
44
|
+
const target = `${process.platform}-${process.arch}`;
|
|
45
|
+
return process.platform === 'linux' && isMusl() ? `${target}-musl` : target;
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
function resolveNative() {
|
|
49
|
+
// Already running inside the native binary — never trampoline again.
|
|
50
|
+
if (process.env.VERCEL_VC_NATIVE === '1') return null;
|
|
51
|
+
const pkgName = `@vercel/vc-native-${nativeTarget()}`;
|
|
52
|
+
const binName = process.platform === 'win32' ? 'vercel.exe' : 'vercel';
|
|
53
|
+
// Walk up from this install's own tree looking for a sibling native
|
|
54
|
+
// package. `require.resolve()` is not used because it falls back to
|
|
55
|
+
// NODE_PATH and the global folders even when `paths` is given.
|
|
56
|
+
let dir = __dirname;
|
|
57
|
+
while (true) {
|
|
58
|
+
const pkgDir = join(dir, 'node_modules', pkgName);
|
|
59
|
+
if (existsSync(join(pkgDir, 'package.json'))) {
|
|
60
|
+
const a = join(pkgDir, 'bin', binName);
|
|
61
|
+
if (existsSync(a)) return a;
|
|
62
|
+
const b = join(pkgDir, binName);
|
|
63
|
+
if (existsSync(b)) return b;
|
|
64
|
+
}
|
|
65
|
+
const parent = dirname(dir);
|
|
66
|
+
if (parent === dir) return null;
|
|
67
|
+
dir = parent;
|
|
68
|
+
}
|
|
69
|
+
}
|
|
70
|
+
|
|
71
|
+
function nativeUnavailableMessage() {
|
|
72
|
+
const target = nativeTarget();
|
|
73
|
+
if (NATIVE_TARGETS.includes(target)) {
|
|
74
|
+
return (
|
|
75
|
+
`The native Vercel CLI package @vercel/vc-native-${target} is not installed. ` +
|
|
76
|
+
'Reinstall vercel without omitting optional dependencies (for example, npm i -g vercel@latest).'
|
|
77
|
+
);
|
|
78
|
+
}
|
|
79
|
+
return (
|
|
80
|
+
`Vercel CLI does not provide a native binary for ${target}. ` +
|
|
81
|
+
'Install the JavaScript CLI instead (for example, npm i -g @vercel/cli-support).'
|
|
82
|
+
);
|
|
83
|
+
}
|
|
84
|
+
|
|
85
|
+
// Operating systems without a native package get the same version's JS CLI
|
|
86
|
+
// from @vercel/cli-support. Like resolveNative(), only search this install's
|
|
87
|
+
// tree.
|
|
88
|
+
function resolveCliSupport() {
|
|
89
|
+
let dir = __dirname;
|
|
90
|
+
while (true) {
|
|
91
|
+
const entry = join(
|
|
92
|
+
dir,
|
|
93
|
+
'node_modules',
|
|
94
|
+
'@vercel',
|
|
95
|
+
'cli-support',
|
|
96
|
+
'dist',
|
|
97
|
+
'index.js'
|
|
98
|
+
);
|
|
99
|
+
if (existsSync(entry)) return entry;
|
|
100
|
+
const parent = dirname(dir);
|
|
101
|
+
if (parent === dir) return null;
|
|
102
|
+
dir = parent;
|
|
103
|
+
}
|
|
104
|
+
}
|
|
105
|
+
|
|
106
|
+
async function importJsCli() {
|
|
107
|
+
try {
|
|
108
|
+
return await import('./index.js');
|
|
109
|
+
} catch (error) {
|
|
110
|
+
const cliSupport =
|
|
111
|
+
process.env.VERCEL_VC_NATIVE !== '1' &&
|
|
112
|
+
error?.code === 'ERR_MODULE_NOT_FOUND' &&
|
|
113
|
+
resolveCliSupport();
|
|
114
|
+
if (!cliSupport) throw error;
|
|
115
|
+
return import(pathToFileURL(cliSupport).href);
|
|
116
|
+
}
|
|
117
|
+
}
|
|
118
|
+
|
|
119
|
+
// Read `--global-config`/`-Q` without loading the full CLI arg parser.
|
|
120
|
+
function globalConfigDirFromArgv() {
|
|
121
|
+
const argv = process.argv.slice(2);
|
|
122
|
+
for (let i = 0; i < argv.length; i++) {
|
|
123
|
+
const arg = argv[i];
|
|
124
|
+
if (arg === '--global-config' || arg === '-Q') {
|
|
125
|
+
return argv[i + 1];
|
|
126
|
+
}
|
|
127
|
+
if (arg.startsWith('--global-config=')) {
|
|
128
|
+
return arg.slice('--global-config='.length);
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
return undefined;
|
|
132
|
+
}
|
|
133
|
+
|
|
134
|
+
// Any failure to read config counts as "not opted in".
|
|
135
|
+
async function isNativeBinaryOptedIn() {
|
|
136
|
+
const envOverride = process.env.VERCEL_CLI_USE_NATIVE_BINARY;
|
|
137
|
+
if (envOverride === '1' || envOverride === 'true') return true;
|
|
138
|
+
if (envOverride === '0' || envOverride === 'false') return false;
|
|
139
|
+
|
|
140
|
+
try {
|
|
141
|
+
// Zod-free subpath to avoid loading zod + schemas on this hot path.
|
|
142
|
+
const config = await import('@vercel/cli-config/paths');
|
|
143
|
+
const argDir = globalConfigDirFromArgv();
|
|
144
|
+
const configDir = argDir
|
|
145
|
+
? resolve(process.cwd(), argDir)
|
|
146
|
+
: config.getGlobalPathConfig();
|
|
147
|
+
const configPath = config.getConfigFilePath(configDir);
|
|
148
|
+
const preference = config.readGlobalConfigFlag(
|
|
149
|
+
configPath,
|
|
150
|
+
'useNativeBinary'
|
|
151
|
+
);
|
|
152
|
+
if (typeof preference === 'boolean') return preference;
|
|
153
|
+
// All macOS machines are opted in unless they explicitly opt out above.
|
|
154
|
+
if (process.platform === 'darwin') return true;
|
|
155
|
+
return (
|
|
156
|
+
config.readGlobalConfigFlag(configPath, 'nativeBinaryAutoOptIn') === true
|
|
157
|
+
);
|
|
158
|
+
} catch {
|
|
159
|
+
return false;
|
|
160
|
+
}
|
|
161
|
+
}
|
|
162
|
+
|
|
163
|
+
// Keep the opt-out escape hatch in Node even when the native binary cannot
|
|
164
|
+
// start. The full CLI parser still validates the command and its arguments.
|
|
165
|
+
const disableBinary = process.argv.slice(2).includes('--disable-binary');
|
|
166
|
+
const nativeBin = resolveNative();
|
|
167
|
+
const bin = disableBinary ? null : nativeBin;
|
|
168
|
+
|
|
169
|
+
// Internal worker arguments intentionally trampoline too. The packaged native
|
|
170
|
+
// binary sets VERCEL_VC_NATIVE=1 in pkg.js and re-enters this file, where
|
|
171
|
+
// resolveNative() returns null and the worker branch below handles the request.
|
|
172
|
+
if (bin && (await isNativeBinaryOptedIn())) {
|
|
173
|
+
process.env.VERCEL_VC_NATIVE = '1';
|
|
174
|
+
// Do not fall through to JS on spawn/loader failures — surface them so
|
|
175
|
+
// native binary issues (e.g. glibc mismatch) are visible.
|
|
176
|
+
const r = spawnSync(bin, process.argv.slice(2), {
|
|
177
|
+
stdio: 'inherit',
|
|
178
|
+
windowsHide: true,
|
|
179
|
+
env: {
|
|
180
|
+
...process.env,
|
|
181
|
+
// Upgrades belong to the vercel package, not its native runtime dependency.
|
|
182
|
+
// Always replace an inherited value with this launcher's own entrypoint.
|
|
183
|
+
VERCEL_CLI_PACKAGE_ENTRYPOINT: fileURLToPath(import.meta.url),
|
|
184
|
+
VERCEL_CLI_PACKAGE_EXECUTABLE: bin,
|
|
185
|
+
},
|
|
186
|
+
});
|
|
187
|
+
if (r.error) {
|
|
188
|
+
console.error(r.error.message);
|
|
189
|
+
process.exit(1);
|
|
190
|
+
}
|
|
191
|
+
if (r.signal) {
|
|
192
|
+
try {
|
|
193
|
+
process.kill(process.pid, r.signal);
|
|
194
|
+
} catch {}
|
|
195
|
+
}
|
|
196
|
+
process.exit(r.status ?? 1);
|
|
197
|
+
}
|
|
198
|
+
|
|
199
|
+
if (process.argv[2] === '--internal-build-worker') {
|
|
200
|
+
const {
|
|
201
|
+
applyInternalBuildRequest,
|
|
202
|
+
InternalBuildWorkerReport,
|
|
203
|
+
preloadInternalBuild,
|
|
204
|
+
waitForInternalBuildRequest,
|
|
205
|
+
} = await import('./internal-build-worker.js');
|
|
206
|
+
const report = new InternalBuildWorkerReport({ entryAt });
|
|
207
|
+
// Only module loading belongs here: argv, env, and cwd still belong to the
|
|
208
|
+
// prewarm process until the build request is applied.
|
|
209
|
+
const handoff = await waitForInternalBuildRequest(
|
|
210
|
+
process.argv.slice(2),
|
|
211
|
+
() =>
|
|
212
|
+
preloadInternalBuild(
|
|
213
|
+
() => import('./commands/build/index.js'),
|
|
214
|
+
() => import('./internal-build.js'),
|
|
215
|
+
report
|
|
216
|
+
),
|
|
217
|
+
{ report }
|
|
218
|
+
);
|
|
219
|
+
globalThis[Symbol.for('vercel.cli.fatal-error-handler')] = error =>
|
|
220
|
+
handoff.error(error);
|
|
221
|
+
|
|
222
|
+
try {
|
|
223
|
+
// The caller must provide the complete environment for a non-interactive
|
|
224
|
+
// build-container invocation before normal CLI initialization starts.
|
|
225
|
+
applyInternalBuildRequest(handoff.request);
|
|
226
|
+
const { runInternalBuild } = await import('./internal-build.js');
|
|
227
|
+
let exitCode = await runInternalBuild();
|
|
228
|
+
if (exitCode === undefined) {
|
|
229
|
+
// Importing index.js starts the full CLI with the applied request.
|
|
230
|
+
const { cliPromise } = await import('./index.js');
|
|
231
|
+
exitCode = await cliPromise;
|
|
232
|
+
}
|
|
233
|
+
await handoff.complete(exitCode ?? 0);
|
|
234
|
+
} catch (error) {
|
|
235
|
+
await handoff.error(error);
|
|
236
|
+
process.exitCode = 1;
|
|
237
|
+
}
|
|
238
|
+
|
|
239
|
+
process.exit(process.exitCode ?? 0);
|
|
240
|
+
}
|
|
241
|
+
|
|
242
|
+
// Linux and Windows on anything but x64/arm64 have no native binary, and will
|
|
243
|
+
// lose the JS CLI from `vercel` itself in a future release.
|
|
244
|
+
async function warnDeprecatedArch() {
|
|
245
|
+
if (
|
|
246
|
+
!['linux', 'win32'].includes(process.platform) ||
|
|
247
|
+
['x64', 'arm64'].includes(process.arch) ||
|
|
248
|
+
process.env.VERCEL_VC_NATIVE === '1'
|
|
249
|
+
) {
|
|
250
|
+
return;
|
|
251
|
+
}
|
|
252
|
+
const argv = process.argv.slice(2);
|
|
253
|
+
const formatIndex = argv.indexOf('--format');
|
|
254
|
+
if (
|
|
255
|
+
argv.some(arg =>
|
|
256
|
+
[
|
|
257
|
+
'--non-interactive',
|
|
258
|
+
'--non-interactive=true',
|
|
259
|
+
'--json',
|
|
260
|
+
'--format=json',
|
|
261
|
+
].includes(arg)
|
|
262
|
+
) ||
|
|
263
|
+
(formatIndex !== -1 && argv[formatIndex + 1] === 'json')
|
|
264
|
+
) {
|
|
265
|
+
return;
|
|
266
|
+
}
|
|
267
|
+
let stamp;
|
|
268
|
+
try {
|
|
269
|
+
const config = await import('@vercel/cli-config/paths');
|
|
270
|
+
const argDir = globalConfigDirFromArgv();
|
|
271
|
+
const configDir = argDir
|
|
272
|
+
? resolve(process.cwd(), argDir)
|
|
273
|
+
: config.getGlobalPathConfig();
|
|
274
|
+
if (existsSync(configDir)) {
|
|
275
|
+
stamp = join(configDir, '.arch-deprecation-warned');
|
|
276
|
+
if (Date.now() - statSync(stamp).mtimeMs < 24 * 60 * 60 * 1000) return;
|
|
277
|
+
}
|
|
278
|
+
} catch {}
|
|
279
|
+
const target = `${process.platform}-${process.arch}`;
|
|
280
|
+
console.error(
|
|
281
|
+
`! Support for ${target} will be removed from the vercel package in a future release. ` +
|
|
282
|
+
'npm i -g @vercel/cli-support will keep working.'
|
|
283
|
+
);
|
|
284
|
+
if (target === 'win32-ia32') {
|
|
285
|
+
console.error(
|
|
286
|
+
' If this is a 64-bit PC, install 64-bit Node.js and reinstall vercel instead.'
|
|
287
|
+
);
|
|
288
|
+
}
|
|
289
|
+
if (stamp) {
|
|
290
|
+
try {
|
|
291
|
+
writeFileSync(stamp, '');
|
|
292
|
+
} catch {}
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
|
|
296
|
+
await warnDeprecatedArch();
|
|
297
|
+
|
|
298
|
+
// Fast path for --version to avoid loading the entire CLI
|
|
299
|
+
if (
|
|
300
|
+
process.argv.length === 3 &&
|
|
301
|
+
(process.argv[2] === '--version' || process.argv[2] === '-v')
|
|
302
|
+
) {
|
|
303
|
+
const { version, buildLabel } = await import('./version.mjs');
|
|
304
|
+
const labels = [];
|
|
305
|
+
if (process.env.VERCEL_VC_NATIVE === '1') labels.push('native');
|
|
306
|
+
// Optional build metadata stamped by CI (e.g. "pr-115 abc1234").
|
|
307
|
+
if (buildLabel) labels.push(buildLabel);
|
|
308
|
+
const suffix = labels.length > 0 ? ` (${labels.join(', ')})` : '';
|
|
309
|
+
console.error(`Vercel CLI ${version}${suffix}`);
|
|
310
|
+
console.log(version);
|
|
311
|
+
process.exit(0);
|
|
312
|
+
}
|
|
313
|
+
|
|
314
|
+
// Fast path for --help to avoid loading the entire CLI. The build generates
|
|
315
|
+
// root-help-commands.mjs from the command registry; without it, fall through
|
|
316
|
+
// to the full CLI, which renders the same help from the registry.
|
|
317
|
+
if (
|
|
318
|
+
process.argv.length === 3 &&
|
|
319
|
+
(process.argv[2] === '--help' || process.argv[2] === '-h')
|
|
320
|
+
) {
|
|
321
|
+
let rootHelp;
|
|
322
|
+
try {
|
|
323
|
+
const { version } = await import('./version.mjs');
|
|
324
|
+
const { help } = await import('./help.js');
|
|
325
|
+
const { rootHelpCommands } = await import('./root-help-commands.mjs');
|
|
326
|
+
rootHelp = {
|
|
327
|
+
version,
|
|
328
|
+
text: help(rootHelpCommands, process.stdout.columns),
|
|
329
|
+
};
|
|
330
|
+
} catch {
|
|
331
|
+
rootHelp = undefined;
|
|
332
|
+
}
|
|
333
|
+
if (rootHelp) {
|
|
334
|
+
console.error(`Vercel CLI ${rootHelp.version}`);
|
|
335
|
+
process.stdout.write(rootHelp.text);
|
|
336
|
+
process.exit(0);
|
|
337
|
+
}
|
|
338
|
+
}
|
|
339
|
+
|
|
340
|
+
try {
|
|
341
|
+
await importJsCli();
|
|
342
|
+
} catch (error) {
|
|
343
|
+
// Without a native binary the JS CLI is the only option; if its
|
|
344
|
+
// dependencies are not installed either, name the missing package.
|
|
345
|
+
if (
|
|
346
|
+
!nativeBin &&
|
|
347
|
+
process.env.VERCEL_VC_NATIVE !== '1' &&
|
|
348
|
+
error?.code === 'ERR_MODULE_NOT_FOUND'
|
|
349
|
+
) {
|
|
350
|
+
console.error(`Error: ${nativeUnavailableMessage()}`);
|
|
351
|
+
console.error(error.message);
|
|
352
|
+
process.exit(1);
|
|
353
|
+
}
|
|
354
|
+
// Global-config paths are resolved during module initialization, before the
|
|
355
|
+
// command router and its client exist. Report local parser failures without
|
|
356
|
+
// dumping a stack or loading configuration again to construct the error.
|
|
357
|
+
if (
|
|
358
|
+
error?.name !== 'ArgError' ||
|
|
359
|
+
![
|
|
360
|
+
'ARG_UNKNOWN_OPTION',
|
|
361
|
+
'ARG_MISSING_REQUIRED_LONGARG',
|
|
362
|
+
'ARG_MISSING_REQUIRED_SHORTARG',
|
|
363
|
+
].includes(error.code)
|
|
364
|
+
) {
|
|
365
|
+
throw error;
|
|
366
|
+
}
|
|
367
|
+
let nonInteractive = false;
|
|
368
|
+
for (const arg of process.argv.slice(2)) {
|
|
369
|
+
if (arg === '--') break;
|
|
370
|
+
if (arg === '--non-interactive' || arg === '--non-interactive=true') {
|
|
371
|
+
nonInteractive = true;
|
|
372
|
+
} else if (arg === '--non-interactive=false') {
|
|
373
|
+
nonInteractive = false;
|
|
374
|
+
}
|
|
375
|
+
}
|
|
376
|
+
if (nonInteractive) {
|
|
377
|
+
console.log(
|
|
378
|
+
JSON.stringify(
|
|
379
|
+
{
|
|
380
|
+
status: 'error',
|
|
381
|
+
reason: 'invalid_arguments',
|
|
382
|
+
message: error.message,
|
|
383
|
+
},
|
|
384
|
+
null,
|
|
385
|
+
2
|
|
386
|
+
)
|
|
387
|
+
);
|
|
388
|
+
} else {
|
|
389
|
+
console.error(`✗ ${error.message}`);
|
|
390
|
+
}
|
|
391
|
+
// A usage error, like every other unknown or incomplete option.
|
|
392
|
+
process.exit(2);
|
|
393
|
+
}
|
package/dist/version.mjs
ADDED