uomtiles 0.1.3 → 0.1.6

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 (623) hide show
  1. package/.output/nitro.json +1 -1
  2. package/.output/public/_nuxt/87P1vrJx2.js +1 -0
  3. package/.output/public/_nuxt/{BA52uD81.js → B30iI6NY.js} +1 -1
  4. package/.output/public/_nuxt/{CD84FXNW.js → B3Fqmbvs.js} +1 -1
  5. package/.output/public/_nuxt/BhdViME82.js +1 -0
  6. package/.output/public/_nuxt/{D-IOtyQX.js → BryCauXl.js} +1 -1
  7. package/.output/public/_nuxt/{CkfS_Wbu.js → BsG4RgIF.js} +1 -1
  8. package/.output/public/_nuxt/{zUWhKXtw2.js → BvI0Fk652.js} +1 -1
  9. package/.output/public/_nuxt/Bw9ZfIEz.js +1 -0
  10. package/.output/public/_nuxt/BxH0LSKl2.js +1 -0
  11. package/.output/public/_nuxt/{C5Y76DD6.js → C0tXXd_q.js} +1 -1
  12. package/.output/public/_nuxt/{CVwoxklV.js → C3P9RWxN.js} +1 -1
  13. package/.output/public/_nuxt/{D3Us7gX72.js → C9NpqQyG2.js} +1 -1
  14. package/.output/public/_nuxt/CJxz3JZZ2.js +2 -0
  15. package/.output/public/_nuxt/{JdUwgqKv.js → CNw483Zj.js} +1 -1
  16. package/.output/public/_nuxt/{Hbp_Okvs.js → CQoH790U.js} +2 -2
  17. package/.output/public/_nuxt/{D8GHPYwQ.js → CS7MV-ad.js} +4 -4
  18. package/.output/public/_nuxt/{DnVJUY7B.js → CVIKhDCB.js} +1 -1
  19. package/.output/public/_nuxt/{CeHZqNQ0.js → CVfH720g.js} +1 -1
  20. package/.output/public/_nuxt/{DLIy3f3M.js → CZ6SZO_d.js} +1 -1
  21. package/.output/public/_nuxt/{Bpc1HTfh.js → CanHJd1e.js} +1 -1
  22. package/.output/public/_nuxt/CeHFmSjl.js +1 -0
  23. package/.output/public/_nuxt/CeVhOOkF2.js +1 -0
  24. package/.output/public/_nuxt/Cigra9s92.js +1 -0
  25. package/.output/public/_nuxt/{Bh2Uv1S7.js → ClKxITwT.js} +1 -1
  26. package/.output/public/_nuxt/{sMWyPZfC2.js → CsaKOXaj2.js} +1 -1
  27. package/.output/public/_nuxt/{GqgcWtrL.js → CttzcMfv.js} +1 -1
  28. package/.output/public/_nuxt/Cw2siAf_2.js +1 -0
  29. package/.output/public/_nuxt/{DQ8r1OSk.js → DE6808Yp.js} +1 -1
  30. package/.output/public/_nuxt/{CUJ4QmLF.js → DUBSg_Y2.js} +1 -1
  31. package/.output/public/_nuxt/{CxkDmpVY.js → DWmS9_5P.js} +1 -1
  32. package/.output/public/_nuxt/DYM416m_.js +1 -0
  33. package/.output/public/_nuxt/{D_9SjQFe.js → D_SGIxNl.js} +1 -1
  34. package/.output/public/_nuxt/{BHSn2vP72.js → DbaWJJIa2.js} +1 -1
  35. package/.output/public/_nuxt/{C-b4mqsD.js → DjVe4luM.js} +1 -1
  36. package/.output/public/_nuxt/{CoPjdBwX.js → Dv7uv3N72.js} +1 -1
  37. package/.output/public/_nuxt/{CM9IbYJz.js → P5kgsppB.js} +1 -1
  38. package/.output/public/_nuxt/{KttxEAyP2.js → XR4gtbmm.js} +1 -1
  39. package/.output/public/_nuxt/_5p6z8Bm.js +2 -0
  40. package/.output/public/_nuxt/builds/latest.json +1 -1
  41. package/.output/public/_nuxt/builds/meta/98e45168-6e30-460e-aa28-fab54f032a83.json +1 -0
  42. package/.output/public/_nuxt/entry.DaxLd-bD.css +1 -0
  43. package/.output/public/_nuxt/flight-area-analysis.worker-CWQYRs9s.js +26 -0
  44. package/.output/public/_nuxt/hB2w6SMP2.js +64 -0
  45. package/.output/public/_nuxt/hePW80VL.js +1 -0
  46. package/.output/public/_nuxt/maplibre-gl-worker-BtpYDTzw.js +11 -0
  47. package/.output/public/_nuxt/{nearest-area.worker-iSLH0Y_s.js → nearest-area.worker-BYHYA0SF.js} +1 -1
  48. package/.output/public/_nuxt/uomtiles-validation.worker-BTXhap7R.js +2 -0
  49. package/.output/server/chunks/_/antigravity-nfz.mjs +16 -3
  50. package/.output/server/chunks/_/antigravity-nfz.mjs.map +1 -1
  51. package/.output/server/chunks/_/coerce.mjs +8 -0
  52. package/.output/server/chunks/_/coerce.mjs.map +1 -0
  53. package/.output/server/chunks/_/config.mjs +1 -1
  54. package/.output/server/chunks/_/error-500.mjs +2 -2
  55. package/.output/server/chunks/_/error-500.mjs.map +1 -1
  56. package/.output/server/chunks/_/file-workspace.mjs +57 -5
  57. package/.output/server/chunks/_/file-workspace.mjs.map +1 -1
  58. package/.output/server/chunks/_/map-service.mjs +1 -1
  59. package/.output/server/chunks/_/pixel-diff.mjs +1 -1
  60. package/.output/server/{node_modules/consola/dist/chunks → chunks/_}/prompt.mjs +2 -2
  61. package/.output/server/chunks/_/prompt.mjs.map +1 -0
  62. package/.output/server/chunks/_/schemas.mjs +5005 -0
  63. package/.output/server/chunks/_/schemas.mjs.map +1 -0
  64. package/.output/server/{node_modules/@vue/shared/dist/shared.cjs.prod.js → chunks/_/shared.cjs.prod.mjs} +90 -76
  65. package/.output/server/chunks/_/shared.cjs.prod.mjs.map +1 -0
  66. package/.output/server/chunks/_/uom-auth.mjs +42 -5
  67. package/.output/server/chunks/_/uom-auth.mjs.map +1 -1
  68. package/.output/server/chunks/build/{CompletedTaskSelect-Ba03kTs9.mjs → CompletedTaskSelect-nkBeLFh1.mjs} +768 -769
  69. package/.output/server/chunks/build/{CompletedTaskSelect-Ba03kTs9.mjs.map → CompletedTaskSelect-nkBeLFh1.mjs.map} +1 -1
  70. package/.output/server/chunks/build/Empty-Cq-rSwil.mjs +259 -0
  71. package/.output/server/chunks/build/Empty-Cq-rSwil.mjs.map +1 -0
  72. package/.output/server/chunks/build/{interval-i5OZnTaK.mjs → Form-6_bvrptP.mjs} +37 -43
  73. package/.output/server/chunks/build/Form-6_bvrptP.mjs.map +1 -0
  74. package/.output/server/chunks/build/FormField-DJWBDPj5.mjs +246 -0
  75. package/.output/server/chunks/build/FormField-DJWBDPj5.mjs.map +1 -0
  76. package/.output/server/chunks/build/{Input-DnAric-z.mjs → Input-BeUryJZ5.mjs} +67 -68
  77. package/.output/server/chunks/build/Input-BeUryJZ5.mjs.map +1 -0
  78. package/.output/server/chunks/build/{MapLayerControl-DpNmYvcU.mjs → MapLayerControl-DPdRMmuw.mjs} +771 -772
  79. package/.output/server/chunks/build/{MapLayerControl-DpNmYvcU.mjs.map → MapLayerControl-DPdRMmuw.mjs.map} +1 -1
  80. package/.output/server/chunks/build/Modal-BZfMeBGt.mjs +1319 -0
  81. package/.output/server/chunks/build/{Modal-BLhN9Eg2.mjs.map → Modal-BZfMeBGt.mjs.map} +1 -1
  82. package/.output/server/chunks/build/{OnlineMap-B-sCfHkC.mjs → OnlineMap-CYdaIiq1.mjs} +46 -23
  83. package/.output/server/chunks/build/OnlineMap-CYdaIiq1.mjs.map +1 -0
  84. package/.output/server/chunks/build/Pagination-5jGo7sr3.mjs +1024 -0
  85. package/.output/server/chunks/build/{Pagination-CUzoLc_-.mjs.map → Pagination-5jGo7sr3.mjs.map} +1 -1
  86. package/.output/server/chunks/build/{Tabs-cdLsZZoL.mjs → ScrollArea-1y_sQGDj.mjs} +951 -952
  87. package/.output/server/chunks/build/ScrollArea-1y_sQGDj.mjs.map +1 -0
  88. package/.output/server/chunks/build/{Skeleton-CHp-GjOx.mjs → Skeleton-hv0ZqADP.mjs} +10 -11
  89. package/.output/server/chunks/build/{Skeleton-CHp-GjOx.mjs.map → Skeleton-hv0ZqADP.mjs.map} +1 -1
  90. package/.output/server/chunks/build/{Slider-CrIUK3pl.mjs → Slider-DMNQ5v0F.mjs} +150 -151
  91. package/.output/server/chunks/build/{Slider-CrIUK3pl.mjs.map → Slider-DMNQ5v0F.mjs.map} +1 -1
  92. package/.output/server/chunks/build/{Tooltip-DExIlyhu.mjs → Tooltip-Da_m4qTB.mjs} +151 -152
  93. package/.output/server/chunks/build/{Tooltip-DExIlyhu.mjs.map → Tooltip-Da_m4qTB.mjs.map} +1 -1
  94. package/.output/server/chunks/build/advanced-CQaZH879.mjs +5011 -0
  95. package/.output/server/chunks/build/advanced-CQaZH879.mjs.map +1 -0
  96. package/.output/server/chunks/build/{compare-DaE10Dhp.mjs → compare-CXhy8zkR.mjs} +297 -306
  97. package/.output/server/chunks/build/compare-CXhy8zkR.mjs.map +1 -0
  98. package/.output/server/chunks/build/{cookie-CziAmOf1.mjs → cookie-B6O7_fHD.mjs} +6 -6
  99. package/.output/server/chunks/build/{cookie-CziAmOf1.mjs.map → cookie-B6O7_fHD.mjs.map} +1 -1
  100. package/.output/server/chunks/build/dashboard-m7MkDiLb.mjs +3229 -0
  101. package/.output/server/chunks/build/{dashboard-Dq8mphss.mjs.map → dashboard-m7MkDiLb.mjs.map} +1 -1
  102. package/.output/server/chunks/build/{details-DCNvSBgn.mjs → details-BuFz0zbq.mjs} +207 -216
  103. package/.output/server/chunks/build/details-BuFz0zbq.mjs.map +1 -0
  104. package/.output/server/chunks/build/error-404-D9aQjJRn.mjs +12 -21
  105. package/.output/server/chunks/build/error-404-D9aQjJRn.mjs.map +1 -1
  106. package/.output/server/chunks/build/error-500-BNyA3wrb.mjs +8 -17
  107. package/.output/server/chunks/build/error-500-BNyA3wrb.mjs.map +1 -1
  108. package/.output/server/chunks/build/esm-Dp2lJXbp.mjs +10 -10
  109. package/.output/server/chunks/build/esm-Dp2lJXbp.mjs.map +1 -1
  110. package/.output/server/chunks/build/{file-workspace-DMzPuPyG.mjs → file-workspace-C9v6Qocb.mjs} +4 -4
  111. package/.output/server/chunks/build/file-workspace-C9v6Qocb.mjs.map +1 -0
  112. package/.output/server/chunks/build/{layers-50nqoWES.mjs → layers-BXomRZx1.mjs} +107 -116
  113. package/.output/server/chunks/build/layers-BXomRZx1.mjs.map +1 -0
  114. package/.output/server/chunks/build/{login-BHSHtO-R.mjs → login-Bc6Roxwo.mjs} +149 -153
  115. package/.output/server/chunks/build/login-Bc6Roxwo.mjs.map +1 -0
  116. package/.output/server/chunks/build/{map-layers-C3HJoCLw.mjs → map-layers-CTSGZGmW.mjs} +6 -6
  117. package/.output/server/chunks/build/map-layers-CTSGZGmW.mjs.map +1 -0
  118. package/.output/server/chunks/build/{overlay-BS4_B29H.mjs → overlay-LIOZRR0G.mjs} +174 -154
  119. package/.output/server/chunks/build/{overlay-BS4_B29H.mjs.map → overlay-LIOZRR0G.mjs.map} +1 -1
  120. package/.output/server/chunks/build/pages-CBsYYFMD.mjs +210 -0
  121. package/.output/server/chunks/build/pages-CBsYYFMD.mjs.map +1 -0
  122. package/.output/server/chunks/build/{pages-5yYRS5nX.mjs → pages-DN0BdqEU.mjs} +5 -5
  123. package/.output/server/chunks/build/pages-DN0BdqEU.mjs.map +1 -0
  124. package/.output/server/chunks/build/{services-DWlDpsbi.mjs → services-DnEkW3P_.mjs} +255 -264
  125. package/.output/server/chunks/build/{services-DWlDpsbi.mjs.map → services-DnEkW3P_.mjs.map} +1 -1
  126. package/.output/server/chunks/build/{tasks-4b6D39Uy.mjs → tasks-Bbc6_UeW.mjs} +1084 -1084
  127. package/.output/server/chunks/build/{tasks-4b6D39Uy.mjs.map → tasks-Bbc6_UeW.mjs.map} +1 -1
  128. package/.output/server/chunks/build/tasks-BzxHEsMV.mjs +82 -0
  129. package/.output/server/chunks/build/tasks-BzxHEsMV.mjs.map +1 -0
  130. package/.output/server/chunks/nitro/nitro.mjs +1861 -310
  131. package/.output/server/chunks/nitro/nitro.mjs.map +1 -1
  132. package/.output/server/chunks/routes/api/auth/captcha.post.mjs +3 -2
  133. package/.output/server/chunks/routes/api/auth/captcha.post.mjs.map +1 -1
  134. package/.output/server/chunks/routes/api/auth/login.post.mjs +3 -2
  135. package/.output/server/chunks/routes/api/auth/login.post.mjs.map +1 -1
  136. package/.output/server/chunks/routes/api/auth/logout.post.mjs +3 -2
  137. package/.output/server/chunks/routes/api/auth/logout.post.mjs.map +1 -1
  138. package/.output/server/chunks/routes/api/auth/map-token.post.mjs +3 -2
  139. package/.output/server/chunks/routes/api/auth/map-token.post.mjs.map +1 -1
  140. package/.output/server/chunks/routes/api/auth/send-sms.post.mjs +3 -2
  141. package/.output/server/chunks/routes/api/auth/send-sms.post.mjs.map +1 -1
  142. package/.output/server/chunks/routes/api/auth/status.get.mjs +3 -2
  143. package/.output/server/chunks/routes/api/auth/status.get.mjs.map +1 -1
  144. package/.output/server/chunks/routes/api/map/base/_baseLayer/_zoom/_tileX/_tileY_.get.mjs +3 -2
  145. package/.output/server/chunks/routes/api/map/base/_baseLayer/_zoom/_tileX/_tileY_.get.mjs.map +1 -1
  146. package/.output/server/chunks/routes/api/map/base/status.get.mjs +3 -2
  147. package/.output/server/chunks/routes/api/map/base/status.get.mjs.map +1 -1
  148. package/.output/server/chunks/routes/api/map/layers/_overlayLayer/update.get.mjs +3 -2
  149. package/.output/server/chunks/routes/api/map/layers/_overlayLayer/update.get.mjs.map +1 -1
  150. package/.output/server/chunks/routes/api/map/layers/_overlayLayer/update.post.mjs +3 -2
  151. package/.output/server/chunks/routes/api/map/layers/_overlayLayer/update.post.mjs.map +1 -1
  152. package/.output/server/chunks/routes/api/map/layers/_overlayLayer_.get.mjs +3 -2
  153. package/.output/server/chunks/routes/api/map/layers/_overlayLayer_.get.mjs.map +1 -1
  154. package/.output/server/chunks/routes/api/map/layers/status.get.mjs +3 -2
  155. package/.output/server/chunks/routes/api/map/layers/status.get.mjs.map +1 -1
  156. package/.output/server/chunks/routes/api/map/live/status.get.mjs +3 -2
  157. package/.output/server/chunks/routes/api/map/live/status.get.mjs.map +1 -1
  158. package/.output/server/chunks/routes/api/map/online/_layerGroup/_zoom/_tileX/_tileY_.get.mjs +3 -2
  159. package/.output/server/chunks/routes/api/map/online/_layerGroup/_zoom/_tileX/_tileY_.get.mjs.map +1 -1
  160. package/.output/server/chunks/routes/api/map/online-root/_layerGroup/_rootX/_rootY_.get.mjs +3 -2
  161. package/.output/server/chunks/routes/api/map/online-root/_layerGroup/_rootX/_rootY_.get.mjs.map +1 -1
  162. package/.output/server/chunks/routes/api/map-service/config.post.mjs +8 -8
  163. package/.output/server/chunks/routes/api/map-service/config.post.mjs.map +1 -1
  164. package/.output/server/chunks/routes/api/map-service/file.post.mjs +3 -3
  165. package/.output/server/chunks/routes/api/map-service/source.post.mjs +5 -5
  166. package/.output/server/chunks/routes/api/map-service/source.post.mjs.map +1 -1
  167. package/.output/server/chunks/routes/api/map-service/status.get.mjs +3 -3
  168. package/.output/server/chunks/routes/api/uom/myspace.post.mjs +71 -0
  169. package/.output/server/chunks/routes/api/uom/myspace.post.mjs.map +1 -0
  170. package/.output/server/chunks/routes/api/workspace/_filename/analysis.get.mjs +8 -13
  171. package/.output/server/chunks/routes/api/workspace/_filename/analysis.get.mjs.map +1 -1
  172. package/.output/server/chunks/routes/api/workspace/_filename/download.get.mjs +3 -3
  173. package/.output/server/chunks/routes/api/workspace/_filename/export/_format_.get.mjs +8 -7
  174. package/.output/server/chunks/routes/api/workspace/_filename/export/_format_.get.mjs.map +1 -1
  175. package/.output/server/chunks/routes/api/workspace/_filename/export-estimate.get.mjs +9 -8
  176. package/.output/server/chunks/routes/api/workspace/_filename/export-estimate.get.mjs.map +1 -1
  177. package/.output/server/chunks/routes/api/workspace/_filename/tile.get.mjs +6 -5
  178. package/.output/server/chunks/routes/api/workspace/_filename/tile.get.mjs.map +1 -1
  179. package/.output/server/chunks/routes/api/workspace/_filename/tiles.get.mjs +7 -6
  180. package/.output/server/chunks/routes/api/workspace/_filename/tiles.get.mjs.map +1 -1
  181. package/.output/server/chunks/routes/api/workspace/_filename_.delete.mjs +3 -3
  182. package/.output/server/chunks/routes/api/workspace/compare/batch.get.mjs +10 -9
  183. package/.output/server/chunks/routes/api/workspace/compare/batch.get.mjs.map +1 -1
  184. package/.output/server/chunks/routes/api/workspace/compare.post.mjs +5 -5
  185. package/.output/server/chunks/routes/api/workspace/compare.post.mjs.map +1 -1
  186. package/.output/server/chunks/routes/api/workspace/fetch.post.mjs +5 -5
  187. package/.output/server/chunks/routes/api/workspace/fetch.post.mjs.map +1 -1
  188. package/.output/server/chunks/routes/api/workspace/files.get.mjs +3 -3
  189. package/.output/server/chunks/routes/api/workspace/files.post.mjs +4 -4
  190. package/.output/server/chunks/routes/api/workspace/stop.post.mjs +6 -6
  191. package/.output/server/chunks/routes/api/workspace/stop.post.mjs.map +1 -1
  192. package/.output/server/chunks/routes/api/workspace/tasks.post.mjs +6 -6
  193. package/.output/server/chunks/routes/api/workspace/tasks.post.mjs.map +1 -1
  194. package/.output/server/chunks/routes/renderer.mjs +42597 -155
  195. package/.output/server/chunks/routes/renderer.mjs.map +1 -1
  196. package/.output/server/chunks/routes/services/wms.get.mjs +14 -13
  197. package/.output/server/chunks/routes/services/wms.get.mjs.map +1 -1
  198. package/.output/server/chunks/routes/services/wmts.get.mjs +14 -13
  199. package/.output/server/chunks/routes/services/wmts.get.mjs.map +1 -1
  200. package/.output/server/chunks/virtual/entry.mjs +1317 -1136
  201. package/.output/server/chunks/virtual/entry.mjs.map +1 -1
  202. package/.output/server/chunks/virtual/precomputed.mjs +1 -1
  203. package/.output/server/index.mjs +4 -3
  204. package/.output/server/index.mjs.map +1 -1
  205. package/README.md +7 -31
  206. package/dist/package.json +6 -1
  207. package/dist/src/cli.js +4 -3
  208. package/dist/src/core/fetch-process.js +11 -0
  209. package/package.json +6 -1
  210. package/.output/public/_nuxt/7KYNy7kZ.js +0 -1
  211. package/.output/public/_nuxt/7Rgc2iDI2.js +0 -1
  212. package/.output/public/_nuxt/BRsHq3Fz2.js +0 -1
  213. package/.output/public/_nuxt/BiRI-vq-.js +0 -1
  214. package/.output/public/_nuxt/CGkIG2vL2.js +0 -1
  215. package/.output/public/_nuxt/CUQ3MZqI.js +0 -1
  216. package/.output/public/_nuxt/CzRdWh7s2.js +0 -1
  217. package/.output/public/_nuxt/DK3Fl9T5.js +0 -1
  218. package/.output/public/_nuxt/D_Ggu6R_2.js +0 -1
  219. package/.output/public/_nuxt/DuGgjt-h2.js +0 -64
  220. package/.output/public/_nuxt/GEOST6As.js +0 -1
  221. package/.output/public/_nuxt/L0GXeO1Y2.js +0 -1
  222. package/.output/public/_nuxt/builds/meta/ad8f3148-5aa4-4a0f-8e7a-e55147c5de1a.json +0 -1
  223. package/.output/public/_nuxt/entry.U-KS0GEu.css +0 -1
  224. package/.output/public/_nuxt/maplibre-gl-worker.nfnkSQvL.mjs +0 -6
  225. package/.output/server/chunks/build/Empty-CKvANuoV.mjs +0 -260
  226. package/.output/server/chunks/build/Empty-CKvANuoV.mjs.map +0 -1
  227. package/.output/server/chunks/build/FormField-BJHVyy1m.mjs +0 -247
  228. package/.output/server/chunks/build/FormField-BJHVyy1m.mjs.map +0 -1
  229. package/.output/server/chunks/build/Input-DnAric-z.mjs.map +0 -1
  230. package/.output/server/chunks/build/Modal-BLhN9Eg2.mjs +0 -1320
  231. package/.output/server/chunks/build/OnlineMap-B-sCfHkC.mjs.map +0 -1
  232. package/.output/server/chunks/build/Pagination-CUzoLc_-.mjs +0 -1025
  233. package/.output/server/chunks/build/Tabs-cdLsZZoL.mjs.map +0 -1
  234. package/.output/server/chunks/build/advanced-DaSpS8Px.mjs +0 -1426
  235. package/.output/server/chunks/build/advanced-DaSpS8Px.mjs.map +0 -1
  236. package/.output/server/chunks/build/compare-DaE10Dhp.mjs.map +0 -1
  237. package/.output/server/chunks/build/dashboard-Dq8mphss.mjs +0 -3238
  238. package/.output/server/chunks/build/details-DCNvSBgn.mjs.map +0 -1
  239. package/.output/server/chunks/build/file-workspace-DMzPuPyG.mjs.map +0 -1
  240. package/.output/server/chunks/build/interval-i5OZnTaK.mjs.map +0 -1
  241. package/.output/server/chunks/build/layers-50nqoWES.mjs.map +0 -1
  242. package/.output/server/chunks/build/login-BHSHtO-R.mjs.map +0 -1
  243. package/.output/server/chunks/build/map-layers-C3HJoCLw.mjs.map +0 -1
  244. package/.output/server/chunks/build/pages-5yYRS5nX.mjs.map +0 -1
  245. package/.output/server/chunks/build/pages-DfOPr0fC.mjs +0 -219
  246. package/.output/server/chunks/build/pages-DfOPr0fC.mjs.map +0 -1
  247. package/.output/server/chunks/build/tasks-BPPx2UMG.mjs +0 -91
  248. package/.output/server/chunks/build/tasks-BPPx2UMG.mjs.map +0 -1
  249. package/.output/server/node_modules/@babel/parser/lib/index.js +0 -14611
  250. package/.output/server/node_modules/@babel/parser/package.json +0 -50
  251. package/.output/server/node_modules/@iconify/utils/lib/colors/index.js +0 -295
  252. package/.output/server/node_modules/@iconify/utils/lib/colors/keywords.js +0 -701
  253. package/.output/server/node_modules/@iconify/utils/lib/css/common.js +0 -75
  254. package/.output/server/node_modules/@iconify/utils/lib/css/format.js +0 -39
  255. package/.output/server/node_modules/@iconify/utils/lib/css/icon.js +0 -47
  256. package/.output/server/node_modules/@iconify/utils/lib/css/icons.js +0 -128
  257. package/.output/server/node_modules/@iconify/utils/lib/customisations/bool.js +0 -19
  258. package/.output/server/node_modules/@iconify/utils/lib/customisations/defaults.js +0 -13
  259. package/.output/server/node_modules/@iconify/utils/lib/customisations/flip.js +0 -17
  260. package/.output/server/node_modules/@iconify/utils/lib/customisations/merge.js +0 -16
  261. package/.output/server/node_modules/@iconify/utils/lib/customisations/rotate.js +0 -30
  262. package/.output/server/node_modules/@iconify/utils/lib/emoji/cleanup.js +0 -78
  263. package/.output/server/node_modules/@iconify/utils/lib/emoji/convert.js +0 -100
  264. package/.output/server/node_modules/@iconify/utils/lib/emoji/data.js +0 -28
  265. package/.output/server/node_modules/@iconify/utils/lib/emoji/format.js +0 -58
  266. package/.output/server/node_modules/@iconify/utils/lib/emoji/parse.js +0 -48
  267. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/base.js +0 -203
  268. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/create.js +0 -33
  269. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/numbers.js +0 -132
  270. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/similar.js +0 -165
  271. package/.output/server/node_modules/@iconify/utils/lib/emoji/regex/tree.js +0 -79
  272. package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/find.js +0 -92
  273. package/.output/server/node_modules/@iconify/utils/lib/emoji/replace/replace.js +0 -26
  274. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/components.js +0 -76
  275. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/missing.js +0 -66
  276. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/name.js +0 -45
  277. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/parse.js +0 -103
  278. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/similar.js +0 -36
  279. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/tree.js +0 -92
  280. package/.output/server/node_modules/@iconify/utils/lib/emoji/test/variations.js +0 -62
  281. package/.output/server/node_modules/@iconify/utils/lib/icon/defaults.js +0 -25
  282. package/.output/server/node_modules/@iconify/utils/lib/icon/merge.js +0 -16
  283. package/.output/server/node_modules/@iconify/utils/lib/icon/name.js +0 -57
  284. package/.output/server/node_modules/@iconify/utils/lib/icon/square.js +0 -33
  285. package/.output/server/node_modules/@iconify/utils/lib/icon/transformations.js +0 -12
  286. package/.output/server/node_modules/@iconify/utils/lib/icon-set/convert-info.js +0 -125
  287. package/.output/server/node_modules/@iconify/utils/lib/icon-set/expand.js +0 -19
  288. package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icon.js +0 -25
  289. package/.output/server/node_modules/@iconify/utils/lib/icon-set/get-icons.js +0 -36
  290. package/.output/server/node_modules/@iconify/utils/lib/icon-set/minify.js +0 -91
  291. package/.output/server/node_modules/@iconify/utils/lib/icon-set/parse.js +0 -46
  292. package/.output/server/node_modules/@iconify/utils/lib/icon-set/tree.js +0 -23
  293. package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate-basic.js +0 -42
  294. package/.output/server/node_modules/@iconify/utils/lib/icon-set/validate.js +0 -123
  295. package/.output/server/node_modules/@iconify/utils/lib/index.js +0 -52
  296. package/.output/server/node_modules/@iconify/utils/lib/loader/custom.js +0 -30
  297. package/.output/server/node_modules/@iconify/utils/lib/loader/loader.js +0 -26
  298. package/.output/server/node_modules/@iconify/utils/lib/loader/modern.js +0 -27
  299. package/.output/server/node_modules/@iconify/utils/lib/loader/utils.js +0 -105
  300. package/.output/server/node_modules/@iconify/utils/lib/misc/objects.js +0 -26
  301. package/.output/server/node_modules/@iconify/utils/lib/misc/strings.js +0 -26
  302. package/.output/server/node_modules/@iconify/utils/lib/misc/title.js +0 -9
  303. package/.output/server/node_modules/@iconify/utils/lib/svg/build.js +0 -113
  304. package/.output/server/node_modules/@iconify/utils/lib/svg/defs.js +0 -31
  305. package/.output/server/node_modules/@iconify/utils/lib/svg/encode-svg-for-css.js +0 -13
  306. package/.output/server/node_modules/@iconify/utils/lib/svg/html.js +0 -9
  307. package/.output/server/node_modules/@iconify/utils/lib/svg/id.js +0 -41
  308. package/.output/server/node_modules/@iconify/utils/lib/svg/inner-html.js +0 -22
  309. package/.output/server/node_modules/@iconify/utils/lib/svg/parse.js +0 -67
  310. package/.output/server/node_modules/@iconify/utils/lib/svg/pretty.js +0 -54
  311. package/.output/server/node_modules/@iconify/utils/lib/svg/size.js +0 -27
  312. package/.output/server/node_modules/@iconify/utils/lib/svg/trim.js +0 -7
  313. package/.output/server/node_modules/@iconify/utils/lib/svg/url.js +0 -22
  314. package/.output/server/node_modules/@iconify/utils/lib/svg/viewbox.js +0 -8
  315. package/.output/server/node_modules/@iconify/utils/package.json +0 -119
  316. package/.output/server/node_modules/@vue/compiler-core/dist/compiler-core.cjs.prod.js +0 -6801
  317. package/.output/server/node_modules/@vue/compiler-core/package.json +0 -58
  318. package/.output/server/node_modules/@vue/compiler-dom/dist/compiler-dom.cjs.prod.js +0 -692
  319. package/.output/server/node_modules/@vue/compiler-dom/package.json +0 -57
  320. package/.output/server/node_modules/@vue/compiler-ssr/dist/compiler-ssr.cjs.js +0 -1420
  321. package/.output/server/node_modules/@vue/compiler-ssr/package.json +0 -34
  322. package/.output/server/node_modules/@vue/reactivity/dist/reactivity.cjs.prod.js +0 -1903
  323. package/.output/server/node_modules/@vue/reactivity/package.json +0 -55
  324. package/.output/server/node_modules/@vue/runtime-core/dist/runtime-core.cjs.prod.js +0 -6976
  325. package/.output/server/node_modules/@vue/runtime-core/package.json +0 -52
  326. package/.output/server/node_modules/@vue/runtime-dom/dist/runtime-dom.cjs.prod.js +0 -1841
  327. package/.output/server/node_modules/@vue/runtime-dom/package.json +0 -60
  328. package/.output/server/node_modules/@vue/server-renderer/dist/server-renderer.cjs.prod.js +0 -904
  329. package/.output/server/node_modules/@vue/server-renderer/package.json +0 -53
  330. package/.output/server/node_modules/@vue/shared/package.json +0 -47
  331. package/.output/server/node_modules/consola/dist/core.mjs +0 -512
  332. package/.output/server/node_modules/consola/dist/index.mjs +0 -651
  333. package/.output/server/node_modules/consola/dist/shared/consola.DRwqZj3T.mjs +0 -72
  334. package/.output/server/node_modules/consola/dist/shared/consola.DXBYu-KD.mjs +0 -288
  335. package/.output/server/node_modules/consola/package.json +0 -136
  336. package/.output/server/node_modules/devalue/index.js +0 -17
  337. package/.output/server/node_modules/devalue/package.json +0 -39
  338. package/.output/server/node_modules/devalue/src/base64.js +0 -60
  339. package/.output/server/node_modules/devalue/src/constants.js +0 -12
  340. package/.output/server/node_modules/devalue/src/operations.js +0 -193
  341. package/.output/server/node_modules/devalue/src/parse.js +0 -270
  342. package/.output/server/node_modules/devalue/src/stringify.js +0 -428
  343. package/.output/server/node_modules/devalue/src/uneval.js +0 -582
  344. package/.output/server/node_modules/devalue/src/utils.js +0 -185
  345. package/.output/server/node_modules/entities/dist/commonjs/decode-codepoint.js +0 -77
  346. package/.output/server/node_modules/entities/dist/commonjs/decode.js +0 -568
  347. package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-html.js +0 -7
  348. package/.output/server/node_modules/entities/dist/commonjs/generated/decode-data-xml.js +0 -7
  349. package/.output/server/node_modules/entities/dist/commonjs/internal/bin-trie-flags.js +0 -21
  350. package/.output/server/node_modules/entities/dist/commonjs/internal/decode-shared.js +0 -31
  351. package/.output/server/node_modules/entities/dist/commonjs/package.json +0 -3
  352. package/.output/server/node_modules/entities/package.json +0 -120
  353. package/.output/server/node_modules/estree-walker/dist/umd/estree-walker.js +0 -344
  354. package/.output/server/node_modules/estree-walker/package.json +0 -37
  355. package/.output/server/node_modules/fflate/esm/index.mjs +0 -2710
  356. package/.output/server/node_modules/fflate/package.json +0 -128
  357. package/.output/server/node_modules/fnv1a-64/dist/index.mjs +0 -95
  358. package/.output/server/node_modules/fnv1a-64/package.json +0 -75
  359. package/.output/server/node_modules/hookable/dist/index.mjs +0 -257
  360. package/.output/server/node_modules/hookable/package.json +0 -53
  361. package/.output/server/node_modules/nostics/dist/formatters/ansi.mjs +0 -19
  362. package/.output/server/node_modules/nostics/dist/index.mjs +0 -187
  363. package/.output/server/node_modules/nostics/package.json +0 -125
  364. package/.output/server/node_modules/object-identity/index.js +0 -60
  365. package/.output/server/node_modules/object-identity/package.json +0 -40
  366. package/.output/server/node_modules/p-limit/index.js +0 -104
  367. package/.output/server/node_modules/p-limit/package.json +0 -58
  368. package/.output/server/node_modules/pmtiles/dist/esm/index.js +0 -2
  369. package/.output/server/node_modules/pmtiles/package.json +0 -50
  370. package/.output/server/node_modules/source-map-js/lib/array-set.js +0 -121
  371. package/.output/server/node_modules/source-map-js/lib/base64-vlq.js +0 -140
  372. package/.output/server/node_modules/source-map-js/lib/base64.js +0 -67
  373. package/.output/server/node_modules/source-map-js/lib/binary-search.js +0 -111
  374. package/.output/server/node_modules/source-map-js/lib/mapping-list.js +0 -79
  375. package/.output/server/node_modules/source-map-js/lib/quick-sort.js +0 -132
  376. package/.output/server/node_modules/source-map-js/lib/source-map-consumer.js +0 -1188
  377. package/.output/server/node_modules/source-map-js/lib/source-map-generator.js +0 -444
  378. package/.output/server/node_modules/source-map-js/lib/source-node.js +0 -413
  379. package/.output/server/node_modules/source-map-js/lib/util.js +0 -594
  380. package/.output/server/node_modules/source-map-js/package.json +0 -71
  381. package/.output/server/node_modules/source-map-js/source-map.js +0 -8
  382. package/.output/server/node_modules/tailwindcss/dist/chunk-DCG7AFIE.mjs +0 -1
  383. package/.output/server/node_modules/tailwindcss/dist/colors.mjs +0 -1
  384. package/.output/server/node_modules/tailwindcss/package.json +0 -89
  385. package/.output/server/node_modules/ufo/dist/index.mjs +0 -645
  386. package/.output/server/node_modules/ufo/package.json +0 -48
  387. package/.output/server/node_modules/undici/index.js +0 -234
  388. package/.output/server/node_modules/undici/lib/api/abort-signal.js +0 -59
  389. package/.output/server/node_modules/undici/lib/api/api-connect.js +0 -110
  390. package/.output/server/node_modules/undici/lib/api/api-pipeline.js +0 -252
  391. package/.output/server/node_modules/undici/lib/api/api-request.js +0 -214
  392. package/.output/server/node_modules/undici/lib/api/api-stream.js +0 -209
  393. package/.output/server/node_modules/undici/lib/api/api-upgrade.js +0 -111
  394. package/.output/server/node_modules/undici/lib/api/index.js +0 -7
  395. package/.output/server/node_modules/undici/lib/api/readable.js +0 -580
  396. package/.output/server/node_modules/undici/lib/cache/memory-cache-store.js +0 -279
  397. package/.output/server/node_modules/undici/lib/cache/sqlite-cache-store.js +0 -467
  398. package/.output/server/node_modules/undici/lib/core/connect.js +0 -153
  399. package/.output/server/node_modules/undici/lib/core/constants.js +0 -143
  400. package/.output/server/node_modules/undici/lib/core/diagnostics.js +0 -227
  401. package/.output/server/node_modules/undici/lib/core/errors.js +0 -477
  402. package/.output/server/node_modules/undici/lib/core/request.js +0 -464
  403. package/.output/server/node_modules/undici/lib/core/socks5-client.js +0 -422
  404. package/.output/server/node_modules/undici/lib/core/socks5-utils.js +0 -212
  405. package/.output/server/node_modules/undici/lib/core/symbols.js +0 -75
  406. package/.output/server/node_modules/undici/lib/core/tree.js +0 -160
  407. package/.output/server/node_modules/undici/lib/core/util.js +0 -992
  408. package/.output/server/node_modules/undici/lib/dispatcher/agent.js +0 -158
  409. package/.output/server/node_modules/undici/lib/dispatcher/balanced-pool.js +0 -219
  410. package/.output/server/node_modules/undici/lib/dispatcher/client-h1.js +0 -1731
  411. package/.output/server/node_modules/undici/lib/dispatcher/client-h2.js +0 -995
  412. package/.output/server/node_modules/undici/lib/dispatcher/client.js +0 -664
  413. package/.output/server/node_modules/undici/lib/dispatcher/dispatcher-base.js +0 -184
  414. package/.output/server/node_modules/undici/lib/dispatcher/dispatcher.js +0 -48
  415. package/.output/server/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +0 -146
  416. package/.output/server/node_modules/undici/lib/dispatcher/fixed-queue.js +0 -135
  417. package/.output/server/node_modules/undici/lib/dispatcher/h2c-client.js +0 -51
  418. package/.output/server/node_modules/undici/lib/dispatcher/pool-base.js +0 -214
  419. package/.output/server/node_modules/undici/lib/dispatcher/pool.js +0 -118
  420. package/.output/server/node_modules/undici/lib/dispatcher/proxy-agent.js +0 -319
  421. package/.output/server/node_modules/undici/lib/dispatcher/retry-agent.js +0 -35
  422. package/.output/server/node_modules/undici/lib/dispatcher/round-robin-pool.js +0 -137
  423. package/.output/server/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +0 -260
  424. package/.output/server/node_modules/undici/lib/encoding/index.js +0 -33
  425. package/.output/server/node_modules/undici/lib/global.js +0 -59
  426. package/.output/server/node_modules/undici/lib/handler/cache-handler.js +0 -760
  427. package/.output/server/node_modules/undici/lib/handler/cache-revalidation-handler.js +0 -124
  428. package/.output/server/node_modules/undici/lib/handler/decorator-handler.js +0 -67
  429. package/.output/server/node_modules/undici/lib/handler/deduplication-handler.js +0 -460
  430. package/.output/server/node_modules/undici/lib/handler/redirect-handler.js +0 -238
  431. package/.output/server/node_modules/undici/lib/handler/retry-handler.js +0 -418
  432. package/.output/server/node_modules/undici/lib/handler/unwrap-handler.js +0 -106
  433. package/.output/server/node_modules/undici/lib/handler/wrap-handler.js +0 -105
  434. package/.output/server/node_modules/undici/lib/interceptor/cache.js +0 -602
  435. package/.output/server/node_modules/undici/lib/interceptor/decompress.js +0 -259
  436. package/.output/server/node_modules/undici/lib/interceptor/deduplicate.js +0 -117
  437. package/.output/server/node_modules/undici/lib/interceptor/dns.js +0 -571
  438. package/.output/server/node_modules/undici/lib/interceptor/dump.js +0 -112
  439. package/.output/server/node_modules/undici/lib/interceptor/redirect.js +0 -21
  440. package/.output/server/node_modules/undici/lib/interceptor/response-error.js +0 -95
  441. package/.output/server/node_modules/undici/lib/interceptor/retry.js +0 -19
  442. package/.output/server/node_modules/undici/lib/llhttp/constants.js +0 -531
  443. package/.output/server/node_modules/undici/lib/llhttp/llhttp-wasm.js +0 -15
  444. package/.output/server/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +0 -15
  445. package/.output/server/node_modules/undici/lib/llhttp/utils.js +0 -12
  446. package/.output/server/node_modules/undici/lib/mock/mock-agent.js +0 -232
  447. package/.output/server/node_modules/undici/lib/mock/mock-call-history.js +0 -248
  448. package/.output/server/node_modules/undici/lib/mock/mock-client.js +0 -68
  449. package/.output/server/node_modules/undici/lib/mock/mock-errors.js +0 -29
  450. package/.output/server/node_modules/undici/lib/mock/mock-interceptor.js +0 -209
  451. package/.output/server/node_modules/undici/lib/mock/mock-pool.js +0 -68
  452. package/.output/server/node_modules/undici/lib/mock/mock-symbols.js +0 -32
  453. package/.output/server/node_modules/undici/lib/mock/mock-utils.js +0 -486
  454. package/.output/server/node_modules/undici/lib/mock/pending-interceptors-formatter.js +0 -43
  455. package/.output/server/node_modules/undici/lib/mock/snapshot-agent.js +0 -353
  456. package/.output/server/node_modules/undici/lib/mock/snapshot-recorder.js +0 -588
  457. package/.output/server/node_modules/undici/lib/mock/snapshot-utils.js +0 -158
  458. package/.output/server/node_modules/undici/lib/util/cache.js +0 -676
  459. package/.output/server/node_modules/undici/lib/util/date.js +0 -670
  460. package/.output/server/node_modules/undici/lib/util/promise.js +0 -28
  461. package/.output/server/node_modules/undici/lib/util/runtime-features.js +0 -124
  462. package/.output/server/node_modules/undici/lib/util/stats.js +0 -32
  463. package/.output/server/node_modules/undici/lib/util/timers.js +0 -425
  464. package/.output/server/node_modules/undici/lib/web/cache/cache.js +0 -864
  465. package/.output/server/node_modules/undici/lib/web/cache/cachestorage.js +0 -152
  466. package/.output/server/node_modules/undici/lib/web/cache/util.js +0 -45
  467. package/.output/server/node_modules/undici/lib/web/cookies/constants.js +0 -12
  468. package/.output/server/node_modules/undici/lib/web/cookies/index.js +0 -199
  469. package/.output/server/node_modules/undici/lib/web/cookies/parse.js +0 -314
  470. package/.output/server/node_modules/undici/lib/web/cookies/util.js +0 -352
  471. package/.output/server/node_modules/undici/lib/web/eventsource/eventsource-stream.js +0 -399
  472. package/.output/server/node_modules/undici/lib/web/eventsource/eventsource.js +0 -501
  473. package/.output/server/node_modules/undici/lib/web/eventsource/util.js +0 -29
  474. package/.output/server/node_modules/undici/lib/web/fetch/body.js +0 -509
  475. package/.output/server/node_modules/undici/lib/web/fetch/constants.js +0 -131
  476. package/.output/server/node_modules/undici/lib/web/fetch/data-url.js +0 -596
  477. package/.output/server/node_modules/undici/lib/web/fetch/formdata-parser.js +0 -586
  478. package/.output/server/node_modules/undici/lib/web/fetch/formdata.js +0 -259
  479. package/.output/server/node_modules/undici/lib/web/fetch/global.js +0 -40
  480. package/.output/server/node_modules/undici/lib/web/fetch/headers.js +0 -719
  481. package/.output/server/node_modules/undici/lib/web/fetch/index.js +0 -2413
  482. package/.output/server/node_modules/undici/lib/web/fetch/request.js +0 -1115
  483. package/.output/server/node_modules/undici/lib/web/fetch/response.js +0 -641
  484. package/.output/server/node_modules/undici/lib/web/fetch/util.js +0 -1522
  485. package/.output/server/node_modules/undici/lib/web/infra/index.js +0 -229
  486. package/.output/server/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +0 -307
  487. package/.output/server/node_modules/undici/lib/web/webidl/index.js +0 -1006
  488. package/.output/server/node_modules/undici/lib/web/websocket/connection.js +0 -329
  489. package/.output/server/node_modules/undici/lib/web/websocket/constants.js +0 -126
  490. package/.output/server/node_modules/undici/lib/web/websocket/events.js +0 -331
  491. package/.output/server/node_modules/undici/lib/web/websocket/frame.js +0 -133
  492. package/.output/server/node_modules/undici/lib/web/websocket/permessage-deflate.js +0 -100
  493. package/.output/server/node_modules/undici/lib/web/websocket/receiver.js +0 -507
  494. package/.output/server/node_modules/undici/lib/web/websocket/sender.js +0 -109
  495. package/.output/server/node_modules/undici/lib/web/websocket/stream/websocketerror.js +0 -104
  496. package/.output/server/node_modules/undici/lib/web/websocket/stream/websocketstream.js +0 -498
  497. package/.output/server/node_modules/undici/lib/web/websocket/util.js +0 -347
  498. package/.output/server/node_modules/undici/lib/web/websocket/websocket.js +0 -758
  499. package/.output/server/node_modules/undici/package.json +0 -152
  500. package/.output/server/node_modules/unhead/dist/client.mjs +0 -22
  501. package/.output/server/node_modules/unhead/dist/index.mjs +0 -52
  502. package/.output/server/node_modules/unhead/dist/legacy.mjs +0 -33
  503. package/.output/server/node_modules/unhead/dist/minify.mjs +0 -183
  504. package/.output/server/node_modules/unhead/dist/parser.mjs +0 -518
  505. package/.output/server/node_modules/unhead/dist/plugins.mjs +0 -631
  506. package/.output/server/node_modules/unhead/dist/scripts.node.mjs +0 -6
  507. package/.output/server/node_modules/unhead/dist/server.mjs +0 -99
  508. package/.output/server/node_modules/unhead/dist/shared/unhead.BEmVMkeA.mjs +0 -673
  509. package/.output/server/node_modules/unhead/dist/shared/unhead.BGFxPGPQ.mjs +0 -47
  510. package/.output/server/node_modules/unhead/dist/shared/unhead.BQWSw36o.mjs +0 -192
  511. package/.output/server/node_modules/unhead/dist/shared/unhead.Bb4d5b9h.mjs +0 -67
  512. package/.output/server/node_modules/unhead/dist/shared/unhead.BdK3SLPN.mjs +0 -585
  513. package/.output/server/node_modules/unhead/dist/shared/unhead.Bf_fPVYA.mjs +0 -6
  514. package/.output/server/node_modules/unhead/dist/shared/unhead.Bm4Y6XQI.mjs +0 -17
  515. package/.output/server/node_modules/unhead/dist/shared/unhead.C3b2Ipoj.mjs +0 -223
  516. package/.output/server/node_modules/unhead/dist/shared/unhead.CGPOfp5O.mjs +0 -32
  517. package/.output/server/node_modules/unhead/dist/shared/unhead.CHEy9ana.mjs +0 -7
  518. package/.output/server/node_modules/unhead/dist/shared/unhead.CTjuIdzk.mjs +0 -27
  519. package/.output/server/node_modules/unhead/dist/shared/unhead.CfKy3Kuq.mjs +0 -196
  520. package/.output/server/node_modules/unhead/dist/shared/unhead.D7HkBzZn.mjs +0 -59
  521. package/.output/server/node_modules/unhead/dist/shared/unhead.DNKiVLV7.mjs +0 -400
  522. package/.output/server/node_modules/unhead/dist/shared/unhead.MC5RsXLj.mjs +0 -19
  523. package/.output/server/node_modules/unhead/dist/shared/unhead.jEy9BmRq.mjs +0 -264
  524. package/.output/server/node_modules/unhead/dist/shared/unhead.tQnRaXfX.mjs +0 -240
  525. package/.output/server/node_modules/unhead/dist/stream/client.mjs +0 -28
  526. package/.output/server/node_modules/unhead/dist/stream/iife.mjs +0 -2
  527. package/.output/server/node_modules/unhead/dist/stream/server.mjs +0 -264
  528. package/.output/server/node_modules/unhead/dist/utils.mjs +0 -7
  529. package/.output/server/node_modules/unhead/package.json +0 -179
  530. package/.output/server/node_modules/vue/dist/vue.cjs.js +0 -80
  531. package/.output/server/node_modules/vue/dist/vue.cjs.prod.js +0 -66
  532. package/.output/server/node_modules/vue/index.js +0 -7
  533. package/.output/server/node_modules/vue/index.mjs +0 -1
  534. package/.output/server/node_modules/vue/package.json +0 -112
  535. package/.output/server/node_modules/vue/server-renderer/index.mjs +0 -1
  536. package/.output/server/node_modules/vue-bundle-renderer/dist/runtime.mjs +0 -278
  537. package/.output/server/node_modules/vue-bundle-renderer/package.json +0 -54
  538. package/.output/server/node_modules/yocto-queue/index.js +0 -90
  539. package/.output/server/node_modules/yocto-queue/package.json +0 -48
  540. package/.output/server/node_modules/zod/index.js +0 -4
  541. package/.output/server/node_modules/zod/package.json +0 -135
  542. package/.output/server/node_modules/zod/v4/classic/checks.js +0 -1
  543. package/.output/server/node_modules/zod/v4/classic/coerce.js +0 -17
  544. package/.output/server/node_modules/zod/v4/classic/compat.js +0 -31
  545. package/.output/server/node_modules/zod/v4/classic/errors.js +0 -48
  546. package/.output/server/node_modules/zod/v4/classic/external.js +0 -20
  547. package/.output/server/node_modules/zod/v4/classic/from-json-schema.js +0 -599
  548. package/.output/server/node_modules/zod/v4/classic/iso.js +0 -30
  549. package/.output/server/node_modules/zod/v4/classic/package.json +0 -7
  550. package/.output/server/node_modules/zod/v4/classic/parse.js +0 -15
  551. package/.output/server/node_modules/zod/v4/classic/schemas.js +0 -1395
  552. package/.output/server/node_modules/zod/v4/core/api.js +0 -1087
  553. package/.output/server/node_modules/zod/v4/core/checks.js +0 -575
  554. package/.output/server/node_modules/zod/v4/core/core.js +0 -78
  555. package/.output/server/node_modules/zod/v4/core/doc.js +0 -35
  556. package/.output/server/node_modules/zod/v4/core/errors.js +0 -185
  557. package/.output/server/node_modules/zod/v4/core/index.js +0 -16
  558. package/.output/server/node_modules/zod/v4/core/json-schema-generator.js +0 -95
  559. package/.output/server/node_modules/zod/v4/core/json-schema-processors.js +0 -601
  560. package/.output/server/node_modules/zod/v4/core/json-schema.js +0 -1
  561. package/.output/server/node_modules/zod/v4/core/package.json +0 -7
  562. package/.output/server/node_modules/zod/v4/core/parse.js +0 -93
  563. package/.output/server/node_modules/zod/v4/core/regexes.js +0 -139
  564. package/.output/server/node_modules/zod/v4/core/registries.js +0 -51
  565. package/.output/server/node_modules/zod/v4/core/schemas.js +0 -2239
  566. package/.output/server/node_modules/zod/v4/core/to-json-schema.js +0 -448
  567. package/.output/server/node_modules/zod/v4/core/util.js +0 -674
  568. package/.output/server/node_modules/zod/v4/core/versions.js +0 -5
  569. package/.output/server/node_modules/zod/v4/locales/ar.js +0 -106
  570. package/.output/server/node_modules/zod/v4/locales/az.js +0 -105
  571. package/.output/server/node_modules/zod/v4/locales/be.js +0 -156
  572. package/.output/server/node_modules/zod/v4/locales/bg.js +0 -120
  573. package/.output/server/node_modules/zod/v4/locales/ca.js +0 -107
  574. package/.output/server/node_modules/zod/v4/locales/cs.js +0 -111
  575. package/.output/server/node_modules/zod/v4/locales/da.js +0 -115
  576. package/.output/server/node_modules/zod/v4/locales/de.js +0 -108
  577. package/.output/server/node_modules/zod/v4/locales/el.js +0 -109
  578. package/.output/server/node_modules/zod/v4/locales/en.js +0 -113
  579. package/.output/server/node_modules/zod/v4/locales/eo.js +0 -109
  580. package/.output/server/node_modules/zod/v4/locales/es.js +0 -132
  581. package/.output/server/node_modules/zod/v4/locales/fa.js +0 -114
  582. package/.output/server/node_modules/zod/v4/locales/fi.js +0 -112
  583. package/.output/server/node_modules/zod/v4/locales/fr-CA.js +0 -107
  584. package/.output/server/node_modules/zod/v4/locales/fr.js +0 -125
  585. package/.output/server/node_modules/zod/v4/locales/he.js +0 -214
  586. package/.output/server/node_modules/zod/v4/locales/hr.js +0 -122
  587. package/.output/server/node_modules/zod/v4/locales/hu.js +0 -108
  588. package/.output/server/node_modules/zod/v4/locales/hy.js +0 -147
  589. package/.output/server/node_modules/zod/v4/locales/id.js +0 -106
  590. package/.output/server/node_modules/zod/v4/locales/index.js +0 -52
  591. package/.output/server/node_modules/zod/v4/locales/is.js +0 -109
  592. package/.output/server/node_modules/zod/v4/locales/it.js +0 -108
  593. package/.output/server/node_modules/zod/v4/locales/ja.js +0 -107
  594. package/.output/server/node_modules/zod/v4/locales/ka.js +0 -112
  595. package/.output/server/node_modules/zod/v4/locales/kh.js +0 -5
  596. package/.output/server/node_modules/zod/v4/locales/km.js +0 -110
  597. package/.output/server/node_modules/zod/v4/locales/ko.js +0 -111
  598. package/.output/server/node_modules/zod/v4/locales/lt.js +0 -203
  599. package/.output/server/node_modules/zod/v4/locales/mk.js +0 -109
  600. package/.output/server/node_modules/zod/v4/locales/ms.js +0 -107
  601. package/.output/server/node_modules/zod/v4/locales/nl.js +0 -110
  602. package/.output/server/node_modules/zod/v4/locales/no.js +0 -108
  603. package/.output/server/node_modules/zod/v4/locales/ota.js +0 -109
  604. package/.output/server/node_modules/zod/v4/locales/package.json +0 -7
  605. package/.output/server/node_modules/zod/v4/locales/pl.js +0 -109
  606. package/.output/server/node_modules/zod/v4/locales/ps.js +0 -114
  607. package/.output/server/node_modules/zod/v4/locales/pt.js +0 -108
  608. package/.output/server/node_modules/zod/v4/locales/ro.js +0 -119
  609. package/.output/server/node_modules/zod/v4/locales/ru.js +0 -156
  610. package/.output/server/node_modules/zod/v4/locales/sl.js +0 -109
  611. package/.output/server/node_modules/zod/v4/locales/sv.js +0 -110
  612. package/.output/server/node_modules/zod/v4/locales/ta.js +0 -110
  613. package/.output/server/node_modules/zod/v4/locales/th.js +0 -110
  614. package/.output/server/node_modules/zod/v4/locales/tr.js +0 -105
  615. package/.output/server/node_modules/zod/v4/locales/ua.js +0 -5
  616. package/.output/server/node_modules/zod/v4/locales/uk.js +0 -108
  617. package/.output/server/node_modules/zod/v4/locales/ur.js +0 -110
  618. package/.output/server/node_modules/zod/v4/locales/uz.js +0 -110
  619. package/.output/server/node_modules/zod/v4/locales/vi.js +0 -108
  620. package/.output/server/node_modules/zod/v4/locales/yo.js +0 -107
  621. package/.output/server/node_modules/zod/v4/locales/zh-CN.js +0 -109
  622. package/.output/server/node_modules/zod/v4/locales/zh-TW.js +0 -107
  623. package/.output/server/package.json +0 -38
@@ -1,1731 +0,0 @@
1
- 'use strict'
2
-
3
- /* global WebAssembly */
4
-
5
- const assert = require('node:assert')
6
- const util = require('../core/util.js')
7
- const { channels } = require('../core/diagnostics.js')
8
- const timers = require('../util/timers.js')
9
- const {
10
- RequestContentLengthMismatchError,
11
- ResponseContentLengthMismatchError,
12
- RequestAbortedError,
13
- InvalidArgumentError,
14
- HeadersTimeoutError,
15
- HeadersOverflowError,
16
- SocketError,
17
- InformationalError,
18
- BodyTimeoutError,
19
- HTTPParserError,
20
- ResponseExceededMaxSizeError
21
- } = require('../core/errors.js')
22
- const {
23
- kUrl,
24
- kReset,
25
- kClient,
26
- kParser,
27
- kBlocking,
28
- kRunning,
29
- kPending,
30
- kSize,
31
- kWriting,
32
- kQueue,
33
- kNoRef,
34
- kKeepAliveDefaultTimeout,
35
- kHostHeader,
36
- kPendingIdx,
37
- kRunningIdx,
38
- kError,
39
- kPipelining,
40
- kSocket,
41
- kKeepAliveTimeoutValue,
42
- kMaxHeadersSize,
43
- kKeepAliveMaxTimeout,
44
- kKeepAliveTimeoutThreshold,
45
- kHeadersTimeout,
46
- kBodyTimeout,
47
- kStrictContentLength,
48
- kMaxRequests,
49
- kCounter,
50
- kMaxResponseSize,
51
- kOnError,
52
- kResume,
53
- kHTTPContext,
54
- kClosed
55
- } = require('../core/symbols.js')
56
-
57
- const constants = require('../llhttp/constants.js')
58
- const EMPTY_BUF = Buffer.alloc(0)
59
- const FastBuffer = Buffer[Symbol.species]
60
- const removeAllListeners = util.removeAllListeners
61
- const kIdleSocketValidation = Symbol('kIdleSocketValidation')
62
- const kIdleSocketValidationTimeout = Symbol('kIdleSocketValidationTimeout')
63
- const kSocketUsed = Symbol('kSocketUsed')
64
-
65
- let extractBody
66
-
67
- function lazyllhttp () {
68
- const llhttpWasmData = process.env.JEST_WORKER_ID ? require('../llhttp/llhttp-wasm.js') : undefined
69
-
70
- let mod
71
-
72
- // We disable wasm SIMD on ppc64 as it seems to be broken on Power 9 architectures.
73
- let useWasmSIMD = process.arch !== 'ppc64'
74
- // The Env Variable UNDICI_NO_WASM_SIMD allows explicitly overriding the default behavior
75
- if (process.env.UNDICI_NO_WASM_SIMD === '1') {
76
- useWasmSIMD = false
77
- } else if (process.env.UNDICI_NO_WASM_SIMD === '0') {
78
- useWasmSIMD = true
79
- }
80
-
81
- if (useWasmSIMD) {
82
- try {
83
- mod = new WebAssembly.Module(require('../llhttp/llhttp_simd-wasm.js'))
84
- } catch {
85
- }
86
- }
87
-
88
- if (!mod) {
89
- // We could check if the error was caused by the simd option not
90
- // being enabled, but the occurring of this other error
91
- // * https://github.com/emscripten-core/emscripten/issues/11495
92
- // got me to remove that check to avoid breaking Node 12.
93
- mod = new WebAssembly.Module(llhttpWasmData || require('../llhttp/llhttp-wasm.js'))
94
- }
95
-
96
- return new WebAssembly.Instance(mod, {
97
- env: {
98
- /**
99
- * @param {number} p
100
- * @param {number} at
101
- * @param {number} len
102
- * @returns {number}
103
- */
104
- wasm_on_url: (p, at, len) => {
105
- return 0
106
- },
107
- /**
108
- * @param {number} p
109
- * @param {number} at
110
- * @param {number} len
111
- * @returns {number}
112
- */
113
- wasm_on_status: (p, at, len) => {
114
- assert(currentParser.ptr === p)
115
- const start = at - currentBufferPtr + currentBufferRef.byteOffset
116
- return currentParser.onStatus(new FastBuffer(currentBufferRef.buffer, start, len))
117
- },
118
- /**
119
- * @param {number} p
120
- * @returns {number}
121
- */
122
- wasm_on_message_begin: (p) => {
123
- assert(currentParser.ptr === p)
124
- return currentParser.onMessageBegin()
125
- },
126
- /**
127
- * @param {number} p
128
- * @param {number} at
129
- * @param {number} len
130
- * @returns {number}
131
- */
132
- wasm_on_header_field: (p, at, len) => {
133
- assert(currentParser.ptr === p)
134
- const start = at - currentBufferPtr + currentBufferRef.byteOffset
135
- return currentParser.onHeaderField(new FastBuffer(currentBufferRef.buffer, start, len))
136
- },
137
- /**
138
- * @param {number} p
139
- * @param {number} at
140
- * @param {number} len
141
- * @returns {number}
142
- */
143
- wasm_on_header_value: (p, at, len) => {
144
- assert(currentParser.ptr === p)
145
- const start = at - currentBufferPtr + currentBufferRef.byteOffset
146
- return currentParser.onHeaderValue(new FastBuffer(currentBufferRef.buffer, start, len))
147
- },
148
- /**
149
- * @param {number} p
150
- * @param {number} statusCode
151
- * @param {0|1} upgrade
152
- * @param {0|1} shouldKeepAlive
153
- * @returns {number}
154
- */
155
- wasm_on_headers_complete: (p, statusCode, upgrade, shouldKeepAlive) => {
156
- assert(currentParser.ptr === p)
157
- return currentParser.onHeadersComplete(statusCode, upgrade === 1, shouldKeepAlive === 1)
158
- },
159
- /**
160
- * @param {number} p
161
- * @param {number} at
162
- * @param {number} len
163
- * @returns {number}
164
- */
165
- wasm_on_body: (p, at, len) => {
166
- assert(currentParser.ptr === p)
167
- const start = at - currentBufferPtr + currentBufferRef.byteOffset
168
- return currentParser.onBody(new FastBuffer(currentBufferRef.buffer, start, len))
169
- },
170
- /**
171
- * @param {number} p
172
- * @returns {number}
173
- */
174
- wasm_on_message_complete: (p) => {
175
- assert(currentParser.ptr === p)
176
- return currentParser.onMessageComplete()
177
- }
178
-
179
- }
180
- })
181
- }
182
-
183
- let llhttpInstance = null
184
-
185
- /**
186
- * @type {Parser|null}
187
- */
188
- let currentParser = null
189
- let currentBufferRef = null
190
- /**
191
- * @type {number}
192
- */
193
- let currentBufferSize = 0
194
- let currentBufferPtr = null
195
-
196
- const USE_NATIVE_TIMER = 0
197
- const USE_FAST_TIMER = 1
198
-
199
- // Use fast timers for headers and body to take eventual event loop
200
- // latency into account.
201
- const TIMEOUT_HEADERS = 2 | USE_FAST_TIMER
202
- const TIMEOUT_BODY = 4 | USE_FAST_TIMER
203
-
204
- // Use native timers to ignore event loop latency for keep-alive
205
- // handling.
206
- const TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER
207
-
208
- class Parser {
209
- /**
210
- * @param {import('./client.js')} client
211
- * @param {import('net').Socket} socket
212
- * @param {*} llhttp
213
- */
214
- constructor (client, socket, { exports }) {
215
- this.llhttp = exports
216
- this.ptr = this.llhttp.llhttp_alloc(constants.TYPE.RESPONSE)
217
- this.client = client
218
- /**
219
- * @type {import('net').Socket}
220
- */
221
- this.socket = socket
222
- this.timeout = null
223
- this.timeoutWeakRef = new WeakRef(this)
224
- this.timeoutValue = null
225
- this.timeoutType = null
226
- this.statusCode = 0
227
- this.statusText = ''
228
- this.upgrade = false
229
- this.headers = []
230
- this.headersSize = 0
231
- this.headersMaxSize = client[kMaxHeadersSize]
232
- this.shouldKeepAlive = false
233
- this.paused = false
234
- this.resume = this.resume.bind(this)
235
-
236
- this.bytesRead = 0
237
-
238
- this.keepAlive = ''
239
- this.contentLength = ''
240
- this.connection = ''
241
- this.maxResponseSize = client[kMaxResponseSize]
242
- }
243
-
244
- setTimeout (delay, type) {
245
- // If the existing timer and the new timer are of different timer type
246
- // (fast or native) or have different delay, we need to clear the existing
247
- // timer and set a new one.
248
- if (
249
- delay !== this.timeoutValue ||
250
- (type & USE_FAST_TIMER) ^ (this.timeoutType & USE_FAST_TIMER)
251
- ) {
252
- // If a timeout is already set, clear it with clearTimeout of the fast
253
- // timer implementation, as it can clear fast and native timers.
254
- if (this.timeout) {
255
- timers.clearTimeout(this.timeout)
256
- this.timeout = null
257
- }
258
-
259
- if (delay) {
260
- if (type & USE_FAST_TIMER) {
261
- this.timeout = timers.setFastTimeout(onParserTimeout, delay, this.timeoutWeakRef)
262
- } else {
263
- this.timeout = setTimeout(onParserTimeout, delay, this.timeoutWeakRef)
264
- this.timeout?.unref()
265
- }
266
- }
267
-
268
- this.timeoutValue = delay
269
- } else if (this.timeout) {
270
- if (this.timeout.refresh) {
271
- this.timeout.refresh()
272
- }
273
- }
274
-
275
- this.timeoutType = type
276
- }
277
-
278
- resume () {
279
- if (this.socket.destroyed || !this.paused) {
280
- return
281
- }
282
-
283
- assert(this.ptr != null)
284
- assert(currentParser === null)
285
-
286
- this.llhttp.llhttp_resume(this.ptr)
287
-
288
- assert(this.timeoutType === TIMEOUT_BODY)
289
- if (this.timeout) {
290
- if (this.timeout.refresh) {
291
- this.timeout.refresh()
292
- }
293
- }
294
-
295
- this.paused = false
296
- this.execute(this.socket.read() || EMPTY_BUF) // Flush parser.
297
- this.readMore()
298
- }
299
-
300
- readMore () {
301
- while (!this.paused && this.ptr) {
302
- const chunk = this.socket.read()
303
- if (chunk === null) {
304
- break
305
- }
306
- this.execute(chunk)
307
- }
308
- }
309
-
310
- /**
311
- * @param {Buffer} chunk
312
- */
313
- execute (chunk) {
314
- assert(currentParser === null)
315
- assert(this.ptr != null)
316
- assert(!this.paused)
317
-
318
- const { socket, llhttp } = this
319
-
320
- // Allocate a new buffer if the current buffer is too small.
321
- if (chunk.length > currentBufferSize) {
322
- if (currentBufferPtr) {
323
- llhttp.free(currentBufferPtr)
324
- }
325
- // Allocate a buffer that is a multiple of 4096 bytes.
326
- currentBufferSize = Math.ceil(chunk.length / 4096) * 4096
327
- currentBufferPtr = llhttp.malloc(currentBufferSize)
328
- }
329
-
330
- new Uint8Array(llhttp.memory.buffer, currentBufferPtr, currentBufferSize).set(chunk)
331
-
332
- // Call `execute` on the wasm parser.
333
- // We pass the `llhttp_parser` pointer address, the pointer address of buffer view data,
334
- // and finally the length of bytes to parse.
335
- // The return value is an error code or `constants.ERROR.OK`.
336
- try {
337
- let ret
338
-
339
- try {
340
- currentBufferRef = chunk
341
- currentParser = this
342
- ret = llhttp.llhttp_execute(this.ptr, currentBufferPtr, chunk.length)
343
- } finally {
344
- currentParser = null
345
- currentBufferRef = null
346
- }
347
-
348
- if (ret !== constants.ERROR.OK) {
349
- const data = chunk.subarray(llhttp.llhttp_get_error_pos(this.ptr) - currentBufferPtr)
350
-
351
- if (ret === constants.ERROR.PAUSED_UPGRADE) {
352
- this.onUpgrade(data)
353
- } else if (ret === constants.ERROR.PAUSED) {
354
- this.paused = true
355
- socket.unshift(data)
356
- } else {
357
- throw this.createError(ret, data)
358
- }
359
- }
360
- } catch (err) {
361
- util.destroy(socket, err)
362
- }
363
- }
364
-
365
- finish () {
366
- assert(currentParser === null)
367
- assert(this.ptr != null)
368
- assert(!this.paused)
369
-
370
- const { llhttp } = this
371
-
372
- let ret
373
-
374
- try {
375
- currentParser = this
376
- ret = llhttp.llhttp_finish(this.ptr)
377
- } finally {
378
- currentParser = null
379
- }
380
-
381
- if (ret === constants.ERROR.OK) {
382
- return null
383
- }
384
-
385
- if (ret === constants.ERROR.PAUSED || ret === constants.ERROR.PAUSED_UPGRADE) {
386
- this.paused = true
387
- return null
388
- }
389
-
390
- return this.createError(ret, EMPTY_BUF)
391
- }
392
-
393
- createError (ret, data) {
394
- const { llhttp, contentLength, bytesRead } = this
395
-
396
- if (contentLength && bytesRead !== parseInt(contentLength, 10)) {
397
- return new ResponseContentLengthMismatchError()
398
- }
399
-
400
- const ptr = llhttp.llhttp_get_error_reason(this.ptr)
401
- let message = ''
402
- if (ptr) {
403
- const len = new Uint8Array(llhttp.memory.buffer, ptr).indexOf(0)
404
- message =
405
- 'Response does not match the HTTP/1.1 protocol (' +
406
- Buffer.from(llhttp.memory.buffer, ptr, len).toString() +
407
- ')'
408
- }
409
-
410
- return new HTTPParserError(message, constants.ERROR[ret], data)
411
- }
412
-
413
- destroy () {
414
- assert(currentParser === null)
415
- assert(this.ptr != null)
416
-
417
- this.llhttp.llhttp_free(this.ptr)
418
- this.ptr = null
419
-
420
- this.timeout && timers.clearTimeout(this.timeout)
421
- this.timeout = null
422
- this.timeoutValue = null
423
- this.timeoutType = null
424
-
425
- this.paused = false
426
- }
427
-
428
- /**
429
- * @param {Buffer} buf
430
- * @returns {0}
431
- */
432
- onStatus (buf) {
433
- this.statusText = buf.toString()
434
- return 0
435
- }
436
-
437
- /**
438
- * @returns {0|-1}
439
- */
440
- onMessageBegin () {
441
- const { socket, client } = this
442
-
443
- if (socket.destroyed) {
444
- return -1
445
- }
446
-
447
- if (client[kRunning] === 0) {
448
- util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)))
449
- return -1
450
- }
451
-
452
- const request = client[kQueue][client[kRunningIdx]]
453
- if (!request) {
454
- return -1
455
- }
456
- request.onResponseStarted()
457
-
458
- return 0
459
- }
460
-
461
- /**
462
- * @param {Buffer} buf
463
- * @returns {number}
464
- */
465
- onHeaderField (buf) {
466
- const len = this.headers.length
467
-
468
- if ((len & 1) === 0) {
469
- this.headers.push(buf)
470
- } else {
471
- this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf])
472
- }
473
-
474
- this.trackHeader(buf.length)
475
-
476
- return 0
477
- }
478
-
479
- /**
480
- * @param {Buffer} buf
481
- * @returns {number}
482
- */
483
- onHeaderValue (buf) {
484
- let len = this.headers.length
485
-
486
- if ((len & 1) === 1) {
487
- this.headers.push(buf)
488
- len += 1
489
- } else {
490
- this.headers[len - 1] = Buffer.concat([this.headers[len - 1], buf])
491
- }
492
-
493
- const key = this.headers[len - 2]
494
- if (key.length === 10) {
495
- const headerName = util.bufferToLowerCasedHeaderName(key)
496
- if (headerName === 'keep-alive') {
497
- this.keepAlive += buf.toString()
498
- } else if (headerName === 'connection') {
499
- this.connection += buf.toString()
500
- }
501
- } else if (key.length === 14 && util.bufferToLowerCasedHeaderName(key) === 'content-length') {
502
- this.contentLength += buf.toString()
503
- }
504
-
505
- this.trackHeader(buf.length)
506
-
507
- return 0
508
- }
509
-
510
- /**
511
- * @param {number} len
512
- */
513
- trackHeader (len) {
514
- this.headersSize += len
515
- if (this.headersSize >= this.headersMaxSize) {
516
- util.destroy(this.socket, new HeadersOverflowError())
517
- }
518
- }
519
-
520
- /**
521
- * @param {Buffer} head
522
- */
523
- onUpgrade (head) {
524
- const { upgrade, client, socket, headers, statusCode } = this
525
-
526
- assert(upgrade)
527
- assert(client[kSocket] === socket)
528
- assert(!socket.destroyed)
529
- assert(!this.paused)
530
- assert((headers.length & 1) === 0)
531
-
532
- const request = client[kQueue][client[kRunningIdx]]
533
- assert(request)
534
- assert(request.upgrade || request.method === 'CONNECT')
535
-
536
- this.statusCode = 0
537
- this.statusText = ''
538
- this.shouldKeepAlive = false
539
-
540
- this.headers = []
541
- this.headersSize = 0
542
-
543
- socket.unshift(head)
544
-
545
- socket[kParser].destroy()
546
- socket[kParser] = null
547
-
548
- socket[kClient] = null
549
- socket[kError] = null
550
-
551
- removeAllListeners(socket)
552
-
553
- client[kSocket] = null
554
- client[kHTTPContext] = null // TODO (fix): This is hacky...
555
- client[kQueue][client[kRunningIdx]++] = null
556
- client.emit('disconnect', client[kUrl], [client], new InformationalError('upgrade'))
557
-
558
- try {
559
- request.onUpgrade(statusCode, headers, socket)
560
- } catch (err) {
561
- util.destroy(socket, err)
562
- }
563
-
564
- client[kResume]()
565
- }
566
-
567
- /**
568
- * @param {number} statusCode
569
- * @param {boolean} upgrade
570
- * @param {boolean} shouldKeepAlive
571
- * @returns {number}
572
- */
573
- onHeadersComplete (statusCode, upgrade, shouldKeepAlive) {
574
- const { client, socket, headers, statusText } = this
575
-
576
- if (socket.destroyed) {
577
- return -1
578
- }
579
-
580
- if (client[kRunning] === 0) {
581
- util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)))
582
- return -1
583
- }
584
-
585
- const request = client[kQueue][client[kRunningIdx]]
586
-
587
- if (!request) {
588
- return -1
589
- }
590
-
591
- assert(!this.upgrade)
592
- assert(this.statusCode < 200)
593
-
594
- if (statusCode === 100) {
595
- util.destroy(socket, new SocketError('bad response', util.getSocketInfo(socket)))
596
- return -1
597
- }
598
-
599
- /* this can only happen if server is misbehaving */
600
- if (upgrade && !request.upgrade) {
601
- util.destroy(socket, new SocketError('bad upgrade', util.getSocketInfo(socket)))
602
- return -1
603
- }
604
-
605
- assert(this.timeoutType === TIMEOUT_HEADERS)
606
-
607
- this.statusCode = statusCode
608
- this.shouldKeepAlive = (
609
- shouldKeepAlive ||
610
- // Override llhttp value which does not allow keepAlive for HEAD.
611
- (request.method === 'HEAD' && !socket[kReset] && this.connection.toLowerCase() === 'keep-alive')
612
- )
613
-
614
- if (this.statusCode >= 200) {
615
- const bodyTimeout = request.bodyTimeout != null
616
- ? request.bodyTimeout
617
- : client[kBodyTimeout]
618
- this.setTimeout(bodyTimeout, TIMEOUT_BODY)
619
- } else if (this.timeout) {
620
- if (this.timeout.refresh) {
621
- this.timeout.refresh()
622
- }
623
- }
624
-
625
- if (request.method === 'CONNECT') {
626
- assert(client[kRunning] === 1)
627
- this.upgrade = true
628
- return 2
629
- }
630
-
631
- if (upgrade) {
632
- assert(client[kRunning] === 1)
633
- this.upgrade = true
634
- return 2
635
- }
636
-
637
- assert((this.headers.length & 1) === 0)
638
- this.headers = []
639
- this.headersSize = 0
640
-
641
- if (this.shouldKeepAlive && client[kPipelining]) {
642
- const keepAliveTimeout = this.keepAlive ? util.parseKeepAliveTimeout(this.keepAlive) : null
643
-
644
- if (keepAliveTimeout != null) {
645
- const timeout = Math.min(
646
- keepAliveTimeout - client[kKeepAliveTimeoutThreshold],
647
- client[kKeepAliveMaxTimeout]
648
- )
649
- if (timeout <= 0) {
650
- socket[kReset] = true
651
- } else {
652
- client[kKeepAliveTimeoutValue] = timeout
653
- }
654
- } else {
655
- client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]
656
- }
657
- } else {
658
- // Stop more requests from being dispatched.
659
- socket[kReset] = true
660
- }
661
-
662
- const pause = request.onHeaders(statusCode, headers, this.resume, statusText) === false
663
-
664
- if (request.aborted) {
665
- return -1
666
- }
667
-
668
- if (request.method === 'HEAD') {
669
- return 1
670
- }
671
-
672
- if (statusCode < 200) {
673
- return 1
674
- }
675
-
676
- if (socket[kBlocking]) {
677
- socket[kBlocking] = false
678
- client[kResume]()
679
- }
680
-
681
- return pause ? constants.ERROR.PAUSED : 0
682
- }
683
-
684
- /**
685
- * @param {Buffer} buf
686
- * @returns {number}
687
- */
688
- onBody (buf) {
689
- const { client, socket, statusCode, maxResponseSize } = this
690
-
691
- if (socket.destroyed) {
692
- return -1
693
- }
694
-
695
- const request = client[kQueue][client[kRunningIdx]]
696
- assert(request)
697
-
698
- assert(this.timeoutType === TIMEOUT_BODY)
699
- if (this.timeout) {
700
- if (this.timeout.refresh) {
701
- this.timeout.refresh()
702
- }
703
- }
704
-
705
- assert(statusCode >= 200)
706
-
707
- if (maxResponseSize > -1 && this.bytesRead + buf.length > maxResponseSize) {
708
- util.destroy(socket, new ResponseExceededMaxSizeError())
709
- return -1
710
- }
711
-
712
- this.bytesRead += buf.length
713
-
714
- if (request.onData(buf) === false) {
715
- return constants.ERROR.PAUSED
716
- }
717
-
718
- return 0
719
- }
720
-
721
- /**
722
- * @returns {number}
723
- */
724
- onMessageComplete () {
725
- const { client, socket, statusCode, upgrade, headers, contentLength, bytesRead, shouldKeepAlive } = this
726
-
727
- if (socket.destroyed && (!statusCode || shouldKeepAlive)) {
728
- return -1
729
- }
730
-
731
- if (upgrade) {
732
- return 0
733
- }
734
-
735
- assert(statusCode >= 100)
736
- assert((this.headers.length & 1) === 0)
737
-
738
- const request = client[kQueue][client[kRunningIdx]]
739
- assert(request)
740
-
741
- this.statusCode = 0
742
- this.statusText = ''
743
- this.bytesRead = 0
744
- this.contentLength = ''
745
- this.keepAlive = ''
746
- this.connection = ''
747
-
748
- this.headers = []
749
- this.headersSize = 0
750
-
751
- if (statusCode < 200) {
752
- return 0
753
- }
754
-
755
- if (request.method !== 'HEAD' && contentLength && bytesRead !== parseInt(contentLength, 10)) {
756
- util.destroy(socket, new ResponseContentLengthMismatchError())
757
- return -1
758
- }
759
-
760
- request.onComplete(headers)
761
-
762
- client[kQueue][client[kRunningIdx]++] = null
763
- socket[kSocketUsed] = client[kPending] === 0
764
-
765
- if (socket[kWriting]) {
766
- assert(client[kRunning] === 0)
767
- // Response completed before request.
768
- util.destroy(socket, new InformationalError('reset'))
769
- return constants.ERROR.PAUSED
770
- } else if (!shouldKeepAlive) {
771
- util.destroy(socket, new InformationalError('reset'))
772
- return constants.ERROR.PAUSED
773
- } else if (socket[kReset] && client[kRunning] === 0) {
774
- // Destroy socket once all requests have completed.
775
- // The request at the tail of the pipeline is the one
776
- // that requested reset and no further requests should
777
- // have been queued since then.
778
- util.destroy(socket, new InformationalError('reset'))
779
- return constants.ERROR.PAUSED
780
- } else if (client[kPipelining] == null || client[kPipelining] === 1) {
781
- // We must wait a full event loop cycle to reuse this socket to make sure
782
- // that non-spec compliant servers are not closing the connection even if they
783
- // said they won't.
784
- setImmediate(client[kResume])
785
- } else {
786
- client[kResume]()
787
- }
788
-
789
- return 0
790
- }
791
- }
792
-
793
- function onParserTimeout (parserWeakRef) {
794
- const parser = parserWeakRef.deref()
795
- if (!parser) {
796
- return
797
- }
798
-
799
- const { socket, timeoutType, client, paused } = parser
800
-
801
- if (timeoutType === TIMEOUT_HEADERS) {
802
- if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) {
803
- assert(!paused, 'cannot be paused while waiting for headers')
804
- util.destroy(socket, new HeadersTimeoutError())
805
- }
806
- } else if (timeoutType === TIMEOUT_BODY) {
807
- if (!paused) {
808
- util.destroy(socket, new BodyTimeoutError())
809
- }
810
- } else if (timeoutType === TIMEOUT_KEEP_ALIVE) {
811
- assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue])
812
- util.destroy(socket, new InformationalError('socket idle timeout'))
813
- }
814
- }
815
-
816
- /**
817
- * @param {import ('./client.js')} client
818
- * @param {import('net').Socket} socket
819
- * @returns
820
- */
821
- function connectH1 (client, socket) {
822
- client[kSocket] = socket
823
-
824
- if (!llhttpInstance) {
825
- llhttpInstance = lazyllhttp()
826
- }
827
-
828
- if (socket.errored) {
829
- throw socket.errored
830
- }
831
-
832
- if (socket.destroyed) {
833
- throw new SocketError('destroyed')
834
- }
835
-
836
- socket[kNoRef] = false
837
- socket[kWriting] = false
838
- socket[kReset] = false
839
- socket[kBlocking] = false
840
- socket[kIdleSocketValidation] = 0
841
- socket[kIdleSocketValidationTimeout] = null
842
- socket[kSocketUsed] = false
843
- socket[kParser] = new Parser(client, socket, llhttpInstance)
844
-
845
- util.addListener(socket, 'error', onHttpSocketError)
846
- util.addListener(socket, 'readable', onHttpSocketReadable)
847
- util.addListener(socket, 'end', onHttpSocketEnd)
848
- util.addListener(socket, 'close', onHttpSocketClose)
849
-
850
- socket[kClosed] = false
851
- socket.on('close', onSocketClose)
852
-
853
- return {
854
- version: 'h1',
855
- defaultPipelining: 1,
856
- write (request) {
857
- return writeH1(client, request)
858
- },
859
- resume () {
860
- resumeH1(client)
861
- },
862
- /**
863
- * @param {Error|undefined} err
864
- * @param {() => void} callback
865
- */
866
- destroy (err, callback) {
867
- if (socket[kClosed]) {
868
- queueMicrotask(callback)
869
- } else {
870
- socket.on('close', callback)
871
- socket.destroy(err)
872
- }
873
- },
874
- /**
875
- * @returns {boolean}
876
- */
877
- get destroyed () {
878
- return socket.destroyed
879
- },
880
- /**
881
- * @param {import('../core/request.js')} request
882
- * @returns {boolean}
883
- */
884
- busy (request) {
885
- if (socket[kWriting] || socket[kReset] || socket[kBlocking] || socket[kIdleSocketValidation] === 1) {
886
- return true
887
- }
888
-
889
- if (request) {
890
- if (client[kRunning] > 0 && !request.idempotent) {
891
- // Non-idempotent request cannot be retried.
892
- // Ensure that no other requests are inflight and
893
- // could cause failure.
894
- return true
895
- }
896
-
897
- if (client[kRunning] > 0 && (request.upgrade || request.method === 'CONNECT')) {
898
- // Don't dispatch an upgrade until all preceding requests have completed.
899
- // A misbehaving server might upgrade the connection before all pipelined
900
- // request has completed.
901
- return true
902
- }
903
-
904
- if (client[kRunning] > 0 && util.bodyLength(request.body) !== 0 &&
905
- (util.isStream(request.body) || util.isAsyncIterable(request.body) || util.isFormDataLike(request.body))) {
906
- // Request with stream or iterator body can error while other requests
907
- // are inflight and indirectly error those as well.
908
- // Ensure this doesn't happen by waiting for inflight
909
- // to complete before dispatching.
910
-
911
- // Request with stream or iterator body cannot be retried.
912
- // Ensure that no other requests are inflight and
913
- // could cause failure.
914
- return true
915
- }
916
- }
917
-
918
- return false
919
- }
920
- }
921
- }
922
-
923
- function onHttpSocketError (err) {
924
- assert(err.code !== 'ERR_TLS_CERT_ALTNAME_INVALID')
925
-
926
- const parser = this[kParser]
927
-
928
- // On Mac OS, we get an ECONNRESET even if there is a full body to be forwarded
929
- // to the user.
930
- if (err.code === 'ECONNRESET' && parser.statusCode && !parser.shouldKeepAlive) {
931
- const parserErr = parser.finish()
932
- if (parserErr) {
933
- this[kError] = parserErr
934
- this[kClient][kOnError](parserErr)
935
- }
936
- return
937
- }
938
-
939
- this[kError] = err
940
-
941
- this[kClient][kOnError](err)
942
- }
943
-
944
- function onHttpSocketReadable () {
945
- this[kParser]?.readMore()
946
- }
947
-
948
- function onHttpSocketEnd () {
949
- const parser = this[kParser]
950
-
951
- if (parser.statusCode && !parser.shouldKeepAlive) {
952
- const parserErr = parser.finish()
953
- if (parserErr) {
954
- util.destroy(this, parserErr)
955
- }
956
- return
957
- }
958
-
959
- util.destroy(this, new SocketError('other side closed', util.getSocketInfo(this)))
960
- }
961
-
962
- function onHttpSocketClose () {
963
- const parser = this[kParser]
964
-
965
- clearIdleSocketValidation(this)
966
-
967
- if (parser) {
968
- if (!this[kError] && parser.statusCode && !parser.shouldKeepAlive) {
969
- this[kError] = parser.finish() || this[kError]
970
- }
971
-
972
- this[kParser].destroy()
973
- this[kParser] = null
974
- }
975
-
976
- const err = this[kError] || new SocketError('closed', util.getSocketInfo(this))
977
-
978
- const client = this[kClient]
979
-
980
- client[kSocket] = null
981
- client[kHTTPContext] = null // TODO (fix): This is hacky...
982
-
983
- if (client.destroyed) {
984
- assert(client[kPending] === 0)
985
-
986
- // Fail entire queue.
987
- const requests = client[kQueue].splice(client[kRunningIdx])
988
- for (let i = 0; i < requests.length; i++) {
989
- const request = requests[i]
990
- util.errorRequest(client, request, err)
991
- }
992
- } else if (client[kRunning] > 0 && err.code !== 'UND_ERR_INFO') {
993
- // Fail head of pipeline.
994
- const request = client[kQueue][client[kRunningIdx]]
995
- client[kQueue][client[kRunningIdx]++] = null
996
-
997
- util.errorRequest(client, request, err)
998
- }
999
-
1000
- client[kPendingIdx] = client[kRunningIdx]
1001
-
1002
- assert(client[kRunning] === 0)
1003
-
1004
- client.emit('disconnect', client[kUrl], [client], err)
1005
-
1006
- client[kResume]()
1007
- }
1008
-
1009
- function onSocketClose () {
1010
- this[kClosed] = true
1011
- }
1012
-
1013
- function clearIdleSocketValidation (socket) {
1014
- if (socket[kIdleSocketValidationTimeout]) {
1015
- clearTimeout(socket[kIdleSocketValidationTimeout])
1016
- socket[kIdleSocketValidationTimeout] = null
1017
- }
1018
-
1019
- socket[kIdleSocketValidation] = 0
1020
- }
1021
-
1022
- function scheduleIdleSocketValidation (client, socket) {
1023
- socket[kIdleSocketValidation] = 1
1024
- socket[kIdleSocketValidationTimeout] = setTimeout(() => {
1025
- socket[kIdleSocketValidationTimeout] = null
1026
- socket[kIdleSocketValidation] = 2
1027
-
1028
- if (client[kSocket] === socket && !socket.destroyed) {
1029
- client[kResume]()
1030
- }
1031
- }, 0)
1032
- socket[kIdleSocketValidationTimeout].unref?.()
1033
- }
1034
-
1035
- /**
1036
- * @param {import('./client.js')} client
1037
- */
1038
- function resumeH1 (client) {
1039
- const socket = client[kSocket]
1040
-
1041
- if (socket && !socket.destroyed) {
1042
- if (client[kSize] === 0) {
1043
- if (!socket[kNoRef] && socket.unref) {
1044
- socket.unref()
1045
- socket[kNoRef] = true
1046
- }
1047
- } else if (socket[kNoRef] && socket.ref) {
1048
- socket.ref()
1049
- socket[kNoRef] = false
1050
- }
1051
-
1052
- if (client[kRunning] === 0 && client[kPending] > 0 && socket[kSocketUsed]) {
1053
- if (socket[kIdleSocketValidation] === 0) {
1054
- scheduleIdleSocketValidation(client, socket)
1055
- socket[kParser].readMore()
1056
- if (socket.destroyed) {
1057
- return
1058
- }
1059
- return
1060
- }
1061
-
1062
- if (socket[kIdleSocketValidation] === 1) {
1063
- socket[kParser].readMore()
1064
- if (socket.destroyed) {
1065
- return
1066
- }
1067
- return
1068
- }
1069
- }
1070
-
1071
- if (client[kRunning] === 0) {
1072
- socket[kParser].readMore()
1073
- if (socket.destroyed) {
1074
- return
1075
- }
1076
- }
1077
-
1078
- if (client[kSize] === 0) {
1079
- if (socket[kParser].timeoutType !== TIMEOUT_KEEP_ALIVE) {
1080
- socket[kParser].setTimeout(client[kKeepAliveTimeoutValue], TIMEOUT_KEEP_ALIVE)
1081
- }
1082
- } else if (client[kRunning] > 0 && socket[kParser].statusCode < 200) {
1083
- if (socket[kParser].timeoutType !== TIMEOUT_HEADERS) {
1084
- const request = client[kQueue][client[kRunningIdx]]
1085
- const headersTimeout = request.headersTimeout != null
1086
- ? request.headersTimeout
1087
- : client[kHeadersTimeout]
1088
- socket[kParser].setTimeout(headersTimeout, TIMEOUT_HEADERS)
1089
- }
1090
- }
1091
- }
1092
- }
1093
-
1094
- // https://www.rfc-editor.org/rfc/rfc7230#section-3.3.2
1095
- function shouldSendContentLength (method) {
1096
- return method !== 'GET' && method !== 'HEAD' && method !== 'OPTIONS' && method !== 'TRACE' && method !== 'CONNECT'
1097
- }
1098
-
1099
- /**
1100
- * @param {import('./client.js')} client
1101
- * @param {import('../core/request.js')} request
1102
- * @returns
1103
- */
1104
- function writeH1 (client, request) {
1105
- const { method, path, host, upgrade, blocking, reset } = request
1106
-
1107
- let { body, headers, contentLength } = request
1108
-
1109
- // https://tools.ietf.org/html/rfc7231#section-4.3.1
1110
- // https://tools.ietf.org/html/rfc7231#section-4.3.2
1111
- // https://tools.ietf.org/html/rfc7231#section-4.3.5
1112
-
1113
- // Sending a payload body on a request that does not
1114
- // expect it can cause undefined behavior on some
1115
- // servers and corrupt connection state. Do not
1116
- // re-use the connection for further requests.
1117
-
1118
- const expectsPayload = (
1119
- method === 'PUT' ||
1120
- method === 'POST' ||
1121
- method === 'PATCH' ||
1122
- method === 'QUERY' ||
1123
- method === 'PROPFIND' ||
1124
- method === 'PROPPATCH'
1125
- )
1126
-
1127
- if (util.isFormDataLike(body)) {
1128
- if (!extractBody) {
1129
- extractBody = require('../web/fetch/body.js').extractBody
1130
- }
1131
-
1132
- const [bodyStream, contentType] = extractBody(body)
1133
- if (request.contentType == null) {
1134
- headers.push('content-type', contentType)
1135
- }
1136
- body = bodyStream.stream
1137
- contentLength = bodyStream.length
1138
- } else if (util.isBlobLike(body) && request.contentType == null) {
1139
- const contentType = body.type
1140
- if (contentType) {
1141
- const contentTypeValue = `${contentType}`
1142
- if (!util.isValidHeaderValue(contentTypeValue)) {
1143
- util.errorRequest(client, request, new InvalidArgumentError('invalid content-type header'))
1144
- return false
1145
- }
1146
- headers.push('content-type', contentTypeValue)
1147
- }
1148
- }
1149
-
1150
- if (body && typeof body.read === 'function') {
1151
- // Try to read EOF in order to get length.
1152
- body.read(0)
1153
- }
1154
-
1155
- const bodyLength = util.bodyLength(body)
1156
-
1157
- contentLength = bodyLength ?? contentLength
1158
-
1159
- if (contentLength === null) {
1160
- contentLength = request.contentLength
1161
- }
1162
-
1163
- if (contentLength === 0 && !expectsPayload) {
1164
- // https://tools.ietf.org/html/rfc7230#section-3.3.2
1165
- // A user agent SHOULD NOT send a Content-Length header field when
1166
- // the request message does not contain a payload body and the method
1167
- // semantics do not anticipate such a body.
1168
-
1169
- contentLength = null
1170
- }
1171
-
1172
- // https://github.com/nodejs/undici/issues/2046
1173
- // A user agent may send a Content-Length header with 0 value, this should be allowed.
1174
- if (shouldSendContentLength(method) && contentLength > 0 && request.contentLength !== null && request.contentLength !== contentLength) {
1175
- if (client[kStrictContentLength]) {
1176
- util.errorRequest(client, request, new RequestContentLengthMismatchError())
1177
- return false
1178
- }
1179
-
1180
- process.emitWarning(new RequestContentLengthMismatchError())
1181
- }
1182
-
1183
- const socket = client[kSocket]
1184
- clearIdleSocketValidation(socket)
1185
-
1186
- /**
1187
- * @param {Error} [err]
1188
- * @returns {void}
1189
- */
1190
- const abort = (err) => {
1191
- if (request.aborted || request.completed) {
1192
- return
1193
- }
1194
-
1195
- util.errorRequest(client, request, err || new RequestAbortedError())
1196
-
1197
- util.destroy(body)
1198
- util.destroy(socket, new InformationalError('aborted'))
1199
- }
1200
-
1201
- try {
1202
- request.onConnect(abort)
1203
- } catch (err) {
1204
- util.errorRequest(client, request, err)
1205
- }
1206
-
1207
- if (request.aborted) {
1208
- return false
1209
- }
1210
-
1211
- if (method === 'HEAD') {
1212
- // https://github.com/mcollina/undici/issues/258
1213
- // Close after a HEAD request to interop with misbehaving servers
1214
- // that may send a body in the response.
1215
-
1216
- socket[kReset] = true
1217
- }
1218
-
1219
- if (upgrade || method === 'CONNECT') {
1220
- // On CONNECT or upgrade, block pipeline from dispatching further
1221
- // requests on this connection.
1222
-
1223
- socket[kReset] = true
1224
- }
1225
-
1226
- if (reset != null) {
1227
- socket[kReset] = reset
1228
- }
1229
-
1230
- if (client[kMaxRequests] && socket[kCounter]++ >= client[kMaxRequests]) {
1231
- socket[kReset] = true
1232
- }
1233
-
1234
- if (blocking) {
1235
- socket[kBlocking] = true
1236
- }
1237
-
1238
- if (socket.setTypeOfService) {
1239
- socket.setTypeOfService(request.typeOfService)
1240
- }
1241
-
1242
- let header = `${method} ${path} HTTP/1.1\r\n`
1243
-
1244
- if (typeof host === 'string') {
1245
- header += `host: ${host}\r\n`
1246
- } else {
1247
- header += client[kHostHeader]
1248
- }
1249
-
1250
- if (upgrade) {
1251
- header += `connection: upgrade\r\nupgrade: ${upgrade}\r\n`
1252
- } else if (client[kPipelining] && !socket[kReset]) {
1253
- header += 'connection: keep-alive\r\n'
1254
- } else {
1255
- header += 'connection: close\r\n'
1256
- }
1257
-
1258
- if (Array.isArray(headers)) {
1259
- for (let n = 0; n < headers.length; n += 2) {
1260
- const key = headers[n + 0]
1261
- const val = headers[n + 1]
1262
-
1263
- if (Array.isArray(val)) {
1264
- for (let i = 0; i < val.length; i++) {
1265
- header += `${key}: ${val[i]}\r\n`
1266
- }
1267
- } else {
1268
- header += `${key}: ${val}\r\n`
1269
- }
1270
- }
1271
- }
1272
-
1273
- if (channels.sendHeaders.hasSubscribers) {
1274
- channels.sendHeaders.publish({ request, headers: header, socket })
1275
- }
1276
-
1277
- if (!body || bodyLength === 0) {
1278
- writeBuffer(abort, null, client, request, socket, contentLength, header, expectsPayload)
1279
- } else if (util.isBuffer(body)) {
1280
- writeBuffer(abort, body, client, request, socket, contentLength, header, expectsPayload)
1281
- } else if (util.isBlobLike(body)) {
1282
- if (typeof body.stream === 'function') {
1283
- writeIterable(abort, body.stream(), client, request, socket, contentLength, header, expectsPayload)
1284
- } else {
1285
- writeBlob(abort, body, client, request, socket, contentLength, header, expectsPayload)
1286
- }
1287
- } else if (util.isStream(body)) {
1288
- writeStream(abort, body, client, request, socket, contentLength, header, expectsPayload)
1289
- } else if (util.isIterable(body)) {
1290
- writeIterable(abort, body, client, request, socket, contentLength, header, expectsPayload)
1291
- } else {
1292
- assert(false)
1293
- }
1294
-
1295
- return true
1296
- }
1297
-
1298
- /**
1299
- * @param {AbortCallback} abort
1300
- * @param {import('stream').Stream} body
1301
- * @param {import('./client.js')} client
1302
- * @param {import('../core/request.js')} request
1303
- * @param {import('net').Socket} socket
1304
- * @param {number} contentLength
1305
- * @param {string} header
1306
- * @param {boolean} expectsPayload
1307
- */
1308
- function writeStream (abort, body, client, request, socket, contentLength, header, expectsPayload) {
1309
- assert(contentLength !== 0 || client[kRunning] === 0, 'stream body cannot be pipelined')
1310
-
1311
- let finished = false
1312
-
1313
- const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header })
1314
-
1315
- /**
1316
- * @param {Buffer} chunk
1317
- * @returns {void}
1318
- */
1319
- const onData = function (chunk) {
1320
- if (finished) {
1321
- return
1322
- }
1323
-
1324
- try {
1325
- if (!writer.write(chunk) && this.pause) {
1326
- this.pause()
1327
- }
1328
- } catch (err) {
1329
- util.destroy(this, err)
1330
- }
1331
- }
1332
-
1333
- /**
1334
- * @returns {void}
1335
- */
1336
- const onDrain = function () {
1337
- if (finished) {
1338
- return
1339
- }
1340
-
1341
- if (body.resume) {
1342
- body.resume()
1343
- }
1344
- }
1345
-
1346
- /**
1347
- * @returns {void}
1348
- */
1349
- const onClose = function () {
1350
- // 'close' might be emitted *before* 'error' for
1351
- // broken streams. Wait a tick to avoid this case.
1352
- queueMicrotask(() => {
1353
- // It's only safe to remove 'error' listener after
1354
- // 'close'.
1355
- body.removeListener('error', onFinished)
1356
- })
1357
-
1358
- if (!finished) {
1359
- const err = new RequestAbortedError()
1360
- queueMicrotask(() => onFinished(err))
1361
- }
1362
- }
1363
-
1364
- /**
1365
- * @param {Error} [err]
1366
- * @returns
1367
- */
1368
- const onFinished = function (err) {
1369
- if (finished) {
1370
- return
1371
- }
1372
-
1373
- finished = true
1374
-
1375
- assert(socket.destroyed || (socket[kWriting] && client[kRunning] <= 1))
1376
-
1377
- socket
1378
- .off('drain', onDrain)
1379
- .off('error', onFinished)
1380
-
1381
- body
1382
- .removeListener('data', onData)
1383
- .removeListener('end', onFinished)
1384
- .removeListener('close', onClose)
1385
-
1386
- if (!err) {
1387
- try {
1388
- writer.end()
1389
- } catch (er) {
1390
- err = er
1391
- }
1392
- }
1393
-
1394
- writer.destroy(err)
1395
-
1396
- if (err && (err.code !== 'UND_ERR_INFO' || err.message !== 'reset')) {
1397
- util.destroy(body, err)
1398
- } else {
1399
- util.destroy(body)
1400
- }
1401
- }
1402
-
1403
- body
1404
- .on('data', onData)
1405
- .on('end', onFinished)
1406
- .on('error', onFinished)
1407
- .on('close', onClose)
1408
-
1409
- if (body.resume) {
1410
- body.resume()
1411
- }
1412
-
1413
- socket
1414
- .on('drain', onDrain)
1415
- .on('error', onFinished)
1416
-
1417
- if (body.errorEmitted ?? body.errored) {
1418
- setImmediate(onFinished, body.errored)
1419
- } else if (body.endEmitted ?? body.readableEnded) {
1420
- setImmediate(onFinished, null)
1421
- }
1422
-
1423
- if (body.closeEmitted ?? body.closed) {
1424
- setImmediate(onClose)
1425
- }
1426
- }
1427
-
1428
- /**
1429
- * @typedef AbortCallback
1430
- * @type {Function}
1431
- * @param {Error} [err]
1432
- * @returns {void}
1433
- */
1434
-
1435
- /**
1436
- * @param {AbortCallback} abort
1437
- * @param {Uint8Array|null} body
1438
- * @param {import('./client.js')} client
1439
- * @param {import('../core/request.js')} request
1440
- * @param {import('net').Socket} socket
1441
- * @param {number} contentLength
1442
- * @param {string} header
1443
- * @param {boolean} expectsPayload
1444
- * @returns {void}
1445
- */
1446
- function writeBuffer (abort, body, client, request, socket, contentLength, header, expectsPayload) {
1447
- try {
1448
- if (!body) {
1449
- if (contentLength === 0) {
1450
- socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1')
1451
- } else {
1452
- assert(contentLength === null, 'no body must not have content length')
1453
- socket.write(`${header}\r\n`, 'latin1')
1454
- }
1455
- } else if (util.isBuffer(body)) {
1456
- assert(contentLength === body.byteLength, 'buffer body must have content length')
1457
-
1458
- socket.cork()
1459
- socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1')
1460
- socket.write(body)
1461
- socket.uncork()
1462
- request.onBodySent(body)
1463
-
1464
- if (!expectsPayload && request.reset !== false) {
1465
- socket[kReset] = true
1466
- }
1467
- }
1468
- request.onRequestSent()
1469
-
1470
- client[kResume]()
1471
- } catch (err) {
1472
- abort(err)
1473
- }
1474
- }
1475
-
1476
- /**
1477
- * @param {AbortCallback} abort
1478
- * @param {Blob} body
1479
- * @param {import('./client.js')} client
1480
- * @param {import('../core/request.js')} request
1481
- * @param {import('net').Socket} socket
1482
- * @param {number} contentLength
1483
- * @param {string} header
1484
- * @param {boolean} expectsPayload
1485
- * @returns {Promise<void>}
1486
- */
1487
- async function writeBlob (abort, body, client, request, socket, contentLength, header, expectsPayload) {
1488
- assert(contentLength === body.size, 'blob body must have content length')
1489
-
1490
- try {
1491
- if (contentLength != null && contentLength !== body.size) {
1492
- throw new RequestContentLengthMismatchError()
1493
- }
1494
-
1495
- const buffer = Buffer.from(await body.arrayBuffer())
1496
-
1497
- socket.cork()
1498
- socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1')
1499
- socket.write(buffer)
1500
- socket.uncork()
1501
-
1502
- request.onBodySent(buffer)
1503
- request.onRequestSent()
1504
-
1505
- if (!expectsPayload && request.reset !== false) {
1506
- socket[kReset] = true
1507
- }
1508
-
1509
- client[kResume]()
1510
- } catch (err) {
1511
- abort(err)
1512
- }
1513
- }
1514
-
1515
- /**
1516
- * @param {AbortCallback} abort
1517
- * @param {Iterable} body
1518
- * @param {import('./client.js')} client
1519
- * @param {import('../core/request.js')} request
1520
- * @param {import('net').Socket} socket
1521
- * @param {number} contentLength
1522
- * @param {string} header
1523
- * @param {boolean} expectsPayload
1524
- * @returns {Promise<void>}
1525
- */
1526
- async function writeIterable (abort, body, client, request, socket, contentLength, header, expectsPayload) {
1527
- assert(contentLength !== 0 || client[kRunning] === 0, 'iterator body cannot be pipelined')
1528
-
1529
- let callback = null
1530
- function onDrain () {
1531
- if (callback) {
1532
- const cb = callback
1533
- callback = null
1534
- cb()
1535
- }
1536
- }
1537
-
1538
- const waitForDrain = () => new Promise((resolve, reject) => {
1539
- assert(callback === null)
1540
-
1541
- if (socket[kError]) {
1542
- reject(socket[kError])
1543
- } else {
1544
- callback = resolve
1545
- }
1546
- })
1547
-
1548
- socket
1549
- .on('close', onDrain)
1550
- .on('drain', onDrain)
1551
-
1552
- const writer = new AsyncWriter({ abort, socket, request, contentLength, client, expectsPayload, header })
1553
- try {
1554
- // It's up to the user to somehow abort the async iterable.
1555
- for await (const chunk of body) {
1556
- if (socket[kError]) {
1557
- throw socket[kError]
1558
- }
1559
-
1560
- if (!writer.write(chunk)) {
1561
- await waitForDrain()
1562
- }
1563
- }
1564
-
1565
- writer.end()
1566
- } catch (err) {
1567
- writer.destroy(err)
1568
- } finally {
1569
- socket
1570
- .off('close', onDrain)
1571
- .off('drain', onDrain)
1572
- }
1573
- }
1574
-
1575
- class AsyncWriter {
1576
- /**
1577
- *
1578
- * @param {object} arg
1579
- * @param {AbortCallback} arg.abort
1580
- * @param {import('net').Socket} arg.socket
1581
- * @param {import('../core/request.js')} arg.request
1582
- * @param {number} arg.contentLength
1583
- * @param {import('./client.js')} arg.client
1584
- * @param {boolean} arg.expectsPayload
1585
- * @param {string} arg.header
1586
- */
1587
- constructor ({ abort, socket, request, contentLength, client, expectsPayload, header }) {
1588
- this.socket = socket
1589
- this.request = request
1590
- this.contentLength = contentLength
1591
- this.client = client
1592
- this.bytesWritten = 0
1593
- this.expectsPayload = expectsPayload
1594
- this.header = header
1595
- this.abort = abort
1596
-
1597
- socket[kWriting] = true
1598
- }
1599
-
1600
- /**
1601
- * @param {Buffer} chunk
1602
- * @returns
1603
- */
1604
- write (chunk) {
1605
- const { socket, request, contentLength, client, bytesWritten, expectsPayload, header } = this
1606
-
1607
- if (socket[kError]) {
1608
- throw socket[kError]
1609
- }
1610
-
1611
- if (socket.destroyed) {
1612
- return false
1613
- }
1614
-
1615
- const len = Buffer.byteLength(chunk)
1616
- if (!len) {
1617
- return true
1618
- }
1619
-
1620
- // We should defer writing chunks.
1621
- if (contentLength !== null && bytesWritten + len > contentLength) {
1622
- if (client[kStrictContentLength]) {
1623
- throw new RequestContentLengthMismatchError()
1624
- }
1625
-
1626
- process.emitWarning(new RequestContentLengthMismatchError())
1627
- }
1628
-
1629
- socket.cork()
1630
-
1631
- if (bytesWritten === 0) {
1632
- if (!expectsPayload && request.reset !== false) {
1633
- socket[kReset] = true
1634
- }
1635
-
1636
- if (contentLength === null) {
1637
- socket.write(`${header}transfer-encoding: chunked\r\n`, 'latin1')
1638
- } else {
1639
- socket.write(`${header}content-length: ${contentLength}\r\n\r\n`, 'latin1')
1640
- }
1641
- }
1642
-
1643
- if (contentLength === null) {
1644
- socket.write(`\r\n${len.toString(16)}\r\n`, 'latin1')
1645
- }
1646
-
1647
- this.bytesWritten += len
1648
-
1649
- const ret = socket.write(chunk)
1650
-
1651
- socket.uncork()
1652
-
1653
- request.onBodySent(chunk)
1654
-
1655
- if (!ret) {
1656
- if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) {
1657
- if (socket[kParser].timeout.refresh) {
1658
- socket[kParser].timeout.refresh()
1659
- }
1660
- }
1661
- }
1662
-
1663
- return ret
1664
- }
1665
-
1666
- /**
1667
- * @returns {void}
1668
- */
1669
- end () {
1670
- const { socket, contentLength, client, bytesWritten, expectsPayload, header, request } = this
1671
- request.onRequestSent()
1672
-
1673
- socket[kWriting] = false
1674
-
1675
- if (socket[kError]) {
1676
- throw socket[kError]
1677
- }
1678
-
1679
- if (socket.destroyed) {
1680
- return
1681
- }
1682
-
1683
- if (bytesWritten === 0) {
1684
- if (expectsPayload) {
1685
- // https://tools.ietf.org/html/rfc7230#section-3.3.2
1686
- // A user agent SHOULD send a Content-Length in a request message when
1687
- // no Transfer-Encoding is sent and the request method defines a meaning
1688
- // for an enclosed payload body.
1689
-
1690
- socket.write(`${header}content-length: 0\r\n\r\n`, 'latin1')
1691
- } else {
1692
- socket.write(`${header}\r\n`, 'latin1')
1693
- }
1694
- } else if (contentLength === null) {
1695
- socket.write('\r\n0\r\n\r\n', 'latin1')
1696
- }
1697
-
1698
- if (contentLength !== null && bytesWritten !== contentLength) {
1699
- if (client[kStrictContentLength]) {
1700
- throw new RequestContentLengthMismatchError()
1701
- } else {
1702
- process.emitWarning(new RequestContentLengthMismatchError())
1703
- }
1704
- }
1705
-
1706
- if (socket[kParser].timeout && socket[kParser].timeoutType === TIMEOUT_HEADERS) {
1707
- if (socket[kParser].timeout.refresh) {
1708
- socket[kParser].timeout.refresh()
1709
- }
1710
- }
1711
-
1712
- client[kResume]()
1713
- }
1714
-
1715
- /**
1716
- * @param {Error} [err]
1717
- * @returns {void}
1718
- */
1719
- destroy (err) {
1720
- const { socket, client, abort } = this
1721
-
1722
- socket[kWriting] = false
1723
-
1724
- if (err) {
1725
- assert(client[kRunning] <= 1, 'pipeline should only contain this request')
1726
- abort(err)
1727
- }
1728
- }
1729
- }
1730
-
1731
- module.exports = connectH1