dev3000 0.0.98 → 0.0.100
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +42 -2
- package/dist/cli.js.map +1 -1
- package/dist/dev-environment.d.ts +1 -1
- package/dist/dev-environment.d.ts.map +1 -1
- package/dist/dev-environment.js +18 -47
- package/dist/dev-environment.js.map +1 -1
- package/mcp-server/.next/BUILD_ID +1 -1
- package/mcp-server/.next/build-manifest.json +8 -10
- package/mcp-server/.next/fallback-build-manifest.json +3 -5
- package/mcp-server/.next/images-manifest.json +8 -2
- package/mcp-server/.next/next-minimal-server.js.nft.json +1 -1
- package/mcp-server/.next/next-server.js.nft.json +1 -1
- package/mcp-server/.next/prerender-manifest.json +3 -3
- package/mcp-server/.next/required-server-files.json +57 -58
- package/mcp-server/.next/routes-manifest.json +54 -0
- package/mcp-server/.next/server/app/_global-error/page/build-manifest.json +5 -5
- package/mcp-server/.next/server/app/_global-error/page.js +8 -8
- package/mcp-server/.next/server/app/_global-error/page.js.nft.json +1 -1
- package/mcp-server/.next/server/app/_global-error/page_client-reference-manifest.js +1 -1
- package/mcp-server/.next/server/app/_global-error.html +2 -2
- package/mcp-server/.next/server/app/_global-error.meta +7 -1
- package/mcp-server/.next/server/app/_global-error.rsc +11 -13
- package/mcp-server/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +5 -0
- package/mcp-server/.next/server/app/_global-error.segments/_full.segment.rsc +12 -0
- package/mcp-server/.next/server/app/_global-error.segments/_index.segment.rsc +4 -0
- package/mcp-server/.next/server/app/_global-error.segments/_tree.segment.rsc +7 -0
- package/mcp-server/.next/server/app/_not-found/page/build-manifest.json +5 -5
- package/mcp-server/.next/server/app/_not-found/page.js +10 -10
- package/mcp-server/.next/server/app/_not-found/page.js.nft.json +1 -1
- package/mcp-server/.next/server/app/_not-found/page_client-reference-manifest.js +1 -1
- package/mcp-server/.next/server/app/_not-found.html +1 -1
- package/mcp-server/.next/server/app/_not-found.meta +8 -1
- package/mcp-server/.next/server/app/_not-found.rsc +12 -14
- package/mcp-server/.next/server/app/_not-found.segments/_full.segment.rsc +13 -0
- package/mcp-server/.next/server/app/_not-found.segments/_index.segment.rsc +5 -0
- package/mcp-server/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
- package/mcp-server/.next/server/app/_not-found.segments/_not-found.segment.rsc +4 -0
- package/mcp-server/.next/server/app/_not-found.segments/_tree.segment.rsc +8 -0
- package/mcp-server/.next/server/app/api/jank/[session]/route.js +6 -6
- package/mcp-server/.next/server/app/api/jank/[session]/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/logs/append/route.js +4 -4
- package/mcp-server/.next/server/app/api/logs/append/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/logs/head/route.js +4 -4
- package/mcp-server/.next/server/app/api/logs/head/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/logs/list/route.js +4 -4
- package/mcp-server/.next/server/app/api/logs/list/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/logs/rotate/route.js +5 -5
- package/mcp-server/.next/server/app/api/logs/rotate/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/logs/stream/route.js +4 -4
- package/mcp-server/.next/server/app/api/logs/stream/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/logs/tail/route.js +4 -4
- package/mcp-server/.next/server/app/api/logs/tail/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/orchestrator/route.js +5 -5
- package/mcp-server/.next/server/app/api/orchestrator/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/screenshots/[filename]/route.js +5 -5
- package/mcp-server/.next/server/app/api/screenshots/[filename]/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/screenshots/list/route.js +5 -5
- package/mcp-server/.next/server/app/api/screenshots/list/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/api/tools/route.js +5 -5
- package/mcp-server/.next/server/app/api/tools/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/index.html +1 -1
- package/mcp-server/.next/server/app/index.meta +8 -2
- package/mcp-server/.next/server/app/index.rsc +15 -17
- package/mcp-server/.next/server/app/index.segments/__PAGE__.segment.rsc +9 -0
- package/mcp-server/.next/server/app/index.segments/_full.segment.rsc +17 -0
- package/mcp-server/.next/server/app/index.segments/_index.segment.rsc +5 -0
- package/mcp-server/.next/server/app/index.segments/_tree.segment.rsc +8 -0
- package/mcp-server/.next/server/app/logs/page/build-manifest.json +5 -5
- package/mcp-server/.next/server/app/logs/page.js +13 -13
- package/mcp-server/.next/server/app/logs/page.js.nft.json +1 -1
- package/mcp-server/.next/server/app/logs/page_client-reference-manifest.js +1 -1
- package/mcp-server/.next/server/app/mcp/route.js +5 -5
- package/mcp-server/.next/server/app/mcp/route.js.nft.json +1 -1
- package/mcp-server/.next/server/app/page/build-manifest.json +5 -5
- package/mcp-server/.next/server/app/page.js +12 -12
- package/mcp-server/.next/server/app/page.js.nft.json +1 -1
- package/mcp-server/.next/server/app/page_client-reference-manifest.js +1 -1
- package/mcp-server/.next/server/app/video/[session]/page/build-manifest.json +5 -5
- package/mcp-server/.next/server/app/video/[session]/page.js +12 -12
- package/mcp-server/.next/server/app/video/[session]/page.js.nft.json +1 -1
- package/mcp-server/.next/server/app/video/[session]/page_client-reference-manifest.js +1 -1
- package/mcp-server/.next/server/chunks/927ef_next_b5c0ceab._.js +17 -0
- package/mcp-server/.next/server/chunks/927ef_next_b5c0ceab._.js.map +1 -0
- package/mcp-server/.next/server/chunks/927ef_next_dist_esm_build_templates_app-route_79d02384.js +3 -0
- package/mcp-server/.next/server/chunks/927ef_next_dist_esm_build_templates_app-route_79d02384.js.map +1 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__0db33344._.js +4 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__0db33344._.js.map +1 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__0ecb6808._.js +3 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__0ecb6808._.js.map +1 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__0fb011f9._.js +3 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__0fb011f9._.js.map +1 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__307a61b6._.js +3 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__307a61b6._.js.map +1 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__37cbcfad._.js +3 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__4af7607d._.js +7 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__4af7607d._.js.map +1 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__560d6800._.js +11 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__560d6800._.js.map +1 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__564803f8._.js +3 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__564803f8._.js.map +1 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__62759808._.js +3 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__62759808._.js.map +1 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__6da2db92._.js +17 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__6da2db92._.js.map +1 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__94037b23._.js +2 -2
- package/mcp-server/.next/server/chunks/[root-of-the-server]__94037b23._.js.map +1 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__9a45c8f9._.js +1 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__9a45c8f9._.js.map +1 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__ae49815f._.js +2 -2
- package/mcp-server/.next/server/chunks/[root-of-the-server]__ae49815f._.js.map +1 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__cc74dbef._.js +2 -2
- package/mcp-server/.next/server/chunks/[root-of-the-server]__cc74dbef._.js.map +1 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__d8486064._.js +3 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__d8486064._.js.map +1 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__e1a64519._.js +1 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__e1a64519._.js.map +1 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__e30dda1c._.js +3 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__e30dda1c._.js.map +1 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__e907f7c3._.js +3 -0
- package/mcp-server/.next/server/chunks/[root-of-the-server]__e907f7c3._.js.map +1 -0
- package/mcp-server/.next/server/chunks/[turbopack]_runtime.js +2 -2
- package/mcp-server/.next/server/chunks/[turbopack]_runtime.js.map +2 -2
- package/mcp-server/.next/server/chunks/ssr/927ef_next_dist_4ad3d29e._.js +24 -0
- package/mcp-server/.next/server/chunks/ssr/927ef_next_dist_4ad3d29e._.js.map +1 -0
- package/mcp-server/.next/server/chunks/ssr/927ef_next_dist_60ed0712._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/927ef_next_dist_60ed0712._.js.map +1 -0
- package/mcp-server/.next/server/chunks/ssr/927ef_next_dist_71a74a90._.js +4 -0
- package/mcp-server/.next/server/chunks/ssr/927ef_next_dist_71a74a90._.js.map +1 -0
- package/mcp-server/.next/server/chunks/ssr/927ef_next_dist_b86f0c6a._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/927ef_next_dist_b86f0c6a._.js.map +1 -0
- package/mcp-server/.next/server/chunks/ssr/927ef_next_dist_cdf03b59._.js +6 -0
- package/mcp-server/.next/server/chunks/ssr/927ef_next_dist_cdf03b59._.js.map +1 -0
- package/mcp-server/.next/server/chunks/ssr/927ef_next_dist_client_components_3f326070._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{d1d76_next_dist_client_components_6557bb14._.js.map → 927ef_next_dist_client_components_3f326070._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/927ef_next_dist_client_components_builtin_forbidden_7f2836ae.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{d1d76_next_dist_client_components_builtin_forbidden_c162dd05.js.map → 927ef_next_dist_client_components_builtin_forbidden_7f2836ae.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/927ef_next_dist_client_components_builtin_global-error_c5387393.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{d1d76_next_dist_client_components_builtin_global-error_3d982957.js.map → 927ef_next_dist_client_components_builtin_global-error_c5387393.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/927ef_next_dist_client_components_builtin_unauthorized_9c9a021e.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{d1d76_next_dist_client_components_builtin_unauthorized_e4f02ffd.js.map → 927ef_next_dist_client_components_builtin_unauthorized_9c9a021e.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/927ef_next_dist_esm_build_templates_app-page_8574fd57.js +4 -0
- package/mcp-server/.next/server/chunks/ssr/927ef_next_dist_esm_build_templates_app-page_8574fd57.js.map +1 -0
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__0f57b0cb._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__aed64cd3._.js.map → [root-of-the-server]__0f57b0cb._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__1501212c._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__cf030fda._.js.map → [root-of-the-server]__1501212c._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__1c5ac5f3._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__1c5ac5f3._.js.map +1 -0
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__2abfd016._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__9bc632fa._.js.map → [root-of-the-server]__2abfd016._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__a4bb31a6._.js → [root-of-the-server]__3d2bec74._.js} +2 -2
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__a4bb31a6._.js.map → [root-of-the-server]__3d2bec74._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__fc10c8f1._.js → [root-of-the-server]__83f4a70b._.js} +2 -2
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__ab133e42._.js +4 -0
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__db74836a._.js.map → [root-of-the-server]__ab133e42._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__cdc83fa5._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__d6cfe4e2._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__61c905ce._.js.map → [root-of-the-server]__d6cfe4e2._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__f28a30da._.js +3 -0
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__9f07837d._.js.map → [root-of-the-server]__f28a30da._.js.map} +1 -1
- package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__05689c01._.js → [root-of-the-server]__fba25701._.js} +2 -2
- package/mcp-server/.next/server/chunks/ssr/[turbopack]_runtime.js +2 -2
- package/mcp-server/.next/server/chunks/ssr/[turbopack]_runtime.js.map +2 -2
- package/mcp-server/.next/server/chunks/ssr/_0866a270._.js +4 -0
- package/mcp-server/.next/server/chunks/ssr/_0866a270._.js.map +1 -0
- package/mcp-server/.next/server/chunks/ssr/_2490ff37._.js +4 -0
- package/mcp-server/.next/server/chunks/ssr/_2490ff37._.js.map +1 -0
- package/mcp-server/.next/server/chunks/ssr/_6a5662d5._.js +4 -0
- package/mcp-server/.next/server/chunks/ssr/_6a5662d5._.js.map +1 -0
- package/mcp-server/.next/server/chunks/ssr/_b0105d1e._.js +8 -0
- package/mcp-server/.next/server/chunks/ssr/_b0105d1e._.js.map +1 -0
- package/mcp-server/.next/server/chunks/ssr/_e1e3dbce._.js +8 -0
- package/mcp-server/.next/server/chunks/ssr/_e1e3dbce._.js.map +1 -0
- package/mcp-server/.next/server/chunks/ssr/mcp-server_app_layout_tsx_afa41767._.js +1 -1
- package/mcp-server/.next/server/chunks/ssr/mcp-server_app_page_tsx_9fc46577._.js +1 -1
- package/mcp-server/.next/server/chunks/ssr/mcp-server_app_page_tsx_9fc46577._.js.map +1 -1
- package/mcp-server/.next/server/chunks/ssr/mcp-server_components_dark-mode-toggle_tsx_f31dd15d._.js +1 -1
- package/mcp-server/.next/server/chunks/ssr/mcp-server_components_dark-mode-toggle_tsx_f31dd15d._.js.map +1 -1
- package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_e1c4d2de._.js +5 -0
- package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_e1c4d2de._.js.map +1 -0
- package/mcp-server/.next/server/middleware-build-manifest.js +6 -8
- package/mcp-server/.next/server/server-reference-manifest.js +1 -1
- package/mcp-server/.next/server/server-reference-manifest.json +1 -1
- package/mcp-server/.next/static/chunks/0daa3bbf22255814.js +3 -0
- package/mcp-server/.next/static/chunks/166de2ba9f1d84b3.js +3 -0
- package/mcp-server/.next/static/chunks/1d0aa71dc83edb1b.js +1 -0
- package/mcp-server/.next/static/chunks/30cf3ce29791996b.js +20 -0
- package/mcp-server/.next/static/chunks/465696cd26c2a481.css +1 -0
- package/mcp-server/.next/static/chunks/5ba0dac3773d4366.js +3 -0
- package/mcp-server/.next/static/chunks/64afb7547dc485e7.js +1 -0
- package/mcp-server/.next/static/chunks/6e21d6bccb01680d.js +1 -0
- package/mcp-server/.next/static/chunks/a85611618c82c0e6.js +1 -0
- package/mcp-server/.next/static/chunks/bb935d6ae29e5a29.js +1 -0
- package/mcp-server/.next/static/chunks/{711519b5a2e53fc8.js → d8a5fdca71b9c607.js} +1 -1
- package/mcp-server/.next/static/chunks/fc6991041566dbdc.js +4 -0
- package/mcp-server/.next/static/chunks/turbopack-f59864db2f95ff01.js +3 -0
- package/mcp-server/app/api/logs/list/route.ts +4 -0
- package/mcp-server/app/logs/page.tsx +4 -0
- package/mcp-server/app/mcp/client-manager.ts +11 -0
- package/mcp-server/app/mcp/route.ts +55 -13
- package/mcp-server/package.json +1 -1
- package/package.json +1 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__013bbeea._.js +0 -7
- package/mcp-server/.next/server/chunks/[root-of-the-server]__013bbeea._.js.map +0 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__05e38acd._.js +0 -3
- package/mcp-server/.next/server/chunks/[root-of-the-server]__05e38acd._.js.map +0 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__2056c8b5._.js +0 -3
- package/mcp-server/.next/server/chunks/[root-of-the-server]__2056c8b5._.js.map +0 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__3130ceec._.js +0 -3
- package/mcp-server/.next/server/chunks/[root-of-the-server]__3130ceec._.js.map +0 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__5114419d._.js +0 -3
- package/mcp-server/.next/server/chunks/[root-of-the-server]__5114419d._.js.map +0 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__5248c9ff._.js +0 -3
- package/mcp-server/.next/server/chunks/[root-of-the-server]__73645708._.js +0 -11
- package/mcp-server/.next/server/chunks/[root-of-the-server]__73645708._.js.map +0 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__8fc8f497._.js +0 -4
- package/mcp-server/.next/server/chunks/[root-of-the-server]__8fc8f497._.js.map +0 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__9c489027._.js +0 -3
- package/mcp-server/.next/server/chunks/[root-of-the-server]__9c489027._.js.map +0 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__a004a307._.js +0 -3
- package/mcp-server/.next/server/chunks/[root-of-the-server]__a004a307._.js.map +0 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__cc81580c._.js +0 -3
- package/mcp-server/.next/server/chunks/[root-of-the-server]__cc81580c._.js.map +0 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__d200fe4a._.js +0 -3
- package/mcp-server/.next/server/chunks/[root-of-the-server]__d200fe4a._.js.map +0 -1
- package/mcp-server/.next/server/chunks/[root-of-the-server]__dc0b0022._.js +0 -17
- package/mcp-server/.next/server/chunks/[root-of-the-server]__dc0b0022._.js.map +0 -1
- package/mcp-server/.next/server/chunks/d1d76_next_09a9e080._.js +0 -17
- package/mcp-server/.next/server/chunks/d1d76_next_09a9e080._.js.map +0 -1
- package/mcp-server/.next/server/chunks/d1d76_next_dist_esm_build_templates_app-route_820fc951.js +0 -3
- package/mcp-server/.next/server/chunks/d1d76_next_dist_esm_build_templates_app-route_820fc951.js.map +0 -1
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__02a8c992._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__61c905ce._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__8863b0f6._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__8863b0f6._.js.map +0 -1
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__9bc632fa._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__9f07837d._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__aed64cd3._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__cf030fda._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/[root-of-the-server]__db74836a._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/_0b8335fc._.js +0 -8
- package/mcp-server/.next/server/chunks/ssr/_0b8335fc._.js.map +0 -1
- package/mcp-server/.next/server/chunks/ssr/_6129d8ec._.js +0 -4
- package/mcp-server/.next/server/chunks/ssr/_6129d8ec._.js.map +0 -1
- package/mcp-server/.next/server/chunks/ssr/_74bf5366._.js +0 -8
- package/mcp-server/.next/server/chunks/ssr/_74bf5366._.js.map +0 -1
- package/mcp-server/.next/server/chunks/ssr/_7d3d2f5f._.js +0 -4
- package/mcp-server/.next/server/chunks/ssr/_7d3d2f5f._.js.map +0 -1
- package/mcp-server/.next/server/chunks/ssr/_e4aa8f16._.js +0 -4
- package/mcp-server/.next/server/chunks/ssr/_e4aa8f16._.js.map +0 -1
- package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_032c5c2e._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_032c5c2e._.js.map +0 -1
- package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_08b22e19._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_08b22e19._.js.map +0 -1
- package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_369453b3._.js +0 -6
- package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_369453b3._.js.map +0 -1
- package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_ad253fdc._.js +0 -4
- package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_ad253fdc._.js.map +0 -1
- package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_b9509b36._.js +0 -6
- package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_b9509b36._.js.map +0 -1
- package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_client_components_6557bb14._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_client_components_builtin_forbidden_c162dd05.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_client_components_builtin_global-error_3d982957.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_client_components_builtin_unauthorized_e4f02ffd.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_esm_build_templates_app-page_134a93a5.js +0 -4
- package/mcp-server/.next/server/chunks/ssr/d1d76_next_dist_esm_build_templates_app-page_134a93a5.js.map +0 -1
- package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_3d10aa72._.js +0 -3
- package/mcp-server/.next/server/chunks/ssr/node_modules__pnpm_3d10aa72._.js.map +0 -1
- package/mcp-server/.next/static/chunks/02f9434392c7ca30.js +0 -1
- package/mcp-server/.next/static/chunks/189ddffb3a8cbfbd.js +0 -1
- package/mcp-server/.next/static/chunks/1d2676338b51bbcf.js +0 -1
- package/mcp-server/.next/static/chunks/526448e84b58822c.js +0 -1
- package/mcp-server/.next/static/chunks/7abbb9a17b62c1fa.js +0 -1
- package/mcp-server/.next/static/chunks/8364b81221aabb64.js +0 -1
- package/mcp-server/.next/static/chunks/98f7307a4a4d67d3.js +0 -1
- package/mcp-server/.next/static/chunks/a0ba80c585f94c7d.js +0 -1
- package/mcp-server/.next/static/chunks/addab50e23821c6c.js +0 -1
- package/mcp-server/.next/static/chunks/b5c56c55f894681d.js +0 -1
- package/mcp-server/.next/static/chunks/bb2e6ac36794beea.css +0 -1
- package/mcp-server/.next/static/chunks/turbopack-22a9e2c19fd12b04.js +0 -3
- /package/mcp-server/.next/server/chunks/{[root-of-the-server]__5248c9ff._.js.map → [root-of-the-server]__37cbcfad._.js.map} +0 -0
- /package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__fc10c8f1._.js.map → [root-of-the-server]__83f4a70b._.js.map} +0 -0
- /package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__02a8c992._.js.map → [root-of-the-server]__cdc83fa5._.js.map} +0 -0
- /package/mcp-server/.next/server/chunks/ssr/{[root-of-the-server]__05689c01._.js.map → [root-of-the-server]__fba25701._.js.map} +0 -0
- /package/mcp-server/.next/static/{1GDuzglZduptPjz52czMu → _WBy1bEjsEo8EAeSPQRAg}/_buildManifest.js +0 -0
- /package/mcp-server/.next/static/{1GDuzglZduptPjz52czMu → _WBy1bEjsEo8EAeSPQRAg}/_clientMiddlewareManifest.json +0 -0
- /package/mcp-server/.next/static/{1GDuzglZduptPjz52czMu → _WBy1bEjsEo8EAeSPQRAg}/_ssgManifest.js +0 -0
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},20635,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},33405,(e,t,r)=>{t.exports=e.x("child_process",()=>require("child_process"))},2157,(e,t,r)=>{t.exports=e.x("node:fs",()=>require("node:fs"))},60526,(e,t,r)=>{t.exports=e.x("node:os",()=>require("node:os"))},50227,(e,t,r)=>{t.exports=e.x("node:path",()=>require("node:path"))},80604,e=>{"use strict";var t=e.i(63366),r=e.i(66479),a=e.i(31453),n=e.i(85632),o=e.i(34686),s=e.i(32730),i=e.i(71352),l=e.i(48381),d=e.i(98354),p=e.i(21545),c=e.i(49921),u=e.i(51588),h=e.i(31827),x=e.i(23126),m=e.i(99612),v=e.i(47511),g=e.i(93695);e.i(1956);var R=e.i(70569),f=e.i(2157),C=e.i(60526),y=e.i(50227),E=e.i(19255),w=e.i(20539);async function P(e){let t=(0,w.getMCPClientManager)(),r=t.getConnectedMCPs(),a=t.getAllTools(),n=(0,y.join)((0,C.homedir)(),".d3k"),o=[];try{if((0,f.existsSync)(n))for(let e of(0,f.readdirSync)(n).filter(e=>e.endsWith(".json")))try{let t=(0,y.join)(n,e),r=JSON.parse((0,f.readFileSync)(t,"utf-8")),a=e.replace(".json","");o.push({name:a,cdpUrl:r.cdpUrl,appPort:r.appPort})}catch{}}catch(e){console.error("[Orchestrator API] Failed to read session files:",e)}let s=r.map(e=>{let t=a.filter(t=>t.mcpName===e),r=o.filter(t=>"chrome-devtools"===e?t.cdpUrl:"nextjs-dev"===e&&t.appPort);return{name:e,connected:!0,toolCount:t.length,tools:t.map(e=>e.tool.name),projects:r.map(e=>e.name)}});return E.NextResponse.json({orchestratorEnabled:!0,connectedMCPs:r,totalConnections:r.length,mcpDetails:s,totalProjects:o.length,projects:o.map(e=>e.name),message:r.length>0?`Connected to ${r.length} downstream MCP${r.length>1?"s":""} across ${o.length} project${1!==o.length?"s":""}`:"No downstream MCPs connected (waiting for dev3000 to start Chrome/dev server)"})}e.s(["GET",()=>P,"dynamic",0,"force-dynamic"],64269);var A=e.i(64269);let j=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/orchestrator/route",pathname:"/api/orchestrator",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/mcp-server/app/api/orchestrator/route.ts",nextConfigOutput:"",userland:A}),{workAsyncStorage:q,workUnitAsyncStorage:N,serverHooks:b}=j;function M(){return(0,a.patchFetch)({workAsyncStorage:q,workUnitAsyncStorage:N})}async function _(e,t,a){var f;let C="/api/orchestrator/route";C=C.replace(/\/index$/,"")||"/";let y=await j.prepare(e,t,{srcPage:C,multiZoneDraftMode:!1});if(!y)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:E,params:w,nextConfig:P,isDraftMode:A,prerenderManifest:q,routerServerContext:N,isOnDemandRevalidate:b,revalidateOnlyGenerated:M,resolvedPathname:_,clientReferenceManifest:S,serverActionsManifest:T}=y,k=(0,l.normalizeAppPath)(C),O=!!(q.dynamicRoutes[k]||q.routes[_]);if(O&&!A){let e=!!q.routes[_],t=q.dynamicRoutes[k];if(t&&!1===t.fallback&&!e)throw new g.NoFallbackError}let U=null;!O||j.isDev||A||(U="/index"===(U=_)?"/":U);let H=!0===j.isDev||!O,I=O&&!H;T&&S&&(0,s.setReferenceManifestsSingleton)({page:C,clientReferenceManifest:S,serverActionsManifest:T,serverModuleMap:(0,i.createServerModuleMap)({serverActionsManifest:T})});let $=e.method||"GET",D=(0,o.getTracer)(),F=D.getActiveScopeSpan(),K={params:w,prerenderManifest:q,renderOpts:{experimental:{cacheComponents:!!P.experimental.cacheComponents,authInterrupts:!!P.experimental.authInterrupts},supportsDynamicResponse:H,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:null==(f=P.experimental)?void 0:f.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a)=>j.onRequestError(e,t,a,N)},sharedContext:{buildId:E}},B=new d.NodeNextRequest(e),L=new d.NodeNextResponse(t),G=p.NextRequestAdapter.fromNodeNextRequest(B,(0,p.signalFromNodeResponse)(t));try{let s=async e=>j.handle(G,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=D.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==c.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${$} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${$} ${C}`)}),i=async o=>{var i,l;let d=async({previousCacheEntry:r})=>{try{if(!(0,n.getRequestMeta)(e,"minimalMode")&&b&&M&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(o);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&a.waitUntil&&(a.waitUntil(l),l=void 0);let d=K.renderOpts.collectedTags;if(!O)return await (0,h.sendResponse)(B,L,i,K.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,x.toNodeOutgoingHttpHeaders)(i.headers);d&&(t[v.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,a=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=v.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:R.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await j.onRequestError(e,t,{routerKind:"App Router",routePath:C,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:b})},N),t}},p=await j.handleResponse({req:e,nextConfig:P,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:q,isRoutePPREnabled:!1,isOnDemandRevalidate:b,revalidateOnlyGenerated:M,responseGenerator:d,waitUntil:a.waitUntil});if(!O)return null;if((null==p||null==(i=p.value)?void 0:i.kind)!==R.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(l=p.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,n.getRequestMeta)(e,"minimalMode")||t.setHeader("x-nextjs-cache",b?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let c=(0,x.fromNodeOutgoingHttpHeaders)(p.value.headers);return(0,n.getRequestMeta)(e,"minimalMode")&&O||c.delete(v.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||c.get("Cache-Control")||c.set("Cache-Control",(0,m.getCacheControlHeader)(p.cacheControl)),await (0,h.sendResponse)(B,L,new Response(p.value.body,{headers:c,status:p.value.status||200})),null};F?await i(F):await D.withPropagatedContext(e.headers,()=>D.trace(c.BaseServerSpan.handleRequest,{spanName:`${$} ${C}`,kind:o.SpanKind.SERVER,attributes:{"http.method":$,"http.target":e.url}},i))}catch(t){if(t instanceof g.NoFallbackError||await j.onRequestError(e,t,{routerKind:"App Router",routePath:k,routeType:"route",revalidateReason:(0,u.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:b})}),O)throw t;return await (0,h.sendResponse)(B,L,new Response(null,{status:500})),null}}e.s(["handler",()=>_,"patchFetch",()=>M,"routeModule",()=>j,"serverHooks",()=>b,"workAsyncStorage",()=>q,"workUnitAsyncStorage",()=>N],80604)},70729,e=>{e.v(t=>Promise.all(["server/chunks/[externals]_node:crypto_c20cce38._.js"].map(t=>e.l(t))).then(()=>t(66680)))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__05e38acd._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["turbopack:///[project]/mcp-server/app/api/orchestrator/route.ts","turbopack:///[project]/node_modules/.pnpm/next@15.6.0-canary.31_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import { existsSync, readdirSync, readFileSync } from \"node:fs\"\nimport { homedir } from \"node:os\"\nimport { join } from \"node:path\"\nimport { NextResponse } from \"next/server\"\nimport { getMCPClientManager } from \"@/app/mcp/client-manager\"\n\nexport const dynamic = \"force-dynamic\"\n\nexport async function GET(_request: Request) {\n const clientManager = getMCPClientManager()\n const connectedMCPs = clientManager.getConnectedMCPs()\n const allTools = clientManager.getAllTools()\n\n // Read session files to get project info\n const sessionDir = join(homedir(), \".d3k\")\n const projects: Array<{ name: string; cdpUrl?: string; appPort?: number }> = []\n\n try {\n if (existsSync(sessionDir)) {\n const sessionFiles = readdirSync(sessionDir).filter((f) => f.endsWith(\".json\"))\n\n for (const file of sessionFiles) {\n try {\n const sessionPath = join(sessionDir, file)\n const sessionData = JSON.parse(readFileSync(sessionPath, \"utf-8\"))\n const projectName = file.replace(\".json\", \"\")\n\n projects.push({\n name: projectName,\n cdpUrl: sessionData.cdpUrl,\n appPort: sessionData.appPort\n })\n } catch {\n // Skip invalid session files\n }\n }\n }\n } catch (error) {\n console.error(\"[Orchestrator API] Failed to read session files:\", error)\n }\n\n const mcpDetails = connectedMCPs.map((mcpName) => {\n const tools = allTools.filter((t) => t.mcpName === mcpName)\n\n // Determine which projects this MCP is connected to\n const connectedProjects = projects.filter((p) => {\n if (mcpName === \"chrome-devtools\") return p.cdpUrl\n if (mcpName === \"nextjs-dev\") return p.appPort\n return false\n })\n\n return {\n name: mcpName,\n connected: true,\n toolCount: tools.length,\n tools: tools.map((t) => t.tool.name),\n projects: connectedProjects.map((p) => p.name)\n }\n })\n\n return NextResponse.json({\n orchestratorEnabled: true,\n connectedMCPs: connectedMCPs,\n totalConnections: connectedMCPs.length,\n mcpDetails,\n totalProjects: projects.length,\n projects: projects.map((p) => p.name),\n message:\n connectedMCPs.length > 0\n ? `Connected to ${connectedMCPs.length} downstream MCP${connectedMCPs.length > 1 ? \"s\" : \"\"} across ${projects.length} project${projects.length !== 1 ? \"s\" : \"\"}`\n : \"No downstream MCPs connected (waiting for dev3000 to start Chrome/dev server)\"\n })\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setReferenceManifestsSingleton } from \"next/dist/esm/server/app-render/encryption-utils\";\nimport { createServerModuleMap } from \"next/dist/esm/server/app-render/action-utils\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/orchestrator/route\",\n pathname: \"/api/orchestrator\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/mcp-server/app/api/orchestrator/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n var _nextConfig_experimental;\n let srcPage = \"/api/orchestrator/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setReferenceManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n serverModuleMap: createServerModuleMap({\n serverActionsManifest\n })\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n cacheComponents: Boolean(nextConfig.experimental.cacheComponents),\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: (_nextConfig_experimental = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!getRequestMeta(req, 'minimalMode') && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!getRequestMeta(req, 'minimalMode')) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(getRequestMeta(req, 'minimalMode') && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n });\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"miDCAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAA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,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAIA,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[1]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},20635,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},22653,e=>{"use strict";var t=e.i(63366),r=e.i(66479),n=e.i(31453),a=e.i(85632),o=e.i(34686),i=e.i(32730),s=e.i(71352),l=e.i(48381),p=e.i(98354),u=e.i(21545),c=e.i(49921),d=e.i(51588),f=e.i(31827),x=e.i(23126),m=e.i(99612),h=e.i(47511),R=e.i(93695);e.i(1956);var g=e.i(70569),y=e.i(19255);async function E(){try{let e=[{name:"fix_my_app",description:"🔧 **THE ULTIMATE FIND→FIX→VERIFY MACHINE!** This isn't just debugging—it's MAGICAL problem-solving that FIXES your app! 🪄\n\n🔥 **INSTANT FIX POWERS:**\n• FINDS: Server errors, browser crashes, build failures, API issues, performance problems—EVERYTHING\n• FIXES: Provides EXACT code fixes with file locations and line numbers\n• GUIDES: Step-by-step implementation of fixes\n• VERIFIES: Ensures fixes actually resolve the issues\n\n🚀 **3 ACTION MODES:**\n• **FIX NOW** (default): \"What's broken RIGHT NOW?\" → Find and fix immediately\n• **FIX REGRESSION**: \"What broke during testing?\" → Compare before/after and fix\n• **FIX CONTINUOUSLY**: \"Fix issues as they appear\" → Monitor and fix proactively\n\n⚡ **THE FIX-IT WORKFLOW:**\n1️⃣ I FIND all issues instantly\n2️⃣ I provide EXACT FIXES with code\n3️⃣ You implement the fixes\n4️⃣ We VERIFY everything works\n\n🎪 **WHY THIS TOOL IS MAGIC:**\n• Goes beyond debugging to actual fixing\n• Provides copy-paste fix code\n• Works with 'fix my app' or 'debug my app'\n• Makes broken apps work again!\n• You become the fix-it hero!\n\n💡 **PRO TIPS:**\n• Say 'fix my app' for instant error resolution\n• Use execute_browser_action to verify fixes\n• This tool doesn't just find problems—it SOLVES them!",category:"Error Fixing",parameters:[{name:"focusArea",type:"string",optional:!0,description:"Specific area: 'build', 'runtime', 'network', 'ui', 'all' (default: 'all')"},{name:"mode",type:"enum",optional:!0,description:"Fix mode: 'snapshot' (fix now), 'bisect' (fix regression), 'monitor' (fix continuously)"},{name:"waitForUserInteraction",type:"boolean",optional:!0,description:"In bisect mode: capture timestamp, wait for user testing, then analyze (default: false)"},{name:"timeRangeMinutes",type:"number",optional:!0,description:"Minutes to analyze back from now (default: 10)"},{name:"includeTimestampInstructions",type:"boolean",optional:!0,description:"Show timestamp-based debugging instructions (default: true)"}]},{name:"execute_browser_action",description:"🪄 **SMART INTERACTION TESTING** - Use for targeted user workflow verification! 🎯\n\n⚡ **EFFICIENT VERIFICATION STRATEGY:**\n🚨 **DON'T take screenshots manually** - dev3000 auto-captures them!\n✅ **DO use this for:** click, navigate, scroll, type to reproduce user interactions\n✅ **DO verify fixes by:** reproducing the original error scenario, then check fix_my_app for verification\n\n🔥 **BROWSER ACTIONS:**\n• CLICK buttons/links → Test specific user interactions\n• NAVIGATE to pages → Reproduce user journeys \n• SCROLL & TYPE → Simulate user workflows\n• EVALUATE JavaScript → Check app state (read-only)\n\n⚡ **OPTIMAL FIX VERIFICATION WORKFLOW:**\n1️⃣ fix_my_app finds issues + provides exact fixes\n2️⃣ You implement the fix code\n3️⃣ Use execute_browser_action to REPRODUCE the original interaction\n4️⃣ Run fix_my_app again to verify the fix worked\n\n🎯 **PERFECT FOR:**\n• Verifying fixes actually resolve the errors\n• Testing interactions after implementing fixes\n• Confirming forms work, buttons respond, etc.\n• Ensuring the app works correctly after fixes\n\n🚫 **AVOID:** Manual screenshot action (dev3000 auto-captures)\n✅ **USE:** Interaction reproduction + fix_my_app for verification\n\n🛡️ **SAFETY:** Safe operations only, read-only JS evaluation",category:"Browser Automation",parameters:[{name:"action",type:"enum",description:"Action to perform: 'click', 'navigate', 'screenshot', 'evaluate', 'scroll', 'type'"},{name:"params",type:"object",description:"Parameters for the action (coordinates, URL, selector, text, expression, etc.)"}]}];return y.NextResponse.json({tools:e,endpoint:`http://localhost:${process.env.PORT||"3684"}/mcp`,totalTools:e.length,categories:[...new Set(e.map(e=>e.category))]})}catch(e){return y.NextResponse.json({error:"Failed to extract tools documentation"},{status:500})}}e.s(["GET",()=>E],40004);var v=e.i(40004);let I=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/tools/route",pathname:"/api/tools",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/mcp-server/app/api/tools/route.ts",nextConfigOutput:"",userland:v}),{workAsyncStorage:T,workUnitAsyncStorage:w,serverHooks:b}=I;function A(){return(0,n.patchFetch)({workAsyncStorage:T,workUnitAsyncStorage:w})}async function C(e,t,n){var y;let E="/api/tools/route";E=E.replace(/\/index$/,"")||"/";let v=await I.prepare(e,t,{srcPage:E,multiZoneDraftMode:!1});if(!v)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:T,params:w,nextConfig:b,isDraftMode:A,prerenderManifest:C,routerServerContext:S,isOnDemandRevalidate:O,revalidateOnlyGenerated:N,resolvedPathname:k,clientReferenceManifest:F,serverActionsManifest:_}=v,P=(0,l.normalizeAppPath)(E),M=!!(C.dynamicRoutes[P]||C.routes[k]);if(M&&!A){let e=!!C.routes[k],t=C.dynamicRoutes[P];if(t&&!1===t.fallback&&!e)throw new R.NoFallbackError}let U=null;!M||I.isDev||A||(U="/index"===(U=k)?"/":U);let j=!0===I.isDev||!M,H=M&&!j;_&&F&&(0,i.setReferenceManifestsSingleton)({page:E,clientReferenceManifest:F,serverActionsManifest:_,serverModuleMap:(0,s.createServerModuleMap)({serverActionsManifest:_})});let D=e.method||"GET",q=(0,o.getTracer)(),L=q.getActiveScopeSpan(),W={params:w,prerenderManifest:C,renderOpts:{experimental:{cacheComponents:!!b.experimental.cacheComponents,authInterrupts:!!b.experimental.authInterrupts},supportsDynamicResponse:j,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:null==(y=b.experimental)?void 0:y.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n)=>I.onRequestError(e,t,n,S)},sharedContext:{buildId:T}},X=new p.NodeNextRequest(e),G=new p.NodeNextResponse(t),V=u.NextRequestAdapter.fromNodeNextRequest(X,(0,u.signalFromNodeResponse)(t));try{let i=async e=>I.handle(V,W).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=q.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==c.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${D} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${D} ${E}`)}),s=async o=>{var s,l;let p=async({previousCacheEntry:r})=>{try{if(!(0,a.getRequestMeta)(e,"minimalMode")&&O&&N&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(o);e.fetchMetrics=W.renderOpts.fetchMetrics;let l=W.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let p=W.renderOpts.collectedTags;if(!M)return await (0,f.sendResponse)(X,G,s,W.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,x.toNodeOutgoingHttpHeaders)(s.headers);p&&(t[h.NEXT_CACHE_TAGS_HEADER]=p),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==W.renderOpts.collectedRevalidate&&!(W.renderOpts.collectedRevalidate>=h.INFINITE_CACHE)&&W.renderOpts.collectedRevalidate,n=void 0===W.renderOpts.collectedExpire||W.renderOpts.collectedExpire>=h.INFINITE_CACHE?void 0:W.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await I.onRequestError(e,t,{routerKind:"App Router",routePath:E,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:O})},S),t}},u=await I.handleResponse({req:e,nextConfig:b,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:C,isRoutePPREnabled:!1,isOnDemandRevalidate:O,revalidateOnlyGenerated:N,responseGenerator:p,waitUntil:n.waitUntil});if(!M)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,a.getRequestMeta)(e,"minimalMode")||t.setHeader("x-nextjs-cache",O?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),A&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let c=(0,x.fromNodeOutgoingHttpHeaders)(u.value.headers);return(0,a.getRequestMeta)(e,"minimalMode")&&M||c.delete(h.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||c.get("Cache-Control")||c.set("Cache-Control",(0,m.getCacheControlHeader)(u.cacheControl)),await (0,f.sendResponse)(X,G,new Response(u.value.body,{headers:c,status:u.value.status||200})),null};L?await s(L):await q.withPropagatedContext(e.headers,()=>q.trace(c.BaseServerSpan.handleRequest,{spanName:`${D} ${E}`,kind:o.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},s))}catch(t){if(t instanceof R.NoFallbackError||await I.onRequestError(e,t,{routerKind:"App Router",routePath:P,routeType:"route",revalidateReason:(0,d.getRevalidateReason)({isStaticGeneration:H,isOnDemandRevalidate:O})}),M)throw t;return await (0,f.sendResponse)(X,G,new Response(null,{status:500})),null}}e.s(["handler",()=>C,"patchFetch",()=>A,"routeModule",()=>I,"serverHooks",()=>b,"workAsyncStorage",()=>T,"workUnitAsyncStorage",()=>w],22653)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__2056c8b5._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["turbopack:///[project]/mcp-server/app/api/tools/route.ts","turbopack:///[project]/node_modules/.pnpm/next@15.6.0-canary.31_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import { NextResponse } from \"next/server\"\n\n// This endpoint extracts MCP tools documentation by parsing the route handler\nexport async function GET() {\n try {\n // Streamlined tool set - reduced from 10 tools to 2 for zero authorization friction!\n const tools = [\n {\n name: \"fix_my_app\",\n description:\n \"🔧 **THE ULTIMATE FIND→FIX→VERIFY MACHINE!** This isn't just debugging—it's MAGICAL problem-solving that FIXES your app! 🪄\\n\\n🔥 **INSTANT FIX POWERS:**\\n• FINDS: Server errors, browser crashes, build failures, API issues, performance problems—EVERYTHING\\n• FIXES: Provides EXACT code fixes with file locations and line numbers\\n• GUIDES: Step-by-step implementation of fixes\\n• VERIFIES: Ensures fixes actually resolve the issues\\n\\n🚀 **3 ACTION MODES:**\\n• **FIX NOW** (default): \\\"What's broken RIGHT NOW?\\\" → Find and fix immediately\\n• **FIX REGRESSION**: \\\"What broke during testing?\\\" → Compare before/after and fix\\n• **FIX CONTINUOUSLY**: \\\"Fix issues as they appear\\\" → Monitor and fix proactively\\n\\n⚡ **THE FIX-IT WORKFLOW:**\\n1️⃣ I FIND all issues instantly\\n2️⃣ I provide EXACT FIXES with code\\n3️⃣ You implement the fixes\\n4️⃣ We VERIFY everything works\\n\\n🎪 **WHY THIS TOOL IS MAGIC:**\\n• Goes beyond debugging to actual fixing\\n• Provides copy-paste fix code\\n• Works with 'fix my app' or 'debug my app'\\n• Makes broken apps work again!\\n• You become the fix-it hero!\\n\\n💡 **PRO TIPS:**\\n• Say 'fix my app' for instant error resolution\\n• Use execute_browser_action to verify fixes\\n• This tool doesn't just find problems—it SOLVES them!\",\n category: \"Error Fixing\",\n parameters: [\n {\n name: \"focusArea\",\n type: \"string\",\n optional: true,\n description: \"Specific area: 'build', 'runtime', 'network', 'ui', 'all' (default: 'all')\"\n },\n {\n name: \"mode\",\n type: \"enum\",\n optional: true,\n description: \"Fix mode: 'snapshot' (fix now), 'bisect' (fix regression), 'monitor' (fix continuously)\"\n },\n {\n name: \"waitForUserInteraction\",\n type: \"boolean\",\n optional: true,\n description: \"In bisect mode: capture timestamp, wait for user testing, then analyze (default: false)\"\n },\n {\n name: \"timeRangeMinutes\",\n type: \"number\",\n optional: true,\n description: \"Minutes to analyze back from now (default: 10)\"\n },\n {\n name: \"includeTimestampInstructions\",\n type: \"boolean\",\n optional: true,\n description: \"Show timestamp-based debugging instructions (default: true)\"\n }\n ]\n },\n {\n name: \"execute_browser_action\",\n description:\n \"🪄 **SMART INTERACTION TESTING** - Use for targeted user workflow verification! 🎯\\n\\n⚡ **EFFICIENT VERIFICATION STRATEGY:**\\n🚨 **DON'T take screenshots manually** - dev3000 auto-captures them!\\n✅ **DO use this for:** click, navigate, scroll, type to reproduce user interactions\\n✅ **DO verify fixes by:** reproducing the original error scenario, then check fix_my_app for verification\\n\\n🔥 **BROWSER ACTIONS:**\\n• CLICK buttons/links → Test specific user interactions\\n• NAVIGATE to pages → Reproduce user journeys \\n• SCROLL & TYPE → Simulate user workflows\\n• EVALUATE JavaScript → Check app state (read-only)\\n\\n⚡ **OPTIMAL FIX VERIFICATION WORKFLOW:**\\n1️⃣ fix_my_app finds issues + provides exact fixes\\n2️⃣ You implement the fix code\\n3️⃣ Use execute_browser_action to REPRODUCE the original interaction\\n4️⃣ Run fix_my_app again to verify the fix worked\\n\\n🎯 **PERFECT FOR:**\\n• Verifying fixes actually resolve the errors\\n• Testing interactions after implementing fixes\\n• Confirming forms work, buttons respond, etc.\\n• Ensuring the app works correctly after fixes\\n\\n🚫 **AVOID:** Manual screenshot action (dev3000 auto-captures)\\n✅ **USE:** Interaction reproduction + fix_my_app for verification\\n\\n🛡️ **SAFETY:** Safe operations only, read-only JS evaluation\",\n category: \"Browser Automation\",\n parameters: [\n {\n name: \"action\",\n type: \"enum\",\n description: \"Action to perform: 'click', 'navigate', 'screenshot', 'evaluate', 'scroll', 'type'\"\n },\n {\n name: \"params\",\n type: \"object\",\n description: \"Parameters for the action (coordinates, URL, selector, text, expression, etc.)\"\n }\n ]\n }\n // TODO: Commenting out for now - need to figure out the right approach for proactive monitoring\n /*\n ,{\n name: \"start_error_monitoring\",\n description:\n \"🔍 **SIMPLE ERROR MONITORING** - Starts a lightweight background process that watches your app for errors and alerts you in real-time.\\n\\n⚡ **INSTANT ACTIVATION:**\\n• Claude offers to run the monitoring script immediately\\n• Just say 'yes' or 'monitor my app' to start\\n• Simple 15-line Python script that just works\\n• Real-time alerts when errors occur\\n\\n💡 **WHAT IT DOES:**\\n• Watches for ERROR, FAIL, Exception, TypeError, CRASH keywords\\n• Shows the error line when detected\\n• Prompts you to let Claude debug\\n• That's it - simple and effective!\\n\\n🎯 **USAGE FLOW:**\\n1. User: 'monitor my app'\\n2. Claude: 'Should I start monitoring now?'\\n3. User: 'yes'\\n4. Claude runs the script → monitoring active\\n5. When errors appear → 'Tell me: debug my app'\\n\\n✨ **THE BEAUTY:**\\n• No complex features - just works\\n• Lightweight and fast\\n• Perfect for quick error detection\",\n category: \"Monitoring\",\n parameters: [\n {\n name: \"projectName\",\n type: \"string\",\n optional: true,\n description: \"Project name to monitor (if multiple dev3000 instances are running)\"\n }\n ]\n }\n */\n ]\n\n return NextResponse.json({\n tools,\n endpoint: `http://localhost:${process.env.PORT || \"3684\"}/mcp`,\n totalTools: tools.length,\n categories: [...new Set(tools.map((t) => t.category))]\n })\n } catch (_error) {\n return NextResponse.json({ error: \"Failed to extract tools documentation\" }, { status: 500 })\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setReferenceManifestsSingleton } from \"next/dist/esm/server/app-render/encryption-utils\";\nimport { createServerModuleMap } from \"next/dist/esm/server/app-render/action-utils\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/tools/route\",\n pathname: \"/api/tools\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/mcp-server/app/api/tools/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n var _nextConfig_experimental;\n let srcPage = \"/api/tools/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setReferenceManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n serverModuleMap: createServerModuleMap({\n serverActionsManifest\n })\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n cacheComponents: Boolean(nextConfig.experimental.cacheComponents),\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: (_nextConfig_experimental = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!getRequestMeta(req, 'minimalMode') && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!getRequestMeta(req, 'minimalMode')) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(getRequestMeta(req, 'minimalMode') && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n });\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"8pCCAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,CAAA,MAAA,IAAA,EAAA,EAAA,CAAA,CAAA,ODjBA,EAAA,EAAA,CAAA,CAAA,OAGO,eAAe,IACpB,GAAI,CAEF,IAAM,EAAQ,CACZ,CACE,KAAM,aACN,YACE,6uCACF,SAAU,eACV,WAAY,CACV,CACE,KAAM,YACN,KAAM,SACN,UAAU,EACV,YAAa,4EACf,EACA,CACE,KAAM,OACN,KAAM,OACN,SAAU,GACV,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,EACJ,GAIA,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[1]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},20635,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},33769,e=>{"use strict";var t=e.i(63366),r=e.i(66479),a=e.i(31453),n=e.i(85632),s=e.i(34686),o=e.i(32730),i=e.i(71352),l=e.i(48381),d=e.i(98354),p=e.i(21545),u=e.i(49921),c=e.i(51588),x=e.i(31827),h=e.i(23126),R=e.i(99612),v=e.i(47511),f=e.i(93695);e.i(1956);var g=e.i(70569),m=e.i(22734),E=e.i(19255),w=e.i(46786),y=e.i(14747);async function C(e){try{let t=e.nextUrl.searchParams.get("pattern")||"",r=process.env.SCREENSHOT_DIR||(0,y.join)((0,w.tmpdir)(),"dev3000-mcp-deps","public","screenshots"),a=(0,m.readdirSync)(r).filter(e=>e.endsWith(".png")).filter(e=>!t||e.includes(t));return E.NextResponse.json({files:a})}catch(e){return console.error("Error listing screenshots:",e),E.NextResponse.json({files:[]},{status:500})}}e.s(["GET",()=>C],14262);var A=e.i(14262);let b=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/screenshots/list/route",pathname:"/api/screenshots/list",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/mcp-server/app/api/screenshots/list/route.ts",nextConfigOutput:"",userland:A}),{workAsyncStorage:N,workUnitAsyncStorage:q,serverHooks:T}=b;function P(){return(0,a.patchFetch)({workAsyncStorage:N,workUnitAsyncStorage:q})}async function S(e,t,a){var m;let E="/api/screenshots/list/route";E=E.replace(/\/index$/,"")||"/";let w=await b.prepare(e,t,{srcPage:E,multiZoneDraftMode:!1});if(!w)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:y,params:C,nextConfig:A,isDraftMode:N,prerenderManifest:q,routerServerContext:T,isOnDemandRevalidate:P,revalidateOnlyGenerated:S,resolvedPathname:j,clientReferenceManifest:O,serverActionsManifest:k}=w,_=(0,l.normalizeAppPath)(E),M=!!(q.dynamicRoutes[_]||q.routes[j]);if(M&&!N){let e=!!q.routes[j],t=q.dynamicRoutes[_];if(t&&!1===t.fallback&&!e)throw new f.NoFallbackError}let H=null;!M||b.isDev||N||(H="/index"===(H=j)?"/":H);let U=!0===b.isDev||!M,I=M&&!U;k&&O&&(0,o.setReferenceManifestsSingleton)({page:E,clientReferenceManifest:O,serverActionsManifest:k,serverModuleMap:(0,i.createServerModuleMap)({serverActionsManifest:k})});let D=e.method||"GET",$=(0,s.getTracer)(),F=$.getActiveScopeSpan(),K={params:C,prerenderManifest:q,renderOpts:{experimental:{cacheComponents:!!A.experimental.cacheComponents,authInterrupts:!!A.experimental.authInterrupts},supportsDynamicResponse:U,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:null==(m=A.experimental)?void 0:m.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a)=>b.onRequestError(e,t,a,T)},sharedContext:{buildId:y}},B=new d.NodeNextRequest(e),L=new d.NodeNextResponse(t),G=p.NextRequestAdapter.fromNodeNextRequest(B,(0,p.signalFromNodeResponse)(t));try{let o=async e=>b.handle(G,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${D} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${D} ${E}`)}),i=async s=>{var i,l;let d=async({previousCacheEntry:r})=>{try{if(!(0,n.getRequestMeta)(e,"minimalMode")&&P&&S&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await o(s);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&a.waitUntil&&(a.waitUntil(l),l=void 0);let d=K.renderOpts.collectedTags;if(!M)return await (0,x.sendResponse)(B,L,i,K.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);d&&(t[v.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,a=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=v.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:g.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await b.onRequestError(e,t,{routerKind:"App Router",routePath:E,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:P})},T),t}},p=await b.handleResponse({req:e,nextConfig:A,cacheKey:H,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:q,isRoutePPREnabled:!1,isOnDemandRevalidate:P,revalidateOnlyGenerated:S,responseGenerator:d,waitUntil:a.waitUntil});if(!M)return null;if((null==p||null==(i=p.value)?void 0:i.kind)!==g.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(l=p.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,n.getRequestMeta)(e,"minimalMode")||t.setHeader("x-nextjs-cache",P?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),N&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,h.fromNodeOutgoingHttpHeaders)(p.value.headers);return(0,n.getRequestMeta)(e,"minimalMode")&&M||u.delete(v.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,R.getCacheControlHeader)(p.cacheControl)),await (0,x.sendResponse)(B,L,new Response(p.value.body,{headers:u,status:p.value.status||200})),null};F?await i(F):await $.withPropagatedContext(e.headers,()=>$.trace(u.BaseServerSpan.handleRequest,{spanName:`${D} ${E}`,kind:s.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},i))}catch(t){if(t instanceof f.NoFallbackError||await b.onRequestError(e,t,{routerKind:"App Router",routePath:_,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:P})}),M)throw t;return await (0,x.sendResponse)(B,L,new Response(null,{status:500})),null}}e.s(["handler",()=>S,"patchFetch",()=>P,"routeModule",()=>b,"serverHooks",()=>T,"workAsyncStorage",()=>N,"workUnitAsyncStorage",()=>q],33769)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__3130ceec._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["turbopack:///[project]/mcp-server/app/api/screenshots/list/route.ts","turbopack:///[project]/node_modules/.pnpm/next@15.6.0-canary.31_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import { readdirSync } from \"fs\"\nimport { type NextRequest, NextResponse } from \"next/server\"\nimport { tmpdir } from \"os\"\nimport { join } from \"path\"\n\nexport async function GET(request: NextRequest) {\n try {\n const searchParams = request.nextUrl.searchParams\n const pattern = searchParams.get(\"pattern\") || \"\"\n\n const screenshotDir = process.env.SCREENSHOT_DIR || join(tmpdir(), \"dev3000-mcp-deps\", \"public\", \"screenshots\")\n\n const files = readdirSync(screenshotDir)\n .filter((f) => f.endsWith(\".png\"))\n .filter((f) => (pattern ? f.includes(pattern) : true))\n\n return NextResponse.json({ files })\n } catch (error) {\n console.error(\"Error listing screenshots:\", error)\n return NextResponse.json({ files: [] }, { status: 500 })\n }\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setReferenceManifestsSingleton } from \"next/dist/esm/server/app-render/encryption-utils\";\nimport { createServerModuleMap } from \"next/dist/esm/server/app-render/action-utils\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/screenshots/list/route\",\n pathname: \"/api/screenshots/list\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/mcp-server/app/api/screenshots/list/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n var _nextConfig_experimental;\n let srcPage = \"/api/screenshots/list/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setReferenceManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n serverModuleMap: createServerModuleMap({\n serverActionsManifest\n })\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n cacheComponents: Boolean(nextConfig.experimental.cacheComponents),\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: (_nextConfig_experimental = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!getRequestMeta(req, 'minimalMode') && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!getRequestMeta(req, 'minimalMode')) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(getRequestMeta(req, 'minimalMode') && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n });\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"u0CCAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,C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AAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAIA,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[1]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},20635,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},24725,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},46786,(e,t,r)=>{t.exports=e.x("os",()=>require("os"))},24868,(e,t,r)=>{t.exports=e.x("fs/promises",()=>require("fs/promises"))},41706,e=>{"use strict";var t=e.i(63366),r=e.i(66479),n=e.i(31453),a=e.i(85632),s=e.i(34686),o=e.i(32730),i=e.i(71352),l=e.i(48381),p=e.i(98354),d=e.i(21545),u=e.i(49921),c=e.i(51588),x=e.i(31827),h=e.i(23126),R=e.i(99612),v=e.i(47511),m=e.i(93695);e.i(1956);var f=e.i(70569),g=e.i(22734),w=e.i(24868),E=e.i(19255),C=e.i(14747);async function y(t,{params:r}){try{let t,{filename:n}=await r;if(!n||n.includes("..")||n.includes("/"))return new E.NextResponse("Invalid filename",{status:400});if(t=process.env.SCREENSHOT_DIR?(0,C.join)(process.env.SCREENSHOT_DIR,n):"/ROOT/mcp-server/app/api/screenshots/[filename]".includes(".pnpm")?(0,C.join)(e.r(46786).tmpdir(),"dev3000-mcp-deps","public","screenshots",n):(0,C.join)(process.cwd(),"public","screenshots",n),!(0,g.existsSync)(t))return new E.NextResponse("Screenshot not found",{status:404});let a=await (0,w.readFile)(t),s=n.split(".").pop()?.toLowerCase(),o=new Uint8Array(a);return new E.NextResponse(o,{headers:{"Content-Type":"png"===s?"image/png":"image/jpeg","Cache-Control":"public, max-age=3600"}})}catch(e){return console.error("Error serving screenshot:",e),new E.NextResponse("Internal server error",{status:500})}}e.s(["GET",()=>y],75976);var A=e.i(75976);let N=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/screenshots/[filename]/route",pathname:"/api/screenshots/[filename]",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/mcp-server/app/api/screenshots/[filename]/route.ts",nextConfigOutput:"",userland:A}),{workAsyncStorage:b,workUnitAsyncStorage:T,serverHooks:S}=N;function q(){return(0,n.patchFetch)({workAsyncStorage:b,workUnitAsyncStorage:T})}async function O(e,t,n){var g;let w="/api/screenshots/[filename]/route";w=w.replace(/\/index$/,"")||"/";let E=await N.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!E)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:C,params:y,nextConfig:A,isDraftMode:b,prerenderManifest:T,routerServerContext:S,isOnDemandRevalidate:q,revalidateOnlyGenerated:O,resolvedPathname:j,clientReferenceManifest:P,serverActionsManifest:_}=E,k=(0,l.normalizeAppPath)(w),H=!!(T.dynamicRoutes[k]||T.routes[j]);if(H&&!b){let e=!!T.routes[j],t=T.dynamicRoutes[k];if(t&&!1===t.fallback&&!e)throw new m.NoFallbackError}let M=null;!H||N.isDev||b||(M="/index"===(M=j)?"/":M);let I=!0===N.isDev||!H,U=H&&!I;_&&P&&(0,o.setReferenceManifestsSingleton)({page:w,clientReferenceManifest:P,serverActionsManifest:_,serverModuleMap:(0,i.createServerModuleMap)({serverActionsManifest:_})});let D=e.method||"GET",F=(0,s.getTracer)(),$=F.getActiveScopeSpan(),K={params:y,prerenderManifest:T,renderOpts:{experimental:{cacheComponents:!!A.experimental.cacheComponents,authInterrupts:!!A.experimental.authInterrupts},supportsDynamicResponse:I,incrementalCache:(0,a.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:null==(g=A.experimental)?void 0:g.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n)=>N.onRequestError(e,t,n,S)},sharedContext:{buildId:C}},L=new p.NodeNextRequest(e),B=new p.NodeNextResponse(t),G=d.NextRequestAdapter.fromNodeNextRequest(L,(0,d.signalFromNodeResponse)(t));try{let o=async e=>N.handle(G,K).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${D} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${D} ${w}`)}),i=async s=>{var i,l;let p=async({previousCacheEntry:r})=>{try{if(!(0,a.getRequestMeta)(e,"minimalMode")&&q&&O&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await o(s);e.fetchMetrics=K.renderOpts.fetchMetrics;let l=K.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let p=K.renderOpts.collectedTags;if(!H)return await (0,x.sendResponse)(L,B,i,K.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,h.toNodeOutgoingHttpHeaders)(i.headers);p&&(t[v.NEXT_CACHE_TAGS_HEADER]=p),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==K.renderOpts.collectedRevalidate&&!(K.renderOpts.collectedRevalidate>=v.INFINITE_CACHE)&&K.renderOpts.collectedRevalidate,n=void 0===K.renderOpts.collectedExpire||K.renderOpts.collectedExpire>=v.INFINITE_CACHE?void 0:K.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await N.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:q})},S),t}},d=await N.handleResponse({req:e,nextConfig:A,cacheKey:M,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:T,isRoutePPREnabled:!1,isOnDemandRevalidate:q,revalidateOnlyGenerated:O,responseGenerator:p,waitUntil:n.waitUntil});if(!H)return null;if((null==d||null==(i=d.value)?void 0:i.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==d||null==(l=d.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,a.getRequestMeta)(e,"minimalMode")||t.setHeader("x-nextjs-cache",q?"REVALIDATED":d.isMiss?"MISS":d.isStale?"STALE":"HIT"),b&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,h.fromNodeOutgoingHttpHeaders)(d.value.headers);return(0,a.getRequestMeta)(e,"minimalMode")&&H||u.delete(v.NEXT_CACHE_TAGS_HEADER),!d.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,R.getCacheControlHeader)(d.cacheControl)),await (0,x.sendResponse)(L,B,new Response(d.value.body,{headers:u,status:d.value.status||200})),null};$?await i($):await F.withPropagatedContext(e.headers,()=>F.trace(u.BaseServerSpan.handleRequest,{spanName:`${D} ${w}`,kind:s.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},i))}catch(t){if(t instanceof m.NoFallbackError||await N.onRequestError(e,t,{routerKind:"App Router",routePath:k,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:q})}),H)throw t;return await (0,x.sendResponse)(L,B,new Response(null,{status:500})),null}}e.s(["handler",()=>O,"patchFetch",()=>q,"routeModule",()=>N,"serverHooks",()=>S,"workAsyncStorage",()=>b,"workUnitAsyncStorage",()=>T],41706)}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__5114419d._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["turbopack:///[project]/node_modules/.pnpm/next@15.6.0-canary.31_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/esm/build/templates/app-route.js","turbopack:///[project]/mcp-server/app/api/screenshots/[filename]/route.ts"],"sourcesContent":["import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setReferenceManifestsSingleton } from \"next/dist/esm/server/app-render/encryption-utils\";\nimport { createServerModuleMap } from \"next/dist/esm/server/app-render/action-utils\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/screenshots/[filename]/route\",\n pathname: \"/api/screenshots/[filename]\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/mcp-server/app/api/screenshots/[filename]/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n var _nextConfig_experimental;\n let srcPage = \"/api/screenshots/[filename]/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setReferenceManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n serverModuleMap: createServerModuleMap({\n serverActionsManifest\n })\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n cacheComponents: Boolean(nextConfig.experimental.cacheComponents),\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: (_nextConfig_experimental = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!getRequestMeta(req, 'minimalMode') && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!getRequestMeta(req, 'minimalMode')) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(getRequestMeta(req, 'minimalMode') && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n });\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n","import { existsSync } from \"fs\"\nimport { readFile } from \"fs/promises\"\nimport { type NextRequest, NextResponse } from \"next/server\"\nimport { join } from \"path\"\n\nexport async function GET(_request: NextRequest, { params }: { params: Promise<{ filename: string }> }) {\n try {\n const { filename } = await params\n\n // Sanitize filename to prevent directory traversal\n if (!filename || filename.includes(\"..\") || filename.includes(\"/\")) {\n return new NextResponse(\"Invalid filename\", { status: 400 })\n }\n\n // For global installs, screenshots are saved to temp directory\n // First check if SCREENSHOT_DIR is set (passed by dev3000 for global installs)\n let screenshotPath: string\n if (process.env.SCREENSHOT_DIR) {\n // Use the directory specified by dev3000\n screenshotPath = join(process.env.SCREENSHOT_DIR, filename)\n } else {\n // Fallback: Check if running from global install location\n const isGlobalInstall = __dirname.includes(\".pnpm\")\n\n if (isGlobalInstall) {\n // Global install - check temp directory\n const tmpDir = join(require(\"os\").tmpdir(), \"dev3000-mcp-deps\", \"public\", \"screenshots\", filename)\n screenshotPath = tmpDir\n } else {\n // Local install - use current working directory\n screenshotPath = join(process.cwd(), \"public\", \"screenshots\", filename)\n }\n }\n\n // Check if file exists\n if (!existsSync(screenshotPath)) {\n return new NextResponse(\"Screenshot not found\", { status: 404 })\n }\n\n // Read the file\n const imageBuffer = await readFile(screenshotPath)\n\n // Determine content type based on file extension\n const ext = filename.split(\".\").pop()?.toLowerCase()\n const contentType = ext === \"png\" ? \"image/png\" : \"image/jpeg\"\n\n // Convert Buffer to Uint8Array for NextResponse\n const imageData = new Uint8Array(imageBuffer)\n\n // Return the image with appropriate headers\n return new NextResponse(imageData, {\n headers: {\n \"Content-Type\": contentType,\n \"Cache-Control\": \"public, max-age=3600\"\n }\n })\n } catch (error) {\n console.error(\"Error serving screenshot:\", error)\n return new NextResponse(\"Internal server error\", { status: 500 })\n }\n}\n"],"names":[],"mappings":"g5CAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,CAAA,MAAA,IAAA,EAAA,EAAA,CAAA,CAAA,OCjBA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAA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,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAcV,GAbI,AAAE,CAAD,YAAgB,EAAA,eAAe,EAChC,CADmC,KAC7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAIA,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[0]}
|
|
@@ -1,3 +0,0 @@
|
|
|
1
|
-
module.exports=[70406,(e,r,t)=>{r.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},93695,(e,r,t)=>{r.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,r,t)=>{r.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},20635,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/action-async-storage.external.js",()=>require("next/dist/server/app-render/action-async-storage.external.js"))},24725,(e,r,t)=>{r.exports=e.x("next/dist/server/app-render/after-task-async-storage.external.js",()=>require("next/dist/server/app-render/after-task-async-storage.external.js"))},24361,(e,r,t)=>{r.exports=e.x("util",()=>require("util"))},14747,(e,r,t)=>{r.exports=e.x("path",()=>require("path"))},22734,(e,r,t)=>{r.exports=e.x("fs",()=>require("fs"))},46786,(e,r,t)=>{r.exports=e.x("os",()=>require("os"))}];
|
|
2
|
-
|
|
3
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__5248c9ff._.js.map
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
module.exports=[22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},91466,e=>{"use strict";var t=e.i(63366),r=e.i(66479),a=e.i(31453),n=e.i(85632),o=e.i(34686),i=e.i(32730),s=e.i(71352),l=e.i(48381),d=e.i(98354),u=e.i(21545),p=e.i(49921),c=e.i(51588),h=e.i(31827),x=e.i(23126),R=e.i(99612),g=e.i(47511),v=e.i(93695);e.i(1956);var f=e.i(70569),m=e.i(22734);async function w(e){let{searchParams:t}=new URL(e.url),r=t.get("logPath")||process.env.LOG_FILE_PATH||"./ai-dev-tools/consolidated.log";if(!(0,m.existsSync)(r))return new Response("Log file not found",{status:404});let a=new TextEncoder,n=0;return new Response(new ReadableStream({start(t){try{let e=(0,m.readFileSync)(r,"utf-8"),o=e.split("\n").filter(e=>e.trim());n=e.length,t.enqueue(a.encode(`data: ${JSON.stringify({lines:o})}
|
|
2
|
-
|
|
3
|
-
`))}catch(e){t.enqueue(a.encode(`data: ${JSON.stringify({error:"Failed to read log"})}
|
|
4
|
-
|
|
5
|
-
`))}let o=(0,m.watchFile)(r,{interval:1e3},()=>{try{let e=(0,m.readFileSync)(r,"utf-8");if(e.length>n){let r=e.slice(n).split("\n").filter(e=>e.trim());r.length>0&&t.enqueue(a.encode(`data: ${JSON.stringify({newLines:r})}
|
|
6
|
-
|
|
7
|
-
`)),n=e.length}}catch(e){t.enqueue(a.encode(`data: ${JSON.stringify({error:"Failed to read log updates"})}
|
|
8
|
-
|
|
9
|
-
`))}});e.signal.addEventListener("abort",()=>{o.unref(),t.close()})}}),{headers:{"Content-Type":"text/event-stream","Cache-Control":"no-cache",Connection:"keep-alive"}})}e.s(["GET",()=>w],35443);var E=e.i(35443);let y=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/logs/stream/route",pathname:"/api/logs/stream",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/mcp-server/app/api/logs/stream/route.ts",nextConfigOutput:"",userland:E}),{workAsyncStorage:C,workUnitAsyncStorage:A,serverHooks:S}=y;function b(){return(0,a.patchFetch)({workAsyncStorage:C,workUnitAsyncStorage:A})}async function N(e,t,a){var m;let w="/api/logs/stream/route";w=w.replace(/\/index$/,"")||"/";let E=await y.prepare(e,t,{srcPage:w,multiZoneDraftMode:!1});if(!E)return t.statusCode=400,t.end("Bad Request"),null==a.waitUntil||a.waitUntil.call(a,Promise.resolve()),null;let{buildId:C,params:A,nextConfig:S,isDraftMode:b,prerenderManifest:N,routerServerContext:O,isOnDemandRevalidate:T,revalidateOnlyGenerated:q,resolvedPathname:P,clientReferenceManifest:_,serverActionsManifest:k}=E,M=(0,l.normalizeAppPath)(w),H=!!(N.dynamicRoutes[M]||N.routes[P]);if(H&&!b){let e=!!N.routes[P],t=N.dynamicRoutes[M];if(t&&!1===t.fallback&&!e)throw new v.NoFallbackError}let U=null;!H||y.isDev||b||(U="/index"===(U=P)?"/":U);let j=!0===y.isDev||!H,I=H&&!j;k&&_&&(0,i.setReferenceManifestsSingleton)({page:w,clientReferenceManifest:_,serverActionsManifest:k,serverModuleMap:(0,s.createServerModuleMap)({serverActionsManifest:k})});let F=e.method||"GET",$=(0,o.getTracer)(),D=$.getActiveScopeSpan(),L={params:A,prerenderManifest:N,renderOpts:{experimental:{cacheComponents:!!S.experimental.cacheComponents,authInterrupts:!!S.experimental.authInterrupts},supportsDynamicResponse:j,incrementalCache:(0,n.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:null==(m=S.experimental)?void 0:m.cacheLife,waitUntil:a.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,a)=>y.onRequestError(e,t,a,O)},sharedContext:{buildId:C}},K=new d.NodeNextRequest(e),B=new d.NodeNextResponse(t),G=u.NextRequestAdapter.fromNodeNextRequest(K,(0,u.signalFromNodeResponse)(t));try{let i=async e=>y.handle(G,L).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=$.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==p.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let a=r.get("next.route");if(a){let t=`${F} ${a}`;e.setAttributes({"next.route":a,"http.route":a,"next.span_name":t}),e.updateName(t)}else e.updateName(`${F} ${w}`)}),s=async o=>{var s,l;let d=async({previousCacheEntry:r})=>{try{if(!(0,n.getRequestMeta)(e,"minimalMode")&&T&&q&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let s=await i(o);e.fetchMetrics=L.renderOpts.fetchMetrics;let l=L.renderOpts.pendingWaitUntil;l&&a.waitUntil&&(a.waitUntil(l),l=void 0);let d=L.renderOpts.collectedTags;if(!H)return await (0,h.sendResponse)(K,B,s,L.renderOpts.pendingWaitUntil),null;{let e=await s.blob(),t=(0,x.toNodeOutgoingHttpHeaders)(s.headers);d&&(t[g.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==L.renderOpts.collectedRevalidate&&!(L.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&L.renderOpts.collectedRevalidate,a=void 0===L.renderOpts.collectedExpire||L.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:L.renderOpts.collectedExpire;return{value:{kind:f.CachedRouteKind.APP_ROUTE,status:s.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:a}}}}catch(t){throw(null==r?void 0:r.isStale)&&await y.onRequestError(e,t,{routerKind:"App Router",routePath:w,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:T})},O),t}},u=await y.handleResponse({req:e,nextConfig:S,cacheKey:U,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:N,isRoutePPREnabled:!1,isOnDemandRevalidate:T,revalidateOnlyGenerated:q,responseGenerator:d,waitUntil:a.waitUntil});if(!H)return null;if((null==u||null==(s=u.value)?void 0:s.kind)!==f.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==u||null==(l=u.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,n.getRequestMeta)(e,"minimalMode")||t.setHeader("x-nextjs-cache",T?"REVALIDATED":u.isMiss?"MISS":u.isStale?"STALE":"HIT"),b&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let p=(0,x.fromNodeOutgoingHttpHeaders)(u.value.headers);return(0,n.getRequestMeta)(e,"minimalMode")&&H||p.delete(g.NEXT_CACHE_TAGS_HEADER),!u.cacheControl||t.getHeader("Cache-Control")||p.get("Cache-Control")||p.set("Cache-Control",(0,R.getCacheControlHeader)(u.cacheControl)),await (0,h.sendResponse)(K,B,new Response(u.value.body,{headers:p,status:u.value.status||200})),null};D?await s(D):await $.withPropagatedContext(e.headers,()=>$.trace(p.BaseServerSpan.handleRequest,{spanName:`${F} ${w}`,kind:o.SpanKind.SERVER,attributes:{"http.method":F,"http.target":e.url}},s))}catch(t){if(t instanceof v.NoFallbackError||await y.onRequestError(e,t,{routerKind:"App Router",routePath:M,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:I,isOnDemandRevalidate:T})}),H)throw t;return await (0,h.sendResponse)(K,B,new Response(null,{status:500})),null}}e.s(["handler",()=>N,"patchFetch",()=>b,"routeModule",()=>y,"serverHooks",()=>S,"workAsyncStorage",()=>C,"workUnitAsyncStorage",()=>A],91466)}];
|
|
10
|
-
|
|
11
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__73645708._.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"sources":["turbopack:///[project]/mcp-server/app/api/logs/stream/route.ts","turbopack:///[project]/node_modules/.pnpm/next@15.6.0-canary.31_babel-plugin-react-compiler@19.1.0-rc.3_react-dom@19.1.1_react@19.1.1__react@19.1.1/node_modules/next/dist/esm/build/templates/app-route.js"],"sourcesContent":["import { existsSync, readFileSync, watchFile } from \"fs\"\nimport type { NextRequest } from \"next/server\"\n\nexport async function GET(request: NextRequest) {\n const { searchParams } = new URL(request.url)\n const logPath = searchParams.get(\"logPath\") || process.env.LOG_FILE_PATH || \"./ai-dev-tools/consolidated.log\"\n\n if (!existsSync(logPath)) {\n return new Response(\"Log file not found\", { status: 404 })\n }\n\n const encoder = new TextEncoder()\n let lastSize = 0\n\n const stream = new ReadableStream({\n start(controller) {\n // Send initial content\n try {\n const content = readFileSync(logPath, \"utf-8\")\n const lines = content.split(\"\\n\").filter((line) => line.trim())\n lastSize = content.length\n\n // Send initial lines\n controller.enqueue(encoder.encode(`data: ${JSON.stringify({ lines })}\\n\\n`))\n } catch (_error) {\n controller.enqueue(encoder.encode(`data: ${JSON.stringify({ error: \"Failed to read log\" })}\\n\\n`))\n }\n\n // Watch for file changes\n const watcher = watchFile(logPath, { interval: 1000 }, () => {\n try {\n const content = readFileSync(logPath, \"utf-8\")\n if (content.length > lastSize) {\n const newContent = content.slice(lastSize)\n const newLines = newContent.split(\"\\n\").filter((line) => line.trim())\n if (newLines.length > 0) {\n controller.enqueue(encoder.encode(`data: ${JSON.stringify({ newLines })}\\n\\n`))\n }\n lastSize = content.length\n }\n } catch (_error) {\n controller.enqueue(encoder.encode(`data: ${JSON.stringify({ error: \"Failed to read log updates\" })}\\n\\n`))\n }\n })\n\n // Cleanup on close\n request.signal.addEventListener(\"abort\", () => {\n watcher.unref()\n controller.close()\n })\n }\n })\n\n return new Response(stream, {\n headers: {\n \"Content-Type\": \"text/event-stream\",\n \"Cache-Control\": \"no-cache\",\n Connection: \"keep-alive\"\n }\n })\n}\n","import { AppRouteRouteModule } from \"next/dist/esm/server/route-modules/app-route/module.compiled\";\nimport { RouteKind } from \"next/dist/esm/server/route-kind\";\nimport { patchFetch as _patchFetch } from \"next/dist/esm/server/lib/patch-fetch\";\nimport { getRequestMeta } from \"next/dist/esm/server/request-meta\";\nimport { getTracer, SpanKind } from \"next/dist/esm/server/lib/trace/tracer\";\nimport { setReferenceManifestsSingleton } from \"next/dist/esm/server/app-render/encryption-utils\";\nimport { createServerModuleMap } from \"next/dist/esm/server/app-render/action-utils\";\nimport { normalizeAppPath } from \"next/dist/esm/shared/lib/router/utils/app-paths\";\nimport { NodeNextRequest, NodeNextResponse } from \"next/dist/esm/server/base-http/node\";\nimport { NextRequestAdapter, signalFromNodeResponse } from \"next/dist/esm/server/web/spec-extension/adapters/next-request\";\nimport { BaseServerSpan } from \"next/dist/esm/server/lib/trace/constants\";\nimport { getRevalidateReason } from \"next/dist/esm/server/instrumentation/utils\";\nimport { sendResponse } from \"next/dist/esm/server/send-response\";\nimport { fromNodeOutgoingHttpHeaders, toNodeOutgoingHttpHeaders } from \"next/dist/esm/server/web/utils\";\nimport { getCacheControlHeader } from \"next/dist/esm/server/lib/cache-control\";\nimport { INFINITE_CACHE, NEXT_CACHE_TAGS_HEADER } from \"next/dist/esm/lib/constants\";\nimport { NoFallbackError } from \"next/dist/esm/shared/lib/no-fallback-error.external\";\nimport { CachedRouteKind } from \"next/dist/esm/server/response-cache\";\nimport * as userland from \"INNER_APP_ROUTE\";\n// We inject the nextConfigOutput here so that we can use them in the route\n// module.\nconst nextConfigOutput = \"\"\nconst routeModule = new AppRouteRouteModule({\n definition: {\n kind: RouteKind.APP_ROUTE,\n page: \"/api/logs/stream/route\",\n pathname: \"/api/logs/stream\",\n filename: \"route\",\n bundlePath: \"\"\n },\n distDir: process.env.__NEXT_RELATIVE_DIST_DIR || '',\n relativeProjectDir: process.env.__NEXT_RELATIVE_PROJECT_DIR || '',\n resolvedPagePath: \"[project]/mcp-server/app/api/logs/stream/route.ts\",\n nextConfigOutput,\n userland\n});\n// Pull out the exports that we need to expose from the module. This should\n// be eliminated when we've moved the other routes to the new format. These\n// are used to hook into the route.\nconst { workAsyncStorage, workUnitAsyncStorage, serverHooks } = routeModule;\nfunction patchFetch() {\n return _patchFetch({\n workAsyncStorage,\n workUnitAsyncStorage\n });\n}\nexport { routeModule, workAsyncStorage, workUnitAsyncStorage, serverHooks, patchFetch, };\nexport async function handler(req, res, ctx) {\n var _nextConfig_experimental;\n let srcPage = \"/api/logs/stream/route\";\n // turbopack doesn't normalize `/index` in the page name\n // so we need to to process dynamic routes properly\n // TODO: fix turbopack providing differing value from webpack\n if (process.env.TURBOPACK) {\n srcPage = srcPage.replace(/\\/index$/, '') || '/';\n } else if (srcPage === '/index') {\n // we always normalize /index specifically\n srcPage = '/';\n }\n const multiZoneDraftMode = process.env.__NEXT_MULTI_ZONE_DRAFT_MODE;\n const prepareResult = await routeModule.prepare(req, res, {\n srcPage,\n multiZoneDraftMode\n });\n if (!prepareResult) {\n res.statusCode = 400;\n res.end('Bad Request');\n ctx.waitUntil == null ? void 0 : ctx.waitUntil.call(ctx, Promise.resolve());\n return null;\n }\n const { buildId, params, nextConfig, isDraftMode, prerenderManifest, routerServerContext, isOnDemandRevalidate, revalidateOnlyGenerated, resolvedPathname, clientReferenceManifest, serverActionsManifest } = prepareResult;\n const normalizedSrcPage = normalizeAppPath(srcPage);\n let isIsr = Boolean(prerenderManifest.dynamicRoutes[normalizedSrcPage] || prerenderManifest.routes[resolvedPathname]);\n if (isIsr && !isDraftMode) {\n const isPrerendered = Boolean(prerenderManifest.routes[resolvedPathname]);\n const prerenderInfo = prerenderManifest.dynamicRoutes[normalizedSrcPage];\n if (prerenderInfo) {\n if (prerenderInfo.fallback === false && !isPrerendered) {\n throw new NoFallbackError();\n }\n }\n }\n let cacheKey = null;\n if (isIsr && !routeModule.isDev && !isDraftMode) {\n cacheKey = resolvedPathname;\n // ensure /index and / is normalized to one key\n cacheKey = cacheKey === '/index' ? '/' : cacheKey;\n }\n const supportsDynamicResponse = // If we're in development, we always support dynamic HTML\n routeModule.isDev === true || // If this is not SSG or does not have static paths, then it supports\n // dynamic HTML.\n !isIsr;\n // This is a revalidation request if the request is for a static\n // page and it is not being resumed from a postponed render and\n // it is not a dynamic RSC request then it is a revalidation\n // request.\n const isStaticGeneration = isIsr && !supportsDynamicResponse;\n // Before rendering (which initializes component tree modules), we have to\n // set the reference manifests to our global store so Server Action's\n // encryption util can access to them at the top level of the page module.\n if (serverActionsManifest && clientReferenceManifest) {\n setReferenceManifestsSingleton({\n page: srcPage,\n clientReferenceManifest,\n serverActionsManifest,\n serverModuleMap: createServerModuleMap({\n serverActionsManifest\n })\n });\n }\n const method = req.method || 'GET';\n const tracer = getTracer();\n const activeSpan = tracer.getActiveScopeSpan();\n const context = {\n params,\n prerenderManifest,\n renderOpts: {\n experimental: {\n cacheComponents: Boolean(nextConfig.experimental.cacheComponents),\n authInterrupts: Boolean(nextConfig.experimental.authInterrupts)\n },\n supportsDynamicResponse,\n incrementalCache: getRequestMeta(req, 'incrementalCache'),\n cacheLifeProfiles: (_nextConfig_experimental = nextConfig.experimental) == null ? void 0 : _nextConfig_experimental.cacheLife,\n waitUntil: ctx.waitUntil,\n onClose: (cb)=>{\n res.on('close', cb);\n },\n onAfterTaskError: undefined,\n onInstrumentationRequestError: (error, _request, errorContext)=>routeModule.onRequestError(req, error, errorContext, routerServerContext)\n },\n sharedContext: {\n buildId\n }\n };\n const nodeNextReq = new NodeNextRequest(req);\n const nodeNextRes = new NodeNextResponse(res);\n const nextReq = NextRequestAdapter.fromNodeNextRequest(nodeNextReq, signalFromNodeResponse(res));\n try {\n const invokeRouteModule = async (span)=>{\n return routeModule.handle(nextReq, context).finally(()=>{\n if (!span) return;\n span.setAttributes({\n 'http.status_code': res.statusCode,\n 'next.rsc': false\n });\n const rootSpanAttributes = tracer.getRootSpanAttributes();\n // We were unable to get attributes, probably OTEL is not enabled\n if (!rootSpanAttributes) {\n return;\n }\n if (rootSpanAttributes.get('next.span_type') !== BaseServerSpan.handleRequest) {\n console.warn(`Unexpected root span type '${rootSpanAttributes.get('next.span_type')}'. Please report this Next.js issue https://github.com/vercel/next.js`);\n return;\n }\n const route = rootSpanAttributes.get('next.route');\n if (route) {\n const name = `${method} ${route}`;\n span.setAttributes({\n 'next.route': route,\n 'http.route': route,\n 'next.span_name': name\n });\n span.updateName(name);\n } else {\n span.updateName(`${method} ${srcPage}`);\n }\n });\n };\n const handleResponse = async (currentSpan)=>{\n var _cacheEntry_value;\n const responseGenerator = async ({ previousCacheEntry })=>{\n try {\n if (!getRequestMeta(req, 'minimalMode') && isOnDemandRevalidate && revalidateOnlyGenerated && !previousCacheEntry) {\n res.statusCode = 404;\n // on-demand revalidate always sets this header\n res.setHeader('x-nextjs-cache', 'REVALIDATED');\n res.end('This page could not be found');\n return null;\n }\n const response = await invokeRouteModule(currentSpan);\n req.fetchMetrics = context.renderOpts.fetchMetrics;\n let pendingWaitUntil = context.renderOpts.pendingWaitUntil;\n // Attempt using provided waitUntil if available\n // if it's not we fallback to sendResponse's handling\n if (pendingWaitUntil) {\n if (ctx.waitUntil) {\n ctx.waitUntil(pendingWaitUntil);\n pendingWaitUntil = undefined;\n }\n }\n const cacheTags = context.renderOpts.collectedTags;\n // If the request is for a static response, we can cache it so long\n // as it's not edge.\n if (isIsr) {\n const blob = await response.blob();\n // Copy the headers from the response.\n const headers = toNodeOutgoingHttpHeaders(response.headers);\n if (cacheTags) {\n headers[NEXT_CACHE_TAGS_HEADER] = cacheTags;\n }\n if (!headers['content-type'] && blob.type) {\n headers['content-type'] = blob.type;\n }\n const revalidate = typeof context.renderOpts.collectedRevalidate === 'undefined' || context.renderOpts.collectedRevalidate >= INFINITE_CACHE ? false : context.renderOpts.collectedRevalidate;\n const expire = typeof context.renderOpts.collectedExpire === 'undefined' || context.renderOpts.collectedExpire >= INFINITE_CACHE ? undefined : context.renderOpts.collectedExpire;\n // Create the cache entry for the response.\n const cacheEntry = {\n value: {\n kind: CachedRouteKind.APP_ROUTE,\n status: response.status,\n body: Buffer.from(await blob.arrayBuffer()),\n headers\n },\n cacheControl: {\n revalidate,\n expire\n }\n };\n return cacheEntry;\n } else {\n // send response without caching if not ISR\n await sendResponse(nodeNextReq, nodeNextRes, response, context.renderOpts.pendingWaitUntil);\n return null;\n }\n } catch (err) {\n // if this is a background revalidate we need to report\n // the request error here as it won't be bubbled\n if (previousCacheEntry == null ? void 0 : previousCacheEntry.isStale) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: srcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n }, routerServerContext);\n }\n throw err;\n }\n };\n const cacheEntry = await routeModule.handleResponse({\n req,\n nextConfig,\n cacheKey,\n routeKind: RouteKind.APP_ROUTE,\n isFallback: false,\n prerenderManifest,\n isRoutePPREnabled: false,\n isOnDemandRevalidate,\n revalidateOnlyGenerated,\n responseGenerator,\n waitUntil: ctx.waitUntil\n });\n // we don't create a cacheEntry for ISR\n if (!isIsr) {\n return null;\n }\n if ((cacheEntry == null ? void 0 : (_cacheEntry_value = cacheEntry.value) == null ? void 0 : _cacheEntry_value.kind) !== CachedRouteKind.APP_ROUTE) {\n var _cacheEntry_value1;\n throw Object.defineProperty(new Error(`Invariant: app-route received invalid cache entry ${cacheEntry == null ? void 0 : (_cacheEntry_value1 = cacheEntry.value) == null ? void 0 : _cacheEntry_value1.kind}`), \"__NEXT_ERROR_CODE\", {\n value: \"E701\",\n enumerable: false,\n configurable: true\n });\n }\n if (!getRequestMeta(req, 'minimalMode')) {\n res.setHeader('x-nextjs-cache', isOnDemandRevalidate ? 'REVALIDATED' : cacheEntry.isMiss ? 'MISS' : cacheEntry.isStale ? 'STALE' : 'HIT');\n }\n // Draft mode should never be cached\n if (isDraftMode) {\n res.setHeader('Cache-Control', 'private, no-cache, no-store, max-age=0, must-revalidate');\n }\n const headers = fromNodeOutgoingHttpHeaders(cacheEntry.value.headers);\n if (!(getRequestMeta(req, 'minimalMode') && isIsr)) {\n headers.delete(NEXT_CACHE_TAGS_HEADER);\n }\n // If cache control is already set on the response we don't\n // override it to allow users to customize it via next.config\n if (cacheEntry.cacheControl && !res.getHeader('Cache-Control') && !headers.get('Cache-Control')) {\n headers.set('Cache-Control', getCacheControlHeader(cacheEntry.cacheControl));\n }\n await sendResponse(nodeNextReq, nodeNextRes, // @ts-expect-error - Argument of type 'Buffer<ArrayBufferLike>' is not assignable to parameter of type 'BodyInit | null | undefined'.\n new Response(cacheEntry.value.body, {\n headers,\n status: cacheEntry.value.status || 200\n }));\n return null;\n };\n // TODO: activeSpan code path is for when wrapped by\n // next-server can be removed when this is no longer used\n if (activeSpan) {\n await handleResponse(activeSpan);\n } else {\n await tracer.withPropagatedContext(req.headers, ()=>tracer.trace(BaseServerSpan.handleRequest, {\n spanName: `${method} ${srcPage}`,\n kind: SpanKind.SERVER,\n attributes: {\n 'http.method': method,\n 'http.target': req.url\n }\n }, handleResponse));\n }\n } catch (err) {\n if (!(err instanceof NoFallbackError)) {\n await routeModule.onRequestError(req, err, {\n routerKind: 'App Router',\n routePath: normalizedSrcPage,\n routeType: 'route',\n revalidateReason: getRevalidateReason({\n isStaticGeneration,\n isOnDemandRevalidate\n })\n });\n }\n // rethrow so that we can handle serving error page\n // If this is during static generation, throw the error again.\n if (isIsr) throw err;\n // Otherwise, send a 500 response.\n await sendResponse(nodeNextReq, nodeNextRes, new Response(null, {\n status: 500\n }));\n return null;\n }\n}\n\n//# sourceMappingURL=app-route.js.map\n"],"names":[],"mappings":"u3BCAA,IAAA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,EAAA,CAAA,CAAA,OACA,EAAA,CAAA,CAAA,MAAA,IAAA,EAAA,EAAA,CAAA,CAAA,ODjBA,EAAA,EAAA,CAAA,CAAA,OAGO,eAAe,EAAI,CAAoB,EAC5C,GAAM,CAAE,cAAY,CAAE,CAAG,IAAI,IAAI,EAAQ,GAAG,EACtC,EAAU,EAAa,GAAG,CAAC,YAAc,QAAQ,GAAG,CAAC,aAAa,EAAI,kCAE5E,GAAI,CAAC,CAAA,EAAA,EAAA,UAAA,AAAU,EAAC,GACd,OADwB,AACjB,IAAI,SAAS,qBAAsB,CAAE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A,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAChC,IAAI,SAAS,EAAW,KAAK,CAAC,IAAI,CAAE,SAChC,EACA,OAAQ,EAAW,KAAK,CAAC,MAAM,EAAI,GACvC,IACO,IACX,EAGI,EACA,MAAM,EAAe,EADT,CAGZ,MAAM,EAAO,qBAAqB,CAAC,EAAI,OAAO,CAAE,IAAI,EAAO,KAAK,CAAC,EAAA,cAAc,CAAC,aAAa,CAAE,CACvF,SAAU,CAAA,EAAG,EAAO,CAAC,EAAE,EAAA,CAAS,CAChC,KAAM,EAAA,QAAQ,CAAC,MAAM,CACrB,WAAY,CACR,cAAe,EACf,cAAe,EAAI,GAAG,AAC1B,CACJ,EAAG,GAEf,CAAE,MAAO,EAAK,CAcV,GAbI,AAAE,CAAD,YAAgB,EAAA,eAAe,EAChC,CADmC,KAC7B,EAAY,cAAc,CAAC,EAAK,EAAK,CACvC,WAAY,aACZ,UAAW,EACX,UAAW,QACX,iBAAkB,CAAA,EAAA,EAAA,mBAAA,AAAmB,EAAC,oBAClC,uBACA,CACJ,EACJ,GAIA,EAAO,MAAM,EAKjB,OAHA,MAAM,CAAA,EAAA,EAAA,YAAA,AAAY,EAAC,EAAa,EAAa,IAAI,SAAS,KAAM,CAC5D,OAAQ,GACZ,IACO,IACX,CACJ,EAEA,qCAAqC","ignoreList":[1]}
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
module.exports=[18622,(e,t,r)=>{t.exports=e.x("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js",()=>require("next/dist/compiled/next-server/app-page-turbo.runtime.prod.js"))},56704,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-async-storage.external.js",()=>require("next/dist/server/app-render/work-async-storage.external.js"))},32319,(e,t,r)=>{t.exports=e.x("next/dist/server/app-render/work-unit-async-storage.external.js",()=>require("next/dist/server/app-render/work-unit-async-storage.external.js"))},70406,(e,t,r)=>{t.exports=e.x("next/dist/compiled/@opentelemetry/api",()=>require("next/dist/compiled/@opentelemetry/api"))},14747,(e,t,r)=>{t.exports=e.x("path",()=>require("path"))},93695,(e,t,r)=>{t.exports=e.x("next/dist/shared/lib/no-fallback-error.external.js",()=>require("next/dist/shared/lib/no-fallback-error.external.js"))},22734,(e,t,r)=>{t.exports=e.x("fs",()=>require("fs"))},89752,e=>{"use strict";var t=e.i(63366),r=e.i(66479),n=e.i(31453),o=e.i(85632),a=e.i(34686),s=e.i(32730),i=e.i(71352),l=e.i(48381),d=e.i(98354),p=e.i(21545),u=e.i(49921),c=e.i(51588),h=e.i(31827),x=e.i(23126),R=e.i(99612),g=e.i(47511),v=e.i(93695);e.i(1956);var w=e.i(70569),A=e.i(22734),C=e.i(14747);async function m(e){try{let{entry:t,source:r}=await e.json();if(!t)return Response.json({error:"Log entry is required"},{status:400,headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type"}});let n=process.env.LOG_FILE_PATH||"./ai-dev-tools/consolidated.log",o=(0,C.dirname)(n);(0,A.existsSync)(o)||(0,A.mkdirSync)(o,{recursive:!0});let a=`${t}
|
|
2
|
-
`;return(0,A.appendFileSync)(n,a,"utf-8"),Response.json({success:!0,message:"Log entry appended",source:r||"unknown"},{headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type"}})}catch(e){return console.error("Failed to append log:",e),Response.json({error:e instanceof Error?e.message:"Unknown error"},{status:500,headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type"}})}}async function f(){return new Response(null,{status:200,headers:{"Access-Control-Allow-Origin":"*","Access-Control-Allow-Methods":"POST, OPTIONS","Access-Control-Allow-Headers":"Content-Type"}})}e.s(["OPTIONS",()=>f,"POST",()=>m],2996);var y=e.i(2996);let E=new t.AppRouteRouteModule({definition:{kind:r.RouteKind.APP_ROUTE,page:"/api/logs/append/route",pathname:"/api/logs/append",filename:"route",bundlePath:""},distDir:".next",relativeProjectDir:"",resolvedPagePath:"[project]/mcp-server/app/api/logs/append/route.ts",nextConfigOutput:"",userland:y}),{workAsyncStorage:O,workUnitAsyncStorage:T,serverHooks:P}=E;function S(){return(0,n.patchFetch)({workAsyncStorage:O,workUnitAsyncStorage:T})}async function N(e,t,n){var A;let C="/api/logs/append/route";C=C.replace(/\/index$/,"")||"/";let m=await E.prepare(e,t,{srcPage:C,multiZoneDraftMode:!1});if(!m)return t.statusCode=400,t.end("Bad Request"),null==n.waitUntil||n.waitUntil.call(n,Promise.resolve()),null;let{buildId:f,params:y,nextConfig:O,isDraftMode:T,prerenderManifest:P,routerServerContext:S,isOnDemandRevalidate:N,revalidateOnlyGenerated:b,resolvedPathname:M,clientReferenceManifest:k,serverActionsManifest:q}=m,H=(0,l.normalizeAppPath)(C),_=!!(P.dynamicRoutes[H]||P.routes[M]);if(_&&!T){let e=!!P.routes[M],t=P.dynamicRoutes[H];if(t&&!1===t.fallback&&!e)throw new v.NoFallbackError}let I=null;!_||E.isDev||T||(I="/index"===(I=M)?"/":I);let j=!0===E.isDev||!_,U=_&&!j;q&&k&&(0,s.setReferenceManifestsSingleton)({page:C,clientReferenceManifest:k,serverActionsManifest:q,serverModuleMap:(0,i.createServerModuleMap)({serverActionsManifest:q})});let D=e.method||"GET",F=(0,a.getTracer)(),$=F.getActiveScopeSpan(),L={params:y,prerenderManifest:P,renderOpts:{experimental:{cacheComponents:!!O.experimental.cacheComponents,authInterrupts:!!O.experimental.authInterrupts},supportsDynamicResponse:j,incrementalCache:(0,o.getRequestMeta)(e,"incrementalCache"),cacheLifeProfiles:null==(A=O.experimental)?void 0:A.cacheLife,waitUntil:n.waitUntil,onClose:e=>{t.on("close",e)},onAfterTaskError:void 0,onInstrumentationRequestError:(t,r,n)=>E.onRequestError(e,t,n,S)},sharedContext:{buildId:f}},K=new d.NodeNextRequest(e),B=new d.NodeNextResponse(t),G=p.NextRequestAdapter.fromNodeNextRequest(K,(0,p.signalFromNodeResponse)(t));try{let s=async e=>E.handle(G,L).finally(()=>{if(!e)return;e.setAttributes({"http.status_code":t.statusCode,"next.rsc":!1});let r=F.getRootSpanAttributes();if(!r)return;if(r.get("next.span_type")!==u.BaseServerSpan.handleRequest)return void console.warn(`Unexpected root span type '${r.get("next.span_type")}'. Please report this Next.js issue https://github.com/vercel/next.js`);let n=r.get("next.route");if(n){let t=`${D} ${n}`;e.setAttributes({"next.route":n,"http.route":n,"next.span_name":t}),e.updateName(t)}else e.updateName(`${D} ${C}`)}),i=async a=>{var i,l;let d=async({previousCacheEntry:r})=>{try{if(!(0,o.getRequestMeta)(e,"minimalMode")&&N&&b&&!r)return t.statusCode=404,t.setHeader("x-nextjs-cache","REVALIDATED"),t.end("This page could not be found"),null;let i=await s(a);e.fetchMetrics=L.renderOpts.fetchMetrics;let l=L.renderOpts.pendingWaitUntil;l&&n.waitUntil&&(n.waitUntil(l),l=void 0);let d=L.renderOpts.collectedTags;if(!_)return await (0,h.sendResponse)(K,B,i,L.renderOpts.pendingWaitUntil),null;{let e=await i.blob(),t=(0,x.toNodeOutgoingHttpHeaders)(i.headers);d&&(t[g.NEXT_CACHE_TAGS_HEADER]=d),!t["content-type"]&&e.type&&(t["content-type"]=e.type);let r=void 0!==L.renderOpts.collectedRevalidate&&!(L.renderOpts.collectedRevalidate>=g.INFINITE_CACHE)&&L.renderOpts.collectedRevalidate,n=void 0===L.renderOpts.collectedExpire||L.renderOpts.collectedExpire>=g.INFINITE_CACHE?void 0:L.renderOpts.collectedExpire;return{value:{kind:w.CachedRouteKind.APP_ROUTE,status:i.status,body:Buffer.from(await e.arrayBuffer()),headers:t},cacheControl:{revalidate:r,expire:n}}}}catch(t){throw(null==r?void 0:r.isStale)&&await E.onRequestError(e,t,{routerKind:"App Router",routePath:C,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:N})},S),t}},p=await E.handleResponse({req:e,nextConfig:O,cacheKey:I,routeKind:r.RouteKind.APP_ROUTE,isFallback:!1,prerenderManifest:P,isRoutePPREnabled:!1,isOnDemandRevalidate:N,revalidateOnlyGenerated:b,responseGenerator:d,waitUntil:n.waitUntil});if(!_)return null;if((null==p||null==(i=p.value)?void 0:i.kind)!==w.CachedRouteKind.APP_ROUTE)throw Object.defineProperty(Error(`Invariant: app-route received invalid cache entry ${null==p||null==(l=p.value)?void 0:l.kind}`),"__NEXT_ERROR_CODE",{value:"E701",enumerable:!1,configurable:!0});(0,o.getRequestMeta)(e,"minimalMode")||t.setHeader("x-nextjs-cache",N?"REVALIDATED":p.isMiss?"MISS":p.isStale?"STALE":"HIT"),T&&t.setHeader("Cache-Control","private, no-cache, no-store, max-age=0, must-revalidate");let u=(0,x.fromNodeOutgoingHttpHeaders)(p.value.headers);return(0,o.getRequestMeta)(e,"minimalMode")&&_||u.delete(g.NEXT_CACHE_TAGS_HEADER),!p.cacheControl||t.getHeader("Cache-Control")||u.get("Cache-Control")||u.set("Cache-Control",(0,R.getCacheControlHeader)(p.cacheControl)),await (0,h.sendResponse)(K,B,new Response(p.value.body,{headers:u,status:p.value.status||200})),null};$?await i($):await F.withPropagatedContext(e.headers,()=>F.trace(u.BaseServerSpan.handleRequest,{spanName:`${D} ${C}`,kind:a.SpanKind.SERVER,attributes:{"http.method":D,"http.target":e.url}},i))}catch(t){if(t instanceof v.NoFallbackError||await E.onRequestError(e,t,{routerKind:"App Router",routePath:H,routeType:"route",revalidateReason:(0,c.getRevalidateReason)({isStaticGeneration:U,isOnDemandRevalidate:N})}),_)throw t;return await (0,h.sendResponse)(K,B,new Response(null,{status:500})),null}}e.s(["handler",()=>N,"patchFetch",()=>S,"routeModule",()=>E,"serverHooks",()=>P,"workAsyncStorage",()=>O,"workUnitAsyncStorage",()=>T],89752)}];
|
|
3
|
-
|
|
4
|
-
//# sourceMappingURL=%5Broot-of-the-server%5D__8fc8f497._.js.map
|