vercel 64.0.2 → 64.2.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.
Files changed (165) hide show
  1. package/README.md +2 -0
  2. package/dist/chunks/{add-XUNOIBOU.js → add-IATD2WUV.js} +1 -1
  3. package/dist/chunks/{add-BXOEELS6.js → add-UPXURHDI.js} +1 -1
  4. package/dist/chunks/{add-FZLHLH56.js → add-WVK3AP46.js} +1 -1
  5. package/dist/chunks/{build-PCEPD6N5.js → build-JOGD3ZEF.js} +1 -1
  6. package/dist/chunks/{chunk-RZGWCQP7.js → chunk-2FHICLHJ.js} +1 -1
  7. package/dist/chunks/{chunk-AG5QQNJ3.js → chunk-2UMWTCY7.js} +1 -1
  8. package/dist/chunks/{chunk-OZ47SVXA.js → chunk-3EU7MN5M.js} +1 -1
  9. package/dist/chunks/{chunk-37QGCN6P.js → chunk-3GSGG4YR.js} +1 -1
  10. package/dist/chunks/{chunk-YCQFJOHY.js → chunk-4BS552UW.js} +5 -2
  11. package/dist/chunks/{chunk-FO7MV3VE.js → chunk-4GL254L4.js} +1 -1
  12. package/dist/chunks/{chunk-34ZJMN36.js → chunk-4IIRQJUW.js} +1 -1
  13. package/dist/chunks/{chunk-K6BJ5GVA.js → chunk-4TTF5E5U.js} +3 -3
  14. package/dist/chunks/{chunk-BDFUWXIX.js → chunk-4VEK7DEH.js} +1 -1
  15. package/dist/chunks/{chunk-X33ZHJ45.js → chunk-5JEU6QSM.js} +1 -1
  16. package/dist/chunks/{chunk-NFJPCOTV.js → chunk-7BOCT55A.js} +1 -1
  17. package/dist/chunks/{chunk-BZ3YIITB.js → chunk-7C6BXZCV.js} +1 -1
  18. package/dist/chunks/{chunk-4R32LMIV.js → chunk-AKM22FBX.js} +1 -1
  19. package/dist/chunks/chunk-BTCKMXWW.js +7 -0
  20. package/dist/chunks/{chunk-MYCQIZU6.js → chunk-CN3IVZJO.js} +1 -1
  21. package/dist/chunks/{chunk-Z4OH72VZ.js → chunk-CRQDQNQZ.js} +1 -1
  22. package/dist/chunks/chunk-EEZLBOSP.js +14 -0
  23. package/dist/chunks/{chunk-WHVT7UXE.js → chunk-EF3YL2R7.js} +1 -1
  24. package/dist/chunks/{chunk-GNKUINRV.js → chunk-EKUHN42H.js} +1 -1
  25. package/dist/chunks/{chunk-S2JJZDW6.js → chunk-FGNMYSLD.js} +2 -2
  26. package/dist/chunks/{chunk-IUF3I4BN.js → chunk-FTY4BCAF.js} +1 -1
  27. package/dist/chunks/{chunk-RNF5CSW6.js → chunk-GSVOI5LW.js} +1 -1
  28. package/dist/chunks/{chunk-IVSKWN3O.js → chunk-GUJVJKO7.js} +1 -1
  29. package/dist/chunks/{chunk-CNU4T7FO.js → chunk-GVVIFYQE.js} +1 -1
  30. package/dist/chunks/{chunk-Z6HYEIYV.js → chunk-HAVEFTOO.js} +1 -1
  31. package/dist/chunks/{chunk-WJ5GXTPJ.js → chunk-I62UUYTS.js} +1 -1
  32. package/dist/chunks/{chunk-FECLYNNO.js → chunk-IRJ5XFT2.js} +2 -2
  33. package/dist/chunks/{chunk-QJKJBD2M.js → chunk-ITKS32PG.js} +1 -1
  34. package/dist/chunks/{chunk-ZYTRVEE3.js → chunk-J3CDVZE7.js} +1 -1
  35. package/dist/chunks/{chunk-UFXKCETS.js → chunk-J6O6JW2K.js} +1 -1
  36. package/dist/chunks/chunk-JEPRHNQU.js +7 -0
  37. package/dist/chunks/{chunk-TNZMCRAP.js → chunk-JNJOUMGF.js} +1 -1
  38. package/dist/chunks/{chunk-KLH6NMWT.js → chunk-KLYIX4HK.js} +3 -3
  39. package/dist/chunks/{chunk-QYDG63GL.js → chunk-KUGY5FIM.js} +1 -1
  40. package/dist/chunks/{chunk-JLXG2XWW.js → chunk-LD5U73LA.js} +1 -1
  41. package/dist/chunks/{chunk-MJD6WHG4.js → chunk-LLPIBKFX.js} +1 -1
  42. package/dist/chunks/{chunk-5IPBCD7K.js → chunk-MI7W4QMV.js} +1 -1
  43. package/dist/chunks/{chunk-Q7CITIB3.js → chunk-N5D4455C.js} +1 -1
  44. package/dist/chunks/{chunk-ASU72O2R.js → chunk-N6ECEBHG.js} +1 -1
  45. package/dist/chunks/{chunk-HKHQBR4Y.js → chunk-NBABZO3A.js} +1 -1
  46. package/dist/chunks/{chunk-YYPNUQDI.js → chunk-NWGBDBZI.js} +1 -1
  47. package/dist/chunks/{chunk-4CDUQXUK.js → chunk-O7JMHULU.js} +1 -1
  48. package/dist/chunks/{chunk-KLZZRZPR.js → chunk-OLWE4UFC.js} +1 -1
  49. package/dist/chunks/{chunk-FIIHB66A.js → chunk-PAN6TUTQ.js} +1 -1
  50. package/dist/chunks/chunk-Q5ZGA2RO.js +7 -0
  51. package/dist/chunks/{chunk-TMMEVR3B.js → chunk-QDOYNWNQ.js} +1 -1
  52. package/dist/chunks/{chunk-RELWXDML.js → chunk-QL3IYPBV.js} +1 -1
  53. package/dist/chunks/chunk-RIDPB64C.js +10 -0
  54. package/dist/chunks/{chunk-P4YB5FAK.js → chunk-SGXN7SMU.js} +1 -1
  55. package/dist/chunks/{chunk-OIB6INSE.js → chunk-SQB4T5FL.js} +1 -1
  56. package/dist/chunks/{chunk-TYTNF34C.js → chunk-SRAC7DI4.js} +1 -1
  57. package/dist/chunks/{chunk-MYX5A5KF.js → chunk-THZR6O2M.js} +1 -1
  58. package/dist/chunks/{chunk-S7XZC23O.js → chunk-TPVAPVQC.js} +1 -1
  59. package/dist/chunks/{chunk-G6B6TVAE.js → chunk-TWKII7HO.js} +1 -1
  60. package/dist/chunks/{chunk-ZEQLYYUJ.js → chunk-TY4PMK7Y.js} +1 -1
  61. package/dist/chunks/{chunk-GRTIWUV2.js → chunk-UCAE5Z5L.js} +1 -1
  62. package/dist/chunks/{chunk-L5FUUGYX.js → chunk-UGMTKOTN.js} +1 -1
  63. package/dist/chunks/{chunk-GHVWBHMT.js → chunk-UJUNGWSD.js} +1 -1
  64. package/dist/chunks/{chunk-QADFMDEL.js → chunk-VURCIZKT.js} +1 -1
  65. package/dist/chunks/chunk-W3TGCMRW.js +9 -0
  66. package/dist/chunks/{chunk-6LXX5P3A.js → chunk-WE3ZJX7P.js} +1 -1
  67. package/dist/chunks/{chunk-7C2QFD5D.js → chunk-WIAAACUI.js} +1 -1
  68. package/dist/chunks/{chunk-RG4ARRCN.js → chunk-WVJYKHGZ.js} +1 -1
  69. package/dist/chunks/{chunk-OAOSM4JQ.js → chunk-WW4VUFHJ.js} +1 -1
  70. package/dist/chunks/{chunk-ZV2YYRGF.js → chunk-WZ7YJDKT.js} +1 -1
  71. package/dist/chunks/{chunk-I3D36ZLJ.js → chunk-X65QKYDM.js} +1 -1
  72. package/dist/chunks/chunk-XSVF2CZM.js +8 -0
  73. package/dist/chunks/{chunk-2JBVMF2Y.js → chunk-Y24OSBXP.js} +1 -1
  74. package/dist/chunks/{chunk-JNPG7MVL.js → chunk-YDM2PMMP.js} +1 -1
  75. package/dist/chunks/{chunk-P2DETVWN.js → chunk-YO4VLAB7.js} +1 -1
  76. package/dist/chunks/{chunk-VYC3AMWW.js → chunk-YP46QVEI.js} +1 -1
  77. package/dist/chunks/{chunk-3AVG55SO.js → chunk-ZBDLYNUF.js} +1 -1
  78. package/dist/chunks/{clear-MO5T5MPM.js → clear-FNH7KUCF.js} +1 -1
  79. package/dist/chunks/{compile-vercel-config-PB3PBGGE.js → compile-vercel-config-4LNHE3YV.js} +1 -1
  80. package/dist/chunks/{config-63EI73DZ.js → config-JEHKUQMZ.js} +1 -1
  81. package/dist/chunks/{config-KZTDW2QM.js → config-W3TVZPSK.js} +1 -1
  82. package/dist/chunks/{delete-2UDSDSP4.js → delete-HCZA6EVL.js} +1 -1
  83. package/dist/chunks/{delete-UB32CPKH.js → delete-LV744KVD.js} +1 -1
  84. package/dist/chunks/{detect-services-WGEJOZNA.js → detect-services-TVZ4HYVB.js} +1 -1
  85. package/dist/chunks/{disable-JIJU4GNV.js → disable-N7WZSMD4.js} +1 -1
  86. package/dist/chunks/{discard-O65PEVZT.js → discard-2DN52DNW.js} +1 -1
  87. package/dist/chunks/{edit-L4FF6DXN.js → edit-CALU7PMG.js} +1 -1
  88. package/dist/chunks/{edit-KWWBA2X3.js → edit-MGJWXNFV.js} +1 -1
  89. package/dist/chunks/{enable-S62D7E5S.js → enable-7GKPLJNR.js} +1 -1
  90. package/dist/chunks/{export-OZ4RCU45.js → export-BSOJAVDV.js} +1 -1
  91. package/dist/chunks/{future-MDYFVS3M.js → future-OV5I5HWT.js} +1 -1
  92. package/dist/chunks/{generate-cert-for-deploy-S5NMGXYT.js → generate-cert-for-deploy-GKQRQ3ZQ.js} +1 -1
  93. package/dist/chunks/{image-OFC55KW4.js → image-NMQWZBTW.js} +1 -1
  94. package/dist/chunks/{import-builders-QHBL27W6.js → import-builders-WLKZNPTB.js} +1 -1
  95. package/dist/chunks/{inspect-XP5PASNY.js → inspect-LF3DIZZ2.js} +1 -1
  96. package/dist/chunks/{inspect-35NUO5W2.js → inspect-LZJ5X3PH.js} +1 -1
  97. package/dist/chunks/{inspect-BNXHORO6.js → inspect-PV6VVAN6.js} +1 -1
  98. package/dist/chunks/{inspect-WCNQQI76.js → inspect-UEDFNY5H.js} +1 -1
  99. package/dist/chunks/{inspect-IXITCFX4.js → inspect-V7M3GSZ7.js} +1 -1
  100. package/dist/chunks/{list-NJ42HMZJ.js → list-64R2DNZA.js} +1 -1
  101. package/dist/chunks/{list-OQOQNY3M.js → list-AFVTD43R.js} +1 -1
  102. package/dist/chunks/{list-5FOC7RBS.js → list-QTTCSTZA.js} +1 -1
  103. package/dist/chunks/{login-X7K2C7IO.js → login-OS6DZT32.js} +1 -1
  104. package/dist/chunks/{login-LGUJR7CK.js → login-SKIDVUB7.js} +1 -1
  105. package/dist/chunks/{logs-EH3XT4WK.js → logs-6AXWBF4D.js} +1 -1
  106. package/dist/chunks/{ls-3M5GSH6T.js → ls-5TZIOB3Q.js} +1 -1
  107. package/dist/chunks/{ls-MCI6TODA.js → ls-723HTK5U.js} +1 -1
  108. package/dist/chunks/{ls-D66KXCEQ.js → ls-A5A3APRI.js} +1 -1
  109. package/dist/chunks/{ls-GG4RSGA4.js → ls-EADWIBEQ.js} +1 -1
  110. package/dist/chunks/{ls-72Y3CWNF.js → ls-UP6KDPCD.js} +1 -1
  111. package/dist/chunks/{ls-EYG5GFIX.js → ls-WSPWJDWP.js} +1 -1
  112. package/dist/chunks/{ls-5SSERJCY.js → ls-YPQ3CTTN.js} +1 -1
  113. package/dist/chunks/{mutate-VM3WSWZD.js → mutate-WHVA5NTT.js} +1 -1
  114. package/dist/chunks/{notifications-T4QZSK34.js → notifications-I4PKIOYY.js} +1 -1
  115. package/dist/chunks/{open-2TSWF7N6.js → open-SV3USET3.js} +1 -1
  116. package/dist/chunks/{openapi-UYT3A457.js → openapi-NZJ6Q5Y2.js} +1 -1
  117. package/dist/chunks/{permissions-IAM4KOAB.js → permissions-3ZMQVJAQ.js} +1 -1
  118. package/dist/chunks/{prompt-missing-credentials-C2JLCS3F.js → prompt-missing-credentials-44DQQXOI.js} +1 -1
  119. package/dist/chunks/{publish-E5CQKZV2.js → publish-EDLEZCAF.js} +1 -1
  120. package/dist/chunks/{pull-FCIBUMPR.js → pull-5DQNSJCA.js} +1 -1
  121. package/dist/chunks/{purchase-domain-if-available-LDWR2G45.js → purchase-domain-if-available-R3YQ2TFP.js} +1 -1
  122. package/dist/chunks/{push-ZWGOHNYH.js → push-6O3JAFDA.js} +1 -1
  123. package/dist/chunks/{query-LYHMXYRT.js → query-MYKQOBG3.js} +1 -1
  124. package/dist/chunks/{reauthenticate-Z62FFYZH.js → reauthenticate-3UH4WWKC.js} +1 -1
  125. package/dist/chunks/{reorder-2ZHAHZTI.js → reorder-IU6GZK4H.js} +1 -1
  126. package/dist/chunks/{reply-6WH2VCFF.js → reply-FG74YRJ3.js} +1 -1
  127. package/dist/chunks/{resolve-RRLE67FD.js → resolve-MD3PGOME.js} +1 -1
  128. package/dist/chunks/{resolve-agent-team-ESQPBTIE.js → resolve-agent-team-X6GPGGDR.js} +1 -1
  129. package/dist/chunks/{restore-3WU5FYUK.js → restore-7KOACNT7.js} +1 -1
  130. package/dist/chunks/rm-CSIBWFYG.js +8 -0
  131. package/dist/chunks/{rm-3T2RJ37B.js → rm-HOE3GJAB.js} +1 -1
  132. package/dist/chunks/{rm-27VKBKTH.js → rm-JRAF4TPV.js} +1 -1
  133. package/dist/chunks/{rm-C6VVMUCP.js → rm-SKKBN7LZ.js} +1 -1
  134. package/dist/chunks/{rm-ZN3VHILG.js → rm-ZF2F2ZE3.js} +1 -1
  135. package/dist/chunks/{routes-PKCKZ5T6.js → routes-3RJGIZYJ.js} +1 -1
  136. package/dist/chunks/{rule-inspect-3XXNK2ON.js → rule-inspect-NICYVQPY.js} +1 -1
  137. package/dist/chunks/rules-NHACEVVC.js +7 -0
  138. package/dist/chunks/{schema-GAUOV4YT.js → schema-3XLZGVH5.js} +2 -2
  139. package/dist/chunks/{schema-XKLWHSSQ.js → schema-ZJASGDRI.js} +1 -1
  140. package/dist/chunks/{select-org-GGUGYGDL.js → select-org-XVAGUP4V.js} +1 -1
  141. package/dist/chunks/{set-6UUR4ZX2.js → set-JOSIBICX.js} +1 -1
  142. package/dist/chunks/{setup-and-link-MCBSB4BW.js → setup-and-link-7GIAMCTM.js} +1 -1
  143. package/dist/chunks/{tags-Z45CQGA6.js → tags-LVP4LVHL.js} +1 -1
  144. package/dist/chunks/{types-FK3W7A2Y.js → types-YEYQERHE.js} +1 -1
  145. package/dist/chunks/{update-BPLPDZSK.js → update-HPEVXFST.js} +1 -1
  146. package/dist/commands/build/index.js +1 -1
  147. package/dist/commands/deploy/index.js +4 -4
  148. package/dist/commands/dev/index.js +2 -2
  149. package/dist/commands/env/index.js +1 -1
  150. package/dist/commands/link/index.js +1 -1
  151. package/dist/commands/list/index.js +1 -1
  152. package/dist/commands-bulk.js +713 -696
  153. package/dist/index.js +2 -5
  154. package/dist/internal-build.js +1 -1
  155. package/dist/root-help-commands.mjs +1 -1
  156. package/dist/version.mjs +1 -1
  157. package/package.json +58 -58
  158. package/dist/chunks/chunk-3CTSLNNG.js +0 -8
  159. package/dist/chunks/chunk-AU42HSQ3.js +0 -7
  160. package/dist/chunks/chunk-FZIRYAXC.js +0 -10
  161. package/dist/chunks/chunk-LU5O3NH7.js +0 -9
  162. package/dist/chunks/chunk-OKFDH3WB.js +0 -12
  163. package/dist/chunks/chunk-QC47UKDR.js +0 -7
  164. package/dist/chunks/rm-CAPJK4ND.js +0 -8
  165. package/dist/chunks/rules-ZJW64O5H.js +0 -7
@@ -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{projectOption,yesOption}from"./chunk-5IPBCD7K.js";import{packageName}from"./chunk-JESNVRVR.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,{name:"search",description:"Search by name, description, source, or destination",shorthand:"s",type:String,argument:"QUERY",deprecated:!1},{name:"filter",description:"Filter by type: rewrite, redirect, set_status, transform",shorthand:"f",type:String,argument:"TYPE",deprecated:!1},{name:"production",description:"List routes from the live production version",shorthand:null,type:Boolean,deprecated:!1},{name:"version-id",description:"List routes from a specific version ID",shorthand:null,type:String,argument:"VERSION_ID",deprecated:!1},{name:"diff",description:"Compare staged changes against production. Use with --version-id to compare a specific version.",shorthand:null,type:Boolean,deprecated:!1},{name:"expand",description:"Show expanded details for each route",shorthand:"e",type:Boolean,deprecated:!1}],examples:[{name:"List all routes",value:`${packageName} routes list`},{name:"Search for routes",value:`${packageName} routes list --search "api"`},{name:"Filter by type",value:`${packageName} routes list --filter 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,{name:"count",description:"Number of versions to fetch (default: 20, max: 100)",shorthand:null,type:Number,argument:"NUMBER",deprecated:!1}],examples:[{name:"List route versions",value:`${packageName} routes list-versions`},{name:"List more versions",value:`${packageName} routes list-versions --count 50`}]},inspectSubcommand={name:"inspect",aliases:[],description:"Show detailed information about a specific route",arguments:[{name:"name-or-id",required:!0}],options:[projectOption,{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 (default), path-to-regexp, equals",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:"disabled",description:"Create route in disabled state",shorthand:null,type:Boolean,deprecated:!1},{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",value:`${packageName} routes restore <version-id>`},{name:"Restore without confirmation",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:"delete",aliases:["rm"],description:"Delete one or more routing rules",arguments:[{name:"name-or-id",required:!0,multiple:!0}],options:[projectOption,{...yesOption,description:"Skip the confirmation prompt when deleting"}],examples:[{name:"Delete a route by name",value:`${packageName} routes delete "Old Redirect"`},{name:"Delete a route by ID",value:`${packageName} routes delete abc123`},{name:"Delete multiple routes",value:`${packageName} routes delete "Route A" "Route B"`},{name:"Delete without confirmation",value:`${packageName} routes delete "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:"reorder",aliases:["move"],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 reordering"}],examples:[{name:"Move to first position",value:`${packageName} routes reorder "Catch All" --first`},{name:"Move to last position",value:`${packageName} routes reorder "Catch All" --last`},{name:"Move to a specific position",value:`${packageName} routes reorder "API Proxy" --position 3`},{name:"Move after another route",value:`${packageName} routes reorder "API Proxy" --position after:route-id-123`},{name:"Interactive reorder (prompts for position)",value:`${packageName} routes reorder "API Proxy"`}]},editSubcommand={name:"edit",aliases:[],description:"Edit 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 edit "API Proxy"`},{name:"Edit with AI",value:`${packageName} routes edit "API Proxy" --ai "Add CORS headers and change status to 308"`},{name:"Change destination",value:`${packageName} routes edit "API Proxy" --dest "https://new-api.example.com/:path*"`},{name:"Switch to redirect",value:`${packageName} routes edit "Old Route" --action redirect --dest "/new" --status 301`},{name:"Add a response header",value:`${packageName} routes edit "My Route" --set-response-header "Cache-Control=public, max-age=3600"`},{name:"Clear all conditions and add new ones",value:`${packageName} routes edit "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 (default) or .ts",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,8 +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{printRuleDeletionReceipt,printRuleMutationReceipt,printRulePreview}from"./chunk-MJD6WHG4.js";import"./chunk-RRWEIG6B.js";import{emitRulesArgParseError,fetchRule,handleRulesApiError,outputRulesError,resolveRulesTeam,rulesItemPath}from"./chunk-Q7CITIB3.js";import"./chunk-RELWXDML.js";import"./chunk-YTDK6AHS.js";import"./chunk-GZNDA6SV.js";import"./chunk-5UEBA6N6.js";import"./chunk-GHAY4PSD.js";import"./chunk-KLH6NMWT.js";import"./chunk-O4FDRZ22.js";import"./chunk-T3GQAMBJ.js";import"./chunk-P2O5DOYE.js";import"./chunk-ID663OJ7.js";import{rulesRmSubcommand}from"./chunk-LU5O3NH7.js";import"./chunk-773GOZIR.js";import{printError}from"./chunk-OZ47SVXA.js";import"./chunk-67GZ5REA.js";import"./chunk-BS32OUOC.js";import{validateJsonOutput}from"./chunk-D4MW3RDW.js";import"./chunk-ZV2YYRGF.js";import"./chunk-FIIHB66A.js";import"./chunk-VKXEOL4K.js";import"./chunk-MXTC4ZAQ.js";import"./chunk-4SAVH3H7.js";import"./chunk-ZS2WS4AM.js";import"./chunk-AOWWC6WZ.js";import"./chunk-MY4MONOH.js";import{parseArguments}from"./chunk-Z4OH72VZ.js";import{AGENT_REASON,buildCommandWithYes,outputAgentError}from"./chunk-FZIRYAXC.js";import{getFlagsSpecification}from"./chunk-5IPBCD7K.js";import"./chunk-K6BJ5GVA.js";import"./chunk-ROPQIBWJ.js";import"./chunk-VKPZP4LC.js";import"./chunk-PPCFQQSU.js";import"./chunk-N7Q2IESO.js";import"./chunk-WPQN5UKR.js";import"./chunk-2VBFQZ72.js";import{isAPIError}from"./chunk-YIIPBH2D.js";import{packageName}from"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-75IAMKGV.js";import"./chunk-RM3ZDRYE.js";import"./chunk-OO572JUC.js";import"./chunk-D3AHZ5LI.js";import"./chunk-2GHZGOWT.js";import"./chunk-YHPPP3SF.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BZENIQ7N.js";async function rm(client,argv){let parsedArgs;try{parsedArgs=parseArguments(argv,getFlagsSpecification(rulesRmSubcommand.options))}catch(error){return emitRulesArgParseError(client,error,"alerts rules rm <rule-id> --yes"),printError(error),2}let format=validateJsonOutput(parsedArgs.flags);if(!format.valid)return outputRulesError(client,!1,"INVALID_ARGUMENTS",format.error);let ruleId=parsedArgs.args[0];if(!ruleId)return outputRulesError(client,format.jsonOutput,"MISSING_ARGUMENTS",`Missing rule ID. Example: ${packageName} alerts rules rm <rule-id> --yes`);let scope=await resolveRulesTeam(client,format.jsonOutput);if(typeof scope=="number")return scope;let skipConfirmation=!!parsedArgs.flags["--yes"],prefetchedRule;try{return!skipConfirmation&&(output_manager_default.spinner("Fetching alert rule\u2026"),prefetchedRule=await fetchRule(client,scope,ruleId),output_manager_default.stopSpinner(),printRulePreview(prefetchedRule),outputAgentError(client,{status:"error",reason:AGENT_REASON.CONFIRMATION_REQUIRED,message:"Removing an alert rule requires confirmation. Re-run with --yes.",next:[{command:buildCommandWithYes(client.argv)}]},1),!await client.input.confirm(`Delete alert rule ${prefetchedRule.name} (${ruleId})? This cannot be undone.`,!1))?(output_manager_default.log("Canceled"),0):(output_manager_default.spinner("Deleting alert rule\u2026"),await client.fetch(rulesItemPath(scope.teamId,ruleId),{method:"DELETE"}),format.jsonOutput?client.stdout.write(`${JSON.stringify({ok:!0,ruleId,deleted:!0},null,2)}
8
- `):prefetchedRule?printRuleMutationReceipt("Deleted",prefetchedRule,client.argv):printRuleDeletionReceipt(ruleId),0)}catch(error){if(isAPIError(error))return handleRulesApiError(client,error,format.jsonOutput);throw error}finally{output_manager_default.stopSpinner()}}export{rm as default};
@@ -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{getSubcommand}from"./chunk-ETV3C2CV.js";import{AGENT_REASON,buildCommandWithGlobalFlags,outputAgentError}from"./chunk-FZIRYAXC.js";import"./chunk-5IPBCD7K.js";import"./chunk-2VBFQZ72.js";import"./chunk-YIIPBH2D.js";import"./chunk-JESNVRVR.js";import{output_manager_default}from"./chunk-75IAMKGV.js";import"./chunk-RM3ZDRYE.js";import"./chunk-OO572JUC.js";import"./chunk-D3AHZ5LI.js";import"./chunk-2GHZGOWT.js";import"./chunk-YHPPP3SF.js";import"./chunk-NB2WLB3J.js";import"./chunk-ISWW3DKF.js";import"./chunk-BRQUZ5NC.js";import"./chunk-BZENIQ7N.js";var RULES_CONFIG={ls:["ls","list"],schema:["schema"],add:["add","create"],inspect:["inspect","get"],rm:["rm","remove","delete"],update:["update","patch"],notifications:["notifications"]};async function rules(client,argv){if(argv.length===0||argv[0]?.startsWith("-")){let lsFn=(await import("./ls-EYG5GFIX.js")).default;return lsFn(client,argv)}let{subcommand,args,subcommandOriginal}=getSubcommand(argv,RULES_CONFIG);if(subcommand==null)return outputAgentError(client,{status:"error",reason:AGENT_REASON.INVALID_ARGUMENTS,message:`Unknown "alerts rules" subcommand "${argv[0]}".`,next:[{command:buildCommandWithGlobalFlags(client.argv,"alerts rules --help"),when:"Show valid rules subcommands"}]},2),output_manager_default.error(`Unknown "alerts rules" subcommand "${argv[0]}". Run \`vercel alerts rules --help\`.`),2;switch(subcommand){case"ls":return(await import("./ls-EYG5GFIX.js")).default(client,args);case"schema":return(await import("./schema-GAUOV4YT.js")).default(client,args);case"add":return(await import("./add-FZLHLH56.js")).default(client,args);case"inspect":return(await import("./rule-inspect-3XXNK2ON.js")).default(client,args);case"rm":return(await import("./rm-CAPJK4ND.js")).default(client,args);case"update":return(await import("./update-BPLPDZSK.js")).default(client,args);case"notifications":return(await import("./notifications-T4QZSK34.js")).default(client,args);default:return output_manager_default.error(`Unhandled rules subcommand: ${String(subcommandOriginal)}`),1}}export{rules as default};