@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.
- package/README.md +19 -47
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +15 -15
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/prerender-manifest.json +6 -6
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +12 -12
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +3 -3
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
- package/app/.next-cli-build/server/app/_not-found/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +3 -3
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/acs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/metadata/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/saml/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +5 -5
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/codewhale-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-profiles/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/crush-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/devin-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/forge-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/grok-build-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-profiles/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/omp-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/pi-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/smelt-settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/presets/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/presets/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/catalog-sync/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/commandcode/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/grok-cli/bulk-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import-cli-proxy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/api-key/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/xiaomi-mimo/login/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/auto-import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/zed/import/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/overrides/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/providers/web-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/web-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/netlify-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/database/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/load/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/claude-reset/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/codex-reset-credits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +4 -4
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +3 -3
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/systemone/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/systemone/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +1 -1
- package/app/.next-cli-build/server/app/callback/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +3 -3
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +4 -4
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +3 -3
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing/page.js +1 -1
- package/app/.next-cli-build/server/app/landing/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +3 -3
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/login/page.js +1 -1
- package/app/.next-cli-build/server/app/login/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +3 -3
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +1 -1
- package/app/.next-cli-build/server/app/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +15 -15
- package/app/.next-cli-build/server/chunks/1051.js +1 -1
- package/app/.next-cli-build/server/chunks/{9999.js → 1297.js} +2 -2
- package/app/.next-cli-build/server/chunks/1350.js +1 -1
- package/app/.next-cli-build/server/chunks/{4597.js → 1568.js} +1 -1
- package/app/.next-cli-build/server/chunks/1757.js +1 -1
- package/app/.next-cli-build/server/chunks/24.js +1 -1
- package/app/.next-cli-build/server/chunks/2840.js +1 -0
- package/app/.next-cli-build/server/chunks/3225.js +1 -1
- package/app/.next-cli-build/server/chunks/3697.js +1 -1
- package/app/.next-cli-build/server/chunks/3885.js +1 -1
- package/app/.next-cli-build/server/chunks/3943.js +1 -1
- package/app/.next-cli-build/server/chunks/412.js +5 -5
- package/app/.next-cli-build/server/chunks/4123.js +1 -1
- package/app/.next-cli-build/server/chunks/4882.js +1 -1
- package/app/.next-cli-build/server/chunks/{3783.js → 5299.js} +4 -4
- package/app/.next-cli-build/server/chunks/5330.js +34 -34
- package/app/.next-cli-build/server/chunks/5485.js +1 -1
- package/app/.next-cli-build/server/chunks/5615.js +1 -1
- package/app/.next-cli-build/server/chunks/5932.js +1 -0
- package/app/.next-cli-build/server/chunks/6054.js +1 -1
- package/app/.next-cli-build/server/chunks/6070.js +1 -1
- package/app/.next-cli-build/server/chunks/615.js +1 -1
- package/app/.next-cli-build/server/chunks/6297.js +1 -0
- package/app/.next-cli-build/server/chunks/6513.js +1 -1
- package/app/.next-cli-build/server/chunks/6576.js +1 -0
- package/app/.next-cli-build/server/chunks/6690.js +1 -1
- package/app/.next-cli-build/server/chunks/6724.js +1 -1
- package/app/.next-cli-build/server/chunks/6763.js +1 -1
- package/app/.next-cli-build/server/chunks/7114.js +1 -1
- package/app/.next-cli-build/server/chunks/7187.js +1 -1
- package/app/.next-cli-build/server/chunks/7247.js +1 -1
- package/app/.next-cli-build/server/chunks/7373.js +1 -1
- package/app/.next-cli-build/server/chunks/7525.js +1 -1
- package/app/.next-cli-build/server/chunks/7552.js +1 -1
- package/app/.next-cli-build/server/chunks/7716.js +1 -1
- package/app/.next-cli-build/server/chunks/778.js +1 -1
- package/app/.next-cli-build/server/chunks/7843.js +51 -0
- package/app/.next-cli-build/server/chunks/8251.js +1 -1
- package/app/.next-cli-build/server/chunks/8402.js +1 -1
- package/app/.next-cli-build/server/chunks/8623.js +1 -1
- package/app/.next-cli-build/server/chunks/866.js +1 -0
- package/app/.next-cli-build/server/chunks/869.js +1 -1
- package/app/.next-cli-build/server/chunks/8895.js +3 -3
- package/app/.next-cli-build/server/chunks/8896.js +1 -1
- package/app/.next-cli-build/server/chunks/8920.js +1 -1
- package/app/.next-cli-build/server/chunks/8994.js +1 -1
- package/app/.next-cli-build/server/chunks/9198.js +1 -0
- package/app/.next-cli-build/server/chunks/9609.js +1 -1
- package/app/.next-cli-build/server/chunks/9927.js +1 -1
- package/app/.next-cli-build/server/instrumentation.js +1 -1
- package/app/.next-cli-build/server/instrumentation.js.nft.json +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +3 -3
- package/app/.next-cli-build/server/middleware.js.nft.json +1 -1
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/server/preview-props.json +3 -3
- package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/app/.next-cli-build/static/chunks/1321-2fde166305caeddb.js +1 -0
- package/app/.next-cli-build/static/chunks/5497-832391bf809808e3.js +7 -0
- package/app/.next-cli-build/static/chunks/{9134-dce513bebf49f409.js → 761-32ad2b1ee5ca216d.js} +10 -10
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-a1c51b0c7ad758ad.js → page-6abc904471ca5d9e.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-407f76834b37cd6c.js → page-1f2d3a8531261f5a.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/media-providers/[kind]/[id]/{page-a09d4b437dec0273.js → page-624cd614b7bc1f8c.js} +11 -11
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/mitm/{page-f9f9e895a365e8d3.js → page-9ee6ec1d1ae265b8.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-efdb4d5aacfda8a6.js +27 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-371203e00dbb386a.js +4 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/quota/{page-cb6752cc71bde85f.js → page-98e943d2e0230bb1.js} +1 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-9121f5a9bc6ae4d6.js +1 -0
- package/app/node_modules/undici/README.md +29 -116
- package/app/node_modules/undici/docs/docs/api/Agent.md +42 -249
- package/app/node_modules/undici/docs/docs/api/BalancedPool.md +48 -246
- package/app/node_modules/undici/docs/docs/api/CacheStorage.md +13 -171
- package/app/node_modules/undici/docs/docs/api/CacheStore.md +98 -309
- package/app/node_modules/undici/docs/docs/api/Client.md +164 -412
- package/app/node_modules/undici/docs/docs/api/ClientStats.md +14 -80
- package/app/node_modules/undici/docs/docs/api/Connector.md +35 -118
- package/app/node_modules/undici/docs/docs/api/ContentType.md +25 -65
- package/app/node_modules/undici/docs/docs/api/Cookies.md +71 -122
- package/app/node_modules/undici/docs/docs/api/Debug.md +18 -34
- package/app/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +167 -368
- package/app/node_modules/undici/docs/docs/api/Dispatcher.md +1056 -505
- package/app/node_modules/undici/docs/docs/api/EnvHttpProxyAgent.md +93 -105
- package/app/node_modules/undici/docs/docs/api/Errors.md +28 -603
- package/app/node_modules/undici/docs/docs/api/EventSource.md +13 -326
- package/app/node_modules/undici/docs/docs/api/Fetch.md +30 -691
- package/app/node_modules/undici/docs/docs/api/GlobalInstallation.md +96 -78
- package/app/node_modules/undici/docs/docs/api/H2CClient.md +176 -299
- package/app/node_modules/undici/docs/docs/api/MockAgent.md +314 -333
- package/app/node_modules/undici/docs/docs/api/MockCallHistory.md +98 -272
- package/app/node_modules/undici/docs/docs/api/MockCallHistoryLog.md +26 -189
- package/app/node_modules/undici/docs/docs/api/MockClient.md +33 -151
- package/app/node_modules/undici/docs/docs/api/MockErrors.md +5 -56
- package/app/node_modules/undici/docs/docs/api/MockPool.md +258 -321
- package/app/node_modules/undici/docs/docs/api/Pool.md +41 -235
- package/app/node_modules/undici/docs/docs/api/PoolStats.md +13 -119
- package/app/node_modules/undici/docs/docs/api/ProxyAgent.md +160 -179
- package/app/node_modules/undici/docs/docs/api/RedirectHandler.md +55 -241
- package/app/node_modules/undici/docs/docs/api/RetryAgent.md +27 -113
- package/app/node_modules/undici/docs/docs/api/RetryHandler.md +79 -161
- package/app/node_modules/undici/docs/docs/api/RoundRobinPool.md +72 -166
- package/app/node_modules/undici/docs/docs/api/SnapshotAgent.md +517 -262
- package/app/node_modules/undici/docs/docs/api/Socks5ProxyAgent.md +196 -177
- package/app/node_modules/undici/docs/docs/api/Util.md +11 -68
- package/app/node_modules/undici/docs/docs/api/WebSocket.md +80 -475
- package/app/node_modules/undici/docs/docs/api/api-lifecycle.md +32 -100
- package/app/node_modules/undici/docs/docs/best-practices/client-certificate.md +0 -2
- package/app/node_modules/undici/docs/docs/best-practices/crawling.md +1 -3
- package/app/node_modules/undici/docs/docs/best-practices/mocking-request.md +7 -9
- package/app/node_modules/undici/docs/docs/best-practices/proxy.md +1 -3
- package/app/node_modules/undici/docs/docs/best-practices/undici-vs-builtin-fetch.md +8 -10
- package/app/node_modules/undici/docs/docs/best-practices/writing-tests.md +0 -2
- package/app/node_modules/undici/index.js +2 -4
- package/app/node_modules/undici/lib/api/api-connect.js +11 -13
- package/app/node_modules/undici/lib/api/api-pipeline.js +13 -26
- package/app/node_modules/undici/lib/api/api-request.js +21 -51
- package/app/node_modules/undici/lib/api/api-stream.js +20 -81
- package/app/node_modules/undici/lib/api/api-upgrade.js +11 -21
- package/app/node_modules/undici/lib/api/readable.js +11 -46
- package/app/node_modules/undici/lib/cache/memory-cache-store.js +15 -50
- package/app/node_modules/undici/lib/cache/sqlite-cache-store.js +18 -142
- package/app/node_modules/undici/lib/core/connect.js +7 -46
- package/app/node_modules/undici/lib/core/constants.js +23 -11
- package/app/node_modules/undici/lib/core/errors.js +3 -60
- package/app/node_modules/undici/lib/core/request.js +19 -116
- package/app/node_modules/undici/lib/core/symbols.js +0 -5
- package/app/node_modules/undici/lib/core/util.js +88 -110
- package/app/node_modules/undici/lib/dispatcher/agent.js +32 -51
- package/app/node_modules/undici/lib/dispatcher/balanced-pool.js +27 -23
- package/app/node_modules/undici/lib/dispatcher/client-h1.js +89 -166
- package/app/node_modules/undici/lib/dispatcher/client-h2.js +373 -1306
- package/app/node_modules/undici/lib/dispatcher/client.js +34 -114
- package/app/node_modules/undici/lib/dispatcher/dispatcher-base.js +8 -10
- package/app/node_modules/undici/lib/dispatcher/dispatcher.js +5 -15
- package/app/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +13 -57
- package/app/node_modules/undici/lib/dispatcher/h2c-client.js +4 -4
- package/app/node_modules/undici/lib/dispatcher/pool-base.js +27 -160
- package/app/node_modules/undici/lib/dispatcher/pool.js +16 -127
- package/app/node_modules/undici/lib/dispatcher/proxy-agent.js +29 -128
- package/app/node_modules/undici/lib/dispatcher/retry-agent.js +0 -13
- package/app/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -47
- package/app/node_modules/undici/lib/dispatcher/socks5-proxy-agent.js +63 -153
- package/app/node_modules/undici/lib/global.js +14 -37
- package/app/node_modules/undici/lib/handler/cache-handler.js +60 -101
- package/app/node_modules/undici/lib/handler/cache-revalidation-handler.js +0 -10
- package/app/node_modules/undici/lib/handler/decorator-handler.js +5 -14
- package/app/node_modules/undici/lib/handler/deduplication-handler.js +38 -74
- package/app/node_modules/undici/lib/handler/redirect-handler.js +72 -83
- package/app/node_modules/undici/lib/handler/retry-handler.js +45 -227
- package/app/node_modules/undici/lib/handler/unwrap-handler.js +106 -0
- package/app/node_modules/undici/lib/handler/wrap-handler.js +105 -0
- package/app/node_modules/undici/lib/interceptor/cache.js +28 -53
- package/app/node_modules/undici/lib/interceptor/decompress.js +5 -12
- package/app/node_modules/undici/lib/interceptor/deduplicate.js +4 -5
- package/app/node_modules/undici/lib/interceptor/dns.js +1 -23
- package/app/node_modules/undici/lib/interceptor/redirect.js +3 -3
- package/app/node_modules/undici/lib/interceptor/response-error.js +28 -72
- package/app/node_modules/undici/lib/llhttp/.gitkeep +0 -0
- package/app/node_modules/undici/lib/llhttp/llhttp-wasm.js +1 -1
- package/app/node_modules/undici/lib/llhttp/llhttp_simd-wasm.js +1 -1
- package/app/node_modules/undici/lib/mock/mock-agent.js +9 -32
- package/app/node_modules/undici/lib/mock/mock-call-history.js +1 -1
- package/app/node_modules/undici/lib/mock/mock-interceptor.js +7 -25
- package/app/node_modules/undici/lib/mock/mock-utils.js +48 -292
- package/app/node_modules/undici/lib/mock/snapshot-agent.js +7 -25
- package/app/node_modules/undici/lib/mock/snapshot-recorder.js +5 -41
- package/app/node_modules/undici/lib/mock/snapshot-utils.js +2 -3
- package/app/node_modules/undici/lib/util/cache.js +14 -69
- package/app/node_modules/undici/lib/util/promise.js +28 -0
- package/app/node_modules/undici/lib/util/runtime-features.js +34 -3
- package/app/node_modules/undici/lib/web/cache/cache.js +16 -23
- package/app/node_modules/undici/lib/web/cache/cachestorage.js +5 -11
- package/app/node_modules/undici/lib/web/cookies/index.js +6 -16
- package/app/node_modules/undici/lib/web/cookies/parse.js +4 -7
- package/app/node_modules/undici/lib/web/cookies/util.js +1 -1
- package/app/node_modules/undici/lib/web/eventsource/eventsource.js +23 -66
- package/app/node_modules/undici/lib/web/eventsource/util.js +1 -32
- package/app/node_modules/undici/lib/web/fetch/body.js +25 -90
- package/app/node_modules/undici/lib/web/fetch/constants.js +1 -1
- package/app/node_modules/undici/lib/web/fetch/data-url.js +6 -6
- package/app/node_modules/undici/lib/web/fetch/formdata-parser.js +4 -12
- package/app/node_modules/undici/lib/web/fetch/formdata.js +26 -39
- package/app/node_modules/undici/lib/web/fetch/headers.js +33 -36
- package/app/node_modules/undici/lib/web/fetch/index.js +259 -297
- package/app/node_modules/undici/lib/web/fetch/request.js +170 -172
- package/app/node_modules/undici/lib/web/fetch/response.js +47 -44
- package/app/node_modules/undici/lib/web/fetch/util.js +9 -17
- package/app/node_modules/undici/lib/web/infra/index.js +14 -15
- package/app/node_modules/undici/lib/web/webidl/index.js +21 -7
- package/app/node_modules/undici/lib/web/websocket/connection.js +5 -16
- package/app/node_modules/undici/lib/web/websocket/events.js +26 -43
- package/app/node_modules/undici/lib/web/websocket/frame.js +7 -1
- package/app/node_modules/undici/lib/web/websocket/receiver.js +3 -13
- package/app/node_modules/undici/lib/web/websocket/stream/websocketerror.js +10 -13
- package/app/node_modules/undici/lib/web/websocket/stream/websocketstream.js +14 -29
- package/app/node_modules/undici/lib/web/websocket/websocket.js +40 -65
- package/app/node_modules/undici/package.json +13 -15
- package/app/node_modules/undici/types/agent.d.ts +2 -0
- package/app/node_modules/undici/types/api.d.ts +1 -1
- package/app/node_modules/undici/types/cache-interceptor.d.ts +0 -10
- package/app/node_modules/undici/types/client.d.ts +27 -64
- package/app/node_modules/undici/types/connector.d.ts +0 -1
- package/app/node_modules/undici/types/cookies.d.ts +1 -1
- package/app/node_modules/undici/types/diagnostics-channel.d.ts +1 -2
- package/app/node_modules/undici/types/dispatcher.d.ts +30 -8
- package/app/node_modules/undici/types/errors.d.ts +1 -26
- package/app/node_modules/undici/types/fetch.d.ts +1 -5
- package/app/node_modules/undici/types/formdata.d.ts +12 -6
- package/app/node_modules/undici/types/h2c-client.d.ts +7 -7
- package/app/node_modules/undici/types/handlers.d.ts +0 -2
- package/app/node_modules/undici/types/header.d.ts +0 -5
- package/app/node_modules/undici/types/index.d.ts +1 -3
- package/app/node_modules/undici/types/interceptors.d.ts +2 -7
- package/app/node_modules/undici/types/mock-agent.d.ts +10 -11
- package/app/node_modules/undici/types/mock-interceptor.d.ts +1 -5
- package/app/node_modules/undici/types/pool.d.ts +2 -0
- package/app/node_modules/undici/types/proxy-agent.d.ts +2 -9
- package/app/node_modules/undici/types/retry-handler.d.ts +3 -3
- package/app/node_modules/undici/types/round-robin-pool.d.ts +2 -0
- package/app/node_modules/undici/types/snapshot-agent.d.ts +0 -4
- package/app/node_modules/undici/types/socks5-proxy-agent.d.ts +2 -4
- package/app/node_modules/undici/types/utility.d.ts +4 -4
- package/app/node_modules/undici/types/webidl.d.ts +8 -13
- package/app/package.json +5 -2
- package/app/public/providers/sensenova-intl.png +0 -0
- package/app/src/shared/services/quotaAutoPing.js +17 -2
- package/package.json +2 -2
- package/app/.next-cli-build/server/chunks/1004.js +0 -1
- package/app/.next-cli-build/server/chunks/4480.js +0 -1
- package/app/.next-cli-build/server/chunks/4811.js +0 -51
- package/app/.next-cli-build/server/chunks/547.js +0 -1
- package/app/.next-cli-build/server/chunks/7573.js +0 -1
- package/app/.next-cli-build/server/chunks/8499.js +0 -1
- package/app/.next-cli-build/server/chunks/9102.js +0 -1
- package/app/.next-cli-build/static/chunks/1321-93eb6ca56f8fcb1e.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-02b05d77d17bcdc3.js +0 -7
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-74ca3f1d4f1ec046.js +0 -27
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/proxy-pools/page-b44167799c6c673a.js +0 -4
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/usage/page-f16fd9091b7ae81c.js +0 -1
- package/app/node_modules/undici/docs/docs/api/Interceptors.md +0 -439
- package/app/node_modules/undici/docs/docs/best-practices/migrating-from-v7-to-v8.md +0 -233
- package/app/node_modules/undici/docs/docs/getting-started.md +0 -281
- package/app/node_modules/undici/docs/docs/index.md +0 -793
- package/app/node_modules/undici/docs/docs/site.json +0 -125
- package/app/node_modules/undici/docs/docs/type-map.json +0 -79
- package/app/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +0 -127
- package/app/node_modules/undici/lib/dispatcher/parser-h1.js +0 -1065
- package/app/node_modules/undici/lib/milo/LICENSE.md +0 -7
- package/app/node_modules/undici/lib/milo/no-simd.js +0 -1002
- package/app/node_modules/undici/lib/milo/simd.js +0 -1002
- package/app/node_modules/undici/types/dispatcher1-wrapper.d.ts +0 -7
- /package/app/.next-cli-build/static/{erY6mcU6WqDeuYANqpCwQ → mEL-faV-rpAwzfhUdVe-c}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{erY6mcU6WqDeuYANqpCwQ → mEL-faV-rpAwzfhUdVe-c}/_ssgManifest.js +0 -0
|
@@ -2,9 +2,9 @@
|
|
|
2
2
|
const assert = require('node:assert')
|
|
3
3
|
|
|
4
4
|
const { kRetryHandlerDefaultRetry } = require('../core/symbols')
|
|
5
|
-
const { RequestRetryError
|
|
5
|
+
const { RequestRetryError } = require('../core/errors')
|
|
6
|
+
const WrapHandler = require('./wrap-handler')
|
|
6
7
|
const {
|
|
7
|
-
hasSafeIterator,
|
|
8
8
|
isDisturbed,
|
|
9
9
|
parseRangeHeader,
|
|
10
10
|
wrapRequestBody
|
|
@@ -12,7 +12,7 @@ const {
|
|
|
12
12
|
|
|
13
13
|
function calculateRetryAfterHeader (retryAfter) {
|
|
14
14
|
const retryTime = new Date(retryAfter).getTime()
|
|
15
|
-
return isNaN(retryTime) ?
|
|
15
|
+
return isNaN(retryTime) ? 0 : retryTime - Date.now()
|
|
16
16
|
}
|
|
17
17
|
|
|
18
18
|
function validatePartialResponseContentLength (headers, range, statusCode, retryCount) {
|
|
@@ -36,25 +36,13 @@ function validatePartialResponseContentLength (headers, range, statusCode, retry
|
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
// A stable controller handed to the downstream handler for the lifetime of the
|
|
39
|
-
// request. Each transparent retry/resume is a
|
|
40
|
-
//
|
|
41
|
-
//
|
|
42
|
-
// new one: backpressure pauses the new connection's controller, but the
|
|
43
|
-
// consumer's resume() targets the old one, so the resumed body stalls forever.
|
|
44
|
-
// The proxy always forwards to the controller of the currently active connection.
|
|
45
|
-
// An abort is additionally reported to the handler so it can cancel a pending
|
|
46
|
-
// retry backoff instead of letting the request hang until the backoff elapses.
|
|
47
|
-
// The notification is a private callback the handler hands over on construction,
|
|
48
|
-
// so nothing outside the handler can trigger it.
|
|
39
|
+
// request. Each transparent retry/resume is a separate dispatch with its own
|
|
40
|
+
// connection controller. The proxy always forwards to the active connection
|
|
41
|
+
// while preserving a downstream pause across controller replacement.
|
|
49
42
|
class RetryController {
|
|
50
|
-
#onAbort
|
|
51
43
|
#paused = false
|
|
52
44
|
#target = null
|
|
53
45
|
|
|
54
|
-
constructor (onAbort) {
|
|
55
|
-
this.#onAbort = onAbort
|
|
56
|
-
}
|
|
57
|
-
|
|
58
46
|
set target (target) {
|
|
59
47
|
this.#target = target
|
|
60
48
|
if (this.#paused) {
|
|
@@ -76,7 +64,6 @@ class RetryController {
|
|
|
76
64
|
|
|
77
65
|
abort (reason) {
|
|
78
66
|
this.#target?.abort(reason)
|
|
79
|
-
this.#onAbort(reason)
|
|
80
67
|
}
|
|
81
68
|
|
|
82
69
|
get paused () { return this.#paused || (this.#target?.paused ?? false) }
|
|
@@ -117,7 +104,7 @@ class RetryHandler {
|
|
|
117
104
|
|
|
118
105
|
this.error = null
|
|
119
106
|
this.dispatch = dispatch
|
|
120
|
-
this.handler = handler
|
|
107
|
+
this.handler = WrapHandler.wrap(handler)
|
|
121
108
|
this.opts = { ...dispatchOpts, body: wrapRequestBody(opts.body) }
|
|
122
109
|
this.retryOpts = {
|
|
123
110
|
throwOnError: throwOnError ?? true,
|
|
@@ -128,7 +115,7 @@ class RetryHandler {
|
|
|
128
115
|
timeoutFactor: timeoutFactor ?? 2,
|
|
129
116
|
maxRetries: maxRetries ?? 5,
|
|
130
117
|
// What errors we should retry
|
|
131
|
-
methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'
|
|
118
|
+
methods: methods ?? ['GET', 'HEAD', 'OPTIONS', 'PUT', 'DELETE', 'TRACE'],
|
|
132
119
|
// Indicates which errors to retry
|
|
133
120
|
statusCodes: statusCodes ?? [500, 502, 503, 504, 429],
|
|
134
121
|
// List of errors to retry
|
|
@@ -151,24 +138,7 @@ class RetryHandler {
|
|
|
151
138
|
this.start = 0
|
|
152
139
|
this.end = null
|
|
153
140
|
this.etag = null
|
|
154
|
-
this.
|
|
155
|
-
this.headers = null
|
|
156
|
-
this.controllerProxy = new RetryController(reason => this.#onAbort(reason))
|
|
157
|
-
// A retry decision is in flight (the policy may be holding a backoff
|
|
158
|
-
// timer). While pending, a consumer abort cancels the wait.
|
|
159
|
-
this.retryPending = false
|
|
160
|
-
// Backoff timer returned by the retry policy, so #onAbort can cancel it.
|
|
161
|
-
// Null for custom policies that do not return their timer.
|
|
162
|
-
this.retryTimer = null
|
|
163
|
-
// A response can complete while its controller is paused if the peer closes
|
|
164
|
-
// the connection. Hold its body until the retry policy decides whether to
|
|
165
|
-
// discard it for a retry or forward it as the final response.
|
|
166
|
-
this.pendingResponseData = null
|
|
167
|
-
this.pendingResponseTrailers = null
|
|
168
|
-
this.pendingResponseEnded = false
|
|
169
|
-
// Set once an abort during the backoff delivered the terminal error
|
|
170
|
-
// downstream; late policy callbacks and connection errors are then moot.
|
|
171
|
-
this.aborted = false
|
|
141
|
+
this.controllerProxy = new RetryController()
|
|
172
142
|
}
|
|
173
143
|
|
|
174
144
|
onResponseStartWithRetry (controller, statusCode, headers, statusMessage, err) {
|
|
@@ -200,20 +170,6 @@ class RetryHandler {
|
|
|
200
170
|
}
|
|
201
171
|
|
|
202
172
|
function shouldRetry (passedErr) {
|
|
203
|
-
if (this.aborted) {
|
|
204
|
-
// Aborted while the policy was deciding; the decision is moot.
|
|
205
|
-
return
|
|
206
|
-
}
|
|
207
|
-
this.retryPending = false
|
|
208
|
-
this.retryTimer = null
|
|
209
|
-
|
|
210
|
-
const pendingData = this.pendingResponseData
|
|
211
|
-
const pendingTrailers = this.pendingResponseTrailers
|
|
212
|
-
const pendingEnd = this.pendingResponseEnded
|
|
213
|
-
this.pendingResponseData = null
|
|
214
|
-
this.pendingResponseTrailers = null
|
|
215
|
-
this.pendingResponseEnded = false
|
|
216
|
-
|
|
217
173
|
if (passedErr) {
|
|
218
174
|
if (this.headersSent) {
|
|
219
175
|
// The downstream handler already received the response from an
|
|
@@ -224,15 +180,6 @@ class RetryHandler {
|
|
|
224
180
|
this.headersSent = true
|
|
225
181
|
this.checkpointResponseEnd(headers)
|
|
226
182
|
this.handler.onResponseStart?.(this.controllerProxy, statusCode, headers, statusMessage)
|
|
227
|
-
controller.resume()
|
|
228
|
-
|
|
229
|
-
if (pendingEnd) {
|
|
230
|
-
for (const chunk of pendingData) {
|
|
231
|
-
this.onResponseData(controller, chunk)
|
|
232
|
-
}
|
|
233
|
-
this.onResponseEnd(controller, pendingTrailers)
|
|
234
|
-
}
|
|
235
|
-
return
|
|
236
183
|
}
|
|
237
184
|
controller.resume()
|
|
238
185
|
return
|
|
@@ -240,33 +187,17 @@ class RetryHandler {
|
|
|
240
187
|
|
|
241
188
|
this.error = err
|
|
242
189
|
controller.resume()
|
|
243
|
-
if (pendingEnd) {
|
|
244
|
-
this.onResponseEnd(controller, pendingTrailers)
|
|
245
|
-
}
|
|
246
190
|
}
|
|
247
191
|
|
|
248
|
-
// The pause()/resume() pair (here and in shouldRetry) acts on THIS
|
|
249
|
-
// connection's controller -- never the downstream proxy. We hold this exact
|
|
250
|
-
// connection while the retry policy decides (possibly after a timeout) and
|
|
251
|
-
// must resume the same one. Routing this through controllerProxy would risk
|
|
252
|
-
// resuming a different connection if a later dispatch re-points the proxy in
|
|
253
|
-
// between, leaving this one paused forever -- the very stall the proxy exists
|
|
254
|
-
// to prevent.
|
|
255
192
|
controller.pause()
|
|
256
|
-
|
|
257
|
-
// a custom policy may return anything (or nothing), which is ignored.
|
|
258
|
-
this.retryPending = true
|
|
259
|
-
this.pendingResponseData = []
|
|
260
|
-
this.pendingResponseTrailers = null
|
|
261
|
-
this.pendingResponseEnded = false
|
|
262
|
-
this.retryTimer = this.retryOpts.retry(
|
|
193
|
+
this.retryOpts.retry(
|
|
263
194
|
err,
|
|
264
195
|
{
|
|
265
196
|
state: { counter: this.retryCount },
|
|
266
197
|
opts: { retryOptions: this.retryOpts, ...this.opts }
|
|
267
198
|
},
|
|
268
199
|
shouldRetry.bind(this)
|
|
269
|
-
)
|
|
200
|
+
)
|
|
270
201
|
}
|
|
271
202
|
|
|
272
203
|
checkpointResponseEnd (headers) {
|
|
@@ -284,25 +215,12 @@ class RetryHandler {
|
|
|
284
215
|
}
|
|
285
216
|
|
|
286
217
|
onRequestStart (controller, context) {
|
|
287
|
-
// request.js creates a fresh RequestController per dispatch and passes that
|
|
288
|
-
// same instance to every later callback of the dispatch. onRequestStart is
|
|
289
|
-
// the first callback (it is where the controller is created), so re-pointing
|
|
290
|
-
// the proxy here is enough to keep it on the active connection across every
|
|
291
|
-
// transparent retry/resume.
|
|
292
218
|
this.controllerProxy.target = controller
|
|
293
219
|
if (!this.headersSent) {
|
|
294
220
|
this.handler.onRequestStart?.(this.controllerProxy, context)
|
|
295
221
|
}
|
|
296
222
|
}
|
|
297
223
|
|
|
298
|
-
onBodySent (chunk) {
|
|
299
|
-
this.handler.onBodySent?.(chunk)
|
|
300
|
-
}
|
|
301
|
-
|
|
302
|
-
onRequestSent () {
|
|
303
|
-
this.handler.onRequestSent?.()
|
|
304
|
-
}
|
|
305
|
-
|
|
306
224
|
onRequestUpgrade (_controller, statusCode, headers, socket) {
|
|
307
225
|
this.handler.onRequestUpgrade?.(this.controllerProxy, statusCode, headers, socket)
|
|
308
226
|
}
|
|
@@ -317,8 +235,7 @@ class RetryHandler {
|
|
|
317
235
|
timeoutFactor,
|
|
318
236
|
statusCodes,
|
|
319
237
|
errorCodes,
|
|
320
|
-
methods
|
|
321
|
-
retryAfter
|
|
238
|
+
methods
|
|
322
239
|
} = retryOptions
|
|
323
240
|
const { counter } = state
|
|
324
241
|
|
|
@@ -350,7 +267,7 @@ class RetryHandler {
|
|
|
350
267
|
return
|
|
351
268
|
}
|
|
352
269
|
|
|
353
|
-
let retryAfterHeader =
|
|
270
|
+
let retryAfterHeader = headers?.['retry-after']
|
|
354
271
|
if (retryAfterHeader) {
|
|
355
272
|
retryAfterHeader = Number(retryAfterHeader)
|
|
356
273
|
retryAfterHeader = Number.isNaN(retryAfterHeader)
|
|
@@ -359,27 +276,28 @@ class RetryHandler {
|
|
|
359
276
|
}
|
|
360
277
|
|
|
361
278
|
const retryTimeout =
|
|
362
|
-
retryAfterHeader
|
|
363
|
-
?
|
|
364
|
-
:
|
|
365
|
-
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
// Return the backoff timer so the handler can cancel it when the
|
|
369
|
-
// consumer aborts while the retry decision is pending.
|
|
370
|
-
return setTimeout(() => cb(null), retryTimeout)
|
|
279
|
+
retryAfterHeader > 0
|
|
280
|
+
? Math.min(retryAfterHeader, maxTimeout)
|
|
281
|
+
: Math.min(minTimeout * timeoutFactor ** (counter - 1), maxTimeout)
|
|
282
|
+
|
|
283
|
+
setTimeout(() => cb(null), retryTimeout)
|
|
371
284
|
}
|
|
372
285
|
|
|
373
286
|
onResponseStart (controller, statusCode, headers, statusMessage) {
|
|
374
|
-
if (statusCode < 200) {
|
|
375
|
-
this.handler.onResponseStart?.(this.controllerProxy, statusCode, headers, statusMessage)
|
|
376
|
-
return
|
|
377
|
-
}
|
|
378
|
-
|
|
379
287
|
this.error = null
|
|
380
288
|
this.retryCount += 1
|
|
381
|
-
|
|
382
|
-
|
|
289
|
+
|
|
290
|
+
if (statusCode >= 300) {
|
|
291
|
+
const err = new RequestRetryError('Request failed', statusCode, {
|
|
292
|
+
headers,
|
|
293
|
+
data: {
|
|
294
|
+
count: this.retryCount
|
|
295
|
+
}
|
|
296
|
+
})
|
|
297
|
+
|
|
298
|
+
this.onResponseStartWithRetry(controller, statusCode, headers, statusMessage, err)
|
|
299
|
+
return
|
|
300
|
+
}
|
|
383
301
|
|
|
384
302
|
// Checkpoint for resume from where we left it
|
|
385
303
|
if (this.headersSent) {
|
|
@@ -427,24 +345,12 @@ class RetryHandler {
|
|
|
427
345
|
return
|
|
428
346
|
}
|
|
429
347
|
|
|
430
|
-
if (statusCode >= 300) {
|
|
431
|
-
const err = new RequestRetryError('Request failed', statusCode, {
|
|
432
|
-
headers,
|
|
433
|
-
data: {
|
|
434
|
-
count: this.retryCount
|
|
435
|
-
}
|
|
436
|
-
})
|
|
437
|
-
|
|
438
|
-
this.onResponseStartWithRetry(controller, statusCode, headers, statusMessage, err)
|
|
439
|
-
return
|
|
440
|
-
}
|
|
441
|
-
|
|
442
348
|
if (this.end == null) {
|
|
443
349
|
if (statusCode === 206) {
|
|
444
350
|
// First time we receive 206
|
|
445
351
|
const range = parseRangeHeader(headers['content-range'])
|
|
446
352
|
|
|
447
|
-
if (range == null
|
|
353
|
+
if (range == null) {
|
|
448
354
|
this.headersSent = true
|
|
449
355
|
this.handler.onResponseStart?.(
|
|
450
356
|
this.controllerProxy,
|
|
@@ -469,7 +375,7 @@ class RetryHandler {
|
|
|
469
375
|
}
|
|
470
376
|
|
|
471
377
|
// We make our best to checkpoint the body for further range headers
|
|
472
|
-
if (this.end == null
|
|
378
|
+
if (this.end == null) {
|
|
473
379
|
const contentLength = headers['content-length']
|
|
474
380
|
this.end = contentLength != null ? Number(contentLength) - 1 : null
|
|
475
381
|
}
|
|
@@ -510,11 +416,6 @@ class RetryHandler {
|
|
|
510
416
|
}
|
|
511
417
|
|
|
512
418
|
onResponseData (_controller, chunk) {
|
|
513
|
-
if (this.pendingResponseData !== null) {
|
|
514
|
-
this.pendingResponseData.push(chunk)
|
|
515
|
-
return
|
|
516
|
-
}
|
|
517
|
-
|
|
518
419
|
if (this.error) {
|
|
519
420
|
return
|
|
520
421
|
}
|
|
@@ -525,27 +426,11 @@ class RetryHandler {
|
|
|
525
426
|
}
|
|
526
427
|
|
|
527
428
|
onResponseEnd (_controller, trailers) {
|
|
528
|
-
if (this.pendingResponseData !== null) {
|
|
529
|
-
this.pendingResponseTrailers = trailers
|
|
530
|
-
this.pendingResponseEnded = true
|
|
531
|
-
return
|
|
532
|
-
}
|
|
533
|
-
|
|
534
429
|
if (this.error && this.retryOpts.throwOnError) {
|
|
535
430
|
throw this.error
|
|
536
431
|
}
|
|
537
432
|
|
|
538
433
|
if (!this.error) {
|
|
539
|
-
// Verify that the received body length matches the expected range
|
|
540
|
-
// when we have a finite end position (from Content-Length or Content-Range)
|
|
541
|
-
if (this.end != null && Number.isFinite(this.end)) {
|
|
542
|
-
if (this.start !== this.end + 1) {
|
|
543
|
-
throw new RequestRetryError('Content-Range mismatch', this.statusCode, {
|
|
544
|
-
headers: this.headers,
|
|
545
|
-
data: { count: this.retryCount }
|
|
546
|
-
})
|
|
547
|
-
}
|
|
548
|
-
}
|
|
549
434
|
this.retryCount = 0
|
|
550
435
|
return this.handler.onResponseEnd?.(this.controllerProxy, trailers)
|
|
551
436
|
}
|
|
@@ -555,9 +440,19 @@ class RetryHandler {
|
|
|
555
440
|
|
|
556
441
|
retry () {
|
|
557
442
|
if (this.start !== 0) {
|
|
443
|
+
const headers = { range: `bytes=${this.start}-${this.end ?? ''}` }
|
|
444
|
+
|
|
445
|
+
// Weak etag check - weak etags will make comparison algorithms never match
|
|
446
|
+
if (this.etag != null) {
|
|
447
|
+
headers['if-match'] = this.etag
|
|
448
|
+
}
|
|
449
|
+
|
|
558
450
|
this.opts = {
|
|
559
451
|
...this.opts,
|
|
560
|
-
headers:
|
|
452
|
+
headers: {
|
|
453
|
+
...this.opts.headers,
|
|
454
|
+
...headers
|
|
455
|
+
}
|
|
561
456
|
}
|
|
562
457
|
}
|
|
563
458
|
|
|
@@ -570,27 +465,12 @@ class RetryHandler {
|
|
|
570
465
|
}
|
|
571
466
|
|
|
572
467
|
onResponseError (controller, err) {
|
|
573
|
-
if (this.aborted) {
|
|
574
|
-
// #onAbort already delivered the terminal error downstream; the late
|
|
575
|
-
// error of the torn-down connection must not be forwarded twice.
|
|
576
|
-
return
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
// controller is THIS failed connection (not the proxy): we inspect whether
|
|
580
|
-
// the consumer aborted it to decide retry-vs-propagate.
|
|
581
468
|
if (controller?.aborted || isDisturbed(this.opts.body) || (this.headersSent && !this.resume)) {
|
|
582
469
|
this.handler.onResponseError?.(this.controllerProxy, err)
|
|
583
470
|
return
|
|
584
471
|
}
|
|
585
472
|
|
|
586
473
|
function shouldRetry (returnedErr) {
|
|
587
|
-
if (this.aborted) {
|
|
588
|
-
// Aborted while the policy was deciding; the decision is moot.
|
|
589
|
-
return
|
|
590
|
-
}
|
|
591
|
-
this.retryPending = false
|
|
592
|
-
this.retryTimer = null
|
|
593
|
-
|
|
594
474
|
if (!returnedErr) {
|
|
595
475
|
this.retry()
|
|
596
476
|
return
|
|
@@ -610,77 +490,15 @@ class RetryHandler {
|
|
|
610
490
|
this.retryCount += 1
|
|
611
491
|
}
|
|
612
492
|
|
|
613
|
-
this.
|
|
614
|
-
this.retryTimer = this.retryOpts.retry(
|
|
493
|
+
this.retryOpts.retry(
|
|
615
494
|
err,
|
|
616
495
|
{
|
|
617
496
|
state: { counter: this.retryCount },
|
|
618
497
|
opts: { retryOptions: this.retryOpts, ...this.opts }
|
|
619
498
|
},
|
|
620
499
|
shouldRetry.bind(this)
|
|
621
|
-
)
|
|
622
|
-
}
|
|
623
|
-
|
|
624
|
-
#onAbort (reason) {
|
|
625
|
-
// A consumer abort lands on the controller proxy. If the retry policy is
|
|
626
|
-
// still deciding (typically holding a backoff timer), cancel the wait and
|
|
627
|
-
// surface the abort immediately instead of letting the request hang until
|
|
628
|
-
// the backoff elapses.
|
|
629
|
-
if (!this.retryPending) {
|
|
630
|
-
return
|
|
631
|
-
}
|
|
632
|
-
|
|
633
|
-
this.aborted = true
|
|
634
|
-
this.retryPending = false
|
|
635
|
-
clearTimeout(this.retryTimer)
|
|
636
|
-
this.retryTimer = null
|
|
637
|
-
this.pendingResponseData = null
|
|
638
|
-
this.pendingResponseTrailers = null
|
|
639
|
-
this.pendingResponseEnded = false
|
|
640
|
-
this.handler.onResponseError?.(this.controllerProxy, reason ?? new RequestAbortedError())
|
|
641
|
-
}
|
|
642
|
-
}
|
|
643
|
-
|
|
644
|
-
function isReplacedHeader (key, etag) {
|
|
645
|
-
const name = key.toLowerCase()
|
|
646
|
-
return name === 'range' || (etag != null && name === 'if-match')
|
|
647
|
-
}
|
|
648
|
-
|
|
649
|
-
function buildResumeHeaders (headers, range, etag) {
|
|
650
|
-
if (Array.isArray(headers) || (headers && typeof headers === 'object' && hasSafeIterator(headers))) {
|
|
651
|
-
const ret = []
|
|
652
|
-
if (Array.isArray(headers)) {
|
|
653
|
-
for (let i = 0; i < headers.length; i += 2) {
|
|
654
|
-
if (!isReplacedHeader(headers[i], etag)) {
|
|
655
|
-
ret.push(headers[i], headers[i + 1])
|
|
656
|
-
}
|
|
657
|
-
}
|
|
658
|
-
} else {
|
|
659
|
-
for (const [key, value] of headers) {
|
|
660
|
-
if (!isReplacedHeader(key, etag)) {
|
|
661
|
-
ret.push(key, value)
|
|
662
|
-
}
|
|
663
|
-
}
|
|
664
|
-
}
|
|
665
|
-
ret.push('range', range)
|
|
666
|
-
// Weak etag check - weak etags will make comparison algorithms never match
|
|
667
|
-
if (etag != null) {
|
|
668
|
-
ret.push('if-match', etag)
|
|
669
|
-
}
|
|
670
|
-
return ret
|
|
671
|
-
}
|
|
672
|
-
|
|
673
|
-
const ret = {}
|
|
674
|
-
for (const key in headers) {
|
|
675
|
-
if (Object.hasOwn(headers, key) && !isReplacedHeader(key, etag)) {
|
|
676
|
-
ret[key] = headers[key]
|
|
677
|
-
}
|
|
678
|
-
}
|
|
679
|
-
ret.range = range
|
|
680
|
-
if (etag != null) {
|
|
681
|
-
ret['if-match'] = etag
|
|
500
|
+
)
|
|
682
501
|
}
|
|
683
|
-
return ret
|
|
684
502
|
}
|
|
685
503
|
|
|
686
504
|
module.exports = RetryHandler
|
|
@@ -0,0 +1,106 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const { parseHeaders } = require('../core/util')
|
|
4
|
+
const { InvalidArgumentError } = require('../core/errors')
|
|
5
|
+
|
|
6
|
+
const kResume = Symbol('resume')
|
|
7
|
+
|
|
8
|
+
class UnwrapController {
|
|
9
|
+
#paused = false
|
|
10
|
+
#reason = null
|
|
11
|
+
#aborted = false
|
|
12
|
+
#abort
|
|
13
|
+
|
|
14
|
+
[kResume] = null
|
|
15
|
+
|
|
16
|
+
rawHeaders = null
|
|
17
|
+
rawTrailers = null
|
|
18
|
+
|
|
19
|
+
constructor (abort) {
|
|
20
|
+
this.#abort = abort
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
pause () {
|
|
24
|
+
this.#paused = true
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
resume () {
|
|
28
|
+
if (this.#paused) {
|
|
29
|
+
this.#paused = false
|
|
30
|
+
this[kResume]?.()
|
|
31
|
+
}
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
abort (reason) {
|
|
35
|
+
if (!this.#aborted) {
|
|
36
|
+
this.#aborted = true
|
|
37
|
+
this.#reason = reason
|
|
38
|
+
this.#abort(reason)
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
get aborted () {
|
|
43
|
+
return this.#aborted
|
|
44
|
+
}
|
|
45
|
+
|
|
46
|
+
get reason () {
|
|
47
|
+
return this.#reason
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
get paused () {
|
|
51
|
+
return this.#paused
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
|
|
55
|
+
module.exports = class UnwrapHandler {
|
|
56
|
+
#handler
|
|
57
|
+
#controller
|
|
58
|
+
|
|
59
|
+
constructor (handler) {
|
|
60
|
+
this.#handler = handler
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
static unwrap (handler) {
|
|
64
|
+
// TODO (fix): More checks...
|
|
65
|
+
return !handler.onRequestStart ? handler : new UnwrapHandler(handler)
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
onConnect (abort, context) {
|
|
69
|
+
this.#controller = new UnwrapController(abort)
|
|
70
|
+
this.#handler.onRequestStart?.(this.#controller, context)
|
|
71
|
+
}
|
|
72
|
+
|
|
73
|
+
onResponseStarted () {
|
|
74
|
+
return this.#handler.onResponseStarted?.()
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
onUpgrade (statusCode, rawHeaders, socket) {
|
|
78
|
+
this.#controller.rawHeaders = rawHeaders
|
|
79
|
+
this.#handler.onRequestUpgrade?.(this.#controller, statusCode, parseHeaders(rawHeaders), socket)
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
onHeaders (statusCode, rawHeaders, resume, statusMessage) {
|
|
83
|
+
this.#controller[kResume] = resume
|
|
84
|
+
this.#controller.rawHeaders = rawHeaders
|
|
85
|
+
this.#handler.onResponseStart?.(this.#controller, statusCode, parseHeaders(rawHeaders), statusMessage)
|
|
86
|
+
return !this.#controller.paused
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
onData (data) {
|
|
90
|
+
this.#handler.onResponseData?.(this.#controller, data)
|
|
91
|
+
return !this.#controller.paused
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
onComplete (rawTrailers) {
|
|
95
|
+
this.#controller.rawTrailers = rawTrailers
|
|
96
|
+
this.#handler.onResponseEnd?.(this.#controller, parseHeaders(rawTrailers))
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
onError (err) {
|
|
100
|
+
if (!this.#handler.onResponseError) {
|
|
101
|
+
throw new InvalidArgumentError('invalid onError method')
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
this.#handler.onResponseError?.(this.#controller, err)
|
|
105
|
+
}
|
|
106
|
+
}
|
|
@@ -0,0 +1,105 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const { InvalidArgumentError } = require('../core/errors')
|
|
4
|
+
|
|
5
|
+
module.exports = class WrapHandler {
|
|
6
|
+
#handler
|
|
7
|
+
|
|
8
|
+
constructor (handler) {
|
|
9
|
+
this.#handler = handler
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
static wrap (handler) {
|
|
13
|
+
// TODO (fix): More checks...
|
|
14
|
+
return handler.onRequestStart ? handler : new WrapHandler(handler)
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
// Unwrap Interface
|
|
18
|
+
|
|
19
|
+
onConnect (abort, context) {
|
|
20
|
+
return this.#handler.onConnect?.(abort, context)
|
|
21
|
+
}
|
|
22
|
+
|
|
23
|
+
onResponseStarted () {
|
|
24
|
+
return this.#handler.onResponseStarted?.()
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
onHeaders (statusCode, rawHeaders, resume, statusMessage) {
|
|
28
|
+
return this.#handler.onHeaders?.(statusCode, rawHeaders, resume, statusMessage)
|
|
29
|
+
}
|
|
30
|
+
|
|
31
|
+
onUpgrade (statusCode, rawHeaders, socket) {
|
|
32
|
+
return this.#handler.onUpgrade?.(statusCode, rawHeaders, socket)
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
onData (data) {
|
|
36
|
+
return this.#handler.onData?.(data)
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
onComplete (trailers) {
|
|
40
|
+
return this.#handler.onComplete?.(trailers)
|
|
41
|
+
}
|
|
42
|
+
|
|
43
|
+
onError (err) {
|
|
44
|
+
if (!this.#handler.onError) {
|
|
45
|
+
throw err
|
|
46
|
+
}
|
|
47
|
+
|
|
48
|
+
return this.#handler.onError?.(err)
|
|
49
|
+
}
|
|
50
|
+
|
|
51
|
+
// Wrap Interface
|
|
52
|
+
|
|
53
|
+
onRequestStart (controller, context) {
|
|
54
|
+
this.#handler.onConnect?.((reason) => controller.abort(reason), context)
|
|
55
|
+
}
|
|
56
|
+
|
|
57
|
+
onRequestUpgrade (controller, statusCode, headers, socket) {
|
|
58
|
+
const rawHeaders = []
|
|
59
|
+
for (const [key, val] of Object.entries(headers)) {
|
|
60
|
+
rawHeaders.push(Buffer.from(key, 'latin1'), toRawHeaderValue(val))
|
|
61
|
+
}
|
|
62
|
+
|
|
63
|
+
this.#handler.onUpgrade?.(statusCode, rawHeaders, socket)
|
|
64
|
+
}
|
|
65
|
+
|
|
66
|
+
onResponseStart (controller, statusCode, headers, statusMessage) {
|
|
67
|
+
const rawHeaders = []
|
|
68
|
+
for (const [key, val] of Object.entries(headers)) {
|
|
69
|
+
rawHeaders.push(Buffer.from(key, 'latin1'), toRawHeaderValue(val))
|
|
70
|
+
}
|
|
71
|
+
|
|
72
|
+
if (this.#handler.onHeaders?.(statusCode, rawHeaders, () => controller.resume(), statusMessage) === false) {
|
|
73
|
+
controller.pause()
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
|
|
77
|
+
onResponseData (controller, data) {
|
|
78
|
+
if (this.#handler.onData?.(data) === false) {
|
|
79
|
+
controller.pause()
|
|
80
|
+
}
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
onResponseEnd (controller, trailers) {
|
|
84
|
+
const rawTrailers = []
|
|
85
|
+
for (const [key, val] of Object.entries(trailers)) {
|
|
86
|
+
rawTrailers.push(Buffer.from(key, 'latin1'), toRawHeaderValue(val))
|
|
87
|
+
}
|
|
88
|
+
|
|
89
|
+
this.#handler.onComplete?.(rawTrailers)
|
|
90
|
+
}
|
|
91
|
+
|
|
92
|
+
onResponseError (controller, err) {
|
|
93
|
+
if (!this.#handler.onError) {
|
|
94
|
+
throw new InvalidArgumentError('invalid onError method')
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
this.#handler.onError?.(err)
|
|
98
|
+
}
|
|
99
|
+
}
|
|
100
|
+
|
|
101
|
+
function toRawHeaderValue (value) {
|
|
102
|
+
return Array.isArray(value)
|
|
103
|
+
? value.map((item) => Buffer.from(item, 'latin1'))
|
|
104
|
+
: Buffer.from(value, 'latin1')
|
|
105
|
+
}
|