@surething/cockpit 1.0.193 → 1.0.195
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 +5 -4
- package/.next-prod/build-manifest.json +3 -3
- package/.next-prod/prerender-manifest.json +3 -3
- package/.next-prod/react-loadable-manifest.json +1 -1
- package/.next-prod/routes-manifest.json +6 -0
- package/.next-prod/server/app/_global-error/page.js +3 -3
- package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/_global-error.html +1 -1
- 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.js +2 -2
- 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.js +1 -1
- package/.next-prod/server/app/api/chat/codex/route.js +2 -2
- package/.next-prod/server/app/api/chat/deepseek/route.js +16 -0
- package/.next-prod/server/app/api/chat/deepseek/route.js.nft.json +1 -0
- package/.next-prod/server/app/api/chat/deepseek/route_client-reference-manifest.js +1 -0
- package/.next-prod/server/app/api/chat/kimi/route.js +13 -13
- package/.next-prod/server/app/api/chat/ollama/route.js +2 -2
- package/.next-prod/server/app/api/chat/route.js +1 -1
- package/.next-prod/server/app/api/claude-stats/route.js +1 -1
- package/.next-prod/server/app/api/commands/route.js +1 -1
- package/.next-prod/server/app/api/comments/route.js +1 -1
- package/.next-prod/server/app/api/db/columns/route.js +2 -2
- package/.next-prod/server/app/api/db/connect/route.js +1 -1
- package/.next-prod/server/app/api/db/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/db/export/route.js +1 -1
- package/.next-prod/server/app/api/db/query/route.js +1 -1
- package/.next-prod/server/app/api/db/schemas/route.js +1 -1
- package/.next-prod/server/app/api/extension/version/route.js +1 -1
- package/.next-prod/server/app/api/file/route.js +1 -1
- package/.next-prod/server/app/api/files/blame/route.js +1 -1
- package/.next-prod/server/app/api/files/clipboard/route.js +1 -1
- package/.next-prod/server/app/api/files/copy/route.js +1 -1
- package/.next-prod/server/app/api/files/delete/route.js +1 -1
- package/.next-prod/server/app/api/files/expanded/route.js +1 -1
- package/.next-prod/server/app/api/files/index/route.js +1 -1
- package/.next-prod/server/app/api/files/init/route.js +1 -1
- package/.next-prod/server/app/api/files/paste/route.js +1 -1
- package/.next-prod/server/app/api/files/read/route.js +1 -1
- package/.next-prod/server/app/api/files/readdir/route.js +1 -1
- package/.next-prod/server/app/api/files/recent/route.js +1 -1
- package/.next-prod/server/app/api/files/save/route.js +1 -1
- package/.next-prod/server/app/api/files/search/route.js +1 -1
- package/.next-prod/server/app/api/files/stat/route.js +1 -1
- package/.next-prod/server/app/api/files/text/route.js +1 -1
- package/.next-prod/server/app/api/git/branch-diff/route.js +1 -1
- package/.next-prod/server/app/api/git/branches/route.js +1 -1
- package/.next-prod/server/app/api/git/commit-diff/route.js +1 -1
- package/.next-prod/server/app/api/git/commits/route.js +1 -1
- package/.next-prod/server/app/api/git/diff/route.js +1 -1
- package/.next-prod/server/app/api/git/discard/route.js +1 -1
- package/.next-prod/server/app/api/git/stage/route.js +1 -1
- package/.next-prod/server/app/api/git/status/route.js +1 -1
- package/.next-prod/server/app/api/git/unstage/route.js +1 -1
- package/.next-prod/server/app/api/git/worktree/route.js +1 -1
- package/.next-prod/server/app/api/global-state/route.js +1 -1
- package/.next-prod/server/app/api/jupyter/load/route.js +1 -1
- package/.next-prod/server/app/api/jupyter/save/route.js +1 -1
- package/.next-prod/server/app/api/jupyter/shutdown/route.js +1 -1
- package/.next-prod/server/app/api/lsp/definition/route.js +1 -1
- package/.next-prod/server/app/api/lsp/hover/route.js +1 -1
- package/.next-prod/server/app/api/lsp/references/route.js +1 -1
- package/.next-prod/server/app/api/lsp/status/route.js +1 -1
- package/.next-prod/server/app/api/lsp/warmup/route.js +1 -1
- package/.next-prod/server/app/api/mysql/columns/route.js +2 -2
- package/.next-prod/server/app/api/mysql/connect/route.js +1 -1
- package/.next-prod/server/app/api/mysql/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/mysql/export/route.js +1 -1
- package/.next-prod/server/app/api/mysql/query/route.js +1 -1
- package/.next-prod/server/app/api/mysql/schemas/route.js +2 -2
- package/.next-prod/server/app/api/neo4j/connect/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/query/route.js +1 -1
- package/.next-prod/server/app/api/neo4j/schema/route.js +1 -1
- package/.next-prod/server/app/api/note/route.js +1 -1
- package/.next-prod/server/app/api/ollama/models/route.js +1 -1
- package/.next-prod/server/app/api/ollama/start/route.js +1 -1
- package/.next-prod/server/app/api/open-cursor/route.js +1 -1
- package/.next-prod/server/app/api/open-vscode/route.js +1 -1
- package/.next-prod/server/app/api/pick-folder/route.js +1 -1
- package/.next-prod/server/app/api/pinned-sessions/route.js +1 -1
- package/.next-prod/server/app/api/project-settings/route.js +1 -1
- package/.next-prod/server/app/api/project-state/route.js +1 -1
- package/.next-prod/server/app/api/projects/route.js +1 -1
- package/.next-prod/server/app/api/redis/command/route.js +1 -1
- package/.next-prod/server/app/api/redis/connect/route.js +1 -1
- package/.next-prod/server/app/api/redis/delete/route.js +1 -1
- package/.next-prod/server/app/api/redis/disconnect/route.js +1 -1
- package/.next-prod/server/app/api/redis/get/route.js +1 -1
- package/.next-prod/server/app/api/redis/keys/route.js +1 -1
- package/.next-prod/server/app/api/redis/set/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/comments/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/replies/route.js +1 -1
- package/.next-prod/server/app/api/review/[id]/route.js +1 -1
- package/.next-prod/server/app/api/review/identify/route.js +1 -1
- package/.next-prod/server/app/api/review/order/route.js +1 -1
- package/.next-prod/server/app/api/review/route.js +1 -1
- package/.next-prod/server/app/api/review/share-info/route.js +1 -1
- package/.next-prod/server/app/api/review/users/route.js +1 -1
- package/.next-prod/server/app/api/scheduled-tasks/route.js +1 -1
- package/.next-prod/server/app/api/services/config/route.js +1 -1
- package/.next-prod/server/app/api/services/scripts/route.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/fork/route.js +1 -1
- package/.next-prod/server/app/api/session/[sessionId]/history/route.js +1 -1
- package/.next-prod/server/app/api/session-by-path/route.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js +1 -1
- package/.next-prod/server/app/api/sessions/projects/route.js +1 -1
- package/.next-prod/server/app/api/sessions/route.js +1 -1
- package/.next-prod/server/app/api/settings/route.js +1 -1
- package/.next-prod/server/app/api/skills/[id]/route.js +1 -1
- package/.next-prod/server/app/api/skills/content/route.js +1 -1
- package/.next-prod/server/app/api/skills/route.js +1 -1
- package/.next-prod/server/app/api/terminal/aliases/route.js +1 -1
- package/.next-prod/server/app/api/terminal/autocomplete/route.js +1 -1
- package/.next-prod/server/app/api/terminal/bubble-order/route.js +1 -1
- package/.next-prod/server/app/api/terminal/env/route.js +1 -1
- package/.next-prod/server/app/api/terminal/history/route.js +1 -1
- package/.next-prod/server/app/api/version/route.js +1 -1
- package/.next-prod/server/app/favicon.ico/route.js +1 -1
- package/.next-prod/server/app/manifest.webmanifest/route.js +2 -2
- package/.next-prod/server/app/page.js +3 -3
- package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/project/page.js +5 -5
- package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app/review/[id]/page.js +2 -2
- package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
- package/.next-prod/server/app-paths-manifest.json +5 -4
- package/.next-prod/server/chunks/4098.js +1 -1
- package/.next-prod/server/chunks/4490.js +1 -1
- package/.next-prod/server/chunks/5394.js +1 -1
- package/.next-prod/server/middleware-build-manifest.js +1 -1
- package/.next-prod/server/middleware-react-loadable-manifest.js +1 -1
- package/.next-prod/server/pages/404.html +2 -2
- package/.next-prod/server/pages/500.html +1 -1
- package/.next-prod/server/server-reference-manifest.json +1 -1
- package/.next-prod/static/chunks/{700.0aaec5a3a570d182.js → 700.642136ad4fbe16ca.js} +4 -4
- package/.next-prod/static/chunks/app/{api/bash/route-94e40d01eb0846a0.js → _global-error/page-aa58df485295770f.js} +1 -1
- package/.next-prod/static/chunks/app/api/{chat/codex/route-94e40d01eb0846a0.js → bash/route-aa58df485295770f.js} +1 -1
- package/.next-prod/static/chunks/app/api/chat/{kimi/route-94e40d01eb0846a0.js → codex/route-aa58df485295770f.js} +1 -1
- package/.next-prod/static/chunks/app/{_global-error/page-94e40d01eb0846a0.js → api/chat/deepseek/route-aa58df485295770f.js} +1 -1
- package/.next-prod/static/chunks/app/api/chat/kimi/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/ollama/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/chat/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/claude-stats/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/commands/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/comments/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/db/columns/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/db/connect/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/db/disconnect/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/db/export/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/db/query/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/db/schemas/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/extension/version/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/file/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/blame/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/clipboard/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/copy/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/delete/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/expanded/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/index/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/init/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/paste/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/read/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/readdir/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/recent/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/save/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/search/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/stat/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/files/text/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/branch-diff/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/branches/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/commit-diff/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/commits/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/diff/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/discard/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/stage/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/status/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/unstage/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/git/worktree/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/global-state/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/load/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/save/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/definition/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/hover/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/references/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/status/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/lsp/warmup/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/columns/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/connect/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/disconnect/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/export/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/query/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/mysql/schemas/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/connect/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/query/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/neo4j/schema/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/note/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/models/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/ollama/start/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/open-cursor/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/open-vscode/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/pick-folder/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/pinned-sessions/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/project-settings/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/project-state/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/projects/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/command/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/connect/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/delete/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/disconnect/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/get/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/keys/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/redis/set/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/comments/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/replies/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/[id]/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/identify/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/order/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/share-info/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/review/users/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/scheduled-tasks/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/services/config/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/services/scripts/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/session-by-path/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/projects/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/sessions/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/settings/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/[id]/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/content/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/skills/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/aliases/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/env/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/terminal/history/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/api/version/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/manifest.webmanifest/route-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/app/project/page-3a148e22b1d92a17.js +29 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-aa58df485295770f.js +1 -0
- package/.next-prod/static/chunks/{webpack-9a8ea3995034c536.js → webpack-c669c0003eb75661.js} +1 -1
- package/.next-prod/static/css/083cb04521b4969d.css +1 -0
- package/.next-prod/static/iLRBjFXcqOGmNS619Y9Uo/_buildManifest.js +1 -0
- package/.next-prod/trace +12 -12
- package/.next-prod/trace-build +1 -1
- package/.next-prod/types/app/api/chat/deepseek/route.ts +351 -0
- package/.next-prod/types/routes.d.ts +2 -1
- package/.next-prod/types/validator.ts +9 -0
- package/dist/{chunk-ZDTXJE6Z.mjs → chunk-J6PMXUI4.mjs} +2 -0
- package/dist/scheduledTasks.mjs +1 -1
- package/dist/wsServer.mjs +1 -1
- package/package.json +1 -1
- package/.next-prod/static/9osElWlkhv6tmFTniHsfB/_buildManifest.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/ollama/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/chat/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/claude-stats/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/commands/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/comments/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/db/columns/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/db/connect/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/db/disconnect/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/db/export/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/db/query/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/db/schemas/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/extension/version/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/file/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/blame/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/clipboard/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/copy/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/delete/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/expanded/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/index/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/init/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/paste/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/read/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/readdir/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/recent/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/save/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/search/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/stat/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/files/text/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/git/branch-diff/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/git/branches/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/git/commit-diff/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/git/commits/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/git/diff/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/git/discard/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/git/stage/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/git/status/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/git/unstage/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/git/worktree/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/global-state/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/load/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/save/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/definition/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/hover/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/references/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/status/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/lsp/warmup/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/columns/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/connect/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/disconnect/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/export/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/query/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/mysql/schemas/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/connect/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/query/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/neo4j/schema/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/note/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/ollama/models/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/ollama/start/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/open-cursor/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/open-vscode/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/pick-folder/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/pinned-sessions/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/project-settings/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/project-state/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/projects/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/command/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/connect/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/delete/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/disconnect/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/get/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/keys/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/redis/set/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/comments/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/replies/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/review/[id]/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/review/identify/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/review/order/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/review/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/review/share-info/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/review/users/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/scheduled-tasks/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/services/config/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/services/scripts/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/session-by-path/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/projects/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/sessions/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/settings/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/[id]/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/content/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/skills/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/aliases/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/env/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/terminal/history/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/api/version/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/manifest.webmanifest/route-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/app/project/page-66c22be12277e5c1.js +0 -29
- package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-94e40d01eb0846a0.js +0 -1
- package/.next-prod/static/css/49923bb0dd70e411.css +0 -1
- /package/.next-prod/static/{9osElWlkhv6tmFTniHsfB → iLRBjFXcqOGmNS619Y9Uo}/_ssgManifest.js +0 -0
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=8250,a.ids=[8250],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},4984:a=>{"use strict";a.exports=require("readline")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},21820:a=>{"use strict";a.exports=require("os")},25813:(a,b,c)=>{"use strict";c.d(b,{$A:()=>J,A0:()=>T,An:()=>W,BF:()=>F,Ct:()=>N,Eu:()=>E,Ex:()=>t,GB:()=>q,JE:()=>V,JY:()=>I,Ki:()=>z,Kk:()=>O,Kv:()=>j,LN:()=>k,Mx:()=>A,O0:()=>y,Sr:()=>G,Tb:()=>r,Ux:()=>Y,Wd:()=>U,aO:()=>m,at:()=>x,ec:()=>n,eg:()=>R,h9:()=>w,i4:()=>D,iK:()=>o,iy:()=>M,lq:()=>C,ls:()=>H,mT:()=>v,oK:()=>L,oZ:()=>P,of:()=>B,po:()=>K,tP:()=>p,th:()=>u,v4:()=>l,vI:()=>S,yw:()=>Q});var d=c(21820),e=c(33873),f=c(79748),g=c(29021),h=c(79646);let i=(0,d.homedir)(),j=(0,e.join)(i,".cockpit"),k=(0,e.join)(j,"projects"),l=(0,e.join)(j,"state.json"),m=(0,e.join)(j,"pinned-sessions.json"),n=(0,e.join)(j,"note.md"),o=(0,e.join)(j,"scheduled-tasks.json"),p=(0,e.join)(j,"settings.json"),q=(0,e.join)(j,"skills.json"),r=(0,e.join)(j,"review"),s=(0,e.join)(r,"_signal");function t(){try{(0,g.existsSync)(r)||(0,g.mkdirSync)(r,{recursive:!0}),(0,g.writeFileSync)(s,Date.now().toString())}catch{}}let u=(0,e.join)(i,".claude"),v=(0,e.join)(u,"projects"),w=(0,e.join)(i,".claude2"),x=(0,e.join)(w,"projects");function y(a){return a.replace(/[/.]/g,"-")}function z(a){return(0,e.join)(k,y(a))}function A(a){return(0,e.join)(z(a),"session.json")}function B(a){return(0,e.join)(z(a),"recent-files.json")}function C(a){return(0,e.join)(z(a),"expanded-paths.json")}function D(a){return(0,e.join)(z(a),"comments.json")}function E(a){return(0,e.join)(z(a),"services.json")}function F(a){return(0,e.join)(z(a),"note.md")}function G(a,b){return(0,e.join)(z(a),`terminal-history-${b}.jsonl`)}function H(a,b){return(0,e.join)(z(a),`terminal-output-${b}.txt`)}function I(a,b){let c=b?`terminal-env-${b}.json`:"terminal-env-global.json";return(0,e.join)(z(a),c)}function J(){return(0,e.join)(j,"terminal-aliases.json")}function K(){return(0,e.join)(j,"services.json")}function L(a){return(0,e.join)(z(a),"project-settings.json")}function M(a,b){return(0,e.join)(z(a),`terminal-bubble-order-${b}.json`)}function N(a){return(0,e.join)(r,`${a}.json`)}function O(a,b){return(0,e.join)((0,e.join)(v,y(a)),`${b}.jsonl`)}function P(a,b){return(0,e.join)((0,e.join)(x,y(a)),`${b}.jsonl`)}function Q(a,b){return(0,e.join)((0,e.join)(j,"ollama-sessions",y(a)),`${b}.jsonl`)}function R(a){let b=(0,e.join)(i,".codex","sessions");if(!(0,g.existsSync)(b))return null;try{let c=(0,h.execSync)(`find ${JSON.stringify(b)} -name "*${a}.jsonl" -type f 2>/dev/null`,{encoding:"utf8",timeout:3e3}).trim();if(c)return c.split("\n")[0]}catch{}return null}function S(a){let b=(0,e.join)(i,".kimi","sessions");if(!(0,g.existsSync)(b))return null;try{for(let c of(0,g.readdirSync)(b)){let d=(0,e.join)(b,c,a,"context.jsonl");if((0,g.existsSync)(d))return d}}catch{}return null}async function T(a){(0,g.existsSync)(a)||await (0,f.mkdir)(a,{recursive:!0})}async function U(a){let b=(0,e.join)(a,"..");await T(b)}async function V(a,b){try{let b=await (0,f.readFile)(a,"utf-8");return JSON.parse(b)}catch{return b}}async function W(a,b){await U(a),await (0,f.writeFile)(a,JSON.stringify(b,null,2),"utf-8")}let X=new Map;function Y(a,b){let c=(X.get(a)??Promise.resolve()).then(b),d=c.then(()=>{},()=>{});return X.set(a,d),d.then(()=>{X.get(a)===d&&X.delete(a)}),c}},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},73748:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>M,patchFetch:()=>L,routeModule:()=>H,serverHooks:()=>K,workAsyncStorage:()=>I,workUnitAsyncStorage:()=>J});var d={};c.r(d),c.d(d,{GET:()=>G,dynamic:()=>B,runtime:()=>A});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(79748),w=c(33873),x=c(29021),y=c(4984),z=c(25813);let A="nodejs",B="force-dynamic";async function C(a){let b,c={},d=new Map,e=new Map,f={},g=0,h=0,i="",j=new Set,k=new Map;try{b=await (0,v.readdir)(a)}catch{return null}for(let h of b){let b,l=(0,w.join)(a,h);try{b=await (0,v.readdir)(l)}catch{continue}for(let a of b){if(!a.endsWith(".jsonl"))continue;let b=(0,w.join)(l,a);try{await D(b,{modelUsage:c,dailyMap:d,dailyTokenMap:e,hourCounts:f,sessionIds:j,sessionTimes:k,onMessage:()=>{g++},onFirstDate:a=>{(!i||a<i)&&(i=a)}})}catch{}}}h=j.size;let l=0,m="";for(let[a,b]of k){let c=b.end-b.start;c>l&&(l=c,m=a)}return{modelUsage:c,dailyActivity:Array.from(d.entries()).map(([a,b])=>({date:a,messageCount:b.messages,sessionCount:b.sessions.size,toolCallCount:b.toolCalls})).sort((a,b)=>a.date.localeCompare(b.date)),dailyModelTokens:Array.from(e.entries()).map(([a,b])=>({date:a,tokensByModel:b})).sort((a,b)=>a.date.localeCompare(b.date)),hourCounts:f,totalSessions:h,totalMessages:g,longestSession:l>0?{sessionId:m,duration:l}:void 0,firstSessionDate:i||void 0}}async function D(a,b){for await(let c of(0,y.createInterface)({input:(0,x.createReadStream)(a,{encoding:"utf-8"}),crlfDelay:1/0})){let a;if(!c)continue;try{a=JSON.parse(c)}catch{continue}let d=a.type,e=a.sessionId,f=a.timestamp;if(e&&b.sessionIds.add(e),e&&f){let a=new Date(f).getTime();if(!isNaN(a)){let c=b.sessionTimes.get(e);c?(a<c.start&&(c.start=a),a>c.end&&(c.end=a)):b.sessionTimes.set(e,{start:a,end:a})}}let g=f?.slice(0,10);if(g&&b.onFirstDate(g),f&&"user"===d){let a=new Date(f).getHours();isNaN(a)||(b.hourCounts[String(a)]=(b.hourCounts[String(a)]||0)+1)}if("user"===d&&(b.onMessage(),g&&e)){b.dailyMap.has(g)||b.dailyMap.set(g,{messages:0,sessions:new Set,toolCalls:0});let a=b.dailyMap.get(g);a.messages++,a.sessions.add(e)}if("assistant"===d){b.onMessage();let c=a.message;if(!c)continue;let d=c.model,e=c.usage;if(d&&e){b.modelUsage[d]||(b.modelUsage[d]={inputTokens:0,outputTokens:0,cacheReadInputTokens:0,cacheCreationInputTokens:0,webSearchRequests:0});let a=b.modelUsage[d];a.inputTokens+=e.input_tokens||0,a.outputTokens+=e.output_tokens||0,a.cacheReadInputTokens+=e.cache_read_input_tokens||0,a.cacheCreationInputTokens+=e.cache_creation_input_tokens||0;let c=(e.input_tokens||0)+(e.output_tokens||0)+(e.cache_read_input_tokens||0)+(e.cache_creation_input_tokens||0);if(g){b.dailyTokenMap.has(g)||b.dailyTokenMap.set(g,{});let a=b.dailyTokenMap.get(g);a[d]=(a[d]||0)+c}}let f=c.content;if(Array.isArray(f)&&g){let a=f.filter(a=>"tool_use"===a.type).length;a>0&&(b.dailyMap.has(g)||b.dailyMap.set(g,{messages:0,sessions:new Set,toolCalls:0}),b.dailyMap.get(g).toolCalls+=a)}}}}async function E(a){try{let b=await (0,v.stat)(a);if(Date.now()-b.mtimeMs<3e5){let b=await (0,v.readFile)(a,"utf-8");return JSON.parse(b)}}catch{}return null}async function F(a,b){try{await (0,z.A0)(z.Kv),await (0,v.writeFile)(a,JSON.stringify(b),"utf-8")}catch{}}async function G(a){try{let{searchParams:b}=new URL(a.url),c=b.get("engine")||"claude",d="claude2"===c?(0,w.join)(z.h9,"projects"):(0,w.join)(z.th,"projects"),e="claude2"===c?(0,w.join)(z.Kv,"stats-cache-claude2.json"):(0,w.join)(z.Kv,"stats-cache.json"),f=await E(e);if(f)return Response.json(f);let g=await C(d);if(!g)return Response.json({error:"Projects directory not found"},{status:404});return await F(e,g),Response.json(g)}catch(a){return Response.json({error:String(a)},{status:500})}}let H=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/claude-stats/route",pathname:"/api/claude-stats",filename:"route",bundlePath:"app/api/claude-stats/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/claude-stats/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:I,workUnitAsyncStorage:J,serverHooks:K}=H;function L(){return(0,g.patchFetch)({workAsyncStorage:I,workUnitAsyncStorage:J})}async function M(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),H.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/claude-stats/route";"/index"===d&&(d="/");let e=await H.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:D,clientReferenceManifest:E,serverActionsManifest:F}=e,G=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[G]||z.routes[D]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[D],b=z.dynamicRoutes[G];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||H.isDev||y||(K="/index"===(K=D)?"/":K);let L=!0===H.isDev||!I,M=I&&!L;F&&E&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:E,serverActionsManifest:F});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await H.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>H.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>H.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&B&&C&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await H.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await H.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",B?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await H.onRequestError(a,b,{routerKind:"App Router",routePath:G,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},79748:a=>{"use strict";a.exports=require("fs/promises")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741],()=>b(b.s=73748));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=8250,a.ids=[8250],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},4984:a=>{"use strict";a.exports=require("readline")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},21820:a=>{"use strict";a.exports=require("os")},25813:(a,b,c)=>{"use strict";c.d(b,{$A:()=>L,A0:()=>W,An:()=>Z,BF:()=>H,Ct:()=>P,Eu:()=>G,Ex:()=>t,GB:()=>q,JE:()=>Y,JY:()=>K,Ki:()=>B,Kk:()=>Q,Kv:()=>j,LN:()=>k,Mx:()=>C,O0:()=>A,Sr:()=>I,Tb:()=>r,Ux:()=>_,Wd:()=>X,aO:()=>m,at:()=>x,ec:()=>n,eg:()=>U,h9:()=>w,i4:()=>F,iK:()=>o,im:()=>S,iy:()=>O,lT:()=>y,lq:()=>E,ls:()=>J,mT:()=>v,oK:()=>N,oZ:()=>R,of:()=>D,po:()=>M,tP:()=>p,th:()=>u,v4:()=>l,vI:()=>V,yw:()=>T});var d=c(21820),e=c(33873),f=c(79748),g=c(29021),h=c(79646);let i=(0,d.homedir)(),j=(0,e.join)(i,".cockpit"),k=(0,e.join)(j,"projects"),l=(0,e.join)(j,"state.json"),m=(0,e.join)(j,"pinned-sessions.json"),n=(0,e.join)(j,"note.md"),o=(0,e.join)(j,"scheduled-tasks.json"),p=(0,e.join)(j,"settings.json"),q=(0,e.join)(j,"skills.json"),r=(0,e.join)(j,"review"),s=(0,e.join)(r,"_signal");function t(){try{(0,g.existsSync)(r)||(0,g.mkdirSync)(r,{recursive:!0}),(0,g.writeFileSync)(s,Date.now().toString())}catch{}}let u=(0,e.join)(i,".claude"),v=(0,e.join)(u,"projects"),w=(0,e.join)(i,".claude2"),x=(0,e.join)(w,"projects"),y=(0,e.join)(j,"deepseek"),z=(0,e.join)(y,"projects");function A(a){return a.replace(/[/.]/g,"-")}function B(a){return(0,e.join)(k,A(a))}function C(a){return(0,e.join)(B(a),"session.json")}function D(a){return(0,e.join)(B(a),"recent-files.json")}function E(a){return(0,e.join)(B(a),"expanded-paths.json")}function F(a){return(0,e.join)(B(a),"comments.json")}function G(a){return(0,e.join)(B(a),"services.json")}function H(a){return(0,e.join)(B(a),"note.md")}function I(a,b){return(0,e.join)(B(a),`terminal-history-${b}.jsonl`)}function J(a,b){return(0,e.join)(B(a),`terminal-output-${b}.txt`)}function K(a,b){let c=b?`terminal-env-${b}.json`:"terminal-env-global.json";return(0,e.join)(B(a),c)}function L(){return(0,e.join)(j,"terminal-aliases.json")}function M(){return(0,e.join)(j,"services.json")}function N(a){return(0,e.join)(B(a),"project-settings.json")}function O(a,b){return(0,e.join)(B(a),`terminal-bubble-order-${b}.json`)}function P(a){return(0,e.join)(r,`${a}.json`)}function Q(a,b){return(0,e.join)((0,e.join)(v,A(a)),`${b}.jsonl`)}function R(a,b){return(0,e.join)((0,e.join)(x,A(a)),`${b}.jsonl`)}function S(a,b){return(0,e.join)((0,e.join)(z,A(a)),`${b}.jsonl`)}function T(a,b){return(0,e.join)((0,e.join)(j,"ollama-sessions",A(a)),`${b}.jsonl`)}function U(a){let b=(0,e.join)(i,".codex","sessions");if(!(0,g.existsSync)(b))return null;try{let c=(0,h.execSync)(`find ${JSON.stringify(b)} -name "*${a}.jsonl" -type f 2>/dev/null`,{encoding:"utf8",timeout:3e3}).trim();if(c)return c.split("\n")[0]}catch{}return null}function V(a){let b=(0,e.join)(i,".kimi","sessions");if(!(0,g.existsSync)(b))return null;try{for(let c of(0,g.readdirSync)(b)){let d=(0,e.join)(b,c,a,"context.jsonl");if((0,g.existsSync)(d))return d}}catch{}return null}async function W(a){(0,g.existsSync)(a)||await (0,f.mkdir)(a,{recursive:!0})}async function X(a){let b=(0,e.join)(a,"..");await W(b)}async function Y(a,b){try{let b=await (0,f.readFile)(a,"utf-8");return JSON.parse(b)}catch{return b}}async function Z(a,b){await X(a),await (0,f.writeFile)(a,JSON.stringify(b,null,2),"utf-8")}let $=new Map;function _(a,b){let c=($.get(a)??Promise.resolve()).then(b),d=c.then(()=>{},()=>{});return $.set(a,d),d.then(()=>{$.get(a)===d&&$.delete(a)}),c}},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},79748:a=>{"use strict";a.exports=require("fs/promises")},83583:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>M,patchFetch:()=>L,routeModule:()=>H,serverHooks:()=>K,workAsyncStorage:()=>I,workUnitAsyncStorage:()=>J});var d={};c.r(d),c.d(d,{GET:()=>G,dynamic:()=>B,runtime:()=>A});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(79748),w=c(33873),x=c(29021),y=c(4984),z=c(25813);let A="nodejs",B="force-dynamic";async function C(a){let b,c={},d=new Map,e=new Map,f={},g=0,h=0,i="",j=new Set,k=new Map;try{b=await (0,v.readdir)(a)}catch{return null}for(let h of b){let b,l=(0,w.join)(a,h);try{b=await (0,v.readdir)(l)}catch{continue}for(let a of b){if(!a.endsWith(".jsonl"))continue;let b=(0,w.join)(l,a);try{await D(b,{modelUsage:c,dailyMap:d,dailyTokenMap:e,hourCounts:f,sessionIds:j,sessionTimes:k,onMessage:()=>{g++},onFirstDate:a=>{(!i||a<i)&&(i=a)}})}catch{}}}h=j.size;let l=0,m="";for(let[a,b]of k){let c=b.end-b.start;c>l&&(l=c,m=a)}return{modelUsage:c,dailyActivity:Array.from(d.entries()).map(([a,b])=>({date:a,messageCount:b.messages,sessionCount:b.sessions.size,toolCallCount:b.toolCalls})).sort((a,b)=>a.date.localeCompare(b.date)),dailyModelTokens:Array.from(e.entries()).map(([a,b])=>({date:a,tokensByModel:b})).sort((a,b)=>a.date.localeCompare(b.date)),hourCounts:f,totalSessions:h,totalMessages:g,longestSession:l>0?{sessionId:m,duration:l}:void 0,firstSessionDate:i||void 0}}async function D(a,b){for await(let c of(0,y.createInterface)({input:(0,x.createReadStream)(a,{encoding:"utf-8"}),crlfDelay:1/0})){let a;if(!c)continue;try{a=JSON.parse(c)}catch{continue}let d=a.type,e=a.sessionId,f=a.timestamp;if(e&&b.sessionIds.add(e),e&&f){let a=new Date(f).getTime();if(!isNaN(a)){let c=b.sessionTimes.get(e);c?(a<c.start&&(c.start=a),a>c.end&&(c.end=a)):b.sessionTimes.set(e,{start:a,end:a})}}let g=f?.slice(0,10);if(g&&b.onFirstDate(g),f&&"user"===d){let a=new Date(f).getHours();isNaN(a)||(b.hourCounts[String(a)]=(b.hourCounts[String(a)]||0)+1)}if("user"===d&&(b.onMessage(),g&&e)){b.dailyMap.has(g)||b.dailyMap.set(g,{messages:0,sessions:new Set,toolCalls:0});let a=b.dailyMap.get(g);a.messages++,a.sessions.add(e)}if("assistant"===d){b.onMessage();let c=a.message;if(!c)continue;let d=c.model,e=c.usage;if(d&&e){b.modelUsage[d]||(b.modelUsage[d]={inputTokens:0,outputTokens:0,cacheReadInputTokens:0,cacheCreationInputTokens:0,webSearchRequests:0});let a=b.modelUsage[d];a.inputTokens+=e.input_tokens||0,a.outputTokens+=e.output_tokens||0,a.cacheReadInputTokens+=e.cache_read_input_tokens||0,a.cacheCreationInputTokens+=e.cache_creation_input_tokens||0;let c=(e.input_tokens||0)+(e.output_tokens||0)+(e.cache_read_input_tokens||0)+(e.cache_creation_input_tokens||0);if(g){b.dailyTokenMap.has(g)||b.dailyTokenMap.set(g,{});let a=b.dailyTokenMap.get(g);a[d]=(a[d]||0)+c}}let f=c.content;if(Array.isArray(f)&&g){let a=f.filter(a=>"tool_use"===a.type).length;a>0&&(b.dailyMap.has(g)||b.dailyMap.set(g,{messages:0,sessions:new Set,toolCalls:0}),b.dailyMap.get(g).toolCalls+=a)}}}}async function E(a){try{let b=await (0,v.stat)(a);if(Date.now()-b.mtimeMs<3e5){let b=await (0,v.readFile)(a,"utf-8");return JSON.parse(b)}}catch{}return null}async function F(a,b){try{await (0,z.A0)(z.Kv),await (0,v.writeFile)(a,JSON.stringify(b),"utf-8")}catch{}}async function G(a){try{let{searchParams:b}=new URL(a.url),c=b.get("engine")||"claude",d="claude2"===c?(0,w.join)(z.h9,"projects"):(0,w.join)(z.th,"projects"),e="claude2"===c?(0,w.join)(z.Kv,"stats-cache-claude2.json"):(0,w.join)(z.Kv,"stats-cache.json"),f=await E(e);if(f)return Response.json(f);let g=await C(d);if(!g)return Response.json({error:"Projects directory not found"},{status:404});return await F(e,g),Response.json(g)}catch(a){return Response.json({error:String(a)},{status:500})}}let H=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/claude-stats/route",pathname:"/api/claude-stats",filename:"route",bundlePath:"app/api/claude-stats/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/claude-stats/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:I,workUnitAsyncStorage:J,serverHooks:K}=H;function L(){return(0,g.patchFetch)({workAsyncStorage:I,workUnitAsyncStorage:J})}async function M(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),H.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/claude-stats/route";"/index"===d&&(d="/");let e=await H.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:D,clientReferenceManifest:E,serverActionsManifest:F}=e,G=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[G]||z.routes[D]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[D],b=z.dynamicRoutes[G];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||H.isDev||y||(K="/index"===(K=D)?"/":K);let L=!0===H.isDev||!I,M=I&&!L;F&&E&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:E,serverActionsManifest:F});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await H.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>H.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>H.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&B&&C&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await H.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await H.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",B?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await H.onRequestError(a,b,{routerKind:"App Router",routePath:G,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741],()=>b(b.s=83583));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=2316,a.ids=[2316],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},21682:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>I,patchFetch:()=>H,routeModule:()=>D,serverHooks:()=>G,workAsyncStorage:()=>E,workUnitAsyncStorage:()=>F});var d={};c.r(d),c.d(d,{GET:()=>C,dynamic:()=>z,runtime:()=>y});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(29021),w=c(33873),x=c(25813);let y="nodejs",z="force-dynamic",A=[{name:"/qa",description:"Enter requirements clarification mode",source:"builtin"},{name:"/commit",description:"Commit code changes",source:"builtin"},{name:"/review",description:"Code review",source:"builtin"},{name:"/test",description:"Run tests",source:"builtin"},{name:"/fix",description:"Fix issues",source:"builtin"},{name:"/explain",description:"Explain code",source:"builtin"},{name:"/refactor",description:"Refactor code",source:"builtin"}];function B(a,b,c=""){let d=[];if(!v.existsSync(a))return d;try{for(let e of v.readdirSync(a,{withFileTypes:!0})){let f=w.join(a,e.name);if(e.isDirectory()){let a=c?`${c}:${e.name}`:e.name;d.push(...B(f,b,a))}else if(e.name.endsWith(".md")){let a=e.name.replace(".md",""),g=c?`/${c}:${a}`:`/${a}`,h=function(a){try{for(let b of v.readFileSync(a,"utf-8").split("\n")){let a=b.trim();if(a&&!a.startsWith("#"))return a.slice(0,50)}}catch{}return""}(f);d.push({name:g,description:h||`Custom command: ${g}`,source:b})}}}catch{}return d}async function C(a){try{let{searchParams:b}=new URL(a.url),c=b.get("cwd"),d=[];d.push(...A);let e=w.join(x.th,"commands");d.push(...B(e,"global"));let f=w.join(x.h9,"commands");if(d.push(...B(f,"global")),c){let a=w.join(c,".claude","commands");d.push(...B(a,"project"))}let g=new Map;for(let a of d){let b=g.get(a.name);if(b){let c={project:3,global:2,builtin:1};c[a.source]>c[b.source]&&g.set(a.name,a)}else g.set(a.name,a)}let h=Array.from(g.values()).sort((a,b)=>a.name.localeCompare(b.name));return new Response(JSON.stringify(h),{status:200,headers:{"Content-Type":"application/json"}})}catch(a){return console.error("Commands API error:",a),new Response(JSON.stringify({error:"Internal server error"}),{status:500,headers:{"Content-Type":"application/json"}})}}let D=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/commands/route",pathname:"/api/commands",filename:"route",bundlePath:"app/api/commands/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/commands/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:E,workUnitAsyncStorage:F,serverHooks:G}=D;function H(){return(0,g.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:F})}async function I(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),D.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/commands/route";"/index"===d&&(d="/");let e=await D.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[E]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[E],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||D.isDev||y||(K="/index"===(K=E)?"/":K);let L=!0===D.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await D.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>D.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>D.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&B&&C&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await D.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await D.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",B?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await D.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},21820:a=>{"use strict";a.exports=require("os")},25813:(a,b,c)=>{"use strict";c.d(b,{$A:()=>J,A0:()=>T,An:()=>W,BF:()=>F,Ct:()=>N,Eu:()=>E,Ex:()=>t,GB:()=>q,JE:()=>V,JY:()=>I,Ki:()=>z,Kk:()=>O,Kv:()=>j,LN:()=>k,Mx:()=>A,O0:()=>y,Sr:()=>G,Tb:()=>r,Ux:()=>Y,Wd:()=>U,aO:()=>m,at:()=>x,ec:()=>n,eg:()=>R,h9:()=>w,i4:()=>D,iK:()=>o,iy:()=>M,lq:()=>C,ls:()=>H,mT:()=>v,oK:()=>L,oZ:()=>P,of:()=>B,po:()=>K,tP:()=>p,th:()=>u,v4:()=>l,vI:()=>S,yw:()=>Q});var d=c(21820),e=c(33873),f=c(79748),g=c(29021),h=c(79646);let i=(0,d.homedir)(),j=(0,e.join)(i,".cockpit"),k=(0,e.join)(j,"projects"),l=(0,e.join)(j,"state.json"),m=(0,e.join)(j,"pinned-sessions.json"),n=(0,e.join)(j,"note.md"),o=(0,e.join)(j,"scheduled-tasks.json"),p=(0,e.join)(j,"settings.json"),q=(0,e.join)(j,"skills.json"),r=(0,e.join)(j,"review"),s=(0,e.join)(r,"_signal");function t(){try{(0,g.existsSync)(r)||(0,g.mkdirSync)(r,{recursive:!0}),(0,g.writeFileSync)(s,Date.now().toString())}catch{}}let u=(0,e.join)(i,".claude"),v=(0,e.join)(u,"projects"),w=(0,e.join)(i,".claude2"),x=(0,e.join)(w,"projects");function y(a){return a.replace(/[/.]/g,"-")}function z(a){return(0,e.join)(k,y(a))}function A(a){return(0,e.join)(z(a),"session.json")}function B(a){return(0,e.join)(z(a),"recent-files.json")}function C(a){return(0,e.join)(z(a),"expanded-paths.json")}function D(a){return(0,e.join)(z(a),"comments.json")}function E(a){return(0,e.join)(z(a),"services.json")}function F(a){return(0,e.join)(z(a),"note.md")}function G(a,b){return(0,e.join)(z(a),`terminal-history-${b}.jsonl`)}function H(a,b){return(0,e.join)(z(a),`terminal-output-${b}.txt`)}function I(a,b){let c=b?`terminal-env-${b}.json`:"terminal-env-global.json";return(0,e.join)(z(a),c)}function J(){return(0,e.join)(j,"terminal-aliases.json")}function K(){return(0,e.join)(j,"services.json")}function L(a){return(0,e.join)(z(a),"project-settings.json")}function M(a,b){return(0,e.join)(z(a),`terminal-bubble-order-${b}.json`)}function N(a){return(0,e.join)(r,`${a}.json`)}function O(a,b){return(0,e.join)((0,e.join)(v,y(a)),`${b}.jsonl`)}function P(a,b){return(0,e.join)((0,e.join)(x,y(a)),`${b}.jsonl`)}function Q(a,b){return(0,e.join)((0,e.join)(j,"ollama-sessions",y(a)),`${b}.jsonl`)}function R(a){let b=(0,e.join)(i,".codex","sessions");if(!(0,g.existsSync)(b))return null;try{let c=(0,h.execSync)(`find ${JSON.stringify(b)} -name "*${a}.jsonl" -type f 2>/dev/null`,{encoding:"utf8",timeout:3e3}).trim();if(c)return c.split("\n")[0]}catch{}return null}function S(a){let b=(0,e.join)(i,".kimi","sessions");if(!(0,g.existsSync)(b))return null;try{for(let c of(0,g.readdirSync)(b)){let d=(0,e.join)(b,c,a,"context.jsonl");if((0,g.existsSync)(d))return d}}catch{}return null}async function T(a){(0,g.existsSync)(a)||await (0,f.mkdir)(a,{recursive:!0})}async function U(a){let b=(0,e.join)(a,"..");await T(b)}async function V(a,b){try{let b=await (0,f.readFile)(a,"utf-8");return JSON.parse(b)}catch{return b}}async function W(a,b){await U(a),await (0,f.writeFile)(a,JSON.stringify(b,null,2),"utf-8")}let X=new Map;function Y(a,b){let c=(X.get(a)??Promise.resolve()).then(b),d=c.then(()=>{},()=>{});return X.set(a,d),d.then(()=>{X.get(a)===d&&X.delete(a)}),c}},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},79748:a=>{"use strict";a.exports=require("fs/promises")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741],()=>b(b.s=21682));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=2316,a.ids=[2316],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},19225:(a,b,c)=>{"use strict";a.exports=c(44870)},21820:a=>{"use strict";a.exports=require("os")},25813:(a,b,c)=>{"use strict";c.d(b,{$A:()=>L,A0:()=>W,An:()=>Z,BF:()=>H,Ct:()=>P,Eu:()=>G,Ex:()=>t,GB:()=>q,JE:()=>Y,JY:()=>K,Ki:()=>B,Kk:()=>Q,Kv:()=>j,LN:()=>k,Mx:()=>C,O0:()=>A,Sr:()=>I,Tb:()=>r,Ux:()=>_,Wd:()=>X,aO:()=>m,at:()=>x,ec:()=>n,eg:()=>U,h9:()=>w,i4:()=>F,iK:()=>o,im:()=>S,iy:()=>O,lT:()=>y,lq:()=>E,ls:()=>J,mT:()=>v,oK:()=>N,oZ:()=>R,of:()=>D,po:()=>M,tP:()=>p,th:()=>u,v4:()=>l,vI:()=>V,yw:()=>T});var d=c(21820),e=c(33873),f=c(79748),g=c(29021),h=c(79646);let i=(0,d.homedir)(),j=(0,e.join)(i,".cockpit"),k=(0,e.join)(j,"projects"),l=(0,e.join)(j,"state.json"),m=(0,e.join)(j,"pinned-sessions.json"),n=(0,e.join)(j,"note.md"),o=(0,e.join)(j,"scheduled-tasks.json"),p=(0,e.join)(j,"settings.json"),q=(0,e.join)(j,"skills.json"),r=(0,e.join)(j,"review"),s=(0,e.join)(r,"_signal");function t(){try{(0,g.existsSync)(r)||(0,g.mkdirSync)(r,{recursive:!0}),(0,g.writeFileSync)(s,Date.now().toString())}catch{}}let u=(0,e.join)(i,".claude"),v=(0,e.join)(u,"projects"),w=(0,e.join)(i,".claude2"),x=(0,e.join)(w,"projects"),y=(0,e.join)(j,"deepseek"),z=(0,e.join)(y,"projects");function A(a){return a.replace(/[/.]/g,"-")}function B(a){return(0,e.join)(k,A(a))}function C(a){return(0,e.join)(B(a),"session.json")}function D(a){return(0,e.join)(B(a),"recent-files.json")}function E(a){return(0,e.join)(B(a),"expanded-paths.json")}function F(a){return(0,e.join)(B(a),"comments.json")}function G(a){return(0,e.join)(B(a),"services.json")}function H(a){return(0,e.join)(B(a),"note.md")}function I(a,b){return(0,e.join)(B(a),`terminal-history-${b}.jsonl`)}function J(a,b){return(0,e.join)(B(a),`terminal-output-${b}.txt`)}function K(a,b){let c=b?`terminal-env-${b}.json`:"terminal-env-global.json";return(0,e.join)(B(a),c)}function L(){return(0,e.join)(j,"terminal-aliases.json")}function M(){return(0,e.join)(j,"services.json")}function N(a){return(0,e.join)(B(a),"project-settings.json")}function O(a,b){return(0,e.join)(B(a),`terminal-bubble-order-${b}.json`)}function P(a){return(0,e.join)(r,`${a}.json`)}function Q(a,b){return(0,e.join)((0,e.join)(v,A(a)),`${b}.jsonl`)}function R(a,b){return(0,e.join)((0,e.join)(x,A(a)),`${b}.jsonl`)}function S(a,b){return(0,e.join)((0,e.join)(z,A(a)),`${b}.jsonl`)}function T(a,b){return(0,e.join)((0,e.join)(j,"ollama-sessions",A(a)),`${b}.jsonl`)}function U(a){let b=(0,e.join)(i,".codex","sessions");if(!(0,g.existsSync)(b))return null;try{let c=(0,h.execSync)(`find ${JSON.stringify(b)} -name "*${a}.jsonl" -type f 2>/dev/null`,{encoding:"utf8",timeout:3e3}).trim();if(c)return c.split("\n")[0]}catch{}return null}function V(a){let b=(0,e.join)(i,".kimi","sessions");if(!(0,g.existsSync)(b))return null;try{for(let c of(0,g.readdirSync)(b)){let d=(0,e.join)(b,c,a,"context.jsonl");if((0,g.existsSync)(d))return d}}catch{}return null}async function W(a){(0,g.existsSync)(a)||await (0,f.mkdir)(a,{recursive:!0})}async function X(a){let b=(0,e.join)(a,"..");await W(b)}async function Y(a,b){try{let b=await (0,f.readFile)(a,"utf-8");return JSON.parse(b)}catch{return b}}async function Z(a,b){await X(a),await (0,f.writeFile)(a,JSON.stringify(b,null,2),"utf-8")}let $=new Map;function _(a,b){let c=($.get(a)??Promise.resolve()).then(b),d=c.then(()=>{},()=>{});return $.set(a,d),d.then(()=>{$.get(a)===d&&$.delete(a)}),c}},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},48530:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>I,patchFetch:()=>H,routeModule:()=>D,serverHooks:()=>G,workAsyncStorage:()=>E,workUnitAsyncStorage:()=>F});var d={};c.r(d),c.d(d,{GET:()=>C,dynamic:()=>z,runtime:()=>y});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(29021),w=c(33873),x=c(25813);let y="nodejs",z="force-dynamic",A=[{name:"/qa",description:"Enter requirements clarification mode",source:"builtin"},{name:"/fx",description:"Enter bug evidence-chain analysis mode",source:"builtin"},{name:"/commit",description:"Commit code changes",source:"builtin"},{name:"/review",description:"Code review",source:"builtin"},{name:"/test",description:"Run tests",source:"builtin"},{name:"/fix",description:"Fix issues",source:"builtin"},{name:"/explain",description:"Explain code",source:"builtin"},{name:"/refactor",description:"Refactor code",source:"builtin"}];function B(a,b,c=""){let d=[];if(!v.existsSync(a))return d;try{for(let e of v.readdirSync(a,{withFileTypes:!0})){let f=w.join(a,e.name);if(e.isDirectory()){let a=c?`${c}:${e.name}`:e.name;d.push(...B(f,b,a))}else if(e.name.endsWith(".md")){let a=e.name.replace(".md",""),g=c?`/${c}:${a}`:`/${a}`,h=function(a){try{for(let b of v.readFileSync(a,"utf-8").split("\n")){let a=b.trim();if(a&&!a.startsWith("#"))return a.slice(0,50)}}catch{}return""}(f);d.push({name:g,description:h||`Custom command: ${g}`,source:b})}}}catch{}return d}async function C(a){try{let{searchParams:b}=new URL(a.url),c=b.get("cwd"),d=[];d.push(...A);let e=w.join(x.th,"commands");d.push(...B(e,"global"));let f=w.join(x.h9,"commands");if(d.push(...B(f,"global")),c){let a=w.join(c,".claude","commands");d.push(...B(a,"project"))}let g=new Map;for(let a of d){let b=g.get(a.name);if(b){let c={project:3,global:2,builtin:1};c[a.source]>c[b.source]&&g.set(a.name,a)}else g.set(a.name,a)}let h=Array.from(g.values()).sort((a,b)=>a.name.localeCompare(b.name));return new Response(JSON.stringify(h),{status:200,headers:{"Content-Type":"application/json"}})}catch(a){return console.error("Commands API error:",a),new Response(JSON.stringify({error:"Internal server error"}),{status:500,headers:{"Content-Type":"application/json"}})}}let D=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/commands/route",pathname:"/api/commands",filename:"route",bundlePath:"app/api/commands/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/commands/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:E,workUnitAsyncStorage:F,serverHooks:G}=D;function H(){return(0,g.patchFetch)({workAsyncStorage:E,workUnitAsyncStorage:F})}async function I(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),D.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/commands/route";"/index"===d&&(d="/");let e=await D.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[E]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[E],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||D.isDev||y||(K="/index"===(K=E)?"/":K);let L=!0===D.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await D.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>D.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>D.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&B&&C&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await D.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await D.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:B,revalidateOnlyGenerated:C,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",B?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await D.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},79748:a=>{"use strict";a.exports=require("fs/promises")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92280:(a,b,c)=>{"use strict";Object.defineProperty(b,"I",{enumerable:!0,get:function(){return g}});let d=c(28208),e=c(47617),f=c(62018);async function g(a,b,c,g){if((0,d.isNodeNextResponse)(b)){var h;b.statusCode=c.status,b.statusMessage=c.statusText;let d=["set-cookie","www-authenticate","proxy-authenticate","vary"];null==(h=c.headers)||h.forEach((a,c)=>{if("x-middleware-set-cookie"!==c.toLowerCase())if("set-cookie"===c.toLowerCase())for(let d of(0,f.splitCookiesString)(a))b.appendHeader(c,d);else{let e=void 0!==b.getHeader(c);(d.includes(c.toLowerCase())||!e)&&b.appendHeader(c,a)}});let{originalResponse:i}=b;c.body&&"HEAD"!==a.method?await (0,e.pipeToNodeResponse)(c.body,i,g):i.end()}}},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741],()=>b(b.s=48530));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=7128,a.ids=[7128],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{"use strict";a.exports=require("os")},25813:(a,b,c)=>{"use strict";c.d(b,{$A:()=>J,A0:()=>T,An:()=>W,BF:()=>F,Ct:()=>N,Eu:()=>E,Ex:()=>t,GB:()=>q,JE:()=>V,JY:()=>I,Ki:()=>z,Kk:()=>O,Kv:()=>j,LN:()=>k,Mx:()=>A,O0:()=>y,Sr:()=>G,Tb:()=>r,Ux:()=>Y,Wd:()=>U,aO:()=>m,at:()=>x,ec:()=>n,eg:()=>R,h9:()=>w,i4:()=>D,iK:()=>o,iy:()=>M,lq:()=>C,ls:()=>H,mT:()=>v,oK:()=>L,oZ:()=>P,of:()=>B,po:()=>K,tP:()=>p,th:()=>u,v4:()=>l,vI:()=>S,yw:()=>Q});var d=c(21820),e=c(33873),f=c(79748),g=c(29021),h=c(79646);let i=(0,d.homedir)(),j=(0,e.join)(i,".cockpit"),k=(0,e.join)(j,"projects"),l=(0,e.join)(j,"state.json"),m=(0,e.join)(j,"pinned-sessions.json"),n=(0,e.join)(j,"note.md"),o=(0,e.join)(j,"scheduled-tasks.json"),p=(0,e.join)(j,"settings.json"),q=(0,e.join)(j,"skills.json"),r=(0,e.join)(j,"review"),s=(0,e.join)(r,"_signal");function t(){try{(0,g.existsSync)(r)||(0,g.mkdirSync)(r,{recursive:!0}),(0,g.writeFileSync)(s,Date.now().toString())}catch{}}let u=(0,e.join)(i,".claude"),v=(0,e.join)(u,"projects"),w=(0,e.join)(i,".claude2"),x=(0,e.join)(w,"projects");function y(a){return a.replace(/[/.]/g,"-")}function z(a){return(0,e.join)(k,y(a))}function A(a){return(0,e.join)(z(a),"session.json")}function B(a){return(0,e.join)(z(a),"recent-files.json")}function C(a){return(0,e.join)(z(a),"expanded-paths.json")}function D(a){return(0,e.join)(z(a),"comments.json")}function E(a){return(0,e.join)(z(a),"services.json")}function F(a){return(0,e.join)(z(a),"note.md")}function G(a,b){return(0,e.join)(z(a),`terminal-history-${b}.jsonl`)}function H(a,b){return(0,e.join)(z(a),`terminal-output-${b}.txt`)}function I(a,b){let c=b?`terminal-env-${b}.json`:"terminal-env-global.json";return(0,e.join)(z(a),c)}function J(){return(0,e.join)(j,"terminal-aliases.json")}function K(){return(0,e.join)(j,"services.json")}function L(a){return(0,e.join)(z(a),"project-settings.json")}function M(a,b){return(0,e.join)(z(a),`terminal-bubble-order-${b}.json`)}function N(a){return(0,e.join)(r,`${a}.json`)}function O(a,b){return(0,e.join)((0,e.join)(v,y(a)),`${b}.jsonl`)}function P(a,b){return(0,e.join)((0,e.join)(x,y(a)),`${b}.jsonl`)}function Q(a,b){return(0,e.join)((0,e.join)(j,"ollama-sessions",y(a)),`${b}.jsonl`)}function R(a){let b=(0,e.join)(i,".codex","sessions");if(!(0,g.existsSync)(b))return null;try{let c=(0,h.execSync)(`find ${JSON.stringify(b)} -name "*${a}.jsonl" -type f 2>/dev/null`,{encoding:"utf8",timeout:3e3}).trim();if(c)return c.split("\n")[0]}catch{}return null}function S(a){let b=(0,e.join)(i,".kimi","sessions");if(!(0,g.existsSync)(b))return null;try{for(let c of(0,g.readdirSync)(b)){let d=(0,e.join)(b,c,a,"context.jsonl");if((0,g.existsSync)(d))return d}}catch{}return null}async function T(a){(0,g.existsSync)(a)||await (0,f.mkdir)(a,{recursive:!0})}async function U(a){let b=(0,e.join)(a,"..");await T(b)}async function V(a,b){try{let b=await (0,f.readFile)(a,"utf-8");return JSON.parse(b)}catch{return b}}async function W(a,b){await U(a),await (0,f.writeFile)(a,JSON.stringify(b,null,2),"utf-8")}let X=new Map;function Y(a,b){let c=(X.get(a)??Promise.resolve()).then(b),d=c.then(()=>{},()=>{});return X.set(a,d),d.then(()=>{X.get(a)===d&&X.delete(a)}),c}},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},67928:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>G,patchFetch:()=>F,routeModule:()=>B,serverHooks:()=>E,workAsyncStorage:()=>C,workUnitAsyncStorage:()=>D});var d={};c.r(d),c.d(d,{DELETE:()=>A,GET:()=>x,POST:()=>y,PUT:()=>z});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(25813);async function x(a){let b=a.nextUrl.searchParams.get("cwd"),c=a.nextUrl.searchParams.get("filePath");if(!b)return v.NextResponse.json({error:"cwd is required"},{status:400});try{let a=(0,w.i4)(b),d=await (0,w.JE)(a,{comments:[]});if(c){let a=d.comments.filter(a=>a.filePath===c);return v.NextResponse.json({comments:a})}return v.NextResponse.json(d)}catch(a){return console.error("Error reading comments:",a),v.NextResponse.json({error:"Failed to read comments"},{status:500})}}async function y(a){try{let{cwd:b,filePath:c,startLine:d,endLine:e,content:f,selectedText:g}=await a.json();if(!b||!c||void 0===d||void 0===e||void 0===f)return v.NextResponse.json({error:"cwd, filePath, startLine, endLine, and content are required"},{status:400});let h=(0,w.i4)(b),i=await (0,w.JE)(h,{comments:[]}),j={id:`comment-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,filePath:c,startLine:d,endLine:e,content:f,...g?{selectedText:g}:{},createdAt:Date.now()};return i.comments.push(j),await (0,w.An)(h,i),v.NextResponse.json({comment:j})}catch(a){return console.error("Error adding comment:",a),v.NextResponse.json({error:"Failed to add comment"},{status:500})}}async function z(a){try{let{cwd:b,id:c,content:d}=await a.json();if(!b||!c||void 0===d)return v.NextResponse.json({error:"cwd, id, and content are required"},{status:400});let e=(0,w.i4)(b),f=await (0,w.JE)(e,{comments:[]}),g=f.comments.findIndex(a=>a.id===c);if(-1===g)return v.NextResponse.json({error:"Comment not found"},{status:404});return f.comments[g]={...f.comments[g],content:d,updatedAt:Date.now()},await (0,w.An)(e,f),v.NextResponse.json({comment:f.comments[g]})}catch(a){return console.error("Error updating comment:",a),v.NextResponse.json({error:"Failed to update comment"},{status:500})}}async function A(a){let b=a.nextUrl.searchParams.get("cwd"),c=a.nextUrl.searchParams.get("id"),d=a.nextUrl.searchParams.get("all");if(!b)return v.NextResponse.json({error:"cwd is required"},{status:400});try{let a=(0,w.i4)(b);if("true"===d)return await (0,w.An)(a,{comments:[]}),v.NextResponse.json({success:!0});if(!c)return v.NextResponse.json({error:"id is required"},{status:400});let e=await (0,w.JE)(a,{comments:[]}),f=e.comments.findIndex(a=>a.id===c);if(-1===f)return v.NextResponse.json({error:"Comment not found"},{status:404});return e.comments.splice(f,1),await (0,w.An)(a,e),v.NextResponse.json({success:!0})}catch(a){return console.error("Error deleting comment:",a),v.NextResponse.json({error:"Failed to delete comment"},{status:500})}}let B=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/comments/route",pathname:"/api/comments",filename:"route",bundlePath:"app/api/comments/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/comments/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:C,workUnitAsyncStorage:D,serverHooks:E}=B;function F(){return(0,g.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:D})}async function G(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),B.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/comments/route";"/index"===d&&(d="/");let e=await B.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[E]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[E],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||B.isDev||y||(K="/index"===(K=E)?"/":K);let L=!0===B.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await B.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>B.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>B.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await B.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,A),b}},k=await B.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await B.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,A),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},79748:a=>{"use strict";a.exports=require("fs/promises")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=67928));module.exports=c})();
|
|
1
|
+
(()=>{var a={};a.id=7128,a.ids=[7128],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},2067:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>G,patchFetch:()=>F,routeModule:()=>B,serverHooks:()=>E,workAsyncStorage:()=>C,workUnitAsyncStorage:()=>D});var d={};c.r(d),c.d(d,{DELETE:()=>A,GET:()=>x,POST:()=>y,PUT:()=>z});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(25813);async function x(a){let b=a.nextUrl.searchParams.get("cwd"),c=a.nextUrl.searchParams.get("filePath");if(!b)return v.NextResponse.json({error:"cwd is required"},{status:400});try{let a=(0,w.i4)(b),d=await (0,w.JE)(a,{comments:[]});if(c){let a=d.comments.filter(a=>a.filePath===c);return v.NextResponse.json({comments:a})}return v.NextResponse.json(d)}catch(a){return console.error("Error reading comments:",a),v.NextResponse.json({error:"Failed to read comments"},{status:500})}}async function y(a){try{let{cwd:b,filePath:c,startLine:d,endLine:e,content:f,selectedText:g}=await a.json();if(!b||!c||void 0===d||void 0===e||void 0===f)return v.NextResponse.json({error:"cwd, filePath, startLine, endLine, and content are required"},{status:400});let h=(0,w.i4)(b),i=await (0,w.JE)(h,{comments:[]}),j={id:`comment-${Date.now()}-${Math.random().toString(36).slice(2,9)}`,filePath:c,startLine:d,endLine:e,content:f,...g?{selectedText:g}:{},createdAt:Date.now()};return i.comments.push(j),await (0,w.An)(h,i),v.NextResponse.json({comment:j})}catch(a){return console.error("Error adding comment:",a),v.NextResponse.json({error:"Failed to add comment"},{status:500})}}async function z(a){try{let{cwd:b,id:c,content:d}=await a.json();if(!b||!c||void 0===d)return v.NextResponse.json({error:"cwd, id, and content are required"},{status:400});let e=(0,w.i4)(b),f=await (0,w.JE)(e,{comments:[]}),g=f.comments.findIndex(a=>a.id===c);if(-1===g)return v.NextResponse.json({error:"Comment not found"},{status:404});return f.comments[g]={...f.comments[g],content:d,updatedAt:Date.now()},await (0,w.An)(e,f),v.NextResponse.json({comment:f.comments[g]})}catch(a){return console.error("Error updating comment:",a),v.NextResponse.json({error:"Failed to update comment"},{status:500})}}async function A(a){let b=a.nextUrl.searchParams.get("cwd"),c=a.nextUrl.searchParams.get("id"),d=a.nextUrl.searchParams.get("all");if(!b)return v.NextResponse.json({error:"cwd is required"},{status:400});try{let a=(0,w.i4)(b);if("true"===d)return await (0,w.An)(a,{comments:[]}),v.NextResponse.json({success:!0});if(!c)return v.NextResponse.json({error:"id is required"},{status:400});let e=await (0,w.JE)(a,{comments:[]}),f=e.comments.findIndex(a=>a.id===c);if(-1===f)return v.NextResponse.json({error:"Comment not found"},{status:404});return e.comments.splice(f,1),await (0,w.An)(a,e),v.NextResponse.json({success:!0})}catch(a){return console.error("Error deleting comment:",a),v.NextResponse.json({error:"Failed to delete comment"},{status:500})}}let B=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/comments/route",pathname:"/api/comments",filename:"route",bundlePath:"app/api/comments/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/comments/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:C,workUnitAsyncStorage:D,serverHooks:E}=B;function F(){return(0,g.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:D})}async function G(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),B.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/comments/route";"/index"===d&&(d="/");let e=await B.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:A,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[E]),J=async()=>((null==A?void 0:A.render404)?await A.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[E],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||B.isDev||y||(K="/index"===(K=E)?"/":K);let L=!0===B.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==A?void 0:A.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await B.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>B.onRequestError(a,b,d,e,A)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>B.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await B.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,A),b}},k=await B.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await B.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,A),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{"use strict";a.exports=require("os")},25813:(a,b,c)=>{"use strict";c.d(b,{$A:()=>L,A0:()=>W,An:()=>Z,BF:()=>H,Ct:()=>P,Eu:()=>G,Ex:()=>t,GB:()=>q,JE:()=>Y,JY:()=>K,Ki:()=>B,Kk:()=>Q,Kv:()=>j,LN:()=>k,Mx:()=>C,O0:()=>A,Sr:()=>I,Tb:()=>r,Ux:()=>_,Wd:()=>X,aO:()=>m,at:()=>x,ec:()=>n,eg:()=>U,h9:()=>w,i4:()=>F,iK:()=>o,im:()=>S,iy:()=>O,lT:()=>y,lq:()=>E,ls:()=>J,mT:()=>v,oK:()=>N,oZ:()=>R,of:()=>D,po:()=>M,tP:()=>p,th:()=>u,v4:()=>l,vI:()=>V,yw:()=>T});var d=c(21820),e=c(33873),f=c(79748),g=c(29021),h=c(79646);let i=(0,d.homedir)(),j=(0,e.join)(i,".cockpit"),k=(0,e.join)(j,"projects"),l=(0,e.join)(j,"state.json"),m=(0,e.join)(j,"pinned-sessions.json"),n=(0,e.join)(j,"note.md"),o=(0,e.join)(j,"scheduled-tasks.json"),p=(0,e.join)(j,"settings.json"),q=(0,e.join)(j,"skills.json"),r=(0,e.join)(j,"review"),s=(0,e.join)(r,"_signal");function t(){try{(0,g.existsSync)(r)||(0,g.mkdirSync)(r,{recursive:!0}),(0,g.writeFileSync)(s,Date.now().toString())}catch{}}let u=(0,e.join)(i,".claude"),v=(0,e.join)(u,"projects"),w=(0,e.join)(i,".claude2"),x=(0,e.join)(w,"projects"),y=(0,e.join)(j,"deepseek"),z=(0,e.join)(y,"projects");function A(a){return a.replace(/[/.]/g,"-")}function B(a){return(0,e.join)(k,A(a))}function C(a){return(0,e.join)(B(a),"session.json")}function D(a){return(0,e.join)(B(a),"recent-files.json")}function E(a){return(0,e.join)(B(a),"expanded-paths.json")}function F(a){return(0,e.join)(B(a),"comments.json")}function G(a){return(0,e.join)(B(a),"services.json")}function H(a){return(0,e.join)(B(a),"note.md")}function I(a,b){return(0,e.join)(B(a),`terminal-history-${b}.jsonl`)}function J(a,b){return(0,e.join)(B(a),`terminal-output-${b}.txt`)}function K(a,b){let c=b?`terminal-env-${b}.json`:"terminal-env-global.json";return(0,e.join)(B(a),c)}function L(){return(0,e.join)(j,"terminal-aliases.json")}function M(){return(0,e.join)(j,"services.json")}function N(a){return(0,e.join)(B(a),"project-settings.json")}function O(a,b){return(0,e.join)(B(a),`terminal-bubble-order-${b}.json`)}function P(a){return(0,e.join)(r,`${a}.json`)}function Q(a,b){return(0,e.join)((0,e.join)(v,A(a)),`${b}.jsonl`)}function R(a,b){return(0,e.join)((0,e.join)(x,A(a)),`${b}.jsonl`)}function S(a,b){return(0,e.join)((0,e.join)(z,A(a)),`${b}.jsonl`)}function T(a,b){return(0,e.join)((0,e.join)(j,"ollama-sessions",A(a)),`${b}.jsonl`)}function U(a){let b=(0,e.join)(i,".codex","sessions");if(!(0,g.existsSync)(b))return null;try{let c=(0,h.execSync)(`find ${JSON.stringify(b)} -name "*${a}.jsonl" -type f 2>/dev/null`,{encoding:"utf8",timeout:3e3}).trim();if(c)return c.split("\n")[0]}catch{}return null}function V(a){let b=(0,e.join)(i,".kimi","sessions");if(!(0,g.existsSync)(b))return null;try{for(let c of(0,g.readdirSync)(b)){let d=(0,e.join)(b,c,a,"context.jsonl");if((0,g.existsSync)(d))return d}}catch{}return null}async function W(a){(0,g.existsSync)(a)||await (0,f.mkdir)(a,{recursive:!0})}async function X(a){let b=(0,e.join)(a,"..");await W(b)}async function Y(a,b){try{let b=await (0,f.readFile)(a,"utf-8");return JSON.parse(b)}catch{return b}}async function Z(a,b){await X(a),await (0,f.writeFile)(a,JSON.stringify(b,null,2),"utf-8")}let $=new Map;function _(a,b){let c=($.get(a)??Promise.resolve()).then(b),d=c.then(()=>{},()=>{});return $.set(a,d),d.then(()=>{$.get(a)===d&&$.delete(a)}),c}},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},79748:a=>{"use strict";a.exports=require("fs/promises")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=2067));module.exports=c})();
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
(()=>{var a={};a.id=8232,a.ids=[8232],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},
|
|
1
|
+
(()=>{var a={};a.id=8232,a.ids=[8232],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},40505:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(82936),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/db/columns/route",pathname:"/api/db/columns",filename:"route",bundlePath:"app/api/db/columns/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/db/columns/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/db/columns/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{"use strict";a.exports=import("pg")},78335:()=>{},82936:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{GET:()=>h});var e=c(23211),f=c(92781),g=a([f]);async function h(a){try{let b=a.nextUrl.searchParams,c=b.get("id"),d=b.get("connectionString"),g=b.get("schema")||"public",h=b.get("table");if(!c||!d||!h)return e.NextResponse.json({error:"Missing required params"},{status:400});let i=await f.n.getPool(c,d),[j,k,l,m]=await Promise.all([i.query(`SELECT column_name, data_type, udt_name, is_nullable, column_default, character_maximum_length
|
|
2
2
|
FROM information_schema.columns
|
|
3
3
|
WHERE table_schema = $1 AND table_name = $2
|
|
4
4
|
ORDER BY ordinal_position`,[g,h]),i.query(`SELECT kcu.column_name
|
|
@@ -12,4 +12,4 @@
|
|
|
12
12
|
ON tc.constraint_name = kcu.constraint_name AND tc.table_schema = kcu.table_schema
|
|
13
13
|
JOIN information_schema.constraint_column_usage ccu
|
|
14
14
|
ON tc.constraint_name = ccu.constraint_name AND tc.table_schema = ccu.table_schema
|
|
15
|
-
WHERE tc.table_schema = $1 AND tc.table_name = $2 AND tc.constraint_type = 'FOREIGN KEY'`,[g,h]),i.query("SELECT indexname, indexdef FROM pg_indexes WHERE schemaname = $1 AND tablename = $2 ORDER BY indexname",[g,h])]),n=new Set(k.rows.map(a=>a.column_name));return e.NextResponse.json({columns:j.rows.map(a=>({name:a.column_name,type:"USER-DEFINED"===a.data_type?a.udt_name:a.data_type,nullable:"YES"===a.is_nullable,default:a.column_default,maxLength:a.character_maximum_length,isPrimaryKey:n.has(a.column_name)})),primaryKeys:Array.from(n),foreignKeys:l.rows.map(a=>({column:a.column_name,refSchema:a.ref_schema,refTable:a.ref_table,refColumn:a.ref_column})),indexes:m.rows.map(a=>({name:a.indexname,definition:a.indexdef}))})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:500})}}f=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92781:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{n:()=>j});var e=c(64939),f=a([e]);let{Pool:g}=(e=(f.then?(await f)():f)[0]).default;class h{async getPool(a,b){let c=this.pools.get(a);if(c&&c.connectionString===b)return c.pool;c&&await c.pool.end().catch(()=>{});let d=new g({connectionString:b,max:5,idleTimeoutMillis:6e4,connectionTimeoutMillis:1e4});return this.pools.set(a,{pool:d,connectionString:b,createdAt:Date.now()}),d}async disconnect(a){let b=this.pools.get(a);b&&(await b.pool.end().catch(()=>{}),this.pools.delete(a))}constructor(){this.pools=new Map}}let i=globalThis,j=i.__pgPoolManager??(i.__pgPoolManager=new h);d()}catch(a){d(a)}})},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=
|
|
15
|
+
WHERE tc.table_schema = $1 AND tc.table_name = $2 AND tc.constraint_type = 'FOREIGN KEY'`,[g,h]),i.query("SELECT indexname, indexdef FROM pg_indexes WHERE schemaname = $1 AND tablename = $2 ORDER BY indexname",[g,h])]),n=new Set(k.rows.map(a=>a.column_name));return e.NextResponse.json({columns:j.rows.map(a=>({name:a.column_name,type:"USER-DEFINED"===a.data_type?a.udt_name:a.data_type,nullable:"YES"===a.is_nullable,default:a.column_default,maxLength:a.character_maximum_length,isPrimaryKey:n.has(a.column_name)})),primaryKeys:Array.from(n),foreignKeys:l.rows.map(a=>({column:a.column_name,refSchema:a.ref_schema,refTable:a.ref_table,refColumn:a.ref_column})),indexes:m.rows.map(a=>({name:a.indexname,definition:a.indexdef}))})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:500})}}f=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92781:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{n:()=>j});var e=c(64939),f=a([e]);let{Pool:g}=(e=(f.then?(await f)():f)[0]).default;class h{async getPool(a,b){let c=this.pools.get(a);if(c&&c.connectionString===b)return c.pool;c&&await c.pool.end().catch(()=>{});let d=new g({connectionString:b,max:5,idleTimeoutMillis:6e4,connectionTimeoutMillis:1e4});return this.pools.set(a,{pool:d,connectionString:b,createdAt:Date.now()}),d}async disconnect(a){let b=this.pools.get(a);b&&(await b.pool.end().catch(()=>{}),this.pools.delete(a))}constructor(){this.pools=new Map}}let i=globalThis,j=i.__pgPoolManager??(i.__pgPoolManager=new h);d()}catch(a){d(a)}})},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=40505));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=3335,a.ids=[3335],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},
|
|
1
|
+
(()=>{var a={};a.id=3335,a.ids=[3335],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},2583:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(95889),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/db/connect/route",pathname:"/api/db/connect",filename:"route",bundlePath:"app/api/db/connect/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/db/connect/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/db/connect/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{"use strict";a.exports=import("pg")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92781:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{n:()=>j});var e=c(64939),f=a([e]);let{Pool:g}=(e=(f.then?(await f)():f)[0]).default;class h{async getPool(a,b){let c=this.pools.get(a);if(c&&c.connectionString===b)return c.pool;c&&await c.pool.end().catch(()=>{});let d=new g({connectionString:b,max:5,idleTimeoutMillis:6e4,connectionTimeoutMillis:1e4});return this.pools.set(a,{pool:d,connectionString:b,createdAt:Date.now()}),d}async disconnect(a){let b=this.pools.get(a);b&&(await b.pool.end().catch(()=>{}),this.pools.delete(a))}constructor(){this.pools=new Map}}let i=globalThis,j=i.__pgPoolManager??(i.__pgPoolManager=new h);d()}catch(a){d(a)}})},95889:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>h});var e=c(23211),f=c(92781),g=a([f]);async function h(a){try{let{id:b,connectionString:c}=await a.json();if(!b||!c)return e.NextResponse.json({error:"Missing id or connectionString"},{status:400});let d=await f.n.getPool(b,c),g=await d.connect();try{let[a,b]=await Promise.all([g.query("SELECT current_database() AS db, version() AS version"),g.query("SELECT schema_name FROM information_schema.schemata WHERE schema_name NOT IN ('pg_toast','pg_catalog','information_schema') ORDER BY schema_name")]);return e.NextResponse.json({database:a.rows[0].db,version:a.rows[0].version,schemas:b.rows.map(a=>a.schema_name)})}finally{g.release()}}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:500})}}f=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=2583));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=4801,a.ids=[4801],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},
|
|
1
|
+
(()=>{var a={};a.id=4801,a.ids=[4801],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{"use strict";a.exports=import("pg")},78293:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>h});var e=c(23211),f=c(92781),g=a([f]);async function h(a){try{let{id:b}=await a.json();if(!b)return e.NextResponse.json({error:"Missing id"},{status:400});return await f.n.disconnect(b),e.NextResponse.json({success:!0})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:500})}}f=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},78335:()=>{},84693:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(78293),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/db/disconnect/route",pathname:"/api/db/disconnect",filename:"route",bundlePath:"app/api/db/disconnect/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/db/disconnect/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/db/disconnect/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92781:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{n:()=>j});var e=c(64939),f=a([e]);let{Pool:g}=(e=(f.then?(await f)():f)[0]).default;class h{async getPool(a,b){let c=this.pools.get(a);if(c&&c.connectionString===b)return c.pool;c&&await c.pool.end().catch(()=>{});let d=new g({connectionString:b,max:5,idleTimeoutMillis:6e4,connectionTimeoutMillis:1e4});return this.pools.set(a,{pool:d,connectionString:b,createdAt:Date.now()}),d}async disconnect(a){let b=this.pools.get(a);b&&(await b.pool.end().catch(()=>{}),this.pools.delete(a))}constructor(){this.pools=new Map}}let i=globalThis,j=i.__pgPoolManager??(i.__pgPoolManager=new h);d()}catch(a){d(a)}})},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=84693));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=7537,a.ids=[7537],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33313:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>i});var e=c(23211),f=c(92781),g=a([f]);function h(a){if(null==a)return"";let b=String(a);return b.includes(",")||b.includes('"')||b.includes("\n")||b.includes("\r")?'"'+b.replace(/"/g,'""')+'"':b}async function i(a){try{let{id:b,connectionString:c,sql:d,format:g}=await a.json();if(!b||!c||!d||!g)return e.NextResponse.json({error:"Missing required fields"},{status:400});let i=await f.n.getPool(b,c),j=await i.query(d);if(!j.rows||!j.fields)return e.NextResponse.json({error:"Query did not return rows"},{status:400});let k=j.fields.map(a=>a.name);if("json"===g){let a=JSON.stringify(j.rows,null,2);return new e.NextResponse(a,{headers:{"Content-Type":"application/json","Content-Disposition":'attachment; filename="export.json"'}})}let l=[k.map(h).join(",")];for(let a of j.rows)l.push(k.map(b=>h(a[b])).join(","));let m=l.join("\n");return new e.NextResponse(m,{headers:{"Content-Type":"text/csv; charset=utf-8","Content-Disposition":'attachment; filename="export.csv"'}})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:500})}}f=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{"use strict";a.exports=import("pg")},78335:()=>{},
|
|
1
|
+
(()=>{var a={};a.id=7537,a.ids=[7537],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33313:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>i});var e=c(23211),f=c(92781),g=a([f]);function h(a){if(null==a)return"";let b=String(a);return b.includes(",")||b.includes('"')||b.includes("\n")||b.includes("\r")?'"'+b.replace(/"/g,'""')+'"':b}async function i(a){try{let{id:b,connectionString:c,sql:d,format:g}=await a.json();if(!b||!c||!d||!g)return e.NextResponse.json({error:"Missing required fields"},{status:400});let i=await f.n.getPool(b,c),j=await i.query(d);if(!j.rows||!j.fields)return e.NextResponse.json({error:"Query did not return rows"},{status:400});let k=j.fields.map(a=>a.name);if("json"===g){let a=JSON.stringify(j.rows,null,2);return new e.NextResponse(a,{headers:{"Content-Type":"application/json","Content-Disposition":'attachment; filename="export.json"'}})}let l=[k.map(h).join(",")];for(let a of j.rows)l.push(k.map(b=>h(a[b])).join(","));let m=l.join("\n");return new e.NextResponse(m,{headers:{"Content-Type":"text/csv; charset=utf-8","Content-Disposition":'attachment; filename="export.csv"'}})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:500})}}f=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{"use strict";a.exports=import("pg")},78335:()=>{},84481:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(33313),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/db/export/route",pathname:"/api/db/export",filename:"route",bundlePath:"app/api/db/export/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/db/export/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/db/export/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92781:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{n:()=>j});var e=c(64939),f=a([e]);let{Pool:g}=(e=(f.then?(await f)():f)[0]).default;class h{async getPool(a,b){let c=this.pools.get(a);if(c&&c.connectionString===b)return c.pool;c&&await c.pool.end().catch(()=>{});let d=new g({connectionString:b,max:5,idleTimeoutMillis:6e4,connectionTimeoutMillis:1e4});return this.pools.set(a,{pool:d,connectionString:b,createdAt:Date.now()}),d}async disconnect(a){let b=this.pools.get(a);b&&(await b.pool.end().catch(()=>{}),this.pools.delete(a))}constructor(){this.pools=new Map}}let i=globalThis,j=i.__pgPoolManager??(i.__pgPoolManager=new h);d()}catch(a){d(a)}})},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=84481));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=7945,a.ids=[7945],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{"use strict";a.exports=import("pg")},78335:()=>{},85383:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>h});var e=c(23211),f=c(92781),g=a([f]);async function h(a){try{let{id:b,connectionString:c,sql:d,params:g}=await a.json();if(!b||!c||!d)return e.NextResponse.json({error:"Missing required fields"},{status:400});let h=await f.n.getPool(b,c),i=performance.now(),j=await h.query(d,g||[]),k=Math.round((performance.now()-i)*100)/100;if(j.rows&&j.fields){let a=j.rows.length>1e3;return e.NextResponse.json({fields:j.fields.map(a=>({name:a.name,dataTypeID:a.dataTypeID})),rows:a?j.rows.slice(0,1e3):j.rows,rowCount:j.rowCount,truncated:a,duration:k})}return e.NextResponse.json({command:j.command,rowCount:j.rowCount,duration:k})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:500})}}f=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},
|
|
1
|
+
(()=>{var a={};a.id=7945,a.ids=[7945],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{"use strict";a.exports=import("pg")},78335:()=>{},85383:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{POST:()=>h});var e=c(23211),f=c(92781),g=a([f]);async function h(a){try{let{id:b,connectionString:c,sql:d,params:g}=await a.json();if(!b||!c||!d)return e.NextResponse.json({error:"Missing required fields"},{status:400});let h=await f.n.getPool(b,c),i=performance.now(),j=await h.query(d,g||[]),k=Math.round((performance.now()-i)*100)/100;if(j.rows&&j.fields){let a=j.rows.length>1e3;return e.NextResponse.json({fields:j.fields.map(a=>({name:a.name,dataTypeID:a.dataTypeID})),rows:a?j.rows.slice(0,1e3):j.rows,rowCount:j.rowCount,truncated:a,duration:k})}return e.NextResponse.json({command:j.command,rowCount:j.rowCount,duration:k})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:500})}}f=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92781:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{n:()=>j});var e=c(64939),f=a([e]);let{Pool:g}=(e=(f.then?(await f)():f)[0]).default;class h{async getPool(a,b){let c=this.pools.get(a);if(c&&c.connectionString===b)return c.pool;c&&await c.pool.end().catch(()=>{});let d=new g({connectionString:b,max:5,idleTimeoutMillis:6e4,connectionTimeoutMillis:1e4});return this.pools.set(a,{pool:d,connectionString:b,createdAt:Date.now()}),d}async disconnect(a){let b=this.pools.get(a);b&&(await b.pool.end().catch(()=>{}),this.pools.delete(a))}constructor(){this.pools=new Map}}let i=globalThis,j=i.__pgPoolManager??(i.__pgPoolManager=new h);d()}catch(a){d(a)}})},96487:()=>{},97671:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(85383),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/db/query/route",pathname:"/api/db/query",filename:"route",bundlePath:"app/api/db/query/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/db/query/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/db/query/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=97671));module.exports=c})();
|
|
@@ -5,4 +5,4 @@
|
|
|
5
5
|
LEFT JOIN pg_class c ON c.relname = t.table_name
|
|
6
6
|
AND c.relnamespace = (SELECT oid FROM pg_namespace WHERE nspname = t.table_schema)
|
|
7
7
|
WHERE t.table_schema = $1
|
|
8
|
-
ORDER BY t.table_name`,[g]);return e.NextResponse.json({tables:i.rows.map(a=>({name:a.name,type:"BASE TABLE"===a.type?"table":"view",rowEstimate:Math.max(0,Number(a.row_estimate))}))})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:500})}}f=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{"use strict";a.exports=import("pg")},
|
|
8
|
+
ORDER BY t.table_name`,[g]);return e.NextResponse.json({tables:i.rows.map(a=>({name:a.name,type:"BASE TABLE"===a.type?"table":"view",rowEstimate:Math.max(0,Number(a.row_estimate))}))})}catch(b){let a=b instanceof Error?b.message:String(b);return e.NextResponse.json({error:a},{status:500})}}f=(g.then?(await g)():g)[0],d()}catch(a){d(a)}})},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},64939:a=>{"use strict";a.exports=import("pg")},75807:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.r(b),c.d(b,{handler:()=>y,patchFetch:()=>x,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(9531),w=a([v]);v=(w.then?(await w)():w)[0];let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/db/schemas/route",pathname:"/api/db/schemas",filename:"route",bundlePath:"app/api/db/schemas/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/db/schemas/route.ts",nextConfigOutput:"",userland:v,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function x(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function y(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/db/schemas/route";"/index"===d&&(d="/");let e=await z.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:A,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(A.dynamicRoutes[H]||A.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!A.routes[E],b=A.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||z.isDev||y||(K=E,K="/index"===K?"/":K);let L=!0===z.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await z.getIncrementalCache(a,w,A,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:A.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>z.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>z.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await z.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await z.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:A,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await z.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}d()}catch(a){d(a)}})},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},92781:(a,b,c)=>{"use strict";c.a(a,async(a,d)=>{try{c.d(b,{n:()=>j});var e=c(64939),f=a([e]);let{Pool:g}=(e=(f.then?(await f)():f)[0]).default;class h{async getPool(a,b){let c=this.pools.get(a);if(c&&c.connectionString===b)return c.pool;c&&await c.pool.end().catch(()=>{});let d=new g({connectionString:b,max:5,idleTimeoutMillis:6e4,connectionTimeoutMillis:1e4});return this.pools.set(a,{pool:d,connectionString:b,createdAt:Date.now()}),d}async disconnect(a){let b=this.pools.get(a);b&&(await b.pool.end().catch(()=>{}),this.pools.delete(a))}constructor(){this.pools=new Map}}let i=globalThis,j=i.__pgPoolManager??(i.__pgPoolManager=new h);d()}catch(a){d(a)}})},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=75807));module.exports=c})();
|
|
@@ -1 +1 @@
|
|
|
1
|
-
(()=>{var a={};a.id=9280,a.ids=[9280],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{"use strict";a.exports=require("os")},
|
|
1
|
+
(()=>{var a={};a.id=9280,a.ids=[9280],a.modules={261:a=>{"use strict";a.exports=require("next/dist/shared/lib/router/utils/app-paths")},3295:a=>{"use strict";a.exports=require("next/dist/server/app-render/after-task-async-storage.external.js")},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},21820:a=>{"use strict";a.exports=require("os")},29021:a=>{"use strict";a.exports=require("fs")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},33873:a=>{"use strict";a.exports=require("path")},44870:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-route.runtime.prod.js")},57182:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>F,patchFetch:()=>E,routeModule:()=>A,serverHooks:()=>D,workAsyncStorage:()=>B,workUnitAsyncStorage:()=>C});var d={};c.r(d),c.d(d,{GET:()=>z});var e=c(19225),f=c(84006),g=c(8317),h=c(99373),i=c(34775),j=c(24235),k=c(261),l=c(54365),m=c(90771),n=c(73461),o=c(67798),p=c(92280),q=c(62018),r=c(45696),s=c(47929),t=c(86439),u=c(37527),v=c(23211),w=c(29021),x=c(33873),y=c(21820);async function z(){try{let a=(0,w.existsSync)((0,x.join)(process.cwd(),"src"))?(0,x.join)(process.cwd(),"chrome-extension"):(0,x.join)((0,y.homedir)(),".cockpit","chrome-extension"),b=(0,x.join)(a,"manifest.json"),c=JSON.parse((0,w.readFileSync)(b,"utf-8"));return v.NextResponse.json({version:c.version,name:c.name,path:a})}catch{return v.NextResponse.json({error:"manifest not found"},{status:404})}}let A=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/extension/version/route",pathname:"/api/extension/version",filename:"route",bundlePath:"app/api/extension/version/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/extension/version/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:B,workUnitAsyncStorage:C,serverHooks:D}=A;function E(){return(0,g.patchFetch)({workAsyncStorage:B,workUnitAsyncStorage:C})}async function F(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),A.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/extension/version/route";"/index"===d&&(d="/");let e=await A.prepare(a,b,{srcPage:d,multiZoneDraftMode:!1});if(!e)return b.statusCode=400,b.end("Bad Request"),null==c.waitUntil||c.waitUntil.call(c,Promise.resolve()),null;let{buildId:g,params:v,nextConfig:w,parsedUrl:x,isDraftMode:y,prerenderManifest:z,routerServerContext:B,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,resolvedPathname:E,clientReferenceManifest:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||z.routes[E]),J=async()=>((null==B?void 0:B.render404)?await B.render404(a,b,x,!1):b.end("This page could not be found"),null);if(I&&!y){let a=!!z.routes[E],b=z.dynamicRoutes[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||A.isDev||y||(K="/index"===(K=E)?"/":K);let L=!0===A.isDev||!I,M=I&&!L;G&&F&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:F,serverActionsManifest:G});let N=a.method||"GET",O=(0,i.getTracer)(),P=O.getActiveScopeSpan(),Q=!!(null==B?void 0:B.isWrappedByNextServer),R=!!(0,h.getRequestMeta)(a,"minimalMode"),S=(0,h.getRequestMeta)(a,"incrementalCache")||await A.getIncrementalCache(a,w,z,R);null==S||S.resetRequestCache(),globalThis.__incrementalCache=S;let T={params:v,previewProps:z.preview,renderOpts:{experimental:{authInterrupts:!!w.experimental.authInterrupts},cacheComponents:!!w.cacheComponents,supportsDynamicResponse:L,incrementalCache:S,cacheLifeProfiles:w.cacheLife,waitUntil:c.waitUntil,onClose:a=>{b.on("close",a)},onAfterTaskError:void 0,onInstrumentationRequestError:(b,c,d,e)=>A.onRequestError(a,b,d,e,B)},sharedContext:{buildId:g}},U=new l.NodeNextRequest(a),V=new l.NodeNextResponse(b),W=m.NextRequestAdapter.fromNodeNextRequest(U,(0,m.signalFromNodeResponse)(b));try{let e,g=async a=>A.handle(W,T).finally(()=>{if(!a)return;a.setAttributes({"http.status_code":b.statusCode,"next.rsc":!1});let c=O.getRootSpanAttributes();if(!c)return;if(c.get("next.span_type")!==n.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${c.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let f=c.get("next.route");if(f){let b=`${N} ${f}`;a.setAttributes({"next.route":f,"http.route":f,"next.span_name":b}),a.updateName(b),e&&e!==a&&(e.setAttribute("http.route",f),e.updateName(b))}else a.updateName(`${N} ${d}`)}),h=async e=>{var h,i;let j=async({previousCacheEntry:f})=>{try{if(!R&&C&&D&&!f)return b.statusCode=404,b.setHeader("x-nextjs-cache","REVALIDATED"),b.end("This page could not be found"),null;let d=await g(e);a.fetchMetrics=T.renderOpts.fetchMetrics;let h=T.renderOpts.pendingWaitUntil;h&&c.waitUntil&&(c.waitUntil(h),h=void 0);let i=T.renderOpts.collectedTags;if(!I)return await (0,p.I)(U,V,d,T.renderOpts.pendingWaitUntil),null;{let a=await d.blob(),b=(0,q.toNodeOutgoingHttpHeaders)(d.headers);i&&(b[s.NEXT_CACHE_TAGS_HEADER]=i),!b["content-type"]&&a.type&&(b["content-type"]=a.type);let c=void 0!==T.renderOpts.collectedRevalidate&&!(T.renderOpts.collectedRevalidate>=s.INFINITE_CACHE)&&T.renderOpts.collectedRevalidate,e=void 0===T.renderOpts.collectedExpire||T.renderOpts.collectedExpire>=s.INFINITE_CACHE?void 0:T.renderOpts.collectedExpire;return{value:{kind:u.CachedRouteKind.APP_ROUTE,status:d.status,body:Buffer.from(await a.arrayBuffer()),headers:b},cacheControl:{revalidate:c,expire:e}}}}catch(b){throw(null==f?void 0:f.isStale)&&await A.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),b}},k=await A.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:C,revalidateOnlyGenerated:D,responseGenerator:j,waitUntil:c.waitUntil,isMinimalMode:R});if(!I)return null;if((null==k||null==(h=k.value)?void 0:h.kind)!==u.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==k||null==(i=k.value)?void 0:i.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});R||b.setHeader("x-nextjs-cache",C?"REVALIDATED":k.isMiss?"MISS":k.isStale?"STALE":"HIT"),y&&b.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let l=(0,q.fromNodeOutgoingHttpHeaders)(k.value.headers);return R&&I||l.delete(s.NEXT_CACHE_TAGS_HEADER),!k.cacheControl||b.getHeader("Cache-Control")||l.get("Cache-Control")||l.set("Cache-Control",(0,r.getCacheControlHeader)(k.cacheControl)),await (0,p.I)(U,V,new Response(k.value.body,{headers:l,status:k.value.status||200})),null};Q&&P?await h(P):(e=O.getActiveScopeSpan(),await O.withPropagatedContext(a.headers,()=>O.trace(n.BaseServerSpan.handleRequest,{spanName:`${N} ${d}`,kind:i.SpanKind.SERVER,attributes:{"http.method":N,"http.target":a.url}},h),void 0,!Q))}catch(b){if(b instanceof t.NoFallbackError||await A.onRequestError(a,b,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:C})},!1,B),I)throw b;return await (0,p.I)(U,V,new Response(null,{status:500})),null}}},63033:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-unit-async-storage.external.js")},78335:()=>{},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=57182));module.exports=c})();
|