@amir83nasr/10router 0.1.11 → 0.1.12
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/.next/BUILD_ID +1 -1
- package/.next/app-path-routes-manifest.json +6 -5
- package/.next/build-manifest.json +2 -2
- package/.next/prerender-manifest.json +23 -23
- package/.next/routes-manifest.json +6 -0
- package/.next/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
- package/.next/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/combos/page.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/media-providers/systemone/[id]/page.js +2 -2
- package/.next/server/app/(dashboard)/dashboard/media-providers/systemone/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/media-providers/systemone/page.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/media-providers/systemone/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/page.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/profile/page.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
- package/.next/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/providers/page.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/proxy-pools/page.js +2 -2
- package/.next/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/quota/page.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/usage/page.js +1 -1
- package/.next/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error/page.js +2 -2
- package/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_global-error.html +1 -1
- package/.next/server/app/_global-error.rsc +1 -1
- package/.next/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next/server/app/_not-found/page.js +1 -1
- package/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next/server/app/_not-found.html +1 -1
- package/.next/server/app/_not-found.rsc +6 -6
- package/.next/server/app/_not-found.segments/_full.segment.rsc +6 -6
- package/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +6 -6
- package/.next/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/api/auth/login/route.js +1 -1
- package/.next/server/app/api/auth/logout/route.js +1 -1
- package/.next/server/app/api/auth/oidc/callback/route.js +1 -1
- package/.next/server/app/api/auth/oidc/start/route.js +1 -1
- package/.next/server/app/api/auth/oidc/test/route.js +1 -1
- package/.next/server/app/api/auth/reset-password/route.js +1 -1
- package/.next/server/app/api/auth/saml/acs/route.js +1 -1
- package/.next/server/app/api/auth/saml/metadata/route.js +1 -1
- package/.next/server/app/api/auth/saml/start/route.js +2 -2
- package/.next/server/app/api/auth/saml/test/route.js +1 -1
- package/.next/server/app/api/auth/status/route.js +1 -1
- package/.next/server/app/api/changelog/route.js +1 -1
- package/.next/server/app/api/cli-tools/all-statuses/route.js +1 -1
- package/.next/server/app/api/cli-tools/claude-settings/route.js +1 -1
- package/.next/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/.next/server/app/api/cli-tools/cowork-mcp-registry/route.js +1 -1
- package/.next/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
- package/.next/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/.next/server/app/api/cli-tools/dsh-settings/route.js +1 -1
- package/.next/server/app/api/cli-tools/opencode-settings/route.js +1 -1
- package/.next/server/app/api/combos/[id]/route.js +1 -1
- package/.next/server/app/api/combos/route.js +1 -1
- package/.next/server/app/api/dashboard/chat/completions/route.js +1 -0
- package/.next/server/app/api/dashboard/chat/completions/route.js.nft.json +1 -0
- package/.next/server/app/api/dashboard/chat/completions/route_client-reference-manifest.js +1 -0
- package/.next/server/app/api/headroom/extras/route.js +1 -1
- package/.next/server/app/api/headroom/proxy/[...path]/route.js +1 -1
- package/.next/server/app/api/headroom/restart/route.js +1 -1
- package/.next/server/app/api/headroom/start/route.js +1 -1
- package/.next/server/app/api/headroom/status/route.js +1 -1
- package/.next/server/app/api/headroom/stop/route.js +1 -1
- package/.next/server/app/api/health/route.js +1 -1
- package/.next/server/app/api/init/route.js +1 -1
- package/.next/server/app/api/keys/[id]/route.js +1 -1
- package/.next/server/app/api/keys/route.js +1 -1
- package/.next/server/app/api/locale/route.js +1 -1
- package/.next/server/app/api/mcp/[plugin]/message/route.js +1 -1
- package/.next/server/app/api/mcp/[plugin]/sse/route.js +2 -2
- package/.next/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/.next/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/.next/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/.next/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/.next/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/.next/server/app/api/models/alias/route.js +1 -1
- package/.next/server/app/api/models/availability/route.js +1 -1
- package/.next/server/app/api/models/catalog-sync/route.js +1 -1
- package/.next/server/app/api/models/custom/route.js +1 -1
- package/.next/server/app/api/models/disabled/route.js +1 -1
- package/.next/server/app/api/models/route.js +1 -1
- package/.next/server/app/api/models/test/route.js +1 -1
- package/.next/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/.next/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/.next/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/.next/server/app/api/oauth/cursor/auto-import/route.js +2 -2
- package/.next/server/app/api/oauth/cursor/import/route.js +1 -1
- package/.next/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/.next/server/app/api/oauth/grok-cli/bulk-import/route.js +1 -1
- package/.next/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/.next/server/app/api/oauth/xiaomi-mimo/api-key/route.js +1 -1
- package/.next/server/app/api/oauth/xiaomi-mimo/auto-import/route.js +2 -2
- package/.next/server/app/api/pricing/route.js +1 -1
- package/.next/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/.next/server/app/api/provider-nodes/route.js +1 -1
- package/.next/server/app/api/provider-nodes/validate/route.js +1 -1
- package/.next/server/app/api/providers/[id]/models/route.js +1 -1
- package/.next/server/app/api/providers/[id]/route.js +1 -1
- package/.next/server/app/api/providers/[id]/test/route.js +1 -1
- package/.next/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/.next/server/app/api/providers/client/route.js +1 -1
- package/.next/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/.next/server/app/api/providers/route.js +1 -1
- package/.next/server/app/api/providers/suggested-models/route.js +1 -1
- package/.next/server/app/api/providers/test-batch/route.js +1 -1
- package/.next/server/app/api/providers/validate/route.js +1 -1
- package/.next/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/.next/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/.next/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
- package/.next/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
- package/.next/server/app/api/proxy-pools/route.js +1 -1
- package/.next/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
- package/.next/server/app/api/pxpipe/health/route.js +1 -1
- package/.next/server/app/api/pxpipe/install/route.js +1 -1
- package/.next/server/app/api/pxpipe/logs/route.js +1 -1
- package/.next/server/app/api/pxpipe/restart/route.js +1 -1
- package/.next/server/app/api/pxpipe/start/route.js +1 -1
- package/.next/server/app/api/pxpipe/stats/route.js +1 -1
- package/.next/server/app/api/pxpipe/status/route.js +1 -1
- package/.next/server/app/api/pxpipe/stop/route.js +1 -1
- package/.next/server/app/api/settings/database/route.js +1 -1
- package/.next/server/app/api/settings/proxy-test/route.js +1 -1
- package/.next/server/app/api/settings/require-login/route.js +1 -1
- package/.next/server/app/api/settings/route.js +1 -1
- package/.next/server/app/api/shutdown/route.js +1 -1
- package/.next/server/app/api/tags/route.js +1 -1
- package/.next/server/app/api/translator/console-logs/route.js +1 -1
- package/.next/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/.next/server/app/api/translator/load/route.js +1 -1
- package/.next/server/app/api/translator/save/route.js +1 -1
- package/.next/server/app/api/translator/send/route.js +1 -1
- package/.next/server/app/api/translator/translate/route.js +1 -1
- package/.next/server/app/api/tunnel/disable/route.js +1 -1
- package/.next/server/app/api/tunnel/enable/route.js +1 -1
- package/.next/server/app/api/tunnel/status/route.js +1 -1
- package/.next/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/.next/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/.next/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/.next/server/app/api/tunnel/tailscale-install/route.js +3 -3
- package/.next/server/app/api/usage/[connectionId]/codex-reset-credits/route.js +1 -1
- package/.next/server/app/api/usage/[connectionId]/route.js +1 -1
- package/.next/server/app/api/usage/chart/route.js +1 -1
- package/.next/server/app/api/usage/health/route.js +1 -1
- package/.next/server/app/api/usage/history/route.js +1 -1
- package/.next/server/app/api/usage/logs/route.js +1 -1
- package/.next/server/app/api/usage/providers/route.js +1 -1
- package/.next/server/app/api/usage/request-details/route.js +1 -1
- package/.next/server/app/api/usage/request-logs/route.js +1 -1
- package/.next/server/app/api/usage/stats/route.js +1 -1
- package/.next/server/app/api/usage/stream/route.js +2 -2
- package/.next/server/app/api/v1/api/chat/route.js +1 -1
- package/.next/server/app/api/v1/audio/speech/route.js +1 -1
- package/.next/server/app/api/v1/audio/transcriptions/route.js +1 -1
- package/.next/server/app/api/v1/audio/voices/route.js +1 -1
- package/.next/server/app/api/v1/chat/completions/route.js +1 -1
- package/.next/server/app/api/v1/embeddings/route.js +1 -1
- package/.next/server/app/api/v1/images/generations/route.js +2 -2
- package/.next/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/.next/server/app/api/v1/messages/route.js +1 -1
- package/.next/server/app/api/v1/models/[...model]/route.js +1 -1
- package/.next/server/app/api/v1/models/info/route.js +1 -1
- package/.next/server/app/api/v1/models/route.js +1 -1
- package/.next/server/app/api/v1/responses/compact/route.js +1 -1
- package/.next/server/app/api/v1/responses/route.js +1 -1
- package/.next/server/app/api/v1/route.js +1 -1
- package/.next/server/app/api/v1/search/route.js +1 -1
- package/.next/server/app/api/v1/systemone/route.js +1 -1
- package/.next/server/app/api/v1/videos/[id]/route.js +1 -1
- package/.next/server/app/api/v1/videos/edits/route.js +1 -1
- package/.next/server/app/api/v1/videos/extensions/route.js +1 -1
- package/.next/server/app/api/v1/videos/generations/route.js +1 -1
- package/.next/server/app/api/v1/web/fetch/route.js +1 -1
- package/.next/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/.next/server/app/api/v1beta/models/route.js +1 -1
- package/.next/server/app/api/version/route.js +1 -1
- package/.next/server/app/api/version/shutdown/route.js +1 -1
- package/.next/server/app/api/version/update/route.js +1 -1
- package/.next/server/app/callback/page.js +1 -1
- package/.next/server/app/callback/page_client-reference-manifest.js +1 -1
- package/.next/server/app/callback.html +1 -1
- package/.next/server/app/callback.rsc +7 -7
- package/.next/server/app/callback.segments/_full.segment.rsc +7 -7
- package/.next/server/app/callback.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/callback.segments/callback/__PAGE__.segment.rsc +7 -7
- package/.next/server/app/dashboard/basic-chat.html +1 -1
- package/.next/server/app/dashboard/basic-chat.rsc +8 -8
- package/.next/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +8 -8
- package/.next/server/app/dashboard/basic-chat.segments/_full.segment.rsc +8 -8
- package/.next/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/dashboard/cli-tools.html +1 -1
- package/.next/server/app/dashboard/cli-tools.rsc +9 -9
- package/.next/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +8 -8
- package/.next/server/app/dashboard/cli-tools.segments/_full.segment.rsc +9 -9
- package/.next/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/dashboard/combos.html +1 -1
- package/.next/server/app/dashboard/combos.rsc +8 -8
- package/.next/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +8 -8
- package/.next/server/app/dashboard/combos.segments/_full.segment.rsc +8 -8
- package/.next/server/app/dashboard/combos.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/dashboard/endpoint.html +1 -1
- package/.next/server/app/dashboard/endpoint.rsc +9 -9
- package/.next/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +8 -8
- package/.next/server/app/dashboard/endpoint.segments/_full.segment.rsc +9 -9
- package/.next/server/app/dashboard/endpoint.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/dashboard/media-providers/systemone.html +1 -1
- package/.next/server/app/dashboard/media-providers/systemone.rsc +8 -8
- package/.next/server/app/dashboard/media-providers/systemone.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/systemone/__PAGE__.segment.rsc +8 -8
- package/.next/server/app/dashboard/media-providers/systemone.segments/_full.segment.rsc +8 -8
- package/.next/server/app/dashboard/media-providers/systemone.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/dashboard/profile.html +1 -1
- package/.next/server/app/dashboard/profile.rsc +8 -8
- package/.next/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +8 -8
- package/.next/server/app/dashboard/profile.segments/_full.segment.rsc +8 -8
- package/.next/server/app/dashboard/profile.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/dashboard/providers/new.html +1 -1
- package/.next/server/app/dashboard/providers/new.rsc +8 -8
- package/.next/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +8 -8
- package/.next/server/app/dashboard/providers/new.segments/_full.segment.rsc +8 -8
- package/.next/server/app/dashboard/providers/new.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/dashboard/providers.html +1 -1
- package/.next/server/app/dashboard/providers.rsc +8 -8
- package/.next/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +8 -8
- package/.next/server/app/dashboard/providers.segments/_full.segment.rsc +8 -8
- package/.next/server/app/dashboard/providers.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/dashboard/proxy-pools.html +1 -1
- package/.next/server/app/dashboard/proxy-pools.rsc +8 -8
- package/.next/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +8 -8
- package/.next/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +8 -8
- package/.next/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/dashboard/pxpipe.html +1 -1
- package/.next/server/app/dashboard/pxpipe.rsc +7 -7
- package/.next/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +7 -7
- package/.next/server/app/dashboard/pxpipe.segments/_full.segment.rsc +7 -7
- package/.next/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/dashboard/quota.html +2 -2
- package/.next/server/app/dashboard/quota.rsc +9 -9
- package/.next/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +9 -9
- package/.next/server/app/dashboard/quota.segments/_full.segment.rsc +9 -9
- package/.next/server/app/dashboard/quota.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/dashboard/settings/pricing/page.js +1 -1
- package/.next/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/.next/server/app/dashboard/settings/pricing.html +1 -1
- package/.next/server/app/dashboard/settings/pricing.rsc +6 -6
- package/.next/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +6 -6
- package/.next/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +6 -6
- package/.next/server/app/dashboard/token-saver.html +1 -1
- package/.next/server/app/dashboard/token-saver.rsc +7 -7
- package/.next/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +7 -7
- package/.next/server/app/dashboard/token-saver.segments/_full.segment.rsc +7 -7
- package/.next/server/app/dashboard/token-saver.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/dashboard/usage.html +2 -2
- package/.next/server/app/dashboard/usage.rsc +8 -8
- package/.next/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +8 -8
- package/.next/server/app/dashboard/usage.segments/_full.segment.rsc +8 -8
- package/.next/server/app/dashboard/usage.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/dashboard.html +1 -1
- package/.next/server/app/dashboard.rsc +9 -9
- package/.next/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +8 -8
- package/.next/server/app/dashboard.segments/_full.segment.rsc +9 -9
- package/.next/server/app/dashboard.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/index.html +1 -1
- package/.next/server/app/index.rsc +6 -6
- package/.next/server/app/index.segments/__PAGE__.segment.rsc +6 -6
- package/.next/server/app/index.segments/_full.segment.rsc +6 -6
- package/.next/server/app/index.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/landing/page.js +1 -1
- package/.next/server/app/landing/page_client-reference-manifest.js +1 -1
- package/.next/server/app/landing.html +1 -1
- package/.next/server/app/landing.rsc +7 -7
- package/.next/server/app/landing.segments/_full.segment.rsc +7 -7
- package/.next/server/app/landing.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/landing.segments/landing/__PAGE__.segment.rsc +7 -7
- package/.next/server/app/login/page.js +1 -1
- package/.next/server/app/login/page_client-reference-manifest.js +1 -1
- package/.next/server/app/login.html +1 -1
- package/.next/server/app/login.rsc +6 -6
- package/.next/server/app/login.segments/_full.segment.rsc +6 -6
- package/.next/server/app/login.segments/_tree.segment.rsc +2 -2
- package/.next/server/app/login.segments/login/__PAGE__.segment.rsc +6 -6
- package/.next/server/app/manifest.webmanifest/route.js +2 -2
- package/.next/server/app/page.js +1 -1
- package/.next/server/app/page_client-reference-manifest.js +1 -1
- package/.next/server/app-paths-manifest.json +6 -5
- package/.next/server/chunks/1011.js +1 -1
- package/.next/server/chunks/1194.js +1 -1
- package/.next/server/chunks/1289.js +1 -1
- package/.next/server/chunks/1633.js +1 -1
- package/.next/server/chunks/1985.js +1 -1
- package/.next/server/chunks/2282.js +6 -6
- package/.next/server/chunks/2339.js +1 -1
- package/.next/server/chunks/2706.js +1 -1
- package/.next/server/chunks/2801.js +1 -1
- package/.next/server/chunks/3034.js +1 -1
- package/.next/server/chunks/3425.js +1 -1
- package/.next/server/chunks/4129.js +1 -1
- package/.next/server/chunks/6056.js +1 -1
- package/.next/server/chunks/7348.js +1 -1
- package/.next/server/chunks/7816.js +1 -1
- package/.next/server/chunks/9429.js +1 -1
- package/.next/server/middleware-build-manifest.js +1 -1
- package/.next/server/middleware.js +3 -3
- package/.next/server/pages/404.html +1 -1
- package/.next/server/pages/500.html +1 -1
- package/.next/server/server-reference-manifest.js +1 -1
- package/.next/server/server-reference-manifest.json +1 -1
- package/.next/static/C423Aljus-j0GJlKCHgC1/_buildManifest.js +1 -0
- package/.next/static/chunks/1278-3b5ed69340ddb23f.js +1 -0
- package/.next/static/chunks/{1471-10f225f62f7469cc.js → 1471-69a7c30abf98c656.js} +1 -1
- package/.next/static/chunks/159-89c77cec422bd76f.js +1 -0
- package/.next/static/chunks/2392-b07fcae4714087ef.js +65 -0
- package/.next/static/chunks/2441-96064c4ee1216099.js +1 -0
- package/.next/static/chunks/{2836-d97f0aa2718945d5.js → 2836-4781ea7374870f4a.js} +1 -1
- package/.next/static/chunks/{3577-cd98d40e3099e1b0.js → 3577-1f02993330d7fba7.js} +1 -1
- package/.next/static/chunks/{5862-f98c2f3d480b80d2.js → 5862-6f3a3a6d4c00100d.js} +1 -1
- package/.next/static/chunks/9320-ae7eb68edeb92e89.js +3 -0
- package/.next/static/chunks/{9369-0d43b295968c2168.js → 9369-07e432041bb48a39.js} +1 -1
- package/.next/static/chunks/{9ce8c186-3c7d7dbc5d428052.js → 9ce8c186-6cd204e9c27ecee1.js} +1 -1
- package/.next/static/chunks/app/(dashboard)/dashboard/basic-chat/page-34f4d77aa3df67a8.js +1 -0
- package/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/[toolId]/{page-e8bceccb95695755.js → page-36ad70a4f906c64b.js} +2 -2
- package/.next/static/chunks/app/(dashboard)/dashboard/cli-tools/{page-adee408d9de02423.js → page-aae6be7f75fcd819.js} +1 -1
- package/.next/static/chunks/app/(dashboard)/dashboard/combos/{page-d4c1e29e8d038f09.js → page-18212c87b17b33cf.js} +1 -1
- package/.next/static/chunks/app/(dashboard)/dashboard/console-log/{page-3cc58622294c8c8a.js → page-52b5a6dc2c2d2d93.js} +1 -1
- package/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-9287a3cbd098b9c4.js +1 -0
- package/.next/static/chunks/app/(dashboard)/dashboard/media-providers/systemone/[id]/{page-b751d9603cb82e62.js → page-610d962dd8bd1744.js} +1 -1
- package/.next/static/chunks/app/(dashboard)/dashboard/media-providers/systemone/{page-49b3b4867d06cbe0.js → page-9dbf4cd6901b6042.js} +1 -1
- package/.next/static/chunks/app/(dashboard)/dashboard/page-1d6e969653676c7d.js +1 -0
- package/.next/static/chunks/app/(dashboard)/dashboard/profile/{page-65b2c7989dbe2663.js → page-2ab30b6e1baf1efd.js} +1 -1
- package/.next/static/chunks/app/(dashboard)/dashboard/providers/[id]/{page-d5d480e209fdc55a.js → page-b17607bc2ed06d50.js} +1 -1
- package/.next/static/chunks/app/(dashboard)/dashboard/providers/new/{page-9b68243ab9555702.js → page-0e649a78a041306a.js} +1 -1
- package/.next/static/chunks/app/(dashboard)/dashboard/providers/{page-2396571281d02804.js → page-b10c05192c664e8d.js} +1 -1
- package/.next/static/chunks/app/(dashboard)/dashboard/proxy-pools/{page-cfd6bcb7e55d7d18.js → page-b33051a3fc600082.js} +2 -2
- package/.next/static/chunks/app/(dashboard)/dashboard/quota/{page-fef6edb7aafd8bd0.js → page-ee2a0fa91d9bea9c.js} +1 -1
- package/.next/static/chunks/app/(dashboard)/dashboard/usage/{page-697f46461825d7fc.js → page-2457f236bc58e590.js} +1 -1
- package/.next/static/chunks/app/(dashboard)/{layout-5039502fc12707c9.js → layout-7ef1d599b3c4c6d2.js} +1 -1
- package/.next/static/chunks/app/_global-error/page-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/auth/login/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/auth/logout/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/auth/oidc/callback/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/auth/oidc/start/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/auth/oidc/test/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/auth/reset-password/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/auth/saml/acs/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/auth/saml/metadata/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/auth/saml/start/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/auth/saml/test/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/auth/status/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/changelog/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/cli-tools/all-statuses/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/cli-tools/claude-settings/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/cli-tools/codex-settings/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/cli-tools/cowork-settings/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/cli-tools/dsh-settings/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/cli-tools/opencode-settings/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/combos/[id]/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/combos/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/dashboard/chat/completions/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/headroom/extras/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/headroom/proxy/[...path]/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/headroom/restart/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/headroom/start/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/headroom/status/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/headroom/stop/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/health/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/init/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/keys/[id]/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/keys/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/locale/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/mcp/[plugin]/message/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/mcp/[plugin]/sse/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/media-providers/tts/minimax/voices/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/media-providers/tts/voices/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/models/alias/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/models/availability/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/models/catalog-sync/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/models/custom/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/models/disabled/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/models/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/models/test/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/oauth/[provider]/[action]/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/oauth/codex/bulk-import/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/oauth/codex/import-token/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/oauth/cursor/auto-import/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/oauth/cursor/import/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/oauth/gitlab/pat/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/oauth/grok-cli/bulk-import/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/oauth/iflow/cookie/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/pricing/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/provider-nodes/[id]/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/provider-nodes/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/provider-nodes/validate/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/providers/[id]/models/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/providers/[id]/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/providers/[id]/test/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/providers/[id]/test-models/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/providers/client/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/providers/kilo/free-models/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/providers/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/providers/suggested-models/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/providers/test-batch/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/providers/validate/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/proxy-pools/[id]/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/proxy-pools/[id]/test/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/proxy-pools/deno-deploy/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/proxy-pools/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/pxpipe/health/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/pxpipe/install/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/pxpipe/logs/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/pxpipe/restart/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/pxpipe/start/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/pxpipe/stats/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/pxpipe/status/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/pxpipe/stop/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/settings/database/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/settings/proxy-test/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/settings/require-login/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/settings/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/shutdown/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/tags/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/translator/console-logs/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/translator/console-logs/stream/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/translator/load/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/translator/save/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/translator/send/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/translator/translate/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/tunnel/disable/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/tunnel/enable/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/tunnel/status/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/tunnel/tailscale-check/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/tunnel/tailscale-disable/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/tunnel/tailscale-enable/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/tunnel/tailscale-install/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/usage/[connectionId]/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/usage/chart/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/usage/health/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/usage/history/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/usage/logs/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/usage/providers/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/usage/request-details/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/usage/request-logs/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/usage/stats/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/usage/stream/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/api/chat/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/audio/speech/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/audio/transcriptions/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/audio/voices/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/chat/completions/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/embeddings/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/images/generations/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/messages/count_tokens/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/messages/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/models/[...model]/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/models/info/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/models/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/responses/compact/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/responses/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/search/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/systemone/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/videos/[id]/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/videos/edits/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/videos/extensions/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/videos/generations/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1/web/fetch/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1beta/models/[...path]/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/v1beta/models/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/version/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/version/shutdown/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/api/version/update/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/{layout-dc929483cad9f77f.js → layout-f34e075b1872747e.js} +1 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/app/page-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-a826a2eb5dc30149.js +1 -0
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-a826a2eb5dc30149.js +1 -0
- package/.next/static/css/{c66cbd684164cacf.css → a2628e64fa8ac12e.css} +1 -1
- package/CHANGELOG.md +8 -0
- package/open-sse/providers/registry/opencode-go.js +4 -0
- package/open-sse/providers/registry/opencode-zen.js +4 -0
- package/open-sse/providers/registry/opencode.js +3 -0
- package/open-sse/translator/concerns/thinkingUnified.js +16 -1
- package/open-sse/translator/concerns/toolCall.js +2 -1
- package/open-sse/translator/formats/openai.js +10 -2
- package/open-sse/translator/request/claude-to-openai.js +9 -5
- package/open-sse/translator/response/openai-to-claude.js +66 -32
- package/open-sse/translator/schema/defaults.js +6 -0
- package/open-sse/translator/schema/index.js +1 -1
- package/package.json +2 -1
- package/src/app/(dashboard)/dashboard/basic-chat/BasicChatPageClient.tsx +45 -7
- package/src/app/api/dashboard/chat/completions/route.ts +45 -0
- package/src/app/globals.css +54 -13
- package/src/components/app-sidebar.tsx +1 -0
- package/src/shared/components/Header.tsx +8 -0
- package/.next/static/Xxof6vr5MvX0-6oReU23d/_buildManifest.js +0 -1
- package/.next/static/chunks/1278-f11c7d84c52342fc.js +0 -1
- package/.next/static/chunks/159-ec207a220d7d5c16.js +0 -1
- package/.next/static/chunks/1699-13ee6864a8a31a96.js +0 -67
- package/.next/static/chunks/app/(dashboard)/dashboard/basic-chat/page-ce1364b2b9589785.js +0 -1
- package/.next/static/chunks/app/(dashboard)/dashboard/endpoint/page-67516b120adbc4d7.js +0 -1
- package/.next/static/chunks/app/(dashboard)/dashboard/page-315c9f52c472a700.js +0 -1
- package/.next/static/chunks/app/_global-error/page-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/auth/login/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/auth/logout/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/auth/oidc/callback/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/auth/oidc/start/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/auth/oidc/test/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/auth/reset-password/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/auth/saml/acs/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/auth/saml/metadata/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/auth/saml/start/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/auth/saml/test/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/auth/status/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/changelog/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/cli-tools/all-statuses/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/cli-tools/claude-settings/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/cli-tools/codex-settings/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/cli-tools/cowork-mcp-registry/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/cli-tools/cowork-mcp-tools/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/cli-tools/cowork-settings/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/cli-tools/dsh-settings/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/cli-tools/opencode-settings/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/combos/[id]/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/combos/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/headroom/extras/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/headroom/proxy/[...path]/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/headroom/restart/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/headroom/start/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/headroom/status/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/headroom/stop/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/health/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/init/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/keys/[id]/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/keys/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/locale/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/mcp/[plugin]/message/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/mcp/[plugin]/sse/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/media-providers/tts/deepgram/voices/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/media-providers/tts/elevenlabs/voices/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/media-providers/tts/inworld/voices/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/media-providers/tts/minimax/voices/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/media-providers/tts/voices/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/models/alias/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/models/availability/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/models/catalog-sync/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/models/custom/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/models/disabled/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/models/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/models/test/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/oauth/[provider]/[action]/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/oauth/codex/bulk-import/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/oauth/codex/import-token/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/oauth/cursor/auto-import/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/oauth/cursor/import/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/oauth/gitlab/pat/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/oauth/grok-cli/bulk-import/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/oauth/iflow/cookie/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/oauth/xiaomi-mimo/api-key/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/oauth/xiaomi-mimo/auto-import/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/pricing/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/provider-nodes/[id]/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/provider-nodes/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/provider-nodes/validate/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/providers/[id]/models/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/providers/[id]/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/providers/[id]/test/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/providers/[id]/test-models/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/providers/client/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/providers/kilo/free-models/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/providers/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/providers/suggested-models/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/providers/test-batch/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/providers/validate/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/proxy-pools/[id]/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/proxy-pools/[id]/test/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/proxy-pools/cloudflare-deploy/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/proxy-pools/deno-deploy/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/proxy-pools/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/proxy-pools/vercel-deploy/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/pxpipe/health/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/pxpipe/install/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/pxpipe/logs/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/pxpipe/restart/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/pxpipe/start/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/pxpipe/stats/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/pxpipe/status/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/pxpipe/stop/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/settings/database/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/settings/proxy-test/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/settings/require-login/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/settings/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/shutdown/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/tags/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/translator/console-logs/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/translator/console-logs/stream/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/translator/load/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/translator/save/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/translator/send/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/translator/translate/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/tunnel/disable/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/tunnel/enable/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/tunnel/status/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/tunnel/tailscale-check/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/tunnel/tailscale-disable/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/tunnel/tailscale-enable/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/tunnel/tailscale-install/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/usage/[connectionId]/codex-reset-credits/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/usage/[connectionId]/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/usage/chart/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/usage/health/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/usage/history/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/usage/logs/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/usage/providers/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/usage/request-details/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/usage/request-logs/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/usage/stats/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/usage/stream/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/api/chat/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/audio/speech/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/audio/transcriptions/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/audio/voices/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/chat/completions/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/embeddings/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/images/generations/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/messages/count_tokens/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/messages/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/models/[...model]/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/models/info/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/models/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/responses/compact/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/responses/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/search/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/systemone/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/videos/[id]/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/videos/edits/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/videos/extensions/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/videos/generations/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1/web/fetch/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1beta/models/[...path]/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/v1beta/models/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/version/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/version/shutdown/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/api/version/update/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/manifest.webmanifest/route-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/app/page-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/app-error-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/forbidden-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/not-found-9a2a13ac6b89ba91.js +0 -1
- package/.next/static/chunks/next/dist/client/components/builtin/unauthorized-9a2a13ac6b89ba91.js +0 -1
- /package/.next/static/{Xxof6vr5MvX0-6oReU23d → C423Aljus-j0GJlKCHgC1}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=6236,a.ids=[6236],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},8474:()=>{},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},42754:()=>{},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{"use strict";a.exports=require("sql.js")},54569:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69277:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>j});var d=c(94661),e=c(35462),f=c(47535),g=c(96700);function h(a){if(!a)return!0;let b=String(a).toLowerCase();return"ok"===b||"success"===b}function i(a,b=220){if(null==a)return null;let c=("string"==typeof a?a:JSON.stringify(a)).replace(/\s+/g," ").trim();return c?c.length>b?`${c.slice(0,b)}…`:c:null}async function j(){try{let a=await (0,e.c)(),b=new Date(Date.now()-864e5).toISOString(),c=a.all("SELECT provider, connectionId, status, timestamp FROM usageHistory WHERE timestamp >= ? ORDER BY timestamp DESC LIMIT ?",[b,5e3]),j=a.all("SELECT data FROM requestDetails ORDER BY timestamp DESC LIMIT ?",[200]),k=[];for(let a of j){let b=(0,g.q)(a.data,null);if(!b)continue;let c="number"==typeof b?.latency?.total?b.latency.total:"number"==typeof b?.data?.latency?.total?b.data.latency.total:void 0;k.push({provider:b.provider||null,connectionId:b.connectionId||null,timestamp:b.timestamp||"",status:b.status||null,latencyMs:c,error:function(a){let b=a?.response;if(!b||"object"!=typeof b)return null;if("string"==typeof b.error)return b.error;if(null!=b.error)try{return JSON.stringify(b.error)}catch{return String(b.error)}return null}(b)})}let l=j.map(a=>(0,g.q)(a.data,null)).filter(Boolean),m=await (0,f.P)(),{providers:n,recentFailures:o}=function(a){let b=new Date(a.cutoffIso).getTime(),c=new Map;for(let b of a.connections)c.set(b.id,b);let d=new Map,e=(a,b)=>{let c=`${a}|||${b}`,e=d.get(c);return e||(e={provider:a,connectionId:b,requests:0,errors:0,detailErrors:0,latencies:[],lastError:null,lastErrorAt:null},d.set(c,e)),e};for(let c of a.historyRows){if(!c.provider||!c.connectionId)continue;let a=c.timestamp?new Date(c.timestamp).getTime():0;if(Number.isFinite(b)&&a<b)continue;let d=e(c.provider,c.connectionId);d.requests+=1,h(c.status)||(d.errors+=1)}let f=[];for(let d of a.detailRows){if(!d.provider)continue;d.connectionId;let a=d.timestamp||"",g=a?new Date(a).getTime():0;if((!Number.isFinite(b)||g>=b)&&d.connectionId){let b=e(d.provider,d.connectionId);if("number"==typeof d.latencyMs&&d.latencyMs>=0&&b.latencies.push(d.latencyMs),h(d.status))"number"==typeof d.latencyMs&&d.latencyMs>=0&&b.lastErrorAt;else{b.detailErrors+=1;let c=i(d.error);c&&(!b.lastErrorAt||a>b.lastErrorAt)&&(b.lastError=c,b.lastErrorAt=a)}}if(!h(d.status)){let b=d.connectionId?c.get(d.connectionId):void 0;f.push({timestamp:a,provider:d.provider,model:"",connectionId:d.connectionId||null,connectionName:b?.name||null,status:String(d.status||"error"),latencyMs:"number"==typeof d.latencyMs?d.latencyMs:null,error:i(d.error)})}}for(let b of a.connections)e(b.provider,b.id);let g=Date.now(),j=[...d.values()].map(a=>{let b,d=c.get(a.connectionId),e=d?.rateLimitedUntil||null,f=!!e&&new Date(e).getTime()>g;a.latencies.sort((a,b)=>a-b);let h=a.requests+a.detailErrors,j=a.errors+a.detailErrors,k=a.requests>0?(a.requests-a.errors)/a.requests:h>0?0:null;b=f?"cooldown":0===h?"idle":0===a.requests||null!==k&&k<.5?"down":j>0?"degraded":"healthy";let l=a.lastError,m=a.lastErrorAt;return!l&&d?.lastError&&(l=i(d.lastError)),{provider:a.provider,connectionId:a.connectionId,connectionName:d?.name||`${a.connectionId.slice(0,8)}…`,requests:a.requests,errors:a.errors,detailErrors:a.detailErrors,successRate:k,p50LatencyMs:function(a){if(!a.length)return null;let b=Math.min(a.length-1,Math.floor(.5*a.length));return a[b]}(a.latencies),lastError:l,lastErrorAt:m,cooldownUntil:f?e:null,status:b}});return j.sort((a,b)=>{let c={down:0,cooldown:1,degraded:2,healthy:3,idle:4};return c[a.status]!==c[b.status]?c[a.status]-c[b.status]:b.requests+b.detailErrors-(a.requests+a.detailErrors)}),f.sort((a,b)=>a.timestamp<b.timestamp?1:-1),{providers:j,recentFailures:f.slice(0,20)}}({historyRows:c.map(a=>({provider:a.provider,connectionId:a.connectionId,status:a.status,timestamp:a.timestamp})),detailRows:k,connections:m.map(a=>({id:a.id,provider:a.provider,name:a.name||a.email||null,rateLimitedUntil:a.rateLimitedUntil||null,testStatus:a.testStatus||null,lastError:a.lastError??null})),cutoffIso:b}),p=new Map;for(let a of l)a?.provider&&a?.connectionId&&a?.timestamp&&a?.model&&p.set(`${a.provider}|||${a.connectionId}|||${a.timestamp}`,a.model);let q=o.map(a=>({...a,model:p.get(`${a.provider}|||${a.connectionId}|||${a.timestamp}`)||""}));return d.NextResponse.json({generatedAt:new Date().toISOString(),window:"24h",providers:n,recentFailures:q})}catch(a){return console.error("[API] Failed to get usage health:",a),d.NextResponse.json({error:"Failed to fetch provider health"},{status:500})}}},73024:a=>{"use strict";a.exports=require("node:fs")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},79868:a=>{"use strict";a.exports=require("node:sqlite")},80713:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(75724),e=c(50417),f=c(92744),g=c(86234),h=c(22808),i=c(15712),j=c(261),k=c(45590),l=c(19324),m=c(78196),n=c(26439),o=c(9265),p=c(9955),q=c(86477),r=c(87498),s=c(86439),t=c(23464);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/usage/health/route",pathname:"/api/usage/health",filename:"route",bundlePath:"app/api/usage/health/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/10Router/10Router/src/app/api/usage/health/route.ts",nextConfigOutput:"standalone",userland:()=>c(69277),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/usage/health/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},81787:a=>{"use strict";a.exports=require("bun:sqlite")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},97091:(a,b,c)=>{"use strict";c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(54569);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[1316,2426,7535],()=>b(b.s=80713));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=6236,a.ids=[6236],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},8474:()=>{},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},21820:a=>{"use strict";a.exports=require("os")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},42754:()=>{},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{"use strict";a.exports=require("sql.js")},48732:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(75724),e=c(50417),f=c(92744),g=c(86234),h=c(22808),i=c(15712),j=c(261),k=c(45590),l=c(19324),m=c(78196),n=c(26439),o=c(9265),p=c(9955),q=c(86477),r=c(87498),s=c(86439),t=c(23464);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/usage/health/route",pathname:"/api/usage/health",filename:"route",bundlePath:"app/api/usage/health/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/10Router/10Router/src/app/api/usage/health/route.ts",nextConfigOutput:"standalone",userland:()=>c(69277),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/usage/health/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},54569:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},69277:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>j});var d=c(94661),e=c(35462),f=c(47535),g=c(96700);function h(a){if(!a)return!0;let b=String(a).toLowerCase();return"ok"===b||"success"===b}function i(a,b=220){if(null==a)return null;let c=("string"==typeof a?a:JSON.stringify(a)).replace(/\s+/g," ").trim();return c?c.length>b?`${c.slice(0,b)}…`:c:null}async function j(){try{let a=await (0,e.c)(),b=new Date(Date.now()-864e5).toISOString(),c=a.all("SELECT provider, connectionId, status, timestamp FROM usageHistory WHERE timestamp >= ? ORDER BY timestamp DESC LIMIT ?",[b,5e3]),j=a.all("SELECT data FROM requestDetails ORDER BY timestamp DESC LIMIT ?",[200]),k=[];for(let a of j){let b=(0,g.q)(a.data,null);if(!b)continue;let c="number"==typeof b?.latency?.total?b.latency.total:"number"==typeof b?.data?.latency?.total?b.data.latency.total:void 0;k.push({provider:b.provider||null,connectionId:b.connectionId||null,timestamp:b.timestamp||"",status:b.status||null,latencyMs:c,error:function(a){let b=a?.response;if(!b||"object"!=typeof b)return null;if("string"==typeof b.error)return b.error;if(null!=b.error)try{return JSON.stringify(b.error)}catch{return String(b.error)}return null}(b)})}let l=j.map(a=>(0,g.q)(a.data,null)).filter(Boolean),m=await (0,f.P)(),{providers:n,recentFailures:o}=function(a){let b=new Date(a.cutoffIso).getTime(),c=new Map;for(let b of a.connections)c.set(b.id,b);let d=new Map,e=(a,b)=>{let c=`${a}|||${b}`,e=d.get(c);return e||(e={provider:a,connectionId:b,requests:0,errors:0,detailErrors:0,latencies:[],lastError:null,lastErrorAt:null},d.set(c,e)),e};for(let c of a.historyRows){if(!c.provider||!c.connectionId)continue;let a=c.timestamp?new Date(c.timestamp).getTime():0;if(Number.isFinite(b)&&a<b)continue;let d=e(c.provider,c.connectionId);d.requests+=1,h(c.status)||(d.errors+=1)}let f=[];for(let d of a.detailRows){if(!d.provider)continue;d.connectionId;let a=d.timestamp||"",g=a?new Date(a).getTime():0;if((!Number.isFinite(b)||g>=b)&&d.connectionId){let b=e(d.provider,d.connectionId);if("number"==typeof d.latencyMs&&d.latencyMs>=0&&b.latencies.push(d.latencyMs),h(d.status))"number"==typeof d.latencyMs&&d.latencyMs>=0&&b.lastErrorAt;else{b.detailErrors+=1;let c=i(d.error);c&&(!b.lastErrorAt||a>b.lastErrorAt)&&(b.lastError=c,b.lastErrorAt=a)}}if(!h(d.status)){let b=d.connectionId?c.get(d.connectionId):void 0;f.push({timestamp:a,provider:d.provider,model:"",connectionId:d.connectionId||null,connectionName:b?.name||null,status:String(d.status||"error"),latencyMs:"number"==typeof d.latencyMs?d.latencyMs:null,error:i(d.error)})}}for(let b of a.connections)e(b.provider,b.id);let g=Date.now(),j=[...d.values()].map(a=>{let b,d=c.get(a.connectionId),e=d?.rateLimitedUntil||null,f=!!e&&new Date(e).getTime()>g;a.latencies.sort((a,b)=>a-b);let h=a.requests+a.detailErrors,j=a.errors+a.detailErrors,k=a.requests>0?(a.requests-a.errors)/a.requests:h>0?0:null;b=f?"cooldown":0===h?"idle":0===a.requests||null!==k&&k<.5?"down":j>0?"degraded":"healthy";let l=a.lastError,m=a.lastErrorAt;return!l&&d?.lastError&&(l=i(d.lastError)),{provider:a.provider,connectionId:a.connectionId,connectionName:d?.name||`${a.connectionId.slice(0,8)}…`,requests:a.requests,errors:a.errors,detailErrors:a.detailErrors,successRate:k,p50LatencyMs:function(a){if(!a.length)return null;let b=Math.min(a.length-1,Math.floor(.5*a.length));return a[b]}(a.latencies),lastError:l,lastErrorAt:m,cooldownUntil:f?e:null,status:b}});return j.sort((a,b)=>{let c={down:0,cooldown:1,degraded:2,healthy:3,idle:4};return c[a.status]!==c[b.status]?c[a.status]-c[b.status]:b.requests+b.detailErrors-(a.requests+a.detailErrors)}),f.sort((a,b)=>a.timestamp<b.timestamp?1:-1),{providers:j,recentFailures:f.slice(0,20)}}({historyRows:c.map(a=>({provider:a.provider,connectionId:a.connectionId,status:a.status,timestamp:a.timestamp})),detailRows:k,connections:m.map(a=>({id:a.id,provider:a.provider,name:a.name||a.email||null,rateLimitedUntil:a.rateLimitedUntil||null,testStatus:a.testStatus||null,lastError:a.lastError??null})),cutoffIso:b}),p=new Map;for(let a of l)a?.provider&&a?.connectionId&&a?.timestamp&&a?.model&&p.set(`${a.provider}|||${a.connectionId}|||${a.timestamp}`,a.model);let q=o.map(a=>({...a,model:p.get(`${a.provider}|||${a.connectionId}|||${a.timestamp}`)||""}));return d.NextResponse.json({generatedAt:new Date().toISOString(),window:"24h",providers:n,recentFailures:q})}catch(a){return console.error("[API] Failed to get usage health:",a),d.NextResponse.json({error:"Failed to fetch provider health"},{status:500})}}},73024:a=>{"use strict";a.exports=require("node:fs")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},97091:(a,b,c)=>{"use strict";c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(54569);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[1316,2426,7535],()=>b(b.s=48732));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=3038,a.ids=[3038],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},8474:()=>{},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},20098:(a,b,c)=>{"use strict";c.d(b,{BY:()=>d.BY,E5:()=>d.E5,SL:()=>d.SL,Zx:()=>d.Zx,_V:()=>d._V,j$:()=>d.j$,ox:()=>d.ox,rg:()=>d.rg,sZ:()=>d.sZ,uw:()=>d.uw});var d=c(47535)},21820:a=>{"use strict";a.exports=require("os")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},
|
|
1
|
+
(()=>{var a={};a.id=3038,a.ids=[3038],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},8474:()=>{},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},20098:(a,b,c)=>{"use strict";c.d(b,{BY:()=>d.BY,E5:()=>d.E5,SL:()=>d.SL,Zx:()=>d.Zx,_V:()=>d._V,j$:()=>d.j$,ox:()=>d.ox,rg:()=>d.rg,sZ:()=>d.sZ,uw:()=>d.uw});var d=c(47535)},21820:a=>{"use strict";a.exports=require("os")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},40824:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(75724),e=c(50417),f=c(92744),g=c(86234),h=c(22808),i=c(15712),j=c(261),k=c(45590),l=c(19324),m=c(78196),n=c(26439),o=c(9265),p=c(9955),q=c(86477),r=c(87498),s=c(86439),t=c(23464);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/usage/history/route",pathname:"/api/usage/history",filename:"route",bundlePath:"app/api/usage/history/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/10Router/10Router/src/app/api/usage/history/route.js",nextConfigOutput:"standalone",userland:()=>c(60890),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/usage/history/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},42754:()=>{},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{"use strict";a.exports=require("sql.js")},54569:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},55511:a=>{"use strict";a.exports=require("crypto")},60890:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>f});var d=c(94661),e=c(20098);async function f(){try{let a=await (0,e.BY)();return d.NextResponse.json(a)}catch(a){return console.error("Error fetching usage stats:",a),d.NextResponse.json({error:"Failed to fetch usage stats"},{status:500})}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{"use strict";a.exports=require("node:fs")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},97091:(a,b,c)=>{"use strict";c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(54569);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[1316,2426,7535],()=>b(b.s=40824));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=8207,a.ids=[8207],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},8474:()=>{},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},20098:(a,b,c)=>{"use strict";c.d(b,{BY:()=>d.BY,E5:()=>d.E5,SL:()=>d.SL,Zx:()=>d.Zx,_V:()=>d._V,j$:()=>d.j$,ox:()=>d.ox,rg:()=>d.rg,sZ:()=>d.sZ,uw:()=>d.uw});var d=c(47535)},21820:a=>{"use strict";a.exports=require("os")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},
|
|
1
|
+
(()=>{var a={};a.id=8207,a.ids=[8207],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},8474:()=>{},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},20098:(a,b,c)=>{"use strict";c.d(b,{BY:()=>d.BY,E5:()=>d.E5,SL:()=>d.SL,Zx:()=>d.Zx,_V:()=>d._V,j$:()=>d.j$,ox:()=>d.ox,rg:()=>d.rg,sZ:()=>d.sZ,uw:()=>d.uw});var d=c(47535)},21820:a=>{"use strict";a.exports=require("os")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},42660:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(75724),e=c(50417),f=c(92744),g=c(86234),h=c(22808),i=c(15712),j=c(261),k=c(45590),l=c(19324),m=c(78196),n=c(26439),o=c(9265),p=c(9955),q=c(86477),r=c(87498),s=c(86439),t=c(23464);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/usage/logs/route",pathname:"/api/usage/logs",filename:"route",bundlePath:"app/api/usage/logs/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/10Router/10Router/src/app/api/usage/logs/route.js",nextConfigOutput:"standalone",userland:()=>c(48843),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/usage/logs/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},42754:()=>{},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{"use strict";a.exports=require("sql.js")},48843:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>f});var d=c(94661),e=c(20098);async function f(){try{let a=await (0,e.Zx)(200);return d.NextResponse.json(a)}catch(a){return console.error("Error fetching logs:",a),d.NextResponse.json({error:"Failed to fetch logs"},{status:500})}}},54569:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{"use strict";a.exports=require("node:fs")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},97091:(a,b,c)=>{"use strict";c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(54569);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[1316,2426,7535],()=>b(b.s=42660));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=1088,a.ids=[1088,9287],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},2398:(a,b,c)=>{"use strict";c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(47535)},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},8474:()=>{},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19287:(a,b,c)=>{"use strict";c.d(b,{AI_PROVIDERS:()=>s,js:()=>w,DI:()=>n,fg:()=>k,Pd:()=>o,IS:()=>h,nJ:()=>i,zN:()=>j,JH:()=>m,jO:()=>y,wb:()=>x,br:()=>l,wG:()=>v,zt:()=>t,gb:()=>q,gC:()=>r,mq:()=>p,rs:()=>u});var d=c(27816);let e="⚠️ Risk Notice: This provider uses a subscription/OAuth session not officially licensed for proxy/router use. Account may be restricted or banned. Use at your own risk.";Object.fromEntries(d.default.filter(a=>a.display).map(a=>{let b;return[a.id,"RISK_NOTICE"===(b=a.display).deprecationNotice?{...b,deprecationNotice:e}:b]}));let f=["serviceKinds","ttsConfig","sttConfig","embeddingConfig","imageConfig","imageToTextConfig","videoConfig","musicConfig","searchViaChat","searchConfig","fetchConfig","credentialFallback","systemoneConfig","modelsFetcher","mediaPriority","hiddenKinds"],g=a=>Object.fromEntries(d.default.filter(b=>b.category===a).map(a=>[a.id,function(a){let b={};for(let c of(a.media&&Object.assign(b,a.media),f))void 0!==a[c]&&(b[c]=a[c]);let c={...a.display||{}};return"RISK_NOTICE"===c.deprecationNotice&&(c.deprecationNotice=e),{...c,id:a.id,alias:a.uiAlias||a.alias,...a.hidden?{hidden:!0}:{},...b,...void 0!==a.priority?{priority:a.priority}:{},...a.hasFree?{hasFree:!0}:{},...a.thinkingConfig?{thinkingConfig:a.thinkingConfig}:{},...a.regions?{regions:a.regions,defaultRegion:a.defaultRegion}:{},...a.hasProviderSpecificData?{hasProviderSpecificData:!0}:{},...a.noAuth?{noAuth:!0}:{},...a.passthroughModels?{passthroughModels:!0}:{},...a.hasOAuth?{hasOAuth:!0}:{},...a.authModes?{authModes:a.authModes}:{},...a.authType?{authType:a.authType}:{},...a.authHint?{authHint:a.authHint}:{}}}(a)])),h=g("free"),i=g("freeTier"),j=g("oauth"),k=g("apikey"),l=g("webCookie"),m="openai-compatible-",n="anthropic-compatible-",o="custom-embedding-";function p(a){return"string"==typeof a&&a.startsWith(m)}function q(a){return"string"==typeof a&&a.startsWith(n)}function r(a){return"string"==typeof a&&a.startsWith(o)}let s={...h,...i,...j,...k,...l};function t(a){for(let b of Object.values(s))if(b.alias===a||b.id===a)return b;return null}function u(a){let b=t(a);return b?.id||a}function v(a){let b=s[a];return b?.alias||a}let w=Object.values(s).reduce((a,b)=>(a[b.alias]=b.id,a),{});Object.values(s).reduce((a,b)=>(a[b.id]=b.alias,a),{});let x=d.default.filter(a=>a.features?.usage).map(a=>a.id),y=d.default.filter(a=>a.features?.usageApikey).map(a=>a.id)},21820:a=>{"use strict";a.exports=require("os")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},42754:()=>{},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{"use strict";a.exports=require("sql.js")},54569:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},71396:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>h});var d=c(94661),e=c(47535),f=c(2398),g=c(19287);async function h(){try{let a=await (0,e.Lk)(),b=await (0,f.Fh)(),c={};for(let a of b)c[a.id]=a.name;let h=a.map(a=>{let b=a;if(c[a])b=c[a];else{let c=(0,g.zt)(a)||g.AI_PROVIDERS[a];c?.name&&(b=c.name)}return{id:a,name:b}});return d.NextResponse.json({providers:h})}catch(a){return console.error("[API] Failed to get providers:",a),d.NextResponse.json({error:"Failed to fetch providers"},{status:500})}}},73024:a=>{"use strict";a.exports=require("node:fs")},74993:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(75724),e=c(50417),f=c(92744),g=c(86234),h=c(22808),i=c(15712),j=c(261),k=c(45590),l=c(19324),m=c(78196),n=c(26439),o=c(9265),p=c(9955),q=c(86477),r=c(87498),s=c(86439),t=c(23464);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/usage/providers/route",pathname:"/api/usage/providers",filename:"route",bundlePath:"app/api/usage/providers/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/10Router/10Router/src/app/api/usage/providers/route.js",nextConfigOutput:"standalone",userland:()=>c(71396),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/usage/providers/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},97091:(a,b,c)=>{"use strict";c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(54569);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[1316,2426,7535,7816],()=>b(b.s=74993));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=1088,a.ids=[1088,9287],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},2398:(a,b,c)=>{"use strict";c.d(b,{CG:()=>d.CG,Dj:()=>d.Dj,Fh:()=>d.Fh,Iq:()=>d.Iq,K1:()=>d.K1,KJ:()=>d.KJ,L:()=>d.L,Lh:()=>d.Lh,Mc:()=>d.Mc,OM:()=>d.OM,PX:()=>d.PX,Pc:()=>d.Pc,Q_:()=>d.Q_,Qu:()=>d.Qu,S8:()=>d.S8,Uv:()=>d.Uv,VT:()=>d.VT,XW:()=>d.XW,Xx:()=>d.Xx,Yd:()=>d.Yd,ZO:()=>d.ZO,bI:()=>d.bI,ek:()=>d.ek,fK:()=>d.fK,fv:()=>d.fv,getProviderConnections:()=>d.P,ho:()=>d.ho,hr:()=>d.hr,i0:()=>d.i0,iE:()=>d.iE,jd:()=>d.jd,mt:()=>d.mt,o5:()=>d.o5,oG:()=>d.oG,op:()=>d.op,r4:()=>d.r4,uL:()=>d.uL,ui:()=>d.ui,updateProviderConnection:()=>d.rj,uv:()=>d.uv,yF:()=>d.yF,yg:()=>d.yg,zP:()=>d.zP});var d=c(47535)},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},8474:()=>{},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19287:(a,b,c)=>{"use strict";c.d(b,{AI_PROVIDERS:()=>s,js:()=>w,DI:()=>n,fg:()=>k,Pd:()=>o,IS:()=>h,nJ:()=>i,zN:()=>j,JH:()=>m,jO:()=>y,wb:()=>x,br:()=>l,wG:()=>v,zt:()=>t,gb:()=>q,gC:()=>r,mq:()=>p,rs:()=>u});var d=c(27816);let e="⚠️ Risk Notice: This provider uses a subscription/OAuth session not officially licensed for proxy/router use. Account may be restricted or banned. Use at your own risk.";Object.fromEntries(d.default.filter(a=>a.display).map(a=>{let b;return[a.id,"RISK_NOTICE"===(b=a.display).deprecationNotice?{...b,deprecationNotice:e}:b]}));let f=["serviceKinds","ttsConfig","sttConfig","embeddingConfig","imageConfig","imageToTextConfig","videoConfig","musicConfig","searchViaChat","searchConfig","fetchConfig","credentialFallback","systemoneConfig","modelsFetcher","mediaPriority","hiddenKinds"],g=a=>Object.fromEntries(d.default.filter(b=>b.category===a).map(a=>[a.id,function(a){let b={};for(let c of(a.media&&Object.assign(b,a.media),f))void 0!==a[c]&&(b[c]=a[c]);let c={...a.display||{}};return"RISK_NOTICE"===c.deprecationNotice&&(c.deprecationNotice=e),{...c,id:a.id,alias:a.uiAlias||a.alias,...a.hidden?{hidden:!0}:{},...b,...void 0!==a.priority?{priority:a.priority}:{},...a.hasFree?{hasFree:!0}:{},...a.thinkingConfig?{thinkingConfig:a.thinkingConfig}:{},...a.regions?{regions:a.regions,defaultRegion:a.defaultRegion}:{},...a.hasProviderSpecificData?{hasProviderSpecificData:!0}:{},...a.noAuth?{noAuth:!0}:{},...a.passthroughModels?{passthroughModels:!0}:{},...a.hasOAuth?{hasOAuth:!0}:{},...a.authModes?{authModes:a.authModes}:{},...a.authType?{authType:a.authType}:{},...a.authHint?{authHint:a.authHint}:{}}}(a)])),h=g("free"),i=g("freeTier"),j=g("oauth"),k=g("apikey"),l=g("webCookie"),m="openai-compatible-",n="anthropic-compatible-",o="custom-embedding-";function p(a){return"string"==typeof a&&a.startsWith(m)}function q(a){return"string"==typeof a&&a.startsWith(n)}function r(a){return"string"==typeof a&&a.startsWith(o)}let s={...h,...i,...j,...k,...l};function t(a){for(let b of Object.values(s))if(b.alias===a||b.id===a)return b;return null}function u(a){let b=t(a);return b?.id||a}function v(a){let b=s[a];return b?.alias||a}let w=Object.values(s).reduce((a,b)=>(a[b.alias]=b.id,a),{});Object.values(s).reduce((a,b)=>(a[b.id]=b.alias,a),{});let x=d.default.filter(a=>a.features?.usage).map(a=>a.id),y=d.default.filter(a=>a.features?.usageApikey).map(a=>a.id)},21820:a=>{"use strict";a.exports=require("os")},22756:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(75724),e=c(50417),f=c(92744),g=c(86234),h=c(22808),i=c(15712),j=c(261),k=c(45590),l=c(19324),m=c(78196),n=c(26439),o=c(9265),p=c(9955),q=c(86477),r=c(87498),s=c(86439),t=c(23464);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/usage/providers/route",pathname:"/api/usage/providers",filename:"route",bundlePath:"app/api/usage/providers/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/10Router/10Router/src/app/api/usage/providers/route.js",nextConfigOutput:"standalone",userland:()=>c(71396),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/usage/providers/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},42754:()=>{},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{"use strict";a.exports=require("sql.js")},54569:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},71396:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>h});var d=c(94661),e=c(47535),f=c(2398),g=c(19287);async function h(){try{let a=await (0,e.Lk)(),b=await (0,f.Fh)(),c={};for(let a of b)c[a.id]=a.name;let h=a.map(a=>{let b=a;if(c[a])b=c[a];else{let c=(0,g.zt)(a)||g.AI_PROVIDERS[a];c?.name&&(b=c.name)}return{id:a,name:b}});return d.NextResponse.json({providers:h})}catch(a){return console.error("[API] Failed to get providers:",a),d.NextResponse.json({error:"Failed to fetch providers"},{status:500})}}},73024:a=>{"use strict";a.exports=require("node:fs")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},97091:(a,b,c)=>{"use strict";c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(54569);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[1316,2426,7535,7816],()=>b(b.s=22756));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=1200,a.ids=[1200],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},8474:()=>{},10657:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(75724),e=c(50417),f=c(92744),g=c(86234),h=c(22808),i=c(15712),j=c(261),k=c(45590),l=c(19324),m=c(78196),n=c(26439),o=c(9265),p=c(9955),q=c(86477),r=c(87498),s=c(86439),t=c(23464);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/usage/request-details/route",pathname:"/api/usage/request-details",filename:"route",bundlePath:"app/api/usage/request-details/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/10Router/10Router/src/app/api/usage/request-details/route.js",nextConfigOutput:"standalone",userland:()=>c(19724),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/usage/request-details/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19724:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>f});var d=c(94661),e=c(20098);async function f(a){try{let{searchParams:b}=new URL(a.url),c=parseInt(b.get("page")),f=Number.isNaN(c)?1:c,g=parseInt(b.get("pageSize")),h=Number.isNaN(g)?20:g,i=b.get("provider"),j=b.get("model"),k=b.get("connectionId"),l=b.get("status"),m=b.get("startDate"),n=b.get("endDate");if(f<1)return d.NextResponse.json({error:"Page must be >= 1"},{status:400});if(h<1||h>100)return d.NextResponse.json({error:"PageSize must be between 1 and 100"},{status:400});let o={page:f,pageSize:h};i&&(o.provider=i),j&&(o.model=j),k&&(o.connectionId=k),l&&(o.status=l),m&&(o.startDate=m),n&&(o.endDate=n);let p=await (0,e.SL)(o),q=(p.details||[]).map(a=>{let b={...a};for(let a of["request","providerRequest","providerResponse","response"])void 0!==b[a]&&(b[a]={redacted:!0});return b});return d.NextResponse.json({...p,details:q})}catch(a){return console.error("[API] Failed to get request details:",a),d.NextResponse.json({error:"Failed to fetch request details"},{status:500})}}},20098:(a,b,c)=>{"use strict";c.d(b,{BY:()=>d.BY,E5:()=>d.E5,SL:()=>d.SL,Zx:()=>d.Zx,_V:()=>d._V,j$:()=>d.j$,ox:()=>d.ox,rg:()=>d.rg,sZ:()=>d.sZ,uw:()=>d.uw});var d=c(47535)},21820:a=>{"use strict";a.exports=require("os")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},42754:()=>{},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{"use strict";a.exports=require("sql.js")},54569:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{"use strict";a.exports=require("node:fs")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},97091:(a,b,c)=>{"use strict";c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(54569);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[1316,2426,7535],()=>b(b.s=10657));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=1200,a.ids=[1200],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},8474:()=>{},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19724:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>f});var d=c(94661),e=c(20098);async function f(a){try{let{searchParams:b}=new URL(a.url),c=parseInt(b.get("page")),f=Number.isNaN(c)?1:c,g=parseInt(b.get("pageSize")),h=Number.isNaN(g)?20:g,i=b.get("provider"),j=b.get("model"),k=b.get("connectionId"),l=b.get("status"),m=b.get("startDate"),n=b.get("endDate");if(f<1)return d.NextResponse.json({error:"Page must be >= 1"},{status:400});if(h<1||h>100)return d.NextResponse.json({error:"PageSize must be between 1 and 100"},{status:400});let o={page:f,pageSize:h};i&&(o.provider=i),j&&(o.model=j),k&&(o.connectionId=k),l&&(o.status=l),m&&(o.startDate=m),n&&(o.endDate=n);let p=await (0,e.SL)(o),q=(p.details||[]).map(a=>{let b={...a};for(let a of["request","providerRequest","providerResponse","response"])void 0!==b[a]&&(b[a]={redacted:!0});return b});return d.NextResponse.json({...p,details:q})}catch(a){return console.error("[API] Failed to get request details:",a),d.NextResponse.json({error:"Failed to fetch request details"},{status:500})}}},20098:(a,b,c)=>{"use strict";c.d(b,{BY:()=>d.BY,E5:()=>d.E5,SL:()=>d.SL,Zx:()=>d.Zx,_V:()=>d._V,j$:()=>d.j$,ox:()=>d.ox,rg:()=>d.rg,sZ:()=>d.sZ,uw:()=>d.uw});var d=c(47535)},21820:a=>{"use strict";a.exports=require("os")},24404:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(75724),e=c(50417),f=c(92744),g=c(86234),h=c(22808),i=c(15712),j=c(261),k=c(45590),l=c(19324),m=c(78196),n=c(26439),o=c(9265),p=c(9955),q=c(86477),r=c(87498),s=c(86439),t=c(23464);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/usage/request-details/route",pathname:"/api/usage/request-details",filename:"route",bundlePath:"app/api/usage/request-details/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/10Router/10Router/src/app/api/usage/request-details/route.js",nextConfigOutput:"standalone",userland:()=>c(19724),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/usage/request-details/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},42754:()=>{},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{"use strict";a.exports=require("sql.js")},54569:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{"use strict";a.exports=require("node:fs")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},97091:(a,b,c)=>{"use strict";c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(54569);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[1316,2426,7535],()=>b(b.s=24404));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=9027,a.ids=[9027],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},8474:()=>{},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},20098:(a,b,c)=>{"use strict";c.d(b,{BY:()=>d.BY,E5:()=>d.E5,SL:()=>d.SL,Zx:()=>d.Zx,_V:()=>d._V,j$:()=>d.j$,ox:()=>d.ox,rg:()=>d.rg,sZ:()=>d.sZ,uw:()=>d.uw});var d=c(47535)},21820:a=>{"use strict";a.exports=require("os")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},42754:()=>{},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{"use strict";a.exports=require("sql.js")},
|
|
1
|
+
(()=>{var a={};a.id=9027,a.ids=[9027],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},8474:()=>{},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},20098:(a,b,c)=>{"use strict";c.d(b,{BY:()=>d.BY,E5:()=>d.E5,SL:()=>d.SL,Zx:()=>d.Zx,_V:()=>d._V,j$:()=>d.j$,ox:()=>d.ox,rg:()=>d.rg,sZ:()=>d.sZ,uw:()=>d.uw});var d=c(47535)},21820:a=>{"use strict";a.exports=require("os")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},42754:()=>{},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{"use strict";a.exports=require("sql.js")},53376:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(75724),e=c(50417),f=c(92744),g=c(86234),h=c(22808),i=c(15712),j=c(261),k=c(45590),l=c(19324),m=c(78196),n=c(26439),o=c(9265),p=c(9955),q=c(86477),r=c(87498),s=c(86439),t=c(23464);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/usage/request-logs/route",pathname:"/api/usage/request-logs",filename:"route",bundlePath:"app/api/usage/request-logs/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/10Router/10Router/src/app/api/usage/request-logs/route.js",nextConfigOutput:"standalone",userland:()=>c(87915),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/usage/request-logs/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},54569:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{"use strict";a.exports=require("node:fs")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87915:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>f});var d=c(94661),e=c(20098);async function f(){try{let a=await (0,e.Zx)(200);return d.NextResponse.json(a)}catch(a){return console.error("[API ERROR] /api/usage/logs failed:",a),console.error("[API ERROR] Stack:",a?.stack),d.NextResponse.json({error:"Failed to fetch logs"},{status:500})}}},94735:a=>{"use strict";a.exports=require("events")},97091:(a,b,c)=>{"use strict";c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(54569);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[1316,2426,7535],()=>b(b.s=53376));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=9199,a.ids=[9199],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},8474:()=>{},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19197:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>h,dynamic:()=>g});var d=c(94661),e=c(20098);let f=new Set(["today","24h","7d","30d","60d","all"]),g="force-dynamic";async function h(a){try{let{searchParams:b}=new URL(a.url),c=b.get("period")||"7d";if(!f.has(c))return d.NextResponse.json({error:"Invalid period"},{status:400});let g=await (0,e.BY)(c);return d.NextResponse.json(g)}catch(a){return console.error("[API] Failed to get usage stats:",a),d.NextResponse.json({error:"Failed to fetch usage stats"},{status:500})}}},20098:(a,b,c)=>{"use strict";c.d(b,{BY:()=>d.BY,E5:()=>d.E5,SL:()=>d.SL,Zx:()=>d.Zx,_V:()=>d._V,j$:()=>d.j$,ox:()=>d.ox,rg:()=>d.rg,sZ:()=>d.sZ,uw:()=>d.uw});var d=c(47535)},21820:a=>{"use strict";a.exports=require("os")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},42754:()=>{},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{"use strict";a.exports=require("sql.js")},54569:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{"use strict";a.exports=require("node:fs")},
|
|
1
|
+
(()=>{var a={};a.id=9199,a.ids=[9199],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},8474:()=>{},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19121:a=>{"use strict";a.exports=require("next/dist/server/app-render/action-async-storage.external.js")},19197:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>h,dynamic:()=>g});var d=c(94661),e=c(20098);let f=new Set(["today","24h","7d","30d","60d","all"]),g="force-dynamic";async function h(a){try{let{searchParams:b}=new URL(a.url),c=b.get("period")||"7d";if(!f.has(c))return d.NextResponse.json({error:"Invalid period"},{status:400});let g=await (0,e.BY)(c);return d.NextResponse.json(g)}catch(a){return console.error("[API] Failed to get usage stats:",a),d.NextResponse.json({error:"Failed to fetch usage stats"},{status:500})}}},20098:(a,b,c)=>{"use strict";c.d(b,{BY:()=>d.BY,E5:()=>d.E5,SL:()=>d.SL,Zx:()=>d.Zx,_V:()=>d._V,j$:()=>d.j$,ox:()=>d.ox,rg:()=>d.rg,sZ:()=>d.sZ,uw:()=>d.uw});var d=c(47535)},21820:a=>{"use strict";a.exports=require("os")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},42754:()=>{},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{"use strict";a.exports=require("sql.js")},54569:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73024:a=>{"use strict";a.exports=require("node:fs")},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},97091:(a,b,c)=>{"use strict";c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(54569);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}},98010:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(75724),e=c(50417),f=c(92744),g=c(86234),h=c(22808),i=c(15712),j=c(261),k=c(45590),l=c(19324),m=c(78196),n=c(26439),o=c(9265),p=c(9955),q=c(86477),r=c(87498),s=c(86439),t=c(23464);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/usage/stats/route",pathname:"/api/usage/stats",filename:"route",bundlePath:"app/api/usage/stats/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/10Router/10Router/src/app/api/usage/stats/route.js",nextConfigOutput:"standalone",userland:()=>c(19197),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/usage/stats/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[1316,2426,7535],()=>b(b.s=98010));module.exports=c})();
|
|
@@ -1,3 +1,3 @@
|
|
|
1
|
-
(()=>{var a={};a.id=1382,a.ids=[1382],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},
|
|
1
|
+
(()=>{var a={};a.id=1382,a.ids=[1382],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},6146:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(75724),e=c(50417),f=c(92744),g=c(86234),h=c(22808),i=c(15712),j=c(261),k=c(45590),l=c(19324),m=c(78196),n=c(26439),o=c(9265),p=c(9955),q=c(86477),r=c(87498),s=c(86439),t=c(23464);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/usage/stream/route",pathname:"/api/usage/stream",filename:"route",bundlePath:"app/api/usage/stream/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/10Router/10Router/src/app/api/usage/stream/route.js",nextConfigOutput:"standalone",userland:()=>c(71180),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/usage/stream/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},8128:a=>{"use strict";a.exports=require("next/dist/server/runtime-reacts.external.js")},8474:()=>{},9265:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(41513),e=c(82548),f=c(9955);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},20098:(a,b,c)=>{"use strict";c.d(b,{BY:()=>d.BY,E5:()=>d.E5,SL:()=>d.SL,Zx:()=>d.Zx,_V:()=>d._V,j$:()=>d.j$,ox:()=>d.ox,rg:()=>d.rg,sZ:()=>d.sZ,uw:()=>d.uw});var d=c(47535)},21820:a=>{"use strict";a.exports=require("os")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},42754:()=>{},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{"use strict";a.exports=require("sql.js")},54569:(a,b,c)=>{"use strict";c.d(b,{k:()=>e});let d=[];for(let a=0;a<256;++a)d.push((a+256).toString(16).slice(1));function e(a,b=0){return(d[a[b+0]]+d[a[b+1]]+d[a[b+2]]+d[a[b+3]]+"-"+d[a[b+4]]+d[a[b+5]]+"-"+d[a[b+6]]+d[a[b+7]]+"-"+d[a[b+8]]+d[a[b+9]]+"-"+d[a[b+10]]+d[a[b+11]]+d[a[b+12]]+d[a[b+13]]+d[a[b+14]]+d[a[b+15]]).toLowerCase()}},55511:a=>{"use strict";a.exports=require("crypto")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},71180:(a,b,c)=>{"use strict";c.r(b),c.d(b,{GET:()=>i,dynamic:()=>e});var d=c(20098);let e="force-dynamic",f=null,g=null;async function h(){return(f||await (!g&&(g=Promise.resolve().then(()=>(0,d.BY)("all")).then(a=>(f=a,a)).catch(()=>f).finally(()=>{g=null})),g),f)?(0,d.rg)():null}async function i(){let a=new TextEncoder,b=!1,c=null,e=null,f=c=>{if(!b)try{e.enqueue(a.encode(c))}catch{i()}},g=async()=>{if(b)return;let a=await h();a&&!b&&f(`data: ${JSON.stringify(a)}
|
|
2
2
|
|
|
3
|
-
`)},i=()=>{b||(b=!0,d._V.off("update",g),d._V.off("pending",g),clearInterval(c))};return new Response(new ReadableStream({async start(a){e=a,await g(),b||(d._V.on("update",g),d._V.on("pending",g),c=setInterval(()=>f(": ping\n\n"),25e3))},cancel(){i()}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}},73024:a=>{"use strict";a.exports=require("node:fs")},75724:(a,b,c)=>{"use strict";a.exports=c(44870)},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},97091:(a,b,c)=>{"use strict";c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(54569);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[1316,7535],()=>b(b.s=
|
|
3
|
+
`)},i=()=>{b||(b=!0,d._V.off("update",g),d._V.off("pending",g),clearInterval(c))};return new Response(new ReadableStream({async start(a){e=a,await g(),b||(d._V.on("update",g),d._V.on("pending",g),c=setInterval(()=>f(": ping\n\n"),25e3))},cancel(){i()}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}},73024:a=>{"use strict";a.exports=require("node:fs")},75724:(a,b,c)=>{"use strict";a.exports=c(44870)},76760:a=>{"use strict";a.exports=require("node:path")},77598:a=>{"use strict";a.exports=require("node:crypto")},79868:a=>{"use strict";a.exports=require("node:sqlite")},81787:a=>{"use strict";a.exports=require("bun:sqlite")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},94735:a=>{"use strict";a.exports=require("events")},97091:(a,b,c)=>{"use strict";c.d(b,{A:()=>i});var d=c(77598);let e={randomUUID:d.randomUUID},f=new Uint8Array(256),g=f.length;var h=c(54569);let i=function(a,b,c){if(e.randomUUID&&!b&&!a)return e.randomUUID();var i=a,j=c;let k=(i=i||{}).random??i.rng?.()??(g>f.length-16&&((0,d.randomFillSync)(f),g=0),f.slice(g,g+=16));if(k.length<16)throw Error("Random bytes length must be >= 16");if(k[6]=15&k[6]|64,k[8]=63&k[8]|128,b){if((j=j||0)<0||j+16>b.length)throw RangeError(`UUID byte range ${j}:${j+15} is out of buffer bounds`);for(let a=0;a<16;++a)b[j+a]=k[a];return b}return(0,h.k)(k)}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[1316,7535],()=>b(b.s=6146));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
"use strict";(()=>{var a={};a.id=3025,a.ids=[3025],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},643:a=>{a.exports=require("node:perf_hooks")},1708:a=>{a.exports=require("node:process")},4573:a=>{a.exports=require("node:buffer")},7066:a=>{a.exports=require("node:tty")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11759:(a,b,c)=>{c.d(b,{o:()=>d});function d(a,b){let c="",d={},e=new TransformStream({transform(a,e){let f=new TextDecoder().decode(a),g=(c+=f).split("\n");for(let a of(c=g.pop()||"",g)){if(!a.startsWith("data:"))continue;let c=a.slice(5).trim();if("[DONE]"===c){let a=JSON.stringify({model:b,message:{role:"assistant",content:""},done:!0})+"\n";e.enqueue(new TextEncoder().encode(a));return}try{let a=JSON.parse(c),f=a.choices?.[0]?.delta||{},g=f.content||"",h=f.tool_calls;if(h)for(let a of h){let b=a.index;d[b]||(d[b]={id:a.id,function:{name:"",arguments:""}}),a.function?.name&&(d[b].function.name+=a.function.name),a.function?.arguments&&(d[b].function.arguments+=a.function.arguments)}if(g){let a=JSON.stringify({model:b,message:{role:"assistant",content:g},done:!1})+"\n";e.enqueue(new TextEncoder().encode(a))}let i=a.choices?.[0]?.finish_reason;if("tool_calls"===i||"stop"===i){let a=Object.values(d);if(a.length>0){let c=a.map(a=>({function:{name:a.function.name,arguments:(()=>{try{return JSON.parse(a.function.arguments||"{}")}catch{return{}}})()}})),f=JSON.stringify({model:b,message:{role:"assistant",content:"",tool_calls:c},done:!0})+"\n";e.enqueue(new TextEncoder().encode(f)),d={}}else if("stop"===i){let a=JSON.stringify({model:b,message:{role:"assistant",content:""},done:!0})+"\n";e.enqueue(new TextEncoder().encode(a))}}}catch(a){}}},flush(a){let c=JSON.stringify({model:b,message:{role:"assistant",content:""},done:!0})+"\n";a.enqueue(new TextEncoder().encode(c))}});return a.body?new Response(a.body.pipeThrough(e),{headers:{"Content-Type":"application/x-ndjson","Access-Control-Allow-Origin":"*"}}):new Response("",{status:a.status,headers:{"Content-Type":"application/x-ndjson"}})}},13971:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{OPTIONS:()=>j,POST:()=>k});var e=c(12905),f=c(9546),g=c(11759),h=a([e]);e=(h.then?(await h)():h)[0];let l=!1;async function i(){l||(await (0,f.Ai)(),l=!0)}async function j(){return new Response(null,{headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, POST, OPTIONS","Access-Control-Allow-Headers":"*"}})}async function k(a){await i();let b=a.clone(),c="llama3.2";try{c=(await b.json()).model||"llama3.2"}catch{}let d=await (0,e.P)(a);return(0,g.o)(d,c)}d()}catch(a){d(a)}})},16698:a=>{a.exports=require("node:async_hooks")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},32467:a=>{a.exports=require("node:http2")},33873:a=>{a.exports=require("path")},34589:a=>{a.exports=require("node:assert")},37067:a=>{a.exports=require("node:http")},37540:a=>{a.exports=require("node:console")},38522:a=>{a.exports=require("node:zlib")},40610:a=>{a.exports=require("node:dns")},41692:a=>{a.exports=require("node:tls")},41792:a=>{a.exports=require("node:querystring")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{a.exports=require("sql.js")},48161:a=>{a.exports=require("node:os")},51455:a=>{a.exports=require("node:fs/promises")},53053:a=>{a.exports=require("node:diagnostics_channel")},53191:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(75724),e=c(50417),f=c(92744),g=c(86234),h=c(22808),i=c(15712),j=c(261),k=c(45590),l=c(19324),m=c(78196),n=c(26439),o=c(9265),p=c(9955),q=c(86477),r=c(87498),s=c(86439),t=c(23464);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/v1/api/chat/route",pathname:"/api/v1/api/chat",filename:"route",bundlePath:"app/api/v1/api/chat/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/10Router/10Router/src/app/api/v1/api/chat/route.js",nextConfigOutput:"standalone",userland:()=>c(13971),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/v1/api/chat/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},55511:a=>{a.exports=require("crypto")},57075:a=>{a.exports=require("node:stream")},57975:a=>{a.exports=require("node:util")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},71553:a=>{a.exports=require("node:dns/promises")},71622:a=>{a.exports=import("open")},73024:a=>{a.exports=require("node:fs")},73136:a=>{a.exports=require("node:url")},73429:a=>{a.exports=require("node:util/types")},73496:a=>{a.exports=require("http2")},74075:a=>{a.exports=require("zlib")},75919:a=>{a.exports=require("node:worker_threads")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77598:a=>{a.exports=require("node:crypto")},78474:a=>{a.exports=require("node:events")},79551:a=>{a.exports=require("url")},79646:a=>{a.exports=require("child_process")},79868:a=>{a.exports=require("node:sqlite")},81630:a=>{a.exports=require("http")},81787:a=>{a.exports=require("bun:sqlite")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87997:a=>{a.exports=require("node:timers")},94735:a=>{a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[1316,7459,7535,7816,7156,2143,7504,2151,8923,881,2076,2706,4364,537,9614,2282,6056,6343,2310,7019],()=>b(b.s=53191));module.exports=c})();
|
|
1
|
+
"use strict";(()=>{var a={};a.id=3025,a.ids=[3025],a.modules={261:a=>{a.exports=require("next/dist/shared/lib/router/utils/app-paths")},643:a=>{a.exports=require("node:perf_hooks")},1708:a=>{a.exports=require("node:process")},4573:a=>{a.exports=require("node:buffer")},7066:a=>{a.exports=require("node:tty")},8128:a=>{a.exports=require("next/dist/server/runtime-reacts.external.js")},10846:a=>{a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},11759:(a,b,c)=>{c.d(b,{o:()=>d});function d(a,b){let c="",d={},e=new TransformStream({transform(a,e){let f=new TextDecoder().decode(a),g=(c+=f).split("\n");for(let a of(c=g.pop()||"",g)){if(!a.startsWith("data:"))continue;let c=a.slice(5).trim();if("[DONE]"===c){let a=JSON.stringify({model:b,message:{role:"assistant",content:""},done:!0})+"\n";e.enqueue(new TextEncoder().encode(a));return}try{let a=JSON.parse(c),f=a.choices?.[0]?.delta||{},g=f.content||"",h=f.tool_calls;if(h)for(let a of h){let b=a.index;d[b]||(d[b]={id:a.id,function:{name:"",arguments:""}}),a.function?.name&&(d[b].function.name+=a.function.name),a.function?.arguments&&(d[b].function.arguments+=a.function.arguments)}if(g){let a=JSON.stringify({model:b,message:{role:"assistant",content:g},done:!1})+"\n";e.enqueue(new TextEncoder().encode(a))}let i=a.choices?.[0]?.finish_reason;if("tool_calls"===i||"stop"===i){let a=Object.values(d);if(a.length>0){let c=a.map(a=>({function:{name:a.function.name,arguments:(()=>{try{return JSON.parse(a.function.arguments||"{}")}catch{return{}}})()}})),f=JSON.stringify({model:b,message:{role:"assistant",content:"",tool_calls:c},done:!0})+"\n";e.enqueue(new TextEncoder().encode(f)),d={}}else if("stop"===i){let a=JSON.stringify({model:b,message:{role:"assistant",content:""},done:!0})+"\n";e.enqueue(new TextEncoder().encode(a))}}}catch(a){}}},flush(a){let c=JSON.stringify({model:b,message:{role:"assistant",content:""},done:!0})+"\n";a.enqueue(new TextEncoder().encode(c))}});return a.body?new Response(a.body.pipeThrough(e),{headers:{"Content-Type":"application/x-ndjson","Access-Control-Allow-Origin":"*"}}):new Response("",{status:a.status,headers:{"Content-Type":"application/x-ndjson"}})}},13971:(a,b,c)=>{c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{OPTIONS:()=>j,POST:()=>k});var e=c(12905),f=c(9546),g=c(11759),h=a([e]);e=(h.then?(await h)():h)[0];let l=!1;async function i(){l||(await (0,f.Ai)(),l=!0)}async function j(){return new Response(null,{headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"GET, POST, OPTIONS","Access-Control-Allow-Headers":"*"}})}async function k(a){await i();let b=a.clone(),c="llama3.2";try{c=(await b.json()).model||"llama3.2"}catch{}let d=await (0,e.P)(a);return(0,g.o)(d,c)}d()}catch(a){d(a)}})},16698:a=>{a.exports=require("node:async_hooks")},21820:a=>{a.exports=require("os")},27910:a=>{a.exports=require("stream")},29021:a=>{a.exports=require("fs")},29294:a=>{a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},32467:a=>{a.exports=require("node:http2")},33873:a=>{a.exports=require("path")},34589:a=>{a.exports=require("node:assert")},37067:a=>{a.exports=require("node:http")},37540:a=>{a.exports=require("node:console")},38522:a=>{a.exports=require("node:zlib")},40610:a=>{a.exports=require("node:dns")},41692:a=>{a.exports=require("node:tls")},41792:a=>{a.exports=require("node:querystring")},44870:a=>{a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},46293:a=>{a.exports=require("sql.js")},48161:a=>{a.exports=require("node:os")},51455:a=>{a.exports=require("node:fs/promises")},53053:a=>{a.exports=require("node:diagnostics_channel")},55511:a=>{a.exports=require("crypto")},57075:a=>{a.exports=require("node:stream")},57975:a=>{a.exports=require("node:util")},63033:a=>{a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},71553:a=>{a.exports=require("node:dns/promises")},71622:a=>{a.exports=import("open")},73024:a=>{a.exports=require("node:fs")},73136:a=>{a.exports=require("node:url")},73429:a=>{a.exports=require("node:util/types")},73496:a=>{a.exports=require("http2")},74075:a=>{a.exports=require("zlib")},75919:a=>{a.exports=require("node:worker_threads")},76760:a=>{a.exports=require("node:path")},77030:a=>{a.exports=require("node:net")},77546:(a,b,c)=>{c.r(b),c.d(b,{handler:()=>z,patchFetch:()=>y,routeModule:()=>u,serverHooks:()=>x,workAsyncStorage:()=>v,workUnitAsyncStorage:()=>w});var d=c(75724),e=c(50417),f=c(92744),g=c(86234),h=c(22808),i=c(15712),j=c(261),k=c(45590),l=c(19324),m=c(78196),n=c(26439),o=c(9265),p=c(9955),q=c(86477),r=c(87498),s=c(86439),t=c(23464);let u=new d.AppRouteRouteModule({definition:{kind:e.RouteKind.APP_ROUTE,page:"/api/v1/api/chat/route",pathname:"/api/v1/api/chat",filename:"route",bundlePath:"app/api/v1/api/chat/route"},distDir:".next",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/10Router/10Router/src/app/api/v1/api/chat/route.js",nextConfigOutput:"standalone",userland:()=>c(13971),...{}}),{workAsyncStorage:v,workUnitAsyncStorage:w,serverHooks:x}=u;function y(){return(0,f.patchFetch)({workAsyncStorage:v,workUnitAsyncStorage:w})}async function z(a,b,c){c.requestMeta&&(0,g.setRequestMeta)(a,c.requestMeta),u.isDev&&(0,g.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/v1/api/chat/route";"/index"===d&&(d="/");let f=await u.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!f)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:v,deploymentId:w,params:x,nextConfig:y,parsedUrl:z,isDraftMode:A,prerenderManifest:B,routerServerContext:C,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,resolvedPathname:F,clientReferenceManifest:G,serverActionsManifest:H}=f,I=(0,j.normalizeAppPath)(d),J=!!(B.dynamicRoutes[I]||B.routes[F]),K=async()=>((null==C?void 0:C.render404)?await C.render404(a,b,z,!1):b.end("This page could not be found"),null);if(J&&!A){let a=!!B.routes[F],b=B.dynamicRoutes[I];if(b&&!1===b.fallback&&!a){if(y.adapterPath)return await K();throw new s.NoFallbackError}}let L=null;!J||u.isDev||A||(L="/index"===(L=F)?"/":L);let M=!0===u.isDev||!J,N=J&&!M;H&&G&&(0,i.setManifestsSingleton)({page:d,clientReferenceManifest:G,serverActionsManifest:H});let O=a.method||"GET",P=(0,h.getTracer)(),Q=P.getActiveScopeSpan(),R=!!(null==C?void 0:C.isWrappedByNextServer),S=!!(0,g.getRequestMeta)(a,"minimalMode"),T=(0,g.getRequestMeta)(a,"incrementalCache")||await u.getIncrementalCache(a,y,B,S);null==T||T.resetRequestCache(),globalThis.__incrementalCache=T;let U={params:x,previewProps:B.preview,renderOpts:{experimental:{authInterrupts:!!y.experimental.authInterrupts,useCacheTimeout:y.experimental.useCacheTimeout},cacheComponents:!!y.cacheComponents,validationLevel:y.experimental.instantInsights.validationLevel,supportsDynamicResponse:M,incrementalCache:T,hmrRefreshHash:(0,g.getRequestMeta)(a,"hmrRefreshHash"),cacheLifeProfiles:y.cacheLife,staticPageGenerationTimeout:y.staticPageGenerationTimeout,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>u.onRequestError(a,b,d,e,C)},sharedContext:{buildId:v,deploymentId:w}},V=new k.NodeNextRequest(a),W=new k.NodeNextResponse(b),X=l.NextRequestAdapter.fromNodeNextRequest(V,(0,l.signalFromNodeResponse)(b)),Y=async({previousCacheEntry:e})=>{try{if(!S&&D&&E&&!e)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await u.handle(X,U);a.fetchMetrics=U.renderOpts.fetchMetrics;let f=U.renderOpts.pendingWaitUntil;f&&c.waitUntil&&(c.waitUntil(f),f=void 0);let g=U.renderOpts.collectedTags;if(!J)return await (0,o.I)(V,W,d,f),null;{let a=await d.blob(),b=(0,p.toNodeOutgoingHttpHeaders)(d.headers);g&&(b[r.NEXT_CACHE_TAGS_HEADER]=g),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==U.renderOpts.collectedRevalidate&&!(U.renderOpts.collectedRevalidate>=r.INFINITE_CACHE)&&U.renderOpts.collectedRevalidate,e=void 0===U.renderOpts.collectedExpire||U.renderOpts.collectedExpire>=r.INFINITE_CACHE?!1!==c&&c>0?y.expireTime:void 0:U.renderOpts.collectedExpire;return{value:{kind:t.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==e?void 0:e.isStale)&&await u.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),b}},Z=async(d,f)=>{try{var g,i;let d=await u.handleResponse({req:a,nextConfig:y,cacheKey:L,routeKind:e.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:B,isRoutePPREnabled:!1,isOnDemandRevalidate:D,revalidateOnlyGenerated:E,responseGenerator:Y,waitUntil:c.waitUntil,isMinimalMode:S});if(!J)return;if((null==d||null==(g=d.value)?void 0:g.kind)!==t.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(i=d.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});S||b.setHeader("x-nextjs-cache",D?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),A&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let f=(0,p.fromNodeOutgoingHttpHeaders)(d.value.headers);S&&J||f.delete(r.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||b.getHeader("Cache-Control")||f.get("Cache-Control")||f.set("Cache-Control",(0,q.getCacheControlHeader)(d.cacheControl)),await (0,o.I)(V,W,new Response(d.value.body,{headers:f,status:d.value.status||200}));return}catch(b){if(b instanceof s.NoFallbackError||await u.onRequestError(a,b,{routerKind:"App Router",routePath:I,routeType:"route",revalidateReason:(0,n.getRevalidateReason)({isStaticGeneration:N,isOnDemandRevalidate:D})},!1,C),J)throw b;await (0,o.I)(V,W,new Response(null,{status:500}));return}finally{(()=>{if(!d)return;let a=b.statusCode;d.setAttributes({"http.status_code":a,"next.rsc":!1}),a&&a>=500&&(d.setStatus({code:h.SpanStatusCode.ERROR}),d.setAttribute("error.type",a.toString()));let c=P.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==m.BaseServerSpan.handleRequest)return console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let e=c.get("next.route")||I,g=`${O} ${e}`;d.setAttributes({"next.route":e,"http.route":e,"next.span_name":g}),d.updateName(g),f&&f!==d&&(f.setAttribute("http.route",e),f.updateName(g))})()}};if(R&&Q)await Z(Q,void 0);else{let b=P.getActiveScopeSpan();await P.withPropagatedContext(a.headers,()=>P.trace(m.BaseServerSpan.handleRequest,{spanName:`${O} ${d}`,kind:h.SpanKind.SERVER,attributes:{"http.method":O,"http.target":a.url}},a=>Z(a,b)),void 0,!R)}}},77598:a=>{a.exports=require("node:crypto")},78474:a=>{a.exports=require("node:events")},79551:a=>{a.exports=require("url")},79646:a=>{a.exports=require("child_process")},79868:a=>{a.exports=require("node:sqlite")},81630:a=>{a.exports=require("http")},81787:a=>{a.exports=require("bun:sqlite")},86439:a=>{a.exports=require("next/dist/shared/lib/no-fallback-error.external")},87997:a=>{a.exports=require("node:timers")},94735:a=>{a.exports=require("events")}};var b=require("../../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[1316,7459,7535,7816,7156,2143,7504,2151,8923,881,2076,2706,4364,537,9614,2282,6056,6343,2310,7019],()=>b(b.s=77546));module.exports=c})();
|