@vercel/cli-support 65.9.0 → 65.10.0-snapshot-b8e5bb846796
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/add-4VXTYDC7.js +8 -0
- package/dist/chunks/add-K3ZHVAYL.js +8 -0
- package/dist/chunks/add-M26FXXGH.js +8 -0
- package/dist/chunks/build-ESY72OCS.js +7 -0
- package/dist/chunks/chunk-2AMO2VMV.js +68 -0
- package/dist/chunks/{chunk-U6KJOCXX.js → chunk-2DHDKWYN.js} +1 -1
- package/dist/chunks/chunk-2VBFQZ72.js +7 -0
- package/dist/chunks/{chunk-BZNRYQ6U.js → chunk-37LESFVW.js} +1 -1
- package/dist/chunks/{chunk-CMHL66LK.js → chunk-3F5BOG4A.js} +1 -1
- package/dist/chunks/{chunk-ZCXKEZS4.js → chunk-3HC4F32I.js} +1 -1
- package/dist/chunks/{chunk-VZKQP67Q.js → chunk-4FV4I3KH.js} +1 -1
- package/dist/chunks/{chunk-R5ZLTWKB.js → chunk-4LGAV2WN.js} +1 -1
- package/dist/chunks/{chunk-DUJAQS7I.js → chunk-4MPQZWQV.js} +1 -1
- package/dist/chunks/{chunk-7WY7ASKE.js → chunk-56UH6NQ3.js} +1 -1
- package/dist/chunks/{chunk-QQA2OMXJ.js → chunk-5KE67O45.js} +1 -1
- package/dist/chunks/chunk-6EQWP4LZ.js +10 -0
- package/dist/chunks/{chunk-USYEDO7R.js → chunk-6SJHJBJH.js} +1 -1
- package/dist/chunks/{chunk-TRZDIAX3.js → chunk-77LSSWXL.js} +1 -1
- package/dist/chunks/{chunk-DASHFOKO.js → chunk-7DA25VTX.js} +1 -1
- package/dist/chunks/chunk-7DP4DHQW.js +7 -0
- package/dist/chunks/{chunk-ZERZX6BZ.js → chunk-7JY4LSW4.js} +2 -2
- package/dist/chunks/{chunk-EW62WSXG.js → chunk-7NNA4VRN.js} +1 -1
- package/dist/chunks/{chunk-EXLKCL5I.js → chunk-7VICILSF.js} +1 -1
- package/dist/chunks/{chunk-4XJVEKTD.js → chunk-7XRM7NEF.js} +1 -1
- package/dist/chunks/chunk-A5D7MVRH.js +7 -0
- package/dist/chunks/{chunk-EVH5524J.js → chunk-A5NC6IDR.js} +1 -1
- package/dist/chunks/{chunk-EDOTKQ7L.js → chunk-ADQRYOJK.js} +1 -1
- package/dist/chunks/{chunk-D2JHIOVH.js → chunk-AEYIIPUZ.js} +1 -1
- package/dist/chunks/{chunk-GHEGWXH2.js → chunk-ANCWFEOM.js} +1 -1
- package/dist/chunks/{chunk-IFCMWIRB.js → chunk-APM4DYNZ.js} +1 -1
- package/dist/chunks/chunk-BB3N7F4F.js +7 -0
- package/dist/chunks/{chunk-7ULVGK67.js → chunk-BB5UMZMF.js} +1 -1
- package/dist/chunks/{chunk-4Z3APEBF.js → chunk-BJXLR2RE.js} +1 -1
- package/dist/chunks/{chunk-Y6WXTTZS.js → chunk-BPRGAX62.js} +1 -1
- package/dist/chunks/{chunk-43P35KUA.js → chunk-BQVKEPOO.js} +1 -1
- package/dist/chunks/{chunk-MXURT5TX.js → chunk-BRKI6NTF.js} +1 -1
- package/dist/chunks/{chunk-G6HUSV7F.js → chunk-BZV2S4H6.js} +1 -1
- package/dist/chunks/chunk-C4N4LKPM.js +7 -0
- package/dist/chunks/{chunk-WFOJ2LEA.js → chunk-CCMABJKN.js} +1 -1
- package/dist/chunks/chunk-CFYTFXX6.js +7 -0
- package/dist/chunks/chunk-CKTLP5GX.js +7 -0
- package/dist/chunks/{chunk-OZPBJWYU.js → chunk-CSOIXUCL.js} +7 -7
- package/dist/chunks/{chunk-GCPPL24C.js → chunk-CUBRYWA2.js} +1 -1
- package/dist/chunks/{chunk-M73W4XNR.js → chunk-CZOD25BC.js} +1 -1
- package/dist/chunks/{chunk-UIJYRI3G.js → chunk-DBPN2VGJ.js} +1 -1
- package/dist/chunks/{chunk-XBWISZCG.js → chunk-EJ34DLV4.js} +1 -1
- package/dist/chunks/{chunk-T5TOBY4D.js → chunk-EJZNJN4N.js} +1 -1
- package/dist/chunks/{chunk-TMXIVQ45.js → chunk-F2LNGJOZ.js} +1 -1
- package/dist/chunks/{chunk-G3LWP5CH.js → chunk-FAVZ6WVS.js} +1 -1
- package/dist/chunks/{chunk-5K4UTJSY.js → chunk-FHGWXXAS.js} +1 -1
- package/dist/chunks/{chunk-2DODPQ5J.js → chunk-FI2N3SE5.js} +1 -1
- package/dist/chunks/{chunk-D4ZEJM3T.js → chunk-FI5O4WHD.js} +1 -1
- package/dist/chunks/chunk-FTACGWII.js +14 -0
- package/dist/chunks/chunk-FUYVYZWT.js +7 -0
- package/dist/chunks/{chunk-FWTBSC7Z.js → chunk-FY4ORPZH.js} +1 -1
- package/dist/chunks/{chunk-VBKFCR5W.js → chunk-G5T6UQAL.js} +1 -1
- package/dist/chunks/chunk-G7H33IKQ.js +10 -0
- package/dist/chunks/{chunk-33U57CNE.js → chunk-GKALP6QD.js} +1 -1
- package/dist/chunks/{chunk-DUPAU76G.js → chunk-HJ45TAM4.js} +1 -1
- package/dist/chunks/{chunk-E5CN62HO.js → chunk-I6TWYNZF.js} +1 -1
- package/dist/chunks/{chunk-JOXGYP5S.js → chunk-JVNIDSP5.js} +1 -1
- package/dist/chunks/chunk-K6T65WB2.js +7 -0
- package/dist/chunks/chunk-KCJ7RU5I.js +10 -0
- package/dist/chunks/{chunk-TCB4XM23.js → chunk-L3YSOZTP.js} +1 -1
- package/dist/chunks/chunk-LNVODBR2.js +8 -0
- package/dist/chunks/{chunk-32AS5X7G.js → chunk-MUNGQJGO.js} +1 -1
- package/dist/chunks/{chunk-SNCQOAFU.js → chunk-MWEC2PBL.js} +1 -1
- package/dist/chunks/{chunk-UZTDRGCW.js → chunk-NAEY6HG5.js} +1 -1
- package/dist/chunks/{chunk-GN5IAG3M.js → chunk-NGHFFOD2.js} +1 -1
- package/dist/chunks/{chunk-4BZ3DNGM.js → chunk-NLKM5LR5.js} +1 -1
- package/dist/chunks/{chunk-UOQGI6CL.js → chunk-NNGNQNGM.js} +1 -1
- package/dist/chunks/{chunk-7PGGP2QT.js → chunk-NT5ITDTD.js} +1 -1
- package/dist/chunks/{chunk-NEUQZYBL.js → chunk-PMEYNJU2.js} +1 -1
- package/dist/chunks/{chunk-BWS3ZOHJ.js → chunk-Q4GX2UTG.js} +1 -1
- package/dist/chunks/{chunk-4SJU5QSD.js → chunk-QBEIKXKY.js} +1 -1
- package/dist/chunks/{chunk-CBVVVYUP.js → chunk-QCIIUQV3.js} +1 -1
- package/dist/chunks/{chunk-UVE5COCG.js → chunk-QR2Y6RI6.js} +1 -1
- package/dist/chunks/chunk-QSMWJAN7.js +7 -0
- package/dist/chunks/{chunk-GCXUSXB4.js → chunk-QVMU7ZKQ.js} +1 -1
- package/dist/chunks/{chunk-ZGKJLJ47.js → chunk-R2P4PNRQ.js} +1 -1
- package/dist/chunks/{chunk-Y5YXAXK3.js → chunk-R3D4M5RE.js} +1 -1
- package/dist/chunks/{chunk-QJAIUZVZ.js → chunk-ROOOBR3O.js} +5 -5
- package/dist/chunks/{chunk-H34SGIVS.js → chunk-S5JBQCBA.js} +1 -1
- package/dist/chunks/{chunk-PBX7RJ2K.js → chunk-SAIROH4Y.js} +1 -1
- package/dist/chunks/{chunk-2JNDJISE.js → chunk-SIN64EHW.js} +1 -1
- package/dist/chunks/{chunk-QBOY2CXL.js → chunk-SODZSOOL.js} +1 -1
- package/dist/chunks/{chunk-KV2DYFUG.js → chunk-T7HE23VK.js} +1 -1
- package/dist/chunks/{chunk-2JXQWOK5.js → chunk-TKJUKKR6.js} +1 -1
- package/dist/chunks/{chunk-2H4DUZJZ.js → chunk-TL4ZLZ2Q.js} +1 -1
- package/dist/chunks/{chunk-WGWGDC3N.js → chunk-TRYRN6OD.js} +1 -1
- package/dist/chunks/chunk-UWJ3UPS5.js +11 -0
- package/dist/chunks/{chunk-6RCFEJZK.js → chunk-UXRXHNSX.js} +1 -1
- package/dist/chunks/chunk-V32V4SXB.js +7 -0
- package/dist/chunks/{chunk-ECQKK4JU.js → chunk-VD2FK6OF.js} +1 -1
- package/dist/chunks/{chunk-QKWJN6OE.js → chunk-VDKY5KRE.js} +1 -1
- package/dist/chunks/chunk-VPUYTI5E.js +25 -0
- package/dist/chunks/{chunk-EBBDSEEU.js → chunk-VS3S5CU4.js} +1 -1
- package/dist/chunks/{chunk-JMAXX2I6.js → chunk-VU4PHRVP.js} +1 -1
- package/dist/chunks/{chunk-ZBZPCKTW.js → chunk-W5GHMAHP.js} +1 -1
- package/dist/chunks/{chunk-QY5RG6BB.js → chunk-WYFRVK6K.js} +1 -1
- package/dist/chunks/{chunk-BRETAWE7.js → chunk-XEXOSJIU.js} +1 -1
- package/dist/chunks/{chunk-5M3WBT3N.js → chunk-XXEGRTU6.js} +1 -1
- package/dist/chunks/{chunk-4OTI552J.js → chunk-Y45SSWNH.js} +1 -1
- package/dist/chunks/{chunk-WKYFWE37.js → chunk-YO6SJCZP.js} +1 -1
- package/dist/chunks/{chunk-TGPYWWX3.js → chunk-Z57NF2SA.js} +1 -1
- package/dist/chunks/chunk-ZUI5EMXD.js +11 -0
- package/dist/chunks/clear-56POXUP7.js +8 -0
- package/dist/chunks/{compile-vercel-config-DRTOWZK6.js → compile-vercel-config-ZO4Q4DSX.js} +1 -1
- package/dist/chunks/{config-MNRKCDQA.js → config-3BJHSDR3.js} +1 -1
- package/dist/chunks/config-BQPB2VFM.js +8 -0
- package/dist/chunks/delete-2IZGMSOT.js +9 -0
- package/dist/chunks/delete-32N2EHLH.js +10 -0
- package/dist/chunks/{detect-services-GXKWIX52.js → detect-services-JFILAIAL.js} +1 -1
- package/dist/chunks/disable-U2L3EAT3.js +7 -0
- package/dist/chunks/discard-LCQCHKT3.js +14 -0
- package/dist/chunks/edit-7UYV2SKA.js +8 -0
- package/dist/chunks/edit-IE6MRAGU.js +9 -0
- package/dist/chunks/enable-TRHJ4KBM.js +7 -0
- package/dist/chunks/{export-N5F7EY7B.js → export-FCEURR7W.js} +1 -1
- package/dist/chunks/future-MJBIKCOK.js +7 -0
- package/dist/chunks/generate-cert-for-deploy-CFEVTFEH.js +7 -0
- package/dist/chunks/image-47MBJMHO.js +7 -0
- package/dist/chunks/{import-builders-OAGJKQNW.js → import-builders-2DIXZXHK.js} +1 -1
- package/dist/chunks/inspect-BEBHGVAE.js +13 -0
- package/dist/chunks/{inspect-UDUI3ETL.js → inspect-C6XCE3L6.js} +1 -1
- package/dist/chunks/{inspect-35WHAXL2.js → inspect-FZJIVQKV.js} +1 -1
- package/dist/chunks/{inspect-GX34WQGR.js → inspect-KHEUFRVD.js} +1 -1
- package/dist/chunks/inspect-VHDOPOMX.js +9 -0
- package/dist/chunks/{list-BINT67HQ.js → list-IU7VXCG3.js} +1 -1
- package/dist/chunks/{list-VVND632B.js → list-ULHYVEMI.js} +1 -1
- package/dist/chunks/list-VRPHMTAV.js +12 -0
- package/dist/chunks/login-333JR3X5.js +7 -0
- package/dist/chunks/login-N3AJJ2TI.js +9 -0
- package/dist/chunks/logs-QCK5IEZ6.js +7 -0
- package/dist/chunks/{ls-6HYUGM62.js → ls-324AYCJH.js} +1 -1
- package/dist/chunks/{ls-YT3MWU4U.js → ls-7PMEAWRR.js} +1 -1
- package/dist/chunks/{ls-2MJY6EKD.js → ls-EKSX4DUZ.js} +1 -1
- package/dist/chunks/ls-K27L6SBM.js +11 -0
- package/dist/chunks/ls-Q6XVCKO3.js +8 -0
- package/dist/chunks/{ls-7OZ5TSNW.js → ls-S6RG3GU3.js} +1 -1
- package/dist/chunks/{ls-HTNWWU45.js → ls-WSX4L6GY.js} +1 -1
- package/dist/chunks/mutate-VQBALKRN.js +9 -0
- package/dist/chunks/{native-self-update-75UJCHGZ.js → native-self-update-7OAY4AVR.js} +1 -1
- package/dist/chunks/notifications-OQQ3ELSK.js +7 -0
- package/dist/chunks/open-ULGKVY4O.js +7 -0
- package/dist/chunks/{openapi-KYC6JIXI.js → openapi-YAZA3237.js} +1 -1
- package/dist/chunks/permissions-FCZAXNBP.js +7 -0
- package/dist/chunks/{plugin-offer-URT5JNEU.js → plugin-offer-REA2ZSBW.js} +1 -1
- package/dist/chunks/prompt-missing-credentials-AENJOWAN.js +7 -0
- package/dist/chunks/{publish-LH5CIXCP.js → publish-LUVUXRPN.js} +1 -1
- package/dist/chunks/pull-734D2SIQ.js +7 -0
- package/dist/chunks/purchase-domain-if-available-J32OZAAB.js +7 -0
- package/dist/chunks/push-7N63IRGS.js +7 -0
- package/dist/chunks/{query-POTX2HYL.js → query-ZRFRACJR.js} +1 -1
- package/dist/chunks/reauthenticate-A5TEIS2T.js +7 -0
- package/dist/chunks/reorder-A2GYXTE5.js +10 -0
- package/dist/chunks/reply-VRPDRYSF.js +9 -0
- package/dist/chunks/resolve-5IVOTHCA.js +12 -0
- package/dist/chunks/resolve-agent-team-U7H6YKBF.js +7 -0
- package/dist/chunks/{restore-L3T5KOG7.js → restore-2UIAA4WJ.js} +1 -1
- package/dist/chunks/rm-2VW3MMXV.js +8 -0
- package/dist/chunks/rm-KVDVCRHH.js +8 -0
- package/dist/chunks/rm-QLWZ7DR3.js +8 -0
- package/dist/chunks/rm-QTZDIV5M.js +8 -0
- package/dist/chunks/rm-RNC3IRNA.js +8 -0
- package/dist/chunks/{routes-S75L7Z7A.js → routes-4WGST7VN.js} +1 -1
- package/dist/chunks/rule-inspect-B6R3WIIR.js +8 -0
- package/dist/chunks/{schema-P4T4GQBF.js → schema-HIEZSFBL.js} +1 -1
- package/dist/chunks/{schema-TOVLKRPJ.js → schema-RP3BSWFK.js} +1 -1
- package/dist/chunks/select-org-A2QMWNDE.js +7 -0
- package/dist/chunks/set-VV3OH6P6.js +7 -0
- package/dist/chunks/setup-and-link-F5DSGQMW.js +7 -0
- package/dist/chunks/{skills-DZYJV7BE.js → skills-X5TPVYXW.js} +1 -1
- package/dist/chunks/{statuspage-45LJ2XYT.js → statuspage-KHTMA4WL.js} +1 -1
- package/dist/chunks/tags-KDAQZ5W2.js +7 -0
- package/dist/chunks/{types-YA6BOCRV.js → types-SENK43U4.js} +1 -1
- package/dist/chunks/{update-YSAO36V7.js → update-VT4MVVJF.js} +1 -1
- package/dist/chunks/zod-Y3ZBY67C.js +7 -0
- package/dist/commands/build/index.js +1 -1
- package/dist/commands/deploy/index.js +30 -23
- package/dist/commands/dev/index.js +2 -2
- package/dist/commands/env/index.js +1 -1
- package/dist/commands/link/index.js +1 -1
- package/dist/commands/list/index.js +1 -1
- package/dist/commands/project/index.js +7 -7
- package/dist/commands-account.js +18 -3
- package/dist/commands-ai.js +2 -2
- package/dist/commands-blob.js +1 -1
- package/dist/commands-core.js +6 -6
- package/dist/commands-deployments.js +1 -1
- package/dist/commands-flags.js +7 -9
- package/dist/commands-integrations.js +1 -1
- package/dist/commands-observability.js +5 -5
- package/dist/commands-routing.js +2 -2
- package/dist/help.js +1 -1
- package/dist/index.js +4 -4
- package/dist/internal-build-worker.js +1 -1
- package/dist/internal-build.js +1 -1
- package/dist/launcher-errors.js +11 -0
- package/dist/native-download.js +1 -1
- package/dist/package.json +26 -26
- package/dist/vc.js +355 -86
- package/dist/version.mjs +1 -1
- package/package.json +19 -19
- package/dist/chunks/add-6YFDZCAK.js +0 -8
- package/dist/chunks/add-QDZPCCUD.js +0 -8
- package/dist/chunks/add-Z24IIQDY.js +0 -8
- package/dist/chunks/build-HLU4YO37.js +0 -7
- package/dist/chunks/chunk-2CSCY66I.js +0 -11
- package/dist/chunks/chunk-2NABMKFV.js +0 -29
- package/dist/chunks/chunk-2TRNHR72.js +0 -7
- package/dist/chunks/chunk-32NXYHYC.js +0 -10
- package/dist/chunks/chunk-4CQKN5TW.js +0 -10
- package/dist/chunks/chunk-7DM3IJ7L.js +0 -10
- package/dist/chunks/chunk-AUCTNGW2.js +0 -7
- package/dist/chunks/chunk-C6525MLX.js +0 -10
- package/dist/chunks/chunk-CGTD4QFC.js +0 -7
- package/dist/chunks/chunk-DSNIVABS.js +0 -7
- package/dist/chunks/chunk-F53OKXYI.js +0 -7
- package/dist/chunks/chunk-K5YO4UD7.js +0 -7
- package/dist/chunks/chunk-NAU6URTI.js +0 -25
- package/dist/chunks/chunk-NNIQPNGP.js +0 -7
- package/dist/chunks/chunk-NTUDWWSL.js +0 -14
- package/dist/chunks/chunk-RZY54T7B.js +0 -7
- package/dist/chunks/chunk-SR2SHYJA.js +0 -7
- package/dist/chunks/chunk-WGVIQTOI.js +0 -8
- package/dist/chunks/chunk-YPPDRKVC.js +0 -7
- package/dist/chunks/clear-RU72IUXU.js +0 -8
- package/dist/chunks/config-PIFTR3UF.js +0 -8
- package/dist/chunks/delete-47BF6SIO.js +0 -9
- package/dist/chunks/delete-QNSKEIGO.js +0 -10
- package/dist/chunks/disable-SBFW3F7B.js +0 -7
- package/dist/chunks/discard-DUZR3OWZ.js +0 -14
- package/dist/chunks/edit-6BQ7FZC4.js +0 -8
- package/dist/chunks/edit-WO7FLNW2.js +0 -9
- package/dist/chunks/enable-OK4MR3Z6.js +0 -7
- package/dist/chunks/future-5AQIYILU.js +0 -7
- package/dist/chunks/generate-cert-for-deploy-7ERAHVOV.js +0 -7
- package/dist/chunks/image-IRC2NJVA.js +0 -7
- package/dist/chunks/inspect-5FKOSDTK.js +0 -13
- package/dist/chunks/inspect-ACNGICEF.js +0 -9
- package/dist/chunks/list-TRFGY6WP.js +0 -12
- package/dist/chunks/login-MYVTOBRG.js +0 -9
- package/dist/chunks/login-SOZ5ME3D.js +0 -7
- package/dist/chunks/logs-EMAGPMIZ.js +0 -7
- package/dist/chunks/ls-KU35N6DP.js +0 -8
- package/dist/chunks/ls-WFC636QK.js +0 -11
- package/dist/chunks/mutate-JVDDZLVE.js +0 -9
- package/dist/chunks/notifications-CXDBNBHU.js +0 -7
- package/dist/chunks/open-3CD5ZNKU.js +0 -7
- package/dist/chunks/permissions-PNBST4WN.js +0 -7
- package/dist/chunks/prompt-missing-credentials-Q5JCRP3R.js +0 -7
- package/dist/chunks/pull-XLZXPTLS.js +0 -7
- package/dist/chunks/purchase-domain-if-available-PDJGZ6MY.js +0 -7
- package/dist/chunks/push-XB57XK6H.js +0 -7
- package/dist/chunks/reauthenticate-CRI4D2BQ.js +0 -7
- package/dist/chunks/reorder-KUQ5EQBV.js +0 -10
- package/dist/chunks/reply-LO76EKEE.js +0 -9
- package/dist/chunks/resolve-KZJYJJLA.js +0 -12
- package/dist/chunks/resolve-agent-team-N7QMB7UO.js +0 -7
- package/dist/chunks/rm-7UKXTIZW.js +0 -8
- package/dist/chunks/rm-AKKEQN32.js +0 -8
- package/dist/chunks/rm-ELC57ULY.js +0 -8
- package/dist/chunks/rm-K7XEZ7TY.js +0 -8
- package/dist/chunks/rm-MOYCAXNO.js +0 -8
- package/dist/chunks/rule-inspect-ZCS4EBKR.js +0 -8
- package/dist/chunks/select-org-6NEM7F25.js +0 -7
- package/dist/chunks/set-NXFB6JXG.js +0 -7
- package/dist/chunks/setup-and-link-L67MMSUD.js +0 -7
- package/dist/chunks/tags-5AV6WAOF.js +0 -7
- package/dist/chunks/zod-2C2SXNIK.js +0 -7
package/dist/vc.js
CHANGED
|
@@ -34,9 +34,9 @@ try {
|
|
|
34
34
|
} catch {}
|
|
35
35
|
markStartup('launcher');
|
|
36
36
|
|
|
37
|
-
// Run the one package this platform maps to: the native binary on macOS
|
|
38
|
-
//
|
|
39
|
-
// it), @vercel/cli-support everywhere else. This package's own JS CLI
|
|
37
|
+
// Run the one package this platform maps to: the native binary on macOS, Linux
|
|
38
|
+
// and Windows x64/arm64 (downloaded once into the CLI cache when the install
|
|
39
|
+
// skipped it), @vercel/cli-support everywhere else. This package's own JS CLI
|
|
40
40
|
// (./index.js) is only a fallback, recorded in telemetry.
|
|
41
41
|
import { spawnSync } from 'node:child_process';
|
|
42
42
|
import {
|
|
@@ -53,8 +53,15 @@ import { fileURLToPath, pathToFileURL } from 'node:url';
|
|
|
53
53
|
|
|
54
54
|
const __dirname = dirname(fileURLToPath(import.meta.url));
|
|
55
55
|
|
|
56
|
-
//
|
|
57
|
-
//
|
|
56
|
+
// Whether this package still ships its own JS CLI (dist/index.js), the fallback
|
|
57
|
+
// when the native binary can't run. Without it, every fallback below becomes an
|
|
58
|
+
// error with a fix instead, so dropping dist/index.js from the package needs no
|
|
59
|
+
// launcher change.
|
|
60
|
+
const jsCliAvailable = existsSync(join(__dirname, 'index.js'));
|
|
61
|
+
// At most one launcher warning per run.
|
|
62
|
+
let warnedThisRun = false;
|
|
63
|
+
|
|
64
|
+
// Keep in sync with packages/vc-native/scripts/platforms.mjs.
|
|
58
65
|
const NATIVE_TARGETS = [
|
|
59
66
|
'darwin-arm64',
|
|
60
67
|
'darwin-x64',
|
|
@@ -62,14 +69,47 @@ const NATIVE_TARGETS = [
|
|
|
62
69
|
'linux-arm64-musl',
|
|
63
70
|
'linux-x64',
|
|
64
71
|
'linux-x64-musl',
|
|
72
|
+
'win32-arm64',
|
|
73
|
+
'win32-x64',
|
|
65
74
|
];
|
|
66
75
|
|
|
76
|
+
function isWindowsTarget(target) {
|
|
77
|
+
return target.startsWith('win32-');
|
|
78
|
+
}
|
|
79
|
+
|
|
80
|
+
function binaryName(target) {
|
|
81
|
+
return isWindowsTarget(target) ? 'vercel.exe' : 'vercel';
|
|
82
|
+
}
|
|
83
|
+
|
|
67
84
|
// musl's `ldd` names itself. npm and pnpm skip the other libc's package via
|
|
68
85
|
// its `libc` field, but Yarn classic installs both, so the launcher must pick
|
|
69
86
|
// one.
|
|
87
|
+
// Detected the way npm does (npm-install-checks), so the launcher picks the
|
|
88
|
+
// package npm installed: the ldd script names its libc, and Node's report
|
|
89
|
+
// covers systems without ldd, such as minimal container images.
|
|
90
|
+
let musl;
|
|
70
91
|
function isMusl() {
|
|
71
|
-
|
|
72
|
-
|
|
92
|
+
if (musl !== undefined) return musl;
|
|
93
|
+
try {
|
|
94
|
+
const ldd = readFileSync('/usr/bin/ldd', 'utf8');
|
|
95
|
+
if (ldd.includes('musl')) return (musl = true);
|
|
96
|
+
if (ldd.includes('GNU C Library')) return (musl = false);
|
|
97
|
+
} catch {}
|
|
98
|
+
try {
|
|
99
|
+
const excludeNetwork = process.report.excludeNetwork;
|
|
100
|
+
process.report.excludeNetwork = true;
|
|
101
|
+
const report = process.report.getReport();
|
|
102
|
+
process.report.excludeNetwork = excludeNetwork;
|
|
103
|
+
musl =
|
|
104
|
+
!report.header?.glibcVersionRuntime &&
|
|
105
|
+
Array.isArray(report.sharedObjects) &&
|
|
106
|
+
report.sharedObjects.some(
|
|
107
|
+
file => file.includes('libc.musl-') || file.includes('ld-musl-')
|
|
108
|
+
);
|
|
109
|
+
} catch {
|
|
110
|
+
musl = false;
|
|
111
|
+
}
|
|
112
|
+
return musl;
|
|
73
113
|
}
|
|
74
114
|
|
|
75
115
|
function platformTarget() {
|
|
@@ -108,11 +148,30 @@ function resolveTarget() {
|
|
|
108
148
|
};
|
|
109
149
|
}
|
|
110
150
|
const pkgDir = findPackage(`@vercel/vc-native-${target}`);
|
|
151
|
+
const name = binaryName(target);
|
|
111
152
|
const bin =
|
|
112
153
|
pkgDir &&
|
|
113
|
-
|
|
154
|
+
isOwnVersion(pkgDir) &&
|
|
155
|
+
[join(pkgDir, 'bin', name), join(pkgDir, name)].find(existsSync);
|
|
114
156
|
return { target, bin };
|
|
115
157
|
}
|
|
158
|
+
// The lookup walks up through parent node_modules, so it can reach a package
|
|
159
|
+
// hoisted for another `vercel` in the same tree. Treat a different version as
|
|
160
|
+
// missing, so the launcher downloads this version instead of running another.
|
|
161
|
+
// Unreadable versions don't block: the optional dependency pins it exactly.
|
|
162
|
+
function isOwnVersion(pkgDir) {
|
|
163
|
+
const own = readOwnPackage()?.version;
|
|
164
|
+
try {
|
|
165
|
+
const found = JSON.parse(
|
|
166
|
+
readFileSync(join(pkgDir, 'package.json'), 'utf8')
|
|
167
|
+
).version;
|
|
168
|
+
return (
|
|
169
|
+
typeof own !== 'string' || typeof found !== 'string' || found === own
|
|
170
|
+
);
|
|
171
|
+
} catch {
|
|
172
|
+
return true;
|
|
173
|
+
}
|
|
174
|
+
}
|
|
116
175
|
|
|
117
176
|
// The package this launcher belongs to: `vercel` or `@vercel/cli-support`.
|
|
118
177
|
let ownPackage;
|
|
@@ -147,7 +206,33 @@ function wantsJsonOutput(argv) {
|
|
|
147
206
|
// dependencies, or one made before npm had the package), download the binary
|
|
148
207
|
// for this exact version into the CLI cache, once. Each version has its own
|
|
149
208
|
// directory, so a binary is written once and never replaced.
|
|
150
|
-
|
|
209
|
+
//
|
|
210
|
+
// After a failed attempt, wait before trying again: 15 minutes after the
|
|
211
|
+
// first failure, 2 hours after the second, then a day. The `download-failed`
|
|
212
|
+
// marker holds the number of failures; its age is the time since the last.
|
|
213
|
+
const DOWNLOAD_RETRY_AFTER = [
|
|
214
|
+
{ ms: 15 * 60 * 1000, label: '15 minutes' },
|
|
215
|
+
{ ms: 2 * 60 * 60 * 1000, label: '2 hours' },
|
|
216
|
+
{ ms: 24 * 60 * 60 * 1000, label: '24 hours' },
|
|
217
|
+
];
|
|
218
|
+
|
|
219
|
+
function retryAfter(failures) {
|
|
220
|
+
return DOWNLOAD_RETRY_AFTER[
|
|
221
|
+
Math.min(Math.max(failures, 1), DOWNLOAD_RETRY_AFTER.length) - 1
|
|
222
|
+
];
|
|
223
|
+
}
|
|
224
|
+
|
|
225
|
+
/** The failures recorded in the marker, and when the last one happened. */
|
|
226
|
+
function readFailedStamp(stamp) {
|
|
227
|
+
try {
|
|
228
|
+
const { mtimeMs } = statSync(stamp);
|
|
229
|
+
// Earlier releases wrote an empty marker: one failure.
|
|
230
|
+
const count = Number.parseInt(readFileSync(stamp, 'utf8'), 10);
|
|
231
|
+
return { at: mtimeMs, count: count > 0 ? count : 1 };
|
|
232
|
+
} catch {
|
|
233
|
+
return undefined;
|
|
234
|
+
}
|
|
235
|
+
}
|
|
151
236
|
|
|
152
237
|
async function nativeCacheDir(target) {
|
|
153
238
|
const version = readOwnPackage()?.version;
|
|
@@ -172,12 +257,13 @@ async function fetchNativeBinary(target) {
|
|
|
172
257
|
// Only an installed package uses the download. A repository checkout
|
|
173
258
|
// (packages/cli/dist/vc.js) runs its own JS CLI, so local changes and tests
|
|
174
259
|
// never run a published binary instead.
|
|
260
|
+
// Yarn PnP and Deno installs have no node_modules either.
|
|
175
261
|
if (!__dirname.split(sep).includes('node_modules')) {
|
|
176
|
-
return { reason: '
|
|
262
|
+
return { reason: 'not_in_node_modules' };
|
|
177
263
|
}
|
|
178
264
|
const cache = await nativeCacheDir(target);
|
|
179
265
|
if (!cache) return { reason: 'target_missing' };
|
|
180
|
-
const bin = join(cache.dir,
|
|
266
|
+
const bin = join(cache.dir, binaryName(target));
|
|
181
267
|
if (existsSync(bin)) return { bin, source: 'cache' };
|
|
182
268
|
|
|
183
269
|
// Tests only: never reach the real registry.
|
|
@@ -185,53 +271,75 @@ async function fetchNativeBinary(target) {
|
|
|
185
271
|
return { reason: 'target_missing' };
|
|
186
272
|
}
|
|
187
273
|
// Without a writable cache the binary has nowhere to go and a failure can't
|
|
188
|
-
// be recorded, so
|
|
274
|
+
// be recorded, so don't try: the JS CLI runs with the once-a-day warning.
|
|
189
275
|
// Reported apart from target_missing: a sandbox that blocks writes to the
|
|
190
276
|
// cache directory looks like this.
|
|
191
277
|
try {
|
|
192
278
|
mkdirSync(cache.dir, { recursive: true });
|
|
193
279
|
accessSync(cache.dir, fsConstants.W_OK);
|
|
194
280
|
} catch {
|
|
195
|
-
return { reason: 'cache_unwritable' };
|
|
281
|
+
return { reason: 'cache_unwritable', cacheDir: cache.dir };
|
|
196
282
|
}
|
|
283
|
+
// The wait only makes sense while the JS CLI can run the command meanwhile.
|
|
284
|
+
// Without it, every run tries again.
|
|
197
285
|
const failedStamp = join(cache.dir, 'download-failed');
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
|
|
286
|
+
const previous = readFailedStamp(failedStamp);
|
|
287
|
+
if (
|
|
288
|
+
jsCliAvailable &&
|
|
289
|
+
previous &&
|
|
290
|
+
Date.now() - previous.at < retryAfter(previous.count).ms
|
|
291
|
+
) {
|
|
292
|
+
return { reason: 'download_failed' };
|
|
293
|
+
}
|
|
203
294
|
|
|
204
295
|
const quiet = wantsJsonOutput(process.argv.slice(2));
|
|
205
296
|
// A failed attempt shows in the JS CLI's trace as its own startup span.
|
|
206
297
|
markStartup('native_download');
|
|
207
298
|
try {
|
|
208
299
|
const { downloadNativeBinary } = await import('./native-download.js');
|
|
300
|
+
const downloaded = await downloadNativeBinary({
|
|
301
|
+
target,
|
|
302
|
+
version: cache.version,
|
|
303
|
+
directory: cache.dir,
|
|
304
|
+
log: quiet ? undefined : line => console.error(line),
|
|
305
|
+
retryTimeouts: jsCliAvailable,
|
|
306
|
+
});
|
|
209
307
|
return {
|
|
210
|
-
bin:
|
|
211
|
-
target,
|
|
212
|
-
version: cache.version,
|
|
213
|
-
directory: cache.dir,
|
|
214
|
-
log: quiet ? undefined : line => console.error(line),
|
|
215
|
-
}),
|
|
308
|
+
bin: downloaded.bin,
|
|
216
309
|
source: 'download',
|
|
310
|
+
attempts: downloaded.attempts,
|
|
217
311
|
};
|
|
218
312
|
} catch (error) {
|
|
219
313
|
markStartup('launcher');
|
|
314
|
+
const failures = (previous?.count ?? 0) + 1;
|
|
220
315
|
try {
|
|
221
|
-
writeFileSync(failedStamp,
|
|
316
|
+
writeFileSync(failedStamp, String(failures));
|
|
222
317
|
} catch {}
|
|
223
318
|
const known = error?.name === 'NativeDownloadError';
|
|
224
|
-
|
|
319
|
+
const detail = known ? error.detail : 'unexpected error';
|
|
320
|
+
// Without the JS CLI, the launcher reports this as an error instead.
|
|
321
|
+
if (!quiet && jsCliAvailable) {
|
|
225
322
|
console.error(
|
|
226
|
-
`! Couldn't download the Vercel CLI binary (${
|
|
323
|
+
`! Couldn't download the Vercel CLI binary (${detail}), so Node.js is running this command. The CLI tries again in ${retryAfter(failures).label}.\n${feedbackHint()}`
|
|
227
324
|
);
|
|
325
|
+
warnedThisRun = true;
|
|
228
326
|
}
|
|
229
327
|
// Only a run that tried reports why, so telemetry can tell attempts from
|
|
230
|
-
// the runs that skip downloading
|
|
328
|
+
// the runs that skip downloading while they wait.
|
|
231
329
|
return {
|
|
232
330
|
reason: 'download_failed',
|
|
331
|
+
detail,
|
|
332
|
+
kind: known ? error.kind : 'other',
|
|
333
|
+
timeout: known ? error.timeout : undefined,
|
|
334
|
+
progress: known ? error.progress : undefined,
|
|
233
335
|
downloadFailure: {
|
|
234
336
|
downloadError: known ? error.kind : 'other',
|
|
337
|
+
downloadAttempts: String(known ? error.attempts : 1),
|
|
338
|
+
downloadFailures: failures >= 3 ? '3_or_more' : String(failures),
|
|
339
|
+
...(known && error.phase && { downloadPhase: error.phase }),
|
|
340
|
+
...(known && error.code && { downloadCode: error.code }),
|
|
341
|
+
...(known && error.timeout && { downloadTimeout: error.timeout }),
|
|
342
|
+
...(known && error.progress && { downloadProgress: error.progress }),
|
|
235
343
|
...(known &&
|
|
236
344
|
error.environment && {
|
|
237
345
|
downloadProxy: error.environment.proxy ? 'true' : 'false',
|
|
@@ -244,12 +352,14 @@ async function fetchNativeBinary(target) {
|
|
|
244
352
|
}
|
|
245
353
|
}
|
|
246
354
|
|
|
247
|
-
// The native binary is the default, but this
|
|
248
|
-
// opt-out: VERCEL_CLI_USE_NATIVE_BINARY, then a
|
|
249
|
-
// preference.
|
|
250
|
-
|
|
355
|
+
// The native binary is the default, but while this package ships its JS CLI
|
|
356
|
+
// it still honors an explicit opt-out: VERCEL_CLI_USE_NATIVE_BINARY, then a
|
|
357
|
+
// persisted `useNativeBinary` preference. Returns where the opt-out came from
|
|
358
|
+
// (`env` or `config`), or false. Any failure to read config counts as no
|
|
359
|
+
// preference.
|
|
360
|
+
async function nativeBinaryOptOut() {
|
|
251
361
|
const envOverride = process.env.VERCEL_CLI_USE_NATIVE_BINARY;
|
|
252
|
-
if (envOverride === '0' || envOverride === 'false') return
|
|
362
|
+
if (envOverride === '0' || envOverride === 'false') return 'env';
|
|
253
363
|
if (envOverride === '1' || envOverride === 'true') return false;
|
|
254
364
|
try {
|
|
255
365
|
// Zod-free subpath to avoid loading zod + schemas on this hot path.
|
|
@@ -258,20 +368,91 @@ async function isNativeBinaryOptedOut() {
|
|
|
258
368
|
const configDir = argDir
|
|
259
369
|
? resolve(process.cwd(), argDir)
|
|
260
370
|
: config.getGlobalPathConfig();
|
|
261
|
-
return (
|
|
262
|
-
config.
|
|
263
|
-
|
|
264
|
-
|
|
265
|
-
|
|
266
|
-
|
|
371
|
+
return config.readGlobalConfigFlag(
|
|
372
|
+
config.getConfigFilePath(configDir),
|
|
373
|
+
'useNativeBinary'
|
|
374
|
+
) === false
|
|
375
|
+
? 'config'
|
|
376
|
+
: false;
|
|
267
377
|
} catch {
|
|
268
378
|
return false;
|
|
269
379
|
}
|
|
270
380
|
}
|
|
271
381
|
|
|
272
|
-
//
|
|
273
|
-
//
|
|
274
|
-
|
|
382
|
+
// Ctrl+C (and Ctrl+Break on Windows) also reach the binary, which handles
|
|
383
|
+
// them. The launcher waits for it instead of exiting: on Windows, Node.js
|
|
384
|
+
// exiting would also kill the binary before it could clean up.
|
|
385
|
+
const CONSOLE_SIGNALS =
|
|
386
|
+
process.platform === 'win32' ? ['SIGINT', 'SIGBREAK'] : ['SIGINT'];
|
|
387
|
+
function waitForNative() {}
|
|
388
|
+
|
|
389
|
+
function optOutSetting(source) {
|
|
390
|
+
return source === 'env'
|
|
391
|
+
? `VERCEL_CLI_USE_NATIVE_BINARY=${process.env.VERCEL_CLI_USE_NATIVE_BINARY}`
|
|
392
|
+
: '"useNativeBinary": false in the Vercel CLI config';
|
|
393
|
+
}
|
|
394
|
+
|
|
395
|
+
// Agents can be told to report what they run into, so every JS CLI fallback
|
|
396
|
+
// warning ends with the vercel feedback command on its own line, like other
|
|
397
|
+
// recovery commands. It doesn't prescribe a note: <DESCRIPTION> is for whoever
|
|
398
|
+
// reads it to describe what they're seeing.
|
|
399
|
+
const FALLBACK_FEEDBACK =
|
|
400
|
+
"A future release of vercel removes this fallback. If this keeps happening, describe what you're seeing with:";
|
|
401
|
+
|
|
402
|
+
function feedbackHint(lead = FALLBACK_FEEDBACK) {
|
|
403
|
+
return ` ${lead}\n vercel feedback "<DESCRIPTION>"`;
|
|
404
|
+
}
|
|
405
|
+
|
|
406
|
+
// A warning about the JS CLI fallback, at most once a day. Agents often run
|
|
407
|
+
// non-interactively and need to see it; only --json skips it.
|
|
408
|
+
async function warnOncePerDay(stampName, message) {
|
|
409
|
+
if (warnedThisRun) return;
|
|
410
|
+
if (wantsJsonOutput(process.argv.slice(2))) return;
|
|
411
|
+
const dir = await stampDirectory();
|
|
412
|
+
const stamp = dir && join(dir, stampName);
|
|
413
|
+
try {
|
|
414
|
+
if (stamp && Date.now() - statSync(stamp).mtimeMs < DAY_MS) return;
|
|
415
|
+
} catch {}
|
|
416
|
+
console.error(message);
|
|
417
|
+
warnedThisRun = true;
|
|
418
|
+
if (stamp) {
|
|
419
|
+
try {
|
|
420
|
+
writeFileSync(stamp, '');
|
|
421
|
+
} catch {}
|
|
422
|
+
}
|
|
423
|
+
}
|
|
424
|
+
|
|
425
|
+
// Where once-a-day stamps go: the global config directory, created if it's
|
|
426
|
+
// missing (as on a fresh CI machine), else the CLI's cache directory. Both are
|
|
427
|
+
// under the user's home, never a shared directory such as the system temp
|
|
428
|
+
// directory, where another user could plant a symlink for the stamp write to
|
|
429
|
+
// follow. With neither writable (a sandbox blocking writes to home), there is
|
|
430
|
+
// no stamp and the warning shows on every run.
|
|
431
|
+
async function stampDirectory() {
|
|
432
|
+
let config;
|
|
433
|
+
try {
|
|
434
|
+
config = await import('@vercel/cli-config/paths');
|
|
435
|
+
} catch {
|
|
436
|
+
return undefined;
|
|
437
|
+
}
|
|
438
|
+
const argDir = globalConfigDirFromArgv();
|
|
439
|
+
const candidates = [
|
|
440
|
+
() =>
|
|
441
|
+
argDir ? resolve(process.cwd(), argDir) : config.getGlobalPathConfig(),
|
|
442
|
+
() => config.getCachePath(),
|
|
443
|
+
];
|
|
444
|
+
for (const candidate of candidates) {
|
|
445
|
+
try {
|
|
446
|
+
const dir = candidate();
|
|
447
|
+
mkdirSync(dir, { recursive: true });
|
|
448
|
+
accessSync(dir, fsConstants.W_OK);
|
|
449
|
+
return dir;
|
|
450
|
+
} catch {}
|
|
451
|
+
}
|
|
452
|
+
return undefined;
|
|
453
|
+
}
|
|
454
|
+
|
|
455
|
+
const DAY_MS = 24 * 60 * 60 * 1000;
|
|
275
456
|
|
|
276
457
|
// Read by src/index.ts and reported in telemetry. Inside the native binary,
|
|
277
458
|
// pkg.js sets it to `native` before re-entering this file with
|
|
@@ -279,42 +460,64 @@ const NATIVE_SPAWN_FALLBACK_CODES = ['ENOENT', 'EACCES', 'ENOEXEC'];
|
|
|
279
460
|
const LAUNCH = Symbol.for('vercel.cli.launch');
|
|
280
461
|
let launch;
|
|
281
462
|
let cliSupportEntry;
|
|
282
|
-
|
|
283
|
-
|
|
284
|
-
|
|
285
|
-
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
463
|
+
// Why the JS CLI would run, for the warning or, without it, the error.
|
|
464
|
+
let fallback;
|
|
465
|
+
if (
|
|
466
|
+
process.env.VERCEL_VC_NATIVE === '1' &&
|
|
467
|
+
globalThis[LAUNCH]?.runtime === 'native'
|
|
468
|
+
) {
|
|
469
|
+
// Inside the native binary: pkg.js set the marker and re-entered this file.
|
|
470
|
+
} else if (process.env.VERCEL_VC_NATIVE === '1' && jsCliAvailable) {
|
|
471
|
+
// Not the native binary: a process it spawned (a build script, a dev
|
|
472
|
+
// command) inherited VERCEL_VC_NATIVE=1 and runs this package's JS CLI.
|
|
473
|
+
// Without the JS CLI, it resolves and runs the binary like any launch.
|
|
474
|
+
launch = {
|
|
475
|
+
runtime: 'dist',
|
|
476
|
+
target: mappedTarget(),
|
|
477
|
+
reason: 'inherited_native_env',
|
|
478
|
+
};
|
|
479
|
+
globalThis[LAUNCH] = launch;
|
|
293
480
|
} else {
|
|
294
481
|
const resolved = resolveTarget();
|
|
295
482
|
let optedOut = false;
|
|
296
483
|
let missingReason = 'target_missing';
|
|
297
484
|
let downloadFailure;
|
|
298
|
-
|
|
299
|
-
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
|
|
305
|
-
|
|
306
|
-
|
|
307
|
-
|
|
308
|
-
|
|
309
|
-
|
|
485
|
+
// Never download for @vercel/cli-support (the build container runs it on
|
|
486
|
+
// Linux).
|
|
487
|
+
const nativeTarget = resolved.target !== 'cli-support' && !isCliSupport();
|
|
488
|
+
if (resolved.bin || nativeTarget) {
|
|
489
|
+
const optOut = await nativeBinaryOptOut();
|
|
490
|
+
if (optOut && jsCliAvailable) {
|
|
491
|
+
optedOut = true;
|
|
492
|
+
await warnOncePerDay(
|
|
493
|
+
'.native-opt-out-warned',
|
|
494
|
+
`! ${optOutSetting(optOut)} will stop working in a future release, which removes the Node.js CLI from the vercel package.\n${feedbackHint(
|
|
495
|
+
'If you still need the Node.js CLI, tell us why with:'
|
|
496
|
+
)}`
|
|
497
|
+
);
|
|
498
|
+
} else if (optOut) {
|
|
499
|
+
await warnOncePerDay(
|
|
500
|
+
'.native-opt-out-warned',
|
|
501
|
+
`! ${optOutSetting(optOut)} no longer applies: this version of vercel only runs the native binary.`
|
|
502
|
+
);
|
|
310
503
|
}
|
|
311
504
|
}
|
|
505
|
+
if (!resolved.bin && nativeTarget && !optedOut) {
|
|
506
|
+
const fetched = await fetchNativeBinary(resolved.target);
|
|
507
|
+
resolved.bin = fetched.bin;
|
|
508
|
+
resolved.source = fetched.source;
|
|
509
|
+
resolved.attempts = fetched.attempts;
|
|
510
|
+
missingReason = fetched.reason ?? missingReason;
|
|
511
|
+
downloadFailure = fetched.downloadFailure;
|
|
512
|
+
fallback = fetched;
|
|
513
|
+
}
|
|
312
514
|
if (optedOut) {
|
|
313
515
|
launch = { runtime: 'dist', target: resolved.target, reason: 'opt_out' };
|
|
314
516
|
} else if (resolved.bin) {
|
|
315
517
|
// Internal worker arguments intentionally trampoline too. The packaged
|
|
316
518
|
// native binary sets VERCEL_VC_NATIVE=1 in pkg.js and re-enters this file,
|
|
317
519
|
// where the worker branch below handles the request.
|
|
520
|
+
for (const signal of CONSOLE_SIGNALS) process.on(signal, waitForNative);
|
|
318
521
|
const r = spawnSync(resolved.bin, process.argv.slice(2), {
|
|
319
522
|
stdio: 'inherit',
|
|
320
523
|
windowsHide: true,
|
|
@@ -331,16 +534,22 @@ if (process.env.VERCEL_VC_NATIVE === '1') {
|
|
|
331
534
|
...(resolved.source && {
|
|
332
535
|
__VERCEL_CLI_NATIVE_SOURCE: resolved.source,
|
|
333
536
|
}),
|
|
537
|
+
...(resolved.attempts && {
|
|
538
|
+
__VERCEL_CLI_NATIVE_DOWNLOAD_ATTEMPTS: String(resolved.attempts),
|
|
539
|
+
}),
|
|
334
540
|
},
|
|
335
541
|
});
|
|
336
|
-
//
|
|
337
|
-
//
|
|
542
|
+
// Restores the default handling, so re-raising a signal below terminates
|
|
543
|
+
// this process, and the JS CLI installs its own handlers if it runs.
|
|
544
|
+
for (const signal of CONSOLE_SIGNALS) process.off(signal, waitForNative);
|
|
545
|
+
// Fall back only when the binary never started, so no command code has
|
|
546
|
+
// run. spawnSync sets no timeout or output buffer here, so any error means
|
|
547
|
+
// that, such as ENOENT, EACCES or ENOEXEC, or EPERM, EFTYPE or UNKNOWN when
|
|
548
|
+
// Windows blocks the binary (AppLocker, WDAC, Smart App Control,
|
|
549
|
+
// antivirus). Never fall back on an exit status: a loader failure (e.g.
|
|
550
|
+
// glibc mismatch) and a command's own failure are indistinguishable, and
|
|
338
551
|
// retrying a command in Node.js could repeat remote mutations.
|
|
339
|
-
if (!
|
|
340
|
-
if (r.error) {
|
|
341
|
-
console.error(r.error.message);
|
|
342
|
-
process.exit(1);
|
|
343
|
-
}
|
|
552
|
+
if (!r.error) {
|
|
344
553
|
if (r.signal) {
|
|
345
554
|
try {
|
|
346
555
|
process.kill(process.pid, r.signal);
|
|
@@ -348,10 +557,13 @@ if (process.env.VERCEL_VC_NATIVE === '1') {
|
|
|
348
557
|
}
|
|
349
558
|
process.exit(r.status ?? 1);
|
|
350
559
|
}
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
|
|
354
|
-
|
|
560
|
+
launch = {
|
|
561
|
+
runtime: 'dist',
|
|
562
|
+
target: resolved.target,
|
|
563
|
+
reason: r.error.code ?? 'UNKNOWN',
|
|
564
|
+
};
|
|
565
|
+
// `bin` marks a spawn failure, whatever its error code.
|
|
566
|
+
fallback = { bin: resolved.bin };
|
|
355
567
|
} else if (resolved.entry || isCliSupport()) {
|
|
356
568
|
launch = { runtime: 'cli-support' };
|
|
357
569
|
} else {
|
|
@@ -366,6 +578,70 @@ if (process.env.VERCEL_VC_NATIVE === '1') {
|
|
|
366
578
|
cliSupportEntry = resolved.entry;
|
|
367
579
|
}
|
|
368
580
|
|
|
581
|
+
// Without its JS CLI, this package can't run the command: report why and how
|
|
582
|
+
// to fix it, before loading anything else.
|
|
583
|
+
if (launch?.runtime === 'dist' && !jsCliAvailable) {
|
|
584
|
+
let reportLauncherFailure;
|
|
585
|
+
try {
|
|
586
|
+
({ reportLauncherFailure } = await import('./launcher-errors.js'));
|
|
587
|
+
} catch {
|
|
588
|
+
// An incomplete package: still fail with the reason and the fix.
|
|
589
|
+
console.error(
|
|
590
|
+
`✗ Couldn't start Vercel CLI (${launch.reason}). Reinstall vercel without omitting optional dependencies.`
|
|
591
|
+
);
|
|
592
|
+
process.exit(1);
|
|
593
|
+
}
|
|
594
|
+
process.exit(
|
|
595
|
+
reportLauncherFailure({
|
|
596
|
+
reason: launch.reason,
|
|
597
|
+
target: launch.target,
|
|
598
|
+
platform: platformTarget(),
|
|
599
|
+
version: readOwnPackage()?.version,
|
|
600
|
+
detail: fallback?.detail,
|
|
601
|
+
kind: fallback?.kind,
|
|
602
|
+
timeout: fallback?.timeout,
|
|
603
|
+
progress: fallback?.progress,
|
|
604
|
+
cacheDir: fallback?.cacheDir,
|
|
605
|
+
bin: fallback?.bin,
|
|
606
|
+
json: wantsJsonOutput(process.argv.slice(2)),
|
|
607
|
+
})
|
|
608
|
+
);
|
|
609
|
+
}
|
|
610
|
+
|
|
611
|
+
// While it ships, the JS CLI fallback warns once a day that it's going away,
|
|
612
|
+
// with the fix and the command to report it. A fresh download failure already
|
|
613
|
+
// warned, and warnDeprecatedArch() covers Linux architectures without a
|
|
614
|
+
// native binary.
|
|
615
|
+
if (launch?.runtime === 'dist') {
|
|
616
|
+
const reinstall = 'Reinstall vercel without omitting optional dependencies.';
|
|
617
|
+
const deprecatedArch =
|
|
618
|
+
process.platform === 'linux' && !['x64', 'arm64'].includes(process.arch);
|
|
619
|
+
const platform = platformTarget();
|
|
620
|
+
let message;
|
|
621
|
+
if (launch.reason === 'target_missing' && launch.target !== 'cli-support') {
|
|
622
|
+
const pkg = `@vercel/vc-native-${launch.target}`;
|
|
623
|
+
message = `! ${pkg} isn't installed, so Node.js is running this command. ${reinstall}\n${feedbackHint()}`;
|
|
624
|
+
} else if (
|
|
625
|
+
launch.reason === 'target_missing' &&
|
|
626
|
+
!['darwin', 'linux'].includes(process.platform)
|
|
627
|
+
) {
|
|
628
|
+
// FreeBSD and every other OS without native binaries install
|
|
629
|
+
// @vercel/cli-support, so it was skipped here, not unavailable.
|
|
630
|
+
message = `! @vercel/cli-support isn't installed, so Node.js is running this command. ${reinstall}\n${feedbackHint()}`;
|
|
631
|
+
} else if (launch.reason === 'target_missing' && !deprecatedArch) {
|
|
632
|
+
message = `! Vercel CLI has no native binary for ${platform}, so Node.js is running this command.\n${feedbackHint(
|
|
633
|
+
'A future release of vercel removes this fallback. If you need Vercel CLI on this platform, tell us with:'
|
|
634
|
+
)}`;
|
|
635
|
+
} else if (launch.reason === 'download_failed') {
|
|
636
|
+
message = `! The Vercel CLI binary for ${launch.target} couldn't be downloaded, so Node.js is running this command. Allow access to registry.npmjs.org, or ${reinstall.charAt(0).toLowerCase()}${reinstall.slice(1)}\n${feedbackHint()}`;
|
|
637
|
+
} else if (launch.reason === 'cache_unwritable') {
|
|
638
|
+
message = `! The Vercel CLI binary for ${launch.target} can't be downloaded because ${fallback?.cacheDir ?? 'the cache directory'} isn't writable, so Node.js is running this command. Make it writable, or set XDG_CACHE_HOME to a writable directory.\n${feedbackHint()}`;
|
|
639
|
+
} else if (fallback?.bin) {
|
|
640
|
+
message = `! The native Vercel CLI binary could not start (${launch.reason}), so Node.js is running this command. ${reinstall}\n${feedbackHint()}`;
|
|
641
|
+
}
|
|
642
|
+
if (message) await warnOncePerDay('.js-fallback-warned', message);
|
|
643
|
+
}
|
|
644
|
+
|
|
369
645
|
if (process.argv[2] === '--internal-build-worker') {
|
|
370
646
|
const {
|
|
371
647
|
applyInternalBuildRequest,
|
|
@@ -438,15 +714,8 @@ async function warnDeprecatedArch() {
|
|
|
438
714
|
) {
|
|
439
715
|
return;
|
|
440
716
|
}
|
|
441
|
-
|
|
442
|
-
if (
|
|
443
|
-
argv.some(arg =>
|
|
444
|
-
['--non-interactive', '--non-interactive=true'].includes(arg)
|
|
445
|
-
) ||
|
|
446
|
-
wantsJsonOutput(argv)
|
|
447
|
-
) {
|
|
448
|
-
return;
|
|
449
|
-
}
|
|
717
|
+
// Agents often run non-interactively and need to see it; only --json skips it.
|
|
718
|
+
if (wantsJsonOutput(process.argv.slice(2))) return;
|
|
450
719
|
let stamp;
|
|
451
720
|
try {
|
|
452
721
|
const config = await import('@vercel/cli-config/paths');
|
|
@@ -461,7 +730,7 @@ async function warnDeprecatedArch() {
|
|
|
461
730
|
} catch {}
|
|
462
731
|
const target = `${process.platform}-${process.arch}`;
|
|
463
732
|
console.error(
|
|
464
|
-
`! Support for ${target} will be removed from the vercel package in a future release
|
|
733
|
+
`! Support for ${target} will be removed from the vercel package in a future release.\n${feedbackHint('If you still need it, tell us with:')}`
|
|
465
734
|
);
|
|
466
735
|
if (stamp) {
|
|
467
736
|
try {
|
package/dist/version.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export const version = "65.
|
|
1
|
+
export const version = "65.10.0-snapshot-b8e5bb846796";
|
|
2
2
|
export const buildLabel = "";
|