@vercel/cli-support 65.3.1 → 65.5.0-snapshot-13615777d933
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +23 -1
- package/dist/chunks/add-6UOKR26K.js +8 -0
- package/dist/chunks/add-GULZ6EGJ.js +8 -0
- package/dist/chunks/add-RPAOJH5O.js +8 -0
- package/dist/chunks/build-MLAKPRSC.js +7 -0
- package/dist/chunks/{chunk-ADLBLGT3.js → chunk-26QK3I2S.js} +1 -1
- package/dist/chunks/chunk-2BKALEOP.js +7 -0
- package/dist/chunks/chunk-2FHZYQPY.js +7 -0
- package/dist/chunks/{chunk-6KVHNQW4.js → chunk-2QIJEHNE.js} +1 -1
- package/dist/chunks/{chunk-3JGBBS6V.js → chunk-36NK2Z3C.js} +1 -1
- package/dist/chunks/{chunk-D6REP5QQ.js → chunk-3E364MJE.js} +1 -1
- package/dist/chunks/{chunk-IGDG5CWT.js → chunk-3H36RI7C.js} +1 -1
- package/dist/chunks/{chunk-D2BZMGHP.js → chunk-3NG2EYQ5.js} +1 -1
- package/dist/chunks/{chunk-WCWP4GBR.js → chunk-4G7ZQONX.js} +1 -1
- package/dist/chunks/{chunk-7BGKE3JW.js → chunk-4HJGSSSZ.js} +1 -1
- package/dist/chunks/{chunk-BBKEP7RO.js → chunk-55H6G46X.js} +1 -1
- package/dist/chunks/chunk-5CZNUB7Y.js +7 -0
- package/dist/chunks/{chunk-URPEIX6M.js → chunk-5EMSOR2P.js} +1 -1
- package/dist/chunks/{chunk-OCQPXOTX.js → chunk-5K426HWC.js} +1 -1
- package/dist/chunks/{chunk-773GOZIR.js → chunk-5SIC5273.js} +1 -1
- package/dist/chunks/chunk-5WYPJ2T5.js +25 -0
- package/dist/chunks/{chunk-F2SWJEYV.js → chunk-6IATT2ID.js} +2 -2
- package/dist/chunks/{chunk-S5IWVPYT.js → chunk-6WMO5G45.js} +3 -3
- package/dist/chunks/{chunk-6OVX3PWM.js → chunk-75JI2SZX.js} +1 -1
- package/dist/chunks/{chunk-LRYGNQ6C.js → chunk-7G4PQR6J.js} +1 -1
- package/dist/chunks/chunk-7SAEZ4NC.js +7 -0
- package/dist/chunks/{chunk-22FDWPWY.js → chunk-7VTPAXDC.js} +1 -1
- package/dist/chunks/chunk-A2UZ2O7H.js +7 -0
- package/dist/chunks/{chunk-3LIKVGFT.js → chunk-A3RU52F4.js} +1 -1
- package/dist/chunks/{chunk-FDNYYENK.js → chunk-AIRQFG5A.js} +1 -1
- package/dist/chunks/{chunk-76SVVWPH.js → chunk-AOC6XXOO.js} +1 -1
- package/dist/chunks/chunk-ARQMFBV4.js +11 -0
- package/dist/chunks/{chunk-NQWGRKF4.js → chunk-AUY363W7.js} +1 -1
- package/dist/chunks/chunk-BGWS5R5R.js +9 -0
- package/dist/chunks/chunk-C6IITJ5S.js +7 -0
- package/dist/chunks/{chunk-LKLH6DZP.js → chunk-CLVEFWEX.js} +1 -1
- package/dist/chunks/{chunk-2WYYGGEO.js → chunk-CU2FTX57.js} +1 -1
- package/dist/chunks/{chunk-VMMMBWD3.js → chunk-CWO4HMKU.js} +1 -1
- package/dist/chunks/{chunk-CEMPU323.js → chunk-CZINAGH6.js} +1 -1
- package/dist/chunks/{chunk-TZFDVQ72.js → chunk-DAUAVRFC.js} +1 -1
- package/dist/chunks/{chunk-GA277JFB.js → chunk-DPM33VFZ.js} +1 -1
- package/dist/chunks/{chunk-Q5ODLDCU.js → chunk-DSY2S2YT.js} +1 -1
- package/dist/chunks/{chunk-XP3FT56R.js → chunk-DWOJP4ST.js} +3 -3
- package/dist/chunks/chunk-ED3VA7D4.js +7 -0
- package/dist/chunks/{chunk-GG5RME4X.js → chunk-EE2FTI3R.js} +1 -1
- package/dist/chunks/{chunk-SXOSF4O6.js → chunk-EFEQQXRU.js} +1 -1
- package/dist/chunks/{chunk-IUXSJWL3.js → chunk-EPO7P734.js} +1 -1
- package/dist/chunks/{chunk-X4762EE4.js → chunk-EQT2VHL2.js} +1 -1
- package/dist/chunks/chunk-ETEVOJQJ.js +8 -0
- package/dist/chunks/chunk-EWP5WICJ.js +10 -0
- package/dist/chunks/chunk-F22QLVTX.js +7 -0
- package/dist/chunks/{chunk-COM5YCHF.js → chunk-FAEC4BER.js} +1 -1
- package/dist/chunks/{chunk-LSQREJXO.js → chunk-FAELJM4F.js} +1 -1
- package/dist/chunks/{chunk-NTZ5WWYV.js → chunk-FNA4MIOH.js} +1 -1
- package/dist/chunks/{chunk-OWOWPOIE.js → chunk-GFD6UAAO.js} +2 -2
- package/dist/chunks/{chunk-DUT4U5YY.js → chunk-GP55VEOQ.js} +1 -1
- package/dist/chunks/chunk-GVPVWHFK.js +7 -0
- package/dist/chunks/chunk-HMWDOAWO.js +7 -0
- package/dist/chunks/{chunk-7L2K4OKM.js → chunk-HVDGNAPM.js} +1 -1
- package/dist/chunks/{chunk-7Y46LB43.js → chunk-I2WEQWCA.js} +1 -1
- package/dist/chunks/{chunk-ULHNMQ7C.js → chunk-IC3THLYP.js} +1 -1
- package/dist/chunks/{chunk-IQKGQ2Y2.js → chunk-J6L5MDTX.js} +1 -1
- package/dist/chunks/{chunk-OMCGXRSA.js → chunk-JCGEXU7T.js} +3 -3
- package/dist/chunks/{chunk-Y6AGOERS.js → chunk-JGMJP4T3.js} +1 -1
- package/dist/chunks/{chunk-YK7XLFU2.js → chunk-JHNLBVO2.js} +1 -1
- package/dist/chunks/{chunk-OQCMRU3J.js → chunk-JMLKK7RL.js} +2 -2
- package/dist/chunks/chunk-JSAY52FE.js +7 -0
- package/dist/chunks/{chunk-YN3C5BL5.js → chunk-JWUXHL35.js} +1 -1
- package/dist/chunks/{chunk-XXXRTHTP.js → chunk-JXAEI2GJ.js} +1 -1
- package/dist/chunks/{chunk-QMCHGGDX.js → chunk-KHADRPBJ.js} +1 -1
- package/dist/chunks/{chunk-43GBAKL2.js → chunk-KWKEBKUR.js} +1 -1
- package/dist/chunks/chunk-KY7LDQRX.js +7 -0
- package/dist/chunks/{chunk-NEFDNROD.js → chunk-L4XLDN6T.js} +1 -1
- package/dist/chunks/chunk-LFOWP74R.js +7 -0
- package/dist/chunks/{chunk-VQSLPYAF.js → chunk-LOO42IMZ.js} +1 -1
- package/dist/chunks/{chunk-2U7DJZSQ.js → chunk-LT5UZRMK.js} +1 -1
- package/dist/chunks/{chunk-FUX6LKNP.js → chunk-LUX4PBJL.js} +1 -1
- package/dist/chunks/chunk-M7LUSXMG.js +7 -0
- package/dist/chunks/{chunk-ANMDN3EG.js → chunk-MFW6IJIK.js} +1 -1
- package/dist/chunks/{chunk-OQPXJCMK.js → chunk-MLGQ233X.js} +1 -1
- package/dist/chunks/chunk-MY4MONOH.js +7 -0
- package/dist/chunks/{chunk-ZH6KHD55.js → chunk-MZQEDXOH.js} +2 -2
- package/dist/chunks/chunk-N5CXIFE2.js +7 -0
- package/dist/chunks/{chunk-XZV4BFM5.js → chunk-NM44RWS6.js} +1 -1
- package/dist/chunks/chunk-NVNE3W7S.js +8 -0
- package/dist/chunks/chunk-NZPGWZLV.js +9 -0
- package/dist/chunks/chunk-O7COT3YB.js +7 -0
- package/dist/chunks/{chunk-3KKFLKQG.js → chunk-ODAV7Z2H.js} +1 -1
- package/dist/chunks/{chunk-HCRD3JFL.js → chunk-OKNDHNH6.js} +1 -1
- package/dist/chunks/{chunk-LCHECISY.js → chunk-OQX4YVGU.js} +1 -1
- package/dist/chunks/chunk-ORJBK5FT.js +9 -0
- package/dist/chunks/chunk-OTYF3ZZW.js +7 -0
- package/dist/chunks/{chunk-FGFLTLEA.js → chunk-P6ZTEDX2.js} +1 -1
- package/dist/chunks/{chunk-7Z3WUAO5.js → chunk-PHHZ6J7Q.js} +1 -1
- package/dist/chunks/{chunk-E6CO6TUM.js → chunk-PRFIFS3Q.js} +1 -1
- package/dist/chunks/{chunk-OGPENBY2.js → chunk-QDPYU6KS.js} +1 -1
- package/dist/chunks/{chunk-JLEJB6KM.js → chunk-QHM6OK76.js} +1 -1
- package/dist/chunks/chunk-QNL22LAW.js +7 -0
- package/dist/chunks/{chunk-IVSC7ZFJ.js → chunk-QUSEBFDO.js} +1 -1
- package/dist/chunks/{chunk-2ACMWVTB.js → chunk-R3BEQTZZ.js} +1 -1
- package/dist/chunks/{chunk-BUJITHGZ.js → chunk-RCUDI7OF.js} +1 -1
- package/dist/chunks/{chunk-IKQTP764.js → chunk-RMW2FDXS.js} +1 -1
- package/dist/chunks/{chunk-KRPY5FHJ.js → chunk-RQVIMYKN.js} +1 -1
- package/dist/chunks/chunk-RWPQOJTT.js +22 -0
- package/dist/chunks/{chunk-BL3HBRF6.js → chunk-SDOPVIKJ.js} +1 -1
- package/dist/chunks/{chunk-3XW7N4W3.js → chunk-SKSOCUDZ.js} +1 -1
- package/dist/chunks/chunk-SLDWAIO3.js +18 -0
- package/dist/chunks/{chunk-XB4SKARZ.js → chunk-SW3JRXUW.js} +1 -1
- package/dist/chunks/{chunk-6ISAISGD.js → chunk-TGOGYSBO.js} +1 -1
- package/dist/chunks/chunk-TZT3VYZ3.js +7 -0
- package/dist/chunks/{chunk-3ADDGPEN.js → chunk-UJQ6PBRF.js} +1 -1
- package/dist/chunks/chunk-UWMPVTXG.js +7 -0
- package/dist/chunks/{chunk-R6BEOVTU.js → chunk-VAWZZK3Y.js} +1 -1
- package/dist/chunks/{chunk-KNLGWGUE.js → chunk-VLYVVC3P.js} +11 -11
- package/dist/chunks/{chunk-G4T7VBGN.js → chunk-VQ755MPP.js} +1 -1
- package/dist/chunks/{chunk-QB7F3UAP.js → chunk-VUQWLLNI.js} +1 -1
- package/dist/chunks/chunk-VWHIWUGJ.js +7 -0
- package/dist/chunks/chunk-WDUHDLUA.js +14 -0
- package/dist/chunks/chunk-WICRM2JL.js +7 -0
- package/dist/chunks/{chunk-TKBORMUF.js → chunk-WKZ6JSGZ.js} +1 -1
- package/dist/chunks/{chunk-RRREFECI.js → chunk-WSVYZKI6.js} +1 -1
- package/dist/chunks/{chunk-UJSW56GS.js → chunk-XAU3KTPX.js} +1 -1
- package/dist/chunks/chunk-XCKUJZUG.js +10 -0
- package/dist/chunks/{chunk-DGYHWXD2.js → chunk-XE24Y6NM.js} +3 -3
- package/dist/chunks/{chunk-RW3X523R.js → chunk-XSQVCDSD.js} +1 -1
- package/dist/chunks/{chunk-KW6GSQXV.js → chunk-XTKGBVSF.js} +1 -1
- package/dist/chunks/{chunk-SKYDLHEZ.js → chunk-YALEYPMP.js} +1 -1
- package/dist/chunks/chunk-YCJHUYBJ.js +19 -0
- package/dist/chunks/{chunk-TO5PJDEN.js → chunk-YIRSRF6D.js} +1 -1
- package/dist/chunks/chunk-YQDOADMG.js +10 -0
- package/dist/chunks/{chunk-PFPJLIFF.js → chunk-YT3QAZQF.js} +1 -1
- package/dist/chunks/chunk-ZQUVDDPB.js +7 -0
- package/dist/chunks/{chunk-WBF36MYT.js → chunk-ZUNQHI5Y.js} +1 -1
- package/dist/chunks/{chunk-S4SJ7GIZ.js → chunk-ZUYPTLVO.js} +1 -1
- package/dist/chunks/clear-UZWOOGOH.js +8 -0
- package/dist/chunks/compile-vercel-config-2RQDL3RD.js +7 -0
- package/dist/chunks/config-C76IGJ6B.js +8 -0
- package/dist/chunks/config-RMJWRS7O.js +7 -0
- package/dist/chunks/config-validator.mjs +1 -1
- package/dist/chunks/{connect-git-provider-FS5Q2HO4.js → connect-git-provider-IQ7N2NPY.js} +1 -1
- package/dist/chunks/{constants-ICJL2EO5.js → constants-JAB7MRSK.js} +1 -1
- package/dist/chunks/delete-2WBR5JQW.js +9 -0
- package/dist/chunks/delete-OKOBDL7Z.js +10 -0
- package/dist/chunks/{detect-projects-OD4JEAW2.js → detect-projects-XPB3R7VS.js} +1 -1
- package/dist/chunks/detect-services-DRHV22O5.js +7 -0
- package/dist/chunks/disable-DFEABU2Z.js +7 -0
- package/dist/chunks/discard-KGBEMNFT.js +14 -0
- package/dist/chunks/edit-5XIRLUKG.js +9 -0
- package/dist/chunks/edit-PJIDMKUS.js +8 -0
- package/dist/chunks/enable-UDWDPFOI.js +7 -0
- package/dist/chunks/{exec-OZSY46V6.js → exec-PX4GTZNE.js} +1 -1
- package/dist/chunks/{export-MHSH7QCX.js → export-W75EA6EQ.js} +1 -1
- package/dist/chunks/future-PHSAEQIE.js +7 -0
- package/dist/chunks/generate-cert-for-deploy-C67VL5Z6.js +7 -0
- package/dist/chunks/image-U5CV2PRP.js +7 -0
- package/dist/chunks/import-builders-PHIIX7HW.js +7 -0
- package/dist/chunks/inspect-AU3MX7E2.js +13 -0
- package/dist/chunks/{inspect-IAWVHJXQ.js → inspect-DQQI3PM7.js} +1 -1
- package/dist/chunks/inspect-LJK7I6RZ.js +9 -0
- package/dist/chunks/{inspect-DI434TAM.js → inspect-RNWLPR7I.js} +1 -1
- package/dist/chunks/{inspect-A7WJQQZO.js → inspect-WHPWW4BI.js} +1 -1
- package/dist/chunks/list-JV26NNYL.js +16 -0
- package/dist/chunks/{list-INRPH25K.js → list-QNRFVMMQ.js} +1 -1
- package/dist/chunks/list-YF4FXWUZ.js +12 -0
- package/dist/chunks/login-A4KNOUNA.js +9 -0
- package/dist/chunks/login-COGE7JQU.js +7 -0
- package/dist/chunks/logs-KMQATUYR.js +7 -0
- package/dist/chunks/{ls-LIGIBVAT.js → ls-DTFLHFOW.js} +1 -1
- package/dist/chunks/{ls-MCQ2NS65.js → ls-FOKMPVIB.js} +1 -1
- package/dist/chunks/ls-HMYU2ZGA.js +11 -0
- package/dist/chunks/{ls-S5E2NQMI.js → ls-IHF33MQP.js} +1 -1
- package/dist/chunks/{ls-VXH4QYF5.js → ls-QD54I4S7.js} +1 -1
- package/dist/chunks/{ls-V2ZSIVO3.js → ls-RNRMYD3V.js} +1 -1
- package/dist/chunks/ls-ZQLCDIQJ.js +8 -0
- package/dist/chunks/mutate-RMIFQOF6.js +9 -0
- package/dist/chunks/notifications-BFBNV2HY.js +7 -0
- package/dist/chunks/open-L6HEXHAI.js +7 -0
- package/dist/chunks/openapi-6JKCOR7K.js +7 -0
- package/dist/chunks/permissions-UYGTYRKA.js +7 -0
- package/dist/chunks/{plugin-offer-Z6FCPQFD.js → plugin-offer-NBHRXMNR.js} +1 -1
- package/dist/chunks/prompt-missing-credentials-2IYIF2JI.js +7 -0
- package/dist/chunks/publish-T2VSTPG4.js +15 -0
- package/dist/chunks/pull-4GL47Z2S.js +7 -0
- package/dist/chunks/purchase-domain-if-available-BHFBD3LW.js +7 -0
- package/dist/chunks/push-CQPIDVTL.js +7 -0
- package/dist/chunks/{query-JGPO7TNY.js → query-HN45ORIB.js} +3 -3
- package/dist/chunks/reauthenticate-FTHGAWK3.js +7 -0
- package/dist/chunks/reorder-7BD5JZKQ.js +10 -0
- package/dist/chunks/reply-2INQJ5KM.js +9 -0
- package/dist/chunks/resolve-DHAJC3I7.js +12 -0
- package/dist/chunks/resolve-agent-team-KGYPHN5F.js +7 -0
- package/dist/chunks/restore-OQKNWEFQ.js +16 -0
- package/dist/chunks/rm-CTP4UZH7.js +8 -0
- package/dist/chunks/rm-GFHEXQQW.js +8 -0
- package/dist/chunks/rm-OG3OXA6H.js +8 -0
- package/dist/chunks/rm-PFZYHXEN.js +8 -0
- package/dist/chunks/rm-XAW3WJ3I.js +8 -0
- package/dist/chunks/{routes-P6LKQCWH.js → routes-XKEWEA3P.js} +1 -1
- package/dist/chunks/rule-inspect-MKQE5IVJ.js +8 -0
- package/dist/chunks/{schema-BEUO7G52.js → schema-TFN5PSYE.js} +2 -2
- package/dist/chunks/schema-XFER2RCF.js +14 -0
- package/dist/chunks/select-org-PFTR6HQZ.js +7 -0
- package/dist/chunks/set-KWOZNGRL.js +7 -0
- package/dist/chunks/setup-and-link-BRYK42L7.js +7 -0
- package/dist/chunks/{skills-4J2NC2QI.js → skills-2MOFBKIE.js} +2 -2
- package/dist/chunks/tags-BHZUQTOQ.js +7 -0
- package/dist/chunks/{types-SK6J2HFE.js → types-IWO5QLAV.js} +1 -1
- package/dist/chunks/{update-25CKNOY5.js → update-LP7ZZUFZ.js} +1 -1
- package/dist/commands/build/index.js +2 -2
- package/dist/commands/deploy/index.js +8 -8
- package/dist/commands/dev/index.js +6 -6
- package/dist/commands/env/index.js +3 -3
- package/dist/commands/link/index.js +2 -2
- package/dist/commands/list/index.js +1 -1
- package/dist/commands/project/index.js +10 -10
- package/dist/commands-account.js +24 -24
- package/dist/commands-ai.js +17 -17
- package/dist/commands-blob.js +9 -9
- package/dist/commands-core.js +26 -26
- package/dist/commands-deployments.js +3 -3
- package/dist/commands-flags.js +32 -32
- package/dist/commands-integrations.js +103 -88
- package/dist/commands-observability.js +7 -7
- package/dist/commands-routing.js +29 -29
- package/dist/help.js +1 -1
- package/dist/index.js +8 -6
- package/dist/internal-build.js +2 -2
- package/dist/native-download.js +7 -0
- package/dist/package.json +61 -61
- package/dist/root-help-commands.mjs +1 -1
- package/dist/vc.js +306 -140
- package/dist/version.mjs +1 -1
- package/package.json +55 -54
- package/dist/chunks/add-5YZQTIQM.js +0 -8
- package/dist/chunks/add-A524QQ2H.js +0 -8
- package/dist/chunks/add-V4JMUHKO.js +0 -8
- package/dist/chunks/build-K2PVDJZ4.js +0 -7
- package/dist/chunks/chunk-2H3SB5RP.js +0 -9
- package/dist/chunks/chunk-2PKEEQ5W.js +0 -25
- package/dist/chunks/chunk-3AYYFYZG.js +0 -7
- package/dist/chunks/chunk-4UGHFESV.js +0 -8
- package/dist/chunks/chunk-5IASAERQ.js +0 -7
- package/dist/chunks/chunk-6VH56CX2.js +0 -19
- package/dist/chunks/chunk-76KGQU2G.js +0 -7
- package/dist/chunks/chunk-7HV7O6DM.js +0 -7
- package/dist/chunks/chunk-ABZEMNDR.js +0 -7
- package/dist/chunks/chunk-APZULWJC.js +0 -8
- package/dist/chunks/chunk-AWMQGOS2.js +0 -7
- package/dist/chunks/chunk-B4UE4LVE.js +0 -7
- package/dist/chunks/chunk-B4YYOSPY.js +0 -7
- package/dist/chunks/chunk-E2SADN6I.js +0 -7
- package/dist/chunks/chunk-GVTXA6HG.js +0 -7
- package/dist/chunks/chunk-GYVJIIYL.js +0 -7
- package/dist/chunks/chunk-IA3MXJRC.js +0 -8
- package/dist/chunks/chunk-IEPW2YRH.js +0 -7
- package/dist/chunks/chunk-KH6565YH.js +0 -8
- package/dist/chunks/chunk-L4NSF346.js +0 -22
- package/dist/chunks/chunk-LJBUJ23M.js +0 -7
- package/dist/chunks/chunk-LT3UK4K6.js +0 -10
- package/dist/chunks/chunk-LUBUI5GF.js +0 -7
- package/dist/chunks/chunk-OKEBIUKZ.js +0 -7
- package/dist/chunks/chunk-PFNYWWLI.js +0 -7
- package/dist/chunks/chunk-QZX7VG2V.js +0 -9
- package/dist/chunks/chunk-RUXO73ON.js +0 -7
- package/dist/chunks/chunk-SLI2O5X7.js +0 -63
- package/dist/chunks/chunk-TPNOSQZ3.js +0 -15
- package/dist/chunks/chunk-UKQMYTWW.js +0 -9
- package/dist/chunks/chunk-UNEGQPD3.js +0 -7
- package/dist/chunks/chunk-V7BEC3E4.js +0 -10
- package/dist/chunks/chunk-VOCZ34ON.js +0 -7
- package/dist/chunks/chunk-WGXKX24Q.js +0 -7
- package/dist/chunks/chunk-YHQ7PPXP.js +0 -7
- package/dist/chunks/clear-ZS4KQ7OT.js +0 -8
- package/dist/chunks/compile-vercel-config-3IYM2CHC.js +0 -7
- package/dist/chunks/config-N2SBVW4T.js +0 -8
- package/dist/chunks/config-ZFIC7N4D.js +0 -7
- package/dist/chunks/delete-2ZE2NVHI.js +0 -10
- package/dist/chunks/delete-AL57HZDQ.js +0 -9
- package/dist/chunks/detect-services-MOXTX5XG.js +0 -7
- package/dist/chunks/disable-MKI3BKNH.js +0 -7
- package/dist/chunks/discard-SI4H7ST3.js +0 -14
- package/dist/chunks/edit-DNWH6SPE.js +0 -8
- package/dist/chunks/edit-WYNWDFUJ.js +0 -9
- package/dist/chunks/enable-J6MMYPYF.js +0 -7
- package/dist/chunks/future-FFOGTKMF.js +0 -7
- package/dist/chunks/generate-cert-for-deploy-YZKNGAEQ.js +0 -7
- package/dist/chunks/image-7METSS6F.js +0 -7
- package/dist/chunks/import-builders-GM2SERWV.js +0 -7
- package/dist/chunks/inspect-H2Q7XOWN.js +0 -13
- package/dist/chunks/inspect-H5JC2XKI.js +0 -9
- package/dist/chunks/list-ELEUTZWJ.js +0 -12
- package/dist/chunks/list-WWU734RK.js +0 -16
- package/dist/chunks/login-R5NQRPQC.js +0 -7
- package/dist/chunks/login-ZF2TLCQB.js +0 -9
- package/dist/chunks/logs-UD7FEXZ7.js +0 -7
- package/dist/chunks/ls-5ZEAKKPQ.js +0 -8
- package/dist/chunks/ls-IXRLAJ4L.js +0 -11
- package/dist/chunks/mutate-OQWOKLIW.js +0 -9
- package/dist/chunks/notifications-KFZ333V5.js +0 -7
- package/dist/chunks/open-HH6K7ZRC.js +0 -7
- package/dist/chunks/openapi-JGYEFJJV.js +0 -7
- package/dist/chunks/permissions-ZSHKMXBZ.js +0 -7
- package/dist/chunks/prompt-missing-credentials-KOA7C4QC.js +0 -7
- package/dist/chunks/publish-FPNQ2US4.js +0 -15
- package/dist/chunks/pull-7OGOIKB3.js +0 -7
- package/dist/chunks/purchase-domain-if-available-F4LKHVBD.js +0 -7
- package/dist/chunks/push-NY3SIK2C.js +0 -7
- package/dist/chunks/reauthenticate-OZRQFR66.js +0 -7
- package/dist/chunks/reorder-4J2STFUS.js +0 -10
- package/dist/chunks/reply-EO4NTTPW.js +0 -9
- package/dist/chunks/resolve-RPHHRPNM.js +0 -12
- package/dist/chunks/resolve-agent-team-KX77HEAF.js +0 -7
- package/dist/chunks/restore-TEA6TSVK.js +0 -16
- package/dist/chunks/rm-BPILSPUI.js +0 -8
- package/dist/chunks/rm-F6XVUDBM.js +0 -8
- package/dist/chunks/rm-JCPXV2FN.js +0 -8
- package/dist/chunks/rm-LPQRGX7N.js +0 -8
- package/dist/chunks/rm-WHUGT6TE.js +0 -8
- package/dist/chunks/rule-inspect-BOETGPFO.js +0 -8
- package/dist/chunks/schema-YOEAK4VX.js +0 -14
- package/dist/chunks/select-org-OMLGQEKK.js +0 -7
- package/dist/chunks/set-5XY27S7R.js +0 -7
- package/dist/chunks/setup-and-link-A7M3QT52.js +0 -7
- package/dist/chunks/tags-ZXZQEXOV.js +0 -7
|
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{printProjectNotFoundError}from"./chunk-
|
|
7
|
+
import{printProjectNotFoundError}from"./chunk-SDOPVIKJ.js";import{param}from"./chunk-3G3FQYMW.js";import{detectExplicitScope}from"./chunk-WICRM2JL.js";import{AGENT_REASON,AGENT_STATUS,buildCommandWithYes,outputActionRequired,outputAgentError}from"./chunk-XE24Y6NM.js";import{getLinkedProject,resolveProjectCwd}from"./chunk-VLYVVC3P.js";import{getCommandName,getCommandNamePlain}from"./chunk-JESNVRVR.js";import{output_manager_default,require_build_utils}from"./chunk-DWOJP4ST.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_build_utils=__toESM(require_build_utils(),1);async function ensureLink(commandName,client,cwd,opts={}){opts.singleFile||(cwd=await resolveProjectCwd(cwd));let link=opts.link,nonInteractive=opts.nonInteractive??client.nonInteractive??!1;if(opts.nonInteractive=nonInteractive,link||(opts.forceDelete?link={status:"not_linked",org:null,project:null}:link=await getLinkedProject(client,{cwd,projectName:opts.projectName,projectNameIsExplicit:!!(opts.projectName&&opts.failIfNotFound),scopeIsExplicit:detectExplicitScope(client),allowOwnerLookupFallback:opts.allowOwnerLookupFallback,skipOwnerLookup:opts.skipOwnerLookup,skipRemoteLookup:opts.skipRemoteLookup,skipProjectRootResolution:!!opts.singleFile}),opts.link=link),link.status==="linked"&&opts.forceDelete||link.status==="not_linked"){if(link.status==="not_linked"&&opts.failIfNotFound&&opts.projectName){let pinnedProjectId=(0,import_build_utils.getPlatformEnv)("PROJECT_ID"),creatable=!opts.projectName.startsWith("prj_")&&!pinnedProjectId;if(!opts.createIfNotFound||opts.projectName.startsWith("prj_")||pinnedProjectId===opts.projectName)return await printProjectNotFoundError(client,opts.projectName,commandName,link.orgId,{createCommand:creatable?opts.createCommand:void 0}),1;if(pinnedProjectId){let message=`Can't use --project with VERCEL_PROJECT_ID. --project is "${opts.projectName}" and VERCEL_PROJECT_ID is "${pinnedProjectId}". Remove one of them.`,helpCommand=getCommandNamePlain(`${commandName} --help`);return output_manager_default.error(`${message}
|
|
8
8
|
|
|
9
9
|
See all options:
|
|
10
|
-
${helpCommand}`),outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message,next:[{command:helpCommand,when:"see all options"}]}),2}}if(link.status==="not_linked"&&opts.requireExistingLink)return output_manager_default.error(`Project is not linked. Run ${getCommandName("link")} first.`),1;let{default:setupAndLink}=await import("./setup-and-link-
|
|
10
|
+
${helpCommand}`),outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message,next:[{command:helpCommand,when:"see all options"}]}),2}}if(link.status==="not_linked"&&opts.requireExistingLink)return output_manager_default.error(`Project is not linked. Run ${getCommandName("link")} first.`),1;let{default:setupAndLink}=await import("./setup-and-link-BRYK42L7.js");if(link=await setupAndLink(client,cwd,opts),link.status==="not_linked")return 0}return link.status==="error"?(link.reason==="HEADLESS"&&(nonInteractive?outputActionRequired(client,{status:"action_required",reason:"confirmation_required",message:`Command ${getCommandNamePlain(commandName)} requires confirmation. Use option --yes to confirm.`,next:[{command:buildCommandWithYes(client.argv),when:"Confirm and run"}]},link.exitCode):output_manager_default.error(`Command ${getCommandName(commandName)} requires confirmation. Use option ${param("--yes")} to confirm.`)),nonInteractive&&process.exit(link.exitCode),link.exitCode):link}export{ensureLink};
|
|
@@ -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{AGENT_REASON,AGENT_STATUS,shouldEmitNonInteractiveCommandError,writeAgentError}from"./chunk-XE24Y6NM.js";import{output_manager_default}from"./chunk-DWOJP4ST.js";function withWarnings(result,warnings){let added=warnings.filter(warning=>warning!==void 0);if(added.length===0)return result;let existing=result.warnings;return{...result,warnings:[...Array.isArray(existing)?existing:[],...added]}}function getRenamedOption(flags,name,oldName,{json=!1,typedName=oldName}={}){let value=flags[name],oldValue=flags[oldName];if(value!==void 0&&oldValue!==void 0)return{error:`Can't use ${name} with ${typedName}.`};if(typeof value=="string"&&value.trim()==="")return{error:`${name} can't be empty.`};if(oldValue===void 0)return{value};let message=`${typedName} is deprecated. Use ${name}.`;return json?{value:oldValue,warning:{reason:AGENT_REASON.DEPRECATED,message}}:(output_manager_default.warning(message),{value:oldValue})}function reportRenamedOptionError(client,message,{json=!1}={}){return json||shouldEmitNonInteractiveCommandError(client)?writeAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message}):output_manager_default.error(message),2}function renameOptionInArgs(args,oldName,name){let end=args.indexOf("--");return args.map((arg,index)=>(end===-1||index<end)&&(arg===oldName||arg.startsWith(`${oldName}=`))?`${name}${arg.slice(oldName.length)}`:arg)}export{withWarnings,getRenamedOption,reportRenamedOptionError,renameOptionInArgs};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{performDeviceCodeFlow}from"./chunk-
|
|
7
|
+
import{performDeviceCodeFlow}from"./chunk-RWPQOJTT.js";import{isAPIError}from"./chunk-YCJHUYBJ.js";import{output_manager_default}from"./chunk-DWOJP4ST.js";import{URLSearchParams}from"url";var RECOVERABLE_CHALLENGE_CODES=new Set(["challenge_required","challenge_required_email_otp","user_auth_required"]);async function withEnvChallengeRecovery(client,fn){let hadStoredSession=!!(client.authConfig.token||client.authConfig.refreshToken);try{return await fn()}catch(error){if(!isAPIError(error))throw error;let isRecoverableChallenge=RECOVERABLE_CHALLENGE_CODES.has(error.code),isRejectedStoredSession=hadStoredSession&&error.invalidToken===!0;if(!isRecoverableChallenge&&!isRejectedStoredSession||client.authConfig.tokenSource||!client.stdin.isTTY||client.nonInteractive)throw error;output_manager_default.stopSpinner(),output_manager_default.log("Sensitive Environment Variables require fresh authentication.");let refreshToken=client.authConfig.refreshToken,acrValues=getAcrValuesFromWWWAuthenticate(error.wwwAuthenticate),tokens=isRecoverableChallenge&&refreshToken&&acrValues?await performDeviceCodeFlow(client,{refreshToken,acrValues,fallbackToLoginOnStepUpFailure:!0}):await performDeviceCodeFlow(client);if(!tokens)throw error;return client.updateAuthConfig({token:tokens.access_token,userId:void 0,expiresAt:Math.floor(Date.now()/1e3)+tokens.expires_in,refreshToken:tokens.refresh_token}),client.persistAuthConfig(),await fn()}}function getAcrValuesFromWWWAuthenticate(header){if(!header)return;let bearerIndex=header.toLowerCase().indexOf("bearer");if(bearerIndex===-1)return;let match=header.slice(bearerIndex+6).match(/(?:^|[,\s])acr_values=(?:"((?:\\.|[^"\\])*)"|([^,\s]+))/i);return match?.[1]?.replace(/\\(.)/g,"$1")??match?.[2]}async function getEnvRecords(client,projectId,source,{target,gitBranch,decrypt}={}){output_manager_default.debug(`Fetching Environment Variables of project ${projectId} and target ${target}`);let query=new URLSearchParams;if(target){let targetParam="target";target!=="production"&&target!=="preview"&&target!=="development"&&(targetParam="customEnvironmentId"),query.set(targetParam,target)}gitBranch&&query.set("gitBranch",gitBranch),decrypt&&query.set("decrypt",decrypt.toString()),source&&query.set("source",source);let url=`/v10/projects/${projectId}/env?${query}`;return withEnvChallengeRecovery(client,()=>client.fetch(url))}async function pullEnvRecords(client,projectIdOrDeploymentId,source,{target,gitBranch}={}){output_manager_default.debug(`Fetching Environment Variables of ${projectIdOrDeploymentId} and target ${target}`);let query=new URLSearchParams,url=`/v3/env/pull/${projectIdOrDeploymentId}`;return projectIdOrDeploymentId.startsWith("dpl_")||target&&(url+=`/${encodeURIComponent(target)}`,gitBranch&&(url+=`/${encodeURIComponent(gitBranch)}`)),source&&query.set("source",source),Array.from(query).length>0&&(url+=`?${query}`),withEnvChallengeRecovery(client,()=>client.fetch(url))}var parseEnv=env=>{if(!env)return{};if(typeof env=="string"&&(env=[env]),Array.isArray(env)){let startingDict={};return env.reduce((o,e)=>{let key,value,equalsSign=e.indexOf("=");return equalsSign===-1?key=e:(key=e.slice(0,equalsSign),value=e.slice(equalsSign+1)),o[key]=value,o},startingDict)}return env};export{getEnvRecords,pullEnvRecords,parseEnv};
|
|
@@ -4,5 +4,5 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{recordLine}from"./chunk-
|
|
7
|
+
import{recordLine}from"./chunk-PHHZ6J7Q.js";import{external_exports}from"./chunk-2NABMKFV.js";import{require_strip_ansi}from"./chunk-BS32OUOC.js";import{isAPIError}from"./chunk-YCJHUYBJ.js";import{__toESM}from"./chunk-BZENIQ7N.js";var MAX_PAGE_SIZE=1e3,QUERY_REASON_HEADER="x-vercel-observability-query-reason",responseSchema=external_exports.object({events:external_exports.array(external_exports.record(external_exports.string(),external_exports.unknown())),pagination:external_exports.object({hasMore:external_exports.boolean(),nextCursor:external_exports.string().nullable()}),meta:external_exports.object({excludedIntervals:external_exports.array(external_exports.object({start:external_exports.string(),end:external_exports.string()})).optional()}).passthrough().optional()}),InvalidEventsResponseError=class extends Error{constructor(){super("The Observability API returned an invalid events response."),this.name="InvalidEventsResponseError"}},RecordTooLargeError=class extends Error{constructor(){super("A single record exceeds the API response size limit and cannot be returned."),this.name="RecordTooLargeError"}};function isResultTooLarge(err){return isAPIError(err)&&err.status===413&&err.code==="result_too_large"}async function fetchEventsPage(client,request,limit,cursor){let body={event:request.event,scope:{ownerId:request.ownerId,...request.projectIds?{projectIds:[...request.projectIds]}:{}},timeRange:{start:request.timeRange.start,end:request.timeRange.end},select:[...request.select],order:"desc",limit};request.filter&&(body.filter=request.filter),cursor&&(body.cursor=cursor);let params=new URLSearchParams({teamId:request.ownerId}),response=await client.fetch(`/v1/observability/events?${params}`,{method:"POST",headers:{[QUERY_REASON_HEADER]:request.queryReason},body,useCurrentTeam:!1,...request.bailOn429?{bailOn429:!0}:{}}),parsed=responseSchema.safeParse(response);if(!parsed.success)throw new InvalidEventsResponseError;return parsed.data}async function*fetchEventPages(client,request,limit,startCursor){let remaining=limit,maxPageSize=MAX_PAGE_SIZE,cursor=startCursor,lastNextCursor=null;for(;remaining>0;){let pageSize=Math.min(remaining,maxPageSize),response;for(;;)try{response=await fetchEventsPage(client,request,pageSize,cursor);break}catch(err){if(!isResultTooLarge(err))throw err;if(pageSize===1)throw new RecordTooLargeError;pageSize=Math.max(1,Math.floor(pageSize/2)),maxPageSize=pageSize}let events=response.events.slice(0,remaining);remaining-=events.length;let{hasMore,nextCursor}=response.pagination,continues=hasMore&&!!nextCursor&&nextCursor!==cursor;if(lastNextCursor=continues?nextCursor:null,yield{events,excludedIntervals:response.meta?.excludedIntervals??[],nextCursor:lastNextCursor},!continues)return{hasMore,nextCursor:null};cursor=nextCursor??void 0}return{hasMore:!0,nextCursor:lastNextCursor}}function sortIntervals(intervals){return[...intervals].sort((a,b)=>Date.parse(a.start)-Date.parse(b.start)||Date.parse(a.end)-Date.parse(b.end))}var import_strip_ansi=__toESM(require_strip_ansi(),1);function recordLine2(type,event){return recordLine(type,event)}function warningLine(warning){let line={type:"warning",reason:warning.reason,message:(0,import_strip_ansi.default)(warning.message),...warning.data?{data:warning.data}:{}};return`${JSON.stringify(line)}
|
|
8
8
|
`}function serializeTimeRange(range){return{start:range.start.toISOString(),end:range.end.toISOString()}}var CONTINUATION_VERSION=1,continuationSchema=external_exports.object({v:external_exports.literal(CONTINUATION_VERSION),event:external_exports.string().min(1),ownerId:external_exports.string().min(1),projectIds:external_exports.array(external_exports.string().min(1)).optional(),timeRange:external_exports.object({start:external_exports.string().min(1),end:external_exports.string().min(1)}),filter:external_exports.string().optional(),order:external_exports.enum(["asc","desc"]),cursor:external_exports.string().min(1)});function encodeContinuation(continuation){let payload={v:CONTINUATION_VERSION,event:continuation.event,ownerId:continuation.ownerId,...continuation.projectIds?{projectIds:[...continuation.projectIds]}:{},timeRange:{start:continuation.timeRange.start,end:continuation.timeRange.end},...continuation.filter!==void 0?{filter:continuation.filter}:{},order:continuation.order,cursor:continuation.cursor};return Buffer.from(JSON.stringify(payload),"utf8").toString("base64url")}function decodeContinuation(token){if(!/^[A-Za-z0-9_-]+$/.test(token))return;let raw;try{raw=JSON.parse(Buffer.from(token,"base64url").toString("utf8"))}catch{return}let parsed=continuationSchema.safeParse(raw);if(!parsed.success)return;let{v:_version,...continuation}=parsed.data;return continuation}export{InvalidEventsResponseError,RecordTooLargeError,fetchEventPages,sortIntervals,recordLine2 as recordLine,warningLine,serializeTimeRange,encodeContinuation,decodeContinuation};
|
|
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{
|
|
7
|
+
import{packageName}from"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-DWOJP4ST.js";import{normalizeFlagName,stripSensitiveAuthArgs}from"./chunk-A2UZ2O7H.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var DEFAULT_LIST_LIMIT=20,MAX_LIST_LIMIT=100;function parseListLimit(value,{defaultLimit=DEFAULT_LIST_LIMIT,maxLimit=MAX_LIST_LIMIT}={}){if(value===void 0)return defaultLimit;if(!Number.isInteger(value)||value<1||value>maxLimit)throw new Error(`The --limit option must be an integer from 1 to ${maxLimit}.`);return value}var PaginationError=class extends Error{constructor(message){super(message),this.name="PaginationError"}};async function fetchAllPages(fetchPage,{maxPages=1e3}={}){let items=[],seen=new Set,next;for(let pages=0;pages<maxPages;pages++){let page=await fetchPage(next);if(items.push(...page.items),!page.next)return items;if(seen.has(page.next))throw new PaginationError("Pagination returned a cursor it already returned. The list is incomplete.");seen.add(page.next),next=page.next}throw new PaginationError(`Stopped after ${maxPages} pages. The list is incomplete. Use --limit and --next to page through it manually.`)}var CURSOR_FLAGS=new Set(["--next","-N"]);function quoteShellArg(value){return/^[A-Za-z0-9_./@:,=+-]+$/.test(value)?value:`'${value.replace(/'/g,"'\\''")}'`}function getNextPageCommand(argv,next,dropFlags=[]){let args=stripSensitiveAuthArgs(argv.slice(2)),delimiter=args.indexOf("--"),own=delimiter===-1?args:args.slice(0,delimiter),passthrough=delimiter===-1?[]:args.slice(delimiter),kept=[];for(let i=0;i<own.length;i++){let arg=own[i],name=normalizeFlagName(arg);if(CURSOR_FLAGS.has(name)||dropFlags.includes(name)){!arg.includes("=")&&i+1<own.length&&i++;continue}if(/^-[A-Za-z]{2,}$/.test(arg)&&arg.includes("N")){kept.push(arg.replace(/N/g,"")),i+1<own.length&&i++;continue}kept.push(arg)}return kept.push(`--next=${next}`,...passthrough),`${packageName} ${kept.map(quoteShellArg).join(" ")}`}function printNextPageCommand(command,label="Next page"){output_manager_default.print(` ${label}:
|
|
8
8
|
${import_chalk.default.cyan(command)}
|
|
9
9
|
`)}function printNextPageHint(client,next,dropFlags=[]){next&&(output_manager_default.print(`
|
|
10
10
|
`),printNextPageCommand(getNextPageCommand(client.argv,next,dropFlags)))}export{DEFAULT_LIST_LIMIT,MAX_LIST_LIMIT,parseListLimit,PaginationError,fetchAllPages,getNextPageCommand,printNextPageCommand,printNextPageHint};
|
|
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{formatCondition,formatTransform,isTargetTransform}from"./chunk-
|
|
7
|
+
import{formatCondition,formatTransform,isTargetTransform}from"./chunk-TGOGYSBO.js";import{output_manager_default}from"./chunk-DWOJP4ST.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";function extractEnvVarNames(value){let names=new Set;for(let m of value.matchAll(/\$\{?([A-Z_][A-Z0-9_]*)\}?/g))names.add(m[1]);return Array.from(names)}function escapeRegex(value){return value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function referencesEnvVar(value,name){let escapedName=escapeRegex(name);return new RegExp(`\\$(?:\\{${escapedName}\\}|${escapedName}(?![A-Za-z0-9_]))`).test(value)}function referencesBracedEnvVar(value,name){return new RegExp(`\\$\\{${escapeRegex(name)}\\}`).test(value)}function collectReferencedEnvVars(values,explicitEnv=[],excludedNames=new Set){let names=new Set(explicitEnv.filter(name=>values.some(value=>referencesEnvVar(value,name))));for(let value of values)for(let name of extractEnvVarNames(value))(!excludedNames.has(name)||names.has(name)||referencesBracedEnvVar(value,name))&&names.add(name);return Array.from(names)}function collectNamedRegexCaptures(source){return new Set(Array.from(source.matchAll(/\(\?<([a-zA-Z][a-zA-Z0-9_]*)>/g),match=>match[1]))}function populateRouteEnv(route,srcSyntax="regex"){let excludedNames=srcSyntax==="regex"&&route.src?collectNamedRegexCaptures(route.src):new Set,routeValues=[...route.dest?[route.dest]:[],...Object.values(route.headers||{})],routeEnv=collectReferencedEnvVars(routeValues,route.env,excludedNames);if(route.env=routeEnv.length>0?routeEnv:void 0,route.transforms)for(let transform of route.transforms){let args=transform.args?Array.isArray(transform.args)?transform.args:[transform.args]:[],names=collectReferencedEnvVars(args,transform.env,excludedNames);transform.env=names.length>0?names:void 0}}async function generateRoute(client,projectId,input,options={}){let{teamId}=options,query=new URLSearchParams;teamId&&query.set("teamId",teamId);let queryString=query.toString(),url=`/v1/projects/${projectId}/routes/generate${queryString?`?${queryString}`:""}`;return await client.fetch(url,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(input)})}function parseTransforms(values,type,op){return values.map(value=>parseTransform(value,type,op))}function parseTransform(input,type,op){if(op==="delete"){let key2=input.trim();if(!key2)throw new Error("Delete operation requires a key");return{type,op,target:{key:key2}}}let eqIndex=input.indexOf("=");if(eqIndex===-1)throw new Error(`Invalid format: "${input}". Expected format: key=value`);let key=input.slice(0,eqIndex).trim(),args=input.slice(eqIndex+1);if(!key)throw new Error("Transform key cannot be empty");return{type,op,target:{key},args}}function collectTransforms(flags){let transforms=[];return flags.setResponseHeader&&transforms.push(...parseTransforms(flags.setResponseHeader,"response.headers","set")),flags.appendResponseHeader&&transforms.push(...parseTransforms(flags.appendResponseHeader,"response.headers","append")),flags.deleteResponseHeader&&transforms.push(...parseTransforms(flags.deleteResponseHeader,"response.headers","delete")),flags.setRequestHeader&&transforms.push(...parseTransforms(flags.setRequestHeader,"request.headers","set")),flags.appendRequestHeader&&transforms.push(...parseTransforms(flags.appendRequestHeader,"request.headers","append")),flags.deleteRequestHeader&&transforms.push(...parseTransforms(flags.deleteRequestHeader,"request.headers","delete")),flags.setRequestQuery&&transforms.push(...parseTransforms(flags.setRequestQuery,"request.query","set")),flags.appendRequestQuery&&transforms.push(...parseTransforms(flags.appendRequestQuery,"request.query","append")),flags.deleteRequestQuery&&transforms.push(...parseTransforms(flags.deleteRequestQuery,"request.query","delete")),transforms}function collectResponseHeaders(setHeaders){let headers={};for(let input of setHeaders){let eqIndex=input.indexOf("=");if(eqIndex===-1)throw new Error(`Invalid header format: "${input}". Expected format: key=value`);let key=input.slice(0,eqIndex).trim(),value=input.slice(eqIndex+1);if(!key)throw new Error("Header key cannot be empty");headers[key]=value}return headers}var MAX_NAME_LENGTH=256,MAX_DESCRIPTION_LENGTH=1024,MAX_CONDITIONS=16,VALID_SYNTAXES=["regex","path-to-regexp","equals"],REDIRECT_STATUS_CODES=[301,302,303,307,308],VALID_ACTION_TYPES=["rewrite","redirect","set-status"],ALL_ACTION_CHOICES=[{name:"Rewrite",value:"rewrite",exclusive:!0},{name:"Redirect",value:"redirect",exclusive:!0},{name:"Set Status Code",value:"set-status",exclusive:!0},{name:"Response Headers",value:"response-headers"},{name:"Request Headers",value:"request-headers"},{name:"Request Query",value:"request-query"}];function stripQuotes(str){return str.startsWith('"')&&str.endsWith('"')&&str.length>=2||str.startsWith("'")&&str.endsWith("'")&&str.length>=2?str.slice(1,-1):str}function extractTransformFlags(flags){return{setResponseHeader:flags["--set-response-header"],appendResponseHeader:flags["--append-response-header"],deleteResponseHeader:flags["--delete-response-header"],setRequestHeader:flags["--set-request-header"],appendRequestHeader:flags["--append-request-header"],deleteRequestHeader:flags["--delete-request-header"],setRequestQuery:flags["--set-request-query"],appendRequestQuery:flags["--append-request-query"],deleteRequestQuery:flags["--delete-request-query"]}}function collectHeadersAndTransforms(transformFlags){let headers=transformFlags.setResponseHeader?collectResponseHeaders(transformFlags.setResponseHeader):{},transforms=collectTransforms({...transformFlags,setResponseHeader:void 0});return{headers,transforms}}function hasAnyTransformFlags(flags){let tf=extractTransformFlags(flags);return!!(tf.setResponseHeader||tf.appendResponseHeader||tf.deleteResponseHeader||tf.setRequestHeader||tf.appendRequestHeader||tf.deleteRequestHeader||tf.setRequestQuery||tf.appendRequestQuery||tf.deleteRequestQuery)}function validateActionFlags(action,dest,status){if(!action)return dest||status!==void 0?"--action is required when using --dest or --status. Use --action rewrite, --action redirect, or --action set-status.":null;if(!VALID_ACTION_TYPES.includes(action))return`Invalid action type: "${action}". Valid types: ${VALID_ACTION_TYPES.join(", ")}`;switch(action){case"rewrite":if(!dest)return"--action rewrite requires --dest.";if(status!==void 0)return"--action rewrite does not accept --status.";break;case"redirect":if(!dest)return"--action redirect requires --dest.";if(status===void 0)return`--action redirect requires --status (${REDIRECT_STATUS_CODES.join(", ")}).`;if(!REDIRECT_STATUS_CODES.includes(status))return`Invalid redirect status: ${status}. Must be one of: ${REDIRECT_STATUS_CODES.join(", ")}`;break;case"set-status":if(dest)return"--action set-status does not accept --dest.";if(status===void 0)return"--action set-status requires --status.";if(status<100||status>599)return"Status code must be between 100 and 599.";break}return null}async function collectActionDetails(client,actionType,flags){switch(actionType){case"rewrite":{let dest=await client.input.text({message:"Destination URL:",validate:val=>val?!0:"Destination is required"});Object.assign(flags,{"--dest":dest});break}case"redirect":{let dest=await client.input.text({message:"Destination URL:",validate:val=>val?!0:"Destination is required"}),status=await client.input.select({message:"Status code:",choices:[{name:"307 - Temporary Redirect",value:307},{name:"308 - Permanent Redirect",value:308},{name:"301 - Moved Permanently",value:301},{name:"302 - Found",value:302},{name:"303 - See Other",value:303}]});Object.assign(flags,{"--dest":dest,"--status":status});break}case"set-status":{let statusCode=await client.input.text({message:"HTTP status code:",validate:val=>{let num=parseInt(val,10);return isNaN(num)||num<100||num>599?"Status code must be between 100 and 599":!0}});Object.assign(flags,{"--status":parseInt(statusCode,10)});break}case"response-headers":{await collectInteractiveHeaders(client,"response",flags);break}case"request-headers":{await collectInteractiveHeaders(client,"request-header",flags);break}case"request-query":{await collectInteractiveHeaders(client,"request-query",flags);break}}}async function collectInteractiveConditions(client,flags){let addMore=!0;for(;addMore;){let currentHas=flags["--has"]||[],currentMissing=flags["--missing"]||[];if(currentHas.length>0||currentMissing.length>0){output_manager_default.log(`
|
|
8
8
|
Current conditions:`);for(let c of currentHas)output_manager_default.print(` has: ${c}
|
|
9
9
|
`);for(let c of currentMissing)output_manager_default.print(` does not have: ${c}
|
|
10
10
|
`);output_manager_default.print(`
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __dirname_(__filename);
|
|
7
|
+
import{getShortFlags,globalCommandOptions}from"./chunk-A2UZ2O7H.js";var COMMAND_SHORTHANDS=new Set(["-d"]);function walkCommandArgs(commands,args,start,visit){let command={name:"",aliases:[],subcommands:commands},options=[...globalCommandOptions],argumentCount=0;for(let i=start;i<args.length;i++){let token=args[i];if(token==="--")return;if(token.length>1&&token.startsWith("-")){(visit(i,command,argumentCount)||!token.includes("=")&&takesValue(token,options))&&i++;continue}let subcommand=argumentCount===0?command.subcommands?.find(candidate=>candidate.name===token||candidate.aliases.includes(token)):void 0;subcommand?(command=subcommand,options.push(...subcommand.options??[])):argumentCount++}}function takesValue(token,options){let flag=/^-[A-Za-z]{2,}$/.test(token)?`-${token.slice(-1)}`:token,option=options.find(candidate=>`--${candidate.name}`===flag||getShortFlags(candidate).includes(flag));return option!==void 0&&option.type!==Boolean}function findHiddenOption(command,flag){return command.options?.find(option=>`-${option.deprecatedShorthand}`===flag)}function findCommandShorthands(commands,args,start=0){let found=new Set;return walkCommandArgs(commands,args,start,(index,command,argumentCount)=>{let next=args[index+1],required=(command.arguments??[]).filter(argument=>argument.required).length;return!COMMAND_SHORTHANDS.has(args[index])||!findHiddenOption(command,args[index])||argumentCount<required||next===void 0||next.startsWith("-")?!1:(found.add(index),!0)}),found}function findHiddenShorthandOption(commands,args,flag,start=0){let found;return walkCommandArgs(commands,args,start,(index,command)=>(args[index]===flag&&(found??=findHiddenOption(command,flag)),!1)),found}export{findCommandShorthands,findHiddenShorthandOption};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{resolveProjectContext}from"./chunk-
|
|
7
|
+
import{resolveProjectContext}from"./chunk-36NK2Z3C.js";import{AGENT_REASON,AGENT_STATUS,outputAgentError}from"./chunk-XE24Y6NM.js";import{parseArguments}from"./chunk-F22QLVTX.js";import{getCommandName,getCommandNamePlain}from"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-DWOJP4ST.js";import{getFlagsSpecification,getGlobalFlagsFromArgs}from"./chunk-A2UZ2O7H.js";async function requireProjectContext(client,command,projectName){let link=await resolveProjectContext({client,projectNameOrId:projectName});if(link.status==="error")return link.exitCode;if(link.status==="not_linked"){if(client.nonInteractive)if(command==="redirects"){let linkCmd=getCommandNamePlain("link");outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.NOT_LINKED,message:`Your codebase isn't linked to a project on Vercel. Run ${linkCmd} to begin.`,next:[{command:linkCmd}]},1)}else{let flags=getGlobalFlagsFromArgs(client.argv.slice(2)),cmd=getCommandNamePlain(`link ${flags.join(" ")}`.trim());return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.NOT_LINKED,userActionRequired:!0,message:`Your codebase is not linked to a Vercel project. Run link first, then retry ${command} commands.`,next:[{command:cmd,when:"to link this directory to a project"}]},1),1}return output_manager_default.error(`Your codebase isn't linked to a project on Vercel. Run ${getCommandName("link")} to begin.`),1}return client.config.currentTeam=link.org.type==="team"?link.org.id:void 0,link}function parseSubcommandArguments(argv,command){let flagsSpecification=getFlagsSpecification(command.options);return parseArguments(argv,flagsSpecification)}function validateRequiredArguments(args,required){for(let i=0;i<required.length;i++)if(!args[i])return`Missing required argument: ${required[i]}`;return null}export{requireProjectContext,parseSubcommandArguments,validateRequiredArguments};
|
|
@@ -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{packageName}from"./chunk-JESNVRVR.js";var loginCommand={name:"login",aliases:[],description:"Sign in to your Vercel account.",arguments:[],options:[{name:"github",description:"Log in with GitHub",shorthand:null,type:Boolean,deprecated:!0},{name:"oob",description:'Log in with "out of band" authentication',shorthand:null,type:Boolean,deprecated:!0},{name:"gitlab",shorthand:null,type:Boolean,deprecated:!0},{name:"bitbucket",shorthand:null,type:Boolean,deprecated:!0},{name:"future",description:"Sign in using OAuth Device Authorization",shorthand:null,type:Boolean,deprecated:!0}],examples:[{name:"Sign in to your Vercel account.",value:`${packageName} login`}],disabledGlobalOptions:["token"]};export{loginCommand};
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{external_exports}from"./chunk-2NABMKFV.js";import{PaginationError}from"./chunk-
|
|
7
|
+
import{external_exports}from"./chunk-2NABMKFV.js";import{PaginationError}from"./chunk-KHADRPBJ.js";var positionSchema=external_exports.object({cursor:external_exports.string().min(1).optional(),offset:external_exports.number().int().min(0)});function encodeListCursor(position){return Buffer.from(JSON.stringify(position)).toString("base64url")}function decodeListCursor(value){try{let decoded=JSON.parse(Buffer.from(value,"base64url").toString()),parsed=positionSchema.safeParse(decoded);return parsed.success?parsed.data:void 0}catch{return}}function sliceList(items,start,limit){if(start.cursor!==void 0)return;let end=start.offset+limit;return{items:items.slice(start.offset,end),next:end<items.length?encodeListCursor({offset:end}):null}}async function collectList(fetchPage,start,limit,{maxPages=100}={}){let items=[],seen=new Set,position=start;for(let pages=0;pages<maxPages;pages++){let page=await fetchPage(position.cursor),remaining=page.items.slice(position.offset),taken=remaining.slice(0,limit-items.length);if(items.push(...taken),taken.length<remaining.length){let offset=position.offset+taken.length;return{items,next:encodeListCursor({cursor:position.cursor,offset})}}if(!page.cursor)return{items,next:null};if(seen.has(page.cursor))throw new PaginationError("Pagination returned a cursor it already returned. The list is incomplete.");if(seen.add(page.cursor),position={cursor:page.cursor,offset:0},items.length===limit)return{items,next:encodeListCursor(position)}}return{items,next:encodeListCursor(position)}}export{decodeListCursor,sliceList,collectList};
|
|
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{HOMEBREW_UPGRADE_COMMAND,getUpdateCommandInfo,getUpgradePackageManager,isGlobal,trustedUpgradeDirectory,trustedUpgradeEnvironment}from"./chunk-S4SJ7GIZ.js";import{require_semver}from"./chunk-BPUANOGW.js";import{progress}from"./chunk-U56NHYAH.js";import{require_tar_fs}from"./chunk-KRPY5FHJ.js";import{require_ci_info}from"./chunk-2EYYB6YN.js";import{getInstallRoot,isNativeBinaryInstall}from"./chunk-NWGBDBZI.js";import{getCachedUsername,require_lib}from"./chunk-KNLGWGUE.js";import{fetch,toNodeReadable}from"./chunk-FUX6LKNP.js";import{output_manager_default}from"./chunk-XP3FT56R.js";import{pkg_default}from"./chunk-OO572JUC.js";import{__commonJS,__require,__toESM}from"./chunk-BZENIQ7N.js";var require_lib2=__commonJS({"../../node_modules/.pnpm/os-paths@4.4.0/node_modules/os-paths/src/lib/index.js"(exports,module){"use strict";var os=__require("os"),paths=__require("path"),isWinOS=/^win/i.test(process.platform);function normalize_path(path){return paths.normalize(paths.join(path,"."))}var base=()=>{let{env}=process,object={};return object.home=()=>normalize_path(os.homedir?os.homedir():env.HOME),object.temp=()=>normalize_path(os.tmpdir?os.tmpdir():env.TMPDIR||env.TEMP||env.TMP),object},windows=()=>{let{env}=process,object={};return object.home=()=>normalize_path(os.homedir?os.homedir():env.USERPROFILE||paths.join(env.HOMEDRIVE,env.HOMEPATH)||env.HOME),object.temp=()=>normalize_path(os.tmpdir?os.tmpdir():env.TEMP||env.TMP||paths.join(env.LOCALAPPDATA||env.SystemRoot||env.windir,"Temp")),object},_OSPaths=class __OSPaths{constructor(){let OSPaths=function(){return new __OSPaths};this._fn=OSPaths;let extension=isWinOS?windows():base();return Object.keys(extension).forEach(key=>{this._fn[key]=extension[key]}),this._fn}};module.exports=new _OSPaths}});var require_lib3=__commonJS({"../../node_modules/.pnpm/xdg-portable@7.3.0/node_modules/xdg-portable/src/lib/index.js"(exports,module){"use strict";var path=__require("path"),osPaths=require_lib2(),linux=()=>{let object={};return object.cache=()=>process.env.XDG_CACHE_HOME||path.join(osPaths.home()||osPaths.temp(),".cache"),object.config=()=>process.env.XDG_CONFIG_HOME||path.join(osPaths.home()||osPaths.temp(),".config"),object.data=()=>process.env.XDG_DATA_HOME||path.join(osPaths.home()||osPaths.temp(),".local","share"),object.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,object.state=()=>process.env.XDG_STATE_HOME||path.join(osPaths.home()||osPaths.temp(),".local","state"),object},macos=()=>{let object={};return object.cache=()=>process.env.XDG_CACHE_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"Caches"),object.config=()=>process.env.XDG_CONFIG_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"Preferences"),object.data=()=>process.env.XDG_DATA_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"Application Support"),object.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,object.state=()=>process.env.XDG_STATE_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"State"),object},windows=()=>{let object={};return object.cache=()=>{let localAppData=process.env.LOCALAPPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Local");return process.env.XDG_CACHE_HOME||path.join(localAppData,"xdg.cache")},object.config=()=>{let appData=process.env.APPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Roaming");return process.env.XDG_CONFIG_HOME||path.join(appData,"xdg.config")},object.data=()=>{let appData=process.env.APPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Roaming");return process.env.XDG_DATA_HOME||path.join(appData,"xdg.data")},object.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,object.state=()=>{let localAppData=process.env.LOCALAPPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Local");return process.env.XDG_STATE_HOME||path.join(localAppData,"xdg.state")},object},_XDGPortable=()=>{let XDGPortable=function(){return _XDGPortable()},extension={};return/^darwin$/i.test(process.platform)?extension=macos():/^win/i.test(process.platform)?extension=windows():extension=linux(),extension.configDirs=()=>{let dirs=[];return dirs.push(extension.config()),process.env.XDG_CONFIG_DIRS&&dirs.push(...process.env.XDG_CONFIG_DIRS.split(path.delimiter)),dirs},extension.dataDirs=()=>{let dirs=[];return dirs.push(extension.data()),process.env.XDG_DATA_DIRS&&dirs.push(...process.env.XDG_DATA_DIRS.split(path.delimiter)),dirs},Object.keys(extension).forEach(key=>{XDGPortable[key]=extension[key]}),XDGPortable};module.exports=_XDGPortable()}});var require_xdg_app_paths=__commonJS({"../../node_modules/.pnpm/xdg-app-paths@5.1.0/node_modules/xdg-app-paths/index.js"(exports,module){"use strict";var path=__require("path"),os=__require("os"),xdg=require_lib3(),isWinOS=/^win/i.test(process.platform);function _normalizeOptions(options,isolated){if(options=options||{},typeof options!="object"&&(options={isolated:options}),options.isolated=options.isolated===void 0||options.isolated===null?isolated:options.isolated,typeof options.isolated!="boolean")throw new TypeError(`Expected boolean for "isolated" argument, got ${typeof options.isolated}`);return options}var base=(name,isolated)=>{let object={};return object.cache=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.cache(),options.isolated?name:"")),object.config=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.config(),options.isolated?name:"")),object.data=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.data(),options.isolated?name:"")),object.runtime=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.runtime()?path.join(xdg.runtime(),options.isolated?name:""):void 0),object.state=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.state(),options.isolated?name:"")),object.configDirs=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.configDirs().map(s=>path.join(s,options.isolated?name:""))),object.dataDirs=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.dataDirs().map(s=>path.join(s,options.isolated?name:""))),object},windows=(name,isolated)=>{let{env}=process,homedir=os.homedir(),tmpdir2=os.tmpdir(),appData=env.APPDATA||path.join(homedir||tmpdir2,"AppData","Roaming"),localAppData=env.LOCALAPPDATA||path.join(homedir||tmpdir2,"AppData","Local"),object={};return object.cache=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_CACHE_HOME?path.join(xdg.cache(),options.isolated?name:""):path.join(localAppData,options.isolated?name:"","Cache")),object.config=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_CONFIG_HOME?path.join(xdg.config(),options.isolated?name:""):path.join(appData,options.isolated?name:"","Config")),object.data=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_DATA_HOME?path.join(xdg.data(),options.isolated?name:""):path.join(appData,options.isolated?name:"","Data")),object.runtime=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.runtime()?path.join(xdg.runtime(),options.isolated?name:""):void 0),object.state=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_STATE_HOME?path.join(xdg.state(),options.isolated?name:""):path.join(localAppData,options.isolated?name:"","State")),object.configDirs=(options={isolated:null})=>{options=_normalizeOptions(options,isolated);let dirs=[object.config(options)];return env.XDG_CONFIG_DIRS&&dirs.push(...env.XDG_CONFIG_DIRS.split(path.delimiter).map(s=>path.join(s,options.isolated?name:""))),dirs},object.dataDirs=(options={isolated:null})=>{options=_normalizeOptions(options,isolated);let dirs=[object.data(options)];return env.XDG_DATA_DIRS&&dirs.push(...env.XDG_DATA_DIRS.split(path.delimiter).map(s=>path.join(s,options.isolated?name:""))),dirs},object},_XDGAppPaths=class __XDGAppPaths{constructor(options={name:null,suffix:null,isolated:!0}){let XDGAppPaths2=function(options2={name:null,suffix:null,isolated:!0}){return new __XDGAppPaths(options2)};this._fn=XDGAppPaths2,options=options||{},typeof options!="object"&&(options={name:options});let name=options.name||"";if(typeof name!="string")throw new TypeError(`Expected string for "name" argument, got ${typeof name}`);let suffix=options.suffix||"";if(typeof suffix!="string")throw new TypeError(`Expected string for "suffix" argument, got ${typeof suffix}`);let isolated=options.isolated===void 0||options.isolated===null?!0:options.isolated;if(typeof isolated!="boolean")throw new TypeError(`Expected boolean for "isolated" argument, got ${typeof isolated}`);name||(name=path.parse(process.pkg?process.execPath:__require.main?__require.main.filename:process.argv[0]).name),suffix&&(name+=suffix),this._fn.$name=()=>name,this._fn.$isolated=()=>isolated;let extension=isWinOS?windows(name,isolated):base(name,isolated);return Object.keys(extension).forEach(key=>{this._fn[key]=extension[key]}),this._fn}};module.exports=new _XDGAppPaths}});function getWhoamiCachedAnswer(args,authConfig){return args.includes("--cached")?getCachedUsername(authConfig):void 0}var import_semver=__toESM(require_semver(),1);import{spawn,execFile}from"child_process";function renderUpgradeProgress(current,total,phase){let bar=progress(current,total);output_manager_default.spinner(bar?`Upgrading Vercel CLI [${bar}] (${current}/${total})${phase?` ${phase}`:""}`:phase||"Upgrading Vercel CLI\u2026",0)}function execFileStdout(command,args,cwd,env=trustedUpgradeEnvironment){return new Promise((resolve3,reject)=>{execFile(command,args,{encoding:"utf8",windowsHide:!0,cwd,timeout:15e3,env:{...env}},(error,stdout)=>{if(error){reject(error);return}resolve3(stdout.toString())})})}function parseVersionOutput(stdout){for(let line of[stdout.trim(),...stdout.trim().split(`
|
|
7
|
+
import{HOMEBREW_UPGRADE_COMMAND,getUpdateCommandInfo,getUpgradePackageManager,isGlobal,trustedUpgradeDirectory,trustedUpgradeEnvironment}from"./chunk-ZUYPTLVO.js";import{require_semver}from"./chunk-BPUANOGW.js";import{progress}from"./chunk-U56NHYAH.js";import{require_tar_fs}from"./chunk-RQVIMYKN.js";import{require_ci_info}from"./chunk-2EYYB6YN.js";import{getInstallRoot,isNativeBinaryInstall}from"./chunk-NWGBDBZI.js";import{getCachedUsername,require_lib}from"./chunk-VLYVVC3P.js";import{output_manager_default}from"./chunk-DWOJP4ST.js";import{pkg_default}from"./chunk-OO572JUC.js";import{fetch,toNodeReadable}from"./chunk-MY4MONOH.js";import{__commonJS,__require,__toESM}from"./chunk-BZENIQ7N.js";var require_lib2=__commonJS({"../../node_modules/.pnpm/os-paths@4.4.0/node_modules/os-paths/src/lib/index.js"(exports,module){"use strict";var os=__require("os"),paths=__require("path"),isWinOS=/^win/i.test(process.platform);function normalize_path(path){return paths.normalize(paths.join(path,"."))}var base=()=>{let{env}=process,object={};return object.home=()=>normalize_path(os.homedir?os.homedir():env.HOME),object.temp=()=>normalize_path(os.tmpdir?os.tmpdir():env.TMPDIR||env.TEMP||env.TMP),object},windows=()=>{let{env}=process,object={};return object.home=()=>normalize_path(os.homedir?os.homedir():env.USERPROFILE||paths.join(env.HOMEDRIVE,env.HOMEPATH)||env.HOME),object.temp=()=>normalize_path(os.tmpdir?os.tmpdir():env.TEMP||env.TMP||paths.join(env.LOCALAPPDATA||env.SystemRoot||env.windir,"Temp")),object},_OSPaths=class __OSPaths{constructor(){let OSPaths=function(){return new __OSPaths};this._fn=OSPaths;let extension=isWinOS?windows():base();return Object.keys(extension).forEach(key=>{this._fn[key]=extension[key]}),this._fn}};module.exports=new _OSPaths}});var require_lib3=__commonJS({"../../node_modules/.pnpm/xdg-portable@7.3.0/node_modules/xdg-portable/src/lib/index.js"(exports,module){"use strict";var path=__require("path"),osPaths=require_lib2(),linux=()=>{let object={};return object.cache=()=>process.env.XDG_CACHE_HOME||path.join(osPaths.home()||osPaths.temp(),".cache"),object.config=()=>process.env.XDG_CONFIG_HOME||path.join(osPaths.home()||osPaths.temp(),".config"),object.data=()=>process.env.XDG_DATA_HOME||path.join(osPaths.home()||osPaths.temp(),".local","share"),object.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,object.state=()=>process.env.XDG_STATE_HOME||path.join(osPaths.home()||osPaths.temp(),".local","state"),object},macos=()=>{let object={};return object.cache=()=>process.env.XDG_CACHE_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"Caches"),object.config=()=>process.env.XDG_CONFIG_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"Preferences"),object.data=()=>process.env.XDG_DATA_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"Application Support"),object.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,object.state=()=>process.env.XDG_STATE_HOME||path.join(path.join(osPaths.home()||osPaths.temp(),"Library"),"State"),object},windows=()=>{let object={};return object.cache=()=>{let localAppData=process.env.LOCALAPPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Local");return process.env.XDG_CACHE_HOME||path.join(localAppData,"xdg.cache")},object.config=()=>{let appData=process.env.APPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Roaming");return process.env.XDG_CONFIG_HOME||path.join(appData,"xdg.config")},object.data=()=>{let appData=process.env.APPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Roaming");return process.env.XDG_DATA_HOME||path.join(appData,"xdg.data")},object.runtime=()=>process.env.XDG_RUNTIME_DIR||void 0,object.state=()=>{let localAppData=process.env.LOCALAPPDATA||path.join(osPaths.home()||osPaths.temp(),"AppData","Local");return process.env.XDG_STATE_HOME||path.join(localAppData,"xdg.state")},object},_XDGPortable=()=>{let XDGPortable=function(){return _XDGPortable()},extension={};return/^darwin$/i.test(process.platform)?extension=macos():/^win/i.test(process.platform)?extension=windows():extension=linux(),extension.configDirs=()=>{let dirs=[];return dirs.push(extension.config()),process.env.XDG_CONFIG_DIRS&&dirs.push(...process.env.XDG_CONFIG_DIRS.split(path.delimiter)),dirs},extension.dataDirs=()=>{let dirs=[];return dirs.push(extension.data()),process.env.XDG_DATA_DIRS&&dirs.push(...process.env.XDG_DATA_DIRS.split(path.delimiter)),dirs},Object.keys(extension).forEach(key=>{XDGPortable[key]=extension[key]}),XDGPortable};module.exports=_XDGPortable()}});var require_xdg_app_paths=__commonJS({"../../node_modules/.pnpm/xdg-app-paths@5.1.0/node_modules/xdg-app-paths/index.js"(exports,module){"use strict";var path=__require("path"),os=__require("os"),xdg=require_lib3(),isWinOS=/^win/i.test(process.platform);function _normalizeOptions(options,isolated){if(options=options||{},typeof options!="object"&&(options={isolated:options}),options.isolated=options.isolated===void 0||options.isolated===null?isolated:options.isolated,typeof options.isolated!="boolean")throw new TypeError(`Expected boolean for "isolated" argument, got ${typeof options.isolated}`);return options}var base=(name,isolated)=>{let object={};return object.cache=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.cache(),options.isolated?name:"")),object.config=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.config(),options.isolated?name:"")),object.data=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.data(),options.isolated?name:"")),object.runtime=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.runtime()?path.join(xdg.runtime(),options.isolated?name:""):void 0),object.state=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),path.join(xdg.state(),options.isolated?name:"")),object.configDirs=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.configDirs().map(s=>path.join(s,options.isolated?name:""))),object.dataDirs=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.dataDirs().map(s=>path.join(s,options.isolated?name:""))),object},windows=(name,isolated)=>{let{env}=process,homedir=os.homedir(),tmpdir2=os.tmpdir(),appData=env.APPDATA||path.join(homedir||tmpdir2,"AppData","Roaming"),localAppData=env.LOCALAPPDATA||path.join(homedir||tmpdir2,"AppData","Local"),object={};return object.cache=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_CACHE_HOME?path.join(xdg.cache(),options.isolated?name:""):path.join(localAppData,options.isolated?name:"","Cache")),object.config=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_CONFIG_HOME?path.join(xdg.config(),options.isolated?name:""):path.join(appData,options.isolated?name:"","Config")),object.data=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_DATA_HOME?path.join(xdg.data(),options.isolated?name:""):path.join(appData,options.isolated?name:"","Data")),object.runtime=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),xdg.runtime()?path.join(xdg.runtime(),options.isolated?name:""):void 0),object.state=(options={isolated:null})=>(options=_normalizeOptions(options,isolated),!options.isolated||env.XDG_STATE_HOME?path.join(xdg.state(),options.isolated?name:""):path.join(localAppData,options.isolated?name:"","State")),object.configDirs=(options={isolated:null})=>{options=_normalizeOptions(options,isolated);let dirs=[object.config(options)];return env.XDG_CONFIG_DIRS&&dirs.push(...env.XDG_CONFIG_DIRS.split(path.delimiter).map(s=>path.join(s,options.isolated?name:""))),dirs},object.dataDirs=(options={isolated:null})=>{options=_normalizeOptions(options,isolated);let dirs=[object.data(options)];return env.XDG_DATA_DIRS&&dirs.push(...env.XDG_DATA_DIRS.split(path.delimiter).map(s=>path.join(s,options.isolated?name:""))),dirs},object},_XDGAppPaths=class __XDGAppPaths{constructor(options={name:null,suffix:null,isolated:!0}){let XDGAppPaths2=function(options2={name:null,suffix:null,isolated:!0}){return new __XDGAppPaths(options2)};this._fn=XDGAppPaths2,options=options||{},typeof options!="object"&&(options={name:options});let name=options.name||"";if(typeof name!="string")throw new TypeError(`Expected string for "name" argument, got ${typeof name}`);let suffix=options.suffix||"";if(typeof suffix!="string")throw new TypeError(`Expected string for "suffix" argument, got ${typeof suffix}`);let isolated=options.isolated===void 0||options.isolated===null?!0:options.isolated;if(typeof isolated!="boolean")throw new TypeError(`Expected boolean for "isolated" argument, got ${typeof isolated}`);name||(name=path.parse(process.pkg?process.execPath:__require.main?__require.main.filename:process.argv[0]).name),suffix&&(name+=suffix),this._fn.$name=()=>name,this._fn.$isolated=()=>isolated;let extension=isWinOS?windows(name,isolated):base(name,isolated);return Object.keys(extension).forEach(key=>{this._fn[key]=extension[key]}),this._fn}};module.exports=new _XDGAppPaths}});function getWhoamiCachedAnswer(args,authConfig){return args.includes("--cached")?getCachedUsername(authConfig):void 0}var import_semver=__toESM(require_semver(),1);import{spawn,execFile}from"child_process";function renderUpgradeProgress(current,total,phase){let bar=progress(current,total);output_manager_default.spinner(bar?`Upgrading Vercel CLI [${bar}] (${current}/${total})${phase?` ${phase}`:""}`:phase||"Upgrading Vercel CLI\u2026",0)}function execFileStdout(command,args,cwd,env=trustedUpgradeEnvironment){return new Promise((resolve3,reject)=>{execFile(command,args,{encoding:"utf8",windowsHide:!0,cwd,timeout:15e3,env:{...env}},(error,stdout)=>{if(error){reject(error);return}resolve3(stdout.toString())})})}function parseVersionOutput(stdout){for(let line of[stdout.trim(),...stdout.trim().split(`
|
|
8
8
|
`).reverse()])try{let value=JSON.parse(line),parsed=Array.isArray(value)&&value.length===1?value[0]:value,version=typeof parsed=="string"?parsed:typeof parsed?.data=="string"?parsed.data:void 0;if(version&&import_semver.default.valid(version))return version}catch{let version=line.trim();if(import_semver.default.valid(version))return version}}async function getLatestPackageVersion(packageManager,installArgs,cwd,global,env,bypassMinReleaseAge=!0){let packageSpecifier=installArgs.find(arg=>arg.endsWith("@latest"));if(!packageSpecifier)return;let manager=getUpgradePackageManager(packageManager),queryArgs=[...manager.metadataArgs(packageSpecifier),...bypassMinReleaseAge?manager.releaseAgeBypassArgs:[]];try{let stdout=await execFileStdout(packageManager,queryArgs,cwd,env);return parseVersionOutput(stdout)}catch(error){output_manager_default.debug(`Failed to resolve the latest Vercel CLI version: ${error instanceof Error?error.message:String(error)}`);return}}async function getInstalledPackageVersion(packageManager,installArgs,cwd,global){let packageSpecifier=installArgs.find(arg=>arg.endsWith("@latest"));if(!packageSpecifier)return;let packageName=packageSpecifier.slice(0,-7);try{let stdout=await execFileStdout(packageManager,["list",packageName,"--depth=0","--json",...global?["--global"]:[]],cwd),parsed=JSON.parse(stdout),projects=Array.isArray(parsed)?parsed:[parsed];for(let project of projects){let version=project?.dependencies?.[packageName]?.version??project?.devDependencies?.[packageName]?.version??project?.optionalDependencies?.[packageName]?.version;if(typeof version=="string"&&import_semver.default.valid(version))return version}}catch(error){output_manager_default.debug(`Failed to read the installed Vercel CLI version: ${error instanceof Error?error.message:String(error)}`)}}function isVersionCurrent(current,latest){return import_semver.default.valid(current)&&import_semver.default.valid(latest)?import_semver.default.gte(current,latest):current===latest}function pinPackageVersion(args,version){return args.map(arg=>arg.endsWith("@latest")?`${arg.slice(0,-6)}${version}`:arg)}async function getMinReleaseAgeContext(packageManager,cwd,global){let setting=packageManager==="pnpm"?"minimumReleaseAge":"min-release-age";try{let raw=(await execFileStdout(packageManager,["config","get",setting,"--json",...global?["--global"]:[]],cwd)).trim(),value=raw===""||raw==="undefined"?void 0:JSON.parse(raw);if(!(value==null||value===""||value==="undefined")){let age=typeof value=="number"||typeof value=="string"&&value.trim()!==""?Number(value):NaN;if(!Number.isFinite(age)||age<0)return`Could not determine ${packageManager}'s configured minimum release age.`;let minutes=packageManager==="pnpm"?age:age*1440,duration=minutes>0&&minutes%60===0?`${minutes/60} ${minutes===60?"hour":"hours"}`:`${minutes} ${minutes===1?"minute":"minutes"}`;return`${packageManager} ${setting} is configured to ${duration}.`}if(packageManager==="pnpm"){let version=parseVersionOutput(await execFileStdout(packageManager,["--version"],cwd));if(version&&!import_semver.default.prerelease(version)&&import_semver.default.gte(version,"11.0.0"))return`pnpm ${version} defaults to a minimum release age of 24 hours (1440 minutes); no explicit minimumReleaseAge setting was reported.`}return`${packageManager} did not report a configured minimum release age.`}catch{return`Could not determine ${packageManager}'s configured minimum release age.`}}function isMinReleaseAgeError(packageManager,stdout,stderr){let installerOutput=`${stdout}
|
|
9
9
|
${stderr}`;return packageManager==="pnpm"?installerOutput.includes("ERR_PNPM_NO_MATURE_MATCHING_VERSION")||installerOutput.includes("ERR_PNPM_NO_MATCHING_VERSION")&&installerOutput.includes("satisfies the specs but was released at"):packageManager==="npm"?/\bETARGET\b/.test(installerOutput)&&installerOutput.includes("with a date before")||/min-release-age cannot be provided/i.test(installerOutput):!1}function setMinReleaseAgeBypass(client,enabled){client.config={...client.config,updates:{...client.config.updates,bypassMinReleaseAge:enabled}},client.writeToConfigFile()}async function executeHomebrewUpgrade(env=trustedUpgradeEnvironment){let[brew,...args]=HOMEBREW_UPGRADE_COMMAND.split(" ");output_manager_default.debug(`Executing: ${HOMEBREW_UPGRADE_COMMAND}`);let result=await new Promise(resolve3=>{let settled=!1,brewProcess=spawn(brew,args,{cwd:trustedUpgradeDirectory,env:{...env},stdio:"inherit",shell:!1});brewProcess.on("error",spawnError=>{settled||(settled=!0,resolve3({code:1,spawnError}))}),brewProcess.on("close",code=>{settled||(settled=!0,resolve3({code:code??1}))})});return result.spawnError?(output_manager_default.error(`Failed to run Homebrew: ${result.spawnError.message}`),output_manager_default.log(`You can try running the command manually: ${HOMEBREW_UPGRADE_COMMAND}`),1):(result.code!==0&&(output_manager_default.error(`Homebrew upgrade failed with exit code ${result.code}`),output_manager_default.log(`You can try running the command manually: ${HOMEBREW_UPGRADE_COMMAND}`)),result.code)}function executeAutomaticUpgrade(client,env=trustedUpgradeEnvironment){return executeUpgrade("latest",client,!1,!0,env,"package-manager")}async function executeUpgrade(targetVersion,client,bypassMinReleaseAge=!1,explicitTarget=!1,env=trustedUpgradeEnvironment,releaseAgePolicy="newest"){let totalSteps=targetVersion?2:3;renderUpgradeProgress(0,totalSteps,"Resolving installer\u2026");let{command:updateCommand,global,packageManager}=await getUpdateCommandInfo(env).catch(error=>{throw output_manager_default.stopSpinner(),error}),[command,...args]=updateCommand.split(" "),cwd=global?trustedUpgradeDirectory:process.cwd(),bypassArgs=getUpgradePackageManager(packageManager).releaseAgeBypassArgs;if(bypassMinReleaseAge&&bypassArgs.length===0)return output_manager_default.stopSpinner(),output_manager_default.error(`Minimum release-age bypass is not supported for ${packageManager}. Run the upgrade without --bypass-min-release-age, or configure release-age settings in ${packageManager} directly.`),1;bypassMinReleaseAge&&client&&client.config.updates?.bypassMinReleaseAge!==!0&&setMinReleaseAgeBypass(client,!0);let versionBefore=pkg_default.version,installLatestTag=explicitTarget&&targetVersion==="latest",resolvedTargetVersion=installLatestTag?void 0:targetVersion;if(targetVersion||(renderUpgradeProgress(1,totalSteps,"Checking for updates\u2026"),resolvedTargetVersion=await getLatestPackageVersion(packageManager,args,cwd,global,env,releaseAgePolicy==="newest")),!resolvedTargetVersion&&!installLatestTag)return output_manager_default.stopSpinner(),output_manager_default.error("Failed to resolve the latest Vercel CLI version."),1;if(!explicitTarget&&resolvedTargetVersion&&isVersionCurrent(versionBefore,resolvedTargetVersion))return renderUpgradeProgress(totalSteps,totalSteps),output_manager_default.stopSpinner(),output_manager_default.log(`No upgrade available. Vercel CLI is already up to date (v${versionBefore}).`),0;let installArgs=resolvedTargetVersion?pinPackageVersion(args,resolvedTargetVersion):args,shouldBypass=releaseAgePolicy==="newest"&&bypassArgs.length>0&&(bypassMinReleaseAge||client?.config.updates?.bypassMinReleaseAge===!0);shouldBypass&&(installArgs=[...installArgs,...bypassArgs]);let runInstall=currentArgs=>{let installCommand=[command,...currentArgs].join(" ");return output_manager_default.debug(`Executing: ${installCommand} (cwd: ${cwd})`),new Promise(resolve3=>{let stdout=[],stderr=[],upgradeProcess=spawn(command,currentArgs,{cwd,env:{...env},stdio:["inherit","pipe","pipe"],shell:!1});upgradeProcess.stdout?.on("data",data=>{stdout.push(Uint8Array.from(data)),output_manager_default.debug(`[upgrade stdout] ${data.toString().trimEnd()}`)}),upgradeProcess.stderr?.on("data",data=>{stderr.push(Uint8Array.from(data)),output_manager_default.debug(`[upgrade stderr] ${data.toString().trimEnd()}`)});let settled=!1;upgradeProcess.on("error",spawnError=>{settled||(settled=!0,resolve3({code:1,stdout:"",stderr:"",spawnError}))}),upgradeProcess.on("close",code=>{settled||(settled=!0,resolve3({code:code??1,stdout:Buffer.concat(stdout).toString(),stderr:Buffer.concat(stderr).toString()}))})})};renderUpgradeProgress(targetVersion?1:2,totalSteps,"Installing\u2026");let result=await runInstall(installArgs),usedAllowedRelease=!1;if(result.code!==0&&!result.spawnError&&releaseAgePolicy==="newest"&&!shouldBypass&&bypassArgs.length>0&&isMinReleaseAgeError(packageManager,result.stdout,result.stderr)){let context=await getMinReleaseAgeContext(packageManager,cwd,global);output_manager_default.stopSpinner();let blockedMessage=`The package manager blocked this Vercel CLI release because of its minimum release-age setting. ${context}`;if(!client||client.nonInteractive||!client.stdin.isTTY)return output_manager_default.error(`${blockedMessage}
|
|
10
10
|
To install the newest release allowed by your settings:
|
|
@@ -4,4 +4,4 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{require_isexe}from"./chunk-OPORM35X.js";import{__commonJS,__require}from"./chunk-BZENIQ7N.js";var require_lib=__commonJS({"../../node_modules/.pnpm/which@3.0.0/node_modules/which/lib/index.js"(exports,module){var isexe=require_isexe(),{join,delimiter,sep,posix}=__require("path"),isWindows=process.platform==="win32",rSlash=new RegExp(`[${posix.sep}${sep===posix.sep?"":sep}]`.replace(/(\\)/g,"\\$1")),rRel=new RegExp(`^\\.${rSlash.source}`),getNotFoundError=cmd=>Object.assign(new Error(`not found: ${cmd}`),{code:"ENOENT"}),getPathInfo=(cmd,{path:optPath=process.env.PATH,pathExt:optPathExt=process.env.PATHEXT,delimiter:optDelimiter=delimiter})=>{let pathEnv=cmd.match(rSlash)?[""]:[...isWindows?[process.cwd()]:[],...(optPath||"").split(optDelimiter)];if(isWindows){let pathExtExe=optPathExt||[".EXE",".CMD",".BAT",".COM"].join(optDelimiter),pathExt=pathExtExe.split(optDelimiter);return cmd.includes(".")&&pathExt[0]!==""&&pathExt.unshift(""),{pathEnv,pathExt,pathExtExe}}return{pathEnv,pathExt:[""]}},getPathPart=(raw,cmd)=>{let pathPart=/^".*"$/.test(raw)?raw.slice(1,-1):raw;return(!pathPart&&rRel.test(cmd)?cmd.slice(0,2):"")+join(pathPart,cmd)},which=async(cmd,opt={})=>{let{pathEnv,pathExt,pathExtExe}=getPathInfo(cmd,opt),found=[];for(let envPart of pathEnv){let p=getPathPart(envPart,cmd);for(let ext of pathExt){let withExt=p+ext;if(await isexe(withExt,{pathExt:pathExtExe,ignoreErrors:!0})){if(!opt.all)return withExt;found.push(withExt)}}}if(opt.all&&found.length)return found;if(opt.nothrow)return null;throw getNotFoundError(cmd)},whichSync=(cmd,opt={})=>{let{pathEnv,pathExt,pathExtExe}=getPathInfo(cmd,opt),found=[];for(let pathEnvPart of pathEnv){let p=getPathPart(pathEnvPart,cmd);for(let ext of pathExt){let withExt=p+ext;if(isexe.sync(withExt,{pathExt:pathExtExe,ignoreErrors:!0})){if(!opt.all)return withExt;found.push(withExt)}}}if(opt.all&&found.length)return found;if(opt.nothrow)return null;throw getNotFoundError(cmd)};module.exports=which;which.sync=whichSync}});
|
|
7
|
+
import{require_isexe}from"./chunk-OPORM35X.js";import{__commonJS,__require}from"./chunk-BZENIQ7N.js";var require_lib=__commonJS({"../../node_modules/.pnpm/which@3.0.0/node_modules/which/lib/index.js"(exports,module){var isexe=require_isexe(),{join,delimiter,sep,posix}=__require("path"),isWindows=process.platform==="win32",rSlash=new RegExp(`[${posix.sep}${sep===posix.sep?"":sep}]`.replace(/(\\)/g,"\\$1")),rRel=new RegExp(`^\\.${rSlash.source}`),getNotFoundError=cmd=>Object.assign(new Error(`not found: ${cmd}`),{code:"ENOENT"}),getPathInfo=(cmd,{path:optPath=process.env.PATH,pathExt:optPathExt=process.env.PATHEXT,delimiter:optDelimiter=delimiter})=>{let pathEnv=cmd.match(rSlash)?[""]:[...isWindows?[process.cwd()]:[],...(optPath||"").split(optDelimiter)];if(isWindows){let pathExtExe=optPathExt||[".EXE",".CMD",".BAT",".COM"].join(optDelimiter),pathExt=pathExtExe.split(optDelimiter);return cmd.includes(".")&&pathExt[0]!==""&&pathExt.unshift(""),{pathEnv,pathExt,pathExtExe}}return{pathEnv,pathExt:[""]}},getPathPart=(raw,cmd)=>{let pathPart=/^".*"$/.test(raw)?raw.slice(1,-1):raw;return(!pathPart&&rRel.test(cmd)?cmd.slice(0,2):"")+join(pathPart,cmd)},which=async(cmd,opt={})=>{let{pathEnv,pathExt,pathExtExe}=getPathInfo(cmd,opt),found=[];for(let envPart of pathEnv){let p=getPathPart(envPart,cmd);for(let ext of pathExt){let withExt=p+ext;if(await isexe(withExt,{pathExt:pathExtExe,ignoreErrors:!0})){if(!opt.all)return withExt;found.push(withExt)}}}if(opt.all&&found.length)return found;if(opt.nothrow)return null;throw getNotFoundError(cmd)},whichSync=(cmd,opt={})=>{let{pathEnv,pathExt,pathExtExe}=getPathInfo(cmd,opt),found=[];for(let pathEnvPart of pathEnv){let p=getPathPart(pathEnvPart,cmd);for(let ext of pathExt){let withExt=p+ext;if(isexe.sync(withExt,{pathExt:pathExtExe,ignoreErrors:!0})){if(!opt.all)return withExt;found.push(withExt)}}}if(opt.all&&found.length)return found;if(opt.nothrow)return null;throw getNotFoundError(cmd)};module.exports=which;which.sync=whichSync}});export{require_lib};
|
|
@@ -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{packageName}from"./chunk-JESNVRVR.js";import{environmentOption,formatOption,jsonOption,projectOption}from"./chunk-A2UZ2O7H.js";var RULE_ENVIRONMENTS=["any","preview","production"],ruleEnvironmentOption={...environmentOption,description:"Environment the rule applies to (required): production, preview, or any"},lsSubcommand={name:"ls",aliases:["list"],description:"List the Vercel tracing sampling rules for a project",arguments:[],options:[formatOption,jsonOption,projectOption],examples:[{name:"List the sampling rules for the linked project",value:`${packageName} traces config ls`},{name:"List the sampling rules as JSON",value:`${packageName} traces config ls --json`}]},setSubcommand={name:"set",aliases:[],description:"Enable Vercel tracing and add or replace one sampling rule. The rate is a whole percentage from 1 to 100.",arguments:[{name:"rate",required:!0},{name:"requestPath",required:!1}],options:[ruleEnvironmentOption,formatOption,jsonOption,projectOption],examples:[{name:"Trace a quarter of production traffic",value:`${packageName} traces config set 25 --environment production`},{name:"Trace every preview request to one path prefix",value:`${packageName} traces config set 100 /api --environment preview`},{name:"Trace one percent of traffic in every environment",value:`${packageName} traces config set 1 --environment any`}]},rmSubcommand={descriptionTone:"normal",name:"remove",aliases:["rm","delete"],description:"Remove Vercel tracing sampling rules. Without a path prefix, every rule for the environment is removed. Removing the final rule disables tracing.",arguments:[{name:"requestPath",required:!1}],options:[ruleEnvironmentOption,{name:"default",shorthand:null,type:Boolean,deprecated:!1,description:"Remove only the rule that has no path prefix, keeping the per-path rules"},formatOption,jsonOption,projectOption],examples:[{name:"Remove one rule by environment and path prefix",value:`${packageName} traces config remove /api --environment production`},{name:"Remove every rule for production",value:`${packageName} traces config remove --environment production`},{name:"Remove only the production rule that covers all paths",value:`${packageName} traces config remove --environment production --default`}]},tracesConfigCommand={name:"config",aliases:[],description:"Manage Vercel tracing sampling rules for a project.",arguments:[],subcommands:[lsSubcommand,setSubcommand,rmSubcommand],options:[],examples:[{name:"List the sampling rules for the linked project",value:`${packageName} traces config ls`},{name:"Trace a quarter of production traffic",value:`${packageName} traces config set 25 --environment production`},{name:"Remove every rule for production",value:`${packageName} traces config remove --environment production`}]};export{RULE_ENVIRONMENTS,lsSubcommand,setSubcommand,rmSubcommand,tracesConfigCommand};
|
|
@@ -4,6 +4,6 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{output_manager_default}from"./chunk-
|
|
7
|
+
import{output_manager_default}from"./chunk-DWOJP4ST.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);function suggestNextCommands(commands){output_manager_default.print(import_chalk.default.dim(["Next steps:",...commands.flatMap(({command,description})=>[`- ${description}:`,` ${command}`])].join(`
|
|
8
8
|
`))),output_manager_default.print(`
|
|
9
9
|
`)}export{suggestNextCommands};
|
|
@@ -4,7 +4,7 @@ import { dirname as __dirname_ } from 'node:path';
|
|
|
4
4
|
const require = __createRequire(import.meta.url);
|
|
5
5
|
const __filename = __fileURLToPath(import.meta.url);
|
|
6
6
|
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{require_dist as require_dist2,validateConfig}from"./chunk-
|
|
7
|
+
import{require_dist as require_dist2,validateConfig}from"./chunk-ZQUVDDPB.js";import{require_dist2 as require_dist}from"./chunk-HVDGNAPM.js";import{compileVercelConfig,findSourceVercelConfigFile}from"./chunk-I2WEQWCA.js";import{applyEdits,findNodeAtLocation,init_main,modify,parse,parseTree}from"./chunk-J24BABG4.js";import{init_dist,stringify}from"./chunk-U4Z2MMOF.js";import{printAlignedLabel}from"./chunk-26QK3I2S.js";import{code}from"./chunk-YCJHUYBJ.js";import{link_default,output_manager_default,require_build_utils}from"./chunk-DWOJP4ST.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);init_main();init_dist();var import_build_utils=__toESM(require_build_utils(),1),import_fs_detectors=__toESM(require_dist(),1),import_service_topology=__toESM(require_dist2(),1);import{readFile,writeFile}from"fs/promises";import{basename}from"path";var EXPERIMENTAL_SERVICES_DOCS_URL="https://vercel.com/docs/services/experimental";async function prepareExperimentalServicesMigration(cwd,detectServicesResult){let compileResult=await compileVercelConfig(cwd);if(!compileResult.configPath)return null;let rawConfig=await readFile(compileResult.configPath,"utf8"),config=parse(rawConfig);if(!config||!(0,import_service_topology.hasLegacyServicesConfig)(config))return null;let resolvedServices=detectServicesResult?.resolved?.source==="configured"?detectServicesResult.services.filter(s=>(0,import_build_utils.isExperimentalService)(s)):void 0,plan=await(0,import_service_topology.migrateExperimentalServices)({fs:new import_fs_detectors.LocalFileSystemDetector(cwd),config,resolvedServices:resolvedServices&&resolvedServices.length>0?resolvedServices:void 0}),sourceFile=compileResult.sourceFile??basename(compileResult.configPath),preparation={plan,sourceFile,snippet:renderSnippet(sourceFile,plan)};if(plan.errors.length>0)return preparation;if(compileResult.wasCompiled)return preparation.writeBlocker=`${sourceFile} can't be updated automatically.`,preparation;let content=applyPlanToJson(rawConfig,config,plan),parseErrors=[],nextConfig=parse(content,parseErrors);if(parseErrors.length>0)return preparation.writeBlocker=`Couldn't produce a valid ${sourceFile}.`,preparation;let validationError=validateConfig(nextConfig);return validationError?(preparation.writeBlocker=validationError.message,preparation):(preparation.write={configPath:compileResult.configPath,content},preparation)}function applyPlanToJson(rawConfig,config,plan){let eol=rawConfig.includes(`\r
|
|
8
8
|
`)?`\r
|
|
9
9
|
`:`
|
|
10
10
|
`,indent2=/^([ \t]+)\S/m.exec(rawConfig)?.[1]??" ",formattingOptions={eol,insertSpaces:!indent2.startsWith(" "),tabSize:indent2.startsWith(" ")?1:indent2.length},legacyKey=config.experimentalServices?"experimentalServices":"experimentalServicesV2",key=findNodeAtLocation(parseTree(rawConfig),[legacyKey]).parent.children[0],text=applyEdits(rawConfig,[{offset:key.offset,length:key.length,content:'"services"'}]);text=applyEdits(text,modify(text,["services"],plan.patch.services,{formattingOptions}));for(let key2 of plan.removeKeys)key2!==legacyKey&&(text=applyEdits(text,modify(text,[key2],void 0,{formattingOptions})));for(let[key2,value]of Object.entries(plan.patch.build?.env??{}))text=applyEdits(text,modify(text,["build","env",key2],value,{formattingOptions}));if(plan.patch.rewrites.length>0)if(Array.isArray(config.rewrites))for(let rewrite of plan.patch.rewrites)text=applyEdits(text,modify(text,["rewrites",-1],rewrite,{formattingOptions}));else text=applyEdits(text,modify(text,["rewrites"],plan.patch.rewrites,{formattingOptions,getInsertionIndex:keys=>keys.indexOf("services")+1}));return text.endsWith(`
|
|
@@ -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{Readable}from"node:stream";var fetchDispatcher;function setFetchDispatcher(dispatcher){fetchDispatcher=dispatcher}function getFetchDispatcher(){return fetchDispatcher}function fetch(input,init){let options={...init};return fetchDispatcher&&(options.dispatcher=fetchDispatcher),init?.body instanceof Readable&&(options.duplex="half"),globalThis.fetch(input,options)}function directFetch(input,init){let options={...init};return delete options.dispatcher,init?.body instanceof Readable&&(options.duplex="half"),globalThis.fetch(input,options)}function toNodeReadable(body){if(!body)throw new TypeError("Expected response body");return Readable.fromWeb(body)}export{setFetchDispatcher,getFetchDispatcher,fetch,directFetch,toNodeReadable};
|