@surething/cockpit 1.0.194 → 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.
Files changed (385) hide show
  1. package/.next-prod/BUILD_ID +1 -1
  2. package/.next-prod/app-path-routes-manifest.json +4 -3
  3. package/.next-prod/build-manifest.json +3 -3
  4. package/.next-prod/prerender-manifest.json +3 -3
  5. package/.next-prod/react-loadable-manifest.json +1 -1
  6. package/.next-prod/routes-manifest.json +6 -0
  7. package/.next-prod/server/app/_global-error/page.js +3 -3
  8. package/.next-prod/server/app/_global-error/page_client-reference-manifest.js +1 -1
  9. package/.next-prod/server/app/_global-error.html +1 -1
  10. package/.next-prod/server/app/_global-error.rsc +1 -1
  11. package/.next-prod/server/app/_global-error.segments/_full.segment.rsc +1 -1
  12. package/.next-prod/server/app/_global-error.segments/_global-error/__PAGE__.segment.rsc +1 -1
  13. package/.next-prod/server/app/_global-error.segments/_global-error.segment.rsc +1 -1
  14. package/.next-prod/server/app/_global-error.segments/_head.segment.rsc +1 -1
  15. package/.next-prod/server/app/_global-error.segments/_index.segment.rsc +1 -1
  16. package/.next-prod/server/app/_global-error.segments/_tree.segment.rsc +1 -1
  17. package/.next-prod/server/app/_not-found/page.js +2 -2
  18. package/.next-prod/server/app/_not-found/page_client-reference-manifest.js +1 -1
  19. package/.next-prod/server/app/_not-found.html +2 -2
  20. package/.next-prod/server/app/_not-found.rsc +2 -2
  21. package/.next-prod/server/app/_not-found.segments/_full.segment.rsc +2 -2
  22. package/.next-prod/server/app/_not-found.segments/_head.segment.rsc +1 -1
  23. package/.next-prod/server/app/_not-found.segments/_index.segment.rsc +2 -2
  24. package/.next-prod/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +1 -1
  25. package/.next-prod/server/app/_not-found.segments/_not-found.segment.rsc +1 -1
  26. package/.next-prod/server/app/_not-found.segments/_tree.segment.rsc +2 -2
  27. package/.next-prod/server/app/api/bash/route.js +1 -1
  28. package/.next-prod/server/app/api/chat/codex/route.js +2 -2
  29. package/.next-prod/server/app/api/chat/deepseek/route.js +16 -0
  30. package/.next-prod/server/app/api/chat/deepseek/route.js.nft.json +1 -0
  31. package/.next-prod/server/app/api/chat/deepseek/route_client-reference-manifest.js +1 -0
  32. package/.next-prod/server/app/api/chat/kimi/route.js +13 -13
  33. package/.next-prod/server/app/api/chat/ollama/route.js +2 -2
  34. package/.next-prod/server/app/api/chat/route.js +1 -1
  35. package/.next-prod/server/app/api/claude-stats/route.js +1 -1
  36. package/.next-prod/server/app/api/commands/route.js +1 -1
  37. package/.next-prod/server/app/api/comments/route.js +1 -1
  38. package/.next-prod/server/app/api/db/columns/route.js +2 -2
  39. package/.next-prod/server/app/api/db/connect/route.js +1 -1
  40. package/.next-prod/server/app/api/db/disconnect/route.js +1 -1
  41. package/.next-prod/server/app/api/db/export/route.js +1 -1
  42. package/.next-prod/server/app/api/db/query/route.js +1 -1
  43. package/.next-prod/server/app/api/db/schemas/route.js +1 -1
  44. package/.next-prod/server/app/api/extension/version/route.js +1 -1
  45. package/.next-prod/server/app/api/file/route.js +1 -1
  46. package/.next-prod/server/app/api/files/blame/route.js +1 -1
  47. package/.next-prod/server/app/api/files/clipboard/route.js +1 -1
  48. package/.next-prod/server/app/api/files/copy/route.js +1 -1
  49. package/.next-prod/server/app/api/files/delete/route.js +1 -1
  50. package/.next-prod/server/app/api/files/expanded/route.js +1 -1
  51. package/.next-prod/server/app/api/files/index/route.js +1 -1
  52. package/.next-prod/server/app/api/files/init/route.js +1 -1
  53. package/.next-prod/server/app/api/files/paste/route.js +1 -1
  54. package/.next-prod/server/app/api/files/read/route.js +1 -1
  55. package/.next-prod/server/app/api/files/readdir/route.js +1 -1
  56. package/.next-prod/server/app/api/files/recent/route.js +1 -1
  57. package/.next-prod/server/app/api/files/save/route.js +1 -1
  58. package/.next-prod/server/app/api/files/search/route.js +1 -1
  59. package/.next-prod/server/app/api/files/stat/route.js +1 -1
  60. package/.next-prod/server/app/api/files/text/route.js +1 -1
  61. package/.next-prod/server/app/api/git/branch-diff/route.js +1 -1
  62. package/.next-prod/server/app/api/git/branches/route.js +1 -1
  63. package/.next-prod/server/app/api/git/commit-diff/route.js +1 -1
  64. package/.next-prod/server/app/api/git/commits/route.js +1 -1
  65. package/.next-prod/server/app/api/git/diff/route.js +1 -1
  66. package/.next-prod/server/app/api/git/discard/route.js +1 -1
  67. package/.next-prod/server/app/api/git/stage/route.js +1 -1
  68. package/.next-prod/server/app/api/git/status/route.js +1 -1
  69. package/.next-prod/server/app/api/git/unstage/route.js +1 -1
  70. package/.next-prod/server/app/api/git/worktree/route.js +1 -1
  71. package/.next-prod/server/app/api/global-state/route.js +1 -1
  72. package/.next-prod/server/app/api/jupyter/load/route.js +1 -1
  73. package/.next-prod/server/app/api/jupyter/save/route.js +1 -1
  74. package/.next-prod/server/app/api/jupyter/shutdown/route.js +1 -1
  75. package/.next-prod/server/app/api/lsp/definition/route.js +1 -1
  76. package/.next-prod/server/app/api/lsp/hover/route.js +1 -1
  77. package/.next-prod/server/app/api/lsp/references/route.js +1 -1
  78. package/.next-prod/server/app/api/lsp/status/route.js +1 -1
  79. package/.next-prod/server/app/api/lsp/warmup/route.js +1 -1
  80. package/.next-prod/server/app/api/mysql/columns/route.js +2 -2
  81. package/.next-prod/server/app/api/mysql/connect/route.js +1 -1
  82. package/.next-prod/server/app/api/mysql/disconnect/route.js +1 -1
  83. package/.next-prod/server/app/api/mysql/export/route.js +1 -1
  84. package/.next-prod/server/app/api/mysql/query/route.js +1 -1
  85. package/.next-prod/server/app/api/mysql/schemas/route.js +2 -2
  86. package/.next-prod/server/app/api/neo4j/connect/route.js +1 -1
  87. package/.next-prod/server/app/api/neo4j/disconnect/route.js +1 -1
  88. package/.next-prod/server/app/api/neo4j/query/route.js +1 -1
  89. package/.next-prod/server/app/api/neo4j/schema/route.js +1 -1
  90. package/.next-prod/server/app/api/note/route.js +1 -1
  91. package/.next-prod/server/app/api/ollama/models/route.js +1 -1
  92. package/.next-prod/server/app/api/ollama/start/route.js +1 -1
  93. package/.next-prod/server/app/api/open-cursor/route.js +1 -1
  94. package/.next-prod/server/app/api/open-vscode/route.js +1 -1
  95. package/.next-prod/server/app/api/pick-folder/route.js +1 -1
  96. package/.next-prod/server/app/api/pinned-sessions/route.js +1 -1
  97. package/.next-prod/server/app/api/project-settings/route.js +1 -1
  98. package/.next-prod/server/app/api/project-state/route.js +1 -1
  99. package/.next-prod/server/app/api/projects/route.js +1 -1
  100. package/.next-prod/server/app/api/redis/command/route.js +1 -1
  101. package/.next-prod/server/app/api/redis/connect/route.js +1 -1
  102. package/.next-prod/server/app/api/redis/delete/route.js +1 -1
  103. package/.next-prod/server/app/api/redis/disconnect/route.js +1 -1
  104. package/.next-prod/server/app/api/redis/get/route.js +1 -1
  105. package/.next-prod/server/app/api/redis/keys/route.js +1 -1
  106. package/.next-prod/server/app/api/redis/set/route.js +1 -1
  107. package/.next-prod/server/app/api/review/[id]/comments/route.js +1 -1
  108. package/.next-prod/server/app/api/review/[id]/replies/route.js +1 -1
  109. package/.next-prod/server/app/api/review/[id]/route.js +1 -1
  110. package/.next-prod/server/app/api/review/identify/route.js +1 -1
  111. package/.next-prod/server/app/api/review/order/route.js +1 -1
  112. package/.next-prod/server/app/api/review/route.js +1 -1
  113. package/.next-prod/server/app/api/review/share-info/route.js +1 -1
  114. package/.next-prod/server/app/api/review/users/route.js +1 -1
  115. package/.next-prod/server/app/api/scheduled-tasks/route.js +1 -1
  116. package/.next-prod/server/app/api/services/config/route.js +1 -1
  117. package/.next-prod/server/app/api/services/scripts/route.js +1 -1
  118. package/.next-prod/server/app/api/session/[sessionId]/fork/route.js +1 -1
  119. package/.next-prod/server/app/api/session/[sessionId]/history/route.js +1 -1
  120. package/.next-prod/server/app/api/session-by-path/route.js +1 -1
  121. package/.next-prod/server/app/api/sessions/projects/[encodedPath]/route.js +1 -1
  122. package/.next-prod/server/app/api/sessions/projects/route.js +1 -1
  123. package/.next-prod/server/app/api/sessions/route.js +1 -1
  124. package/.next-prod/server/app/api/settings/route.js +1 -1
  125. package/.next-prod/server/app/api/skills/[id]/route.js +1 -1
  126. package/.next-prod/server/app/api/skills/content/route.js +1 -1
  127. package/.next-prod/server/app/api/skills/route.js +1 -1
  128. package/.next-prod/server/app/api/terminal/aliases/route.js +1 -1
  129. package/.next-prod/server/app/api/terminal/autocomplete/route.js +1 -1
  130. package/.next-prod/server/app/api/terminal/bubble-order/route.js +1 -1
  131. package/.next-prod/server/app/api/terminal/env/route.js +1 -1
  132. package/.next-prod/server/app/api/terminal/history/route.js +1 -1
  133. package/.next-prod/server/app/api/version/route.js +1 -1
  134. package/.next-prod/server/app/favicon.ico/route.js +1 -1
  135. package/.next-prod/server/app/manifest.webmanifest/route.js +2 -2
  136. package/.next-prod/server/app/page.js +3 -3
  137. package/.next-prod/server/app/page_client-reference-manifest.js +1 -1
  138. package/.next-prod/server/app/project/page.js +5 -5
  139. package/.next-prod/server/app/project/page_client-reference-manifest.js +1 -1
  140. package/.next-prod/server/app/review/[id]/page.js +2 -2
  141. package/.next-prod/server/app/review/[id]/page_client-reference-manifest.js +1 -1
  142. package/.next-prod/server/app-paths-manifest.json +4 -3
  143. package/.next-prod/server/chunks/4098.js +1 -1
  144. package/.next-prod/server/chunks/4490.js +1 -1
  145. package/.next-prod/server/chunks/5394.js +1 -1
  146. package/.next-prod/server/middleware-build-manifest.js +1 -1
  147. package/.next-prod/server/middleware-react-loadable-manifest.js +1 -1
  148. package/.next-prod/server/pages/404.html +2 -2
  149. package/.next-prod/server/pages/500.html +1 -1
  150. package/.next-prod/server/server-reference-manifest.json +1 -1
  151. package/.next-prod/static/chunks/{700.0aaec5a3a570d182.js → 700.642136ad4fbe16ca.js} +4 -4
  152. package/.next-prod/static/chunks/app/{api/bash/route-94e40d01eb0846a0.js → _global-error/page-aa58df485295770f.js} +1 -1
  153. package/.next-prod/static/chunks/app/api/{chat/codex/route-94e40d01eb0846a0.js → bash/route-aa58df485295770f.js} +1 -1
  154. package/.next-prod/static/chunks/app/api/chat/{kimi/route-94e40d01eb0846a0.js → codex/route-aa58df485295770f.js} +1 -1
  155. package/.next-prod/static/chunks/app/{_global-error/page-94e40d01eb0846a0.js → api/chat/deepseek/route-aa58df485295770f.js} +1 -1
  156. package/.next-prod/static/chunks/app/api/chat/kimi/route-aa58df485295770f.js +1 -0
  157. package/.next-prod/static/chunks/app/api/chat/ollama/route-aa58df485295770f.js +1 -0
  158. package/.next-prod/static/chunks/app/api/chat/route-aa58df485295770f.js +1 -0
  159. package/.next-prod/static/chunks/app/api/claude-stats/route-aa58df485295770f.js +1 -0
  160. package/.next-prod/static/chunks/app/api/commands/route-aa58df485295770f.js +1 -0
  161. package/.next-prod/static/chunks/app/api/comments/route-aa58df485295770f.js +1 -0
  162. package/.next-prod/static/chunks/app/api/db/columns/route-aa58df485295770f.js +1 -0
  163. package/.next-prod/static/chunks/app/api/db/connect/route-aa58df485295770f.js +1 -0
  164. package/.next-prod/static/chunks/app/api/db/disconnect/route-aa58df485295770f.js +1 -0
  165. package/.next-prod/static/chunks/app/api/db/export/route-aa58df485295770f.js +1 -0
  166. package/.next-prod/static/chunks/app/api/db/query/route-aa58df485295770f.js +1 -0
  167. package/.next-prod/static/chunks/app/api/db/schemas/route-aa58df485295770f.js +1 -0
  168. package/.next-prod/static/chunks/app/api/extension/version/route-aa58df485295770f.js +1 -0
  169. package/.next-prod/static/chunks/app/api/file/route-aa58df485295770f.js +1 -0
  170. package/.next-prod/static/chunks/app/api/files/blame/route-aa58df485295770f.js +1 -0
  171. package/.next-prod/static/chunks/app/api/files/clipboard/route-aa58df485295770f.js +1 -0
  172. package/.next-prod/static/chunks/app/api/files/copy/route-aa58df485295770f.js +1 -0
  173. package/.next-prod/static/chunks/app/api/files/delete/route-aa58df485295770f.js +1 -0
  174. package/.next-prod/static/chunks/app/api/files/expanded/route-aa58df485295770f.js +1 -0
  175. package/.next-prod/static/chunks/app/api/files/index/route-aa58df485295770f.js +1 -0
  176. package/.next-prod/static/chunks/app/api/files/init/route-aa58df485295770f.js +1 -0
  177. package/.next-prod/static/chunks/app/api/files/paste/route-aa58df485295770f.js +1 -0
  178. package/.next-prod/static/chunks/app/api/files/read/route-aa58df485295770f.js +1 -0
  179. package/.next-prod/static/chunks/app/api/files/readdir/route-aa58df485295770f.js +1 -0
  180. package/.next-prod/static/chunks/app/api/files/recent/route-aa58df485295770f.js +1 -0
  181. package/.next-prod/static/chunks/app/api/files/save/route-aa58df485295770f.js +1 -0
  182. package/.next-prod/static/chunks/app/api/files/search/route-aa58df485295770f.js +1 -0
  183. package/.next-prod/static/chunks/app/api/files/stat/route-aa58df485295770f.js +1 -0
  184. package/.next-prod/static/chunks/app/api/files/text/route-aa58df485295770f.js +1 -0
  185. package/.next-prod/static/chunks/app/api/git/branch-diff/route-aa58df485295770f.js +1 -0
  186. package/.next-prod/static/chunks/app/api/git/branches/route-aa58df485295770f.js +1 -0
  187. package/.next-prod/static/chunks/app/api/git/commit-diff/route-aa58df485295770f.js +1 -0
  188. package/.next-prod/static/chunks/app/api/git/commits/route-aa58df485295770f.js +1 -0
  189. package/.next-prod/static/chunks/app/api/git/diff/route-aa58df485295770f.js +1 -0
  190. package/.next-prod/static/chunks/app/api/git/discard/route-aa58df485295770f.js +1 -0
  191. package/.next-prod/static/chunks/app/api/git/stage/route-aa58df485295770f.js +1 -0
  192. package/.next-prod/static/chunks/app/api/git/status/route-aa58df485295770f.js +1 -0
  193. package/.next-prod/static/chunks/app/api/git/unstage/route-aa58df485295770f.js +1 -0
  194. package/.next-prod/static/chunks/app/api/git/worktree/route-aa58df485295770f.js +1 -0
  195. package/.next-prod/static/chunks/app/api/global-state/route-aa58df485295770f.js +1 -0
  196. package/.next-prod/static/chunks/app/api/jupyter/load/route-aa58df485295770f.js +1 -0
  197. package/.next-prod/static/chunks/app/api/jupyter/save/route-aa58df485295770f.js +1 -0
  198. package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-aa58df485295770f.js +1 -0
  199. package/.next-prod/static/chunks/app/api/lsp/definition/route-aa58df485295770f.js +1 -0
  200. package/.next-prod/static/chunks/app/api/lsp/hover/route-aa58df485295770f.js +1 -0
  201. package/.next-prod/static/chunks/app/api/lsp/references/route-aa58df485295770f.js +1 -0
  202. package/.next-prod/static/chunks/app/api/lsp/status/route-aa58df485295770f.js +1 -0
  203. package/.next-prod/static/chunks/app/api/lsp/warmup/route-aa58df485295770f.js +1 -0
  204. package/.next-prod/static/chunks/app/api/mysql/columns/route-aa58df485295770f.js +1 -0
  205. package/.next-prod/static/chunks/app/api/mysql/connect/route-aa58df485295770f.js +1 -0
  206. package/.next-prod/static/chunks/app/api/mysql/disconnect/route-aa58df485295770f.js +1 -0
  207. package/.next-prod/static/chunks/app/api/mysql/export/route-aa58df485295770f.js +1 -0
  208. package/.next-prod/static/chunks/app/api/mysql/query/route-aa58df485295770f.js +1 -0
  209. package/.next-prod/static/chunks/app/api/mysql/schemas/route-aa58df485295770f.js +1 -0
  210. package/.next-prod/static/chunks/app/api/neo4j/connect/route-aa58df485295770f.js +1 -0
  211. package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-aa58df485295770f.js +1 -0
  212. package/.next-prod/static/chunks/app/api/neo4j/query/route-aa58df485295770f.js +1 -0
  213. package/.next-prod/static/chunks/app/api/neo4j/schema/route-aa58df485295770f.js +1 -0
  214. package/.next-prod/static/chunks/app/api/note/route-aa58df485295770f.js +1 -0
  215. package/.next-prod/static/chunks/app/api/ollama/models/route-aa58df485295770f.js +1 -0
  216. package/.next-prod/static/chunks/app/api/ollama/start/route-aa58df485295770f.js +1 -0
  217. package/.next-prod/static/chunks/app/api/open-cursor/route-aa58df485295770f.js +1 -0
  218. package/.next-prod/static/chunks/app/api/open-vscode/route-aa58df485295770f.js +1 -0
  219. package/.next-prod/static/chunks/app/api/pick-folder/route-aa58df485295770f.js +1 -0
  220. package/.next-prod/static/chunks/app/api/pinned-sessions/route-aa58df485295770f.js +1 -0
  221. package/.next-prod/static/chunks/app/api/project-settings/route-aa58df485295770f.js +1 -0
  222. package/.next-prod/static/chunks/app/api/project-state/route-aa58df485295770f.js +1 -0
  223. package/.next-prod/static/chunks/app/api/projects/route-aa58df485295770f.js +1 -0
  224. package/.next-prod/static/chunks/app/api/redis/command/route-aa58df485295770f.js +1 -0
  225. package/.next-prod/static/chunks/app/api/redis/connect/route-aa58df485295770f.js +1 -0
  226. package/.next-prod/static/chunks/app/api/redis/delete/route-aa58df485295770f.js +1 -0
  227. package/.next-prod/static/chunks/app/api/redis/disconnect/route-aa58df485295770f.js +1 -0
  228. package/.next-prod/static/chunks/app/api/redis/get/route-aa58df485295770f.js +1 -0
  229. package/.next-prod/static/chunks/app/api/redis/keys/route-aa58df485295770f.js +1 -0
  230. package/.next-prod/static/chunks/app/api/redis/set/route-aa58df485295770f.js +1 -0
  231. package/.next-prod/static/chunks/app/api/review/[id]/comments/route-aa58df485295770f.js +1 -0
  232. package/.next-prod/static/chunks/app/api/review/[id]/replies/route-aa58df485295770f.js +1 -0
  233. package/.next-prod/static/chunks/app/api/review/[id]/route-aa58df485295770f.js +1 -0
  234. package/.next-prod/static/chunks/app/api/review/identify/route-aa58df485295770f.js +1 -0
  235. package/.next-prod/static/chunks/app/api/review/order/route-aa58df485295770f.js +1 -0
  236. package/.next-prod/static/chunks/app/api/review/route-aa58df485295770f.js +1 -0
  237. package/.next-prod/static/chunks/app/api/review/share-info/route-aa58df485295770f.js +1 -0
  238. package/.next-prod/static/chunks/app/api/review/users/route-aa58df485295770f.js +1 -0
  239. package/.next-prod/static/chunks/app/api/scheduled-tasks/route-aa58df485295770f.js +1 -0
  240. package/.next-prod/static/chunks/app/api/services/config/route-aa58df485295770f.js +1 -0
  241. package/.next-prod/static/chunks/app/api/services/scripts/route-aa58df485295770f.js +1 -0
  242. package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-aa58df485295770f.js +1 -0
  243. package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-aa58df485295770f.js +1 -0
  244. package/.next-prod/static/chunks/app/api/session-by-path/route-aa58df485295770f.js +1 -0
  245. package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-aa58df485295770f.js +1 -0
  246. package/.next-prod/static/chunks/app/api/sessions/projects/route-aa58df485295770f.js +1 -0
  247. package/.next-prod/static/chunks/app/api/sessions/route-aa58df485295770f.js +1 -0
  248. package/.next-prod/static/chunks/app/api/settings/route-aa58df485295770f.js +1 -0
  249. package/.next-prod/static/chunks/app/api/skills/[id]/route-aa58df485295770f.js +1 -0
  250. package/.next-prod/static/chunks/app/api/skills/content/route-aa58df485295770f.js +1 -0
  251. package/.next-prod/static/chunks/app/api/skills/route-aa58df485295770f.js +1 -0
  252. package/.next-prod/static/chunks/app/api/terminal/aliases/route-aa58df485295770f.js +1 -0
  253. package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-aa58df485295770f.js +1 -0
  254. package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-aa58df485295770f.js +1 -0
  255. package/.next-prod/static/chunks/app/api/terminal/env/route-aa58df485295770f.js +1 -0
  256. package/.next-prod/static/chunks/app/api/terminal/history/route-aa58df485295770f.js +1 -0
  257. package/.next-prod/static/chunks/app/api/version/route-aa58df485295770f.js +1 -0
  258. package/.next-prod/static/chunks/app/manifest.webmanifest/route-aa58df485295770f.js +1 -0
  259. package/.next-prod/static/chunks/app/project/page-3a148e22b1d92a17.js +29 -0
  260. package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-aa58df485295770f.js +1 -0
  261. package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-aa58df485295770f.js +1 -0
  262. package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-aa58df485295770f.js +1 -0
  263. package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-aa58df485295770f.js +1 -0
  264. package/.next-prod/static/chunks/{webpack-9a8ea3995034c536.js → webpack-c669c0003eb75661.js} +1 -1
  265. package/.next-prod/static/css/083cb04521b4969d.css +1 -0
  266. package/.next-prod/static/iLRBjFXcqOGmNS619Y9Uo/_buildManifest.js +1 -0
  267. package/.next-prod/trace +12 -12
  268. package/.next-prod/trace-build +1 -1
  269. package/.next-prod/types/app/api/chat/deepseek/route.ts +351 -0
  270. package/.next-prod/types/routes.d.ts +2 -1
  271. package/.next-prod/types/validator.ts +9 -0
  272. package/dist/{chunk-ZDTXJE6Z.mjs → chunk-J6PMXUI4.mjs} +2 -0
  273. package/dist/scheduledTasks.mjs +1 -1
  274. package/dist/wsServer.mjs +1 -1
  275. package/package.json +1 -1
  276. package/.next-prod/static/GrlHt_NxoSxuOTl-aMQdx/_buildManifest.js +0 -1
  277. package/.next-prod/static/chunks/app/api/chat/ollama/route-94e40d01eb0846a0.js +0 -1
  278. package/.next-prod/static/chunks/app/api/chat/route-94e40d01eb0846a0.js +0 -1
  279. package/.next-prod/static/chunks/app/api/claude-stats/route-94e40d01eb0846a0.js +0 -1
  280. package/.next-prod/static/chunks/app/api/commands/route-94e40d01eb0846a0.js +0 -1
  281. package/.next-prod/static/chunks/app/api/comments/route-94e40d01eb0846a0.js +0 -1
  282. package/.next-prod/static/chunks/app/api/db/columns/route-94e40d01eb0846a0.js +0 -1
  283. package/.next-prod/static/chunks/app/api/db/connect/route-94e40d01eb0846a0.js +0 -1
  284. package/.next-prod/static/chunks/app/api/db/disconnect/route-94e40d01eb0846a0.js +0 -1
  285. package/.next-prod/static/chunks/app/api/db/export/route-94e40d01eb0846a0.js +0 -1
  286. package/.next-prod/static/chunks/app/api/db/query/route-94e40d01eb0846a0.js +0 -1
  287. package/.next-prod/static/chunks/app/api/db/schemas/route-94e40d01eb0846a0.js +0 -1
  288. package/.next-prod/static/chunks/app/api/extension/version/route-94e40d01eb0846a0.js +0 -1
  289. package/.next-prod/static/chunks/app/api/file/route-94e40d01eb0846a0.js +0 -1
  290. package/.next-prod/static/chunks/app/api/files/blame/route-94e40d01eb0846a0.js +0 -1
  291. package/.next-prod/static/chunks/app/api/files/clipboard/route-94e40d01eb0846a0.js +0 -1
  292. package/.next-prod/static/chunks/app/api/files/copy/route-94e40d01eb0846a0.js +0 -1
  293. package/.next-prod/static/chunks/app/api/files/delete/route-94e40d01eb0846a0.js +0 -1
  294. package/.next-prod/static/chunks/app/api/files/expanded/route-94e40d01eb0846a0.js +0 -1
  295. package/.next-prod/static/chunks/app/api/files/index/route-94e40d01eb0846a0.js +0 -1
  296. package/.next-prod/static/chunks/app/api/files/init/route-94e40d01eb0846a0.js +0 -1
  297. package/.next-prod/static/chunks/app/api/files/paste/route-94e40d01eb0846a0.js +0 -1
  298. package/.next-prod/static/chunks/app/api/files/read/route-94e40d01eb0846a0.js +0 -1
  299. package/.next-prod/static/chunks/app/api/files/readdir/route-94e40d01eb0846a0.js +0 -1
  300. package/.next-prod/static/chunks/app/api/files/recent/route-94e40d01eb0846a0.js +0 -1
  301. package/.next-prod/static/chunks/app/api/files/save/route-94e40d01eb0846a0.js +0 -1
  302. package/.next-prod/static/chunks/app/api/files/search/route-94e40d01eb0846a0.js +0 -1
  303. package/.next-prod/static/chunks/app/api/files/stat/route-94e40d01eb0846a0.js +0 -1
  304. package/.next-prod/static/chunks/app/api/files/text/route-94e40d01eb0846a0.js +0 -1
  305. package/.next-prod/static/chunks/app/api/git/branch-diff/route-94e40d01eb0846a0.js +0 -1
  306. package/.next-prod/static/chunks/app/api/git/branches/route-94e40d01eb0846a0.js +0 -1
  307. package/.next-prod/static/chunks/app/api/git/commit-diff/route-94e40d01eb0846a0.js +0 -1
  308. package/.next-prod/static/chunks/app/api/git/commits/route-94e40d01eb0846a0.js +0 -1
  309. package/.next-prod/static/chunks/app/api/git/diff/route-94e40d01eb0846a0.js +0 -1
  310. package/.next-prod/static/chunks/app/api/git/discard/route-94e40d01eb0846a0.js +0 -1
  311. package/.next-prod/static/chunks/app/api/git/stage/route-94e40d01eb0846a0.js +0 -1
  312. package/.next-prod/static/chunks/app/api/git/status/route-94e40d01eb0846a0.js +0 -1
  313. package/.next-prod/static/chunks/app/api/git/unstage/route-94e40d01eb0846a0.js +0 -1
  314. package/.next-prod/static/chunks/app/api/git/worktree/route-94e40d01eb0846a0.js +0 -1
  315. package/.next-prod/static/chunks/app/api/global-state/route-94e40d01eb0846a0.js +0 -1
  316. package/.next-prod/static/chunks/app/api/jupyter/load/route-94e40d01eb0846a0.js +0 -1
  317. package/.next-prod/static/chunks/app/api/jupyter/save/route-94e40d01eb0846a0.js +0 -1
  318. package/.next-prod/static/chunks/app/api/jupyter/shutdown/route-94e40d01eb0846a0.js +0 -1
  319. package/.next-prod/static/chunks/app/api/lsp/definition/route-94e40d01eb0846a0.js +0 -1
  320. package/.next-prod/static/chunks/app/api/lsp/hover/route-94e40d01eb0846a0.js +0 -1
  321. package/.next-prod/static/chunks/app/api/lsp/references/route-94e40d01eb0846a0.js +0 -1
  322. package/.next-prod/static/chunks/app/api/lsp/status/route-94e40d01eb0846a0.js +0 -1
  323. package/.next-prod/static/chunks/app/api/lsp/warmup/route-94e40d01eb0846a0.js +0 -1
  324. package/.next-prod/static/chunks/app/api/mysql/columns/route-94e40d01eb0846a0.js +0 -1
  325. package/.next-prod/static/chunks/app/api/mysql/connect/route-94e40d01eb0846a0.js +0 -1
  326. package/.next-prod/static/chunks/app/api/mysql/disconnect/route-94e40d01eb0846a0.js +0 -1
  327. package/.next-prod/static/chunks/app/api/mysql/export/route-94e40d01eb0846a0.js +0 -1
  328. package/.next-prod/static/chunks/app/api/mysql/query/route-94e40d01eb0846a0.js +0 -1
  329. package/.next-prod/static/chunks/app/api/mysql/schemas/route-94e40d01eb0846a0.js +0 -1
  330. package/.next-prod/static/chunks/app/api/neo4j/connect/route-94e40d01eb0846a0.js +0 -1
  331. package/.next-prod/static/chunks/app/api/neo4j/disconnect/route-94e40d01eb0846a0.js +0 -1
  332. package/.next-prod/static/chunks/app/api/neo4j/query/route-94e40d01eb0846a0.js +0 -1
  333. package/.next-prod/static/chunks/app/api/neo4j/schema/route-94e40d01eb0846a0.js +0 -1
  334. package/.next-prod/static/chunks/app/api/note/route-94e40d01eb0846a0.js +0 -1
  335. package/.next-prod/static/chunks/app/api/ollama/models/route-94e40d01eb0846a0.js +0 -1
  336. package/.next-prod/static/chunks/app/api/ollama/start/route-94e40d01eb0846a0.js +0 -1
  337. package/.next-prod/static/chunks/app/api/open-cursor/route-94e40d01eb0846a0.js +0 -1
  338. package/.next-prod/static/chunks/app/api/open-vscode/route-94e40d01eb0846a0.js +0 -1
  339. package/.next-prod/static/chunks/app/api/pick-folder/route-94e40d01eb0846a0.js +0 -1
  340. package/.next-prod/static/chunks/app/api/pinned-sessions/route-94e40d01eb0846a0.js +0 -1
  341. package/.next-prod/static/chunks/app/api/project-settings/route-94e40d01eb0846a0.js +0 -1
  342. package/.next-prod/static/chunks/app/api/project-state/route-94e40d01eb0846a0.js +0 -1
  343. package/.next-prod/static/chunks/app/api/projects/route-94e40d01eb0846a0.js +0 -1
  344. package/.next-prod/static/chunks/app/api/redis/command/route-94e40d01eb0846a0.js +0 -1
  345. package/.next-prod/static/chunks/app/api/redis/connect/route-94e40d01eb0846a0.js +0 -1
  346. package/.next-prod/static/chunks/app/api/redis/delete/route-94e40d01eb0846a0.js +0 -1
  347. package/.next-prod/static/chunks/app/api/redis/disconnect/route-94e40d01eb0846a0.js +0 -1
  348. package/.next-prod/static/chunks/app/api/redis/get/route-94e40d01eb0846a0.js +0 -1
  349. package/.next-prod/static/chunks/app/api/redis/keys/route-94e40d01eb0846a0.js +0 -1
  350. package/.next-prod/static/chunks/app/api/redis/set/route-94e40d01eb0846a0.js +0 -1
  351. package/.next-prod/static/chunks/app/api/review/[id]/comments/route-94e40d01eb0846a0.js +0 -1
  352. package/.next-prod/static/chunks/app/api/review/[id]/replies/route-94e40d01eb0846a0.js +0 -1
  353. package/.next-prod/static/chunks/app/api/review/[id]/route-94e40d01eb0846a0.js +0 -1
  354. package/.next-prod/static/chunks/app/api/review/identify/route-94e40d01eb0846a0.js +0 -1
  355. package/.next-prod/static/chunks/app/api/review/order/route-94e40d01eb0846a0.js +0 -1
  356. package/.next-prod/static/chunks/app/api/review/route-94e40d01eb0846a0.js +0 -1
  357. package/.next-prod/static/chunks/app/api/review/share-info/route-94e40d01eb0846a0.js +0 -1
  358. package/.next-prod/static/chunks/app/api/review/users/route-94e40d01eb0846a0.js +0 -1
  359. package/.next-prod/static/chunks/app/api/scheduled-tasks/route-94e40d01eb0846a0.js +0 -1
  360. package/.next-prod/static/chunks/app/api/services/config/route-94e40d01eb0846a0.js +0 -1
  361. package/.next-prod/static/chunks/app/api/services/scripts/route-94e40d01eb0846a0.js +0 -1
  362. package/.next-prod/static/chunks/app/api/session/[sessionId]/fork/route-94e40d01eb0846a0.js +0 -1
  363. package/.next-prod/static/chunks/app/api/session/[sessionId]/history/route-94e40d01eb0846a0.js +0 -1
  364. package/.next-prod/static/chunks/app/api/session-by-path/route-94e40d01eb0846a0.js +0 -1
  365. package/.next-prod/static/chunks/app/api/sessions/projects/[encodedPath]/route-94e40d01eb0846a0.js +0 -1
  366. package/.next-prod/static/chunks/app/api/sessions/projects/route-94e40d01eb0846a0.js +0 -1
  367. package/.next-prod/static/chunks/app/api/sessions/route-94e40d01eb0846a0.js +0 -1
  368. package/.next-prod/static/chunks/app/api/settings/route-94e40d01eb0846a0.js +0 -1
  369. package/.next-prod/static/chunks/app/api/skills/[id]/route-94e40d01eb0846a0.js +0 -1
  370. package/.next-prod/static/chunks/app/api/skills/content/route-94e40d01eb0846a0.js +0 -1
  371. package/.next-prod/static/chunks/app/api/skills/route-94e40d01eb0846a0.js +0 -1
  372. package/.next-prod/static/chunks/app/api/terminal/aliases/route-94e40d01eb0846a0.js +0 -1
  373. package/.next-prod/static/chunks/app/api/terminal/autocomplete/route-94e40d01eb0846a0.js +0 -1
  374. package/.next-prod/static/chunks/app/api/terminal/bubble-order/route-94e40d01eb0846a0.js +0 -1
  375. package/.next-prod/static/chunks/app/api/terminal/env/route-94e40d01eb0846a0.js +0 -1
  376. package/.next-prod/static/chunks/app/api/terminal/history/route-94e40d01eb0846a0.js +0 -1
  377. package/.next-prod/static/chunks/app/api/version/route-94e40d01eb0846a0.js +0 -1
  378. package/.next-prod/static/chunks/app/manifest.webmanifest/route-94e40d01eb0846a0.js +0 -1
  379. package/.next-prod/static/chunks/app/project/page-66c22be12277e5c1.js +0 -29
  380. package/.next-prod/static/chunks/next/dist/client/components/builtin/app-error-94e40d01eb0846a0.js +0 -1
  381. package/.next-prod/static/chunks/next/dist/client/components/builtin/forbidden-94e40d01eb0846a0.js +0 -1
  382. package/.next-prod/static/chunks/next/dist/client/components/builtin/not-found-94e40d01eb0846a0.js +0 -1
  383. package/.next-prod/static/chunks/next/dist/client/components/builtin/unauthorized-94e40d01eb0846a0.js +0 -1
  384. package/.next-prod/static/css/2a6d4c877711db09.css +0 -1
  385. /package/.next-prod/static/{GrlHt_NxoSxuOTl-aMQdx → iLRBjFXcqOGmNS619Y9Uo}/_ssgManifest.js +0 -0
@@ -1 +1 @@
1
- (()=>{var a={};a.id=1124,a.ids=[1124],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")},27910:a=>{"use strict";a.exports=require("stream")},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:()=>{},79748:a=>{"use strict";a.exports=require("fs/promises")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},90840:(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});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(79748),x=c(29021),y=c(27910),z=c(33873),A=c.n(z),B=c(93764);async function C(a){let{searchParams:b}=a.nextUrl,c=b.get("path"),d="true"===b.get("raw");if(!c)return v.NextResponse.json({error:"Missing path parameter"},{status:400});if(c.includes("\0"))return v.NextResponse.json({error:"Invalid path"},{status:400});let e=A().resolve(c);if(!A().isAbsolute(c))return v.NextResponse.json({error:"This endpoint requires an absolute path; use /api/files/* for cwd-relative reads"},{status:400});try{let b=await (0,w.stat)(e);if(b.isDirectory())return v.NextResponse.json({error:"Path is a directory"},{status:409});if(!b.isFile())return v.NextResponse.json({error:"Not a regular file"},{status:400});let c=A().extname(e).toLowerCase(),f=(0,B.L8)(c,b.size),g=(0,B.Pe)(b.size,b.mtimeMs);if(d){if("too-large"===f)return v.NextResponse.json({error:`Image too large (over ${Math.floor(B.No/1024/1024)}MB)`,size:b.size},{status:413});if("image"!==f)return v.NextResponse.json({error:`raw=true only supports image files (category: ${f})`,category:f},{status:409});if((0,B.lU)(a.headers.get("if-none-match"),g))return new v.NextResponse(null,{status:304,headers:(0,B.hn)(g,b.mtimeMs)});let d={...(0,B.hn)(g,b.mtimeMs),"Content-Type":(0,B.hH)(c),"Accept-Ranges":"bytes"},h=a.headers.get("range");if(h){let a=/^bytes=(\d*)-(\d*)$/.exec(h);if(a){let c=a[1]?parseInt(a[1],10):0,f=a[2]?parseInt(a[2],10):b.size-1;if(Number.isFinite(c)&&Number.isFinite(f)&&c>=0&&f<b.size&&c<=f){let a=(0,x.createReadStream)(e,{start:c,end:f});return new v.NextResponse(y.Readable.toWeb(a),{status:206,headers:{...d,"Content-Length":String(f-c+1),"Content-Range":`bytes ${c}-${f}/${b.size}`}})}return new v.NextResponse(null,{status:416,headers:{"Content-Range":`bytes */${b.size}`}})}}let i=(0,x.createReadStream)(e);return new v.NextResponse(y.Readable.toWeb(i),{status:200,headers:{...d,"Content-Length":String(b.size)}})}if("image"===f||"binary"===f)return v.NextResponse.json({error:`Not a text file (category: ${f}). Use raw=true for images.`,category:f},{status:409});if("too-large"===f||b.size>B.pZ)return v.NextResponse.json({error:`File too large (over ${Math.floor(B.pZ/1024/1024)}MB)`,size:b.size},{status:413});let h=await (0,w.readFile)(e,"utf-8");if((0,B.VA)(h))return v.NextResponse.json({error:"File appears to be binary",category:"binary"},{status:409});return v.NextResponse.json({content:h,path:e,size:b.size,mtimeMs:b.mtimeMs,etag:g},{headers:{"Cache-Control":"no-cache"}})}catch(a){if("ENOENT"===a.code)return v.NextResponse.json({error:"File not found"},{status:404});if("EACCES"===a.code)return v.NextResponse.json({error:"Permission denied"},{status:403});return console.error("Error reading file:",a),v.NextResponse.json({error:"Failed to read file"},{status:500})}}let D=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/file/route",pathname:"/api/file",filename:"route",bundlePath:"app/api/file/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/file/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/file/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}}},93764:(a,b,c)=>{"use strict";c.d(b,{L8:()=>o,No:()=>h,Pe:()=>n,VA:()=>p,hC:()=>m,hH:()=>l,hn:()=>r,iF:()=>q,lU:()=>s,pZ:()=>g});var d=c(79748),e=c(33873),f=c.n(e);let g=0xa00000,h=0x3200000,i=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".ico",".bmp",".avif"]),j=new Set([".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".zip",".tar",".gz",".rar",".7z",".exe",".dll",".so",".dylib",".mp3",".mp4",".avi",".mov",".mkv",".wav",".flac",".ttf",".otf",".woff",".woff2",".eot",".db",".sqlite",".sqlite3",".pyc",".class",".o",".a"]),k={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml",".ico":"image/x-icon",".bmp":"image/bmp",".avif":"image/avif"};function l(a){return k[a.toLowerCase()]||"application/octet-stream"}function m(a,b){if("string"!=typeof b||0===b.length)return null;let c=f().resolve(a),d=f().resolve(c,b);return d===c||d.startsWith(c+f().sep)?d:null}function n(a,b){return`"${a.toString(36)}-${Math.floor(b).toString(36)}"`}function o(a,b){let c=a.startsWith(".")?a.toLowerCase():f().extname(a).toLowerCase();return i.has(c)?b>h?"too-large":"image":j.has(c)?"binary":b>g?"too-large":"text"}function p(a){let b=0,c=Math.min(a.length,1e3);for(let d=0;d<c;d++){let c=a.charCodeAt(d);if(0===c)return!0;c<32&&9!==c&&10!==c&&13!==c&&b++}return c>0&&b/c>.1}async function q(a){let b,c=!1;try{(await (0,d.lstat)(a)).isSymbolicLink()&&(c=!0,b=await (0,d.readlink)(a))}catch{}let e=await (0,d.stat)(a);return{size:e.size,mtimeMs:e.mtimeMs,isDirectory:e.isDirectory(),isSymlink:c,symlinkTarget:b}}function r(a,b){return{ETag:a,"Last-Modified":new Date(b).toUTCString(),"Cache-Control":"no-cache, must-revalidate"}}function s(a,b){return!!a&&a.split(",").map(a=>a.trim().replace(/^W\//,"")).includes(b)}},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=90840));module.exports=c})();
1
+ (()=>{var a={};a.id=1124,a.ids=[1124],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")},27910:a=>{"use strict";a.exports=require("stream")},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")},56139:(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});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(79748),x=c(29021),y=c(27910),z=c(33873),A=c.n(z),B=c(93764);async function C(a){let{searchParams:b}=a.nextUrl,c=b.get("path"),d="true"===b.get("raw");if(!c)return v.NextResponse.json({error:"Missing path parameter"},{status:400});if(c.includes("\0"))return v.NextResponse.json({error:"Invalid path"},{status:400});let e=A().resolve(c);if(!A().isAbsolute(c))return v.NextResponse.json({error:"This endpoint requires an absolute path; use /api/files/* for cwd-relative reads"},{status:400});try{let b=await (0,w.stat)(e);if(b.isDirectory())return v.NextResponse.json({error:"Path is a directory"},{status:409});if(!b.isFile())return v.NextResponse.json({error:"Not a regular file"},{status:400});let c=A().extname(e).toLowerCase(),f=(0,B.L8)(c,b.size),g=(0,B.Pe)(b.size,b.mtimeMs);if(d){if("too-large"===f)return v.NextResponse.json({error:`Image too large (over ${Math.floor(B.No/1024/1024)}MB)`,size:b.size},{status:413});if("image"!==f)return v.NextResponse.json({error:`raw=true only supports image files (category: ${f})`,category:f},{status:409});if((0,B.lU)(a.headers.get("if-none-match"),g))return new v.NextResponse(null,{status:304,headers:(0,B.hn)(g,b.mtimeMs)});let d={...(0,B.hn)(g,b.mtimeMs),"Content-Type":(0,B.hH)(c),"Accept-Ranges":"bytes"},h=a.headers.get("range");if(h){let a=/^bytes=(\d*)-(\d*)$/.exec(h);if(a){let c=a[1]?parseInt(a[1],10):0,f=a[2]?parseInt(a[2],10):b.size-1;if(Number.isFinite(c)&&Number.isFinite(f)&&c>=0&&f<b.size&&c<=f){let a=(0,x.createReadStream)(e,{start:c,end:f});return new v.NextResponse(y.Readable.toWeb(a),{status:206,headers:{...d,"Content-Length":String(f-c+1),"Content-Range":`bytes ${c}-${f}/${b.size}`}})}return new v.NextResponse(null,{status:416,headers:{"Content-Range":`bytes */${b.size}`}})}}let i=(0,x.createReadStream)(e);return new v.NextResponse(y.Readable.toWeb(i),{status:200,headers:{...d,"Content-Length":String(b.size)}})}if("image"===f||"binary"===f)return v.NextResponse.json({error:`Not a text file (category: ${f}). Use raw=true for images.`,category:f},{status:409});if("too-large"===f||b.size>B.pZ)return v.NextResponse.json({error:`File too large (over ${Math.floor(B.pZ/1024/1024)}MB)`,size:b.size},{status:413});let h=await (0,w.readFile)(e,"utf-8");if((0,B.VA)(h))return v.NextResponse.json({error:"File appears to be binary",category:"binary"},{status:409});return v.NextResponse.json({content:h,path:e,size:b.size,mtimeMs:b.mtimeMs,etag:g},{headers:{"Cache-Control":"no-cache"}})}catch(a){if("ENOENT"===a.code)return v.NextResponse.json({error:"File not found"},{status:404});if("EACCES"===a.code)return v.NextResponse.json({error:"Permission denied"},{status:403});return console.error("Error reading file:",a),v.NextResponse.json({error:"Failed to read file"},{status:500})}}let D=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/file/route",pathname:"/api/file",filename:"route",bundlePath:"app/api/file/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/file/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/file/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:()=>{},79748:a=>{"use strict";a.exports=require("fs/promises")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},93764:(a,b,c)=>{"use strict";c.d(b,{L8:()=>o,No:()=>h,Pe:()=>n,VA:()=>p,hC:()=>m,hH:()=>l,hn:()=>r,iF:()=>q,lU:()=>s,pZ:()=>g});var d=c(79748),e=c(33873),f=c.n(e);let g=0xa00000,h=0x3200000,i=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".ico",".bmp",".avif"]),j=new Set([".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".zip",".tar",".gz",".rar",".7z",".exe",".dll",".so",".dylib",".mp3",".mp4",".avi",".mov",".mkv",".wav",".flac",".ttf",".otf",".woff",".woff2",".eot",".db",".sqlite",".sqlite3",".pyc",".class",".o",".a"]),k={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml",".ico":"image/x-icon",".bmp":"image/bmp",".avif":"image/avif"};function l(a){return k[a.toLowerCase()]||"application/octet-stream"}function m(a,b){if("string"!=typeof b||0===b.length)return null;let c=f().resolve(a),d=f().resolve(c,b);return d===c||d.startsWith(c+f().sep)?d:null}function n(a,b){return`"${a.toString(36)}-${Math.floor(b).toString(36)}"`}function o(a,b){let c=a.startsWith(".")?a.toLowerCase():f().extname(a).toLowerCase();return i.has(c)?b>h?"too-large":"image":j.has(c)?"binary":b>g?"too-large":"text"}function p(a){let b=0,c=Math.min(a.length,1e3);for(let d=0;d<c;d++){let c=a.charCodeAt(d);if(0===c)return!0;c<32&&9!==c&&10!==c&&13!==c&&b++}return c>0&&b/c>.1}async function q(a){let b,c=!1;try{(await (0,d.lstat)(a)).isSymbolicLink()&&(c=!0,b=await (0,d.readlink)(a))}catch{}let e=await (0,d.stat)(a);return{size:e.size,mtimeMs:e.mtimeMs,isDirectory:e.isDirectory(),isSymlink:c,symlinkTarget:b}}function r(a,b){return{ETag:a,"Last-Modified":new Date(b).toUTCString(),"Cache-Control":"no-cache, must-revalidate"}}function s(a,b){return!!a&&a.split(",").map(a=>a.trim().replace(/^W\//,"")).includes(b)}},96487:()=>{}};var b=require("../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=56139));module.exports=c})();
@@ -1 +1 @@
1
- (()=>{var a={};a.id=1803,a.ids=[1803],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")},20387:(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,{GET:()=>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(23211),w=c(79646);let x=(0,c(28354).promisify)(w.exec),y=0,z=[];async function A(a){let b=a.nextUrl.searchParams,c=b.get("cwd"),d=b.get("path");if(!c||!d)return v.NextResponse.json({error:"cwd and path are required"},{status:400});await new Promise(a=>{y<3?(y++,a()):z.push(()=>{y++,a()})});try{let{stdout:a}=await x(`git -c core.quotePath=false blame --porcelain "${d}"`,{cwd:c,maxBuffer:0xa00000,timeout:15e3}),b=a.split("\n"),e=new Map,f="",g="",h="",i=0;for(let a of b)if(/^[0-9a-f]{40}/.test(a))f=a.split(" ")[0];else if(a.startsWith("author "))g=a.substring(7);else if(a.startsWith("author-mail ")){let b=a.substring(12).match(/<(.+)>/);h=b?b[1]:a.substring(12)}else a.startsWith("author-time ")?i=parseInt(a.substring(12),10):a.startsWith(" ")&&f&&!e.has(f)&&e.set(f,{author:g,authorEmail:h,time:i,message:""});let j="0000000000000000000000000000000000000000",k=e.get(j);k&&(k.message="Not Committed Yet");let l=Array.from(e.keys()).filter(a=>a!==j);if(l.length>0){let{stdout:a}=await x(`git -c core.quotePath=false log --format="%H%x00%B%x00" --no-walk ${l.join(" ")}`,{cwd:c,maxBuffer:0xa00000,timeout:15e3}),b=a.split("\0").filter(Boolean);for(let a=0;a<b.length;a+=2){let c=b[a]?.trim(),d=b[a+1]?.trim()||"";c&&e.has(c)&&(e.get(c).message=d)}}let m=[];f="";let n=0;for(let a of b)if(/^[0-9a-f]{40}/.test(a)){let b=a.split(" ");f=b[0],n=parseInt(b[2],10)}else if(a.startsWith(" ")){let b=e.get(f);b&&m.push({hash:f.substring(0,7),hashFull:f,author:b.author,authorEmail:b.authorEmail,time:b.time,message:b.message,line:n,content:a.substring(1)})}return v.NextResponse.json({blame:m})}catch(a){return console.error("Error getting blame:",a),v.NextResponse.json({error:"Failed to get blame info. File may not be tracked by git."},{status:500})}finally{let a;y--,(a=z.shift())&&a()}}let B=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/files/blame/route",pathname:"/api/files/blame",filename:"route",bundlePath:"app/api/files/blame/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/files/blame/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/files/blame/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}}},28354:a=>{"use strict";a.exports=require("util")},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")},78335:()=>{},79646:a=>{"use strict";a.exports=require("child_process")},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=20387));module.exports=c})();
1
+ (()=>{var a={};a.id=1803,a.ids=[1803],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")},28354:a=>{"use strict";a.exports=require("util")},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")},45393:(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,{GET:()=>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(23211),w=c(79646);let x=(0,c(28354).promisify)(w.exec),y=0,z=[];async function A(a){let b=a.nextUrl.searchParams,c=b.get("cwd"),d=b.get("path");if(!c||!d)return v.NextResponse.json({error:"cwd and path are required"},{status:400});await new Promise(a=>{y<3?(y++,a()):z.push(()=>{y++,a()})});try{let{stdout:a}=await x(`git -c core.quotePath=false blame --porcelain "${d}"`,{cwd:c,maxBuffer:0xa00000,timeout:15e3}),b=a.split("\n"),e=new Map,f="",g="",h="",i=0;for(let a of b)if(/^[0-9a-f]{40}/.test(a))f=a.split(" ")[0];else if(a.startsWith("author "))g=a.substring(7);else if(a.startsWith("author-mail ")){let b=a.substring(12).match(/<(.+)>/);h=b?b[1]:a.substring(12)}else a.startsWith("author-time ")?i=parseInt(a.substring(12),10):a.startsWith(" ")&&f&&!e.has(f)&&e.set(f,{author:g,authorEmail:h,time:i,message:""});let j="0000000000000000000000000000000000000000",k=e.get(j);k&&(k.message="Not Committed Yet");let l=Array.from(e.keys()).filter(a=>a!==j);if(l.length>0){let{stdout:a}=await x(`git -c core.quotePath=false log --format="%H%x00%B%x00" --no-walk ${l.join(" ")}`,{cwd:c,maxBuffer:0xa00000,timeout:15e3}),b=a.split("\0").filter(Boolean);for(let a=0;a<b.length;a+=2){let c=b[a]?.trim(),d=b[a+1]?.trim()||"";c&&e.has(c)&&(e.get(c).message=d)}}let m=[];f="";let n=0;for(let a of b)if(/^[0-9a-f]{40}/.test(a)){let b=a.split(" ");f=b[0],n=parseInt(b[2],10)}else if(a.startsWith(" ")){let b=e.get(f);b&&m.push({hash:f.substring(0,7),hashFull:f,author:b.author,authorEmail:b.authorEmail,time:b.time,message:b.message,line:n,content:a.substring(1)})}return v.NextResponse.json({blame:m})}catch(a){return console.error("Error getting blame:",a),v.NextResponse.json({error:"Failed to get blame info. File may not be tracked by git."},{status:500})}finally{let a;y--,(a=z.shift())&&a()}}let B=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/files/blame/route",pathname:"/api/files/blame",filename:"route",bundlePath:"app/api/files/blame/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/files/blame/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/files/blame/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}}},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")},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=45393));module.exports=c})();
@@ -1 +1 @@
1
- (()=>{var a={};a.id=5972,a.ids=[5972],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")},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30814:(a,b,c)=>{"use strict";c.d(b,{cX:()=>d,uF:()=>e});let d="darwin"===process.platform,e="win32"===process.platform;process.platform},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:()=>{},97783:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>J,patchFetch:()=>I,routeModule:()=>E,serverHooks:()=>H,workAsyncStorage:()=>F,workUnitAsyncStorage:()=>G});var d={};c.r(d),c.d(d,{GET:()=>D,POST:()=>C});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(79748),x=c(33873),y=c(79646),z=c(28354),A=c(30814);let B=(0,z.promisify)(y.execFile);async function C(a){try{let{cwd:b,path:c}=await a.json();if(!b||!c)return v.NextResponse.json({error:"Missing cwd or path"},{status:400});let d=(0,x.resolve)(b),e=(0,x.resolve)((0,x.join)(d,c));if(!e.startsWith(d+x.sep))return v.NextResponse.json({error:"Operation not allowed on this path"},{status:403});if(await (0,w.stat)(e),A.cX)await B("osascript",["-e",`set the clipboard to POSIX file "${e}"`]);else if(A.uF)(0,y.execSync)(`powershell -Command "Set-Clipboard -Value '${e.replace(/'/g,"''")}'"`);else try{await B("xclip",["-selection","clipboard"],{input:e})}catch{(0,y.execSync)(`echo -n '${e.replace(/'/g,"\\'")}' | xsel --clipboard`)}return v.NextResponse.json({success:!0})}catch(b){let a=b instanceof Error?b.message:"Unknown error";return v.NextResponse.json({error:a},{status:500})}}async function D(){try{let a=null;if(A.cX)try{let{stdout:b}=await B("osascript",["-e","POSIX path of (the clipboard as \xabclass furl\xbb)"]);a=b.trim().replace(/\/$/,"")}catch{}else if(A.uF)try{let b=(0,y.execSync)('powershell -Command "Get-Clipboard"',{encoding:"utf8",timeout:3e3}).trim();b&&!b.includes("\n")&&(a=b)}catch{}else try{let{stdout:b}=await B("xclip",["-selection","clipboard","-o"]),c=b.trim();c&&!c.includes("\n")&&(a=c)}catch{try{let b=(0,y.execSync)("xsel --clipboard --output",{encoding:"utf8",timeout:3e3}).trim();b&&!b.includes("\n")&&(a=b)}catch{}}if(a)try{return await (0,w.stat)(a),v.NextResponse.json({path:a})}catch{}return v.NextResponse.json({path:null})}catch(b){let a=b instanceof Error?b.message:"Unknown error";return v.NextResponse.json({error:a},{status:500})}}let E=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/files/clipboard/route",pathname:"/api/files/clipboard",filename:"route",bundlePath:"app/api/files/clipboard/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/files/clipboard/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:F,workUnitAsyncStorage:G,serverHooks:H}=E;function I(){return(0,g.patchFetch)({workAsyncStorage:F,workUnitAsyncStorage:G})}async function J(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),E.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/files/clipboard/route";"/index"===d&&(d="/");let e=await E.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:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||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[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||E.isDev||y||(K="/index"===(K=D)?"/":K);let L=!0===E.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 E.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)=>E.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=>E.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 E.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await E.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 E.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}}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=97783));module.exports=c})();
1
+ (()=>{var a={};a.id=5972,a.ids=[5972],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")},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30814:(a,b,c)=>{"use strict";c.d(b,{cX:()=>d,uF:()=>e});let d="darwin"===process.platform,e="win32"===process.platform;process.platform},33873:a=>{"use strict";a.exports=require("path")},40493:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>J,patchFetch:()=>I,routeModule:()=>E,serverHooks:()=>H,workAsyncStorage:()=>F,workUnitAsyncStorage:()=>G});var d={};c.r(d),c.d(d,{GET:()=>D,POST:()=>C});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(79748),x=c(33873),y=c(79646),z=c(28354),A=c(30814);let B=(0,z.promisify)(y.execFile);async function C(a){try{let{cwd:b,path:c}=await a.json();if(!b||!c)return v.NextResponse.json({error:"Missing cwd or path"},{status:400});let d=(0,x.resolve)(b),e=(0,x.resolve)((0,x.join)(d,c));if(!e.startsWith(d+x.sep))return v.NextResponse.json({error:"Operation not allowed on this path"},{status:403});if(await (0,w.stat)(e),A.cX)await B("osascript",["-e",`set the clipboard to POSIX file "${e}"`]);else if(A.uF)(0,y.execSync)(`powershell -Command "Set-Clipboard -Value '${e.replace(/'/g,"''")}'"`);else try{await B("xclip",["-selection","clipboard"],{input:e})}catch{(0,y.execSync)(`echo -n '${e.replace(/'/g,"\\'")}' | xsel --clipboard`)}return v.NextResponse.json({success:!0})}catch(b){let a=b instanceof Error?b.message:"Unknown error";return v.NextResponse.json({error:a},{status:500})}}async function D(){try{let a=null;if(A.cX)try{let{stdout:b}=await B("osascript",["-e","POSIX path of (the clipboard as \xabclass furl\xbb)"]);a=b.trim().replace(/\/$/,"")}catch{}else if(A.uF)try{let b=(0,y.execSync)('powershell -Command "Get-Clipboard"',{encoding:"utf8",timeout:3e3}).trim();b&&!b.includes("\n")&&(a=b)}catch{}else try{let{stdout:b}=await B("xclip",["-selection","clipboard","-o"]),c=b.trim();c&&!c.includes("\n")&&(a=c)}catch{try{let b=(0,y.execSync)("xsel --clipboard --output",{encoding:"utf8",timeout:3e3}).trim();b&&!b.includes("\n")&&(a=b)}catch{}}if(a)try{return await (0,w.stat)(a),v.NextResponse.json({path:a})}catch{}return v.NextResponse.json({path:null})}catch(b){let a=b instanceof Error?b.message:"Unknown error";return v.NextResponse.json({error:a},{status:500})}}let E=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/files/clipboard/route",pathname:"/api/files/clipboard",filename:"route",bundlePath:"app/api/files/clipboard/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/files/clipboard/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:F,workUnitAsyncStorage:G,serverHooks:H}=E;function I(){return(0,g.patchFetch)({workAsyncStorage:F,workUnitAsyncStorage:G})}async function J(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),E.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/files/clipboard/route";"/index"===d&&(d="/");let e=await E.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:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||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[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||E.isDev||y||(K="/index"===(K=D)?"/":K);let L=!0===E.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 E.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)=>E.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=>E.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 E.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await E.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 E.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}}},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=40493));module.exports=c})();
@@ -1 +1 @@
1
- (()=>{var a={};a.id=1289,a.ids=[1289],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")},33873:a=>{"use strict";a.exports=require("path")},35105:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>E,patchFetch:()=>D,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var d={};c.r(d),c.d(d,{POST:()=>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(23211),w=c(79748),x=c(33873);async function y(a){try{let b,c,{cwd:d,path:e}=await a.json();if(!d||!e)return v.NextResponse.json({error:"Missing cwd or path"},{status:400});let f=(0,x.resolve)(d),g=(0,x.resolve)((0,x.join)(f,e));if(!g.startsWith(f+"/"))return v.NextResponse.json({error:"Operation not allowed on this path"},{status:403});let h=(0,x.dirname)(g),i=(0,x.extname)(g),j=(0,x.basename)(g,i),k=1;b=`${j}-copy${i}`,c=(0,x.join)(h,b);try{for(await (0,w.stat)(c),k=2;;){b=`${j}-copy-${k}${i}`,c=(0,x.join)(h,b);try{await (0,w.stat)(c),k++}catch{break}}}catch{}await (0,w.copyFile)(g,c);let l=(0,x.dirname)(e),m="."===l?b:`${l}/${b}`;return v.NextResponse.json({success:!0,newPath:m})}catch(b){let a=b instanceof Error?b.message:"Unknown error";return v.NextResponse.json({error:a},{status:500})}}let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/files/copy/route",pathname:"/api/files/copy",filename:"route",bundlePath:"app/api/files/copy/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/files/copy/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function D(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function E(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/files/copy/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="/index"===(K=E)?"/":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}}},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:()=>{},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=35105));module.exports=c})();
1
+ (()=>{var a={};a.id=1289,a.ids=[1289],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")},20575:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>E,patchFetch:()=>D,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var d={};c.r(d),c.d(d,{POST:()=>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(23211),w=c(79748),x=c(33873);async function y(a){try{let b,c,{cwd:d,path:e}=await a.json();if(!d||!e)return v.NextResponse.json({error:"Missing cwd or path"},{status:400});let f=(0,x.resolve)(d),g=(0,x.resolve)((0,x.join)(f,e));if(!g.startsWith(f+"/"))return v.NextResponse.json({error:"Operation not allowed on this path"},{status:403});let h=(0,x.dirname)(g),i=(0,x.extname)(g),j=(0,x.basename)(g,i),k=1;b=`${j}-copy${i}`,c=(0,x.join)(h,b);try{for(await (0,w.stat)(c),k=2;;){b=`${j}-copy-${k}${i}`,c=(0,x.join)(h,b);try{await (0,w.stat)(c),k++}catch{break}}}catch{}await (0,w.copyFile)(g,c);let l=(0,x.dirname)(e),m="."===l?b:`${l}/${b}`;return v.NextResponse.json({success:!0,newPath:m})}catch(b){let a=b instanceof Error?b.message:"Unknown error";return v.NextResponse.json({error:a},{status:500})}}let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/files/copy/route",pathname:"/api/files/copy",filename:"route",bundlePath:"app/api/files/copy/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/files/copy/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function D(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function E(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/files/copy/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="/index"===(K=E)?"/":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}}},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:()=>{},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=20575));module.exports=c})();
@@ -1 +1 @@
1
- (()=>{var a={};a.id=311,a.ids=[311],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")},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30814:(a,b,c)=>{"use strict";c.d(b,{cX:()=>d,uF:()=>e});let d="darwin"===process.platform,e="win32"===process.platform;process.platform},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")},83608:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>J,patchFetch:()=>I,routeModule:()=>E,serverHooks:()=>H,workAsyncStorage:()=>F,workUnitAsyncStorage:()=>G});var d={};c.r(d),c.d(d,{POST:()=>D});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(79748),x=c(33873),y=c(79646),z=c(28354),A=c(30814);let B=(0,z.promisify)(y.execFile);async function C(a){if(A.cX)await B("osascript",["-e",`tell application "Finder" to delete (POSIX file "${a}" as alias)`]);else if(A.uF)try{let b=a.replace(/'/g,"''");(0,y.execSync)(`powershell -Command "Add-Type -AssemblyName Microsoft.VisualBasic; [Microsoft.VisualBasic.FileIO.FileSystem]::DeleteFile('${b}','OnlyErrorDialogs','SendToRecycleBin')"`,{timeout:1e4})}catch{let b=await (0,w.stat)(a);await (0,w.rm)(a,{recursive:b.isDirectory(),force:!0})}else try{(0,y.execSync)(`gio trash "${a}"`,{timeout:5e3})}catch{let b=await (0,w.stat)(a);await (0,w.rm)(a,{recursive:b.isDirectory(),force:!0})}}async function D(a){try{let{cwd:b,path:c}=await a.json();if(!b||!c)return v.NextResponse.json({error:"Missing cwd or path"},{status:400});let d=(0,x.resolve)(b),e=(0,x.resolve)((0,x.join)(d,c));if(!e.startsWith(d+x.sep))return v.NextResponse.json({error:"Delete not allowed on this path"},{status:403});return await (0,w.stat)(e),await C(e),v.NextResponse.json({success:!0})}catch(b){let a=b instanceof Error?b.message:"Unknown error";return v.NextResponse.json({error:a},{status:500})}}let E=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/files/delete/route",pathname:"/api/files/delete",filename:"route",bundlePath:"app/api/files/delete/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/files/delete/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:F,workUnitAsyncStorage:G,serverHooks:H}=E;function I(){return(0,g.patchFetch)({workAsyncStorage:F,workUnitAsyncStorage:G})}async function J(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),E.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/files/delete/route";"/index"===d&&(d="/");let e=await E.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:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||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[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||E.isDev||y||(K="/index"===(K=D)?"/":K);let L=!0===E.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 E.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)=>E.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=>E.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 E.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await E.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 E.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}}},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=83608));module.exports=c})();
1
+ (()=>{var a={};a.id=311,a.ids=[311],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")},28354:a=>{"use strict";a.exports=require("util")},29294:a=>{"use strict";a.exports=require("next/dist/server/app-render/work-async-storage.external.js")},30814:(a,b,c)=>{"use strict";c.d(b,{cX:()=>d,uF:()=>e});let d="darwin"===process.platform,e="win32"===process.platform;process.platform},33873:a=>{"use strict";a.exports=require("path")},37981:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>J,patchFetch:()=>I,routeModule:()=>E,serverHooks:()=>H,workAsyncStorage:()=>F,workUnitAsyncStorage:()=>G});var d={};c.r(d),c.d(d,{POST:()=>D});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(79748),x=c(33873),y=c(79646),z=c(28354),A=c(30814);let B=(0,z.promisify)(y.execFile);async function C(a){if(A.cX)await B("osascript",["-e",`tell application "Finder" to delete (POSIX file "${a}" as alias)`]);else if(A.uF)try{let b=a.replace(/'/g,"''");(0,y.execSync)(`powershell -Command "Add-Type -AssemblyName Microsoft.VisualBasic; [Microsoft.VisualBasic.FileIO.FileSystem]::DeleteFile('${b}','OnlyErrorDialogs','SendToRecycleBin')"`,{timeout:1e4})}catch{let b=await (0,w.stat)(a);await (0,w.rm)(a,{recursive:b.isDirectory(),force:!0})}else try{(0,y.execSync)(`gio trash "${a}"`,{timeout:5e3})}catch{let b=await (0,w.stat)(a);await (0,w.rm)(a,{recursive:b.isDirectory(),force:!0})}}async function D(a){try{let{cwd:b,path:c}=await a.json();if(!b||!c)return v.NextResponse.json({error:"Missing cwd or path"},{status:400});let d=(0,x.resolve)(b),e=(0,x.resolve)((0,x.join)(d,c));if(!e.startsWith(d+x.sep))return v.NextResponse.json({error:"Delete not allowed on this path"},{status:403});return await (0,w.stat)(e),await C(e),v.NextResponse.json({success:!0})}catch(b){let a=b instanceof Error?b.message:"Unknown error";return v.NextResponse.json({error:a},{status:500})}}let E=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/files/delete/route",pathname:"/api/files/delete",filename:"route",bundlePath:"app/api/files/delete/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/files/delete/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:F,workUnitAsyncStorage:G,serverHooks:H}=E;function I(){return(0,g.patchFetch)({workAsyncStorage:F,workUnitAsyncStorage:G})}async function J(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),E.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/files/delete/route";"/index"===d&&(d="/");let e=await E.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:F,serverActionsManifest:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||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[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||E.isDev||y||(K="/index"===(K=D)?"/":K);let L=!0===E.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 E.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)=>E.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=>E.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 E.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await E.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 E.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}}},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=37981));module.exports=c})();
@@ -1 +1 @@
1
- (()=>{var a={};a.id=8997,a.ids=[8997],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")},21885:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>E,patchFetch:()=>D,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var d={};c.r(d),c.d(d,{GET:()=>x,POST:()=>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(23211),w=c(25813);async function x(a){let b=a.nextUrl.searchParams.get("cwd");if(!b)return v.NextResponse.json({error:"cwd is required"},{status:400});try{let a=(0,w.lq)(b),c=await (0,w.JE)(a,[]);return v.NextResponse.json({paths:c})}catch(a){return console.error("Error reading expanded paths:",a),v.NextResponse.json({error:"Failed to read expanded paths"},{status:500})}}async function y(a){try{let{cwd:b,paths:c}=await a.json();if(!b||!Array.isArray(c))return v.NextResponse.json({error:"cwd and paths array are required"},{status:400});let d=(0,w.lq)(b);return await (0,w.An)(d,c),v.NextResponse.json({success:!0})}catch(a){return console.error("Error saving expanded paths:",a),v.NextResponse.json({error:"Failed to save expanded paths"},{status:500})}}let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/files/expanded/route",pathname:"/api/files/expanded",filename:"route",bundlePath:"app/api/files/expanded/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/files/expanded/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function D(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function E(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/files/expanded/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="/index"===(K=E)?"/":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}}},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")},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=21885));module.exports=c})();
1
+ (()=>{var a={};a.id=8997,a.ids=[8997],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")},23708:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>E,patchFetch:()=>D,routeModule:()=>z,serverHooks:()=>C,workAsyncStorage:()=>A,workUnitAsyncStorage:()=>B});var d={};c.r(d),c.d(d,{GET:()=>x,POST:()=>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(23211),w=c(25813);async function x(a){let b=a.nextUrl.searchParams.get("cwd");if(!b)return v.NextResponse.json({error:"cwd is required"},{status:400});try{let a=(0,w.lq)(b),c=await (0,w.JE)(a,[]);return v.NextResponse.json({paths:c})}catch(a){return console.error("Error reading expanded paths:",a),v.NextResponse.json({error:"Failed to read expanded paths"},{status:500})}}async function y(a){try{let{cwd:b,paths:c}=await a.json();if(!b||!Array.isArray(c))return v.NextResponse.json({error:"cwd and paths array are required"},{status:400});let d=(0,w.lq)(b);return await (0,w.An)(d,c),v.NextResponse.json({success:!0})}catch(a){return console.error("Error saving expanded paths:",a),v.NextResponse.json({error:"Failed to save expanded paths"},{status:500})}}let z=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/files/expanded/route",pathname:"/api/files/expanded",filename:"route",bundlePath:"app/api/files/expanded/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/files/expanded/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:A,workUnitAsyncStorage:B,serverHooks:C}=z;function D(){return(0,g.patchFetch)({workAsyncStorage:A,workUnitAsyncStorage:B})}async function E(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),z.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/files/expanded/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="/index"===(K=E)?"/":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}}},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=23708));module.exports=c})();
@@ -1 +1 @@
1
- (()=>{var a={};a.id=5298,a.ids=[5298],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")},9269:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>K,patchFetch:()=>J,routeModule:()=>F,serverHooks:()=>I,workAsyncStorage:()=>G,workUnitAsyncStorage:()=>H});var d={};c.r(d),c.d(d,{GET:()=>E});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(79748),x=c(79646),y=c(28354),z=c(33873);let A=(0,y.promisify)(x.execFile),B=(0,z.join)(process.cwd(),"node_modules","@vscode","ripgrep","bin","rg"),C={maxBuffer:0xa00000,timeout:1e4};async function D(a,b){try{let{stdout:c}=await A(B,b,{cwd:a,...C});return c.split("\n").filter(Boolean)}catch(a){if(a&&"object"==typeof a&&"code"in a){if(1===a.code)return[];if(2===a.code&&"stdout"in a&&"string"==typeof a.stdout&&a.stdout)return a.stdout.split("\n").filter(Boolean)}throw a}}async function E(a){let b=a.nextUrl.searchParams.get("cwd")||process.cwd();try{if(!(await (0,w.stat)(b)).isDirectory())return v.NextResponse.json({error:"Path is not a directory"},{status:400});let[a,c]=await Promise.all([D(b,["--files","--hidden","--follow","--glob","!.git"]),D(b,["--files","--no-ignore","--hidden","--follow","--glob",".env*","--glob","!.git","--glob","!node_modules"])]),d=[...new Set([...a,...c])].sort();return v.NextResponse.json({paths:d})}catch(a){return console.error("Error building file index:",a),v.NextResponse.json({error:"Failed to build file index"},{status:500})}}let F=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/files/index/route",pathname:"/api/files/index",filename:"route",bundlePath:"app/api/files/index/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/files/index/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:G,workUnitAsyncStorage:H,serverHooks:I}=F;function J(){return(0,g.patchFetch)({workAsyncStorage:G,workUnitAsyncStorage:H})}async function K(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),F.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/files/index/route";"/index"===d&&(d="/");let e=await F.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:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||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[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||F.isDev||y||(K="/index"===(K=D)?"/":K);let L=!0===F.isDev||!I,M=I&&!L;G&&E&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:E,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 F.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)=>F.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=>F.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 F.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await F.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 F.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}}},10846:a=>{"use strict";a.exports=require("next/dist/compiled/next-server/app-page.runtime.prod.js")},28354:a=>{"use strict";a.exports=require("util")},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=9269));module.exports=c})();
1
+ (()=>{var a={};a.id=5298,a.ids=[5298],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")},28354:a=>{"use strict";a.exports=require("util")},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")},64094:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>K,patchFetch:()=>J,routeModule:()=>F,serverHooks:()=>I,workAsyncStorage:()=>G,workUnitAsyncStorage:()=>H});var d={};c.r(d),c.d(d,{GET:()=>E});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(79748),x=c(79646),y=c(28354),z=c(33873);let A=(0,y.promisify)(x.execFile),B=(0,z.join)(process.cwd(),"node_modules","@vscode","ripgrep","bin","rg"),C={maxBuffer:0xa00000,timeout:1e4};async function D(a,b){try{let{stdout:c}=await A(B,b,{cwd:a,...C});return c.split("\n").filter(Boolean)}catch(a){if(a&&"object"==typeof a&&"code"in a){if(1===a.code)return[];if(2===a.code&&"stdout"in a&&"string"==typeof a.stdout&&a.stdout)return a.stdout.split("\n").filter(Boolean)}throw a}}async function E(a){let b=a.nextUrl.searchParams.get("cwd")||process.cwd();try{if(!(await (0,w.stat)(b)).isDirectory())return v.NextResponse.json({error:"Path is not a directory"},{status:400});let[a,c]=await Promise.all([D(b,["--files","--hidden","--follow","--glob","!.git"]),D(b,["--files","--no-ignore","--hidden","--follow","--glob",".env*","--glob","!.git","--glob","!node_modules"])]),d=[...new Set([...a,...c])].sort();return v.NextResponse.json({paths:d})}catch(a){return console.error("Error building file index:",a),v.NextResponse.json({error:"Failed to build file index"},{status:500})}}let F=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/files/index/route",pathname:"/api/files/index",filename:"route",bundlePath:"app/api/files/index/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/files/index/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:G,workUnitAsyncStorage:H,serverHooks:I}=F;function J(){return(0,g.patchFetch)({workAsyncStorage:G,workUnitAsyncStorage:H})}async function K(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),F.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/files/index/route";"/index"===d&&(d="/");let e=await F.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:G}=e,H=(0,k.normalizeAppPath)(d),I=!!(z.dynamicRoutes[H]||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[H];if(b&&!1===b.fallback&&!a){if(w.adapterPath)return await J();throw new t.NoFallbackError}}let K=null;!I||F.isDev||y||(K="/index"===(K=D)?"/":K);let L=!0===F.isDev||!I,M=I&&!L;G&&E&&(0,j.setManifestsSingleton)({page:d,clientReferenceManifest:E,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 F.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)=>F.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=>F.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 F.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await F.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 F.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}}},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=64094));module.exports=c})();
@@ -1 +1 @@
1
- (()=>{var a={};a.id=520,a.ids=[520],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")},75433:(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});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(79748),x=c(33873),y=c(25813);async function z(a,b){let c,d=b?(0,x.join)(a,b):a;try{c=await (0,w.readdir)(d,{withFileTypes:!0})}catch{return[]}let e=[];for(let a of c){if(".git"===a.name)continue;let c=b?`${b}/${a.name}`:a.name,f=a.isSymbolicLink(),g=a.isDirectory();if(f)try{g=(await (0,w.stat)((0,x.join)(d,a.name))).isDirectory()}catch{}let h={name:a.name,path:c,isDirectory:g,...f?{isSymlink:!0}:{}};e.push(h)}return e.sort((a,b)=>a.isDirectory&&!b.isDirectory?-1:!a.isDirectory&&b.isDirectory?1:a.name.localeCompare(b.name)),e}async function A(a,b){let c=[];for(let d of a)d.isSymlink&&c.push((0,w.readlink)((0,x.join)(b,d.path)).then(a=>{d.symlinkTarget=a}).catch(()=>{})),d.children&&A(d.children,b);await Promise.all(c)}async function B(a,b){let c=new Set(b),d=["",...b.filter(a=>{let b=a.split("/");for(let a=1;a<b.length;a++)if(!c.has(b.slice(0,a).join("/")))return!1;return!0})],e=await Promise.all(d.map(b=>z(a,b).then(a=>({path:b,nodes:a})))),f=new Map;for(let{path:a,nodes:b}of e)f.set(a,b);let g=a=>{for(let b of a)b.isDirectory&&f.has(b.path)&&(b.children=f.get(b.path),g(b.children))},h=f.get("")||[];return g(h),h}async function C(a){let b=a.nextUrl.searchParams.get("cwd")||process.cwd();try{if(!(await (0,w.stat)(b)).isDirectory())return v.NextResponse.json({error:"Path is not a directory"},{status:400});let a=(0,y.lq)(b),c=await (0,y.JE)(a,[]),d=await B(b,c);return await A(d,b),v.NextResponse.json({files:d,expandedPaths:c,cwd:b})}catch(a){return console.error("Error initializing file tree:",a),v.NextResponse.json({error:"Failed to initialize file tree"},{status:500})}}let D=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/files/init/route",pathname:"/api/files/init",filename:"route",bundlePath:"app/api/files/init/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/files/init/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/files/init/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}}},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=75433));module.exports=c})();
1
+ (()=>{var a={};a.id=520,a.ids=[520],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:()=>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")},43208:(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});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(79748),x=c(33873),y=c(25813);async function z(a,b){let c,d=b?(0,x.join)(a,b):a;try{c=await (0,w.readdir)(d,{withFileTypes:!0})}catch{return[]}let e=[];for(let a of c){if(".git"===a.name)continue;let c=b?`${b}/${a.name}`:a.name,f=a.isSymbolicLink(),g=a.isDirectory();if(f)try{g=(await (0,w.stat)((0,x.join)(d,a.name))).isDirectory()}catch{}let h={name:a.name,path:c,isDirectory:g,...f?{isSymlink:!0}:{}};e.push(h)}return e.sort((a,b)=>a.isDirectory&&!b.isDirectory?-1:!a.isDirectory&&b.isDirectory?1:a.name.localeCompare(b.name)),e}async function A(a,b){let c=[];for(let d of a)d.isSymlink&&c.push((0,w.readlink)((0,x.join)(b,d.path)).then(a=>{d.symlinkTarget=a}).catch(()=>{})),d.children&&A(d.children,b);await Promise.all(c)}async function B(a,b){let c=new Set(b),d=["",...b.filter(a=>{let b=a.split("/");for(let a=1;a<b.length;a++)if(!c.has(b.slice(0,a).join("/")))return!1;return!0})],e=await Promise.all(d.map(b=>z(a,b).then(a=>({path:b,nodes:a})))),f=new Map;for(let{path:a,nodes:b}of e)f.set(a,b);let g=a=>{for(let b of a)b.isDirectory&&f.has(b.path)&&(b.children=f.get(b.path),g(b.children))},h=f.get("")||[];return g(h),h}async function C(a){let b=a.nextUrl.searchParams.get("cwd")||process.cwd();try{if(!(await (0,w.stat)(b)).isDirectory())return v.NextResponse.json({error:"Path is not a directory"},{status:400});let a=(0,y.lq)(b),c=await (0,y.JE)(a,[]),d=await B(b,c);return await A(d,b),v.NextResponse.json({files:d,expandedPaths:c,cwd:b})}catch(a){return console.error("Error initializing file tree:",a),v.NextResponse.json({error:"Failed to initialize file tree"},{status:500})}}let D=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/files/init/route",pathname:"/api/files/init",filename:"route",bundlePath:"app/api/files/init/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/files/init/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/files/init/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}}},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=43208));module.exports=c})();
@@ -1 +1 @@
1
- (()=>{var a={};a.id=335,a.ids=[335],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")},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:()=>{},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:()=>{},97908:(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,{POST:()=>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(79748),x=c(33873);async function y(a,b){let c=(0,x.extname)(b),d=(0,x.basename)(b,c);try{await (0,w.stat)((0,x.join)(a,b))}catch{return b}let e=`${d} copy${c}`;try{await (0,w.stat)((0,x.join)(a,e))}catch{return e}let f=2;for(;f<100;){e=`${d} copy ${f}${c}`;try{await (0,w.stat)((0,x.join)(a,e)),f++}catch{return e}}throw Error("Failed to generate a unique filename")}async function z(a){try{let{cwd:b,targetDir:c,sourceAbsPath:d}=await a.json();if(!b||null==c||!d)return v.NextResponse.json({error:"Missing required parameters"},{status:400});let e=(0,x.resolve)(b),f=(0,x.resolve)((0,x.join)(e,c));if(!f.startsWith(e))return v.NextResponse.json({error:"Operation not allowed on this path"},{status:403});let g=(0,x.resolve)(d),h=await (0,w.stat)(g);if(!(await (0,w.stat)(f)).isDirectory())return v.NextResponse.json({error:"Target is not a folder"},{status:400});let i=(0,x.basename)(g),j=await y(f,i),k=(0,x.join)(f,j);await (0,w.cp)(g,k,{recursive:h.isDirectory()});let l=c?`${c}/${j}`:j;return v.NextResponse.json({success:!0,newPath:l,newName:j})}catch(b){let a=b instanceof Error?b.message:"Unknown error";return v.NextResponse.json({error:a},{status:500})}}let A=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/files/paste/route",pathname:"/api/files/paste",filename:"route",bundlePath:"app/api/files/paste/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/files/paste/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/files/paste/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}}}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=97908));module.exports=c})();
1
+ (()=>{var a={};a.id=335,a.ids=[335],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")},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")},69579:(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,{POST:()=>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(79748),x=c(33873);async function y(a,b){let c=(0,x.extname)(b),d=(0,x.basename)(b,c);try{await (0,w.stat)((0,x.join)(a,b))}catch{return b}let e=`${d} copy${c}`;try{await (0,w.stat)((0,x.join)(a,e))}catch{return e}let f=2;for(;f<100;){e=`${d} copy ${f}${c}`;try{await (0,w.stat)((0,x.join)(a,e)),f++}catch{return e}}throw Error("Failed to generate a unique filename")}async function z(a){try{let{cwd:b,targetDir:c,sourceAbsPath:d}=await a.json();if(!b||null==c||!d)return v.NextResponse.json({error:"Missing required parameters"},{status:400});let e=(0,x.resolve)(b),f=(0,x.resolve)((0,x.join)(e,c));if(!f.startsWith(e))return v.NextResponse.json({error:"Operation not allowed on this path"},{status:403});let g=(0,x.resolve)(d),h=await (0,w.stat)(g);if(!(await (0,w.stat)(f)).isDirectory())return v.NextResponse.json({error:"Target is not a folder"},{status:400});let i=(0,x.basename)(g),j=await y(f,i),k=(0,x.join)(f,j);await (0,w.cp)(g,k,{recursive:h.isDirectory()});let l=c?`${c}/${j}`:j;return v.NextResponse.json({success:!0,newPath:l,newName:j})}catch(b){let a=b instanceof Error?b.message:"Unknown error";return v.NextResponse.json({error:a},{status:500})}}let A=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/files/paste/route",pathname:"/api/files/paste",filename:"route",bundlePath:"app/api/files/paste/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/files/paste/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/files/paste/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}}},78335:()=>{},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=69579));module.exports=c})();
@@ -1 +1 @@
1
- (()=>{var a={};a.id=6602,a.ids=[6602],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")},27910:a=>{"use strict";a.exports=require("stream")},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:()=>{},79748:a=>{"use strict";a.exports=require("fs/promises")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},93764:(a,b,c)=>{"use strict";c.d(b,{L8:()=>o,No:()=>h,Pe:()=>n,VA:()=>p,hC:()=>m,hH:()=>l,hn:()=>r,iF:()=>q,lU:()=>s,pZ:()=>g});var d=c(79748),e=c(33873),f=c.n(e);let g=0xa00000,h=0x3200000,i=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".ico",".bmp",".avif"]),j=new Set([".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".zip",".tar",".gz",".rar",".7z",".exe",".dll",".so",".dylib",".mp3",".mp4",".avi",".mov",".mkv",".wav",".flac",".ttf",".otf",".woff",".woff2",".eot",".db",".sqlite",".sqlite3",".pyc",".class",".o",".a"]),k={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml",".ico":"image/x-icon",".bmp":"image/bmp",".avif":"image/avif"};function l(a){return k[a.toLowerCase()]||"application/octet-stream"}function m(a,b){if("string"!=typeof b||0===b.length)return null;let c=f().resolve(a),d=f().resolve(c,b);return d===c||d.startsWith(c+f().sep)?d:null}function n(a,b){return`"${a.toString(36)}-${Math.floor(b).toString(36)}"`}function o(a,b){let c=a.startsWith(".")?a.toLowerCase():f().extname(a).toLowerCase();return i.has(c)?b>h?"too-large":"image":j.has(c)?"binary":b>g?"too-large":"text"}function p(a){let b=0,c=Math.min(a.length,1e3);for(let d=0;d<c;d++){let c=a.charCodeAt(d);if(0===c)return!0;c<32&&9!==c&&10!==c&&13!==c&&b++}return c>0&&b/c>.1}async function q(a){let b,c=!1;try{(await (0,d.lstat)(a)).isSymbolicLink()&&(c=!0,b=await (0,d.readlink)(a))}catch{}let e=await (0,d.stat)(a);return{size:e.size,mtimeMs:e.mtimeMs,isDirectory:e.isDirectory(),isSymlink:c,symlinkTarget:b}}function r(a,b){return{ETag:a,"Last-Modified":new Date(b).toUTCString(),"Cache-Control":"no-cache, must-revalidate"}}function s(a,b){return!!a&&a.split(",").map(a=>a.trim().replace(/^W\//,"")).includes(b)}},94189:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>H,patchFetch:()=>G,routeModule:()=>C,serverHooks:()=>F,workAsyncStorage:()=>D,workUnitAsyncStorage:()=>E});var d={};c.r(d),c.d(d,{GET:()=>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(23211),w=c(29021),x=c(27910),y=c(33873),z=c.n(y),A=c(93764);async function B(a){let b=a.nextUrl.searchParams,c=b.get("cwd")||process.cwd(),d=b.get("path");if(!d)return v.NextResponse.json({error:"File path is required"},{status:400});let e=(0,A.hC)(c,d);if(!e)return v.NextResponse.json({error:"Path escapes cwd"},{status:403});try{let b=await (0,A.iF)(e);if(b.isDirectory)return v.NextResponse.json({error:"Path is a directory"},{status:409});let c=z().extname(d).toLowerCase(),f=(0,A.L8)(c,b.size);if("too-large"===f)return v.NextResponse.json({error:`File too large (over ${Math.floor(A.No/1024/1024)}MB)`,size:b.size},{status:413});if("image"!==f)return v.NextResponse.json({error:`This endpoint streams images only (category: ${f}). Use /api/files/text for text.`,category:f},{status:409});let g=(0,A.Pe)(b.size,b.mtimeMs);if((0,A.lU)(a.headers.get("if-none-match"),g))return new v.NextResponse(null,{status:304,headers:(0,A.hn)(g,b.mtimeMs)});let h={...(0,A.hn)(g,b.mtimeMs),"Content-Type":(0,A.hH)(c),"Accept-Ranges":"bytes"},i=a.headers.get("range");if(i){let a=/^bytes=(\d*)-(\d*)$/.exec(i);if(a){let c=a[1]?parseInt(a[1],10):0,d=a[2]?parseInt(a[2],10):b.size-1;if(Number.isFinite(c)&&Number.isFinite(d)&&c>=0&&d<b.size&&c<=d){let a=(0,w.createReadStream)(e,{start:c,end:d});return new v.NextResponse(x.Readable.toWeb(a),{status:206,headers:{...h,"Content-Length":String(d-c+1),"Content-Range":`bytes ${c}-${d}/${b.size}`}})}return new v.NextResponse(null,{status:416,headers:{"Content-Range":`bytes */${b.size}`}})}}let j=(0,w.createReadStream)(e);return new v.NextResponse(x.Readable.toWeb(j),{status:200,headers:{...h,"Content-Length":String(b.size)}})}catch(a){if(console.error("Error reading file:",a),"ENOENT"===a?.code)return v.NextResponse.json({error:"File not found"},{status:404});return v.NextResponse.json({error:"Failed to read file"},{status:500})}}let C=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/files/read/route",pathname:"/api/files/read",filename:"route",bundlePath:"app/api/files/read/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/files/read/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:D,workUnitAsyncStorage:E,serverHooks:F}=C;function G(){return(0,g.patchFetch)({workAsyncStorage:D,workUnitAsyncStorage:E})}async function H(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),C.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/files/read/route";"/index"===d&&(d="/");let e=await C.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: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||C.isDev||y||(K="/index"===(K=E)?"/":K);let L=!0===C.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 C.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)=>C.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=>C.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&&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 C.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await C.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:B,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",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 C.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}}},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=94189));module.exports=c})();
1
+ (()=>{var a={};a.id=6602,a.ids=[6602],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")},27910:a=>{"use strict";a.exports=require("stream")},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:()=>{},79748:a=>{"use strict";a.exports=require("fs/promises")},86439:a=>{"use strict";a.exports=require("next/dist/shared/lib/no-fallback-error.external")},90471:(a,b,c)=>{"use strict";c.r(b),c.d(b,{handler:()=>H,patchFetch:()=>G,routeModule:()=>C,serverHooks:()=>F,workAsyncStorage:()=>D,workUnitAsyncStorage:()=>E});var d={};c.r(d),c.d(d,{GET:()=>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(23211),w=c(29021),x=c(27910),y=c(33873),z=c.n(y),A=c(93764);async function B(a){let b=a.nextUrl.searchParams,c=b.get("cwd")||process.cwd(),d=b.get("path");if(!d)return v.NextResponse.json({error:"File path is required"},{status:400});let e=(0,A.hC)(c,d);if(!e)return v.NextResponse.json({error:"Path escapes cwd"},{status:403});try{let b=await (0,A.iF)(e);if(b.isDirectory)return v.NextResponse.json({error:"Path is a directory"},{status:409});let c=z().extname(d).toLowerCase(),f=(0,A.L8)(c,b.size);if("too-large"===f)return v.NextResponse.json({error:`File too large (over ${Math.floor(A.No/1024/1024)}MB)`,size:b.size},{status:413});if("image"!==f)return v.NextResponse.json({error:`This endpoint streams images only (category: ${f}). Use /api/files/text for text.`,category:f},{status:409});let g=(0,A.Pe)(b.size,b.mtimeMs);if((0,A.lU)(a.headers.get("if-none-match"),g))return new v.NextResponse(null,{status:304,headers:(0,A.hn)(g,b.mtimeMs)});let h={...(0,A.hn)(g,b.mtimeMs),"Content-Type":(0,A.hH)(c),"Accept-Ranges":"bytes"},i=a.headers.get("range");if(i){let a=/^bytes=(\d*)-(\d*)$/.exec(i);if(a){let c=a[1]?parseInt(a[1],10):0,d=a[2]?parseInt(a[2],10):b.size-1;if(Number.isFinite(c)&&Number.isFinite(d)&&c>=0&&d<b.size&&c<=d){let a=(0,w.createReadStream)(e,{start:c,end:d});return new v.NextResponse(x.Readable.toWeb(a),{status:206,headers:{...h,"Content-Length":String(d-c+1),"Content-Range":`bytes ${c}-${d}/${b.size}`}})}return new v.NextResponse(null,{status:416,headers:{"Content-Range":`bytes */${b.size}`}})}}let j=(0,w.createReadStream)(e);return new v.NextResponse(x.Readable.toWeb(j),{status:200,headers:{...h,"Content-Length":String(b.size)}})}catch(a){if(console.error("Error reading file:",a),"ENOENT"===a?.code)return v.NextResponse.json({error:"File not found"},{status:404});return v.NextResponse.json({error:"Failed to read file"},{status:500})}}let C=new e.AppRouteRouteModule({definition:{kind:f.RouteKind.APP_ROUTE,page:"/api/files/read/route",pathname:"/api/files/read",filename:"route",bundlePath:"app/api/files/read/route"},distDir:".next-prod",relativeProjectDir:"",resolvedPagePath:"/home/runner/work/cockpit/cockpit/src/app/api/files/read/route.ts",nextConfigOutput:"",userland:d,...{}}),{workAsyncStorage:D,workUnitAsyncStorage:E,serverHooks:F}=C;function G(){return(0,g.patchFetch)({workAsyncStorage:D,workUnitAsyncStorage:E})}async function H(a,b,c){c.requestMeta&&(0,h.setRequestMeta)(a,c.requestMeta),C.isDev&&(0,h.addRequestMeta)(a,"devRequestTimingInternalsEnd",process.hrtime.bigint());let d="/api/files/read/route";"/index"===d&&(d="/");let e=await C.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: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||C.isDev||y||(K="/index"===(K=E)?"/":K);let L=!0===C.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 C.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)=>C.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=>C.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&&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 C.onRequestError(a,b,{routerKind:"App Router",routePath:d,routeType:"route",revalidateReason:(0,o.c)({isStaticGeneration:M,isOnDemandRevalidate:B})},!1,A),b}},k=await C.handleResponse({req:a,nextConfig:w,cacheKey:K,routeKind:f.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:z,isRoutePPREnabled:!1,isOnDemandRevalidate:B,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",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 C.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}}},93764:(a,b,c)=>{"use strict";c.d(b,{L8:()=>o,No:()=>h,Pe:()=>n,VA:()=>p,hC:()=>m,hH:()=>l,hn:()=>r,iF:()=>q,lU:()=>s,pZ:()=>g});var d=c(79748),e=c(33873),f=c.n(e);let g=0xa00000,h=0x3200000,i=new Set([".png",".jpg",".jpeg",".gif",".webp",".svg",".ico",".bmp",".avif"]),j=new Set([".pdf",".doc",".docx",".xls",".xlsx",".ppt",".pptx",".zip",".tar",".gz",".rar",".7z",".exe",".dll",".so",".dylib",".mp3",".mp4",".avi",".mov",".mkv",".wav",".flac",".ttf",".otf",".woff",".woff2",".eot",".db",".sqlite",".sqlite3",".pyc",".class",".o",".a"]),k={".png":"image/png",".jpg":"image/jpeg",".jpeg":"image/jpeg",".gif":"image/gif",".webp":"image/webp",".svg":"image/svg+xml",".ico":"image/x-icon",".bmp":"image/bmp",".avif":"image/avif"};function l(a){return k[a.toLowerCase()]||"application/octet-stream"}function m(a,b){if("string"!=typeof b||0===b.length)return null;let c=f().resolve(a),d=f().resolve(c,b);return d===c||d.startsWith(c+f().sep)?d:null}function n(a,b){return`"${a.toString(36)}-${Math.floor(b).toString(36)}"`}function o(a,b){let c=a.startsWith(".")?a.toLowerCase():f().extname(a).toLowerCase();return i.has(c)?b>h?"too-large":"image":j.has(c)?"binary":b>g?"too-large":"text"}function p(a){let b=0,c=Math.min(a.length,1e3);for(let d=0;d<c;d++){let c=a.charCodeAt(d);if(0===c)return!0;c<32&&9!==c&&10!==c&&13!==c&&b++}return c>0&&b/c>.1}async function q(a){let b,c=!1;try{(await (0,d.lstat)(a)).isSymbolicLink()&&(c=!0,b=await (0,d.readlink)(a))}catch{}let e=await (0,d.stat)(a);return{size:e.size,mtimeMs:e.mtimeMs,isDirectory:e.isDirectory(),isSymlink:c,symlinkTarget:b}}function r(a,b){return{ETag:a,"Last-Modified":new Date(b).toUTCString(),"Cache-Control":"no-cache, must-revalidate"}}function s(a,b){return!!a&&a.split(",").map(a=>a.trim().replace(/^W\//,"")).includes(b)}},96487:()=>{}};var b=require("../../../../webpack-runtime.js");b.C(a);var c=b.X(0,[4741,1813],()=>b(b.s=90471));module.exports=c})();