@rsalmn/extremerouter 0.6.6 → 0.6.8
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/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +8 -3
- package/app/.next-cli-build/build-manifest.json +2 -2
- package/app/.next-cli-build/prerender-manifest.json +48 -0
- package/app/.next-cli-build/required-server-files.json +2 -1
- package/app/.next-cli-build/routes-manifest.json +34 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js +2 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/alerts/page_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +2 -2
- 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 +3 -3
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +2 -2
- 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/health/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/health/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +3 -3
- 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 +2 -2
- 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 +3 -3
- 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 +2 -2
- 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 +2 -2
- 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/overview/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/overview/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +2 -2
- 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/playground/page.js +2 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/playground/page_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +2 -2
- 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 +4 -4
- 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 +2 -2
- 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 +2 -2
- 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/quota/page.js +2 -2
- 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 +2 -2
- 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/swarm/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/swarm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +2 -2
- 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 +2 -2
- 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 +2 -2
- 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 +3 -3
- 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/_global-error.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_global-error.segments/_index.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 +2 -2
- 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 +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/api/alerts/test/route.js +2 -0
- package/app/.next-cli-build/server/app/api/alerts/test/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/alerts/test/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/auth/login/route.js +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 +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 +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 +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 +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 +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/status/route.js +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 +2 -2
- 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 +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/codex-settings/route.js +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 +1 -1
- 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 +2 -2
- 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 +2 -2
- 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/deepseek-tui-settings/route.js +2 -2
- 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/droid-settings/route.js +2 -2
- 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/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 +1 -1
- 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/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 +1 -1
- 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/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/route.js +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/start/route.js +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 +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 +2 -2
- 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/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/providers/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js +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/health/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/health/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js +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 +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 +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 +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 +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 +5 -5
- 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 +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 +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 +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 +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 +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/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 +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/cursor/auto-import/route.js +2 -2
- 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 +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/iflow/cookie/route.js +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 +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 +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/pricing/route.js +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 +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 +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]/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/[id]/vault-pool/route.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/vault-pool/route_client-reference-manifest.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route.js.nft.json +1 -0
- package/app/.next-cli-build/server/app/api/providers/[id]/zenmux-plans/route_client-reference-manifest.js +1 -0
- 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 +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 +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/proxy-pools/[id]/route.js +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 +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 +2 -2
- 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 +2 -2
- 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/route.js +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 +2 -2
- 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/settings/database/route.js +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 +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 +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 +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/swarm/active/route.js +1 -1
- package/app/.next-cli-build/server/app/api/swarm/active/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/swarm/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/swarm/stream/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js +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 +2 -2
- 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 +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 +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 +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 +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 +3 -3
- 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]/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 +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 +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 +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/meta/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/meta/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 +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 +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 +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 +2 -2
- 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 +1 -1
- 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 +2 -2
- 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 +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/[kind]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[kind]/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/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 +2 -2
- 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 +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/callback.segments/callback.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/alerts.html +1 -0
- package/app/.next-cli-build/server/app/dashboard/alerts.meta +17 -0
- package/app/.next-cli-build/server/app/dashboard/alerts.rsc +25 -0
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/!KGRhc2hib2FyZCk/dashboard/alerts/__PAGE__.segment.rsc +9 -0
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/!KGRhc2hib2FyZCk/dashboard/alerts.segment.rsc +5 -0
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +5 -0
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -0
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/_full.segment.rsc +25 -0
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/_head.segment.rsc +6 -0
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/_index.segment.rsc +9 -0
- package/app/.next-cli-build/server/app/dashboard/alerts.segments/_tree.segment.rsc +3 -0
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- 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 +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/overview.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/overview.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/overview.segments/!KGRhc2hib2FyZCk/dashboard/overview/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/overview.segments/!KGRhc2hib2FyZCk/dashboard/overview.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/overview.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/overview.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/overview.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/overview.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/overview.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/overview.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/playground.html +1 -0
- package/app/.next-cli-build/server/app/dashboard/playground.meta +17 -0
- package/app/.next-cli-build/server/app/dashboard/playground.rsc +22 -0
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground/__PAGE__.segment.rsc +6 -0
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard/playground.segment.rsc +5 -0
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +5 -0
- package/app/.next-cli-build/server/app/dashboard/playground.segments/!KGRhc2hib2FyZCk.segment.rsc +5 -0
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_full.segment.rsc +22 -0
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_head.segment.rsc +6 -0
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_index.segment.rsc +9 -0
- package/app/.next-cli-build/server/app/dashboard/playground.segments/_tree.segment.rsc +3 -0
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +3 -3
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +8 -8
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +2 -2
- 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 +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +7 -7
- package/app/.next-cli-build/server/app/dashboard.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/dashboard.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/favicon.ico/route.js +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 +5 -5
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/index.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing/page.js +2 -2
- 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 +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/landing.segments/landing.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login/page.js +2 -2
- 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 +6 -6
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +6 -6
- package/app/.next-cli-build/server/app/login.segments/_head.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/login.segments/_index.segment.rsc +5 -5
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +2 -2
- package/app/.next-cli-build/server/app/login.segments/login.segment.rsc +1 -1
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js.nft.json +1 -1
- package/app/.next-cli-build/server/app/page.js +2 -2
- 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 +8 -3
- package/app/.next-cli-build/server/chunks/1051.js +1 -1
- package/app/.next-cli-build/server/chunks/{4746.js → 1350.js} +2 -2
- package/app/.next-cli-build/server/chunks/1719.js +1 -0
- package/app/.next-cli-build/server/chunks/2231.js +1 -1
- package/app/.next-cli-build/server/chunks/2701.js +1 -1
- package/app/.next-cli-build/server/chunks/318.js +13 -11
- package/app/.next-cli-build/server/chunks/412.js +2 -2
- package/app/.next-cli-build/server/chunks/5141.js +1 -0
- package/app/.next-cli-build/server/chunks/5612.js +1 -1
- package/app/.next-cli-build/server/chunks/5699.js +1 -1
- package/app/.next-cli-build/server/chunks/5961.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/6306.js +1 -1
- package/app/.next-cli-build/server/chunks/6316.js +2 -1
- package/app/.next-cli-build/server/chunks/{8658.js → 6630.js} +1 -1
- package/app/.next-cli-build/server/chunks/7524.js +1 -0
- package/app/.next-cli-build/server/chunks/8238.js +1 -1
- package/app/.next-cli-build/server/chunks/8271.js +1 -1
- package/app/.next-cli-build/server/chunks/8833.js +1 -1
- package/app/.next-cli-build/server/chunks/8895.js +17 -17
- package/app/.next-cli-build/server/chunks/{4884.js → 9248.js} +5 -5
- package/app/.next-cli-build/server/chunks/9573.js +2 -0
- package/app/.next-cli-build/server/chunks/9609.js +1 -0
- package/app/.next-cli-build/server/chunks/9630.js +1 -1
- package/app/.next-cli-build/server/chunks/9903.js +2 -0
- 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/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/static/6ddNIh75ogte-iBCWv6aC/_buildManifest.js +1 -0
- package/app/.next-cli-build/static/chunks/1321-76d1d90661755074.js +1 -0
- package/app/.next-cli-build/static/chunks/5497-b52a89f9755eb560.js +7 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/alerts/page-9f05c495f92fb578.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-13dd1e8e32f7d580.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/page-d88cff439c2fa57d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/playground/page-503d94f002901e45.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-ba5802aef0691320.js +10 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-92152010fe3fda37.js +1 -0
- package/app/.next-cli-build/static/chunks/app/_global-error/page-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/alerts/test/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/combos/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/providers/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/health/stream/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/init/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/keys/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/locale/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/vault-pool/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/zenmux-plans/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/settings/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tags/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/app/page-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-d3db31f01a1d0f67.js +1 -0
- package/app/.next-cli-build/static/css/1bc6732048894b8c.css +1 -0
- package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-shm +0 -0
- package/app/cli/.build-home/AppData/Roaming/extremerouter/db/data.sqlite-wal +0 -0
- package/app/node_modules/wreq-js/dist/wreq-js.cjs +2216 -0
- package/app/node_modules/wreq-js/package.json +120 -0
- package/app/package.json +2 -1
- package/app/public/providers/api-airforce.svg +8 -0
- package/app/server.js +1 -1
- package/package.json +1 -1
- package/app/.next-cli-build/server/chunks/4827.js +0 -1
- package/app/.next-cli-build/server/chunks/8497.js +0 -1
- package/app/.next-cli-build/static/chunks/1321-272aef69f8a5a079.js +0 -1
- package/app/.next-cli-build/static/chunks/5497-6e1985d958a64ed9.js +0 -7
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/combos/page-bb8f74eb19be72b4.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/overview/page-a51a293917886fef.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-ec258bc489c68411.js +0 -10
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/page-9e34cc08c32987bd.js +0 -1
- package/app/.next-cli-build/static/chunks/app/_global-error/page-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/login/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/logout/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/callback/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/start/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/oidc/test/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/reset-password/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/auth/status/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/all-statuses/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/alias/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/antigravity-mitm/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/claude-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cline-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/codex-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/copilot-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/cowork-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/deepseek-tui-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/droid-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/hermes-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/jcode-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/kilo-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/openclaw-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/cli-tools/opencode-settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/[id]/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/combos/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/start/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/status/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/headroom/stop/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/providers/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/health/stream/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/init/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/[id]/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/keys/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/locale/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/message/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/mcp/[plugin]/sse/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/deepgram/voices/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/inworld/voices/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/minimax/voices/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/media-providers/tts/voices/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/alias/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/availability/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/custom/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/disabled/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/models/test/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/[provider]/[action]/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/bulk-import/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/codex/import-token/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/auto-import/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/cursor/import/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/gitlab/pat/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/iflow/cookie/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/api-key/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/auto-import/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/import-cli-proxy/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-authorize/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/oauth/kiro/social-exchange/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/pricing/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/[id]/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/provider-nodes/validate/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/models/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/[id]/test-models/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/client/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/kilo/free-models/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/suggested-models/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/test-batch/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/providers/validate/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/[id]/test/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/deno-deploy/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/proxy-pools/vercel-deploy/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/database/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/proxy-test/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/require-login/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/settings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/shutdown/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/swarm/active/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/swarm/stream/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tags/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/console-logs/stream/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/load/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/save/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/send/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/translator/translate/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/disable/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/enable/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/status/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-check/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-disable/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-enable/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/tunnel/tailscale-install/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/[connectionId]/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/chart/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/history/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/logs/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/meta/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/providers/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-details/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/request-logs/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stats/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/usage/stream/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/api/chat/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/speech/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/transcriptions/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/audio/voices/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/chat/completions/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/embeddings/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/images/generations/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/count_tokens/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/messages/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/[kind]/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/info/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/models/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/compact/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/responses/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/search/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1/web/fetch/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/[...path]/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/v1beta/models/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/shutdown/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/api/version/update/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/manifest.webmanifest/route-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/app/page-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/app-error-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/forbidden-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/not-found-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/chunks/next/dist/client/components/builtin/unauthorized-5ba6931159d13181.js +0 -1
- package/app/.next-cli-build/static/css/f8bcd5e082a2459f.css +0 -1
- package/app/.next-cli-build/static/nn0K2UwbRB5lQVINYaLtq/_buildManifest.js +0 -1
- package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/upgrade-0.6.2-to-0.6.3-0.6.3-20260704-134754/data.sqlite +0 -0
- /package/app/.next-cli-build/static/{nn0K2UwbRB5lQVINYaLtq → 6ddNIh75ogte-iBCWv6aC}/_ssgManifest.js +0 -0
- /package/app/cli/.build-home/AppData/Roaming/extremerouter/db/backups/{upgrade-0.6.0-to-0.6.2-0.6.2-20260704-113435 → upgrade-0.6.6-to-0.6.7-0.6.7-20260708-103430}/data.sqlite +0 -0
|
@@ -0,0 +1,2216 @@
|
|
|
1
|
+
Object.defineProperties(exports, {
|
|
2
|
+
__esModule: { value: true },
|
|
3
|
+
[Symbol.toStringTag]: { value: "Module" }
|
|
4
|
+
});
|
|
5
|
+
let node_crypto = require("node:crypto");
|
|
6
|
+
let node_http = require("node:http");
|
|
7
|
+
let node_stream = require("node:stream");
|
|
8
|
+
let node_stream_web = require("node:stream/web");
|
|
9
|
+
//#region src/native-require-cjs.ts
|
|
10
|
+
const nativeRequire = require;
|
|
11
|
+
//#endregion
|
|
12
|
+
//#region src/types.ts
|
|
13
|
+
/**
|
|
14
|
+
* Error thrown when a request fails. This can occur due to network errors,
|
|
15
|
+
* timeouts, invalid URLs, or other request-related issues.
|
|
16
|
+
*
|
|
17
|
+
* @example
|
|
18
|
+
* ```typescript
|
|
19
|
+
* try {
|
|
20
|
+
* const response = await fetch('https://api.example.com');
|
|
21
|
+
* } catch (error) {
|
|
22
|
+
* if (error instanceof RequestError) {
|
|
23
|
+
* console.error('Request failed:', error.message);
|
|
24
|
+
* }
|
|
25
|
+
* }
|
|
26
|
+
* ```
|
|
27
|
+
*/
|
|
28
|
+
var RequestError = class extends TypeError {
|
|
29
|
+
constructor(message) {
|
|
30
|
+
super(message);
|
|
31
|
+
this.name = "RequestError";
|
|
32
|
+
}
|
|
33
|
+
};
|
|
34
|
+
//#endregion
|
|
35
|
+
//#region src/wreq-js.ts
|
|
36
|
+
let nativeBinding;
|
|
37
|
+
let cachedProfiles;
|
|
38
|
+
let cachedProfileSet;
|
|
39
|
+
let cachedOperatingSystems;
|
|
40
|
+
let cachedOperatingSystemSet;
|
|
41
|
+
function detectLibc() {
|
|
42
|
+
if (process.platform !== "linux") return;
|
|
43
|
+
const envLibc = process.env.LIBC ?? process.env.npm_config_libc;
|
|
44
|
+
if (envLibc) return envLibc.toLowerCase().includes("musl") ? "musl" : "gnu";
|
|
45
|
+
try {
|
|
46
|
+
if ((process.report?.getReport?.())?.header?.glibcVersionRuntime) return "gnu";
|
|
47
|
+
return "musl";
|
|
48
|
+
} catch {
|
|
49
|
+
return "gnu";
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
function loadNativeBinding() {
|
|
53
|
+
const platform = process.platform;
|
|
54
|
+
const arch = process.arch;
|
|
55
|
+
const libc = detectLibc();
|
|
56
|
+
if (platform === "darwin" && arch === "x64") try {
|
|
57
|
+
return nativeRequire("../rust/wreq-js.darwin-x64.node");
|
|
58
|
+
} catch {
|
|
59
|
+
try {
|
|
60
|
+
return nativeRequire("../rust/wreq-js.node");
|
|
61
|
+
} catch {
|
|
62
|
+
throw new Error("Failed to load native module for darwin-x64. Tried: ../rust/wreq-js.darwin-x64.node and ../rust/wreq-js.node. Make sure the package is installed correctly and the native module is built for your platform.");
|
|
63
|
+
}
|
|
64
|
+
}
|
|
65
|
+
if (platform === "darwin" && arch === "arm64") try {
|
|
66
|
+
return nativeRequire("../rust/wreq-js.darwin-arm64.node");
|
|
67
|
+
} catch {
|
|
68
|
+
try {
|
|
69
|
+
return nativeRequire("../rust/wreq-js.node");
|
|
70
|
+
} catch {
|
|
71
|
+
throw new Error("Failed to load native module for darwin-arm64. Tried: ../rust/wreq-js.darwin-arm64.node and ../rust/wreq-js.node. Make sure the package is installed correctly and the native module is built for your platform.");
|
|
72
|
+
}
|
|
73
|
+
}
|
|
74
|
+
if (platform === "linux" && arch === "x64") {
|
|
75
|
+
if (libc === "musl") try {
|
|
76
|
+
return nativeRequire("../rust/wreq-js.linux-x64-musl.node");
|
|
77
|
+
} catch {
|
|
78
|
+
try {
|
|
79
|
+
return nativeRequire("../rust/wreq-js.node");
|
|
80
|
+
} catch {
|
|
81
|
+
throw new Error("Failed to load native module for linux-x64-musl. Tried: ../rust/wreq-js.linux-x64-musl.node and ../rust/wreq-js.node. Make sure the package is installed correctly and the native module is built for your platform.");
|
|
82
|
+
}
|
|
83
|
+
}
|
|
84
|
+
try {
|
|
85
|
+
return nativeRequire("../rust/wreq-js.linux-x64-gnu.node");
|
|
86
|
+
} catch {
|
|
87
|
+
try {
|
|
88
|
+
return nativeRequire("../rust/wreq-js.node");
|
|
89
|
+
} catch {
|
|
90
|
+
throw new Error("Failed to load native module for linux-x64-gnu. Tried: ../rust/wreq-js.linux-x64-gnu.node and ../rust/wreq-js.node. Make sure the package is installed correctly and the native module is built for your platform.");
|
|
91
|
+
}
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
if (platform === "linux" && arch === "arm64") {
|
|
95
|
+
if (libc === "musl") try {
|
|
96
|
+
return nativeRequire("../rust/wreq-js.linux-arm64-musl.node");
|
|
97
|
+
} catch {
|
|
98
|
+
try {
|
|
99
|
+
return nativeRequire("../rust/wreq-js.node");
|
|
100
|
+
} catch {
|
|
101
|
+
throw new Error("Failed to load native module for linux-arm64-musl. Tried: ../rust/wreq-js.linux-arm64-musl.node and ../rust/wreq-js.node. Make sure the package is installed correctly and the native module is built for your platform.");
|
|
102
|
+
}
|
|
103
|
+
}
|
|
104
|
+
try {
|
|
105
|
+
return nativeRequire("../rust/wreq-js.linux-arm64-gnu.node");
|
|
106
|
+
} catch {
|
|
107
|
+
try {
|
|
108
|
+
return nativeRequire("../rust/wreq-js.node");
|
|
109
|
+
} catch {
|
|
110
|
+
throw new Error("Failed to load native module for linux-arm64-gnu. Tried: ../rust/wreq-js.linux-arm64-gnu.node and ../rust/wreq-js.node. Make sure the package is installed correctly and the native module is built for your platform.");
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
}
|
|
114
|
+
if (platform === "win32" && arch === "x64") try {
|
|
115
|
+
return nativeRequire("../rust/wreq-js.win32-x64-msvc.node");
|
|
116
|
+
} catch {
|
|
117
|
+
try {
|
|
118
|
+
return nativeRequire("../rust/wreq-js.node");
|
|
119
|
+
} catch {
|
|
120
|
+
throw new Error("Failed to load native module for win32-x64-msvc. Tried: ../rust/wreq-js.win32-x64-msvc.node and ../rust/wreq-js.node. Make sure the package is installed correctly and the native module is built for your platform.");
|
|
121
|
+
}
|
|
122
|
+
}
|
|
123
|
+
throw new Error(`Unsupported platform: ${platform}-${arch}${libc ? `-${libc}` : ""}. Supported platforms: darwin-x64, darwin-arm64, linux-x64-gnu, linux-x64-musl, linux-arm64-gnu, linux-arm64-musl, win32-x64-msvc`);
|
|
124
|
+
}
|
|
125
|
+
nativeBinding = loadNativeBinding();
|
|
126
|
+
const websocketFinalizer = typeof FinalizationRegistry === "function" ? new FinalizationRegistry((connection) => {
|
|
127
|
+
nativeBinding.websocketClose(connection).catch(() => void 0);
|
|
128
|
+
}) : void 0;
|
|
129
|
+
const bodyHandleFinalizer = typeof FinalizationRegistry === "function" ? new FinalizationRegistry((handle) => {
|
|
130
|
+
if (handle.released) return;
|
|
131
|
+
handle.released = true;
|
|
132
|
+
try {
|
|
133
|
+
nativeBinding.cancelBody(handle.id);
|
|
134
|
+
} catch {}
|
|
135
|
+
}) : void 0;
|
|
136
|
+
const DEFAULT_BROWSER = "chrome_142";
|
|
137
|
+
const DEFAULT_OS = "macos";
|
|
138
|
+
const DEFAULT_REQUEST_TIMEOUT_MS = 3e5;
|
|
139
|
+
const DEFAULT_TRUST_STORE = "combined";
|
|
140
|
+
const SUPPORTED_OSES = [
|
|
141
|
+
"windows",
|
|
142
|
+
"macos",
|
|
143
|
+
"linux",
|
|
144
|
+
"android",
|
|
145
|
+
"ios"
|
|
146
|
+
];
|
|
147
|
+
const UTF8_DECODER = new TextDecoder("utf-8");
|
|
148
|
+
let ephemeralIdCounter = 0;
|
|
149
|
+
function generateEphemeralSessionId() {
|
|
150
|
+
return `_e${++ephemeralIdCounter}`;
|
|
151
|
+
}
|
|
152
|
+
function generateSessionId() {
|
|
153
|
+
return (0, node_crypto.randomUUID)();
|
|
154
|
+
}
|
|
155
|
+
function normalizeSessionOptions(options) {
|
|
156
|
+
const sessionId = options?.sessionId ?? generateSessionId();
|
|
157
|
+
const defaults = {
|
|
158
|
+
transportMode: resolveEmulationMode(options?.browser, options?.os, options?.emulation),
|
|
159
|
+
trustStore: DEFAULT_TRUST_STORE
|
|
160
|
+
};
|
|
161
|
+
if (options?.proxy !== void 0) defaults.proxy = options.proxy;
|
|
162
|
+
if (options?.timeout !== void 0) {
|
|
163
|
+
validateTimeout(options.timeout);
|
|
164
|
+
defaults.timeout = options.timeout;
|
|
165
|
+
}
|
|
166
|
+
if (options?.insecure !== void 0) defaults.insecure = options.insecure;
|
|
167
|
+
if (options?.trustStore !== void 0) {
|
|
168
|
+
validateTrustStore(options.trustStore);
|
|
169
|
+
defaults.trustStore = options.trustStore;
|
|
170
|
+
}
|
|
171
|
+
if (options?.defaultHeaders !== void 0) defaults.defaultHeaders = headersToTuples(options.defaultHeaders);
|
|
172
|
+
if (options?.captureDiagnostics !== void 0) defaults.captureDiagnostics = options.captureDiagnostics;
|
|
173
|
+
return {
|
|
174
|
+
sessionId,
|
|
175
|
+
defaults
|
|
176
|
+
};
|
|
177
|
+
}
|
|
178
|
+
function isIterable(value) {
|
|
179
|
+
return Boolean(value) && typeof value[Symbol.iterator] === "function";
|
|
180
|
+
}
|
|
181
|
+
function isPlainObject(value) {
|
|
182
|
+
if (typeof value !== "object" || value === null) return false;
|
|
183
|
+
const proto = Object.getPrototypeOf(value);
|
|
184
|
+
return proto === Object.prototype || proto === null;
|
|
185
|
+
}
|
|
186
|
+
function coerceHeaderValue(value) {
|
|
187
|
+
return String(value);
|
|
188
|
+
}
|
|
189
|
+
var Headers = class Headers {
|
|
190
|
+
store = /* @__PURE__ */ new Map();
|
|
191
|
+
constructor(init) {
|
|
192
|
+
if (init) this.applyInit(init);
|
|
193
|
+
}
|
|
194
|
+
applyInit(init) {
|
|
195
|
+
if (init instanceof Headers) {
|
|
196
|
+
for (const [name, value] of init) this.append(name, value);
|
|
197
|
+
return;
|
|
198
|
+
}
|
|
199
|
+
if (Array.isArray(init) || isIterable(init)) {
|
|
200
|
+
for (const tuple of init) {
|
|
201
|
+
if (!tuple) continue;
|
|
202
|
+
const [name, value] = tuple;
|
|
203
|
+
this.append(name, value);
|
|
204
|
+
}
|
|
205
|
+
return;
|
|
206
|
+
}
|
|
207
|
+
if (isPlainObject(init)) for (const [name, value] of Object.entries(init)) {
|
|
208
|
+
if (value === void 0 || value === null) continue;
|
|
209
|
+
this.set(name, coerceHeaderValue(value));
|
|
210
|
+
}
|
|
211
|
+
}
|
|
212
|
+
normalizeName(name) {
|
|
213
|
+
if (typeof name !== "string") throw new TypeError("Header name must be a string");
|
|
214
|
+
const trimmed = name.trim();
|
|
215
|
+
if (!trimmed) throw new TypeError("Header name must not be empty");
|
|
216
|
+
return {
|
|
217
|
+
key: trimmed.toLowerCase(),
|
|
218
|
+
display: trimmed
|
|
219
|
+
};
|
|
220
|
+
}
|
|
221
|
+
assertValue(value) {
|
|
222
|
+
if (value === void 0 || value === null) throw new TypeError("Header value must not be null or undefined");
|
|
223
|
+
return coerceHeaderValue(value);
|
|
224
|
+
}
|
|
225
|
+
append(name, value) {
|
|
226
|
+
const normalized = this.normalizeName(name);
|
|
227
|
+
const existing = this.store.get(normalized.key);
|
|
228
|
+
const coercedValue = this.assertValue(value);
|
|
229
|
+
if (existing) {
|
|
230
|
+
existing.values.push(coercedValue);
|
|
231
|
+
return;
|
|
232
|
+
}
|
|
233
|
+
this.store.set(normalized.key, {
|
|
234
|
+
name: normalized.display,
|
|
235
|
+
values: [coercedValue]
|
|
236
|
+
});
|
|
237
|
+
}
|
|
238
|
+
set(name, value) {
|
|
239
|
+
const normalized = this.normalizeName(name);
|
|
240
|
+
const coercedValue = this.assertValue(value);
|
|
241
|
+
this.store.set(normalized.key, {
|
|
242
|
+
name: normalized.display,
|
|
243
|
+
values: [coercedValue]
|
|
244
|
+
});
|
|
245
|
+
}
|
|
246
|
+
get(name) {
|
|
247
|
+
const normalized = this.normalizeName(name);
|
|
248
|
+
const entry = this.store.get(normalized.key);
|
|
249
|
+
return entry ? entry.values.join(", ") : null;
|
|
250
|
+
}
|
|
251
|
+
has(name) {
|
|
252
|
+
const normalized = this.normalizeName(name);
|
|
253
|
+
return this.store.has(normalized.key);
|
|
254
|
+
}
|
|
255
|
+
delete(name) {
|
|
256
|
+
const normalized = this.normalizeName(name);
|
|
257
|
+
this.store.delete(normalized.key);
|
|
258
|
+
}
|
|
259
|
+
entries() {
|
|
260
|
+
return this[Symbol.iterator]();
|
|
261
|
+
}
|
|
262
|
+
*keys() {
|
|
263
|
+
for (const [name] of this) yield name;
|
|
264
|
+
}
|
|
265
|
+
*values() {
|
|
266
|
+
for (const [, value] of this) yield value;
|
|
267
|
+
}
|
|
268
|
+
forEach(callback, thisArg) {
|
|
269
|
+
for (const [name, value] of this) callback.call(thisArg, value, name, this);
|
|
270
|
+
}
|
|
271
|
+
[Symbol.iterator]() {
|
|
272
|
+
const generator = function* (store) {
|
|
273
|
+
for (const entry of store.values()) yield [entry.name, entry.values.join(", ")];
|
|
274
|
+
};
|
|
275
|
+
return generator(this.store);
|
|
276
|
+
}
|
|
277
|
+
toObject() {
|
|
278
|
+
const result = {};
|
|
279
|
+
for (const [name, value] of this) result[name] = value;
|
|
280
|
+
return result;
|
|
281
|
+
}
|
|
282
|
+
toTuples() {
|
|
283
|
+
const result = [];
|
|
284
|
+
for (const [name, value] of this) result.push([name, value]);
|
|
285
|
+
return result;
|
|
286
|
+
}
|
|
287
|
+
};
|
|
288
|
+
function headersToTuples(init) {
|
|
289
|
+
return new Headers(init).toTuples();
|
|
290
|
+
}
|
|
291
|
+
function hasHeaderName(tuples, name) {
|
|
292
|
+
if (!tuples) return false;
|
|
293
|
+
const target = name.toLowerCase();
|
|
294
|
+
for (const [headerName] of tuples) if (headerName.toLowerCase() === target) return true;
|
|
295
|
+
return false;
|
|
296
|
+
}
|
|
297
|
+
function hasWebSocketProtocolHeader(headers) {
|
|
298
|
+
const protocolHeaderName = "Sec-WebSocket-Protocol";
|
|
299
|
+
if (!headers) return false;
|
|
300
|
+
return hasHeaderName(headersToTuples(headers), protocolHeaderName);
|
|
301
|
+
}
|
|
302
|
+
function assertNoManualWebSocketProtocolHeader(headers) {
|
|
303
|
+
if (hasWebSocketProtocolHeader(headers)) throw new RequestError("Do not set `Sec-WebSocket-Protocol` header manually; use the `protocols` option instead.");
|
|
304
|
+
}
|
|
305
|
+
function normalizeWebSocketProtocolList(protocols) {
|
|
306
|
+
if (protocols === void 0) return;
|
|
307
|
+
return typeof protocols === "string" ? [protocols] : [...protocols];
|
|
308
|
+
}
|
|
309
|
+
function mergeHeaderTuples(defaults, overrides) {
|
|
310
|
+
if (!defaults) return overrides === void 0 ? void 0 : headersToTuples(overrides);
|
|
311
|
+
if (overrides === void 0) return defaults;
|
|
312
|
+
const overrideTuples = headersToTuples(overrides);
|
|
313
|
+
if (overrideTuples.length === 0) return defaults;
|
|
314
|
+
const overrideKeys = /* @__PURE__ */ new Set();
|
|
315
|
+
for (const tuple of overrideTuples) overrideKeys.add(tuple[0].toLowerCase());
|
|
316
|
+
const merged = [];
|
|
317
|
+
for (const tuple of defaults) if (!overrideKeys.has(tuple[0].toLowerCase())) merged.push(tuple);
|
|
318
|
+
for (const tuple of overrideTuples) merged.push(tuple);
|
|
319
|
+
return merged;
|
|
320
|
+
}
|
|
321
|
+
function cloneNativeResponse(payload) {
|
|
322
|
+
return {
|
|
323
|
+
status: payload.status,
|
|
324
|
+
headers: payload.headers.map(([name, value]) => [name, value]),
|
|
325
|
+
bodyHandle: payload.bodyHandle,
|
|
326
|
+
bodyBytes: payload.bodyBytes,
|
|
327
|
+
contentLength: payload.contentLength,
|
|
328
|
+
cookies: payload.cookies.map(([name, value]) => [name, value]),
|
|
329
|
+
url: payload.url,
|
|
330
|
+
diagnostics: payload.diagnostics ? { ...payload.diagnostics } : null
|
|
331
|
+
};
|
|
332
|
+
}
|
|
333
|
+
function releaseNativeBody(handle) {
|
|
334
|
+
if (handle.released) return;
|
|
335
|
+
handle.released = true;
|
|
336
|
+
try {
|
|
337
|
+
nativeBinding.cancelBody(handle.id);
|
|
338
|
+
} catch {}
|
|
339
|
+
bodyHandleFinalizer?.unregister(handle);
|
|
340
|
+
}
|
|
341
|
+
function markNativeBodyReleased(handle) {
|
|
342
|
+
if (handle.released) return;
|
|
343
|
+
handle.released = true;
|
|
344
|
+
bodyHandleFinalizer?.unregister(handle);
|
|
345
|
+
}
|
|
346
|
+
function createNativeBodyStream(handle) {
|
|
347
|
+
const stream = new node_stream_web.ReadableStream({
|
|
348
|
+
async pull(controller) {
|
|
349
|
+
try {
|
|
350
|
+
const chunk = await nativeBinding.readBodyChunk(handle.id);
|
|
351
|
+
if (chunk === null) {
|
|
352
|
+
releaseNativeBody(handle);
|
|
353
|
+
controller.close();
|
|
354
|
+
return;
|
|
355
|
+
}
|
|
356
|
+
controller.enqueue(chunk);
|
|
357
|
+
} catch (error) {
|
|
358
|
+
releaseNativeBody(handle);
|
|
359
|
+
controller.error(error);
|
|
360
|
+
}
|
|
361
|
+
},
|
|
362
|
+
cancel() {
|
|
363
|
+
releaseNativeBody(handle);
|
|
364
|
+
}
|
|
365
|
+
});
|
|
366
|
+
bodyHandleFinalizer?.register(stream, handle, handle);
|
|
367
|
+
return stream;
|
|
368
|
+
}
|
|
369
|
+
function wrapBodyStream(source, onFirstUse) {
|
|
370
|
+
let started = false;
|
|
371
|
+
let reader = null;
|
|
372
|
+
return new node_stream_web.ReadableStream({
|
|
373
|
+
async pull(controller) {
|
|
374
|
+
if (!started) {
|
|
375
|
+
started = true;
|
|
376
|
+
onFirstUse();
|
|
377
|
+
}
|
|
378
|
+
if (!reader) reader = source.getReader();
|
|
379
|
+
try {
|
|
380
|
+
const { done, value } = await reader.read();
|
|
381
|
+
if (done) {
|
|
382
|
+
controller.close();
|
|
383
|
+
return;
|
|
384
|
+
}
|
|
385
|
+
controller.enqueue(value);
|
|
386
|
+
} catch (error) {
|
|
387
|
+
controller.error(error);
|
|
388
|
+
}
|
|
389
|
+
},
|
|
390
|
+
cancel(reason) {
|
|
391
|
+
if (!reader) return source.cancel(reason);
|
|
392
|
+
return reader.cancel(reason);
|
|
393
|
+
}
|
|
394
|
+
});
|
|
395
|
+
}
|
|
396
|
+
var Response = class Response {
|
|
397
|
+
status;
|
|
398
|
+
ok;
|
|
399
|
+
contentLength;
|
|
400
|
+
url;
|
|
401
|
+
diagnostics;
|
|
402
|
+
type = "basic";
|
|
403
|
+
bodyUsed = false;
|
|
404
|
+
payload;
|
|
405
|
+
requestUrl;
|
|
406
|
+
redirectedMemo;
|
|
407
|
+
headersInit;
|
|
408
|
+
headersInstance;
|
|
409
|
+
cookiesInit;
|
|
410
|
+
cookiesRecord;
|
|
411
|
+
inlineBody;
|
|
412
|
+
bodySource;
|
|
413
|
+
bodyStream;
|
|
414
|
+
nativeHandleAvailable;
|
|
415
|
+
nativeHandle;
|
|
416
|
+
constructor(payload, requestUrl, bodySource) {
|
|
417
|
+
this.payload = payload;
|
|
418
|
+
this.requestUrl = requestUrl;
|
|
419
|
+
this.status = this.payload.status;
|
|
420
|
+
this.ok = this.status >= 200 && this.status < 300;
|
|
421
|
+
this.headersInit = this.payload.headers;
|
|
422
|
+
this.headersInstance = null;
|
|
423
|
+
this.url = this.payload.url;
|
|
424
|
+
this.diagnostics = this.payload.diagnostics ?? null;
|
|
425
|
+
this.cookiesInit = this.payload.cookies;
|
|
426
|
+
this.cookiesRecord = null;
|
|
427
|
+
this.contentLength = this.payload.contentLength ?? null;
|
|
428
|
+
this.inlineBody = this.payload.bodyBytes ?? null;
|
|
429
|
+
this.nativeHandle = null;
|
|
430
|
+
if (typeof bodySource !== "undefined") {
|
|
431
|
+
this.bodySource = bodySource;
|
|
432
|
+
this.nativeHandleAvailable = false;
|
|
433
|
+
} else if (this.inlineBody !== null) {
|
|
434
|
+
this.bodySource = null;
|
|
435
|
+
this.nativeHandleAvailable = false;
|
|
436
|
+
} else if (this.payload.bodyHandle !== null) {
|
|
437
|
+
this.bodySource = null;
|
|
438
|
+
this.nativeHandleAvailable = true;
|
|
439
|
+
this.nativeHandle = {
|
|
440
|
+
id: this.payload.bodyHandle,
|
|
441
|
+
released: false
|
|
442
|
+
};
|
|
443
|
+
bodyHandleFinalizer?.register(this, this.nativeHandle, this.nativeHandle);
|
|
444
|
+
} else {
|
|
445
|
+
this.bodySource = null;
|
|
446
|
+
this.nativeHandleAvailable = false;
|
|
447
|
+
}
|
|
448
|
+
this.bodyStream = void 0;
|
|
449
|
+
}
|
|
450
|
+
get redirected() {
|
|
451
|
+
if (this.redirectedMemo !== void 0) return this.redirectedMemo;
|
|
452
|
+
if (this.url === this.requestUrl) {
|
|
453
|
+
this.redirectedMemo = false;
|
|
454
|
+
return false;
|
|
455
|
+
}
|
|
456
|
+
const normalizedRequestUrl = normalizeUrlForComparison(this.requestUrl);
|
|
457
|
+
this.redirectedMemo = normalizedRequestUrl ? this.url !== normalizedRequestUrl : true;
|
|
458
|
+
return this.redirectedMemo;
|
|
459
|
+
}
|
|
460
|
+
get statusText() {
|
|
461
|
+
return node_http.STATUS_CODES[this.status] ?? "";
|
|
462
|
+
}
|
|
463
|
+
get headers() {
|
|
464
|
+
if (!this.headersInstance) this.headersInstance = new Headers(this.headersInit);
|
|
465
|
+
return this.headersInstance;
|
|
466
|
+
}
|
|
467
|
+
get cookies() {
|
|
468
|
+
if (!this.cookiesRecord) {
|
|
469
|
+
const record = Object.create(null);
|
|
470
|
+
for (const [name, value] of this.cookiesInit) {
|
|
471
|
+
const existing = record[name];
|
|
472
|
+
if (existing === void 0) record[name] = value;
|
|
473
|
+
else if (Array.isArray(existing)) existing.push(value);
|
|
474
|
+
else record[name] = [existing, value];
|
|
475
|
+
}
|
|
476
|
+
this.cookiesRecord = record;
|
|
477
|
+
}
|
|
478
|
+
return this.cookiesRecord;
|
|
479
|
+
}
|
|
480
|
+
get body() {
|
|
481
|
+
if (this.inlineBody && this.bodySource === null) {
|
|
482
|
+
const bytes = this.inlineBody;
|
|
483
|
+
this.inlineBody = null;
|
|
484
|
+
this.bodySource = new node_stream_web.ReadableStream({ start(controller) {
|
|
485
|
+
controller.enqueue(bytes);
|
|
486
|
+
controller.close();
|
|
487
|
+
} });
|
|
488
|
+
}
|
|
489
|
+
if (this.inlineBody === null && this.payload.bodyHandle === null && this.bodySource === null) return null;
|
|
490
|
+
if (this.bodySource === null && this.nativeHandleAvailable && this.payload.bodyHandle !== null) {
|
|
491
|
+
if (this.nativeHandle) bodyHandleFinalizer?.unregister(this.nativeHandle);
|
|
492
|
+
const handle = this.nativeHandle ?? {
|
|
493
|
+
id: this.payload.bodyHandle,
|
|
494
|
+
released: false
|
|
495
|
+
};
|
|
496
|
+
this.nativeHandle = handle;
|
|
497
|
+
this.bodySource = createNativeBodyStream(handle);
|
|
498
|
+
this.nativeHandleAvailable = false;
|
|
499
|
+
}
|
|
500
|
+
if (this.bodySource === null) return null;
|
|
501
|
+
if (this.bodyStream === void 0) this.bodyStream = wrapBodyStream(this.bodySource, () => {
|
|
502
|
+
this.bodyUsed = true;
|
|
503
|
+
});
|
|
504
|
+
return this.bodyStream;
|
|
505
|
+
}
|
|
506
|
+
async json() {
|
|
507
|
+
const text = await this.text();
|
|
508
|
+
return JSON.parse(text);
|
|
509
|
+
}
|
|
510
|
+
async arrayBuffer() {
|
|
511
|
+
const bytes = await this.consumeBody();
|
|
512
|
+
const { buffer, byteOffset, byteLength } = bytes;
|
|
513
|
+
if (buffer instanceof ArrayBuffer) {
|
|
514
|
+
if (byteOffset === 0 && byteLength === buffer.byteLength) return buffer;
|
|
515
|
+
return buffer.slice(byteOffset, byteOffset + byteLength);
|
|
516
|
+
}
|
|
517
|
+
const view = new Uint8Array(byteLength);
|
|
518
|
+
view.set(bytes);
|
|
519
|
+
return view.buffer;
|
|
520
|
+
}
|
|
521
|
+
async text() {
|
|
522
|
+
const bytes = await this.consumeBody();
|
|
523
|
+
return UTF8_DECODER.decode(bytes);
|
|
524
|
+
}
|
|
525
|
+
async blob() {
|
|
526
|
+
const bytes = await this.consumeBody();
|
|
527
|
+
const contentType = this.headers.get("content-type") ?? "";
|
|
528
|
+
return new Blob([bytes], contentType ? { type: contentType } : void 0);
|
|
529
|
+
}
|
|
530
|
+
async formData() {
|
|
531
|
+
const bytes = await this.consumeBody();
|
|
532
|
+
const contentType = this.headers.get("content-type");
|
|
533
|
+
return new globalThis.Response(bytes, contentType ? { headers: { "content-type": contentType } } : void 0).formData();
|
|
534
|
+
}
|
|
535
|
+
readable() {
|
|
536
|
+
this.assertBodyAvailable();
|
|
537
|
+
this.bodyUsed = true;
|
|
538
|
+
const stream = this.body;
|
|
539
|
+
if (stream === null) return node_stream.Readable.from([]);
|
|
540
|
+
return node_stream.Readable.fromWeb(stream);
|
|
541
|
+
}
|
|
542
|
+
clone() {
|
|
543
|
+
if (this.bodyUsed) throw new TypeError("Cannot clone a Response whose body is already used");
|
|
544
|
+
if (this.nativeHandleAvailable && this.payload.bodyHandle !== null) {
|
|
545
|
+
if (this.nativeHandle) bodyHandleFinalizer?.unregister(this.nativeHandle);
|
|
546
|
+
const handle = this.nativeHandle ?? {
|
|
547
|
+
id: this.payload.bodyHandle,
|
|
548
|
+
released: false
|
|
549
|
+
};
|
|
550
|
+
this.nativeHandle = handle;
|
|
551
|
+
this.bodySource = createNativeBodyStream(handle);
|
|
552
|
+
this.nativeHandleAvailable = false;
|
|
553
|
+
}
|
|
554
|
+
if (this.bodySource === null) return new Response(cloneNativeResponse(this.payload), this.requestUrl, null);
|
|
555
|
+
const [branchA, branchB] = this.bodySource.tee();
|
|
556
|
+
this.bodySource = branchA;
|
|
557
|
+
this.bodyStream = void 0;
|
|
558
|
+
return new Response(cloneNativeResponse(this.payload), this.requestUrl, branchB);
|
|
559
|
+
}
|
|
560
|
+
assertBodyAvailable() {
|
|
561
|
+
if (this.bodyUsed) throw new TypeError("Response body is already used");
|
|
562
|
+
}
|
|
563
|
+
async consumeBody() {
|
|
564
|
+
this.assertBodyAvailable();
|
|
565
|
+
this.bodyUsed = true;
|
|
566
|
+
if (this.inlineBody) {
|
|
567
|
+
const bytes = this.inlineBody;
|
|
568
|
+
this.inlineBody = null;
|
|
569
|
+
return bytes;
|
|
570
|
+
}
|
|
571
|
+
if (this.nativeHandleAvailable && this.payload.bodyHandle !== null) {
|
|
572
|
+
this.nativeHandleAvailable = false;
|
|
573
|
+
try {
|
|
574
|
+
return await nativeBinding.readBodyAll(this.payload.bodyHandle);
|
|
575
|
+
} catch (error) {
|
|
576
|
+
if (String(error).includes("Body handle") && String(error).includes("not found")) return Buffer.alloc(0);
|
|
577
|
+
throw error;
|
|
578
|
+
} finally {
|
|
579
|
+
if (this.nativeHandle) markNativeBodyReleased(this.nativeHandle);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
const stream = this.body;
|
|
583
|
+
if (!stream) return Buffer.alloc(0);
|
|
584
|
+
const reader = stream.getReader();
|
|
585
|
+
const chunks = [];
|
|
586
|
+
try {
|
|
587
|
+
while (true) {
|
|
588
|
+
const { done, value } = await reader.read();
|
|
589
|
+
if (done) break;
|
|
590
|
+
if (value && value.byteLength > 0) if (Buffer.isBuffer(value)) chunks.push(value);
|
|
591
|
+
else chunks.push(Buffer.from(value.buffer, value.byteOffset, value.byteLength));
|
|
592
|
+
}
|
|
593
|
+
} finally {}
|
|
594
|
+
return chunks.length === 0 ? Buffer.alloc(0) : Buffer.concat(chunks);
|
|
595
|
+
}
|
|
596
|
+
};
|
|
597
|
+
var Transport = class {
|
|
598
|
+
id;
|
|
599
|
+
disposed = false;
|
|
600
|
+
constructor(id) {
|
|
601
|
+
this.id = id;
|
|
602
|
+
}
|
|
603
|
+
get closed() {
|
|
604
|
+
return this.disposed;
|
|
605
|
+
}
|
|
606
|
+
async close() {
|
|
607
|
+
if (this.disposed) return;
|
|
608
|
+
this.disposed = true;
|
|
609
|
+
try {
|
|
610
|
+
nativeBinding.dropTransport(this.id);
|
|
611
|
+
} catch (error) {
|
|
612
|
+
throw new RequestError(String(error));
|
|
613
|
+
}
|
|
614
|
+
}
|
|
615
|
+
};
|
|
616
|
+
var Session = class {
|
|
617
|
+
id;
|
|
618
|
+
disposed = false;
|
|
619
|
+
defaults;
|
|
620
|
+
constructor(id, defaults) {
|
|
621
|
+
this.id = id;
|
|
622
|
+
this.defaults = defaults;
|
|
623
|
+
}
|
|
624
|
+
get closed() {
|
|
625
|
+
return this.disposed;
|
|
626
|
+
}
|
|
627
|
+
ensureActive() {
|
|
628
|
+
if (this.disposed) throw new RequestError("Session has been closed");
|
|
629
|
+
}
|
|
630
|
+
/** @internal */
|
|
631
|
+
getDefaults() {
|
|
632
|
+
const snapshot = { ...this.defaults };
|
|
633
|
+
if (this.defaults.defaultHeaders) snapshot.defaultHeaders = [...this.defaults.defaultHeaders];
|
|
634
|
+
return snapshot;
|
|
635
|
+
}
|
|
636
|
+
/** @internal */
|
|
637
|
+
_defaultsRef() {
|
|
638
|
+
return this.defaults;
|
|
639
|
+
}
|
|
640
|
+
async fetch(input, init) {
|
|
641
|
+
this.ensureActive();
|
|
642
|
+
return fetch(input, init ? {
|
|
643
|
+
...init,
|
|
644
|
+
session: this
|
|
645
|
+
} : { session: this });
|
|
646
|
+
}
|
|
647
|
+
async clearCookies() {
|
|
648
|
+
this.ensureActive();
|
|
649
|
+
try {
|
|
650
|
+
nativeBinding.clearSession(this.id);
|
|
651
|
+
} catch (error) {
|
|
652
|
+
throw new RequestError(String(error));
|
|
653
|
+
}
|
|
654
|
+
}
|
|
655
|
+
getCookies(url) {
|
|
656
|
+
this.ensureActive();
|
|
657
|
+
try {
|
|
658
|
+
return nativeBinding.getCookies(this.id, String(url));
|
|
659
|
+
} catch (error) {
|
|
660
|
+
throw new RequestError(String(error));
|
|
661
|
+
}
|
|
662
|
+
}
|
|
663
|
+
getAllCookies() {
|
|
664
|
+
this.ensureActive();
|
|
665
|
+
try {
|
|
666
|
+
return nativeBinding.getAllCookies(this.id);
|
|
667
|
+
} catch (error) {
|
|
668
|
+
throw new RequestError(String(error));
|
|
669
|
+
}
|
|
670
|
+
}
|
|
671
|
+
setCookie(name, value, url) {
|
|
672
|
+
this.ensureActive();
|
|
673
|
+
try {
|
|
674
|
+
nativeBinding.setCookie(this.id, name, value, String(url));
|
|
675
|
+
} catch (error) {
|
|
676
|
+
throw new RequestError(String(error));
|
|
677
|
+
}
|
|
678
|
+
}
|
|
679
|
+
async websocket(urlOrOptions, options) {
|
|
680
|
+
this.ensureActive();
|
|
681
|
+
const normalized = normalizeSessionWebSocketArgs(urlOrOptions, options);
|
|
682
|
+
validateWebSocketProtocols(normalized.options.protocols);
|
|
683
|
+
assertNoManualWebSocketProtocolHeader(normalized.options.headers);
|
|
684
|
+
const protocols = normalizeWebSocketProtocolList(normalized.options.protocols);
|
|
685
|
+
const transportId = this.defaults.transportId;
|
|
686
|
+
if (!transportId) throw new RequestError("Session has no transport. Create the session with browser/os options or pass a transport to use session.websocket().");
|
|
687
|
+
return WebSocket._connectWithInit({
|
|
688
|
+
_internal: true,
|
|
689
|
+
url: normalized.url,
|
|
690
|
+
options: normalized.options,
|
|
691
|
+
openDispatchMode: "deferred",
|
|
692
|
+
connect: (callbacks) => nativeBinding.websocketConnectSession({
|
|
693
|
+
url: normalized.url,
|
|
694
|
+
sessionId: this.id,
|
|
695
|
+
transportId,
|
|
696
|
+
headers: headersToTuples(normalized.options.headers ?? {}),
|
|
697
|
+
...protocols && protocols.length > 0 && { protocols },
|
|
698
|
+
...normalized.options.maxFrameSize !== void 0 && { maxFrameSize: normalized.options.maxFrameSize },
|
|
699
|
+
...normalized.options.maxMessageSize !== void 0 && { maxMessageSize: normalized.options.maxMessageSize },
|
|
700
|
+
onMessage: callbacks.onMessage,
|
|
701
|
+
onClose: callbacks.onClose,
|
|
702
|
+
onError: callbacks.onError
|
|
703
|
+
}),
|
|
704
|
+
legacyCallbacks: normalized.legacyCallbacks
|
|
705
|
+
});
|
|
706
|
+
}
|
|
707
|
+
async close() {
|
|
708
|
+
if (this.disposed) return;
|
|
709
|
+
this.disposed = true;
|
|
710
|
+
const transportId = this.defaults.transportId;
|
|
711
|
+
const ownsTransport = this.defaults.ownsTransport;
|
|
712
|
+
try {
|
|
713
|
+
nativeBinding.dropSession(this.id);
|
|
714
|
+
} catch (error) {
|
|
715
|
+
if (!ownsTransport || !transportId) throw new RequestError(String(error));
|
|
716
|
+
const originalError = error;
|
|
717
|
+
try {
|
|
718
|
+
nativeBinding.dropTransport(transportId);
|
|
719
|
+
} catch {}
|
|
720
|
+
throw new RequestError(String(originalError));
|
|
721
|
+
}
|
|
722
|
+
if (ownsTransport && transportId) try {
|
|
723
|
+
nativeBinding.dropTransport(transportId);
|
|
724
|
+
} catch (error) {
|
|
725
|
+
throw new RequestError(String(error));
|
|
726
|
+
}
|
|
727
|
+
}
|
|
728
|
+
};
|
|
729
|
+
function resolveSessionContext(config) {
|
|
730
|
+
const requestedMode = config.cookieMode ?? "ephemeral";
|
|
731
|
+
const sessionCandidate = config.session;
|
|
732
|
+
const providedSessionId = typeof config.sessionId === "string" ? config.sessionId.trim() : void 0;
|
|
733
|
+
if (sessionCandidate && providedSessionId) throw new RequestError("Provide either `session` or `sessionId`, not both.");
|
|
734
|
+
if (sessionCandidate) {
|
|
735
|
+
if (!(sessionCandidate instanceof Session)) throw new RequestError("`session` must be created via createSession()");
|
|
736
|
+
if (sessionCandidate.closed) throw new RequestError("Session has been closed");
|
|
737
|
+
return {
|
|
738
|
+
sessionId: sessionCandidate.id,
|
|
739
|
+
cookieMode: "session",
|
|
740
|
+
dropAfterRequest: false,
|
|
741
|
+
defaults: sessionCandidate._defaultsRef()
|
|
742
|
+
};
|
|
743
|
+
}
|
|
744
|
+
if (providedSessionId) {
|
|
745
|
+
if (!providedSessionId) throw new RequestError("sessionId must not be empty");
|
|
746
|
+
if (requestedMode === "ephemeral") throw new RequestError("cookieMode 'ephemeral' cannot be combined with sessionId");
|
|
747
|
+
return {
|
|
748
|
+
sessionId: providedSessionId,
|
|
749
|
+
cookieMode: "session",
|
|
750
|
+
dropAfterRequest: false
|
|
751
|
+
};
|
|
752
|
+
}
|
|
753
|
+
if (requestedMode === "session") throw new RequestError("cookieMode 'session' requires a session or sessionId");
|
|
754
|
+
return {
|
|
755
|
+
sessionId: generateEphemeralSessionId(),
|
|
756
|
+
cookieMode: "ephemeral",
|
|
757
|
+
dropAfterRequest: true
|
|
758
|
+
};
|
|
759
|
+
}
|
|
760
|
+
function resolveTransportContext(config, sessionDefaults) {
|
|
761
|
+
if (config.transport !== void 0) {
|
|
762
|
+
if (!(config.transport instanceof Transport)) throw new RequestError("`transport` must be created via createTransport()");
|
|
763
|
+
if (config.transport.closed) throw new RequestError("Transport has been closed");
|
|
764
|
+
const hasProxy = config.proxy !== void 0;
|
|
765
|
+
if (config.browser !== void 0 || config.os !== void 0 || config.emulation !== void 0 || hasProxy || config.insecure !== void 0 || config.trustStore !== void 0) throw new RequestError("`transport` cannot be combined with browser/os/emulation/proxy/insecure/trustStore options");
|
|
766
|
+
return {
|
|
767
|
+
transportId: config.transport.id,
|
|
768
|
+
...config.captureDiagnostics !== void 0 && { captureDiagnostics: config.captureDiagnostics }
|
|
769
|
+
};
|
|
770
|
+
}
|
|
771
|
+
if (sessionDefaults?.transportId) {
|
|
772
|
+
if (config.emulation !== void 0) throw new RequestError("Session emulation cannot be changed after creation");
|
|
773
|
+
if (config.browser !== void 0) {
|
|
774
|
+
validateBrowserProfile(config.browser);
|
|
775
|
+
const lockedBrowser = sessionDefaults.transportMode.kind === "custom" ? void 0 : sessionDefaults.transportMode.browser;
|
|
776
|
+
if (config.browser !== lockedBrowser) throw new RequestError("Session browser cannot be changed after creation");
|
|
777
|
+
}
|
|
778
|
+
if (config.os !== void 0) {
|
|
779
|
+
validateOperatingSystem(config.os);
|
|
780
|
+
const lockedOs = sessionDefaults.transportMode.kind === "custom" ? void 0 : sessionDefaults.transportMode.os;
|
|
781
|
+
if (config.os !== lockedOs) throw new RequestError("Session operating system cannot be changed after creation");
|
|
782
|
+
}
|
|
783
|
+
const initHasProxy = Object.hasOwn(config, "proxy");
|
|
784
|
+
const requestedProxy = initHasProxy ? config.proxy : void 0;
|
|
785
|
+
if (initHasProxy && requestedProxy !== void 0 && (sessionDefaults.proxy ?? null) !== (requestedProxy ?? null)) throw new RequestError("Session proxy cannot be changed after creation");
|
|
786
|
+
if (config.insecure !== void 0) {
|
|
787
|
+
const lockedInsecure = sessionDefaults.insecure ?? false;
|
|
788
|
+
if (config.insecure !== lockedInsecure) throw new RequestError("Session insecure setting cannot be changed after creation");
|
|
789
|
+
}
|
|
790
|
+
if (config.trustStore !== void 0) {
|
|
791
|
+
const lockedTrustStore = sessionDefaults.trustStore ?? DEFAULT_TRUST_STORE;
|
|
792
|
+
if (config.trustStore !== lockedTrustStore) throw new RequestError("Session trustStore setting cannot be changed after creation");
|
|
793
|
+
}
|
|
794
|
+
const captureDiagnostics = config.captureDiagnostics ?? sessionDefaults.captureDiagnostics;
|
|
795
|
+
return {
|
|
796
|
+
transportId: sessionDefaults.transportId,
|
|
797
|
+
...captureDiagnostics !== void 0 && { captureDiagnostics }
|
|
798
|
+
};
|
|
799
|
+
}
|
|
800
|
+
const resolved = { mode: resolveEmulationMode(config.browser, config.os, config.emulation) };
|
|
801
|
+
if (config.proxy !== void 0) resolved.proxy = config.proxy;
|
|
802
|
+
if (config.insecure !== void 0) resolved.insecure = config.insecure;
|
|
803
|
+
resolved.trustStore = config.trustStore ?? DEFAULT_TRUST_STORE;
|
|
804
|
+
if (config.captureDiagnostics !== void 0) resolved.captureDiagnostics = config.captureDiagnostics;
|
|
805
|
+
return resolved;
|
|
806
|
+
}
|
|
807
|
+
function createAbortError(reason) {
|
|
808
|
+
const fallbackMessage = typeof reason === "string" ? reason : "The operation was aborted";
|
|
809
|
+
if (typeof DOMException !== "undefined" && reason instanceof DOMException) return reason.name === "AbortError" ? reason : new DOMException(reason.message || fallbackMessage, "AbortError");
|
|
810
|
+
if (reason instanceof Error) {
|
|
811
|
+
const error = new Error(reason.message);
|
|
812
|
+
error.name = "AbortError";
|
|
813
|
+
error.cause = reason;
|
|
814
|
+
return error;
|
|
815
|
+
}
|
|
816
|
+
if (typeof DOMException !== "undefined") return new DOMException(fallbackMessage, "AbortError");
|
|
817
|
+
const error = new Error(fallbackMessage);
|
|
818
|
+
error.name = "AbortError";
|
|
819
|
+
return error;
|
|
820
|
+
}
|
|
821
|
+
function isAbortError(error) {
|
|
822
|
+
return Boolean(error) && typeof error.name === "string" && error.name === "AbortError";
|
|
823
|
+
}
|
|
824
|
+
const REQUEST_ID_MAX = 2 ** 48;
|
|
825
|
+
let requestIdCounter = Math.trunc(Number(process.hrtime.bigint() % BigInt(REQUEST_ID_MAX - 1))) + 1;
|
|
826
|
+
function generateRequestId() {
|
|
827
|
+
requestIdCounter += 1;
|
|
828
|
+
if (requestIdCounter >= REQUEST_ID_MAX) requestIdCounter = 1;
|
|
829
|
+
return requestIdCounter;
|
|
830
|
+
}
|
|
831
|
+
function setupAbort(signal, cancelNative) {
|
|
832
|
+
if (!signal) return null;
|
|
833
|
+
if (signal.aborted) {
|
|
834
|
+
cancelNative();
|
|
835
|
+
throw createAbortError(signal.reason);
|
|
836
|
+
}
|
|
837
|
+
let onAbortListener;
|
|
838
|
+
const promise = new Promise((_, reject) => {
|
|
839
|
+
onAbortListener = () => {
|
|
840
|
+
cancelNative();
|
|
841
|
+
reject(createAbortError(signal.reason));
|
|
842
|
+
};
|
|
843
|
+
signal.addEventListener("abort", onAbortListener, { once: true });
|
|
844
|
+
});
|
|
845
|
+
const cleanup = () => {
|
|
846
|
+
if (onAbortListener) {
|
|
847
|
+
signal.removeEventListener("abort", onAbortListener);
|
|
848
|
+
onAbortListener = void 0;
|
|
849
|
+
}
|
|
850
|
+
};
|
|
851
|
+
return {
|
|
852
|
+
promise,
|
|
853
|
+
cleanup
|
|
854
|
+
};
|
|
855
|
+
}
|
|
856
|
+
function coerceUrlInput(input) {
|
|
857
|
+
if (input instanceof URL) return input.href;
|
|
858
|
+
if (input.length === 0) throw new RequestError("URL is required");
|
|
859
|
+
if (input.charCodeAt(0) > 32 && input.charCodeAt(input.length - 1) > 32) return input;
|
|
860
|
+
const trimmed = input.trim();
|
|
861
|
+
if (trimmed.length === 0) throw new RequestError("URL is required");
|
|
862
|
+
return trimmed;
|
|
863
|
+
}
|
|
864
|
+
function isRequestLike(input) {
|
|
865
|
+
if (!input || typeof input !== "object") return false;
|
|
866
|
+
if (typeof Request !== "undefined" && input instanceof Request) return true;
|
|
867
|
+
const candidate = input;
|
|
868
|
+
return typeof candidate.url === "string" && typeof candidate.method === "string" && typeof candidate.arrayBuffer === "function" && typeof candidate.redirect === "string";
|
|
869
|
+
}
|
|
870
|
+
async function resolveFetchArgs(input, init) {
|
|
871
|
+
if (!isRequestLike(input)) return {
|
|
872
|
+
url: coerceUrlInput(input),
|
|
873
|
+
init: init ?? {}
|
|
874
|
+
};
|
|
875
|
+
const mergedInit = init ? { ...init } : {};
|
|
876
|
+
if (mergedInit.method === void 0) mergedInit.method = input.method;
|
|
877
|
+
if (mergedInit.headers === void 0) mergedInit.headers = input.headers;
|
|
878
|
+
if (mergedInit.redirect === void 0 && (input.redirect === "follow" || input.redirect === "manual" || input.redirect === "error")) mergedInit.redirect = input.redirect;
|
|
879
|
+
if (mergedInit.signal === void 0) mergedInit.signal = input.signal;
|
|
880
|
+
if (mergedInit.body === void 0 && input.body !== null) {
|
|
881
|
+
if (input.bodyUsed) throw new TypeError("Request body is already used");
|
|
882
|
+
mergedInit.body = Buffer.from(await input.arrayBuffer());
|
|
883
|
+
}
|
|
884
|
+
return {
|
|
885
|
+
url: coerceUrlInput(input.url),
|
|
886
|
+
init: mergedInit
|
|
887
|
+
};
|
|
888
|
+
}
|
|
889
|
+
function normalizeUrlForComparison(value) {
|
|
890
|
+
try {
|
|
891
|
+
return new URL(value).toString();
|
|
892
|
+
} catch {
|
|
893
|
+
return null;
|
|
894
|
+
}
|
|
895
|
+
}
|
|
896
|
+
function validateRedirectMode(mode) {
|
|
897
|
+
if (mode === void 0 || mode === "follow" || mode === "manual" || mode === "error") return;
|
|
898
|
+
throw new RequestError(`Redirect mode '${mode}' is not supported`);
|
|
899
|
+
}
|
|
900
|
+
async function serializeBody(body) {
|
|
901
|
+
if (body === null || body === void 0) return {};
|
|
902
|
+
if (typeof body === "string") return { body: Buffer.from(body, "utf8") };
|
|
903
|
+
if (Buffer.isBuffer(body)) return { body };
|
|
904
|
+
if (body instanceof URLSearchParams) return {
|
|
905
|
+
body: Buffer.from(body.toString(), "utf8"),
|
|
906
|
+
contentType: "application/x-www-form-urlencoded;charset=UTF-8"
|
|
907
|
+
};
|
|
908
|
+
if (body instanceof ArrayBuffer) return { body: Buffer.from(body) };
|
|
909
|
+
if (ArrayBuffer.isView(body)) return { body: Buffer.from(body.buffer, body.byteOffset, body.byteLength) };
|
|
910
|
+
if (typeof Blob !== "undefined" && body instanceof Blob) return {
|
|
911
|
+
body: Buffer.from(await body.arrayBuffer()),
|
|
912
|
+
...body.type ? { contentType: body.type } : {}
|
|
913
|
+
};
|
|
914
|
+
if (typeof FormData !== "undefined" && body instanceof FormData) {
|
|
915
|
+
const encoded = new globalThis.Response(body);
|
|
916
|
+
const contentType = encoded.headers.get("content-type") ?? void 0;
|
|
917
|
+
return {
|
|
918
|
+
body: Buffer.from(await encoded.arrayBuffer()),
|
|
919
|
+
...contentType ? { contentType } : {}
|
|
920
|
+
};
|
|
921
|
+
}
|
|
922
|
+
throw new TypeError("Unsupported body type; expected string, Buffer, ArrayBuffer, ArrayBufferView, URLSearchParams, Blob, or FormData");
|
|
923
|
+
}
|
|
924
|
+
function ensureMethod(method) {
|
|
925
|
+
if (method === void 0 || method.length === 0) return "GET";
|
|
926
|
+
switch (method) {
|
|
927
|
+
case "GET":
|
|
928
|
+
case "POST":
|
|
929
|
+
case "PUT":
|
|
930
|
+
case "DELETE":
|
|
931
|
+
case "PATCH":
|
|
932
|
+
case "HEAD":
|
|
933
|
+
case "OPTIONS": return method;
|
|
934
|
+
}
|
|
935
|
+
const normalized = method.trim().toUpperCase();
|
|
936
|
+
return normalized.length > 0 ? normalized : "GET";
|
|
937
|
+
}
|
|
938
|
+
function ensureBodyAllowed(method, body) {
|
|
939
|
+
if (body === void 0) return;
|
|
940
|
+
if (method === "GET" || method === "HEAD") throw new RequestError(`Request with ${method} method cannot have a body`);
|
|
941
|
+
}
|
|
942
|
+
function validateBrowserProfile(browser) {
|
|
943
|
+
if (browser === void 0) return;
|
|
944
|
+
if (typeof browser !== "string" || browser.trim().length === 0) throw new RequestError("Browser profile must not be empty");
|
|
945
|
+
if (!getProfileSet().has(browser)) throw new RequestError(`Invalid browser profile: ${browser}. Available profiles: ${getProfiles().join(", ")}`);
|
|
946
|
+
}
|
|
947
|
+
function validateOperatingSystem(os) {
|
|
948
|
+
if (os === void 0) return;
|
|
949
|
+
if (typeof os !== "string" || os.trim().length === 0) throw new RequestError("Operating system must not be empty");
|
|
950
|
+
if (!getOperatingSystemSet().has(os)) throw new RequestError(`Invalid operating system: ${os}. Available options: ${getOperatingSystems().join(", ")}`);
|
|
951
|
+
}
|
|
952
|
+
function validateTimeout(timeout) {
|
|
953
|
+
if (timeout === void 0) return;
|
|
954
|
+
if (typeof timeout !== "number" || !Number.isFinite(timeout)) throw new RequestError("Timeout must be a finite number");
|
|
955
|
+
if (timeout < 0) throw new RequestError("Timeout must be 0 (no timeout) or a positive number");
|
|
956
|
+
}
|
|
957
|
+
function validateTrustStore(trustStore) {
|
|
958
|
+
if (trustStore === void 0) return;
|
|
959
|
+
if (trustStore !== "combined" && trustStore !== "mozilla" && trustStore !== "defaultPaths") throw new RequestError("trustStore must be one of: combined, mozilla, defaultPaths");
|
|
960
|
+
}
|
|
961
|
+
function validatePositiveNumber(value, label) {
|
|
962
|
+
if (typeof value !== "number" || !Number.isFinite(value)) throw new RequestError(`${label} must be a finite number`);
|
|
963
|
+
if (value <= 0) throw new RequestError(`${label} must be greater than 0`);
|
|
964
|
+
}
|
|
965
|
+
function validateNonNegativeInteger(value, label) {
|
|
966
|
+
if (typeof value !== "number" || !Number.isFinite(value) || !Number.isInteger(value)) throw new RequestError(`${label} must be an integer`);
|
|
967
|
+
if (value < 0) throw new RequestError(`${label} must be greater than or equal to 0`);
|
|
968
|
+
}
|
|
969
|
+
function validatePositiveInteger(value, label) {
|
|
970
|
+
if (typeof value !== "number" || !Number.isFinite(value) || !Number.isInteger(value)) throw new RequestError(`${label} must be an integer`);
|
|
971
|
+
if (value <= 0) throw new RequestError(`${label} must be greater than 0`);
|
|
972
|
+
}
|
|
973
|
+
function validateIntegerInRange(value, min, max, label) {
|
|
974
|
+
validateNonNegativeInteger(value, label);
|
|
975
|
+
if (value < min || value > max) throw new RequestError(`${label} must be between ${min} and ${max}`);
|
|
976
|
+
}
|
|
977
|
+
const SUPPORTED_ALPN_PROTOCOLS = new Set([
|
|
978
|
+
"HTTP1",
|
|
979
|
+
"HTTP2",
|
|
980
|
+
"HTTP3"
|
|
981
|
+
]);
|
|
982
|
+
const SUPPORTED_ALPS_PROTOCOLS = new Set([
|
|
983
|
+
"HTTP1",
|
|
984
|
+
"HTTP2",
|
|
985
|
+
"HTTP3"
|
|
986
|
+
]);
|
|
987
|
+
const SUPPORTED_CERTIFICATE_COMPRESSION_ALGORITHMS = new Set([
|
|
988
|
+
"zlib",
|
|
989
|
+
"brotli",
|
|
990
|
+
"zstd"
|
|
991
|
+
]);
|
|
992
|
+
const HTTP2_SETTING_IDS = new Set([
|
|
993
|
+
"HeaderTableSize",
|
|
994
|
+
"EnablePush",
|
|
995
|
+
"MaxConcurrentStreams",
|
|
996
|
+
"InitialWindowSize",
|
|
997
|
+
"MaxFrameSize",
|
|
998
|
+
"MaxHeaderListSize",
|
|
999
|
+
"EnableConnectProtocol",
|
|
1000
|
+
"NoRfc7540Priorities"
|
|
1001
|
+
]);
|
|
1002
|
+
const HTTP2_PSEUDO_HEADER_IDS = new Set([
|
|
1003
|
+
"Method",
|
|
1004
|
+
"Scheme",
|
|
1005
|
+
"Authority",
|
|
1006
|
+
"Path",
|
|
1007
|
+
"Protocol"
|
|
1008
|
+
]);
|
|
1009
|
+
const STANDARD_HTTP2_SETTING_ID_VALUES = new Set([
|
|
1010
|
+
1,
|
|
1011
|
+
2,
|
|
1012
|
+
3,
|
|
1013
|
+
4,
|
|
1014
|
+
5,
|
|
1015
|
+
6,
|
|
1016
|
+
8,
|
|
1017
|
+
9
|
|
1018
|
+
]);
|
|
1019
|
+
const MAX_HTTP2_EXPERIMENTAL_SETTING_ID = 15;
|
|
1020
|
+
const TLS_VERSION_ALIASES = new Map([
|
|
1021
|
+
["1.0", "1.0"],
|
|
1022
|
+
["1.1", "1.1"],
|
|
1023
|
+
["1.2", "1.2"],
|
|
1024
|
+
["1.3", "1.3"],
|
|
1025
|
+
["tls1.0", "1.0"],
|
|
1026
|
+
["tls1.1", "1.1"],
|
|
1027
|
+
["tls1.2", "1.2"],
|
|
1028
|
+
["tls1.3", "1.3"]
|
|
1029
|
+
]);
|
|
1030
|
+
function isNonEmpty(value) {
|
|
1031
|
+
for (const _ in value) return true;
|
|
1032
|
+
return false;
|
|
1033
|
+
}
|
|
1034
|
+
function normalizeProtocolList(value, label, allowed) {
|
|
1035
|
+
if (value === void 0) return;
|
|
1036
|
+
if (!Array.isArray(value)) throw new RequestError(`${label} must be an array`);
|
|
1037
|
+
for (const protocol of value) if (!allowed.has(protocol)) throw new RequestError(`${label} values must be one of: HTTP1, HTTP2, HTTP3`);
|
|
1038
|
+
return [...value];
|
|
1039
|
+
}
|
|
1040
|
+
function normalizeTlsVersion(value, label) {
|
|
1041
|
+
if (value === void 0) return;
|
|
1042
|
+
if (typeof value !== "string") throw new RequestError(`${label} must be a string`);
|
|
1043
|
+
const normalized = TLS_VERSION_ALIASES.get(value.trim().toLowerCase());
|
|
1044
|
+
if (!normalized) throw new RequestError(`${label} must be one of: 1.0, 1.1, 1.2, 1.3`);
|
|
1045
|
+
return normalized;
|
|
1046
|
+
}
|
|
1047
|
+
function normalizeOrigHeaders(origHeaders) {
|
|
1048
|
+
if (origHeaders === void 0) return;
|
|
1049
|
+
if (!Array.isArray(origHeaders)) throw new RequestError("emulation.origHeaders must be an array of strings");
|
|
1050
|
+
const normalized = [];
|
|
1051
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1052
|
+
for (const entry of origHeaders) {
|
|
1053
|
+
if (typeof entry !== "string" || entry.trim().length === 0) throw new RequestError("emulation.origHeaders entries must be non-empty strings");
|
|
1054
|
+
const trimmed = entry.trim();
|
|
1055
|
+
const duplicateKey = trimmed.toLowerCase();
|
|
1056
|
+
if (seen.has(duplicateKey)) throw new RequestError(`Duplicate emulation.origHeaders entry: ${trimmed}`);
|
|
1057
|
+
seen.add(duplicateKey);
|
|
1058
|
+
normalized.push(trimmed);
|
|
1059
|
+
}
|
|
1060
|
+
return normalized.length > 0 ? normalized : void 0;
|
|
1061
|
+
}
|
|
1062
|
+
function normalizeCustomTlsOptions(options) {
|
|
1063
|
+
if (options === void 0) return;
|
|
1064
|
+
const normalized = {};
|
|
1065
|
+
const alpnProtocols = normalizeProtocolList(options.alpnProtocols, "emulation.tlsOptions.alpnProtocols", SUPPORTED_ALPN_PROTOCOLS);
|
|
1066
|
+
if (alpnProtocols !== void 0) normalized.alpnProtocols = alpnProtocols;
|
|
1067
|
+
const alpsProtocols = normalizeProtocolList(options.alpsProtocols, "emulation.tlsOptions.alpsProtocols", SUPPORTED_ALPS_PROTOCOLS);
|
|
1068
|
+
if (alpsProtocols !== void 0) normalized.alpsProtocols = alpsProtocols;
|
|
1069
|
+
const minTlsVersion = normalizeTlsVersion(options.minTlsVersion, "emulation.tlsOptions.minTlsVersion");
|
|
1070
|
+
if (minTlsVersion !== void 0) normalized.minTlsVersion = minTlsVersion;
|
|
1071
|
+
const maxTlsVersion = normalizeTlsVersion(options.maxTlsVersion, "emulation.tlsOptions.maxTlsVersion");
|
|
1072
|
+
if (maxTlsVersion !== void 0) normalized.maxTlsVersion = maxTlsVersion;
|
|
1073
|
+
if (options.alpsUseNewCodepoint !== void 0) normalized.alpsUseNewCodepoint = options.alpsUseNewCodepoint;
|
|
1074
|
+
if (options.sessionTicket !== void 0) normalized.sessionTicket = options.sessionTicket;
|
|
1075
|
+
if (options.preSharedKey !== void 0) normalized.preSharedKey = options.preSharedKey;
|
|
1076
|
+
if (options.enableEchGrease !== void 0) normalized.enableEchGrease = options.enableEchGrease;
|
|
1077
|
+
if (options.permuteExtensions !== void 0) normalized.permuteExtensions = options.permuteExtensions;
|
|
1078
|
+
if (options.greaseEnabled !== void 0) normalized.greaseEnabled = options.greaseEnabled;
|
|
1079
|
+
if (options.enableOcspStapling !== void 0) normalized.enableOcspStapling = options.enableOcspStapling;
|
|
1080
|
+
if (options.enableSignedCertTimestamps !== void 0) normalized.enableSignedCertTimestamps = options.enableSignedCertTimestamps;
|
|
1081
|
+
if (options.pskSkipSessionTicket !== void 0) normalized.pskSkipSessionTicket = options.pskSkipSessionTicket;
|
|
1082
|
+
if (options.pskDheKe !== void 0) normalized.pskDheKe = options.pskDheKe;
|
|
1083
|
+
if (options.renegotiation !== void 0) normalized.renegotiation = options.renegotiation;
|
|
1084
|
+
if (options.aesHwOverride !== void 0) normalized.aesHwOverride = options.aesHwOverride;
|
|
1085
|
+
if (options.preserveTls13CipherList !== void 0) normalized.preserveTls13CipherList = options.preserveTls13CipherList;
|
|
1086
|
+
if (options.randomAesHwOverride !== void 0) normalized.randomAesHwOverride = options.randomAesHwOverride;
|
|
1087
|
+
if (options.delegatedCredentials !== void 0) normalized.delegatedCredentials = options.delegatedCredentials;
|
|
1088
|
+
if (options.curvesList !== void 0) normalized.curvesList = options.curvesList;
|
|
1089
|
+
if (options.cipherList !== void 0) normalized.cipherList = options.cipherList;
|
|
1090
|
+
if (options.sigalgsList !== void 0) normalized.sigalgsList = options.sigalgsList;
|
|
1091
|
+
if (options.recordSizeLimit !== void 0) {
|
|
1092
|
+
validateIntegerInRange(options.recordSizeLimit, 0, 65535, "emulation.tlsOptions.recordSizeLimit");
|
|
1093
|
+
normalized.recordSizeLimit = options.recordSizeLimit;
|
|
1094
|
+
}
|
|
1095
|
+
if (options.keySharesLimit !== void 0) {
|
|
1096
|
+
validateIntegerInRange(options.keySharesLimit, 0, 255, "emulation.tlsOptions.keySharesLimit");
|
|
1097
|
+
normalized.keySharesLimit = options.keySharesLimit;
|
|
1098
|
+
}
|
|
1099
|
+
if (options.certificateCompressionAlgorithms !== void 0) {
|
|
1100
|
+
if (!Array.isArray(options.certificateCompressionAlgorithms)) throw new RequestError("emulation.tlsOptions.certificateCompressionAlgorithms must be an array");
|
|
1101
|
+
const algorithms = [];
|
|
1102
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1103
|
+
for (const algorithm of options.certificateCompressionAlgorithms) {
|
|
1104
|
+
if (!SUPPORTED_CERTIFICATE_COMPRESSION_ALGORITHMS.has(algorithm)) throw new RequestError("emulation.tlsOptions.certificateCompressionAlgorithms values must be one of: zlib, brotli, zstd");
|
|
1105
|
+
if (seen.has(algorithm)) throw new RequestError(`Duplicate emulation.tlsOptions.certificateCompressionAlgorithms entry: ${algorithm}`);
|
|
1106
|
+
seen.add(algorithm);
|
|
1107
|
+
algorithms.push(algorithm);
|
|
1108
|
+
}
|
|
1109
|
+
normalized.certificateCompressionAlgorithms = algorithms;
|
|
1110
|
+
}
|
|
1111
|
+
if (options.extensionPermutation !== void 0) {
|
|
1112
|
+
if (!Array.isArray(options.extensionPermutation)) throw new RequestError("emulation.tlsOptions.extensionPermutation must be an array");
|
|
1113
|
+
const permutation = [];
|
|
1114
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1115
|
+
for (const extensionId of options.extensionPermutation) {
|
|
1116
|
+
validateIntegerInRange(extensionId, 0, 65535, "emulation.tlsOptions.extensionPermutation");
|
|
1117
|
+
if (seen.has(extensionId)) throw new RequestError(`Duplicate emulation.tlsOptions.extensionPermutation entry: ${extensionId}`);
|
|
1118
|
+
seen.add(extensionId);
|
|
1119
|
+
permutation.push(extensionId);
|
|
1120
|
+
}
|
|
1121
|
+
normalized.extensionPermutation = permutation;
|
|
1122
|
+
}
|
|
1123
|
+
return isNonEmpty(normalized) ? normalized : void 0;
|
|
1124
|
+
}
|
|
1125
|
+
function normalizeCustomHttp1Options(options) {
|
|
1126
|
+
if (options === void 0) return;
|
|
1127
|
+
const normalized = {};
|
|
1128
|
+
if (options.http09Responses !== void 0) normalized.http09Responses = options.http09Responses;
|
|
1129
|
+
if (options.writev !== void 0) normalized.writev = options.writev;
|
|
1130
|
+
if (options.ignoreInvalidHeadersInResponses !== void 0) normalized.ignoreInvalidHeadersInResponses = options.ignoreInvalidHeadersInResponses;
|
|
1131
|
+
if (options.allowSpacesAfterHeaderNameInResponses !== void 0) normalized.allowSpacesAfterHeaderNameInResponses = options.allowSpacesAfterHeaderNameInResponses;
|
|
1132
|
+
if (options.allowObsoleteMultilineHeadersInResponses !== void 0) normalized.allowObsoleteMultilineHeadersInResponses = options.allowObsoleteMultilineHeadersInResponses;
|
|
1133
|
+
if (options.maxHeaders !== void 0) {
|
|
1134
|
+
validateNonNegativeInteger(options.maxHeaders, "emulation.http1Options.maxHeaders");
|
|
1135
|
+
normalized.maxHeaders = options.maxHeaders;
|
|
1136
|
+
}
|
|
1137
|
+
if (options.readBufExactSize !== void 0) {
|
|
1138
|
+
validateNonNegativeInteger(options.readBufExactSize, "emulation.http1Options.readBufExactSize");
|
|
1139
|
+
normalized.readBufExactSize = options.readBufExactSize;
|
|
1140
|
+
}
|
|
1141
|
+
if (options.maxBufSize !== void 0) {
|
|
1142
|
+
validateNonNegativeInteger(options.maxBufSize, "emulation.http1Options.maxBufSize");
|
|
1143
|
+
if (options.maxBufSize < 8192) throw new RequestError("emulation.http1Options.maxBufSize must be greater than or equal to 8192");
|
|
1144
|
+
normalized.maxBufSize = options.maxBufSize;
|
|
1145
|
+
}
|
|
1146
|
+
if (normalized.readBufExactSize !== void 0 && normalized.maxBufSize !== void 0) throw new RequestError("emulation.http1Options.readBufExactSize and maxBufSize cannot both be set");
|
|
1147
|
+
return isNonEmpty(normalized) ? normalized : void 0;
|
|
1148
|
+
}
|
|
1149
|
+
function normalizeHttp2StreamDependency(dependency, label) {
|
|
1150
|
+
if (!isPlainObject(dependency)) throw new RequestError(`${label} must be an object`);
|
|
1151
|
+
validateIntegerInRange(dependency.dependencyId, 0, 2147483647, `${label}.dependencyId`);
|
|
1152
|
+
validateIntegerInRange(dependency.weight, 0, 255, `${label}.weight`);
|
|
1153
|
+
const normalized = {
|
|
1154
|
+
dependencyId: dependency.dependencyId,
|
|
1155
|
+
weight: dependency.weight
|
|
1156
|
+
};
|
|
1157
|
+
if (dependency.exclusive !== void 0) normalized.exclusive = dependency.exclusive;
|
|
1158
|
+
return normalized;
|
|
1159
|
+
}
|
|
1160
|
+
function normalizeCustomHttp2Options(options) {
|
|
1161
|
+
if (options === void 0) return;
|
|
1162
|
+
const normalized = {};
|
|
1163
|
+
if (options.adaptiveWindow !== void 0) normalized.adaptiveWindow = options.adaptiveWindow;
|
|
1164
|
+
if (options.keepAliveWhileIdle !== void 0) normalized.keepAliveWhileIdle = options.keepAliveWhileIdle;
|
|
1165
|
+
if (options.enablePush !== void 0) normalized.enablePush = options.enablePush;
|
|
1166
|
+
if (options.enableConnectProtocol !== void 0) normalized.enableConnectProtocol = options.enableConnectProtocol;
|
|
1167
|
+
if (options.noRfc7540Priorities !== void 0) normalized.noRfc7540Priorities = options.noRfc7540Priorities;
|
|
1168
|
+
if (options.initialStreamId !== void 0) {
|
|
1169
|
+
validateNonNegativeInteger(options.initialStreamId, "emulation.http2Options.initialStreamId");
|
|
1170
|
+
normalized.initialStreamId = options.initialStreamId;
|
|
1171
|
+
}
|
|
1172
|
+
if (options.initialConnectionWindowSize !== void 0) {
|
|
1173
|
+
validateNonNegativeInteger(options.initialConnectionWindowSize, "emulation.http2Options.initialConnectionWindowSize");
|
|
1174
|
+
normalized.initialConnectionWindowSize = options.initialConnectionWindowSize;
|
|
1175
|
+
}
|
|
1176
|
+
if (options.initialWindowSize !== void 0) {
|
|
1177
|
+
validateNonNegativeInteger(options.initialWindowSize, "emulation.http2Options.initialWindowSize");
|
|
1178
|
+
normalized.initialWindowSize = options.initialWindowSize;
|
|
1179
|
+
}
|
|
1180
|
+
if (options.initialMaxSendStreams !== void 0) {
|
|
1181
|
+
validateNonNegativeInteger(options.initialMaxSendStreams, "emulation.http2Options.initialMaxSendStreams");
|
|
1182
|
+
normalized.initialMaxSendStreams = options.initialMaxSendStreams;
|
|
1183
|
+
}
|
|
1184
|
+
if (options.maxFrameSize !== void 0) {
|
|
1185
|
+
validateNonNegativeInteger(options.maxFrameSize, "emulation.http2Options.maxFrameSize");
|
|
1186
|
+
normalized.maxFrameSize = options.maxFrameSize;
|
|
1187
|
+
}
|
|
1188
|
+
if (options.keepAliveInterval !== void 0) {
|
|
1189
|
+
validateNonNegativeInteger(options.keepAliveInterval, "emulation.http2Options.keepAliveInterval");
|
|
1190
|
+
normalized.keepAliveInterval = options.keepAliveInterval;
|
|
1191
|
+
}
|
|
1192
|
+
if (options.keepAliveTimeout !== void 0) {
|
|
1193
|
+
validateNonNegativeInteger(options.keepAliveTimeout, "emulation.http2Options.keepAliveTimeout");
|
|
1194
|
+
normalized.keepAliveTimeout = options.keepAliveTimeout;
|
|
1195
|
+
}
|
|
1196
|
+
if (options.maxConcurrentResetStreams !== void 0) {
|
|
1197
|
+
validateNonNegativeInteger(options.maxConcurrentResetStreams, "emulation.http2Options.maxConcurrentResetStreams");
|
|
1198
|
+
normalized.maxConcurrentResetStreams = options.maxConcurrentResetStreams;
|
|
1199
|
+
}
|
|
1200
|
+
if (options.maxSendBufferSize !== void 0) {
|
|
1201
|
+
validateNonNegativeInteger(options.maxSendBufferSize, "emulation.http2Options.maxSendBufferSize");
|
|
1202
|
+
normalized.maxSendBufferSize = options.maxSendBufferSize;
|
|
1203
|
+
}
|
|
1204
|
+
if (options.maxConcurrentStreams !== void 0) {
|
|
1205
|
+
validateNonNegativeInteger(options.maxConcurrentStreams, "emulation.http2Options.maxConcurrentStreams");
|
|
1206
|
+
normalized.maxConcurrentStreams = options.maxConcurrentStreams;
|
|
1207
|
+
}
|
|
1208
|
+
if (options.maxHeaderListSize !== void 0) {
|
|
1209
|
+
validateNonNegativeInteger(options.maxHeaderListSize, "emulation.http2Options.maxHeaderListSize");
|
|
1210
|
+
normalized.maxHeaderListSize = options.maxHeaderListSize;
|
|
1211
|
+
}
|
|
1212
|
+
if (options.maxPendingAcceptResetStreams !== void 0) {
|
|
1213
|
+
validateNonNegativeInteger(options.maxPendingAcceptResetStreams, "emulation.http2Options.maxPendingAcceptResetStreams");
|
|
1214
|
+
normalized.maxPendingAcceptResetStreams = options.maxPendingAcceptResetStreams;
|
|
1215
|
+
}
|
|
1216
|
+
if (options.headerTableSize !== void 0) {
|
|
1217
|
+
validateNonNegativeInteger(options.headerTableSize, "emulation.http2Options.headerTableSize");
|
|
1218
|
+
normalized.headerTableSize = options.headerTableSize;
|
|
1219
|
+
}
|
|
1220
|
+
if (options.settingsOrder !== void 0) {
|
|
1221
|
+
if (!Array.isArray(options.settingsOrder)) throw new RequestError("emulation.http2Options.settingsOrder must be an array");
|
|
1222
|
+
const settingsOrder = [];
|
|
1223
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1224
|
+
for (const settingId of options.settingsOrder) {
|
|
1225
|
+
if (!HTTP2_SETTING_IDS.has(settingId)) throw new RequestError("emulation.http2Options.settingsOrder contains an unsupported setting id");
|
|
1226
|
+
if (seen.has(settingId)) throw new RequestError(`Duplicate emulation.http2Options.settingsOrder entry: ${settingId}`);
|
|
1227
|
+
seen.add(settingId);
|
|
1228
|
+
settingsOrder.push(settingId);
|
|
1229
|
+
}
|
|
1230
|
+
normalized.settingsOrder = settingsOrder;
|
|
1231
|
+
}
|
|
1232
|
+
if (options.headersPseudoOrder !== void 0) {
|
|
1233
|
+
if (!Array.isArray(options.headersPseudoOrder)) throw new RequestError("emulation.http2Options.headersPseudoOrder must be an array");
|
|
1234
|
+
const headersPseudoOrder = [];
|
|
1235
|
+
const seenPseudo = /* @__PURE__ */ new Set();
|
|
1236
|
+
for (const pseudoId of options.headersPseudoOrder) {
|
|
1237
|
+
if (!HTTP2_PSEUDO_HEADER_IDS.has(pseudoId)) throw new RequestError("emulation.http2Options.headersPseudoOrder contains an unsupported pseudo-header id");
|
|
1238
|
+
if (seenPseudo.has(pseudoId)) throw new RequestError(`Duplicate emulation.http2Options.headersPseudoOrder entry: ${pseudoId}`);
|
|
1239
|
+
seenPseudo.add(pseudoId);
|
|
1240
|
+
headersPseudoOrder.push(pseudoId);
|
|
1241
|
+
}
|
|
1242
|
+
normalized.headersPseudoOrder = headersPseudoOrder;
|
|
1243
|
+
}
|
|
1244
|
+
if (options.headersStreamDependency !== void 0) normalized.headersStreamDependency = normalizeHttp2StreamDependency(options.headersStreamDependency, "emulation.http2Options.headersStreamDependency");
|
|
1245
|
+
if (options.priorities !== void 0) {
|
|
1246
|
+
if (!Array.isArray(options.priorities)) throw new RequestError("emulation.http2Options.priorities must be an array");
|
|
1247
|
+
const priorities = [];
|
|
1248
|
+
const seenStreamIds = /* @__PURE__ */ new Set();
|
|
1249
|
+
for (const [index, priority] of options.priorities.entries()) {
|
|
1250
|
+
if (!isPlainObject(priority)) throw new RequestError(`emulation.http2Options.priorities[${index}] must be an object`);
|
|
1251
|
+
validatePositiveInteger(priority.streamId, `emulation.http2Options.priorities[${index}].streamId`);
|
|
1252
|
+
if (seenStreamIds.has(priority.streamId)) throw new RequestError(`Duplicate emulation.http2Options.priorities streamId: ${priority.streamId}`);
|
|
1253
|
+
seenStreamIds.add(priority.streamId);
|
|
1254
|
+
priorities.push({
|
|
1255
|
+
streamId: priority.streamId,
|
|
1256
|
+
dependency: normalizeHttp2StreamDependency(priority.dependency, `emulation.http2Options.priorities[${index}].dependency`)
|
|
1257
|
+
});
|
|
1258
|
+
}
|
|
1259
|
+
normalized.priorities = priorities;
|
|
1260
|
+
}
|
|
1261
|
+
if (options.experimentalSettings !== void 0) {
|
|
1262
|
+
if (!Array.isArray(options.experimentalSettings)) throw new RequestError("emulation.http2Options.experimentalSettings must be an array");
|
|
1263
|
+
const experimentalSettings = [];
|
|
1264
|
+
const seenIds = /* @__PURE__ */ new Set();
|
|
1265
|
+
for (const [index, setting] of options.experimentalSettings.entries()) {
|
|
1266
|
+
if (!isPlainObject(setting)) throw new RequestError(`emulation.http2Options.experimentalSettings[${index}] must be an object`);
|
|
1267
|
+
validateIntegerInRange(setting.id, 1, MAX_HTTP2_EXPERIMENTAL_SETTING_ID, `emulation.http2Options.experimentalSettings[${index}].id`);
|
|
1268
|
+
if (STANDARD_HTTP2_SETTING_ID_VALUES.has(setting.id)) throw new RequestError(`emulation.http2Options.experimentalSettings[${index}].id must not be a standard HTTP/2 setting id`);
|
|
1269
|
+
if (seenIds.has(setting.id)) throw new RequestError(`Duplicate emulation.http2Options.experimentalSettings id: ${setting.id}`);
|
|
1270
|
+
seenIds.add(setting.id);
|
|
1271
|
+
validateIntegerInRange(setting.value, 0, 4294967295, `emulation.http2Options.experimentalSettings[${index}].value`);
|
|
1272
|
+
experimentalSettings.push({
|
|
1273
|
+
id: setting.id,
|
|
1274
|
+
value: setting.value
|
|
1275
|
+
});
|
|
1276
|
+
}
|
|
1277
|
+
normalized.experimentalSettings = experimentalSettings;
|
|
1278
|
+
}
|
|
1279
|
+
return isNonEmpty(normalized) ? normalized : void 0;
|
|
1280
|
+
}
|
|
1281
|
+
function normalizeCustomEmulationOptions(emulation, allowEmpty) {
|
|
1282
|
+
if (emulation === void 0) return;
|
|
1283
|
+
if (!isPlainObject(emulation)) throw new RequestError("emulation must be an object");
|
|
1284
|
+
const source = emulation;
|
|
1285
|
+
const normalized = {};
|
|
1286
|
+
const tlsOptions = normalizeCustomTlsOptions(source.tlsOptions);
|
|
1287
|
+
if (tlsOptions !== void 0) normalized.tlsOptions = tlsOptions;
|
|
1288
|
+
const http1Options = normalizeCustomHttp1Options(source.http1Options);
|
|
1289
|
+
if (http1Options !== void 0) normalized.http1Options = http1Options;
|
|
1290
|
+
const http2Options = normalizeCustomHttp2Options(source.http2Options);
|
|
1291
|
+
if (http2Options !== void 0) normalized.http2Options = http2Options;
|
|
1292
|
+
if (source.headers !== void 0) {
|
|
1293
|
+
const headers = headersToTuples(source.headers);
|
|
1294
|
+
if (headers.length > 0) normalized.headers = headers;
|
|
1295
|
+
}
|
|
1296
|
+
const origHeaders = normalizeOrigHeaders(source.origHeaders);
|
|
1297
|
+
if (origHeaders !== void 0) normalized.origHeaders = origHeaders;
|
|
1298
|
+
if (!allowEmpty && !isNonEmpty(normalized)) throw new RequestError("Standalone custom emulation requires at least one of tlsOptions, http1Options, http2Options, headers, or origHeaders");
|
|
1299
|
+
return isNonEmpty(normalized) ? normalized : void 0;
|
|
1300
|
+
}
|
|
1301
|
+
function serializeCustomEmulationOptions(emulation, allowEmpty) {
|
|
1302
|
+
const normalized = normalizeCustomEmulationOptions(emulation, allowEmpty);
|
|
1303
|
+
return normalized ? JSON.stringify(normalized) : void 0;
|
|
1304
|
+
}
|
|
1305
|
+
function resolveEmulationMode(browser, os, emulation) {
|
|
1306
|
+
if (browser !== void 0) {
|
|
1307
|
+
validateBrowserProfile(browser);
|
|
1308
|
+
if (os !== void 0) validateOperatingSystem(os);
|
|
1309
|
+
const emulationJson = serializeCustomEmulationOptions(emulation, true);
|
|
1310
|
+
return {
|
|
1311
|
+
kind: "preset",
|
|
1312
|
+
browser,
|
|
1313
|
+
os: os ?? DEFAULT_OS,
|
|
1314
|
+
...emulationJson !== void 0 && { emulationJson }
|
|
1315
|
+
};
|
|
1316
|
+
}
|
|
1317
|
+
if (os !== void 0) {
|
|
1318
|
+
validateOperatingSystem(os);
|
|
1319
|
+
const emulationJson = serializeCustomEmulationOptions(emulation, true);
|
|
1320
|
+
return {
|
|
1321
|
+
kind: "preset",
|
|
1322
|
+
browser: DEFAULT_BROWSER,
|
|
1323
|
+
os,
|
|
1324
|
+
...emulationJson !== void 0 && { emulationJson }
|
|
1325
|
+
};
|
|
1326
|
+
}
|
|
1327
|
+
if (emulation !== void 0) {
|
|
1328
|
+
const emulationJson = serializeCustomEmulationOptions(emulation, false);
|
|
1329
|
+
if (emulationJson === void 0) throw new RequestError("Standalone custom emulation requires at least one of tlsOptions, http1Options, http2Options, headers, or origHeaders");
|
|
1330
|
+
return {
|
|
1331
|
+
kind: "custom",
|
|
1332
|
+
emulationJson
|
|
1333
|
+
};
|
|
1334
|
+
}
|
|
1335
|
+
return {
|
|
1336
|
+
kind: "preset",
|
|
1337
|
+
browser: DEFAULT_BROWSER,
|
|
1338
|
+
os: DEFAULT_OS
|
|
1339
|
+
};
|
|
1340
|
+
}
|
|
1341
|
+
function applyNativeEmulationMode(target, mode) {
|
|
1342
|
+
if (mode.kind === "custom") {
|
|
1343
|
+
target.emulationJson = mode.emulationJson;
|
|
1344
|
+
return;
|
|
1345
|
+
}
|
|
1346
|
+
target.browser = mode.browser;
|
|
1347
|
+
target.os = mode.os;
|
|
1348
|
+
if (mode.emulationJson !== void 0) target.emulationJson = mode.emulationJson;
|
|
1349
|
+
}
|
|
1350
|
+
async function dispatchRequest(options, requestUrl, signal) {
|
|
1351
|
+
if (!signal) {
|
|
1352
|
+
const requestId = generateRequestId();
|
|
1353
|
+
let payload;
|
|
1354
|
+
try {
|
|
1355
|
+
payload = await nativeBinding.request(options, requestId, false);
|
|
1356
|
+
} catch (error) {
|
|
1357
|
+
if (error instanceof RequestError) throw error;
|
|
1358
|
+
throw new RequestError(String(error));
|
|
1359
|
+
}
|
|
1360
|
+
return new Response(payload, requestUrl);
|
|
1361
|
+
}
|
|
1362
|
+
const requestId = generateRequestId();
|
|
1363
|
+
const cancelNative = () => {
|
|
1364
|
+
try {
|
|
1365
|
+
nativeBinding.cancelRequest(requestId);
|
|
1366
|
+
} catch {}
|
|
1367
|
+
};
|
|
1368
|
+
const abortHandler = setupAbort(signal, cancelNative);
|
|
1369
|
+
const pending = Promise.race([nativeBinding.request(options, requestId, true), abortHandler.promise]);
|
|
1370
|
+
let payload;
|
|
1371
|
+
try {
|
|
1372
|
+
payload = await pending;
|
|
1373
|
+
} catch (error) {
|
|
1374
|
+
if (isAbortError(error)) throw error;
|
|
1375
|
+
if (error instanceof RequestError) throw error;
|
|
1376
|
+
throw new RequestError(String(error));
|
|
1377
|
+
} finally {
|
|
1378
|
+
abortHandler.cleanup();
|
|
1379
|
+
}
|
|
1380
|
+
return new Response(payload, requestUrl);
|
|
1381
|
+
}
|
|
1382
|
+
/**
|
|
1383
|
+
* Fetch-compatible entry point that adds browser impersonation controls.
|
|
1384
|
+
*
|
|
1385
|
+
* **Important:** The default fetch path is isolated and non-persistent by design.
|
|
1386
|
+
* Each call uses an isolated request context, so cookies are not shared across calls.
|
|
1387
|
+
* Connection and TLS reuse behavior is handled by the native layer.
|
|
1388
|
+
*
|
|
1389
|
+
* **Use {@link createSession} or {@link withSession} if you need:**
|
|
1390
|
+
* - Cookie persistence across requests
|
|
1391
|
+
* - Shared session defaults across requests
|
|
1392
|
+
* - A single session context for multi-step flows
|
|
1393
|
+
*
|
|
1394
|
+
* **Concurrency:** The core is unthrottled by design. Callers are expected to implement
|
|
1395
|
+
* their own concurrency control (e.g., p-limit) if needed. Built-in throttling would
|
|
1396
|
+
* reduce performance for high-throughput workloads.
|
|
1397
|
+
*
|
|
1398
|
+
* @param input - Request URL (string or URL) or a Request object
|
|
1399
|
+
* @param init - Fetch-compatible init options
|
|
1400
|
+
*
|
|
1401
|
+
* @example
|
|
1402
|
+
* ```typescript
|
|
1403
|
+
* // Isolated request (no state persistence)
|
|
1404
|
+
* const response = await fetch('https://example.com');
|
|
1405
|
+
*
|
|
1406
|
+
* // For persistent cookies and connection reuse, use a session:
|
|
1407
|
+
* await withSession(async (session) => {
|
|
1408
|
+
* await session.fetch('https://example.com/login', { method: 'POST', body: loginData });
|
|
1409
|
+
* await session.fetch('https://example.com/protected'); // Cookies from login are sent
|
|
1410
|
+
* });
|
|
1411
|
+
* ```
|
|
1412
|
+
*/
|
|
1413
|
+
async function fetch(input, init) {
|
|
1414
|
+
const resolved = await resolveFetchArgs(input, init);
|
|
1415
|
+
const url = resolved.url;
|
|
1416
|
+
const config = resolved.init;
|
|
1417
|
+
const sessionContext = resolveSessionContext(config);
|
|
1418
|
+
const sessionDefaults = sessionContext.defaults;
|
|
1419
|
+
validateRedirectMode(config.redirect);
|
|
1420
|
+
if (config.timeout !== void 0) validateTimeout(config.timeout);
|
|
1421
|
+
validateTrustStore(config.trustStore);
|
|
1422
|
+
const method = ensureMethod(config.method);
|
|
1423
|
+
const serializedBody = await serializeBody(config.body ?? null);
|
|
1424
|
+
const body = serializedBody.body;
|
|
1425
|
+
ensureBodyAllowed(method, body);
|
|
1426
|
+
let headerTuples = mergeHeaderTuples(sessionDefaults?.defaultHeaders, config.headers);
|
|
1427
|
+
if (serializedBody.contentType && !hasHeaderName(headerTuples, "content-type")) {
|
|
1428
|
+
if (!headerTuples) headerTuples = [];
|
|
1429
|
+
headerTuples.push(["Content-Type", serializedBody.contentType]);
|
|
1430
|
+
}
|
|
1431
|
+
const transport = resolveTransportContext(config, sessionDefaults);
|
|
1432
|
+
const timeout = config.timeout ?? sessionDefaults?.timeout ?? DEFAULT_REQUEST_TIMEOUT_MS;
|
|
1433
|
+
const requestOptions = {
|
|
1434
|
+
url,
|
|
1435
|
+
method,
|
|
1436
|
+
sessionId: sessionContext.sessionId,
|
|
1437
|
+
ephemeral: sessionContext.dropAfterRequest
|
|
1438
|
+
};
|
|
1439
|
+
if (body !== void 0) requestOptions.body = body;
|
|
1440
|
+
if (transport.captureDiagnostics !== void 0) requestOptions.captureDiagnostics = transport.captureDiagnostics;
|
|
1441
|
+
if (config.onRequestEvent !== void 0) requestOptions.onRequestEvent = config.onRequestEvent;
|
|
1442
|
+
if (transport.transportId) requestOptions.transportId = transport.transportId;
|
|
1443
|
+
else {
|
|
1444
|
+
if (transport.mode !== void 0) applyNativeEmulationMode(requestOptions, transport.mode);
|
|
1445
|
+
if (transport.proxy !== void 0) requestOptions.proxy = transport.proxy;
|
|
1446
|
+
if (transport.insecure !== void 0) requestOptions.insecure = transport.insecure;
|
|
1447
|
+
if (transport.trustStore !== void 0) requestOptions.trustStore = transport.trustStore;
|
|
1448
|
+
}
|
|
1449
|
+
requestOptions.timeout = timeout;
|
|
1450
|
+
if (config.redirect !== void 0) requestOptions.redirect = config.redirect;
|
|
1451
|
+
if (config.disableDefaultHeaders !== void 0) requestOptions.disableDefaultHeaders = config.disableDefaultHeaders;
|
|
1452
|
+
if (config.compress !== void 0) requestOptions.compress = config.compress;
|
|
1453
|
+
if (headerTuples && headerTuples.length > 0) requestOptions.headers = headerTuples;
|
|
1454
|
+
return dispatchRequest(requestOptions, url, config.signal ?? null);
|
|
1455
|
+
}
|
|
1456
|
+
async function createTransport(options) {
|
|
1457
|
+
const mode = resolveEmulationMode(options?.browser, options?.os, options?.emulation);
|
|
1458
|
+
validateTrustStore(options?.trustStore);
|
|
1459
|
+
if (options?.poolIdleTimeout !== void 0) validatePositiveNumber(options.poolIdleTimeout, "poolIdleTimeout");
|
|
1460
|
+
if (options?.poolMaxIdlePerHost !== void 0) validateNonNegativeInteger(options.poolMaxIdlePerHost, "poolMaxIdlePerHost");
|
|
1461
|
+
if (options?.poolMaxSize !== void 0) validatePositiveInteger(options.poolMaxSize, "poolMaxSize");
|
|
1462
|
+
if (options?.connectTimeout !== void 0) validatePositiveNumber(options.connectTimeout, "connectTimeout");
|
|
1463
|
+
if (options?.readTimeout !== void 0) validatePositiveNumber(options.readTimeout, "readTimeout");
|
|
1464
|
+
try {
|
|
1465
|
+
const transportOptions = {
|
|
1466
|
+
...options?.proxy !== void 0 && { proxy: options.proxy },
|
|
1467
|
+
...options?.insecure !== void 0 && { insecure: options.insecure },
|
|
1468
|
+
trustStore: options?.trustStore ?? DEFAULT_TRUST_STORE,
|
|
1469
|
+
...options?.poolIdleTimeout !== void 0 && { poolIdleTimeout: options.poolIdleTimeout },
|
|
1470
|
+
...options?.poolMaxIdlePerHost !== void 0 && { poolMaxIdlePerHost: options.poolMaxIdlePerHost },
|
|
1471
|
+
...options?.poolMaxSize !== void 0 && { poolMaxSize: options.poolMaxSize },
|
|
1472
|
+
...options?.connectTimeout !== void 0 && { connectTimeout: options.connectTimeout },
|
|
1473
|
+
...options?.readTimeout !== void 0 && { readTimeout: options.readTimeout },
|
|
1474
|
+
...options?.captureDiagnostics !== void 0 && { captureDiagnostics: options.captureDiagnostics }
|
|
1475
|
+
};
|
|
1476
|
+
applyNativeEmulationMode(transportOptions, mode);
|
|
1477
|
+
return new Transport(nativeBinding.createTransport(transportOptions));
|
|
1478
|
+
} catch (error) {
|
|
1479
|
+
throw new RequestError(String(error));
|
|
1480
|
+
}
|
|
1481
|
+
}
|
|
1482
|
+
async function createSession(options) {
|
|
1483
|
+
const { sessionId, defaults } = normalizeSessionOptions(options);
|
|
1484
|
+
let createdId;
|
|
1485
|
+
let transportId;
|
|
1486
|
+
try {
|
|
1487
|
+
const transportOptions = {
|
|
1488
|
+
...defaults.proxy !== void 0 && { proxy: defaults.proxy },
|
|
1489
|
+
...defaults.insecure !== void 0 && { insecure: defaults.insecure },
|
|
1490
|
+
trustStore: defaults.trustStore ?? DEFAULT_TRUST_STORE,
|
|
1491
|
+
...defaults.captureDiagnostics !== void 0 && { captureDiagnostics: defaults.captureDiagnostics }
|
|
1492
|
+
};
|
|
1493
|
+
applyNativeEmulationMode(transportOptions, defaults.transportMode);
|
|
1494
|
+
transportId = nativeBinding.createTransport(transportOptions);
|
|
1495
|
+
} catch (error) {
|
|
1496
|
+
throw new RequestError(String(error));
|
|
1497
|
+
}
|
|
1498
|
+
try {
|
|
1499
|
+
createdId = nativeBinding.createSession({ sessionId });
|
|
1500
|
+
} catch (error) {
|
|
1501
|
+
try {
|
|
1502
|
+
nativeBinding.dropTransport(transportId);
|
|
1503
|
+
} catch {}
|
|
1504
|
+
throw new RequestError(String(error));
|
|
1505
|
+
}
|
|
1506
|
+
defaults.transportId = transportId;
|
|
1507
|
+
defaults.ownsTransport = true;
|
|
1508
|
+
return new Session(createdId, defaults);
|
|
1509
|
+
}
|
|
1510
|
+
async function withSession(fn, options) {
|
|
1511
|
+
const session = await createSession(options);
|
|
1512
|
+
try {
|
|
1513
|
+
return await fn(session);
|
|
1514
|
+
} finally {
|
|
1515
|
+
await session.close();
|
|
1516
|
+
}
|
|
1517
|
+
}
|
|
1518
|
+
/**
|
|
1519
|
+
* @deprecated Use {@link fetch} instead.
|
|
1520
|
+
*/
|
|
1521
|
+
async function request(options) {
|
|
1522
|
+
if (!options.url) throw new RequestError("URL is required");
|
|
1523
|
+
const { url, ...rest } = options;
|
|
1524
|
+
const init = {};
|
|
1525
|
+
const legacy = rest;
|
|
1526
|
+
if (rest.method !== void 0) init.method = rest.method;
|
|
1527
|
+
if (rest.headers !== void 0) init.headers = rest.headers;
|
|
1528
|
+
if (rest.body !== void 0) init.body = rest.body;
|
|
1529
|
+
if (rest.browser !== void 0) init.browser = rest.browser;
|
|
1530
|
+
if (rest.os !== void 0) init.os = rest.os;
|
|
1531
|
+
if (rest.emulation !== void 0) init.emulation = rest.emulation;
|
|
1532
|
+
if (rest.proxy !== void 0) init.proxy = rest.proxy;
|
|
1533
|
+
if (rest.timeout !== void 0) init.timeout = rest.timeout;
|
|
1534
|
+
if (rest.sessionId !== void 0) init.sessionId = rest.sessionId;
|
|
1535
|
+
if (rest.transport !== void 0) init.transport = rest.transport;
|
|
1536
|
+
if (rest.insecure !== void 0) init.insecure = rest.insecure;
|
|
1537
|
+
if (rest.trustStore !== void 0) init.trustStore = rest.trustStore;
|
|
1538
|
+
if (rest.disableDefaultHeaders !== void 0) init.disableDefaultHeaders = rest.disableDefaultHeaders;
|
|
1539
|
+
if (rest.redirect !== void 0) init.redirect = rest.redirect;
|
|
1540
|
+
if (legacy.signal !== void 0) init.signal = legacy.signal;
|
|
1541
|
+
if (legacy.session !== void 0) init.session = legacy.session;
|
|
1542
|
+
if (legacy.cookieMode !== void 0) init.cookieMode = legacy.cookieMode;
|
|
1543
|
+
else if (legacy.ephemeral === true) init.cookieMode = "ephemeral";
|
|
1544
|
+
if (legacy.onRequestEvent !== void 0) init.onRequestEvent = legacy.onRequestEvent;
|
|
1545
|
+
if (legacy.captureDiagnostics !== void 0) init.captureDiagnostics = legacy.captureDiagnostics;
|
|
1546
|
+
return fetch(url, init);
|
|
1547
|
+
}
|
|
1548
|
+
/**
|
|
1549
|
+
* Get list of available browser profiles
|
|
1550
|
+
*
|
|
1551
|
+
* @returns Array of browser profile names
|
|
1552
|
+
*
|
|
1553
|
+
* @example
|
|
1554
|
+
* ```typescript
|
|
1555
|
+
* import { getProfiles } from 'wreq-js';
|
|
1556
|
+
*
|
|
1557
|
+
* const profiles = getProfiles();
|
|
1558
|
+
* console.log(profiles); // ['chrome_131', 'chrome_142', 'firefox_135', 'safari_18', ...]
|
|
1559
|
+
* ```
|
|
1560
|
+
*/
|
|
1561
|
+
function getProfiles() {
|
|
1562
|
+
if (!cachedProfiles) cachedProfiles = nativeBinding.getProfiles();
|
|
1563
|
+
return cachedProfiles;
|
|
1564
|
+
}
|
|
1565
|
+
function getProfileSet() {
|
|
1566
|
+
if (!cachedProfileSet) cachedProfileSet = new Set(getProfiles());
|
|
1567
|
+
return cachedProfileSet;
|
|
1568
|
+
}
|
|
1569
|
+
/**
|
|
1570
|
+
* Get list of supported operating systems for emulation.
|
|
1571
|
+
*
|
|
1572
|
+
* @returns Array of operating system identifiers
|
|
1573
|
+
*/
|
|
1574
|
+
function getOperatingSystems() {
|
|
1575
|
+
if (!cachedOperatingSystems) {
|
|
1576
|
+
const fromNative = nativeBinding.getOperatingSystems?.();
|
|
1577
|
+
cachedOperatingSystems = fromNative && fromNative.length > 0 ? fromNative : [...SUPPORTED_OSES];
|
|
1578
|
+
}
|
|
1579
|
+
return cachedOperatingSystems;
|
|
1580
|
+
}
|
|
1581
|
+
function getOperatingSystemSet() {
|
|
1582
|
+
if (!cachedOperatingSystemSet) cachedOperatingSystemSet = new Set(getOperatingSystems());
|
|
1583
|
+
return cachedOperatingSystemSet;
|
|
1584
|
+
}
|
|
1585
|
+
/**
|
|
1586
|
+
* Convenience helper for GET requests using {@link fetch}.
|
|
1587
|
+
*/
|
|
1588
|
+
async function get(url, init) {
|
|
1589
|
+
const config = {};
|
|
1590
|
+
if (init) Object.assign(config, init);
|
|
1591
|
+
config.method = "GET";
|
|
1592
|
+
return fetch(url, config);
|
|
1593
|
+
}
|
|
1594
|
+
/**
|
|
1595
|
+
* Convenience helper for POST requests using {@link fetch}.
|
|
1596
|
+
*/
|
|
1597
|
+
async function post(url, body, init) {
|
|
1598
|
+
const config = {};
|
|
1599
|
+
if (init) Object.assign(config, init);
|
|
1600
|
+
config.method = "POST";
|
|
1601
|
+
if (body !== void 0) config.body = body;
|
|
1602
|
+
return fetch(url, config);
|
|
1603
|
+
}
|
|
1604
|
+
function normalizeWebSocketUrl(url) {
|
|
1605
|
+
const normalized = String(url).trim();
|
|
1606
|
+
if (!normalized) throw new RequestError("URL is required");
|
|
1607
|
+
let parsed;
|
|
1608
|
+
try {
|
|
1609
|
+
parsed = new URL(normalized);
|
|
1610
|
+
} catch (error) {
|
|
1611
|
+
throw new RequestError(String(error));
|
|
1612
|
+
}
|
|
1613
|
+
if (parsed.hash) throw new RequestError("WebSocket URL must not include a hash fragment");
|
|
1614
|
+
if (parsed.protocol === "http:") parsed.protocol = "ws:";
|
|
1615
|
+
else if (parsed.protocol === "https:") parsed.protocol = "wss:";
|
|
1616
|
+
if (parsed.protocol !== "ws:" && parsed.protocol !== "wss:") throw new RequestError("expected a ws: or wss: url");
|
|
1617
|
+
return parsed.toString();
|
|
1618
|
+
}
|
|
1619
|
+
function validateWebSocketProtocols(protocols) {
|
|
1620
|
+
if (protocols === void 0) return;
|
|
1621
|
+
const protocolList = typeof protocols === "string" ? [protocols] : protocols;
|
|
1622
|
+
const seen = /* @__PURE__ */ new Set();
|
|
1623
|
+
const validToken = /^[!#$%&'*+\-.^_`|~0-9A-Za-z]+$/;
|
|
1624
|
+
for (const protocol of protocolList) {
|
|
1625
|
+
if (typeof protocol !== "string" || protocol.length === 0) throw new RequestError("WebSocket protocol values must be non-empty strings");
|
|
1626
|
+
if (!validToken.test(protocol)) throw new RequestError(`Invalid WebSocket protocol value: ${protocol}`);
|
|
1627
|
+
if (seen.has(protocol)) throw new RequestError(`Duplicate WebSocket protocol: ${protocol}`);
|
|
1628
|
+
seen.add(protocol);
|
|
1629
|
+
}
|
|
1630
|
+
}
|
|
1631
|
+
function normalizeWebSocketSizeOption(value, label) {
|
|
1632
|
+
if (value === void 0) return;
|
|
1633
|
+
if (!Number.isSafeInteger(value) || value <= 0) throw new RequestError(`${label} must be a positive safe integer`);
|
|
1634
|
+
return value;
|
|
1635
|
+
}
|
|
1636
|
+
function normalizeStandaloneWebSocketOptions(options) {
|
|
1637
|
+
const normalized = {};
|
|
1638
|
+
if (!options) return normalized;
|
|
1639
|
+
if (options.browser !== void 0) normalized.browser = options.browser;
|
|
1640
|
+
if (options.os !== void 0) normalized.os = options.os;
|
|
1641
|
+
if (options.emulation !== void 0) normalized.emulation = options.emulation;
|
|
1642
|
+
if (options.headers !== void 0) normalized.headers = options.headers;
|
|
1643
|
+
if (options.proxy !== void 0) normalized.proxy = options.proxy;
|
|
1644
|
+
if (options.protocols !== void 0) normalized.protocols = options.protocols;
|
|
1645
|
+
if (options.maxFrameSize !== void 0) {
|
|
1646
|
+
const maxFrameSize = normalizeWebSocketSizeOption(options.maxFrameSize, "maxFrameSize");
|
|
1647
|
+
if (maxFrameSize !== void 0) normalized.maxFrameSize = maxFrameSize;
|
|
1648
|
+
}
|
|
1649
|
+
if (options.maxMessageSize !== void 0) {
|
|
1650
|
+
const maxMessageSize = normalizeWebSocketSizeOption(options.maxMessageSize, "maxMessageSize");
|
|
1651
|
+
if (maxMessageSize !== void 0) normalized.maxMessageSize = maxMessageSize;
|
|
1652
|
+
}
|
|
1653
|
+
if (options.binaryType !== void 0) {
|
|
1654
|
+
if (options.binaryType !== "nodebuffer" && options.binaryType !== "arraybuffer" && options.binaryType !== "blob") throw new RequestError("binaryType must be one of: 'nodebuffer', 'arraybuffer', 'blob'");
|
|
1655
|
+
normalized.binaryType = options.binaryType;
|
|
1656
|
+
}
|
|
1657
|
+
return normalized;
|
|
1658
|
+
}
|
|
1659
|
+
function normalizeSessionWebSocketOptions(options) {
|
|
1660
|
+
const normalized = {};
|
|
1661
|
+
if (!options) return normalized;
|
|
1662
|
+
const optionsWithOverrides = options;
|
|
1663
|
+
if (optionsWithOverrides.browser !== void 0) throw new RequestError("`browser` is not supported in session.websocket(); the session controls browser emulation.");
|
|
1664
|
+
if (optionsWithOverrides.os !== void 0) throw new RequestError("`os` is not supported in session.websocket(); the session controls OS emulation.");
|
|
1665
|
+
if (optionsWithOverrides.emulation !== void 0) throw new RequestError("`emulation` is not supported in session.websocket(); the session transport controls emulation.");
|
|
1666
|
+
if (optionsWithOverrides.proxy !== void 0) throw new RequestError("`proxy` is not supported in session.websocket(); the session transport controls proxying.");
|
|
1667
|
+
if (options.headers !== void 0) normalized.headers = options.headers;
|
|
1668
|
+
if (options.protocols !== void 0) normalized.protocols = options.protocols;
|
|
1669
|
+
if (options.maxFrameSize !== void 0) {
|
|
1670
|
+
const maxFrameSize = normalizeWebSocketSizeOption(options.maxFrameSize, "maxFrameSize");
|
|
1671
|
+
if (maxFrameSize !== void 0) normalized.maxFrameSize = maxFrameSize;
|
|
1672
|
+
}
|
|
1673
|
+
if (options.maxMessageSize !== void 0) {
|
|
1674
|
+
const maxMessageSize = normalizeWebSocketSizeOption(options.maxMessageSize, "maxMessageSize");
|
|
1675
|
+
if (maxMessageSize !== void 0) normalized.maxMessageSize = maxMessageSize;
|
|
1676
|
+
}
|
|
1677
|
+
if (options.binaryType !== void 0) {
|
|
1678
|
+
if (options.binaryType !== "nodebuffer" && options.binaryType !== "arraybuffer" && options.binaryType !== "blob") throw new RequestError("binaryType must be one of: 'nodebuffer', 'arraybuffer', 'blob'");
|
|
1679
|
+
normalized.binaryType = options.binaryType;
|
|
1680
|
+
}
|
|
1681
|
+
return normalized;
|
|
1682
|
+
}
|
|
1683
|
+
function extractLegacyWebSocketCallbacks(options) {
|
|
1684
|
+
if (!isPlainObject(options)) return;
|
|
1685
|
+
const maybeCallbacks = options;
|
|
1686
|
+
const callbacks = {};
|
|
1687
|
+
if (typeof maybeCallbacks.onMessage === "function") callbacks.onMessage = maybeCallbacks.onMessage;
|
|
1688
|
+
if (typeof maybeCallbacks.onClose === "function") callbacks.onClose = maybeCallbacks.onClose;
|
|
1689
|
+
if (typeof maybeCallbacks.onError === "function") callbacks.onError = maybeCallbacks.onError;
|
|
1690
|
+
return Object.keys(callbacks).length > 0 ? callbacks : void 0;
|
|
1691
|
+
}
|
|
1692
|
+
function normalizeWebSocketCloseOptions(code, reason) {
|
|
1693
|
+
if (code === void 0 && reason === void 0) return;
|
|
1694
|
+
if (code === void 0) throw new RequestError("A close code is required when providing a close reason");
|
|
1695
|
+
if (!Number.isInteger(code)) throw new RequestError("Close code must be an integer");
|
|
1696
|
+
if (code !== 1e3 && (code < 3e3 || code > 4999)) throw new RequestError("Close code must be 1000 or in range 3000-4999");
|
|
1697
|
+
const normalizedReason = reason ?? "";
|
|
1698
|
+
if (Buffer.byteLength(normalizedReason, "utf8") > 123) throw new RequestError("Close reason must be 123 bytes or fewer");
|
|
1699
|
+
return {
|
|
1700
|
+
code,
|
|
1701
|
+
reason: normalizedReason
|
|
1702
|
+
};
|
|
1703
|
+
}
|
|
1704
|
+
function isWebSocketListenerType(type) {
|
|
1705
|
+
return type === "open" || type === "message" || type === "close" || type === "error";
|
|
1706
|
+
}
|
|
1707
|
+
/**
|
|
1708
|
+
* WHATWG-style WebSocket API with async connection establishment.
|
|
1709
|
+
*/
|
|
1710
|
+
var WebSocket = class WebSocket {
|
|
1711
|
+
static CONNECTING = 0;
|
|
1712
|
+
static OPEN = 1;
|
|
1713
|
+
static CLOSING = 2;
|
|
1714
|
+
static CLOSED = 3;
|
|
1715
|
+
url;
|
|
1716
|
+
protocol = "";
|
|
1717
|
+
extensions = "";
|
|
1718
|
+
readyState = WebSocket.CONNECTING;
|
|
1719
|
+
_binaryType = "nodebuffer";
|
|
1720
|
+
_bufferedAmount = 0;
|
|
1721
|
+
_onopen = null;
|
|
1722
|
+
_onmessage = null;
|
|
1723
|
+
_onclose = null;
|
|
1724
|
+
_onerror = null;
|
|
1725
|
+
_onHandlerOrder = {
|
|
1726
|
+
open: -1,
|
|
1727
|
+
message: -1,
|
|
1728
|
+
close: -1,
|
|
1729
|
+
error: -1
|
|
1730
|
+
};
|
|
1731
|
+
_listenerOrderCounter = 0;
|
|
1732
|
+
_listeners = {
|
|
1733
|
+
open: /* @__PURE__ */ new Map(),
|
|
1734
|
+
message: /* @__PURE__ */ new Map(),
|
|
1735
|
+
close: /* @__PURE__ */ new Map(),
|
|
1736
|
+
error: /* @__PURE__ */ new Map()
|
|
1737
|
+
};
|
|
1738
|
+
_legacyCallbacks;
|
|
1739
|
+
_openDispatchMode;
|
|
1740
|
+
_connection;
|
|
1741
|
+
_connectPromise;
|
|
1742
|
+
_closeOptions;
|
|
1743
|
+
_finalizerToken;
|
|
1744
|
+
_openEventDispatched = false;
|
|
1745
|
+
_openEventQueued = false;
|
|
1746
|
+
_closeEventDispatched = false;
|
|
1747
|
+
_nativeCloseStarted = false;
|
|
1748
|
+
_pendingMessages = [];
|
|
1749
|
+
_sendChain = Promise.resolve();
|
|
1750
|
+
constructor(urlOrInit, protocolsOrOptions, maybeOptions) {
|
|
1751
|
+
let init;
|
|
1752
|
+
if (isInternalWebSocketInit(urlOrInit)) init = urlOrInit;
|
|
1753
|
+
else init = WebSocket.buildStandaloneInit(urlOrInit, protocolsOrOptions, maybeOptions);
|
|
1754
|
+
this.url = init.url;
|
|
1755
|
+
this.binaryType = init.options.binaryType ?? "nodebuffer";
|
|
1756
|
+
this._legacyCallbacks = init.legacyCallbacks;
|
|
1757
|
+
this._openDispatchMode = init.openDispatchMode;
|
|
1758
|
+
this._connectPromise = this.connect(init.connect);
|
|
1759
|
+
this._connectPromise.catch(() => void 0);
|
|
1760
|
+
}
|
|
1761
|
+
get binaryType() {
|
|
1762
|
+
return this._binaryType;
|
|
1763
|
+
}
|
|
1764
|
+
set binaryType(value) {
|
|
1765
|
+
if (value === "arraybuffer" || value === "blob" || value === "nodebuffer") this._binaryType = value;
|
|
1766
|
+
}
|
|
1767
|
+
get bufferedAmount() {
|
|
1768
|
+
return this._bufferedAmount;
|
|
1769
|
+
}
|
|
1770
|
+
get onopen() {
|
|
1771
|
+
return this._onopen;
|
|
1772
|
+
}
|
|
1773
|
+
set onopen(listener) {
|
|
1774
|
+
this._onopen = listener;
|
|
1775
|
+
this._onHandlerOrder.open = listener ? ++this._listenerOrderCounter : -1;
|
|
1776
|
+
}
|
|
1777
|
+
get onmessage() {
|
|
1778
|
+
return this._onmessage;
|
|
1779
|
+
}
|
|
1780
|
+
set onmessage(listener) {
|
|
1781
|
+
this._onmessage = listener;
|
|
1782
|
+
this._onHandlerOrder.message = listener ? ++this._listenerOrderCounter : -1;
|
|
1783
|
+
}
|
|
1784
|
+
get onclose() {
|
|
1785
|
+
return this._onclose;
|
|
1786
|
+
}
|
|
1787
|
+
set onclose(listener) {
|
|
1788
|
+
this._onclose = listener;
|
|
1789
|
+
this._onHandlerOrder.close = listener ? ++this._listenerOrderCounter : -1;
|
|
1790
|
+
}
|
|
1791
|
+
get onerror() {
|
|
1792
|
+
return this._onerror;
|
|
1793
|
+
}
|
|
1794
|
+
set onerror(listener) {
|
|
1795
|
+
this._onerror = listener;
|
|
1796
|
+
this._onHandlerOrder.error = listener ? ++this._listenerOrderCounter : -1;
|
|
1797
|
+
}
|
|
1798
|
+
static async _connectWithInit(init) {
|
|
1799
|
+
const ws = new WebSocket(init);
|
|
1800
|
+
await ws._waitUntilConnected();
|
|
1801
|
+
ws.scheduleOpenEventAfterAwait();
|
|
1802
|
+
return ws;
|
|
1803
|
+
}
|
|
1804
|
+
static buildStandaloneInit(url, protocolsOrOptions, maybeOptions) {
|
|
1805
|
+
const optionsCandidate = typeof protocolsOrOptions === "string" || Array.isArray(protocolsOrOptions) ? maybeOptions : protocolsOrOptions ?? maybeOptions;
|
|
1806
|
+
const normalizedOptions = normalizeStandaloneWebSocketOptions(optionsCandidate);
|
|
1807
|
+
validateWebSocketProtocols(typeof protocolsOrOptions === "string" || Array.isArray(protocolsOrOptions) ? protocolsOrOptions : normalizedOptions.protocols);
|
|
1808
|
+
assertNoManualWebSocketProtocolHeader(normalizedOptions.headers);
|
|
1809
|
+
const emulationMode = resolveEmulationMode(normalizedOptions.browser, normalizedOptions.os, normalizedOptions.emulation);
|
|
1810
|
+
const protocols = normalizeWebSocketProtocolList(typeof protocolsOrOptions === "string" || Array.isArray(protocolsOrOptions) ? protocolsOrOptions : normalizedOptions.protocols);
|
|
1811
|
+
return {
|
|
1812
|
+
_internal: true,
|
|
1813
|
+
url: normalizeWebSocketUrl(url),
|
|
1814
|
+
options: normalizedOptions,
|
|
1815
|
+
openDispatchMode: "automatic",
|
|
1816
|
+
connect: (callbacks) => {
|
|
1817
|
+
const nativeOptions = {
|
|
1818
|
+
url: normalizeWebSocketUrl(url),
|
|
1819
|
+
headers: headersToTuples(normalizedOptions.headers ?? {}),
|
|
1820
|
+
...protocols && protocols.length > 0 && { protocols },
|
|
1821
|
+
...normalizedOptions.proxy !== void 0 && { proxy: normalizedOptions.proxy },
|
|
1822
|
+
...normalizedOptions.maxFrameSize !== void 0 && { maxFrameSize: normalizedOptions.maxFrameSize },
|
|
1823
|
+
...normalizedOptions.maxMessageSize !== void 0 && { maxMessageSize: normalizedOptions.maxMessageSize },
|
|
1824
|
+
onMessage: callbacks.onMessage,
|
|
1825
|
+
onClose: callbacks.onClose,
|
|
1826
|
+
onError: callbacks.onError
|
|
1827
|
+
};
|
|
1828
|
+
applyNativeEmulationMode(nativeOptions, emulationMode);
|
|
1829
|
+
return nativeBinding.websocketConnect(nativeOptions);
|
|
1830
|
+
},
|
|
1831
|
+
legacyCallbacks: extractLegacyWebSocketCallbacks(optionsCandidate)
|
|
1832
|
+
};
|
|
1833
|
+
}
|
|
1834
|
+
async connect(connectFn) {
|
|
1835
|
+
try {
|
|
1836
|
+
const connection = await connectFn({
|
|
1837
|
+
onMessage: (data) => {
|
|
1838
|
+
this.handleNativeMessage(data);
|
|
1839
|
+
},
|
|
1840
|
+
onClose: (event) => {
|
|
1841
|
+
this.handleNativeClose(event);
|
|
1842
|
+
},
|
|
1843
|
+
onError: (message) => {
|
|
1844
|
+
this.handleNativeError(message);
|
|
1845
|
+
}
|
|
1846
|
+
});
|
|
1847
|
+
this._connection = connection;
|
|
1848
|
+
this.protocol = connection.protocol ?? "";
|
|
1849
|
+
this.extensions = connection.extensions ?? "";
|
|
1850
|
+
if (websocketFinalizer) {
|
|
1851
|
+
this._finalizerToken = connection;
|
|
1852
|
+
websocketFinalizer.register(this, connection, connection);
|
|
1853
|
+
}
|
|
1854
|
+
if (this.readyState === WebSocket.CLOSING) {
|
|
1855
|
+
this.startNativeClose();
|
|
1856
|
+
return;
|
|
1857
|
+
}
|
|
1858
|
+
this.readyState = WebSocket.OPEN;
|
|
1859
|
+
if (this._openDispatchMode === "automatic") this.scheduleOpenEventAfterConnect();
|
|
1860
|
+
} catch (error) {
|
|
1861
|
+
this.handleNativeError(String(error));
|
|
1862
|
+
this.finalizeClosed({
|
|
1863
|
+
code: 1006,
|
|
1864
|
+
reason: ""
|
|
1865
|
+
}, false);
|
|
1866
|
+
throw new RequestError(String(error));
|
|
1867
|
+
}
|
|
1868
|
+
}
|
|
1869
|
+
_waitUntilConnected() {
|
|
1870
|
+
return this._connectPromise;
|
|
1871
|
+
}
|
|
1872
|
+
scheduleOpenEventAfterConnect() {
|
|
1873
|
+
this.scheduleOpenEventWithDepth(2);
|
|
1874
|
+
}
|
|
1875
|
+
scheduleOpenEventAfterAwait() {
|
|
1876
|
+
this.scheduleOpenEventWithDepth(3);
|
|
1877
|
+
}
|
|
1878
|
+
scheduleOpenEventWithDepth(depth) {
|
|
1879
|
+
if (this._openEventDispatched || this._openEventQueued || this.readyState !== WebSocket.OPEN) return;
|
|
1880
|
+
this._openEventQueued = true;
|
|
1881
|
+
const queue = (remaining) => {
|
|
1882
|
+
if (remaining === 0) {
|
|
1883
|
+
this._openEventQueued = false;
|
|
1884
|
+
if (this._openEventDispatched || this.readyState !== WebSocket.OPEN) return;
|
|
1885
|
+
this._openEventDispatched = true;
|
|
1886
|
+
this.dispatchOpenEvent();
|
|
1887
|
+
return;
|
|
1888
|
+
}
|
|
1889
|
+
queueMicrotask(() => {
|
|
1890
|
+
queue(remaining - 1);
|
|
1891
|
+
});
|
|
1892
|
+
};
|
|
1893
|
+
queue(depth);
|
|
1894
|
+
}
|
|
1895
|
+
releaseConnectionTracking() {
|
|
1896
|
+
if (!this._finalizerToken || !websocketFinalizer) return;
|
|
1897
|
+
websocketFinalizer.unregister(this._finalizerToken);
|
|
1898
|
+
this._finalizerToken = void 0;
|
|
1899
|
+
}
|
|
1900
|
+
toMessageEventData(data) {
|
|
1901
|
+
if (typeof data === "string") return data;
|
|
1902
|
+
if (this._binaryType === "arraybuffer") {
|
|
1903
|
+
const arrayBuffer = new ArrayBuffer(data.byteLength);
|
|
1904
|
+
new Uint8Array(arrayBuffer).set(data);
|
|
1905
|
+
return arrayBuffer;
|
|
1906
|
+
}
|
|
1907
|
+
if (this._binaryType === "blob") return new Blob([data]);
|
|
1908
|
+
return data;
|
|
1909
|
+
}
|
|
1910
|
+
invokeListener(listener, event) {
|
|
1911
|
+
try {
|
|
1912
|
+
if (typeof listener === "function") listener.call(this, event);
|
|
1913
|
+
else listener.handleEvent(event);
|
|
1914
|
+
} catch {}
|
|
1915
|
+
}
|
|
1916
|
+
createBaseEvent(type) {
|
|
1917
|
+
return {
|
|
1918
|
+
type,
|
|
1919
|
+
isTrusted: false,
|
|
1920
|
+
timeStamp: Date.now(),
|
|
1921
|
+
target: this,
|
|
1922
|
+
currentTarget: this
|
|
1923
|
+
};
|
|
1924
|
+
}
|
|
1925
|
+
getOnHandler(type) {
|
|
1926
|
+
switch (type) {
|
|
1927
|
+
case "open": return this._onopen;
|
|
1928
|
+
case "message": return this._onmessage;
|
|
1929
|
+
case "close": return this._onclose;
|
|
1930
|
+
case "error": return this._onerror;
|
|
1931
|
+
default: return null;
|
|
1932
|
+
}
|
|
1933
|
+
}
|
|
1934
|
+
getOnHandlerOrder(type) {
|
|
1935
|
+
return this._onHandlerOrder[type];
|
|
1936
|
+
}
|
|
1937
|
+
getListenerMap(type) {
|
|
1938
|
+
return this._listeners[type];
|
|
1939
|
+
}
|
|
1940
|
+
dispatchEvent(type, event) {
|
|
1941
|
+
const listenerMap = this.getListenerMap(type);
|
|
1942
|
+
const onHandler = this.getOnHandler(type);
|
|
1943
|
+
if (listenerMap.size === 0 && !onHandler) return;
|
|
1944
|
+
const ordered = [];
|
|
1945
|
+
for (const descriptor of listenerMap.values()) ordered.push({
|
|
1946
|
+
order: descriptor.order,
|
|
1947
|
+
listener: descriptor.listener,
|
|
1948
|
+
once: descriptor.once
|
|
1949
|
+
});
|
|
1950
|
+
if (onHandler) ordered.push({
|
|
1951
|
+
order: this.getOnHandlerOrder(type),
|
|
1952
|
+
listener: onHandler,
|
|
1953
|
+
once: false
|
|
1954
|
+
});
|
|
1955
|
+
ordered.sort((a, b) => a.order - b.order);
|
|
1956
|
+
for (const entry of ordered) {
|
|
1957
|
+
if (entry.once) this.removeEventListener(type, entry.listener);
|
|
1958
|
+
this.invokeListener(entry.listener, event);
|
|
1959
|
+
}
|
|
1960
|
+
}
|
|
1961
|
+
dispatchOpenEvent() {
|
|
1962
|
+
const event = this.createBaseEvent("open");
|
|
1963
|
+
this.dispatchEvent("open", event);
|
|
1964
|
+
if (!this._closeEventDispatched && this._pendingMessages.length > 0) {
|
|
1965
|
+
const pending = this._pendingMessages;
|
|
1966
|
+
this._pendingMessages = [];
|
|
1967
|
+
for (const data of pending) this.dispatchMessageEvent(this.toMessageEventData(data));
|
|
1968
|
+
}
|
|
1969
|
+
}
|
|
1970
|
+
dispatchMessageEvent(data) {
|
|
1971
|
+
const event = {
|
|
1972
|
+
...this.createBaseEvent("message"),
|
|
1973
|
+
data
|
|
1974
|
+
};
|
|
1975
|
+
this.dispatchEvent("message", event);
|
|
1976
|
+
}
|
|
1977
|
+
dispatchCloseEvent(event) {
|
|
1978
|
+
this.dispatchEvent("close", event);
|
|
1979
|
+
}
|
|
1980
|
+
dispatchErrorEvent(message) {
|
|
1981
|
+
const event = {
|
|
1982
|
+
...this.createBaseEvent("error"),
|
|
1983
|
+
...message !== void 0 && { message }
|
|
1984
|
+
};
|
|
1985
|
+
this.dispatchEvent("error", event);
|
|
1986
|
+
}
|
|
1987
|
+
handleNativeMessage(data) {
|
|
1988
|
+
if (this._closeEventDispatched) return;
|
|
1989
|
+
this._legacyCallbacks?.onMessage?.(data);
|
|
1990
|
+
if (!this._openEventDispatched && this.readyState === WebSocket.OPEN) {
|
|
1991
|
+
this._pendingMessages.push(data);
|
|
1992
|
+
return;
|
|
1993
|
+
}
|
|
1994
|
+
this.dispatchMessageEvent(this.toMessageEventData(data));
|
|
1995
|
+
}
|
|
1996
|
+
handleNativeError(message) {
|
|
1997
|
+
this._legacyCallbacks?.onError?.(message);
|
|
1998
|
+
this.dispatchErrorEvent(message);
|
|
1999
|
+
}
|
|
2000
|
+
handleNativeClose(event) {
|
|
2001
|
+
const wasClean = this.readyState === WebSocket.CLOSING || event.code === 1e3;
|
|
2002
|
+
this.finalizeClosed(event, wasClean);
|
|
2003
|
+
}
|
|
2004
|
+
finalizeClosed(event, wasClean) {
|
|
2005
|
+
if (this._closeEventDispatched) return;
|
|
2006
|
+
this.readyState = WebSocket.CLOSED;
|
|
2007
|
+
this._closeEventDispatched = true;
|
|
2008
|
+
this._pendingMessages = [];
|
|
2009
|
+
this.releaseConnectionTracking();
|
|
2010
|
+
const closeEvent = {
|
|
2011
|
+
...this.createBaseEvent("close"),
|
|
2012
|
+
code: event.code,
|
|
2013
|
+
reason: event.reason,
|
|
2014
|
+
wasClean
|
|
2015
|
+
};
|
|
2016
|
+
this._legacyCallbacks?.onClose?.(closeEvent);
|
|
2017
|
+
this.dispatchCloseEvent(closeEvent);
|
|
2018
|
+
}
|
|
2019
|
+
startNativeClose() {
|
|
2020
|
+
if (this._nativeCloseStarted || !this._connection) return;
|
|
2021
|
+
this._nativeCloseStarted = true;
|
|
2022
|
+
const connection = this._connection;
|
|
2023
|
+
const closeOptions = this._closeOptions;
|
|
2024
|
+
nativeBinding.websocketClose(connection, closeOptions).catch((error) => {
|
|
2025
|
+
this.handleNativeError(String(error));
|
|
2026
|
+
this.finalizeClosed({
|
|
2027
|
+
code: 1006,
|
|
2028
|
+
reason: ""
|
|
2029
|
+
}, false);
|
|
2030
|
+
});
|
|
2031
|
+
}
|
|
2032
|
+
addEventListener(type, listener, options) {
|
|
2033
|
+
if (!listener || !isWebSocketListenerType(type)) return;
|
|
2034
|
+
const normalizedListener = listener;
|
|
2035
|
+
if (typeof normalizedListener !== "function" && (typeof normalizedListener !== "object" || normalizedListener === null || typeof normalizedListener.handleEvent !== "function")) return;
|
|
2036
|
+
const listenerMap = this.getListenerMap(type);
|
|
2037
|
+
if (listenerMap.has(normalizedListener)) return;
|
|
2038
|
+
const parsedOptions = typeof options === "boolean" ? {} : options ?? {};
|
|
2039
|
+
const once = parsedOptions.once === true;
|
|
2040
|
+
const signal = parsedOptions.signal;
|
|
2041
|
+
if (signal?.aborted) return;
|
|
2042
|
+
const descriptor = {
|
|
2043
|
+
listener: normalizedListener,
|
|
2044
|
+
order: ++this._listenerOrderCounter,
|
|
2045
|
+
once
|
|
2046
|
+
};
|
|
2047
|
+
if (signal) {
|
|
2048
|
+
const onAbort = () => {
|
|
2049
|
+
this.removeEventListener(type, normalizedListener);
|
|
2050
|
+
};
|
|
2051
|
+
descriptor.abortSignal = signal;
|
|
2052
|
+
descriptor.abortHandler = onAbort;
|
|
2053
|
+
signal.addEventListener("abort", onAbort, { once: true });
|
|
2054
|
+
}
|
|
2055
|
+
listenerMap.set(normalizedListener, descriptor);
|
|
2056
|
+
}
|
|
2057
|
+
removeEventListener(type, listener) {
|
|
2058
|
+
if (!listener || !isWebSocketListenerType(type)) return;
|
|
2059
|
+
const normalizedListener = listener;
|
|
2060
|
+
if (typeof normalizedListener !== "function" && typeof normalizedListener !== "object") return;
|
|
2061
|
+
const listenerMap = this.getListenerMap(type);
|
|
2062
|
+
const descriptor = listenerMap.get(normalizedListener);
|
|
2063
|
+
if (!descriptor) return;
|
|
2064
|
+
if (descriptor.abortSignal && descriptor.abortHandler) descriptor.abortSignal.removeEventListener("abort", descriptor.abortHandler);
|
|
2065
|
+
listenerMap.delete(normalizedListener);
|
|
2066
|
+
}
|
|
2067
|
+
getSendByteLength(data) {
|
|
2068
|
+
if (typeof data === "string") return Buffer.byteLength(data);
|
|
2069
|
+
if (Buffer.isBuffer(data)) return data.byteLength;
|
|
2070
|
+
if (data instanceof ArrayBuffer) return data.byteLength;
|
|
2071
|
+
if (ArrayBuffer.isView(data)) return data.byteLength;
|
|
2072
|
+
if (typeof Blob !== "undefined" && data instanceof Blob) return data.size;
|
|
2073
|
+
throw new TypeError("WebSocket data must be a string, Buffer, ArrayBuffer, ArrayBufferView, or Blob");
|
|
2074
|
+
}
|
|
2075
|
+
async normalizeSendPayload(data) {
|
|
2076
|
+
if (typeof data === "string") return data;
|
|
2077
|
+
if (Buffer.isBuffer(data)) return data;
|
|
2078
|
+
if (data instanceof ArrayBuffer) return Buffer.from(data);
|
|
2079
|
+
if (ArrayBuffer.isView(data)) return Buffer.from(data.buffer, data.byteOffset, data.byteLength);
|
|
2080
|
+
if (typeof Blob !== "undefined" && data instanceof Blob) return Buffer.from(await data.arrayBuffer());
|
|
2081
|
+
throw new TypeError("WebSocket data must be a string, Buffer, ArrayBuffer, ArrayBufferView, or Blob");
|
|
2082
|
+
}
|
|
2083
|
+
send(data) {
|
|
2084
|
+
if (this.readyState !== WebSocket.OPEN || !this._connection) throw new RequestError("WebSocket is not open");
|
|
2085
|
+
const queuedBytes = this.getSendByteLength(data);
|
|
2086
|
+
const connection = this._connection;
|
|
2087
|
+
this._bufferedAmount += queuedBytes;
|
|
2088
|
+
const sendTask = async () => {
|
|
2089
|
+
try {
|
|
2090
|
+
const payload = await this.normalizeSendPayload(data);
|
|
2091
|
+
await nativeBinding.websocketSend(connection, payload);
|
|
2092
|
+
} catch (error) {
|
|
2093
|
+
this.handleNativeError(String(error));
|
|
2094
|
+
this.finalizeClosed({
|
|
2095
|
+
code: 1006,
|
|
2096
|
+
reason: ""
|
|
2097
|
+
}, false);
|
|
2098
|
+
} finally {
|
|
2099
|
+
this._bufferedAmount = Math.max(0, this._bufferedAmount - queuedBytes);
|
|
2100
|
+
}
|
|
2101
|
+
};
|
|
2102
|
+
this._sendChain = this._sendChain.then(sendTask, sendTask);
|
|
2103
|
+
}
|
|
2104
|
+
close(code, reason) {
|
|
2105
|
+
if (this.readyState === WebSocket.CLOSING || this.readyState === WebSocket.CLOSED) return;
|
|
2106
|
+
this._closeOptions = normalizeWebSocketCloseOptions(code, reason);
|
|
2107
|
+
this.readyState = WebSocket.CLOSING;
|
|
2108
|
+
this.startNativeClose();
|
|
2109
|
+
}
|
|
2110
|
+
};
|
|
2111
|
+
function isInternalWebSocketInit(value) {
|
|
2112
|
+
if (!isPlainObject(value)) return false;
|
|
2113
|
+
const candidate = value;
|
|
2114
|
+
return candidate._internal === true && typeof candidate.url === "string" && typeof candidate.connect === "function";
|
|
2115
|
+
}
|
|
2116
|
+
function normalizeStandaloneWebSocketArgs(urlOrOptions, options) {
|
|
2117
|
+
if (typeof urlOrOptions === "string" || urlOrOptions instanceof URL) {
|
|
2118
|
+
const normalizedOptions = normalizeStandaloneWebSocketOptions(options);
|
|
2119
|
+
return {
|
|
2120
|
+
url: normalizeWebSocketUrl(urlOrOptions),
|
|
2121
|
+
options: normalizedOptions,
|
|
2122
|
+
legacyCallbacks: extractLegacyWebSocketCallbacks(options)
|
|
2123
|
+
};
|
|
2124
|
+
}
|
|
2125
|
+
const legacy = urlOrOptions;
|
|
2126
|
+
const normalizedOptions = normalizeStandaloneWebSocketOptions(legacy);
|
|
2127
|
+
return {
|
|
2128
|
+
url: normalizeWebSocketUrl(legacy.url),
|
|
2129
|
+
options: normalizedOptions,
|
|
2130
|
+
legacyCallbacks: extractLegacyWebSocketCallbacks(legacy)
|
|
2131
|
+
};
|
|
2132
|
+
}
|
|
2133
|
+
function normalizeSessionWebSocketArgs(urlOrOptions, options) {
|
|
2134
|
+
if (typeof urlOrOptions === "string" || urlOrOptions instanceof URL) {
|
|
2135
|
+
const normalizedOptions = normalizeSessionWebSocketOptions(options);
|
|
2136
|
+
return {
|
|
2137
|
+
url: normalizeWebSocketUrl(urlOrOptions),
|
|
2138
|
+
options: normalizedOptions,
|
|
2139
|
+
legacyCallbacks: extractLegacyWebSocketCallbacks(options)
|
|
2140
|
+
};
|
|
2141
|
+
}
|
|
2142
|
+
const legacy = urlOrOptions;
|
|
2143
|
+
const normalizedOptions = normalizeSessionWebSocketOptions(legacy);
|
|
2144
|
+
return {
|
|
2145
|
+
url: normalizeWebSocketUrl(legacy.url),
|
|
2146
|
+
options: normalizedOptions,
|
|
2147
|
+
legacyCallbacks: extractLegacyWebSocketCallbacks(legacy)
|
|
2148
|
+
};
|
|
2149
|
+
}
|
|
2150
|
+
async function websocket(urlOrOptions, options) {
|
|
2151
|
+
const normalized = normalizeStandaloneWebSocketArgs(urlOrOptions, options);
|
|
2152
|
+
validateWebSocketProtocols(normalized.options.protocols);
|
|
2153
|
+
assertNoManualWebSocketProtocolHeader(normalized.options.headers);
|
|
2154
|
+
const emulationMode = resolveEmulationMode(normalized.options.browser, normalized.options.os, normalized.options.emulation);
|
|
2155
|
+
const protocols = normalizeWebSocketProtocolList(normalized.options.protocols);
|
|
2156
|
+
return WebSocket._connectWithInit({
|
|
2157
|
+
_internal: true,
|
|
2158
|
+
url: normalized.url,
|
|
2159
|
+
options: normalized.options,
|
|
2160
|
+
openDispatchMode: "deferred",
|
|
2161
|
+
connect: (callbacks) => {
|
|
2162
|
+
const nativeOptions = {
|
|
2163
|
+
url: normalized.url,
|
|
2164
|
+
headers: headersToTuples(normalized.options.headers ?? {}),
|
|
2165
|
+
...protocols && protocols.length > 0 && { protocols },
|
|
2166
|
+
...normalized.options.proxy !== void 0 && { proxy: normalized.options.proxy },
|
|
2167
|
+
...normalized.options.maxFrameSize !== void 0 && { maxFrameSize: normalized.options.maxFrameSize },
|
|
2168
|
+
...normalized.options.maxMessageSize !== void 0 && { maxMessageSize: normalized.options.maxMessageSize },
|
|
2169
|
+
onMessage: callbacks.onMessage,
|
|
2170
|
+
onClose: callbacks.onClose,
|
|
2171
|
+
onError: callbacks.onError
|
|
2172
|
+
};
|
|
2173
|
+
applyNativeEmulationMode(nativeOptions, emulationMode);
|
|
2174
|
+
return nativeBinding.websocketConnect(nativeOptions);
|
|
2175
|
+
},
|
|
2176
|
+
legacyCallbacks: normalized.legacyCallbacks
|
|
2177
|
+
});
|
|
2178
|
+
}
|
|
2179
|
+
var wreq_js_default = {
|
|
2180
|
+
fetch,
|
|
2181
|
+
request,
|
|
2182
|
+
get,
|
|
2183
|
+
post,
|
|
2184
|
+
getProfiles,
|
|
2185
|
+
getOperatingSystems,
|
|
2186
|
+
createTransport,
|
|
2187
|
+
createSession,
|
|
2188
|
+
withSession,
|
|
2189
|
+
websocket,
|
|
2190
|
+
WebSocket,
|
|
2191
|
+
Headers,
|
|
2192
|
+
Response,
|
|
2193
|
+
Transport,
|
|
2194
|
+
Session,
|
|
2195
|
+
RequestError
|
|
2196
|
+
};
|
|
2197
|
+
//#endregion
|
|
2198
|
+
exports.Headers = Headers;
|
|
2199
|
+
exports.RequestError = RequestError;
|
|
2200
|
+
exports.Response = Response;
|
|
2201
|
+
exports.Session = Session;
|
|
2202
|
+
exports.Transport = Transport;
|
|
2203
|
+
exports.WebSocket = WebSocket;
|
|
2204
|
+
exports.createSession = createSession;
|
|
2205
|
+
exports.createTransport = createTransport;
|
|
2206
|
+
exports.default = wreq_js_default;
|
|
2207
|
+
exports.fetch = fetch;
|
|
2208
|
+
exports.get = get;
|
|
2209
|
+
exports.getOperatingSystems = getOperatingSystems;
|
|
2210
|
+
exports.getProfiles = getProfiles;
|
|
2211
|
+
exports.post = post;
|
|
2212
|
+
exports.request = request;
|
|
2213
|
+
exports.websocket = websocket;
|
|
2214
|
+
exports.withSession = withSession;
|
|
2215
|
+
|
|
2216
|
+
//# sourceMappingURL=wreq-js.cjs.map
|