9router 0.5.116 → 0.5.119

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 (712) hide show
  1. package/README.md +2 -2
  2. package/app/.next-cli-build/BUILD_ID +1 -1
  3. package/app/.next-cli-build/app-path-routes-manifest.json +4 -4
  4. package/app/.next-cli-build/build-manifest.json +2 -2
  5. package/app/.next-cli-build/prerender-manifest.json +3 -3
  6. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
  7. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
  8. package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
  9. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
  10. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
  11. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
  12. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
  13. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
  14. package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
  15. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
  16. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
  17. package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
  18. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
  19. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
  20. package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
  21. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
  22. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
  23. package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
  24. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +12 -12
  25. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
  26. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
  27. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
  28. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
  29. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
  30. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
  31. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
  32. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
  33. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
  34. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
  35. package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
  36. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
  37. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
  38. package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
  39. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
  40. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
  41. package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
  42. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
  43. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
  44. package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
  45. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
  46. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
  47. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
  48. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
  49. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
  50. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
  51. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
  52. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
  53. package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
  54. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
  55. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
  56. package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
  57. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
  58. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
  59. package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
  60. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
  61. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
  62. package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
  63. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
  64. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
  65. package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
  66. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
  67. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
  68. package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
  69. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
  70. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
  71. package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
  72. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
  73. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
  74. package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
  75. package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
  76. package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
  77. package/app/.next-cli-build/server/app/_global-error.html +1 -1
  78. package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
  79. package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
  80. package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  81. package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  82. package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
  83. package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
  84. package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
  85. package/app/.next-cli-build/server/app/_not-found.html +1 -1
  86. package/app/.next-cli-build/server/app/_not-found.rsc +3 -3
  87. package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
  88. package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
  89. package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
  90. package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
  91. package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
  92. package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
  93. package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
  94. package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
  95. package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
  96. package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
  97. package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
  98. package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
  99. package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
  100. package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
  101. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +1 -1
  102. package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
  103. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
  104. package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
  105. package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
  106. package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
  107. package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
  108. package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
  109. package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
  110. package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
  111. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
  112. package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
  113. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
  114. package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
  115. package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
  116. package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
  117. package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
  118. package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
  119. package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
  120. package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
  121. package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
  122. package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
  123. package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
  124. package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
  125. package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
  126. package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
  127. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
  128. package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
  129. package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
  130. package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
  131. package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
  132. package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
  133. package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
  134. package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
  135. package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
  136. package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
  137. package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
  138. package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
  139. package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
  140. package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
  141. package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
  142. package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
  143. package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
  144. package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
  145. package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
  146. package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
  147. package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
  148. package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
  149. package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
  150. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
  151. package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
  152. package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
  153. package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
  154. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
  155. package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
  156. package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
  157. package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
  158. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
  159. package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
  160. package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
  161. package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
  162. package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
  163. package/app/.next-cli-build/server/app/api/models/route.js +1 -1
  164. package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
  165. package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
  166. package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
  167. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
  168. package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
  169. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
  170. package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
  171. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
  172. package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
  173. package/app/.next-cli-build/server/app/api/oauth/commandcode/auto-import/route.js.nft.json +1 -1
  174. package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
  175. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
  176. package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
  177. package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
  178. package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
  179. package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
  180. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
  181. package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
  182. package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
  183. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
  184. package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
  185. package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
  186. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
  187. package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
  188. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
  189. package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
  190. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
  191. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +1 -1
  192. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
  193. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
  194. package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
  195. package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
  196. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
  197. package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
  198. package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
  199. package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
  200. package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
  201. package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
  202. package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
  203. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
  204. package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
  205. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
  206. package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
  207. package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
  208. package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
  209. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
  210. package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
  211. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
  212. package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
  213. package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
  214. package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
  215. package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
  216. package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
  217. package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
  218. package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
  219. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
  220. package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
  221. package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
  222. package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
  223. package/app/.next-cli-build/server/app/api/providers/web-login/route.js +1 -1
  224. package/app/.next-cli-build/server/app/api/providers/web-login/route.js.nft.json +1 -1
  225. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
  226. package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
  227. package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
  228. package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
  229. package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -1
  230. package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
  231. package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
  232. package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
  233. package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
  234. package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
  235. package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
  236. package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
  237. package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
  238. package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
  239. package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
  240. package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
  241. package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
  242. package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
  243. package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
  244. package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
  245. package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
  246. package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
  247. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
  248. package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
  249. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
  250. package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
  251. package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
  252. package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
  253. package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
  254. package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
  255. package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
  256. package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
  257. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
  258. package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
  259. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
  260. package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
  261. package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
  262. package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
  263. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
  264. package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
  265. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
  266. package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
  267. package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
  268. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
  269. package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
  270. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
  271. package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
  272. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
  273. package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
  274. package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
  275. package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
  276. package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
  277. package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
  278. package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
  279. package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
  280. package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
  281. package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
  282. package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
  283. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
  284. package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
  285. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
  286. package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
  287. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +4 -4
  288. package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
  289. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
  290. package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
  291. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
  292. package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
  293. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
  294. package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
  295. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +3 -3
  296. package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
  297. package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
  298. package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
  299. package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
  300. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
  301. package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
  302. package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
  303. package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
  304. package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
  305. package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
  306. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
  307. package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
  308. package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
  309. package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
  310. package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
  311. package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
  312. package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
  313. package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
  314. package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
  315. package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
  316. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
  317. package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
  318. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
  319. package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
  320. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
  321. package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
  322. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
  323. package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
  324. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
  325. package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
  326. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
  327. package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
  328. package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
  329. package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
  330. package/app/.next-cli-build/server/app/api/version/route.js +1 -1
  331. package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
  332. package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
  333. package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
  334. package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
  335. package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
  336. package/app/.next-cli-build/server/app/callback/page.js +1 -1
  337. package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
  338. package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
  339. package/app/.next-cli-build/server/app/callback.html +1 -1
  340. package/app/.next-cli-build/server/app/callback.rsc +3 -3
  341. package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
  342. package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
  343. package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +3 -3
  344. package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
  345. package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +3 -3
  346. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +3 -3
  347. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +3 -3
  348. package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
  349. package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
  350. package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
  351. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +6 -6
  352. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
  353. package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
  354. package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
  355. package/app/.next-cli-build/server/app/dashboard/combos.rsc +3 -3
  356. package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +3 -3
  357. package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +3 -3
  358. package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
  359. package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
  360. package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +3 -3
  361. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +3 -3
  362. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +3 -3
  363. package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
  364. package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
  365. package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +3 -3
  366. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +3 -3
  367. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +3 -3
  368. package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
  369. package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
  370. package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
  371. package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +6 -6
  372. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
  373. package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
  374. package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
  375. package/app/.next-cli-build/server/app/dashboard/profile.rsc +3 -3
  376. package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +3 -3
  377. package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +3 -3
  378. package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
  379. package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
  380. package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +3 -3
  381. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +3 -3
  382. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +3 -3
  383. package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
  384. package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
  385. package/app/.next-cli-build/server/app/dashboard/providers.rsc +3 -3
  386. package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +3 -3
  387. package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +3 -3
  388. package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
  389. package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
  390. package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
  391. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +5 -5
  392. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
  393. package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
  394. package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
  395. package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +3 -3
  396. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +3 -3
  397. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +3 -3
  398. package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
  399. package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
  400. package/app/.next-cli-build/server/app/dashboard/quota.rsc +4 -4
  401. package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +4 -4
  402. package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +4 -4
  403. package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
  404. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
  405. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
  406. package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
  407. package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
  408. package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
  409. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
  410. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
  411. package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +3 -3
  412. package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
  413. package/app/.next-cli-build/server/app/dashboard/skills.rsc +3 -3
  414. package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +3 -3
  415. package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +3 -3
  416. package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
  417. package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
  418. package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +3 -3
  419. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +3 -3
  420. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +3 -3
  421. package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
  422. package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
  423. package/app/.next-cli-build/server/app/dashboard/translator.rsc +3 -3
  424. package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +3 -3
  425. package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +3 -3
  426. package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
  427. package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
  428. package/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
  429. package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +5 -5
  430. package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
  431. package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
  432. package/app/.next-cli-build/server/app/dashboard.html +1 -1
  433. package/app/.next-cli-build/server/app/dashboard.rsc +3 -3
  434. package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +3 -3
  435. package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +3 -3
  436. package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
  437. package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
  438. package/app/.next-cli-build/server/app/index.html +1 -1
  439. package/app/.next-cli-build/server/app/index.rsc +3 -3
  440. package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +3 -3
  441. package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
  442. package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
  443. package/app/.next-cli-build/server/app/landing/page.js +1 -1
  444. package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
  445. package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
  446. package/app/.next-cli-build/server/app/landing.html +1 -1
  447. package/app/.next-cli-build/server/app/landing.rsc +3 -3
  448. package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
  449. package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
  450. package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +3 -3
  451. package/app/.next-cli-build/server/app/login/page.js +1 -1
  452. package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
  453. package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
  454. package/app/.next-cli-build/server/app/login.html +1 -1
  455. package/app/.next-cli-build/server/app/login.rsc +3 -3
  456. package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +3 -3
  457. package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
  458. package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +3 -3
  459. package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
  460. package/app/.next-cli-build/server/app/page.js +1 -1
  461. package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
  462. package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
  463. package/app/.next-cli-build/server/app-paths-manifest.json +4 -4
  464. package/app/.next-cli-build/server/chunks/1051.js +1 -1
  465. package/app/.next-cli-build/server/chunks/1133.js +1 -1
  466. package/app/.next-cli-build/server/chunks/{2380.js → 1297.js} +3 -53
  467. package/app/.next-cli-build/server/chunks/1356.js +1 -1
  468. package/app/.next-cli-build/server/chunks/{2365.js → 1866.js} +1 -1
  469. package/app/.next-cli-build/server/chunks/24.js +1 -1
  470. package/app/.next-cli-build/server/chunks/2598.js +1 -1
  471. package/app/.next-cli-build/server/chunks/2840.js +1 -0
  472. package/app/.next-cli-build/server/chunks/3225.js +1 -1
  473. package/app/.next-cli-build/server/chunks/3697.js +1 -1
  474. package/app/.next-cli-build/server/chunks/3943.js +1 -1
  475. package/app/.next-cli-build/server/chunks/412.js +5 -5
  476. package/app/.next-cli-build/server/chunks/4123.js +1 -1
  477. package/app/.next-cli-build/server/chunks/4279.js +1 -1
  478. package/app/.next-cli-build/server/chunks/4882.js +1 -1
  479. package/app/.next-cli-build/server/chunks/{3783.js → 5299.js} +3 -3
  480. package/app/.next-cli-build/server/chunks/5330.js +34 -34
  481. package/app/.next-cli-build/server/chunks/5615.js +1 -1
  482. package/app/.next-cli-build/server/chunks/6070.js +1 -1
  483. package/app/.next-cli-build/server/chunks/615.js +1 -1
  484. package/app/.next-cli-build/server/chunks/6297.js +1 -0
  485. package/app/.next-cli-build/server/chunks/6576.js +1 -0
  486. package/app/.next-cli-build/server/chunks/6690.js +1 -1
  487. package/app/.next-cli-build/server/chunks/6724.js +1 -1
  488. package/app/.next-cli-build/server/chunks/6763.js +1 -1
  489. package/app/.next-cli-build/server/chunks/6877.js +1 -1
  490. package/app/.next-cli-build/server/chunks/7187.js +1 -1
  491. package/app/.next-cli-build/server/chunks/7247.js +1 -1
  492. package/app/.next-cli-build/server/chunks/7373.js +1 -1
  493. package/app/.next-cli-build/server/chunks/7525.js +1 -1
  494. package/app/.next-cli-build/server/chunks/7552.js +1 -1
  495. package/app/.next-cli-build/server/chunks/7716.js +1 -1
  496. package/app/.next-cli-build/server/chunks/7843.js +51 -0
  497. package/app/.next-cli-build/server/chunks/8251.js +1 -1
  498. package/app/.next-cli-build/server/chunks/8271.js +1 -1
  499. package/app/.next-cli-build/server/chunks/8402.js +1 -1
  500. package/app/.next-cli-build/server/chunks/8416.js +1 -1
  501. package/app/.next-cli-build/server/chunks/8623.js +1 -1
  502. package/app/.next-cli-build/server/chunks/866.js +1 -0
  503. package/app/.next-cli-build/server/chunks/869.js +1 -1
  504. package/app/.next-cli-build/server/chunks/8895.js +3 -3
  505. package/app/.next-cli-build/server/chunks/8896.js +1 -1
  506. package/app/.next-cli-build/server/chunks/8920.js +1 -1
  507. package/app/.next-cli-build/server/chunks/9128.js +1 -1
  508. package/app/.next-cli-build/server/chunks/9198.js +1 -0
  509. package/app/.next-cli-build/server/chunks/9489.js +1 -1
  510. package/app/.next-cli-build/server/chunks/9604.js +1 -1
  511. package/app/.next-cli-build/server/chunks/9609.js +1 -1
  512. package/app/.next-cli-build/server/instrumentation.js +1 -1
  513. package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
  514. package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
  515. package/app/.next-cli-build/server/middleware.js +1 -1
  516. package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
  517. package/app/.next-cli-build/server/pages/404.html +1 -1
  518. package/app/.next-cli-build/server/pages/500.html +1 -1
  519. package/app/.next-cli-build/static/chunks/1321-2fde166305caeddb.js +1 -0
  520. package/app/.next-cli-build/static/chunks/5497-2d39b4ce6857f490.js +7 -0
  521. package/app/.next-cli-build/static/chunks/{9134-07842c4023ec2223.js → 761-4ab39a76a6565658.js} +10 -10
  522. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-dde07454165b542e.js → page-9fe240988c674585.js} +1 -1
  523. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-0e889b3c170b388d.js → page-2e6e4ef7c270a4ff.js} +1 -1
  524. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-0688449cf035f993.js → page-899c85a4a09b87cc.js} +11 -11
  525. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-38924c451fb16b6e.js → page-2f96a614dc53d80f.js} +1 -1
  526. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-c13b42f0dbad8fcd.js +27 -0
  527. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-8f7c68a9ddffe74b.js +4 -0
  528. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-9782a8d4c3075073.js → page-6923bda560bbc869.js} +1 -1
  529. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-3b1b5d8e342d932f.js +1 -0
  530. package/app/cli/.build-home/.9router/db/data.sqlite +0 -0
  531. package/app/node_modules/undici/README.md +28 -115
  532. package/app/node_modules/undici/docs/docs/api/Agent.md +42 -249
  533. package/app/node_modules/undici/docs/docs/api/BalancedPool.md +48 -246
  534. package/app/node_modules/undici/docs/docs/api/CacheStorage.md +13 -171
  535. package/app/node_modules/undici/docs/docs/api/CacheStore.md +98 -309
  536. package/app/node_modules/undici/docs/docs/api/Client.md +164 -412
  537. package/app/node_modules/undici/docs/docs/api/ClientStats.md +14 -80
  538. package/app/node_modules/undici/docs/docs/api/Connector.md +35 -118
  539. package/app/node_modules/undici/docs/docs/api/ContentType.md +25 -65
  540. package/app/node_modules/undici/docs/docs/api/Cookies.md +71 -122
  541. package/app/node_modules/undici/docs/docs/api/Debug.md +18 -34
  542. package/app/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +167 -368
  543. package/app/node_modules/undici/docs/docs/api/Dispatcher.md +1056 -502
  544. package/app/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +93 -105
  545. package/app/node_modules/undici/docs/docs/api/Errors.md +28 -603
  546. package/app/node_modules/undici/docs/docs/api/EventSource.md +13 -326
  547. package/app/node_modules/undici/docs/docs/api/Fetch.md +30 -691
  548. package/app/node_modules/undici/docs/docs/api/GlobalInstallation.md +96 -78
  549. package/app/node_modules/undici/docs/docs/api/H2CClient.md +176 -299
  550. package/app/node_modules/undici/docs/docs/api/MockAgent.md +314 -333
  551. package/app/node_modules/undici/docs/docs/api/MockCallHistory.md +98 -272
  552. package/app/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +26 -189
  553. package/app/node_modules/undici/docs/docs/api/MockClient.md +33 -151
  554. package/app/node_modules/undici/docs/docs/api/MockErrors.md +5 -56
  555. package/app/node_modules/undici/docs/docs/api/MockPool.md +258 -321
  556. package/app/node_modules/undici/docs/docs/api/Pool.md +41 -235
  557. package/app/node_modules/undici/docs/docs/api/PoolStats.md +13 -119
  558. package/app/node_modules/undici/docs/docs/api/ProxyAgent.md +160 -179
  559. package/app/node_modules/undici/docs/docs/api/RedirectHandler.md +55 -241
  560. package/app/node_modules/undici/docs/docs/api/RetryAgent.md +27 -113
  561. package/app/node_modules/undici/docs/docs/api/RetryHandler.md +79 -161
  562. package/app/node_modules/undici/docs/docs/api/RoundRobinPool.md +72 -166
  563. package/app/node_modules/undici/docs/docs/api/SnapshotAgent.md +517 -262
  564. package/app/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +196 -177
  565. package/app/node_modules/undici/docs/docs/api/Util.md +11 -68
  566. package/app/node_modules/undici/docs/docs/api/WebSocket.md +80 -475
  567. package/app/node_modules/undici/docs/docs/api/api-lifecycle.md +32 -100
  568. package/app/node_modules/undici/docs/docs/best-practices/client-certificate.md +0 -2
  569. package/app/node_modules/undici/docs/docs/best-practices/crawling.md +1 -3
  570. package/app/node_modules/undici/docs/docs/best-practices/mocking-request.md +7 -9
  571. package/app/node_modules/undici/docs/docs/best-practices/proxy.md +1 -3
  572. package/app/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +8 -10
  573. package/app/node_modules/undici/docs/docs/best-practices/writing-tests.md +0 -2
  574. package/app/node_modules/undici/index.js +2 -4
  575. package/app/node_modules/undici/lib/api/api-connect.js +11 -13
  576. package/app/node_modules/undici/lib/api/api-pipeline.js +13 -26
  577. package/app/node_modules/undici/lib/api/api-request.js +21 -51
  578. package/app/node_modules/undici/lib/api/api-stream.js +20 -81
  579. package/app/node_modules/undici/lib/api/api-upgrade.js +11 -21
  580. package/app/node_modules/undici/lib/api/readable.js +11 -46
  581. package/app/node_modules/undici/lib/cache/memory-cache-store.js +15 -50
  582. package/app/node_modules/undici/lib/cache/sqlite-cache-store.js +7 -85
  583. package/app/node_modules/undici/lib/core/connect.js +7 -46
  584. package/app/node_modules/undici/lib/core/constants.js +23 -11
  585. package/app/node_modules/undici/lib/core/errors.js +3 -60
  586. package/app/node_modules/undici/lib/core/request.js +19 -116
  587. package/app/node_modules/undici/lib/core/symbols.js +0 -5
  588. package/app/node_modules/undici/lib/core/util.js +88 -110
  589. package/app/node_modules/undici/lib/dispatcher/agent.js +32 -51
  590. package/app/node_modules/undici/lib/dispatcher/balanced-pool.js +27 -23
  591. package/app/node_modules/undici/lib/dispatcher/client-h1.js +88 -163
  592. package/app/node_modules/undici/lib/dispatcher/client-h2.js +373 -1249
  593. package/app/node_modules/undici/lib/dispatcher/client.js +34 -114
  594. package/app/node_modules/undici/lib/dispatcher/dispatcher-base.js +8 -10
  595. package/app/node_modules/undici/lib/dispatcher/dispatcher.js +5 -15
  596. package/app/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +13 -57
  597. package/app/node_modules/undici/lib/dispatcher/h2c-client.js +4 -4
  598. package/app/node_modules/undici/lib/dispatcher/pool-base.js +27 -160
  599. package/app/node_modules/undici/lib/dispatcher/pool.js +16 -127
  600. package/app/node_modules/undici/lib/dispatcher/proxy-agent.js +29 -128
  601. package/app/node_modules/undici/lib/dispatcher/retry-agent.js +0 -13
  602. package/app/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -47
  603. package/app/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +63 -153
  604. package/app/node_modules/undici/lib/global.js +14 -37
  605. package/app/node_modules/undici/lib/handler/cache-handler.js +358 -133
  606. package/app/node_modules/undici/lib/handler/cache-revalidation-handler.js +0 -10
  607. package/app/node_modules/undici/lib/handler/decorator-handler.js +3 -8
  608. package/app/node_modules/undici/lib/handler/deduplication-handler.js +38 -74
  609. package/app/node_modules/undici/lib/handler/redirect-handler.js +103 -93
  610. package/app/node_modules/undici/lib/handler/retry-handler.js +45 -227
  611. package/app/node_modules/undici/lib/handler/unwrap-handler.js +106 -0
  612. package/app/node_modules/undici/lib/handler/wrap-handler.js +105 -0
  613. package/app/node_modules/undici/lib/interceptor/cache.js +140 -76
  614. package/app/node_modules/undici/lib/interceptor/decompress.js +5 -12
  615. package/app/node_modules/undici/lib/interceptor/deduplicate.js +4 -5
  616. package/app/node_modules/undici/lib/interceptor/dns.js +1 -23
  617. package/app/node_modules/undici/lib/interceptor/redirect.js +3 -3
  618. package/app/node_modules/undici/lib/interceptor/response-error.js +28 -72
  619. package/app/node_modules/undici/lib/llhttp/.gitkeep +0 -0
  620. package/app/node_modules/undici/lib/llhttp/llhttp-wasm.js +1 -1
  621. package/app/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +1 -1
  622. package/app/node_modules/undici/lib/mock/mock-agent.js +9 -32
  623. package/app/node_modules/undici/lib/mock/mock-call-history.js +1 -1
  624. package/app/node_modules/undici/lib/mock/mock-interceptor.js +7 -25
  625. package/app/node_modules/undici/lib/mock/mock-utils.js +47 -281
  626. package/app/node_modules/undici/lib/mock/snapshot-agent.js +7 -25
  627. package/app/node_modules/undici/lib/mock/snapshot-recorder.js +5 -41
  628. package/app/node_modules/undici/lib/mock/snapshot-utils.js +2 -3
  629. package/app/node_modules/undici/lib/util/cache.js +14 -69
  630. package/app/node_modules/undici/lib/util/promise.js +28 -0
  631. package/app/node_modules/undici/lib/util/runtime-features.js +34 -3
  632. package/app/node_modules/undici/lib/web/cache/cache.js +16 -23
  633. package/app/node_modules/undici/lib/web/cache/cachestorage.js +5 -11
  634. package/app/node_modules/undici/lib/web/cookies/index.js +6 -16
  635. package/app/node_modules/undici/lib/web/cookies/parse.js +4 -7
  636. package/app/node_modules/undici/lib/web/cookies/util.js +1 -1
  637. package/app/node_modules/undici/lib/web/eventsource/eventsource.js +23 -66
  638. package/app/node_modules/undici/lib/web/eventsource/util.js +1 -32
  639. package/app/node_modules/undici/lib/web/fetch/body.js +25 -70
  640. package/app/node_modules/undici/lib/web/fetch/constants.js +1 -1
  641. package/app/node_modules/undici/lib/web/fetch/data-url.js +6 -6
  642. package/app/node_modules/undici/lib/web/fetch/formdata-parser.js +4 -12
  643. package/app/node_modules/undici/lib/web/fetch/formdata.js +26 -39
  644. package/app/node_modules/undici/lib/web/fetch/headers.js +33 -36
  645. package/app/node_modules/undici/lib/web/fetch/index.js +250 -294
  646. package/app/node_modules/undici/lib/web/fetch/request.js +75 -99
  647. package/app/node_modules/undici/lib/web/fetch/response.js +47 -44
  648. package/app/node_modules/undici/lib/web/fetch/util.js +9 -17
  649. package/app/node_modules/undici/lib/web/infra/index.js +14 -15
  650. package/app/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +2 -2
  651. package/app/node_modules/undici/lib/web/webidl/index.js +21 -7
  652. package/app/node_modules/undici/lib/web/websocket/connection.js +5 -16
  653. package/app/node_modules/undici/lib/web/websocket/events.js +26 -43
  654. package/app/node_modules/undici/lib/web/websocket/frame.js +7 -1
  655. package/app/node_modules/undici/lib/web/websocket/receiver.js +3 -13
  656. package/app/node_modules/undici/lib/web/websocket/stream/websocketerror.js +10 -13
  657. package/app/node_modules/undici/lib/web/websocket/stream/websocketstream.js +14 -29
  658. package/app/node_modules/undici/lib/web/websocket/websocket.js +40 -65
  659. package/app/node_modules/undici/package.json +13 -15
  660. package/app/node_modules/undici/types/agent.d.ts +2 -0
  661. package/app/node_modules/undici/types/api.d.ts +1 -1
  662. package/app/node_modules/undici/types/cache-interceptor.d.ts +0 -10
  663. package/app/node_modules/undici/types/client.d.ts +27 -64
  664. package/app/node_modules/undici/types/connector.d.ts +0 -1
  665. package/app/node_modules/undici/types/cookies.d.ts +1 -1
  666. package/app/node_modules/undici/types/diagnostics-channel.d.ts +1 -2
  667. package/app/node_modules/undici/types/dispatcher.d.ts +29 -7
  668. package/app/node_modules/undici/types/errors.d.ts +1 -26
  669. package/app/node_modules/undici/types/fetch.d.ts +1 -5
  670. package/app/node_modules/undici/types/formdata.d.ts +6 -0
  671. package/app/node_modules/undici/types/h2c-client.d.ts +7 -7
  672. package/app/node_modules/undici/types/handlers.d.ts +0 -2
  673. package/app/node_modules/undici/types/header.d.ts +0 -5
  674. package/app/node_modules/undici/types/index.d.ts +1 -3
  675. package/app/node_modules/undici/types/interceptors.d.ts +2 -7
  676. package/app/node_modules/undici/types/mock-agent.d.ts +10 -11
  677. package/app/node_modules/undici/types/mock-interceptor.d.ts +1 -5
  678. package/app/node_modules/undici/types/pool.d.ts +2 -0
  679. package/app/node_modules/undici/types/proxy-agent.d.ts +2 -9
  680. package/app/node_modules/undici/types/round-robin-pool.d.ts +2 -0
  681. package/app/node_modules/undici/types/snapshot-agent.d.ts +0 -4
  682. package/app/node_modules/undici/types/socks5-proxy-agent.d.ts +2 -4
  683. package/app/node_modules/undici/types/utility.d.ts +4 -4
  684. package/app/node_modules/undici/types/webidl.d.ts +8 -13
  685. package/app/package.json +5 -2
  686. package/app/public/providers/sensenova-intl.png +0 -0
  687. package/app/src/shared/services/quotaAutoPing.js +17 -2
  688. package/package.json +2 -2
  689. package/app/.next-cli-build/server/chunks/1004.js +0 -1
  690. package/app/.next-cli-build/server/chunks/4480.js +0 -1
  691. package/app/.next-cli-build/server/chunks/7573.js +0 -1
  692. package/app/.next-cli-build/server/chunks/8499.js +0 -1
  693. package/app/.next-cli-build/server/chunks/9102.js +0 -1
  694. package/app/.next-cli-build/static/chunks/1321-93eb6ca56f8fcb1e.js +0 -1
  695. package/app/.next-cli-build/static/chunks/5497-870732fd9d818574.js +0 -7
  696. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-f98f1e29fd6fc471.js +0 -27
  697. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-e5d73ba422004783.js +0 -4
  698. package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-888c58ee93724e20.js +0 -1
  699. package/app/node_modules/undici/docs/docs/api/Interceptors.md +0 -439
  700. package/app/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +0 -233
  701. package/app/node_modules/undici/docs/docs/getting-started.md +0 -281
  702. package/app/node_modules/undici/docs/docs/index.md +0 -793
  703. package/app/node_modules/undici/docs/docs/site.json +0 -125
  704. package/app/node_modules/undici/docs/docs/type-map.json +0 -79
  705. package/app/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +0 -127
  706. package/app/node_modules/undici/lib/dispatcher/parser-h1.js +0 -1064
  707. package/app/node_modules/undici/lib/milo/LICENSE.md +0 -7
  708. package/app/node_modules/undici/lib/milo/no-simd.js +0 -1002
  709. package/app/node_modules/undici/lib/milo/simd.js +0 -1002
  710. package/app/node_modules/undici/types/dispatcher1-wrapper.d.ts +0 -7
  711. /package/app/.next-cli-build/static/{Z4ZIksyhEDiaIj7-73igf → 5PG9DiG39fbvOpgKSnR7p}/_buildManifest.js +0 -0
  712. /package/app/.next-cli-build/static/{Z4ZIksyhEDiaIj7-73igf → 5PG9DiG39fbvOpgKSnR7p}/_ssgManifest.js +0 -0
@@ -1,1064 +0,0 @@
1
- 'use strict'
2
-
3
- const assert = require('node:assert')
4
- const util = require('../core/util.js')
5
- const timers = require('../util/timers.js')
6
- const {
7
- HeadersTimeoutError,
8
- HeadersOverflowError,
9
- SocketError,
10
- InformationalError,
11
- BodyTimeoutError,
12
- HTTPParserError,
13
- ResponseContentLengthMismatchError,
14
- ResponseExceededMaxSizeError
15
- } = require('../core/errors.js')
16
- const {
17
- kUrl,
18
- kReset,
19
- kClient,
20
- kParser,
21
- kBlocking,
22
- kRunning,
23
- kWriting,
24
- kQueue,
25
- kKeepAliveDefaultTimeout,
26
- kRunningIdx,
27
- kError,
28
- kPipelining,
29
- kSocket,
30
- kKeepAliveTimeoutValue,
31
- kKeepAliveMaxTimeout,
32
- kKeepAliveTimeoutThreshold,
33
- kBodyTimeout,
34
- kMaxResponseSize,
35
- kResume,
36
- kHTTPContext,
37
- kMaxHeadersSize
38
- } = require('../core/symbols.js')
39
-
40
- const FastBuffer = Buffer[Symbol.species]
41
- const removeAllListeners = util.removeAllListeners
42
-
43
- const kPausedByHandler = Symbol('kPausedByHandler')
44
-
45
- const BUFFER_PAGE_SIZE = 4096
46
- const INITIAL_BUFFER_SIZE = 128 * 1024
47
- const EMPTY_BUF = Buffer.alloc(0)
48
- const BODY_KIND_CONTENT_LENGTH = 0
49
- const EVENT_RANGE_SIZE = 9
50
- const EVENT_HEADERS_SIZE = 19
51
-
52
- let miloPackage
53
-
54
- // We disable wasm SIMD on ppc64 as it seems to be broken on Power 9 architectures.
55
- let useWasmSIMD = process.arch !== 'ppc64'
56
- // The Env Variable UNDICI_NO_WASM_SIMD allows explicitly overriding the default behavior.
57
- if (process.env.UNDICI_NO_WASM_SIMD === '1') {
58
- useWasmSIMD = false
59
- } else if (process.env.UNDICI_NO_WASM_SIMD === '0') {
60
- useWasmSIMD = true
61
- }
62
-
63
- const USE_NATIVE_TIMER = 0
64
- const USE_FAST_TIMER = 1
65
- const TIMEOUT_HEADERS = 2 | USE_FAST_TIMER
66
- const TIMEOUT_BODY = 4 | USE_FAST_TIMER
67
- const TIMEOUT_KEEP_ALIVE = 8 | USE_NATIVE_TIMER
68
-
69
- let miloEnabled =
70
- process.env.UNDICI_USE_MILO === '1' || process.env.UNDICI_USE_MILO === 'true'
71
- let miloInstance = null
72
- let currentBuffer = null
73
- let currentBufferSize = 0
74
- let currentBufferPtr = null
75
- let currentBufferRef = null
76
-
77
- function onParserTimeout (parserWeakRef) {
78
- const parser = parserWeakRef.deref ? parserWeakRef.deref() : parserWeakRef
79
- if (!parser) {
80
- return
81
- }
82
-
83
- const { socket, timeoutType, client, paused } = parser
84
-
85
- if (timeoutType === TIMEOUT_HEADERS) {
86
- if (!socket[kWriting] || socket.writableNeedDrain || client[kRunning] > 1) {
87
- assert(!paused, 'cannot be paused while waiting for headers')
88
- util.destroy(socket, new HeadersTimeoutError())
89
- }
90
- } else if (timeoutType === TIMEOUT_BODY) {
91
- if (!paused) {
92
- util.destroy(socket, new BodyTimeoutError())
93
- }
94
- } else if (timeoutType === TIMEOUT_KEEP_ALIVE) {
95
- assert(client[kRunning] === 0 && client[kKeepAliveTimeoutValue])
96
- util.destroy(socket, new InformationalError('socket idle timeout'))
97
- }
98
- }
99
-
100
- function getMilo () {
101
- if (miloInstance) {
102
- return miloInstance
103
- }
104
-
105
- // Milo modules compile WASM on load; defer loading until the parser is needed.
106
- if (useWasmSIMD) {
107
- try {
108
- miloPackage = require('../milo/simd.js')
109
- } catch {}
110
- }
111
-
112
- miloPackage = miloPackage || require('../milo/no-simd.js')
113
- miloInstance = miloPackage.setup()
114
- return miloInstance
115
- }
116
-
117
- class H1Parser {
118
- constructor (client, socket) {
119
- this.milo = getMilo()
120
-
121
- this.client = client
122
- this.socket = socket
123
- this.parser = this.milo.create()
124
- this.events = new FastBuffer(
125
- this.milo.memory.buffer,
126
- this.parser + this.milo.ParserFields.EVENTS,
127
- 4
128
- ).readUInt32LE(0)
129
-
130
- this.milo.setShouldAutodetect(this.parser, false)
131
- this.milo.setIsRequest(this.parser, false)
132
- this.milo.setShouldManageUnconsumed(this.parser, false)
133
- this.milo.setShouldSuspendAfterHeaders(this.parser, true)
134
- this.milo.setMaxHeaderLength(this.parser, client[kMaxHeadersSize])
135
- this.milo.setActiveEvents(
136
- this.parser,
137
- this.milo.EVENT_ACTIVE_ON_ERROR |
138
- this.milo.EVENT_ACTIVE_ON_MESSAGE_COMPLETE |
139
- this.milo.EVENT_ACTIVE_ON_REASON |
140
- this.milo.EVENT_ACTIVE_ON_HEADER_NAME |
141
- this.milo.EVENT_ACTIVE_ON_HEADER_VALUE |
142
- this.milo.EVENT_ACTIVE_ON_HEADERS |
143
- this.milo.EVENT_ACTIVE_ON_DATA |
144
- this.milo.EVENT_ACTIVE_ON_TRAILER_NAME |
145
- this.milo.EVENT_ACTIVE_ON_TRAILER_VALUE
146
- )
147
-
148
- this.timeout = null
149
- this.timeoutWeakRef = new WeakRef(this)
150
- this.timeoutValue = null
151
- this.timeoutType = null
152
- this.statusCode = 0
153
- this.statusText = ''
154
- this.upgrade = false
155
- this.responseStarted = false
156
- this.pausedByParser = false
157
- this.pauseStateIsStart = false
158
- this.headers = []
159
- this.trailers = []
160
- this.headersSize = 0
161
- this.trailersSize = 0
162
- this.headersMaxSize = client[kMaxHeadersSize]
163
- this.shouldKeepAlive = false
164
- this.paused = false
165
- this.errored = false
166
- this.waitingForMoreData = 0
167
- this.resume = this.resume.bind(this)
168
- this.bytesRead = 0
169
- this.keepAlive = ''
170
- this.connection = ''
171
- this.contentLength = -1
172
- this.maxResponseSize = client[kMaxResponseSize]
173
- this.directBodyRemaining = 0
174
- this.directBodyCompletePending = false
175
- this.headersSuspended = false
176
- this.skipBody = false
177
-
178
- this[kPausedByHandler] = false
179
-
180
- if (
181
- INITIAL_BUFFER_SIZE > currentBufferSize ||
182
- currentBuffer.buffer !== this.milo.memory.buffer
183
- ) {
184
- this.ensureBuffers(INITIAL_BUFFER_SIZE)
185
- } else {
186
- this.updateBuffers()
187
- }
188
- }
189
-
190
- setTimeout (delay, type) {
191
- if (
192
- delay !== this.timeoutValue ||
193
- (type & USE_FAST_TIMER) ^ (this.timeoutType & USE_FAST_TIMER)
194
- ) {
195
- if (this.timeout) {
196
- timers.clearTimeout(this.timeout)
197
- this.timeout = null
198
- }
199
-
200
- if (delay) {
201
- if (type & USE_FAST_TIMER) {
202
- this.timeout = timers.setFastTimeout(
203
- onParserTimeout,
204
- delay,
205
- this.timeoutWeakRef
206
- )
207
- } else {
208
- this.timeout = setTimeout(
209
- onParserTimeout,
210
- delay,
211
- this.timeoutWeakRef
212
- )
213
- this.timeout?.unref()
214
- }
215
- }
216
-
217
- this.timeoutValue = delay
218
- } else if (this.timeout?.refresh) {
219
- this.timeout.refresh()
220
- }
221
-
222
- this.timeoutType = type
223
- }
224
-
225
- ensureBuffers (size) {
226
- const { milo } = this
227
-
228
- if (currentBufferPtr != null) {
229
- milo.dealloc(currentBufferPtr, currentBufferSize)
230
- }
231
-
232
- // Reallocate buffers
233
- currentBufferSize = Math.ceil(size / BUFFER_PAGE_SIZE) * BUFFER_PAGE_SIZE
234
- currentBufferPtr = milo.alloc(currentBufferSize)
235
- currentBuffer = new FastBuffer(
236
- milo.memory.buffer,
237
- currentBufferPtr,
238
- currentBufferSize
239
- )
240
-
241
- this.updateBuffers()
242
- }
243
-
244
- updateBuffers () {
245
- this.parserFields = new FastBuffer(this.milo.memory.buffer, this.parser)
246
- this.parserEvents = new FastBuffer(
247
- this.milo.memory.buffer,
248
- this.events,
249
- 64 * 1024
250
- )
251
- }
252
-
253
- resume () {
254
- if (this.socket.destroyed || !this.paused) {
255
- return
256
- }
257
-
258
- this.milo.resume(this.parser)
259
-
260
- assert(this.timeoutType === TIMEOUT_BODY)
261
- if (this.timeout?.refresh) {
262
- this.timeout.refresh()
263
- }
264
-
265
- this.paused = false
266
- if (this.directBodyCompletePending) {
267
- try {
268
- this.completeDirectBody()
269
- } catch (err) {
270
- util.destroy(this.socket, err)
271
- return
272
- }
273
-
274
- if (this.paused) {
275
- return
276
- }
277
- }
278
-
279
- this.readMore()
280
- }
281
-
282
- readMore () {
283
- if (this.paused || !this.parser) {
284
- return
285
- }
286
-
287
- while (!this.paused && this.parser) {
288
- if (
289
- this.waitingForMoreData &&
290
- this.socket.readableLength <= this.waitingForMoreData
291
- ) {
292
- break
293
- }
294
-
295
- this.waitingForMoreData = 0
296
-
297
- const chunk = this.socket.read()
298
- if (chunk === null) {
299
- break
300
- }
301
-
302
- if (this.execute(chunk) === false) {
303
- break
304
- }
305
- }
306
- }
307
-
308
- execute (data) {
309
- const available = data.length
310
- assert(!this.paused)
311
-
312
- const { socket, milo } = this
313
-
314
- try {
315
- if (this.directBodyRemaining > 0) {
316
- return this.consumeDirectBody(data)
317
- }
318
-
319
- if (currentBuffer.buffer !== milo.memory.buffer) {
320
- currentBuffer = new FastBuffer(
321
- milo.memory.buffer,
322
- currentBufferPtr,
323
- currentBufferSize
324
- )
325
- this.updateBuffers()
326
- } else if (this.parserEvents.buffer !== milo.memory.buffer) {
327
- this.updateBuffers()
328
- }
329
-
330
- let offset = 0
331
- let parseLen = available
332
- const headersEnd = this.statusCode === 0 ? data.indexOf('\r\n\r\n') : -1
333
-
334
- if (headersEnd !== -1) {
335
- parseLen = headersEnd + 4
336
- }
337
-
338
- for (;;) {
339
- if (parseLen > currentBufferSize) {
340
- this.ensureBuffers(parseLen)
341
- }
342
-
343
- const parseData = data.subarray(offset, offset + parseLen)
344
- currentBuffer.set(parseData)
345
- currentBufferRef = parseData
346
-
347
- const consumed = milo.parse(this.parser, currentBufferPtr, parseLen)
348
- this.drainEvents()
349
-
350
- const consumedTotal = offset + consumed
351
-
352
- if (
353
- this.errored ||
354
- (consumed === 0 &&
355
- this.parserFields[milo.ParserFields.ERROR_CODE] !== milo.ERROR_NONE)
356
- ) {
357
- throw this.createError(data.subarray(consumedTotal))
358
- } else if (this.upgrade) {
359
- this.onUpgrade(data.subarray(consumedTotal))
360
- return false
361
- } else if (this.directBodyCompletePending) {
362
- this.completeDirectBody()
363
-
364
- if (this.paused) {
365
- return false
366
- }
367
- } else if (this.pausedByParser) {
368
- this.pausedByParser = false
369
- this.headersSuspended = false
370
- if (this[kPausedByHandler] && this.pauseStateIsStart) {
371
- this.pauseStateIsStart = false
372
- milo.resume(this.parser)
373
- this[kPausedByHandler] = false
374
- return false
375
- }
376
-
377
- this.pauseStateIsStart = false
378
- this.paused = true
379
- socket.unshift(data.subarray(consumedTotal))
380
- return false
381
- }
382
-
383
- if (this.directBodyRemaining > 0) {
384
- return this.consumeDirectBody(data.subarray(consumedTotal))
385
- }
386
-
387
- if (consumed < parseLen) {
388
- const remaining = data.subarray(consumedTotal)
389
- socket.unshift(remaining)
390
- this.waitingForMoreData = consumed === 0 ? remaining.length : 0
391
- return false
392
- }
393
-
394
- offset = consumedTotal
395
-
396
- if (offset >= available) {
397
- if (this.headersSuspended) {
398
- this.headersSuspended = false
399
- parseLen = 0
400
- continue
401
- }
402
-
403
- return true
404
- }
405
-
406
- this.headersSuspended = false
407
- parseLen = available - offset
408
- }
409
- } catch (err) {
410
- util.destroy(socket, err)
411
- return false
412
- } finally {
413
- currentBufferRef = null
414
- }
415
- }
416
-
417
- consumeDirectBody (data) {
418
- const { socket, client, maxResponseSize } = this
419
- const available = data.length
420
- const len = Math.min(available, this.directBodyRemaining)
421
-
422
- if (this.timeout?.refresh) {
423
- this.timeout.refresh()
424
- }
425
-
426
- if (len > 0) {
427
- const request = client[kQueue][client[kRunningIdx]]
428
- assert(request)
429
- assert(this.timeoutType === TIMEOUT_BODY)
430
- assert(this.statusCode >= 200)
431
-
432
- if (maxResponseSize > -1 && this.bytesRead + len > maxResponseSize) {
433
- throw new ResponseExceededMaxSizeError()
434
- }
435
-
436
- this.bytesRead += len
437
- this.directBodyRemaining -= len
438
-
439
- if (request.onResponseData(data.subarray(0, len)) === false) {
440
- this.directBodyCompletePending = this.directBodyRemaining === 0
441
- this.pauseParser()
442
- this[kPausedByHandler] = true
443
- this.pausedByParser = false
444
- this.paused = true
445
-
446
- if (len < available) {
447
- socket.unshift(data.subarray(len))
448
- }
449
-
450
- return false
451
- }
452
- }
453
-
454
- if (this.directBodyRemaining === 0) {
455
- this.completeDirectBody()
456
-
457
- const remaining = data.subarray(len)
458
- if (
459
- this.errored ||
460
- this.parserFields[this.milo.ParserFields.ERROR_CODE] !==
461
- this.milo.ERROR_NONE
462
- ) {
463
- throw this.createError(remaining)
464
- } else if (this.pausedByParser) {
465
- this.pausedByParser = false
466
- this.pauseStateIsStart = false
467
- this.paused = true
468
- if (remaining.length > 0) {
469
- socket.unshift(remaining)
470
- }
471
- return false
472
- }
473
-
474
- if (remaining.length > 0) {
475
- socket.unshift(remaining)
476
- return false
477
- }
478
- }
479
-
480
- return true
481
- }
482
-
483
- completeDirectBody () {
484
- const { milo } = this
485
-
486
- if (currentBuffer.buffer !== milo.memory.buffer) {
487
- currentBuffer = new FastBuffer(
488
- milo.memory.buffer,
489
- currentBufferPtr,
490
- currentBufferSize
491
- )
492
- this.updateBuffers()
493
- } else if (this.parserEvents.buffer !== milo.memory.buffer) {
494
- this.updateBuffers()
495
- }
496
-
497
- this.directBodyCompletePending = false
498
- currentBufferRef = EMPTY_BUF
499
-
500
- milo.complete(this.parser)
501
- this.drainEvents()
502
- }
503
-
504
- setShouldSkipBody (value) {
505
- if (this.skipBody !== value) {
506
- this.skipBody = value
507
- this.milo.setShouldSkipBody(this.parser, value)
508
- }
509
- }
510
-
511
- finish () {
512
- if (!this.parser) {
513
- return null
514
- }
515
-
516
- if (this.directBodyRemaining > 0) {
517
- return new ResponseContentLengthMismatchError()
518
- }
519
-
520
- if (this.parserEvents.buffer !== this.milo.memory.buffer) {
521
- this.updateBuffers()
522
- }
523
-
524
- this.milo.finish(this.parser)
525
- this.drainEvents()
526
-
527
- if (!this.errored) {
528
- return null
529
- }
530
-
531
- return this.createError(EMPTY_BUF)
532
- }
533
-
534
- createError (data) {
535
- const { contentLength, bytesRead } = this
536
-
537
- if (contentLength !== -1 && bytesRead !== contentLength) {
538
- return new ResponseContentLengthMismatchError()
539
- }
540
-
541
- const errorCode = this.parserFields[this.milo.ParserFields.ERROR_CODE]
542
- const errorName = this.milo.Errors[errorCode]
543
- const errorDescription =
544
- errorName === 'UNEXPECTED_EOF'
545
- ? 'Invalid EOF state'
546
- : this.milo.getErrorDescription(this.parser)
547
- const reason =
548
- errorName === 'UNEXPECTED_EOF'
549
- ? errorDescription
550
- : errorDescription
551
- ? `[ERROR_${errorName}] ${errorDescription}`
552
- : `ERROR_${errorName}`
553
- return new HTTPParserError(
554
- `Response does not match the HTTP/1.1 protocol (${reason})`,
555
- errorName,
556
- data
557
- )
558
- }
559
-
560
- destroy () {
561
- if (this.parser) {
562
- this.milo.destroy(this.parser)
563
- this.parser = null
564
- }
565
-
566
- this.timeout && timers.clearTimeout(this.timeout)
567
- this.timeout = null
568
- this.timeoutValue = null
569
- this.timeoutType = null
570
- this.paused = false
571
- this.responseStarted = false
572
- this.pausedByParser = false
573
- this.pauseStateIsStart = false
574
- this.connection = ''
575
- this.skipBody = false
576
- }
577
-
578
- pauseParser (stateIsStart = false) {
579
- this.milo.pause(this.parser)
580
- this.pausedByParser = true
581
- this.pauseStateIsStart = stateIsStart
582
- }
583
-
584
- drainEvents () {
585
- const { socket, client, milo } = this
586
- let cursor = 0
587
-
588
- const firstEvent = this.parserEvents[0]
589
- if (
590
- firstEvent !== milo.EVENT_END &&
591
- firstEvent !== milo.EVENT_ERROR &&
592
- !this.responseStarted
593
- ) {
594
- this.responseStarted = true
595
-
596
- if (socket.destroyed) {
597
- return this.fail(this.milo.ERROR_CALLBACK_ERROR, 'Other side closed')
598
- }
599
-
600
- const request = client[kQueue][client[kRunningIdx]]
601
- if (!request) {
602
- return this.fail(this.milo.ERROR_CALLBACK_ERROR, 'Missing request')
603
- }
604
-
605
- request.onResponseStarted()
606
- }
607
-
608
- for (;;) {
609
- const event = this.parserEvents[cursor]
610
- let eventLen = EVENT_RANGE_SIZE
611
- switch (event) {
612
- case milo.EVENT_END:
613
- return
614
- case milo.EVENT_ERROR:
615
- this.errored = true
616
- return
617
- case milo.EVENT_MESSAGE_COMPLETE: {
618
- const {
619
- client,
620
- socket,
621
- statusCode,
622
- upgrade,
623
- trailers,
624
- contentLength,
625
- bytesRead,
626
- shouldKeepAlive
627
- } = this
628
-
629
- this.responseStarted = false
630
-
631
- if (socket.destroyed && (!statusCode || shouldKeepAlive)) {
632
- return this.fail(milo.ERROR_CALLBACK_ERROR, 'Other side closed')
633
- }
634
-
635
- if (upgrade) {
636
- this.pauseParser()
637
- return
638
- }
639
-
640
- assert(statusCode >= 100)
641
-
642
- const request = client[kQueue][client[kRunningIdx]]
643
- assert(request)
644
-
645
- this.statusCode = 0
646
- this.statusText = ''
647
- this.bytesRead = 0
648
- this.contentLength = -1
649
- this.directBodyRemaining = 0
650
- this.directBodyCompletePending = false
651
- this.headersSuspended = false
652
- this.skipBody = false
653
- this.keepAlive = ''
654
- this.connection = ''
655
- this.trailers = []
656
- this.trailersSize = 0
657
-
658
- if (statusCode < 200) {
659
- break
660
- }
661
-
662
- if (
663
- request.method !== 'HEAD' &&
664
- contentLength !== -1 &&
665
- bytesRead !== contentLength
666
- ) {
667
- util.destroy(socket, new ResponseContentLengthMismatchError())
668
- this.pauseParser()
669
- break
670
- }
671
-
672
- request.onResponseEnd(trailers)
673
-
674
- client[kQueue][client[kRunningIdx]++] = null
675
-
676
- if (socket[kWriting]) {
677
- assert(client[kRunning] === 0)
678
- util.destroy(socket, new InformationalError('reset'))
679
- this.pauseParser(true)
680
- } else if (!shouldKeepAlive) {
681
- util.destroy(socket, new InformationalError('reset'))
682
- this.pauseParser(true)
683
- } else if (socket[kReset] && client[kRunning] === 0) {
684
- util.destroy(socket, new InformationalError('reset'))
685
- this.pauseParser(true)
686
- } else if (client[kPipelining] == null || client[kPipelining] === 1) {
687
- setImmediate(client[kResume])
688
- } else {
689
- client[kResume]()
690
- }
691
-
692
- break
693
- }
694
- case milo.EVENT_REASON: {
695
- const at = this.parserEvents.readUInt32LE(cursor + 1)
696
- const len = this.parserEvents.readUInt32LE(cursor + 5)
697
- this.statusText = new FastBuffer(
698
- currentBufferRef.buffer,
699
- currentBufferRef.byteOffset + at,
700
- len
701
- ).toString()
702
- break
703
- }
704
- case milo.EVENT_HEADER_NAME: {
705
- const at = this.parserEvents.readUInt32LE(cursor + 1)
706
- const len = this.parserEvents.readUInt32LE(cursor + 5)
707
- const data =
708
- len > 0
709
- ? new FastBuffer(
710
- currentBufferRef.buffer,
711
- currentBufferRef.byteOffset + at,
712
- len
713
- )
714
- : EMPTY_BUF
715
-
716
- this.headers.push(data)
717
- this.headersSize += len
718
- if (this.headersSize >= this.headersMaxSize) {
719
- util.destroy(this.socket, new HeadersOverflowError())
720
- return this.fail(milo.ERROR_CALLBACK_ERROR, 'Headers overflow')
721
- }
722
-
723
- break
724
- }
725
- case milo.EVENT_HEADER_VALUE: {
726
- const at = this.parserEvents.readUInt32LE(cursor + 1)
727
- const len = this.parserEvents.readUInt32LE(cursor + 5)
728
- const data =
729
- len > 0
730
- ? new FastBuffer(
731
- currentBufferRef.buffer,
732
- currentBufferRef.byteOffset + at,
733
- len
734
- )
735
- : EMPTY_BUF
736
- const key = this.headers[this.headers.length - 1]
737
-
738
- this.headers.push(data)
739
-
740
- if (key.length === 10) {
741
- const headerName = util.bufferToLowerCasedHeaderName(key)
742
- if (headerName === 'keep-alive') {
743
- this.keepAlive += (this.keepAlive.length === 0 ? '' : ',') + data.toString()
744
- } else if (headerName === 'connection') {
745
- this.connection += (this.connection.length === 0 ? '' : ',') + data.toString()
746
- }
747
- }
748
-
749
- this.headersSize += len
750
- if (this.headersSize >= this.headersMaxSize) {
751
- util.destroy(this.socket, new HeadersOverflowError())
752
- return this.fail(milo.ERROR_CALLBACK_ERROR, 'Headers overflow')
753
- }
754
-
755
- break
756
- }
757
- case milo.EVENT_HEADERS: {
758
- eventLen = EVENT_HEADERS_SIZE
759
-
760
- const statusCode = this.parserEvents.readUInt16LE(cursor + 5)
761
- const shouldKeepAlive = this.parserEvents[cursor + 7] !== 0
762
- const shouldUpgrade = this.parserEvents[cursor + 8] !== 0
763
- const hasTrailers = this.parserEvents[cursor + 9] !== 0
764
- const bodyKind = this.parserEvents[cursor + 10]
765
- const contentLength =
766
- this.parserEvents.readUInt32LE(cursor + 11) +
767
- this.parserEvents.readUInt32LE(cursor + 15) * 0x100000000
768
-
769
- const { socket, client, headers, statusText } = this
770
-
771
- if (socket.destroyed) {
772
- return this.fail(milo.ERROR_CALLBACK_ERROR, 'Other side closed')
773
- }
774
-
775
- const request = client[kQueue][client[kRunningIdx]]
776
- if (!request) {
777
- return this.fail(milo.ERROR_CALLBACK_ERROR, 'Missing request')
778
- }
779
-
780
- assert(!this.upgrade)
781
- assert(this.statusCode < 200)
782
-
783
- if (statusCode === 100) {
784
- util.destroy(
785
- socket,
786
- new SocketError('bad response', util.getSocketInfo(socket))
787
- )
788
- return this.fail(milo.ERROR_CALLBACK_ERROR, 'Bad response')
789
- }
790
-
791
- if (shouldUpgrade && !request.upgrade) {
792
- util.destroy(
793
- socket,
794
- new SocketError('bad upgrade', util.getSocketInfo(socket))
795
- )
796
- return this.fail(milo.ERROR_CALLBACK_ERROR, 'Bad upgrade')
797
- }
798
-
799
- assert(this.timeoutType === TIMEOUT_HEADERS)
800
-
801
- this.statusCode = statusCode
802
- this.shouldKeepAlive =
803
- shouldKeepAlive ||
804
- (request.method === 'HEAD' &&
805
- !socket[kReset] &&
806
- /(?:^|,)[\t ]*keep-alive[\t ]*(?:,|$)/i.test(this.connection) &&
807
- !/(?:^|,)[\t ]*close[\t ]*(?:,|$)/i.test(this.connection))
808
- this.contentLength =
809
- bodyKind === BODY_KIND_CONTENT_LENGTH ? contentLength : -1
810
-
811
- if (this.statusCode >= 200) {
812
- const bodyTimeout =
813
- request.bodyTimeout != null
814
- ? request.bodyTimeout
815
- : client[kBodyTimeout]
816
- this.setTimeout(bodyTimeout, TIMEOUT_BODY)
817
- } else if (this.timeout?.refresh) {
818
- this.timeout.refresh()
819
- }
820
-
821
- if (request.method === 'CONNECT') {
822
- assert(client[kRunning] === 1)
823
- milo.setIsConnect(this.parser, true)
824
- this.upgrade = true
825
- return
826
- }
827
-
828
- if (shouldUpgrade) {
829
- assert(client[kRunning] === 1)
830
- this.upgrade = true
831
- this.pauseParser()
832
- return
833
- }
834
-
835
- this.headers = []
836
- this.headersSize = 0
837
-
838
- if (this.shouldKeepAlive && client[kPipelining]) {
839
- const keepAliveTimeout = this.keepAlive
840
- ? util.parseKeepAliveTimeout(this.keepAlive)
841
- : null
842
-
843
- if (keepAliveTimeout != null) {
844
- const timeout = Math.min(
845
- keepAliveTimeout - client[kKeepAliveTimeoutThreshold],
846
- client[kKeepAliveMaxTimeout]
847
- )
848
- if (timeout <= 0) {
849
- socket[kReset] = true
850
- } else {
851
- client[kKeepAliveTimeoutValue] = timeout
852
- }
853
- } else {
854
- client[kKeepAliveTimeoutValue] = client[kKeepAliveDefaultTimeout]
855
- }
856
- } else {
857
- socket[kReset] = true
858
- }
859
-
860
- const pause =
861
- request.onResponseStart(
862
- statusCode,
863
- headers,
864
- this.resume,
865
- statusText
866
- ) === false
867
-
868
- if (request.aborted) {
869
- return this.fail(milo.ERROR_CALLBACK_ERROR, 'Request aborted')
870
- }
871
-
872
- if (request.method === 'HEAD' || statusCode < 200) {
873
- this.setShouldSkipBody(true)
874
- }
875
-
876
- this.headersSuspended = true
877
- if (
878
- !pause &&
879
- request.method !== 'HEAD' &&
880
- statusCode >= 200 &&
881
- statusCode !== 204 &&
882
- statusCode !== 205 &&
883
- statusCode !== 304 &&
884
- bodyKind === BODY_KIND_CONTENT_LENGTH &&
885
- contentLength > 0 &&
886
- !hasTrailers
887
- ) {
888
- this.directBodyRemaining = contentLength
889
- }
890
-
891
- if (socket[kBlocking]) {
892
- socket[kBlocking] = false
893
- client[kResume]()
894
- }
895
-
896
- if (pause) {
897
- this.pauseParser()
898
- this[kPausedByHandler] = true
899
- } else if (
900
- request.method === 'HEAD' ||
901
- statusCode < 200 ||
902
- statusCode === 204 ||
903
- statusCode === 205 ||
904
- statusCode === 304 ||
905
- (bodyKind === BODY_KIND_CONTENT_LENGTH && contentLength === 0)
906
- ) {
907
- this.directBodyCompletePending = true
908
- }
909
-
910
- break
911
- }
912
- case milo.EVENT_DATA: {
913
- const at = this.parserEvents.readUInt32LE(cursor + 1)
914
- const len = this.parserEvents.readUInt32LE(cursor + 5)
915
- const { client, socket, statusCode, maxResponseSize } = this
916
-
917
- if (socket.destroyed) {
918
- return this.fail(milo.ERROR_CALLBACK_ERROR, 'Other side closed')
919
- }
920
-
921
- const request = client[kQueue][client[kRunningIdx]]
922
- assert(request)
923
- assert(this.timeoutType === TIMEOUT_BODY)
924
-
925
- if (this.timeout?.refresh) {
926
- this.timeout.refresh()
927
- }
928
-
929
- assert(statusCode >= 200)
930
-
931
- if (maxResponseSize > -1 && this.bytesRead + len > maxResponseSize) {
932
- util.destroy(socket, new ResponseExceededMaxSizeError())
933
- return this.fail(
934
- milo.ERROR_CALLBACK_ERROR,
935
- 'Response size exceeded'
936
- )
937
- }
938
-
939
- this.bytesRead += len
940
-
941
- const buffer = currentBufferRef
942
- if (
943
- request.onResponseData(
944
- new FastBuffer(buffer.buffer, buffer.byteOffset + at, len)
945
- ) === false
946
- ) {
947
- this.pauseParser()
948
- this[kPausedByHandler] = true
949
- }
950
-
951
- break
952
- }
953
- case milo.EVENT_TRAILER_NAME: {
954
- const at = this.parserEvents.readUInt32LE(cursor + 1)
955
- const len = this.parserEvents.readUInt32LE(cursor + 5)
956
- const data =
957
- len > 0
958
- ? new FastBuffer(
959
- currentBufferRef.buffer,
960
- currentBufferRef.byteOffset + at,
961
- len
962
- )
963
- : EMPTY_BUF
964
-
965
- this.trailers.push(data)
966
-
967
- this.trailersSize += len
968
- if (this.trailersSize >= this.headersMaxSize) {
969
- util.destroy(this.socket, new HeadersOverflowError())
970
- return this.fail(milo.ERROR_CALLBACK_ERROR, 'Headers overflow')
971
- }
972
-
973
- break
974
- }
975
- case milo.EVENT_TRAILER_VALUE: {
976
- const at = this.parserEvents.readUInt32LE(cursor + 1)
977
- const len = this.parserEvents.readUInt32LE(cursor + 5)
978
- const data =
979
- len > 0
980
- ? new FastBuffer(
981
- currentBufferRef.buffer,
982
- currentBufferRef.byteOffset + at,
983
- len
984
- )
985
- : EMPTY_BUF
986
-
987
- this.trailers.push(data)
988
-
989
- this.trailersSize += len
990
- if (this.trailersSize >= this.headersMaxSize) {
991
- util.destroy(this.socket, new HeadersOverflowError())
992
- return this.fail(milo.ERROR_CALLBACK_ERROR, 'Headers overflow')
993
- }
994
-
995
- break
996
- }
997
- default:
998
- return
999
- }
1000
-
1001
- cursor += eventLen
1002
- }
1003
- }
1004
-
1005
- fail (code, message) {
1006
- this.milo.fail(this.parser, code, message)
1007
- this.errored = true
1008
- }
1009
-
1010
- onUpgrade (head) {
1011
- const { upgrade, client, socket, headers, statusCode } = this
1012
-
1013
- assert(upgrade)
1014
- assert(client[kSocket] === socket)
1015
- assert(!socket.destroyed)
1016
- assert(!this.paused)
1017
-
1018
- const request = client[kQueue][client[kRunningIdx]]
1019
- assert(request)
1020
- assert(request.upgrade || request.method === 'CONNECT')
1021
-
1022
- this.statusCode = 0
1023
- this.statusText = ''
1024
- this.shouldKeepAlive = false
1025
- this.headers = []
1026
- this.headersSize = 0
1027
-
1028
- socket.unshift(head)
1029
- socket[kParser].destroy()
1030
- socket[kParser] = null
1031
- socket[kClient] = null
1032
- socket[kError] = null
1033
-
1034
- removeAllListeners(socket)
1035
-
1036
- client[kSocket] = null
1037
- client[kHTTPContext] = null
1038
- client[kQueue][client[kRunningIdx]++] = null
1039
- client.emit(
1040
- 'disconnect',
1041
- client[kUrl],
1042
- [client],
1043
- new InformationalError('upgrade')
1044
- )
1045
-
1046
- try {
1047
- request.onRequestUpgrade(statusCode, headers, socket)
1048
- } catch (err) {
1049
- util.destroy(socket, err)
1050
- }
1051
-
1052
- client[kResume]()
1053
- }
1054
- }
1055
-
1056
- function setMiloEnabled (value) {
1057
- miloEnabled = value
1058
- }
1059
-
1060
- function getMiloEnabled () {
1061
- return miloEnabled
1062
- }
1063
-
1064
- module.exports = { H1Parser, getMiloEnabled, setMiloEnabled }