vercel 59.14.0 → 59.15.0
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-7XFD2OHW.js +8 -0
- package/dist/chunks/add-HZC7AUBY.js +8 -0
- package/dist/chunks/add-PYUNJZ6K.js +8 -0
- package/dist/chunks/build-EFKQ6BND.js +7 -0
- package/dist/chunks/chunk-2B2MN3U5.js +8 -0
- package/dist/chunks/chunk-2H77IRPI.js +9 -0
- package/dist/chunks/chunk-2I64AYHG.js +7 -0
- package/dist/chunks/chunk-2PPXY24N.js +20 -0
- package/dist/chunks/chunk-2S6PE6GB.js +7 -0
- package/dist/chunks/{chunk-PIMIVJYK.js → chunk-3FMJYJUR.js} +7 -32
- package/dist/chunks/chunk-3IAQUNQH.js +7 -0
- package/dist/chunks/chunk-3QHJYVCY.js +7 -0
- package/dist/chunks/chunk-3QT7VOE3.js +7 -0
- package/dist/chunks/chunk-3TXEXPUW.js +7 -0
- package/dist/chunks/chunk-4MZK6JT6.js +7 -0
- package/dist/chunks/chunk-4NE5IQ25.js +7 -0
- package/dist/chunks/chunk-4PNSSS3L.js +7 -0
- package/dist/chunks/chunk-4QX77CP7.js +7 -0
- package/dist/chunks/chunk-57GHYR4Y.js +25 -0
- package/dist/chunks/chunk-5QQNYN4N.js +7 -0
- package/dist/chunks/chunk-5XJNPXQK.js +7 -0
- package/dist/chunks/chunk-6L236MNA.js +7 -0
- package/dist/chunks/chunk-6PFC3KWQ.js +7 -0
- package/dist/chunks/chunk-6QKS6QK7.js +7 -0
- package/dist/chunks/chunk-6RIQPTJA.js +8 -0
- package/dist/chunks/chunk-6TAQ6OWD.js +13 -0
- package/dist/chunks/chunk-6YAADRQB.js +9 -0
- package/dist/chunks/chunk-75CPY75D.js +15 -0
- package/dist/chunks/chunk-7HL2RPUO.js +7 -0
- package/dist/chunks/chunk-7PNYOSDU.js +9 -0
- package/dist/chunks/chunk-7R5FEXZ5.js +7 -0
- package/dist/chunks/chunk-7RMCBXBB.js +62 -0
- package/dist/chunks/chunk-7RR7MIMT.js +7 -0
- package/dist/chunks/chunk-7T6TL3GQ.js +7 -0
- package/dist/chunks/chunk-ADUYPK2G.js +13 -0
- package/dist/chunks/chunk-AFPOIDM5.js +7 -0
- package/dist/chunks/chunk-AM46JVVN.js +7 -0
- package/dist/chunks/chunk-AVSPFBLM.js +7 -0
- package/dist/chunks/chunk-B4ATVYZW.js +7 -0
- package/dist/chunks/chunk-BATE73HA.js +9 -0
- package/dist/chunks/{chunk-64IF634X.js → chunk-BRK4OB4B.js} +1 -12
- package/dist/chunks/chunk-BVH2AEFE.js +7 -0
- package/dist/chunks/chunk-CN2QZO4U.js +7 -0
- package/dist/chunks/chunk-COQGD2EI.js +8 -0
- package/dist/chunks/chunk-CUAIEGNE.js +7 -0
- package/dist/chunks/chunk-CVKB54WW.js +7 -0
- package/dist/chunks/{chunk-A3NYPUKZ.js → chunk-CZSOZKHX.js} +1 -11
- package/dist/chunks/chunk-D4MW3RDW.js +7 -0
- package/dist/chunks/chunk-DFVNL5ML.js +7 -0
- package/dist/chunks/chunk-EE3FVJLV.js +16 -0
- package/dist/chunks/chunk-EGMJRU5P.js +28 -0
- package/dist/chunks/chunk-ENBTTYJR.js +7 -0
- package/dist/chunks/chunk-ENS6KX2F.js +7 -0
- package/dist/chunks/chunk-EOBD4ZEG.js +8 -0
- package/dist/chunks/chunk-EOCTK4EA.js +7 -0
- package/dist/chunks/chunk-EQ52F4LH.js +7 -0
- package/dist/chunks/chunk-ETV3C2CV.js +7 -0
- package/dist/chunks/chunk-EVZRQGNK.js +7 -0
- package/dist/chunks/chunk-F2ZWW2IO.js +8 -0
- package/dist/chunks/chunk-FAW6NBLQ.js +7 -0
- package/dist/chunks/chunk-FI772UVH.js +7 -0
- package/dist/chunks/chunk-FKCOBJFH.js +7 -0
- package/dist/chunks/chunk-FVGESGJI.js +45 -0
- package/dist/chunks/chunk-G5FC5ZCO.js +9 -0
- package/dist/chunks/chunk-G6CTAHKY.js +39 -0
- package/dist/chunks/chunk-G7Y77DFH.js +7 -0
- package/dist/chunks/chunk-GHAY4PSD.js +7 -0
- package/dist/chunks/chunk-GHM7V3GG.js +7 -0
- package/dist/chunks/chunk-GRNTLNC7.js +7 -0
- package/dist/chunks/chunk-GTRGQIY2.js +10 -0
- package/dist/chunks/chunk-GU6VIFR5.js +7 -0
- package/dist/chunks/{constants-YMCRE6IG.js → chunk-GZNDA6SV.js} +2 -9
- package/dist/chunks/chunk-HBFPLBTX.js +10 -0
- package/dist/chunks/chunk-HEGJZJO7.js +7 -0
- package/dist/chunks/chunk-HSJ6AHWG.js +12 -0
- package/dist/chunks/chunk-HTC6KO2B.js +7 -0
- package/dist/chunks/chunk-HVUHCRZB.js +18 -0
- package/dist/chunks/chunk-HZZ5L472.js +7 -0
- package/dist/chunks/chunk-IVSSTHB6.js +7 -0
- package/dist/chunks/chunk-IVWPQYIH.js +7 -0
- package/dist/chunks/chunk-J3U3L45Y.js +7 -0
- package/dist/chunks/chunk-JAJW3P42.js +7 -0
- package/dist/chunks/chunk-JEIMW3CO.js +7 -0
- package/dist/chunks/chunk-JIYY3B4C.js +7 -0
- package/dist/chunks/chunk-JKTQV2QJ.js +7 -0
- package/dist/chunks/chunk-JTVVBRW7.js +7 -0
- package/dist/chunks/chunk-JYAUUIR4.js +7 -0
- package/dist/chunks/chunk-JZRMH5UA.js +7 -0
- package/dist/chunks/chunk-K2RAW5DI.js +10 -0
- package/dist/chunks/chunk-K3KJZLBD.js +7 -0
- package/dist/chunks/chunk-KK4AJES5.js +36 -0
- package/dist/chunks/chunk-KKS7XWEX.js +7 -0
- package/dist/chunks/chunk-KNEWCUWF.js +14 -0
- package/dist/chunks/chunk-KO733OJG.js +9 -0
- package/dist/chunks/chunk-L243RUIR.js +19 -0
- package/dist/chunks/chunk-L3JDEHCQ.js +7 -0
- package/dist/chunks/chunk-LDM3SQAU.js +13 -0
- package/dist/chunks/chunk-LNPMDXBJ.js +7 -0
- package/dist/chunks/chunk-M2W3HKV3.js +23 -0
- package/dist/chunks/chunk-M2XARQBF.js +9 -0
- package/dist/chunks/chunk-M5AV545M.js +7 -0
- package/dist/chunks/chunk-MAVRGZQP.js +7 -0
- package/dist/chunks/chunk-MBL6TXEJ.js +7 -0
- package/dist/chunks/chunk-MEAY2K5Z.js +11 -0
- package/dist/chunks/chunk-MY4MONOH.js +7 -0
- package/dist/chunks/chunk-N3N5UHIL.js +7 -0
- package/dist/chunks/chunk-N3ZZ7FHQ.js +7 -0
- package/dist/chunks/chunk-N6CNMMSZ.js +7 -0
- package/dist/chunks/chunk-NBVY237X.js +7 -0
- package/dist/chunks/chunk-NGNOUPWS.js +25 -0
- package/dist/chunks/chunk-NHTF332K.js +7 -0
- package/dist/chunks/chunk-NNP5NITU.js +15 -0
- package/dist/chunks/chunk-NS4FH2TY.js +11 -0
- package/dist/chunks/chunk-NUGLE4QY.js +11 -0
- package/dist/chunks/chunk-NWFHHUKZ.js +7 -0
- package/dist/chunks/chunk-O7G3CZ42.js +7 -0
- package/dist/chunks/chunk-OD6RZ3XZ.js +8 -0
- package/dist/chunks/chunk-OHDEHZLX.js +7 -0
- package/dist/chunks/chunk-OK3S6KFX.js +16 -0
- package/dist/chunks/chunk-OKZDOANA.js +23 -0
- package/dist/chunks/chunk-OSCCYU74.js +7 -0
- package/dist/chunks/chunk-OUHPDA7Q.js +7 -0
- package/dist/chunks/chunk-P2O5DOYE.js +7 -0
- package/dist/chunks/chunk-PHW54NU5.js +13 -0
- package/dist/chunks/chunk-PPCFQQSU.js +7 -0
- package/dist/chunks/chunk-QGIGNMII.js +8 -0
- package/dist/chunks/chunk-QGIQK47P.js +7 -0
- package/dist/chunks/chunk-QHJLRTVY.js +7 -0
- package/dist/chunks/{chunk-2473DUBR.js → chunk-QR7QPUFN.js} +1 -9
- package/dist/chunks/chunk-QTKJC2O5.js +7 -0
- package/dist/chunks/chunk-R2TGGVCT.js +19 -0
- package/dist/chunks/chunk-RAIBQIKB.js +7 -0
- package/dist/chunks/chunk-RCTYVKM5.js +16 -0
- package/dist/chunks/chunk-RKAUVPOQ.js +86 -0
- package/dist/chunks/chunk-S5CEIACD.js +7 -0
- package/dist/chunks/chunk-SGWVKRSR.js +8 -0
- package/dist/chunks/chunk-SOJCELXH.js +7 -0
- package/dist/chunks/chunk-SXUEGVWB.js +7 -0
- package/dist/chunks/{chunk-GGPE5377.js → chunk-T3GQAMBJ.js} +1 -9
- package/dist/chunks/chunk-T52FMXWC.js +7 -0
- package/dist/chunks/chunk-TG2RCYTH.js +7 -0
- package/dist/chunks/chunk-TJCIHDPZ.js +9 -0
- package/dist/chunks/chunk-TKBXN4H3.js +9 -0
- package/dist/chunks/chunk-TRTEXGVN.js +7 -0
- package/dist/chunks/chunk-TXELFFNK.js +15 -0
- package/dist/chunks/chunk-U56NHYAH.js +7 -0
- package/dist/chunks/chunk-U7KCDTCH.js +12 -0
- package/dist/chunks/chunk-UETTIYUQ.js +8 -0
- package/dist/chunks/chunk-UGMZQZJE.js +24 -0
- package/dist/chunks/chunk-ULLWCOYC.js +7 -0
- package/dist/chunks/chunk-UXTHEQVJ.js +21 -0
- package/dist/chunks/chunk-VLZ47RWM.js +44 -0
- package/dist/chunks/chunk-WKZ6JSGZ.js +7 -0
- package/dist/chunks/chunk-WPS6JZF6.js +7 -0
- package/dist/chunks/chunk-WRILLB46.js +7 -0
- package/dist/chunks/chunk-WUZD4KBL.js +7 -0
- package/dist/chunks/chunk-XCJDGQO7.js +7 -0
- package/dist/chunks/{pkg-56KRLZ5K.js → chunk-XD2LZRBS.js} +1 -7
- package/dist/chunks/chunk-XFVGX5HG.js +7 -0
- package/dist/chunks/chunk-XHOGOH6N.js +7 -0
- package/dist/chunks/{update-route-version-E3V47KNI.js → chunk-XPXOV5UO.js} +1 -7
- package/dist/chunks/chunk-XQ73QIQ3.js +7 -0
- package/dist/chunks/chunk-XSVBYDYI.js +8 -0
- package/dist/chunks/chunk-YKZLKOOD.js +12 -0
- package/dist/chunks/chunk-YMVDWVMO.js +7 -0
- package/dist/chunks/chunk-YPTLSODC.js +7 -0
- package/dist/chunks/chunk-YV6CTDHR.js +7 -0
- package/dist/chunks/chunk-Z6Y55QJW.js +23 -0
- package/dist/chunks/chunk-ZDX75YNZ.js +7 -0
- package/dist/chunks/chunk-ZIPVX7LD.js +7 -0
- package/dist/chunks/chunk-ZKYS7EAB.js +7 -0
- package/dist/chunks/chunk-ZT6KDLLY.js +20 -0
- package/dist/chunks/chunk-ZXE4XYIV.js +7 -0
- package/dist/chunks/chunk-ZZQRMRWD.js +20 -0
- package/dist/chunks/cjs-GOQHXIHX.js +54 -0
- package/dist/chunks/clear-5NQAVWIF.js +8 -0
- package/dist/chunks/compile-vercel-config-6J2XUFRK.js +7 -0
- package/dist/chunks/config-CKYRXZXL.js +7 -0
- package/dist/chunks/config-VNUY4RJ4.js +8 -0
- package/dist/chunks/connect-git-provider-GIU5WZ52.js +7 -0
- package/dist/chunks/constants-G4UYVLOF.js +7 -0
- package/dist/chunks/create-project-SRQGD4JY.js +7 -0
- package/dist/chunks/delete-GTXXCSKQ.js +10 -0
- package/dist/chunks/delete-HRJEO4MI.js +9 -0
- package/dist/chunks/detect-projects-2GNCZ4CS.js +7 -0
- package/dist/chunks/detect-services-GHILEGNU.js +7 -0
- package/dist/chunks/disable-RWCRVG5O.js +7 -0
- package/dist/chunks/discard-SHFIYCJU.js +14 -0
- package/dist/chunks/edit-DMO3NSO2.js +9 -0
- package/dist/chunks/edit-EVQI2RSS.js +8 -0
- package/dist/chunks/enable-AWDU6STD.js +7 -0
- package/dist/chunks/esm-7HVUFWMN.js +7 -0
- package/dist/chunks/esm-BZBEM7YA.js +7 -0
- package/dist/chunks/esm-CXICLFA3.js +9 -0
- package/dist/chunks/esm-HDEHVK7I.js +9 -0
- package/dist/chunks/esm-NQRLKALI.js +20 -0
- package/dist/chunks/esm-SZZI53W7.js +7 -0
- package/dist/chunks/esm-WGJFGCLK.js +7 -0
- package/dist/chunks/exec-4AISDHUV.js +16372 -0
- package/dist/chunks/export-IQKTA4RS.js +19 -0
- package/dist/chunks/fetch-proxy-AEAWC6MD.js +7 -0
- package/dist/chunks/future-E2FHKPJN.js +7 -0
- package/dist/chunks/generate-cert-for-deploy-VKOWC4PZ.js +7 -0
- package/dist/chunks/image-LDFYNOCA.js +7 -0
- package/dist/chunks/import-builders-P7CXSX2D.js +7 -0
- package/dist/chunks/inspect-3N47ODIH.js +15 -0
- package/dist/chunks/inspect-53SGDDAH.js +20 -0
- package/dist/chunks/inspect-5INZDUQS.js +19 -0
- package/dist/chunks/inspect-WMT2M335.js +9 -0
- package/dist/chunks/inspect-Y6BUCOUV.js +13 -0
- package/dist/chunks/list-BIAPHKFM.js +11 -0
- package/dist/chunks/list-DMOCRRSE.js +16 -0
- package/dist/chunks/list-K5J7OULR.js +10 -0
- package/dist/chunks/login-DEAEVUHM.js +7 -0
- package/dist/chunks/login-SRVNHI4Y.js +9 -0
- package/dist/chunks/logs-GK7CJBYY.js +7 -0
- package/dist/chunks/ls-7ZX6DCJW.js +12 -0
- package/dist/chunks/ls-AJWN5ZR4.js +12 -0
- package/dist/chunks/ls-BFJWCRLZ.js +12 -0
- package/dist/chunks/ls-KGIE6HCO.js +12 -0
- package/dist/chunks/ls-UVKTHBTE.js +8 -0
- package/dist/chunks/ls-WEG45IOC.js +8 -0
- package/dist/chunks/native-self-update-KOJVRMHR.js +7 -0
- package/dist/chunks/open-OEWPI5G6.js +7 -0
- package/dist/chunks/openapi-MO5HYMHR.js +7 -0
- package/dist/chunks/permissions-EPQBQFE3.js +7 -0
- package/dist/chunks/pkg-YFU67U7I.js +7 -0
- package/dist/chunks/prompt-missing-credentials-IUHLYSQU.js +7 -0
- package/dist/chunks/publish-JG7MEPWT.js +15 -0
- package/dist/chunks/pull-MRKXG6TO.js +7 -0
- package/dist/chunks/purchase-domain-if-available-O5ARXEZ5.js +7 -0
- package/dist/chunks/push-XOXJDFYO.js +7 -0
- package/dist/chunks/query-AL7C6WV2.js +12 -0
- package/dist/chunks/reauthenticate-SH4XR7NH.js +7 -0
- package/dist/chunks/reorder-5DMRFDBY.js +10 -0
- package/dist/chunks/reply-WSRNZWFD.js +9 -0
- package/dist/chunks/repo-info-to-url-SK3VX6UL.js +7 -0
- package/dist/chunks/resolve-YJUXQVOZ.js +12 -0
- package/dist/chunks/resolve-deployment-framework-preset-XF3NJIDS.js +7 -0
- package/dist/chunks/restore-QT3DBGKU.js +16 -0
- package/dist/chunks/rm-MHPIUEZ5.js +8 -0
- package/dist/chunks/rm-MVZFU6RG.js +8 -0
- package/dist/chunks/rm-PXR4J2US.js +8 -0
- package/dist/chunks/rm-WB2AIP3N.js +8 -0
- package/dist/chunks/rm-XRP6MRUT.js +8 -0
- package/dist/chunks/routes-5DERZV5M.js +7 -0
- package/dist/chunks/rule-inspect-TT3DRGCS.js +8 -0
- package/dist/chunks/rules-B5GW4KJH.js +7 -0
- package/dist/chunks/schema-JY5QTZOG.js +14 -0
- package/dist/chunks/schema-KCNKVFT3.js +44 -0
- package/dist/chunks/select-org-KSCYSESV.js +7 -0
- package/dist/chunks/set-7BANEWEL.js +7 -0
- package/dist/chunks/setup-and-link-ZAV3EFGC.js +7 -0
- package/dist/chunks/slugify-O5DBATYT.js +7 -0
- package/dist/chunks/stamp-OX4YO3KY.js +7 -0
- package/dist/chunks/tags-VZR66NUC.js +7 -0
- package/dist/chunks/types-LRXQEDYI.js +14 -0
- package/dist/chunks/update-RBFNNSWE.js +8 -0
- package/dist/chunks/update-route-version-XZAFPQJC.js +7 -0
- package/dist/chunks/utils-B5ZTMQKY.js +58 -0
- package/dist/chunks/vlt-builder-importer-YVCYYRVV.js +11 -0
- package/dist/commands/build/index.js +24 -4925
- package/dist/commands/deploy/index.js +43 -2875
- package/dist/commands/dev/index.js +56 -23857
- package/dist/commands/env/index.js +26 -3411
- package/dist/commands/link/index.js +4 -284
- package/dist/commands/list/index.js +6 -566
- package/dist/commands-bulk.js +1187 -87691
- package/dist/help.js +1 -8
- package/dist/index.js +19 -2591
- package/dist/version.mjs +1 -1
- package/package.json +50 -51
- package/dist/chunks/add-EQZRT4XL.js +0 -221
- package/dist/chunks/add-KMDROZC3.js +0 -196
- package/dist/chunks/add-QPJ3XMBV.js +0 -145
- package/dist/chunks/build-W4HPTAOB.js +0 -251
- package/dist/chunks/chunk-26CU4Q3C.js +0 -598
- package/dist/chunks/chunk-2HSQ7YUK.js +0 -93
- package/dist/chunks/chunk-2JIX6UMI.js +0 -4626
- package/dist/chunks/chunk-2LCFOK66.js +0 -1536
- package/dist/chunks/chunk-332LMJLZ.js +0 -16014
- package/dist/chunks/chunk-3HZLXCVL.js +0 -137
- package/dist/chunks/chunk-3VM7HWF6.js +0 -104
- package/dist/chunks/chunk-3ZE5CFVM.js +0 -346
- package/dist/chunks/chunk-4IALDGB7.js +0 -22
- package/dist/chunks/chunk-4KD5BYHB.js +0 -127
- package/dist/chunks/chunk-4TUMNBEE.js +0 -231
- package/dist/chunks/chunk-4WG2MYCI.js +0 -163
- package/dist/chunks/chunk-57RHXXXG.js +0 -150
- package/dist/chunks/chunk-5AJPMLDV.js +0 -28
- package/dist/chunks/chunk-5EIV6LPQ.js +0 -305
- package/dist/chunks/chunk-5NF5HOBJ.js +0 -1854
- package/dist/chunks/chunk-653QRQAD.js +0 -417
- package/dist/chunks/chunk-67CRVWDF.js +0 -81
- package/dist/chunks/chunk-6E6KPBXY.js +0 -43
- package/dist/chunks/chunk-75VENWDN.js +0 -1892
- package/dist/chunks/chunk-7MRDIPJY.js +0 -107
- package/dist/chunks/chunk-7NRNFV77.js +0 -875
- package/dist/chunks/chunk-7Q45OKWR.js +0 -149
- package/dist/chunks/chunk-AHU7WNL2.js +0 -24
- package/dist/chunks/chunk-AINIBIP4.js +0 -39
- package/dist/chunks/chunk-AJ5HUOWB.js +0 -14059
- package/dist/chunks/chunk-AKLTIZCU.js +0 -46
- package/dist/chunks/chunk-AQ6P3IGG.js +0 -49
- package/dist/chunks/chunk-B5NH7SLK.js +0 -324
- package/dist/chunks/chunk-B5XLQKHI.js +0 -849
- package/dist/chunks/chunk-BEQV3X2L.js +0 -86
- package/dist/chunks/chunk-CAHP7UGE.js +0 -79
- package/dist/chunks/chunk-CFDDM4TX.js +0 -13618
- package/dist/chunks/chunk-CJV7J7B5.js +0 -314
- package/dist/chunks/chunk-CV5YC2EN.js +0 -867
- package/dist/chunks/chunk-CXFY6A6W.js +0 -255
- package/dist/chunks/chunk-D5SMZXVO.js +0 -233
- package/dist/chunks/chunk-E336ZXPP.js +0 -43
- package/dist/chunks/chunk-EDMW7SBH.js +0 -246
- package/dist/chunks/chunk-EFYMIIER.js +0 -40
- package/dist/chunks/chunk-EKPSCRJZ.js +0 -26
- package/dist/chunks/chunk-EOZFDJSY.js +0 -18
- package/dist/chunks/chunk-EWBCSDTM.js +0 -1708
- package/dist/chunks/chunk-EZKW5YJ2.js +0 -177
- package/dist/chunks/chunk-F2QLCXCF.js +0 -2399
- package/dist/chunks/chunk-FGDKMNEN.js +0 -21
- package/dist/chunks/chunk-FRVG4OW3.js +0 -7438
- package/dist/chunks/chunk-FVF4UHDM.js +0 -1288
- package/dist/chunks/chunk-G5FBSUL4.js +0 -822
- package/dist/chunks/chunk-GDOUDU6O.js +0 -74
- package/dist/chunks/chunk-GGP5R3FU.js +0 -129
- package/dist/chunks/chunk-GVNCVKCI.js +0 -68
- package/dist/chunks/chunk-GY5I4AYD.js +0 -122
- package/dist/chunks/chunk-GZLPFESR.js +0 -48
- package/dist/chunks/chunk-HB4UKFDO.js +0 -1295
- package/dist/chunks/chunk-HD4DR3DA.js +0 -818
- package/dist/chunks/chunk-HKHXKSXQ.js +0 -152
- package/dist/chunks/chunk-HM24ZWQL.js +0 -174
- package/dist/chunks/chunk-HRXRELD3.js +0 -338
- package/dist/chunks/chunk-IB5L4LKZ.js +0 -1082
- package/dist/chunks/chunk-IIMSID24.js +0 -104
- package/dist/chunks/chunk-J7JKZM4T.js +0 -58
- package/dist/chunks/chunk-JC2O346E.js +0 -137
- package/dist/chunks/chunk-JSD4EZL3.js +0 -34
- package/dist/chunks/chunk-JZXJZX7O.js +0 -257
- package/dist/chunks/chunk-K3RED3VO.js +0 -566
- package/dist/chunks/chunk-KFWQ3EFH.js +0 -151
- package/dist/chunks/chunk-KW7BS25T.js +0 -466
- package/dist/chunks/chunk-KXDWXXJH.js +0 -70
- package/dist/chunks/chunk-LERVNZTD.js +0 -90
- package/dist/chunks/chunk-LYAAQDNS.js +0 -242
- package/dist/chunks/chunk-M5I6INNF.js +0 -61
- package/dist/chunks/chunk-N6HP5BLI.js +0 -18190
- package/dist/chunks/chunk-ND5CF2H3.js +0 -53
- package/dist/chunks/chunk-NFU4XJIR.js +0 -120
- package/dist/chunks/chunk-NW34PW6V.js +0 -1772
- package/dist/chunks/chunk-OAMU5QO6.js +0 -18
- package/dist/chunks/chunk-OCIZ6ZYA.js +0 -253
- package/dist/chunks/chunk-ORQZKIIB.js +0 -2914
- package/dist/chunks/chunk-P3SKP5WM.js +0 -27
- package/dist/chunks/chunk-P4QNYOFB.js +0 -96
- package/dist/chunks/chunk-P7VSBDR4.js +0 -827
- package/dist/chunks/chunk-PEC3CQSK.js +0 -90
- package/dist/chunks/chunk-PMSMUMUO.js +0 -30
- package/dist/chunks/chunk-PNGVSHR3.js +0 -40
- package/dist/chunks/chunk-POOO7W47.js +0 -916
- package/dist/chunks/chunk-PRWJUY5U.js +0 -848
- package/dist/chunks/chunk-Q2DGFCO7.js +0 -579
- package/dist/chunks/chunk-RBF2NPUP.js +0 -577
- package/dist/chunks/chunk-RBIFXFZX.js +0 -52
- package/dist/chunks/chunk-RDTRWLWB.js +0 -11441
- package/dist/chunks/chunk-RN6V5ODW.js +0 -114
- package/dist/chunks/chunk-RNSMTWA6.js +0 -122
- package/dist/chunks/chunk-RTJASENB.js +0 -59
- package/dist/chunks/chunk-RVBZ64EQ.js +0 -52
- package/dist/chunks/chunk-S7KYDPEM.js +0 -1564
- package/dist/chunks/chunk-SLPSPYVR.js +0 -334
- package/dist/chunks/chunk-SM3F3PYJ.js +0 -522
- package/dist/chunks/chunk-TO7QZGYK.js +0 -105
- package/dist/chunks/chunk-TSBUHSN7.js +0 -3495
- package/dist/chunks/chunk-TSFWMUCY.js +0 -506
- package/dist/chunks/chunk-TZ2YI2VH.js +0 -87
- package/dist/chunks/chunk-UG2WOB5L.js +0 -150
- package/dist/chunks/chunk-UNKHOYMF.js +0 -559
- package/dist/chunks/chunk-UOVWUSLG.js +0 -2099
- package/dist/chunks/chunk-V4RMJKQP.js +0 -36
- package/dist/chunks/chunk-VGIMO3ZK.js +0 -17
- package/dist/chunks/chunk-VGKSIKCC.js +0 -92
- package/dist/chunks/chunk-VP5Y3SZG.js +0 -106
- package/dist/chunks/chunk-VXYGCOKL.js +0 -28
- package/dist/chunks/chunk-W7FGI2GZ.js +0 -233
- package/dist/chunks/chunk-WGGABYO5.js +0 -31
- package/dist/chunks/chunk-XDGOOW3K.js +0 -60
- package/dist/chunks/chunk-XFF5TGRA.js +0 -303
- package/dist/chunks/chunk-XNIZGCN5.js +0 -58
- package/dist/chunks/chunk-XPJLPUKO.js +0 -117
- package/dist/chunks/chunk-XUAWTW4W.js +0 -467
- package/dist/chunks/chunk-YPQSDAEW.js +0 -29
- package/dist/chunks/chunk-YS76T533.js +0 -270
- package/dist/chunks/chunk-ZDU2NODC.js +0 -104
- package/dist/chunks/chunk-ZW6HETRE.js +0 -97
- package/dist/chunks/cjs-DV4RM7XU.js +0 -20743
- package/dist/chunks/clear-4IACMLFU.js +0 -141
- package/dist/chunks/compile-vercel-config-PQQ3OCLV.js +0 -33
- package/dist/chunks/config-BQQKMQBP.js +0 -168
- package/dist/chunks/config-OCPNHXQL.js +0 -127
- package/dist/chunks/delete-HRKIYPCO.js +0 -159
- package/dist/chunks/delete-P2UL3KTU.js +0 -226
- package/dist/chunks/detect-projects-ODNU4PK2.js +0 -18
- package/dist/chunks/detect-services-U7QGT7VO.js +0 -40
- package/dist/chunks/disable-3NYMICQ3.js +0 -198
- package/dist/chunks/discard-RNVEJUK3.js +0 -145
- package/dist/chunks/edit-63S2RQHR.js +0 -162
- package/dist/chunks/edit-CTENFZ7H.js +0 -647
- package/dist/chunks/enable-WILWXAHV.js +0 -204
- package/dist/chunks/exec-4IPHZ55G.js +0 -1291
- package/dist/chunks/export-YHGV3EPK.js +0 -177
- package/dist/chunks/fetch-proxy-R3JZNXBZ.js +0 -99
- package/dist/chunks/image-MWKS2YMB.js +0 -75
- package/dist/chunks/import-builders-H55X5VYD.js +0 -39
- package/dist/chunks/inspect-JTJMK6TO.js +0 -596
- package/dist/chunks/inspect-KBIPLMGR.js +0 -216
- package/dist/chunks/inspect-OP26FDBY.js +0 -171
- package/dist/chunks/inspect-SW4UMWTB.js +0 -175
- package/dist/chunks/inspect-WPLZPVBO.js +0 -145
- package/dist/chunks/list-HE7DWAWH.js +0 -387
- package/dist/chunks/list-OUG7WCT7.js +0 -404
- package/dist/chunks/list-QUSEURJZ.js +0 -426
- package/dist/chunks/login-MIIQJVF3.js +0 -233
- package/dist/chunks/ls-24N3DUK4.js +0 -183
- package/dist/chunks/ls-3Y7KEFKT.js +0 -175
- package/dist/chunks/ls-75F5HIJ5.js +0 -188
- package/dist/chunks/ls-REN6X2X5.js +0 -204
- package/dist/chunks/ls-W4STUDXK.js +0 -223
- package/dist/chunks/ls-Z4CTSD6C.js +0 -210
- package/dist/chunks/open-ARMCLPBK.js +0 -116
- package/dist/chunks/permissions-JKI67F62.js +0 -99
- package/dist/chunks/publish-SMSQ7OX2.js +0 -155
- package/dist/chunks/pull-4QZJZELD.js +0 -45
- package/dist/chunks/push-T6IYQY2J.js +0 -191
- package/dist/chunks/query-CP3JK5LW.js +0 -725
- package/dist/chunks/reorder-RAWKFGLV.js +0 -412
- package/dist/chunks/reply-235UHUD4.js +0 -176
- package/dist/chunks/resolve-5KCLN7QV.js +0 -237
- package/dist/chunks/resolve-deployment-framework-preset-NPE6RLV3.js +0 -36
- package/dist/chunks/restore-D24WAUAN.js +0 -252
- package/dist/chunks/rm-DBQDXSOC.js +0 -162
- package/dist/chunks/rm-G5INO77R.js +0 -148
- package/dist/chunks/rm-NLKSEKZ5.js +0 -195
- package/dist/chunks/rm-QV76CJA4.js +0 -322
- package/dist/chunks/rm-TZ4PDDUK.js +0 -147
- package/dist/chunks/routes-QVMBXOSX.js +0 -24
- package/dist/chunks/rule-inspect-76MC7I2D.js +0 -123
- package/dist/chunks/rules-IDUXVTPG.js +0 -89
- package/dist/chunks/schema-AV6BHGKY.js +0 -237
- package/dist/chunks/schema-QJVQTNB4.js +0 -381
- package/dist/chunks/set-L5NFQSCF.js +0 -250
- package/dist/chunks/setup-and-link-USSVDKCM.js +0 -65
- package/dist/chunks/stamp-AA7R3MZS.js +0 -16
- package/dist/chunks/tags-2NLUU4EC.js +0 -69
- package/dist/chunks/types-4GAJ7XQQ.js +0 -116
- package/dist/chunks/update-WGLBB65M.js +0 -224
- package/dist/chunks/vlt-builder-importer-USCFHWPL.js +0 -322
|
@@ -0,0 +1,86 @@
|
|
|
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{formatCondition,formatTransform,isTargetTransform}from"./chunk-EE3FVJLV.js";import{output_manager_default}from"./chunk-Z6Y55QJW.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";function extractEnvVarNames(value){let names=new Set;for(let m of value.matchAll(/\$\{?([A-Z_][A-Z0-9_]*)\}?/g))names.add(m[1]);return Array.from(names)}function escapeRegex(value){return value.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function referencesEnvVar(value,name){let escapedName=escapeRegex(name);return new RegExp(`\\$(?:\\{${escapedName}\\}|${escapedName}(?![A-Za-z0-9_]))`).test(value)}function referencesBracedEnvVar(value,name){return new RegExp(`\\$\\{${escapeRegex(name)}\\}`).test(value)}function collectReferencedEnvVars(values,explicitEnv=[],excludedNames=new Set){let names=new Set(explicitEnv.filter(name=>values.some(value=>referencesEnvVar(value,name))));for(let value of values)for(let name of extractEnvVarNames(value))(!excludedNames.has(name)||names.has(name)||referencesBracedEnvVar(value,name))&&names.add(name);return Array.from(names)}function collectNamedRegexCaptures(source){return new Set(Array.from(source.matchAll(/\(\?<([a-zA-Z][a-zA-Z0-9_]*)>/g),match=>match[1]))}function populateRouteEnv(route,srcSyntax="regex"){let excludedNames=srcSyntax==="regex"&&route.src?collectNamedRegexCaptures(route.src):new Set,routeValues=[...route.dest?[route.dest]:[],...Object.values(route.headers||{})],routeEnv=collectReferencedEnvVars(routeValues,route.env,excludedNames);if(route.env=routeEnv.length>0?routeEnv:void 0,route.transforms)for(let transform of route.transforms){let args=transform.args?Array.isArray(transform.args)?transform.args:[transform.args]:[],names=collectReferencedEnvVars(args,transform.env,excludedNames);transform.env=names.length>0?names:void 0}}async function generateRoute(client,projectId,input,options={}){let{teamId}=options,query=new URLSearchParams;teamId&&query.set("teamId",teamId);let queryString=query.toString(),url=`/v1/projects/${projectId}/routes/generate${queryString?`?${queryString}`:""}`;return await client.fetch(url,{method:"POST",headers:{"Content-Type":"application/json"},body:JSON.stringify(input)})}function parseTransforms(values,type,op){return values.map(value=>parseTransform(value,type,op))}function parseTransform(input,type,op){if(op==="delete"){let key2=input.trim();if(!key2)throw new Error("Delete operation requires a key");return{type,op,target:{key:key2}}}let eqIndex=input.indexOf("=");if(eqIndex===-1)throw new Error(`Invalid format: "${input}". Expected format: key=value`);let key=input.slice(0,eqIndex).trim(),args=input.slice(eqIndex+1);if(!key)throw new Error("Transform key cannot be empty");return{type,op,target:{key},args}}function collectTransforms(flags){let transforms=[];return flags.setResponseHeader&&transforms.push(...parseTransforms(flags.setResponseHeader,"response.headers","set")),flags.appendResponseHeader&&transforms.push(...parseTransforms(flags.appendResponseHeader,"response.headers","append")),flags.deleteResponseHeader&&transforms.push(...parseTransforms(flags.deleteResponseHeader,"response.headers","delete")),flags.setRequestHeader&&transforms.push(...parseTransforms(flags.setRequestHeader,"request.headers","set")),flags.appendRequestHeader&&transforms.push(...parseTransforms(flags.appendRequestHeader,"request.headers","append")),flags.deleteRequestHeader&&transforms.push(...parseTransforms(flags.deleteRequestHeader,"request.headers","delete")),flags.setRequestQuery&&transforms.push(...parseTransforms(flags.setRequestQuery,"request.query","set")),flags.appendRequestQuery&&transforms.push(...parseTransforms(flags.appendRequestQuery,"request.query","append")),flags.deleteRequestQuery&&transforms.push(...parseTransforms(flags.deleteRequestQuery,"request.query","delete")),transforms}function collectResponseHeaders(setHeaders){let headers={};for(let input of setHeaders){let eqIndex=input.indexOf("=");if(eqIndex===-1)throw new Error(`Invalid header format: "${input}". Expected format: key=value`);let key=input.slice(0,eqIndex).trim(),value=input.slice(eqIndex+1);if(!key)throw new Error("Header key cannot be empty");headers[key]=value}return headers}var MAX_NAME_LENGTH=256,MAX_DESCRIPTION_LENGTH=1024,MAX_CONDITIONS=16,VALID_SYNTAXES=["regex","path-to-regexp","equals"],REDIRECT_STATUS_CODES=[301,302,303,307,308],VALID_ACTION_TYPES=["rewrite","redirect","set-status"],ALL_ACTION_CHOICES=[{name:"Rewrite",value:"rewrite",exclusive:!0},{name:"Redirect",value:"redirect",exclusive:!0},{name:"Set Status Code",value:"set-status",exclusive:!0},{name:"Response Headers",value:"response-headers"},{name:"Request Headers",value:"request-headers"},{name:"Request Query",value:"request-query"}];function stripQuotes(str){return str.startsWith('"')&&str.endsWith('"')&&str.length>=2||str.startsWith("'")&&str.endsWith("'")&&str.length>=2?str.slice(1,-1):str}function extractTransformFlags(flags){return{setResponseHeader:flags["--set-response-header"],appendResponseHeader:flags["--append-response-header"],deleteResponseHeader:flags["--delete-response-header"],setRequestHeader:flags["--set-request-header"],appendRequestHeader:flags["--append-request-header"],deleteRequestHeader:flags["--delete-request-header"],setRequestQuery:flags["--set-request-query"],appendRequestQuery:flags["--append-request-query"],deleteRequestQuery:flags["--delete-request-query"]}}function collectHeadersAndTransforms(transformFlags){let headers=transformFlags.setResponseHeader?collectResponseHeaders(transformFlags.setResponseHeader):{},transforms=collectTransforms({...transformFlags,setResponseHeader:void 0});return{headers,transforms}}function hasAnyTransformFlags(flags){let tf=extractTransformFlags(flags);return!!(tf.setResponseHeader||tf.appendResponseHeader||tf.deleteResponseHeader||tf.setRequestHeader||tf.appendRequestHeader||tf.deleteRequestHeader||tf.setRequestQuery||tf.appendRequestQuery||tf.deleteRequestQuery)}function validateActionFlags(action,dest,status){if(!action)return dest||status!==void 0?"--action is required when using --dest or --status. Use --action rewrite, --action redirect, or --action set-status.":null;if(!VALID_ACTION_TYPES.includes(action))return`Invalid action type: "${action}". Valid types: ${VALID_ACTION_TYPES.join(", ")}`;switch(action){case"rewrite":if(!dest)return"--action rewrite requires --dest.";if(status!==void 0)return"--action rewrite does not accept --status.";break;case"redirect":if(!dest)return"--action redirect requires --dest.";if(status===void 0)return`--action redirect requires --status (${REDIRECT_STATUS_CODES.join(", ")}).`;if(!REDIRECT_STATUS_CODES.includes(status))return`Invalid redirect status: ${status}. Must be one of: ${REDIRECT_STATUS_CODES.join(", ")}`;break;case"set-status":if(dest)return"--action set-status does not accept --dest.";if(status===void 0)return"--action set-status requires --status.";if(status<100||status>599)return"Status code must be between 100 and 599.";break}return null}async function collectActionDetails(client,actionType,flags){switch(actionType){case"rewrite":{let dest=await client.input.text({message:"Destination URL:",validate:val=>val?!0:"Destination is required"});Object.assign(flags,{"--dest":dest});break}case"redirect":{let dest=await client.input.text({message:"Destination URL:",validate:val=>val?!0:"Destination is required"}),status=await client.input.select({message:"Status code:",choices:[{name:"307 - Temporary Redirect",value:307},{name:"308 - Permanent Redirect",value:308},{name:"301 - Moved Permanently",value:301},{name:"302 - Found",value:302},{name:"303 - See Other",value:303}]});Object.assign(flags,{"--dest":dest,"--status":status});break}case"set-status":{let statusCode=await client.input.text({message:"HTTP status code:",validate:val=>{let num=parseInt(val,10);return isNaN(num)||num<100||num>599?"Status code must be between 100 and 599":!0}});Object.assign(flags,{"--status":parseInt(statusCode,10)});break}case"response-headers":{await collectInteractiveHeaders(client,"response",flags);break}case"request-headers":{await collectInteractiveHeaders(client,"request-header",flags);break}case"request-query":{await collectInteractiveHeaders(client,"request-query",flags);break}}}async function collectInteractiveConditions(client,flags){let addMore=!0;for(;addMore;){let currentHas=flags["--has"]||[],currentMissing=flags["--missing"]||[];if(currentHas.length>0||currentMissing.length>0){output_manager_default.log(`
|
|
8
|
+
Current conditions:`);for(let c of currentHas)output_manager_default.print(` has: ${c}
|
|
9
|
+
`);for(let c of currentMissing)output_manager_default.print(` does not have: ${c}
|
|
10
|
+
`);output_manager_default.print(`
|
|
11
|
+
`)}let conditionType=await client.input.select({message:"Condition type:",choices:[{name:"has - Request must have this",value:"has"},{name:"does not have - Request must NOT have this",value:"missing"}]}),targetType=await client.input.select({message:"What to check:",choices:[{name:"Header",value:"header"},{name:"Cookie",value:"cookie"},{name:"Query Parameter",value:"query"},{name:"Host",value:"host"}]}),conditionValue;if(targetType==="host"){let operator=await client.input.select({message:"How to match the host:",choices:[{name:"Equals",value:"eq"},{name:"Contains",value:"contains"},{name:"Matches (regex)",value:"re"}]}),hostInput=await client.input.text({message:operator==="re"?"Host pattern (regex):":"Host value:",validate:val=>{if(!val)return"Host value is required";if(operator==="re")try{return new RegExp(val),!0}catch{return"Invalid regex pattern"}return!0}});conditionValue=`host:${operator}=${hostInput}`}else{let key=await client.input.text({message:`${targetType.charAt(0).toUpperCase()+targetType.slice(1)} name:`,validate:val=>val?!0:`${targetType} name is required`}),operator=await client.input.select({message:"How to match the value:",choices:[{name:"Exists (any value)",value:"exists"},{name:"Equals",value:"eq"},{name:"Contains",value:"contains"},{name:"Matches (regex)",value:"re"}]});if(operator==="exists")conditionValue=`${targetType}:${key}:exists`;else{let valueInput=await client.input.text({message:operator==="re"?"Value pattern (regex):":"Value:",validate:val=>{if(!val)return"Value is required";if(operator==="re")try{return new RegExp(val),!0}catch{return"Invalid regex pattern"}return!0}});conditionValue=`${targetType}:${key}:${operator}=${valueInput}`}}let flagName=conditionType==="has"?"--has":"--missing",existing=flags[flagName]||[];if(flags[flagName]=[...existing,conditionValue],(flags["--has"]||[]).length+(flags["--missing"]||[]).length>=MAX_CONDITIONS){output_manager_default.warn(`Maximum ${MAX_CONDITIONS} conditions reached.`);break}addMore=await client.input.confirm("Add another condition?",!1)}}function formatCollectedItems(flags,type){let items=[],prefix=type==="response"?"response-header":type==="request-header"?"request-header":"request-query",setItems=flags[`--set-${prefix}`]||[],appendItems=flags[`--append-${prefix}`]||[],deleteItems=flags[`--delete-${prefix}`]||[];for(let item of setItems)items.push(` set: ${item}`);for(let item of appendItems)items.push(` append: ${item}`);for(let item of deleteItems)items.push(` delete: ${item}`);return items}async function collectInteractiveHeaders(client,type,flags){let flagName=type==="response"?"--set-response-header":type==="request-header"?"--set-request-header":"--set-request-query",sectionName=type==="response"?"Response Headers":type==="request-header"?"Request Headers":"Request Query Parameters",itemName=type==="response"?"response header":type==="request-header"?"request header":"query parameter";output_manager_default.log(`
|
|
12
|
+
--- ${sectionName} ---`);let addMore=!0;for(;addMore;){let collected=formatCollectedItems(flags,type);if(collected.length>0){output_manager_default.log(`
|
|
13
|
+
Current ${sectionName.toLowerCase()}:`);for(let item of collected)output_manager_default.print(`${item}
|
|
14
|
+
`);output_manager_default.print(`
|
|
15
|
+
`)}let op=await client.input.select({message:`${sectionName} operation:`,choices:[{name:"Set",value:"set"},{name:"Append",value:"append"},{name:"Delete",value:"delete"}]}),key=await client.input.text({message:`${itemName.charAt(0).toUpperCase()+itemName.slice(1)} name:`,validate:val=>val?!0:`${itemName} name is required`});if(op==="delete"){let opFlagName=flagName.replace("--set-","--delete-"),existing=flags[opFlagName]||[];flags[opFlagName]=[...existing,key]}else{let value=await client.input.text({message:`${itemName.charAt(0).toUpperCase()+itemName.slice(1)} value:`}),opFlagName=op==="append"?flagName.replace("--set-","--append-"):flagName,existing=flags[opFlagName]||[];flags[opFlagName]=[...existing,`${key}=${value}`]}addMore=await client.input.confirm(`Add another ${itemName}?`,!1)}}var import_chalk=__toESM(require_source(),1);var CONDITION_OPERATORS=["eq","contains","re","exists"];function escapeRegExp(str){return str.replace(/[.*+?^${}()|[\]\\]/g,"\\$&")}function buildConditionValue(operator,value){if(operator==="exists")return;if(operator==="re")return value;let escapedValue=escapeRegExp(value);return operator==="contains"?`.*${escapedValue}.*`:`^${escapedValue}$`}function validateRegexPattern(pattern,context){try{new RegExp(pattern)}catch(e){throw new Error(`Invalid regex in ${context}: "${pattern}". ${e instanceof Error?e.message:""}`)}}function parseOperatorValue(valuePart){if(valuePart==="exists")return{operator:"exists",rawValue:""};let eqIdx=valuePart.indexOf("=");if(eqIdx===-1)return null;let maybeOp=valuePart.slice(0,eqIdx);return CONDITION_OPERATORS.includes(maybeOp)?{operator:maybeOp,rawValue:valuePart.slice(eqIdx+1)}:null}function parseConditions(conditions){return conditions.map(parseCondition)}function parseCondition(condition){let parts=condition.split(":");if(parts.length<2)throw new Error(`Invalid condition format: "${condition}". Expected format: type:key or type:key:value`);let type=parts[0].toLowerCase(),validTypes=["header","cookie","query","host"];if(!validTypes.includes(type))throw new Error(`Invalid condition type: "${type}". Valid types: ${validTypes.join(", ")}`);if(type==="host"){let rawValue=parts.slice(1).join(":");if(!rawValue)throw new Error("Host condition requires a value");let opResult2=parseOperatorValue(rawValue);if(opResult2){if(opResult2.operator==="exists")throw new Error('Host condition does not support "exists" operator (host always has a value)');if(opResult2.operator!=="re"&&!opResult2.rawValue)throw new Error(`Host condition with "${opResult2.operator}" operator requires a value`);let compiledValue=buildConditionValue(opResult2.operator,opResult2.rawValue);return compiledValue!==void 0&&validateRegexPattern(compiledValue,"host condition"),{type:"host",value:compiledValue}}return validateRegexPattern(rawValue,"host condition"),{type:"host",value:rawValue}}let key=parts[1];if(!key)throw new Error(`${type} condition requires a key`);let valuePart=parts.length>2?parts.slice(2).join(":"):void 0;if(valuePart===void 0)return{type,key};let opResult=parseOperatorValue(valuePart);if(opResult){if(opResult.operator==="exists")return{type,key};if(opResult.operator!=="re"&&!opResult.rawValue)throw new Error(`Condition "${opResult.operator}" operator requires a value after "="`);let compiledValue=buildConditionValue(opResult.operator,opResult.rawValue);return compiledValue!==void 0&&validateRegexPattern(compiledValue,`${type} condition value`),{type,key,...compiledValue!==void 0&&{value:compiledValue}}}return validateRegexPattern(valuePart,`${type} condition value`),{type,key,value:valuePart}}function formatCondition2(field){return field.type==="host"?`host:${field.value}`:field.value?`${field.type}:${field.key}:${field.value}`:`${field.type}:${field.key}`}function isTargetTransformType(transform,type){return transform.type===type&&isTargetTransform(transform)}function stringifyTransformArgs(args){return Array.isArray(args)?args.join(", "):args}function isPathTransform(transform){return transform.type==="request.path"}function generatedRouteToAddInput(generated){let hasConditions=[],missingConditions=[],headers={},transforms=[],dest,status;if(generated.conditions)for(let c of generated.conditions){let compiledValue=c.value!==void 0?buildConditionValue(c.operator,c.value):void 0,field=c.field==="host"?{type:"host",value:compiledValue??c.value??""}:{type:c.field,key:c.key??"",...compiledValue!==void 0&&{value:compiledValue}};c.missing?missingConditions.push(field):hasConditions.push(field)}for(let action of generated.actions)switch(action.type){case"rewrite":dest=action.dest;break;case"redirect":dest=action.dest,status=action.status;break;case"set-status":status=action.status;break;case"modify":{if(action.subType==="transform-request-path"){if(!action.requestPath)break;transforms.push({type:"request.path",op:action.requestPath.op,args:action.requestPath.value,...action.requestPath.env&&{env:action.requestPath.env}})}else if(action.subType==="response-headers"&&action.headers)for(let h of action.headers)h.op==="set"?headers[h.key]=h.value??"":transforms.push({type:"response.headers",op:h.op,target:{key:h.key},...h.op!=="delete"&&h.value&&{args:h.value}});else if(action.subType==="transform-request-header"&&action.headers)for(let h of action.headers)transforms.push({type:"request.headers",op:h.op,target:{key:h.key},...h.op!=="delete"&&h.value&&{args:h.value}});else if(action.subType==="transform-request-query"&&action.headers)for(let h of action.headers)transforms.push({type:"request.query",op:h.op,target:{key:h.key},...h.op!=="delete"&&h.value&&{args:h.value}});break}}return{name:generated.name,description:generated.description||void 0,srcSyntax:generated.pathCondition.syntax,route:{src:generated.pathCondition.value,...dest!==void 0&&{dest},...status!==void 0&&{status},...Object.keys(headers).length>0&&{headers},...transforms.length>0&&{transforms},...hasConditions.length>0&&{has:hasConditions},...missingConditions.length>0&&{missing:missingConditions}}}}function convertRouteToCurrentRoute(generated){return{name:generated.name,description:generated.description||void 0,pathCondition:generated.pathCondition,conditions:generated.conditions,actions:generated.actions}}function routingRuleToCurrentRoute(rule){let conditions=[],actions=[];if(rule.route.has)for(let c of rule.route.has)conditions.push({field:c.type,operator:c.value!==void 0?"re":"exists",key:c.key,value:c.value!==void 0?typeof c.value=="string"?c.value:JSON.stringify(c.value):void 0,missing:!1});if(rule.route.missing)for(let c of rule.route.missing)conditions.push({field:c.type,operator:c.value!==void 0?"re":"exists",key:c.key,value:c.value!==void 0?typeof c.value=="string"?c.value:JSON.stringify(c.value):void 0,missing:!0});rule.route.dest&&rule.route.status&&REDIRECT_STATUS_CODES.includes(rule.route.status)?actions.push({type:"redirect",dest:rule.route.dest,status:rule.route.status}):rule.route.dest?actions.push({type:"rewrite",dest:rule.route.dest}):rule.route.status&&actions.push({type:"set-status",status:rule.route.status});let responseHeaders=rule.route.headers?Object.entries(rule.route.headers).map(([key,value])=>({key,value,op:"set"})):[],allTransforms=rule.route.transforms??[],responseHeaderTransforms=allTransforms.filter(t=>isTargetTransformType(t,"response.headers")).map(t=>({key:typeof t.target.key=="string"?t.target.key:String(t.target.key),value:stringifyTransformArgs(t.args),op:t.op})),allResponseHeaders=[...responseHeaders,...responseHeaderTransforms];allResponseHeaders.length>0&&actions.push({type:"modify",subType:"response-headers",headers:allResponseHeaders});let requestHeaders=allTransforms.filter(t=>isTargetTransformType(t,"request.headers")).map(t=>({key:typeof t.target.key=="string"?t.target.key:String(t.target.key),value:stringifyTransformArgs(t.args),op:t.op}));requestHeaders.length>0&&actions.push({type:"modify",subType:"transform-request-header",headers:requestHeaders});let requestQuery=allTransforms.filter(t=>isTargetTransformType(t,"request.query")).map(t=>({key:typeof t.target.key=="string"?t.target.key:String(t.target.key),value:stringifyTransformArgs(t.args),op:t.op}));requestQuery.length>0&&actions.push({type:"modify",subType:"transform-request-query",headers:requestQuery});let requestPathTransforms=allTransforms.filter(isPathTransform);for(let requestPath of requestPathTransforms)actions.push({type:"modify",subType:"transform-request-path",requestPath:{value:requestPath.args,op:requestPath.op,...requestPath.env&&{env:requestPath.env}}});return{name:rule.name,description:rule.description,pathCondition:{value:rule.route.src,syntax:rule.srcSyntax??"regex"},...conditions.length>0&&{conditions},actions}}function printGeneratedRoutePreview(generated){if(output_manager_default.print(`
|
|
16
|
+
`),output_manager_default.print(` ${import_chalk.default.bold("Generated Route:")}
|
|
17
|
+
`),output_manager_default.print(` ${import_chalk.default.cyan("Name:")} ${generated.name}
|
|
18
|
+
`),generated.description&&output_manager_default.print(` ${import_chalk.default.cyan("Description:")} ${generated.description}
|
|
19
|
+
`),output_manager_default.print(` ${import_chalk.default.cyan("Source:")} ${generated.pathCondition.value}
|
|
20
|
+
`),generated.conditions&&generated.conditions.length>0){output_manager_default.print(` ${import_chalk.default.cyan("Conditions:")}
|
|
21
|
+
`);for(let c of generated.conditions){let prefix=c.missing?"does not have":"has",operatorLabel=c.operator==="eq"?"equal to":c.operator==="contains"?"containing":c.operator==="re"?"matching":"",key=c.key?` ${import_chalk.default.cyan(`"${c.key}"`)}`:"",value=c.operator==="exists"||!c.value?"":` ${operatorLabel} ${import_chalk.default.cyan(`"${c.value}"`)}`;output_manager_default.print(` ${import_chalk.default.gray(prefix)} ${c.field}${key}${value}
|
|
22
|
+
`)}}for(let action of generated.actions)action.type==="rewrite"&&action.dest?output_manager_default.print(` ${import_chalk.default.cyan("Action:")} Rewrite \u2192 ${action.dest}
|
|
23
|
+
`):action.type==="redirect"&&action.dest?output_manager_default.print(` ${import_chalk.default.cyan("Action:")} Redirect \u2192 ${action.dest} (${action.status})
|
|
24
|
+
`):action.type==="set-status"&&action.status&&output_manager_default.print(` ${import_chalk.default.cyan("Action:")} Set Status ${action.status}
|
|
25
|
+
`);for(let action of generated.actions)if(action.type==="modify"&&action.subType==="transform-request-path"&&action.requestPath){output_manager_default.print(` ${import_chalk.default.cyan("Request Path:")}
|
|
26
|
+
`);let env=action.requestPath.env?.length?import_chalk.default.gray(` (env: ${action.requestPath.env.join(", ")})`):"";output_manager_default.print(` ${import_chalk.default.yellow(action.requestPath.op)} ${import_chalk.default.cyan("path")} = ${action.requestPath.value}${env}
|
|
27
|
+
`)}else if(action.type==="modify"&&action.headers){let label=action.subType==="response-headers"?"Response Headers":action.subType==="transform-request-header"?"Request Headers":"Request Query";output_manager_default.print(` ${import_chalk.default.cyan(`${label}:`)}
|
|
28
|
+
`);for(let h of action.headers)h.op==="delete"?output_manager_default.print(` ${import_chalk.default.yellow(h.op)} ${import_chalk.default.cyan(h.key)}
|
|
29
|
+
`):output_manager_default.print(` ${import_chalk.default.yellow(h.op)} ${import_chalk.default.cyan(h.key)} = ${h.value}
|
|
30
|
+
`)}output_manager_default.print(`
|
|
31
|
+
`)}var import_chalk2=__toESM(require_source(),1);function getPrimaryActionType(route){let{dest,status}=route.route;return dest&&status&&REDIRECT_STATUS_CODES.includes(status)?"redirect":dest?"rewrite":status?"set-status":null}function getPrimaryActionLabel(route){switch(getPrimaryActionType(route)){case"rewrite":return`Rewrite \u2192 ${route.route.dest}`;case"redirect":return`Redirect \u2192 ${route.route.dest} (${route.route.status})`;case"set-status":return`Set Status ${route.route.status}`;default:return"(none)"}}function getResponseHeaders(route){let headers=route.route.headers??{};return Object.entries(headers).map(([key,value])=>({key,value}))}function getTransformsByType(route,type){return(route.route.transforms??[]).filter(t=>t.type===type)}function printRouteConfig(route){output_manager_default.print(`
|
|
32
|
+
`),output_manager_default.print(` ${import_chalk2.default.cyan("Name:")} ${route.name}
|
|
33
|
+
`),route.description&&output_manager_default.print(` ${import_chalk2.default.cyan("Description:")} ${route.description}
|
|
34
|
+
`),output_manager_default.print(` ${import_chalk2.default.cyan("Source:")} ${route.route.src} ${import_chalk2.default.gray(`(${route.srcSyntax??"regex"})`)}
|
|
35
|
+
`),output_manager_default.print(` ${import_chalk2.default.cyan("Status:")} ${route.enabled===!1?import_chalk2.default.red("Disabled"):import_chalk2.default.green("Enabled")}
|
|
36
|
+
`);let actionLabel=getPrimaryActionLabel(route);output_manager_default.print(` ${import_chalk2.default.cyan("Action:")} ${actionLabel}
|
|
37
|
+
`);let hasConds=route.route.has??[];if(hasConds.length>0){output_manager_default.print(`
|
|
38
|
+
${import_chalk2.default.cyan("Has conditions:")}
|
|
39
|
+
`);for(let c of hasConds)output_manager_default.print(` ${formatCondition(c)}
|
|
40
|
+
`)}let missingConds=route.route.missing??[];if(missingConds.length>0){output_manager_default.print(`
|
|
41
|
+
${import_chalk2.default.cyan("Does not have conditions:")}
|
|
42
|
+
`);for(let c of missingConds)output_manager_default.print(` ${formatCondition(c)}
|
|
43
|
+
`)}let responseHeaders=getResponseHeaders(route);if(responseHeaders.length>0){output_manager_default.print(`
|
|
44
|
+
${import_chalk2.default.cyan("Response Headers:")}
|
|
45
|
+
`);for(let h of responseHeaders)output_manager_default.print(` ${import_chalk2.default.cyan(h.key)} = ${h.value}
|
|
46
|
+
`)}let requestHeaders=getTransformsByType(route,"request.headers");if(requestHeaders.length>0){output_manager_default.print(`
|
|
47
|
+
${import_chalk2.default.cyan("Request Headers:")}
|
|
48
|
+
`);for(let t of requestHeaders)output_manager_default.print(` ${formatTransform(t)}
|
|
49
|
+
`)}let requestQuery=getTransformsByType(route,"request.query");if(requestQuery.length>0){output_manager_default.print(`
|
|
50
|
+
${import_chalk2.default.cyan("Request Query:")}
|
|
51
|
+
`);for(let t of requestQuery)output_manager_default.print(` ${formatTransform(t)}
|
|
52
|
+
`)}let requestPaths=getTransformsByType(route,"request.path");if(requestPaths.length>0){output_manager_default.print(`
|
|
53
|
+
${import_chalk2.default.cyan("Request Path:")}
|
|
54
|
+
`);for(let transform of requestPaths){let env=transform.env?.length?import_chalk2.default.gray(` (env: ${transform.env.join(", ")})`):"";output_manager_default.print(` ${formatTransform(transform)}${env}
|
|
55
|
+
`)}}output_manager_default.print(`
|
|
56
|
+
`)}function cloneRoute(route){return JSON.parse(JSON.stringify(route))}function applyFlagMutations(route,flags){if(flags["--name"]!==void 0){let name=flags["--name"];if(name.length>MAX_NAME_LENGTH)return`Name must be ${MAX_NAME_LENGTH} characters or less.`;route.name=name}if(flags["--description"]!==void 0){let desc=flags["--description"];if(desc.length>MAX_DESCRIPTION_LENGTH)return`Description must be ${MAX_DESCRIPTION_LENGTH} characters or less.`;route.description=desc||void 0}if(flags["--src"]!==void 0&&(route.route.src=stripQuotes(flags["--src"])),flags["--src-syntax"]!==void 0){let syntax=flags["--src-syntax"];if(!VALID_SYNTAXES.includes(syntax))return`Invalid syntax: "${syntax}". Valid options: ${VALID_SYNTAXES.join(", ")}`;route.srcSyntax=syntax}let actionFlag=flags["--action"],destFlag=flags["--dest"],statusFlag=flags["--status"],noDest=flags["--no-dest"],noStatus=flags["--no-status"];if(actionFlag){if(!VALID_ACTION_TYPES.includes(actionFlag))return`Invalid action type: "${actionFlag}". Valid types: ${VALID_ACTION_TYPES.join(", ")}`;switch(actionFlag){case"rewrite":{let dest=destFlag?stripQuotes(destFlag):void 0;if(!dest)return"--action rewrite requires --dest.";route.route.dest=dest,delete route.route.status;break}case"redirect":{let dest=destFlag?stripQuotes(destFlag):void 0;if(!dest)return"--action redirect requires --dest.";if(statusFlag===void 0)return`--action redirect requires --status (${REDIRECT_STATUS_CODES.join(", ")}).`;if(!REDIRECT_STATUS_CODES.includes(statusFlag))return`Invalid redirect status: ${statusFlag}. Must be one of: ${REDIRECT_STATUS_CODES.join(", ")}`;route.route.dest=dest,route.route.status=statusFlag;break}case"set-status":{if(statusFlag===void 0)return"--action set-status requires --status.";if(statusFlag<100||statusFlag>599)return"Status code must be between 100 and 599.";delete route.route.dest,route.route.status=statusFlag;break}}}else destFlag!==void 0&&(route.route.dest=stripQuotes(destFlag)),statusFlag!==void 0&&(route.route.status=statusFlag),noDest&&delete route.route.dest,noStatus&&delete route.route.status;flags["--clear-conditions"]&&(route.route.has=[],route.route.missing=[]),flags["--clear-headers"]&&(route.route.headers={}),flags["--clear-transforms"]&&(route.route.transforms=[]);let transformFlags=extractTransformFlags(flags);try{let{headers,transforms}=collectHeadersAndTransforms(transformFlags);if(Object.keys(headers).length>0&&(route.route.headers={...route.route.headers??{},...headers}),transforms.length>0){let existing=route.route.transforms??[];route.route.transforms=[...existing,...transforms]}}catch(e){return`Invalid transform format. ${e instanceof Error?e.message:""}`}let hasFlags=flags["--has"],missingFlags=flags["--missing"];try{if(hasFlags){let newHas=parseConditions(hasFlags),existingHas=route.route.has??[];route.route.has=[...existingHas,...newHas]}if(missingFlags){let newMissing=parseConditions(missingFlags),existingMissing=route.route.missing??[];route.route.missing=[...existingMissing,...newMissing]}}catch(e){return e instanceof Error?e.message:"Invalid condition format"}let totalConditions=(route.route.has??[]).length+(route.route.missing??[]).length;if(totalConditions>MAX_CONDITIONS)return`Too many conditions: ${totalConditions}. Maximum is ${MAX_CONDITIONS}.`;let hasDest=!!route.route.dest,hasStatus=!!route.route.status,hasHeaders=Object.keys(route.route.headers??{}).length>0,hasTransforms=(route.route.transforms??[]).length>0;return!hasDest&&!hasStatus&&!hasHeaders&&!hasTransforms?"This edit would leave the route with no action. Add --action, headers, or transforms.":null}async function runInteractiveEditLoop(client,route){for(;;){let hasConds=(route.route.has??[]).length,missingConds=(route.route.missing??[]).length,responseHeaders=getAllResponseHeaders(route).length,requestHeaders=getTransformsByType(route,"request.headers").length,requestQuery=getTransformsByType(route,"request.query").length,requestPaths=getTransformsByType(route,"request.path").length,syntaxLabel=route.srcSyntax==="path-to-regexp"?"Pattern":route.srcSyntax==="equals"?"Exact":"Regex",descriptionPreview=route.description?route.description.length>40?route.description.slice(0,40)+"...":route.description:"",editChoices=[{name:`Name (${route.name})`,value:"name"},{name:descriptionPreview?`Description (${descriptionPreview})`:"Description",value:"description"},{name:`Source (${syntaxLabel}: ${route.route.src})`,value:"source"},{name:`Primary action (${getPrimaryActionLabel(route)})`,value:"action"},{name:`Conditions (${hasConds} has, ${missingConds} missing)`,value:"conditions"},{name:`Response Headers (${responseHeaders})`,value:"response-headers"},{name:`Request Headers (${requestHeaders})`,value:"request-headers"},{name:`Request Query (${requestQuery})`,value:"request-query"},{name:`Request Path (${requestPaths})`,value:"request-path"},{name:"Done - save changes",value:"done"}],choice=await client.input.select({message:"What would you like to edit?",choices:editChoices,pageSize:editChoices.length,loop:!1});switch(choice){case"name":await editName(client,route);break;case"description":await editDescription(client,route);break;case"source":await editSource(client,route);break;case"action":await editPrimaryAction(client,route);break;case"conditions":await editConditions(client,route);break;case"response-headers":await editResponseHeaders(client,route);break;case"request-headers":await editTransformsByType(client,route,"request.headers","request-header");break;case"request-query":await editTransformsByType(client,route,"request.query","request-query");break;case"request-path":await editRequestPaths(client,route);break;case"done":break}if(choice==="done"){let hasDest=!!route.route.dest,hasStatus=!!route.route.status,hasHeaders=Object.keys(route.route.headers??{}).length>0,hasTransforms=(route.route.transforms??[]).length>0;if(!hasDest&&!hasStatus&&!hasHeaders&&!hasTransforms){output_manager_default.warn("Route has no action (no destination, status, or headers). Add an action before saving.");continue}break}}}async function editName(client,route){let name=await client.input.text({message:`Name (current: ${route.name}):`,validate:val=>val?val.length>MAX_NAME_LENGTH?`Name must be ${MAX_NAME_LENGTH} characters or less`:!0:"Route name is required"});route.name=name}async function editDescription(client,route){let desc=await client.input.text({message:`Description${route.description?` (current: ${route.description})`:""}:`,validate:val=>val&&val.length>MAX_DESCRIPTION_LENGTH?`Description must be ${MAX_DESCRIPTION_LENGTH} characters or less`:!0});route.description=desc||void 0}async function editSource(client,route){let syntaxChoice=await client.input.select({message:`Path syntax (current: ${route.srcSyntax??"regex"}):`,choices:[{name:"Path pattern (e.g., /api/:version/users/:id)",value:"path-to-regexp"},{name:"Exact match (e.g., /about)",value:"equals"},{name:"Regular expression (e.g., ^/api/(.*)$)",value:"regex"}]});route.srcSyntax=syntaxChoice;let src=await client.input.text({message:`Path pattern (current: ${route.route.src}):`,validate:val=>val?!0:"Path pattern is required"});route.route.src=src}async function editPrimaryAction(client,route){let currentType=getPrimaryActionType(route),choices=[];(currentType==="rewrite"||currentType==="redirect")&&choices.push({name:"Change destination",value:"change-dest"}),(currentType==="redirect"||currentType==="set-status")&&choices.push({name:"Change status code",value:"change-status"}),currentType!=="rewrite"&&choices.push({name:"Switch to Rewrite",value:"switch-rewrite"}),currentType!=="redirect"&&choices.push({name:"Switch to Redirect",value:"switch-redirect"}),currentType!=="set-status"&&choices.push({name:"Switch to Set Status Code",value:"switch-set-status"}),currentType?choices.push({name:"Remove primary action",value:"remove"}):(choices.push({name:"Add Rewrite",value:"switch-rewrite"}),choices.push({name:"Add Redirect",value:"switch-redirect"}),choices.push({name:"Add Set Status Code",value:"switch-set-status"})),choices.push({name:"Back",value:"back"});let action=await client.input.select({message:`Primary action (current: ${getPrimaryActionLabel(route)}):`,choices}),flags={};switch(action){case"change-dest":{let dest=await client.input.text({message:`Destination (current: ${route.route.dest}):`,validate:val=>val?!0:"Destination is required"});route.route.dest=dest;break}case"change-status":{if(currentType==="redirect"){let status=await client.input.select({message:`Status code (current: ${route.route.status}):`,choices:[{name:"307 - Temporary Redirect",value:307},{name:"308 - Permanent Redirect",value:308},{name:"301 - Moved Permanently",value:301},{name:"302 - Found",value:302},{name:"303 - See Other",value:303}]});route.route.status=status}else{let statusCode=await client.input.text({message:`Status code (current: ${route.route.status}):`,validate:val=>{let num=parseInt(val,10);return isNaN(num)||num<100||num>599?"Status code must be between 100 and 599":!0}});route.route.status=parseInt(statusCode,10)}break}case"switch-rewrite":{await collectActionDetails(client,"rewrite",flags),route.route.dest=flags["--dest"],delete route.route.status;break}case"switch-redirect":{await collectActionDetails(client,"redirect",flags),route.route.dest=flags["--dest"],route.route.status=flags["--status"];break}case"switch-set-status":{await collectActionDetails(client,"set-status",flags),delete route.route.dest,route.route.status=flags["--status"];break}case"remove":{delete route.route.dest,delete route.route.status;break}}}async function editConditions(client,route){for(;;){let hasConds=route.route.has??[],missingConds=route.route.missing??[];hasConds.length>0||missingConds.length>0?(output_manager_default.print(`
|
|
57
|
+
`),hasConds.length>0&&(output_manager_default.print(` ${import_chalk2.default.cyan("Has conditions:")}
|
|
58
|
+
`),hasConds.forEach((c,i)=>{output_manager_default.print(` ${import_chalk2.default.gray(`${i+1}.`)} ${formatCondition(c)}
|
|
59
|
+
`)})),missingConds.length>0&&(output_manager_default.print(` ${import_chalk2.default.cyan("Does not have conditions:")}
|
|
60
|
+
`),missingConds.forEach((c,i)=>{output_manager_default.print(` ${import_chalk2.default.gray(`${hasConds.length+i+1}.`)} ${formatCondition(c)}
|
|
61
|
+
`)})),output_manager_default.print(`
|
|
62
|
+
`)):output_manager_default.print(`
|
|
63
|
+
No conditions set.
|
|
64
|
+
|
|
65
|
+
`);let choices=[];(hasConds.length>0||missingConds.length>0)&&choices.push({name:"Remove a condition",value:"remove"}),choices.push({name:"Add a new condition",value:"add"}),choices.push({name:"Back",value:"back"});let action=await client.input.select({message:"Conditions:",choices});if(action==="back")break;if(action==="remove"){let allConds=[...hasConds.map((c,i)=>({label:`[has] ${formatCondition(c)}`,idx:i,kind:"has"})),...missingConds.map((c,i)=>({label:`[does not have] ${formatCondition(c)}`,idx:i,kind:"missing"}))],toRemove=await client.input.select({message:"Select condition to remove:",choices:[...allConds.map((c,i)=>({name:c.label,value:i})),{name:"Cancel",value:-1}]});if(toRemove!==-1){let selected=allConds[toRemove];selected.kind==="has"?(hasConds.splice(selected.idx,1),route.route.has=hasConds):(missingConds.splice(selected.idx,1),route.route.missing=missingConds)}}if(action==="add"){let existingHasStrings=hasConds.map(c=>formatCondition2(c)),existingMissingStrings=missingConds.map(c=>formatCondition2(c)),tempFlags={"--has":existingHasStrings.length>0?existingHasStrings:void 0,"--missing":existingMissingStrings.length>0?existingMissingStrings:void 0},hasBefore=existingHasStrings.length,missingBefore=existingMissingStrings.length;await collectInteractiveConditions(client,tempFlags);let allHas=tempFlags["--has"]||[],allMissing=tempFlags["--missing"]||[],newHas=allHas.slice(hasBefore),newMissing=allMissing.slice(missingBefore);if(newHas.length>0){let parsed=parseConditions(newHas),existing=route.route.has??[];route.route.has=[...existing,...parsed]}if(newMissing.length>0){let parsed=parseConditions(newMissing),existing=route.route.missing??[];route.route.missing=[...existing,...parsed]}break}}}function getAllResponseHeaders(route){let items=[];for(let[key,value]of Object.entries(route.route.headers??{}))items.push({op:"set",key,value,source:"headers"});let transforms=route.route.transforms??[];for(let t of transforms)t.type==="response.headers"&&items.push({op:t.op,key:typeof t.target.key=="string"?t.target.key:JSON.stringify(t.target.key),value:typeof t.args=="string"?t.args:void 0,source:"transform"});return items}function formatResponseHeaderItem(item){return item.op==="delete"?`${import_chalk2.default.yellow(item.op)} ${import_chalk2.default.cyan(item.key)}`:`${import_chalk2.default.yellow(item.op)} ${import_chalk2.default.cyan(item.key)} = ${item.value}`}async function editResponseHeaders(client,route){for(;;){let allHeaders=getAllResponseHeaders(route);allHeaders.length>0?(output_manager_default.print(`
|
|
66
|
+
`),output_manager_default.print(` ${import_chalk2.default.cyan("Response Headers:")}
|
|
67
|
+
`),allHeaders.forEach((h,i)=>{output_manager_default.print(` ${import_chalk2.default.gray(`${i+1}.`)} ${formatResponseHeaderItem(h)}
|
|
68
|
+
`)}),output_manager_default.print(`
|
|
69
|
+
`)):output_manager_default.print(`
|
|
70
|
+
No response headers set.
|
|
71
|
+
|
|
72
|
+
`);let choices=[];allHeaders.length>0&&choices.push({name:"Remove a response header",value:"remove"}),choices.push({name:"Add a response header",value:"add"}),choices.push({name:"Back",value:"back"});let action=await client.input.select({message:"Response Headers:",choices});if(action==="back")break;if(action==="remove"){let toRemove=await client.input.select({message:"Select response header to remove:",choices:[...allHeaders.map((h,i)=>({name:h.op==="delete"?`${h.op} ${h.key}`:`${h.op} ${h.key} = ${h.value}`,value:i})),{name:"Cancel",value:-1}]});if(toRemove!==-1){let item=allHeaders[toRemove];if(item.source==="headers"){let currentHeaders={...route.route.headers??{}};delete currentHeaders[item.key],route.route.headers=currentHeaders}else{let transforms=route.route.transforms??[],idx=transforms.findIndex(t=>t.type==="response.headers"&&t.op===item.op&&(typeof t.target.key=="string"?t.target.key:JSON.stringify(t.target.key))===item.key);idx!==-1&&(transforms.splice(idx,1),route.route.transforms=transforms)}}}if(action==="add"){let tempFlags={};await collectInteractiveHeaders(client,"response",tempFlags);let setHeaders=tempFlags["--set-response-header"]||[];for(let h of setHeaders){let eqIdx=h.indexOf("=");if(eqIdx!==-1){let key=h.slice(0,eqIdx).trim(),value=h.slice(eqIdx+1);route.route.headers={...route.route.headers??{},[key]:value}}}let appendHeaders=tempFlags["--append-response-header"]||[],deleteHeaders=tempFlags["--delete-response-header"]||[],existing=route.route.transforms??[],newTransforms=[];for(let h of appendHeaders){let eqIdx=h.indexOf("=");eqIdx!==-1&&newTransforms.push({type:"response.headers",op:"append",target:{key:h.slice(0,eqIdx).trim()},args:h.slice(eqIdx+1)})}for(let key of deleteHeaders)newTransforms.push({type:"response.headers",op:"delete",target:{key:key.trim()}});newTransforms.length>0&&(route.route.transforms=[...existing,...newTransforms]);break}}}async function editTransformsByType(client,route,transformType,headerType){let label=transformType==="request.headers"?"Request Headers":"Request Query",itemName=transformType==="request.headers"?"request header":"query parameter";for(;;){let allTransforms=route.route.transforms??[],matching=allTransforms.filter(t=>t.type===transformType);matching.length>0?(output_manager_default.print(`
|
|
73
|
+
`),output_manager_default.print(` ${import_chalk2.default.cyan(`${label}:`)}
|
|
74
|
+
`),matching.forEach((t,i)=>{output_manager_default.print(` ${import_chalk2.default.gray(`${i+1}.`)} ${formatTransform(t)}
|
|
75
|
+
`)}),output_manager_default.print(`
|
|
76
|
+
`)):output_manager_default.print(`
|
|
77
|
+
No ${label.toLowerCase()} set.
|
|
78
|
+
|
|
79
|
+
`);let choices=[];matching.length>0&&choices.push({name:`Remove a ${itemName}`,value:"remove"}),choices.push({name:`Add a ${itemName}`,value:"add"}),choices.push({name:"Back",value:"back"});let action=await client.input.select({message:`${label}:`,choices});if(action==="back")break;if(action==="remove"){let toRemove=await client.input.select({message:`Select ${itemName} to remove:`,choices:[...matching.map((t,i)=>({name:formatTransform(t),value:i})),{name:"Cancel",value:-1}]});if(toRemove!==-1){let matchIdx=0,removeIdx=allTransforms.findIndex(t=>{if(t.type===transformType){if(matchIdx===toRemove)return!0;matchIdx++}return!1});removeIdx!==-1&&(allTransforms.splice(removeIdx,1),route.route.transforms=allTransforms)}}if(action==="add"){let tempFlags={};await collectInteractiveHeaders(client,headerType,tempFlags);let tfFlags=extractTransformFlags(tempFlags),{transforms}=collectHeadersAndTransforms(tfFlags);transforms.length>0&&(route.route.transforms=[...allTransforms,...transforms]);break}}}async function editRequestPaths(client,route){for(;;){let allTransforms=route.route.transforms??[],matching=allTransforms.filter(transform=>transform.type==="request.path");matching.length>0?(output_manager_default.print(`
|
|
80
|
+
${import_chalk2.default.cyan("Request Path:")}
|
|
81
|
+
`),matching.forEach((transform,index)=>{let env=transform.env?.length?import_chalk2.default.gray(` (env: ${transform.env.join(", ")})`):"";output_manager_default.print(` ${import_chalk2.default.gray(`${index+1}.`)} ${formatTransform(transform)}${env}
|
|
82
|
+
`)}),output_manager_default.print(`
|
|
83
|
+
`)):output_manager_default.print(`
|
|
84
|
+
No request path transforms set.
|
|
85
|
+
|
|
86
|
+
`);let choices=[];matching.length>0&&choices.push({name:"Remove a request path transform",value:"remove"}),choices.push({name:"Add a request path transform",value:"add"}),choices.push({name:"Back",value:"back"});let action=await client.input.select({message:"Request Path:",choices});if(action==="back")break;if(action==="remove"){let toRemove=await client.input.select({message:"Select request path transform to remove:",choices:[...matching.map((transform,index)=>({name:formatTransform(transform),value:index})),{name:"Cancel",value:-1}]});if(toRemove!==-1){let matchIndex=0,removeIndex=allTransforms.findIndex(transform=>{if(transform.type==="request.path"){if(matchIndex===toRemove)return!0;matchIndex++}return!1});removeIndex!==-1&&(allTransforms.splice(removeIndex,1),route.route.transforms=allTransforms)}}if(action==="add"){let example=route.srcSyntax==="path-to-regexp"?"/:path*":route.srcSyntax==="regex"?"/$1":"/internal",args=await client.input.text({message:`Runtime-visible request path (e.g., ${example}):`,validate:value=>!value.startsWith("/")||value.startsWith("//")?"Request path must be an origin-form path starting with a single `/`":/[?#\s\x00-\x1f\x7f]/.test(value)?"Request path cannot contain a query, fragment, whitespace, or control characters":!0});route.route.transforms=[...allTransforms,{type:"request.path",op:"set",args}];break}}}export{parseConditions,populateRouteEnv,generateRoute,MAX_NAME_LENGTH,MAX_DESCRIPTION_LENGTH,MAX_CONDITIONS,VALID_SYNTAXES,REDIRECT_STATUS_CODES,ALL_ACTION_CHOICES,stripQuotes,extractTransformFlags,collectHeadersAndTransforms,hasAnyTransformFlags,validateActionFlags,collectActionDetails,collectInteractiveConditions,generatedRouteToAddInput,convertRouteToCurrentRoute,routingRuleToCurrentRoute,printGeneratedRoutePreview,printRouteConfig,cloneRoute,applyFlagMutations,runInteractiveEditLoop};
|
|
@@ -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{__commonJS,__require}from"./chunk-6L236MNA.js";var require_deque=__commonJS({"../../node_modules/.pnpm/double-ended-queue@2.1.0-0/node_modules/double-ended-queue/js/deque.js"(exports,module){"use strict";function Deque(capacity){if(this._capacity=getCapacity(capacity),this._length=0,this._front=0,isArray(capacity)){for(var len=capacity.length,i=0;i<len;++i)this[i]=capacity[i];this._length=len}}Deque.prototype.toArray=function(){for(var len=this._length,ret=new Array(len),front=this._front,capacity=this._capacity,j=0;j<len;++j)ret[j]=this[front+j&capacity-1];return ret};Deque.prototype.push=function(item){var argsLength=arguments.length,length=this._length;if(argsLength>1){var capacity=this._capacity;if(length+argsLength>capacity){for(var i=0;i<argsLength;++i){this._checkCapacity(length+1);var j=this._front+length&this._capacity-1;this[j]=arguments[i],length++,this._length=length}return length}else{for(var j=this._front,i=0;i<argsLength;++i)this[j+length&capacity-1]=arguments[i],j++;return this._length=length+argsLength,length+argsLength}}if(argsLength===0)return length;this._checkCapacity(length+1);var i=this._front+length&this._capacity-1;return this[i]=item,this._length=length+1,length+1};Deque.prototype.pop=function(){var length=this._length;if(length!==0){var i=this._front+length-1&this._capacity-1,ret=this[i];return this[i]=void 0,this._length=length-1,ret}};Deque.prototype.shift=function(){var length=this._length;if(length!==0){var front=this._front,ret=this[front];return this[front]=void 0,this._front=front+1&this._capacity-1,this._length=length-1,ret}};Deque.prototype.unshift=function(item){var length=this._length,argsLength=arguments.length;if(argsLength>1){var capacity=this._capacity;if(length+argsLength>capacity){for(var i=argsLength-1;i>=0;i--){this._checkCapacity(length+1);var capacity=this._capacity,j=(this._front-1&capacity-1^capacity)-capacity;this[j]=arguments[i],length++,this._length=length,this._front=j}return length}else{for(var front=this._front,i=argsLength-1;i>=0;i--){var j=(front-1&capacity-1^capacity)-capacity;this[j]=arguments[i],front=j}return this._front=front,this._length=length+argsLength,length+argsLength}}if(argsLength===0)return length;this._checkCapacity(length+1);var capacity=this._capacity,i=(this._front-1&capacity-1^capacity)-capacity;return this[i]=item,this._length=length+1,this._front=i,length+1};Deque.prototype.peekBack=function(){var length=this._length;if(length!==0){var index=this._front+length-1&this._capacity-1;return this[index]}};Deque.prototype.peekFront=function(){if(this._length!==0)return this[this._front]};Deque.prototype.get=function(index){var i=index;if(i===(i|0)){var len=this._length;if(i<0&&(i=i+len),!(i<0||i>=len))return this[this._front+i&this._capacity-1]}};Deque.prototype.isEmpty=function(){return this._length===0};Deque.prototype.clear=function(){for(var len=this._length,front=this._front,capacity=this._capacity,j=0;j<len;++j)this[front+j&capacity-1]=void 0;this._length=0,this._front=0};Deque.prototype.toString=function(){return this.toArray().toString()};Deque.prototype.valueOf=Deque.prototype.toString;Deque.prototype.removeFront=Deque.prototype.shift;Deque.prototype.removeBack=Deque.prototype.pop;Deque.prototype.insertFront=Deque.prototype.unshift;Deque.prototype.insertBack=Deque.prototype.push;Deque.prototype.enqueue=Deque.prototype.push;Deque.prototype.dequeue=Deque.prototype.shift;Deque.prototype.toJSON=Deque.prototype.toArray;Object.defineProperty(Deque.prototype,"length",{get:function(){return this._length},set:function(){throw new RangeError("")}});Deque.prototype._checkCapacity=function(size){this._capacity<size&&this._resizeTo(getCapacity(this._capacity*1.5+16))};Deque.prototype._resizeTo=function(capacity){var oldCapacity=this._capacity;this._capacity=capacity;var front=this._front,length=this._length;if(front+length>oldCapacity){var moveItemsCount=front+length&oldCapacity-1;arrayMove(this,0,this,oldCapacity,moveItemsCount)}};var isArray=Array.isArray;function arrayMove(src,srcIndex,dst,dstIndex,len){for(var j=0;j<len;++j)dst[j+dstIndex]=src[j+srcIndex],src[j+srcIndex]=void 0}function pow2AtLeast(n){return n=n>>>0,n=n-1,n=n|n>>1,n=n|n>>2,n=n|n>>4,n=n|n>>8,n=n|n>>16,n+1}function getCapacity(capacity){if(typeof capacity!="number")if(isArray(capacity))capacity=capacity.length;else return 16;return pow2AtLeast(Math.min(Math.max(16,capacity),1073741824))}module.exports=Deque}});var require_async_sema=__commonJS({"../../node_modules/.pnpm/async-sema@2.1.4/node_modules/async-sema/index.js"(exports,module){var EventEmitter=__require("events"),util=__require("util"),Deque=require_deque(),ReleaseEmitter=class extends EventEmitter{};function isFn(x){return typeof x=="function"}function defaultInit(){return"1"}var Sema=class{constructor(nr,{initFn=defaultInit,pauseFn,resumeFn,capacity=10}={}){if(isFn(pauseFn)^isFn(resumeFn))throw new Error("pauseFn and resumeFn must be both set for pausing");this.nrTokens=nr,this.free=new Deque(nr),this.waiting=new Deque(capacity),this.releaseEmitter=new ReleaseEmitter,this.noTokens=initFn===defaultInit,this.pauseFn=pauseFn,this.resumeFn=resumeFn,this.releaseEmitter.on("release",token=>{let p=this.waiting.shift();p?p.resolve(token):(this.resumeFn&&this.paused&&(this.paused=!1,this.resumeFn()),this.free.push(token))});for(let i=0;i<nr;i++)this.free.push(initFn())}async acquire(){let token=this.free.pop();return token||new Promise((resolve,reject)=>{this.pauseFn&&!this.paused&&(this.paused=!0,this.pauseFn()),this.waiting.push({resolve,reject})})}async v(){return this.acquire()}release(token){this.releaseEmitter.emit("release",this.noTokens?"1":token)}p(token){return this.release(token)}drain(){let a=new Array(this.nrTokens);for(let i=0;i<this.nrTokens;i++)a[i]=this.acquire();return Promise.all(a)}nrWaiting(){return this.waiting.length}};Sema.prototype.v=util.deprecate(Sema.prototype.v,"`v()` is deperecated; use `acquire()` instead");Sema.prototype.p=util.deprecate(Sema.prototype.p,"`p()` is deprecated; use `release()` instead");module.exports=Sema}});function parseTeamRefs(args){let refs=[];for(let arg of args)for(let piece of arg.split(",")){let ref=piece.trim();ref&&!refs.includes(ref)&&refs.push(ref)}return refs}function teamRefBody(ref){return ref.startsWith("team_")?{teamId:ref}:{teamSlug:ref}}export{require_async_sema,parseTeamRefs,teamRefBody};
|
|
@@ -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{require_lib}from"./chunk-VLZ47RWM.js";import{humanizePath}from"./chunk-PPCFQQSU.js";import{output_manager_default}from"./chunk-Z6Y55QJW.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_fs_extra=__toESM(require_lib(),1),import_chalk=__toESM(require_source(),1);import{homedir}from"os";import{resolve,sep}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+sep)?(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){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);return pathStat?pathStat.isDirectory()?path===homedir()&&!await client.input.confirm("You are deploying your home directory. Do you want to continue?",!1)?(output_manager_default.print(`Canceled
|
|
8
|
+
`),{valid:!1,exitCode:0}):{valid:!0,path}:(output_manager_default.prettyError({message:"Support for single file deployments has been removed.",link:"https://vercel.link/no-single-file-deployments"}),{valid:!1,exitCode:1}):(output_manager_default.error(`Could not find ${import_chalk.default.cyan(`\u201C${humanizePath(path)}\u201D`)}`),{valid:!1,exitCode:1})}export{validateRootDirectory,validatePaths};
|
|
@@ -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{__commonJS}from"./chunk-6L236MNA.js";var require_wrappy=__commonJS({"../../node_modules/.pnpm/wrappy@1.0.2/node_modules/wrappy/wrappy.js"(exports,module){module.exports=wrappy;function wrappy(fn,cb){if(fn&&cb)return wrappy(fn)(cb);if(typeof fn!="function")throw new TypeError("need wrapper function");return Object.keys(fn).forEach(function(k){wrapper[k]=fn[k]}),wrapper;function wrapper(){for(var args=new Array(arguments.length),i=0;i<args.length;i++)args[i]=arguments[i];var ret=fn.apply(this,args),cb2=args[args.length-1];return typeof ret=="function"&&ret!==cb2&&Object.keys(cb2).forEach(function(k){ret[k]=cb2[k]}),ret}}}});var require_once=__commonJS({"../../node_modules/.pnpm/once@1.4.0/node_modules/once/once.js"(exports,module){var wrappy=require_wrappy();module.exports=wrappy(once);module.exports.strict=wrappy(onceStrict);once.proto=once(function(){Object.defineProperty(Function.prototype,"once",{value:function(){return once(this)},configurable:!0}),Object.defineProperty(Function.prototype,"onceStrict",{value:function(){return onceStrict(this)},configurable:!0})});function once(fn){var f=function(){return f.called?f.value:(f.called=!0,f.value=fn.apply(this,arguments))};return f.called=!1,f}function onceStrict(fn){var f=function(){if(f.called)throw new Error(f.onceError);return f.called=!0,f.value=fn.apply(this,arguments)},name=fn.name||"Function wrapped with `once`";return f.onceError=name+" shouldn't be called more than once",f.called=!1,f}}});export{require_wrappy,require_once};
|
|
@@ -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{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_chalk=__toESM(require_source(),1);function param(text){return`${import_chalk.default.gray('"')}${import_chalk.default.bold(text)}${import_chalk.default.gray('"')}`}export{param};
|
|
@@ -4,12 +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
|
-
|
|
8
|
-
// src/util/constants.ts
|
|
9
|
-
var SENTRY_DSN = void 0;
|
|
10
|
-
var BUILD_LABEL = void 0;
|
|
11
|
-
|
|
12
|
-
export {
|
|
13
|
-
SENTRY_DSN,
|
|
14
|
-
BUILD_LABEL
|
|
15
|
-
};
|
|
7
|
+
function sleep(ms){return new Promise(resolve=>{setTimeout(resolve,ms)})}export{sleep};
|
|
@@ -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{__commonJS}from"./chunk-6L236MNA.js";var require_vendors=__commonJS({"../../node_modules/.pnpm/ci-info@4.1.0/node_modules/ci-info/vendors.json"(exports,module){module.exports=[{name:"Agola CI",constant:"AGOLA",env:"AGOLA_GIT_REF",pr:"AGOLA_PULL_REQUEST_ID"},{name:"Appcircle",constant:"APPCIRCLE",env:"AC_APPCIRCLE",pr:{env:"AC_GIT_PR",ne:"false"}},{name:"AppVeyor",constant:"APPVEYOR",env:"APPVEYOR",pr:"APPVEYOR_PULL_REQUEST_NUMBER"},{name:"AWS CodeBuild",constant:"CODEBUILD",env:"CODEBUILD_BUILD_ARN",pr:{env:"CODEBUILD_WEBHOOK_EVENT",any:["PULL_REQUEST_CREATED","PULL_REQUEST_UPDATED","PULL_REQUEST_REOPENED"]}},{name:"Azure Pipelines",constant:"AZURE_PIPELINES",env:"TF_BUILD",pr:{BUILD_REASON:"PullRequest"}},{name:"Bamboo",constant:"BAMBOO",env:"bamboo_planKey"},{name:"Bitbucket Pipelines",constant:"BITBUCKET",env:"BITBUCKET_COMMIT",pr:"BITBUCKET_PR_ID"},{name:"Bitrise",constant:"BITRISE",env:"BITRISE_IO",pr:"BITRISE_PULL_REQUEST"},{name:"Buddy",constant:"BUDDY",env:"BUDDY_WORKSPACE_ID",pr:"BUDDY_EXECUTION_PULL_REQUEST_ID"},{name:"Buildkite",constant:"BUILDKITE",env:"BUILDKITE",pr:{env:"BUILDKITE_PULL_REQUEST",ne:"false"}},{name:"CircleCI",constant:"CIRCLE",env:"CIRCLECI",pr:"CIRCLE_PULL_REQUEST"},{name:"Cirrus CI",constant:"CIRRUS",env:"CIRRUS_CI",pr:"CIRRUS_PR"},{name:"Codefresh",constant:"CODEFRESH",env:"CF_BUILD_ID",pr:{any:["CF_PULL_REQUEST_NUMBER","CF_PULL_REQUEST_ID"]}},{name:"Codemagic",constant:"CODEMAGIC",env:"CM_BUILD_ID",pr:"CM_PULL_REQUEST"},{name:"Codeship",constant:"CODESHIP",env:{CI_NAME:"codeship"}},{name:"Drone",constant:"DRONE",env:"DRONE",pr:{DRONE_BUILD_EVENT:"pull_request"}},{name:"dsari",constant:"DSARI",env:"DSARI"},{name:"Earthly",constant:"EARTHLY",env:"EARTHLY_CI"},{name:"Expo Application Services",constant:"EAS",env:"EAS_BUILD"},{name:"Gerrit",constant:"GERRIT",env:"GERRIT_PROJECT"},{name:"Gitea Actions",constant:"GITEA_ACTIONS",env:"GITEA_ACTIONS"},{name:"GitHub Actions",constant:"GITHUB_ACTIONS",env:"GITHUB_ACTIONS",pr:{GITHUB_EVENT_NAME:"pull_request"}},{name:"GitLab CI",constant:"GITLAB",env:"GITLAB_CI",pr:"CI_MERGE_REQUEST_ID"},{name:"GoCD",constant:"GOCD",env:"GO_PIPELINE_LABEL"},{name:"Google Cloud Build",constant:"GOOGLE_CLOUD_BUILD",env:"BUILDER_OUTPUT"},{name:"Harness CI",constant:"HARNESS",env:"HARNESS_BUILD_ID"},{name:"Heroku",constant:"HEROKU",env:{env:"NODE",includes:"/app/.heroku/node/bin/node"}},{name:"Hudson",constant:"HUDSON",env:"HUDSON_URL"},{name:"Jenkins",constant:"JENKINS",env:["JENKINS_URL","BUILD_ID"],pr:{any:["ghprbPullId","CHANGE_ID"]}},{name:"LayerCI",constant:"LAYERCI",env:"LAYERCI",pr:"LAYERCI_PULL_REQUEST"},{name:"Magnum CI",constant:"MAGNUM",env:"MAGNUM"},{name:"Netlify CI",constant:"NETLIFY",env:"NETLIFY",pr:{env:"PULL_REQUEST",ne:"false"}},{name:"Nevercode",constant:"NEVERCODE",env:"NEVERCODE",pr:{env:"NEVERCODE_PULL_REQUEST",ne:"false"}},{name:"Prow",constant:"PROW",env:"PROW_JOB_ID"},{name:"ReleaseHub",constant:"RELEASEHUB",env:"RELEASE_BUILD_ID"},{name:"Render",constant:"RENDER",env:"RENDER",pr:{IS_PULL_REQUEST:"true"}},{name:"Sail CI",constant:"SAIL",env:"SAILCI",pr:"SAIL_PULL_REQUEST_NUMBER"},{name:"Screwdriver",constant:"SCREWDRIVER",env:"SCREWDRIVER",pr:{env:"SD_PULL_REQUEST",ne:"false"}},{name:"Semaphore",constant:"SEMAPHORE",env:"SEMAPHORE",pr:"PULL_REQUEST_NUMBER"},{name:"Sourcehut",constant:"SOURCEHUT",env:{CI_NAME:"sourcehut"}},{name:"Strider CD",constant:"STRIDER",env:"STRIDER"},{name:"TaskCluster",constant:"TASKCLUSTER",env:["TASK_ID","RUN_ID"]},{name:"TeamCity",constant:"TEAMCITY",env:"TEAMCITY_VERSION"},{name:"Travis CI",constant:"TRAVIS",env:"TRAVIS",pr:{env:"TRAVIS_PULL_REQUEST",ne:"false"}},{name:"Vela",constant:"VELA",env:"VELA",pr:{VELA_PULL_REQUEST:"1"}},{name:"Vercel",constant:"VERCEL",env:{any:["NOW_BUILDER","VERCEL"]},pr:"VERCEL_GIT_PULL_REQUEST_ID"},{name:"Visual Studio App Center",constant:"APPCENTER",env:"APPCENTER_BUILD_ID"},{name:"Woodpecker",constant:"WOODPECKER",env:{CI:"woodpecker"},pr:{CI_BUILD_EVENT:"pull_request"}},{name:"Xcode Cloud",constant:"XCODE_CLOUD",env:"CI_XCODE_PROJECT",pr:"CI_PULL_REQUEST_NUMBER"},{name:"Xcode Server",constant:"XCODE_SERVER",env:"XCS"}]}});var require_ci_info=__commonJS({"../../node_modules/.pnpm/ci-info@4.1.0/node_modules/ci-info/index.js"(exports){"use strict";var vendors=require_vendors(),env=process.env;Object.defineProperty(exports,"_vendors",{value:vendors.map(function(v){return v.constant})});exports.name=null;exports.isPR=null;exports.id=null;vendors.forEach(function(vendor){let isCI=(Array.isArray(vendor.env)?vendor.env:[vendor.env]).every(function(obj){return checkEnv(obj)});exports[vendor.constant]=isCI,isCI&&(exports.name=vendor.name,exports.isPR=checkPR(vendor),exports.id=vendor.constant)});exports.isCI=!!(env.CI!=="false"&&(env.BUILD_ID||env.BUILD_NUMBER||env.CI||env.CI_APP_ID||env.CI_BUILD_ID||env.CI_BUILD_NUMBER||env.CI_NAME||env.CONTINUOUS_INTEGRATION||env.RUN_ID||exports.name));function checkEnv(obj){return typeof obj=="string"?!!env[obj]:"env"in obj?env[obj.env]&&env[obj.env].includes(obj.includes):"any"in obj?obj.any.some(function(k){return!!env[k]}):Object.keys(obj).every(function(k){return env[k]===obj[k]})}function checkPR(vendor){switch(typeof vendor.pr){case"string":return!!env[vendor.pr];case"object":return"env"in vendor.pr?"any"in vendor.pr?vendor.pr.any.some(function(key){return env[vendor.pr.env]===key}):vendor.pr.env in env&&env[vendor.pr.env]!==vendor.pr.ne:"any"in vendor.pr?vendor.pr.any.some(function(key){return!!env[key]}):checkEnv(vendor.pr);default:return null}}}});export{require_ci_info};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __dirname_(__filename);
|
|
7
|
+
function getInvalidSubcommand(config){return`Please specify a valid subcommand: ${Object.keys(config).join(" | ")}`}export{getInvalidSubcommand};
|
|
@@ -0,0 +1,9 @@
|
|
|
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{output_manager_default}from"./chunk-Z6Y55QJW.js";import{readFile,writeFile}from"node:fs/promises";import{access}from"node:fs/promises";import{dirname,join,resolve}from"node:path";import{homedir}from"node:os";import{spawn}from"node:child_process";import{KNOWN_AGENTS}from"@vercel/detect-agent";import{z}from"zod";var PREFS_FILE="agent-preferences.json",CLAUDE_LEGACY_PLUGIN_ID="vercel-plugin@vercel",CLAUDE_OFFICIAL_PLUGIN_ID="vercel@claude-plugins-official",VERCEL_PLUGIN_VERSION_URL="https://raw.githubusercontent.com/vercel/vercel-plugin/main/.claude-plugin/plugin.json",AGENT_TO_TARGET={[KNOWN_AGENTS.CLAUDE]:"claude-code",[KNOWN_AGENTS.COWORK]:"claude-code"};function getPluginTargetForAgent(agentName){if(agentName)return agentName===KNOWN_AGENTS.CLAUDE||agentName.startsWith("claude-code")||agentName===KNOWN_AGENTS.COWORK?"claude-code":AGENT_TO_TARGET[agentName]}var promptedAtSchema=z.codec(z.union([z.iso.date(),z.iso.datetime()]),z.date(),{decode:value=>new Date(value),encode:value=>value.toISOString()}),agentPreferencesSchema=z.object({pluginDeclined:z.boolean().optional(),pluginAutoUpdate:z.boolean().optional(),lastPromptedAt:promptedAtSchema.optional(),lastPluginAutoUpdateAttemptedAt:promptedAtSchema.optional(),lastPluginAutoUpdateAttemptedKey:z.string().optional()});async function fileExists(filePath){try{return await access(filePath),!0}catch{return!1}}async function readPrefs(client){return await client.maybeReadConfig(PREFS_FILE,agentPreferencesSchema)??{}}async function writePrefs(client,prefs){try{await client.writeConfig(PREFS_FILE,agentPreferencesSchema,prefs)}catch{}}function encodeClaudeProjectDir(projectPath){return projectPath.replace(/[^A-Za-z0-9]/g,"-")}async function projectHasUsedClaudeCode(cwd){let home=homedir(),projectsDir=join(home,".claude","projects"),dir=resolve(cwd);for(;dir!==home;){if(await fileExists(join(projectsDir,encodeClaudeProjectDir(dir))))return!0;let parent=dirname(dir);if(parent===dir)break;dir=parent}return!1}async function getPluginTargets(agentName,cwd){let targetForAgent=getPluginTargetForAgent(agentName);return targetForAgent?[targetForAgent]:agentName?[]:cwd&&await projectHasUsedClaudeCode(cwd)?["claude-code"]:[]}async function readClaudeInstalledPluginsFromRegistry(){try{let raw=await readFile(getClaudeInstalledPluginsRegistryPath(),"utf-8"),plugins=JSON.parse(raw)?.plugins??{},entries=[];for(let[id,installs]of Object.entries(plugins))if(Array.isArray(installs))for(let install of installs)!install||typeof install!="object"||entries.push({id,...install,enabled:!0});return entries}catch{return[]}}function getClaudeInstalledPluginsRegistryPath(){return join(homedir(),".claude","plugins","installed_plugins.json")}async function markStaleClaudePluginInstalls(plugins){return Promise.all(plugins.map(async plugin=>plugin.installPath&&!await fileExists(plugin.installPath)?{...plugin,stale:!0}:plugin))}async function removeClaudePluginFromRegistry(pluginId){try{let registryPath=getClaudeInstalledPluginsRegistryPath(),raw=await readFile(registryPath,"utf-8"),data=JSON.parse(raw);return!data.plugins||!(pluginId in data.plugins)?!1:(delete data.plugins[pluginId],await writeFile(registryPath,`${JSON.stringify(data,null,2)}
|
|
8
|
+
`,"utf-8"),!0)}catch(err){return output_manager_default.debug(`Failed to remove Claude plugin registry entry: ${err}`),!1}}async function isPluginInstalledForTarget(target){return target==="claude-code"?(await getClaudePluginStatus()).state==="official-only":!1}async function confirm(client,message){return client.nonInteractive||!client.stdin.isTTY?!1:client.input.confirm(message,!0)}function isSameDay(left,right){return left.getFullYear()===right.getFullYear()&&left.getMonth()===right.getMonth()&&left.getDate()===right.getDate()}function wasPromptedToday(prefs){return prefs.lastPromptedAt?isSameDay(prefs.lastPromptedAt,new Date):!1}function wasPluginAutoUpdateAttemptedToday(prefs,attemptKey){return prefs.lastPluginAutoUpdateAttemptedKey===attemptKey&&!!prefs.lastPluginAutoUpdateAttemptedAt&&isSameDay(prefs.lastPluginAutoUpdateAttemptedAt,new Date)}async function markPromptedToday(client,prefs){prefs.lastPromptedAt=new Date,await writePrefs(client,prefs)}function markPluginAutoUpdateAttempted(prefs,attemptKey){attemptKey&&(prefs.lastPluginAutoUpdateAttemptedAt=new Date,prefs.lastPluginAutoUpdateAttemptedKey=attemptKey)}async function runCommand(command,args){return await new Promise(resolve2=>{let child=spawn(command,args,{stdio:"pipe"}),stdout="",stderr="";child.stdout.on("data",chunk=>{stdout+=chunk.toString()}),child.stderr.on("data",chunk=>{stderr+=chunk.toString()}),child.on("close",code=>{resolve2({exitCode:code??1,stdout,stderr})}),child.on("error",err=>{resolve2({exitCode:1,stdout,stderr:`${stderr}${String(err)}`})})})}async function getClaudeInstalledPlugins(){let result=await runCommand("claude",["plugins","list","--json"]);if(result.exitCode===0)try{let parsed=JSON.parse(result.stdout);if(Array.isArray(parsed))return markStaleClaudePluginInstalls(parsed)}catch(err){output_manager_default.debug(`Failed to parse Claude plugin list JSON: ${err}`)}else result.stderr.trim().length>0&&output_manager_default.debug(`Failed to run 'claude plugins list --json': ${result.stderr}`);return markStaleClaudePluginInstalls(await readClaudeInstalledPluginsFromRegistry())}async function fetchLatestVercelPluginVersion(){try{let response=await fetch(VERCEL_PLUGIN_VERSION_URL);if(!response.ok){output_manager_default.debug(`Failed to fetch latest Vercel plugin version: ${response.status}`);return}let manifest=await response.json();return typeof manifest.version=="string"?manifest.version:void 0}catch(err){output_manager_default.debug(`Failed to fetch latest Vercel plugin version: ${err}`);return}}function comparePluginVersions(a,b){if(!a&&!b)return 0;if(!a)return-1;if(!b)return 1;let parse=value=>value.split(".").map(part=>Number.parseInt(part,10)||0),left=parse(a),right=parse(b),maxLength=Math.max(left.length,right.length);for(let i=0;i<maxLength;i++){let l=left[i]??0,r=right[i]??0;if(l>r)return 1;if(l<r)return-1}return 0}function buildClaudePluginStatus(installedPlugins,latestVersion){let legacy=installedPlugins.find(plugin=>plugin.id===CLAUDE_LEGACY_PLUGIN_ID),official=installedPlugins.find(plugin=>plugin.id===CLAUDE_OFFICIAL_PLUGIN_ID),state="none";return legacy&&official?state="both":legacy?state="legacy-only":official&&(state="official-only"),{state,legacy,official,latestVersion}}function buildClaudePluginMigrationPlan(status){let plan={installOfficial:!1,updateOfficial:!1,removeLegacy:!1,removeLegacyMarketplace:!1};switch(status.state){case"none":plan.installOfficial=!0;break;case"legacy-only":plan.installOfficial=!0,plan.removeLegacy=!0,plan.removeLegacyMarketplace=!0;break;case"both":plan.removeLegacy=!0,plan.removeLegacyMarketplace=!0;break;case"official-only":break}return status.official?.version&&status.latestVersion&&comparePluginVersions(status.official.version,status.latestVersion)<0&&(plan.updateOfficial=!0),plan}function hasClaudeMigrationActions(plan){return plan.installOfficial||plan.updateOfficial||plan.removeLegacy||plan.removeLegacyMarketplace}function getClaudeAutoUpdateAttemptKey(status,plan){return[status.state,status.legacy?.version??"none",status.official?.version??"none",status.latestVersion??"unknown",plan.installOfficial?"install":"",plan.updateOfficial?"update":"",plan.removeLegacy?"remove-legacy":"",plan.removeLegacyMarketplace?"remove-marketplace":""].join(":")}function buildClaudePromptCopy(status,plan){if(plan.installOfficial&&status.state==="none")return{message:"Vercel Plugin for Claude Code is not installed.",confirm:"Would you like to install it now?"};if(plan.installOfficial&&status.state==="legacy-only")return{message:"Update available for Vercel Plugin for Claude Code (legacy -> official).",confirm:"Would you like to update now?"};if(status.state==="both"&&plan.removeLegacy)return{message:"Vercel Plugin for Claude Code has a legacy install to clean up.",confirm:"Would you like to update now?"};if(plan.updateOfficial){let fromVersion=status.official?.version,toVersion=status.latestVersion;return{message:`Update available for Vercel Plugin for Claude Code${fromVersion&&toVersion?` (v${fromVersion} -> v${toVersion})`:""}.`,confirm:"Would you like to update now?"}}return{message:"The Vercel plugin needs attention in Claude Code before your agent harness is fully up to date.",confirm:"Apply the Vercel plugin changes for Claude Code?"}}async function runClaudeCommand(spinnerMessage,successMessage,failureMessage,args,options){output_manager_default.spinner(spinnerMessage);let result=await runCommand("claude",args);return output_manager_default.stopSpinner(),result.exitCode===0?(options?.quietSuccess||output_manager_default.success(successMessage),!0):(output_manager_default.warn(failureMessage),output_manager_default.debug(`Claude command failed: claude ${args.join(" ")}
|
|
9
|
+
${result.stderr||result.stdout}`),!1)}async function removeStaleLegacyClaudePlugin(removeMarketplace){output_manager_default.spinner("Removing the stale legacy Vercel Claude plugin...");let removedRegistryEntry=await removeClaudePluginFromRegistry(CLAUDE_LEGACY_PLUGIN_ID);return output_manager_default.stopSpinner(),removedRegistryEntry?(output_manager_default.success("Removed the stale legacy Vercel Claude plugin"),removeMarketplace&&(await runClaudeCommand("Removing the legacy Vercel marketplace...","Removed the legacy Vercel marketplace","Removed the stale legacy Vercel plugin, but could not remove the legacy marketplace.",["plugins","marketplace","remove","vercel"],{quietSuccess:!0})||output_manager_default.log("Cleanup command: claude plugins marketplace remove vercel")),!0):(output_manager_default.warn("Could not remove the stale legacy Vercel Claude plugin registry entry."),!1)}async function runClaudeMigration(plan){let removedStaleLegacy=!1;if(plan.removeLegacy&&(await getClaudePluginStatus()).legacy?.stale&&(removedStaleLegacy=await removeStaleLegacyClaudePlugin(plan.removeLegacyMarketplace)),plan.installOfficial){if(!await runClaudeCommand("Installing the official Vercel Claude plugin...","Updated the Vercel plugin","Failed to install the official Vercel Claude plugin.",["plugins","install",CLAUDE_OFFICIAL_PLUGIN_ID]))return}else plan.updateOfficial&&await runClaudeCommand("Updating the official Vercel Claude plugin...","Updated the Vercel plugin","Failed to update the official Vercel Claude plugin.",["plugins","update",CLAUDE_OFFICIAL_PLUGIN_ID]);let statusAfterInstall=await getClaudePluginStatus();if(!statusAfterInstall.official){output_manager_default.warn("Skipping Claude cleanup because the official Vercel plugin is not installed.");return}if(plan.removeLegacy&&statusAfterInstall.legacy&&!await runClaudeCommand("Removing the legacy Vercel Claude plugin...","Removed the legacy Vercel Claude plugin","Installed the official Vercel Claude plugin, but could not remove the legacy install.",["plugins","uninstall",CLAUDE_LEGACY_PLUGIN_ID],{quietSuccess:!0})){output_manager_default.log(`Cleanup command: claude plugins uninstall ${CLAUDE_LEGACY_PLUGIN_ID}`);return}plan.removeLegacyMarketplace&&!removedStaleLegacy&&((await getClaudePluginStatus()).legacy||await runClaudeCommand("Removing the legacy Vercel marketplace...","Removed the legacy Vercel marketplace","Removed the legacy Vercel plugin, but could not remove the legacy marketplace.",["plugins","marketplace","remove","vercel"],{quietSuccess:!0})||output_manager_default.log("Cleanup command: claude plugins marketplace remove vercel"))}async function getClaudePluginStatus(){let[installedPlugins,latestVersion]=await Promise.all([getClaudeInstalledPlugins(),fetchLatestVercelPluginVersion()]);return buildClaudePluginStatus(installedPlugins,latestVersion)}async function applyPluginActions(targets,claudePlan){for(let target of targets)target==="claude-code"&&claudePlan?await runClaudeMigration(claudePlan):output_manager_default.debug(`Skipping unsupported plugin target: ${target}`)}async function autoInstallVercelPlugin(client,options){try{let prefs=await readPrefs(client),applyMode=options?.mode==="apply";if(!prefs.pluginDeclined||prefs.pluginAutoUpdate||applyMode){let targets=await getPluginTargets(client.agentName,client.cwd),uninstalledTargets=[],claudeStatus=targets.includes("claude-code")?await getClaudePluginStatus():void 0,claudePlan=claudeStatus?buildClaudePluginMigrationPlan(claudeStatus):void 0,claudeAutoUpdateAttemptKey=claudeStatus&&claudePlan?getClaudeAutoUpdateAttemptKey(claudeStatus,claudePlan):void 0;for(let target of targets){if(target==="claude-code"){claudePlan&&hasClaudeMigrationActions(claudePlan)&&uninstalledTargets.push(target);continue}await isPluginInstalledForTarget(target)||uninstalledTargets.push(target)}if(uninstalledTargets.length>0){if(prefs.pluginAutoUpdate){if(claudeAutoUpdateAttemptKey&&wasPluginAutoUpdateAttemptedToday(prefs,claudeAutoUpdateAttemptKey))return;prefs.pluginDeclined=!1,markPluginAutoUpdateAttempted(prefs,claudeAutoUpdateAttemptKey),await writePrefs(client,prefs),await applyPluginActions(uninstalledTargets,claudePlan);return}if(!applyMode&&wasPromptedToday(prefs))return;if(applyMode){prefs.pluginDeclined=!1,prefs.pluginAutoUpdate=!0,await writePrefs(client,prefs),await applyPluginActions(uninstalledTargets,claudePlan);return}let promptMessages=[],confirmMessage="Install the Vercel plugin?";if(uninstalledTargets.includes("claude-code")&&claudeStatus&&claudePlan){let claudePrompt=buildClaudePromptCopy(claudeStatus,claudePlan);promptMessages.push(claudePrompt.message),confirmMessage=claudePrompt.confirm}let promptMessage=promptMessages.join(" ").trim();promptMessage&&output_manager_default.log(promptMessage);let accepted=await confirm(client,confirmMessage);await markPromptedToday(client,prefs),accepted?(prefs.pluginDeclined=!1,prefs.pluginAutoUpdate=!0,await writePrefs(client,prefs),await applyPluginActions(uninstalledTargets,claudePlan)):(prefs.pluginDeclined=!0,prefs.pluginAutoUpdate=!1,await writePrefs(client,prefs))}}}catch(err){output_manager_default.debug(`Auto-install agent tooling failed: ${err}`)}}export{autoInstallVercelPlugin};
|
|
@@ -0,0 +1,9 @@
|
|
|
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{emitAlertsScopeError,resolveAlertsScope}from"./chunk-AFPOIDM5.js";import{handleValidationError,validateAllProjectMutualExclusivity}from"./chunk-6RIQPTJA.js";import{isJSONObject}from"./chunk-2PPXY24N.js";import{AGENT_REASON}from"./chunk-ENBTTYJR.js";import{buildCommandWithGlobalFlags,outputAgentError}from"./chunk-NS4FH2TY.js";import{getScope}from"./chunk-5QQNYN4N.js";import{getProjectByNameOrId}from"./chunk-VLZ47RWM.js";import{ProjectNotFound,isAPIError}from"./chunk-R2TGGVCT.js";import{output_manager_default}from"./chunk-Z6Y55QJW.js";async function resolveRulesTeam(client,jsonOutput){let{team}=await getScope(client,{resolveLocalScope:!0});return team?{teamId:team.id}:emitAlertsScopeError(client,jsonOutput,"NO_TEAM","No team context found. Run `vercel switch` to select a team, use `--scope <team>`, or link a team project.",{reason:AGENT_REASON.MISSING_SCOPE,hint:"Alert rules belong to a team. Select the team before retrying.",next:[{command:buildCommandWithGlobalFlags(client.argv,"teams switch"),when:"Select a team"},{command:buildCommandWithGlobalFlags(client.argv,"whoami"),when:"Inspect the current scope"}]})}async function resolveRulesProject(client,projectNameOrId,jsonOutput,command){let teamScope=await resolveRulesTeam(client,jsonOutput);if(typeof teamScope=="number")return teamScope;try{let project=await getProjectByNameOrId(client,projectNameOrId,teamScope.teamId);return project instanceof ProjectNotFound?emitAlertsScopeError(client,jsonOutput,"PROJECT_NOT_FOUND",`Project "${projectNameOrId}" was not found in the selected team.`,{reason:AGENT_REASON.NOT_FOUND,next:[{command:buildCommandWithGlobalFlags(client.argv,`${command} --project <name_or_id>`),when:"Retry with a valid project"}]}):{...teamScope,projectId:project.id,projectName:project.name}}catch(error){if(!isAPIError(error))throw error;return emitAlertsScopeError(client,jsonOutput,error.code||"API_ERROR",error.serverMessage||`API error (${error.status}).`,{reason:error.status===401?"not_authorized":error.status===403?"forbidden":AGENT_REASON.API_ERROR})}}async function parseRulesFlagsAndScope(client,flags,jsonOutput,command="alerts rules ls"){let mutual=validateAllProjectMutualExclusivity(flags["--all"],flags["--project"]);if(!mutual.valid)return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:mutual.message,next:[{command:buildCommandWithGlobalFlags(client.argv,"alerts rules --help"),when:"Use either `--project` or `--all`, not both"}]},1),handleValidationError(mutual,jsonOutput,client);if(flags["--all"])return resolveRulesTeam(client,jsonOutput);if(flags["--project"])return resolveRulesProject(client,flags["--project"],jsonOutput,command);let linkedScope=await resolveAlertsScope(client,{jsonOutput,command});if(typeof linkedScope=="number")return linkedScope;let teamScope=await resolveRulesTeam(client,jsonOutput);return typeof teamScope=="number"?teamScope:linkedScope.teamId===teamScope.teamId?linkedScope:teamScope}import{readFileSync}from"fs";import{resolve}from"path";function rulesCollectionPath(teamId,options={}){let query=new URLSearchParams({teamId});return options.limit!==void 0&&query.set("limit",String(options.limit)),options.cursor&&query.set("cursor",options.cursor),options.projectId&&query.set("projectId",options.projectId),options.type&&query.set("type",options.type),`/alerts/v3/alert-rules?${query.toString()}`}function rulesItemPath(teamId,ruleId){let query=new URLSearchParams({teamId});return`/alerts/v3/alert-rules/${encodeURIComponent(ruleId)}?${query.toString()}`}function rulesSchemaPath(teamId,type){let query=new URLSearchParams({teamId});return type&&query.set("type",type),`/alerts/v3/alert-rules/schema?${query.toString()}`}async function fetchRule(client,scope,ruleId){return(await client.fetch(rulesItemPath(scope.teamId,ruleId))).rule}function getIssues(error){return Array.isArray(error.issues)?error.issues.filter(issue=>isJSONObject(issue)&&typeof issue.path=="string"&&typeof issue.message=="string"):[]}function outputRulesError(client,jsonOutput,code,message,options={}){let issues=options.issues??[],issueSummary=issues.slice(0,5).map(issue=>`${issue.path||"body"}: ${issue.message}`).join("; ");return outputAgentError(client,{status:"error",reason:options.reason??AGENT_REASON.INVALID_ARGUMENTS,message,hint:options.hint??(issueSummary||void 0)},1),jsonOutput?client.stdout.write(`${JSON.stringify({error:{code,message,...issues.length?{issues}:{}}},null,2)}
|
|
8
|
+
`):output_manager_default.fatal([message,...issues.map(issue=>` ${issue.path}: ${issue.message}`)].join(`
|
|
9
|
+
`)),1}function handleRulesApiError(client,err,jsonOutput){let message=err.status===401?"You do not have access to alert rules in this team. Ensure your role can manage Alert Rules, or pass --token and --scope.":err.status===403?err.serverMessage||"You do not have permission to manage alert rules in this team.":err.status>=500?`The alert rules endpoint failed (${err.status}). Re-run with --debug and share the x-vercel-id from the failed request.`:err.serverMessage||`API error (${err.status}).`;return outputRulesError(client,jsonOutput,err.code||"API_ERROR",message,{reason:err.status===401?"not_authorized":err.status===403?"forbidden":err.status===404?AGENT_REASON.NOT_FOUND:err.status===429?"rate_limited":AGENT_REASON.API_ERROR,issues:getIssues(err),hint:err.status===401||err.status===403?"Confirm the team with `vercel whoami`; use --scope <team-slug> if the rule belongs to another team.":void 0})}var LEGACY_BODY_FIELDS=["alertTypes","customAlert","queryJsonString"];function readRuleBody(client,bodyPath,jsonOutput){let raw;try{raw=readFileSync(resolve(client.cwd,bodyPath),"utf8")}catch{return outputRulesError(client,jsonOutput,"INVALID_ARGUMENTS",`Could not read --body file: ${bodyPath}`)}let parsed;try{parsed=JSON.parse(raw)}catch{return outputRulesError(client,jsonOutput,"INVALID_ARGUMENTS","Invalid JSON in --body file.")}return isJSONObject(parsed)?LEGACY_BODY_FIELDS.some(field=>Object.hasOwn(parsed,field))?outputRulesError(client,jsonOutput,"LEGACY_ALERT_RULE_BODY","This body uses the previous alert-rules shape. Rewrite it using the built-in or custom schema.",{hint:"Run `vercel alerts rules schema --type built-in` or `vercel alerts rules schema --type custom` for examples."}):parsed:outputRulesError(client,jsonOutput,"INVALID_ARGUMENTS","The --body file must contain a JSON object.")}function getBodyType(body){return body.type==="built-in"||body.type==="custom"?body.type:void 0}function emitRulesArgParseError(client,err,recoverWithProjectFlag){let message=err instanceof Error?err.message:String(err),projectFlagMissingArg=message.includes("--project")&&message.includes("requires argument");outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:projectFlagMissingArg?"`--project` requires a project name or id (for example `--project my-app`).":message,next:[{command:buildCommandWithGlobalFlags(client.argv,projectFlagMissingArg?recoverWithProjectFlag:"alerts rules --help"),when:projectFlagMissingArg?"Retry with a project name or id":"See valid `alerts rules` subcommands"}]},1)}export{resolveRulesTeam,resolveRulesProject,parseRulesFlagsAndScope,rulesCollectionPath,rulesItemPath,rulesSchemaPath,fetchRule,outputRulesError,handleRulesApiError,readRuleBody,getBodyType,emitRulesArgParseError};
|
|
@@ -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{__commonJS}from"./chunk-6L236MNA.js";var require_retry_operation=__commonJS({"../../node_modules/.pnpm/retry@0.10.1/node_modules/retry/lib/retry_operation.js"(exports,module){function RetryOperation(timeouts,options){typeof options=="boolean"&&(options={forever:options}),this._timeouts=timeouts,this._options=options||{},this._fn=null,this._errors=[],this._attempts=1,this._operationTimeout=null,this._operationTimeoutCb=null,this._timeout=null,this._options.forever&&(this._cachedTimeouts=this._timeouts.slice(0))}module.exports=RetryOperation;RetryOperation.prototype.stop=function(){this._timeout&&clearTimeout(this._timeout),this._timeouts=[],this._cachedTimeouts=null};RetryOperation.prototype.retry=function(err){if(this._timeout&&clearTimeout(this._timeout),!err)return!1;this._errors.push(err);var timeout=this._timeouts.shift();if(timeout===void 0)if(this._cachedTimeouts)this._errors.splice(this._errors.length-1,this._errors.length),this._timeouts=this._cachedTimeouts.slice(0),timeout=this._timeouts.shift();else return!1;var self=this,timer=setTimeout(function(){self._attempts++,self._operationTimeoutCb&&(self._timeout=setTimeout(function(){self._operationTimeoutCb(self._attempts)},self._operationTimeout),this._options.unref&&self._timeout.unref()),self._fn(self._attempts)},timeout);return this._options.unref&&timer.unref(),!0};RetryOperation.prototype.attempt=function(fn,timeoutOps){this._fn=fn,timeoutOps&&(timeoutOps.timeout&&(this._operationTimeout=timeoutOps.timeout),timeoutOps.cb&&(this._operationTimeoutCb=timeoutOps.cb));var self=this;this._operationTimeoutCb&&(this._timeout=setTimeout(function(){self._operationTimeoutCb()},self._operationTimeout)),this._fn(this._attempts)};RetryOperation.prototype.try=function(fn){console.log("Using RetryOperation.try() is deprecated"),this.attempt(fn)};RetryOperation.prototype.start=function(fn){console.log("Using RetryOperation.start() is deprecated"),this.attempt(fn)};RetryOperation.prototype.start=RetryOperation.prototype.try;RetryOperation.prototype.errors=function(){return this._errors};RetryOperation.prototype.attempts=function(){return this._attempts};RetryOperation.prototype.mainError=function(){if(this._errors.length===0)return null;for(var counts={},mainError=null,mainErrorCount=0,i=0;i<this._errors.length;i++){var error=this._errors[i],message=error.message,count=(counts[message]||0)+1;counts[message]=count,count>=mainErrorCount&&(mainError=error,mainErrorCount=count)}return mainError}}});var require_retry=__commonJS({"../../node_modules/.pnpm/retry@0.10.1/node_modules/retry/lib/retry.js"(exports){var RetryOperation=require_retry_operation();exports.operation=function(options){var timeouts=exports.timeouts(options);return new RetryOperation(timeouts,{forever:options&&options.forever,unref:options&&options.unref})};exports.timeouts=function(options){if(options instanceof Array)return[].concat(options);var opts={retries:10,factor:2,minTimeout:1*1e3,maxTimeout:1/0,randomize:!1};for(var key in options)opts[key]=options[key];if(opts.minTimeout>opts.maxTimeout)throw new Error("minTimeout is greater than maxTimeout");for(var timeouts=[],i=0;i<opts.retries;i++)timeouts.push(this.createTimeout(i,opts));return options&&options.forever&&!timeouts.length&&timeouts.push(this.createTimeout(i,opts)),timeouts.sort(function(a,b){return a-b}),timeouts};exports.createTimeout=function(attempt,opts){var random=opts.randomize?Math.random()+1:1,timeout=Math.round(random*opts.minTimeout*Math.pow(opts.factor,attempt));return timeout=Math.min(timeout,opts.maxTimeout),timeout};exports.wrap=function(obj,options,methods){if(options instanceof Array&&(methods=options,options=null),!methods){methods=[];for(var key in obj)typeof obj[key]=="function"&&methods.push(key)}for(var i=0;i<methods.length;i++){var method=methods[i],original=obj[method];obj[method]=function(){var op=exports.operation(options),args=Array.prototype.slice.call(arguments),callback=args.pop();args.push(function(err){op.retry(err)||(err&&(arguments[0]=op.mainError()),callback.apply(this,arguments))}),op.attempt(function(){original.apply(obj,args)})},obj[method].options=options}}}});var require_retry2=__commonJS({"../../node_modules/.pnpm/retry@0.10.1/node_modules/retry/index.js"(exports,module){module.exports=require_retry()}});var require_dist=__commonJS({"../../node_modules/.pnpm/async-retry@1.1.3/node_modules/async-retry/dist/index.js"(exports,module){"use strict";var retrier=require_retry2();module.exports=function(fn,opts){return opts=opts||{},new Promise(function(resolve,reject){var op=retrier.operation(opts),bail=function(err){return reject(err||new Error("Aborted"))},onError=function(err){if(err.bail)return bail(err);op.retry(err)?opts.onRetry&&opts.onRetry(err):reject(op.mainError())};op.attempt(function(num){var val=void 0;try{val=fn(bail,num)}catch(err){return onError(err)}Promise.resolve(val).then(resolve,onError)})})}}});export{require_dist};
|
|
@@ -0,0 +1,15 @@
|
|
|
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{events_default}from"./chunk-M2XARQBF.js";import{progress}from"./chunk-U56NHYAH.js";import{isJSONObject,printIndications}from"./chunk-2PPXY24N.js";import{require_dist as require_dist2}from"./chunk-TRTEXGVN.js";import{sleep}from"./chunk-T3GQAMBJ.js";import{suggestNextCommands}from"./chunk-6YAADRQB.js";import{require_dist as require_dist3}from"./chunk-ZT6KDLLY.js";import{require_ms}from"./chunk-QTKJC2O5.js";import{withGlobalFlags}from"./chunk-NS4FH2TY.js";import{ua_default}from"./chunk-5XJNPXQK.js";import{responseError}from"./chunk-LNPMDXBJ.js";import{fetch,getFetchDispatcher}from"./chunk-MY4MONOH.js";import{getProjectByNameOrId}from"./chunk-VLZ47RWM.js";import{require_strip_ansi}from"./chunk-OSCCYU74.js";import{printAlignedLabel}from"./chunk-XSVBYDYI.js";import{APIError,BuildError,require_bytes}from"./chunk-R2TGGVCT.js";import{emoji,eraseLines,link_default,output_manager_default,prependEmoji}from"./chunk-Z6Y55QJW.js";import{require_dist}from"./chunk-QGIQK47P.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.js";var import_client=__toESM(require_dist3(),1),import_error_utils=__toESM(require_dist(),1),import_bytes=__toESM(require_bytes(),1),import_chalk=__toESM(require_source(),1);function printInspectUrl(inspectorUrl){inspectorUrl&&printAlignedLabel("Inspect",import_chalk.default.cyan(inspectorUrl))}async function processDeployment({org,projectName,isSettingUpProject,archive,skipAutoDetectionConfirmation,noWait,withFullLogs,anonymous,manual,jsonOutput,linkedProject,linkedProjectIsPartial,gitMetadata,...args}){let{now,path,requestBody,force,withCache,quiet,prebuilt,vercelOutputDir,rootDirectory,bulkRedirectsPath}=args,client=now._client,aliasedRowWillPrint=!noWait&&requestBody.autoAssignCustomDomains!==!1,{env={}}=requestBody,token=now._token;if(!token)throw new Error("Missing authentication token");let aliasAssignedController=new AbortController,onAliasAssigned=event=>{aliasAssignedController.abort(event)},clientOptions={teamId:now.currentTeam??void 0,apiUrl:now._apiUrl,token,debug:output_manager_default.isDebugEnabled(),userAgent:ua_default,path,force,withCache,prebuilt,vercelOutputDir,rootDirectory,skipAutoDetectionConfirmation,archive,dispatcher:getFetchDispatcher(),projectName,bulkRedirectsPath,manual,aliasAssignedSignal:aliasAssignedController.signal},deployingSpinnerVal=isSettingUpProject?"Setting up project":`Deploying ${import_chalk.default.bold(org.slug?`${org.slug}/${projectName}`:projectName)}`;output_manager_default.spinner(deployingSpinnerVal,0);let indications=[],abortController;function stopSpinner(){abortController?.abort(),output_manager_default.stopSpinner()}let linkedProjectLookup=linkedProjectIsPartial&&linkedProject&&!noWait?getProjectByNameOrId(client,linkedProject.id,linkedProject.accountId).then(project2=>({project:project2}),error=>({error})):void 0,rollingRelease=linkedProject?.rollingRelease,project=linkedProjectLookup?void 0:linkedProject,latestLogMessage="";async function resolveProject(){if(!linkedProjectLookup)return getProjectByNameOrId(client,projectName);let result=await linkedProjectLookup;if("error"in result)throw result.error;return result.project}try{let deploymentOptions=Promise.resolve(gitMetadata).then(gitMetadata2=>({...requestBody,...gitMetadata2===void 0?{}:{gitMetadata:gitMetadata2}}));for await(let event of(0,import_client.createDeployment)(clientOptions,deploymentOptions)){if(["tip","notice","warning"].includes(event.type)&&indications.push(event),event.type==="file-count"){let{total,missing,uploads}=event.payload;output_manager_default.debug(`Total files ${total.size}, ${missing.length} changed`);let missingSize=missing.map(sha=>{let file=total.get(sha);return file?.data?.length??file?.size??0}).reduce((a,b)=>a+b,0),totalSizeHuman=import_bytes.default.format(missingSize,{decimalPlaces:1}),nextStep=0,stepSize=now._client.stderr.isTTY?0:.25,updateProgress=()=>{let uploadedBytes=uploads.reduce((acc,e)=>acc+e.bytesUploaded,0),bar=progress(uploadedBytes,missingSize);if(!bar)output_manager_default.spinner(deployingSpinnerVal,0);else{let uploadedHuman=import_bytes.default.format(uploadedBytes,{decimalPlaces:1,fixedDecimals:!0});uploadedBytes/missingSize>=nextStep&&(output_manager_default.spinner(`Uploading ${import_chalk.default.reset(`[${bar}] (${uploadedHuman}/${totalSizeHuman})`)}`,0),nextStep+=stepSize)}};uploads.forEach(e=>e.on("progress",updateProgress)),updateProgress()}if(event.type==="file-uploaded"){let{file}=event.payload;output_manager_default.debug(`Uploaded: ${file.names.join(" ")} (${(0,import_bytes.default)(file.data?.length??file.size??0)})`)}if(event.type==="created"){let deployment=event.payload;if(now.url=deployment.url,stopSpinner(),!anonymous){printInspectUrl(deployment.inspectorUrl);let isProdDeployment=deployment.target==="production",previewUrl=`https://${deployment.url}`;isProdDeployment&&!requestBody.target&&indications.push({type:"notice",payload:"This is your project\u2019s first deployment, so it was assigned to production. Future deployments will be preview deployments unless you use --prod.",link:"https://vercel.com/docs/deployments/environments"}),printAlignedLabel(isProdDeployment?"Production":"Preview",import_chalk.default.cyan(previewUrl),isProdDeployment&&!aliasedRowWillPrint?{gutter:"\u25B2"}:{}),!jsonOutput&&(quiet||process.env.FORCE_TTY==="1")&&process.stdout.write(`https://${event.payload.url}`)}if(noWait)return deployment.indications=indications,deployment;if(latestLogMessage=deployment.readyState==="QUEUED"?"Queued\u2026":"Building\u2026",withFullLogs&&!anonymous){let{displayBuildLogs}=await import("./logs-GK7CJBYY.js"),promise;({abortController,promise}=displayBuildLogs(client,deployment,!0,onAliasAssigned)),promise.catch(error=>output_manager_default.warn(`Failed to read build logs: ${error}`))}else if(!anonymous){let{parseLogLines}=await import("./logs-GK7CJBYY.js");abortController=new AbortController,events_default(client,deployment.id,{mode:"logs",onAliasAssigned,onEvent:event2=>{if(!event2.created)return;let message=parseLogLines(event2)[0];message&&(latestLogMessage=message,output_manager_default.spinner(latestLogMessage,0))},quiet:!1,findOpts:{direction:"forward",follow:!0}},abortController).catch(error=>output_manager_default.warn(`Failed to read build logs: ${error}`))}output_manager_default.spinner(latestLogMessage,0)}if(event.type==="building"&&!withFullLogs&&output_manager_default.spinner(latestLogMessage||"Building\u2026",0),event.type==="canceled")return stopSpinner(),event.payload;if(project===void 0&&(!linkedProjectLookup||event.type==="ready")&&(project=await resolveProject(),rollingRelease=project?.rollingRelease),event.type==="ready"&&rollingRelease)return output_manager_default.spinner("Releasing\u2026",0),stopSpinner(),event.payload.indications=indications,event.payload;if(event.type==="ready"&&!withFullLogs){let v1ChecksPending=event.payload.checksState&&event.payload.checksState!=="completed",v2ChecksPending=event.payload.checks?.["deployment-alias"]?.state==="pending";if(output_manager_default.stopSpinner(),!anonymous){process.stderr.write(eraseLines(2));let isProdDeployment=event.payload.target==="production",previewUrl=`https://${event.payload.url}`;printAlignedLabel(isProdDeployment?"Production":"Preview",import_chalk.default.cyan(previewUrl),isProdDeployment&&!aliasedRowWillPrint?{gutter:"\u25B2"}:{})}v1ChecksPending||v2ChecksPending?output_manager_default.spinner("Running Checks\u2026",0):output_manager_default.spinner("Completing\u2026",0)}if(event.type==="checks-running"&&!withFullLogs&&output_manager_default.spinner("Running Checks\u2026",0),event.type==="checks-conclusion-failed"||event.type==="checks-v2-failed")return stopSpinner(),event.payload;if(event.type==="error"){if(stopSpinner(),!archive){let maybeError=handleErrorSolvableWithArchive(event.payload);if(maybeError)throw maybeError}let error=await now.handleDeploymentError(event.payload,{env});if(error.code==="missing_project_settings"||error.code==="forbidden")return error;throw error}if(event.type==="alias-assigned"){if(stopSpinner(),event.payload.target==="production"&&event.payload.alias&&event.payload.alias.length>0){let prodUrl=`https://${event.payload.alias[0]}`;anonymous&&output_manager_default.print(`
|
|
8
|
+
`),printAlignedLabel(anonymous?"Temporary":"Aliased",import_chalk.default.cyan(prodUrl),{gutter:"\u25B2"}),anonymous&&!jsonOutput&&(quiet||process.env.FORCE_TTY==="1")&&process.stdout.write(prodUrl)}return event.payload.indications=indications,event.payload}}}catch(err){throw stopSpinner(),err}}var archiveSuggestionText="Try using `--archive=tgz` to limit the amount of files you upload.",UploadErrorMissingArchive=class extends Error{constructor(){super(...arguments);this.link="https://vercel.com/docs/cli/deploy#archive"}};function handleErrorSolvableWithArchive(error){if((0,import_error_utils.isErrorLike)(error)){let isUploadRateLimit="errorName"in error&&typeof error.errorName=="string"&&error.errorName.startsWith("api-upload-"),isTooManyFilesLimit="code"in error&&error.code==="too_many_files",isEntityTooLarge=/entity too large|payload too large/i.test(error.message);if(isUploadRateLimit||isTooManyFilesLimit||isEntityTooLarge)return new UploadErrorMissingArchive(`${error.message}
|
|
9
|
+
${archiveSuggestionText}`)}}var import_async_retry=__toESM(require_dist2(),1),import_ms=__toESM(require_ms(),1);import qs from"querystring";import{parse as parseUrl}from"url";var import_bytes2=__toESM(require_bytes(),1),import_chalk2=__toESM(require_source(),1);var Now=class{constructor({client,url=null,currentTeam=null,forceNew=!1,withCache=!1}){this.url=url,this._client=client,this._forceNew=forceNew,this._withCache=withCache,this._onRetry=this._onRetry.bind(this),this.currentTeam=currentTeam}get _apiUrl(){return this._client.apiUrl}get _token(){return this._client.authConfig.token}async create(path,{nowConfig={},name,project,prebuilt=!1,anonymous=!1,vercelOutputDir,rootDirectory,meta,gitMetadata,regions,quiet=!1,env,build,forceNew=!1,withCache=!1,target=null,projectSettings,skipAutoDetectionConfirmation,noWait,withFullLogs,autoAssignCustomDomains,agentName,manual,jsonOutput=!1,linkedProject,linkedProjectIsPartial},org,isSettingUpProject,archive){let requestBody={...nowConfig,env,build,name,project,meta,regions,target:target||void 0,projectSettings,source:"cli",actor:agentName,autoAssignCustomDomains};delete requestBody.scope,delete requestBody.github,delete requestBody.public;let deployment=await processDeployment({now:this,path,requestBody,gitMetadata,quiet,force:forceNew,withCache,org,projectName:name,isSettingUpProject,archive,skipAutoDetectionConfirmation,prebuilt,anonymous,vercelOutputDir,rootDirectory,noWait,withFullLogs,bulkRedirectsPath:nowConfig.bulkRedirectsPath,manual,jsonOutput,linkedProject,linkedProjectIsPartial});if(deployment&&deployment.warnings){let sizeExceeded=0,{log,warn}=output_manager_default;deployment.warnings.forEach(warning=>{if(warning.reason==="size_limit_exceeded"){let{sha,limit}=warning;warn(`Skipping file ${sha} (size exceeded ${(0,import_bytes2.default)(limit)})`),sizeExceeded++}else warning.reason==="node_version_not_found"&&warn(`Requested node version ${warning.wanted} is not available`)}),sizeExceeded>0&&(warn(`${sizeExceeded} of the files exceeded the limit for your plan.`),log(`Please upgrade your plan here: ${import_chalk2.default.cyan("https://vercel.com/account/plan")}`))}return deployment}async handleDeploymentError(error,{env}){if(error.status===429){if(error.code==="builds_rate_limited"){let err2=new Error(error.message);return err2.status=error.status,err2.code=error.code,err2.retryAfterMs="never",err2.ctaLabel=error.ctaLabel,err2.ctaUrl=error.ctaUrl,err2.action=error.action,err2.link=error.link,err2}let msg="You have been creating deployments at a very fast pace. ";if(error.limit&&error.limit.reset){let{reset}=error.limit,difference=reset-Date.now();msg+=`Please retry in ${(0,import_ms.default)(difference,{long:!0})}.`}else msg+="Please slow down.";let err=Object.create(APIError.prototype);return err.message=msg,err.status=error.status,err.retryAfterMs="never",err}if(error.status===400&&error.code==="cert_missing")return responseError(error,null,error);if(error.status===400&&error.code==="missing_files")return this._missing=error.missing||[],error;if(error.status===404&&error.code==="not_found")return error;if(error.status>=400&&error.status<500){let err=new Error,{code}=error;if(code==="env_value_invalid_type"){let{key}=error;err.message=`The env key ${key} has an invalid type: ${typeof env[key]}. Please supply a String or a Number (https://err.sh/vercel/env-value-invalid-type)`}else Object.assign(err,error);return err}return error.id&&error.id.startsWith("bld_")?new BuildError({message:"Build failed",meta:{entrypoint:error.entrypoint}}):error.errorCode==="BUILD_FAILED"||error.errorCode==="UNEXPECTED_ERROR"||error.errorCode?.includes("BUILD_UTILS_SPAWN_")?new BuildError({message:error.errorMessage,meta:{}}):new Error(error.message||error.errorMessage)}async remove(deploymentId,{hard=!1}){let url=`/now/deployments/${deploymentId}?hard=${hard?1:0}`;return await this.retry(async bail=>{let res=await this._fetch(url,{method:"DELETE"});if(res.status!==200){let error=await responseError(res,"Failed to remove deployment");if(typeof error.retryAfterMs=="number"){let randomSkewMs=3e4*Math.random();throw await sleep(error.retryAfterMs+randomSkewMs),error}if(res.status>200&&res.status<500)return bail(error);throw error}}),!0}retry(fn,{retries=3,maxTimeout=1/0}={}){return(0,import_async_retry.default)(fn,{retries,maxTimeout,onRetry:this._onRetry})}_onRetry(err){output_manager_default.debug(`Retrying: ${err}
|
|
10
|
+
${err.stack}`)}async _fetch(_url,opts={}){if(opts.useCurrentTeam!==!1&&this.currentTeam){let parsedUrl=parseUrl(_url,!0),query=parsedUrl.query;query.teamId=this.currentTeam,_url=`${parsedUrl.pathname}?${qs.stringify(query)}`,delete opts.useCurrentTeam}opts.headers=new globalThis.Headers(opts.headers),opts.headers.set("accept","application/json"),this._token&&opts.headers.set("authorization",`Bearer ${this._token}`),opts.headers.set("user-agent",ua_default);let body;isJSONObject(opts.body)?(body=JSON.stringify(opts.body),opts.headers.set("content-type","application/json; charset=utf8")):body=opts.body;let res=await output_manager_default.time(`${opts.method||"GET"} ${this._apiUrl}${_url} ${opts.body||""}`,fetch(`${this._apiUrl}${_url}`,{...opts,body}));return printIndications(res),res}async fetch(url,opts={}){return this.retry(async bail=>{opts.json!==!1&&opts.body&&typeof opts.body=="object"&&(opts=Object.assign({},opts,{body:JSON.stringify(opts.body),headers:Object.assign({},opts.headers,{"Content-Type":"application/json"})}));let res=await this._fetch(url,opts);if(res.ok)return opts.json===!1?res:res.headers.get("content-type")?res.headers.get("content-type")?.includes("application/json")?res.json():res:null;let err=await responseError(res);if(typeof err.retryAfterMs=="number"){let randomSkewMs=3e4*Math.random();throw await sleep(err.retryAfterMs+randomSkewMs),err}if(res.status>=400&&res.status<500)return bail(err);throw err},opts.retry)}};var import_chalk3=__toESM(require_source(),1),import_strip_ansi=__toESM(require_strip_ansi(),1);var deploymentInProgressStates=["QUEUED","BUILDING","INITIALIZING"];function isDeploying(readyState){return deploymentInProgressStates.includes(readyState)}function bareDuration(stamp){return(0,import_strip_ansi.default)(stamp).replace(/^\[|\]$/g,"")}async function printDeploymentStatus(client,{readyState,aliasError,indications,aliasWarning,url,target},deployStamp,noWait,guidanceMode,isInit,gitConnectCommand){indications=indications||[];let isStillBuilding=!1;if(noWait&&isDeploying(readyState)){isStillBuilding=!0;let message=isInit?"Deployment is awaiting continuation\u2026":"Note: Deployment is still processing\u2026";output_manager_default.print(prependEmoji(message,emoji("notice"))+`
|
|
11
|
+
`)}if(!isStillBuilding&&readyState!=="READY")return output_manager_default.error("Your deployment failed. Please retry later. More: https://err.sh/vercel/deployment-error"),1;if(!isStillBuilding&&readyState==="READY"){let duration=bareDuration(deployStamp());output_manager_default.print(`
|
|
12
|
+
${import_chalk3.default.green("\u2713")} ${import_chalk3.default.bold("Ready")} ${import_chalk3.default.dim(`in ${duration}`)}
|
|
13
|
+
`)}aliasError&&output_manager_default.warn(`Failed to assign aliases${aliasError.message?`: ${aliasError.message}`:""}`),aliasWarning?.message&&indications.push({type:"warning",payload:aliasWarning.message,link:aliasWarning.link,action:aliasWarning.action});let newline=`
|
|
14
|
+
`;for(let indication of indications){let message=prependEmoji(import_chalk3.default.dim(indication.payload),emoji(indication.type))+newline,link="";indication.link&&(link=import_chalk3.default.dim(`${indication.action||"Learn More"}: ${link_default(indication.link)}`)+newline),output_manager_default.print(message+link)}if(gitConnectCommand||guidanceMode){output_manager_default.print(`
|
|
15
|
+
`);let nextCommands=[];gitConnectCommand&&nextCommands.push({description:"Automatically deploy changes on every push by connecting Git",command:gitConnectCommand}),readyState==="READY"?(nextCommands.push({description:"Check the deployment response",command:withGlobalFlags(client,`curl https://${url}`,{preserveProject:!0})}),nextCommands.push({description:"View build logs",command:withGlobalFlags(client,`inspect ${url} --logs`,{preserveProject:!0})},{description:"Create a new deployment from the same source",command:withGlobalFlags(client,`redeploy ${url}`,{preserveProject:!0})}),target!=="production"&&nextCommands.push({description:"Deploy the current project to production",command:withGlobalFlags(client,"deploy --prod",{preserveProject:!0})})):nextCommands.push({description:"Check deployment status",command:withGlobalFlags(client,`inspect ${url}`,{preserveProject:!0})}),suggestNextCommands(nextCommands)}return 0}export{UploadErrorMissingArchive,Now,isDeploying,printDeploymentStatus};
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
+
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
+
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
+
const require = __createRequire(import.meta.url);
|
|
5
|
+
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
+
const __dirname = __dirname_(__filename);
|
|
7
|
+
function progress(current,total,opts={}){let{width=20,complete="=",incomplete="-"}=opts;if(total<=0||current<0||current>total)return null;let unit=total/width,pos=Math.floor(current/unit);return`${complete.repeat(pos)}${incomplete.repeat(width-pos)}`}export{progress};
|
|
@@ -0,0 +1,12 @@
|
|
|
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{require_supports_color}from"./chunk-N3ZZ7FHQ.js";import{require_ansi_styles}from"./chunk-GU6VIFR5.js";import{__commonJS}from"./chunk-6L236MNA.js";var require_util=__commonJS({"../../node_modules/.pnpm/chalk@4.1.0/node_modules/chalk/source/util.js"(exports,module){"use strict";var stringReplaceAll=(string,substring,replacer)=>{let index=string.indexOf(substring);if(index===-1)return string;let substringLength=substring.length,endIndex=0,returnValue="";do returnValue+=string.substr(endIndex,index-endIndex)+substring+replacer,endIndex=index+substringLength,index=string.indexOf(substring,endIndex);while(index!==-1);return returnValue+=string.substr(endIndex),returnValue},stringEncaseCRLFWithFirstIndex=(string,prefix,postfix,index)=>{let endIndex=0,returnValue="";do{let gotCR=string[index-1]==="\r";returnValue+=string.substr(endIndex,(gotCR?index-1:index)-endIndex)+prefix+(gotCR?`\r
|
|
8
|
+
`:`
|
|
9
|
+
`)+postfix,endIndex=index+1,index=string.indexOf(`
|
|
10
|
+
`,endIndex)}while(index!==-1);return returnValue+=string.substr(endIndex),returnValue};module.exports={stringReplaceAll,stringEncaseCRLFWithFirstIndex}}});var require_templates=__commonJS({"../../node_modules/.pnpm/chalk@4.1.0/node_modules/chalk/source/templates.js"(exports,module){"use strict";var TEMPLATE_REGEX=/(?:\\(u(?:[a-f\d]{4}|\{[a-f\d]{1,6}\})|x[a-f\d]{2}|.))|(?:\{(~)?(\w+(?:\([^)]*\))?(?:\.\w+(?:\([^)]*\))?)*)(?:[ \t]|(?=\r?\n)))|(\})|((?:.|[\r\n\f])+?)/gi,STYLE_REGEX=/(?:^|\.)(\w+)(?:\(([^)]*)\))?/g,STRING_REGEX=/^(['"])((?:\\.|(?!\1)[^\\])*)\1$/,ESCAPE_REGEX=/\\(u(?:[a-f\d]{4}|{[a-f\d]{1,6}})|x[a-f\d]{2}|.)|([^\\])/gi,ESCAPES=new Map([["n",`
|
|
11
|
+
`],["r","\r"],["t"," "],["b","\b"],["f","\f"],["v","\v"],["0","\0"],["\\","\\"],["e","\x1B"],["a","\x07"]]);function unescape(c){let u=c[0]==="u",bracket=c[1]==="{";return u&&!bracket&&c.length===5||c[0]==="x"&&c.length===3?String.fromCharCode(parseInt(c.slice(1),16)):u&&bracket?String.fromCodePoint(parseInt(c.slice(2,-1),16)):ESCAPES.get(c)||c}function parseArguments(name,arguments_){let results=[],chunks=arguments_.trim().split(/\s*,\s*/g),matches;for(let chunk of chunks){let number=Number(chunk);if(!Number.isNaN(number))results.push(number);else if(matches=chunk.match(STRING_REGEX))results.push(matches[2].replace(ESCAPE_REGEX,(m,escape,character)=>escape?unescape(escape):character));else throw new Error(`Invalid Chalk template style argument: ${chunk} (in style '${name}')`)}return results}function parseStyle(style){STYLE_REGEX.lastIndex=0;let results=[],matches;for(;(matches=STYLE_REGEX.exec(style))!==null;){let name=matches[1];if(matches[2]){let args=parseArguments(name,matches[2]);results.push([name].concat(args))}else results.push([name])}return results}function buildStyle(chalk,styles){let enabled={};for(let layer of styles)for(let style of layer.styles)enabled[style[0]]=layer.inverse?null:style.slice(1);let current=chalk;for(let[styleName,styles2]of Object.entries(enabled))if(Array.isArray(styles2)){if(!(styleName in current))throw new Error(`Unknown Chalk style: ${styleName}`);current=styles2.length>0?current[styleName](...styles2):current[styleName]}return current}module.exports=(chalk,temporary)=>{let styles=[],chunks=[],chunk=[];if(temporary.replace(TEMPLATE_REGEX,(m,escapeCharacter,inverse,style,close,character)=>{if(escapeCharacter)chunk.push(unescape(escapeCharacter));else if(style){let string=chunk.join("");chunk=[],chunks.push(styles.length===0?string:buildStyle(chalk,styles)(string)),styles.push({inverse,styles:parseStyle(style)})}else if(close){if(styles.length===0)throw new Error("Found extraneous } in Chalk template literal");chunks.push(buildStyle(chalk,styles)(chunk.join(""))),chunk=[],styles.pop()}else chunk.push(character)}),chunks.push(chunk.join("")),styles.length>0){let errMessage=`Chalk template literal is missing ${styles.length} closing bracket${styles.length===1?"":"s"} (\`}\`)`;throw new Error(errMessage)}return chunks.join("")}}});var require_source=__commonJS({"../../node_modules/.pnpm/chalk@4.1.0/node_modules/chalk/source/index.js"(exports,module){"use strict";var ansiStyles=require_ansi_styles(),{stdout:stdoutColor,stderr:stderrColor}=require_supports_color(),{stringReplaceAll,stringEncaseCRLFWithFirstIndex}=require_util(),{isArray}=Array,levelMapping=["ansi","ansi","ansi256","ansi16m"],styles=Object.create(null),applyOptions=(object,options={})=>{if(options.level&&!(Number.isInteger(options.level)&&options.level>=0&&options.level<=3))throw new Error("The `level` option should be an integer from 0 to 3");let colorLevel=stdoutColor?stdoutColor.level:0;object.level=options.level===void 0?colorLevel:options.level},ChalkClass=class{constructor(options){return chalkFactory(options)}},chalkFactory=options=>{let chalk2={};return applyOptions(chalk2,options),chalk2.template=(...arguments_)=>chalkTag(chalk2.template,...arguments_),Object.setPrototypeOf(chalk2,Chalk.prototype),Object.setPrototypeOf(chalk2.template,chalk2),chalk2.template.constructor=()=>{throw new Error("`chalk.constructor()` is deprecated. Use `new chalk.Instance()` instead.")},chalk2.template.Instance=ChalkClass,chalk2.template};function Chalk(options){return chalkFactory(options)}for(let[styleName,style]of Object.entries(ansiStyles))styles[styleName]={get(){let builder=createBuilder(this,createStyler(style.open,style.close,this._styler),this._isEmpty);return Object.defineProperty(this,styleName,{value:builder}),builder}};styles.visible={get(){let builder=createBuilder(this,this._styler,!0);return Object.defineProperty(this,"visible",{value:builder}),builder}};var usedModels=["rgb","hex","keyword","hsl","hsv","hwb","ansi","ansi256"];for(let model of usedModels)styles[model]={get(){let{level}=this;return function(...arguments_){let styler=createStyler(ansiStyles.color[levelMapping[level]][model](...arguments_),ansiStyles.color.close,this._styler);return createBuilder(this,styler,this._isEmpty)}}};for(let model of usedModels){let bgModel="bg"+model[0].toUpperCase()+model.slice(1);styles[bgModel]={get(){let{level}=this;return function(...arguments_){let styler=createStyler(ansiStyles.bgColor[levelMapping[level]][model](...arguments_),ansiStyles.bgColor.close,this._styler);return createBuilder(this,styler,this._isEmpty)}}}}var proto=Object.defineProperties(()=>{},{...styles,level:{enumerable:!0,get(){return this._generator.level},set(level){this._generator.level=level}}}),createStyler=(open,close,parent)=>{let openAll,closeAll;return parent===void 0?(openAll=open,closeAll=close):(openAll=parent.openAll+open,closeAll=close+parent.closeAll),{open,close,openAll,closeAll,parent}},createBuilder=(self,_styler,_isEmpty)=>{let builder=(...arguments_)=>isArray(arguments_[0])&&isArray(arguments_[0].raw)?applyStyle(builder,chalkTag(builder,...arguments_)):applyStyle(builder,arguments_.length===1?""+arguments_[0]:arguments_.join(" "));return Object.setPrototypeOf(builder,proto),builder._generator=self,builder._styler=_styler,builder._isEmpty=_isEmpty,builder},applyStyle=(self,string)=>{if(self.level<=0||!string)return self._isEmpty?"":string;let styler=self._styler;if(styler===void 0)return string;let{openAll,closeAll}=styler;if(string.indexOf("\x1B")!==-1)for(;styler!==void 0;)string=stringReplaceAll(string,styler.close,styler.open),styler=styler.parent;let lfIndex=string.indexOf(`
|
|
12
|
+
`);return lfIndex!==-1&&(string=stringEncaseCRLFWithFirstIndex(string,closeAll,openAll,lfIndex)),openAll+string+closeAll},template,chalkTag=(chalk2,...strings)=>{let[firstString]=strings;if(!isArray(firstString)||!isArray(firstString.raw))return strings.join(" ");let arguments_=strings.slice(1),parts=[firstString.raw[0]];for(let i=1;i<firstString.length;i++)parts.push(String(arguments_[i-1]).replace(/[{}\\]/g,"\\$&"),String(firstString.raw[i]));return template===void 0&&(template=require_templates()),template(chalk2,parts.join(""))};Object.defineProperties(Chalk.prototype,styles);var chalk=Chalk();chalk.supportsColor=stdoutColor;chalk.stderr=Chalk({level:stderrColor?stderrColor.level:0});chalk.stderr.supportsColor=stderrColor;module.exports=chalk}});export{require_source};
|
|
@@ -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-CN2QZO4U.js";import{param}from"./chunk-SXUEGVWB.js";import{outputActionRequired}from"./chunk-NS4FH2TY.js";import{printAlignedLabel}from"./chunk-XSVBYDYI.js";import{getUser}from"./chunk-EVZRQGNK.js";import{getCommandName,packageName}from"./chunk-FI772UVH.js";import{require_build_utils}from"./chunk-XFVGX5HG.js";import{emoji,output_manager_default}from"./chunk-Z6Y55QJW.js";import{require_source}from"./chunk-U7KCDTCH.js";import{__toESM}from"./chunk-6L236MNA.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},choices=[...user.version==="northstar"?[]:[{name:formatChoiceName(user.name||user.username,user.username,!currentTeam,user.limited),value:{type:"user",id:user.id,slug:user.username}}],...teams.sort(a=>a.id===user.defaultTeamId?-1:1).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 --team or --scope explicitly. No default is applied in non-interactive mode.":"No teams available.",choices:choices.map(c=>({id:c.value.id,name:c.value.slug})),next:choices.map(c=>({command:`${packageName} link --team ${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("--team <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};
|