@sifxprime/krouter 0.5.166 → 0.5.168
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/app/.next-cli-build/BUILD_ID +1 -1
- package/app/.next-cli-build/app-path-routes-manifest.json +15 -15
- package/app/.next-cli-build/build-manifest.json +5 -5
- package/app/.next-cli-build/prerender-manifest.json +29 -29
- package/app/.next-cli-build/react-loadable-manifest.json +2 -2
- package/app/.next-cli-build/required-server-files.json +16 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/basic-chat/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/[toolId]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/cli-tools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/combos/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/console-log/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/endpoint/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/environment/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/environment/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/[kind]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/combo/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/media-providers/web/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/mitm/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/presidio/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/presidio/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/profile/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page.js +2 -2
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/[id]/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/new/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/providers/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/proxy-pools/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/pxpipe/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/quota/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/skills/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/token-saver/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/translator/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page.js +1 -1
- package/app/.next-cli-build/server/app/(dashboard)/dashboard/usage/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page.js +1 -1
- package/app/.next-cli-build/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_global-error.html +1 -1
- package/app/.next-cli-build/server/app/_global-error.rsc +15 -11
- package/app/.next-cli-build/server/app/_global-error.segments/_full.segment.rsc +15 -11
- package/app/.next-cli-build/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +20 -16
- package/app/.next-cli-build/server/app/_global-error.segments/_tree.segment.rsc +3 -1
- package/app/.next-cli-build/server/app/_not-found/page.js +1 -1
- package/app/.next-cli-build/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/_not-found.html +1 -1
- package/app/.next-cli-build/server/app/_not-found.rsc +26 -16
- package/app/.next-cli-build/server/app/_not-found.segments/_full.segment.rsc +26 -16
- package/app/.next-cli-build/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +32 -22
- package/app/.next-cli-build/server/app/_not-found.segments/_tree.segment.rsc +3 -1
- package/app/.next-cli-build/server/app/api/auth/login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/logout/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/callback/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/oidc/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/reset-password/route.js +1 -1
- package/app/.next-cli-build/server/app/api/auth/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cache/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/all-statuses/route.js +6 -6
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/alias/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/antigravity-mitm/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/claude-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cline-settings/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/codex-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/copilot-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-registry/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-mcp-tools/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/cowork-settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/cli-tools/deepseek-tui-settings/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/droid-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/hermes-settings/route.js +4 -4
- package/app/.next-cli-build/server/app/api/cli-tools/jcode-settings/route.js +3 -3
- package/app/.next-cli-build/server/app/api/cli-tools/kilo-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/openclaw-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/cli-tools/opencode-settings/route.js +2 -2
- package/app/.next-cli-build/server/app/api/combos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/combos/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/extras/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/proxy/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/restart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/start/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/headroom/stop/route.js +1 -1
- package/app/.next-cli-build/server/app/api/health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/init/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/keys/route.js +1 -1
- package/app/.next-cli-build/server/app/api/locale/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/message/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mcp/[plugin]/sse/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/deepgram/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/elevenlabs/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/inworld/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/minimax/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/media-providers/tts/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/mitm/cert/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/alias/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/availability/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/custom/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/disabled/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/live/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/live-by-connection/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/preview/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/models/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/[provider]/[action]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/bulk-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/codex/import-token/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/cursor/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/gitlab/pat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/iflow/cookie/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/api-key/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/auto-import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/import/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-authorize/route.js +1 -1
- package/app/.next-cli-build/server/app/api/oauth/kiro/social-exchange/route.js +1 -1
- package/app/.next-cli-build/server/app/api/pricing/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/route.js +1 -1
- package/app/.next-cli-build/server/app/api/provider-nodes/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/models/route.js +2 -2
- package/app/.next-cli-build/server/app/api/providers/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/[id]/test-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/client/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/health/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/kilo/free-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/suggested-models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/test-batch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/validate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/zenith/log/route.js +1 -1
- package/app/.next-cli-build/server/app/api/providers/zenith/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/[id]/test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/cloudflare-deploy/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/deno-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/proxy-pools/route.js +1 -1
- package/app/.next-cli-build/server/app/api/proxy-pools/vercel-deploy/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/health/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/install/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/restart/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/start/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/stats/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/status/route.js +2 -2
- package/app/.next-cli-build/server/app/api/pxpipe/stop/route.js +2 -2
- package/app/.next-cli-build/server/app/api/settings/database/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/environment/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/presidio/route.js +3 -3
- package/app/.next-cli-build/server/app/api/settings/proxy-test/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/require-login/route.js +1 -1
- package/app/.next-cli-build/server/app/api/settings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tags/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/console-logs/stream/route.js +2 -2
- package/app/.next-cli-build/server/app/api/translator/load/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/save/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/send/route.js +1 -1
- package/app/.next-cli-build/server/app/api/translator/translate/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/status/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-check/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-disable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-enable/route.js +1 -1
- package/app/.next-cli-build/server/app/api/tunnel/tailscale-install/route.js +2 -2
- package/app/.next-cli-build/server/app/api/usage/[connectionId]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/chart/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/history/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/providers/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-details/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/request-logs/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stats/route.js +1 -1
- package/app/.next-cli-build/server/app/api/usage/stream/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/api/chat/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/speech/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/audio/transcriptions/route.js +2 -2
- package/app/.next-cli-build/server/app/api/v1/audio/voices/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/chat/completions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/embeddings/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/images/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/count_tokens/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/messages/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/[...model]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/info/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/compact/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/responses/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/search/route.js +2 -2
- package/app/.next-cli-build/server/app/api/v1/videos/[id]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/edits/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/extensions/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/videos/generations/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1/web/fetch/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/[...path]/route.js +1 -1
- package/app/.next-cli-build/server/app/api/v1beta/models/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/shutdown/route.js +1 -1
- package/app/.next-cli-build/server/app/api/version/update/route.js +1 -1
- package/app/.next-cli-build/server/app/callback/page.js +1 -1
- package/app/.next-cli-build/server/app/callback/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/callback.html +1 -1
- package/app/.next-cli-build/server/app/callback.rsc +29 -18
- package/app/.next-cli-build/server/app/callback.segments/_full.segment.rsc +29 -18
- package/app/.next-cli-build/server/app/callback.segments/_tree.segment.rsc +3 -1
- package/app/.next-cli-build/server/app/callback.segments/callback/__PAGE__.segment.rsc +37 -26
- package/app/.next-cli-build/server/app/dashboard/basic-chat.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/basic-chat.rsc +31 -18
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/!KGRhc2hib2FyZCk/dashboard/basic-chat/__PAGE__.segment.rsc +38 -26
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_full.segment.rsc +31 -18
- package/app/.next-cli-build/server/app/dashboard/basic-chat.segments/_tree.segment.rsc +5 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/cli-tools.rsc +34 -19
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/!KGRhc2hib2FyZCk/dashboard/cli-tools/__PAGE__.segment.rsc +40 -27
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_full.segment.rsc +34 -19
- package/app/.next-cli-build/server/app/dashboard/cli-tools.segments/_tree.segment.rsc +5 -1
- package/app/.next-cli-build/server/app/dashboard/combos.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/combos.rsc +35 -21
- package/app/.next-cli-build/server/app/dashboard/combos.segments/!KGRhc2hib2FyZCk/dashboard/combos/__PAGE__.segment.rsc +42 -30
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_full.segment.rsc +35 -21
- package/app/.next-cli-build/server/app/dashboard/combos.segments/_tree.segment.rsc +5 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/endpoint.rsc +33 -19
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/!KGRhc2hib2FyZCk/dashboard/endpoint/__PAGE__.segment.rsc +39 -27
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_full.segment.rsc +33 -19
- package/app/.next-cli-build/server/app/dashboard/endpoint.segments/_tree.segment.rsc +5 -1
- package/app/.next-cli-build/server/app/dashboard/environment.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/environment.rsc +34 -21
- package/app/.next-cli-build/server/app/dashboard/environment.segments/!KGRhc2hib2FyZCk/dashboard/environment/__PAGE__.segment.rsc +41 -30
- package/app/.next-cli-build/server/app/dashboard/environment.segments/_full.segment.rsc +34 -21
- package/app/.next-cli-build/server/app/dashboard/environment.segments/_tree.segment.rsc +5 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.rsc +36 -23
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/!KGRhc2hib2FyZCk/dashboard/media-providers/web/__PAGE__.segment.rsc +44 -32
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_full.segment.rsc +36 -23
- package/app/.next-cli-build/server/app/dashboard/media-providers/web.segments/_tree.segment.rsc +6 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/mitm.rsc +33 -18
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/!KGRhc2hib2FyZCk/dashboard/mitm/__PAGE__.segment.rsc +40 -26
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_full.segment.rsc +33 -18
- package/app/.next-cli-build/server/app/dashboard/mitm.segments/_tree.segment.rsc +5 -1
- package/app/.next-cli-build/server/app/dashboard/presidio.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/presidio.rsc +34 -21
- package/app/.next-cli-build/server/app/dashboard/presidio.segments/!KGRhc2hib2FyZCk/dashboard/presidio/__PAGE__.segment.rsc +41 -30
- package/app/.next-cli-build/server/app/dashboard/presidio.segments/_full.segment.rsc +34 -21
- package/app/.next-cli-build/server/app/dashboard/presidio.segments/_tree.segment.rsc +5 -1
- package/app/.next-cli-build/server/app/dashboard/profile.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/profile.rsc +34 -21
- package/app/.next-cli-build/server/app/dashboard/profile.segments/!KGRhc2hib2FyZCk/dashboard/profile/__PAGE__.segment.rsc +41 -30
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_full.segment.rsc +34 -21
- package/app/.next-cli-build/server/app/dashboard/profile.segments/_tree.segment.rsc +5 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers/new.rsc +35 -23
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/!KGRhc2hib2FyZCk/dashboard/providers/new/__PAGE__.segment.rsc +44 -32
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_full.segment.rsc +35 -23
- package/app/.next-cli-build/server/app/dashboard/providers/new.segments/_tree.segment.rsc +6 -1
- package/app/.next-cli-build/server/app/dashboard/providers.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/providers.rsc +34 -21
- package/app/.next-cli-build/server/app/dashboard/providers.segments/!KGRhc2hib2FyZCk/dashboard/providers/__PAGE__.segment.rsc +41 -30
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_full.segment.rsc +34 -21
- package/app/.next-cli-build/server/app/dashboard/providers.segments/_tree.segment.rsc +5 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.rsc +34 -21
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/!KGRhc2hib2FyZCk/dashboard/proxy-pools/__PAGE__.segment.rsc +41 -30
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_full.segment.rsc +34 -21
- package/app/.next-cli-build/server/app/dashboard/proxy-pools.segments/_tree.segment.rsc +5 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/pxpipe.rsc +31 -18
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/!KGRhc2hib2FyZCk/dashboard/pxpipe/__PAGE__.segment.rsc +38 -26
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_full.segment.rsc +31 -18
- package/app/.next-cli-build/server/app/dashboard/pxpipe.segments/_tree.segment.rsc +5 -1
- package/app/.next-cli-build/server/app/dashboard/quota.html +2 -2
- package/app/.next-cli-build/server/app/dashboard/quota.rsc +32 -19
- package/app/.next-cli-build/server/app/dashboard/quota.segments/!KGRhc2hib2FyZCk/dashboard/quota/__PAGE__.segment.rsc +39 -28
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_full.segment.rsc +32 -19
- package/app/.next-cli-build/server/app/dashboard/quota.segments/_tree.segment.rsc +5 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.rsc +31 -18
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_full.segment.rsc +31 -18
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/_tree.segment.rsc +5 -1
- package/app/.next-cli-build/server/app/dashboard/settings/pricing.segments/dashboard/settings/pricing/__PAGE__.segment.rsc +40 -27
- package/app/.next-cli-build/server/app/dashboard/skills.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/skills.rsc +34 -21
- package/app/.next-cli-build/server/app/dashboard/skills.segments/!KGRhc2hib2FyZCk/dashboard/skills/__PAGE__.segment.rsc +41 -30
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_full.segment.rsc +34 -21
- package/app/.next-cli-build/server/app/dashboard/skills.segments/_tree.segment.rsc +5 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/token-saver.rsc +31 -18
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/!KGRhc2hib2FyZCk/dashboard/token-saver/__PAGE__.segment.rsc +38 -26
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_full.segment.rsc +31 -18
- package/app/.next-cli-build/server/app/dashboard/token-saver.segments/_tree.segment.rsc +5 -1
- package/app/.next-cli-build/server/app/dashboard/translator.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/translator.rsc +34 -21
- package/app/.next-cli-build/server/app/dashboard/translator.segments/!KGRhc2hib2FyZCk/dashboard/translator/__PAGE__.segment.rsc +41 -30
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_full.segment.rsc +34 -21
- package/app/.next-cli-build/server/app/dashboard/translator.segments/_tree.segment.rsc +5 -1
- package/app/.next-cli-build/server/app/dashboard/usage.html +1 -1
- package/app/.next-cli-build/server/app/dashboard/usage.rsc +34 -21
- package/app/.next-cli-build/server/app/dashboard/usage.segments/!KGRhc2hib2FyZCk/dashboard/usage/__PAGE__.segment.rsc +41 -30
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_full.segment.rsc +34 -21
- package/app/.next-cli-build/server/app/dashboard/usage.segments/_tree.segment.rsc +5 -1
- package/app/.next-cli-build/server/app/dashboard.html +1 -1
- package/app/.next-cli-build/server/app/dashboard.rsc +32 -19
- package/app/.next-cli-build/server/app/dashboard.segments/!KGRhc2hib2FyZCk/dashboard/__PAGE__.segment.rsc +38 -25
- package/app/.next-cli-build/server/app/dashboard.segments/_full.segment.rsc +32 -19
- package/app/.next-cli-build/server/app/dashboard.segments/_tree.segment.rsc +4 -1
- package/app/.next-cli-build/server/app/favicon.ico/route.js +1 -1
- package/app/.next-cli-build/server/app/index.html +1 -1
- package/app/.next-cli-build/server/app/index.rsc +24 -15
- package/app/.next-cli-build/server/app/index.segments/__PAGE__.segment.rsc +29 -20
- package/app/.next-cli-build/server/app/index.segments/_full.segment.rsc +24 -15
- package/app/.next-cli-build/server/app/index.segments/_tree.segment.rsc +2 -1
- package/app/.next-cli-build/server/app/landing/page.js +1 -1
- package/app/.next-cli-build/server/app/landing/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/landing.html +1 -1
- package/app/.next-cli-build/server/app/landing.rsc +30 -18
- package/app/.next-cli-build/server/app/landing.segments/_full.segment.rsc +30 -18
- package/app/.next-cli-build/server/app/landing.segments/_tree.segment.rsc +3 -1
- package/app/.next-cli-build/server/app/landing.segments/landing/__PAGE__.segment.rsc +38 -26
- package/app/.next-cli-build/server/app/login/page.js +1 -1
- package/app/.next-cli-build/server/app/login/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app/login.html +1 -1
- package/app/.next-cli-build/server/app/login.rsc +29 -18
- package/app/.next-cli-build/server/app/login.segments/_full.segment.rsc +29 -18
- package/app/.next-cli-build/server/app/login.segments/_tree.segment.rsc +3 -1
- package/app/.next-cli-build/server/app/login.segments/login/__PAGE__.segment.rsc +37 -26
- package/app/.next-cli-build/server/app/manifest.webmanifest/route.js +2 -2
- package/app/.next-cli-build/server/app/page.js +1 -1
- package/app/.next-cli-build/server/app/page_client-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/app-paths-manifest.json +15 -15
- package/app/.next-cli-build/server/chunks/1220.js +3 -3
- package/app/.next-cli-build/server/chunks/1344.js +2 -2
- package/app/.next-cli-build/server/chunks/1350.js +1 -1
- package/app/.next-cli-build/server/chunks/1450.js +1 -1
- package/app/.next-cli-build/server/chunks/1738.js +1 -1
- package/app/.next-cli-build/server/chunks/1813.js +23 -1
- package/app/.next-cli-build/server/chunks/2430.js +215 -31
- package/app/.next-cli-build/server/chunks/2722.js +6 -6
- package/app/.next-cli-build/server/chunks/2750.js +1 -1
- package/app/.next-cli-build/server/chunks/2970.js +163 -23
- package/app/.next-cli-build/server/chunks/3120.js +2 -2
- package/app/.next-cli-build/server/chunks/369.js +5 -5
- package/app/.next-cli-build/server/chunks/412.js +1 -1
- package/app/.next-cli-build/server/chunks/4161.js +1 -1
- package/app/.next-cli-build/server/chunks/4177.js +1 -1
- package/app/.next-cli-build/server/chunks/4306.js +1 -1
- package/app/.next-cli-build/server/chunks/4315.js +1 -1
- package/app/.next-cli-build/server/chunks/4380.js +1 -1
- package/app/.next-cli-build/server/chunks/4730.js +2 -2
- package/app/.next-cli-build/server/chunks/4884.js +4 -4
- package/app/.next-cli-build/server/chunks/523.js +1 -1
- package/app/.next-cli-build/server/chunks/5330.js +4 -4
- package/app/.next-cli-build/server/chunks/5433.js +1 -1
- package/app/.next-cli-build/server/chunks/5470.js +3 -3
- package/app/.next-cli-build/server/chunks/5573.js +1 -1
- package/app/.next-cli-build/server/chunks/5718.js +1 -1
- package/app/.next-cli-build/server/chunks/595.js +1 -1
- package/app/.next-cli-build/server/chunks/6182.js +2 -2
- package/app/.next-cli-build/server/chunks/7153.js +1 -1
- package/app/.next-cli-build/server/chunks/7774.js +13 -13
- package/app/.next-cli-build/server/chunks/7833.js +1 -1
- package/app/.next-cli-build/server/chunks/8238.js +1 -1
- package/app/.next-cli-build/server/chunks/8895.js +1 -1
- package/app/.next-cli-build/server/chunks/8962.js +1 -1
- package/app/.next-cli-build/server/chunks/9055.js +2 -2
- package/app/.next-cli-build/server/chunks/9958.js +1 -1
- package/app/.next-cli-build/server/middleware-build-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware-react-loadable-manifest.js +1 -1
- package/app/.next-cli-build/server/middleware.js +186 -24
- package/app/.next-cli-build/server/pages/404.html +1 -1
- package/app/.next-cli-build/server/pages/500.html +1 -1
- package/app/.next-cli-build/server/preview-props.json +5 -0
- package/app/.next-cli-build/server/server-reference-manifest.js +1 -1
- package/app/.next-cli-build/server/server-reference-manifest.json +1 -1
- package/app/.next-cli-build/static/chunks/1321-91a272a5139df5f2.js +1 -0
- package/app/.next-cli-build/static/chunks/3794-39f2d5bb0d40336b.js +52 -0
- package/app/.next-cli-build/static/chunks/4bd1b696-8cd12253b448cc13.js +1 -0
- package/app/.next-cli-build/static/chunks/5353-0085e26d68aca1f0.js +1 -0
- package/app/.next-cli-build/static/chunks/{5497-1af4fbf829c885c4.js → 5497-ff8c2e5da835ea40.js} +1 -1
- package/app/.next-cli-build/static/chunks/5772-9e7c7f235304c527.js +3 -0
- package/app/.next-cli-build/static/chunks/6069-31c2febe26d36d92.js +73 -0
- package/app/.next-cli-build/static/chunks/{6357.aa5754cdb37976a7.js → 6357.5f2532e76bf2cc51.js} +1 -1
- package/app/.next-cli-build/static/chunks/7504-5249aa88b6205df1.js +64 -0
- package/app/.next-cli-build/static/chunks/8202.69dace5daa86686d.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-8a99890727166f8a.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-ce0c6b650a822e25.js +1 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-589743e8ea1d9673.js +11 -0
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-eacf2780757238ff.js +1 -0
- package/app/.next-cli-build/static/chunks/main-00cd8c01f6f6e461.js +5 -0
- package/app/.next-cli-build/static/chunks/{webpack-53609978799ebbca.js → webpack-cc312041cf710f25.js} +1 -1
- package/app/cli/package.json +1 -1
- package/app/node_modules/@next/env/package.json +1 -1
- package/app/node_modules/nanoid/package.json +3 -3
- package/app/node_modules/next/dist/build/analysis/get-page-static-info.js +58 -76
- package/app/node_modules/next/dist/build/babel/loader/get-config.js +7 -16
- package/app/node_modules/next/dist/build/babel/plugins/next-font-unsupported.js +1 -5
- package/app/node_modules/next/dist/build/babel/plugins/next-page-config.js +5 -25
- package/app/node_modules/next/dist/build/babel/plugins/next-page-disallow-re-export-all-exports.js +1 -5
- package/app/node_modules/next/dist/build/babel/plugins/next-ssg-transform.js +4 -20
- package/app/node_modules/next/dist/build/browser-variant-modules.js +1 -0
- package/app/node_modules/next/dist/build/create-compiler-aliases.js +19 -11
- package/app/node_modules/next/dist/build/define-env.js +12 -18
- package/app/node_modules/next/dist/build/entries.js +132 -8
- package/app/node_modules/next/dist/build/get-babel-loader-config.js +10 -10
- package/app/node_modules/next/dist/build/get-convention-file-base-name.js +29 -0
- package/app/node_modules/next/dist/build/get-static-info-including-layouts.js +0 -1
- package/app/node_modules/next/dist/build/handle-externals.js +1 -5
- package/app/node_modules/next/dist/build/load-jsconfig.js +1 -5
- package/app/node_modules/next/dist/build/lockfile.js +1 -5
- package/app/node_modules/next/dist/build/next-config-ts/transpile-config.js +1 -5
- package/app/node_modules/next/dist/build/nft.js +119 -0
- package/app/node_modules/next/dist/build/normalize-catchall-routes.js +18 -66
- package/app/node_modules/next/dist/build/print-build-errors.js +57 -7
- package/app/node_modules/next/dist/build/route-discovery.js +32 -4
- package/app/node_modules/next/dist/build/segment-config/app/app-segment-config.js +19 -5
- package/app/node_modules/next/dist/build/segment-config/app/app-segments.js +120 -29
- package/app/node_modules/next/dist/build/segment-config/app/collect-root-param-keys.js +1 -5
- package/app/node_modules/next/dist/build/static-paths/app/extract-pathname-route-param-segments-from-loader-tree.js +8 -2
- package/app/node_modules/next/dist/build/static-paths/app.js +230 -133
- package/app/node_modules/next/dist/build/static-paths/pages.js +8 -40
- package/app/node_modules/next/dist/build/static-paths/param-matching.js +200 -0
- package/app/node_modules/next/dist/build/swc/index.js +92 -162
- package/app/node_modules/next/dist/build/utils.js +180 -90
- package/app/node_modules/next/dist/build/webpack/cache-invalidation.js +1 -5
- package/app/node_modules/next/dist/build/webpack/config/blocks/css/plugins.js +7 -35
- package/app/node_modules/next/dist/build/webpack/loaders/css-loader/src/CssSyntaxError.js +0 -5
- package/app/node_modules/next/dist/build/webpack/loaders/css-loader/src/camelcase.js +1 -5
- package/app/node_modules/next/dist/build/webpack/loaders/css-loader/src/index.js +5 -25
- package/app/node_modules/next/dist/build/webpack/loaders/css-loader/src/plugins/postcss-import-parser.js +4 -20
- package/app/node_modules/next/dist/build/webpack/loaders/lightningcss-loader/src/index.js +3 -16
- package/app/node_modules/next/dist/build/webpack/loaders/lightningcss-loader/src/interface.js +0 -1
- package/app/node_modules/next/dist/build/webpack/loaders/lightningcss-loader/src/loader.js +2 -10
- package/app/node_modules/next/dist/build/webpack/loaders/next-flight-css-loader.js +1 -5
- package/app/node_modules/next/dist/build/webpack/loaders/next-flight-loader/index.js +3 -15
- package/app/node_modules/next/dist/build/webpack/loaders/next-route-loader/index.js +3 -15
- package/app/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/Error.js +0 -5
- package/app/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/Warning.js +0 -5
- package/app/node_modules/next/dist/build/webpack/loaders/postcss-loader/src/index.js +2 -10
- package/app/node_modules/next/dist/build/webpack/loaders/resolve-url-loader/index.js +2 -6
- package/app/node_modules/next/dist/build/webpack/loaders/resolve-url-loader/lib/file-protocol.js +2 -10
- package/app/node_modules/next/dist/build/webpack/loaders/resolve-url-loader/lib/join-function.js +1 -5
- package/app/node_modules/next/dist/build/webpack/loaders/resolve-url-loader/lib/postcss.js +1 -5
- package/app/node_modules/next/dist/build/webpack/plugins/build-manifest-plugin.js +1 -5
- package/app/node_modules/next/dist/build/webpack/plugins/deferred-entries-plugin.js +9 -0
- package/app/node_modules/next/dist/build/webpack/plugins/flight-manifest-plugin.js +2 -6
- package/app/node_modules/next/dist/build/webpack/plugins/middleware-plugin.js +1 -5
- package/app/node_modules/next/dist/build/webpack/plugins/next-trace-entrypoints-plugin.js +2 -10
- package/app/node_modules/next/dist/build/webpack/plugins/next-types-plugin/index.js +3 -1
- package/app/node_modules/next/dist/build/webpack/plugins/slow-module-detection-plugin.js +3 -15
- package/app/node_modules/next/dist/build/webpack/plugins/subresource-integrity-plugin.js +1 -5
- package/app/node_modules/next/dist/build/webpack-config.js +16 -33
- package/app/node_modules/next/dist/cli/next-test.js +4 -0
- package/app/node_modules/next/dist/client/app-call-server.js +16 -18
- package/app/node_modules/next/dist/client/components/app-router-instance.js +43 -187
- package/app/node_modules/next/dist/client/components/{segment-cache/navigation.js → app-router-state.js} +88 -334
- package/app/node_modules/next/dist/client/components/app-router-utils.js +1 -5
- package/app/node_modules/next/dist/client/components/app-router.js +83 -74
- package/app/node_modules/next/dist/client/components/dev-root-http-access-fallback-boundary.js +1 -5
- package/app/node_modules/next/dist/client/components/forbidden.js +2 -10
- package/app/node_modules/next/dist/client/components/handle-isr-error.js +19 -4
- package/app/node_modules/next/dist/client/components/instant-samples.js +4 -11
- package/app/node_modules/next/dist/client/components/links.js +6 -7
- package/app/node_modules/next/dist/client/components/navigation-dynamic-rendering.js +3 -3
- package/app/node_modules/next/dist/client/components/navigation-untracked.js +1 -2
- package/app/node_modules/next/dist/client/components/navigation.js +2 -6
- package/app/node_modules/next/dist/client/components/navigation.react-server.js +1 -5
- package/app/node_modules/next/dist/client/components/navigator.js +73 -0
- package/app/node_modules/next/dist/client/components/not-found.js +1 -5
- package/app/node_modules/next/dist/client/components/prefetch.js +83 -0
- package/app/node_modules/next/dist/client/components/readonly-url-search-params.js +0 -5
- package/app/node_modules/next/dist/client/components/redirect.js +3 -15
- package/app/node_modules/next/dist/client/components/{router-reducer/ppr-navigations.js → render-tree.js} +365 -400
- package/app/node_modules/next/dist/client/components/router-reducer/compute-changed-path.js +13 -5
- package/app/node_modules/next/dist/client/components/router-reducer/create-initial-router-state.js +67 -54
- package/app/node_modules/next/dist/client/components/router-reducer/create-router-cache-key.js +1 -7
- package/app/node_modules/next/dist/client/components/router-reducer/create-segment-key.js +42 -0
- package/app/node_modules/next/dist/client/components/router-reducer/fetch-server-response.js +71 -50
- package/app/node_modules/next/dist/client/components/router-reducer/is-navigating-to-new-root-layout.js +4 -4
- package/app/node_modules/next/dist/client/components/router-reducer/reducers/hmr-refresh-reducer.js +2 -2
- package/app/node_modules/next/dist/client/components/router-reducer/reducers/navigate-reducer.js +5 -5
- package/app/node_modules/next/dist/client/components/router-reducer/reducers/refresh-reducer.js +11 -8
- package/app/node_modules/next/dist/client/components/router-reducer/reducers/restore-reducer.js +12 -9
- package/app/node_modules/next/dist/client/components/router-reducer/reducers/server-action-reducer.js +30 -29
- package/app/node_modules/next/dist/client/components/router-reducer/reducers/server-patch-reducer.js +5 -5
- package/app/node_modules/next/dist/client/components/router-reducer/router-reducer.js +2 -10
- package/app/node_modules/next/dist/client/components/segment-cache/bfcache.js +11 -21
- package/app/node_modules/next/dist/client/components/segment-cache/cache.js +1168 -1181
- package/app/node_modules/next/dist/client/components/segment-cache/decode-server-response.js +419 -0
- package/app/node_modules/next/dist/client/components/segment-cache/navigation-testing-lock.js +1 -1
- package/app/node_modules/next/dist/client/components/segment-cache/optimistic-routes.js +77 -82
- package/app/node_modules/next/dist/client/components/segment-cache/scheduler.js +464 -425
- package/app/node_modules/next/dist/client/components/segment-cache/types.js +12 -3
- package/app/node_modules/next/dist/client/components/segment-cache/vary-path.js +140 -126
- package/app/node_modules/next/dist/client/components/sequential-router-queue.js +163 -0
- package/app/node_modules/next/dist/client/components/unauthorized.js +2 -10
- package/app/node_modules/next/dist/client/components/unstable-rethrow.js +1 -2
- package/app/node_modules/next/dist/client/components/use-action-queue.js +2 -10
- package/app/node_modules/next/dist/client/dev/debug-channel.js +6 -323
- package/app/node_modules/next/dist/client/dev/hot-reloader/app/hot-reloader-app.js +49 -31
- package/app/node_modules/next/dist/client/dev/hot-reloader/app/web-socket.js +14 -21
- package/app/node_modules/next/dist/client/dev/hot-reloader/pages/hot-reloader-pages.js +15 -6
- package/app/node_modules/next/dist/client/dev/hot-reloader/runtime-error-state.js +72 -0
- package/app/node_modules/next/dist/client/flight-data-helpers.js +41 -94
- package/app/node_modules/next/dist/client/route-loader.js +6 -30
- package/app/node_modules/next/dist/client/route-params.js +34 -12
- package/app/node_modules/next/dist/client/router.js +2 -10
- package/app/node_modules/next/dist/client/sequential-call-server.js +45 -0
- package/app/node_modules/next/dist/compiled/@mswjs/interceptors/ClientRequest/index.js +1 -1
- package/app/node_modules/next/dist/compiled/next-devtools/index.js +279 -229
- package/app/node_modules/next/dist/compiled/next-server/app-page-experimental.runtime.prod.js +203 -59
- package/app/node_modules/next/dist/compiled/next-server/app-page-turbo-experimental.runtime.prod.js +203 -59
- package/app/node_modules/next/dist/compiled/next-server/app-page-turbo.runtime.prod.js +203 -59
- package/app/node_modules/next/dist/compiled/next-server/app-page.runtime.prod.js +203 -59
- package/app/node_modules/next/dist/compiled/next-server/app-route.runtime.prod.js +5 -3
- package/app/node_modules/next/dist/compiled/next-server/pages-turbo.runtime.prod.js +13 -13
- package/app/node_modules/next/dist/compiled/next-server/pages.runtime.prod.js +13 -13
- package/app/node_modules/next/dist/compiled/react-is/package.json +1 -1
- package/app/node_modules/next/dist/compiled/stacktrace-parser/stack-trace-parser.cjs.js +1 -1
- package/app/node_modules/next/dist/compiled/unistore/unistore.js +1 -1
- package/app/node_modules/next/dist/experimental/testmode/fetch.js +2 -10
- package/app/node_modules/next/dist/export/helpers/create-incremental-cache.js +21 -16
- package/app/node_modules/next/dist/export/utils.js +21 -8
- package/app/node_modules/next/dist/lib/batcher.js +2 -2
- package/app/node_modules/next/dist/lib/dist-dir.js +88 -0
- package/app/node_modules/next/dist/lib/download-swc.js +2 -10
- package/app/node_modules/next/dist/lib/fallback.js +3 -15
- package/app/node_modules/next/dist/lib/find-pages-dir.js +2 -10
- package/app/node_modules/next/dist/lib/helpers/get-cache-directory.js +1 -5
- package/app/node_modules/next/dist/lib/helpers/get-registry.js +1 -5
- package/app/node_modules/next/dist/lib/is-error.js +3 -15
- package/app/node_modules/next/dist/lib/is-serializable-props.js +6 -35
- package/app/node_modules/next/dist/lib/patch-incorrect-lockfile.js +4 -8
- package/app/node_modules/next/dist/lib/picocolors.js +10 -0
- package/app/node_modules/next/dist/lib/recursive-delete.js +50 -11
- package/app/node_modules/next/dist/lib/resolve-from.js +2 -10
- package/app/node_modules/next/dist/lib/static-env.js +1 -5
- package/app/node_modules/next/dist/lib/typescript/getTypeScriptConfiguration.js +3 -15
- package/app/node_modules/next/dist/lib/typescript/missingDependencyError.js +1 -5
- package/app/node_modules/next/dist/lib/typescript/runTypeCheck.js +1 -9
- package/app/node_modules/next/dist/lib/typescript/runTypeCheckCli.js +0 -1
- package/app/node_modules/next/dist/lib/typescript/runTypeScriptCli.js +4 -16
- package/app/node_modules/next/dist/lib/verify-partytown-setup.js +1 -5
- package/app/node_modules/next/dist/lib/warn-missing-react-dependencies.js +33 -0
- package/app/node_modules/next/dist/next-devtools/server/attach-nodejs-debugger-middleware.js +1 -5
- package/app/node_modules/next/dist/next-devtools/server/shared.js +3 -2
- package/app/node_modules/next/dist/next-devtools/shared/console-error.js +1 -5
- package/app/node_modules/next/dist/next-devtools/userspace/app/errors/replay-ssr-only-errors.js +1 -5
- package/app/node_modules/next/dist/next-devtools/userspace/app/errors/runtime-error-metadata.js +39 -0
- package/app/node_modules/next/dist/next-devtools/userspace/app/errors/stitched-error.js +1 -5
- package/app/node_modules/next/dist/next-devtools/userspace/app/errors/use-error-handler.js +48 -19
- package/app/node_modules/next/dist/next-devtools/userspace/app/segment-explorer-node.js +1 -5
- package/app/node_modules/next/dist/server/accept-header.js +3 -15
- package/app/node_modules/next/dist/server/after/after-context.js +5 -25
- package/app/node_modules/next/dist/server/after/awaiter.js +1 -5
- package/app/node_modules/next/dist/server/after/run-with-after.js +2 -2
- package/app/node_modules/next/dist/server/api-utils/index.js +1 -10
- package/app/node_modules/next/dist/server/api-utils/node/parse-body.js +3 -15
- package/app/node_modules/next/dist/server/app-render/action-async-storage-instance.js +1 -1
- package/app/node_modules/next/dist/server/app-render/action-handler.js +104 -141
- package/app/node_modules/next/dist/server/app-render/after-task-async-storage-instance.js +1 -1
- package/app/node_modules/next/dist/server/app-render/app-render-prerender-utils.js +6 -30
- package/app/node_modules/next/dist/server/app-render/app-render-render-utils.js +1 -5
- package/app/node_modules/next/dist/server/app-render/app-render-scheduling.js +3 -15
- package/app/node_modules/next/dist/server/app-render/app-render.js +1346 -1211
- package/app/node_modules/next/dist/server/app-render/async-local-storage.js +11 -6
- package/app/node_modules/next/dist/server/app-render/blocking-route-messages.js +119 -70
- package/app/node_modules/next/dist/server/app-render/cache-signal.js +61 -35
- package/app/node_modules/next/dist/server/app-render/console-async-storage-instance.js +1 -1
- package/app/node_modules/next/dist/server/app-render/create-component-tree.js +136 -160
- package/app/node_modules/next/dist/server/app-render/create-error-handler.js +12 -6
- package/app/node_modules/next/dist/server/app-render/create-transport-tree-from-loader-tree.js +190 -0
- package/app/node_modules/next/dist/server/app-render/debug-channel-server.web.js +1 -5
- package/app/node_modules/next/dist/server/app-render/dev-validation-scheduler.js +4 -5
- package/app/node_modules/next/dist/server/app-render/dev-validation-worker-snapshot.js +3 -1
- package/app/node_modules/next/dist/server/app-render/dynamic-access-async-storage-instance.js +1 -1
- package/app/node_modules/next/dist/server/app-render/dynamic-access-async-storage.external.js +26 -3
- package/app/node_modules/next/dist/server/app-render/dynamic-rendering-client.js +124 -0
- package/app/node_modules/next/dist/server/app-render/dynamic-rendering.js +260 -329
- package/app/node_modules/next/dist/server/app-render/encryption-utils.js +1 -5
- package/app/node_modules/next/dist/server/app-render/instant-validation/boundary-tracking.js +2 -2
- package/app/node_modules/next/dist/server/app-render/instant-validation/instant-config.js +4 -12
- package/app/node_modules/next/dist/server/app-render/instant-validation/instant-samples.js +13 -62
- package/app/node_modules/next/dist/server/app-render/instant-validation/stream-utils.js +2 -10
- package/app/node_modules/next/dist/server/app-render/manifests-singleton.js +110 -38
- package/app/node_modules/next/dist/server/app-render/module-loading/track-module-loading.instance.js +1 -1
- package/app/node_modules/next/dist/server/app-render/parse-and-validate-flight-router-state.js +3 -15
- package/app/node_modules/next/dist/server/app-render/postponed-state.js +87 -51
- package/app/node_modules/next/dist/server/app-render/prospective-render-utils.js +2 -6
- package/app/node_modules/next/dist/server/app-render/render-in-browser.js +27 -0
- package/app/node_modules/next/dist/server/app-render/required-scripts.js +1 -5
- package/app/node_modules/next/dist/server/app-render/segment-config/ensure-static.js +206 -0
- package/app/node_modules/next/dist/server/app-render/staged-rendering.js +46 -54
- package/app/node_modules/next/dist/server/app-render/stream-ops.node.js +18 -12
- package/app/node_modules/next/dist/server/app-render/stream-ops.web.js +4 -20
- package/app/node_modules/next/dist/server/app-render/sync-io-messages.js +2 -10
- package/app/node_modules/next/dist/server/app-render/types.js +2 -1
- package/app/node_modules/next/dist/server/app-render/use-flight-response.js +4 -17
- package/app/node_modules/next/dist/server/app-render/vary-params.js +12 -11
- package/app/node_modules/next/dist/server/app-render/walk-tree-with-flight-router-state.js +95 -97
- package/app/node_modules/next/dist/server/app-render/work-async-storage-instance.js +1 -1
- package/app/node_modules/next/dist/server/app-render/work-unit-async-storage-instance.js +1 -1
- package/app/node_modules/next/dist/server/app-render/work-unit-async-storage.external.js +36 -26
- package/app/node_modules/next/dist/server/async-storage/draft-mode-provider.js +1 -5
- package/app/node_modules/next/dist/server/async-storage/request-store.js +6 -5
- package/app/node_modules/next/dist/server/async-storage/work-store.js +24 -26
- package/app/node_modules/next/dist/server/base-http/node.js +1 -5
- package/app/node_modules/next/dist/server/base-server.js +346 -155
- package/app/node_modules/next/dist/server/client-component-renderer-logger.js +129 -28
- package/app/node_modules/next/dist/server/config-schema.js +61 -9
- package/app/node_modules/next/dist/server/config-shared.js +26 -4
- package/app/node_modules/next/dist/server/config.js +154 -332
- package/app/node_modules/next/dist/server/dev/debug-channel.js +1 -5
- package/app/node_modules/next/dist/server/dev/dev-validation-worker-pool.js +1 -0
- package/app/node_modules/next/dist/server/dev/get-source-map-from-file.js +5 -25
- package/app/node_modules/next/dist/server/dev/hot-middleware.js +27 -1
- package/app/node_modules/next/dist/server/dev/hot-reloader-turbopack.js +338 -200
- package/app/node_modules/next/dist/server/dev/hot-reloader-types.js +3 -0
- package/app/node_modules/next/dist/server/dev/hot-reloader-webpack.js +26 -20
- package/app/node_modules/next/dist/server/dev/messages.js +2 -10
- package/app/node_modules/next/dist/server/dev/middleware-turbopack.js +4 -20
- package/app/node_modules/next/dist/server/dev/middleware-webpack.js +2 -10
- package/app/node_modules/next/dist/server/dev/next-dev-server.js +33 -95
- package/app/node_modules/next/dist/server/dev/node-stack-frames.js +2 -19
- package/app/node_modules/next/dist/server/dev/on-demand-entry-handler.js +12 -12
- package/app/node_modules/next/dist/server/dev/runtime-error-state.js +220 -0
- package/app/node_modules/next/dist/server/dev/serialized-errors.js +1 -5
- package/app/node_modules/next/dist/server/dev/static-paths-worker.js +16 -15
- package/app/node_modules/next/dist/server/dev/turbopack-utils.js +20 -36
- package/app/node_modules/next/dist/server/dev/use-cache-probe-pool.js +1 -0
- package/app/node_modules/next/dist/server/dynamic-rendering-utils.js +298 -55
- package/app/node_modules/next/dist/server/image-optimizer/detect-content-type.js +229 -0
- package/app/node_modules/next/dist/server/image-optimizer/extract-etag.js +53 -0
- package/app/node_modules/next/dist/server/image-optimizer/get-image-size.js +25 -0
- package/app/node_modules/next/dist/server/image-optimizer/get-max-age.js +41 -0
- package/app/node_modules/next/dist/server/image-optimizer/get-previously-cached-image-or-null.js +22 -0
- package/app/node_modules/next/dist/server/image-optimizer/image-error.js +23 -0
- package/app/node_modules/next/dist/server/image-optimizer/image-type.js +86 -0
- package/app/node_modules/next/dist/server/image-optimizer/transform.js +227 -0
- package/app/node_modules/next/dist/server/image-optimizer.js +78 -674
- package/app/node_modules/next/dist/server/lib/app-info-log.js +19 -9
- package/app/node_modules/next/dist/server/lib/cache-handlers/default.js +9 -13
- package/app/node_modules/next/dist/server/lib/chrome-devtools-workspace.js +1 -5
- package/app/node_modules/next/dist/server/lib/dedupe-fetch.js +1 -5
- package/app/node_modules/next/dist/server/lib/dev-bundler-service.js +6 -6
- package/app/node_modules/next/dist/server/lib/generate-agent-files.js +158 -35
- package/app/node_modules/next/dist/server/lib/i18n-provider.js +1 -5
- package/app/node_modules/next/dist/server/lib/incremental-cache/file-system-cache.js +14 -20
- package/app/node_modules/next/dist/server/lib/incremental-cache/index.js +19 -29
- package/app/node_modules/next/dist/server/lib/incremental-cache/memory-cache.external.js +1 -5
- package/app/node_modules/next/dist/server/lib/lru-cache.js +1 -5
- package/app/node_modules/next/dist/server/lib/mock-request.js +24 -120
- package/app/node_modules/next/dist/server/lib/module-loader/node-module-loader.js +1 -5
- package/app/node_modules/next/dist/server/lib/patch-fetch.js +44 -38
- package/app/node_modules/next/dist/server/lib/postponed-request-body.js +1 -5
- package/app/node_modules/next/dist/server/lib/render-server.js +2 -10
- package/app/node_modules/next/dist/server/lib/router-server.js +106 -36
- package/app/node_modules/next/dist/server/lib/router-utils/build-data-route.js +26 -3
- package/app/node_modules/next/dist/server/lib/router-utils/cache-life-type-utils.js +14 -45
- package/app/node_modules/next/dist/server/lib/router-utils/decode-path-params.js +1 -5
- package/app/node_modules/next/dist/server/lib/router-utils/filesystem.js +212 -31
- package/app/node_modules/next/dist/server/lib/router-utils/instrumentation-globals.external.js +61 -1
- package/app/node_modules/next/dist/server/lib/router-utils/instrumentation-node-extensions.js +1 -5
- package/app/node_modules/next/dist/server/lib/router-utils/normalize-catchall-routes.js +320 -0
- package/app/node_modules/next/dist/server/lib/router-utils/proxy-request.js +2 -2
- package/app/node_modules/next/dist/server/lib/router-utils/resolve-routes.js +17 -11
- package/app/node_modules/next/dist/server/lib/router-utils/setup-dev-bundler.js +258 -76
- package/app/node_modules/next/dist/server/lib/router-utils/strict-route-matching-config.js +28 -0
- package/app/node_modules/next/dist/server/lib/router-utils/typegen.js +56 -10
- package/app/node_modules/next/dist/server/lib/start-server.js +48 -38
- package/app/node_modules/next/dist/server/lib/trace/constants.js +40 -0
- package/app/node_modules/next/dist/server/lib/trace/request-insights-identity.js +1 -3
- package/app/node_modules/next/dist/server/lib/trace/tracer.js +10 -10
- package/app/node_modules/next/dist/server/lib/utils.js +66 -15
- package/app/node_modules/next/dist/server/load-components.js +7 -2
- package/app/node_modules/next/dist/server/load-manifest.external.js +16 -17
- package/app/node_modules/next/dist/server/mcp/tools/utils/browser-communication.js +2 -10
- package/app/node_modules/next/dist/server/mcp/tools/utils/format-errors.js +5 -5
- package/app/node_modules/next/dist/server/next-server.js +130 -124
- package/app/node_modules/next/dist/server/next.js +25 -37
- package/app/node_modules/next/dist/server/node-environment-extensions/console-dim.external.js +1 -2
- package/app/node_modules/next/dist/server/node-environment-extensions/fast-set-immediate.external.js +115 -62
- package/app/node_modules/next/dist/server/node-environment-extensions/global-behaviors.js +1 -5
- package/app/node_modules/next/dist/server/node-environment-extensions/io-utils.js +11 -10
- package/app/node_modules/next/dist/server/node-environment-extensions/process-error-handlers.js +0 -9
- package/app/node_modules/next/dist/server/node-environment-extensions/unhandled-rejection.external.js +1 -12
- package/app/node_modules/next/dist/server/normalizers/built/app/app-page-normalizer.js +1 -1
- package/app/node_modules/next/dist/server/normalizers/request/base-path.js +1 -5
- package/app/node_modules/next/dist/server/normalizers/request/next-data.js +1 -5
- package/app/node_modules/next/dist/server/normalizers/request/prefix.js +1 -5
- package/app/node_modules/next/dist/server/patch-error-inspect.js +19 -11
- package/app/node_modules/next/dist/server/pipe-readable.js +42 -30
- package/app/node_modules/next/dist/server/render-result.js +5 -17
- package/app/node_modules/next/dist/server/render.js +37 -183
- package/app/node_modules/next/dist/server/request/fallback-params.js +23 -9
- package/app/node_modules/next/dist/server/response-cache/index.js +54 -32
- package/app/node_modules/next/dist/server/response-cache/utils.js +1 -5
- package/app/node_modules/next/dist/server/resume-data-cache/cache-store.js +18 -0
- package/app/node_modules/next/dist/server/resume-data-cache/resume-data-cache.js +51 -49
- package/app/node_modules/next/dist/server/revalidation-utils.js +15 -13
- package/app/node_modules/next/dist/server/route-modules/app-page/dev-render-context.js +23 -0
- package/app/node_modules/next/dist/server/route-modules/app-page/helpers/prerender-manifest-matcher.js +5 -4
- package/app/node_modules/next/dist/server/route-modules/app-page/module.js +13 -1
- package/app/node_modules/next/dist/server/route-modules/app-page/module.render.js +26 -11
- package/app/node_modules/next/dist/server/route-modules/app-page/parse-request-headers.js +58 -0
- package/app/node_modules/next/dist/server/route-modules/app-page/vendored/rsc/entrypoints.js +1 -5
- package/app/node_modules/next/dist/server/route-modules/app-page/vendored/ssr/entrypoints.js +1 -5
- package/app/node_modules/next/dist/server/route-modules/pages/module.render.js +1 -5
- package/app/node_modules/next/dist/server/route-modules/pages/pages-handler.js +20 -16
- package/app/node_modules/next/dist/server/route-modules/route-module.js +57 -61
- package/app/node_modules/next/dist/server/serve-static.js +1 -5
- package/app/node_modules/next/dist/server/setup-http-agent-env.js +1 -5
- package/app/node_modules/next/dist/server/stream-utils/encoded-tags.js +1 -1
- package/app/node_modules/next/dist/server/stream-utils/node-web-streams-helper.js +7 -11
- package/app/node_modules/next/dist/server/typescript/constant.js +2 -0
- package/app/node_modules/next/dist/server/typescript/rules/config.js +29 -2
- package/app/node_modules/next/dist/server/use-cache/cache-life-profile.js +6 -30
- package/app/node_modules/next/dist/server/use-cache/constants.js +1 -5
- package/app/node_modules/next/dist/server/use-cache/handlers.js +27 -36
- package/app/node_modules/next/dist/server/use-cache/tiered-cache-handler.js +6 -4
- package/app/node_modules/next/dist/server/web/adapter.js +14 -35
- package/app/node_modules/next/dist/server/web/error.js +0 -15
- package/app/node_modules/next/dist/server/web/globals.js +3 -15
- package/app/node_modules/next/dist/server/web/next-url.js +1 -5
- package/app/node_modules/next/dist/server/web/sandbox/context.js +10 -34
- package/app/node_modules/next/dist/server/web/sandbox/sandbox.js +1 -5
- package/app/node_modules/next/dist/server/web/spec-extension/adapters/headers.js +0 -5
- package/app/node_modules/next/dist/server/web/spec-extension/adapters/next-request.js +1 -5
- package/app/node_modules/next/dist/server/web/spec-extension/adapters/request-cookies.js +0 -5
- package/app/node_modules/next/dist/server/web/spec-extension/fetch-event.js +2 -10
- package/app/node_modules/next/dist/server/web/spec-extension/response.js +2 -10
- package/app/node_modules/next/dist/server/web/utils.js +1 -5
- package/app/node_modules/next/dist/server/web/web-on-close.js +2 -10
- package/app/node_modules/next/dist/shared/lib/app-router-types.js +38 -28
- package/app/node_modules/next/dist/shared/lib/constants.js +5 -0
- package/app/node_modules/next/dist/shared/lib/deployment-id.js +1 -1
- package/app/node_modules/next/dist/shared/lib/errors/code-frame.js +3 -2
- package/app/node_modules/next/dist/shared/lib/errors/empty-generate-static-params-error.js +1 -5
- package/app/node_modules/next/dist/shared/lib/errors/ensure-static-gsp-errors.js +30 -0
- package/app/node_modules/next/dist/shared/lib/errors/hard-deprecated-config-error.js +0 -5
- package/app/node_modules/next/dist/shared/lib/errors/incompatible-parallel-route-slots-error.js +36 -0
- package/app/node_modules/next/dist/shared/lib/errors/missing-canonical-interception-routes-error.js +20 -0
- package/app/node_modules/next/dist/shared/lib/errors/unmatched-app-pages-error.js +20 -0
- package/app/node_modules/next/dist/shared/lib/get-rspack.js +1 -5
- package/app/node_modules/next/dist/shared/lib/html-context.shared-runtime.js +1 -5
- package/app/node_modules/next/dist/shared/lib/image-config.js +52 -1
- package/app/node_modules/next/dist/shared/lib/instant-messages.js +2 -10
- package/app/node_modules/next/dist/shared/lib/invariant-error.js +0 -5
- package/app/node_modules/next/dist/shared/lib/lazy-dynamic/react-browser-bailout.js +45 -0
- package/app/node_modules/next/dist/shared/lib/magic-identifier.js +5 -25
- package/app/node_modules/next/dist/shared/lib/match-remote-pattern.js +1 -5
- package/app/node_modules/next/dist/shared/lib/router/router.js +95 -77
- package/app/node_modules/next/dist/shared/lib/router/routes/app.js +3 -15
- package/app/node_modules/next/dist/shared/lib/router/utils/app-paths.js +6 -1
- package/app/node_modules/next/dist/shared/lib/router/utils/get-dynamic-param.js +4 -12
- package/app/node_modules/next/dist/shared/lib/router/utils/interception-routes.js +63 -20
- package/app/node_modules/next/dist/shared/lib/router/utils/parse-relative-url.js +1 -5
- package/app/node_modules/next/dist/shared/lib/router/utils/prepare-destination.js +1 -5
- package/app/node_modules/next/dist/shared/lib/router/utils/querystring.js +31 -0
- package/app/node_modules/next/dist/shared/lib/router/utils/resolve-param-value.js +1 -5
- package/app/node_modules/next/dist/shared/lib/router/utils/route-matcher.js +1 -5
- package/app/node_modules/next/dist/shared/lib/router/utils/sorted-routes.js +11 -55
- package/app/node_modules/next/dist/shared/lib/rsc-transport.js +108 -0
- package/app/node_modules/next/dist/shared/lib/segment-cache/segment-value-encoding.js +0 -13
- package/app/node_modules/next/dist/shared/lib/segment-cache/vary-params-decoding.js +48 -27
- package/app/node_modules/next/dist/shared/lib/segment.js +1 -13
- package/app/node_modules/next/dist/shared/lib/turbopack/compilation-events.js +7 -7
- package/app/node_modules/next/dist/shared/lib/turbopack/internal-error.js +2 -7
- package/app/node_modules/next/dist/shared/lib/turbopack/manifest-loader.js +2 -6
- package/app/node_modules/next/dist/shared/lib/turbopack/utils.js +3 -11
- package/app/node_modules/next/dist/shared/lib/utils.js +2 -11
- package/app/node_modules/next/dist/shared/lib/zod.js +2 -6
- package/app/node_modules/next/dist/telemetry/anonymous-meta.js +1 -1
- package/app/node_modules/next/dist/telemetry/detached-flush.js +8 -15
- package/app/node_modules/next/dist/telemetry/events/build.js +1 -2
- package/app/node_modules/next/dist/telemetry/events/swc-load-failure.js +1 -1
- package/app/node_modules/next/dist/telemetry/events/version.js +2 -2
- package/app/node_modules/next/dist/telemetry/post-telemetry-payload.js +1 -5
- package/app/node_modules/next/dist/telemetry/storage.js +31 -19
- package/app/node_modules/next/dist/trace/report/index.js +5 -2
- package/app/node_modules/next/dist/trace/report/to-json-build.js +4 -2
- package/app/node_modules/next/dist/trace/report/to-json.js +141 -97
- package/app/node_modules/next/dist/trace/trace.js +14 -9
- package/app/node_modules/next/package.json +12 -11
- package/app/package.json +4 -4
- package/app/server.js +1 -1
- package/app/src/mitm/server.js +43 -39
- package/package.json +1 -1
- package/app/.next-cli-build/static/chunks/1321-c5b3011761e0228b.js +0 -1
- package/app/.next-cli-build/static/chunks/3794-83acfce05009cf38.js +0 -52
- package/app/.next-cli-build/static/chunks/4bd1b696-8a4ab4fdf0ae305a.js +0 -1
- package/app/.next-cli-build/static/chunks/5353-d31cc8d476bc534e.js +0 -1
- package/app/.next-cli-build/static/chunks/5772-6cf78180ecf9dce0.js +0 -3
- package/app/.next-cli-build/static/chunks/6069-7e7f824c6e2d4291.js +0 -73
- package/app/.next-cli-build/static/chunks/7504-6f7ca1eab428dd5e.js +0 -64
- package/app/.next-cli-build/static/chunks/8202.1ffc6ce531e066ce.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/basic-chat/page-90b9aed7279ea50e.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/cli-tools/page-eaf6e24edeca4e51.js +0 -1
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/providers/[id]/page-2f53d5dd5b247cf1.js +0 -11
- package/app/.next-cli-build/static/chunks/app/(dashboard)/dashboard/translator/page-bbc10fd10f7af626.js +0 -1
- package/app/.next-cli-build/static/chunks/main-1eaba0b776683ce7.js +0 -5
- package/app/node_modules/next/dist/build/webpack/loaders/lightningcss-loader/src/minify.js +0 -94
- package/app/node_modules/next/dist/client/components/match-segments.js +0 -32
- package/app/node_modules/next/dist/client/components/router-reducer/reducers/find-head-in-cache.js +0 -63
- package/app/node_modules/next/dist/client/components/segment-cache/prefetch.js +0 -32
- package/app/node_modules/next/dist/compiled/webpack-sources3/index.js +0 -1
- package/app/node_modules/next/dist/compiled/webpack-sources3/package.json +0 -1
- package/app/node_modules/next/dist/lib/detached-promise.js +0 -32
- package/app/node_modules/next/dist/lib/error-telemetry-utils.js +0 -42
- package/app/node_modules/next/dist/next-devtools/server/get-next-error-feedback-middleware.js +0 -42
- package/app/node_modules/next/dist/server/app-render/create-flight-router-state-from-loader-tree.js +0 -154
- package/app/node_modules/next/dist/server/lib/experimental/ppr.js +0 -47
- package/app/node_modules/next/dist/server/lib/params-utils.js +0 -70
- package/app/node_modules/next/dist/server/lib/router-utils/is-postpone.js +0 -16
- package/app/node_modules/next/dist/server/route-matcher-managers/default-route-matcher-manager.js +0 -239
- package/app/node_modules/next/dist/server/route-matcher-managers/dev-route-matcher-manager.js +0 -120
- package/app/node_modules/next/dist/server/route-matcher-providers/app-page-route-matcher-provider.js +0 -55
- package/app/node_modules/next/dist/server/route-matcher-providers/app-route-route-matcher-provider.js +0 -43
- package/app/node_modules/next/dist/server/route-matcher-providers/dev/dev-app-page-route-matcher-provider.js +0 -91
- package/app/node_modules/next/dist/server/route-matcher-providers/dev/dev-app-route-route-matcher-provider.js +0 -112
- package/app/node_modules/next/dist/server/route-matcher-providers/dev/dev-pages-api-route-matcher-provider.js +0 -77
- package/app/node_modules/next/dist/server/route-matcher-providers/dev/dev-pages-route-matcher-provider.js +0 -77
- package/app/node_modules/next/dist/server/route-matcher-providers/dev/file-cache-route-matcher-provider.js +0 -28
- package/app/node_modules/next/dist/server/route-matcher-providers/dev/helpers/file-reader/batched-file-reader.js +0 -106
- package/app/node_modules/next/dist/server/route-matcher-providers/dev/helpers/file-reader/default-file-reader.js +0 -42
- package/app/node_modules/next/dist/server/route-matcher-providers/helpers/cached-route-matcher-provider.js +0 -30
- package/app/node_modules/next/dist/server/route-matcher-providers/helpers/manifest-loaders/node-manifest-loader.js +0 -34
- package/app/node_modules/next/dist/server/route-matcher-providers/helpers/manifest-loaders/server-manifest-loader.js +0 -20
- package/app/node_modules/next/dist/server/route-matcher-providers/manifest-route-matcher-provider.js +0 -21
- package/app/node_modules/next/dist/server/route-matcher-providers/pages-api-route-matcher-provider.js +0 -55
- package/app/node_modules/next/dist/server/route-matcher-providers/pages-route-matcher-provider.js +0 -64
- package/app/node_modules/next/dist/server/route-matchers/app-page-route-matcher.js +0 -18
- package/app/node_modules/next/dist/server/route-matchers/app-route-route-matcher.js +0 -15
- package/app/node_modules/next/dist/server/route-matchers/locale-route-matcher.js +0 -68
- package/app/node_modules/next/dist/server/route-matchers/pages-api-route-matcher.js +0 -30
- package/app/node_modules/next/dist/server/route-matchers/pages-route-matcher.js +0 -30
- package/app/node_modules/next/dist/server/route-matchers/route-matcher.js +0 -54
- package/app/node_modules/next/dist/telemetry/events/error-feedback.js +0 -31
- /package/app/.next-cli-build/static/{i0cMBMqFdYWpbajovDyfY → em-yyr0O7qRIA9N8Clc4I}/_buildManifest.js +0 -0
- /package/app/.next-cli-build/static/{i0cMBMqFdYWpbajovDyfY → em-yyr0O7qRIA9N8Clc4I}/_ssgManifest.js +0 -0
|
@@ -6,18 +6,9 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
ImageError: null,
|
|
7
7
|
ImageOptimizerCache: null,
|
|
8
8
|
createPinnedLookup: null,
|
|
9
|
-
detectContentType: null,
|
|
10
|
-
extractEtag: null,
|
|
11
9
|
fetchExternalImage: null,
|
|
12
10
|
fetchInternalImage: null,
|
|
13
|
-
getHash: null,
|
|
14
|
-
getImageEtag: null,
|
|
15
|
-
getImageSize: null,
|
|
16
|
-
getMaxAge: null,
|
|
17
|
-
getPreviouslyCachedImageOrNull: null,
|
|
18
|
-
getSharp: null,
|
|
19
11
|
imageOptimizer: null,
|
|
20
|
-
optimizeImage: null,
|
|
21
12
|
sendResponse: null
|
|
22
13
|
});
|
|
23
14
|
function _export(target, all) {
|
|
@@ -28,7 +19,7 @@ function _export(target, all) {
|
|
|
28
19
|
}
|
|
29
20
|
_export(exports, {
|
|
30
21
|
ImageError: function() {
|
|
31
|
-
return ImageError;
|
|
22
|
+
return _imageerror.ImageError;
|
|
32
23
|
},
|
|
33
24
|
ImageOptimizerCache: function() {
|
|
34
25
|
return ImageOptimizerCache;
|
|
@@ -36,55 +27,24 @@ _export(exports, {
|
|
|
36
27
|
createPinnedLookup: function() {
|
|
37
28
|
return createPinnedLookup;
|
|
38
29
|
},
|
|
39
|
-
detectContentType: function() {
|
|
40
|
-
return detectContentType;
|
|
41
|
-
},
|
|
42
|
-
extractEtag: function() {
|
|
43
|
-
return extractEtag;
|
|
44
|
-
},
|
|
45
30
|
fetchExternalImage: function() {
|
|
46
31
|
return fetchExternalImage;
|
|
47
32
|
},
|
|
48
33
|
fetchInternalImage: function() {
|
|
49
34
|
return fetchInternalImage;
|
|
50
35
|
},
|
|
51
|
-
getHash: function() {
|
|
52
|
-
return getHash;
|
|
53
|
-
},
|
|
54
|
-
getImageEtag: function() {
|
|
55
|
-
return getImageEtag;
|
|
56
|
-
},
|
|
57
|
-
getImageSize: function() {
|
|
58
|
-
return getImageSize;
|
|
59
|
-
},
|
|
60
|
-
getMaxAge: function() {
|
|
61
|
-
return getMaxAge;
|
|
62
|
-
},
|
|
63
|
-
getPreviouslyCachedImageOrNull: function() {
|
|
64
|
-
return getPreviouslyCachedImageOrNull;
|
|
65
|
-
},
|
|
66
|
-
getSharp: function() {
|
|
67
|
-
return getSharp;
|
|
68
|
-
},
|
|
69
36
|
imageOptimizer: function() {
|
|
70
37
|
return imageOptimizer;
|
|
71
38
|
},
|
|
72
|
-
optimizeImage: function() {
|
|
73
|
-
return optimizeImage;
|
|
74
|
-
},
|
|
75
39
|
sendResponse: function() {
|
|
76
40
|
return sendResponse;
|
|
77
41
|
}
|
|
78
42
|
});
|
|
79
|
-
const _crypto = require("crypto");
|
|
80
43
|
const _fs = require("fs");
|
|
81
44
|
const _http = require("http");
|
|
82
45
|
const _https = require("https");
|
|
83
46
|
const _accept = require("next/dist/compiled/@hapi/accept");
|
|
84
47
|
const _contentdisposition = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/content-disposition"));
|
|
85
|
-
const _imagesize = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/image-size"));
|
|
86
|
-
const _detector = require("next/dist/compiled/image-detector/detector.js");
|
|
87
|
-
const _isanimated = /*#__PURE__*/ _interop_require_default(require("next/dist/compiled/is-animated"));
|
|
88
48
|
const _path = require("path");
|
|
89
49
|
const _imageblursvg = require("../shared/lib/image-blur-svg");
|
|
90
50
|
const _matchlocalpattern = require("../shared/lib/match-local-pattern");
|
|
@@ -94,7 +54,6 @@ const _responsecache = require("./response-cache");
|
|
|
94
54
|
const _sendpayload = require("./send-payload");
|
|
95
55
|
const _servestatic = require("./serve-static");
|
|
96
56
|
const _log = /*#__PURE__*/ _interop_require_wildcard(require("../build/output/log"));
|
|
97
|
-
const _iserror = /*#__PURE__*/ _interop_require_default(require("../lib/is-error"));
|
|
98
57
|
const _isprivateip = require("./is-private-ip");
|
|
99
58
|
const _disklrucacheexternal = require("./lib/disk-lru-cache.external");
|
|
100
59
|
const _url = require("../lib/url");
|
|
@@ -104,6 +63,11 @@ const _net = require("net");
|
|
|
104
63
|
const _dns = require("dns");
|
|
105
64
|
const _stream = require("stream");
|
|
106
65
|
const _zlib = require("zlib");
|
|
66
|
+
const _transform = require("./image-optimizer/transform");
|
|
67
|
+
const _extractetag = require("./image-optimizer/extract-etag");
|
|
68
|
+
const _getpreviouslycachedimageornull = require("./image-optimizer/get-previously-cached-image-or-null");
|
|
69
|
+
const _getimagesize = require("./image-optimizer/get-image-size");
|
|
70
|
+
const _imageerror = require("./image-optimizer/image-error");
|
|
107
71
|
function _interop_require_default(obj) {
|
|
108
72
|
return obj && obj.__esModule ? obj : {
|
|
109
73
|
default: obj
|
|
@@ -150,39 +114,11 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
150
114
|
}
|
|
151
115
|
return newObj;
|
|
152
116
|
}
|
|
153
|
-
const AVIF = 'image/avif';
|
|
154
|
-
const WEBP = 'image/webp';
|
|
155
|
-
const PNG = 'image/png';
|
|
156
|
-
const JPEG = 'image/jpeg';
|
|
157
|
-
const JXL = 'image/jxl';
|
|
158
|
-
const JP2 = 'image/jp2';
|
|
159
|
-
const HEIC = 'image/heic';
|
|
160
|
-
const GIF = 'image/gif';
|
|
161
|
-
const SVG = 'image/svg+xml';
|
|
162
|
-
const ICO = 'image/x-icon';
|
|
163
|
-
const ICNS = 'image/x-icns';
|
|
164
|
-
const TIFF = 'image/tiff';
|
|
165
|
-
const BMP = 'image/bmp';
|
|
166
|
-
const PDF = 'application/pdf';
|
|
167
117
|
const CACHE_VERSION = 4;
|
|
168
|
-
const ANIMATABLE_TYPES = [
|
|
169
|
-
WEBP,
|
|
170
|
-
PNG,
|
|
171
|
-
GIF
|
|
172
|
-
];
|
|
173
|
-
const BYPASS_TYPES = [
|
|
174
|
-
SVG,
|
|
175
|
-
ICO,
|
|
176
|
-
ICNS,
|
|
177
|
-
BMP,
|
|
178
|
-
JXL,
|
|
179
|
-
HEIC
|
|
180
|
-
];
|
|
181
118
|
const BLUR_IMG_SIZE = 8 // should match `next-image-loader`
|
|
182
119
|
;
|
|
183
120
|
const BLUR_QUALITY = 70 // should match `next-image-loader`
|
|
184
121
|
;
|
|
185
|
-
let _sharp;
|
|
186
122
|
async function initCacheEntries(cacheDir) {
|
|
187
123
|
const cacheKeys = await _fs.promises.readdir(cacheDir).catch(()=>[]);
|
|
188
124
|
const entries = [];
|
|
@@ -201,85 +137,13 @@ async function initCacheEntries(cacheDir) {
|
|
|
201
137
|
// Sort oldest-first so we can replay them chronologically into LRU
|
|
202
138
|
return entries.sort((a, b)=>a.expireAt - b.expireAt);
|
|
203
139
|
}
|
|
204
|
-
function getSharp(concurrency, operationCache) {
|
|
205
|
-
if (_sharp) {
|
|
206
|
-
return _sharp;
|
|
207
|
-
}
|
|
208
|
-
try {
|
|
209
|
-
_sharp = require('sharp');
|
|
210
|
-
_sharp.block({
|
|
211
|
-
operation: [
|
|
212
|
-
'VipsForeignLoad'
|
|
213
|
-
]
|
|
214
|
-
});
|
|
215
|
-
_sharp.unblock({
|
|
216
|
-
operation: [
|
|
217
|
-
'VipsForeignLoadHeif',
|
|
218
|
-
'VipsForeignLoadJpeg',
|
|
219
|
-
'VipsForeignLoadNsgif',
|
|
220
|
-
'VipsForeignLoadPng',
|
|
221
|
-
'VipsForeignLoadSvg',
|
|
222
|
-
'VipsForeignLoadTiff',
|
|
223
|
-
'VipsForeignLoadWebp'
|
|
224
|
-
]
|
|
225
|
-
});
|
|
226
|
-
if (typeof operationCache === 'boolean') {
|
|
227
|
-
_sharp.cache(operationCache);
|
|
228
|
-
}
|
|
229
|
-
if (_sharp.concurrency() > 1) {
|
|
230
|
-
// Reducing concurrency should reduce the memory usage too.
|
|
231
|
-
// We more aggressively reduce in dev but also reduce in prod.
|
|
232
|
-
// https://sharp.pixelplumbing.com/api-utility#concurrency
|
|
233
|
-
const divisor = process.env.NODE_ENV === 'development' ? 4 : 2;
|
|
234
|
-
_sharp.concurrency(concurrency ?? Math.floor(Math.max(_sharp.concurrency() / divisor, 1)));
|
|
235
|
-
}
|
|
236
|
-
} catch (e) {
|
|
237
|
-
if ((0, _iserror.default)(e) && e.code === 'MODULE_NOT_FOUND') {
|
|
238
|
-
throw Object.defineProperty(new Error('Module `sharp` not found. Please run `npm install --cpu=wasm32 sharp` to install it.'), "__NEXT_ERROR_CODE", {
|
|
239
|
-
value: "E47",
|
|
240
|
-
enumerable: false,
|
|
241
|
-
configurable: true
|
|
242
|
-
});
|
|
243
|
-
}
|
|
244
|
-
throw e;
|
|
245
|
-
}
|
|
246
|
-
return _sharp;
|
|
247
|
-
}
|
|
248
140
|
function getSupportedMimeType(options, accept = '') {
|
|
249
141
|
const mimeType = (0, _accept.mediaType)(accept, options);
|
|
250
142
|
return accept.includes(mimeType) ? mimeType : '';
|
|
251
143
|
}
|
|
252
|
-
function getHash(items) {
|
|
253
|
-
const hash = (0, _crypto.createHash)('sha256');
|
|
254
|
-
for (let item of items){
|
|
255
|
-
if (typeof item === 'number') hash.update(String(item));
|
|
256
|
-
else {
|
|
257
|
-
hash.update(item);
|
|
258
|
-
}
|
|
259
|
-
}
|
|
260
|
-
// See https://en.wikipedia.org/wiki/Base64#URL_applications
|
|
261
|
-
return hash.digest('base64url');
|
|
262
|
-
}
|
|
263
|
-
function extractEtag(etag, imageBuffer) {
|
|
264
|
-
if (etag) {
|
|
265
|
-
// upstream etag needs to be base64url encoded due to weak etag signature
|
|
266
|
-
// as we store this in the cache-entry file name.
|
|
267
|
-
return Buffer.from(etag).toString('base64url');
|
|
268
|
-
}
|
|
269
|
-
return getImageEtag(imageBuffer);
|
|
270
|
-
}
|
|
271
|
-
function getImageEtag(image) {
|
|
272
|
-
return getHash([
|
|
273
|
-
image
|
|
274
|
-
]);
|
|
275
|
-
}
|
|
276
144
|
async function writeToCacheDir(cacheDir, cacheKey, extension, maxAge, expireAt, buffer, etag, upstreamEtag) {
|
|
277
145
|
if (buffer.byteLength === 0) {
|
|
278
|
-
throw
|
|
279
|
-
value: "E1470",
|
|
280
|
-
enumerable: false,
|
|
281
|
-
configurable: true
|
|
282
|
-
});
|
|
146
|
+
throw new Error('Invariant: cannot write an empty buffer to the image cache');
|
|
283
147
|
}
|
|
284
148
|
const dir = (0, _path.join)(/* turbopackIgnore: true */ cacheDir, cacheKey);
|
|
285
149
|
const filename = (0, _path.join)(/* turbopackIgnore: true */ dir, `${maxAge}.${expireAt}.${etag}.${upstreamEtag}.${extension}`);
|
|
@@ -297,21 +161,13 @@ async function readFromCacheDir(cacheDir, cacheKey) {
|
|
|
297
161
|
const files = await _fs.promises.readdir(dir);
|
|
298
162
|
const file = files[0];
|
|
299
163
|
if (!file) {
|
|
300
|
-
throw
|
|
301
|
-
value: "E1069",
|
|
302
|
-
enumerable: false,
|
|
303
|
-
configurable: true
|
|
304
|
-
});
|
|
164
|
+
throw new Error(`Invariant: cache entry "${cacheKey}" not found in dir "${cacheDir}"`);
|
|
305
165
|
}
|
|
306
166
|
const [maxAgeSt, expireAtSt, etag, upstreamEtag, extension] = file.split('.', 5);
|
|
307
167
|
const filePath = (0, _path.join)(/* turbopackIgnore: true */ dir, file);
|
|
308
168
|
const buffer = await _fs.promises.readFile(/* turbopackIgnore: true */ filePath);
|
|
309
169
|
if (buffer.byteLength === 0) {
|
|
310
|
-
throw
|
|
311
|
-
value: "E1469",
|
|
312
|
-
enumerable: false,
|
|
313
|
-
configurable: true
|
|
314
|
-
});
|
|
170
|
+
throw new Error(`Invariant: image cache entry "${cacheKey}" is empty`);
|
|
315
171
|
}
|
|
316
172
|
const expireAt = Number(expireAtSt);
|
|
317
173
|
const maxAge = Number(maxAgeSt);
|
|
@@ -332,221 +188,6 @@ async function deleteFromCacheDir(cacheDir, cacheKey) {
|
|
|
332
188
|
_log.error(`Failed to delete cache key ${cacheKey}`, err);
|
|
333
189
|
});
|
|
334
190
|
}
|
|
335
|
-
async function detectContentType(buffer) {
|
|
336
|
-
if (buffer.byteLength === 0) {
|
|
337
|
-
return null;
|
|
338
|
-
}
|
|
339
|
-
if ([
|
|
340
|
-
0xff,
|
|
341
|
-
0xd8,
|
|
342
|
-
0xff
|
|
343
|
-
].every((b, i)=>buffer[i] === b)) {
|
|
344
|
-
return JPEG;
|
|
345
|
-
}
|
|
346
|
-
if ([
|
|
347
|
-
0x89,
|
|
348
|
-
0x50,
|
|
349
|
-
0x4e,
|
|
350
|
-
0x47,
|
|
351
|
-
0x0d,
|
|
352
|
-
0x0a,
|
|
353
|
-
0x1a,
|
|
354
|
-
0x0a
|
|
355
|
-
].every((b, i)=>buffer[i] === b)) {
|
|
356
|
-
return PNG;
|
|
357
|
-
}
|
|
358
|
-
if ([
|
|
359
|
-
0x47,
|
|
360
|
-
0x49,
|
|
361
|
-
0x46,
|
|
362
|
-
0x38
|
|
363
|
-
].every((b, i)=>buffer[i] === b)) {
|
|
364
|
-
return GIF;
|
|
365
|
-
}
|
|
366
|
-
if ([
|
|
367
|
-
0x52,
|
|
368
|
-
0x49,
|
|
369
|
-
0x46,
|
|
370
|
-
0x46,
|
|
371
|
-
0,
|
|
372
|
-
0,
|
|
373
|
-
0,
|
|
374
|
-
0,
|
|
375
|
-
0x57,
|
|
376
|
-
0x45,
|
|
377
|
-
0x42,
|
|
378
|
-
0x50
|
|
379
|
-
].every((b, i)=>!b || buffer[i] === b)) {
|
|
380
|
-
return WEBP;
|
|
381
|
-
}
|
|
382
|
-
if ([
|
|
383
|
-
0x3c,
|
|
384
|
-
0x3f,
|
|
385
|
-
0x78,
|
|
386
|
-
0x6d,
|
|
387
|
-
0x6c
|
|
388
|
-
].every((b, i)=>buffer[i] === b)) {
|
|
389
|
-
return SVG;
|
|
390
|
-
}
|
|
391
|
-
if ([
|
|
392
|
-
0x3c,
|
|
393
|
-
0x73,
|
|
394
|
-
0x76,
|
|
395
|
-
0x67
|
|
396
|
-
].every((b, i)=>buffer[i] === b)) {
|
|
397
|
-
return SVG;
|
|
398
|
-
}
|
|
399
|
-
if ([
|
|
400
|
-
0,
|
|
401
|
-
0,
|
|
402
|
-
0,
|
|
403
|
-
0,
|
|
404
|
-
0x66,
|
|
405
|
-
0x74,
|
|
406
|
-
0x79,
|
|
407
|
-
0x70,
|
|
408
|
-
0x61,
|
|
409
|
-
0x76,
|
|
410
|
-
0x69,
|
|
411
|
-
0x66
|
|
412
|
-
].every((b, i)=>!b || buffer[i] === b)) {
|
|
413
|
-
return AVIF;
|
|
414
|
-
}
|
|
415
|
-
if ([
|
|
416
|
-
0x00,
|
|
417
|
-
0x00,
|
|
418
|
-
0x01,
|
|
419
|
-
0x00
|
|
420
|
-
].every((b, i)=>buffer[i] === b)) {
|
|
421
|
-
return ICO;
|
|
422
|
-
}
|
|
423
|
-
if ([
|
|
424
|
-
0x69,
|
|
425
|
-
0x63,
|
|
426
|
-
0x6e,
|
|
427
|
-
0x73
|
|
428
|
-
].every((b, i)=>buffer[i] === b)) {
|
|
429
|
-
return ICNS;
|
|
430
|
-
}
|
|
431
|
-
if ([
|
|
432
|
-
0x49,
|
|
433
|
-
0x49,
|
|
434
|
-
0x2a,
|
|
435
|
-
0x00
|
|
436
|
-
].every((b, i)=>buffer[i] === b)) {
|
|
437
|
-
return TIFF;
|
|
438
|
-
}
|
|
439
|
-
if ([
|
|
440
|
-
0x42,
|
|
441
|
-
0x4d
|
|
442
|
-
].every((b, i)=>buffer[i] === b)) {
|
|
443
|
-
return BMP;
|
|
444
|
-
}
|
|
445
|
-
if ([
|
|
446
|
-
0xff,
|
|
447
|
-
0x0a
|
|
448
|
-
].every((b, i)=>buffer[i] === b)) {
|
|
449
|
-
return JXL;
|
|
450
|
-
}
|
|
451
|
-
if ([
|
|
452
|
-
0x00,
|
|
453
|
-
0x00,
|
|
454
|
-
0x00,
|
|
455
|
-
0x0c,
|
|
456
|
-
0x4a,
|
|
457
|
-
0x58,
|
|
458
|
-
0x4c,
|
|
459
|
-
0x20,
|
|
460
|
-
0x0d,
|
|
461
|
-
0x0a,
|
|
462
|
-
0x87,
|
|
463
|
-
0x0a
|
|
464
|
-
].every((b, i)=>buffer[i] === b)) {
|
|
465
|
-
return JXL;
|
|
466
|
-
}
|
|
467
|
-
if ([
|
|
468
|
-
0,
|
|
469
|
-
0,
|
|
470
|
-
0,
|
|
471
|
-
0,
|
|
472
|
-
0x66,
|
|
473
|
-
0x74,
|
|
474
|
-
0x79,
|
|
475
|
-
0x70,
|
|
476
|
-
0x68,
|
|
477
|
-
0x65,
|
|
478
|
-
0x69,
|
|
479
|
-
0x63
|
|
480
|
-
].every((b, i)=>!b || buffer[i] === b)) {
|
|
481
|
-
return HEIC;
|
|
482
|
-
}
|
|
483
|
-
if ([
|
|
484
|
-
0x25,
|
|
485
|
-
0x50,
|
|
486
|
-
0x44,
|
|
487
|
-
0x46,
|
|
488
|
-
0x2d
|
|
489
|
-
].every((b, i)=>buffer[i] === b)) {
|
|
490
|
-
return PDF;
|
|
491
|
-
}
|
|
492
|
-
if ([
|
|
493
|
-
0x00,
|
|
494
|
-
0x00,
|
|
495
|
-
0x00,
|
|
496
|
-
0x0c,
|
|
497
|
-
0x6a,
|
|
498
|
-
0x50,
|
|
499
|
-
0x20,
|
|
500
|
-
0x20,
|
|
501
|
-
0x0d,
|
|
502
|
-
0x0a,
|
|
503
|
-
0x87,
|
|
504
|
-
0x0a
|
|
505
|
-
].every((b, i)=>buffer[i] === b)) {
|
|
506
|
-
return JP2;
|
|
507
|
-
}
|
|
508
|
-
const format = (0, _detector.detector)(buffer.subarray(0, 1024));
|
|
509
|
-
switch(format){
|
|
510
|
-
case 'webp':
|
|
511
|
-
return WEBP;
|
|
512
|
-
case 'png':
|
|
513
|
-
return PNG;
|
|
514
|
-
case 'jpg':
|
|
515
|
-
return JPEG;
|
|
516
|
-
case 'gif':
|
|
517
|
-
return GIF;
|
|
518
|
-
case 'svg':
|
|
519
|
-
return SVG;
|
|
520
|
-
case 'jxl':
|
|
521
|
-
case 'jxl-stream':
|
|
522
|
-
return JXL;
|
|
523
|
-
case 'jp2':
|
|
524
|
-
return JP2;
|
|
525
|
-
case 'tiff':
|
|
526
|
-
return TIFF;
|
|
527
|
-
case 'bmp':
|
|
528
|
-
return BMP;
|
|
529
|
-
case 'ico':
|
|
530
|
-
return ICO;
|
|
531
|
-
case 'icns':
|
|
532
|
-
return ICNS;
|
|
533
|
-
case 'heif':
|
|
534
|
-
case 'cur':
|
|
535
|
-
case 'dds':
|
|
536
|
-
case 'j2c':
|
|
537
|
-
case 'ktx':
|
|
538
|
-
case 'pnm':
|
|
539
|
-
case 'psd':
|
|
540
|
-
case 'tga':
|
|
541
|
-
case undefined:
|
|
542
|
-
return null // unsupported formats
|
|
543
|
-
;
|
|
544
|
-
default:
|
|
545
|
-
format; // exhaustive check
|
|
546
|
-
return null // impossible to reach
|
|
547
|
-
;
|
|
548
|
-
}
|
|
549
|
-
}
|
|
550
191
|
class ImageOptimizerCache {
|
|
551
192
|
static validateParams(req, query, nextConfig, isDev) {
|
|
552
193
|
var _nextConfig_images, _nextConfig_images1, _nextConfig_images2;
|
|
@@ -672,15 +313,10 @@ class ImageOptimizerCache {
|
|
|
672
313
|
errorMessage: '"q" parameter (quality) must be an integer between 1 and 100'
|
|
673
314
|
};
|
|
674
315
|
}
|
|
675
|
-
if (qualities) {
|
|
676
|
-
|
|
677
|
-
|
|
678
|
-
}
|
|
679
|
-
if (!qualities.includes(quality)) {
|
|
680
|
-
return {
|
|
681
|
-
errorMessage: `"q" parameter (quality) of ${q} is not allowed`
|
|
682
|
-
};
|
|
683
|
-
}
|
|
316
|
+
if (qualities && !qualities.includes(quality) && !(isDev && quality === BLUR_QUALITY)) {
|
|
317
|
+
return {
|
|
318
|
+
errorMessage: `"q" parameter (quality) of ${q} is not allowed`
|
|
319
|
+
};
|
|
684
320
|
}
|
|
685
321
|
const mimeType = getSupportedMimeType(formats || [], req.headers['accept']);
|
|
686
322
|
const isStatic = url.startsWith(`${nextConfig.basePath || ''}/_next/static/media`) || url.startsWith(`${nextConfig.basePath || ''}/_next/static/immutable/media`);
|
|
@@ -696,7 +332,7 @@ class ImageOptimizerCache {
|
|
|
696
332
|
};
|
|
697
333
|
}
|
|
698
334
|
static getCacheKey({ href, width, quality, mimeType }) {
|
|
699
|
-
return getHash([
|
|
335
|
+
return (0, _extractetag.getHash)([
|
|
700
336
|
CACHE_VERSION,
|
|
701
337
|
href,
|
|
702
338
|
width,
|
|
@@ -780,19 +416,11 @@ class ImageOptimizerCache {
|
|
|
780
416
|
}
|
|
781
417
|
async set(cacheKey, value, { cacheControl }) {
|
|
782
418
|
if ((value == null ? void 0 : value.kind) !== _responsecache.CachedRouteKind.IMAGE) {
|
|
783
|
-
throw
|
|
784
|
-
value: "E366",
|
|
785
|
-
enumerable: false,
|
|
786
|
-
configurable: true
|
|
787
|
-
});
|
|
419
|
+
throw new Error('invariant attempted to set non-image to image-cache');
|
|
788
420
|
}
|
|
789
421
|
const revalidate = cacheControl == null ? void 0 : cacheControl.revalidate;
|
|
790
422
|
if (typeof revalidate !== 'number') {
|
|
791
|
-
throw
|
|
792
|
-
value: "E657",
|
|
793
|
-
enumerable: false,
|
|
794
|
-
configurable: true
|
|
795
|
-
});
|
|
423
|
+
throw new _invarianterror.InvariantError('revalidate must be a number for image-cache');
|
|
796
424
|
}
|
|
797
425
|
// If a custom cache handler is provided, use it
|
|
798
426
|
if (this.cacheHandler) {
|
|
@@ -825,11 +453,7 @@ class ImageOptimizerCache {
|
|
|
825
453
|
const lru = await this.cacheDiskLRU;
|
|
826
454
|
const success = lru == null ? void 0 : lru.set(cacheKey, value.buffer.byteLength);
|
|
827
455
|
if (success === false) {
|
|
828
|
-
throw
|
|
829
|
-
value: "E1070",
|
|
830
|
-
enumerable: false,
|
|
831
|
-
configurable: true
|
|
832
|
-
});
|
|
456
|
+
throw new Error(`image of size ${value.buffer.byteLength} could not be tracked by lru cache`);
|
|
833
457
|
}
|
|
834
458
|
await writeToCacheDir(this.cacheDir, cacheKey, value.extension, revalidate, expireAt, value.buffer, value.etag, value.upstreamEtag);
|
|
835
459
|
} catch (err) {
|
|
@@ -837,101 +461,6 @@ class ImageOptimizerCache {
|
|
|
837
461
|
}
|
|
838
462
|
}
|
|
839
463
|
}
|
|
840
|
-
class ImageError extends Error {
|
|
841
|
-
constructor(statusCode, message){
|
|
842
|
-
super(message);
|
|
843
|
-
Object.defineProperty(this, "__NEXT_ERROR_CODE", {
|
|
844
|
-
value: "E394",
|
|
845
|
-
enumerable: false,
|
|
846
|
-
configurable: true
|
|
847
|
-
});
|
|
848
|
-
// ensure an error status is used > 400
|
|
849
|
-
if (statusCode >= 400) {
|
|
850
|
-
this.statusCode = statusCode;
|
|
851
|
-
} else {
|
|
852
|
-
this.statusCode = 500;
|
|
853
|
-
}
|
|
854
|
-
}
|
|
855
|
-
}
|
|
856
|
-
function parseCacheControl(str) {
|
|
857
|
-
const map = new Map();
|
|
858
|
-
if (!str) {
|
|
859
|
-
return map;
|
|
860
|
-
}
|
|
861
|
-
for (let directive of str.split(',')){
|
|
862
|
-
let [key, value] = directive.trim().split('=', 2);
|
|
863
|
-
key = key.toLowerCase();
|
|
864
|
-
if (value) {
|
|
865
|
-
value = value.toLowerCase();
|
|
866
|
-
}
|
|
867
|
-
map.set(key, value);
|
|
868
|
-
}
|
|
869
|
-
return map;
|
|
870
|
-
}
|
|
871
|
-
function getMaxAge(str) {
|
|
872
|
-
const map = parseCacheControl(str);
|
|
873
|
-
if (map) {
|
|
874
|
-
let age = map.get('s-maxage') || map.get('max-age') || '';
|
|
875
|
-
if (age.startsWith('"') && age.endsWith('"')) {
|
|
876
|
-
age = age.slice(1, -1);
|
|
877
|
-
}
|
|
878
|
-
const n = parseInt(age, 10);
|
|
879
|
-
if (!isNaN(n)) {
|
|
880
|
-
return n;
|
|
881
|
-
}
|
|
882
|
-
}
|
|
883
|
-
return 0;
|
|
884
|
-
}
|
|
885
|
-
function getPreviouslyCachedImageOrNull(upstreamImage, previousCacheEntry) {
|
|
886
|
-
var _previousCacheEntry_value;
|
|
887
|
-
if ((previousCacheEntry == null ? void 0 : (_previousCacheEntry_value = previousCacheEntry.value) == null ? void 0 : _previousCacheEntry_value.kind) === 'IMAGE' && // Images that are SVGs, animated or failed the optimization previously end up using upstreamEtag as their etag as well,
|
|
888
|
-
// in these cases we want to trigger a new "optimization" attempt.
|
|
889
|
-
previousCacheEntry.value.upstreamEtag !== previousCacheEntry.value.etag && // and the upstream etag is the same as the previous cache entry's
|
|
890
|
-
upstreamImage.etag === previousCacheEntry.value.upstreamEtag) {
|
|
891
|
-
return previousCacheEntry.value;
|
|
892
|
-
}
|
|
893
|
-
return null;
|
|
894
|
-
}
|
|
895
|
-
async function optimizeImage({ buffer, contentType, quality, width, height, concurrency, operationCache, limitInputPixels, sequentialRead, timeoutInSeconds }) {
|
|
896
|
-
const sharp = getSharp(concurrency, operationCache);
|
|
897
|
-
const transformer = sharp(buffer, {
|
|
898
|
-
limitInputPixels,
|
|
899
|
-
sequentialRead: sequentialRead ?? undefined
|
|
900
|
-
}).timeout({
|
|
901
|
-
seconds: timeoutInSeconds ?? 7
|
|
902
|
-
}).rotate();
|
|
903
|
-
if (height) {
|
|
904
|
-
transformer.resize(width, height);
|
|
905
|
-
} else {
|
|
906
|
-
transformer.resize(width, undefined, {
|
|
907
|
-
withoutEnlargement: true
|
|
908
|
-
});
|
|
909
|
-
}
|
|
910
|
-
if (contentType === AVIF) {
|
|
911
|
-
transformer.avif({
|
|
912
|
-
// Scale the quality to try and match webp. This ratio was derived
|
|
913
|
-
// from sharp's default 80 (webp) and 50 (avif), and then verified
|
|
914
|
-
// using dssim and ssimulacra2 visual quality tests.
|
|
915
|
-
quality: Math.max(Math.round(quality * (50 / 80)), 1),
|
|
916
|
-
effort: 3
|
|
917
|
-
});
|
|
918
|
-
} else if (contentType === WEBP) {
|
|
919
|
-
transformer.webp({
|
|
920
|
-
quality
|
|
921
|
-
});
|
|
922
|
-
} else if (contentType === PNG) {
|
|
923
|
-
transformer.png({
|
|
924
|
-
quality
|
|
925
|
-
});
|
|
926
|
-
} else if (contentType === JPEG) {
|
|
927
|
-
transformer.jpeg({
|
|
928
|
-
quality,
|
|
929
|
-
mozjpeg: true
|
|
930
|
-
});
|
|
931
|
-
}
|
|
932
|
-
const optimizedBuffer = await transformer.toBuffer();
|
|
933
|
-
return optimizedBuffer;
|
|
934
|
-
}
|
|
935
464
|
function isRedirect(statusCode) {
|
|
936
465
|
return [
|
|
937
466
|
301,
|
|
@@ -943,11 +472,7 @@ function isRedirect(statusCode) {
|
|
|
943
472
|
}
|
|
944
473
|
function upstreamTimedOut(href) {
|
|
945
474
|
_log.error('upstream image response timed out for', href);
|
|
946
|
-
return
|
|
947
|
-
value: "E394",
|
|
948
|
-
enumerable: false,
|
|
949
|
-
configurable: true
|
|
950
|
-
});
|
|
475
|
+
return new _imageerror.ImageError(504, '"url" parameter is valid but upstream response timed out');
|
|
951
476
|
}
|
|
952
477
|
const agentOptions = {
|
|
953
478
|
keepAlive: true,
|
|
@@ -1087,11 +612,7 @@ function decodeResponseBody(res, href) {
|
|
|
1087
612
|
const codings = contentEncoding.toLowerCase().split(',');
|
|
1088
613
|
if (codings.length > MAX_CONTENT_ENCODINGS) {
|
|
1089
614
|
_log.error('upstream image response had too many content encodings for', href);
|
|
1090
|
-
throw
|
|
1091
|
-
value: "E394",
|
|
1092
|
-
enumerable: false,
|
|
1093
|
-
configurable: true
|
|
1094
|
-
});
|
|
615
|
+
throw new _imageerror.ImageError(400, '"url" parameter is valid but upstream response is invalid');
|
|
1095
616
|
}
|
|
1096
617
|
const decoders = [];
|
|
1097
618
|
for(let i = codings.length - 1; i >= 0; i--){
|
|
@@ -1147,11 +668,7 @@ async function fetchExternalImage(href, dangerouslyAllowLocalIP, maximumResponse
|
|
|
1147
668
|
const privateIps = addresses.map((record)=>record.address).filter((ip)=>(0, _isprivateip.isPrivateIp)(ip));
|
|
1148
669
|
if (privateIps.length > 0) {
|
|
1149
670
|
_log.error('upstream image', href, 'hostname resolved to private IP', JSON.stringify(privateIps), 'If this is expected and you understand SSRF risk, use images.dangerouslyAllowLocalIP = true to continue.');
|
|
1150
|
-
throw
|
|
1151
|
-
value: "E394",
|
|
1152
|
-
enumerable: false,
|
|
1153
|
-
configurable: true
|
|
1154
|
-
});
|
|
671
|
+
throw new _imageerror.ImageError(400, '"url" parameter is not allowed');
|
|
1155
672
|
}
|
|
1156
673
|
}
|
|
1157
674
|
// The signal is owned here rather than by `requestUpstreamImage()` because it
|
|
@@ -1181,11 +698,7 @@ async function fetchExternalImage(href, dangerouslyAllowLocalIP, maximumResponse
|
|
|
1181
698
|
res.destroy();
|
|
1182
699
|
if (count === 0) {
|
|
1183
700
|
_log.error('upstream image response had too many redirects', href);
|
|
1184
|
-
throw
|
|
1185
|
-
value: "E394",
|
|
1186
|
-
enumerable: false,
|
|
1187
|
-
configurable: true
|
|
1188
|
-
});
|
|
701
|
+
throw new _imageerror.ImageError(508, '"url" parameter is valid but upstream response is invalid');
|
|
1189
702
|
}
|
|
1190
703
|
const redirect = new URL(locationHeader, href).href;
|
|
1191
704
|
return fetchExternalImage(redirect, dangerouslyAllowLocalIP, maximumResponseBody, count - 1);
|
|
@@ -1193,11 +706,7 @@ async function fetchExternalImage(href, dangerouslyAllowLocalIP, maximumResponse
|
|
|
1193
706
|
if (statusCode < 200 || statusCode > 299) {
|
|
1194
707
|
res.destroy();
|
|
1195
708
|
_log.error('upstream image response failed for', href, statusCode);
|
|
1196
|
-
throw
|
|
1197
|
-
value: "E394",
|
|
1198
|
-
enumerable: false,
|
|
1199
|
-
configurable: true
|
|
1200
|
-
});
|
|
709
|
+
throw new _imageerror.ImageError(statusCode, '"url" parameter is valid but upstream response is invalid');
|
|
1201
710
|
}
|
|
1202
711
|
const chunks = [];
|
|
1203
712
|
let totalSize = 0;
|
|
@@ -1209,11 +718,7 @@ async function fetchExternalImage(href, dangerouslyAllowLocalIP, maximumResponse
|
|
|
1209
718
|
totalSize += chunk.byteLength;
|
|
1210
719
|
if (totalSize > maximumResponseBody) {
|
|
1211
720
|
_log.error('upstream image response exceeded maximum size for', href, totalSize);
|
|
1212
|
-
throw
|
|
1213
|
-
value: "E394",
|
|
1214
|
-
enumerable: false,
|
|
1215
|
-
configurable: true
|
|
1216
|
-
});
|
|
721
|
+
throw new _imageerror.ImageError(413, '"url" parameter is valid but upstream response is invalid');
|
|
1217
722
|
}
|
|
1218
723
|
chunks.push(chunk);
|
|
1219
724
|
}
|
|
@@ -1226,16 +731,12 @@ async function fetchExternalImage(href, dangerouslyAllowLocalIP, maximumResponse
|
|
|
1226
731
|
}
|
|
1227
732
|
if (totalSize === 0) {
|
|
1228
733
|
_log.error('upstream image response is empty for', href);
|
|
1229
|
-
throw
|
|
1230
|
-
value: "E394",
|
|
1231
|
-
enumerable: false,
|
|
1232
|
-
configurable: true
|
|
1233
|
-
});
|
|
734
|
+
throw new _imageerror.ImageError(400, '"url" parameter is valid but upstream response is invalid');
|
|
1234
735
|
}
|
|
1235
736
|
const buffer = Buffer.concat(chunks);
|
|
1236
737
|
const contentType = res.headers['content-type'];
|
|
1237
738
|
const cacheControl = res.headers['cache-control'];
|
|
1238
|
-
const etag = extractEtag(res.headers.etag, buffer);
|
|
739
|
+
const etag = (0, _extractetag.extractEtag)(res.headers.etag, buffer);
|
|
1239
740
|
return {
|
|
1240
741
|
buffer,
|
|
1241
742
|
contentType,
|
|
@@ -1247,34 +748,40 @@ async function fetchInternalImage(href, _req, _res, maximumResponseBody, handleR
|
|
|
1247
748
|
try {
|
|
1248
749
|
// Coerce HEAD to GET to avoid issues with the image optimizer
|
|
1249
750
|
const method = !_req.method || _req.method === 'HEAD' ? 'GET' : _req.method;
|
|
1250
|
-
|
|
1251
|
-
|
|
1252
|
-
|
|
1253
|
-
|
|
1254
|
-
|
|
1255
|
-
|
|
751
|
+
// The mocked request keeps the requester's socket so that protocol and
|
|
752
|
+
// remote address detection keep working, but the mocked response must not
|
|
753
|
+
// reference it. `send` (used by `serveStatic`) watches `res.socket` through
|
|
754
|
+
// `on-finished` and treats the response as finished as soon as that socket
|
|
755
|
+
// stops being writable. When the requester disconnected mid-transfer this
|
|
756
|
+
// tore down the file stream without ever ending the mocked response, and
|
|
757
|
+
// since `ResponseCache` coalesces every request for the same cache key onto
|
|
758
|
+
// this single fetch, the key stayed pending for every later requester until
|
|
759
|
+
// the server restarted.
|
|
760
|
+
const mocked = {
|
|
761
|
+
req: new _mockrequest.MockedRequest({
|
|
762
|
+
url: href,
|
|
763
|
+
method,
|
|
764
|
+
headers: {},
|
|
765
|
+
socket: _req.socket
|
|
766
|
+
}),
|
|
767
|
+
res: new _mockrequest.MockedResponse({
|
|
768
|
+
maximumResponseBody
|
|
769
|
+
})
|
|
770
|
+
};
|
|
1256
771
|
await handleRequest(mocked.req, mocked.res, (0, _url.parseReqUrl)(href));
|
|
1257
772
|
await mocked.res.hasStreamed;
|
|
1258
|
-
if (!mocked.res.statusCode) {
|
|
1259
|
-
_log.error('image response failed for', href, mocked.res.statusCode);
|
|
1260
|
-
throw
|
|
1261
|
-
value: "E394",
|
|
1262
|
-
enumerable: false,
|
|
1263
|
-
configurable: true
|
|
1264
|
-
});
|
|
773
|
+
if (!mocked.res.statusCode || mocked.res.statusCode < 200 || mocked.res.statusCode > 299) {
|
|
774
|
+
_log.error('internal image response failed for', href, mocked.res.statusCode);
|
|
775
|
+
throw new _imageerror.ImageError(mocked.res.statusCode, '"url" parameter is valid but internal response is invalid');
|
|
1265
776
|
}
|
|
1266
777
|
if (mocked.res.buffers.length === 0) {
|
|
1267
778
|
_log.error('internal image response is empty for', href);
|
|
1268
|
-
throw
|
|
1269
|
-
value: "E394",
|
|
1270
|
-
enumerable: false,
|
|
1271
|
-
configurable: true
|
|
1272
|
-
});
|
|
779
|
+
throw new _imageerror.ImageError(400, '"url" parameter is valid but internal response is invalid');
|
|
1273
780
|
}
|
|
1274
781
|
const buffer = Buffer.concat(mocked.res.buffers);
|
|
1275
782
|
const contentType = mocked.res.getHeader('Content-Type');
|
|
1276
783
|
const cacheControl = mocked.res.getHeader('Cache-Control');
|
|
1277
|
-
const etag = extractEtag(mocked.res.getHeader('ETag'), buffer);
|
|
784
|
+
const etag = (0, _extractetag.extractEtag)(mocked.res.getHeader('ETag'), buffer);
|
|
1278
785
|
return {
|
|
1279
786
|
buffer,
|
|
1280
787
|
contentType,
|
|
@@ -1282,141 +789,45 @@ async function fetchInternalImage(href, _req, _res, maximumResponseBody, handleR
|
|
|
1282
789
|
etag
|
|
1283
790
|
};
|
|
1284
791
|
} catch (err) {
|
|
1285
|
-
if (err instanceof ImageError) {
|
|
792
|
+
if (err instanceof _imageerror.ImageError) {
|
|
1286
793
|
throw err;
|
|
1287
794
|
}
|
|
1288
795
|
if (err && typeof err === 'object' && 'code' in err && err.code === 'ERR_MAX_BODY_SIZE_EXCEEDED') {
|
|
1289
796
|
_log.error('internal image response exceeded maximum size for', href);
|
|
1290
|
-
throw
|
|
1291
|
-
value: "E394",
|
|
1292
|
-
enumerable: false,
|
|
1293
|
-
configurable: true
|
|
1294
|
-
});
|
|
797
|
+
throw new _imageerror.ImageError(413, '"url" parameter is valid but internal response is invalid');
|
|
1295
798
|
}
|
|
1296
799
|
_log.error('upstream image response failed for', href, err);
|
|
1297
|
-
throw
|
|
1298
|
-
|
|
1299
|
-
|
|
1300
|
-
|
|
1301
|
-
|
|
1302
|
-
|
|
800
|
+
throw new _imageerror.ImageError(500, '"url" parameter is valid but upstream response is invalid');
|
|
801
|
+
}
|
|
802
|
+
}
|
|
803
|
+
async function makeBlurPlaceholder(buffer, contentType) {
|
|
804
|
+
// During `next dev`, we don't want to generate blur placeholders with webpack
|
|
805
|
+
// because it can delay starting the dev server. Instead, `next-image-loader.js`
|
|
806
|
+
// will inline a special url to lazily generate the blur placeholder at request time.
|
|
807
|
+
const meta = await (0, _getimagesize.getImageSize)(buffer);
|
|
808
|
+
const blurOpts = {
|
|
809
|
+
blurWidth: meta.width,
|
|
810
|
+
blurHeight: meta.height,
|
|
811
|
+
blurDataURL: `data:${contentType};base64,${buffer.toString('base64')}`
|
|
812
|
+
};
|
|
813
|
+
return {
|
|
814
|
+
buffer: Buffer.from(unescape((0, _imageblursvg.getImageBlurSvg)(blurOpts))),
|
|
815
|
+
contentType: 'image/svg+xml'
|
|
816
|
+
};
|
|
1303
817
|
}
|
|
1304
818
|
async function imageOptimizer(imageUpstream, paramsResult, nextConfig, opts) {
|
|
1305
|
-
|
|
1306
|
-
const
|
|
1307
|
-
|
|
1308
|
-
|
|
1309
|
-
if (!upstreamType || !upstreamType.startsWith('image/') || upstreamType.includes(',')) {
|
|
1310
|
-
if (!opts.silent) {
|
|
1311
|
-
_log.error("The requested resource isn't a valid image for", href, 'received', upstreamType);
|
|
1312
|
-
}
|
|
1313
|
-
throw Object.defineProperty(new ImageError(400, "The requested resource isn't a valid image."), "__NEXT_ERROR_CODE", {
|
|
1314
|
-
value: "E394",
|
|
1315
|
-
enumerable: false,
|
|
1316
|
-
configurable: true
|
|
1317
|
-
});
|
|
1318
|
-
}
|
|
1319
|
-
if (upstreamType.startsWith('image/svg') && !nextConfig.images.dangerouslyAllowSVG) {
|
|
1320
|
-
if (!opts.silent) {
|
|
1321
|
-
_log.error(`The requested resource "${href}" has type "${upstreamType}" but dangerouslyAllowSVG is disabled. Consider adding the "unoptimized" property to the <Image>.`);
|
|
1322
|
-
}
|
|
1323
|
-
throw Object.defineProperty(new ImageError(400, '"url" parameter is valid but image type is not allowed'), "__NEXT_ERROR_CODE", {
|
|
1324
|
-
value: "E394",
|
|
1325
|
-
enumerable: false,
|
|
1326
|
-
configurable: true
|
|
1327
|
-
});
|
|
1328
|
-
}
|
|
1329
|
-
if (ANIMATABLE_TYPES.includes(upstreamType) && (0, _isanimated.default)(upstreamBuffer)) {
|
|
1330
|
-
if (!opts.silent) {
|
|
1331
|
-
_log.warnOnce(`The requested resource "${href}" is an animated image so it will not be optimized. Consider adding the "unoptimized" property to the <Image>.`);
|
|
1332
|
-
}
|
|
1333
|
-
return {
|
|
1334
|
-
buffer: upstreamBuffer,
|
|
1335
|
-
contentType: upstreamType,
|
|
1336
|
-
maxAge,
|
|
1337
|
-
etag: upstreamEtag,
|
|
1338
|
-
upstreamEtag
|
|
1339
|
-
};
|
|
1340
|
-
}
|
|
1341
|
-
if (BYPASS_TYPES.includes(upstreamType)) {
|
|
1342
|
-
return {
|
|
1343
|
-
buffer: upstreamBuffer,
|
|
1344
|
-
contentType: upstreamType,
|
|
1345
|
-
maxAge,
|
|
1346
|
-
etag: upstreamEtag,
|
|
1347
|
-
upstreamEtag
|
|
1348
|
-
};
|
|
1349
|
-
}
|
|
1350
|
-
let contentType;
|
|
1351
|
-
if (mimeType) {
|
|
1352
|
-
contentType = mimeType;
|
|
1353
|
-
} else if ((0, _servestatic.getExtension)(upstreamType) && upstreamType !== WEBP && upstreamType !== AVIF) {
|
|
1354
|
-
contentType = upstreamType;
|
|
1355
|
-
} else {
|
|
1356
|
-
contentType = JPEG;
|
|
1357
|
-
}
|
|
1358
|
-
const previouslyCachedImage = getPreviouslyCachedImageOrNull(imageUpstream, opts.previousCacheEntry);
|
|
1359
|
-
if (previouslyCachedImage) {
|
|
1360
|
-
var _opts_previousCacheEntry_cacheControl, _opts_previousCacheEntry;
|
|
1361
|
-
return {
|
|
819
|
+
var _opts_previousCacheEntry_cacheControl, _opts_previousCacheEntry;
|
|
820
|
+
const previouslyCachedImage = (0, _getpreviouslycachedimageornull.getPreviouslyCachedImageOrNull)(imageUpstream, opts.previousCacheEntry);
|
|
821
|
+
return (0, _transform.imageOptimizerTransform)(imageUpstream, paramsResult, nextConfig, {
|
|
822
|
+
previousOutput: previouslyCachedImage ? {
|
|
1362
823
|
buffer: previouslyCachedImage.buffer,
|
|
1363
|
-
|
|
1364
|
-
maxAge: (opts == null ? void 0 : (_opts_previousCacheEntry = opts.previousCacheEntry) == null ? void 0 : (_opts_previousCacheEntry_cacheControl = _opts_previousCacheEntry.cacheControl) == null ? void 0 : _opts_previousCacheEntry_cacheControl.revalidate) || maxAge,
|
|
824
|
+
maxAge: ((_opts_previousCacheEntry = opts.previousCacheEntry) == null ? void 0 : (_opts_previousCacheEntry_cacheControl = _opts_previousCacheEntry.cacheControl) == null ? void 0 : _opts_previousCacheEntry_cacheControl.revalidate) || undefined,
|
|
1365
825
|
etag: previouslyCachedImage.etag,
|
|
1366
826
|
upstreamEtag: previouslyCachedImage.upstreamEtag
|
|
1367
|
-
}
|
|
1368
|
-
|
|
1369
|
-
|
|
1370
|
-
|
|
1371
|
-
buffer: upstreamBuffer,
|
|
1372
|
-
contentType,
|
|
1373
|
-
quality,
|
|
1374
|
-
width,
|
|
1375
|
-
concurrency: nextConfig.experimental.imgOptConcurrency,
|
|
1376
|
-
operationCache: nextConfig.experimental.imgOptOperationCache,
|
|
1377
|
-
limitInputPixels: nextConfig.experimental.imgOptMaxInputPixels,
|
|
1378
|
-
sequentialRead: nextConfig.experimental.imgOptSequentialRead,
|
|
1379
|
-
timeoutInSeconds: nextConfig.experimental.imgOptTimeoutInSeconds
|
|
1380
|
-
});
|
|
1381
|
-
if (opts.isDev && width <= BLUR_IMG_SIZE && quality === BLUR_QUALITY) {
|
|
1382
|
-
// During `next dev`, we don't want to generate blur placeholders with webpack
|
|
1383
|
-
// because it can delay starting the dev server. Instead, `next-image-loader.js`
|
|
1384
|
-
// will inline a special url to lazily generate the blur placeholder at request time.
|
|
1385
|
-
const meta = await getImageSize(optimizedBuffer);
|
|
1386
|
-
const blurOpts = {
|
|
1387
|
-
blurWidth: meta.width,
|
|
1388
|
-
blurHeight: meta.height,
|
|
1389
|
-
blurDataURL: `data:${contentType};base64,${optimizedBuffer.toString('base64')}`
|
|
1390
|
-
};
|
|
1391
|
-
optimizedBuffer = Buffer.from(unescape((0, _imageblursvg.getImageBlurSvg)(blurOpts)));
|
|
1392
|
-
contentType = 'image/svg+xml';
|
|
1393
|
-
}
|
|
1394
|
-
return {
|
|
1395
|
-
buffer: optimizedBuffer,
|
|
1396
|
-
contentType,
|
|
1397
|
-
maxAge,
|
|
1398
|
-
etag: getImageEtag(optimizedBuffer),
|
|
1399
|
-
upstreamEtag
|
|
1400
|
-
};
|
|
1401
|
-
} catch (error) {
|
|
1402
|
-
if (upstreamType) {
|
|
1403
|
-
// If we fail to optimize, fallback to the original image
|
|
1404
|
-
return {
|
|
1405
|
-
buffer: upstreamBuffer,
|
|
1406
|
-
contentType: upstreamType,
|
|
1407
|
-
maxAge: nextConfig.images.minimumCacheTTL,
|
|
1408
|
-
etag: upstreamEtag,
|
|
1409
|
-
upstreamEtag,
|
|
1410
|
-
error
|
|
1411
|
-
};
|
|
1412
|
-
} else {
|
|
1413
|
-
throw Object.defineProperty(new ImageError(400, 'Unable to optimize image and unable to fallback to upstream image'), "__NEXT_ERROR_CODE", {
|
|
1414
|
-
value: "E394",
|
|
1415
|
-
enumerable: false,
|
|
1416
|
-
configurable: true
|
|
1417
|
-
});
|
|
1418
|
-
}
|
|
1419
|
-
}
|
|
827
|
+
} : undefined,
|
|
828
|
+
logger: opts.silent ? undefined : _log,
|
|
829
|
+
handleDevOutput: opts.isDev && paramsResult.width <= BLUR_IMG_SIZE && paramsResult.quality === BLUR_QUALITY ? makeBlurPlaceholder : undefined
|
|
830
|
+
});
|
|
1420
831
|
}
|
|
1421
832
|
function getFileNameWithExtension(url, contentType) {
|
|
1422
833
|
const [urlWithoutQueryParams] = url.split('?', 1);
|
|
@@ -1463,12 +874,5 @@ function sendResponse(req, res, url, extension, buffer, etag, isStatic, xCache,
|
|
|
1463
874
|
}
|
|
1464
875
|
}
|
|
1465
876
|
}
|
|
1466
|
-
async function getImageSize(buffer) {
|
|
1467
|
-
const { width, height } = (0, _imagesize.default)(buffer);
|
|
1468
|
-
return {
|
|
1469
|
-
width,
|
|
1470
|
-
height
|
|
1471
|
-
};
|
|
1472
|
-
}
|
|
1473
877
|
|
|
1474
878
|
//# sourceMappingURL=image-optimizer.js.map
|