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