@qwen-code/qwen-code 0.21.13 → 0.21.14-nightly.20260822.7a4566cb3b

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 (400) hide show
  1. package/bundled/qc-helper/docs/configuration/settings.md +15 -7
  2. package/bundled/qc-helper/docs/extension/introduction.md +2 -0
  3. package/bundled/qc-helper/docs/features/_meta.ts +1 -0
  4. package/bundled/qc-helper/docs/features/channels/dingtalk.md +1 -1
  5. package/bundled/qc-helper/docs/features/code-review.md +25 -3
  6. package/bundled/qc-helper/docs/features/commands.md +120 -8
  7. package/bundled/qc-helper/docs/features/markdown-rendering.md +6 -0
  8. package/bundled/qc-helper/docs/features/sub-agents.md +3 -3
  9. package/bundled/qc-helper/docs/features/terminal-images.md +50 -0
  10. package/bundled/qc-helper/docs/qwen-serve-deploy-local.md +1 -1
  11. package/bundled/qc-helper/docs/qwen-serve.md +21 -4
  12. package/bundled/review/SKILL.md +113 -62
  13. package/chunks/MaxSizedBox-NCWYES5B.js +98 -0
  14. package/chunks/{StandaloneSessionPicker-KEGXNUG6.js → StandaloneSessionPicker-A4V4F64Y.js} +80 -79
  15. package/chunks/{acp-startup-profiler-NMDXYGDN.js → acp-startup-profiler-DDVSJKJK.js} +2 -2
  16. package/chunks/{acpAgent-XPES32S7.js → acpAgent-YYRH7HTQ.js} +1094 -278
  17. package/chunks/{agent-DPTOZFEM.js → agent-NEM254CJ.js} +52 -51
  18. package/chunks/agent-headless-AVFYIRPV.js +88 -0
  19. package/chunks/{anthropicContentGenerator-G7BVXTKN.js → anthropicContentGenerator-IWFTSBSV.js} +25 -25
  20. package/chunks/{artifact-tool-GEXTOPVO.js → artifact-tool-SBXMTVCB.js} +3 -3
  21. package/chunks/{askUserQuestion-B33XRSB7.js → askUserQuestion-KEQJRFD6.js} +3 -3
  22. package/chunks/{bridge-YNQBAA4Z.js → bridge-2CGOUO25.js} +59 -57
  23. package/chunks/{ca-4CQ6MYNQ.js → ca-SLZJD6QH.js} +8 -0
  24. package/chunks/{channel-management-service-GWY2GAIC.js → channel-management-service-FUJ2EFTF.js} +1 -1
  25. package/chunks/channel-settings-store-AZKNHHDC.js +103 -0
  26. package/chunks/{channel-worker-group-7LXCMZ77.js → channel-worker-group-CTE54QL6.js} +8 -7
  27. package/chunks/{channel-worker-manager-RYEME4ZZ.js → channel-worker-manager-4EHTD3T4.js} +8 -7
  28. package/chunks/{channel-worker-supervisor-OEVWBHGT.js → channel-worker-supervisor-F6I6WSWW.js} +6 -5
  29. package/chunks/{chunk-KD5BOPLP.js → chunk-2G4QF4VI.js} +125 -31
  30. package/chunks/{chunk-BHILXOC3.js → chunk-2MTIAN5Z.js} +3 -3
  31. package/chunks/{chunk-A4QRWUDE.js → chunk-2NWPB6T4.js} +6 -6
  32. package/chunks/{chunk-KV27IEHM.js → chunk-2TRNCJK4.js} +1 -1
  33. package/chunks/{chunk-EL5SXY3T.js → chunk-32CHFLGV.js} +198 -23
  34. package/chunks/{chunk-5CVO7YES.js → chunk-36OF5PRW.js} +1 -1
  35. package/chunks/{chunk-X26JYGTD.js → chunk-37BZSWEV.js} +1 -1
  36. package/chunks/{chunk-WFSTRPRO.js → chunk-3CLIDIVQ.js} +3 -3
  37. package/chunks/{chunk-A267JX7H.js → chunk-3HWN4E7N.js} +18 -18
  38. package/chunks/{chunk-ZYYTZUI2.js → chunk-3LYGXZ2H.js} +3 -3
  39. package/chunks/chunk-3SIGAHUX.js +3969 -0
  40. package/chunks/{chunk-BVJS5BSP.js → chunk-3XD4PT3B.js} +1 -1
  41. package/chunks/{chunk-6QFDQMQX.js → chunk-3ZFJUBTP.js} +1 -1
  42. package/chunks/{chunk-HUTNYWBG.js → chunk-45UD2TU4.js} +19 -11
  43. package/chunks/{chunk-4W5U2TUT.js → chunk-4F5WV4RF.js} +4 -4
  44. package/chunks/{chunk-I3G5JWBV.js → chunk-4GP3MNQ2.js} +2695 -1524
  45. package/chunks/{chunk-V26NVGAU.js → chunk-4MIDDJLJ.js} +8 -3
  46. package/chunks/{chunk-TS6625XH.js → chunk-5MK45KZ3.js} +9 -5
  47. package/chunks/{chunk-V57QC6WW.js → chunk-5OTMZVPL.js} +11 -9
  48. package/chunks/{chunk-MC4TLKEI.js → chunk-5PHLBWBL.js} +3 -3
  49. package/chunks/chunk-64LXOKG4.js +367 -0
  50. package/chunks/{chunk-6HY6IF3Z.js → chunk-6NFAEG54.js} +22 -2
  51. package/chunks/{chunk-TIGA2IVL.js → chunk-6NJIPX6W.js} +10 -298
  52. package/chunks/{chunk-MRMJCLIY.js → chunk-6RB2S4QP.js} +3 -3
  53. package/chunks/chunk-6S2OXVJT.js +369 -0
  54. package/chunks/{chunk-O4D7SPJN.js → chunk-6U46RZ25.js} +3 -3
  55. package/chunks/{chunk-JOOFMXGF.js → chunk-6UDHEIUT.js} +6 -6
  56. package/chunks/{chunk-VOQXFAY5.js → chunk-74TONY4F.js} +286 -0
  57. package/chunks/{chunk-LJQAUZMR.js → chunk-7CPJMZVJ.js} +1627 -180
  58. package/chunks/{chunk-T3CHYWJZ.js → chunk-7E7UCJHS.js} +100 -4
  59. package/chunks/{chunk-YZHRN3CF.js → chunk-7IV52LTO.js} +2 -2
  60. package/chunks/{chunk-4PKCUT7F.js → chunk-7JDGSJQH.js} +7 -7
  61. package/chunks/{chunk-GO7STP6N.js → chunk-7VITNOH6.js} +4 -4
  62. package/chunks/{chunk-CU6GJD55.js → chunk-7WLFSDLG.js} +1 -1
  63. package/chunks/{chunk-4WKAA4KS.js → chunk-A4N4FTMH.js} +1 -11
  64. package/chunks/{chunk-BUQDLC2G.js → chunk-A5F2YNO6.js} +3 -3
  65. package/chunks/{chunk-OY5RNSV4.js → chunk-AGCLK4G7.js} +3 -3
  66. package/chunks/{chunk-IA2K2HJE.js → chunk-AP3B7LKD.js} +2 -2
  67. package/chunks/{chunk-Y3YCSWG5.js → chunk-AZF6SME3.js} +2 -2
  68. package/chunks/{chunk-QFJ5JHQR.js → chunk-C72BXMJ5.js} +1 -1
  69. package/chunks/chunk-CETB5XY4.js +3654 -0
  70. package/chunks/{chunk-AA2BEKV3.js → chunk-CTAP6PO3.js} +3 -3
  71. package/chunks/{chunk-MS7GNABG.js → chunk-CXJHQVEK.js} +8 -0
  72. package/chunks/{chunk-QF2NHSPB.js → chunk-D534POS2.js} +274 -225
  73. package/chunks/{chunk-UKMR3CKV.js → chunk-D7QQ6RUB.js} +24 -9
  74. package/chunks/{chunk-DXIBNLBZ.js → chunk-DB2OKNTU.js} +2 -2
  75. package/chunks/{chunk-DGZEMW5R.js → chunk-DJEHYM4H.js} +3 -3
  76. package/chunks/{chunk-O565M6A4.js → chunk-DRVS6K7A.js} +260 -16
  77. package/chunks/{chunk-U3VNBPUO.js → chunk-DV4375RD.js} +5 -5
  78. package/chunks/{chunk-OXCMMLED.js → chunk-E63A23D7.js} +3 -3
  79. package/chunks/{chunk-4NFY2S7N.js → chunk-E7REAOTN.js} +15 -0
  80. package/chunks/{chunk-6ORZ2EDC.js → chunk-EW2IQ3ID.js} +3 -3
  81. package/chunks/{chunk-DGK6P3BQ.js → chunk-EXVK5R7X.js} +13 -13
  82. package/chunks/{chunk-NWNEANAT.js → chunk-FOGQO4FG.js} +953 -660
  83. package/chunks/{chunk-3U3VAL47.js → chunk-FV6PXZRO.js} +1 -1
  84. package/chunks/{chunk-76J3IJ3M.js → chunk-FX5TGHDE.js} +8 -8
  85. package/chunks/{chunk-QIH2HAEN.js → chunk-GXG4PYQB.js} +1 -1
  86. package/chunks/{chunk-FDGGZIYW.js → chunk-HDKCKCYO.js} +3 -3
  87. package/chunks/{chunk-RIAABG2K.js → chunk-HERHU33B.js} +2 -2
  88. package/chunks/{chunk-ZYBBISBY.js → chunk-HETN3NE2.js} +18 -15
  89. package/chunks/{chunk-XIT3GURH.js → chunk-HGBACZGD.js} +3 -3
  90. package/chunks/{chunk-UZPM4XHR.js → chunk-HGH7DXNI.js} +29 -8
  91. package/chunks/{chunk-CHHABXPE.js → chunk-HIK2OF33.js} +1 -1
  92. package/chunks/{chunk-FC4KQFCS.js → chunk-HMJ2P3SV.js} +1 -1
  93. package/chunks/chunk-HRVMTN37.js +26 -0
  94. package/chunks/{chunk-PQ36L4F5.js → chunk-HZZGYJIP.js} +1 -1
  95. package/chunks/{chunk-PT4I7NBA.js → chunk-I432KXWD.js} +1 -1
  96. package/chunks/{chunk-3EZLLVDF.js → chunk-IBJ5S45N.js} +3 -3
  97. package/chunks/{chunk-A4MFR4C5.js → chunk-IO257NUD.js} +3 -5
  98. package/chunks/{chunk-MIPFDQAF.js → chunk-ISJMN3ML.js} +1 -1
  99. package/chunks/chunk-IWOWEENB.js +9169 -0
  100. package/chunks/{chunk-XHRY7BXD.js → chunk-J6SIP2IT.js} +4 -4
  101. package/chunks/{chunk-OD2WU5QY.js → chunk-J7JQXYVL.js} +1 -1
  102. package/chunks/{chunk-NEFOOD54.js → chunk-J7VPB2HF.js} +4 -4
  103. package/chunks/{chunk-P7MPQI75.js → chunk-JGUBDRBC.js} +2 -2
  104. package/chunks/{chunk-SXCOEJO4.js → chunk-JOLJTKIG.js} +1 -1
  105. package/chunks/{chunk-NTTBXH7U.js → chunk-JS73NNWF.js} +8 -0
  106. package/chunks/{chunk-QRCNA3SR.js → chunk-JXLPQTMW.js} +50 -70
  107. package/chunks/{chunk-NNHNLJ2X.js → chunk-K2MSGB3W.js} +317 -72
  108. package/chunks/{chunk-KBXKR5R2.js → chunk-K52PZNU4.js} +1 -1
  109. package/chunks/{chunk-OOQUVWIG.js → chunk-K5OIW3I7.js} +4 -4
  110. package/chunks/{chunk-SOORFWKY.js → chunk-KSPRQSB4.js} +1 -1
  111. package/chunks/{chunk-WSH6GRKG.js → chunk-KVGR4MCF.js} +3 -3
  112. package/chunks/{chunk-6YKYPVDV.js → chunk-LC5M7YVE.js} +4 -4
  113. package/chunks/{chunk-M6NDLY2T.js → chunk-LD5VIJ7S.js} +1 -1
  114. package/chunks/{chunk-OMLJNPBE.js → chunk-LDGWX737.js} +84 -4
  115. package/chunks/{chunk-FAAUPSY2.js → chunk-LI4YHTQK.js} +1 -1
  116. package/chunks/{chunk-CXAOG665.js → chunk-LIKIJAUH.js} +2 -2
  117. package/chunks/chunk-LJZSMWOH.js +18 -0
  118. package/chunks/{chunk-BKPPWD33.js → chunk-M2IL2RTA.js} +22 -2
  119. package/chunks/{chunk-N5YPT6PH.js → chunk-MHOY756Q.js} +25 -13
  120. package/chunks/{chunk-YP5KH5Y7.js → chunk-ND7NOI4P.js} +1 -1
  121. package/chunks/{chunk-AW4TRXOC.js → chunk-NP2LV67M.js} +1 -1
  122. package/chunks/{chunk-GGDBMYGZ.js → chunk-NQB52P65.js} +5 -5
  123. package/chunks/{chunk-E3DYKPYZ.js → chunk-NUGZAFR2.js} +3 -3
  124. package/chunks/{chunk-GMIEIY3Y.js → chunk-O5BDEWBC.js} +3 -3
  125. package/chunks/{chunk-GDXET5XU.js → chunk-O5Z7EB6Y.js} +3 -3
  126. package/chunks/{chunk-5EYKMUUY.js → chunk-OTXXOZKW.js} +1 -1
  127. package/chunks/{chunk-M732YJPW.js → chunk-PALTIYXB.js} +6 -6
  128. package/chunks/{chunk-7UXUJ5T3.js → chunk-PLECQWDB.js} +1 -1
  129. package/chunks/{chunk-MLPXSYXR.js → chunk-PMIKPGDF.js} +66 -32
  130. package/chunks/{chunk-IWPYVAO2.js → chunk-PSQJ24ZZ.js} +3 -3
  131. package/chunks/{chunk-CPHEPGAO.js → chunk-PZRUV52H.js} +2 -2
  132. package/chunks/{chunk-PP4FUZNV.js → chunk-Q7RPLE33.js} +2 -2
  133. package/chunks/{chunk-S5DWMTHO.js → chunk-QQUVPMMZ.js} +2 -0
  134. package/chunks/{chunk-JUEPY766.js → chunk-RNGTMHKN.js} +3 -3
  135. package/chunks/{chunk-TUGSVUJB.js → chunk-ROV6B34L.js} +6 -6
  136. package/chunks/{chunk-RVOJ2FBP.js → chunk-RPJOOK6N.js} +1576 -10633
  137. package/chunks/{chunk-AXN7UPYQ.js → chunk-RQJJZQOH.js} +2 -2
  138. package/chunks/{chunk-AFSG32D5.js → chunk-RRRCWDFO.js} +1 -1
  139. package/chunks/{chunk-2M55OBEB.js → chunk-S3G6YFQC.js} +1 -1
  140. package/chunks/{chunk-4S5337WV.js → chunk-SVU5KGR7.js} +6527 -3314
  141. package/chunks/chunk-TBVSALA3.js +1109 -0
  142. package/chunks/{chunk-QUGAUQGJ.js → chunk-TBWQLLFO.js} +2 -0
  143. package/chunks/{chunk-AS5IN4GK.js → chunk-THK3QUU6.js} +5 -5
  144. package/chunks/{chunk-JNDY2MDR.js → chunk-TLDZKNZP.js} +1 -1
  145. package/chunks/{chunk-ZZO74WKW.js → chunk-TNAIZBPQ.js} +115 -28
  146. package/chunks/{chunk-3Z43GZUQ.js → chunk-TXASDT2M.js} +1 -1
  147. package/chunks/{chunk-CZBYX5MY.js → chunk-U53XZHAE.js} +1 -1
  148. package/chunks/{chunk-HIBNSEJE.js → chunk-UDG5EZJI.js} +0 -2
  149. package/chunks/{chunk-QNQAPSN2.js → chunk-URN2JIAQ.js} +4 -1
  150. package/chunks/{chunk-EZ5RP345.js → chunk-UYQTX2P6.js} +44 -13
  151. package/chunks/{chunk-BZ263IKX.js → chunk-UZPYR3EV.js} +1 -1
  152. package/chunks/{chunk-YZOSNW4R.js → chunk-VFACN2CE.js} +1 -1
  153. package/chunks/{chunk-RWDNJBWN.js → chunk-VLRBJ24J.js} +2 -2
  154. package/chunks/{chunk-NHDR76JX.js → chunk-VMJL7RH6.js} +4 -4
  155. package/chunks/{chunk-E23IPNGS.js → chunk-VOTDAZR7.js} +35 -6
  156. package/chunks/{chunk-XLLKYULU.js → chunk-VSNPOSDN.js} +2 -2
  157. package/chunks/{chunk-25EYDK42.js → chunk-VUMLT7E5.js} +2 -2
  158. package/chunks/{chunk-H4A72DE5.js → chunk-W4CRPSC5.js} +1 -1
  159. package/chunks/{chunk-NM5V5OVW.js → chunk-WJJYJVQE.js} +3 -3
  160. package/chunks/{chunk-ROIYNTHJ.js → chunk-WRT324N6.js} +3 -3
  161. package/chunks/chunk-WZAD4ZNJ.js +59 -0
  162. package/chunks/{chunk-SG7ZP5PG.js → chunk-WZDM44SB.js} +4 -4
  163. package/chunks/{chunk-JE7KQ2UP.js → chunk-XIQ5HQ2F.js} +469 -77
  164. package/chunks/{chunk-QV5YN5YD.js → chunk-XJOHLP2A.js} +5 -5
  165. package/chunks/{chunk-XUJNK7Y6.js → chunk-XL5K4SVK.js} +1 -1
  166. package/chunks/{chunk-CKSJECTU.js → chunk-XZJKSETB.js} +9 -5
  167. package/chunks/{chunk-YEYY7TEP.js → chunk-Y2FEAXLP.js} +7 -7
  168. package/chunks/{chunk-2B2BF7P7.js → chunk-YDJRMQU4.js} +3 -3
  169. package/chunks/{chunk-46UV252V.js → chunk-YHC2EYYG.js} +35 -38
  170. package/chunks/{chunk-OVZPVYZB.js → chunk-YMVFIYHV.js} +96 -18
  171. package/chunks/{chunk-WGHHA7ZH.js → chunk-Z3JMO2CH.js} +1 -1
  172. package/chunks/{chunk-MA2HEDVP.js → chunk-ZRYQMWEP.js} +3 -3
  173. package/chunks/{chunk-IGGGG5CX.js → chunk-ZTAT23TL.js} +15948 -10201
  174. package/chunks/{computer-use-77C5FHMW.js → computer-use-H2T7IFYX.js} +55 -54
  175. package/chunks/{config-utils-IVHRSXWI.js → config-utils-3DY73VIJ.js} +2 -2
  176. package/chunks/contextCommand-5AAZFFFV.js +94 -0
  177. package/chunks/{core-runtime-7VMIKUTG.js → core-runtime-JWFNKO2S.js} +57 -55
  178. package/chunks/{create-sub-session-2L5MQRN4.js → create-sub-session-33HIYIJE.js} +58 -56
  179. package/chunks/{create-sub-session-KRQULJE6.js → create-sub-session-XBCVGNFU.js} +6 -4
  180. package/chunks/{cron-create-H7UEPDSN.js → cron-create-IKA56DAF.js} +5 -5
  181. package/chunks/{cron-delete-6SZK7YFM.js → cron-delete-K5Q62EGH.js} +5 -5
  182. package/chunks/{cron-list-H25JIHEZ.js → cron-list-QBFGAMP7.js} +5 -5
  183. package/chunks/{daemon-2KTG7ZBN.js → daemon-NNCQ3HWT.js} +806 -147
  184. package/chunks/{daemon-git-worktree-guard-DXYIMWFT.js → daemon-git-worktree-guard-6233JAPJ.js} +54 -53
  185. package/chunks/daemon-status-provider-3EI2KALQ.js +104 -0
  186. package/chunks/daemon-trust-policy-QWWU7CON.js +100 -0
  187. package/chunks/{daemon-trust-policy-monitor-RYYGCQ3J.js → daemon-trust-policy-monitor-FH7GBAKN.js} +60 -59
  188. package/chunks/{de-UBEBKG6V.js → de-AH4LGCF5.js} +8 -0
  189. package/chunks/{deferred-core-runtime-3SGXFXEQ.js → deferred-core-runtime-EDUZQRME.js} +52 -51
  190. package/chunks/{discovery-ORA5J7YP.js → discovery-X2NV535U.js} +1 -1
  191. package/chunks/{display-image-ON3EYFRD.js → display-image-OEJMJV3S.js} +5 -5
  192. package/chunks/{dist-YEPL4RAW.js → dist-5EV2G6MC.js} +2 -3
  193. package/chunks/{dist-MAQXAQ2Y.js → dist-EQ3Q5XHX.js} +45337 -32756
  194. package/chunks/{dist-WJ4BHIEW.js → dist-ESS34DHC.js} +72 -0
  195. package/chunks/{dist-JWMKPWT5.js → dist-EUOUPUFO.js} +3 -4
  196. package/chunks/{dist-IYYN3RUT.js → dist-UOFRXJT6.js} +2798 -1250
  197. package/chunks/{earlyInputCapture-KJMLFVQV.js → earlyInputCapture-VSP42LUR.js} +53 -52
  198. package/chunks/{edit-I4LQFAEC.js → edit-ZTLO5ASX.js} +60 -58
  199. package/chunks/{en-X6YV7GME.js → en-MD3GP5YL.js} +8 -0
  200. package/chunks/{enter-worktree-YNPOJSRH.js → enter-worktree-TMTPDS2S.js} +55 -54
  201. package/chunks/{enterPlanMode-XCPK62ER.js → enterPlanMode-UBAXFMYI.js} +55 -54
  202. package/chunks/{environment-S7CTIHMX.js → environment-C2CZN7CB.js} +55 -54
  203. package/chunks/{errors-7HB2AIDS.js → errors-ZUNFQINF.js} +54 -53
  204. package/chunks/{exit-worktree-AIIY7SR6.js → exit-worktree-572NWEPJ.js} +55 -54
  205. package/chunks/exitPlanMode-QTIXFGZT.js +86 -0
  206. package/chunks/{fast-path-NDJV3ZFJ.js → fast-path-CEEVHQL3.js} +3 -3
  207. package/chunks/{fast-path-settings-LNOFM2YP.js → fast-path-settings-WHX3J3ZI.js} +2 -2
  208. package/chunks/{fr-VENTC2BS.js → fr-ZEML2JWS.js} +8 -0
  209. package/chunks/{gemini-RSUFP5OE.js → gemini-I2YR6GMS.js} +114 -112
  210. package/chunks/{geminiContentGenerator-SQ5XBPZ7.js → geminiContentGenerator-GQWNDZQF.js} +7 -7
  211. package/chunks/getMachineId-bsd-FBOAYNSY.js +48 -0
  212. package/chunks/{getMachineId-bsd-FG7IUY6U.js → getMachineId-bsd-YH7RURBZ.js} +4 -4
  213. package/chunks/{getMachineId-darwin-GLCJI2RA.js → getMachineId-darwin-H6USQYNI.js} +4 -4
  214. package/chunks/getMachineId-darwin-RNJLJUXY.js +47 -0
  215. package/chunks/{getMachineId-linux-O6OPPAKO.js → getMachineId-linux-HF2N63ET.js} +3 -3
  216. package/chunks/getMachineId-linux-UEVRAIAB.js +41 -0
  217. package/chunks/getMachineId-unsupported-FWXYJ7HW.js +31 -0
  218. package/chunks/{getMachineId-unsupported-S6CKYVGC.js → getMachineId-unsupported-NYA5DXRB.js} +3 -3
  219. package/chunks/getMachineId-win-LRVGMHLW.js +50 -0
  220. package/chunks/{getMachineId-win-X5SRNEH7.js → getMachineId-win-SMEGY2DW.js} +4 -4
  221. package/chunks/{glob-J4RUJAHX.js → glob-XFBL2RVT.js} +58 -57
  222. package/chunks/{goal-tools-VHTNVOKK.js → goal-tools-TLJCE7YZ.js} +6 -6
  223. package/chunks/{grep-VJWPLFOT.js → grep-U675LEXE.js} +55 -54
  224. package/chunks/handleAutoUpdate-R6RUCIA2.js +97 -0
  225. package/chunks/{i18n-RM5YOICI.js → i18n-SJCZDZ4C.js} +53 -52
  226. package/chunks/{image-gen-EXECB5XM.js → image-gen-6VY7CA7C.js} +14 -14
  227. package/chunks/initializer-CRDZXJOG.js +101 -0
  228. package/chunks/installationInfo-EW3NEJDZ.js +95 -0
  229. package/chunks/{ja-QHT4EQTO.js → ja-UM5B2HMD.js} +8 -0
  230. package/chunks/{keychain-token-storage-3XFJ5ZB2.js → keychain-token-storage-MTFTAESK.js} +3 -3
  231. package/chunks/list-TZEMTXDH.js +104 -0
  232. package/chunks/{list-agents-OSVDFI6S.js → list-agents-43XUEXJV.js} +6 -6
  233. package/chunks/loadedSettingsAdapter-47DG424L.js +98 -0
  234. package/chunks/{loggingContentGenerator-WF4ZOJEZ.js → loggingContentGenerator-77C6O5VW.js} +31 -29
  235. package/chunks/{loop-wakeup-WQS6JYAG.js → loop-wakeup-E54KDUXC.js} +6 -6
  236. package/chunks/{ls-D3HUFHDP.js → ls-CGL2UC3H.js} +7 -7
  237. package/chunks/{lsp-3QDDJTCS.js → lsp-5IKUO5DX.js} +3 -3
  238. package/chunks/{managed-npm-update-E7IW6N7V.js → managed-npm-update-AJ5GZRUA.js} +53 -52
  239. package/chunks/mcp-AQK656Y4.js +98 -0
  240. package/chunks/{monitor-EE2UYMGE.js → monitor-UDZXKYT3.js} +55 -54
  241. package/chunks/nonInteractiveCli-6NC3NLZM.js +166 -0
  242. package/chunks/{notebook-edit-NTDY4QDU.js → notebook-edit-G6WZI2YT.js} +59 -57
  243. package/chunks/{openaiContentGenerator-YNFVJMRJ.js → openaiContentGenerator-IHVHP3VB.js} +32 -32
  244. package/chunks/{pidfile-4XSFLYBZ.js → pidfile-EBKS2HBK.js} +53 -52
  245. package/chunks/{processUtils-WDA2MJFD.js → processUtils-B7M35ZLR.js} +2 -2
  246. package/chunks/prompt-terminal-ledger-5JYOPOII.js +93 -0
  247. package/chunks/{pt-VL3I5RNY.js → pt-5BMJ3XYH.js} +8 -0
  248. package/chunks/{qwenContentGenerator-434M7QKY.js → qwenContentGenerator-WCJPPTED.js} +59 -58
  249. package/chunks/{qwenOAuth2-GMYZOO6A.js → qwenOAuth2-S2CLBSEZ.js} +10 -10
  250. package/chunks/read-file-WFM53FTW.js +33 -0
  251. package/chunks/{read-mcp-resource-XD54ZQMC.js → read-mcp-resource-XYES2B42.js} +3 -3
  252. package/chunks/{record-artifact-SEYFJEJF.js → record-artifact-W3IBTGL7.js} +10 -6
  253. package/chunks/{resumeHistoryUtils-EVG3WYK2.js → resumeHistoryUtils-CK4ZC6YO.js} +59 -58
  254. package/chunks/ripGrep-B3PBLEQ3.js +86 -0
  255. package/chunks/{ru-4RCKL4PY.js → ru-6GL66ORV.js} +8 -0
  256. package/chunks/{run-qwen-serve-3QSGRXAN.js → run-qwen-serve-DC5RXI6N.js} +537 -185
  257. package/chunks/{runtime-5MLLZ7DC.js → runtime-UVEETF54.js} +63 -62
  258. package/chunks/{scheduler-RPBJ63CH.js → scheduler-MWT3UMVN.js} +54 -53
  259. package/chunks/{sdk-exporters-grpc-54L4LS5L.js → sdk-exporters-grpc-6J5CKOMO.js} +194 -75
  260. package/chunks/{sdk-exporters-http-XUVP63H6.js → sdk-exporters-http-Q3YZ4752.js} +40 -45
  261. package/chunks/{sdk-impl-YXUEN2Z2.js → sdk-impl-BOMCAN2Z.js} +7211 -5454
  262. package/chunks/{send-message-VZENRWRH.js → send-message-J4VT46OI.js} +8 -8
  263. package/chunks/{serve-HS3XLPXU.js → serve-AKM75GTE.js} +60 -61
  264. package/chunks/{server-TC4A7AAZ.js → server-KU7XIDVT.js} +2221 -399
  265. package/chunks/{session-UBOFXVMN.js → session-DKVYIRWN.js} +108 -105
  266. package/chunks/{settings-D5644OM5.js → settings-NS3PXZDP.js} +63 -62
  267. package/chunks/{shell-3PZULQQV.js → shell-UXCNM2OK.js} +52 -51
  268. package/chunks/{skill-PEVVXQ3L.js → skill-KV7YCCTM.js} +30 -28
  269. package/chunks/{skill-settings-J65JKKES.js → skill-settings-EXW7ESWJ.js} +59 -58
  270. package/chunks/{spawnChannel-IYGXRHSQ.js → spawnChannel-FCP44P4V.js} +55 -54
  271. package/chunks/{standalone-update-IFM53PE7.js → standalone-update-RGW3B2DX.js} +55 -54
  272. package/chunks/{startInteractiveUI-3AVH7L6H.js → startInteractiveUI-UZMF2BIJ.js} +615 -392
  273. package/chunks/{syntheticOutput-7GWFIDXT.js → syntheticOutput-JAXMIMZP.js} +4 -4
  274. package/chunks/{task-create-FCBDX7UH.js → task-create-I2H322E4.js} +12 -12
  275. package/chunks/{task-list-YIYIUFUA.js → task-list-3OLIWFTQ.js} +21 -7
  276. package/chunks/{task-stop-X37KYTKB.js → task-stop-JAUY6MSY.js} +3 -3
  277. package/chunks/{task-update-MYPFVOVM.js → task-update-B3XO4CPI.js} +87 -16
  278. package/chunks/{team-create-ZAIA7KAV.js → team-create-77XY3KAE.js} +56 -56
  279. package/chunks/{team-delete-6UMU4XLS.js → team-delete-Q7GE7RRI.js} +6 -6
  280. package/chunks/{team-plan-approval-UNIUS7OD.js → team-plan-approval-TAQANDQG.js} +55 -54
  281. package/chunks/{terminal-image-renderer-G343P2RV.js → terminal-image-renderer-V4LIF5NS.js} +54 -53
  282. package/chunks/theme-manager-KKBAJ574.js +90 -0
  283. package/chunks/{todoWrite-U2R4NVF4.js → todoWrite-FJJTY2TI.js} +7 -7
  284. package/chunks/{tool-search-5R2OE4C7.js → tool-search-GZJYRK4I.js} +25 -24
  285. package/chunks/{total-session-admission-4KBHMQQ2.js → total-session-admission-NIBNWXHE.js} +59 -57
  286. package/chunks/{trustedFolders-LK6T4XC7.js → trustedFolders-7GEI2NYC.js} +53 -52
  287. package/chunks/{undici-PYHBDDPN.js → undici-S7WJSKGJ.js} +962 -391
  288. package/chunks/{update-relaunch-UBKROIC6.js → update-relaunch-OA3OEBMD.js} +5 -5
  289. package/chunks/{updateCheck-W4Y2GFSD.js → updateCheck-QVHQEVIY.js} +56 -55
  290. package/chunks/{useAutoAcceptIndicator-C7BEICBF.js → useAutoAcceptIndicator-WZ27J7NY.js} +64 -63
  291. package/chunks/{validateNonInterActiveAuth-LTEI2TB6.js → validateNonInterActiveAuth-OXJA2JWG.js} +99 -96
  292. package/chunks/{version-G5A5DGVS.js → version-KJO64WD7.js} +1 -1
  293. package/chunks/{web-fetch-RTEQTR5Z.js → web-fetch-CC5INI2R.js} +25 -23
  294. package/chunks/{web-search-5OXHEZPV.js → web-search-MOAUAN6N.js} +18 -18
  295. package/chunks/{web-shell-static-O73YPVVC.js → web-shell-static-3NUTRHAH.js} +4 -5
  296. package/chunks/{workflow-ISQJHPG2.js → workflow-BN2ZEJMK.js} +366 -105
  297. package/chunks/workspace-providers-status-R5QTZFK3.js +101 -0
  298. package/chunks/{workspace-registration-store-CYNY6IP6.js → workspace-registration-store-WMSLM36M.js} +1 -1
  299. package/chunks/{workspace-registry-34GTUUHB.js → workspace-registry-J3RUCXH6.js} +59 -57
  300. package/chunks/{workspace-service-XCDQLE2Y.js → workspace-service-JJZFPKM4.js} +66 -65
  301. package/chunks/workspace-skills-status-DRIOZRIA.js +101 -0
  302. package/chunks/{workspace-trust-reconciler-AYGXC7A3.js → workspace-trust-reconciler-YAYSN6CX.js} +69 -67
  303. package/chunks/write-file-7HXHFFOY.js +88 -0
  304. package/chunks/{zh-TW-SQ4HTSCW.js → zh-TW-LVLBK4KF.js} +8 -0
  305. package/chunks/{zh-LMSTK4WD.js → zh-UBMWS2BJ.js} +8 -0
  306. package/chunks/{zoom-image-4BFYJ3HG.js → zoom-image-EFMQMU4G.js} +24 -22
  307. package/cli.js +15 -15
  308. package/locales/ca.js +13 -0
  309. package/locales/de.js +12 -0
  310. package/locales/en.js +11 -0
  311. package/locales/fr.js +13 -0
  312. package/locales/ja.js +13 -0
  313. package/locales/pt.js +12 -0
  314. package/locales/ru.js +12 -0
  315. package/locales/zh-TW.js +11 -0
  316. package/locales/zh.js +11 -0
  317. package/package.json +3 -3
  318. package/web-shell/assets/{arc-CgOpDKvm.js → arc-BCP1f-bN.js} +1 -1
  319. package/web-shell/assets/{architectureDiagram-3BPJPVTR-0Ag_m34F.js → architectureDiagram-3BPJPVTR-D-6ajMay.js} +1 -1
  320. package/web-shell/assets/{blockDiagram-GPEHLZMM-IwTwFau0.js → blockDiagram-GPEHLZMM-CcLlnVnf.js} +1 -1
  321. package/web-shell/assets/{c4Diagram-AAUBKEIU-DLa5GUv8.js → c4Diagram-AAUBKEIU-C_Sp9UwQ.js} +1 -1
  322. package/web-shell/assets/channel-BcImYzbA.js +1 -0
  323. package/web-shell/assets/{chunk-2J33WTMH-DcYP-WFG.js → chunk-2J33WTMH-CG0ngvo9.js} +1 -1
  324. package/web-shell/assets/{chunk-4BX2VUAB-C8MVPMiQ.js → chunk-4BX2VUAB-D43LsVdk.js} +1 -1
  325. package/web-shell/assets/{chunk-55IACEB6-BUi4Yfv3.js → chunk-55IACEB6-BqNIn5rz.js} +1 -1
  326. package/web-shell/assets/{chunk-727SXJPM-Cy3Su2YY.js → chunk-727SXJPM-BSHmO08Y.js} +1 -1
  327. package/web-shell/assets/{chunk-AQP2D5EJ-Dp8Teqv6.js → chunk-AQP2D5EJ-CMUbr5tQ.js} +1 -1
  328. package/web-shell/assets/{chunk-FMBD7UC4-BDTDM-4j.js → chunk-FMBD7UC4-Cm6JflnZ.js} +1 -1
  329. package/web-shell/assets/{chunk-ND2GUHAM-7HfDt0r2.js → chunk-ND2GUHAM-CBR39YQZ.js} +1 -1
  330. package/web-shell/assets/{chunk-QZHKN3VN-BIBU0uCF.js → chunk-QZHKN3VN-CWnqaLb-.js} +1 -1
  331. package/web-shell/assets/classDiagram-4FO5ZUOK-OWx0rDRW.js +1 -0
  332. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-OWx0rDRW.js +1 -0
  333. package/web-shell/assets/{cose-bilkent-S5V4N54A-DRLdcg9p.js → cose-bilkent-S5V4N54A-DJlTdnfD.js} +1 -1
  334. package/web-shell/assets/{dagre-BM42HDAG-DCCgDwqW.js → dagre-BM42HDAG-1AFN1uVc.js} +1 -1
  335. package/web-shell/assets/{diagram-2AECGRRQ-CsBTBmk3.js → diagram-2AECGRRQ-gC0GGNSW.js} +1 -1
  336. package/web-shell/assets/{diagram-5GNKFQAL-C9qjH8Lt.js → diagram-5GNKFQAL-CPmRPT1s.js} +1 -1
  337. package/web-shell/assets/{diagram-KO2AKTUF-Brjs_lj2.js → diagram-KO2AKTUF-atigp6Hr.js} +1 -1
  338. package/web-shell/assets/{diagram-LMA3HP47-DtiWCl_F.js → diagram-LMA3HP47-BJnJFSRQ.js} +1 -1
  339. package/web-shell/assets/{diagram-OG6HWLK6-DmfKLkBT.js → diagram-OG6HWLK6-CyvJ4fG2.js} +1 -1
  340. package/web-shell/assets/{erDiagram-TEJ5UH35-Bve_4deH.js → erDiagram-TEJ5UH35-CZac_jT6.js} +1 -1
  341. package/web-shell/assets/{flowDiagram-I6XJVG4X-C2_kXCcV.js → flowDiagram-I6XJVG4X-pd-LQxWB.js} +1 -1
  342. package/web-shell/assets/{ganttDiagram-6RSMTGT7-BSBIjiTF.js → ganttDiagram-6RSMTGT7-CvB1at7l.js} +1 -1
  343. package/web-shell/assets/{gitGraphDiagram-PVQCEYII-CyebwI55.js → gitGraphDiagram-PVQCEYII-B5Y6nkil.js} +1 -1
  344. package/web-shell/assets/index-Bg3DAn8Z.js +1788 -0
  345. package/web-shell/assets/{index-d0yfnV1M.js → index-Bj3ZSUHL.js} +1 -1
  346. package/web-shell/assets/index-mp32EO88.css +5 -0
  347. package/web-shell/assets/{infoDiagram-5YYISTIA-CSDGnWxU.js → infoDiagram-5YYISTIA-BdyWvU4P.js} +1 -1
  348. package/web-shell/assets/{ishikawaDiagram-YF4QCWOH-BK4jU13p.js → ishikawaDiagram-YF4QCWOH-CaHbUdvN.js} +1 -1
  349. package/web-shell/assets/{journeyDiagram-JHISSGLW-D_W6j-oF.js → journeyDiagram-JHISSGLW-DR9F3FpG.js} +1 -1
  350. package/web-shell/assets/{kanban-definition-UN3LZRKU-C7xf-SdC.js → kanban-definition-UN3LZRKU-BoEUbkw2.js} +1 -1
  351. package/web-shell/assets/{linear-DQmzxpxd.js → linear-DUbfzV4T.js} +1 -1
  352. package/web-shell/assets/{mermaid.core-9P7AGOLG.js → mermaid.core-CLLkPcpD.js} +5 -5
  353. package/web-shell/assets/{mindmap-definition-RKZ34NQL-DgcgMyPk.js → mindmap-definition-RKZ34NQL-FuKI3Stt.js} +1 -1
  354. package/web-shell/assets/{pieDiagram-4H26LBE5-3wWGb9eG.js → pieDiagram-4H26LBE5-CVAHL7l5.js} +1 -1
  355. package/web-shell/assets/{quadrantDiagram-W4KKPZXB-BeCXnQw9.js → quadrantDiagram-W4KKPZXB-BkGi5fRj.js} +1 -1
  356. package/web-shell/assets/{requirementDiagram-4Y6WPE33-Bi1UOHDz.js → requirementDiagram-4Y6WPE33-B5ghV8-K.js} +1 -1
  357. package/web-shell/assets/{sankeyDiagram-5OEKKPKP-lrLUjjbb.js → sankeyDiagram-5OEKKPKP-CKFbVhkQ.js} +1 -1
  358. package/web-shell/assets/{sequenceDiagram-3UESZ5HK-BFuqKz6Q.js → sequenceDiagram-3UESZ5HK-C5P9ujPd.js} +1 -1
  359. package/web-shell/assets/{stateDiagram-AJRCARHV-8DemQLhu.js → stateDiagram-AJRCARHV-CsDn-Rez.js} +1 -1
  360. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DpGKD1ez.js +1 -0
  361. package/web-shell/assets/{timeline-definition-PNZ67QCA-uzEuVQXg.js → timeline-definition-PNZ67QCA-B6oLBkTr.js} +1 -1
  362. package/web-shell/assets/{vennDiagram-CIIHVFJN-BQTeZ_-o.js → vennDiagram-CIIHVFJN-DvtBkYwp.js} +1 -1
  363. package/web-shell/assets/{wardley-L42UT6IY-B6yM5Im7.js → wardley-L42UT6IY-D2UwTX16.js} +1 -1
  364. package/web-shell/assets/{wardleyDiagram-YWT4CUSO-ChM8bmgn.js → wardleyDiagram-YWT4CUSO-FnnfCxYI.js} +1 -1
  365. package/web-shell/assets/{xychartDiagram-2RQKCTM6-oNG6HyB1.js → xychartDiagram-2RQKCTM6-C1SaMQ7d.js} +1 -1
  366. package/web-shell/index.html +2 -2
  367. package/chunks/MaxSizedBox-UQALOVVT.js +0 -97
  368. package/chunks/agent-headless-GJCQMURW.js +0 -87
  369. package/chunks/channel-settings-store-WNWYFHG7.js +0 -102
  370. package/chunks/chunk-AZQ3DT76.js +0 -10017
  371. package/chunks/chunk-CR3C7WXL.js +0 -113
  372. package/chunks/chunk-K5IDV3PC.js +0 -519
  373. package/chunks/chunk-MPHPFVKK.js +0 -48
  374. package/chunks/chunk-RLKC46YT.js +0 -3582
  375. package/chunks/chunk-UPDOZBWO.js +0 -358
  376. package/chunks/contextCommand-PJ77GBWL.js +0 -93
  377. package/chunks/daemon-status-provider-ZDOYJCU6.js +0 -102
  378. package/chunks/daemon-trust-policy-E67OYUK2.js +0 -99
  379. package/chunks/exitPlanMode-R4JY7V2O.js +0 -85
  380. package/chunks/handleAutoUpdate-POCX2MNB.js +0 -94
  381. package/chunks/initializer-Z2AFGBNR.js +0 -100
  382. package/chunks/installationInfo-4I5FXNMH.js +0 -92
  383. package/chunks/list-ZMBFIGZA.js +0 -103
  384. package/chunks/loadedSettingsAdapter-T6TV4YJ7.js +0 -97
  385. package/chunks/mcp-6UNYX4HG.js +0 -97
  386. package/chunks/nonInteractiveCli-WAY237O4.js +0 -163
  387. package/chunks/read-file-TAFBKMNI.js +0 -32
  388. package/chunks/ripGrep-WOEK2PXS.js +0 -85
  389. package/chunks/theme-manager-Z3RIT7DB.js +0 -89
  390. package/chunks/undici-3FJYTMOF.js +0 -25914
  391. package/chunks/workspace-providers-status-2ZPZPUPZ.js +0 -100
  392. package/chunks/workspace-skills-status-RS4O7AIJ.js +0 -100
  393. package/chunks/write-file-EWXKVVXF.js +0 -87
  394. package/web-shell/assets/channel-BrGVBa2L.js +0 -1
  395. package/web-shell/assets/classDiagram-4FO5ZUOK-B5TUzJzI.js +0 -1
  396. package/web-shell/assets/classDiagram-v2-Q7XG4LA2-B5TUzJzI.js +0 -1
  397. package/web-shell/assets/index-CIDsgxTe.js +0 -1792
  398. package/web-shell/assets/index-DiQnWi_E.css +0 -5
  399. package/web-shell/assets/stateDiagram-v2-BHNVJYJU-DhM5ixYd.js +0 -1
  400. package/chunks/{dist-BROOP2EG.js → dist-LZO24N3E.js} +1 -1
@@ -10,9 +10,9 @@ import {
10
10
  __require
11
11
  } from "./chunk-J2S4EL5Y.js";
12
12
 
13
- // packages/cli/node_modules/undici/lib/core/symbols.js
13
+ // node_modules/undici/lib/core/symbols.js
14
14
  var require_symbols = __commonJS({
15
- "packages/cli/node_modules/undici/lib/core/symbols.js"(exports, module) {
15
+ "node_modules/undici/lib/core/symbols.js"(exports, module) {
16
16
  "use strict";
17
17
  init_esbuild_shims();
18
18
  module.exports = {
@@ -91,9 +91,9 @@ var require_symbols = __commonJS({
91
91
  }
92
92
  });
93
93
 
94
- // packages/cli/node_modules/undici/lib/util/timers.js
94
+ // node_modules/undici/lib/util/timers.js
95
95
  var require_timers = __commonJS({
96
- "packages/cli/node_modules/undici/lib/util/timers.js"(exports, module) {
96
+ "node_modules/undici/lib/util/timers.js"(exports, module) {
97
97
  "use strict";
98
98
  init_esbuild_shims();
99
99
  var fastNow = 0;
@@ -326,9 +326,9 @@ var require_timers = __commonJS({
326
326
  }
327
327
  });
328
328
 
329
- // packages/cli/node_modules/undici/lib/core/errors.js
329
+ // node_modules/undici/lib/core/errors.js
330
330
  var require_errors = __commonJS({
331
- "packages/cli/node_modules/undici/lib/core/errors.js"(exports, module) {
331
+ "node_modules/undici/lib/core/errors.js"(exports, module) {
332
332
  "use strict";
333
333
  init_esbuild_shims();
334
334
  var kUndiciError = Symbol.for("undici.error.UND_ERR");
@@ -811,9 +811,9 @@ var require_errors = __commonJS({
811
811
  }
812
812
  });
813
813
 
814
- // packages/cli/node_modules/undici/lib/core/constants.js
814
+ // node_modules/undici/lib/core/constants.js
815
815
  var require_constants = __commonJS({
816
- "packages/cli/node_modules/undici/lib/core/constants.js"(exports, module) {
816
+ "node_modules/undici/lib/core/constants.js"(exports, module) {
817
817
  "use strict";
818
818
  init_esbuild_shims();
819
819
  var wellknownHeaderNames = (
@@ -941,9 +941,9 @@ var require_constants = __commonJS({
941
941
  }
942
942
  });
943
943
 
944
- // packages/cli/node_modules/undici/lib/core/tree.js
944
+ // node_modules/undici/lib/core/tree.js
945
945
  var require_tree = __commonJS({
946
- "packages/cli/node_modules/undici/lib/core/tree.js"(exports, module) {
946
+ "node_modules/undici/lib/core/tree.js"(exports, module) {
947
947
  "use strict";
948
948
  init_esbuild_shims();
949
949
  var {
@@ -1090,9 +1090,9 @@ var require_tree = __commonJS({
1090
1090
  }
1091
1091
  });
1092
1092
 
1093
- // packages/cli/node_modules/undici/lib/core/util.js
1093
+ // node_modules/undici/lib/core/util.js
1094
1094
  var require_util = __commonJS({
1095
- "packages/cli/node_modules/undici/lib/core/util.js"(exports, module) {
1095
+ "node_modules/undici/lib/core/util.js"(exports, module) {
1096
1096
  "use strict";
1097
1097
  init_esbuild_shims();
1098
1098
  var assert = __require("node:assert");
@@ -1956,9 +1956,9 @@ var require_util = __commonJS({
1956
1956
  }
1957
1957
  });
1958
1958
 
1959
- // packages/cli/node_modules/undici/lib/util/stats.js
1959
+ // node_modules/undici/lib/util/stats.js
1960
1960
  var require_stats = __commonJS({
1961
- "packages/cli/node_modules/undici/lib/util/stats.js"(exports, module) {
1961
+ "node_modules/undici/lib/util/stats.js"(exports, module) {
1962
1962
  "use strict";
1963
1963
  init_esbuild_shims();
1964
1964
  var {
@@ -1997,9 +1997,9 @@ var require_stats = __commonJS({
1997
1997
  }
1998
1998
  });
1999
1999
 
2000
- // packages/cli/node_modules/undici/lib/core/diagnostics.js
2000
+ // node_modules/undici/lib/core/diagnostics.js
2001
2001
  var require_diagnostics = __commonJS({
2002
- "packages/cli/node_modules/undici/lib/core/diagnostics.js"(exports, module) {
2002
+ "node_modules/undici/lib/core/diagnostics.js"(exports, module) {
2003
2003
  "use strict";
2004
2004
  init_esbuild_shims();
2005
2005
  var diagnosticsChannel = __require("node:diagnostics_channel");
@@ -2218,9 +2218,9 @@ var require_diagnostics = __commonJS({
2218
2218
  }
2219
2219
  });
2220
2220
 
2221
- // packages/cli/node_modules/undici/lib/core/request.js
2221
+ // node_modules/undici/lib/core/request.js
2222
2222
  var require_request = __commonJS({
2223
- "packages/cli/node_modules/undici/lib/core/request.js"(exports, module) {
2223
+ "node_modules/undici/lib/core/request.js"(exports, module) {
2224
2224
  "use strict";
2225
2225
  init_esbuild_shims();
2226
2226
  var {
@@ -2537,7 +2537,11 @@ var require_request = __commonJS({
2537
2537
  } else if (typeof val[i] === "object") {
2538
2538
  throw new InvalidArgumentError(`invalid ${key} header`);
2539
2539
  } else {
2540
- arr.push(`${val[i]}`);
2540
+ const str = `${val[i]}`;
2541
+ if (!isValidHeaderValue(str)) {
2542
+ throw new InvalidArgumentError(`invalid ${key} header`);
2543
+ }
2544
+ arr.push(str);
2541
2545
  }
2542
2546
  }
2543
2547
  val = arr;
@@ -2549,6 +2553,9 @@ var require_request = __commonJS({
2549
2553
  val = "";
2550
2554
  } else {
2551
2555
  val = `${val}`;
2556
+ if (!isValidHeaderValue(val)) {
2557
+ throw new InvalidArgumentError(`invalid ${key} header`);
2558
+ }
2552
2559
  }
2553
2560
  if (headerName === "host") {
2554
2561
  if (request.host !== null) {
@@ -2596,9 +2603,9 @@ var require_request = __commonJS({
2596
2603
  }
2597
2604
  });
2598
2605
 
2599
- // packages/cli/node_modules/undici/lib/handler/wrap-handler.js
2606
+ // node_modules/undici/lib/handler/wrap-handler.js
2600
2607
  var require_wrap_handler = __commonJS({
2601
- "packages/cli/node_modules/undici/lib/handler/wrap-handler.js"(exports, module) {
2608
+ "node_modules/undici/lib/handler/wrap-handler.js"(exports, module) {
2602
2609
  "use strict";
2603
2610
  init_esbuild_shims();
2604
2611
  var { InvalidArgumentError } = require_errors();
@@ -2684,9 +2691,9 @@ var require_wrap_handler = __commonJS({
2684
2691
  }
2685
2692
  });
2686
2693
 
2687
- // packages/cli/node_modules/undici/lib/dispatcher/dispatcher.js
2694
+ // node_modules/undici/lib/dispatcher/dispatcher.js
2688
2695
  var require_dispatcher = __commonJS({
2689
- "packages/cli/node_modules/undici/lib/dispatcher/dispatcher.js"(exports, module) {
2696
+ "node_modules/undici/lib/dispatcher/dispatcher.js"(exports, module) {
2690
2697
  "use strict";
2691
2698
  init_esbuild_shims();
2692
2699
  var EventEmitter = __require("node:events");
@@ -2730,9 +2737,9 @@ var require_dispatcher = __commonJS({
2730
2737
  }
2731
2738
  });
2732
2739
 
2733
- // packages/cli/node_modules/undici/lib/handler/unwrap-handler.js
2740
+ // node_modules/undici/lib/handler/unwrap-handler.js
2734
2741
  var require_unwrap_handler = __commonJS({
2735
- "packages/cli/node_modules/undici/lib/handler/unwrap-handler.js"(exports, module) {
2742
+ "node_modules/undici/lib/handler/unwrap-handler.js"(exports, module) {
2736
2743
  "use strict";
2737
2744
  init_esbuild_shims();
2738
2745
  var { parseHeaders } = require_util();
@@ -2825,9 +2832,9 @@ var require_unwrap_handler = __commonJS({
2825
2832
  }
2826
2833
  });
2827
2834
 
2828
- // packages/cli/node_modules/undici/lib/dispatcher/dispatcher-base.js
2835
+ // node_modules/undici/lib/dispatcher/dispatcher-base.js
2829
2836
  var require_dispatcher_base = __commonJS({
2830
- "packages/cli/node_modules/undici/lib/dispatcher/dispatcher-base.js"(exports, module) {
2837
+ "node_modules/undici/lib/dispatcher/dispatcher-base.js"(exports, module) {
2831
2838
  "use strict";
2832
2839
  init_esbuild_shims();
2833
2840
  var Dispatcher = require_dispatcher();
@@ -2981,9 +2988,9 @@ var require_dispatcher_base = __commonJS({
2981
2988
  }
2982
2989
  });
2983
2990
 
2984
- // packages/cli/node_modules/undici/lib/core/connect.js
2991
+ // node_modules/undici/lib/core/connect.js
2985
2992
  var require_connect = __commonJS({
2986
- "packages/cli/node_modules/undici/lib/core/connect.js"(exports, module) {
2993
+ "node_modules/undici/lib/core/connect.js"(exports, module) {
2987
2994
  "use strict";
2988
2995
  init_esbuild_shims();
2989
2996
  var net = __require("node:net");
@@ -3112,9 +3119,9 @@ var require_connect = __commonJS({
3112
3119
  }
3113
3120
  });
3114
3121
 
3115
- // packages/cli/node_modules/undici/lib/llhttp/utils.js
3122
+ // node_modules/undici/lib/llhttp/utils.js
3116
3123
  var require_utils = __commonJS({
3117
- "packages/cli/node_modules/undici/lib/llhttp/utils.js"(exports) {
3124
+ "node_modules/undici/lib/llhttp/utils.js"(exports) {
3118
3125
  "use strict";
3119
3126
  init_esbuild_shims();
3120
3127
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -3130,9 +3137,9 @@ var require_utils = __commonJS({
3130
3137
  }
3131
3138
  });
3132
3139
 
3133
- // packages/cli/node_modules/undici/lib/llhttp/constants.js
3140
+ // node_modules/undici/lib/llhttp/constants.js
3134
3141
  var require_constants2 = __commonJS({
3135
- "packages/cli/node_modules/undici/lib/llhttp/constants.js"(exports) {
3142
+ "node_modules/undici/lib/llhttp/constants.js"(exports) {
3136
3143
  "use strict";
3137
3144
  init_esbuild_shims();
3138
3145
  Object.defineProperty(exports, "__esModule", { value: true });
@@ -3754,9 +3761,9 @@ var require_constants2 = __commonJS({
3754
3761
  }
3755
3762
  });
3756
3763
 
3757
- // packages/cli/node_modules/undici/lib/llhttp/llhttp-wasm.js
3764
+ // node_modules/undici/lib/llhttp/llhttp-wasm.js
3758
3765
  var require_llhttp_wasm = __commonJS({
3759
- "packages/cli/node_modules/undici/lib/llhttp/llhttp-wasm.js"(exports, module) {
3766
+ "node_modules/undici/lib/llhttp/llhttp-wasm.js"(exports, module) {
3760
3767
  "use strict";
3761
3768
  init_esbuild_shims();
3762
3769
  var { Buffer: Buffer2 } = __require("node:buffer");
@@ -3770,9 +3777,9 @@ var require_llhttp_wasm = __commonJS({
3770
3777
  }
3771
3778
  });
3772
3779
 
3773
- // packages/cli/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js
3780
+ // node_modules/undici/lib/llhttp/llhttp_simd-wasm.js
3774
3781
  var require_llhttp_simd_wasm = __commonJS({
3775
- "packages/cli/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js"(exports, module) {
3782
+ "node_modules/undici/lib/llhttp/llhttp_simd-wasm.js"(exports, module) {
3776
3783
  "use strict";
3777
3784
  init_esbuild_shims();
3778
3785
  var { Buffer: Buffer2 } = __require("node:buffer");
@@ -3786,9 +3793,9 @@ var require_llhttp_simd_wasm = __commonJS({
3786
3793
  }
3787
3794
  });
3788
3795
 
3789
- // packages/cli/node_modules/undici/lib/web/fetch/constants.js
3796
+ // node_modules/undici/lib/web/fetch/constants.js
3790
3797
  var require_constants3 = __commonJS({
3791
- "packages/cli/node_modules/undici/lib/web/fetch/constants.js"(exports, module) {
3798
+ "node_modules/undici/lib/web/fetch/constants.js"(exports, module) {
3792
3799
  "use strict";
3793
3800
  init_esbuild_shims();
3794
3801
  var corsSafeListedMethods = (
@@ -4011,9 +4018,9 @@ var require_constants3 = __commonJS({
4011
4018
  }
4012
4019
  });
4013
4020
 
4014
- // packages/cli/node_modules/undici/lib/web/fetch/global.js
4021
+ // node_modules/undici/lib/web/fetch/global.js
4015
4022
  var require_global = __commonJS({
4016
- "packages/cli/node_modules/undici/lib/web/fetch/global.js"(exports, module) {
4023
+ "node_modules/undici/lib/web/fetch/global.js"(exports, module) {
4017
4024
  "use strict";
4018
4025
  init_esbuild_shims();
4019
4026
  var globalOrigin = Symbol.for("undici.globalOrigin.1");
@@ -4050,9 +4057,9 @@ var require_global = __commonJS({
4050
4057
  }
4051
4058
  });
4052
4059
 
4053
- // packages/cli/node_modules/undici/lib/encoding/index.js
4060
+ // node_modules/undici/lib/encoding/index.js
4054
4061
  var require_encoding = __commonJS({
4055
- "packages/cli/node_modules/undici/lib/encoding/index.js"(exports, module) {
4062
+ "node_modules/undici/lib/encoding/index.js"(exports, module) {
4056
4063
  "use strict";
4057
4064
  init_esbuild_shims();
4058
4065
  var textDecoder = new TextDecoder();
@@ -4073,9 +4080,9 @@ var require_encoding = __commonJS({
4073
4080
  }
4074
4081
  });
4075
4082
 
4076
- // packages/cli/node_modules/undici/lib/web/infra/index.js
4083
+ // node_modules/undici/lib/web/infra/index.js
4077
4084
  var require_infra = __commonJS({
4078
- "packages/cli/node_modules/undici/lib/web/infra/index.js"(exports, module) {
4085
+ "node_modules/undici/lib/web/infra/index.js"(exports, module) {
4079
4086
  "use strict";
4080
4087
  init_esbuild_shims();
4081
4088
  var assert = __require("node:assert");
@@ -4197,9 +4204,9 @@ var require_infra = __commonJS({
4197
4204
  }
4198
4205
  });
4199
4206
 
4200
- // packages/cli/node_modules/undici/lib/web/fetch/data-url.js
4207
+ // node_modules/undici/lib/web/fetch/data-url.js
4201
4208
  var require_data_url = __commonJS({
4202
- "packages/cli/node_modules/undici/lib/web/fetch/data-url.js"(exports, module) {
4209
+ "node_modules/undici/lib/web/fetch/data-url.js"(exports, module) {
4203
4210
  "use strict";
4204
4211
  init_esbuild_shims();
4205
4212
  var assert = __require("node:assert");
@@ -4489,9 +4496,9 @@ var require_data_url = __commonJS({
4489
4496
  }
4490
4497
  });
4491
4498
 
4492
- // packages/cli/node_modules/undici/lib/util/runtime-features.js
4499
+ // node_modules/undici/lib/util/runtime-features.js
4493
4500
  var require_runtime_features = __commonJS({
4494
- "packages/cli/node_modules/undici/lib/util/runtime-features.js"(exports, module) {
4501
+ "node_modules/undici/lib/util/runtime-features.js"(exports, module) {
4495
4502
  "use strict";
4496
4503
  init_esbuild_shims();
4497
4504
  var lazyLoaders = {
@@ -4598,9 +4605,9 @@ var require_runtime_features = __commonJS({
4598
4605
  }
4599
4606
  });
4600
4607
 
4601
- // packages/cli/node_modules/undici/lib/web/webidl/index.js
4608
+ // node_modules/undici/lib/web/webidl/index.js
4602
4609
  var require_webidl = __commonJS({
4603
- "packages/cli/node_modules/undici/lib/web/webidl/index.js"(exports, module) {
4610
+ "node_modules/undici/lib/web/webidl/index.js"(exports, module) {
4604
4611
  "use strict";
4605
4612
  init_esbuild_shims();
4606
4613
  var assert = __require("node:assert");
@@ -5201,9 +5208,9 @@ var require_webidl = __commonJS({
5201
5208
  }
5202
5209
  });
5203
5210
 
5204
- // packages/cli/node_modules/undici/lib/web/fetch/util.js
5211
+ // node_modules/undici/lib/web/fetch/util.js
5205
5212
  var require_util2 = __commonJS({
5206
- "packages/cli/node_modules/undici/lib/web/fetch/util.js"(exports, module) {
5213
+ "node_modules/undici/lib/web/fetch/util.js"(exports, module) {
5207
5214
  "use strict";
5208
5215
  init_esbuild_shims();
5209
5216
  var { Transform } = __require("node:stream");
@@ -6030,9 +6037,9 @@ var require_util2 = __commonJS({
6030
6037
  }
6031
6038
  });
6032
6039
 
6033
- // packages/cli/node_modules/undici/lib/web/fetch/formdata.js
6040
+ // node_modules/undici/lib/web/fetch/formdata.js
6034
6041
  var require_formdata = __commonJS({
6035
- "packages/cli/node_modules/undici/lib/web/fetch/formdata.js"(exports, module) {
6042
+ "node_modules/undici/lib/web/fetch/formdata.js"(exports, module) {
6036
6043
  "use strict";
6037
6044
  init_esbuild_shims();
6038
6045
  var { iteratorMixin } = require_util2();
@@ -6197,9 +6204,9 @@ var require_formdata = __commonJS({
6197
6204
  }
6198
6205
  });
6199
6206
 
6200
- // packages/cli/node_modules/undici/lib/web/fetch/formdata-parser.js
6207
+ // node_modules/undici/lib/web/fetch/formdata-parser.js
6201
6208
  var require_formdata_parser = __commonJS({
6202
- "packages/cli/node_modules/undici/lib/web/fetch/formdata-parser.js"(exports, module) {
6209
+ "node_modules/undici/lib/web/fetch/formdata-parser.js"(exports, module) {
6203
6210
  "use strict";
6204
6211
  init_esbuild_shims();
6205
6212
  var { bufferToLowerCasedHeaderName } = require_util();
@@ -6540,9 +6547,9 @@ var require_formdata_parser = __commonJS({
6540
6547
  }
6541
6548
  });
6542
6549
 
6543
- // packages/cli/node_modules/undici/lib/util/promise.js
6550
+ // node_modules/undici/lib/util/promise.js
6544
6551
  var require_promise = __commonJS({
6545
- "packages/cli/node_modules/undici/lib/util/promise.js"(exports, module) {
6552
+ "node_modules/undici/lib/util/promise.js"(exports, module) {
6546
6553
  "use strict";
6547
6554
  init_esbuild_shims();
6548
6555
  function createDeferredPromise() {
@@ -6561,9 +6568,9 @@ var require_promise = __commonJS({
6561
6568
  }
6562
6569
  });
6563
6570
 
6564
- // packages/cli/node_modules/undici/lib/web/fetch/body.js
6571
+ // node_modules/undici/lib/web/fetch/body.js
6565
6572
  var require_body = __commonJS({
6566
- "packages/cli/node_modules/undici/lib/web/fetch/body.js"(exports, module) {
6573
+ "node_modules/undici/lib/web/fetch/body.js"(exports, module) {
6567
6574
  "use strict";
6568
6575
  init_esbuild_shims();
6569
6576
  var util = require_util();
@@ -6854,9 +6861,9 @@ Content-Type: ${value.type || "application/octet-stream"}\r
6854
6861
  }
6855
6862
  });
6856
6863
 
6857
- // packages/cli/node_modules/undici/lib/dispatcher/client-h1.js
6864
+ // node_modules/undici/lib/dispatcher/client-h1.js
6858
6865
  var require_client_h1 = __commonJS({
6859
- "packages/cli/node_modules/undici/lib/dispatcher/client-h1.js"(exports, module) {
6866
+ "node_modules/undici/lib/dispatcher/client-h1.js"(exports, module) {
6860
6867
  "use strict";
6861
6868
  init_esbuild_shims();
6862
6869
  var assert = __require("node:assert");
@@ -6867,6 +6874,7 @@ var require_client_h1 = __commonJS({
6867
6874
  RequestContentLengthMismatchError,
6868
6875
  ResponseContentLengthMismatchError,
6869
6876
  RequestAbortedError,
6877
+ InvalidArgumentError,
6870
6878
  HeadersTimeoutError,
6871
6879
  HeadersOverflowError,
6872
6880
  SocketError,
@@ -7727,8 +7735,16 @@ var require_client_h1 = __commonJS({
7727
7735
  }
7728
7736
  body = bodyStream.stream;
7729
7737
  contentLength = bodyStream.length;
7730
- } else if (util.isBlobLike(body) && request.contentType == null && body.type) {
7731
- headers.push("content-type", body.type);
7738
+ } else if (util.isBlobLike(body) && request.contentType == null) {
7739
+ const contentType = body.type;
7740
+ if (contentType) {
7741
+ const contentTypeValue = `${contentType}`;
7742
+ if (!util.isValidHeaderValue(contentTypeValue)) {
7743
+ util.errorRequest(client, request, new InvalidArgumentError("invalid content-type header"));
7744
+ return false;
7745
+ }
7746
+ headers.push("content-type", contentTypeValue);
7747
+ }
7732
7748
  }
7733
7749
  if (body && typeof body.read === "function") {
7734
7750
  body.read(0);
@@ -8139,9 +8155,9 @@ ${len.toString(16)}\r
8139
8155
  }
8140
8156
  });
8141
8157
 
8142
- // packages/cli/node_modules/undici/lib/dispatcher/client-h2.js
8158
+ // node_modules/undici/lib/dispatcher/client-h2.js
8143
8159
  var require_client_h2 = __commonJS({
8144
- "packages/cli/node_modules/undici/lib/dispatcher/client-h2.js"(exports, module) {
8160
+ "node_modules/undici/lib/dispatcher/client-h2.js"(exports, module) {
8145
8161
  "use strict";
8146
8162
  init_esbuild_shims();
8147
8163
  var assert = __require("node:assert");
@@ -8892,9 +8908,9 @@ var require_client_h2 = __commonJS({
8892
8908
  }
8893
8909
  });
8894
8910
 
8895
- // packages/cli/node_modules/undici/lib/dispatcher/client.js
8911
+ // node_modules/undici/lib/dispatcher/client.js
8896
8912
  var require_client = __commonJS({
8897
- "packages/cli/node_modules/undici/lib/dispatcher/client.js"(exports, module) {
8913
+ "node_modules/undici/lib/dispatcher/client.js"(exports, module) {
8898
8914
  "use strict";
8899
8915
  init_esbuild_shims();
8900
8916
  var assert = __require("node:assert");
@@ -9430,9 +9446,9 @@ var require_client = __commonJS({
9430
9446
  }
9431
9447
  });
9432
9448
 
9433
- // packages/cli/node_modules/undici/lib/dispatcher/fixed-queue.js
9449
+ // node_modules/undici/lib/dispatcher/fixed-queue.js
9434
9450
  var require_fixed_queue = __commonJS({
9435
- "packages/cli/node_modules/undici/lib/dispatcher/fixed-queue.js"(exports, module) {
9451
+ "node_modules/undici/lib/dispatcher/fixed-queue.js"(exports, module) {
9436
9452
  "use strict";
9437
9453
  init_esbuild_shims();
9438
9454
  var kSize = 2048;
@@ -9508,9 +9524,9 @@ var require_fixed_queue = __commonJS({
9508
9524
  }
9509
9525
  });
9510
9526
 
9511
- // packages/cli/node_modules/undici/lib/dispatcher/pool-base.js
9527
+ // node_modules/undici/lib/dispatcher/pool-base.js
9512
9528
  var require_pool_base = __commonJS({
9513
- "packages/cli/node_modules/undici/lib/dispatcher/pool-base.js"(exports, module) {
9529
+ "node_modules/undici/lib/dispatcher/pool-base.js"(exports, module) {
9514
9530
  "use strict";
9515
9531
  init_esbuild_shims();
9516
9532
  var { PoolStats } = require_stats();
@@ -9688,9 +9704,9 @@ var require_pool_base = __commonJS({
9688
9704
  }
9689
9705
  });
9690
9706
 
9691
- // packages/cli/node_modules/undici/lib/dispatcher/pool.js
9707
+ // node_modules/undici/lib/dispatcher/pool.js
9692
9708
  var require_pool = __commonJS({
9693
- "packages/cli/node_modules/undici/lib/dispatcher/pool.js"(exports, module) {
9709
+ "node_modules/undici/lib/dispatcher/pool.js"(exports, module) {
9694
9710
  "use strict";
9695
9711
  init_esbuild_shims();
9696
9712
  var {
@@ -9795,9 +9811,9 @@ var require_pool = __commonJS({
9795
9811
  }
9796
9812
  });
9797
9813
 
9798
- // packages/cli/node_modules/undici/lib/dispatcher/balanced-pool.js
9814
+ // node_modules/undici/lib/dispatcher/balanced-pool.js
9799
9815
  var require_balanced_pool = __commonJS({
9800
- "packages/cli/node_modules/undici/lib/dispatcher/balanced-pool.js"(exports, module) {
9816
+ "node_modules/undici/lib/dispatcher/balanced-pool.js"(exports, module) {
9801
9817
  "use strict";
9802
9818
  init_esbuild_shims();
9803
9819
  var {
@@ -9949,9 +9965,9 @@ var require_balanced_pool = __commonJS({
9949
9965
  }
9950
9966
  });
9951
9967
 
9952
- // packages/cli/node_modules/undici/lib/dispatcher/round-robin-pool.js
9968
+ // node_modules/undici/lib/dispatcher/round-robin-pool.js
9953
9969
  var require_round_robin_pool = __commonJS({
9954
- "packages/cli/node_modules/undici/lib/dispatcher/round-robin-pool.js"(exports, module) {
9970
+ "node_modules/undici/lib/dispatcher/round-robin-pool.js"(exports, module) {
9955
9971
  "use strict";
9956
9972
  init_esbuild_shims();
9957
9973
  var {
@@ -10071,9 +10087,9 @@ var require_round_robin_pool = __commonJS({
10071
10087
  }
10072
10088
  });
10073
10089
 
10074
- // packages/cli/node_modules/undici/lib/dispatcher/agent.js
10090
+ // node_modules/undici/lib/dispatcher/agent.js
10075
10091
  var require_agent = __commonJS({
10076
- "packages/cli/node_modules/undici/lib/dispatcher/agent.js"(exports, module) {
10092
+ "node_modules/undici/lib/dispatcher/agent.js"(exports, module) {
10077
10093
  "use strict";
10078
10094
  init_esbuild_shims();
10079
10095
  var { InvalidArgumentError, MaxOriginsReachedError } = require_errors();
@@ -10209,9 +10225,9 @@ var require_agent = __commonJS({
10209
10225
  }
10210
10226
  });
10211
10227
 
10212
- // packages/cli/node_modules/undici/lib/core/socks5-utils.js
10228
+ // node_modules/undici/lib/core/socks5-utils.js
10213
10229
  var require_socks5_utils = __commonJS({
10214
- "packages/cli/node_modules/undici/lib/core/socks5-utils.js"(exports, module) {
10230
+ "node_modules/undici/lib/core/socks5-utils.js"(exports, module) {
10215
10231
  "use strict";
10216
10232
  init_esbuild_shims();
10217
10233
  var { Buffer: Buffer2 } = __require("node:buffer");
@@ -10376,9 +10392,9 @@ var require_socks5_utils = __commonJS({
10376
10392
  }
10377
10393
  });
10378
10394
 
10379
- // packages/cli/node_modules/undici/lib/core/socks5-client.js
10395
+ // node_modules/undici/lib/core/socks5-client.js
10380
10396
  var require_socks5_client = __commonJS({
10381
- "packages/cli/node_modules/undici/lib/core/socks5-client.js"(exports, module) {
10397
+ "node_modules/undici/lib/core/socks5-client.js"(exports, module) {
10382
10398
  "use strict";
10383
10399
  init_esbuild_shims();
10384
10400
  var { EventEmitter } = __require("node:events");
@@ -10713,9 +10729,9 @@ var require_socks5_client = __commonJS({
10713
10729
  }
10714
10730
  });
10715
10731
 
10716
- // packages/cli/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js
10732
+ // node_modules/undici/lib/dispatcher/socks5-proxy-agent.js
10717
10733
  var require_socks5_proxy_agent = __commonJS({
10718
- "packages/cli/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js"(exports, module) {
10734
+ "node_modules/undici/lib/dispatcher/socks5-proxy-agent.js"(exports, module) {
10719
10735
  "use strict";
10720
10736
  init_esbuild_shims();
10721
10737
  var { URL: URL2 } = __require("node:url");
@@ -10920,9 +10936,9 @@ var require_socks5_proxy_agent = __commonJS({
10920
10936
  }
10921
10937
  });
10922
10938
 
10923
- // packages/cli/node_modules/undici/lib/dispatcher/proxy-agent.js
10939
+ // node_modules/undici/lib/dispatcher/proxy-agent.js
10924
10940
  var require_proxy_agent = __commonJS({
10925
- "packages/cli/node_modules/undici/lib/dispatcher/proxy-agent.js"(exports, module) {
10941
+ "node_modules/undici/lib/dispatcher/proxy-agent.js"(exports, module) {
10926
10942
  "use strict";
10927
10943
  init_esbuild_shims();
10928
10944
  var { kProxy, kClose, kDestroy, kDispatch } = require_symbols();
@@ -11189,9 +11205,9 @@ var require_proxy_agent = __commonJS({
11189
11205
  }
11190
11206
  });
11191
11207
 
11192
- // packages/cli/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js
11208
+ // node_modules/undici/lib/dispatcher/env-http-proxy-agent.js
11193
11209
  var require_env_http_proxy_agent = __commonJS({
11194
- "packages/cli/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js"(exports, module) {
11210
+ "node_modules/undici/lib/dispatcher/env-http-proxy-agent.js"(exports, module) {
11195
11211
  "use strict";
11196
11212
  init_esbuild_shims();
11197
11213
  var DispatcherBase = require_dispatcher_base();
@@ -11316,9 +11332,9 @@ var require_env_http_proxy_agent = __commonJS({
11316
11332
  }
11317
11333
  });
11318
11334
 
11319
- // packages/cli/node_modules/undici/lib/handler/retry-handler.js
11335
+ // node_modules/undici/lib/handler/retry-handler.js
11320
11336
  var require_retry_handler = __commonJS({
11321
- "packages/cli/node_modules/undici/lib/handler/retry-handler.js"(exports, module) {
11337
+ "node_modules/undici/lib/handler/retry-handler.js"(exports, module) {
11322
11338
  "use strict";
11323
11339
  init_esbuild_shims();
11324
11340
  var assert = __require("node:assert");
@@ -11335,6 +11351,24 @@ var require_retry_handler = __commonJS({
11335
11351
  return isNaN(retryTime) ? 0 : retryTime - Date.now();
11336
11352
  }
11337
11353
  __name(calculateRetryAfterHeader, "calculateRetryAfterHeader");
11354
+ function validatePartialResponseContentLength(headers, range, statusCode, retryCount) {
11355
+ const contentLength = headers["content-length"];
11356
+ if (contentLength == null) {
11357
+ return;
11358
+ }
11359
+ if (!Number.isFinite(range.start) || !Number.isFinite(range.end)) {
11360
+ return;
11361
+ }
11362
+ const length = Number(contentLength);
11363
+ const expectedLength = range.end - range.start + 1;
11364
+ if (!Number.isFinite(length) || length !== expectedLength) {
11365
+ throw new RequestRetryError("Content-Length mismatch", statusCode, {
11366
+ headers,
11367
+ data: { count: retryCount }
11368
+ });
11369
+ }
11370
+ }
11371
+ __name(validatePartialResponseContentLength, "validatePartialResponseContentLength");
11338
11372
  var RetryHandler = class _RetryHandler {
11339
11373
  static {
11340
11374
  __name(this, "RetryHandler");
@@ -11507,6 +11541,7 @@ var require_retry_handler = __commonJS({
11507
11541
  data: { count: this.retryCount }
11508
11542
  });
11509
11543
  }
11544
+ validatePartialResponseContentLength(headers, contentRange, statusCode, this.retryCount);
11510
11545
  const { start, size, end = size ? size - 1 : null } = contentRange;
11511
11546
  assert(this.start === start, "content-range mismatch");
11512
11547
  assert(this.end == null || this.end === end, "content-range mismatch");
@@ -11525,6 +11560,7 @@ var require_retry_handler = __commonJS({
11525
11560
  );
11526
11561
  return;
11527
11562
  }
11563
+ validatePartialResponseContentLength(headers, range, statusCode, this.retryCount);
11528
11564
  const { start, size, end = size ? size - 1 : null } = range;
11529
11565
  assert(
11530
11566
  start != null && Number.isFinite(start),
@@ -11632,9 +11668,9 @@ var require_retry_handler = __commonJS({
11632
11668
  }
11633
11669
  });
11634
11670
 
11635
- // packages/cli/node_modules/undici/lib/dispatcher/retry-agent.js
11671
+ // node_modules/undici/lib/dispatcher/retry-agent.js
11636
11672
  var require_retry_agent = __commonJS({
11637
- "packages/cli/node_modules/undici/lib/dispatcher/retry-agent.js"(exports, module) {
11673
+ "node_modules/undici/lib/dispatcher/retry-agent.js"(exports, module) {
11638
11674
  "use strict";
11639
11675
  init_esbuild_shims();
11640
11676
  var Dispatcher = require_dispatcher();
@@ -11671,9 +11707,9 @@ var require_retry_agent = __commonJS({
11671
11707
  }
11672
11708
  });
11673
11709
 
11674
- // packages/cli/node_modules/undici/lib/dispatcher/h2c-client.js
11710
+ // node_modules/undici/lib/dispatcher/h2c-client.js
11675
11711
  var require_h2c_client = __commonJS({
11676
- "packages/cli/node_modules/undici/lib/dispatcher/h2c-client.js"(exports, module) {
11712
+ "node_modules/undici/lib/dispatcher/h2c-client.js"(exports, module) {
11677
11713
  "use strict";
11678
11714
  init_esbuild_shims();
11679
11715
  var { InvalidArgumentError } = require_errors();
@@ -11718,9 +11754,9 @@ var require_h2c_client = __commonJS({
11718
11754
  }
11719
11755
  });
11720
11756
 
11721
- // packages/cli/node_modules/undici/lib/api/readable.js
11757
+ // node_modules/undici/lib/api/readable.js
11722
11758
  var require_readable = __commonJS({
11723
- "packages/cli/node_modules/undici/lib/api/readable.js"(exports, module) {
11759
+ "node_modules/undici/lib/api/readable.js"(exports, module) {
11724
11760
  "use strict";
11725
11761
  init_esbuild_shims();
11726
11762
  var assert = __require("node:assert");
@@ -12133,9 +12169,9 @@ var require_readable = __commonJS({
12133
12169
  }
12134
12170
  });
12135
12171
 
12136
- // packages/cli/node_modules/undici/lib/api/api-request.js
12172
+ // node_modules/undici/lib/api/api-request.js
12137
12173
  var require_api_request = __commonJS({
12138
- "packages/cli/node_modules/undici/lib/api/api-request.js"(exports, module) {
12174
+ "node_modules/undici/lib/api/api-request.js"(exports, module) {
12139
12175
  "use strict";
12140
12176
  init_esbuild_shims();
12141
12177
  var assert = __require("node:assert");
@@ -12317,9 +12353,9 @@ var require_api_request = __commonJS({
12317
12353
  }
12318
12354
  });
12319
12355
 
12320
- // packages/cli/node_modules/undici/lib/api/abort-signal.js
12356
+ // node_modules/undici/lib/api/abort-signal.js
12321
12357
  var require_abort_signal = __commonJS({
12322
- "packages/cli/node_modules/undici/lib/api/abort-signal.js"(exports, module) {
12358
+ "node_modules/undici/lib/api/abort-signal.js"(exports, module) {
12323
12359
  "use strict";
12324
12360
  init_esbuild_shims();
12325
12361
  var { addAbortListener } = require_util();
@@ -12373,9 +12409,9 @@ var require_abort_signal = __commonJS({
12373
12409
  }
12374
12410
  });
12375
12411
 
12376
- // packages/cli/node_modules/undici/lib/api/api-stream.js
12412
+ // node_modules/undici/lib/api/api-stream.js
12377
12413
  var require_api_stream = __commonJS({
12378
- "packages/cli/node_modules/undici/lib/api/api-stream.js"(exports, module) {
12414
+ "node_modules/undici/lib/api/api-stream.js"(exports, module) {
12379
12415
  "use strict";
12380
12416
  init_esbuild_shims();
12381
12417
  var assert = __require("node:assert");
@@ -12540,9 +12576,9 @@ var require_api_stream = __commonJS({
12540
12576
  }
12541
12577
  });
12542
12578
 
12543
- // packages/cli/node_modules/undici/lib/api/api-pipeline.js
12579
+ // node_modules/undici/lib/api/api-pipeline.js
12544
12580
  var require_api_pipeline = __commonJS({
12545
- "packages/cli/node_modules/undici/lib/api/api-pipeline.js"(exports, module) {
12581
+ "node_modules/undici/lib/api/api-pipeline.js"(exports, module) {
12546
12582
  "use strict";
12547
12583
  init_esbuild_shims();
12548
12584
  var {
@@ -12753,9 +12789,9 @@ var require_api_pipeline = __commonJS({
12753
12789
  }
12754
12790
  });
12755
12791
 
12756
- // packages/cli/node_modules/undici/lib/api/api-upgrade.js
12792
+ // node_modules/undici/lib/api/api-upgrade.js
12757
12793
  var require_api_upgrade = __commonJS({
12758
- "packages/cli/node_modules/undici/lib/api/api-upgrade.js"(exports, module) {
12794
+ "node_modules/undici/lib/api/api-upgrade.js"(exports, module) {
12759
12795
  "use strict";
12760
12796
  init_esbuild_shims();
12761
12797
  var { InvalidArgumentError, SocketError } = require_errors();
@@ -12852,9 +12888,9 @@ var require_api_upgrade = __commonJS({
12852
12888
  }
12853
12889
  });
12854
12890
 
12855
- // packages/cli/node_modules/undici/lib/api/api-connect.js
12891
+ // node_modules/undici/lib/api/api-connect.js
12856
12892
  var require_api_connect = __commonJS({
12857
- "packages/cli/node_modules/undici/lib/api/api-connect.js"(exports, module) {
12893
+ "node_modules/undici/lib/api/api-connect.js"(exports, module) {
12858
12894
  "use strict";
12859
12895
  init_esbuild_shims();
12860
12896
  var assert = __require("node:assert");
@@ -12948,9 +12984,9 @@ var require_api_connect = __commonJS({
12948
12984
  }
12949
12985
  });
12950
12986
 
12951
- // packages/cli/node_modules/undici/lib/api/index.js
12987
+ // node_modules/undici/lib/api/index.js
12952
12988
  var require_api = __commonJS({
12953
- "packages/cli/node_modules/undici/lib/api/index.js"(exports, module) {
12989
+ "node_modules/undici/lib/api/index.js"(exports, module) {
12954
12990
  "use strict";
12955
12991
  init_esbuild_shims();
12956
12992
  module.exports.request = require_api_request();
@@ -12961,9 +12997,9 @@ var require_api = __commonJS({
12961
12997
  }
12962
12998
  });
12963
12999
 
12964
- // packages/cli/node_modules/undici/lib/mock/mock-errors.js
13000
+ // node_modules/undici/lib/mock/mock-errors.js
12965
13001
  var require_mock_errors = __commonJS({
12966
- "packages/cli/node_modules/undici/lib/mock/mock-errors.js"(exports, module) {
13002
+ "node_modules/undici/lib/mock/mock-errors.js"(exports, module) {
12967
13003
  "use strict";
12968
13004
  init_esbuild_shims();
12969
13005
  var { UndiciError } = require_errors();
@@ -12991,9 +13027,9 @@ var require_mock_errors = __commonJS({
12991
13027
  }
12992
13028
  });
12993
13029
 
12994
- // packages/cli/node_modules/undici/lib/mock/mock-symbols.js
13030
+ // node_modules/undici/lib/mock/mock-symbols.js
12995
13031
  var require_mock_symbols = __commonJS({
12996
- "packages/cli/node_modules/undici/lib/mock/mock-symbols.js"(exports, module) {
13032
+ "node_modules/undici/lib/mock/mock-symbols.js"(exports, module) {
12997
13033
  "use strict";
12998
13034
  init_esbuild_shims();
12999
13035
  module.exports = {
@@ -13029,9 +13065,9 @@ var require_mock_symbols = __commonJS({
13029
13065
  }
13030
13066
  });
13031
13067
 
13032
- // packages/cli/node_modules/undici/lib/mock/mock-utils.js
13068
+ // node_modules/undici/lib/mock/mock-utils.js
13033
13069
  var require_mock_utils = __commonJS({
13034
- "packages/cli/node_modules/undici/lib/mock/mock-utils.js"(exports, module) {
13070
+ "node_modules/undici/lib/mock/mock-utils.js"(exports, module) {
13035
13071
  "use strict";
13036
13072
  init_esbuild_shims();
13037
13073
  var { MockNotMatchedError } = require_mock_errors();
@@ -13432,9 +13468,9 @@ var require_mock_utils = __commonJS({
13432
13468
  }
13433
13469
  });
13434
13470
 
13435
- // packages/cli/node_modules/undici/lib/mock/mock-interceptor.js
13471
+ // node_modules/undici/lib/mock/mock-interceptor.js
13436
13472
  var require_mock_interceptor = __commonJS({
13437
- "packages/cli/node_modules/undici/lib/mock/mock-interceptor.js"(exports, module) {
13473
+ "node_modules/undici/lib/mock/mock-interceptor.js"(exports, module) {
13438
13474
  "use strict";
13439
13475
  init_esbuild_shims();
13440
13476
  var { getResponseData, buildKey, addMockDispatch } = require_mock_utils();
@@ -13603,9 +13639,9 @@ var require_mock_interceptor = __commonJS({
13603
13639
  }
13604
13640
  });
13605
13641
 
13606
- // packages/cli/node_modules/undici/lib/mock/mock-client.js
13642
+ // node_modules/undici/lib/mock/mock-client.js
13607
13643
  var require_mock_client = __commonJS({
13608
- "packages/cli/node_modules/undici/lib/mock/mock-client.js"(exports, module) {
13644
+ "node_modules/undici/lib/mock/mock-client.js"(exports, module) {
13609
13645
  "use strict";
13610
13646
  init_esbuild_shims();
13611
13647
  var { promisify } = __require("node:util");
@@ -13668,9 +13704,9 @@ var require_mock_client = __commonJS({
13668
13704
  }
13669
13705
  });
13670
13706
 
13671
- // packages/cli/node_modules/undici/lib/mock/mock-call-history.js
13707
+ // node_modules/undici/lib/mock/mock-call-history.js
13672
13708
  var require_mock_call_history = __commonJS({
13673
- "packages/cli/node_modules/undici/lib/mock/mock-call-history.js"(exports, module) {
13709
+ "node_modules/undici/lib/mock/mock-call-history.js"(exports, module) {
13674
13710
  "use strict";
13675
13711
  init_esbuild_shims();
13676
13712
  var { kMockCallHistoryAddLog } = require_mock_symbols();
@@ -13879,9 +13915,9 @@ var require_mock_call_history = __commonJS({
13879
13915
  }
13880
13916
  });
13881
13917
 
13882
- // packages/cli/node_modules/undici/lib/mock/mock-pool.js
13918
+ // node_modules/undici/lib/mock/mock-pool.js
13883
13919
  var require_mock_pool = __commonJS({
13884
- "packages/cli/node_modules/undici/lib/mock/mock-pool.js"(exports, module) {
13920
+ "node_modules/undici/lib/mock/mock-pool.js"(exports, module) {
13885
13921
  "use strict";
13886
13922
  init_esbuild_shims();
13887
13923
  var { promisify } = __require("node:util");
@@ -13944,9 +13980,9 @@ var require_mock_pool = __commonJS({
13944
13980
  }
13945
13981
  });
13946
13982
 
13947
- // packages/cli/node_modules/undici/lib/mock/pending-interceptors-formatter.js
13983
+ // node_modules/undici/lib/mock/pending-interceptors-formatter.js
13948
13984
  var require_pending_interceptors_formatter = __commonJS({
13949
- "packages/cli/node_modules/undici/lib/mock/pending-interceptors-formatter.js"(exports, module) {
13985
+ "node_modules/undici/lib/mock/pending-interceptors-formatter.js"(exports, module) {
13950
13986
  "use strict";
13951
13987
  init_esbuild_shims();
13952
13988
  var { Transform } = __require("node:stream");
@@ -13989,9 +14025,9 @@ var require_pending_interceptors_formatter = __commonJS({
13989
14025
  }
13990
14026
  });
13991
14027
 
13992
- // packages/cli/node_modules/undici/lib/mock/mock-agent.js
14028
+ // node_modules/undici/lib/mock/mock-agent.js
13993
14029
  var require_mock_agent = __commonJS({
13994
- "packages/cli/node_modules/undici/lib/mock/mock-agent.js"(exports, module) {
14030
+ "node_modules/undici/lib/mock/mock-agent.js"(exports, module) {
13995
14031
  "use strict";
13996
14032
  init_esbuild_shims();
13997
14033
  var { kClients } = require_symbols();
@@ -14177,9 +14213,9 @@ ${pendingInterceptorsFormatter.format(pending)}`.trim()
14177
14213
  }
14178
14214
  });
14179
14215
 
14180
- // packages/cli/node_modules/undici/lib/mock/snapshot-utils.js
14216
+ // node_modules/undici/lib/mock/snapshot-utils.js
14181
14217
  var require_snapshot_utils = __commonJS({
14182
- "packages/cli/node_modules/undici/lib/mock/snapshot-utils.js"(exports, module) {
14218
+ "node_modules/undici/lib/mock/snapshot-utils.js"(exports, module) {
14183
14219
  "use strict";
14184
14220
  init_esbuild_shims();
14185
14221
  var { InvalidArgumentError } = require_errors();
@@ -14269,9 +14305,9 @@ var require_snapshot_utils = __commonJS({
14269
14305
  }
14270
14306
  });
14271
14307
 
14272
- // packages/cli/node_modules/undici/lib/mock/snapshot-recorder.js
14308
+ // node_modules/undici/lib/mock/snapshot-recorder.js
14273
14309
  var require_snapshot_recorder = __commonJS({
14274
- "packages/cli/node_modules/undici/lib/mock/snapshot-recorder.js"(exports, module) {
14310
+ "node_modules/undici/lib/mock/snapshot-recorder.js"(exports, module) {
14275
14311
  "use strict";
14276
14312
  init_esbuild_shims();
14277
14313
  var { writeFile, readFile, mkdir } = __require("node:fs/promises");
@@ -14653,9 +14689,9 @@ var require_snapshot_recorder = __commonJS({
14653
14689
  }
14654
14690
  });
14655
14691
 
14656
- // packages/cli/node_modules/undici/lib/mock/snapshot-agent.js
14692
+ // node_modules/undici/lib/mock/snapshot-agent.js
14657
14693
  var require_snapshot_agent = __commonJS({
14658
- "packages/cli/node_modules/undici/lib/mock/snapshot-agent.js"(exports, module) {
14694
+ "node_modules/undici/lib/mock/snapshot-agent.js"(exports, module) {
14659
14695
  "use strict";
14660
14696
  init_esbuild_shims();
14661
14697
  var Agent = require_agent();
@@ -14944,9 +14980,9 @@ var require_snapshot_agent = __commonJS({
14944
14980
  }
14945
14981
  });
14946
14982
 
14947
- // packages/cli/node_modules/undici/lib/global.js
14983
+ // node_modules/undici/lib/global.js
14948
14984
  var require_global2 = __commonJS({
14949
- "packages/cli/node_modules/undici/lib/global.js"(exports, module) {
14985
+ "node_modules/undici/lib/global.js"(exports, module) {
14950
14986
  "use strict";
14951
14987
  init_esbuild_shims();
14952
14988
  var globalDispatcher = Symbol.for("undici.globalDispatcher.2");
@@ -15001,9 +15037,9 @@ var require_global2 = __commonJS({
15001
15037
  }
15002
15038
  });
15003
15039
 
15004
- // packages/cli/node_modules/undici/lib/handler/decorator-handler.js
15040
+ // node_modules/undici/lib/handler/decorator-handler.js
15005
15041
  var require_decorator_handler = __commonJS({
15006
- "packages/cli/node_modules/undici/lib/handler/decorator-handler.js"(exports, module) {
15042
+ "node_modules/undici/lib/handler/decorator-handler.js"(exports, module) {
15007
15043
  "use strict";
15008
15044
  init_esbuild_shims();
15009
15045
  var assert = __require("node:assert");
@@ -15061,9 +15097,9 @@ var require_decorator_handler = __commonJS({
15061
15097
  }
15062
15098
  });
15063
15099
 
15064
- // packages/cli/node_modules/undici/lib/handler/redirect-handler.js
15100
+ // node_modules/undici/lib/handler/redirect-handler.js
15065
15101
  var require_redirect_handler = __commonJS({
15066
- "packages/cli/node_modules/undici/lib/handler/redirect-handler.js"(exports, module) {
15102
+ "node_modules/undici/lib/handler/redirect-handler.js"(exports, module) {
15067
15103
  "use strict";
15068
15104
  init_esbuild_shims();
15069
15105
  var util = require_util();
@@ -15230,9 +15266,9 @@ var require_redirect_handler = __commonJS({
15230
15266
  }
15231
15267
  });
15232
15268
 
15233
- // packages/cli/node_modules/undici/lib/interceptor/redirect.js
15269
+ // node_modules/undici/lib/interceptor/redirect.js
15234
15270
  var require_redirect = __commonJS({
15235
- "packages/cli/node_modules/undici/lib/interceptor/redirect.js"(exports, module) {
15271
+ "node_modules/undici/lib/interceptor/redirect.js"(exports, module) {
15236
15272
  "use strict";
15237
15273
  init_esbuild_shims();
15238
15274
  var RedirectHandler = require_redirect_handler();
@@ -15254,9 +15290,9 @@ var require_redirect = __commonJS({
15254
15290
  }
15255
15291
  });
15256
15292
 
15257
- // packages/cli/node_modules/undici/lib/interceptor/response-error.js
15293
+ // node_modules/undici/lib/interceptor/response-error.js
15258
15294
  var require_response_error = __commonJS({
15259
- "packages/cli/node_modules/undici/lib/interceptor/response-error.js"(exports, module) {
15295
+ "node_modules/undici/lib/interceptor/response-error.js"(exports, module) {
15260
15296
  "use strict";
15261
15297
  init_esbuild_shims();
15262
15298
  var DecoratorHandler = require_decorator_handler();
@@ -15340,9 +15376,9 @@ var require_response_error = __commonJS({
15340
15376
  }
15341
15377
  });
15342
15378
 
15343
- // packages/cli/node_modules/undici/lib/interceptor/retry.js
15379
+ // node_modules/undici/lib/interceptor/retry.js
15344
15380
  var require_retry = __commonJS({
15345
- "packages/cli/node_modules/undici/lib/interceptor/retry.js"(exports, module) {
15381
+ "node_modules/undici/lib/interceptor/retry.js"(exports, module) {
15346
15382
  "use strict";
15347
15383
  init_esbuild_shims();
15348
15384
  var RetryHandler = require_retry_handler();
@@ -15365,9 +15401,9 @@ var require_retry = __commonJS({
15365
15401
  }
15366
15402
  });
15367
15403
 
15368
- // packages/cli/node_modules/undici/lib/interceptor/dump.js
15404
+ // node_modules/undici/lib/interceptor/dump.js
15369
15405
  var require_dump = __commonJS({
15370
- "packages/cli/node_modules/undici/lib/interceptor/dump.js"(exports, module) {
15406
+ "node_modules/undici/lib/interceptor/dump.js"(exports, module) {
15371
15407
  "use strict";
15372
15408
  init_esbuild_shims();
15373
15409
  var { InvalidArgumentError, RequestAbortedError } = require_errors();
@@ -15456,9 +15492,9 @@ var require_dump = __commonJS({
15456
15492
  }
15457
15493
  });
15458
15494
 
15459
- // packages/cli/node_modules/undici/lib/interceptor/dns.js
15495
+ // node_modules/undici/lib/interceptor/dns.js
15460
15496
  var require_dns = __commonJS({
15461
- "packages/cli/node_modules/undici/lib/interceptor/dns.js"(exports, module) {
15497
+ "node_modules/undici/lib/interceptor/dns.js"(exports, module) {
15462
15498
  "use strict";
15463
15499
  init_esbuild_shims();
15464
15500
  var { isIP } = __require("node:net");
@@ -15910,17 +15946,138 @@ var require_dns = __commonJS({
15910
15946
  }
15911
15947
  });
15912
15948
 
15913
- // packages/cli/node_modules/undici/lib/util/cache.js
15949
+ // node_modules/undici/lib/util/cache.js
15914
15950
  var require_cache = __commonJS({
15915
- "packages/cli/node_modules/undici/lib/util/cache.js"(exports, module) {
15951
+ "node_modules/undici/lib/util/cache.js"(exports, module) {
15916
15952
  "use strict";
15917
15953
  init_esbuild_shims();
15918
15954
  var {
15919
15955
  safeHTTPMethods,
15920
15956
  pathHasQueryOrFragment,
15921
- hasSafeIterator
15957
+ hasSafeIterator,
15958
+ isValidHTTPToken
15922
15959
  } = require_util();
15923
15960
  var { serializePathWithQuery } = require_util();
15961
+ var MAX_DELTA_SECONDS = 2147483647;
15962
+ var RESTRICTIVE_DIRECTIVE_NAMES = ["no-store", "private", "no-cache"];
15963
+ var kInvalidCacheControlDirectives = Symbol("invalid cache-control directives");
15964
+ function trimOWS(value) {
15965
+ return value.replace(/^[\t ]+|[\t ]+$/g, "");
15966
+ }
15967
+ __name(trimOWS, "trimOWS");
15968
+ function arrayIncludes(array, value) {
15969
+ for (let i = 0; i < array.length; i++) {
15970
+ if (array[i] === value) {
15971
+ return true;
15972
+ }
15973
+ }
15974
+ return false;
15975
+ }
15976
+ __name(arrayIncludes, "arrayIncludes");
15977
+ function trimOWSStart(value) {
15978
+ return value.replace(/^[\t ]+/, "");
15979
+ }
15980
+ __name(trimOWSStart, "trimOWSStart");
15981
+ function trimOWSEnd(value) {
15982
+ return value.replace(/[\t ]+$/, "");
15983
+ }
15984
+ __name(trimOWSEnd, "trimOWSEnd");
15985
+ function findUnescapedQuote(value, start) {
15986
+ let escaped = false;
15987
+ for (let i = start; i < value.length; i++) {
15988
+ if (escaped) {
15989
+ escaped = false;
15990
+ } else if (value[i] === "\\") {
15991
+ escaped = true;
15992
+ } else if (value[i] === '"') {
15993
+ return i;
15994
+ }
15995
+ }
15996
+ return -1;
15997
+ }
15998
+ __name(findUnescapedQuote, "findUnescapedQuote");
15999
+ function splitCacheControlHeaderValue(value) {
16000
+ const directives = [];
16001
+ let start = 0;
16002
+ let quoteStart = -1;
16003
+ let inQuote = false;
16004
+ let escaped = false;
16005
+ for (let i = 0; i < value.length; i++) {
16006
+ if (inQuote) {
16007
+ if (escaped) {
16008
+ escaped = false;
16009
+ } else if (value[i] === "\\") {
16010
+ escaped = true;
16011
+ } else if (value[i] === '"') {
16012
+ inQuote = false;
16013
+ quoteStart = -1;
16014
+ }
16015
+ } else if (value[i] === '"') {
16016
+ inQuote = true;
16017
+ quoteStart = i;
16018
+ } else if (value[i] === ",") {
16019
+ directives.push({ value: value.substring(start, i), fromMalformedQuote: false });
16020
+ start = i + 1;
16021
+ }
16022
+ }
16023
+ if (!inQuote) {
16024
+ directives.push({ value: value.substring(start), fromMalformedQuote: false });
16025
+ return directives;
16026
+ }
16027
+ const tail = value.substring(start);
16028
+ const quoteOffset = quoteStart - start;
16029
+ let tailStart = 0;
16030
+ for (let i = 0; i < tail.length; i++) {
16031
+ if (tail[i] === ",") {
16032
+ directives.push({
16033
+ value: tail.substring(tailStart, i),
16034
+ fromMalformedQuote: tailStart > quoteOffset
16035
+ });
16036
+ tailStart = i + 1;
16037
+ }
16038
+ }
16039
+ directives.push({
16040
+ value: tail.substring(tailStart),
16041
+ fromMalformedQuote: tailStart > quoteOffset
16042
+ });
16043
+ return directives;
16044
+ }
16045
+ __name(splitCacheControlHeaderValue, "splitCacheControlHeaderValue");
16046
+ function markInvalidCacheControlDirective(directives, key) {
16047
+ let invalidDirectives = directives[kInvalidCacheControlDirectives];
16048
+ if (invalidDirectives === void 0) {
16049
+ invalidDirectives = /* @__PURE__ */ new Set();
16050
+ Object.defineProperty(directives, kInvalidCacheControlDirectives, {
16051
+ value: invalidDirectives
16052
+ });
16053
+ }
16054
+ invalidDirectives.add(key);
16055
+ }
16056
+ __name(markInvalidCacheControlDirective, "markInvalidCacheControlDirective");
16057
+ function hasInvalidCacheControlDirective(directives, key) {
16058
+ return directives[kInvalidCacheControlDirectives]?.has(key) === true;
16059
+ }
16060
+ __name(hasInvalidCacheControlDirective, "hasInvalidCacheControlDirective");
16061
+ function getMalformedRestrictiveDirectiveName(key) {
16062
+ for (const directiveName of RESTRICTIVE_DIRECTIVE_NAMES) {
16063
+ if (key.startsWith(directiveName) && key.length > directiveName.length && !isValidHTTPToken(key[directiveName.length])) {
16064
+ return directiveName;
16065
+ }
16066
+ }
16067
+ let tokenOnlyKey = "";
16068
+ let hasInvalidTokenChar = false;
16069
+ for (let i = 0; i < key.length; i++) {
16070
+ if (isValidHTTPToken(key[i])) {
16071
+ tokenOnlyKey += key[i];
16072
+ } else {
16073
+ hasInvalidTokenChar = true;
16074
+ }
16075
+ }
16076
+ if (hasInvalidTokenChar && arrayIncludes(RESTRICTIVE_DIRECTIVE_NAMES, tokenOnlyKey)) {
16077
+ return tokenOnlyKey;
16078
+ }
16079
+ }
16080
+ __name(getMalformedRestrictiveDirectiveName, "getMalformedRestrictiveDirectiveName");
15924
16081
  function makeCacheKey(opts) {
15925
16082
  if (!opts.origin) {
15926
16083
  throw new Error("opts.origin is undefined");
@@ -15937,6 +16094,19 @@ var require_cache = __commonJS({
15937
16094
  };
15938
16095
  }
15939
16096
  __name(makeCacheKey, "makeCacheKey");
16097
+ function appendHeader(headers, key, val) {
16098
+ const headerName = key.toLowerCase();
16099
+ const current = headers[headerName];
16100
+ const values = Array.isArray(val) ? val : [val];
16101
+ if (current === void 0) {
16102
+ headers[headerName] = Array.isArray(val) ? val.slice() : val;
16103
+ } else if (Array.isArray(current)) {
16104
+ current.push(...values);
16105
+ } else {
16106
+ headers[headerName] = [current, ...values];
16107
+ }
16108
+ }
16109
+ __name(appendHeader, "appendHeader");
15940
16110
  function normalizeHeaders(opts) {
15941
16111
  let headers;
15942
16112
  if (opts.headers == null) {
@@ -15952,11 +16122,11 @@ var require_cache = __commonJS({
15952
16122
  if (typeof key !== "string" || typeof val !== "string") {
15953
16123
  throw new Error("opts.headers is not a valid header map");
15954
16124
  }
15955
- headers[key.toLowerCase()] = val;
16125
+ appendHeader(headers, key, val);
15956
16126
  }
15957
16127
  } else {
15958
16128
  for (const key of Object.keys(opts.headers)) {
15959
- headers[key.toLowerCase()] = opts.headers[key];
16129
+ appendHeader(headers, key, opts.headers[key]);
15960
16130
  }
15961
16131
  }
15962
16132
  } else {
@@ -16004,25 +16174,32 @@ var require_cache = __commonJS({
16004
16174
  __name(assertCacheValue, "assertCacheValue");
16005
16175
  function parseCacheControlHeader(header) {
16006
16176
  const output = {};
16007
- let directives;
16008
- if (Array.isArray(header)) {
16009
- directives = [];
16010
- for (const directive of header) {
16011
- directives.push(...directive.split(","));
16012
- }
16013
- } else {
16014
- directives = header.split(",");
16015
- }
16177
+ const invalidNumericDirectives = /* @__PURE__ */ new Set();
16178
+ const invalidNoArgumentDirectives = /* @__PURE__ */ new Set();
16179
+ const directives = splitCacheControlHeaderValue(Array.isArray(header) ? header.join(",") : header);
16016
16180
  for (let i = 0; i < directives.length; i++) {
16017
- const directive = directives[i].toLowerCase();
16181
+ const directiveRecord = directives[i];
16182
+ const directive = directiveRecord.value.toLowerCase();
16183
+ const fromMalformedQuote = directiveRecord.fromMalformedQuote;
16018
16184
  const keyValueDelimiter = directive.indexOf("=");
16019
16185
  let key;
16020
16186
  let value;
16187
+ let keyHasTrailingWhitespace = false;
16188
+ let valueHasLeadingWhitespace = false;
16021
16189
  if (keyValueDelimiter !== -1) {
16022
- key = directive.substring(0, keyValueDelimiter).trimStart();
16023
- value = directive.substring(keyValueDelimiter + 1);
16190
+ const rawKey = directive.substring(0, keyValueDelimiter);
16191
+ const rawValue = directive.substring(keyValueDelimiter + 1);
16192
+ keyHasTrailingWhitespace = trimOWSEnd(rawKey) !== rawKey;
16193
+ valueHasLeadingWhitespace = trimOWSStart(rawValue) !== rawValue;
16194
+ key = trimOWS(rawKey);
16195
+ value = trimOWSStart(rawValue);
16024
16196
  } else {
16025
- key = directive.trim();
16197
+ key = trimOWS(directive);
16198
+ }
16199
+ const malformedRestrictiveDirectiveName = getMalformedRestrictiveDirectiveName(key);
16200
+ if (malformedRestrictiveDirectiveName !== void 0) {
16201
+ output[malformedRestrictiveDirectiveName] = true;
16202
+ continue;
16026
16203
  }
16027
16204
  switch (key) {
16028
16205
  case "min-fresh":
@@ -16031,48 +16208,85 @@ var require_cache = __commonJS({
16031
16208
  case "s-maxage":
16032
16209
  case "stale-while-revalidate":
16033
16210
  case "stale-if-error": {
16034
- if (value === void 0 || value[0] === " ") {
16211
+ if (fromMalformedQuote || invalidNumericDirectives.has(key)) {
16212
+ continue;
16213
+ }
16214
+ if (value === void 0 || keyHasTrailingWhitespace || valueHasLeadingWhitespace) {
16215
+ delete output[key];
16216
+ invalidNumericDirectives.add(key);
16217
+ markInvalidCacheControlDirective(output, key);
16035
16218
  continue;
16036
16219
  }
16037
16220
  if (value.length >= 2 && value[0] === '"' && value[value.length - 1] === '"') {
16038
16221
  value = value.substring(1, value.length - 1);
16039
16222
  }
16040
- const parsedValue = parseInt(value, 10);
16041
- if (parsedValue !== parsedValue) {
16223
+ if (!/^[0-9]+$/.test(value)) {
16224
+ delete output[key];
16225
+ invalidNumericDirectives.add(key);
16226
+ markInvalidCacheControlDirective(output, key);
16042
16227
  continue;
16043
16228
  }
16044
- if (key === "max-age" && key in output && output[key] >= parsedValue) {
16045
- continue;
16229
+ const parsedValue = Math.min(parseInt(value, 10), MAX_DELTA_SECONDS);
16230
+ if (key === "min-fresh") {
16231
+ if (!(key in output) || output[key] < parsedValue) {
16232
+ output[key] = parsedValue;
16233
+ }
16234
+ } else if (!(key in output) || output[key] > parsedValue) {
16235
+ output[key] = parsedValue;
16046
16236
  }
16047
- output[key] = parsedValue;
16048
16237
  break;
16049
16238
  }
16050
16239
  case "private":
16051
16240
  case "no-cache": {
16241
+ if (fromMalformedQuote) {
16242
+ output[key] = true;
16243
+ break;
16244
+ }
16245
+ if (value !== void 0 && value.length === 0) {
16246
+ output[key] = true;
16247
+ break;
16248
+ }
16052
16249
  if (value) {
16053
16250
  if (value[0] === '"') {
16054
- const headers = [value.substring(1)];
16055
- let foundEndingQuote = value[value.length - 1] === '"';
16056
- if (!foundEndingQuote) {
16251
+ value = trimOWSEnd(value);
16252
+ let fieldList = "";
16253
+ let lastQuotedPart = i;
16254
+ let foundEndingQuote = false;
16255
+ const closingQuote = findUnescapedQuote(value, 1);
16256
+ if (closingQuote !== -1) {
16257
+ fieldList = value.substring(1, closingQuote);
16258
+ foundEndingQuote = true;
16259
+ } else {
16260
+ const fieldListParts = [value.substring(1)];
16057
16261
  for (let j = i + 1; j < directives.length; j++) {
16058
- const nextPart = directives[j];
16059
- const nextPartLength = nextPart.length;
16060
- headers.push(nextPart.trim());
16061
- if (nextPartLength !== 0 && nextPart[nextPartLength - 1] === '"') {
16262
+ const nextPart = trimOWS(directives[j].value);
16263
+ const closingQuote2 = findUnescapedQuote(nextPart, 0);
16264
+ lastQuotedPart = j;
16265
+ if (closingQuote2 !== -1) {
16266
+ fieldListParts.push(nextPart.substring(0, closingQuote2));
16062
16267
  foundEndingQuote = true;
16063
16268
  break;
16064
16269
  }
16270
+ fieldListParts.push(nextPart);
16065
16271
  }
16272
+ fieldList = fieldListParts.join(",");
16066
16273
  }
16067
- if (foundEndingQuote) {
16068
- let lastHeader = headers[headers.length - 1];
16069
- if (lastHeader[lastHeader.length - 1] === '"') {
16070
- lastHeader = lastHeader.substring(0, lastHeader.length - 1);
16071
- headers[headers.length - 1] = lastHeader;
16072
- }
16073
- for (let j = 0; j < headers.length; j++) {
16074
- headers[j] = headers[j].trim();
16274
+ if (!foundEndingQuote) {
16275
+ output[key] = true;
16276
+ break;
16277
+ }
16278
+ i = lastQuotedPart;
16279
+ const headers = fieldList.split(",");
16280
+ let validFieldNames = true;
16281
+ for (let j = 0; j < headers.length; j++) {
16282
+ headers[j] = trimOWS(headers[j]);
16283
+ if (!isValidHTTPToken(headers[j])) {
16284
+ validFieldNames = false;
16075
16285
  }
16286
+ }
16287
+ if (!validFieldNames) {
16288
+ output[key] = true;
16289
+ } else if (output[key] !== true) {
16076
16290
  if (key in output) {
16077
16291
  output[key] = output[key].concat(headers);
16078
16292
  } else {
@@ -16080,11 +16294,15 @@ var require_cache = __commonJS({
16080
16294
  }
16081
16295
  }
16082
16296
  } else {
16083
- const fieldName = value.trim();
16084
- if (key in output) {
16085
- output[key] = output[key].concat(fieldName);
16086
- } else {
16087
- output[key] = [fieldName];
16297
+ const fieldName = trimOWS(value);
16298
+ if (!isValidHTTPToken(fieldName)) {
16299
+ output[key] = true;
16300
+ } else if (output[key] !== true) {
16301
+ if (key in output) {
16302
+ output[key] = output[key].concat(fieldName);
16303
+ } else {
16304
+ output[key] = [fieldName];
16305
+ }
16088
16306
  }
16089
16307
  }
16090
16308
  break;
@@ -16092,16 +16310,23 @@ var require_cache = __commonJS({
16092
16310
  }
16093
16311
  // eslint-disable-next-line no-fallthrough
16094
16312
  case "public":
16095
- case "no-store":
16096
16313
  case "must-revalidate":
16097
16314
  case "proxy-revalidate":
16098
16315
  case "immutable":
16099
16316
  case "no-transform":
16100
16317
  case "must-understand":
16101
16318
  case "only-if-cached":
16102
- if (value) {
16319
+ if (fromMalformedQuote || invalidNoArgumentDirectives.has(key)) {
16103
16320
  continue;
16104
16321
  }
16322
+ if (value !== void 0) {
16323
+ delete output[key];
16324
+ invalidNoArgumentDirectives.add(key);
16325
+ continue;
16326
+ }
16327
+ output[key] = true;
16328
+ break;
16329
+ case "no-store":
16105
16330
  output[key] = true;
16106
16331
  break;
16107
16332
  default:
@@ -16111,22 +16336,55 @@ var require_cache = __commonJS({
16111
16336
  return output;
16112
16337
  }
16113
16338
  __name(parseCacheControlHeader, "parseCacheControlHeader");
16339
+ function splitVaryHeader(varyHeader) {
16340
+ const values = Array.isArray(varyHeader) ? varyHeader : [varyHeader];
16341
+ const output = [];
16342
+ for (let i = 0; i < values.length; i++) {
16343
+ const parts = values[i].split(",");
16344
+ for (let j = 0; j < parts.length; j++) {
16345
+ output.push(parts[j]);
16346
+ }
16347
+ }
16348
+ return output;
16349
+ }
16350
+ __name(splitVaryHeader, "splitVaryHeader");
16351
+ function hasVaryStar(varyHeader) {
16352
+ const values = splitVaryHeader(varyHeader);
16353
+ for (let i = 0; i < values.length; i++) {
16354
+ if (trimOWS(values[i]).indexOf("*") !== -1) {
16355
+ return true;
16356
+ }
16357
+ }
16358
+ return false;
16359
+ }
16360
+ __name(hasVaryStar, "hasVaryStar");
16114
16361
  function parseVaryHeader(varyHeader, headers) {
16115
- if (typeof varyHeader === "string" && varyHeader.includes("*")) {
16362
+ if (hasVaryStar(varyHeader)) {
16116
16363
  return headers;
16117
16364
  }
16118
16365
  const output = (
16119
16366
  /** @type {Record<string, string | string[] | null>} */
16120
16367
  {}
16121
16368
  );
16122
- const varyingHeaders = typeof varyHeader === "string" ? varyHeader.split(",") : varyHeader;
16369
+ const varyingHeaders = splitVaryHeader(varyHeader);
16123
16370
  for (const header of varyingHeaders) {
16124
- const trimmedHeader = header.trim().toLowerCase();
16125
- output[trimmedHeader] = headers[trimmedHeader] ?? null;
16371
+ const trimmedHeader = trimOWS(header).toLowerCase();
16372
+ if (trimmedHeader.length === 0) {
16373
+ continue;
16374
+ }
16375
+ if (!isValidHTTPToken(trimmedHeader)) {
16376
+ return void 0;
16377
+ }
16378
+ const headerValue = headers[trimmedHeader];
16379
+ output[trimmedHeader] = Array.isArray(headerValue) ? headerValue.slice() : headerValue ?? null;
16126
16380
  }
16127
16381
  return output;
16128
16382
  }
16129
16383
  __name(parseVaryHeader, "parseVaryHeader");
16384
+ function isInvalidOrWildcardVaryHeader(varyHeader) {
16385
+ return hasVaryStar(varyHeader) || parseVaryHeader(varyHeader, {}) === void 0;
16386
+ }
16387
+ __name(isInvalidOrWildcardVaryHeader, "isInvalidOrWildcardVaryHeader");
16130
16388
  function isEtagUsable(etag) {
16131
16389
  if (etag.length <= 2) {
16132
16390
  return false;
@@ -16159,7 +16417,7 @@ var require_cache = __commonJS({
16159
16417
  throw new TypeError(`${name} needs to have at least one method`);
16160
16418
  }
16161
16419
  for (const method of methods) {
16162
- if (!safeHTTPMethods.includes(method)) {
16420
+ if (!arrayIncludes(safeHTTPMethods, method)) {
16163
16421
  throw new TypeError(`element of ${name}-array needs to be one of following values: ${safeHTTPMethods.join(", ")}, got ${method}`);
16164
16422
  }
16165
16423
  }
@@ -16185,7 +16443,10 @@ var require_cache = __commonJS({
16185
16443
  assertCacheKey,
16186
16444
  assertCacheValue,
16187
16445
  parseCacheControlHeader,
16446
+ hasInvalidCacheControlDirective,
16188
16447
  parseVaryHeader,
16448
+ hasVaryStar,
16449
+ isInvalidOrWildcardVaryHeader,
16189
16450
  isEtagUsable,
16190
16451
  assertCacheMethods,
16191
16452
  assertCacheStore,
@@ -16194,9 +16455,9 @@ var require_cache = __commonJS({
16194
16455
  }
16195
16456
  });
16196
16457
 
16197
- // packages/cli/node_modules/undici/lib/util/date.js
16458
+ // node_modules/undici/lib/util/date.js
16198
16459
  var require_date = __commonJS({
16199
- "packages/cli/node_modules/undici/lib/util/date.js"(exports, module) {
16460
+ "node_modules/undici/lib/util/date.js"(exports, module) {
16200
16461
  "use strict";
16201
16462
  init_esbuild_shims();
16202
16463
  function parseHttpDate(date) {
@@ -16210,6 +16471,14 @@ var require_date = __commonJS({
16210
16471
  }
16211
16472
  }
16212
16473
  __name(parseHttpDate, "parseHttpDate");
16474
+ function makeDate(year, monthIdx, day, hour, minute, second, weekday) {
16475
+ const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second));
16476
+ if (year >= 0 && year <= 99) {
16477
+ result.setUTCFullYear(year);
16478
+ }
16479
+ return result.getUTCFullYear() === year && result.getUTCMonth() === monthIdx && result.getUTCDate() === day && result.getUTCHours() === hour && result.getUTCMinutes() === minute && result.getUTCSeconds() === second && result.getUTCDay() === weekday ? result : void 0;
16480
+ }
16481
+ __name(makeDate, "makeDate");
16213
16482
  function parseImfDate(date) {
16214
16483
  if (date.length !== 29 || date[4] !== " " || date[7] !== " " || date[11] !== " " || date[16] !== " " || date[19] !== ":" || date[22] !== ":" || date[25] !== " " || date[26] !== "G" || date[27] !== "M" || date[28] !== "T") {
16215
16484
  return void 0;
@@ -16370,8 +16639,7 @@ var require_date = __commonJS({
16370
16639
  }
16371
16640
  second = (code1 - 48) * 10 + (code2 - 48);
16372
16641
  }
16373
- const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second));
16374
- return result.getUTCDay() === weekday ? result : void 0;
16642
+ return makeDate(year, monthIdx, day, hour, minute, second, weekday);
16375
16643
  }
16376
16644
  __name(parseImfDate, "parseImfDate");
16377
16645
  function parseAscTimeDate(date) {
@@ -16534,8 +16802,7 @@ var require_date = __commonJS({
16534
16802
  return void 0;
16535
16803
  }
16536
16804
  const year = (yearDigit1 - 48) * 1e3 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48);
16537
- const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second));
16538
- return result.getUTCDay() === weekday ? result : void 0;
16805
+ return makeDate(year, monthIdx, day, hour, minute, second, weekday);
16539
16806
  }
16540
16807
  __name(parseAscTimeDate, "parseAscTimeDate");
16541
16808
  function parseRfc850Date(date) {
@@ -16685,8 +16952,7 @@ var require_date = __commonJS({
16685
16952
  }
16686
16953
  second = (code1 - 48) * 10 + (code2 - 48);
16687
16954
  }
16688
- const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second));
16689
- return result.getUTCDay() === weekday ? result : void 0;
16955
+ return makeDate(year, monthIdx, day, hour, minute, second, weekday);
16690
16956
  }
16691
16957
  __name(parseRfc850Date, "parseRfc850Date");
16692
16958
  module.exports = {
@@ -16695,15 +16961,18 @@ var require_date = __commonJS({
16695
16961
  }
16696
16962
  });
16697
16963
 
16698
- // packages/cli/node_modules/undici/lib/handler/cache-handler.js
16964
+ // node_modules/undici/lib/handler/cache-handler.js
16699
16965
  var require_cache_handler = __commonJS({
16700
- "packages/cli/node_modules/undici/lib/handler/cache-handler.js"(exports, module) {
16966
+ "node_modules/undici/lib/handler/cache-handler.js"(exports, module) {
16701
16967
  "use strict";
16702
16968
  init_esbuild_shims();
16703
16969
  var util = require_util();
16704
16970
  var {
16705
16971
  parseCacheControlHeader,
16972
+ hasInvalidCacheControlDirective,
16706
16973
  parseVaryHeader,
16974
+ hasVaryStar,
16975
+ isInvalidOrWildcardVaryHeader,
16707
16976
  isEtagUsable
16708
16977
  } = require_cache();
16709
16978
  var { parseHttpDate } = require_date();
@@ -16728,6 +16997,85 @@ var require_cache_handler = __commonJS({
16728
16997
  206
16729
16998
  ];
16730
16999
  var MAX_RESPONSE_AGE = 2147483647e3;
17000
+ function trimOWS(value) {
17001
+ return value.replace(/^[\t ]+|[\t ]+$/g, "");
17002
+ }
17003
+ __name(trimOWS, "trimOWS");
17004
+ function arrayIncludes(array, value) {
17005
+ for (let i = 0; i < array.length; i++) {
17006
+ if (array[i] === value) {
17007
+ return true;
17008
+ }
17009
+ }
17010
+ return false;
17011
+ }
17012
+ __name(arrayIncludes, "arrayIncludes");
17013
+ function appendConnectionHeaderTokens(headersToRemove, connectionHeader) {
17014
+ const values = Array.isArray(connectionHeader) ? connectionHeader : [connectionHeader];
17015
+ for (let i = 0; i < values.length; i++) {
17016
+ const tokens = values[i].split(",");
17017
+ for (let j = 0; j < tokens.length; j++) {
17018
+ headersToRemove.push(trimOWS(tokens[j]).toLowerCase());
17019
+ }
17020
+ }
17021
+ }
17022
+ __name(appendConnectionHeaderTokens, "appendConnectionHeaderTokens");
17023
+ function getSameOriginPath(cacheKey, location) {
17024
+ if (typeof location !== "string") {
17025
+ return void 0;
17026
+ }
17027
+ let originUrl;
17028
+ let requestUrl;
17029
+ let locationUrl;
17030
+ try {
17031
+ originUrl = new URL(cacheKey.origin);
17032
+ requestUrl = new URL(cacheKey.path, originUrl);
17033
+ locationUrl = new URL(location, requestUrl);
17034
+ } catch {
17035
+ return void 0;
17036
+ }
17037
+ if (locationUrl.origin !== originUrl.origin) {
17038
+ return void 0;
17039
+ }
17040
+ return locationUrl.pathname + locationUrl.search;
17041
+ }
17042
+ __name(getSameOriginPath, "getSameOriginPath");
17043
+ function deleteCachedUri(store, cacheKey, path) {
17044
+ deleteCachedValue(store, {
17045
+ ...cacheKey,
17046
+ path
17047
+ });
17048
+ for (let i = 0; i < util.safeHTTPMethods.length; i++) {
17049
+ const method = util.safeHTTPMethods[i];
17050
+ if (method !== cacheKey.method) {
17051
+ deleteCachedValue(store, {
17052
+ ...cacheKey,
17053
+ method,
17054
+ path
17055
+ });
17056
+ }
17057
+ }
17058
+ }
17059
+ __name(deleteCachedUri, "deleteCachedUri");
17060
+ function deleteLocationTargets(store, cacheKey, headerValue) {
17061
+ if (headerValue === void 0) {
17062
+ return;
17063
+ }
17064
+ const values = Array.isArray(headerValue) ? headerValue : [headerValue];
17065
+ for (let i = 0; i < values.length; i++) {
17066
+ const path = getSameOriginPath(cacheKey, values[i]);
17067
+ if (path !== void 0) {
17068
+ deleteCachedUri(store, cacheKey, path);
17069
+ }
17070
+ }
17071
+ }
17072
+ __name(deleteLocationTargets, "deleteLocationTargets");
17073
+ function invalidateUnsafeRequest(store, cacheKey, resHeaders) {
17074
+ deleteCachedUri(store, cacheKey, cacheKey.path);
17075
+ deleteLocationTargets(store, cacheKey, resHeaders.location);
17076
+ deleteLocationTargets(store, cacheKey, resHeaders["content-location"]);
17077
+ }
17078
+ __name(invalidateUnsafeRequest, "invalidateUnsafeRequest");
16731
17079
  var CacheHandler = class {
16732
17080
  static {
16733
17081
  __name(this, "CacheHandler");
@@ -16790,35 +17138,49 @@ var require_cache_handler = __commonJS({
16790
17138
  statusMessage
16791
17139
  ), "downstreamOnHeaders");
16792
17140
  const handler = this;
16793
- if (!util.safeHTTPMethods.includes(this.#cacheKey.method) && statusCode >= 200 && statusCode <= 399) {
16794
- try {
16795
- this.#store.delete(this.#cacheKey)?.catch?.(noop);
16796
- } catch {
16797
- }
17141
+ if (!arrayIncludes(util.safeHTTPMethods, this.#cacheKey.method) && statusCode >= 200 && statusCode <= 399) {
17142
+ invalidateUnsafeRequest(this.#store, this.#cacheKey, resHeaders);
16798
17143
  return downstreamOnHeaders();
16799
17144
  }
16800
17145
  const cacheControlHeader = resHeaders["cache-control"];
16801
- const heuristicallyCacheable = resHeaders["last-modified"] && HEURISTICALLY_CACHEABLE_STATUS_CODES.includes(statusCode);
17146
+ const heuristicallyCacheable = resHeaders["last-modified"] && arrayIncludes(HEURISTICALLY_CACHEABLE_STATUS_CODES, statusCode);
16802
17147
  if (!cacheControlHeader && !resHeaders["expires"] && !heuristicallyCacheable && !this.#cacheByDefault) {
17148
+ if (statusCode === 304 && resHeaders.vary && isInvalidOrWildcardVaryHeader(resHeaders.vary)) {
17149
+ deleteCachedValue(this.#store, this.#cacheKey);
17150
+ }
16803
17151
  return downstreamOnHeaders();
16804
17152
  }
16805
17153
  const cacheControlDirectives = cacheControlHeader ? parseCacheControlHeader(cacheControlHeader) : {};
16806
17154
  if (!canCacheResponse(this.#cacheType, statusCode, resHeaders, cacheControlDirectives, this.#cacheKey.headers)) {
17155
+ if (statusCode === 304 && (cacheControlHeader || revalidationResponseDisallowsCachedReuse(this.#cacheType, resHeaders, cacheControlDirectives))) {
17156
+ deleteCachedValue(this.#store, this.#cacheKey);
17157
+ }
16807
17158
  return downstreamOnHeaders();
16808
17159
  }
16809
17160
  const now = Date.now();
16810
- const resAge = resHeaders.age ? getAge(resHeaders.age) : void 0;
16811
- if (resAge && resAge >= MAX_RESPONSE_AGE) {
17161
+ const resAge = Object.hasOwn(resHeaders, "age") ? getAge(resHeaders.age) : void 0;
17162
+ if (resAge !== void 0 && resAge >= MAX_RESPONSE_AGE) {
17163
+ deleteCachedValueIfNotModified(statusCode, this.#store, this.#cacheKey);
17164
+ return downstreamOnHeaders();
17165
+ }
17166
+ const resDate = Object.hasOwn(resHeaders, "date") ? getDate(resHeaders.date) : void 0;
17167
+ if (resDate === null) {
17168
+ deleteCachedValueIfNotModified(statusCode, this.#store, this.#cacheKey);
16812
17169
  return downstreamOnHeaders();
16813
17170
  }
16814
- const resDate = typeof resHeaders.date === "string" ? parseHttpDate(resHeaders.date) : void 0;
17171
+ const apparentAge = resDate ? Math.max(0, now - resDate.getTime()) : 0;
17172
+ const currentAge = Math.max(apparentAge, resAge ?? 0);
16815
17173
  const staleAt = determineStaleAt(this.#cacheType, now, resAge, resHeaders, resDate, cacheControlDirectives) ?? this.#cacheByDefault;
16816
- if (staleAt === void 0 || resAge && resAge > staleAt) {
17174
+ if (staleAt === void 0 || currentAge >= staleAt) {
17175
+ if (cacheControlHeader || staleAt !== void 0) {
17176
+ deleteCachedValueIfNotModified(statusCode, this.#store, this.#cacheKey);
17177
+ }
16817
17178
  return downstreamOnHeaders();
16818
17179
  }
16819
- const baseTime = resDate ? resDate.getTime() : now;
17180
+ const baseTime = now - currentAge;
16820
17181
  const absoluteStaleAt = staleAt + baseTime;
16821
17182
  if (now >= absoluteStaleAt) {
17183
+ deleteCachedValueIfNotModified(statusCode, this.#store, this.#cacheKey);
16822
17184
  return downstreamOnHeaders();
16823
17185
  }
16824
17186
  let varyDirectives;
@@ -16828,7 +17190,8 @@ var require_cache_handler = __commonJS({
16828
17190
  return downstreamOnHeaders();
16829
17191
  }
16830
17192
  }
16831
- const deleteAt = determineDeleteAt(baseTime, cacheControlDirectives, absoluteStaleAt);
17193
+ const cachedAt = baseTime;
17194
+ const deleteAt = determineDeleteAt(baseTime, now, cacheControlDirectives, absoluteStaleAt);
16832
17195
  const strippedHeaders = stripNecessaryHeaders(resHeaders, cacheControlDirectives);
16833
17196
  const value = {
16834
17197
  statusCode,
@@ -16836,7 +17199,7 @@ var require_cache_handler = __commonJS({
16836
17199
  headers: strippedHeaders,
16837
17200
  vary: varyDirectives,
16838
17201
  cacheControlDirectives,
16839
- cachedAt: resAge ? now - resAge : now,
17202
+ cachedAt,
16840
17203
  staleAt: absoluteStaleAt,
16841
17204
  deleteAt
16842
17205
  };
@@ -16848,6 +17211,7 @@ var require_cache_handler = __commonJS({
16848
17211
  value.statusCode = cachedValue.statusCode;
16849
17212
  value.statusMessage = cachedValue.statusMessage;
16850
17213
  value.etag = cachedValue.etag;
17214
+ value.vary = varyDirectives ?? cachedValue.vary;
16851
17215
  value.headers = { ...cachedValue.headers, ...strippedHeaders };
16852
17216
  downstreamOnHeaders();
16853
17217
  this.#writeStream = this.#store.createWriteStream(this.#cacheKey, value);
@@ -16938,11 +17302,28 @@ var require_cache_handler = __commonJS({
16938
17302
  this.#handler.onResponseError?.(controller, err);
16939
17303
  }
16940
17304
  };
17305
+ function deleteCachedValue(store, cacheKey) {
17306
+ try {
17307
+ store.delete(cacheKey)?.catch?.(noop);
17308
+ } catch {
17309
+ }
17310
+ }
17311
+ __name(deleteCachedValue, "deleteCachedValue");
17312
+ function deleteCachedValueIfNotModified(statusCode, store, cacheKey) {
17313
+ if (statusCode === 304) {
17314
+ deleteCachedValue(store, cacheKey);
17315
+ }
17316
+ }
17317
+ __name(deleteCachedValueIfNotModified, "deleteCachedValueIfNotModified");
17318
+ function revalidationResponseDisallowsCachedReuse(cacheType, resHeaders, cacheControlDirectives) {
17319
+ return cacheControlDirectives["no-store"] === true || cacheType === "shared" && cacheControlDirectives.private === true || (resHeaders.vary ? isInvalidOrWildcardVaryHeader(resHeaders.vary) : false);
17320
+ }
17321
+ __name(revalidationResponseDisallowsCachedReuse, "revalidationResponseDisallowsCachedReuse");
16941
17322
  function canCacheResponse(cacheType, statusCode, resHeaders, cacheControlDirectives, reqHeaders) {
16942
- if (statusCode < 200 || NOT_UNDERSTOOD_STATUS_CODES.includes(statusCode)) {
17323
+ if (statusCode < 200 || arrayIncludes(NOT_UNDERSTOOD_STATUS_CODES, statusCode)) {
16943
17324
  return false;
16944
17325
  }
16945
- if (!HEURISTICALLY_CACHEABLE_STATUS_CODES.includes(statusCode) && !resHeaders["expires"] && !cacheControlDirectives.public && cacheControlDirectives["max-age"] === void 0 && // RFC 9111: a private response directive, if the cache is not shared
17326
+ if (!arrayIncludes(HEURISTICALLY_CACHEABLE_STATUS_CODES, statusCode) && !resHeaders["expires"] && !cacheControlDirectives.public && cacheControlDirectives["max-age"] === void 0 && // RFC 9111: a private response directive, if the cache is not shared
16946
17327
  !(cacheControlDirectives.private && cacheType === "private") && !(cacheControlDirectives["s-maxage"] !== void 0 && cacheType === "shared")) {
16947
17328
  return false;
16948
17329
  }
@@ -16952,62 +17333,101 @@ var require_cache_handler = __commonJS({
16952
17333
  if (cacheType === "shared" && cacheControlDirectives.private === true) {
16953
17334
  return false;
16954
17335
  }
16955
- if (resHeaders.vary?.includes("*")) {
17336
+ if (resHeaders.vary && hasVaryStar(resHeaders.vary)) {
16956
17337
  return false;
16957
17338
  }
16958
- if (reqHeaders?.authorization) {
17339
+ if (reqHeaders != null && Object.hasOwn(reqHeaders, "authorization")) {
16959
17340
  if (!cacheControlDirectives.public && !cacheControlDirectives["s-maxage"] && !cacheControlDirectives["must-revalidate"]) {
16960
17341
  return false;
16961
17342
  }
16962
17343
  if (typeof reqHeaders.authorization !== "string") {
16963
17344
  return false;
16964
17345
  }
16965
- if (Array.isArray(cacheControlDirectives["no-cache"]) && cacheControlDirectives["no-cache"].includes("authorization")) {
17346
+ if (Array.isArray(cacheControlDirectives["no-cache"]) && arrayIncludes(cacheControlDirectives["no-cache"], "authorization")) {
16966
17347
  return false;
16967
17348
  }
16968
- if (Array.isArray(cacheControlDirectives["private"]) && cacheControlDirectives["private"].includes("authorization")) {
17349
+ if (Array.isArray(cacheControlDirectives["private"]) && arrayIncludes(cacheControlDirectives["private"], "authorization")) {
16969
17350
  return false;
16970
17351
  }
16971
17352
  }
16972
17353
  return true;
16973
17354
  }
16974
17355
  __name(canCacheResponse, "canCacheResponse");
17356
+ function getDate(dateHeader) {
17357
+ let dateValue = dateHeader;
17358
+ if (Array.isArray(dateValue)) {
17359
+ if (dateValue.length !== 1) {
17360
+ return null;
17361
+ }
17362
+ dateValue = dateValue[0];
17363
+ }
17364
+ if (typeof dateValue !== "string") {
17365
+ return null;
17366
+ }
17367
+ return parseHttpDate(dateValue);
17368
+ }
17369
+ __name(getDate, "getDate");
16975
17370
  function getAge(ageHeader) {
16976
- const age = parseInt(Array.isArray(ageHeader) ? ageHeader[0] : ageHeader);
16977
- return isNaN(age) ? void 0 : age * 1e3;
17371
+ let ageValue = ageHeader;
17372
+ if (Array.isArray(ageValue)) {
17373
+ if (ageValue.length !== 1) {
17374
+ return MAX_RESPONSE_AGE;
17375
+ }
17376
+ ageValue = ageValue[0];
17377
+ }
17378
+ if (typeof ageValue !== "string" || !/^[\t ]*[0-9]+[\t ]*$/.test(ageValue)) {
17379
+ return MAX_RESPONSE_AGE;
17380
+ }
17381
+ const age = BigInt(ageValue.replace(/^[\t ]+|[\t ]+$/g, ""));
17382
+ if (age >= BigInt(MAX_RESPONSE_AGE / 1e3)) {
17383
+ return MAX_RESPONSE_AGE;
17384
+ }
17385
+ return Number(age) * 1e3;
16978
17386
  }
16979
17387
  __name(getAge, "getAge");
16980
17388
  function determineStaleAt(cacheType, now, age, resHeaders, responseDate, cacheControlDirectives) {
16981
17389
  if (cacheType === "shared") {
17390
+ if (hasInvalidCacheControlDirective(cacheControlDirectives, "s-maxage")) {
17391
+ return 0;
17392
+ }
16982
17393
  const sMaxAge = cacheControlDirectives["s-maxage"];
16983
17394
  if (sMaxAge !== void 0) {
16984
- return sMaxAge > 0 ? sMaxAge * 1e3 : void 0;
17395
+ return sMaxAge * 1e3;
16985
17396
  }
16986
17397
  }
17398
+ if (hasInvalidCacheControlDirective(cacheControlDirectives, "max-age")) {
17399
+ return 0;
17400
+ }
16987
17401
  const maxAge = cacheControlDirectives["max-age"];
16988
17402
  if (maxAge !== void 0) {
16989
- return maxAge > 0 ? maxAge * 1e3 : void 0;
17403
+ return maxAge * 1e3;
16990
17404
  }
16991
- if (typeof resHeaders.expires === "string") {
17405
+ if (Object.hasOwn(resHeaders, "expires")) {
17406
+ if (typeof resHeaders.expires !== "string") {
17407
+ return 0;
17408
+ }
16992
17409
  const expiresDate = parseHttpDate(resHeaders.expires);
16993
- if (expiresDate) {
16994
- if (now >= expiresDate.getTime()) {
16995
- return void 0;
17410
+ if (!expiresDate) {
17411
+ return 0;
17412
+ }
17413
+ if (now >= expiresDate.getTime()) {
17414
+ return 0;
17415
+ }
17416
+ if (responseDate) {
17417
+ if (responseDate >= expiresDate) {
17418
+ return 0;
16996
17419
  }
16997
- if (responseDate) {
16998
- if (responseDate >= expiresDate) {
16999
- return void 0;
17000
- }
17001
- if (age !== void 0 && age > expiresDate - responseDate) {
17002
- return void 0;
17003
- }
17420
+ const freshnessLifetime = expiresDate.getTime() - responseDate.getTime();
17421
+ if (age !== void 0 && age >= freshnessLifetime) {
17422
+ return 0;
17004
17423
  }
17005
- return expiresDate.getTime() - now;
17424
+ return freshnessLifetime;
17006
17425
  }
17426
+ return expiresDate.getTime() - now;
17007
17427
  }
17008
17428
  if (typeof resHeaders["last-modified"] === "string") {
17009
- const lastModified = new Date(resHeaders["last-modified"]);
17010
- if (isValidDate(lastModified)) {
17429
+ const lastModified = parseHttpDate(resHeaders["last-modified"]);
17430
+ if (lastModified) {
17011
17431
  if (lastModified.getTime() >= now) {
17012
17432
  return void 0;
17013
17433
  }
@@ -17016,12 +17436,12 @@ var require_cache_handler = __commonJS({
17016
17436
  }
17017
17437
  }
17018
17438
  if (cacheControlDirectives.immutable) {
17019
- return 31536e3;
17439
+ return 31536e6;
17020
17440
  }
17021
17441
  return void 0;
17022
17442
  }
17023
17443
  __name(determineStaleAt, "determineStaleAt");
17024
- function determineDeleteAt(now, cacheControlDirectives, staleAt) {
17444
+ function determineDeleteAt(baseTime, cachedAt, cacheControlDirectives, staleAt) {
17025
17445
  let staleWhileRevalidate = -Infinity;
17026
17446
  let staleIfError = -Infinity;
17027
17447
  let immutable = -Infinity;
@@ -17032,11 +17452,12 @@ var require_cache_handler = __commonJS({
17032
17452
  staleIfError = staleAt + cacheControlDirectives["stale-if-error"] * 1e3;
17033
17453
  }
17034
17454
  if (cacheControlDirectives.immutable && staleWhileRevalidate === -Infinity && staleIfError === -Infinity) {
17035
- immutable = now + 31536e6;
17455
+ immutable = cachedAt + 31536e6;
17036
17456
  }
17037
17457
  if (staleWhileRevalidate === -Infinity && staleIfError === -Infinity && immutable === -Infinity) {
17038
- const freshnessLifetime = staleAt - now;
17039
- return staleAt + freshnessLifetime;
17458
+ const freshnessLifetime = staleAt - baseTime;
17459
+ const datePrecisionPadding = Math.min(Math.max(cachedAt - baseTime, 0), 1e3);
17460
+ return staleAt + freshnessLifetime + datePrecisionPadding;
17040
17461
  }
17041
17462
  return Math.max(staleAt, staleWhileRevalidate, staleIfError, immutable);
17042
17463
  }
@@ -17055,11 +17476,7 @@ var require_cache_handler = __commonJS({
17055
17476
  "age"
17056
17477
  ];
17057
17478
  if (resHeaders["connection"]) {
17058
- if (Array.isArray(resHeaders["connection"])) {
17059
- headersToRemove.push(...resHeaders["connection"].map((header) => header.trim()));
17060
- } else {
17061
- headersToRemove.push(...resHeaders["connection"].split(",").map((header) => header.trim()));
17062
- }
17479
+ appendConnectionHeaderTokens(headersToRemove, resHeaders["connection"]);
17063
17480
  }
17064
17481
  if (Array.isArray(cacheControlDirectives["no-cache"])) {
17065
17482
  headersToRemove.push(...cacheControlDirectives["no-cache"]);
@@ -17069,7 +17486,7 @@ var require_cache_handler = __commonJS({
17069
17486
  }
17070
17487
  let strippedHeaders;
17071
17488
  for (const headerName of headersToRemove) {
17072
- if (resHeaders[headerName]) {
17489
+ if (Object.hasOwn(resHeaders, headerName)) {
17073
17490
  strippedHeaders ??= { ...resHeaders };
17074
17491
  delete strippedHeaders[headerName];
17075
17492
  }
@@ -17077,17 +17494,13 @@ var require_cache_handler = __commonJS({
17077
17494
  return strippedHeaders ?? resHeaders;
17078
17495
  }
17079
17496
  __name(stripNecessaryHeaders, "stripNecessaryHeaders");
17080
- function isValidDate(date) {
17081
- return date instanceof Date && Number.isFinite(date.valueOf());
17082
- }
17083
- __name(isValidDate, "isValidDate");
17084
17497
  module.exports = CacheHandler;
17085
17498
  }
17086
17499
  });
17087
17500
 
17088
- // packages/cli/node_modules/undici/lib/cache/memory-cache-store.js
17501
+ // node_modules/undici/lib/cache/memory-cache-store.js
17089
17502
  var require_memory_cache_store = __commonJS({
17090
- "packages/cli/node_modules/undici/lib/cache/memory-cache-store.js"(exports, module) {
17503
+ "node_modules/undici/lib/cache/memory-cache-store.js"(exports, module) {
17091
17504
  "use strict";
17092
17505
  init_esbuild_shims();
17093
17506
  var { Writable } = __require("node:stream");
@@ -17255,21 +17668,54 @@ var require_memory_cache_store = __commonJS({
17255
17668
  }
17256
17669
  };
17257
17670
  function findEntry(key, entries, now) {
17258
- return entries.find((entry) => entry.deleteAt > now && entry.method === key.method && (entry.vary == null || Object.keys(entry.vary).every((headerName) => {
17259
- if (entry.vary[headerName] === null) {
17260
- return key.headers[headerName] === void 0;
17671
+ for (let i = 0; i < entries.length; i++) {
17672
+ const entry = entries[i];
17673
+ if (entry.deleteAt > now && entry.method === key.method && varyMatches(key, entry)) {
17674
+ return entry;
17261
17675
  }
17262
- return entry.vary[headerName] === key.headers[headerName];
17263
- })));
17676
+ }
17264
17677
  }
17265
17678
  __name(findEntry, "findEntry");
17679
+ function varyMatches(key, entry) {
17680
+ if (entry.vary == null) {
17681
+ return true;
17682
+ }
17683
+ for (const headerName in entry.vary) {
17684
+ if (Object.hasOwn(entry.vary, headerName) && !headerValueEquals(key.headers?.[headerName], entry.vary[headerName])) {
17685
+ return false;
17686
+ }
17687
+ }
17688
+ return true;
17689
+ }
17690
+ __name(varyMatches, "varyMatches");
17691
+ function headerValueEquals(lhs, rhs) {
17692
+ if (lhs == null && rhs == null) {
17693
+ return true;
17694
+ }
17695
+ if (lhs == null && rhs != null || lhs != null && rhs == null) {
17696
+ return false;
17697
+ }
17698
+ if (Array.isArray(lhs) && Array.isArray(rhs)) {
17699
+ if (lhs.length !== rhs.length) {
17700
+ return false;
17701
+ }
17702
+ for (let i = 0; i < lhs.length; i++) {
17703
+ if (lhs[i] !== rhs[i]) {
17704
+ return false;
17705
+ }
17706
+ }
17707
+ return true;
17708
+ }
17709
+ return lhs === rhs;
17710
+ }
17711
+ __name(headerValueEquals, "headerValueEquals");
17266
17712
  module.exports = MemoryCacheStore;
17267
17713
  }
17268
17714
  });
17269
17715
 
17270
- // packages/cli/node_modules/undici/lib/handler/cache-revalidation-handler.js
17716
+ // node_modules/undici/lib/handler/cache-revalidation-handler.js
17271
17717
  var require_cache_revalidation_handler = __commonJS({
17272
- "packages/cli/node_modules/undici/lib/handler/cache-revalidation-handler.js"(exports, module) {
17718
+ "node_modules/undici/lib/handler/cache-revalidation-handler.js"(exports, module) {
17273
17719
  "use strict";
17274
17720
  init_esbuild_shims();
17275
17721
  var assert = __require("node:assert");
@@ -17279,7 +17725,7 @@ var require_cache_revalidation_handler = __commonJS({
17279
17725
  }
17280
17726
  #successful = false;
17281
17727
  /**
17282
- * @type {((boolean, any) => void) | null}
17728
+ * @type {((success: boolean, context?: any, statusCode?: number, headers?: import('../../types/header.d.ts').IncomingHttpHeaders) => void) | null}
17283
17729
  */
17284
17730
  #callback;
17285
17731
  /**
@@ -17292,7 +17738,7 @@ var require_cache_revalidation_handler = __commonJS({
17292
17738
  */
17293
17739
  #allowErrorStatusCodes;
17294
17740
  /**
17295
- * @param {(boolean) => void} callback Function to call if the cached value is valid
17741
+ * @param {(success: boolean, context?: any, statusCode?: number, headers?: import('../../types/header.d.ts').IncomingHttpHeaders) => void} callback Function to call if the cached value is valid
17296
17742
  * @param {import('../../types/dispatcher.d.ts').default.DispatchHandlers} handler
17297
17743
  * @param {boolean} allowErrorStatusCodes
17298
17744
  */
@@ -17314,7 +17760,7 @@ var require_cache_revalidation_handler = __commonJS({
17314
17760
  onResponseStart(controller, statusCode, headers, statusMessage) {
17315
17761
  assert(this.#callback != null);
17316
17762
  this.#successful = statusCode === 304 || this.#allowErrorStatusCodes && statusCode >= 500 && statusCode <= 504;
17317
- this.#callback(this.#successful, this.#context);
17763
+ this.#callback(this.#successful, this.#context, statusCode, headers);
17318
17764
  this.#callback = null;
17319
17765
  if (this.#successful) {
17320
17766
  return true;
@@ -17358,9 +17804,9 @@ var require_cache_revalidation_handler = __commonJS({
17358
17804
  }
17359
17805
  });
17360
17806
 
17361
- // packages/cli/node_modules/undici/lib/interceptor/cache.js
17807
+ // node_modules/undici/lib/interceptor/cache.js
17362
17808
  var require_cache2 = __commonJS({
17363
- "packages/cli/node_modules/undici/lib/interceptor/cache.js"(exports, module) {
17809
+ "node_modules/undici/lib/interceptor/cache.js"(exports, module) {
17364
17810
  "use strict";
17365
17811
  init_esbuild_shims();
17366
17812
  var assert = __require("node:assert");
@@ -17369,8 +17815,9 @@ var require_cache2 = __commonJS({
17369
17815
  var CacheHandler = require_cache_handler();
17370
17816
  var MemoryCacheStore = require_memory_cache_store();
17371
17817
  var CacheRevalidationHandler = require_cache_revalidation_handler();
17372
- var { assertCacheStore, assertCacheMethods, makeCacheKey, normalizeHeaders, parseCacheControlHeader } = require_cache();
17818
+ var { assertCacheStore, assertCacheMethods, makeCacheKey, normalizeHeaders, parseCacheControlHeader, isInvalidOrWildcardVaryHeader } = require_cache();
17373
17819
  var { AbortError } = require_errors();
17820
+ var { parseHttpDate } = require_date();
17374
17821
  function assertCacheOrigins(origins, name) {
17375
17822
  if (origins === void 0) return;
17376
17823
  if (!Array.isArray(origins)) {
@@ -17386,6 +17833,40 @@ var require_cache2 = __commonJS({
17386
17833
  __name(assertCacheOrigins, "assertCacheOrigins");
17387
17834
  var nop = /* @__PURE__ */ __name(() => {
17388
17835
  }, "nop");
17836
+ function trimOWS(value) {
17837
+ return value.replace(/^[\t ]+|[\t ]+$/g, "");
17838
+ }
17839
+ __name(trimOWS, "trimOWS");
17840
+ function arrayIncludes(array, value) {
17841
+ for (let i = 0; i < array.length; i++) {
17842
+ if (array[i] === value) {
17843
+ return true;
17844
+ }
17845
+ }
17846
+ return false;
17847
+ }
17848
+ __name(arrayIncludes, "arrayIncludes");
17849
+ function hasPragmaNoCache(headers) {
17850
+ const pragma = headers?.pragma;
17851
+ if (!pragma) {
17852
+ return false;
17853
+ }
17854
+ const values = Array.isArray(pragma) ? pragma : [pragma];
17855
+ for (let i = 0; i < values.length; i++) {
17856
+ const value = values[i];
17857
+ if (typeof value !== "string") {
17858
+ continue;
17859
+ }
17860
+ const directives = value.split(",");
17861
+ for (let j = 0; j < directives.length; j++) {
17862
+ if (trimOWS(directives[j]).toLowerCase() === "no-cache") {
17863
+ return true;
17864
+ }
17865
+ }
17866
+ }
17867
+ return false;
17868
+ }
17869
+ __name(hasPragmaNoCache, "hasPragmaNoCache");
17389
17870
  function needsRevalidation(result, cacheControlDirectives, { headers = {} }) {
17390
17871
  if (cacheControlDirectives?.["no-cache"]) {
17391
17872
  return true;
@@ -17399,10 +17880,64 @@ var require_cache2 = __commonJS({
17399
17880
  return false;
17400
17881
  }
17401
17882
  __name(needsRevalidation, "needsRevalidation");
17402
- function isStale(result, cacheControlDirectives) {
17883
+ function staleResponseRequiresRevalidation(result, cacheType) {
17884
+ return result.cacheControlDirectives?.["must-revalidate"] === true || cacheType === "shared" && (result.cacheControlDirectives?.["proxy-revalidate"] === true || // https://www.rfc-editor.org/rfc/rfc9111.html#section-5.2.2.10
17885
+ // s-maxage implies proxy-revalidate for shared caches.
17886
+ result.cacheControlDirectives?.["s-maxage"] !== void 0);
17887
+ }
17888
+ __name(staleResponseRequiresRevalidation, "staleResponseRequiresRevalidation");
17889
+ function revalidationResponseDisallowsCachedReuse(cacheType, headers) {
17890
+ if (headers.vary && isInvalidOrWildcardVaryHeader(headers.vary)) {
17891
+ return true;
17892
+ }
17893
+ const cacheControl = headers["cache-control"];
17894
+ if (!cacheControl) {
17895
+ return false;
17896
+ }
17897
+ const cacheControlDirectives = parseCacheControlHeader(cacheControl);
17898
+ return cacheControlDirectives["no-store"] === true || cacheType === "shared" && cacheControlDirectives.private === true;
17899
+ }
17900
+ __name(revalidationResponseDisallowsCachedReuse, "revalidationResponseDisallowsCachedReuse");
17901
+ function revalidationResponseUpdatesCacheControl(headers) {
17902
+ return headers["cache-control"] !== void 0;
17903
+ }
17904
+ __name(revalidationResponseUpdatesCacheControl, "revalidationResponseUpdatesCacheControl");
17905
+ function deleteCachedValue(store, cacheKey) {
17906
+ try {
17907
+ store.delete(cacheKey)?.catch?.(nop);
17908
+ } catch {
17909
+ }
17910
+ }
17911
+ __name(deleteCachedValue, "deleteCachedValue");
17912
+ function getUsableLastModified(headers) {
17913
+ const lastModified = headers?.["last-modified"];
17914
+ if (typeof lastModified === "string" && parseHttpDate(lastModified)) {
17915
+ return lastModified;
17916
+ }
17917
+ }
17918
+ __name(getUsableLastModified, "getUsableLastModified");
17919
+ function makeRevalidationHeaders(opts, result) {
17920
+ const headers = {
17921
+ ...opts.headers,
17922
+ "if-modified-since": getUsableLastModified(result.headers) ?? new Date(result.cachedAt).toUTCString()
17923
+ };
17924
+ if (result.etag) {
17925
+ headers["if-none-match"] = result.etag;
17926
+ }
17927
+ if (result.vary) {
17928
+ for (const key in result.vary) {
17929
+ if (result.vary[key] != null) {
17930
+ headers[key] = result.vary[key];
17931
+ }
17932
+ }
17933
+ }
17934
+ return headers;
17935
+ }
17936
+ __name(makeRevalidationHeaders, "makeRevalidationHeaders");
17937
+ function isStale(result, cacheControlDirectives, cacheType) {
17403
17938
  const now = Date.now();
17404
17939
  if (now > result.staleAt) {
17405
- if (cacheControlDirectives?.["max-stale"]) {
17940
+ if (!staleResponseRequiresRevalidation(result, cacheType) && cacheControlDirectives?.["max-stale"]) {
17406
17941
  const gracePeriod = result.staleAt + cacheControlDirectives["max-stale"] * 1e3;
17407
17942
  return now > gracePeriod;
17408
17943
  }
@@ -17416,9 +17951,9 @@ var require_cache2 = __commonJS({
17416
17951
  return false;
17417
17952
  }
17418
17953
  __name(isStale, "isStale");
17419
- function withinStaleWhileRevalidateWindow(result) {
17954
+ function withinStaleWhileRevalidateWindow(result, cacheType) {
17420
17955
  const staleWhileRevalidate = result.cacheControlDirectives?.["stale-while-revalidate"];
17421
- if (!staleWhileRevalidate) {
17956
+ if (!staleWhileRevalidate || staleResponseRequiresRevalidation(result, cacheType)) {
17422
17957
  return false;
17423
17958
  }
17424
17959
  const now = Date.now();
@@ -17521,32 +18056,17 @@ var require_cache2 = __commonJS({
17521
18056
  return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler));
17522
18057
  }
17523
18058
  const age = Math.round((now - result.cachedAt) / 1e3);
17524
- if (reqCacheControl?.["max-age"] && age >= reqCacheControl["max-age"]) {
17525
- return dispatch(opts, handler);
17526
- }
17527
- const stale = isStale(result, reqCacheControl);
17528
- const revalidate = needsRevalidation(result, reqCacheControl, opts);
18059
+ const requestMaxAgeExpired = reqCacheControl?.["max-age"] !== void 0 && age >= reqCacheControl["max-age"];
18060
+ const stale = requestMaxAgeExpired || isStale(result, reqCacheControl, globalOpts.type);
18061
+ const revalidate = requestMaxAgeExpired || needsRevalidation(result, reqCacheControl, opts);
17529
18062
  if (stale || revalidate) {
17530
18063
  if (util.isStream(opts.body) && util.bodyLength(opts.body) !== 0) {
17531
18064
  return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler));
17532
18065
  }
17533
- if (!revalidate && withinStaleWhileRevalidateWindow(result)) {
18066
+ if (!revalidate && withinStaleWhileRevalidateWindow(result, globalOpts.type)) {
17534
18067
  sendCachedValue(handler, opts, result, age, null, true);
17535
18068
  queueMicrotask(() => {
17536
- const headers2 = {
17537
- ...opts.headers,
17538
- "if-modified-since": new Date(result.cachedAt).toUTCString()
17539
- };
17540
- if (result.etag) {
17541
- headers2["if-none-match"] = result.etag;
17542
- }
17543
- if (result.vary) {
17544
- for (const key in result.vary) {
17545
- if (result.vary[key] != null) {
17546
- headers2[key] = result.vary[key];
17547
- }
17548
- }
17549
- }
18069
+ const headers2 = makeRevalidationHeaders(opts, result);
17550
18070
  dispatch(
17551
18071
  {
17552
18072
  ...opts,
@@ -17572,32 +18092,33 @@ var require_cache2 = __commonJS({
17572
18092
  return true;
17573
18093
  }
17574
18094
  let withinStaleIfErrorThreshold = false;
17575
- const staleIfErrorExpiry = result.cacheControlDirectives["stale-if-error"] ?? reqCacheControl?.["stale-if-error"];
17576
- if (staleIfErrorExpiry) {
17577
- withinStaleIfErrorThreshold = now < result.staleAt + staleIfErrorExpiry * 1e3;
17578
- }
17579
- const headers = {
17580
- ...opts.headers,
17581
- "if-modified-since": new Date(result.cachedAt).toUTCString()
17582
- };
17583
- if (result.etag) {
17584
- headers["if-none-match"] = result.etag;
17585
- }
17586
- if (result.vary) {
17587
- for (const key in result.vary) {
17588
- if (result.vary[key] != null) {
17589
- headers[key] = result.vary[key];
17590
- }
18095
+ if (!staleResponseRequiresRevalidation(result, globalOpts.type)) {
18096
+ const staleIfErrorExpiry = result.cacheControlDirectives["stale-if-error"] ?? reqCacheControl?.["stale-if-error"];
18097
+ if (staleIfErrorExpiry) {
18098
+ withinStaleIfErrorThreshold = now < result.staleAt + staleIfErrorExpiry * 1e3;
17591
18099
  }
17592
18100
  }
18101
+ const headers = makeRevalidationHeaders(opts, result);
17593
18102
  return dispatch(
17594
18103
  {
17595
18104
  ...opts,
17596
18105
  headers
17597
18106
  },
17598
18107
  new CacheRevalidationHandler(
17599
- (success, context) => {
18108
+ (success, context, statusCode, headers2) => {
17600
18109
  if (success) {
18110
+ if (statusCode === 304) {
18111
+ if (revalidationResponseDisallowsCachedReuse(globalOpts.type, headers2)) {
18112
+ if (util.isStream(result.body)) {
18113
+ result.body.on("error", nop).destroy();
18114
+ }
18115
+ deleteCachedValue(globalOpts.store, cacheKey);
18116
+ return dispatch(opts, new CacheHandler(globalOpts, cacheKey, handler));
18117
+ }
18118
+ if (revalidationResponseUpdatesCacheControl(headers2)) {
18119
+ deleteCachedValue(globalOpts.store, cacheKey);
18120
+ }
18121
+ }
17601
18122
  sendCachedValue(handler, opts, result, age, context, stale);
17602
18123
  } else if (util.isStream(result.body)) {
17603
18124
  result.body.on("error", nop).destroy();
@@ -17640,10 +18161,16 @@ var require_cache2 = __commonJS({
17640
18161
  cacheByDefault,
17641
18162
  type
17642
18163
  };
17643
- const safeMethodsToNotCache = util.safeHTTPMethods.filter((method) => methods.includes(method) === false);
18164
+ const safeMethodsToNotCache = [];
18165
+ for (let i = 0; i < util.safeHTTPMethods.length; i++) {
18166
+ const method = util.safeHTTPMethods[i];
18167
+ if (!arrayIncludes(methods, method)) {
18168
+ safeMethodsToNotCache.push(method);
18169
+ }
18170
+ }
17644
18171
  return (dispatch) => {
17645
18172
  return (opts2, handler) => {
17646
- if (!opts2.origin || safeMethodsToNotCache.includes(opts2.method)) {
18173
+ if (!opts2.origin || arrayIncludes(safeMethodsToNotCache, opts2.method)) {
17647
18174
  return dispatch(opts2, handler);
17648
18175
  }
17649
18176
  if (origins !== void 0) {
@@ -17669,7 +18196,7 @@ var require_cache2 = __commonJS({
17669
18196
  ...opts2,
17670
18197
  headers: normalizeHeaders(opts2)
17671
18198
  };
17672
- const reqCacheControl = opts2.headers?.["cache-control"] ? parseCacheControlHeader(opts2.headers["cache-control"]) : void 0;
18199
+ const reqCacheControl = opts2.headers?.["cache-control"] ? parseCacheControlHeader(opts2.headers["cache-control"]) : hasPragmaNoCache(opts2.headers) ? { "no-cache": true } : void 0;
17673
18200
  if (reqCacheControl?.["no-store"]) {
17674
18201
  return dispatch(opts2, handler);
17675
18202
  }
@@ -17702,9 +18229,9 @@ var require_cache2 = __commonJS({
17702
18229
  }
17703
18230
  });
17704
18231
 
17705
- // packages/cli/node_modules/undici/lib/interceptor/decompress.js
18232
+ // node_modules/undici/lib/interceptor/decompress.js
17706
18233
  var require_decompress = __commonJS({
17707
- "packages/cli/node_modules/undici/lib/interceptor/decompress.js"(exports, module) {
18234
+ "node_modules/undici/lib/interceptor/decompress.js"(exports, module) {
17708
18235
  "use strict";
17709
18236
  init_esbuild_shims();
17710
18237
  var { createInflate, createGunzip, createBrotliDecompress, createZstdDecompress } = __require("node:zlib");
@@ -17921,9 +18448,9 @@ var require_decompress = __commonJS({
17921
18448
  }
17922
18449
  });
17923
18450
 
17924
- // packages/cli/node_modules/undici/lib/handler/deduplication-handler.js
18451
+ // node_modules/undici/lib/handler/deduplication-handler.js
17925
18452
  var require_deduplication_handler = __commonJS({
17926
- "packages/cli/node_modules/undici/lib/handler/deduplication-handler.js"(exports, module) {
18453
+ "node_modules/undici/lib/handler/deduplication-handler.js"(exports, module) {
17927
18454
  "use strict";
17928
18455
  init_esbuild_shims();
17929
18456
  var { RequestAbortedError } = require_errors();
@@ -18284,9 +18811,9 @@ var require_deduplication_handler = __commonJS({
18284
18811
  }
18285
18812
  });
18286
18813
 
18287
- // packages/cli/node_modules/undici/lib/interceptor/deduplicate.js
18814
+ // node_modules/undici/lib/interceptor/deduplicate.js
18288
18815
  var require_deduplicate = __commonJS({
18289
- "packages/cli/node_modules/undici/lib/interceptor/deduplicate.js"(exports, module) {
18816
+ "node_modules/undici/lib/interceptor/deduplicate.js"(exports, module) {
18290
18817
  "use strict";
18291
18818
  init_esbuild_shims();
18292
18819
  var diagnosticsChannel = __require("node:diagnostics_channel");
@@ -18370,9 +18897,9 @@ var require_deduplicate = __commonJS({
18370
18897
  }
18371
18898
  });
18372
18899
 
18373
- // packages/cli/node_modules/undici/lib/cache/sqlite-cache-store.js
18900
+ // node_modules/undici/lib/cache/sqlite-cache-store.js
18374
18901
  var require_sqlite_cache_store = __commonJS({
18375
- "packages/cli/node_modules/undici/lib/cache/sqlite-cache-store.js"(exports, module) {
18902
+ "node_modules/undici/lib/cache/sqlite-cache-store.js"(exports, module) {
18376
18903
  "use strict";
18377
18904
  init_esbuild_shims();
18378
18905
  var { Writable } = __require("node:stream");
@@ -18726,7 +19253,12 @@ var require_sqlite_cache_store = __commonJS({
18726
19253
  if (lhs.length !== rhs.length) {
18727
19254
  return false;
18728
19255
  }
18729
- return lhs.every((x, i) => x === rhs[i]);
19256
+ for (let i = 0; i < lhs.length; i++) {
19257
+ if (lhs[i] !== rhs[i]) {
19258
+ return false;
19259
+ }
19260
+ }
19261
+ return true;
18730
19262
  }
18731
19263
  return lhs === rhs;
18732
19264
  }
@@ -18734,9 +19266,9 @@ var require_sqlite_cache_store = __commonJS({
18734
19266
  }
18735
19267
  });
18736
19268
 
18737
- // packages/cli/node_modules/undici/lib/web/fetch/headers.js
19269
+ // node_modules/undici/lib/web/fetch/headers.js
18738
19270
  var require_headers = __commonJS({
18739
- "packages/cli/node_modules/undici/lib/web/fetch/headers.js"(exports, module) {
19271
+ "node_modules/undici/lib/web/fetch/headers.js"(exports, module) {
18740
19272
  "use strict";
18741
19273
  init_esbuild_shims();
18742
19274
  var { kConstruct } = require_symbols();
@@ -19208,9 +19740,9 @@ var require_headers = __commonJS({
19208
19740
  }
19209
19741
  });
19210
19742
 
19211
- // packages/cli/node_modules/undici/lib/web/fetch/response.js
19743
+ // node_modules/undici/lib/web/fetch/response.js
19212
19744
  var require_response = __commonJS({
19213
- "packages/cli/node_modules/undici/lib/web/fetch/response.js"(exports, module) {
19745
+ "node_modules/undici/lib/web/fetch/response.js"(exports, module) {
19214
19746
  "use strict";
19215
19747
  init_esbuild_shims();
19216
19748
  var { Headers, HeadersList, fill, getHeadersGuard, setHeadersGuard, setHeadersList } = require_headers();
@@ -19643,9 +20175,9 @@ var require_response = __commonJS({
19643
20175
  }
19644
20176
  });
19645
20177
 
19646
- // packages/cli/node_modules/undici/lib/web/fetch/request.js
20178
+ // node_modules/undici/lib/web/fetch/request.js
19647
20179
  var require_request2 = __commonJS({
19648
- "packages/cli/node_modules/undici/lib/web/fetch/request.js"(exports, module) {
20180
+ "node_modules/undici/lib/web/fetch/request.js"(exports, module) {
19649
20181
  "use strict";
19650
20182
  init_esbuild_shims();
19651
20183
  var { extractBody, mixinBody, cloneBody, bodyUnusable } = require_body();
@@ -20408,9 +20940,9 @@ var require_request2 = __commonJS({
20408
20940
  }
20409
20941
  });
20410
20942
 
20411
- // packages/cli/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js
20943
+ // node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js
20412
20944
  var require_subresource_integrity = __commonJS({
20413
- "packages/cli/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js"(exports, module) {
20945
+ "node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js"(exports, module) {
20414
20946
  "use strict";
20415
20947
  init_esbuild_shims();
20416
20948
  var assert = __require("node:assert");
@@ -20551,9 +21083,9 @@ var require_subresource_integrity = __commonJS({
20551
21083
  }
20552
21084
  });
20553
21085
 
20554
- // packages/cli/node_modules/undici/lib/web/fetch/index.js
21086
+ // node_modules/undici/lib/web/fetch/index.js
20555
21087
  var require_fetch = __commonJS({
20556
- "packages/cli/node_modules/undici/lib/web/fetch/index.js"(exports, module) {
21088
+ "node_modules/undici/lib/web/fetch/index.js"(exports, module) {
20557
21089
  "use strict";
20558
21090
  init_esbuild_shims();
20559
21091
  var {
@@ -21714,9 +22246,9 @@ var require_fetch = __commonJS({
21714
22246
  }
21715
22247
  });
21716
22248
 
21717
- // packages/cli/node_modules/undici/lib/web/cache/util.js
22249
+ // node_modules/undici/lib/web/cache/util.js
21718
22250
  var require_util3 = __commonJS({
21719
- "packages/cli/node_modules/undici/lib/web/cache/util.js"(exports, module) {
22251
+ "node_modules/undici/lib/web/cache/util.js"(exports, module) {
21720
22252
  "use strict";
21721
22253
  init_esbuild_shims();
21722
22254
  var assert = __require("node:assert");
@@ -21747,9 +22279,9 @@ var require_util3 = __commonJS({
21747
22279
  }
21748
22280
  });
21749
22281
 
21750
- // packages/cli/node_modules/undici/lib/web/cache/cache.js
22282
+ // node_modules/undici/lib/web/cache/cache.js
21751
22283
  var require_cache3 = __commonJS({
21752
- "packages/cli/node_modules/undici/lib/web/cache/cache.js"(exports, module) {
22284
+ "node_modules/undici/lib/web/cache/cache.js"(exports, module) {
21753
22285
  "use strict";
21754
22286
  init_esbuild_shims();
21755
22287
  var assert = __require("node:assert");
@@ -22300,9 +22832,9 @@ var require_cache3 = __commonJS({
22300
22832
  }
22301
22833
  });
22302
22834
 
22303
- // packages/cli/node_modules/undici/lib/web/cache/cachestorage.js
22835
+ // node_modules/undici/lib/web/cache/cachestorage.js
22304
22836
  var require_cachestorage = __commonJS({
22305
- "packages/cli/node_modules/undici/lib/web/cache/cachestorage.js"(exports, module) {
22837
+ "node_modules/undici/lib/web/cache/cachestorage.js"(exports, module) {
22306
22838
  "use strict";
22307
22839
  init_esbuild_shims();
22308
22840
  var { Cache } = require_cache3();
@@ -22414,9 +22946,9 @@ var require_cachestorage = __commonJS({
22414
22946
  }
22415
22947
  });
22416
22948
 
22417
- // packages/cli/node_modules/undici/lib/web/cookies/constants.js
22949
+ // node_modules/undici/lib/web/cookies/constants.js
22418
22950
  var require_constants4 = __commonJS({
22419
- "packages/cli/node_modules/undici/lib/web/cookies/constants.js"(exports, module) {
22951
+ "node_modules/undici/lib/web/cookies/constants.js"(exports, module) {
22420
22952
  "use strict";
22421
22953
  init_esbuild_shims();
22422
22954
  var maxAttributeValueSize = 1024;
@@ -22428,9 +22960,9 @@ var require_constants4 = __commonJS({
22428
22960
  }
22429
22961
  });
22430
22962
 
22431
- // packages/cli/node_modules/undici/lib/web/cookies/util.js
22963
+ // node_modules/undici/lib/web/cookies/util.js
22432
22964
  var require_util4 = __commonJS({
22433
- "packages/cli/node_modules/undici/lib/web/cookies/util.js"(exports, module) {
22965
+ "node_modules/undici/lib/web/cookies/util.js"(exports, module) {
22434
22966
  "use strict";
22435
22967
  init_esbuild_shims();
22436
22968
  function isCTLExcludingHtab(value) {
@@ -22497,15 +23029,50 @@ var require_util4 = __commonJS({
22497
23029
  for (let i = 0; i < path.length; ++i) {
22498
23030
  const code = path.charCodeAt(i);
22499
23031
  if (code < 32 || // exclude CTLs (0-31)
22500
- code === 127 || // DEL
23032
+ code > 126 || // exclude DEL and non-ascii
22501
23033
  code === 59) {
22502
23034
  throw new Error("Invalid cookie path");
22503
23035
  }
22504
23036
  }
22505
23037
  }
22506
23038
  __name(validateCookiePath, "validateCookiePath");
23039
+ function isLetterOrDigit(code) {
23040
+ return code >= 48 && code <= 57 || // 0-9
23041
+ code >= 65 && code <= 90 || // A-Z
23042
+ code >= 97 && code <= 122;
23043
+ }
23044
+ __name(isLetterOrDigit, "isLetterOrDigit");
22507
23045
  function validateCookieDomain(domain) {
22508
- if (domain.startsWith("-") || domain.endsWith(".") || domain.endsWith("-")) {
23046
+ if (domain === " ") {
23047
+ return;
23048
+ }
23049
+ if (domain.length > 255) {
23050
+ throw new Error("Invalid cookie domain");
23051
+ }
23052
+ let labelLength = 0;
23053
+ for (let i = 0; i < domain.length; ++i) {
23054
+ const code = domain.charCodeAt(i);
23055
+ if (code === 46) {
23056
+ if (labelLength === 0) {
23057
+ throw new Error("Invalid cookie domain");
23058
+ }
23059
+ if (domain.charCodeAt(i - 1) === 45) {
23060
+ throw new Error("Invalid cookie domain");
23061
+ }
23062
+ labelLength = 0;
23063
+ continue;
23064
+ }
23065
+ if (labelLength === 0 && !isLetterOrDigit(code)) {
23066
+ throw new Error("Invalid cookie domain");
23067
+ }
23068
+ if (!isLetterOrDigit(code) && code !== 45) {
23069
+ throw new Error("Invalid cookie domain");
23070
+ }
23071
+ if (++labelLength > 63) {
23072
+ throw new Error("Invalid cookie domain");
23073
+ }
23074
+ }
23075
+ if (labelLength === 0 || domain.charCodeAt(domain.length - 1) === 45) {
22509
23076
  throw new Error("Invalid cookie domain");
22510
23077
  }
22511
23078
  }
@@ -22591,7 +23158,11 @@ var require_util4 = __commonJS({
22591
23158
  throw new Error("Invalid unparsed");
22592
23159
  }
22593
23160
  const [key, ...value] = part.split("=");
22594
- out.push(`${key.trim()}=${value.join("=")}`);
23161
+ const trimmedKey = key.trim();
23162
+ const joinedValue = value.join("=");
23163
+ validateCookieName(trimmedKey);
23164
+ validateCookieValue(joinedValue);
23165
+ out.push(`${trimmedKey}=${joinedValue}`);
22595
23166
  }
22596
23167
  return out.join("; ");
22597
23168
  }
@@ -22607,9 +23178,9 @@ var require_util4 = __commonJS({
22607
23178
  }
22608
23179
  });
22609
23180
 
22610
- // packages/cli/node_modules/undici/lib/web/cookies/parse.js
23181
+ // node_modules/undici/lib/web/cookies/parse.js
22611
23182
  var require_parse = __commonJS({
22612
- "packages/cli/node_modules/undici/lib/web/cookies/parse.js"(exports, module) {
23183
+ "node_modules/undici/lib/web/cookies/parse.js"(exports, module) {
22613
23184
  "use strict";
22614
23185
  init_esbuild_shims();
22615
23186
  var { collectASequenceOfCodePointsFast } = require_infra();
@@ -22746,9 +23317,9 @@ var require_parse = __commonJS({
22746
23317
  }
22747
23318
  });
22748
23319
 
22749
- // packages/cli/node_modules/undici/lib/web/cookies/index.js
23320
+ // node_modules/undici/lib/web/cookies/index.js
22750
23321
  var require_cookies = __commonJS({
22751
- "packages/cli/node_modules/undici/lib/web/cookies/index.js"(exports, module) {
23322
+ "node_modules/undici/lib/web/cookies/index.js"(exports, module) {
22752
23323
  "use strict";
22753
23324
  init_esbuild_shims();
22754
23325
  var { parseSetCookie } = require_parse();
@@ -22887,9 +23458,9 @@ var require_cookies = __commonJS({
22887
23458
  }
22888
23459
  });
22889
23460
 
22890
- // packages/cli/node_modules/undici/lib/web/websocket/events.js
23461
+ // node_modules/undici/lib/web/websocket/events.js
22891
23462
  var require_events = __commonJS({
22892
- "packages/cli/node_modules/undici/lib/web/websocket/events.js"(exports, module) {
23463
+ "node_modules/undici/lib/web/websocket/events.js"(exports, module) {
22893
23464
  "use strict";
22894
23465
  init_esbuild_shims();
22895
23466
  var { webidl } = require_webidl();
@@ -23165,9 +23736,9 @@ var require_events = __commonJS({
23165
23736
  }
23166
23737
  });
23167
23738
 
23168
- // packages/cli/node_modules/undici/lib/web/websocket/constants.js
23739
+ // node_modules/undici/lib/web/websocket/constants.js
23169
23740
  var require_constants5 = __commonJS({
23170
- "packages/cli/node_modules/undici/lib/web/websocket/constants.js"(exports, module) {
23741
+ "node_modules/undici/lib/web/websocket/constants.js"(exports, module) {
23171
23742
  "use strict";
23172
23743
  init_esbuild_shims();
23173
23744
  var uid = "258EAFA5-E914-47DA-95CA-C5AB0DC85B11";
@@ -23222,9 +23793,9 @@ var require_constants5 = __commonJS({
23222
23793
  }
23223
23794
  });
23224
23795
 
23225
- // packages/cli/node_modules/undici/lib/web/websocket/util.js
23796
+ // node_modules/undici/lib/web/websocket/util.js
23226
23797
  var require_util5 = __commonJS({
23227
- "packages/cli/node_modules/undici/lib/web/websocket/util.js"(exports, module) {
23798
+ "node_modules/undici/lib/web/websocket/util.js"(exports, module) {
23228
23799
  "use strict";
23229
23800
  init_esbuild_shims();
23230
23801
  var { states, opcodes } = require_constants5();
@@ -23417,9 +23988,9 @@ var require_util5 = __commonJS({
23417
23988
  }
23418
23989
  });
23419
23990
 
23420
- // packages/cli/node_modules/undici/lib/web/websocket/frame.js
23991
+ // node_modules/undici/lib/web/websocket/frame.js
23421
23992
  var require_frame = __commonJS({
23422
- "packages/cli/node_modules/undici/lib/web/websocket/frame.js"(exports, module) {
23993
+ "node_modules/undici/lib/web/websocket/frame.js"(exports, module) {
23423
23994
  "use strict";
23424
23995
  init_esbuild_shims();
23425
23996
  var { runtimeFeatures } = require_runtime_features();
@@ -23527,9 +24098,9 @@ var require_frame = __commonJS({
23527
24098
  }
23528
24099
  });
23529
24100
 
23530
- // packages/cli/node_modules/undici/lib/web/websocket/connection.js
24101
+ // node_modules/undici/lib/web/websocket/connection.js
23531
24102
  var require_connection = __commonJS({
23532
- "packages/cli/node_modules/undici/lib/web/websocket/connection.js"(exports, module) {
24103
+ "node_modules/undici/lib/web/websocket/connection.js"(exports, module) {
23533
24104
  "use strict";
23534
24105
  init_esbuild_shims();
23535
24106
  var { uid, states, sentCloseFrameState, emptyBuffer, opcodes } = require_constants5();
@@ -23687,9 +24258,9 @@ var require_connection = __commonJS({
23687
24258
  }
23688
24259
  });
23689
24260
 
23690
- // packages/cli/node_modules/undici/lib/web/websocket/permessage-deflate.js
24261
+ // node_modules/undici/lib/web/websocket/permessage-deflate.js
23691
24262
  var require_permessage_deflate = __commonJS({
23692
- "packages/cli/node_modules/undici/lib/web/websocket/permessage-deflate.js"(exports, module) {
24263
+ "node_modules/undici/lib/web/websocket/permessage-deflate.js"(exports, module) {
23693
24264
  "use strict";
23694
24265
  init_esbuild_shims();
23695
24266
  var { createInflateRaw, Z_DEFAULT_WINDOWBITS } = __require("node:zlib");
@@ -23772,9 +24343,9 @@ var require_permessage_deflate = __commonJS({
23772
24343
  }
23773
24344
  });
23774
24345
 
23775
- // packages/cli/node_modules/undici/lib/web/websocket/receiver.js
24346
+ // node_modules/undici/lib/web/websocket/receiver.js
23776
24347
  var require_receiver = __commonJS({
23777
- "packages/cli/node_modules/undici/lib/web/websocket/receiver.js"(exports, module) {
24348
+ "node_modules/undici/lib/web/websocket/receiver.js"(exports, module) {
23778
24349
  "use strict";
23779
24350
  init_esbuild_shims();
23780
24351
  var { Writable } = __require("node:stream");
@@ -24135,9 +24706,9 @@ var require_receiver = __commonJS({
24135
24706
  }
24136
24707
  });
24137
24708
 
24138
- // packages/cli/node_modules/undici/lib/web/websocket/sender.js
24709
+ // node_modules/undici/lib/web/websocket/sender.js
24139
24710
  var require_sender = __commonJS({
24140
- "packages/cli/node_modules/undici/lib/web/websocket/sender.js"(exports, module) {
24711
+ "node_modules/undici/lib/web/websocket/sender.js"(exports, module) {
24141
24712
  "use strict";
24142
24713
  init_esbuild_shims();
24143
24714
  var { WebsocketFrameSend } = require_frame();
@@ -24228,9 +24799,9 @@ var require_sender = __commonJS({
24228
24799
  }
24229
24800
  });
24230
24801
 
24231
- // packages/cli/node_modules/undici/lib/web/websocket/websocket.js
24802
+ // node_modules/undici/lib/web/websocket/websocket.js
24232
24803
  var require_websocket = __commonJS({
24233
- "packages/cli/node_modules/undici/lib/web/websocket/websocket.js"(exports, module) {
24804
+ "node_modules/undici/lib/web/websocket/websocket.js"(exports, module) {
24234
24805
  "use strict";
24235
24806
  init_esbuild_shims();
24236
24807
  var { isArrayBuffer } = __require("node:util/types");
@@ -24723,9 +25294,9 @@ var require_websocket = __commonJS({
24723
25294
  }
24724
25295
  });
24725
25296
 
24726
- // packages/cli/node_modules/undici/lib/web/websocket/stream/websocketerror.js
25297
+ // node_modules/undici/lib/web/websocket/stream/websocketerror.js
24727
25298
  var require_websocketerror = __commonJS({
24728
- "packages/cli/node_modules/undici/lib/web/websocket/stream/websocketerror.js"(exports, module) {
25299
+ "node_modules/undici/lib/web/websocket/stream/websocketerror.js"(exports, module) {
24729
25300
  "use strict";
24730
25301
  init_esbuild_shims();
24731
25302
  var { webidl } = require_webidl();
@@ -24811,9 +25382,9 @@ var require_websocketerror = __commonJS({
24811
25382
  }
24812
25383
  });
24813
25384
 
24814
- // packages/cli/node_modules/undici/lib/web/websocket/stream/websocketstream.js
25385
+ // node_modules/undici/lib/web/websocket/stream/websocketstream.js
24815
25386
  var require_websocketstream = __commonJS({
24816
- "packages/cli/node_modules/undici/lib/web/websocket/stream/websocketstream.js"(exports, module) {
25387
+ "node_modules/undici/lib/web/websocket/stream/websocketstream.js"(exports, module) {
24817
25388
  "use strict";
24818
25389
  init_esbuild_shims();
24819
25390
  var { createDeferredPromise } = require_promise();
@@ -25126,9 +25697,9 @@ var require_websocketstream = __commonJS({
25126
25697
  }
25127
25698
  });
25128
25699
 
25129
- // packages/cli/node_modules/undici/lib/web/eventsource/util.js
25700
+ // node_modules/undici/lib/web/eventsource/util.js
25130
25701
  var require_util6 = __commonJS({
25131
- "packages/cli/node_modules/undici/lib/web/eventsource/util.js"(exports, module) {
25702
+ "node_modules/undici/lib/web/eventsource/util.js"(exports, module) {
25132
25703
  "use strict";
25133
25704
  init_esbuild_shims();
25134
25705
  function isValidLastEventId(value) {
@@ -25150,9 +25721,9 @@ var require_util6 = __commonJS({
25150
25721
  }
25151
25722
  });
25152
25723
 
25153
- // packages/cli/node_modules/undici/lib/web/eventsource/eventsource-stream.js
25724
+ // node_modules/undici/lib/web/eventsource/eventsource-stream.js
25154
25725
  var require_eventsource_stream = __commonJS({
25155
- "packages/cli/node_modules/undici/lib/web/eventsource/eventsource-stream.js"(exports, module) {
25726
+ "node_modules/undici/lib/web/eventsource/eventsource-stream.js"(exports, module) {
25156
25727
  "use strict";
25157
25728
  init_esbuild_shims();
25158
25729
  var { Transform } = __require("node:stream");
@@ -25385,9 +25956,9 @@ ${value}`;
25385
25956
  }
25386
25957
  });
25387
25958
 
25388
- // packages/cli/node_modules/undici/lib/web/eventsource/eventsource.js
25959
+ // node_modules/undici/lib/web/eventsource/eventsource.js
25389
25960
  var require_eventsource = __commonJS({
25390
- "packages/cli/node_modules/undici/lib/web/eventsource/eventsource.js"(exports, module) {
25961
+ "node_modules/undici/lib/web/eventsource/eventsource.js"(exports, module) {
25391
25962
  "use strict";
25392
25963
  init_esbuild_shims();
25393
25964
  var { pipeline } = __require("node:stream");
@@ -25706,9 +26277,9 @@ var require_eventsource = __commonJS({
25706
26277
  }
25707
26278
  });
25708
26279
 
25709
- // packages/cli/node_modules/undici/index.js
26280
+ // node_modules/undici/index.js
25710
26281
  var require_undici = __commonJS({
25711
- "packages/cli/node_modules/undici/index.js"(exports, module) {
26282
+ "node_modules/undici/index.js"(exports, module) {
25712
26283
  init_esbuild_shims();
25713
26284
  var Client = require_client();
25714
26285
  var Dispatcher = require_dispatcher();