@vercel/cli-support 68.0.0-snapshot-224301946cd2 → 68.0.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-XAXZ7GQY.js → add-4ZXS4RRN.js} +1 -1
- package/dist/chunks/{add-YQUNDDNA.js → add-G2LGF4HL.js} +1 -1
- package/dist/chunks/{add-4KBCK23F.js → add-RH3RQPGP.js} +1 -1
- package/dist/chunks/alerts-3352VWDL.js +8 -0
- package/dist/chunks/{build-TM2QAMXR.js → build-3UFKTTS5.js} +1 -1
- package/dist/chunks/chunk-22ZRVWYP.js +16 -0
- package/dist/chunks/{chunk-IIGT4EZU.js → chunk-2FUGD6J7.js} +1 -1
- package/dist/chunks/{chunk-WQWM7JF5.js → chunk-37P7O3AQ.js} +1 -1
- package/dist/chunks/{chunk-CSNP5RIM.js → chunk-3ARTWVQV.js} +1 -1
- package/dist/chunks/{chunk-2HFP22IP.js → chunk-3SF3ILIT.js} +1 -1
- package/dist/chunks/{chunk-7AAYWDIZ.js → chunk-46ISU3XI.js} +2 -2
- package/dist/chunks/{chunk-JOJOC2KU.js → chunk-47E5IB3C.js} +1 -1
- package/dist/chunks/chunk-4F73GVJZ.js +7 -0
- package/dist/chunks/{chunk-SDD6ZLJY.js → chunk-4FBOQLPZ.js} +1 -1
- package/dist/chunks/{chunk-YYC2AOHC.js → chunk-4SWS7RKX.js} +1 -1
- package/dist/chunks/{chunk-KSV7UCFB.js → chunk-5A3DDLQR.js} +1 -1
- package/dist/chunks/{chunk-BHL2HM6I.js → chunk-5U2YLD56.js} +1 -1
- package/dist/chunks/{chunk-OCJG4DNX.js → chunk-5WYJSLCF.js} +1 -1
- package/dist/chunks/{chunk-7K5ZWVDL.js → chunk-6DBLXAJI.js} +1 -1
- package/dist/chunks/{chunk-SHJ3XTD3.js → chunk-6TEYSBCT.js} +1 -1
- package/dist/chunks/chunk-6UJIJLQC.js +13 -0
- package/dist/chunks/{chunk-UZHCQFUQ.js → chunk-76NL3ZRJ.js} +1 -1
- package/dist/chunks/{chunk-PGHOMVQA.js → chunk-7SLMNM55.js} +1 -1
- package/dist/chunks/{chunk-TBLZ7V7D.js → chunk-AMZ7AUYX.js} +1 -1
- package/dist/chunks/{chunk-KW3MMVVQ.js → chunk-ATSAMHUZ.js} +1 -1
- package/dist/chunks/{chunk-OXRKY2TM.js → chunk-AVCLYJNC.js} +1 -1
- package/dist/chunks/{chunk-FHBZCMSG.js → chunk-AW5KOUD7.js} +1 -1
- package/dist/chunks/{chunk-WLD4SGKM.js → chunk-BIABM3FB.js} +1 -1
- package/dist/chunks/{chunk-4D5DAM3D.js → chunk-CEA5NDJC.js} +1 -1
- package/dist/chunks/{chunk-3VNS4D7V.js → chunk-CTBSRTJW.js} +1 -1
- package/dist/chunks/{chunk-IHHF75BQ.js → chunk-D2JNI6UB.js} +1 -1
- package/dist/chunks/{chunk-IXBJGZ54.js → chunk-D6NVKMRP.js} +1 -1
- package/dist/chunks/{chunk-6YBVHJRH.js → chunk-D6O5O3CW.js} +1 -1
- package/dist/chunks/{chunk-BUAK2QUA.js → chunk-DDZEKNQR.js} +1 -1
- package/dist/chunks/{chunk-YNMTP26U.js → chunk-DGLE44KA.js} +1 -1
- package/dist/chunks/{chunk-VQZ773A2.js → chunk-DH4A4QMD.js} +1 -1
- package/dist/chunks/{chunk-NZ5UWYC5.js → chunk-DNONVY2L.js} +1 -1
- package/dist/chunks/{chunk-F2JP7O2U.js → chunk-DTCQWGHE.js} +2 -2
- package/dist/chunks/{chunk-JJ63FWHZ.js → chunk-DXFP22OK.js} +1 -1
- package/dist/chunks/{chunk-S5C6NG55.js → chunk-E3AML3VR.js} +1 -1
- package/dist/chunks/{chunk-CV3QFGDU.js → chunk-EHAS6SQB.js} +1 -1
- package/dist/chunks/{chunk-VLVOTIOJ.js → chunk-EMTZZXMH.js} +1 -1
- package/dist/chunks/{chunk-SOTBQFIW.js → chunk-FTNLCQC6.js} +1 -1
- package/dist/chunks/{chunk-7GJ37QPL.js → chunk-GRRVPFSB.js} +1 -1
- package/dist/chunks/{chunk-EBUW6R7N.js → chunk-GXWBL6YV.js} +1 -1
- package/dist/chunks/{chunk-YKQZ2FIY.js → chunk-H24KFNPB.js} +1 -1
- package/dist/chunks/{chunk-35VK27MF.js → chunk-H3ZSF2P3.js} +1 -1
- package/dist/chunks/{chunk-YTVFHGBY.js → chunk-HR4ID3MU.js} +1 -1
- package/dist/chunks/{chunk-AYWB3MO2.js → chunk-HYAIA5YC.js} +3 -3
- package/dist/chunks/{chunk-SHL6BPBV.js → chunk-J3U2QD2L.js} +1 -1
- package/dist/chunks/{chunk-VQYHDGDM.js → chunk-J5SINMVO.js} +1 -1
- package/dist/chunks/{chunk-UNRBMQCQ.js → chunk-JCHZRW4N.js} +1 -1
- package/dist/chunks/{chunk-NOAZDAOU.js → chunk-KIDGOY4F.js} +1 -1
- package/dist/chunks/chunk-KLBSCTLL.js +7 -0
- package/dist/chunks/{chunk-5ZYYUQZI.js → chunk-KNNIA3PS.js} +1 -1
- package/dist/chunks/{chunk-DC4FJRL3.js → chunk-KXMFGDO4.js} +1 -1
- package/dist/chunks/chunk-L74PQVPL.js +7 -0
- package/dist/chunks/{chunk-KOZYKNZR.js → chunk-MDXG7T7M.js} +1 -1
- package/dist/chunks/{chunk-JUVJDLOW.js → chunk-MGKNSTU4.js} +1 -1
- package/dist/chunks/{chunk-FB25ZRYC.js → chunk-MWFHS4HV.js} +1 -1
- package/dist/chunks/{chunk-K6DILXMH.js → chunk-MYVALJ4D.js} +1 -1
- package/dist/chunks/{chunk-YYDI5Q5K.js → chunk-N3ZNAMGR.js} +1 -1
- package/dist/chunks/{chunk-BCFKN4Q3.js → chunk-NMIB4JYP.js} +1 -1
- package/dist/chunks/{chunk-N3FO2Y5F.js → chunk-O3GQG2ML.js} +1 -1
- package/dist/chunks/{chunk-67D4BIBH.js → chunk-O3YZLVC6.js} +2 -2
- package/dist/chunks/{chunk-DUSMVY4N.js → chunk-OZKP3WKT.js} +1 -1
- package/dist/chunks/{chunk-3BTI6JHC.js → chunk-PAHYNO73.js} +1 -1
- package/dist/chunks/{chunk-HX6UHVQP.js → chunk-PX3V7X3Q.js} +1 -1
- package/dist/chunks/{chunk-BLVC5EJT.js → chunk-Q4R34AVE.js} +1 -1
- package/dist/chunks/{chunk-R3QHEJL6.js → chunk-Q6YPC3GK.js} +1 -1
- package/dist/chunks/{chunk-WHOGPAL6.js → chunk-QHGPFYWQ.js} +1 -1
- package/dist/chunks/{chunk-DMA77UYG.js → chunk-QPNTR3PA.js} +1 -1
- package/dist/chunks/{chunk-PHPJS2G2.js → chunk-R43H4T4L.js} +1 -1
- package/dist/chunks/{chunk-R47H4HYG.js → chunk-S6TAO4MD.js} +1 -1
- package/dist/chunks/{chunk-KHUD5ZTN.js → chunk-TGIIE2L3.js} +1 -1
- package/dist/chunks/chunk-TSIKSHYG.js +7 -0
- package/dist/chunks/{chunk-HS3PNMBX.js → chunk-TU54LHNW.js} +1 -1
- package/dist/chunks/{chunk-KHMNANEN.js → chunk-U43WXZBP.js} +1 -1
- package/dist/chunks/{chunk-HMJR6RVF.js → chunk-UPDIZCP3.js} +1 -1
- package/dist/chunks/{chunk-ZQVD57V5.js → chunk-V3YNYCRV.js} +2 -2
- package/dist/chunks/{chunk-P43CQDVR.js → chunk-VBANKZWM.js} +1 -1
- package/dist/chunks/{chunk-TOCPUQ6N.js → chunk-VJNTVPUV.js} +1 -1
- package/dist/chunks/{chunk-BBOOWC7X.js → chunk-WHEA5VLX.js} +1 -1
- package/dist/chunks/{chunk-O4Y26S64.js → chunk-XC25DYA7.js} +1 -1
- package/dist/chunks/{chunk-AVXX4Q6S.js → chunk-XE4SLG5H.js} +1 -1
- package/dist/chunks/{chunk-X5TIKXI7.js → chunk-XHBZITV4.js} +1 -1
- package/dist/chunks/{chunk-TO5AR7IO.js → chunk-YOKTRWQX.js} +1 -1
- package/dist/chunks/{chunk-HLZRBOYG.js → chunk-Z3XKNZDP.js} +1 -1
- package/dist/chunks/{chunk-MTFTT7ZW.js → chunk-Z436ZYLV.js} +1 -1
- package/dist/chunks/{chunk-5UG4YYEX.js → chunk-ZBOTJT5S.js} +1 -1
- package/dist/chunks/chunk-ZGM4K3B5.js +7 -0
- package/dist/chunks/{chunk-C6GEVMTF.js → chunk-ZHGKJCQ2.js} +8 -8
- package/dist/chunks/{clear-RYDN2BJI.js → clear-GL4SZ2XR.js} +1 -1
- package/dist/chunks/{compile-vercel-config-52MEHYDA.js → compile-vercel-config-HMKEDWC4.js} +1 -1
- package/dist/chunks/config-KSQQQMQQ.js +7 -0
- package/dist/chunks/{config-TLW5QWPA.js → config-U4GLPYDY.js} +1 -1
- package/dist/chunks/config-validator.mjs +1 -1
- package/dist/chunks/{delete-D6Y47HSU.js → delete-D2WLQHVB.js} +1 -1
- package/dist/chunks/delete-O2VWRQC3.js +10 -0
- package/dist/chunks/{describe-JMZNU7JT.js → describe-N36SISDN.js} +1 -1
- package/dist/chunks/{detect-projects-AZXG6BRD.js → detect-projects-I7NEHWSM.js} +1 -1
- package/dist/chunks/{detect-services-UAV2B7PV.js → detect-services-4ONC2DH3.js} +1 -1
- package/dist/chunks/disable-EHRVY24G.js +7 -0
- package/dist/chunks/discard-QW5TMTXX.js +14 -0
- package/dist/chunks/{edit-JR3XPTH4.js → edit-IZR537PS.js} +1 -1
- package/dist/chunks/edit-WM6KJPSI.js +8 -0
- package/dist/chunks/enable-5Z72O3NI.js +7 -0
- package/dist/chunks/{export-ZSGAZXLV.js → export-IWVMWM2H.js} +1 -1
- package/dist/chunks/{future-2GW5PLR5.js → future-3AUPMPY7.js} +1 -1
- package/dist/chunks/{generate-cert-for-deploy-KY4ZCRAK.js → generate-cert-for-deploy-OZWVIWOO.js} +1 -1
- package/dist/chunks/image-EFBQXTAP.js +7 -0
- package/dist/chunks/{import-builders-MXKADD3S.js → import-builders-2G4KVI4T.js} +1 -1
- package/dist/chunks/{inspect-5L542UG5.js → inspect-47FM3OWG.js} +1 -1
- package/dist/chunks/{inspect-AMCI2LLR.js → inspect-6J5DGZZ4.js} +1 -1
- package/dist/chunks/{inspect-MJ7CCOKD.js → inspect-6Y672OQ3.js} +1 -1
- package/dist/chunks/inspect-ALC2J4BF.js +8 -0
- package/dist/chunks/{inspect-J6KVRJ7Y.js → inspect-QT3QEFBW.js} +1 -1
- package/dist/chunks/{inspect-6DHUE7A7.js → inspect-SW2I7D6E.js} +1 -1
- package/dist/chunks/{list-HFAZSMP4.js → list-2CMCXXP4.js} +1 -1
- package/dist/chunks/{list-H26ESLWR.js → list-BIFH4KO5.js} +1 -1
- package/dist/chunks/{list-6NRT47ES.js → list-CXXDI5UV.js} +1 -1
- package/dist/chunks/list-TGDHJKDT.js +8 -0
- package/dist/chunks/{login-FB6OZIZ4.js → login-IUQDG334.js} +1 -1
- package/dist/chunks/{login-MECBM76Z.js → login-WYDX5KZN.js} +1 -1
- package/dist/chunks/{logs-CP7YB73H.js → logs-E3RZLAT2.js} +1 -1
- package/dist/chunks/{ls-RQVX47DY.js → ls-4DNFF35I.js} +1 -1
- package/dist/chunks/{ls-32OVVPZW.js → ls-7D73WVOF.js} +1 -1
- package/dist/chunks/{ls-GJZPC64P.js → ls-C75Z5FBX.js} +1 -1
- package/dist/chunks/{ls-OHOMEI5T.js → ls-ERDQLUT2.js} +1 -1
- package/dist/chunks/{ls-WG2IUBOR.js → ls-GC5MX2HZ.js} +1 -1
- package/dist/chunks/{ls-XYTMV3AK.js → ls-IQUZ6GWG.js} +1 -1
- package/dist/chunks/{ls-5MH6K27B.js → ls-YTKJRKD3.js} +1 -1
- package/dist/chunks/{migrate-experimental-services-T7T24F2S.js → migrate-experimental-services-GPGYPN66.js} +1 -1
- package/dist/chunks/{mutate-A2NBCRWB.js → mutate-YJNE2733.js} +1 -1
- package/dist/chunks/{notifications-DNYXKQTM.js → notifications-2HU4L7WA.js} +1 -1
- package/dist/chunks/{open-WMRSBVLE.js → open-MA7QGJKO.js} +1 -1
- package/dist/chunks/{openapi-6RKKA6JG.js → openapi-POBVCXS3.js} +1 -1
- package/dist/chunks/{permissions-NKB64XKD.js → permissions-AU5M5A6G.js} +1 -1
- package/dist/chunks/{plugin-offer-PVANAUW2.js → plugin-offer-E53UQXXX.js} +1 -1
- package/dist/chunks/{prompt-missing-credentials-UZPXAUPC.js → prompt-missing-credentials-7F7MUAWK.js} +1 -1
- package/dist/chunks/publish-G7NQESCE.js +15 -0
- package/dist/chunks/{pull-YVO5O2XN.js → pull-4LISUHDN.js} +1 -1
- package/dist/chunks/{purchase-domain-if-available-CRDIL367.js → purchase-domain-if-available-QH2OHRLZ.js} +1 -1
- package/dist/chunks/{push-JLMYKMPG.js → push-BG7UEIKY.js} +1 -1
- package/dist/chunks/{query-B5QW26OE.js → query-QCIU5IB4.js} +1 -1
- package/dist/chunks/{raw-query-EVKRAAOJ.js → raw-query-QHFSKN55.js} +1 -1
- package/dist/chunks/{reauthenticate-RWWFUE42.js → reauthenticate-U2LOFDFP.js} +1 -1
- package/dist/chunks/remove-IB7C6LII.js +9 -0
- package/dist/chunks/reorder-E5UYNMML.js +10 -0
- package/dist/chunks/{reply-EH2GBOMD.js → reply-DSDFBUAX.js} +1 -1
- package/dist/chunks/{resolve-46WA2PXL.js → resolve-VK5QTUII.js} +1 -1
- package/dist/chunks/{resolve-agent-team-52A4CIIC.js → resolve-agent-team-D7RFR6WL.js} +1 -1
- package/dist/chunks/restore-IVNZOVU3.js +16 -0
- package/dist/chunks/{rm-5EFXXQSK.js → rm-GYS4DS2Z.js} +1 -1
- package/dist/chunks/{rm-3HIT2KQT.js → rm-L2KCHMLS.js} +1 -1
- package/dist/chunks/{rm-R5B4BV3M.js → rm-LWEITUDD.js} +1 -1
- package/dist/chunks/{rm-X46AUZBU.js → rm-PAI3WZXJ.js} +1 -1
- package/dist/chunks/{rm-XF6JNRVC.js → rm-PDJE63VV.js} +1 -1
- package/dist/chunks/{rule-inspect-HLLGCACM.js → rule-inspect-LQISNCBT.js} +1 -1
- package/dist/chunks/{schema-CBYGIMPL.js → schema-ZIK2W4AX.js} +1 -1
- package/dist/chunks/{schema-NCH5NN2G.js → schema-ZOPJJLJC.js} +1 -1
- package/dist/chunks/{select-org-GTYZJQR3.js → select-org-EKDOS2CQ.js} +1 -1
- package/dist/chunks/set-B5MPNYXG.js +8 -0
- package/dist/chunks/{set-5EFQ6HAY.js → set-MC2CLSA2.js} +1 -1
- package/dist/chunks/{setup-and-link-ROS22SLK.js → setup-and-link-FHHZAU65.js} +1 -1
- package/dist/chunks/{skills-SUGA6D3G.js → skills-X5MN3OH2.js} +1 -1
- package/dist/chunks/{tags-Z4NNOYPB.js → tags-WRVKKRN7.js} +1 -1
- package/dist/chunks/{types-YFDB4QZA.js → types-PC3JIYPX.js} +1 -1
- package/dist/chunks/{update-GKWIBCQG.js → update-QDIZFM4T.js} +1 -1
- package/dist/chunks/{usage-G6S4RCCK.js → usage-JUP36KHN.js} +1 -1
- package/dist/chunks/{validate-config-LDOYJ4LL.js → validate-config-K42CVRCZ.js} +1 -1
- package/dist/commands/build/index.js +1 -1
- package/dist/commands/deploy/index.js +5 -5
- package/dist/commands/dev/index.js +5 -5
- package/dist/commands/env/index.js +1 -1
- package/dist/commands/link/index.js +1 -1
- package/dist/commands/list/index.js +1 -1
- package/dist/commands/project/index.js +62 -51
- package/dist/commands/tunnel/index.js +1 -1
- package/dist/commands-account.js +6 -6
- package/dist/commands-ai.js +2 -2
- package/dist/commands-blob.js +1 -1
- package/dist/commands-core.js +6 -6
- package/dist/commands-deployments.js +1 -1
- package/dist/commands-flags.js +8 -8
- package/dist/commands-integrations.js +1 -1
- package/dist/commands-observability.js +2 -2
- package/dist/commands-routing.js +2 -2
- package/dist/index.js +4 -4
- package/dist/internal-build.js +1 -1
- package/dist/package.json +41 -41
- package/dist/version.mjs +1 -1
- package/package.json +43 -43
- package/dist/chunks/alerts-DUTGB7DI.js +0 -8
- package/dist/chunks/chunk-2BK7SZQA.js +0 -7
- package/dist/chunks/chunk-G5JCTGL2.js +0 -7
- package/dist/chunks/chunk-GQXKF3PR.js +0 -7
- package/dist/chunks/chunk-J4OACK47.js +0 -16
- package/dist/chunks/chunk-LM4457HA.js +0 -13
- package/dist/chunks/chunk-N4PID4SD.js +0 -7
- package/dist/chunks/config-QQSZ7AL4.js +0 -7
- package/dist/chunks/delete-WKZ4QCNM.js +0 -10
- package/dist/chunks/disable-VCOBD3ZT.js +0 -7
- package/dist/chunks/discard-VIOUKDUY.js +0 -14
- package/dist/chunks/edit-4FEVCMD4.js +0 -8
- package/dist/chunks/enable-7UPZVKQK.js +0 -7
- package/dist/chunks/image-HXRCOQ7V.js +0 -7
- package/dist/chunks/inspect-YKSWSH3T.js +0 -8
- package/dist/chunks/list-ZHES2WYK.js +0 -8
- package/dist/chunks/publish-LDWJ2ON7.js +0 -15
- package/dist/chunks/remove-CSIMGLLS.js +0 -9
- package/dist/chunks/reorder-ZZJLSJTV.js +0 -10
- package/dist/chunks/restore-WYZSU2PQ.js +0 -16
- package/dist/chunks/set-BS5KCRE4.js +0 -8
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{packageName}from"./chunk-B4KA3ZH2.js";import{jsonOption,limitOption,projectOption,yesOption}from"./chunk-DORCX7UB.js";var listSubcommand={name:"list",aliases:["ls"],description:"List all routing rules for the current project. These routes apply to all deployments and environments.",arguments:[],options:[projectOption,jsonOption,{name:"query",description:"Search by name, description, source, or destination",shorthand:"q",type:String,argument:"TEXT",deprecated:!1},{name:"search",description:"Deprecated alias for `--query`",shorthand:"s",type:String,argument:"QUERY",deprecated:!0},{name:"type",description:"Filter by type: rewrite, redirect, set_status, transform",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"filter",description:"Deprecated alias for `--type`",shorthand:"f",type:String,argument:"TYPE",deprecated:!0},{name:"production",description:"List routes from the live production version",shorthand:null,type:Boolean,deprecated:!1},{name:"routes-version",description:"List routes from a specific version",shorthand:null,type:String,argument:"VERSION",deprecated:!1},{name:"version-id",description:"Deprecated alias for `--routes-version`",shorthand:null,type:String,argument:"VERSION_ID",deprecated:!0},{name:"diff",description:"Compare staged changes against production. Use with --routes-version to compare a specific version.",shorthand:null,type:Boolean,deprecated:!1},{name:"expand",description:"Show expanded details for each route",shorthand:null,deprecatedShorthand:"e",type:Boolean,deprecated:!1}],examples:[{name:"List all routes",value:`${packageName} routes list`},{name:"Search for routes",value:`${packageName} routes list --query "api"`},{name:"Filter by type",value:`${packageName} routes list --type rewrite`},{name:"Show staged changes",value:`${packageName} routes list --diff`},{name:"Show live production routes",value:`${packageName} routes list --production`},{name:"Show expanded details",value:`${packageName} routes list --expand`}]},listVersionsSubcommand={name:"list-versions",aliases:["ls-versions"],description:"List all versions of routing rules",arguments:[],options:[projectOption,jsonOption,{...limitOption,description:"Number of versions to fetch (default: 20, max: 100)"},{name:"count",description:"Deprecated alias for `--limit`",shorthand:null,type:Number,argument:"NUMBER",deprecated:!0}],examples:[{name:"List route versions",value:`${packageName} routes list-versions`},{name:"List more versions",value:`${packageName} routes list-versions --limit 50`}]},inspectSubcommand={name:"inspect",aliases:[],description:"Show detailed information about a specific route",arguments:[{name:"name-or-id",required:!0}],options:[projectOption,jsonOption,{name:"diff",description:"Compare staged changes against production for this route",shorthand:null,type:Boolean,deprecated:!1}],examples:[{name:"Inspect a route by name",value:`${packageName} routes inspect "API rewrite"`},{name:"Inspect a route by ID",value:`${packageName} routes inspect abc123`},{name:"Show staged changes for a route",value:`${packageName} routes inspect "My route" --diff`}]},addSubcommand={name:"add",aliases:[],description:"Add a new routing rule to the project",arguments:[{name:"name",required:!1}],options:[projectOption,{name:"src",description:"Path pattern (required in non-interactive mode)",shorthand:null,type:String,argument:"PATTERN",deprecated:!1},{name:"src-syntax",description:"Path syntax: regex, path-to-regexp, equals (default: regex)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"action",description:"Action type: rewrite, redirect, or set-status (required with --dest/--status)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"dest",description:"Destination URL for rewrite or redirect",shorthand:null,type:String,argument:"URL",deprecated:!1},{name:"status",description:"Status code (301/302/307/308 for redirect, or any for set-status)",shorthand:null,type:Number,argument:"CODE",deprecated:!1},{name:"set-response-header",description:"Set response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-response-header",description:"Append to response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-response-header",description:"Delete response header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-header",description:"Set request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-request-header",description:"Append to request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-request-header",description:"Delete request header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-query",description:"Set query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"append-request-query",description:"Append to query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"delete-request-query",description:"Delete query parameter: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"has",description:"Condition that must match: type:key or type:key:value (repeatable)",shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"missing",description:'"Does not have" condition: type:key or type:key:value (repeatable)',shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"description",description:"Route description (max 1024 chars)",shorthand:null,type:String,argument:"TEXT",deprecated:!1},{name:"no-enable",description:"Add the route turned off (default: on)",shorthand:null,type:Boolean,deprecated:!1},{name:"disabled",description:"Deprecated alias for `--no-enable`",shorthand:null,type:Boolean,deprecated:!0},{name:"ai",description:"Generate route from a natural language description (AI-powered)",shorthand:null,type:String,argument:"PROMPT",deprecated:!1},{name:"position",description:"Position: start, end, after:<id>, before:<id>",shorthand:null,type:String,argument:"POSITION",deprecated:!1},{name:"yes",description:"Skip confirmation prompts",shorthand:"y",type:Boolean,deprecated:!1}],examples:[{name:"Interactive mode",value:`${packageName} routes add`},{name:"Create with AI",value:`${packageName} routes add --ai "Rewrite /api/* to https://backend.internal/*"`},{name:"Add a rewrite",value:`${packageName} routes add "API Proxy" --src "/api/:path*" --src-syntax path-to-regexp --action rewrite --dest "https://api.example.com/:path*" --yes`},{name:"Add a redirect",value:`${packageName} routes add "Old Blog" --src "/blog" --src-syntax equals --action redirect --dest "/articles" --status 301 --yes`},{name:"Add CORS headers",value:`${packageName} routes add "CORS" --src "^/api/.*$" --set-response-header "Access-Control-Allow-Origin=*" --yes`},{name:"Block access (set status)",value:`${packageName} routes add "Block Admin" --src "^/admin/.*$" --action set-status --status 403 --yes`},{name:"Conditional redirect",value:`${packageName} routes add "Auth Required" --src "/protected/:path*" --src-syntax path-to-regexp --action redirect --dest "/login" --status 307 --missing "cookie:session" --yes`},{name:"Rewrite with request headers",value:`${packageName} routes add "Backend Proxy" --src "/backend/:path*" --src-syntax path-to-regexp --action rewrite --dest "https://internal.example.com/:path*" --set-request-header "X-Forwarded-Host=myapp.com" --yes`},{name:"Add route at start",value:`${packageName} routes add "Priority Route" --src "/priority" --src-syntax equals --action rewrite --dest "/handler" --position start --yes`}]},publishSubcommand={name:"publish",aliases:[],description:"Publish all staged routing changes to production",arguments:[],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when publishing"}],examples:[{name:"Publish staged changes",value:`${packageName} routes publish`},{name:"Publish without confirmation",value:`${packageName} routes publish --yes`}]},restoreSubcommand={name:"restore",aliases:[],description:"Restore a previous routing version to production",arguments:[{name:"version-id",required:!0}],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when restoring"}],examples:[{name:"Restore a previous version",placeholders:["<version-id>"],value:`${packageName} routes restore <version-id>`},{name:"Restore without confirmation",placeholders:["<version-id>"],value:`${packageName} routes restore <version-id> --yes`}]},discardSubcommand={name:"discard-staging",aliases:[],description:"Discard staged routing changes",arguments:[],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when discarding"}],examples:[{name:"Discard staged changes",value:`${packageName} routes discard-staging`},{name:"Discard without confirmation",value:`${packageName} routes discard-staging --yes`}]},deleteSubcommand={name:"remove",aliases:["rm","delete"],description:"Remove one or more routing rules",arguments:[{name:"name-or-id",required:!0,multiple:!0}],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when removing"}],examples:[{name:"Remove a route by name",value:`${packageName} routes remove "Old Redirect"`},{name:"Remove a route by ID",value:`${packageName} routes remove abc123`},{name:"Remove multiple routes",value:`${packageName} routes remove "Route A" "Route B"`},{name:"Remove without confirmation",value:`${packageName} routes remove "Old Route" --yes`}]},enableSubcommand={name:"enable",aliases:[],description:"Enable a disabled routing rule",arguments:[{name:"name-or-id",required:!0}],options:[projectOption],examples:[{name:"Enable a route by name",value:`${packageName} routes enable "API Proxy"`},{name:"Enable a route by ID",value:`${packageName} routes enable abc123`}]},disableSubcommand={name:"disable",aliases:[],description:"Disable a routing rule without deleting it",arguments:[{name:"name-or-id",required:!0}],options:[projectOption],examples:[{name:"Disable a route by name",value:`${packageName} routes disable "API Proxy"`},{name:"Disable a route by ID",value:`${packageName} routes disable abc123`}]},reorderSubcommand={name:"move",aliases:["reorder"],description:"Move a routing rule to a different position",arguments:[{name:"name-or-id",required:!0}],options:[projectOption,{name:"position",description:"Target position: start, end, a number (1-based), before:<id>, after:<id>",shorthand:null,type:String,argument:"POSITION",deprecated:!1},{name:"first",description:"Move to the first position (highest priority)",shorthand:null,type:Boolean,deprecated:!1},{name:"last",description:"Move to the last position (lowest priority)",shorthand:null,type:Boolean,deprecated:!1},{...yesOption,description:"Skip the confirmation prompt when moving"}],examples:[{name:"Move to first position",value:`${packageName} routes move "Catch All" --first`},{name:"Move to last position",value:`${packageName} routes move "Catch All" --last`},{name:"Move to a specific position",value:`${packageName} routes move "API Proxy" --position 3`},{name:"Move after another route",value:`${packageName} routes move "API Proxy" --position after:route-id-123`},{name:"Interactive move (prompts for position)",value:`${packageName} routes move "API Proxy"`}]},editSubcommand={name:"update",aliases:["edit"],description:"Update an existing routing rule",arguments:[{name:"name-or-id",required:!0}],options:[projectOption,{name:"name",description:"Change route name",shorthand:null,type:String,argument:"NAME",deprecated:!1},{name:"description",description:'Change description (use "" to clear)',shorthand:null,type:String,argument:"TEXT",deprecated:!1},{name:"src",description:"Change source path pattern",shorthand:null,type:String,argument:"PATTERN",deprecated:!1},{name:"src-syntax",description:"Change path syntax: regex, path-to-regexp, equals",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"action",description:"Set action type: rewrite, redirect, or set-status (required when switching types)",shorthand:null,type:String,argument:"TYPE",deprecated:!1},{name:"dest",description:"Set destination URL",shorthand:null,type:String,argument:"URL",deprecated:!1},{name:"status",description:"Set status code",shorthand:null,type:Number,argument:"CODE",deprecated:!1},{name:"no-dest",description:"Remove destination",shorthand:null,type:Boolean,deprecated:!1},{name:"no-status",description:"Remove status code",shorthand:null,type:Boolean,deprecated:!1},{name:"set-response-header",description:"Set response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-response-header",description:"Append to response header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-response-header",description:"Delete response header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-header",description:"Set request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"append-request-header",description:"Append to request header: key=value (repeatable)",shorthand:null,type:[String],argument:"HEADER",deprecated:!1},{name:"delete-request-header",description:"Delete request header: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"set-request-query",description:"Set query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"append-request-query",description:"Append to query parameter: key=value (repeatable)",shorthand:null,type:[String],argument:"PARAM",deprecated:!1},{name:"delete-request-query",description:"Delete query parameter: key (repeatable)",shorthand:null,type:[String],argument:"KEY",deprecated:!1},{name:"has",description:"Add a has condition: type:key or type:key:value (repeatable)",shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"missing",description:'Add a "does not have" condition: type:key or type:key:value (repeatable)',shorthand:null,type:[String],argument:"CONDITION",deprecated:!1},{name:"clear-conditions",description:"Remove all has/does-not-have conditions",shorthand:null,type:Boolean,deprecated:!1},{name:"clear-headers",description:"Remove all response headers",shorthand:null,type:Boolean,deprecated:!1},{name:"clear-transforms",description:"Remove all transforms (request headers, request query)",shorthand:null,type:Boolean,deprecated:!1},{name:"ai",description:"Describe changes using natural language (AI-powered)",shorthand:null,type:String,argument:"PROMPT",deprecated:!1},{...yesOption,description:"Skip confirmation prompts"}],examples:[{name:"Interactive mode",value:`${packageName} routes update "API Proxy"`},{name:"Update with AI",value:`${packageName} routes update "API Proxy" --ai "Add CORS headers and change status to 308"`},{name:"Change destination",value:`${packageName} routes update "API Proxy" --dest "https://new-api.example.com/:path*"`},{name:"Switch to redirect",value:`${packageName} routes update "Old Route" --action redirect --dest "/new" --status 301`},{name:"Add a response header",value:`${packageName} routes update "My Route" --set-response-header "Cache-Control=public, max-age=3600"`},{name:"Clear all conditions and add new ones",value:`${packageName} routes update "My Route" --clear-conditions --has "header:Authorization"`}]},exportSubcommand={name:"export",aliases:[],description:"Export routes to a vercel.json or vercel.ts file",arguments:[{name:"name-or-id",required:!1}],options:[projectOption,{name:"output",description:"Output file format: .json or .ts (default: .json)",shorthand:"o",type:String,argument:"json|ts",deprecated:!1}],examples:[{name:"Export as vercel.json format",value:`${packageName} routes export`},{name:"Export as vercel.ts format",value:`${packageName} routes export --output ts`},{name:"Export a specific route",value:`${packageName} routes export "API Proxy"`},{name:"Export to a file",value:`${packageName} routes export > routes.json`}]},routesCommand={name:"routes",aliases:[],description:"Manage routing rules for a project. Routes managed at the project level apply to all deployments and environments.",arguments:[],subcommands:[listSubcommand,listVersionsSubcommand,inspectSubcommand,addSubcommand,editSubcommand,deleteSubcommand,enableSubcommand,disableSubcommand,reorderSubcommand,exportSubcommand,publishSubcommand,restoreSubcommand,discardSubcommand],options:[],examples:[]};export{listSubcommand,listVersionsSubcommand,inspectSubcommand,addSubcommand,publishSubcommand,restoreSubcommand,discardSubcommand,deleteSubcommand,enableSubcommand,disableSubcommand,reorderSubcommand,editSubcommand,exportSubcommand,routesCommand};
|
|
@@ -1,7 +0,0 @@
|
|
|
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{DEFAULT_ORDER_WAIT_MS,ORDER_READ_TIMING,getOrderOutcome,pollForOrder,remainingWait}from"./chunk-JJ63FWHZ.js";import{trackCreatedId}from"./chunk-BUBVZ6SQ.js";import{getScope}from"./chunk-YYC2AOHC.js";import{sleep}from"./chunk-C6GEVMTF.js";import{buildCommandWithGlobalFlags}from"./chunk-CSNP5RIM.js";import{DomainChargeOutcomeUnknown,DomainNotAvailable,DomainPaymentAuthenticationRequired,DomainPaymentError,DomainPriceChanged,DomainPurchaseInProgress,DomainPurchaseRefundFailed,DomainPurchaseRefunded,InvalidDomain,TLDNotSupportedViaCLI,UnexpectedDomainPurchaseError,UnsupportedTLD,isAPIError}from"./chunk-QFE3RPMA.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";async function getDomainPrice(client,name){try{return await client.fetch(`/v1/registrar/domains/${name}/price`)}catch(err){if(isAPIError(err)){if(err.code==="tld_not_supported")return new UnsupportedTLD(name);if(err.status<500)return err}throw err}}async function getDomainStatus(client,domain){return client.fetch(`/v1/registrar/domains/${encodeURIComponent(domain)}/availability`)}var PURCHASE_TIMING={lostOrderReconcileMs:10*1e3},BOUGHT_AT_SKEW_MS=5*60*1e3;async function isPurchasedSince(client,name,since,{timeoutMs}={}){try{let{domain}=await client.fetch(`/v5/domains/${encodeURIComponent(name)}`,{bailOn429:!0,...timeoutMs!==void 0&&{retry:{retries:0},signal:AbortSignal.timeout(timeoutMs)}}),{boughtAt,expiresAt}=domain;return typeof boughtAt=="number"&&boughtAt>=since-BOUGHT_AT_SKEW_MS&&(typeof expiresAt!="number"||expiresAt>Date.now())}catch{return!1}}async function waitForPurchase(client,name,since,timeoutMs){let startTime=Date.now(),intervalMs=1e3,lookup=()=>isPurchasedSince(client,name,since,{timeoutMs:Math.max(timeoutMs-(Date.now()-startTime),1e3)});for(;Date.now()-startTime<timeoutMs;){if(await lookup())return!0;await sleep(Math.min(intervalMs,timeoutMs-(Date.now()-startTime))),intervalMs=Math.min(intervalMs*2,5e3)}return lookup()}async function purchaseDomain(client,name,expectedPrice,years,autoRenew=!0,contactInformation,{waitMs=DEFAULT_ORDER_WAIT_MS,onOrderAccepted}={}){let{team}=await getScope(client),teamParam=team?`?teamId=${team.slug}`:"",startedAt=Date.now(),orderId;try{({orderId}=await client.fetch(`/v1/registrar/domains/${name}/buy${teamParam}`,{body:{expectedPrice,autoRenew,years,contactInformation},method:"POST",retry:{retries:0},bailOn429:!0}))}catch(err){if(isAPIError(err)&&err.status<500){if(err.code==="invalid_domain")return new InvalidDomain(name);if(err.code==="domain_not_available")return new DomainNotAvailable(name);if(err.code==="tld_not_supported")return new UnsupportedTLD(name);if(err.code==="additional_contact_info_required")return new TLDNotSupportedViaCLI(name);if(err.code==="expected_price_mismatch")return new DomainPriceChanged(name);if(err.code==="purchase_in_progress"){let otherOrderId=typeof err.orderId=="string"?err.orderId:void 0;return new DomainPurchaseInProgress(name,otherOrderId,otherOrderId&&buildCommandWithGlobalFlags(client.argv,`api /v1/registrar/orders/${otherOrderId}`))}throw err}return await waitForPurchase(client,name,startedAt,PURCHASE_TIMING.lostOrderReconcileMs)?{status:"completed",orderId:null}:new DomainChargeOutcomeUnknown(name,"buy")}trackCreatedId(client,"domain-order",orderId),onOrderAccepted?.(orderId);let ownedSince=since=>isPurchasedSince(client,name,since,{timeoutMs:Math.max(startedAt+waitMs+ORDER_READ_TIMING.minReadMs-Date.now(),1e3)});if(waitMs<=0)return{status:"pending",orderId,lastStatus:null};let poll=await pollForOrder(client,orderId,remainingWait(waitMs,startedAt));if(poll.order===null)return await ownedSince(startedAt)?{status:"completed",orderId}:{status:"pending",orderId,lastStatus:poll.lastStatus,...poll.readError&&{readError:poll.readError}};let outcome=getOrderOutcome(poll.order,name);switch(outcome){case"completed":return{status:"completed",orderId};case"payment_failed":return new DomainPaymentError;case"payment_authentication_required":return new DomainPaymentAuthenticationRequired(name,team?.slug);case"refund_failed":return new DomainPurchaseRefundFailed(name);case"refunded":case"failed":return await ownedSince(0)?{status:"already_owned",orderId,orderOutcome:outcome}:outcome==="refunded"?new DomainPurchaseRefunded(name):new UnexpectedDomainPurchaseError(name);case"unknown":return await ownedSince(startedAt)?{status:"completed",orderId}:new DomainChargeOutcomeUnknown(name,"buy",orderId)}}var CONTACT_FIELDS=[{field:"firstName",flag:"--first-name",label:"First name",prompt:"First name:",validate:val=>val.length>0||"First name is required"},{field:"lastName",flag:"--last-name",label:"Last name",prompt:"Last name:",validate:val=>val.length>0||"Last name is required"},{field:"email",flag:"--email",label:"Email",prompt:"Email:",validate:val=>val.length===0?"Email is required":/^[^\s@]+@[^\s@]+\.[^\s@]+$/.test(val)?!0:"Invalid email format"},{field:"phone",flag:"--phone",label:"Phone",prompt:"Phone (include country code, e.g., +15551234567):",validate:val=>val.length===0?"Phone is required":/^\+\d{10,15}$/.test(val)?!0:"Phone must start with + and contain 10-15 digits"},{field:"address1",flag:"--address",label:"Address",prompt:"Address:",validate:val=>val.length>0||"Address is required"},{field:"city",flag:"--city",label:"City",prompt:"City:",validate:val=>val.length>0||"City is required"},{field:"state",flag:"--state",label:"State",prompt:"State/Province:",validate:val=>val.length>0||"State/Province is required"},{field:"zip",flag:"--zip",label:"ZIP",prompt:"Postal/ZIP code:",validate:val=>val.length>0||"Postal/ZIP code is required"},{field:"country",flag:"--country",label:"Country",prompt:"Country code (2 letters, e.g., US):",validate:val=>val.length===0?"Country code is required":/^[A-Z]{2}$/i.test(val)?!0:"Country code must be 2 letters"},{field:"companyName",flag:"--company",label:"Company",prompt:"Company name (optional):"}],ADDRESS_FIELDS=new Set(["address1","city","state","zip","country"]);function readContactFlags(flags){let contact={};for(let{field,flag,validate}of CONTACT_FIELDS){let raw=flags[flag];if(typeof raw!="string")continue;let value=raw.trim(),result=validate?validate(value):!0;if(result!==!0)return`Invalid ${flag}. ${result}.`;contact[field]=field==="country"?value.toUpperCase():value}return contact}function getBillingContact(team){let billing=team?.billing;if(!billing)return{};let address=billing.address,line1=address?.line1?.trim(),line2=address?.line2?.trim(),country=address?.country?.trim().toUpperCase(),rawState=address?.state?.trim(),state=country&&rawState?.toUpperCase().startsWith(`${country}-`)?rawState.slice(country.length+1):rawState,candidates={email:billing.email,address1:line1&&line2?`${line1}, ${line2}`:line1,city:address?.city,state:country==="US"&&!/^[A-Z]{2}$/i.test(state??"")?"":state,zip:address?.postalCode,country},contact={};for(let{field,validate}of CONTACT_FIELDS){let value=candidates[field]?.trim();value&&(!validate||validate(value)===!0)&&(contact[field]=value)}return contact}function mergeContact(fromFlags,billing){let ownAddress=[...ADDRESS_FIELDS].some(field=>fromFlags[field]!==void 0&&billing[field]!==void 0),merged={};for(let{field}of CONTACT_FIELDS){let fallback=ownAddress&&ADDRESS_FIELDS.has(field)?void 0:billing[field],value=fromFlags[field]??fallback;value!==void 0&&(merged[field]=value)}return merged}function billingFieldsUsed(fromFlags,billing){let merged=mergeContact(fromFlags,billing),used={};for(let{field}of CONTACT_FIELDS)fromFlags[field]===void 0&&merged[field]!==void 0&&(used[field]=merged[field]);return used}function missingContactFields(contact){return CONTACT_FIELDS.filter(({field,validate})=>validate&&!contact[field]).map(({field})=>field)}async function collectContactInformation(client,{provided={},defaults={}}={}){let contact={...provided},pending=CONTACT_FIELDS.filter(({field})=>!(field in provided));pending.length>0&&(output_manager_default.log(""),output_manager_default.log("Please provide contact information for domain registration:"));for(let{field,prompt,validate}of pending){let value=await client.input.text({message:prompt,default:defaults[field],validate});value&&(contact[field]=value)}return{...contact,country:contact.country.toUpperCase(),companyName:contact.companyName||void 0}}export{getDomainPrice,getDomainStatus,isPurchasedSince,purchaseDomain,CONTACT_FIELDS,readContactFlags,getBillingContact,mergeContact,billingFieldsUsed,missingContactFields,collectContactInformation};
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
import { createRequire as __createRequire } from 'node:module';
|
|
2
|
-
import { fileURLToPath as __fileURLToPath } from 'node:url';
|
|
3
|
-
import { dirname as __dirname_ } from 'node:path';
|
|
4
|
-
const require = __createRequire(import.meta.url);
|
|
5
|
-
const __filename = __fileURLToPath(import.meta.url);
|
|
6
|
-
const __dirname = __dirname_(__filename);
|
|
7
|
-
import{packageName}from"./chunk-B4KA3ZH2.js";import{formatOption,jsonOption,limitOption,nextCursorOption,projectOption,sinceOption,untilOption,yesOption}from"./chunk-DORCX7UB.js";var SCOPE_RULES={team:{perEntity:!1,canPause:!0},organization:{perEntity:!1,canPause:!1},project:{perEntity:!0,canPause:!0},product:{perEntity:!0,canPause:!0}},BUDGET_SCOPES=Object.keys(SCOPE_RULES),OPTION_SCOPES=BUDGET_SCOPES.filter(scope=>scope!=="team");function isBudgetScope(value){return typeof value=="string"&&Object.hasOwn(SCOPE_RULES,value)}function isPerEntityScope(scope){return isBudgetScope(scope)?SCOPE_RULES[scope].perEntity:!0}function scopeCanPause(scope){return SCOPE_RULES[scope].canPause}var organizationOption={name:"organization",shorthand:null,type:String,argument:"ORGANIZATION",deprecated:!1,description:"The organization budget, by organization slug or ID, from any team. Needs the organization admin or viewer role"},budgetProjectOption={...projectOption,description:"A project's budget, by project name or ID"},productOption={name:"product",shorthand:null,type:String,argument:"PRODUCT",deprecated:!1,description:"A product's budget, by product ID or name (case-insensitive), from the products that can have a budget"},scopeOptions=[organizationOption,budgetProjectOption,productOption],scopeFilterOptions=[{name:"type",shorthand:null,type:[String],argument:"TYPE",deprecated:!1,description:`Only budgets of these types: ${BUDGET_SCOPES.join(", ")}. Repeat or separate with commas for several`},{...organizationOption,description:"Only the organization budget, by organization slug or ID"},{...budgetProjectOption,description:"Only a project's budget, by name or ID"},{...productOption,description:"Only a product's budget, by product ID or name"}],inspectSubcommand={name:"inspect",aliases:["overview"],description:"Show a Spend Management budget and this cycle's spend against it: the team budget, or the one --organization, --project, or --product selects",arguments:[],options:[...scopeOptions,formatOption,jsonOption],examples:[{name:"Show this cycle's on-demand spend against the team budget",value:`${packageName} billing budgets inspect`},{name:"Show a project budget",value:`${packageName} billing budgets inspect --project my-app`}]},listSubcommand={name:"list",aliases:["ls"],description:"List Spend Management budgets on this team, from every scope unless --organization, --project, or --product narrows them",default:!0,arguments:[],options:[...scopeFilterOptions,formatOption,jsonOption],examples:[{name:"List Spend Management budgets",value:`${packageName} billing budgets`},{name:"List one project's budget",value:`${packageName} billing budgets list --project my-app`}]},setSubcommand={name:"set",aliases:["update"],description:"Create or update a Spend Management budget: the team budget, or the one --organization, --project, or --product selects",arguments:[],options:[...scopeOptions,{name:"amount",shorthand:null,type:Number,argument:"USD",deprecated:!1,description:"Budget amount in whole dollars (minimum 1). Creates with 50/75/100% alerts and notifications on; updates keep pause and webhook settings unless those options are also passed"},{name:"pause",shorthand:null,type:Boolean,deprecated:!1,description:"Pause at 100% of the budget amount: all projects for a team budget, the project for a project budget, or the product's usage for a product that can pause. Organization budgets only notify"},{name:"no-pause",shorthand:null,type:Boolean,deprecated:!1,description:"Do not pause when the budget is reached"},{name:"webhook",shorthand:null,type:String,argument:"URL",deprecated:!1,description:"Webhook URL to notify when a threshold is reached"},{name:"no-webhook",shorthand:null,type:Boolean,deprecated:!1,description:"Remove the budget webhook"},formatOption,jsonOption],examples:[{name:"Create a $500 budget with default 50/75/100% alerts",value:`${packageName} billing budgets set --amount 500`},{name:"Change the budget amount",value:`${packageName} billing budgets set --amount 800`},{name:"Pause all projects and production deployments at 100% of the existing budget",value:`${packageName} billing budgets set --pause`},{name:"Notify a webhook without changing the amount",value:`${packageName} billing budgets set --webhook https://example.com/hook`},{name:"Remove the webhook",value:`${packageName} billing budgets set --no-webhook`},{name:"Create a $200 budget that pauses one project at 100%",value:`${packageName} billing budgets set --project my-app --amount 200 --pause`},{name:"Create a $10,000 organization budget",value:`${packageName} billing budgets set --organization acme --amount 10000`},{name:"Create a $100 budget on one product",value:`${packageName} billing budgets set --product "Function Duration" --amount 100`}]},removeSubcommand={name:"remove",aliases:["rm","delete","disable"],description:"Remove a Spend Management budget: the team budget, or the one --organization, --project, or --product selects",arguments:[],options:[...scopeOptions,yesOption,formatOption,jsonOption],examples:[{name:"Remove the team budget without confirmation",value:`${packageName} billing budgets remove --yes`},{name:"Remove a project budget",value:`${packageName} billing budgets remove --project my-app`}]},alertsDescription="List Spend Management alerts: each budget threshold reached, newest first, from every scope unless --organization, --project, or --product narrows them. For observability alerts, see `vercel alerts`.",alertsOptions=[{...sinceOption,description:"Show alerts triggered after this time (ISO 8601 or relative: 1d, 7d, 30d)"},{...untilOption,description:"Show alerts triggered before this time (ISO 8601 or relative)"},...scopeFilterOptions,limitOption,nextCursorOption,formatOption,jsonOption],alertsListSubcommand={name:"list",aliases:["ls"],description:alertsDescription,default:!0,hidden:!0,arguments:[],options:alertsOptions,examples:[]},alertsSubcommand={name:"alerts",aliases:[],description:alertsDescription,arguments:[],subcommands:[alertsListSubcommand],options:alertsOptions,examples:[{name:"List recent Spend Management alerts for this team",value:`${packageName} billing budgets alerts`},{name:"List one project budget's alerts",value:`${packageName} billing budgets alerts --project my-app`},{name:"List alerts from the last 30 days",value:`${packageName} billing budgets alerts --since 30d`},{name:"Output alerts as JSON",value:`${packageName} billing budgets alerts --json`}]},budgetCommand={name:"budgets",aliases:["budget"],summary:"Manage spending beyond included credit",description:"Show and manage Spend Management for on-demand charges after included credit",arguments:[],subcommands:[inspectSubcommand,listSubcommand,setSubcommand,removeSubcommand,alertsSubcommand],options:[],examples:[{name:"List Spend Management budgets",value:`${packageName} billing budgets`},{name:"Show this cycle's on-demand spend against Spend Management",value:`${packageName} billing budgets inspect`},{name:"Set a $500 budget that pauses all projects and production deployments at 100%",value:`${packageName} billing budgets set --amount 500 --pause`},{name:"Set a $200 budget on one project",value:`${packageName} billing budgets set --project my-app --amount 200`},{name:"Pause all projects and production deployments at 100% of the existing budget",value:`${packageName} billing budgets set --pause`},{name:"Remove the Spend Management budget",value:`${packageName} billing budgets remove --yes`},{name:"List recent Spend Management alerts",value:`${packageName} billing budgets alerts`}]},DEPRECATED_BUDGET_ACTIONS={overview:"inspect",update:"set",delete:"remove",disable:"remove"};export{BUDGET_SCOPES,OPTION_SCOPES,isBudgetScope,isPerEntityScope,scopeCanPause,inspectSubcommand,listSubcommand,setSubcommand,removeSubcommand,alertsListSubcommand,alertsSubcommand,budgetCommand,DEPRECATED_BUDGET_ACTIONS};
|
|
@@ -1,16 +0,0 @@
|
|
|
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{parseSubcommandArguments}from"./chunk-TO5AR7IO.js";import{printError}from"./chunk-HMJR6RVF.js";import{AGENT_REASON,AGENT_STATUS,buildCommandWithYes,outputAgentError,withGlobalFlags}from"./chunk-CSNP5RIM.js";import{getCommandNamePlain}from"./chunk-B4KA3ZH2.js";import{output_manager_default}from"./chunk-RYSO5U3E.js";import{getGlobalFlagsFromArgs}from"./chunk-DORCX7UB.js";import{require_source}from"./chunk-NB2WLB3J.js";import{__toESM}from"./chunk-BZENIQ7N.js";var UNSAFE_ROUTE_ID_CHARACTERS=/[/\\?#%]/;function isSafeRouteId(id){return typeof id!="string"||id===""||id==="."||id===".."||id.startsWith(" ")||id.endsWith(" ")||UNSAFE_ROUTE_ID_CHARACTERS.test(id)?!1:Array.from(id).every(char=>{let code=char.codePointAt(0)??0;return code>=32&&code!==127})}async function editRoute(client,projectId,routeId,input,options={}){let{teamId}=options;if(!isSafeRouteId(routeId))throw new Error("Route ID is not a valid path segment.");let query=new URLSearchParams;teamId&&query.set("teamId",teamId);let queryString=query.toString(),url=`/v1/projects/${projectId}/routes/${encodeURIComponent(routeId)}${queryString?`?${queryString}`:""}`;return await client.fetch(url,{method:"PATCH",headers:{"Content-Type":"application/json"},body:JSON.stringify(input)})}var ROUTE_TYPE_LABELS={rewrite:"Rewrite",redirect:"Redirect",set_status:"Set Status",transform:"Transform"};function getRouteTypeLabel(rule){return rule.routeType?ROUTE_TYPE_LABELS[rule.routeType]??"-":"-"}var SRC_SYNTAX_LABELS={equals:"Exact Match","path-to-regexp":"Pattern",regex:"Regex"};function getSrcSyntaxLabel(rule){let syntax=rule.srcSyntax??"regex";return SRC_SYNTAX_LABELS[syntax]}function isTargetTransform(transform){return"target"in transform}var import_chalk=__toESM(require_source(),1);function withGlobalFlags2(client,commandTemplate){return withGlobalFlags(client,commandTemplate,{preserveProject:!0})}function shellQuoteRouteIdentifierForSuggestion(identifier){return identifier.includes(" ")?identifier.includes("'")?identifier.includes('"')?`"${identifier.replace(/"/g,'\\"')}"`:`"${identifier}"`:`'${identifier}'`:identifier}async function parseSubcommandArgs(argv,command,client){let parsedArgs;try{parsedArgs=parseSubcommandArguments(argv,command)}catch(err){if(client?.nonInteractive){let rawMessage=err instanceof Error?err.message:String(err),flags=getGlobalFlagsFromArgs(client.argv.slice(2),{preserveProject:!0}),message=rawMessage,next=[{command:getCommandNamePlain(`routes ${command.name} ${flags.join(" ")}`.trim()),when:"fix options and retry"}],aiIdx=argv.indexOf("--ai");return(aiIdx!==-1&&(aiIdx===argv.length-1||argv[aiIdx+1]!==void 0&&argv[aiIdx+1].startsWith("-"))||/option requires argument.*--ai|--ai.*requires argument/i.test(rawMessage))&&(command.name==="add"||command.name==="update")&&(message=command.name==="add"?'--ai requires a description. Example: routes add --ai <description> --yes --non-interactive. Replace <description> with your text; use shell quotes if it contains spaces (e.g. --ai "Redirect /old to /new").':"--ai requires a description. Example: routes update <name-or-id> --ai <description> --yes --non-interactive. Replace placeholders; use shell quotes for <description> if it contains spaces.",next=[{command:withGlobalFlags2(client,command.name==="add"?"routes add --ai <description> --yes":"routes update <name-or-id> --ai <description> --yes"),when:"replace <description> with your text (quote it in the shell if it contains spaces), then run"},{command:getCommandNamePlain(`routes ${command.name} --help ${flags.join(" ")}`.trim()),when:"see all options"}]),outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_ARGUMENTS,message,next},2),2}return printError(err),2}return parsedArgs}async function confirmAction(client,skipConfirmation,message,details){return skipConfirmation?!0:client.nonInteractive?(outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.CONFIRMATION_REQUIRED,message:`${message} Re-run with --yes to confirm.`,next:[{command:buildCommandWithYes(client.argv),when:"re-run with --yes to confirm"}]}),process.exit(1),!1):(details&&output_manager_default.print(` ${details}
|
|
8
|
-
`),await client.input.confirm(message,!1))}function formatCondition(condition){let parts=[import_chalk.default.gray(`[${condition.type}]`)];if(condition.key&&parts.push(import_chalk.default.cyan(condition.key)),condition.value!==void 0){let formatted=typeof condition.value=="string"?condition.value:JSON.stringify(condition.value);parts.push(condition.key?`= ${formatted}`:formatted)}return parts.join(" ")}var TRANSFORM_TYPE_LABELS={"request.headers":"Request Header","request.query":"Request Query","response.headers":"Response Header","request.path":"Request Path"},TRANSFORM_OP_LABELS={set:"set",append:"append",delete:"delete"};function formatTransform(transform,includeType=!0){let opLabel=TRANSFORM_OP_LABELS[transform.op]??transform.op,key=isTargetTransform(transform)?typeof transform.target.key=="string"?transform.target.key:JSON.stringify(transform.target.key):"path",parts=[];if(includeType){let typeLabel=TRANSFORM_TYPE_LABELS[transform.type]??transform.type;parts.push(import_chalk.default.gray(`[${typeLabel}]`))}if(parts.push(import_chalk.default.yellow(opLabel),import_chalk.default.cyan(key)),transform.args!==void 0&&transform.op!=="delete"){let argsStr=Array.isArray(transform.args)?transform.args.join(", "):transform.args;parts.push(`= ${argsStr}`)}return parts.join(" ")}function parsePosition(position){if(position==="start")return{placement:"start"};if(position==="end")return{placement:"end"};if(position.startsWith("after:")){let referenceId=position.slice(6);if(!referenceId)throw new Error('Position "after:" requires a route ID');return{placement:"after",referenceId}}if(position.startsWith("before:")){let referenceId=position.slice(7);if(!referenceId)throw new Error('Position "before:" requires a route ID');return{placement:"before",referenceId}}throw new Error(`Invalid position: "${position}". Use: start, end, after:<id>, or before:<id>`)}async function offerAutoPromote(client,projectId,version,hadExistingStagingVersion,opts){let{default:updateRouteVersion}=await import("./update-route-version-KWK5S4UW.js"),{default:stamp}=await import("./stamp-TKONNIJ5.js");if(output_manager_default.print(`
|
|
9
|
-
${import_chalk.default.gray(`This change is staged. Run ${import_chalk.default.cyan(withGlobalFlags2(client,"routes publish"))} to make it live, or ${import_chalk.default.cyan(withGlobalFlags2(client,"routes discard-staging"))} to undo.`)}
|
|
10
|
-
`),!hadExistingStagingVersion&&!opts.skipPrompts){if(output_manager_default.print(`
|
|
11
|
-
`),await client.input.confirm("This is the only staged change. Promote to production now?",!1)){let promoteStamp=stamp();output_manager_default.spinner("Promoting to production");try{await updateRouteVersion(client,projectId,version.id,"promote",{teamId:opts.teamId}),output_manager_default.log(`${import_chalk.default.cyan("Promoted")} to production ${import_chalk.default.gray(promoteStamp())}`)}catch(e){let err=e;output_manager_default.error(`Failed to promote to production: ${err.message||"Unknown error"}`)}}}else hadExistingStagingVersion&&output_manager_default.warn(`There are other staged changes. Review with ${import_chalk.default.cyan(withGlobalFlags2(client,"routes list --diff"))} before promoting.`)}function printDiffSummary(routes,maxDisplay=10){let displayRoutes=routes.slice(0,maxDisplay);for(let route of displayRoutes){let symbol=getDiffSymbol(route),label=getDiffLabel(route),routeType=getRouteTypeLabel(route);output_manager_default.print(` ${symbol} ${route.name}${routeType!=="-"?` ${import_chalk.default.gray(`(${routeType})`)}`:""} ${import_chalk.default.gray(`- ${label}`)}
|
|
12
|
-
`)}routes.length>maxDisplay&&output_manager_default.print(import_chalk.default.gray(`
|
|
13
|
-
... and ${routes.length-maxDisplay} more changes
|
|
14
|
-
`))}function getDiffSymbol(route){return route.action==="+"?import_chalk.default.green("+"):route.action==="-"?import_chalk.default.red("-"):import_chalk.default.yellow("~")}function getDiffLabel(route){return route.action==="+"?"Added":route.action==="-"?"Deleted":route.previousIndex!==void 0&&route.newIndex!==void 0?`Reordered (${route.previousIndex+1} \u2192 ${route.newIndex+1})`:route.previousEnabled!==void 0?route.enabled===!1?"Disabled":"Enabled":"Modified"}function validateRouteIdForUpdate(client,id){if(isSafeRouteId(id))return!0;let message="The selected routing rule has an unsafe ID and cannot be updated.";return client.nonInteractive&&outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.INVALID_REQUEST,message},1),output_manager_default.error(message),!1}async function resolveRoute(client,routes,identifier){let byId=routes.find(r=>r.id===identifier);if(byId)return byId;let query=identifier.toLowerCase(),matches=routes.filter(r=>r.name.toLowerCase()===query||r.name.toLowerCase().includes(query)||r.id.toLowerCase().includes(query));if(matches.length===0)return null;if(matches.length===1)return matches[0];if(client.nonInteractive)return outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.AMBIGUOUS_ROUTE,message:`Multiple routes match "${identifier}" (${matches.length} matches). Pass an exact route name or ID.`,next:[{command:withGlobalFlags2(client,"routes list"),when:"list routes to get exact id"}]},1),null;let selectedId=await client.input.select({message:`Multiple routes match "${identifier}". Select one:`,choices:matches.map(route=>({value:route.id,name:`${route.name} ${import_chalk.default.gray(`(${route.route.src})`)}`}))});return matches.find(r=>r.id===selectedId)??null}async function resolveRoutes(client,routes,identifiers){let resolved=new Map;for(let identifier of identifiers){let route=await resolveRoute(client,routes,identifier);if(!route)return client.nonInteractive?(outputAgentError(client,{status:AGENT_STATUS.ERROR,reason:AGENT_REASON.NOT_FOUND,message:`No route found matching "${identifier}".`,next:[{command:withGlobalFlags2(client,"routes list"),when:"list routes"}]},1),null):(output_manager_default.error(`No route found matching "${identifier}". Run ${import_chalk.default.cyan(withGlobalFlags2(client,"routes list"))} to see all routes.`),null);resolved.set(route.id,route)}return Array.from(resolved.values())}function findVersionById(client,versions,identifier){let matchingVersions=versions.filter(v=>v.id.startsWith(identifier));return matchingVersions.length===0?{error:`Version "${identifier}" not found. Run ${import_chalk.default.cyan(withGlobalFlags2(client,"routes list-versions"))} to see available versions.`}:matchingVersions.length>1?{error:`Multiple versions match "${identifier}". Please provide a more specific ID:
|
|
15
|
-
${matchingVersions.map(v=>` ${v.id}`).join(`
|
|
16
|
-
`)}`}:{version:matchingVersions[0]}}async function getRoutes(client,projectId,options={}){let{teamId,search,filter,versionId,diff}=options,query=new URLSearchParams;teamId&&query.set("teamId",teamId),search&&query.set("q",search),filter&&query.set("filter",filter),versionId&&query.set("versionId",versionId),diff&&query.set("diff","true");let queryString=query.toString(),url=`/v1/projects/${projectId}/routes${queryString?`?${queryString}`:""}`;return await client.fetch(url)}export{editRoute,getRouteTypeLabel,getSrcSyntaxLabel,isTargetTransform,withGlobalFlags2 as withGlobalFlags,shellQuoteRouteIdentifierForSuggestion,parseSubcommandArgs,confirmAction,formatCondition,TRANSFORM_TYPE_LABELS,formatTransform,parsePosition,offerAutoPromote,printDiffSummary,validateRouteIdForUpdate,resolveRoute,resolveRoutes,findVersionById,getRoutes};
|