@surething/cockpit 1.0.182 → 1.0.184
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.next-prod/BUILD_ID +1 -1
- package/.next-prod/app-path-routes-manifest.json +23 -18
- package/.next-prod/build-manifest.json +2 -2
- package/.next-prod/prerender-manifest.json +3 -3
- package/.next-prod/routes-manifest.json +30 -0
- package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_global-error.html +2 -2
- package/.next-prod/server/app/_global-error.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_index.segment.rsc +1 -1
- package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_not-found.html +2 -2
- package/.next-prod/server/app/_not-found.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_head.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +2 -2
- package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
- package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +2 -2
- package/.next-prod/server/app/api/bash/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/chat/codex/route.js +23 -0
- package/.next-prod/server/app/api/chat/codex/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/chat/codex/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/chat/kimi/route.js +23 -0
- package/.next-prod/server/app/api/chat/kimi/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/chat/kimi/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/chat/ollama/route.js +11 -0
- package/.next-prod/server/app/api/chat/ollama/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/chat/ollama/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/chat/route.js +3 -3
- package/.next-prod/server/app/api/chat/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/claude-stats/route.js +1 -1
- package/.next-prod/server/app/api/claude-stats/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/commands/route.js +1 -1
- package/.next-prod/server/app/api/commands/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/comments/route.js +1 -1
- package/.next-prod/server/app/api/comments/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/db/columns/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/db/connect/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/db/disconnect/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/db/export/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/db/query/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/db/schemas/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/extension/version/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/file/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/blame/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/clipboard/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/copy/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/delete/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/expanded/route.js +1 -1
- package/.next-prod/server/app/api/files/expanded/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/index/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/init/route.js +1 -1
- package/.next-prod/server/app/api/files/init/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/paste/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/read/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/readdir/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/recent/route.js +1 -1
- package/.next-prod/server/app/api/files/recent/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/save/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/files/search/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/git/branch-diff/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/git/branches/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/git/commit-diff/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/git/commits/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/git/diff/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/git/discard/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/git/stage/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/git/status/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/git/unstage/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/git/worktree/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/global-state/route.js +1 -1
- package/.next-prod/server/app/api/global-state/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/jupyter/load/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/jupyter/save/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/jupyter/shutdown/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/lsp/definition/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/lsp/hover/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/lsp/references/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/lsp/status/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/lsp/warmup/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/mysql/columns/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/mysql/connect/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/mysql/disconnect/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/mysql/export/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/mysql/query/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/mysql/schemas/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/neo4j/connect/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/neo4j/disconnect/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/neo4j/query/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/neo4j/schema/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/note/route.js +1 -1
- package/.next-prod/server/app/api/note/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/ollama/models/route.js +1 -0
- package/.next-prod/server/app/api/ollama/models/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/ollama/models/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/ollama/start/route.js +1 -0
- package/.next-prod/server/app/api/ollama/start/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/ollama/start/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/open-cursor/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/open-vscode/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/pick-folder/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/pinned-sessions/route.js +1 -1
- package/.next-prod/server/app/api/pinned-sessions/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/project-settings/route.js +1 -1
- package/.next-prod/server/app/api/project-settings/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/project-state/route.js +1 -1
- package/.next-prod/server/app/api/project-state/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/projects/route.js +1 -1
- package/.next-prod/server/app/api/projects/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/redis/command/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/redis/connect/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/redis/delete/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/redis/disconnect/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/redis/get/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/redis/keys/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/redis/set/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/review/[id]/comments/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/comments/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/review/[id]/replies/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/replies/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/review/[id]/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/review/identify/route.js +1 -1
- package/.next-prod/server/app/api/review/identify/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/review/order/route.js +1 -1
- package/.next-prod/server/app/api/review/order/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/review/route.js +1 -1
- package/.next-prod/server/app/api/review/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/review/share-info/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/review/users/route.js +1 -1
- package/.next-prod/server/app/api/review/users/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/scheduled-tasks/route.js +1 -1
- package/.next-prod/server/app/api/scheduled-tasks/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/services/config/route.js +1 -1
- package/.next-prod/server/app/api/services/config/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/services/scripts/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/fork/route.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/fork/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/history/route.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/history/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/session-by-path/route.js +1 -1
- package/.next-prod/server/app/api/session-by-path/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/route.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/sessions/route.js +1 -1
- package/.next-prod/server/app/api/sessions/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/settings/route.js +1 -1
- package/.next-prod/server/app/api/settings/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/terminal/aliases/route.js +1 -1
- package/.next-prod/server/app/api/terminal/aliases/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/terminal/autocomplete/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/terminal/bubble-order/route.js +1 -1
- package/.next-prod/server/app/api/terminal/bubble-order/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/terminal/env/route.js +1 -1
- package/.next-prod/server/app/api/terminal/env/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/terminal/history/route.js +1 -1
- package/.next-prod/server/app/api/terminal/history/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/api/version/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/manifest.webmanifest/route_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/project/page.js +4 -4
- package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app-paths-manifest.json +23 -18
- package/.next-prod/server/chunks/4098.js +1 -1
- package/.next-prod/server/functions-config-manifest.json +5 -0
- package/.next-prod/server/pages/404.html +2 -2
- package/.next-prod/server/pages/500.html +2 -2
- package/.next-prod/server/server-reference-manifest.json +1 -1
- package/.next-prod/static/Jd-PD9ePjHrv17OUyoAFo/_buildManifest.js +1 -0
- package/.next-prod/static/chunks/app/_global-error/page-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/bash/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/codex/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/kimi/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/ollama/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/claude-stats/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/commands/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/comments/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/db/columns/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/db/connect/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/db/disconnect/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/db/export/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/db/query/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/db/schemas/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/extension/version/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/file/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/blame/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/clipboard/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/copy/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/delete/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/expanded/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/index/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/init/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/paste/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/read/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/readdir/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/recent/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/save/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/search/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/branch-diff/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/branches/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/commit-diff/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/commits/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/diff/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/discard/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/stage/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/status/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/unstage/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/worktree/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/global-state/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/load/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/save/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/definition/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/hover/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/references/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/status/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/warmup/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/columns/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/connect/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/disconnect/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/export/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/query/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/schemas/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/connect/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/query/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/schema/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/note/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/models/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/start/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/open-cursor/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/open-vscode/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/pick-folder/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/pinned-sessions/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/project-settings/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/project-state/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/projects/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/command/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/connect/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/delete/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/disconnect/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/get/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/keys/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/set/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/comments/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/replies/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/identify/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/order/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/share-info/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/users/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/scheduled-tasks/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/services/config/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/services/scripts/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/session-by-path/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/projects/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/settings/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/aliases/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/env/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/history/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/api/version/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/manifest.webmanifest/route-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/app/project/page-94e2a1e77495f17f.js +25 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-6f58f82d7dc6888f.js +1 -0
- package/.next-prod/static/css/786ec7ade22e6269.css +3 -0
- package/.next-prod/trace +12 -12
- package/.next-prod/trace-build +1 -1
- package/.next-prod/types/app/api/chat/codex/route.ts +350 -0
- package/.next-prod/types/app/api/chat/kimi/route.ts +350 -0
- package/.next-prod/types/app/api/chat/ollama/route.ts +350 -0
- package/.next-prod/types/app/api/ollama/models/route.ts +350 -0
- package/.next-prod/types/app/api/ollama/start/route.ts +350 -0
- package/.next-prod/types/routes.d.ts +6 -1
- package/.next-prod/types/validator.ts +45 -0
- package/dist/scheduledTasks.mjs +8 -9
- package/dist/wsServer.mjs +4 -5
- package/package.json +1 -1
- package/.next-prod/static/chunks/app/_global-error/page-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/bash/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/claude-stats/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/commands/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/comments/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/db/columns/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/db/connect/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/db/disconnect/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/db/export/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/db/query/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/db/schemas/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/extension/version/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/file/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/files/blame/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/files/clipboard/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/files/copy/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/files/delete/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/files/expanded/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/files/index/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/files/init/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/files/paste/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/files/read/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/files/readdir/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/files/recent/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/files/save/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/files/search/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/git/branch-diff/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/git/branches/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/git/commit-diff/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/git/commits/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/git/diff/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/git/discard/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/git/stage/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/git/status/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/git/unstage/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/git/worktree/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/global-state/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/load/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/save/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/definition/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/hover/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/references/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/status/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/warmup/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/columns/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/connect/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/disconnect/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/export/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/query/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/schemas/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/connect/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/query/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/schema/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/note/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/open-cursor/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/open-vscode/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/pick-folder/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/pinned-sessions/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/project-settings/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/project-state/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/projects/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/command/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/connect/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/delete/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/disconnect/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/get/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/keys/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/set/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/comments/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/replies/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/review/identify/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/review/order/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/review/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/review/share-info/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/review/users/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/scheduled-tasks/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/services/config/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/services/scripts/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/session-by-path/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/projects/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/settings/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/aliases/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/env/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/history/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/api/version/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/manifest.webmanifest/route-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/app/project/page-d51072aa54463d31.js +0 -25
- package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-cdd67d428d9e0c3f.js +0 -1
- package/.next-prod/static/css/81b599e4fb160b4a.css +0 -3
- package/.next-prod/static/mLWuEoaUaWpz2SAy661N0/_buildManifest.js +0 -1
- /package/.next-prod/static/{mLWuEoaUaWpz2SAy661N0 → Jd-PD9ePjHrv17OUyoAFo}/_ssgManifest.js +0 -0
- /package/dist/{chunk-OER3N6H7.mjs → chunk-YNAZMVAD.mjs} +0 -0
package/.next-prod/trace-build
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
[{"name":"run-webpack","duration":
|
|
1
|
+
[{"name":"run-webpack","duration":13455814,"timestamp":143715372,"id":17,"parentId":1,"tags":{},"startTime":1774983928768,"traceId":"c66d86cf8c35b6cf"},{"name":"run-typescript","duration":14212683,"timestamp":157175063,"id":1485,"parentId":1,"tags":{},"startTime":1774983942228,"traceId":"c66d86cf8c35b6cf"},{"name":"static-check","duration":792969,"timestamp":171405085,"id":1488,"parentId":1,"tags":{},"startTime":1774983956458,"traceId":"c66d86cf8c35b6cf"},{"name":"static-generation","duration":5855233,"timestamp":172394694,"id":1706,"parentId":1,"tags":{},"startTime":1774983957448,"traceId":"c66d86cf8c35b6cf"},{"name":"collect-build-traces","duration":18434328,"timestamp":172198931,"id":1703,"parentId":1,"tags":{},"startTime":1774983957252,"traceId":"c66d86cf8c35b6cf"},{"name":"telemetry-flush","duration":52,"timestamp":190636428,"id":1715,"parentId":1,"tags":{},"startTime":1774983975690,"traceId":"c66d86cf8c35b6cf"},{"name":"next-build","duration":47109098,"timestamp":143527392,"id":1,"tags":{"buildMode":"default","version":"16.1.6","bundler":"webpack","has-custom-webpack-config":"false","use-build-worker":"true"},"startTime":1774983928580,"traceId":"c66d86cf8c35b6cf"}]
|
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
// File: /home/runner/work/cockpit/cockpit/src/app/api/chat/codex/route.ts
|
|
2
|
+
import * as entry from '../../../../../../src/app/api/chat/codex/route.js'
|
|
3
|
+
import type { NextRequest } from 'next/server.js'
|
|
4
|
+
|
|
5
|
+
import type { PrefetchForTypeCheckInternal } from 'next/dist/build/segment-config/app/app-segment-config.js'
|
|
6
|
+
|
|
7
|
+
type TEntry = typeof import('../../../../../../src/app/api/chat/codex/route.js')
|
|
8
|
+
|
|
9
|
+
type SegmentParams<T extends Object = any> = T extends Record<string, any>
|
|
10
|
+
? { [K in keyof T]: T[K] extends string ? string | string[] | undefined : never }
|
|
11
|
+
: T
|
|
12
|
+
|
|
13
|
+
// Check that the entry is a valid entry
|
|
14
|
+
checkFields<Diff<{
|
|
15
|
+
GET?: Function
|
|
16
|
+
HEAD?: Function
|
|
17
|
+
OPTIONS?: Function
|
|
18
|
+
POST?: Function
|
|
19
|
+
PUT?: Function
|
|
20
|
+
DELETE?: Function
|
|
21
|
+
PATCH?: Function
|
|
22
|
+
config?: {}
|
|
23
|
+
generateStaticParams?: Function
|
|
24
|
+
unstable_prefetch?: PrefetchForTypeCheckInternal
|
|
25
|
+
revalidate?: RevalidateRange<TEntry> | false
|
|
26
|
+
dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
|
|
27
|
+
dynamicParams?: boolean
|
|
28
|
+
fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
|
|
29
|
+
preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
|
|
30
|
+
runtime?: 'nodejs' | 'experimental-edge' | 'edge'
|
|
31
|
+
maxDuration?: number
|
|
32
|
+
|
|
33
|
+
}, TEntry, ''>>()
|
|
34
|
+
|
|
35
|
+
type RouteContext = { params: Promise<SegmentParams> }
|
|
36
|
+
// Check the prop type of the entry function
|
|
37
|
+
if ('GET' in entry) {
|
|
38
|
+
checkFields<
|
|
39
|
+
Diff<
|
|
40
|
+
ParamCheck<Request | NextRequest>,
|
|
41
|
+
{
|
|
42
|
+
__tag__: 'GET'
|
|
43
|
+
__param_position__: 'first'
|
|
44
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'GET'>>
|
|
45
|
+
},
|
|
46
|
+
'GET'
|
|
47
|
+
>
|
|
48
|
+
>()
|
|
49
|
+
checkFields<
|
|
50
|
+
Diff<
|
|
51
|
+
ParamCheck<RouteContext>,
|
|
52
|
+
{
|
|
53
|
+
__tag__: 'GET'
|
|
54
|
+
__param_position__: 'second'
|
|
55
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'GET'>>
|
|
56
|
+
},
|
|
57
|
+
'GET'
|
|
58
|
+
>
|
|
59
|
+
>()
|
|
60
|
+
|
|
61
|
+
checkFields<
|
|
62
|
+
Diff<
|
|
63
|
+
{
|
|
64
|
+
__tag__: 'GET',
|
|
65
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
__tag__: 'GET',
|
|
69
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'GET'>>
|
|
70
|
+
},
|
|
71
|
+
'GET'
|
|
72
|
+
>
|
|
73
|
+
>()
|
|
74
|
+
}
|
|
75
|
+
// Check the prop type of the entry function
|
|
76
|
+
if ('HEAD' in entry) {
|
|
77
|
+
checkFields<
|
|
78
|
+
Diff<
|
|
79
|
+
ParamCheck<Request | NextRequest>,
|
|
80
|
+
{
|
|
81
|
+
__tag__: 'HEAD'
|
|
82
|
+
__param_position__: 'first'
|
|
83
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'HEAD'>>
|
|
84
|
+
},
|
|
85
|
+
'HEAD'
|
|
86
|
+
>
|
|
87
|
+
>()
|
|
88
|
+
checkFields<
|
|
89
|
+
Diff<
|
|
90
|
+
ParamCheck<RouteContext>,
|
|
91
|
+
{
|
|
92
|
+
__tag__: 'HEAD'
|
|
93
|
+
__param_position__: 'second'
|
|
94
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'HEAD'>>
|
|
95
|
+
},
|
|
96
|
+
'HEAD'
|
|
97
|
+
>
|
|
98
|
+
>()
|
|
99
|
+
|
|
100
|
+
checkFields<
|
|
101
|
+
Diff<
|
|
102
|
+
{
|
|
103
|
+
__tag__: 'HEAD',
|
|
104
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
__tag__: 'HEAD',
|
|
108
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'HEAD'>>
|
|
109
|
+
},
|
|
110
|
+
'HEAD'
|
|
111
|
+
>
|
|
112
|
+
>()
|
|
113
|
+
}
|
|
114
|
+
// Check the prop type of the entry function
|
|
115
|
+
if ('OPTIONS' in entry) {
|
|
116
|
+
checkFields<
|
|
117
|
+
Diff<
|
|
118
|
+
ParamCheck<Request | NextRequest>,
|
|
119
|
+
{
|
|
120
|
+
__tag__: 'OPTIONS'
|
|
121
|
+
__param_position__: 'first'
|
|
122
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'OPTIONS'>>
|
|
123
|
+
},
|
|
124
|
+
'OPTIONS'
|
|
125
|
+
>
|
|
126
|
+
>()
|
|
127
|
+
checkFields<
|
|
128
|
+
Diff<
|
|
129
|
+
ParamCheck<RouteContext>,
|
|
130
|
+
{
|
|
131
|
+
__tag__: 'OPTIONS'
|
|
132
|
+
__param_position__: 'second'
|
|
133
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'OPTIONS'>>
|
|
134
|
+
},
|
|
135
|
+
'OPTIONS'
|
|
136
|
+
>
|
|
137
|
+
>()
|
|
138
|
+
|
|
139
|
+
checkFields<
|
|
140
|
+
Diff<
|
|
141
|
+
{
|
|
142
|
+
__tag__: 'OPTIONS',
|
|
143
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
__tag__: 'OPTIONS',
|
|
147
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'OPTIONS'>>
|
|
148
|
+
},
|
|
149
|
+
'OPTIONS'
|
|
150
|
+
>
|
|
151
|
+
>()
|
|
152
|
+
}
|
|
153
|
+
// Check the prop type of the entry function
|
|
154
|
+
if ('POST' in entry) {
|
|
155
|
+
checkFields<
|
|
156
|
+
Diff<
|
|
157
|
+
ParamCheck<Request | NextRequest>,
|
|
158
|
+
{
|
|
159
|
+
__tag__: 'POST'
|
|
160
|
+
__param_position__: 'first'
|
|
161
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'POST'>>
|
|
162
|
+
},
|
|
163
|
+
'POST'
|
|
164
|
+
>
|
|
165
|
+
>()
|
|
166
|
+
checkFields<
|
|
167
|
+
Diff<
|
|
168
|
+
ParamCheck<RouteContext>,
|
|
169
|
+
{
|
|
170
|
+
__tag__: 'POST'
|
|
171
|
+
__param_position__: 'second'
|
|
172
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'POST'>>
|
|
173
|
+
},
|
|
174
|
+
'POST'
|
|
175
|
+
>
|
|
176
|
+
>()
|
|
177
|
+
|
|
178
|
+
checkFields<
|
|
179
|
+
Diff<
|
|
180
|
+
{
|
|
181
|
+
__tag__: 'POST',
|
|
182
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
__tag__: 'POST',
|
|
186
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'POST'>>
|
|
187
|
+
},
|
|
188
|
+
'POST'
|
|
189
|
+
>
|
|
190
|
+
>()
|
|
191
|
+
}
|
|
192
|
+
// Check the prop type of the entry function
|
|
193
|
+
if ('PUT' in entry) {
|
|
194
|
+
checkFields<
|
|
195
|
+
Diff<
|
|
196
|
+
ParamCheck<Request | NextRequest>,
|
|
197
|
+
{
|
|
198
|
+
__tag__: 'PUT'
|
|
199
|
+
__param_position__: 'first'
|
|
200
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'PUT'>>
|
|
201
|
+
},
|
|
202
|
+
'PUT'
|
|
203
|
+
>
|
|
204
|
+
>()
|
|
205
|
+
checkFields<
|
|
206
|
+
Diff<
|
|
207
|
+
ParamCheck<RouteContext>,
|
|
208
|
+
{
|
|
209
|
+
__tag__: 'PUT'
|
|
210
|
+
__param_position__: 'second'
|
|
211
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'PUT'>>
|
|
212
|
+
},
|
|
213
|
+
'PUT'
|
|
214
|
+
>
|
|
215
|
+
>()
|
|
216
|
+
|
|
217
|
+
checkFields<
|
|
218
|
+
Diff<
|
|
219
|
+
{
|
|
220
|
+
__tag__: 'PUT',
|
|
221
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
__tag__: 'PUT',
|
|
225
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'PUT'>>
|
|
226
|
+
},
|
|
227
|
+
'PUT'
|
|
228
|
+
>
|
|
229
|
+
>()
|
|
230
|
+
}
|
|
231
|
+
// Check the prop type of the entry function
|
|
232
|
+
if ('DELETE' in entry) {
|
|
233
|
+
checkFields<
|
|
234
|
+
Diff<
|
|
235
|
+
ParamCheck<Request | NextRequest>,
|
|
236
|
+
{
|
|
237
|
+
__tag__: 'DELETE'
|
|
238
|
+
__param_position__: 'first'
|
|
239
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'DELETE'>>
|
|
240
|
+
},
|
|
241
|
+
'DELETE'
|
|
242
|
+
>
|
|
243
|
+
>()
|
|
244
|
+
checkFields<
|
|
245
|
+
Diff<
|
|
246
|
+
ParamCheck<RouteContext>,
|
|
247
|
+
{
|
|
248
|
+
__tag__: 'DELETE'
|
|
249
|
+
__param_position__: 'second'
|
|
250
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'DELETE'>>
|
|
251
|
+
},
|
|
252
|
+
'DELETE'
|
|
253
|
+
>
|
|
254
|
+
>()
|
|
255
|
+
|
|
256
|
+
checkFields<
|
|
257
|
+
Diff<
|
|
258
|
+
{
|
|
259
|
+
__tag__: 'DELETE',
|
|
260
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
__tag__: 'DELETE',
|
|
264
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'DELETE'>>
|
|
265
|
+
},
|
|
266
|
+
'DELETE'
|
|
267
|
+
>
|
|
268
|
+
>()
|
|
269
|
+
}
|
|
270
|
+
// Check the prop type of the entry function
|
|
271
|
+
if ('PATCH' in entry) {
|
|
272
|
+
checkFields<
|
|
273
|
+
Diff<
|
|
274
|
+
ParamCheck<Request | NextRequest>,
|
|
275
|
+
{
|
|
276
|
+
__tag__: 'PATCH'
|
|
277
|
+
__param_position__: 'first'
|
|
278
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'PATCH'>>
|
|
279
|
+
},
|
|
280
|
+
'PATCH'
|
|
281
|
+
>
|
|
282
|
+
>()
|
|
283
|
+
checkFields<
|
|
284
|
+
Diff<
|
|
285
|
+
ParamCheck<RouteContext>,
|
|
286
|
+
{
|
|
287
|
+
__tag__: 'PATCH'
|
|
288
|
+
__param_position__: 'second'
|
|
289
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'PATCH'>>
|
|
290
|
+
},
|
|
291
|
+
'PATCH'
|
|
292
|
+
>
|
|
293
|
+
>()
|
|
294
|
+
|
|
295
|
+
checkFields<
|
|
296
|
+
Diff<
|
|
297
|
+
{
|
|
298
|
+
__tag__: 'PATCH',
|
|
299
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
__tag__: 'PATCH',
|
|
303
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'PATCH'>>
|
|
304
|
+
},
|
|
305
|
+
'PATCH'
|
|
306
|
+
>
|
|
307
|
+
>()
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// Check the arguments and return type of the generateStaticParams function
|
|
311
|
+
if ('generateStaticParams' in entry) {
|
|
312
|
+
checkFields<Diff<{ params: SegmentParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
|
|
313
|
+
checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export interface PageProps {
|
|
317
|
+
params?: Promise<SegmentParams>
|
|
318
|
+
searchParams?: Promise<any>
|
|
319
|
+
}
|
|
320
|
+
export interface LayoutProps {
|
|
321
|
+
children?: React.ReactNode
|
|
322
|
+
|
|
323
|
+
params?: Promise<SegmentParams>
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// =============
|
|
327
|
+
// Utility types
|
|
328
|
+
type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
|
|
329
|
+
|
|
330
|
+
// If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
|
|
331
|
+
type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
|
|
332
|
+
type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
|
|
333
|
+
|
|
334
|
+
type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
|
|
335
|
+
type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
|
|
336
|
+
type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
|
|
337
|
+
|
|
338
|
+
type ParamCheck<T> = {
|
|
339
|
+
__tag__: string
|
|
340
|
+
__param_position__: string
|
|
341
|
+
__param_type__: T
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
function checkFields<_ extends { [k in keyof any]: never }>() {}
|
|
345
|
+
|
|
346
|
+
// https://github.com/sindresorhus/type-fest
|
|
347
|
+
type Numeric = number | bigint
|
|
348
|
+
type Zero = 0 | 0n
|
|
349
|
+
type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
|
|
350
|
+
type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
|
|
@@ -0,0 +1,350 @@
|
|
|
1
|
+
// File: /home/runner/work/cockpit/cockpit/src/app/api/chat/kimi/route.ts
|
|
2
|
+
import * as entry from '../../../../../../src/app/api/chat/kimi/route.js'
|
|
3
|
+
import type { NextRequest } from 'next/server.js'
|
|
4
|
+
|
|
5
|
+
import type { PrefetchForTypeCheckInternal } from 'next/dist/build/segment-config/app/app-segment-config.js'
|
|
6
|
+
|
|
7
|
+
type TEntry = typeof import('../../../../../../src/app/api/chat/kimi/route.js')
|
|
8
|
+
|
|
9
|
+
type SegmentParams<T extends Object = any> = T extends Record<string, any>
|
|
10
|
+
? { [K in keyof T]: T[K] extends string ? string | string[] | undefined : never }
|
|
11
|
+
: T
|
|
12
|
+
|
|
13
|
+
// Check that the entry is a valid entry
|
|
14
|
+
checkFields<Diff<{
|
|
15
|
+
GET?: Function
|
|
16
|
+
HEAD?: Function
|
|
17
|
+
OPTIONS?: Function
|
|
18
|
+
POST?: Function
|
|
19
|
+
PUT?: Function
|
|
20
|
+
DELETE?: Function
|
|
21
|
+
PATCH?: Function
|
|
22
|
+
config?: {}
|
|
23
|
+
generateStaticParams?: Function
|
|
24
|
+
unstable_prefetch?: PrefetchForTypeCheckInternal
|
|
25
|
+
revalidate?: RevalidateRange<TEntry> | false
|
|
26
|
+
dynamic?: 'auto' | 'force-dynamic' | 'error' | 'force-static'
|
|
27
|
+
dynamicParams?: boolean
|
|
28
|
+
fetchCache?: 'auto' | 'force-no-store' | 'only-no-store' | 'default-no-store' | 'default-cache' | 'only-cache' | 'force-cache'
|
|
29
|
+
preferredRegion?: 'auto' | 'global' | 'home' | string | string[]
|
|
30
|
+
runtime?: 'nodejs' | 'experimental-edge' | 'edge'
|
|
31
|
+
maxDuration?: number
|
|
32
|
+
|
|
33
|
+
}, TEntry, ''>>()
|
|
34
|
+
|
|
35
|
+
type RouteContext = { params: Promise<SegmentParams> }
|
|
36
|
+
// Check the prop type of the entry function
|
|
37
|
+
if ('GET' in entry) {
|
|
38
|
+
checkFields<
|
|
39
|
+
Diff<
|
|
40
|
+
ParamCheck<Request | NextRequest>,
|
|
41
|
+
{
|
|
42
|
+
__tag__: 'GET'
|
|
43
|
+
__param_position__: 'first'
|
|
44
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'GET'>>
|
|
45
|
+
},
|
|
46
|
+
'GET'
|
|
47
|
+
>
|
|
48
|
+
>()
|
|
49
|
+
checkFields<
|
|
50
|
+
Diff<
|
|
51
|
+
ParamCheck<RouteContext>,
|
|
52
|
+
{
|
|
53
|
+
__tag__: 'GET'
|
|
54
|
+
__param_position__: 'second'
|
|
55
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'GET'>>
|
|
56
|
+
},
|
|
57
|
+
'GET'
|
|
58
|
+
>
|
|
59
|
+
>()
|
|
60
|
+
|
|
61
|
+
checkFields<
|
|
62
|
+
Diff<
|
|
63
|
+
{
|
|
64
|
+
__tag__: 'GET',
|
|
65
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
66
|
+
},
|
|
67
|
+
{
|
|
68
|
+
__tag__: 'GET',
|
|
69
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'GET'>>
|
|
70
|
+
},
|
|
71
|
+
'GET'
|
|
72
|
+
>
|
|
73
|
+
>()
|
|
74
|
+
}
|
|
75
|
+
// Check the prop type of the entry function
|
|
76
|
+
if ('HEAD' in entry) {
|
|
77
|
+
checkFields<
|
|
78
|
+
Diff<
|
|
79
|
+
ParamCheck<Request | NextRequest>,
|
|
80
|
+
{
|
|
81
|
+
__tag__: 'HEAD'
|
|
82
|
+
__param_position__: 'first'
|
|
83
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'HEAD'>>
|
|
84
|
+
},
|
|
85
|
+
'HEAD'
|
|
86
|
+
>
|
|
87
|
+
>()
|
|
88
|
+
checkFields<
|
|
89
|
+
Diff<
|
|
90
|
+
ParamCheck<RouteContext>,
|
|
91
|
+
{
|
|
92
|
+
__tag__: 'HEAD'
|
|
93
|
+
__param_position__: 'second'
|
|
94
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'HEAD'>>
|
|
95
|
+
},
|
|
96
|
+
'HEAD'
|
|
97
|
+
>
|
|
98
|
+
>()
|
|
99
|
+
|
|
100
|
+
checkFields<
|
|
101
|
+
Diff<
|
|
102
|
+
{
|
|
103
|
+
__tag__: 'HEAD',
|
|
104
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
105
|
+
},
|
|
106
|
+
{
|
|
107
|
+
__tag__: 'HEAD',
|
|
108
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'HEAD'>>
|
|
109
|
+
},
|
|
110
|
+
'HEAD'
|
|
111
|
+
>
|
|
112
|
+
>()
|
|
113
|
+
}
|
|
114
|
+
// Check the prop type of the entry function
|
|
115
|
+
if ('OPTIONS' in entry) {
|
|
116
|
+
checkFields<
|
|
117
|
+
Diff<
|
|
118
|
+
ParamCheck<Request | NextRequest>,
|
|
119
|
+
{
|
|
120
|
+
__tag__: 'OPTIONS'
|
|
121
|
+
__param_position__: 'first'
|
|
122
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'OPTIONS'>>
|
|
123
|
+
},
|
|
124
|
+
'OPTIONS'
|
|
125
|
+
>
|
|
126
|
+
>()
|
|
127
|
+
checkFields<
|
|
128
|
+
Diff<
|
|
129
|
+
ParamCheck<RouteContext>,
|
|
130
|
+
{
|
|
131
|
+
__tag__: 'OPTIONS'
|
|
132
|
+
__param_position__: 'second'
|
|
133
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'OPTIONS'>>
|
|
134
|
+
},
|
|
135
|
+
'OPTIONS'
|
|
136
|
+
>
|
|
137
|
+
>()
|
|
138
|
+
|
|
139
|
+
checkFields<
|
|
140
|
+
Diff<
|
|
141
|
+
{
|
|
142
|
+
__tag__: 'OPTIONS',
|
|
143
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
144
|
+
},
|
|
145
|
+
{
|
|
146
|
+
__tag__: 'OPTIONS',
|
|
147
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'OPTIONS'>>
|
|
148
|
+
},
|
|
149
|
+
'OPTIONS'
|
|
150
|
+
>
|
|
151
|
+
>()
|
|
152
|
+
}
|
|
153
|
+
// Check the prop type of the entry function
|
|
154
|
+
if ('POST' in entry) {
|
|
155
|
+
checkFields<
|
|
156
|
+
Diff<
|
|
157
|
+
ParamCheck<Request | NextRequest>,
|
|
158
|
+
{
|
|
159
|
+
__tag__: 'POST'
|
|
160
|
+
__param_position__: 'first'
|
|
161
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'POST'>>
|
|
162
|
+
},
|
|
163
|
+
'POST'
|
|
164
|
+
>
|
|
165
|
+
>()
|
|
166
|
+
checkFields<
|
|
167
|
+
Diff<
|
|
168
|
+
ParamCheck<RouteContext>,
|
|
169
|
+
{
|
|
170
|
+
__tag__: 'POST'
|
|
171
|
+
__param_position__: 'second'
|
|
172
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'POST'>>
|
|
173
|
+
},
|
|
174
|
+
'POST'
|
|
175
|
+
>
|
|
176
|
+
>()
|
|
177
|
+
|
|
178
|
+
checkFields<
|
|
179
|
+
Diff<
|
|
180
|
+
{
|
|
181
|
+
__tag__: 'POST',
|
|
182
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
183
|
+
},
|
|
184
|
+
{
|
|
185
|
+
__tag__: 'POST',
|
|
186
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'POST'>>
|
|
187
|
+
},
|
|
188
|
+
'POST'
|
|
189
|
+
>
|
|
190
|
+
>()
|
|
191
|
+
}
|
|
192
|
+
// Check the prop type of the entry function
|
|
193
|
+
if ('PUT' in entry) {
|
|
194
|
+
checkFields<
|
|
195
|
+
Diff<
|
|
196
|
+
ParamCheck<Request | NextRequest>,
|
|
197
|
+
{
|
|
198
|
+
__tag__: 'PUT'
|
|
199
|
+
__param_position__: 'first'
|
|
200
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'PUT'>>
|
|
201
|
+
},
|
|
202
|
+
'PUT'
|
|
203
|
+
>
|
|
204
|
+
>()
|
|
205
|
+
checkFields<
|
|
206
|
+
Diff<
|
|
207
|
+
ParamCheck<RouteContext>,
|
|
208
|
+
{
|
|
209
|
+
__tag__: 'PUT'
|
|
210
|
+
__param_position__: 'second'
|
|
211
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'PUT'>>
|
|
212
|
+
},
|
|
213
|
+
'PUT'
|
|
214
|
+
>
|
|
215
|
+
>()
|
|
216
|
+
|
|
217
|
+
checkFields<
|
|
218
|
+
Diff<
|
|
219
|
+
{
|
|
220
|
+
__tag__: 'PUT',
|
|
221
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
222
|
+
},
|
|
223
|
+
{
|
|
224
|
+
__tag__: 'PUT',
|
|
225
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'PUT'>>
|
|
226
|
+
},
|
|
227
|
+
'PUT'
|
|
228
|
+
>
|
|
229
|
+
>()
|
|
230
|
+
}
|
|
231
|
+
// Check the prop type of the entry function
|
|
232
|
+
if ('DELETE' in entry) {
|
|
233
|
+
checkFields<
|
|
234
|
+
Diff<
|
|
235
|
+
ParamCheck<Request | NextRequest>,
|
|
236
|
+
{
|
|
237
|
+
__tag__: 'DELETE'
|
|
238
|
+
__param_position__: 'first'
|
|
239
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'DELETE'>>
|
|
240
|
+
},
|
|
241
|
+
'DELETE'
|
|
242
|
+
>
|
|
243
|
+
>()
|
|
244
|
+
checkFields<
|
|
245
|
+
Diff<
|
|
246
|
+
ParamCheck<RouteContext>,
|
|
247
|
+
{
|
|
248
|
+
__tag__: 'DELETE'
|
|
249
|
+
__param_position__: 'second'
|
|
250
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'DELETE'>>
|
|
251
|
+
},
|
|
252
|
+
'DELETE'
|
|
253
|
+
>
|
|
254
|
+
>()
|
|
255
|
+
|
|
256
|
+
checkFields<
|
|
257
|
+
Diff<
|
|
258
|
+
{
|
|
259
|
+
__tag__: 'DELETE',
|
|
260
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
261
|
+
},
|
|
262
|
+
{
|
|
263
|
+
__tag__: 'DELETE',
|
|
264
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'DELETE'>>
|
|
265
|
+
},
|
|
266
|
+
'DELETE'
|
|
267
|
+
>
|
|
268
|
+
>()
|
|
269
|
+
}
|
|
270
|
+
// Check the prop type of the entry function
|
|
271
|
+
if ('PATCH' in entry) {
|
|
272
|
+
checkFields<
|
|
273
|
+
Diff<
|
|
274
|
+
ParamCheck<Request | NextRequest>,
|
|
275
|
+
{
|
|
276
|
+
__tag__: 'PATCH'
|
|
277
|
+
__param_position__: 'first'
|
|
278
|
+
__param_type__: FirstArg<MaybeField<TEntry, 'PATCH'>>
|
|
279
|
+
},
|
|
280
|
+
'PATCH'
|
|
281
|
+
>
|
|
282
|
+
>()
|
|
283
|
+
checkFields<
|
|
284
|
+
Diff<
|
|
285
|
+
ParamCheck<RouteContext>,
|
|
286
|
+
{
|
|
287
|
+
__tag__: 'PATCH'
|
|
288
|
+
__param_position__: 'second'
|
|
289
|
+
__param_type__: SecondArg<MaybeField<TEntry, 'PATCH'>>
|
|
290
|
+
},
|
|
291
|
+
'PATCH'
|
|
292
|
+
>
|
|
293
|
+
>()
|
|
294
|
+
|
|
295
|
+
checkFields<
|
|
296
|
+
Diff<
|
|
297
|
+
{
|
|
298
|
+
__tag__: 'PATCH',
|
|
299
|
+
__return_type__: Response | void | never | Promise<Response | void | never>
|
|
300
|
+
},
|
|
301
|
+
{
|
|
302
|
+
__tag__: 'PATCH',
|
|
303
|
+
__return_type__: ReturnType<MaybeField<TEntry, 'PATCH'>>
|
|
304
|
+
},
|
|
305
|
+
'PATCH'
|
|
306
|
+
>
|
|
307
|
+
>()
|
|
308
|
+
}
|
|
309
|
+
|
|
310
|
+
// Check the arguments and return type of the generateStaticParams function
|
|
311
|
+
if ('generateStaticParams' in entry) {
|
|
312
|
+
checkFields<Diff<{ params: SegmentParams }, FirstArg<MaybeField<TEntry, 'generateStaticParams'>>, 'generateStaticParams'>>()
|
|
313
|
+
checkFields<Diff<{ __tag__: 'generateStaticParams', __return_type__: any[] | Promise<any[]> }, { __tag__: 'generateStaticParams', __return_type__: ReturnType<MaybeField<TEntry, 'generateStaticParams'>> }>>()
|
|
314
|
+
}
|
|
315
|
+
|
|
316
|
+
export interface PageProps {
|
|
317
|
+
params?: Promise<SegmentParams>
|
|
318
|
+
searchParams?: Promise<any>
|
|
319
|
+
}
|
|
320
|
+
export interface LayoutProps {
|
|
321
|
+
children?: React.ReactNode
|
|
322
|
+
|
|
323
|
+
params?: Promise<SegmentParams>
|
|
324
|
+
}
|
|
325
|
+
|
|
326
|
+
// =============
|
|
327
|
+
// Utility types
|
|
328
|
+
type RevalidateRange<T> = T extends { revalidate: any } ? NonNegative<T['revalidate']> : never
|
|
329
|
+
|
|
330
|
+
// If T is unknown or any, it will be an empty {} type. Otherwise, it will be the same as Omit<T, keyof Base>.
|
|
331
|
+
type OmitWithTag<T, K extends keyof any, _M> = Omit<T, K>
|
|
332
|
+
type Diff<Base, T extends Base, Message extends string = ''> = 0 extends (1 & T) ? {} : OmitWithTag<T, keyof Base, Message>
|
|
333
|
+
|
|
334
|
+
type FirstArg<T extends Function> = T extends (...args: [infer T, any]) => any ? unknown extends T ? any : T : never
|
|
335
|
+
type SecondArg<T extends Function> = T extends (...args: [any, infer T]) => any ? unknown extends T ? any : T : never
|
|
336
|
+
type MaybeField<T, K extends string> = T extends { [k in K]: infer G } ? G extends Function ? G : never : never
|
|
337
|
+
|
|
338
|
+
type ParamCheck<T> = {
|
|
339
|
+
__tag__: string
|
|
340
|
+
__param_position__: string
|
|
341
|
+
__param_type__: T
|
|
342
|
+
}
|
|
343
|
+
|
|
344
|
+
function checkFields<_ extends { [k in keyof any]: never }>() {}
|
|
345
|
+
|
|
346
|
+
// https://github.com/sindresorhus/type-fest
|
|
347
|
+
type Numeric = number | bigint
|
|
348
|
+
type Zero = 0 | 0n
|
|
349
|
+
type Negative<T extends Numeric> = T extends Zero ? never : `${T}` extends `-${string}` ? T : never
|
|
350
|
+
type NonNegative<T extends Numeric> = T extends Zero ? T : Negative<T> extends never ? T : '__invalid_negative_number__'
|