@vercel/cli-support 65.8.0 → 65.9.0-snapshot-c4002eb2617b
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/chunks/add-EHNDQSPH.js +8 -0
- package/dist/chunks/add-QINN2GTA.js +8 -0
- package/dist/chunks/add-SEQOVWYP.js +8 -0
- package/dist/chunks/build-ATYGR3HB.js +7 -0
- package/dist/chunks/{chunk-O7IYJGOR.js → chunk-25B5SV4V.js} +1 -1
- package/dist/chunks/chunk-2CSCY66I.js +11 -0
- package/dist/chunks/{chunk-FQVSBXRY.js → chunk-2H4DUZJZ.js} +1 -1
- package/dist/chunks/{chunk-44XDCARR.js → chunk-2RXUQ72I.js} +1 -1
- package/dist/chunks/{chunk-EZL4AJXH.js → chunk-32AS5X7G.js} +1 -1
- package/dist/chunks/chunk-32NXYHYC.js +10 -0
- package/dist/chunks/{chunk-OTJNOMRV.js → chunk-375JVQYK.js} +1 -1
- package/dist/chunks/chunk-3H7HEK63.js +10 -0
- package/dist/chunks/{chunk-CJLRNGWY.js → chunk-3QECUY4S.js} +1 -1
- package/dist/chunks/{chunk-GKUHMS3A.js → chunk-3Y3FZLFN.js} +1 -1
- package/dist/chunks/{chunk-BLFPDEXE.js → chunk-46XT5J5W.js} +1 -1
- package/dist/chunks/{chunk-IECNFRTK.js → chunk-4BZ3DNGM.js} +1 -1
- package/dist/chunks/chunk-4CQKN5TW.js +10 -0
- package/dist/chunks/{chunk-FNOCIKAU.js → chunk-4HIRAB5V.js} +1 -1
- package/dist/chunks/{chunk-4UIMSZZB.js → chunk-4KM733OB.js} +1 -1
- package/dist/chunks/chunk-4ND2DRU5.js +15 -0
- package/dist/chunks/{chunk-6KCYUYUM.js → chunk-4VF5BZJP.js} +1 -1
- package/dist/chunks/{chunk-XUJA3RZD.js → chunk-4XFUHNFR.js} +1 -1
- package/dist/chunks/chunk-4Z3APEBF.js +7 -0
- package/dist/chunks/chunk-5CVEW3HD.js +12 -0
- package/dist/chunks/{chunk-LFOWP74R.js → chunk-5DXC4TE2.js} +1 -1
- package/dist/chunks/{chunk-KARAZGCO.js → chunk-5KKRDN5F.js} +1 -1
- package/dist/chunks/{constants-JAB7MRSK.js → chunk-5MDNVAE6.js} +1 -1
- package/dist/chunks/{chunk-HA2ICIB5.js → chunk-5TI3ZXW3.js} +1 -1
- package/dist/chunks/{chunk-PY5A73YH.js → chunk-5WFOL3XX.js} +1 -1
- package/dist/chunks/{chunk-IHNEF3BG.js → chunk-5XPWRDZN.js} +1 -1
- package/dist/chunks/chunk-5ZEROVK5.js +7 -0
- package/dist/chunks/{chunk-3LQ2ADXO.js → chunk-64UCX5JM.js} +1 -1
- package/dist/chunks/{chunk-A67TLHES.js → chunk-7FAO6DXJ.js} +1 -1
- package/dist/chunks/{chunk-AQA4JVKA.js → chunk-7JNBF5SB.js} +1 -1
- package/dist/chunks/{chunk-A6F3EE2O.js → chunk-7ULVGK67.js} +1 -1
- package/dist/chunks/{chunk-MCP63EVQ.js → chunk-7WY7ASKE.js} +1 -1
- package/dist/chunks/{chunk-LD42X7ZH.js → chunk-AX3V7N44.js} +1 -1
- package/dist/chunks/{chunk-753RQ6WV.js → chunk-BEAH4TA2.js} +1 -1
- package/dist/chunks/chunk-BRETAWE7.js +10 -0
- package/dist/chunks/{chunk-T2SRGJPU.js → chunk-BT5C6MCY.js} +1 -1
- package/dist/chunks/{chunk-H4DE2OFO.js → chunk-BV2JBHT5.js} +1 -1
- package/dist/chunks/{chunk-D3GYYGSS.js → chunk-BWS3ZOHJ.js} +1 -1
- package/dist/chunks/{chunk-QZEZCUUZ.js → chunk-CBA2KGXG.js} +13 -13
- package/dist/chunks/chunk-CBVVVYUP.js +10 -0
- package/dist/chunks/{chunk-KIMIK4SG.js → chunk-CGTD4QFC.js} +1 -1
- package/dist/chunks/{chunk-QR7PY5JS.js → chunk-CH5325V5.js} +1 -1
- package/dist/chunks/{chunk-5MHRCRIN.js → chunk-CMHL66LK.js} +1 -1
- package/dist/chunks/{chunk-WRC5CTUD.js → chunk-D4TD2KWH.js} +1 -1
- package/dist/chunks/{chunk-XBOGVOV5.js → chunk-D4ZEJM3T.js} +1 -1
- package/dist/chunks/{chunk-5O7CRJE5.js → chunk-D6REP5QQ.js} +1 -1
- package/dist/chunks/chunk-DASHFOKO.js +8 -0
- package/dist/chunks/{chunk-63DO6KMD.js → chunk-DL5B5I2H.js} +3 -3
- package/dist/chunks/{chunk-M4TIOVOP.js → chunk-DUPAU76G.js} +1 -1
- package/dist/chunks/{chunk-APNR444T.js → chunk-E7DYXF6G.js} +1 -1
- package/dist/chunks/{chunk-GP5MFCGO.js → chunk-ECQKK4JU.js} +1 -1
- package/dist/chunks/{chunk-JULKMXVP.js → chunk-EEFLZK52.js} +1 -1
- package/dist/chunks/{chunk-GP2FXUFE.js → chunk-EJ2RWXUL.js} +1 -1
- package/dist/chunks/{chunk-U3J7VS56.js → chunk-FBYA6LLM.js} +1 -1
- package/dist/chunks/{chunk-SOCGBVML.js → chunk-FVVOHGQE.js} +1 -1
- package/dist/chunks/{chunk-QLW5DCM4.js → chunk-FWTBSC7Z.js} +1 -1
- package/dist/chunks/{chunk-2OET5FWH.js → chunk-G2BNLRPU.js} +1 -1
- package/dist/chunks/{chunk-DBV6AB6T.js → chunk-G3LWP5CH.js} +1 -1
- package/dist/chunks/{chunk-YIOT5B5Z.js → chunk-G6HUSV7F.js} +1 -1
- package/dist/chunks/{chunk-7V2PXIVW.js → chunk-GCPPL24C.js} +1 -1
- package/dist/chunks/{chunk-3AXMZRAB.js → chunk-GCXUSXB4.js} +1 -1
- package/dist/chunks/{chunk-GZWYJT4C.js → chunk-GHEGWXH2.js} +1 -1
- package/dist/chunks/{chunk-YKNHA3RN.js → chunk-GIFIOAOW.js} +1 -1
- package/dist/chunks/{chunk-JRBPVMQO.js → chunk-GJCVOEC2.js} +1 -1
- package/dist/chunks/{chunk-ELQBQ2O5.js → chunk-GN5IAG3M.js} +1 -1
- package/dist/chunks/{chunk-HTFQFHPR.js → chunk-H34SGIVS.js} +1 -1
- package/dist/chunks/chunk-IDP63TCP.js +10 -0
- package/dist/chunks/{pkg-EDJQLCNP.js → chunk-ITQPDXXA.js} +1 -1
- package/dist/chunks/{chunk-XK3W6Q5I.js → chunk-IZ4GFKGR.js} +1 -1
- package/dist/chunks/{chunk-62FZFXPJ.js → chunk-JB6T3XEF.js} +1 -1
- package/dist/chunks/{chunk-TSKFDJ77.js → chunk-JJ2JHAGW.js} +1 -1
- package/dist/chunks/{chunk-V5A4EBV3.js → chunk-JOXGYP5S.js} +1 -1
- package/dist/chunks/{chunk-3DDEBTCC.js → chunk-JYWHC7YX.js} +1 -1
- package/dist/chunks/{chunk-YTZPQVGF.js → chunk-K3VUXKMV.js} +1 -1
- package/dist/chunks/{chunk-2QSNFVB6.js → chunk-K5YO4UD7.js} +1 -1
- package/dist/chunks/{chunk-TCEEQLD4.js → chunk-KHG6CZLZ.js} +1 -1
- package/dist/chunks/{chunk-KL6HNOFN.js → chunk-KOLCO2RH.js} +1 -1
- package/dist/chunks/{chunk-WZ2R4Z7N.js → chunk-KRPY5FHJ.js} +1 -1
- package/dist/chunks/{chunk-7E6UJXLR.js → chunk-KV2DYFUG.js} +1 -1
- package/dist/chunks/{chunk-3KSTUMR6.js → chunk-M73W4XNR.js} +1 -1
- package/dist/chunks/{chunk-EKB2DYCQ.js → chunk-MCJ5OFNP.js} +1 -1
- package/dist/chunks/{chunk-LOEU4R4Z.js → chunk-MOW3KNCP.js} +1 -1
- package/dist/chunks/chunk-MY4MONOH.js +7 -0
- package/dist/chunks/{chunk-SBBD2Q5A.js → chunk-NAU6URTI.js} +1 -1
- package/dist/chunks/{chunk-B3ETPBO4.js → chunk-NEUQZYBL.js} +2 -2
- package/dist/chunks/chunk-NFASCUXE.js +8 -0
- package/dist/chunks/{chunk-3P4Y46MS.js → chunk-NIS66BFX.js} +2 -2
- package/dist/chunks/chunk-NTUDWWSL.js +14 -0
- package/dist/chunks/{chunk-AEOG4E5G.js → chunk-O4CQRV2G.js} +1 -1
- package/dist/chunks/{chunk-4MP4HVBG.js → chunk-O7NJQXN6.js} +1 -1
- package/dist/chunks/{chunk-5GOQ3FBV.js → chunk-OVWDOWRV.js} +1 -1
- package/dist/chunks/{chunk-7EJ3BZ67.js → chunk-PLJKMCXU.js} +1 -1
- package/dist/chunks/{chunk-P2HBUDGR.js → chunk-Q4WEODW3.js} +1 -1
- package/dist/chunks/{chunk-KUNFE2M6.js → chunk-QANIGEPP.js} +1 -1
- package/dist/chunks/{chunk-T3S63EA3.js → chunk-QBOY2CXL.js} +1 -1
- package/dist/chunks/{chunk-37DIJCWK.js → chunk-QQA2OMXJ.js} +1 -1
- package/dist/chunks/{chunk-HNOZM6D4.js → chunk-QYNJCJYZ.js} +1 -1
- package/dist/chunks/{chunk-K2R3QPOC.js → chunk-R5ZLTWKB.js} +1 -1
- package/dist/chunks/chunk-RBIHS5QI.js +7 -0
- package/dist/chunks/{chunk-QTCS2HDX.js → chunk-RCFJTXSB.js} +1 -1
- package/dist/chunks/{chunk-T34C75TI.js → chunk-RCUDI7OF.js} +1 -1
- package/dist/chunks/{chunk-KDRCBWRY.js → chunk-RTJOQK2R.js} +1 -1
- package/dist/chunks/{chunk-FXEMEIST.js → chunk-T2FCF46I.js} +1 -1
- package/dist/chunks/{chunk-IHRM7L23.js → chunk-T5TOBY4D.js} +1 -1
- package/dist/chunks/{chunk-YRK2BCTJ.js → chunk-TD7AL545.js} +1 -1
- package/dist/chunks/{chunk-MDWYXLDB.js → chunk-TGQSMRQZ.js} +3 -3
- package/dist/chunks/{chunk-6V67VZJD.js → chunk-TMXIVQ45.js} +1 -1
- package/dist/chunks/{chunk-J52UJYOK.js → chunk-TRZDIAX3.js} +1 -1
- package/dist/chunks/{chunk-7BML2OR6.js → chunk-U6KJOCXX.js} +1 -1
- package/dist/chunks/{chunk-Y55DGB3L.js → chunk-UIJYRI3G.js} +1 -1
- package/dist/chunks/{chunk-NAXFG37F.js → chunk-UNASHUWQ.js} +1 -1
- package/dist/chunks/{chunk-3RXEJWYM.js → chunk-UZTDRGCW.js} +1 -1
- package/dist/chunks/{chunk-BHJLCFQ4.js → chunk-VMMSNGPS.js} +1 -1
- package/dist/chunks/{chunk-F76MNMH3.js → chunk-VR5ROBAO.js} +1 -1
- package/dist/chunks/{chunk-JESNVRVR.js → chunk-VRH7LWOC.js} +1 -1
- package/dist/chunks/{chunk-QIPUFI6P.js → chunk-VU3RBRDH.js} +1 -1
- package/dist/chunks/{chunk-ZRJKGAUT.js → chunk-W634OFUG.js} +3 -3
- package/dist/chunks/{chunk-SKLRHAGH.js → chunk-WFCGAYP5.js} +1 -1
- package/dist/chunks/{chunk-C4XT3PG4.js → chunk-WKYFWE37.js} +1 -1
- package/dist/chunks/{chunk-G7X2TVUO.js → chunk-WQQTVQZK.js} +1 -1
- package/dist/chunks/{chunk-YHFZIUXF.js → chunk-XBWISZCG.js} +1 -1
- package/dist/chunks/{chunk-RIAOB3RF.js → chunk-XOBLL6JP.js} +1 -1
- package/dist/chunks/chunk-XRIM4BUF.js +7 -0
- package/dist/chunks/{chunk-ZBJ44DRL.js → chunk-Y3ZO6WB7.js} +1 -1
- package/dist/chunks/chunk-Y5YXAXK3.js +13 -0
- package/dist/chunks/{chunk-YEPB52XE.js → chunk-Y6WXTTZS.js} +1 -1
- package/dist/chunks/{chunk-OV7G6RIQ.js → chunk-Y7YULJK7.js} +1 -1
- package/dist/chunks/{chunk-UAUVCOGS.js → chunk-YJQW3DDY.js} +1 -1
- package/dist/chunks/chunk-YYMLVSE2.js +12 -0
- package/dist/chunks/{chunk-45UDRX4C.js → chunk-ZBZPCKTW.js} +1 -1
- package/dist/chunks/{chunk-2B7U6BB5.js → chunk-ZGKJLJ47.js} +1 -1
- package/dist/chunks/chunk-ZS2WS4AM.js +7 -0
- package/dist/chunks/clear-BJBNWJJB.js +8 -0
- package/dist/chunks/compile-vercel-config-QH77NQ4B.js +7 -0
- package/dist/chunks/config-354DFLQE.js +8 -0
- package/dist/chunks/config-AXK2BGCA.js +7 -0
- package/dist/chunks/connect-git-provider-AWEOEEOO.js +7 -0
- package/dist/chunks/delete-GO7DLOJ3.js +9 -0
- package/dist/chunks/delete-IYWVEDBG.js +10 -0
- package/dist/chunks/{detect-projects-A4H2ZEAP.js → detect-projects-K7SVMH5T.js} +1 -1
- package/dist/chunks/detect-services-5P7KCKFK.js +7 -0
- package/dist/chunks/disable-LGVOQE3T.js +7 -0
- package/dist/chunks/discard-27X77XQE.js +14 -0
- package/dist/chunks/edit-2XY4JHTX.js +8 -0
- package/dist/chunks/edit-IECKJW64.js +9 -0
- package/dist/chunks/enable-AFDKCU3L.js +7 -0
- package/dist/chunks/{exec-7LB36K52.js → exec-UV73J2ZB.js} +1 -1
- package/dist/chunks/{export-AI2O22W5.js → export-K7JNA5NA.js} +1 -1
- package/dist/chunks/future-FFWMSADT.js +7 -0
- package/dist/chunks/generate-cert-for-deploy-SY44OYEY.js +7 -0
- package/dist/chunks/image-D54UXO4P.js +7 -0
- package/dist/chunks/import-builders-4DYFWAOD.js +7 -0
- package/dist/chunks/{inspect-OM5S5YQ2.js → inspect-3DLXFK6E.js} +1 -1
- package/dist/chunks/{inspect-4A67JORH.js → inspect-A2LKZQMT.js} +1 -1
- package/dist/chunks/{inspect-3NMNI7GY.js → inspect-H2EHB6IO.js} +1 -1
- package/dist/chunks/inspect-HCBQIEZG.js +13 -0
- package/dist/chunks/inspect-XRCF2YRP.js +9 -0
- package/dist/chunks/{list-TUJ7HCQK.js → list-AB25WHGO.js} +1 -1
- package/dist/chunks/list-CU66L4ZB.js +12 -0
- package/dist/chunks/{list-NEV4FBTY.js → list-HUCI73LP.js} +1 -1
- package/dist/chunks/login-5GIPMHCM.js +9 -0
- package/dist/chunks/login-XD3H356W.js +7 -0
- package/dist/chunks/logs-MCYUVB2U.js +7 -0
- package/dist/chunks/ls-46HG3NM2.js +8 -0
- package/dist/chunks/{ls-COOTTCRW.js → ls-DZTI7O7V.js} +1 -1
- package/dist/chunks/ls-FVI4QA2G.js +11 -0
- package/dist/chunks/{ls-OVM2DZYL.js → ls-GFWMSKJI.js} +1 -1
- package/dist/chunks/{ls-UY3KCDSF.js → ls-GVHHJ6PD.js} +1 -1
- package/dist/chunks/{ls-CVO4MCX5.js → ls-IMQKQEA5.js} +1 -1
- package/dist/chunks/ls-SNGWJI57.js +8 -0
- package/dist/chunks/mutate-AATP3ZZW.js +9 -0
- package/dist/chunks/native-self-update-75UJCHGZ.js +7 -0
- package/dist/chunks/notifications-X76ITPCJ.js +7 -0
- package/dist/chunks/open-FVOQGEWM.js +7 -0
- package/dist/chunks/openapi-KYC6JIXI.js +7 -0
- package/dist/chunks/permissions-N6JJSYGS.js +7 -0
- package/dist/chunks/{plugin-offer-4YTKDZGS.js → plugin-offer-UXUZ3PRE.js} +1 -1
- package/dist/chunks/prompt-missing-credentials-7UX2S26W.js +7 -0
- package/dist/chunks/publish-BG3UKM2Q.js +15 -0
- package/dist/chunks/pull-3NAMWMU6.js +7 -0
- package/dist/chunks/purchase-domain-if-available-7UQPSITN.js +7 -0
- package/dist/chunks/push-TZAIOAX5.js +7 -0
- package/dist/chunks/{query-NIMDIFLO.js → query-R7M64JYQ.js} +1 -1
- package/dist/chunks/reauthenticate-TOILE7L6.js +7 -0
- package/dist/chunks/reorder-V47PIQFO.js +10 -0
- package/dist/chunks/reply-5QZVOLHI.js +9 -0
- package/dist/chunks/resolve-7VONHDWK.js +12 -0
- package/dist/chunks/resolve-agent-team-DHPOJEQE.js +7 -0
- package/dist/chunks/restore-JLME37UW.js +16 -0
- package/dist/chunks/rm-2GT4SSDQ.js +8 -0
- package/dist/chunks/rm-4EPE3LBT.js +8 -0
- package/dist/chunks/rm-5B7XAOK3.js +8 -0
- package/dist/chunks/rm-JY3ACRPF.js +8 -0
- package/dist/chunks/rm-V2A5HTIT.js +8 -0
- package/dist/chunks/routes-S75L7Z7A.js +7 -0
- package/dist/chunks/rule-inspect-VPH5ZZ23.js +8 -0
- package/dist/chunks/schema-DYNINJQ7.js +14 -0
- package/dist/chunks/{schema-44U7GOQE.js → schema-I73FHHZS.js} +1 -1
- package/dist/chunks/select-org-DUL7FO5S.js +7 -0
- package/dist/chunks/set-YZA622KE.js +7 -0
- package/dist/chunks/setup-and-link-ZDP5OPLK.js +7 -0
- package/dist/chunks/{skills-XOH4Q7KK.js → skills-DZYJV7BE.js} +3 -3
- package/dist/chunks/statuspage-45LJ2XYT.js +7 -0
- package/dist/chunks/tags-DYVP7Q2S.js +7 -0
- package/dist/chunks/{types-6W3KAE2A.js → types-YA6BOCRV.js} +1 -1
- package/dist/chunks/{update-YLFMSPQF.js → update-T3W6JMTU.js} +1 -1
- package/dist/chunks/validate-config-XWZ7ZZ3G.js +7 -0
- package/dist/commands/build/index.js +1 -6
- package/dist/commands/deploy/index.js +14 -14
- package/dist/commands/dev/index.js +3 -3
- package/dist/commands/env/index.js +1 -1
- package/dist/commands/link/index.js +1 -1
- package/dist/commands/list/index.js +1 -1
- package/dist/commands/project/index.js +1 -1
- package/dist/commands-account.js +112 -91
- package/dist/commands-ai.js +2 -2
- package/dist/commands-blob.js +1 -1
- package/dist/commands-core.js +62 -44
- package/dist/commands-deployments.js +9 -6
- package/dist/commands-flags.js +4 -3
- package/dist/commands-integrations.js +98 -74
- package/dist/commands-observability.js +5 -5
- package/dist/commands-routing.js +154 -162
- package/dist/help.js +1 -1
- package/dist/index.js +5 -5
- package/dist/internal-build.js +1 -1
- package/dist/native-download.js +1 -1
- package/dist/package.json +57 -58
- package/dist/root-help-commands.mjs +1 -1
- package/dist/version.mjs +1 -1
- package/package.json +50 -51
- package/dist/chunks/add-3MWFJH54.js +0 -8
- package/dist/chunks/add-CJWCA3MM.js +0 -8
- package/dist/chunks/add-GLCVYEEN.js +0 -8
- package/dist/chunks/build-6RK6VECG.js +0 -7
- package/dist/chunks/chunk-2PYFJXKS.js +0 -14
- package/dist/chunks/chunk-5SMV2PPI.js +0 -10
- package/dist/chunks/chunk-7A5WO5KA.js +0 -8
- package/dist/chunks/chunk-CJHVHB2F.js +0 -8
- package/dist/chunks/chunk-EGPVNTKP.js +0 -7
- package/dist/chunks/chunk-GJB72ITS.js +0 -12
- package/dist/chunks/chunk-H3SJJO6S.js +0 -10
- package/dist/chunks/chunk-INH6RXBH.js +0 -9
- package/dist/chunks/chunk-IU6PHFPQ.js +0 -7
- package/dist/chunks/chunk-KAUKCHQF.js +0 -10
- package/dist/chunks/chunk-NDWGYZRT.js +0 -10
- package/dist/chunks/chunk-OLAG7Y3P.js +0 -10
- package/dist/chunks/chunk-TK2ILW2O.js +0 -21
- package/dist/chunks/chunk-WKZ6JSGZ.js +0 -7
- package/dist/chunks/chunk-X65XZSWS.js +0 -10
- package/dist/chunks/cjs-2SMN43VH.js +0 -54
- package/dist/chunks/clear-375VKVXY.js +0 -8
- package/dist/chunks/compile-vercel-config-LNRUSKTH.js +0 -7
- package/dist/chunks/config-GOYBATSI.js +0 -8
- package/dist/chunks/config-VAW454ZH.js +0 -7
- package/dist/chunks/connect-git-provider-7KRYVDFS.js +0 -7
- package/dist/chunks/delete-3SN6XFOW.js +0 -10
- package/dist/chunks/delete-W6BZHLGP.js +0 -9
- package/dist/chunks/detect-services-6L57MV5F.js +0 -7
- package/dist/chunks/disable-UUV5MYYH.js +0 -7
- package/dist/chunks/discard-Y6ZITZ2P.js +0 -14
- package/dist/chunks/edit-CVMUITFG.js +0 -9
- package/dist/chunks/edit-LLRI57RF.js +0 -8
- package/dist/chunks/enable-TFA6XWAA.js +0 -7
- package/dist/chunks/future-EZEU2CBY.js +0 -7
- package/dist/chunks/generate-cert-for-deploy-QP5BUOJL.js +0 -7
- package/dist/chunks/image-YLUF7SHR.js +0 -7
- package/dist/chunks/import-builders-ANLKHIYK.js +0 -7
- package/dist/chunks/inspect-3TRAN3SP.js +0 -9
- package/dist/chunks/inspect-VEUY4QJ2.js +0 -13
- package/dist/chunks/list-DJKKVFUL.js +0 -12
- package/dist/chunks/login-4HCFKDKL.js +0 -7
- package/dist/chunks/login-EPBJQDEK.js +0 -9
- package/dist/chunks/logs-Q7XXVFR3.js +0 -7
- package/dist/chunks/ls-3TKRCF4T.js +0 -8
- package/dist/chunks/ls-LS5J5ERG.js +0 -11
- package/dist/chunks/ls-OQQTUQFN.js +0 -8
- package/dist/chunks/mutate-I6QWCURL.js +0 -9
- package/dist/chunks/notifications-UKC5Z6AH.js +0 -7
- package/dist/chunks/open-CYATUDTT.js +0 -7
- package/dist/chunks/openapi-B7WSK7AU.js +0 -7
- package/dist/chunks/permissions-4ZYPHPOZ.js +0 -7
- package/dist/chunks/prompt-missing-credentials-4OKJMYW5.js +0 -7
- package/dist/chunks/publish-N6E7VTRK.js +0 -15
- package/dist/chunks/pull-LPIT3XUR.js +0 -7
- package/dist/chunks/purchase-domain-if-available-IS6UDPJT.js +0 -7
- package/dist/chunks/push-ETLU6OCC.js +0 -7
- package/dist/chunks/reauthenticate-TESIUM6U.js +0 -7
- package/dist/chunks/reorder-PQU2BQEE.js +0 -10
- package/dist/chunks/reply-RKDDYV5I.js +0 -9
- package/dist/chunks/resolve-ZF7BFXIW.js +0 -12
- package/dist/chunks/resolve-agent-team-QSIJ665W.js +0 -7
- package/dist/chunks/restore-U5A3BEFQ.js +0 -16
- package/dist/chunks/rm-7H5O3T7G.js +0 -8
- package/dist/chunks/rm-EPPMQEAV.js +0 -8
- package/dist/chunks/rm-FNMW2FPM.js +0 -8
- package/dist/chunks/rm-OZIA3DFM.js +0 -8
- package/dist/chunks/rm-W3VOR2ED.js +0 -8
- package/dist/chunks/routes-BLE5XZJE.js +0 -7
- package/dist/chunks/rule-inspect-YAVRRGAP.js +0 -8
- package/dist/chunks/schema-6SAZ7T2S.js +0 -14
- package/dist/chunks/select-org-L5FJVL5Q.js +0 -7
- package/dist/chunks/set-3NQXDGJV.js +0 -7
- package/dist/chunks/setup-and-link-H36NRP3A.js +0 -7
- package/dist/chunks/tags-CRG27GFL.js +0 -7
- /package/dist/chunks/{chunk-OO572JUC.js → chunk-DBT6PGEH.js} +0 -0
|
@@ -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{canPrompt}from"./chunk-IQ7FPAI4.js";import{AGENT_REASON,AGENT_STATUS,outputActionRequired}from"./chunk-
|
|
7
|
+
import{canPrompt}from"./chunk-IQ7FPAI4.js";import{AGENT_REASON,AGENT_STATUS,outputActionRequired}from"./chunk-32NXYHYC.js";import{humanizePath,require_dist2 as require_dist,require_lib}from"./chunk-CBA2KGXG.js";import{output_manager_default}from"./chunk-W634OFUG.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_client=__toESM(require_dist(),1);import{dirname,isAbsolute,relative,sep}from"path";var singleFileConfig={framework:null,buildCommand:"",installCommand:"",outputDirectory:null},singleFileProjectSettings={...singleFileConfig,rootDirectory:null};async function isIgnoredFile(file,cwd){let roots=new Set([dirname(file)]),fromCwd=relative(cwd,file);fromCwd&&!fromCwd.startsWith(`..${sep}`)&&!isAbsolute(fromCwd)&&roots.add(cwd);for(let root of roots){let{ig}=await(0,import_client.getVercelIgnore)(root);if(ig.ignores(relative(root,file).split(sep).join("/")))return!0}return!1}var import_fs_extra=__toESM(require_lib(),1),import_chalk=__toESM(require_source(),1);import{homedir}from"os";import{resolve,sep as sep2}from"path";async function validateRootDirectory(cwd,path,errorSuffix=""){let pathStat=await(0,import_fs_extra.lstat)(path).catch(()=>null),suffix=errorSuffix?` ${errorSuffix}`:"";if(!pathStat)return output_manager_default.error(`The provided path ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)} does not exist.${suffix}`),!1;if(!pathStat.isDirectory())return output_manager_default.error(`The provided path ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)} is a file, but expected a directory.${suffix}`),!1;let base=resolve(cwd),target=resolve(path);return target!==base&&!target.startsWith(base+sep2)?(output_manager_default.error(`The provided path ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)} is outside of the project.${suffix}`),!1):!0}async function validatePaths(client,paths,{allowFiles=!1}={}){if(paths.length>1)return output_manager_default.error("Can't deploy more than one path."),{valid:!1,exitCode:1};let path=paths[0],pathStat=await(0,import_fs_extra.lstat)(path).catch(()=>null);if(!pathStat)return output_manager_default.error(`Could not find ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)}`),{valid:!1,exitCode:1};let isFile=pathStat.isFile();if(!pathStat.isDirectory()&&!(allowFiles&&isFile))return output_manager_default.fatal(allowFiles?"Deploy a regular file or directory. Symbolic links and special files are not supported as deployment paths.":"This command requires a directory. Use `vercel <file>` to deploy a single file."),{valid:!1,exitCode:1};if(path===homedir()){if(!canPrompt(client)){let message="Can't deploy your home directory without interactive confirmation. Run from your project directory, or run in a terminal to confirm deploying your home directory.";return outputActionRequired(client,{status:AGENT_STATUS.ACTION_REQUIRED,reason:AGENT_REASON.INTERACTIVE_CONFIRMATION_REQUIRED,message,userActionRequired:!0},2),output_manager_default.error(message),{valid:!1,exitCode:2}}if(!await client.input.confirm("You are deploying your home directory. Do you want to continue?",!1))return output_manager_default.print(`Canceled
|
|
8
8
|
`),{valid:!1,exitCode:0}}return{valid:!0,path,isFile}}export{singleFileConfig,singleFileProjectSettings,isIgnoredFile,validateRootDirectory,validatePaths};
|
|
@@ -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_chownr,require_mkdirp,require_pump,require_tar_stream}from"./chunk-
|
|
7
|
+
import{require_chownr,require_mkdirp,require_pump,require_tar_stream}from"./chunk-D6REP5QQ.js";import{__commonJS,__require}from"./chunk-BZENIQ7N.js";var require_tar_fs=__commonJS({"../../node_modules/.pnpm/tar-fs@1.16.5/node_modules/tar-fs/index.js"(exports){var chownr=require_chownr(),tar=require_tar_stream(),pump=require_pump(),mkdirp=require_mkdirp(),fs=__require("fs"),path=__require("path"),os=__require("os"),win32=os.platform()==="win32",noop=function(){},echo=function(name){return name},normalize=win32?function(name){return name.replace(/\\/g,"/").replace(/[:?<>|]/g,"_")}:echo,statAll=function(fs2,stat,cwd,ignore,entries,sort){var queue=entries||["."];return function(callback){if(!queue.length)return callback();var next=queue.shift(),nextAbs=path.join(cwd,next);stat(nextAbs,function(err,stat2){if(err)return callback(err);if(!stat2.isDirectory())return callback(null,next,stat2);fs2.readdir(nextAbs,function(err2,files){if(err2)return callback(err2);sort&&files.sort();for(var i=0;i<files.length;i++)ignore(path.join(cwd,next,files[i]))||queue.push(path.join(next,files[i]));callback(null,next,stat2)})})}},strip=function(map,level){return function(header){header.name=header.name.split("/").slice(level).join("/");var linkname=header.linkname;return linkname&&(header.type==="link"||path.isAbsolute(linkname))&&(header.linkname=linkname.split("/").slice(level).join("/")),map(header)}};exports.pack=function(cwd,opts){cwd||(cwd="."),opts||(opts={});var xfs=opts.fs||fs,ignore=opts.ignore||opts.filter||noop,map=opts.map||noop,mapStream=opts.mapStream||echo,statNext=statAll(xfs,opts.dereference?xfs.stat:xfs.lstat,cwd,ignore,opts.entries,opts.sort),strict=opts.strict!==!1,umask=typeof opts.umask=="number"?~opts.umask:~processUmask(),dmode=typeof opts.dmode=="number"?opts.dmode:0,fmode=typeof opts.fmode=="number"?opts.fmode:0,pack=opts.pack||tar.pack(),finish=opts.finish||noop;opts.strip&&(map=strip(map,opts.strip)),opts.readable&&(dmode|=parseInt(555,8),fmode|=parseInt(444,8)),opts.writable&&(dmode|=parseInt(333,8),fmode|=parseInt(222,8));var onsymlink=function(filename,header){xfs.readlink(path.join(cwd,filename),function(err,linkname){if(err)return pack.destroy(err);header.linkname=normalize(linkname),pack.entry(header,onnextentry)})},onstat=function(err,filename,stat){if(err)return pack.destroy(err);if(!filename)return opts.finalize!==!1&&pack.finalize(),finish(pack);if(stat.isSocket())return onnextentry();var header={name:normalize(filename),mode:(stat.mode|(stat.isDirectory()?dmode:fmode))&umask,mtime:stat.mtime,size:stat.size,type:"file",uid:stat.uid,gid:stat.gid};if(stat.isDirectory())return header.size=0,header.type="directory",header=map(header)||header,pack.entry(header,onnextentry);if(stat.isSymbolicLink())return header.size=0,header.type="symlink",header=map(header)||header,onsymlink(filename,header);if(header=map(header)||header,!stat.isFile())return strict?pack.destroy(new Error("unsupported type for "+filename)):onnextentry();var entry=pack.entry(header,onnextentry);if(entry){var rs=mapStream(xfs.createReadStream(path.join(cwd,filename)),header);rs.on("error",function(err2){entry.destroy(err2)}),pump(rs,entry)}},onnextentry=function(err){if(err)return pack.destroy(err);statNext(onstat)};return onnextentry(),pack};var head=function(list){return list.length?list[list.length-1]:null},processGetuid=function(){return process.getuid?process.getuid():-1},processUmask=function(){return process.umask?process.umask():0};exports.extract=function(cwd,opts){cwd||(cwd="."),opts||(opts={});var xfs=opts.fs||fs,ignore=opts.ignore||opts.filter||noop,map=opts.map||noop,mapStream=opts.mapStream||echo,own=opts.chown!==!1&&!win32&&processGetuid()===0,extract=opts.extract||tar.extract(),stack=[],now=new Date,umask=typeof opts.umask=="number"?~opts.umask:~processUmask(),dmode=typeof opts.dmode=="number"?opts.dmode:0,fmode=typeof opts.fmode=="number"?opts.fmode:0,strict=opts.strict!==!1;opts.strip&&(map=strip(map,opts.strip)),opts.readable&&(dmode|=parseInt(555,8),fmode|=parseInt(444,8)),opts.writable&&(dmode|=parseInt(333,8),fmode|=parseInt(222,8));var utimesParent=function(name,cb){for(var top;(top=head(stack))&&name.slice(0,top[0].length)!==top[0];)stack.pop();if(!top)return cb();xfs.utimes(top[0],now,top[1],cb)},utimes=function(name,header,cb){if(opts.utimes===!1)return cb();if(header.type==="directory")return xfs.utimes(name,now,header.mtime,cb);if(header.type==="symlink")return utimesParent(name,cb);xfs.utimes(name,now,header.mtime,function(err){if(err)return cb(err);utimesParent(name,cb)})},chperm=function(name,header,cb){var link=header.type==="symlink",chmod=link?xfs.lchmod:xfs.chmod,chown=link?xfs.lchown:xfs.chown;if(!chmod)return cb();var mode=(header.mode|(header.type==="directory"?dmode:fmode))&umask;chmod(name,mode,function(err){if(err)return cb(err);if(!own||!chown)return cb();chown(name,header.uid,header.gid,cb)})};return extract.on("entry",function(header,stream,next){header=map(header)||header,header.name=normalize(header.name);var name=path.join(cwd,path.join("/",header.name));if(ignore(name,header))return stream.resume(),next();var stat=function(err){if(err)return next(err);utimes(name,header,function(err2){if(err2)return next(err2);if(win32)return next();chperm(name,header,next)})},onsymlink=function(){if(win32)return next();xfs.unlink(name,function(){var dst=path.resolve(path.dirname(name),header.linkname);if(!dst.startsWith(path.resolve(cwd)))return next(new Error(name+" is not a valid symlink"));xfs.symlink(header.linkname,name,stat)})},onlink=function(){if(win32)return next();xfs.unlink(name,function(){var srcpath=path.join(cwd,path.join("/",header.linkname));xfs.realpath(srcpath,function(err,dst){if(err||!dst.startsWith(path.resolve(cwd)))return next(new Error(name+" is not a valid hardlink"));xfs.link(dst,name,function(err2){if(err2&&err2.code==="EPERM"&&opts.hardlinkAsFilesFallback)return stream=xfs.createReadStream(srcpath),onfile();stat(err2)})})})},onfile=function(){var ws=xfs.createWriteStream(name),rs=mapStream(stream,header);ws.on("error",function(err){rs.destroy(err)}),pump(rs,ws,function(err){if(err)return next(err);ws.on("close",stat)})};if(header.type==="directory")return stack.push([name,header.mtime]),mkdirfix(name,{fs:xfs,own,uid:header.uid,gid:header.gid},stat);var dir=path.dirname(name);validate(xfs,dir,path.join(cwd,"."),function(err,valid){if(err)return next(err);if(!valid)return next(new Error(dir+" is not a valid path"));mkdirfix(dir,{fs:xfs,own,uid:header.uid,gid:header.gid},function(err2){if(err2)return next(err2);switch(header.type){case"file":return onfile();case"link":return onlink();case"symlink":return onsymlink()}if(strict)return next(new Error("unsupported type for "+name+" ("+header.type+")"));stream.resume(),next()})})}),opts.finish&&extract.on("finish",opts.finish),extract};function validate(fs2,name,root,cb){if(name===root)return cb(null,!0);fs2.lstat(name,function(err,st){if(err&&err.code!=="ENOENT")return cb(err);if(err||st.isDirectory())return validate(fs2,path.join(name,".."),root,cb);cb(null,!1)})}function mkdirfix(name,opts,cb){mkdirp(name,{fs:opts.fs},function(err,made){!err&&made&&opts.own?chownr(made,opts.uid,opts.gid,cb):cb(err)})}}});export{require_tar_fs};
|
|
@@ -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_dist as require_dist2}from"./chunk-JALVF3C2.js";import{packageName}from"./chunk-
|
|
7
|
+
import{require_dist as require_dist2}from"./chunk-JALVF3C2.js";import{packageName}from"./chunk-VRH7LWOC.js";import{require_dist}from"./chunk-RM3ZDRYE.js";import{confirmOption,projectOption,yesOption}from"./chunk-YPPDRKVC.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_async_listen=__toESM(require_dist2(),1),import_error_utils=__toESM(require_dist(),1),DEV_QUEUE_API_PREFIX="/api/v3/topic/",DEV_QUEUE_PROXY_PREFIX="/_svc/_queues",DEV_QUEUE_DEFAULT_PORT=4782,DEV_RUNTIME_CACHE_DEFAULT_PORT=4783,DEV_SCHEDULES_DEFAULT_PORT=4784,DEV_SCHEDULES_PROXY_PREFIX="/_svc/_schedules",DEV_RESOURCE_TOKEN="vc-dev-token";function isValidDevResourceHost(origin,host){let port=new URL(origin).port,suffix=port?`:${port}`:"",normalizedHost=host?.toLowerCase();return normalizedHost===`127.0.0.1${suffix}`||normalizedHost===`localhost${suffix}`}async function listenOnDevResourcePort(server,options){let isPinned=options.port!==void 0,reservedPorts=new Set(options.reservedPorts),port=options.port??options.defaultPort;for(;;){if(!isPinned&&reservedPorts.has(port)){if(port>=65535)throw new Error(`${options.name} could not find an available port at or above 127.0.0.1:${options.defaultPort}. Choose another port with ${options.flag}.`);port++;continue}try{let address=await(0,import_async_listen.listen)(server,port,"127.0.0.1"),url=new URL(address.toString()),serverAddress=server.address(),actualPort=serverAddress&&typeof serverAddress!="string"?serverAddress.port:Number(url.port);return{origin:url.origin,port:actualPort,...port!==options.defaultPort&&!isPinned?{defaultPort:options.defaultPort}:{}}}catch(err){if(!(0,import_error_utils.isErrnoException)(err)||err.code!=="EADDRINUSE")throw err;if(isPinned||port>=65535)throw new Error(`${options.name} could not listen on 127.0.0.1:${port} because the port is already in use. Choose another port with ${options.flag}.`);port++}}}function getDevQueueEnv(baseUrl,hasWorkerServices=!0){return{...hasWorkerServices?{VERCEL_HAS_WORKER_SERVICES:"1"}:{},VERCEL_QUEUE_BASE_URL:baseUrl,VERCEL_QUEUE_TOKEN:DEV_RESOURCE_TOKEN,VERCEL_REGION:"dev1"}}function getDevSchedulesEnv(baseUrl,container=!1){if(!baseUrl)return{};let endpoint=new URL(baseUrl);return container&&["localhost","127.0.0.1","[::1]"].includes(endpoint.hostname)&&(endpoint.hostname="host.docker.internal"),{VERCEL_SCHEDULE_BASE_URL:endpoint.toString().replace(/\/$/,""),VERCEL_SCHEDULE_TOKEN:DEV_RESOURCE_TOKEN,VERCEL_SCHEDULE_DEV_API_VERSION:"1"}}var devCommand={name:"dev",aliases:["develop"],description:`Starts the \`${packageName} dev\` server.`,arguments:[{name:"dir",required:!1}],options:[{name:"listen",description:"Specify a URI endpoint on which to listen (default: 0.0.0.0:3000)",argument:"URI",shorthand:null,deprecatedShorthand:"l",type:String,deprecated:!1},{name:"local",shorthand:null,deprecatedShorthand:"L",type:Boolean,deprecated:!1,description:"Start the dev server without linking to a Vercel project"},{name:"queue-port",description:`Specify the local Vercel Queues server port (default: ${DEV_QUEUE_DEFAULT_PORT})`,argument:"PORT",shorthand:null,type:String,deprecated:!1},{name:"runtime-cache-port",description:`Specify the local Runtime Cache server port (default: ${DEV_RUNTIME_CACHE_DEFAULT_PORT})`,argument:"PORT",shorthand:null,type:String,deprecated:!1},{name:"tunnel",shorthand:null,type:Boolean,deprecated:!1},{name:"schedules-port",description:`Specify the local Vercel Schedules server port (default: ${DEV_SCHEDULES_DEFAULT_PORT})`,argument:"PORT",shorthand:null,type:String,deprecated:!1},yesOption,{name:"port",shorthand:"p",type:String,deprecated:!0},confirmOption,{...projectOption,shorthand:null}],examples:[{name:`Start the \`${packageName} dev\` server on port 8080`,value:`${packageName} dev --listen 8080`},{name:"Make the `vercel dev` server bind to localhost on port 5000",value:`${packageName} dev --listen 127.0.0.1:5000 `},{name:"Pin local resource server ports",value:`${packageName} dev --queue-port 5782 --runtime-cache-port 5783 --schedules-port 5784`}]};export{DEV_QUEUE_API_PREFIX,DEV_QUEUE_PROXY_PREFIX,DEV_QUEUE_DEFAULT_PORT,DEV_RUNTIME_CACHE_DEFAULT_PORT,DEV_SCHEDULES_DEFAULT_PORT,DEV_SCHEDULES_PROXY_PREFIX,DEV_RESOURCE_TOKEN,isValidDevResourceHost,listenOnDevResourcePort,getDevQueueEnv,getDevSchedulesEnv,devCommand};
|
|
@@ -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{packageName}from"./chunk-JESNVRVR.js";import{jsonOption,limitOption,projectOption,yesOption}from"./chunk-YPPDRKVC.js";var listSubcommand={name:"list",aliases:["ls"],description:"List all routing rules for the current project. These routes apply to all deployments and environments.",arguments:[],options:[projectOption,jsonOption,{name:"query",description:"Search by name, description, source, or destination",shorthand:"q",type:String,argument:"TEXT",deprecated:!1},{name:"search",description:"Deprecated alias for `--query`",shorthand:"s",type:String,argument:"QUERY",deprecated:!0},{name:"type",description:"Filter by type: rewrite, redirect, set_status, transform",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"filter",description:"Deprecated alias for `--type`",shorthand:"f",type:String,argument:"TYPE",deprecated:!0},{name:"production",description:"List routes from the live production version",shorthand:null,type:Boolean,deprecated:!1},{name:"routes-version",description:"List routes from a specific version",shorthand:null,type:String,argument:"VERSION",deprecated:!1},{name:"version-id",description:"Deprecated alias for `--routes-version`",shorthand:null,type:String,argument:"VERSION_ID",deprecated:!0},{name:"diff",description:"Compare staged changes against production. Use with --routes-version to compare a specific version.",shorthand:null,type:Boolean,deprecated:!1},{name:"expand",description:"Show expanded details for each route",shorthand:null,deprecatedShorthand:"e",type:Boolean,deprecated:!1}],examples:[{name:"List all routes",value:`${packageName} routes list`},{name:"Search for routes",value:`${packageName} routes list --query "api"`},{name:"Filter by type",value:`${packageName} routes list --type rewrite`},{name:"Show staged changes",value:`${packageName} routes list --diff`},{name:"Show live production routes",value:`${packageName} routes list --production`},{name:"Show expanded details",value:`${packageName} routes list --expand`}]},listVersionsSubcommand={name:"list-versions",aliases:["ls-versions"],description:"List all versions of routing rules",arguments:[],options:[projectOption,jsonOption,{...limitOption,description:"Number of versions to fetch (default: 20, max: 100)"},{name:"count",description:"Deprecated alias for `--limit`",shorthand:null,type:Number,argument:"NUMBER",deprecated:!0}],examples:[{name:"List route versions",value:`${packageName} routes list-versions`},{name:"List more versions",value:`${packageName} routes list-versions --limit 50`}]},inspectSubcommand={name:"inspect",aliases:[],description:"Show detailed information about a specific route",arguments:[{name:"name-or-id",required:!0}],options:[projectOption,jsonOption,{name:"diff",description:"Compare staged changes against production for this route",shorthand:null,type:Boolean,deprecated:!1}],examples:[{name:"Inspect a route by name",value:`${packageName} routes inspect "API rewrite"`},{name:"Inspect a route by ID",value:`${packageName} routes inspect abc123`},{name:"Show staged changes for a route",value:`${packageName} routes inspect "My route" --diff`}]},addSubcommand={name:"add",aliases:[],description:"Add a new routing rule to the project",arguments:[{name:"name",required:!1}],options:[projectOption,{name:"src",description:"Path pattern (required in non-interactive mode)",shorthand:null,type:String,argument:"PATTERN",deprecated:!1},{name:"src-syntax",description:"Path syntax: regex, path-to-regexp, equals (default: regex)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"action",description:"Action type: rewrite, redirect, or set-status (required with --dest/--status)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"dest",description:"Destination URL for rewrite or redirect",shorthand:null,type:String,argument:"URL",deprecated:!1},{name:"status",description:"Status code (301/302/307/308 for redirect, or any for set-status)",shorthand:null,type:Number,argument:"CODE",deprecated:!1},{name:"set-response-header",description:"Set response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-response-header",description:"Append to response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-response-header",description:"Delete response header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-header",description:"Set request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-request-header",description:"Append to request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-request-header",description:"Delete request header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-query",description:"Set query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"append-request-query",description:"Append to query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"delete-request-query",description:"Delete query parameter: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"has",description:"Condition that must match: type:key or type:key:value (repeatable)",shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"missing",description:'"Does not have" condition: type:key or type:key:value (repeatable)',shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"description",description:"Route description (max 1024 chars)",shorthand:null,type:String,argument:"TEXT",deprecated:!1},{name:"no-enable",description:"Add the route turned off (default: on)",shorthand:null,type:Boolean,deprecated:!1},{name:"disabled",description:"Deprecated alias for `--no-enable`",shorthand:null,type:Boolean,deprecated:!0},{name:"ai",description:"Generate route from a natural language description (AI-powered)",shorthand:null,type:String,argument:"PROMPT",deprecated:!1},{name:"position",description:"Position: start, end, after:<id>, before:<id>",shorthand:null,type:String,argument:"POSITION",deprecated:!1},{name:"yes",description:"Skip confirmation prompts",shorthand:"y",type:Boolean,deprecated:!1}],examples:[{name:"Interactive mode",value:`${packageName} routes add`},{name:"Create with AI",value:`${packageName} routes add --ai "Rewrite /api/* to https://backend.internal/*"`},{name:"Add a rewrite",value:`${packageName} routes add "API Proxy" --src "/api/:path*" --src-syntax path-to-regexp --action rewrite --dest "https://api.example.com/:path*" --yes`},{name:"Add a redirect",value:`${packageName} routes add "Old Blog" --src "/blog" --src-syntax equals --action redirect --dest "/articles" --status 301 --yes`},{name:"Add CORS headers",value:`${packageName} routes add "CORS" --src "^/api/.*$" --set-response-header "Access-Control-Allow-Origin=*" --yes`},{name:"Block access (set status)",value:`${packageName} routes add "Block Admin" --src "^/admin/.*$" --action set-status --status 403 --yes`},{name:"Conditional redirect",value:`${packageName} routes add "Auth Required" --src "/protected/:path*" --src-syntax path-to-regexp --action redirect --dest "/login" --status 307 --missing "cookie:session" --yes`},{name:"Rewrite with request headers",value:`${packageName} routes add "Backend Proxy" --src "/backend/:path*" --src-syntax path-to-regexp --action rewrite --dest "https://internal.example.com/:path*" --set-request-header "X-Forwarded-Host=myapp.com" --yes`},{name:"Add route at start",value:`${packageName} routes add "Priority Route" --src "/priority" --src-syntax equals --action rewrite --dest "/handler" --position start --yes`}]},publishSubcommand={name:"publish",aliases:[],description:"Publish all staged routing changes to production",arguments:[],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when publishing"}],examples:[{name:"Publish staged changes",value:`${packageName} routes publish`},{name:"Publish without confirmation",value:`${packageName} routes publish --yes`}]},restoreSubcommand={name:"restore",aliases:[],description:"Restore a previous routing version to production",arguments:[{name:"version-id",required:!0}],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when restoring"}],examples:[{name:"Restore a previous version",placeholders:["<version-id>"],value:`${packageName} routes restore <version-id>`},{name:"Restore without confirmation",placeholders:["<version-id>"],value:`${packageName} routes restore <version-id> --yes`}]},discardSubcommand={name:"discard-staging",aliases:[],description:"Discard staged routing changes",arguments:[],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when discarding"}],examples:[{name:"Discard staged changes",value:`${packageName} routes discard-staging`},{name:"Discard without confirmation",value:`${packageName} routes discard-staging --yes`}]},deleteSubcommand={name:"remove",aliases:["rm","delete"],description:"Remove one or more routing rules",arguments:[{name:"name-or-id",required:!0,multiple:!0}],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when removing"}],examples:[{name:"Remove a route by name",value:`${packageName} routes remove "Old Redirect"`},{name:"Remove a route by ID",value:`${packageName} routes remove abc123`},{name:"Remove multiple routes",value:`${packageName} routes remove "Route A" "Route B"`},{name:"Remove without confirmation",value:`${packageName} routes remove "Old Route" --yes`}]},enableSubcommand={name:"enable",aliases:[],description:"Enable a disabled routing rule",arguments:[{name:"name-or-id",required:!0}],options:[projectOption],examples:[{name:"Enable a route by name",value:`${packageName} routes enable "API Proxy"`},{name:"Enable a route by ID",value:`${packageName} routes enable abc123`}]},disableSubcommand={name:"disable",aliases:[],description:"Disable a routing rule without deleting it",arguments:[{name:"name-or-id",required:!0}],options:[projectOption],examples:[{name:"Disable a route by name",value:`${packageName} routes disable "API Proxy"`},{name:"Disable a route by ID",value:`${packageName} routes disable abc123`}]},reorderSubcommand={name:"move",aliases:["reorder"],description:"Move a routing rule to a different position",arguments:[{name:"name-or-id",required:!0}],options:[projectOption,{name:"position",description:"Target position: start, end, a number (1-based), before:<id>, after:<id>",shorthand:null,type:String,argument:"POSITION",deprecated:!1},{name:"first",description:"Move to the first position (highest priority)",shorthand:null,type:Boolean,deprecated:!1},{name:"last",description:"Move to the last position (lowest priority)",shorthand:null,type:Boolean,deprecated:!1},{...yesOption,description:"Skip the confirmation prompt when moving"}],examples:[{name:"Move to first position",value:`${packageName} routes move "Catch All" --first`},{name:"Move to last position",value:`${packageName} routes move "Catch All" --last`},{name:"Move to a specific position",value:`${packageName} routes move "API Proxy" --position 3`},{name:"Move after another route",value:`${packageName} routes move "API Proxy" --position after:route-id-123`},{name:"Interactive move (prompts for position)",value:`${packageName} routes move "API Proxy"`}]},editSubcommand={name:"update",aliases:["edit"],description:"Update an existing routing rule",arguments:[{name:"name-or-id",required:!0}],options:[projectOption,{name:"name",description:"Change route name",shorthand:null,type:String,argument:"NAME",deprecated:!1},{name:"description",description:'Change description (use "" to clear)',shorthand:null,type:String,argument:"TEXT",deprecated:!1},{name:"src",description:"Change source path pattern",shorthand:null,type:String,argument:"PATTERN",deprecated:!1},{name:"src-syntax",description:"Change path syntax: regex, path-to-regexp, equals",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"action",description:"Set action type: rewrite, redirect, or set-status (required when switching types)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"dest",description:"Set destination URL",shorthand:null,type:String,argument:"URL",deprecated:!1},{name:"status",description:"Set status code",shorthand:null,type:Number,argument:"CODE",deprecated:!1},{name:"no-dest",description:"Remove destination",shorthand:null,type:Boolean,deprecated:!1},{name:"no-status",description:"Remove status code",shorthand:null,type:Boolean,deprecated:!1},{name:"set-response-header",description:"Set response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-response-header",description:"Append to response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-response-header",description:"Delete response header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-header",description:"Set request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-request-header",description:"Append to request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-request-header",description:"Delete request header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-query",description:"Set query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"append-request-query",description:"Append to query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"delete-request-query",description:"Delete query parameter: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"has",description:"Add a has condition: type:key or type:key:value (repeatable)",shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"missing",description:'Add a "does not have" condition: type:key or type:key:value (repeatable)',shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"clear-conditions",description:"Remove all has/does-not-have conditions",shorthand:null,type:Boolean,deprecated:!1},{name:"clear-headers",description:"Remove all response headers",shorthand:null,type:Boolean,deprecated:!1},{name:"clear-transforms",description:"Remove all transforms (request headers, request query)",shorthand:null,type:Boolean,deprecated:!1},{name:"ai",description:"Describe changes using natural language (AI-powered)",shorthand:null,type:String,argument:"PROMPT",deprecated:!1},{...yesOption,description:"Skip confirmation prompts"}],examples:[{name:"Interactive mode",value:`${packageName} routes update "API Proxy"`},{name:"Update with AI",value:`${packageName} routes update "API Proxy" --ai "Add CORS headers and change status to 308"`},{name:"Change destination",value:`${packageName} routes update "API Proxy" --dest "https://new-api.example.com/:path*"`},{name:"Switch to redirect",value:`${packageName} routes update "Old Route" --action redirect --dest "/new" --status 301`},{name:"Add a response header",value:`${packageName} routes update "My Route" --set-response-header "Cache-Control=public, max-age=3600"`},{name:"Clear all conditions and add new ones",value:`${packageName} routes update "My Route" --clear-conditions --has "header:Authorization"`}]},exportSubcommand={name:"export",aliases:[],description:"Export routes to a vercel.json or vercel.ts file",arguments:[{name:"name-or-id",required:!1}],options:[projectOption,{name:"output",description:"Output file format: .json or .ts (default: .json)",shorthand:"o",type:String,argument:"json|ts",deprecated:!1}],examples:[{name:"Export as vercel.json format",value:`${packageName} routes export`},{name:"Export as vercel.ts format",value:`${packageName} routes export --output ts`},{name:"Export a specific route",value:`${packageName} routes export "API Proxy"`},{name:"Export to a file",value:`${packageName} routes export > routes.json`}]},routesCommand={name:"routes",aliases:[],description:"Manage routing rules for a project. Routes managed at the project level apply to all deployments and environments.",arguments:[],subcommands:[listSubcommand,listVersionsSubcommand,inspectSubcommand,addSubcommand,editSubcommand,deleteSubcommand,enableSubcommand,disableSubcommand,reorderSubcommand,exportSubcommand,publishSubcommand,restoreSubcommand,discardSubcommand],options:[],examples:[]};export{listSubcommand,listVersionsSubcommand,inspectSubcommand,addSubcommand,publishSubcommand,restoreSubcommand,discardSubcommand,deleteSubcommand,enableSubcommand,disableSubcommand,reorderSubcommand,editSubcommand,exportSubcommand,routesCommand};
|
|
7
|
+
import{packageName}from"./chunk-VRH7LWOC.js";import{jsonOption,limitOption,projectOption,yesOption}from"./chunk-YPPDRKVC.js";var listSubcommand={name:"list",aliases:["ls"],description:"List all routing rules for the current project. These routes apply to all deployments and environments.",arguments:[],options:[projectOption,jsonOption,{name:"query",description:"Search by name, description, source, or destination",shorthand:"q",type:String,argument:"TEXT",deprecated:!1},{name:"search",description:"Deprecated alias for `--query`",shorthand:"s",type:String,argument:"QUERY",deprecated:!0},{name:"type",description:"Filter by type: rewrite, redirect, set_status, transform",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"filter",description:"Deprecated alias for `--type`",shorthand:"f",type:String,argument:"TYPE",deprecated:!0},{name:"production",description:"List routes from the live production version",shorthand:null,type:Boolean,deprecated:!1},{name:"routes-version",description:"List routes from a specific version",shorthand:null,type:String,argument:"VERSION",deprecated:!1},{name:"version-id",description:"Deprecated alias for `--routes-version`",shorthand:null,type:String,argument:"VERSION_ID",deprecated:!0},{name:"diff",description:"Compare staged changes against production. Use with --routes-version to compare a specific version.",shorthand:null,type:Boolean,deprecated:!1},{name:"expand",description:"Show expanded details for each route",shorthand:null,deprecatedShorthand:"e",type:Boolean,deprecated:!1}],examples:[{name:"List all routes",value:`${packageName} routes list`},{name:"Search for routes",value:`${packageName} routes list --query "api"`},{name:"Filter by type",value:`${packageName} routes list --type rewrite`},{name:"Show staged changes",value:`${packageName} routes list --diff`},{name:"Show live production routes",value:`${packageName} routes list --production`},{name:"Show expanded details",value:`${packageName} routes list --expand`}]},listVersionsSubcommand={name:"list-versions",aliases:["ls-versions"],description:"List all versions of routing rules",arguments:[],options:[projectOption,jsonOption,{...limitOption,description:"Number of versions to fetch (default: 20, max: 100)"},{name:"count",description:"Deprecated alias for `--limit`",shorthand:null,type:Number,argument:"NUMBER",deprecated:!0}],examples:[{name:"List route versions",value:`${packageName} routes list-versions`},{name:"List more versions",value:`${packageName} routes list-versions --limit 50`}]},inspectSubcommand={name:"inspect",aliases:[],description:"Show detailed information about a specific route",arguments:[{name:"name-or-id",required:!0}],options:[projectOption,jsonOption,{name:"diff",description:"Compare staged changes against production for this route",shorthand:null,type:Boolean,deprecated:!1}],examples:[{name:"Inspect a route by name",value:`${packageName} routes inspect "API rewrite"`},{name:"Inspect a route by ID",value:`${packageName} routes inspect abc123`},{name:"Show staged changes for a route",value:`${packageName} routes inspect "My route" --diff`}]},addSubcommand={name:"add",aliases:[],description:"Add a new routing rule to the project",arguments:[{name:"name",required:!1}],options:[projectOption,{name:"src",description:"Path pattern (required in non-interactive mode)",shorthand:null,type:String,argument:"PATTERN",deprecated:!1},{name:"src-syntax",description:"Path syntax: regex, path-to-regexp, equals (default: regex)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"action",description:"Action type: rewrite, redirect, or set-status (required with --dest/--status)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"dest",description:"Destination URL for rewrite or redirect",shorthand:null,type:String,argument:"URL",deprecated:!1},{name:"status",description:"Status code (301/302/307/308 for redirect, or any for set-status)",shorthand:null,type:Number,argument:"CODE",deprecated:!1},{name:"set-response-header",description:"Set response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-response-header",description:"Append to response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-response-header",description:"Delete response header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-header",description:"Set request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-request-header",description:"Append to request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-request-header",description:"Delete request header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-query",description:"Set query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"append-request-query",description:"Append to query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"delete-request-query",description:"Delete query parameter: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"has",description:"Condition that must match: type:key or type:key:value (repeatable)",shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"missing",description:'"Does not have" condition: type:key or type:key:value (repeatable)',shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"description",description:"Route description (max 1024 chars)",shorthand:null,type:String,argument:"TEXT",deprecated:!1},{name:"no-enable",description:"Add the route turned off (default: on)",shorthand:null,type:Boolean,deprecated:!1},{name:"disabled",description:"Deprecated alias for `--no-enable`",shorthand:null,type:Boolean,deprecated:!0},{name:"ai",description:"Generate route from a natural language description (AI-powered)",shorthand:null,type:String,argument:"PROMPT",deprecated:!1},{name:"position",description:"Position: start, end, after:<id>, before:<id>",shorthand:null,type:String,argument:"POSITION",deprecated:!1},{name:"yes",description:"Skip confirmation prompts",shorthand:"y",type:Boolean,deprecated:!1}],examples:[{name:"Interactive mode",value:`${packageName} routes add`},{name:"Create with AI",value:`${packageName} routes add --ai "Rewrite /api/* to https://backend.internal/*"`},{name:"Add a rewrite",value:`${packageName} routes add "API Proxy" --src "/api/:path*" --src-syntax path-to-regexp --action rewrite --dest "https://api.example.com/:path*" --yes`},{name:"Add a redirect",value:`${packageName} routes add "Old Blog" --src "/blog" --src-syntax equals --action redirect --dest "/articles" --status 301 --yes`},{name:"Add CORS headers",value:`${packageName} routes add "CORS" --src "^/api/.*$" --set-response-header "Access-Control-Allow-Origin=*" --yes`},{name:"Block access (set status)",value:`${packageName} routes add "Block Admin" --src "^/admin/.*$" --action set-status --status 403 --yes`},{name:"Conditional redirect",value:`${packageName} routes add "Auth Required" --src "/protected/:path*" --src-syntax path-to-regexp --action redirect --dest "/login" --status 307 --missing "cookie:session" --yes`},{name:"Rewrite with request headers",value:`${packageName} routes add "Backend Proxy" --src "/backend/:path*" --src-syntax path-to-regexp --action rewrite --dest "https://internal.example.com/:path*" --set-request-header "X-Forwarded-Host=myapp.com" --yes`},{name:"Add route at start",value:`${packageName} routes add "Priority Route" --src "/priority" --src-syntax equals --action rewrite --dest "/handler" --position start --yes`}]},publishSubcommand={name:"publish",aliases:[],description:"Publish all staged routing changes to production",arguments:[],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when publishing"}],examples:[{name:"Publish staged changes",value:`${packageName} routes publish`},{name:"Publish without confirmation",value:`${packageName} routes publish --yes`}]},restoreSubcommand={name:"restore",aliases:[],description:"Restore a previous routing version to production",arguments:[{name:"version-id",required:!0}],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when restoring"}],examples:[{name:"Restore a previous version",placeholders:["<version-id>"],value:`${packageName} routes restore <version-id>`},{name:"Restore without confirmation",placeholders:["<version-id>"],value:`${packageName} routes restore <version-id> --yes`}]},discardSubcommand={name:"discard-staging",aliases:[],description:"Discard staged routing changes",arguments:[],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when discarding"}],examples:[{name:"Discard staged changes",value:`${packageName} routes discard-staging`},{name:"Discard without confirmation",value:`${packageName} routes discard-staging --yes`}]},deleteSubcommand={name:"remove",aliases:["rm","delete"],description:"Remove one or more routing rules",arguments:[{name:"name-or-id",required:!0,multiple:!0}],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when removing"}],examples:[{name:"Remove a route by name",value:`${packageName} routes remove "Old Redirect"`},{name:"Remove a route by ID",value:`${packageName} routes remove abc123`},{name:"Remove multiple routes",value:`${packageName} routes remove "Route A" "Route B"`},{name:"Remove without confirmation",value:`${packageName} routes remove "Old Route" --yes`}]},enableSubcommand={name:"enable",aliases:[],description:"Enable a disabled routing rule",arguments:[{name:"name-or-id",required:!0}],options:[projectOption],examples:[{name:"Enable a route by name",value:`${packageName} routes enable "API Proxy"`},{name:"Enable a route by ID",value:`${packageName} routes enable abc123`}]},disableSubcommand={name:"disable",aliases:[],description:"Disable a routing rule without deleting it",arguments:[{name:"name-or-id",required:!0}],options:[projectOption],examples:[{name:"Disable a route by name",value:`${packageName} routes disable "API Proxy"`},{name:"Disable a route by ID",value:`${packageName} routes disable abc123`}]},reorderSubcommand={name:"move",aliases:["reorder"],description:"Move a routing rule to a different position",arguments:[{name:"name-or-id",required:!0}],options:[projectOption,{name:"position",description:"Target position: start, end, a number (1-based), before:<id>, after:<id>",shorthand:null,type:String,argument:"POSITION",deprecated:!1},{name:"first",description:"Move to the first position (highest priority)",shorthand:null,type:Boolean,deprecated:!1},{name:"last",description:"Move to the last position (lowest priority)",shorthand:null,type:Boolean,deprecated:!1},{...yesOption,description:"Skip the confirmation prompt when moving"}],examples:[{name:"Move to first position",value:`${packageName} routes move "Catch All" --first`},{name:"Move to last position",value:`${packageName} routes move "Catch All" --last`},{name:"Move to a specific position",value:`${packageName} routes move "API Proxy" --position 3`},{name:"Move after another route",value:`${packageName} routes move "API Proxy" --position after:route-id-123`},{name:"Interactive move (prompts for position)",value:`${packageName} routes move "API Proxy"`}]},editSubcommand={name:"update",aliases:["edit"],description:"Update an existing routing rule",arguments:[{name:"name-or-id",required:!0}],options:[projectOption,{name:"name",description:"Change route name",shorthand:null,type:String,argument:"NAME",deprecated:!1},{name:"description",description:'Change description (use "" to clear)',shorthand:null,type:String,argument:"TEXT",deprecated:!1},{name:"src",description:"Change source path pattern",shorthand:null,type:String,argument:"PATTERN",deprecated:!1},{name:"src-syntax",description:"Change path syntax: regex, path-to-regexp, equals",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"action",description:"Set action type: rewrite, redirect, or set-status (required when switching types)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"dest",description:"Set destination URL",shorthand:null,type:String,argument:"URL",deprecated:!1},{name:"status",description:"Set status code",shorthand:null,type:Number,argument:"CODE",deprecated:!1},{name:"no-dest",description:"Remove destination",shorthand:null,type:Boolean,deprecated:!1},{name:"no-status",description:"Remove status code",shorthand:null,type:Boolean,deprecated:!1},{name:"set-response-header",description:"Set response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-response-header",description:"Append to response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-response-header",description:"Delete response header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-header",description:"Set request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-request-header",description:"Append to request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-request-header",description:"Delete request header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-query",description:"Set query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"append-request-query",description:"Append to query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"delete-request-query",description:"Delete query parameter: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"has",description:"Add a has condition: type:key or type:key:value (repeatable)",shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"missing",description:'Add a "does not have" condition: type:key or type:key:value (repeatable)',shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"clear-conditions",description:"Remove all has/does-not-have conditions",shorthand:null,type:Boolean,deprecated:!1},{name:"clear-headers",description:"Remove all response headers",shorthand:null,type:Boolean,deprecated:!1},{name:"clear-transforms",description:"Remove all transforms (request headers, request query)",shorthand:null,type:Boolean,deprecated:!1},{name:"ai",description:"Describe changes using natural language (AI-powered)",shorthand:null,type:String,argument:"PROMPT",deprecated:!1},{...yesOption,description:"Skip confirmation prompts"}],examples:[{name:"Interactive mode",value:`${packageName} routes update "API Proxy"`},{name:"Update with AI",value:`${packageName} routes update "API Proxy" --ai "Add CORS headers and change status to 308"`},{name:"Change destination",value:`${packageName} routes update "API Proxy" --dest "https://new-api.example.com/:path*"`},{name:"Switch to redirect",value:`${packageName} routes update "Old Route" --action redirect --dest "/new" --status 301`},{name:"Add a response header",value:`${packageName} routes update "My Route" --set-response-header "Cache-Control=public, max-age=3600"`},{name:"Clear all conditions and add new ones",value:`${packageName} routes update "My Route" --clear-conditions --has "header:Authorization"`}]},exportSubcommand={name:"export",aliases:[],description:"Export routes to a vercel.json or vercel.ts file",arguments:[{name:"name-or-id",required:!1}],options:[projectOption,{name:"output",description:"Output file format: .json or .ts (default: .json)",shorthand:"o",type:String,argument:"json|ts",deprecated:!1}],examples:[{name:"Export as vercel.json format",value:`${packageName} routes export`},{name:"Export as vercel.ts format",value:`${packageName} routes export --output ts`},{name:"Export a specific route",value:`${packageName} routes export "API Proxy"`},{name:"Export to a file",value:`${packageName} routes export > routes.json`}]},routesCommand={name:"routes",aliases:[],description:"Manage routing rules for a project. Routes managed at the project level apply to all deployments and environments.",arguments:[],subcommands:[listSubcommand,listVersionsSubcommand,inspectSubcommand,addSubcommand,editSubcommand,deleteSubcommand,enableSubcommand,disableSubcommand,reorderSubcommand,exportSubcommand,publishSubcommand,restoreSubcommand,discardSubcommand],options:[],examples:[]};export{listSubcommand,listVersionsSubcommand,inspectSubcommand,addSubcommand,publishSubcommand,restoreSubcommand,discardSubcommand,deleteSubcommand,enableSubcommand,disableSubcommand,reorderSubcommand,editSubcommand,exportSubcommand,routesCommand};
|
|
@@ -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{events_default}from"./chunk-
|
|
7
|
+
import{events_default}from"./chunk-BEAH4TA2.js";import{output_manager_default}from"./chunk-W634OFUG.js";import{require_source}from"./chunk-NB2WLB3J.js";import{require_strip_ansi}from"./chunk-BULSRTQE.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var import_strip_ansi=__toESM(require_strip_ansi(),1);function displayBuildLogs(client,deployment,follow=!0,onAliasAssigned){let abortController=new AbortController;return{promise:events_default(client,deployment.id,{mode:"logs",onEvent:event=>printBuildLog(event,output_manager_default.print),onAliasAssigned,quiet:!1,findOpts:{direction:"forward",follow}},abortController),abortController}}function collectBuildLogs(client,deployment,follow=!0){let logs=[],abortController=new AbortController;return{promise:events_default(client,deployment.id,{mode:"logs",onEvent:event=>{event.created&&logs.push(event)},quiet:!0,findOpts:{direction:"forward",follow}},abortController).then(()=>logs),abortController}}async function displayBuildLogsUntilFinalError(client,deployment,error){let abortController=new AbortController;return events_default(client,deployment.id,{mode:"logs",onEvent:event=>{printBuildLog(event,output_manager_default.print),event.level==="error"&&event.text?.includes(error)&&abortController.abort()},quiet:!1,findOpts:{direction:"forward",follow:!0}},abortController)}function printBuildLog(log,print){if(!log.created)return;let date=new Date(log.created).toISOString(),cleanText=parseLogLines(log).join(`
|
|
8
8
|
`);for(let line of colorize(cleanText,log).split(`
|
|
9
9
|
`))print(`${import_chalk.default.dim(date)} ${line}
|
|
10
10
|
`)}function sanitize(log){return(0,import_strip_ansi.default)(log.text||"").replace(/\n$/,"").replace(/^\n/,"")}function parseLogLines(log){return sanitize(log).split(`
|
|
@@ -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{sleep}from"./chunk-
|
|
7
|
+
import{sleep}from"./chunk-CBA2KGXG.js";import{output_manager_default}from"./chunk-W634OFUG.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);async function createDeploymentProtectionToken(client,projectId,orgId){if(!client.authConfig.token)throw output_manager_default.debug("No auth token available, skipping deployment protection token"),new Error("Authentication required to create protection bypass token");try{let response=await client.fetch(`/v1/projects/${projectId}/protection-bypass`,{method:"PATCH",body:"{}",headers:{"Content-Type":"application/json"},accountId:orgId}),{protectionBypass}=response;return output_manager_default.log("You require a deployment protection bypass token to access this deployment... Generating one now..."),output_manager_default.log(`Successfully generated deployment protection bypass token for project ${import_chalk.default.bold(projectId)}
|
|
8
8
|
`),await sleep(1e3),getAutomationBypassToken(protectionBypass)}catch(error){throw output_manager_default.debug(`Failed to generate deployment protection bypass token: ${error}`),output_manager_default.note('To bypass deployment protection, create a "Protection Bypass for Automation" secret in your project settings:'),output_manager_default.log(` 1. Visit ${import_chalk.default.cyan("https://vercel.com/dashboard")}`),output_manager_default.log(" 2. Go to your project settings \u2192 Deployment Protection"),output_manager_default.log(' 3. Generate a "Protection Bypass for Automation" secret'),output_manager_default.log(` 4. Use it with ${import_chalk.default.cyan("--protection-bypass")} option or set ${import_chalk.default.cyan("VERCEL_AUTOMATION_BYPASS_SECRET")} env var`),output_manager_default.log(""),new Error("Failed to create deployment protection bypass token")}}function getAutomationBypassToken(protectionBypass){if(!protectionBypass)throw new Error("No protection bypass tokens found");let token=Object.keys(protectionBypass).find(key=>protectionBypass[key].scope==="automation-bypass");if(!token)throw new Error("No automation bypass token found in protection bypass settings");return token}async function getOrCreateDeploymentProtectionToken(client,{project,org},{createIfMissing=!0}={}){if(process.env.VERCEL_AUTOMATION_BYPASS_SECRET)return output_manager_default.debug("Using protection bypass secret from environment variable"),process.env.VERCEL_AUTOMATION_BYPASS_SECRET;if(project.protectionBypass&&Object.values(project.protectionBypass).length){let protectionBypass;try{protectionBypass=getAutomationBypassToken(project.protectionBypass)}catch(error){if(!createIfMissing)return output_manager_default.debug(`No existing automation bypass token found for project ${project.id}`),null;throw error}if(protectionBypass)return output_manager_default.debug("Using existing protection bypass token from project settings"),protectionBypass}return createIfMissing?await createDeploymentProtectionToken(client,project.id,org.id):(output_manager_default.debug(`Not creating an automation bypass token for project ${project.id}`),null)}export{getOrCreateDeploymentProtectionToken};
|
|
@@ -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};
|
|
@@ -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_ci_info}from"./chunk-2EYYB6YN.js";import{isNativeBinaryInstall}from"./chunk-NWGBDBZI.js";import{require_graceful_fs,require_load_json_file,require_pify}from"./chunk-4NTBYNFR.js";import{UNCLASSIFIED_ERROR_CODE,output_manager_default,peekCliError,require_build_utils}from"./chunk-ZRJKGAUT.js";import{require_signal_exit}from"./chunk-BLUPZPAS.js";import{require_dist}from"./chunk-PUKYAALC.js";import{__commonJS,__require,__toESM}from"./chunk-BZENIQ7N.js";var require_imurmurhash=__commonJS({"../../node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.js"(exports,module){(function(){var cache;function MurmurHash3(key,seed){var m=this instanceof MurmurHash3?this:cache;if(m.reset(seed),typeof key=="string"&&key.length>0&&m.hash(key),m!==this)return m}MurmurHash3.prototype.hash=function(key){var h1,k1,i,top,len;switch(len=key.length,this.len+=len,k1=this.k1,i=0,this.rem){case 0:k1^=len>i?key.charCodeAt(i++)&65535:0;case 1:k1^=len>i?(key.charCodeAt(i++)&65535)<<8:0;case 2:k1^=len>i?(key.charCodeAt(i++)&65535)<<16:0;case 3:k1^=len>i?(key.charCodeAt(i)&255)<<24:0,k1^=len>i?(key.charCodeAt(i++)&65280)>>8:0}if(this.rem=len+this.rem&3,len-=this.rem,len>0){for(h1=this.h1;k1=k1*11601+(k1&65535)*3432906752&4294967295,k1=k1<<15|k1>>>17,k1=k1*13715+(k1&65535)*461832192&4294967295,h1^=k1,h1=h1<<13|h1>>>19,h1=h1*5+3864292196&4294967295,!(i>=len);)k1=key.charCodeAt(i++)&65535^(key.charCodeAt(i++)&65535)<<8^(key.charCodeAt(i++)&65535)<<16,top=key.charCodeAt(i++),k1^=(top&255)<<24^(top&65280)>>8;switch(k1=0,this.rem){case 3:k1^=(key.charCodeAt(i+2)&65535)<<16;case 2:k1^=(key.charCodeAt(i+1)&65535)<<8;case 1:k1^=key.charCodeAt(i)&65535}this.h1=h1}return this.k1=k1,this},MurmurHash3.prototype.result=function(){var k1,h1;return k1=this.k1,h1=this.h1,k1>0&&(k1=k1*11601+(k1&65535)*3432906752&4294967295,k1=k1<<15|k1>>>17,k1=k1*13715+(k1&65535)*461832192&4294967295,h1^=k1),h1^=this.len,h1^=h1>>>16,h1=h1*51819+(h1&65535)*2246770688&4294967295,h1^=h1>>>13,h1=h1*44597+(h1&65535)*3266445312&4294967295,h1^=h1>>>16,h1>>>0},MurmurHash3.prototype.reset=function(seed){return this.h1=typeof seed=="number"?seed:0,this.rem=this.k1=this.len=0,this},cache=new MurmurHash3,typeof module<"u"?module.exports=MurmurHash3:this.MurmurHash3=MurmurHash3})()}});var require_write_file_atomic=__commonJS({"../../node_modules/.pnpm/write-file-atomic@2.4.3/node_modules/write-file-atomic/index.js"(exports,module){"use strict";module.exports=writeFile;module.exports.sync=writeFileSync2;module.exports._getTmpname=getTmpname;module.exports._cleanupOnExit=cleanupOnExit;var fs=require_graceful_fs(),MurmurHash3=require_imurmurhash(),onExit=require_signal_exit(),path=__require("path"),activeFiles={},threadId=function(){try{var workerThreads=__require("worker_threads");return workerThreads.threadId}catch{return 0}}(),invocations=0;function getTmpname(filename){return filename+"."+MurmurHash3(__filename).hash(String(process.pid)).hash(String(threadId)).hash(String(++invocations)).result()}function cleanupOnExit(tmpfile){return function(){try{fs.unlinkSync(typeof tmpfile=="function"?tmpfile():tmpfile)}catch{}}}function writeFile(filename,data,options,callback){options?options instanceof Function?(callback=options,options={}):typeof options=="string"&&(options={encoding:options}):options={};var Promise2=options.Promise||global.Promise,truename,fd,tmpfile,removeOnExitHandler=onExit(cleanupOnExit(()=>tmpfile)),absoluteName=path.resolve(filename);new Promise2(function(resolve){activeFiles[absoluteName]||(activeFiles[absoluteName]=[]),activeFiles[absoluteName].push(resolve),activeFiles[absoluteName].length===1&&resolve()}).then(function(){return new Promise2(function(resolve){fs.realpath(filename,function(_,realname){truename=realname||filename,tmpfile=getTmpname(truename),resolve()})})}).then(function(){return new Promise2(function(resolve){options.mode&&options.chown?resolve():fs.stat(truename,function(err,stats){err||!stats||(options=Object.assign({},options),options.mode==null&&(options.mode=stats.mode),options.chown==null&&process.getuid&&(options.chown={uid:stats.uid,gid:stats.gid})),resolve()})})}).then(function(){return new Promise2(function(resolve,reject){fs.open(tmpfile,"w",options.mode,function(err,_fd){fd=_fd,err?reject(err):resolve()})})}).then(function(){return new Promise2(function(resolve,reject){Buffer.isBuffer(data)?fs.write(fd,data,0,data.length,0,function(err){err?reject(err):resolve()}):data!=null?fs.write(fd,String(data),0,String(options.encoding||"utf8"),function(err){err?reject(err):resolve()}):resolve()})}).then(function(){return new Promise2(function(resolve,reject){options.fsync!==!1?fs.fsync(fd,function(err){err?fs.close(fd,()=>reject(err)):fs.close(fd,resolve)}):fs.close(fd,resolve)})}).then(function(){if(fd=null,options.chown)return new Promise2(function(resolve,reject){fs.chown(tmpfile,options.chown.uid,options.chown.gid,function(err){err?reject(err):resolve()})})}).then(function(){if(options.mode)return new Promise2(function(resolve,reject){fs.chmod(tmpfile,options.mode,function(err){err?reject(err):resolve()})})}).then(function(){return new Promise2(function(resolve,reject){fs.rename(tmpfile,truename,function(err){err?reject(err):resolve()})})}).then(function(){removeOnExitHandler(),callback()},function(err){return new Promise2(resolve=>fd?fs.close(fd,resolve):resolve()).then(()=>{removeOnExitHandler(),fs.unlink(tmpfile,function(){callback(err)})})}).then(function(){activeFiles[absoluteName].shift(),activeFiles[absoluteName].length>0?activeFiles[absoluteName][0]():delete activeFiles[absoluteName]})}function writeFileSync2(filename,data,options){typeof options=="string"?options={encoding:options}:options||(options={});try{filename=fs.realpathSync(filename)}catch{}var tmpfile=getTmpname(filename);if(!options.mode||!options.chown)try{var stats=fs.statSync(filename);options=Object.assign({},options),options.mode||(options.mode=stats.mode),!options.chown&&process.getuid&&(options.chown={uid:stats.uid,gid:stats.gid})}catch{}var fd,cleanup=cleanupOnExit(tmpfile),removeOnExitHandler=onExit(cleanup);try{fd=fs.openSync(tmpfile,"w",options.mode),Buffer.isBuffer(data)?fs.writeSync(fd,data,0,data.length,0):data!=null&&fs.writeSync(fd,String(data),0,String(options.encoding||"utf8")),options.fsync!==!1&&fs.fsyncSync(fd),fs.closeSync(fd),options.chown&&fs.chownSync(tmpfile,options.chown.uid,options.chown.gid),options.mode&&fs.chmodSync(tmpfile,options.mode),fs.renameSync(tmpfile,filename),removeOnExitHandler()}catch(err){if(fd)try{fs.closeSync(fd)}catch{}throw removeOnExitHandler(),cleanup(),err}}}});var require_is_plain_obj=__commonJS({"../../node_modules/.pnpm/is-plain-obj@1.1.0/node_modules/is-plain-obj/index.js"(exports,module){"use strict";var toString=Object.prototype.toString;module.exports=function(x){var prototype;return toString.call(x)==="[object Object]"&&(prototype=Object.getPrototypeOf(x),prototype===null||prototype===Object.getPrototypeOf({}))}}});var require_sort_keys=__commonJS({"../../node_modules/.pnpm/sort-keys@1.1.2/node_modules/sort-keys/index.js"(exports,module){"use strict";var isPlainObj=require_is_plain_obj();module.exports=function(obj,opts){if(!isPlainObj(obj))throw new TypeError("Expected a plain object");opts=opts||{},typeof opts=="function"&&(opts={compare:opts});var deep=opts.deep,seenInput=[],seenOutput=[],sortKeys=function(x){var seenIndex=seenInput.indexOf(x);if(seenIndex!==-1)return seenOutput[seenIndex];var ret={},keys=Object.keys(x).sort(opts.compare);seenInput.push(x),seenOutput.push(ret);for(var i=0;i<keys.length;i++){var key=keys[i],val=x[key];ret[key]=deep&&isPlainObj(val)?sortKeys(val):val}return ret};return sortKeys(obj)}}});var require_pify2=__commonJS({"../../node_modules/.pnpm/pify@3.0.0/node_modules/pify/index.js"(exports,module){"use strict";var processFn=(fn,opts)=>function(){let P=opts.promiseModule,args=new Array(arguments.length);for(let i=0;i<arguments.length;i++)args[i]=arguments[i];return new P((resolve,reject)=>{opts.errorFirst?args.push(function(err,result){if(opts.multiArgs){let results=new Array(arguments.length-1);for(let i=1;i<arguments.length;i++)results[i-1]=arguments[i];err?(results.unshift(err),reject(results)):resolve(results)}else err?reject(err):resolve(result)}):args.push(function(result){if(opts.multiArgs){let results=new Array(arguments.length-1);for(let i=0;i<arguments.length;i++)results[i]=arguments[i];resolve(results)}else resolve(result)}),fn.apply(this,args)})};module.exports=(obj,opts)=>{opts=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},opts);let filter=key=>{let match=pattern=>typeof pattern=="string"?key===pattern:pattern.test(key);return opts.include?opts.include.some(match):!opts.exclude.some(match)},ret;typeof obj=="function"?ret=function(){return opts.excludeMain?obj.apply(this,arguments):processFn(obj,opts).apply(this,arguments)}:ret=Object.create(Object.getPrototypeOf(obj));for(let key in obj){let x=obj[key];ret[key]=typeof x=="function"&&filter(key)?processFn(x,opts):x}return ret}}});var require_make_dir=__commonJS({"../../node_modules/.pnpm/make-dir@1.3.0/node_modules/make-dir/index.js"(exports,module){"use strict";var fs=__require("fs"),path=__require("path"),pify=require_pify2(),defaults={mode:511&~process.umask(),fs},checkPath=pth=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(pth.replace(path.parse(pth).root,""))){let err=new Error(`Path contains invalid characters: ${pth}`);throw err.code="EINVAL",err}};module.exports=(input,opts)=>Promise.resolve().then(()=>{checkPath(input),opts=Object.assign({},defaults,opts);let mkdir=pify(opts.fs.mkdir),stat=pify(opts.fs.stat),make=pth=>mkdir(pth,opts.mode).then(()=>pth).catch(err=>{if(err.code==="ENOENT"){if(err.message.includes("null bytes")||path.dirname(pth)===pth)throw err;return make(path.dirname(pth)).then(()=>make(pth))}return stat(pth).then(stats=>stats.isDirectory()?pth:Promise.reject()).catch(()=>{throw err})});return make(path.resolve(input))});module.exports.sync=(input,opts)=>{checkPath(input),opts=Object.assign({},defaults,opts);let make=pth=>{try{opts.fs.mkdirSync(pth,opts.mode)}catch(err){if(err.code==="ENOENT"){if(err.message.includes("null bytes")||path.dirname(pth)===pth)throw err;return make(path.dirname(pth)),make(pth)}try{if(!opts.fs.statSync(pth).isDirectory())throw new Error("The path is not a directory")}catch{throw err}}return pth};return make(path.resolve(input))}}});var require_detect_indent=__commonJS({"../../node_modules/.pnpm/detect-indent@5.0.0/node_modules/detect-indent/index.js"(exports,module){"use strict";var INDENT_RE=/^(?:( )+|\t+)/;function getMostUsed(indents){let result=0,maxUsed=0,maxWeight=0;for(let entry of indents){let key=entry[0],val=entry[1],u=val[0],w=val[1];(u>maxUsed||u===maxUsed&&w>maxWeight)&&(maxUsed=u,maxWeight=w,result=Number(key))}return result}module.exports=str=>{if(typeof str!="string")throw new TypeError("Expected a string");let tabs=0,spaces=0,prev=0,indents=new Map,current,isIndent;for(let line of str.split(/\n/g)){if(!line)continue;let indent2,matches=line.match(INDENT_RE);matches?(indent2=matches[0].length,matches[1]?spaces++:tabs++):indent2=0;let diff=indent2-prev;prev=indent2,diff?(isIndent=diff>0,current=indents.get(isIndent?diff:-diff),current?current[0]++:(current=[1,0],indents.set(diff,current))):current&&(current[1]+=Number(isIndent))}let amount=getMostUsed(indents),type,indent;return amount?spaces>=tabs?(type="space",indent=" ".repeat(amount)):(type="tab",indent=" ".repeat(amount)):(type=null,indent=""),{amount,type,indent}}}});var require_write_json_file=__commonJS({"../../node_modules/.pnpm/write-json-file@2.2.0/node_modules/write-json-file/index.js"(exports,module){"use strict";var path=__require("path"),fs=require_graceful_fs(),writeFileAtomic=require_write_file_atomic(),sortKeys=require_sort_keys(),makeDir=require_make_dir(),pify=require_pify(),detectIndent=require_detect_indent(),init=(fn,fp,data,opts)=>{if(!fp)throw new TypeError("Expected a filepath");if(data===void 0)throw new TypeError("Expected data to stringify");return opts=Object.assign({indent:" ",sortKeys:!1},opts),opts.sortKeys&&(data=sortKeys(data,{deep:!0,compare:typeof opts.sortKeys=="function"&&opts.sortKeys})),fn(fp,data,opts)},readFile=fp=>pify(fs.readFile)(fp,"utf8").catch(()=>{}),main=(fp,data,opts)=>(opts.detectIndent?readFile(fp):Promise.resolve()).then(str=>{let indent=str?detectIndent(str).indent:opts.indent,json=JSON.stringify(data,opts.replacer,indent);return pify(writeFileAtomic)(fp,`${json}
|
|
7
|
+
import{require_ci_info}from"./chunk-2EYYB6YN.js";import{isNativeBinaryInstall}from"./chunk-NWGBDBZI.js";import{require_graceful_fs,require_load_json_file,require_pify}from"./chunk-4NTBYNFR.js";import{UNCLASSIFIED_ERROR_CODE,output_manager_default,peekCliError}from"./chunk-W634OFUG.js";import{require_signal_exit}from"./chunk-BLUPZPAS.js";import{require_build_utils}from"./chunk-5MDNVAE6.js";import{require_dist}from"./chunk-PUKYAALC.js";import{__commonJS,__require,__toESM}from"./chunk-BZENIQ7N.js";var require_imurmurhash=__commonJS({"../../node_modules/.pnpm/imurmurhash@0.1.4/node_modules/imurmurhash/imurmurhash.js"(exports,module){(function(){var cache;function MurmurHash3(key,seed){var m=this instanceof MurmurHash3?this:cache;if(m.reset(seed),typeof key=="string"&&key.length>0&&m.hash(key),m!==this)return m}MurmurHash3.prototype.hash=function(key){var h1,k1,i,top,len;switch(len=key.length,this.len+=len,k1=this.k1,i=0,this.rem){case 0:k1^=len>i?key.charCodeAt(i++)&65535:0;case 1:k1^=len>i?(key.charCodeAt(i++)&65535)<<8:0;case 2:k1^=len>i?(key.charCodeAt(i++)&65535)<<16:0;case 3:k1^=len>i?(key.charCodeAt(i)&255)<<24:0,k1^=len>i?(key.charCodeAt(i++)&65280)>>8:0}if(this.rem=len+this.rem&3,len-=this.rem,len>0){for(h1=this.h1;k1=k1*11601+(k1&65535)*3432906752&4294967295,k1=k1<<15|k1>>>17,k1=k1*13715+(k1&65535)*461832192&4294967295,h1^=k1,h1=h1<<13|h1>>>19,h1=h1*5+3864292196&4294967295,!(i>=len);)k1=key.charCodeAt(i++)&65535^(key.charCodeAt(i++)&65535)<<8^(key.charCodeAt(i++)&65535)<<16,top=key.charCodeAt(i++),k1^=(top&255)<<24^(top&65280)>>8;switch(k1=0,this.rem){case 3:k1^=(key.charCodeAt(i+2)&65535)<<16;case 2:k1^=(key.charCodeAt(i+1)&65535)<<8;case 1:k1^=key.charCodeAt(i)&65535}this.h1=h1}return this.k1=k1,this},MurmurHash3.prototype.result=function(){var k1,h1;return k1=this.k1,h1=this.h1,k1>0&&(k1=k1*11601+(k1&65535)*3432906752&4294967295,k1=k1<<15|k1>>>17,k1=k1*13715+(k1&65535)*461832192&4294967295,h1^=k1),h1^=this.len,h1^=h1>>>16,h1=h1*51819+(h1&65535)*2246770688&4294967295,h1^=h1>>>13,h1=h1*44597+(h1&65535)*3266445312&4294967295,h1^=h1>>>16,h1>>>0},MurmurHash3.prototype.reset=function(seed){return this.h1=typeof seed=="number"?seed:0,this.rem=this.k1=this.len=0,this},cache=new MurmurHash3,typeof module<"u"?module.exports=MurmurHash3:this.MurmurHash3=MurmurHash3})()}});var require_write_file_atomic=__commonJS({"../../node_modules/.pnpm/write-file-atomic@2.4.3/node_modules/write-file-atomic/index.js"(exports,module){"use strict";module.exports=writeFile;module.exports.sync=writeFileSync2;module.exports._getTmpname=getTmpname;module.exports._cleanupOnExit=cleanupOnExit;var fs=require_graceful_fs(),MurmurHash3=require_imurmurhash(),onExit=require_signal_exit(),path=__require("path"),activeFiles={},threadId=function(){try{var workerThreads=__require("worker_threads");return workerThreads.threadId}catch{return 0}}(),invocations=0;function getTmpname(filename){return filename+"."+MurmurHash3(__filename).hash(String(process.pid)).hash(String(threadId)).hash(String(++invocations)).result()}function cleanupOnExit(tmpfile){return function(){try{fs.unlinkSync(typeof tmpfile=="function"?tmpfile():tmpfile)}catch{}}}function writeFile(filename,data,options,callback){options?options instanceof Function?(callback=options,options={}):typeof options=="string"&&(options={encoding:options}):options={};var Promise2=options.Promise||global.Promise,truename,fd,tmpfile,removeOnExitHandler=onExit(cleanupOnExit(()=>tmpfile)),absoluteName=path.resolve(filename);new Promise2(function(resolve){activeFiles[absoluteName]||(activeFiles[absoluteName]=[]),activeFiles[absoluteName].push(resolve),activeFiles[absoluteName].length===1&&resolve()}).then(function(){return new Promise2(function(resolve){fs.realpath(filename,function(_,realname){truename=realname||filename,tmpfile=getTmpname(truename),resolve()})})}).then(function(){return new Promise2(function(resolve){options.mode&&options.chown?resolve():fs.stat(truename,function(err,stats){err||!stats||(options=Object.assign({},options),options.mode==null&&(options.mode=stats.mode),options.chown==null&&process.getuid&&(options.chown={uid:stats.uid,gid:stats.gid})),resolve()})})}).then(function(){return new Promise2(function(resolve,reject){fs.open(tmpfile,"w",options.mode,function(err,_fd){fd=_fd,err?reject(err):resolve()})})}).then(function(){return new Promise2(function(resolve,reject){Buffer.isBuffer(data)?fs.write(fd,data,0,data.length,0,function(err){err?reject(err):resolve()}):data!=null?fs.write(fd,String(data),0,String(options.encoding||"utf8"),function(err){err?reject(err):resolve()}):resolve()})}).then(function(){return new Promise2(function(resolve,reject){options.fsync!==!1?fs.fsync(fd,function(err){err?fs.close(fd,()=>reject(err)):fs.close(fd,resolve)}):fs.close(fd,resolve)})}).then(function(){if(fd=null,options.chown)return new Promise2(function(resolve,reject){fs.chown(tmpfile,options.chown.uid,options.chown.gid,function(err){err?reject(err):resolve()})})}).then(function(){if(options.mode)return new Promise2(function(resolve,reject){fs.chmod(tmpfile,options.mode,function(err){err?reject(err):resolve()})})}).then(function(){return new Promise2(function(resolve,reject){fs.rename(tmpfile,truename,function(err){err?reject(err):resolve()})})}).then(function(){removeOnExitHandler(),callback()},function(err){return new Promise2(resolve=>fd?fs.close(fd,resolve):resolve()).then(()=>{removeOnExitHandler(),fs.unlink(tmpfile,function(){callback(err)})})}).then(function(){activeFiles[absoluteName].shift(),activeFiles[absoluteName].length>0?activeFiles[absoluteName][0]():delete activeFiles[absoluteName]})}function writeFileSync2(filename,data,options){typeof options=="string"?options={encoding:options}:options||(options={});try{filename=fs.realpathSync(filename)}catch{}var tmpfile=getTmpname(filename);if(!options.mode||!options.chown)try{var stats=fs.statSync(filename);options=Object.assign({},options),options.mode||(options.mode=stats.mode),!options.chown&&process.getuid&&(options.chown={uid:stats.uid,gid:stats.gid})}catch{}var fd,cleanup=cleanupOnExit(tmpfile),removeOnExitHandler=onExit(cleanup);try{fd=fs.openSync(tmpfile,"w",options.mode),Buffer.isBuffer(data)?fs.writeSync(fd,data,0,data.length,0):data!=null&&fs.writeSync(fd,String(data),0,String(options.encoding||"utf8")),options.fsync!==!1&&fs.fsyncSync(fd),fs.closeSync(fd),options.chown&&fs.chownSync(tmpfile,options.chown.uid,options.chown.gid),options.mode&&fs.chmodSync(tmpfile,options.mode),fs.renameSync(tmpfile,filename),removeOnExitHandler()}catch(err){if(fd)try{fs.closeSync(fd)}catch{}throw removeOnExitHandler(),cleanup(),err}}}});var require_is_plain_obj=__commonJS({"../../node_modules/.pnpm/is-plain-obj@1.1.0/node_modules/is-plain-obj/index.js"(exports,module){"use strict";var toString=Object.prototype.toString;module.exports=function(x){var prototype;return toString.call(x)==="[object Object]"&&(prototype=Object.getPrototypeOf(x),prototype===null||prototype===Object.getPrototypeOf({}))}}});var require_sort_keys=__commonJS({"../../node_modules/.pnpm/sort-keys@1.1.2/node_modules/sort-keys/index.js"(exports,module){"use strict";var isPlainObj=require_is_plain_obj();module.exports=function(obj,opts){if(!isPlainObj(obj))throw new TypeError("Expected a plain object");opts=opts||{},typeof opts=="function"&&(opts={compare:opts});var deep=opts.deep,seenInput=[],seenOutput=[],sortKeys=function(x){var seenIndex=seenInput.indexOf(x);if(seenIndex!==-1)return seenOutput[seenIndex];var ret={},keys=Object.keys(x).sort(opts.compare);seenInput.push(x),seenOutput.push(ret);for(var i=0;i<keys.length;i++){var key=keys[i],val=x[key];ret[key]=deep&&isPlainObj(val)?sortKeys(val):val}return ret};return sortKeys(obj)}}});var require_pify2=__commonJS({"../../node_modules/.pnpm/pify@3.0.0/node_modules/pify/index.js"(exports,module){"use strict";var processFn=(fn,opts)=>function(){let P=opts.promiseModule,args=new Array(arguments.length);for(let i=0;i<arguments.length;i++)args[i]=arguments[i];return new P((resolve,reject)=>{opts.errorFirst?args.push(function(err,result){if(opts.multiArgs){let results=new Array(arguments.length-1);for(let i=1;i<arguments.length;i++)results[i-1]=arguments[i];err?(results.unshift(err),reject(results)):resolve(results)}else err?reject(err):resolve(result)}):args.push(function(result){if(opts.multiArgs){let results=new Array(arguments.length-1);for(let i=0;i<arguments.length;i++)results[i]=arguments[i];resolve(results)}else resolve(result)}),fn.apply(this,args)})};module.exports=(obj,opts)=>{opts=Object.assign({exclude:[/.+(Sync|Stream)$/],errorFirst:!0,promiseModule:Promise},opts);let filter=key=>{let match=pattern=>typeof pattern=="string"?key===pattern:pattern.test(key);return opts.include?opts.include.some(match):!opts.exclude.some(match)},ret;typeof obj=="function"?ret=function(){return opts.excludeMain?obj.apply(this,arguments):processFn(obj,opts).apply(this,arguments)}:ret=Object.create(Object.getPrototypeOf(obj));for(let key in obj){let x=obj[key];ret[key]=typeof x=="function"&&filter(key)?processFn(x,opts):x}return ret}}});var require_make_dir=__commonJS({"../../node_modules/.pnpm/make-dir@1.3.0/node_modules/make-dir/index.js"(exports,module){"use strict";var fs=__require("fs"),path=__require("path"),pify=require_pify2(),defaults={mode:511&~process.umask(),fs},checkPath=pth=>{if(process.platform==="win32"&&/[<>:"|?*]/.test(pth.replace(path.parse(pth).root,""))){let err=new Error(`Path contains invalid characters: ${pth}`);throw err.code="EINVAL",err}};module.exports=(input,opts)=>Promise.resolve().then(()=>{checkPath(input),opts=Object.assign({},defaults,opts);let mkdir=pify(opts.fs.mkdir),stat=pify(opts.fs.stat),make=pth=>mkdir(pth,opts.mode).then(()=>pth).catch(err=>{if(err.code==="ENOENT"){if(err.message.includes("null bytes")||path.dirname(pth)===pth)throw err;return make(path.dirname(pth)).then(()=>make(pth))}return stat(pth).then(stats=>stats.isDirectory()?pth:Promise.reject()).catch(()=>{throw err})});return make(path.resolve(input))});module.exports.sync=(input,opts)=>{checkPath(input),opts=Object.assign({},defaults,opts);let make=pth=>{try{opts.fs.mkdirSync(pth,opts.mode)}catch(err){if(err.code==="ENOENT"){if(err.message.includes("null bytes")||path.dirname(pth)===pth)throw err;return make(path.dirname(pth)),make(pth)}try{if(!opts.fs.statSync(pth).isDirectory())throw new Error("The path is not a directory")}catch{throw err}}return pth};return make(path.resolve(input))}}});var require_detect_indent=__commonJS({"../../node_modules/.pnpm/detect-indent@5.0.0/node_modules/detect-indent/index.js"(exports,module){"use strict";var INDENT_RE=/^(?:( )+|\t+)/;function getMostUsed(indents){let result=0,maxUsed=0,maxWeight=0;for(let entry of indents){let key=entry[0],val=entry[1],u=val[0],w=val[1];(u>maxUsed||u===maxUsed&&w>maxWeight)&&(maxUsed=u,maxWeight=w,result=Number(key))}return result}module.exports=str=>{if(typeof str!="string")throw new TypeError("Expected a string");let tabs=0,spaces=0,prev=0,indents=new Map,current,isIndent;for(let line of str.split(/\n/g)){if(!line)continue;let indent2,matches=line.match(INDENT_RE);matches?(indent2=matches[0].length,matches[1]?spaces++:tabs++):indent2=0;let diff=indent2-prev;prev=indent2,diff?(isIndent=diff>0,current=indents.get(isIndent?diff:-diff),current?current[0]++:(current=[1,0],indents.set(diff,current))):current&&(current[1]+=Number(isIndent))}let amount=getMostUsed(indents),type,indent;return amount?spaces>=tabs?(type="space",indent=" ".repeat(amount)):(type="tab",indent=" ".repeat(amount)):(type=null,indent=""),{amount,type,indent}}}});var require_write_json_file=__commonJS({"../../node_modules/.pnpm/write-json-file@2.2.0/node_modules/write-json-file/index.js"(exports,module){"use strict";var path=__require("path"),fs=require_graceful_fs(),writeFileAtomic=require_write_file_atomic(),sortKeys=require_sort_keys(),makeDir=require_make_dir(),pify=require_pify(),detectIndent=require_detect_indent(),init=(fn,fp,data,opts)=>{if(!fp)throw new TypeError("Expected a filepath");if(data===void 0)throw new TypeError("Expected data to stringify");return opts=Object.assign({indent:" ",sortKeys:!1},opts),opts.sortKeys&&(data=sortKeys(data,{deep:!0,compare:typeof opts.sortKeys=="function"&&opts.sortKeys})),fn(fp,data,opts)},readFile=fp=>pify(fs.readFile)(fp,"utf8").catch(()=>{}),main=(fp,data,opts)=>(opts.detectIndent?readFile(fp):Promise.resolve()).then(str=>{let indent=str?detectIndent(str).indent:opts.indent,json=JSON.stringify(data,opts.replacer,indent);return pify(writeFileAtomic)(fp,`${json}
|
|
8
8
|
`,{mode:opts.mode})}),mainSync=(fp,data,opts)=>{let indent=opts.indent;if(opts.detectIndent)try{let file=fs.readFileSync(fp,"utf8");indent=detectIndent(file).indent}catch(err){if(err.code!=="ENOENT")throw err}let json=JSON.stringify(data,opts.replacer,indent);return writeFileAtomic.sync(fp,`${json}
|
|
9
9
|
`,{mode:opts.mode})};module.exports=(fp,data,opts)=>makeDir(path.dirname(fp),{fs}).then(()=>init(main,fp,data,opts));module.exports.sync=(fp,data,opts)=>{makeDir.sync(path.dirname(fp),{fs}),init(mainSync,fp,data,opts)}}});var import_ci_info=__toESM(require_ci_info(),1);var launchTargets=["cli-support","darwin-arm64","darwin-x64","linux-arm64","linux-arm64-musl","linux-x64","linux-x64-musl"],launchFallbackReasons=["target_missing","ENOENT","EACCES","ENOEXEC","opt_out","inherited_native_env","download_failed","cache_unwritable"],launchSources=["download","cache"],downloadErrors=["timed_out","proxy_refused","proxy_auth_required","dns","connection_refused","connection_reset","connect_timeout","network","tls","http_403","http_404","http_other","checksum_mismatch","bad_metadata","no_binary","binary_did_not_start","binary_killed","binary_exited","filesystem","other"];function oneOf(value,allowed){return typeof value=="string"&&allowed.includes(value)?value:"other"}function readLaunch(){let launch=globalThis[Symbol.for("vercel.cli.launch")];if(launch?.runtime==="native")return launch.source===void 0?{runtime:"native"}:{runtime:"native",source:oneOf(launch.source,launchSources)};if(launch?.runtime==="cli-support")return{runtime:"cli-support"};if(launch?.runtime==="dist")return{runtime:"dist",target:oneOf(launch.target,launchTargets),reason:oneOf(launch.reason,launchFallbackReasons),...launch.downloadError!==void 0&&{downloadError:oneOf(launch.downloadError,downloadErrors)},...launch.downloadProxy!==void 0&&{downloadProxy:oneOf(launch.downloadProxy,["true","false"])},...launch.npmRegistry!==void 0&&{npmRegistry:oneOf(launch.npmRegistry,["default","custom"])},...launch.npmProxy!==void 0&&{npmProxy:oneOf(launch.npmProxy,["true","false"])},...launch.npmTls!==void 0&&{npmTls:oneOf(launch.npmTls,["true","false"])}}}function launchTags(launch){return launch?launch.runtime==="native"?{launcher:"native",...launch.source&&{launcher_source:launch.source}}:launch.runtime==="cli-support"?{launcher:"cli-support"}:{launcher:"dist",launcher_target:launch.target,launcher_fallback:launch.reason,...launch.downloadError&&{launcher_download_error:launch.downloadError},...launch.downloadProxy&&{launcher_download_proxy:launch.downloadProxy},...launch.npmRegistry&&{launcher_npm_registry:launch.npmRegistry},...launch.npmProxy&&{launcher_npm_proxy:launch.npmProxy},...launch.npmTls&&{launcher_npm_tls:launch.npmTls}}:{}}var BRIDGE_TAG=/^[a-zA-Z0-9_.:-]{1,80}$/,ERROR_CODE=/^[A-Za-z][A-Za-z0-9_-]{0,79}$/;function getStartupDurationMs(excludedMs=0){let entryAt=Reflect.get(globalThis,Symbol.for("vercel.cli.entry-at"));return typeof entryAt=="number"?Math.max(0,performance.now()-entryAt-excludedMs):void 0}function getOutcome({exitCode,completion}){return exitCode===130?"canceled":exitCode!==0?"failure":completion==="process_exit"?"unknown":"success"}function toCommandTrace(event,context){let tags={command:context.command,invocation_id:context.invocationId,cli_version:context.cliVersion,release_channel:context.releaseChannel,platform:process.platform,arch:process.arch,is_agent:String(context.isAgent),exit_code:String(context.exitCode),completion:context.completion,outcome:getOutcome(context)};if(tags.outcome==="failure"){let details=peekCliError();tags.error_code=details?.code&&ERROR_CODE.test(details.code)?details.code:UNCLASSIFIED_ERROR_CODE,tags.error_source=context.errorSource??(details?"recorded":"unknown")}return context.agentName&&BRIDGE_TAG.test(context.agentName)&&(tags.agent_name=context.agentName),import_ci_info.default.id&&(tags.ci=import_ci_info.default.id),context.subcommand&&BRIDGE_TAG.test(context.subcommand)&&(tags.subcommand=context.subcommand),context.startupDurationMs!==void 0&&(tags.startup_duration_ms=context.startupDurationMs.toFixed(3)),Object.assign(tags,launchTags(readLaunch())),{id:event.id,name:event.name,timestamp:event.timestamp,startTime:event.startTime,duration:event.duration,tags}}var SPAN_NAME=/^vc(?:\.[a-zA-Z0-9_.]{1,77})?$/,safeCount=value=>/^(0|[1-9][0-9]{0,15})$/.test(value)&&Number.isSafeInteger(Number(value))?value:void 0,SAFE_TAGS={phase:value=>BRIDGE_TAG.test(value)?value:void 0,http_method:value=>/^[A-Z]{1,7}$/.test(value)?value:void 0,http_route:value=>/^[a-z0-9/:*_-]{1,80}$/i.test(value)?value:void 0,http_status_code:value=>/^[1-5][0-9]{2}$/.test(value)?value:void 0,error:()=>"true",file_count:safeCount,byte_count:safeCount,function_count:safeCount,layer_count:safeCount,attempt:safeCount,dropped_spans:safeCount,cache_hit:value=>["true","false"].includes(value)?value:void 0,deployment_state:value=>["INITIALIZING","ANALYZING","BUILDING","DEPLOYING","READY","QUEUED","CANCELED","ERROR"].includes(value)?value:void 0},MAX_SPANS=1e3;function localWaterfall(command,events){let runId=command.parentId;if(!runId)return[];let candidates=events.filter(event=>event.name!=="vc.cli.command"&&event.id!==runId&&SPAN_NAME.test(event.name)),byId=new Map(candidates.map(event=>[event.id,event])),selected=new Map;for(let span of candidates){let chain=[],seen=new Set,current=span,complete=!1;for(;current&&!(seen.has(current.id)||chain.length>=31);){if(seen.add(current.id),chain.push(current),current.parentId===runId||current.parentId===command.id){complete=!0;break}current=byId.get(current.parentId??"")}let missing=chain.filter(ancestor=>!selected.has(ancestor.id));if(!(!complete||selected.size+missing.length>MAX_SPANS))for(let ancestor of missing.reverse())selected.set(ancestor.id,ancestor)}let commandEnd=command.timestamp+command.duration,spans=[...selected.values()].sort((a,b)=>a.timestamp-b.timestamp).map(span=>({id:span.id,name:span.name,timestamp:span.timestamp,startTime:span.startTime,duration:span.duration,parentId:span.parentId===runId&&span.timestamp>=command.timestamp&&span.timestamp<commandEnd?command.id:span.parentId,tags:Object.fromEntries(Object.entries(SAFE_TAGS).flatMap(([key,safe])=>{let value=span.tags[key]&&safe(span.tags[key]);return value?[[key,value]]:[]}))}));if(!spans.length)return[];let start=Math.min(command.timestamp,...spans.map(span=>span.timestamp)),end=Math.max(command.timestamp+command.duration,...spans.map(span=>span.timestamp+span.duration));return[{id:runId,name:"vc.cli.run",timestamp:start,startTime:command.startTime+Math.floor((start-command.timestamp)/1e3),duration:end-start,tags:selected.size<candidates.length?{dropped_spans:String(candidates.length-selected.size)}:{}},...spans]}import{randomUUID}from"node:crypto";function timings(){return Reflect.get(globalThis,Symbol.for("vercel.cli.startup-timings"))}function markStartup(phase){timings()?.marks.push({phase,timestamp:Number(process.hrtime.bigint()/BigInt(1e3))})}function startupEvents(command){let marks=timings()?.marks.filter(mark=>mark.timestamp<=command.timestamp);if(!marks?.length||!command.parentId)return[];let group={id:randomUUID(),parentId:command.parentId,name:"vc.cli.startup",timestamp:marks[0].timestamp,startTime:command.startTime+Math.floor((marks[0].timestamp-command.timestamp)/1e3),duration:command.timestamp-marks[0].timestamp,tags:{}};return[group,...marks.map((mark,index)=>({id:randomUUID(),parentId:group.id,name:`vc.cli.startup.${mark.phase}`,timestamp:mark.timestamp,startTime:command.startTime+Math.floor((mark.timestamp-command.timestamp)/1e3),duration:(marks[index+1]?.timestamp??command.timestamp)-mark.timestamp,tags:{}}))]}import{randomUUID as randomUUID3}from"node:crypto";import os from"node:os";var import_constants=__toESM(require_dist(),1),import_build_utils=__toESM(require_build_utils(),1);import{spawn}from"node:child_process";var import_load_json_file=__toESM(require_load_json_file(),1),import_write_json_file=__toESM(require_write_json_file(),1);import{randomUUID as randomUUID2}from"node:crypto";import{mkdirSync,renameSync,rmSync,writeFileSync}from"node:fs";import{dirname}from"node:path";import{readdirSync}from"node:fs";function isLibc(value){return value==="glibc"||value==="musl"}function hasMuslLoader(){try{return readdirSync("/lib").some(name=>name.startsWith("ld-musl-")&&name.endsWith(".so.1"))}catch{return!1}}function detectLibcFromReport(){let report=process.report;if(!report||typeof report.getReport!="function")return;let originalExcludeNetwork=report.excludeNetwork;try{report.excludeNetwork=!0;let{header}=report.getReport();return header?.glibcVersionRuntime?"glibc":"musl"}catch{return}finally{report.excludeNetwork=originalExcludeNetwork}}function detectLibc(){if(process.platform==="linux")return detectLibcFromReport()??(hasMuslLoader()?"musl":"glibc")}var DEFAULT_CLI_SESSION_INACTIVITY_TIMEOUT_MS=30*60*1e3,DEFAULT_CLI_SESSION_MAX_LIFETIME_MS=24*60*60*1e3;function isPersistedCliSession(value){if(!value||typeof value!="object")return!1;let session=value;return typeof session.id=="string"&&typeof session.createdAt=="number"&&Number.isFinite(session.createdAt)&&typeof session.lastSeenAt=="number"&&Number.isFinite(session.lastSeenAt)}function isPersistedCliDevice(value){if(!value||typeof value!="object")return!1;let device=value;return typeof device.id=="string"&&(device.libc===void 0||isLibc(device.libc))}function readPersistedCliSession(filePath){try{let session=import_load_json_file.default.sync(filePath);return isPersistedCliSession(session)?session:null}catch{return null}}function writePersistedCliSession(filePath,session){let temporaryPath=`${filePath}.${process.pid}.${randomUUID2()}.tmp`;try{mkdirSync(dirname(filePath),{recursive:!0}),writeFileSync(temporaryPath,`${JSON.stringify(session,null,2)}
|
|
10
10
|
`,{flag:"wx",mode:384}),renameSync(temporaryPath,filePath)}catch{}finally{try{rmSync(temporaryPath,{force:!0})}catch{}}}function readPersistedCliDevice(filePath){try{let device=import_load_json_file.default.sync(filePath);return isPersistedCliDevice(device)?device:null}catch{return null}}function writePersistedCliDevice(filePath,device){try{mkdirSync(dirname(filePath),{recursive:!0}),import_write_json_file.default.sync(filePath,device,{indent:2})}catch{}}function getOrCreatePersistedCliSession(opts){let now=opts.now?.()??Date.now(),inactivityTimeoutMs=opts.inactivityTimeoutMs??DEFAULT_CLI_SESSION_INACTIVITY_TIMEOUT_MS,maxLifetimeMs=opts.maxLifetimeMs??DEFAULT_CLI_SESSION_MAX_LIFETIME_MS,existing=readPersistedCliSession(opts.filePath),session=existing&&now-existing.lastSeenAt<=inactivityTimeoutMs&&now-existing.createdAt<=maxLifetimeMs?{...existing,lastSeenAt:now}:{id:randomUUID2(),createdAt:now,lastSeenAt:now};return writePersistedCliSession(opts.filePath,session),session}function touchPersistedCliSession(opts,session){let nextSession={...session,lastSeenAt:opts.now?.()??Date.now()};return writePersistedCliSession(opts.filePath,nextSession),nextSession}function getOrCreatePersistedCliDevice(opts){let existing=readPersistedCliDevice(opts.filePath);if(existing?.libc)return existing;let libc=(opts.detectLibc??detectLibc)(),device={id:existing?.id??randomUUID2(),...libc?{libc}:{}};return(!existing||libc)&&writePersistedCliDevice(opts.filePath,device),device}import{gzipSync,gunzipSync}from"node:zlib";var COMPRESSION_THRESHOLD=64*1024,MAX_DECOMPRESSED_BYTES=4*1024*1024;function encodeHandoff(payload){let serialized=JSON.stringify(payload),bytes=Buffer.byteLength(serialized);return bytes>COMPRESSION_THRESHOLD&&bytes<=MAX_DECOMPRESSED_BYTES?gzipSync(serialized,{level:1}):serialized}function decodeHandoff(bytes){return(bytes[0]===31&&bytes[1]===139?gunzipSync(new Uint8Array(bytes),{maxOutputLength:MAX_DECOMPRESSED_BYTES}):bytes).toString("utf8")}var LogLabel="['telemetry']:",MAX_ERROR_SERVER_MESSAGE_LENGTH=500,TelemetryClient=class{constructor({opts}){this.redactedValue="[REDACTED]";this.noValueToTriggerPrompt="[TRIGGER_PROMPT]";this.redactedArgumentsLength=args=>args&&args.length===1?"ONE":args.length>1?"MANY":"NONE";this.redactedTargetName=target=>import_constants.PROJECT_ENV_TARGET.includes(target)?target:this.redactedValue;this.isDebug=opts.isDebug||!1,this.store=opts.store}track(eventData){this.isDebug&&output_manager_default.debug(`${LogLabel} ${eventData.key}:${eventData.value}`);let event={id:randomUUID3(),eventTime:Date.now(),...eventData};this.store.add(event)}trackCliCommand(eventData){this.track({key:`command:${eventData.command}`,value:eventData.value})}trackCliSubcommand(eventData){this.store.commandSubcommand=eventData.subcommand,this.track({key:`subcommand:${eventData.subcommand}`,value:eventData.value})}trackCliArgument(eventData){eventData.value&&this.track({key:`argument:${eventData.arg}`,value:eventData.value})}trackCliOption(eventData){this.track({key:`option:${eventData.option}`,value:eventData.value})}trackRedactedCliOption(option,value){value&&this.trackCliOption({option,value:this.redactedValue})}trackTargetEnvironment(targetEnvironment){this.track({key:"target_environment",value:targetEnvironment})}trackCommandOutput(eventData){this.track({key:`output:${eventData.key}`,value:eventData.value})}trackCliFlag(flag){this.track({key:`flag:${flag}`,value:"TRUE"})}trackDeprecatedShorthand(shorthand){this.track({key:"deprecated_shorthand",value:shorthand})}trackOidcTokenRefresh(count){this.track({key:"oidc-token-refresh",value:`${count}`})}trackDpopKeyStorage(storage){this.track({key:"dpop-key",value:storage})}trackCPUs(){this.track({key:"cpu_count",value:String(os.cpus().length)})}trackAgenticUse(agent){agent&&this.track({key:"agent",value:agent})}trackPlatform(){this.track({key:"platform",value:os.platform()})}trackArch(){this.track({key:"arch",value:os.arch()})}trackLibc(libc){libc&&this.track({key:"libc",value:libc})}trackLaunch(launch){this.track({key:"launcher",value:launch.runtime}),launch.runtime==="native"&&launch.source&&this.track({key:"launcher_source",value:launch.source}),launch.runtime==="dist"&&(this.track({key:"launcher_target",value:launch.target}),this.track({key:"launcher_fallback",value:launch.reason}),launch.downloadError&&this.track({key:"launcher_download_error",value:launch.downloadError}),launch.downloadProxy&&this.track({key:"launcher_download_proxy",value:launch.downloadProxy}),launch.npmRegistry&&this.track({key:"launcher_npm_registry",value:launch.npmRegistry}),launch.npmProxy&&this.track({key:"launcher_npm_proxy",value:launch.npmProxy}),launch.npmTls&&this.track({key:"launcher_npm_tls",value:launch.npmTls}))}trackCI(ciVendorName){ciVendorName&&this.track({key:"ci",value:ciVendorName})}trackStdinIsTTY(isTTY){this.track({key:"stdin_is_tty",value:isTTY?"true":"false"})}trackVersion(version){version&&this.track({key:"version",value:version})}trackDefaultDeploy(){this.track({key:"default-deploy",value:"TRUE"})}trackProjectId(projectId){projectId&&this.track({key:"project_id",value:projectId})}trackInvocationId(invocationId){invocationId&&this.track({key:"invocation_id",value:invocationId})}trackDeviceId(deviceId){deviceId&&this.track({key:"device_id",value:deviceId})}trackVercelPluginActiveSession(){this.track({key:"vercel_plugin_active_session",value:"TRUE"})}trackVercelPluginVersion(version){version&&this.track({key:"vercel_plugin_version",value:version})}trackErrorStatus(status){typeof status<"u"&&this.track({key:"error_status",value:String(status)})}trackErrorCode(code){code&&this.track({key:"error_code",value:code})}trackErrorSlug(slug){slug&&this.track({key:"error_slug",value:slug})}trackErrorAction(action){action&&this.track({key:"error_action",value:action})}trackErrorServerMessage(serverMessage){if(serverMessage){let normalizedServerMessage=serverMessage.trim().replace(/\s+/g," ");this.track({key:"error_server_message",value:normalizedServerMessage.slice(0,MAX_ERROR_SERVER_MESSAGE_LENGTH)})}}trackExtension(){this.track({key:"extension",value:this.redactedValue})}trackLoginState(state){state==="started"&&(this.loginAttempt=randomUUID3()),this.loginAttempt&&this.track({key:`login:attempt:${this.loginAttempt}`,value:state}),state!=="started"&&(this.loginAttempt=void 0)}trackCliFlagHelp(command,subcommands){let subcommand;subcommands&&(subcommand=Array.isArray(subcommands)?subcommands[0]:subcommands),this.track({key:"flag:help",value:subcommand?`${command}:${subcommand}`:command})}trackCliOptionFormat(format){if(format){let allowedFormat=["json"].includes(format)?format:this.redactedValue;this.trackCliOption({option:"format",value:allowedFormat})}}trackCliOptionProject(value){value&&(Array.isArray(value)&&value.length===0||this.trackCliOption({option:"project",value:this.redactedValue}))}},TelemetryEventStore=class{constructor(opts){this.localEvents=[];this.teamId="NO_TEAM_ID";this.userId="NO_USER_ID";this.projectId="NO_PROJECT_ID";this.isDebug=opts?.isDebug||!1,this.events=[],this.config=opts?.config,this.globalConfigDir=opts?.globalConfigDir,this.cliDeviceOptions=opts?.cliDevice,this.cliSessionOptions=opts?.cliSession,this.invocationId=randomUUID3(),this.deviceId=randomUUID3(),this.cliDeviceOptions&&(this.cliDevice=getOrCreatePersistedCliDevice(this.cliDeviceOptions),this.deviceId=this.cliDevice.id),this.cliSessionOptions?(this.cliSession=getOrCreatePersistedCliSession(this.cliSessionOptions),this.sessionId=this.cliSession.id):this.sessionId=randomUUID3()}add(event){event.sessionId=this.sessionId,event.invocationId=this.invocationId,event.teamId=this.teamId,event.userId=this.userId,event.projectId=this.projectId,this.events.push(event)}updateConfig(config){this.config=config}updateTeamId(teamId){teamId&&(this.teamId=teamId)}updateUserId(userId){userId&&(this.userId=userId)}updateProjectId(projectId){projectId&&(this.projectId=projectId)}get hasUserId(){return this.userId!=="NO_USER_ID"}get currentProjectId(){return this.projectId}get currentInvocationId(){return this.invocationId}get currentDeviceId(){return this.deviceId}get currentLibc(){return this.cliDevice?.libc}get currentSessionId(){return this.sessionId}get readonlyEvents(){return Array.from(this.events)}reset(){this.events=[]}get enabled(){return process.env.VERCEL_TELEMETRY_DISABLED?!1:this.config?.enabled??!0}setCommandTrace(event,buildLabel,localEvent,localEvents=[]){this.commandTrace={event,buildLabel},this.localCommandEvent=localEvent,this.localEvents=localEvents}getCommandTrace(){let local=this.localCommandEvent;if(!this.commandTrace||!local)return this.commandTrace;let spans=localWaterfall(local,[...startupEvents(local),...this.localEvents]);return spans.length?{...this.commandTrace,event:{...this.commandTrace.event,parentId:local.parentId},spans}:this.commandTrace}async save({detach=!1}={}){if(this.cliSession&&this.cliSessionOptions&&(this.cliSession=touchPersistedCliSession(this.cliSessionOptions,this.cliSession)),this.isDebug){output_manager_default.log(`${LogLabel} Flushing Events`);for(let event of this.events)event.teamId=this.teamId,event.userId=this.userId,event.projectId=this.projectId,output_manager_default.log(JSON.stringify(event));let commandTrace=this.getCommandTrace();commandTrace&&output_manager_default.log(`${LogLabel} Command trace ${JSON.stringify(commandTrace)}`);return}if(this.enabled){let commandTrace=this.getCommandTrace(),sessionId=this.events[0]?.sessionId;if(!sessionId){output_manager_default.debug("Unable to send metrics: no session ID");return}let events=this.events.map(event=>{let{eventTime,invocationId,...rest}=event;return delete rest.sessionId,delete rest.teamId,delete rest.userId,delete rest.projectId,{event_time:eventTime,invocation_id:invocationId,team_id:this.teamId,user_id:this.userId,project_id:this.projectId,...rest}});if(detach&&commandTrace?.spans&&Buffer.byteLength(JSON.stringify(commandTrace))>16384){let{parentId:_parentId,...event}=commandTrace.event;commandTrace={event,buildLabel:commandTrace.buildLabel}}let payload={invocationId:this.invocationId,headers:{"Client-id":"vercel-cli","x-vercel-cli-topic-id":"generic","x-vercel-cli-session-id":sessionId},body:events,...commandTrace?{commandTrace}:{}};await this.sendToSubprocess(payload,output_manager_default.debugEnabled&&!detach)}}async sendToSubprocess(payload,outputDebugEnabled){let serialized=encodeHandoff(payload),flushArgs=["telemetry","flush"];this.globalConfigDir&&flushArgs.push("--global-config",this.globalConfigDir);let nodeBinaryPath,script;if(isNativeBinaryInstall())nodeBinaryPath=process.execPath,script=flushArgs;else{let args=[process.execPath,process.argv[0],process.argv[1]];args[0]===args[1]&&args.shift(),nodeBinaryPath=args[0],script=[...args.slice(1),...flushArgs]}let env=(0,import_build_utils.cloneEnv)(process.env,{VERCEL_TELEMETRY_DISABLED:"1"});if(outputDebugEnabled)return new Promise(resolve=>{let childProcess=spawn(nodeBinaryPath,script,{env,stdio:["pipe","pipe","pipe"]});childProcess.stdin.on("error",()=>{}),childProcess.stdin.end(serialized),childProcess.stderr.on("data",data=>output_manager_default.debug(data.toString())),childProcess.stdout.on("data",data=>output_manager_default.debug(data.toString())),childProcess.on("error",d=>{output_manager_default.debug(d),clearTimeout(timeout),resolve()});let timeout=setTimeout(()=>{output_manager_default.debug("Telemetry subprocess killed due to timeout"),childProcess.kill()},2e3);childProcess.on("exit",code=>{output_manager_default.debug(`Telemetry subprocess exited with code ${code}`),childProcess.unref(),clearTimeout(timeout),resolve()})});{let childProcess=spawn(nodeBinaryPath,script,{stdio:["pipe","ignore","ignore"],env,windowsHide:!0,detached:!0});childProcess.on("error",()=>{}),childProcess.stdin.on("error",()=>{}),childProcess.stdin.end(serialized),childProcess.unref()}}};export{readLaunch,getStartupDurationMs,toCommandTrace,markStartup,decodeHandoff,TelemetryClient,TelemetryEventStore};
|
|
@@ -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{packageName}from"./chunk-
|
|
7
|
+
import{packageName}from"./chunk-VRH7LWOC.js";import{output_manager_default}from"./chunk-W634OFUG.js";import{normalizeFlagName,stripSensitiveAuthArgs}from"./chunk-YPPDRKVC.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
|
-
`),printNextPageCommand(getNextPageCommand(client.argv,next,dropFlags)))}export{DEFAULT_LIST_LIMIT,MAX_LIST_LIMIT,parseListLimit,PaginationError,fetchAllPages,getNextPageCommand,printNextPageCommand,printNextPageHint};
|
|
10
|
+
`),printNextPageCommand(getNextPageCommand(client.argv,next,dropFlags)))}export{DEFAULT_LIST_LIMIT,MAX_LIST_LIMIT,parseListLimit,PaginationError,fetchAllPages,quoteShellArg,getNextPageCommand,printNextPageCommand,printNextPageHint};
|
|
@@ -0,0 +1,8 @@
|
|
|
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{getTeams}from"./chunk-Y6WXTTZS.js";import{param}from"./chunk-3G3FQYMW.js";import{outputActionRequired}from"./chunk-32NXYHYC.js";import{getUser}from"./chunk-CBA2KGXG.js";import{printAlignedLabel}from"./chunk-64UCX5JM.js";import{getCommandName,packageName}from"./chunk-VRH7LWOC.js";import{emoji,output_manager_default}from"./chunk-W634OFUG.js";import{require_build_utils}from"./chunk-5MDNVAE6.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var import_chalk=__toESM(require_source(),1);var import_build_utils=__toESM(require_build_utils(),1);function getScopeOrTeamFromArgv(argv){let args=argv.slice(2);for(let i=0;i<args.length;i++){let arg=args[i];if(arg==="--scope"||arg==="--team"||arg==="-S"||arg==="-T"){let next=args[i+1];if(typeof next=="string"&&!next.startsWith("-"))return next;continue}if(arg.startsWith("--scope="))return arg.slice(8);if(arg.startsWith("--team="))return arg.slice(7)}return null}async function selectOrg(client,question,autoConfirm,searchable=!1,meta,description){let{config:{currentTeam}}=client;output_manager_default.spinner("Loading teams\u2026",1e3);let user,teams;try{[user,teams]=await Promise.all([getUser(client),getTeams(client)])}finally{output_manager_default.stopSpinner()}let formatChoiceName=(name,slug,isCurrent,limited)=>{let title=`${name} (${slug})`;return isCurrent&&(title+=` ${import_chalk.default.bold("(current)")}`),limited&&(title+=` ${emoji("locked")}`),title},personalAccountChoice=user.version==="northstar"?[]:[{name:formatChoiceName(user.name||user.username,user.username,!currentTeam,user.limited),value:{type:"user",id:user.id,slug:user.username}}],orderedTeams=client.ignoresSavedTeam?teams:teams.sort(a=>a.id===user.defaultTeamId?-1:1),choices=[...personalAccountChoice,...orderedTeams.map(team=>({name:formatChoiceName(team.name||team.slug,team.slug,team.id===currentTeam,team.limited),value:{type:"team",id:team.id,slug:team.slug}}))],defaultChoiceIndex=Math.max(choices.findIndex(choice=>choice.value.id===currentTeam),0);meta&&(meta.choiceCount=choices.length);let localConfigScope=client.localConfig?.scope,explicitScope=getScopeOrTeamFromArgv(client.argv)??(typeof localConfigScope=="string"?localConfigScope:null)??(0,import_build_utils.getPlatformEnv)("ORG_ID")??null,matchExplicitScope=()=>{if(!explicitScope)return;let match=choices.find(c=>c.value.id===explicitScope||c.value.slug===explicitScope);if(match)return match.value;if(user.id===explicitScope||user.email===explicitScope||user.username===explicitScope)return choices.find(c=>c.value.type==="user")?.value};if(client.nonInteractive||!client.stdin.isTTY){let match=matchExplicitScope();if(match)return match;if(choices.length===1)return choices[0].value;let actionRequired={status:"action_required",reason:"missing_scope",message:choices.length>0?"Provide --scope explicitly. No default is applied in non-interactive mode.":"No teams available.",...choices.length>0&&{userActionRequired:!0,hint:"Ask the user which team to use, then run the matching command in next[]. Do not choose a team yourself."},choices:choices.map(c=>({id:c.value.id,name:c.value.slug})),next:choices.map(c=>({command:`${packageName} link --scope ${c.value.slug}`}))};outputActionRequired(client,actionRequired),output_manager_default.error(choices.length>0?`Multiple teams found. Teams are never auto-selected when the CLI runs without an interactive terminal. Re-run this command with ${param("--scope <slug>")}, or run ${getCommandName("teams ls")} to list your teams.`:"No teams available."),process.exit(1)}let explicitOrg=matchExplicitScope();if(explicitOrg)return explicitOrg;if(choices.length===1)return printAlignedLabel("Team",choices[0].value.slug),choices[0].value;let descriptionLine=description?`
|
|
8
|
+
${import_chalk.default.dim(` ${description}`)}`:"";if(!searchable)return await client.input.select({message:`${question}${descriptionLine}`,choices,default:choices[defaultChoiceIndex].value});let defaultChoice=choices[defaultChoiceIndex],initialChoices=defaultChoice?[defaultChoice,...choices.filter(choice=>choice!==defaultChoice)]:choices,pageSize=15,countHint=choices.length>pageSize?` ${import_chalk.default.dim(`(${choices.length} teams)`)}`:"";return await client.input.search({message:`${question}${countHint}${descriptionLine}`,pageSize,source:term=>{let searchTerm=term?.trim().toLowerCase();return searchTerm?choices.filter(choice=>choice.name.toLowerCase().includes(searchTerm)||choice.value.slug.toLowerCase().includes(searchTerm)):initialChoices}})}export{selectOrg};
|