@tyroneross/navgator 0.1.1 โ 0.2.1
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/index.js +201 -10
- package/dist/cli/index.js.map +1 -1
- package/dist/diagram.d.ts.map +1 -1
- package/dist/diagram.js +33 -0
- package/dist/diagram.js.map +1 -1
- package/dist/scanner.d.ts +2 -0
- package/dist/scanner.d.ts.map +1 -1
- package/dist/scanner.js +131 -12
- package/dist/scanner.js.map +1 -1
- package/dist/scanners/connections/ast-scanner.d.ts.map +1 -1
- package/dist/scanners/connections/ast-scanner.js +0 -3
- package/dist/scanners/connections/ast-scanner.js.map +1 -1
- package/dist/scanners/connections/llm-call-tracer.d.ts +83 -0
- package/dist/scanners/connections/llm-call-tracer.d.ts.map +1 -0
- package/dist/scanners/connections/llm-call-tracer.js +801 -0
- package/dist/scanners/connections/llm-call-tracer.js.map +1 -0
- package/dist/scanners/connections/service-calls.d.ts.map +1 -1
- package/dist/scanners/connections/service-calls.js +44 -47
- package/dist/scanners/connections/service-calls.js.map +1 -1
- package/dist/scanners/infrastructure/index.d.ts.map +1 -1
- package/dist/scanners/infrastructure/index.js +34 -4
- package/dist/scanners/infrastructure/index.js.map +1 -1
- package/dist/scanners/packages/swift.d.ts +14 -0
- package/dist/scanners/packages/swift.d.ts.map +1 -0
- package/dist/scanners/packages/swift.js +320 -0
- package/dist/scanners/packages/swift.js.map +1 -0
- package/dist/scanners/prompts/detector.d.ts +16 -0
- package/dist/scanners/prompts/detector.d.ts.map +1 -1
- package/dist/scanners/prompts/detector.js +90 -1
- package/dist/scanners/prompts/detector.js.map +1 -1
- package/dist/scanners/prompts/types.d.ts +4 -0
- package/dist/scanners/prompts/types.d.ts.map +1 -1
- package/dist/scanners/prompts/types.js.map +1 -1
- package/dist/scanners/swift/code-scanner.d.ts +14 -0
- package/dist/scanners/swift/code-scanner.d.ts.map +1 -0
- package/dist/scanners/swift/code-scanner.js +803 -0
- package/dist/scanners/swift/code-scanner.js.map +1 -0
- package/dist/storage.d.ts +2 -2
- package/dist/storage.d.ts.map +1 -1
- package/dist/storage.js +41 -2
- package/dist/storage.js.map +1 -1
- package/dist/types.d.ts +26 -2
- package/dist/types.d.ts.map +1 -1
- package/dist/types.js.map +1 -1
- package/dist/ui-server.d.ts +7 -7
- package/dist/ui-server.d.ts.map +1 -1
- package/dist/ui-server.js +80 -792
- package/dist/ui-server.js.map +1 -1
- package/package.json +15 -9
- package/web/.next/standalone/web/.next/BUILD_ID +1 -0
- package/web/.next/standalone/web/.next/app-path-routes-manifest.json +13 -0
- package/web/.next/standalone/web/.next/build-manifest.json +20 -0
- package/web/.next/standalone/web/.next/package.json +1 -0
- package/web/.next/standalone/web/.next/prerender-manifest.json +88 -0
- package/web/.next/standalone/web/.next/required-server-files.json +317 -0
- package/web/.next/standalone/web/.next/routes-manifest.json +110 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page/build-manifest.json +17 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page/next-font-manifest.json +6 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page/react-loadable-manifest.json +1 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page.js +10 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/_global-error/page_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.html +2 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.meta +15 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.rsc +12 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/__PAGE__.segment.rsc +5 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_full.segment.rsc +12 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_head.segment.rsc +7 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_index.segment.rsc +4 -0
- package/web/.next/standalone/web/.next/server/app/_global-error.segments/_tree.segment.rsc +1 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page/build-manifest.json +17 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page/next-font-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page/react-loadable-manifest.json +1 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page.js +13 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/_not-found/page_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.html +1 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.meta +16 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.rsc +17 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_full.segment.rsc +17 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_head.segment.rsc +8 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_index.segment.rsc +8 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found/__PAGE__.segment.rsc +5 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_not-found.segment.rsc +4 -0
- package/web/.next/standalone/web/.next/server/app/_not-found.segments/_tree.segment.rsc +3 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/components/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/connections/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/graph/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/projects/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route.js +7 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/prompts/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/scan/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/settings/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route/build-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route.js +6 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/api/status/route_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app/index.html +1 -0
- package/web/.next/standalone/web/.next/server/app/index.meta +14 -0
- package/web/.next/standalone/web/.next/server/app/index.rsc +23 -0
- package/web/.next/standalone/web/.next/server/app/index.segments/__PAGE__.segment.rsc +9 -0
- package/web/.next/standalone/web/.next/server/app/index.segments/_full.segment.rsc +23 -0
- package/web/.next/standalone/web/.next/server/app/index.segments/_head.segment.rsc +8 -0
- package/web/.next/standalone/web/.next/server/app/index.segments/_index.segment.rsc +8 -0
- package/web/.next/standalone/web/.next/server/app/index.segments/_tree.segment.rsc +5 -0
- package/web/.next/standalone/web/.next/server/app/page/app-paths-manifest.json +3 -0
- package/web/.next/standalone/web/.next/server/app/page/build-manifest.json +17 -0
- package/web/.next/standalone/web/.next/server/app/page/next-font-manifest.json +11 -0
- package/web/.next/standalone/web/.next/server/app/page/react-loadable-manifest.json +1 -0
- package/web/.next/standalone/web/.next/server/app/page/server-reference-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/app/page.js +15 -0
- package/web/.next/standalone/web/.next/server/app/page.js.map +5 -0
- package/web/.next/standalone/web/.next/server/app/page.js.nft.json +1 -0
- package/web/.next/standalone/web/.next/server/app/page_client-reference-manifest.js +2 -0
- package/web/.next/standalone/web/.next/server/app-paths-manifest.json +13 -0
- package/web/.next/standalone/web/.next/server/chunks/2374f_next_dist_esm_build_templates_app-route_0bb4e66a.js +19 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__006b837d._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__1ab91221._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__2e09fec9._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__38d0390f._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__539ef30d._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__594bcf20._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__b888fadf._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__f3450c22._.js +21 -0
- package/web/.next/standalone/web/.next/server/chunks/[root-of-the-server]__fa2ec862._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/[turbopack]_runtime.js +770 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_e6039567._.js +6 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_09351209._.js +6 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_222be7ae._.js +6 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_2346e1b3._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_cec86455._.js +4 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_client_components_9c5d1a14._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_client_components_builtin_forbidden_8eae0c85.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_client_components_builtin_global-error_81159d60.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_client_components_builtin_unauthorized_7d34a31c.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_e03afa0e._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_esm_build_templates_app-page_2c8d71b9.js +4 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/2374f_next_dist_server_route-modules_app-page_vendored_ssr_react-dom_8910f04c.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__1a0663e6._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__4306eafc._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__44903626._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__60278e3f._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__61942f24._.js +4 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__8c45c3c9._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__9a2f110d._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__ed07bd88._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[root-of-the-server]__f2db61af._.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/[turbopack]_runtime.js +770 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_0103e631._.js +4 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web_171de0df._.js +14 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app__global-error_page_actions_2a1e94d4.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app__not-found_page_actions_9eaa9845.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/ssr/web__next-internal_server_app_page_actions_ec26bf28.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_components_route_actions_c88bf2a6.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_connections_route_actions_b1d5e95a.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_graph_route_actions_e2dd052c.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_projects_route_actions_3f671cbb.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_prompts_route_actions_85b56166.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_scan_route_actions_861cde8d.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_settings_route_actions_e19026ae.js +3 -0
- package/web/.next/standalone/web/.next/server/chunks/web__next-internal_server_app_api_status_route_actions_8b8c6c89.js +3 -0
- package/web/.next/standalone/web/.next/server/functions-config-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/middleware-build-manifest.js +21 -0
- package/web/.next/standalone/web/.next/server/middleware-manifest.json +6 -0
- package/web/.next/standalone/web/.next/server/next-font-manifest.js +1 -0
- package/web/.next/standalone/web/.next/server/next-font-manifest.json +15 -0
- package/web/.next/standalone/web/.next/server/pages/404.html +1 -0
- package/web/.next/standalone/web/.next/server/pages/500.html +2 -0
- package/web/.next/standalone/web/.next/server/pages-manifest.json +4 -0
- package/web/.next/standalone/web/.next/server/server-reference-manifest.js +1 -0
- package/web/.next/standalone/web/.next/server/server-reference-manifest.json +5 -0
- package/web/.next/standalone/web/.next/static/WH0NvTGUEDs9QVUjcPJKx/_buildManifest.js +11 -0
- package/web/.next/standalone/web/.next/static/WH0NvTGUEDs9QVUjcPJKx/_clientMiddlewareManifest.json +1 -0
- package/web/.next/standalone/web/.next/static/WH0NvTGUEDs9QVUjcPJKx/_ssgManifest.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/062ae79751df2759.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/159889e17b2cf1f8.js +2 -0
- package/web/.next/standalone/web/.next/static/chunks/458d6f37339fc069.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/6d3d39425a878d7f.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/8a80e7184ad3a13f.css +2 -0
- package/web/.next/standalone/web/.next/static/chunks/a6dad97d9634a72d.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/c056475f5f4424b6.css +1 -0
- package/web/.next/standalone/web/.next/static/chunks/c57fee8cce8d7cb9.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/cb3513192b63e480.js +12 -0
- package/web/.next/standalone/web/.next/static/chunks/dd22b5f2beb2cc31.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/e0affeef0ddb9a97.js +4 -0
- package/web/.next/standalone/web/.next/static/chunks/f74a6859e1c4d5e3.js +1 -0
- package/web/.next/standalone/web/.next/static/chunks/turbopack-c0c89f9e6f0a38c4.js +3 -0
- package/web/.next/standalone/web/.next/static/media/4fa387ec64143e14-s.c1fdd6c2.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/7178b3e590c64307-s.b97b3418.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/797e433ab948586e-s.p.dbea232f.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/8a480f0b521d4e75-s.8e0177b5.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/bbc41e54d2fcbd21-s.799d8ef8.woff2 +0 -0
- package/web/.next/standalone/web/.next/static/media/caa3a2e1cccd8315-s.p.853070df.woff2 +0 -0
- package/web/.next/standalone/web/app/api/components/route.ts +252 -0
- package/web/.next/standalone/web/app/api/connections/route.ts +319 -0
- package/web/.next/standalone/web/app/api/graph/route.ts +235 -0
- package/web/.next/standalone/web/app/api/projects/route.ts +221 -0
- package/web/.next/standalone/web/app/api/prompts/route.ts +328 -0
- package/web/.next/standalone/web/app/api/scan/route.ts +108 -0
- package/web/.next/standalone/web/app/api/settings/route.ts +198 -0
- package/web/.next/standalone/web/app/api/status/route.ts +169 -0
- package/web/.next/standalone/web/app/globals.css +99 -0
- package/web/.next/standalone/web/app/layout.tsx +49 -0
- package/web/.next/standalone/web/app/page.tsx +94 -0
- package/web/.next/standalone/web/components/components-panel.tsx +240 -0
- package/web/.next/standalone/web/components/connections-panel.tsx +220 -0
- package/web/.next/standalone/web/components/diagram-view.tsx +735 -0
- package/web/.next/standalone/web/components/header.tsx +225 -0
- package/web/.next/standalone/web/components/impact-analysis.tsx +358 -0
- package/web/.next/standalone/web/components/llm-tracking-panel.tsx +1483 -0
- package/web/.next/standalone/web/components/settings-panel.tsx +671 -0
- package/web/.next/standalone/web/components/sidebar.tsx +74 -0
- package/web/.next/standalone/web/components/status-overview.tsx +326 -0
- package/web/.next/standalone/web/components/theme-provider.tsx +11 -0
- package/web/.next/standalone/web/components/ui/accordion.tsx +66 -0
- package/web/.next/standalone/web/components/ui/alert-dialog.tsx +157 -0
- package/web/.next/standalone/web/components/ui/alert.tsx +66 -0
- package/web/.next/standalone/web/components/ui/aspect-ratio.tsx +11 -0
- package/web/.next/standalone/web/components/ui/avatar.tsx +53 -0
- package/web/.next/standalone/web/components/ui/badge.tsx +46 -0
- package/web/.next/standalone/web/components/ui/breadcrumb.tsx +109 -0
- package/web/.next/standalone/web/components/ui/button-group.tsx +83 -0
- package/web/.next/standalone/web/components/ui/button.tsx +60 -0
- package/web/.next/standalone/web/components/ui/calendar.tsx +213 -0
- package/web/.next/standalone/web/components/ui/card.tsx +92 -0
- package/web/.next/standalone/web/components/ui/carousel.tsx +241 -0
- package/web/.next/standalone/web/components/ui/chart.tsx +353 -0
- package/web/.next/standalone/web/components/ui/checkbox.tsx +32 -0
- package/web/.next/standalone/web/components/ui/collapsible.tsx +33 -0
- package/web/.next/standalone/web/components/ui/command.tsx +184 -0
- package/web/.next/standalone/web/components/ui/context-menu.tsx +252 -0
- package/web/.next/standalone/web/components/ui/dialog.tsx +143 -0
- package/web/.next/standalone/web/components/ui/drawer.tsx +135 -0
- package/web/.next/standalone/web/components/ui/dropdown-menu.tsx +257 -0
- package/web/.next/standalone/web/components/ui/empty.tsx +104 -0
- package/web/.next/standalone/web/components/ui/field.tsx +244 -0
- package/web/.next/standalone/web/components/ui/form.tsx +167 -0
- package/web/.next/standalone/web/components/ui/hover-card.tsx +44 -0
- package/web/.next/standalone/web/components/ui/input-group.tsx +169 -0
- package/web/.next/standalone/web/components/ui/input-otp.tsx +77 -0
- package/web/.next/standalone/web/components/ui/input.tsx +21 -0
- package/web/.next/standalone/web/components/ui/item.tsx +193 -0
- package/web/.next/standalone/web/components/ui/kbd.tsx +28 -0
- package/web/.next/standalone/web/components/ui/label.tsx +24 -0
- package/web/.next/standalone/web/components/ui/menubar.tsx +276 -0
- package/web/.next/standalone/web/components/ui/navigation-menu.tsx +166 -0
- package/web/.next/standalone/web/components/ui/pagination.tsx +127 -0
- package/web/.next/standalone/web/components/ui/popover.tsx +48 -0
- package/web/.next/standalone/web/components/ui/progress.tsx +31 -0
- package/web/.next/standalone/web/components/ui/radio-group.tsx +45 -0
- package/web/.next/standalone/web/components/ui/resizable.tsx +56 -0
- package/web/.next/standalone/web/components/ui/scroll-area.tsx +58 -0
- package/web/.next/standalone/web/components/ui/select.tsx +185 -0
- package/web/.next/standalone/web/components/ui/separator.tsx +28 -0
- package/web/.next/standalone/web/components/ui/sheet.tsx +139 -0
- package/web/.next/standalone/web/components/ui/sidebar.tsx +726 -0
- package/web/.next/standalone/web/components/ui/skeleton.tsx +13 -0
- package/web/.next/standalone/web/components/ui/slider.tsx +63 -0
- package/web/.next/standalone/web/components/ui/sonner.tsx +25 -0
- package/web/.next/standalone/web/components/ui/spinner.tsx +16 -0
- package/web/.next/standalone/web/components/ui/switch.tsx +31 -0
- package/web/.next/standalone/web/components/ui/table.tsx +116 -0
- package/web/.next/standalone/web/components/ui/tabs.tsx +66 -0
- package/web/.next/standalone/web/components/ui/textarea.tsx +18 -0
- package/web/.next/standalone/web/components/ui/toast.tsx +129 -0
- package/web/.next/standalone/web/components/ui/toaster.tsx +35 -0
- package/web/.next/standalone/web/components/ui/toggle-group.tsx +73 -0
- package/web/.next/standalone/web/components/ui/toggle.tsx +47 -0
- package/web/.next/standalone/web/components/ui/tooltip.tsx +61 -0
- package/web/.next/standalone/web/components/ui/use-mobile.tsx +19 -0
- package/web/.next/standalone/web/components/ui/use-toast.ts +191 -0
- package/web/.next/standalone/web/components.json +21 -0
- package/web/.next/standalone/web/hooks/use-mobile.ts +19 -0
- package/web/.next/standalone/web/hooks/use-toast.ts +191 -0
- package/web/.next/standalone/web/lib/hooks/index.ts +8 -0
- package/web/.next/standalone/web/lib/hooks/use-components.ts +83 -0
- package/web/.next/standalone/web/lib/hooks/use-connections.ts +83 -0
- package/web/.next/standalone/web/lib/hooks/use-projects.ts +116 -0
- package/web/.next/standalone/web/lib/hooks/use-prompts.ts +122 -0
- package/web/.next/standalone/web/lib/hooks/use-settings.ts +135 -0
- package/web/.next/standalone/web/lib/hooks/use-status.ts +80 -0
- package/web/.next/standalone/web/lib/project-context.tsx +46 -0
- package/web/.next/standalone/web/lib/transform.ts +625 -0
- package/web/.next/standalone/web/lib/types.ts +198 -0
- package/web/.next/standalone/web/lib/utils.ts +6 -0
- package/web/.next/standalone/web/next.config.mjs +12 -0
- package/web/.next/standalone/web/package-lock.json +3987 -0
- package/web/.next/standalone/web/package.json +73 -0
- package/web/.next/standalone/web/pnpm-lock.yaml +5 -0
- package/web/.next/standalone/web/postcss.config.mjs +8 -0
- package/web/.next/standalone/web/public/apple-icon.png +0 -0
- package/web/.next/standalone/web/public/icon-dark-32x32.png +0 -0
- package/web/.next/standalone/web/public/icon-light-32x32.png +0 -0
- package/web/.next/standalone/web/public/icon.svg +26 -0
- package/web/.next/standalone/web/public/navgator-logo.png +0 -0
- package/web/.next/standalone/web/public/placeholder-logo.png +0 -0
- package/web/.next/standalone/web/public/placeholder-logo.svg +1 -0
- package/web/.next/standalone/web/public/placeholder-user.jpg +0 -0
- package/web/.next/standalone/web/public/placeholder.jpg +0 -0
- package/web/.next/standalone/web/public/placeholder.svg +1 -0
- package/web/.next/standalone/web/public/public/apple-icon.png +0 -0
- package/web/.next/standalone/web/public/public/icon-dark-32x32.png +0 -0
- package/web/.next/standalone/web/public/public/icon-light-32x32.png +0 -0
- package/web/.next/standalone/web/public/public/icon.svg +26 -0
- package/web/.next/standalone/web/public/public/navgator-logo.png +0 -0
- package/web/.next/standalone/web/public/public/placeholder-logo.png +0 -0
- package/web/.next/standalone/web/public/public/placeholder-logo.svg +1 -0
- package/web/.next/standalone/web/public/public/placeholder-user.jpg +0 -0
- package/web/.next/standalone/web/public/public/placeholder.jpg +0 -0
- package/web/.next/standalone/web/public/public/placeholder.svg +1 -0
- package/web/.next/standalone/web/server.js +38 -0
- package/web/.next/standalone/web/styles/globals.css +125 -0
- package/web/.next/standalone/web/tsconfig.json +41 -0
- package/web/.next/static/WH0NvTGUEDs9QVUjcPJKx/_buildManifest.js +11 -0
- package/web/.next/static/WH0NvTGUEDs9QVUjcPJKx/_clientMiddlewareManifest.json +1 -0
- package/web/.next/static/WH0NvTGUEDs9QVUjcPJKx/_ssgManifest.js +1 -0
- package/web/.next/static/chunks/062ae79751df2759.js +1 -0
- package/web/.next/static/chunks/159889e17b2cf1f8.js +2 -0
- package/web/.next/static/chunks/458d6f37339fc069.js +1 -0
- package/web/.next/static/chunks/6d3d39425a878d7f.js +1 -0
- package/web/.next/static/chunks/8a80e7184ad3a13f.css +2 -0
- package/web/.next/static/chunks/a6dad97d9634a72d.js +1 -0
- package/web/.next/static/chunks/c056475f5f4424b6.css +1 -0
- package/web/.next/static/chunks/c57fee8cce8d7cb9.js +1 -0
- package/web/.next/static/chunks/cb3513192b63e480.js +12 -0
- package/web/.next/static/chunks/dd22b5f2beb2cc31.js +1 -0
- package/web/.next/static/chunks/e0affeef0ddb9a97.js +4 -0
- package/web/.next/static/chunks/f74a6859e1c4d5e3.js +1 -0
- package/web/.next/static/chunks/turbopack-c0c89f9e6f0a38c4.js +3 -0
- package/web/.next/static/media/4fa387ec64143e14-s.c1fdd6c2.woff2 +0 -0
- package/web/.next/static/media/7178b3e590c64307-s.b97b3418.woff2 +0 -0
- package/web/.next/static/media/797e433ab948586e-s.p.dbea232f.woff2 +0 -0
- package/web/.next/static/media/8a480f0b521d4e75-s.8e0177b5.woff2 +0 -0
- package/web/.next/static/media/bbc41e54d2fcbd21-s.799d8ef8.woff2 +0 -0
- package/web/.next/static/media/caa3a2e1cccd8315-s.p.853070df.woff2 +0 -0
- package/web/public/apple-icon.png +0 -0
- package/web/public/icon-dark-32x32.png +0 -0
- package/web/public/icon-light-32x32.png +0 -0
- package/web/public/icon.svg +26 -0
- package/web/public/navgator-logo.png +0 -0
- package/web/public/placeholder-logo.png +0 -0
- package/web/public/placeholder-logo.svg +1 -0
- package/web/public/placeholder-user.jpg +0 -0
- package/web/public/placeholder.jpg +0 -0
- package/web/public/placeholder.svg +1 -0
package/dist/ui-server.js
CHANGED
|
@@ -1,815 +1,103 @@
|
|
|
1
1
|
/**
|
|
2
|
-
* NavGator UI Server
|
|
3
|
-
*
|
|
4
|
-
*
|
|
2
|
+
* NavGator UI Server (DISABLED)
|
|
3
|
+
*
|
|
4
|
+
* The built-in vanilla HTML dashboard has been replaced by the Next.js web app.
|
|
5
|
+
* Use `navgator ui` to launch the full dashboard.
|
|
6
|
+
*
|
|
7
|
+
* This file is kept as a stub so existing imports don't break.
|
|
5
8
|
*/
|
|
9
|
+
export async function startUIServer(_options) {
|
|
10
|
+
throw new Error('The built-in UI server has been replaced by the Next.js dashboard.\n' +
|
|
11
|
+
'Run `navgator ui` to launch the full dashboard.');
|
|
12
|
+
}
|
|
13
|
+
// =============================================================================
|
|
14
|
+
// ORIGINAL IMPLEMENTATION (disabled, not deleted)
|
|
15
|
+
// =============================================================================
|
|
16
|
+
/*
|
|
6
17
|
import * as http from 'http';
|
|
7
18
|
import { loadIndex, loadAllComponents, loadAllConnections, loadGraph } from './storage.js';
|
|
8
19
|
import { getConfig } from './config.js';
|
|
9
|
-
const DEFAULT_PORT = 3333;
|
|
10
|
-
/**
|
|
11
|
-
* Start the UI server
|
|
12
|
-
*/
|
|
13
|
-
export async function startUIServer(options) {
|
|
14
|
-
const port = options.port || DEFAULT_PORT;
|
|
15
|
-
const projectPath = options.projectPath || process.cwd();
|
|
16
|
-
const config = getConfig();
|
|
17
|
-
const server = http.createServer(async (req, res) => {
|
|
18
|
-
const url = new URL(req.url || '/', `http://localhost:${port}`);
|
|
19
|
-
// CORS headers
|
|
20
|
-
res.setHeader('Access-Control-Allow-Origin', '*');
|
|
21
|
-
res.setHeader('Access-Control-Allow-Methods', 'GET, OPTIONS');
|
|
22
|
-
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
|
|
23
|
-
if (req.method === 'OPTIONS') {
|
|
24
|
-
res.writeHead(200);
|
|
25
|
-
res.end();
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
try {
|
|
29
|
-
// API endpoints - all return REAL data from scans
|
|
30
|
-
if (url.pathname === '/api/status') {
|
|
31
|
-
const index = await loadIndex(config, projectPath);
|
|
32
|
-
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
33
|
-
res.end(JSON.stringify(index || { error: 'No scan data. Run: navgator setup' }));
|
|
34
|
-
return;
|
|
35
|
-
}
|
|
36
|
-
if (url.pathname === '/api/components') {
|
|
37
|
-
const components = await loadAllComponents(config, projectPath);
|
|
38
|
-
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
39
|
-
res.end(JSON.stringify(components));
|
|
40
|
-
return;
|
|
41
|
-
}
|
|
42
|
-
if (url.pathname === '/api/connections') {
|
|
43
|
-
const connections = await loadAllConnections(config, projectPath);
|
|
44
|
-
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
45
|
-
res.end(JSON.stringify(connections));
|
|
46
|
-
return;
|
|
47
|
-
}
|
|
48
|
-
if (url.pathname === '/api/graph') {
|
|
49
|
-
const graph = await loadGraph(config, projectPath);
|
|
50
|
-
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
51
|
-
res.end(JSON.stringify(graph || { nodes: [], edges: [] }));
|
|
52
|
-
return;
|
|
53
|
-
}
|
|
54
|
-
// Serve dashboard HTML
|
|
55
|
-
if (url.pathname === '/' || url.pathname === '/index.html') {
|
|
56
|
-
res.writeHead(200, { 'Content-Type': 'text/html' });
|
|
57
|
-
res.end(generateDashboardHTML(projectPath));
|
|
58
|
-
return;
|
|
59
|
-
}
|
|
60
|
-
// 404
|
|
61
|
-
res.writeHead(404, { 'Content-Type': 'text/plain' });
|
|
62
|
-
res.end('Not Found');
|
|
63
|
-
}
|
|
64
|
-
catch (error) {
|
|
65
|
-
res.writeHead(500, { 'Content-Type': 'application/json' });
|
|
66
|
-
res.end(JSON.stringify({ error: String(error) }));
|
|
67
|
-
}
|
|
68
|
-
});
|
|
69
|
-
return new Promise((resolve) => {
|
|
70
|
-
server.listen(port, () => {
|
|
71
|
-
resolve({
|
|
72
|
-
port,
|
|
73
|
-
close: () => server.close(),
|
|
74
|
-
});
|
|
75
|
-
});
|
|
76
|
-
});
|
|
77
|
-
}
|
|
78
|
-
/**
|
|
79
|
-
* Generate the dashboard HTML - fully functional, real data only
|
|
80
|
-
*/
|
|
81
|
-
function generateDashboardHTML(projectPath) {
|
|
82
|
-
return `<!DOCTYPE html>
|
|
83
|
-
<html lang="en">
|
|
84
|
-
<head>
|
|
85
|
-
<meta charset="UTF-8">
|
|
86
|
-
<meta name="viewport" content="width=device-width, initial-scale=1.0">
|
|
87
|
-
<title>NavGator Dashboard</title>
|
|
88
|
-
<style>
|
|
89
|
-
* { box-sizing: border-box; margin: 0; padding: 0; }
|
|
90
|
-
body {
|
|
91
|
-
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
|
|
92
|
-
background: #0a0a0a;
|
|
93
|
-
color: #e5e5e5;
|
|
94
|
-
min-height: 100vh;
|
|
95
|
-
}
|
|
96
|
-
.header {
|
|
97
|
-
background: #171717;
|
|
98
|
-
border-bottom: 1px solid #262626;
|
|
99
|
-
padding: 12px 24px;
|
|
100
|
-
display: flex;
|
|
101
|
-
align-items: center;
|
|
102
|
-
gap: 12px;
|
|
103
|
-
position: sticky;
|
|
104
|
-
top: 0;
|
|
105
|
-
z-index: 100;
|
|
106
|
-
}
|
|
107
|
-
.header h1 {
|
|
108
|
-
font-size: 18px;
|
|
109
|
-
font-weight: 600;
|
|
110
|
-
display: flex;
|
|
111
|
-
align-items: center;
|
|
112
|
-
gap: 8px;
|
|
113
|
-
}
|
|
114
|
-
.nav {
|
|
115
|
-
display: flex;
|
|
116
|
-
gap: 4px;
|
|
117
|
-
margin-left: 32px;
|
|
118
|
-
}
|
|
119
|
-
/* IBR-style buttons: min 44px touch targets, clear hierarchy */
|
|
120
|
-
.nav-btn {
|
|
121
|
-
background: transparent;
|
|
122
|
-
border: none;
|
|
123
|
-
color: #737373;
|
|
124
|
-
padding: 8px 16px;
|
|
125
|
-
border-radius: 6px;
|
|
126
|
-
cursor: pointer;
|
|
127
|
-
font-size: 14px;
|
|
128
|
-
font-weight: 500;
|
|
129
|
-
transition: all 0.15s;
|
|
130
|
-
min-height: 36px;
|
|
131
|
-
min-width: 44px;
|
|
132
|
-
}
|
|
133
|
-
.nav-btn:hover { color: #e5e5e5; background: #262626; }
|
|
134
|
-
.nav-btn.active { color: #22c55e; background: transparent; border-bottom: 2px solid #22c55e; border-radius: 0; }
|
|
135
|
-
.header-right {
|
|
136
|
-
margin-left: auto;
|
|
137
|
-
display: flex;
|
|
138
|
-
align-items: center;
|
|
139
|
-
gap: 12px;
|
|
140
|
-
}
|
|
141
|
-
.search-box {
|
|
142
|
-
background: #262626;
|
|
143
|
-
border: 1px solid #404040;
|
|
144
|
-
color: #e5e5e5;
|
|
145
|
-
padding: 8px 12px;
|
|
146
|
-
border-radius: 6px;
|
|
147
|
-
font-size: 14px;
|
|
148
|
-
width: 240px;
|
|
149
|
-
}
|
|
150
|
-
.search-box:focus { outline: none; border-color: #22c55e; }
|
|
151
|
-
.refresh-btn {
|
|
152
|
-
background: #262626;
|
|
153
|
-
border: 1px solid #404040;
|
|
154
|
-
color: #e5e5e5;
|
|
155
|
-
padding: 8px 16px;
|
|
156
|
-
border-radius: 6px;
|
|
157
|
-
cursor: pointer;
|
|
158
|
-
font-size: 14px;
|
|
159
|
-
}
|
|
160
|
-
.refresh-btn:hover { background: #333; }
|
|
161
|
-
.container { max-width: 1400px; margin: 0 auto; padding: 24px; }
|
|
162
|
-
.grid {
|
|
163
|
-
display: grid;
|
|
164
|
-
grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
|
|
165
|
-
gap: 16px;
|
|
166
|
-
margin-bottom: 24px;
|
|
167
|
-
}
|
|
168
|
-
.card {
|
|
169
|
-
background: #171717;
|
|
170
|
-
border: 1px solid #262626;
|
|
171
|
-
border-radius: 8px;
|
|
172
|
-
padding: 20px;
|
|
173
|
-
}
|
|
174
|
-
.card h2 {
|
|
175
|
-
font-size: 12px;
|
|
176
|
-
font-weight: 500;
|
|
177
|
-
color: #737373;
|
|
178
|
-
margin-bottom: 8px;
|
|
179
|
-
text-transform: uppercase;
|
|
180
|
-
letter-spacing: 0.5px;
|
|
181
|
-
}
|
|
182
|
-
.stat { font-size: 32px; font-weight: 700; color: #22c55e; }
|
|
183
|
-
.stat-label { font-size: 13px; color: #525252; margin-top: 4px; }
|
|
184
|
-
.list { list-style: none; }
|
|
185
|
-
.list li {
|
|
186
|
-
padding: 10px 0;
|
|
187
|
-
border-bottom: 1px solid #262626;
|
|
188
|
-
display: flex;
|
|
189
|
-
justify-content: space-between;
|
|
190
|
-
align-items: center;
|
|
191
|
-
cursor: pointer;
|
|
192
|
-
transition: background 0.1s;
|
|
193
|
-
margin: 0 -20px;
|
|
194
|
-
padding-left: 20px;
|
|
195
|
-
padding-right: 20px;
|
|
196
|
-
}
|
|
197
|
-
.list li:hover { background: #1f1f1f; }
|
|
198
|
-
.list li:last-child { border-bottom: none; }
|
|
199
|
-
/* IBR-style badges: text color only (Calm Precision) */
|
|
200
|
-
.badge {
|
|
201
|
-
font-size: 12px;
|
|
202
|
-
font-weight: 500;
|
|
203
|
-
padding: 2px 0;
|
|
204
|
-
}
|
|
205
|
-
.badge.npm { color: #a78bfa; }
|
|
206
|
-
.badge.service { color: #60a5fa; }
|
|
207
|
-
.badge.database { color: #4ade80; }
|
|
208
|
-
.badge.queue { color: #fbbf24; }
|
|
209
|
-
.badge.infra { color: #f472b6; }
|
|
210
|
-
.badge.prompt { color: #22d3ee; }
|
|
211
|
-
.badge.llm { color: #f472b6; font-weight: 600; }
|
|
212
|
-
.badge.framework { color: #818cf8; }
|
|
213
|
-
/* Count badges need subtle background for tap target */
|
|
214
|
-
.badge-count {
|
|
215
|
-
background: #262626;
|
|
216
|
-
padding: 3px 10px;
|
|
217
|
-
border-radius: 4px;
|
|
218
|
-
font-size: 12px;
|
|
219
|
-
color: #a3a3a3;
|
|
220
|
-
font-weight: 500;
|
|
221
|
-
}
|
|
222
|
-
.section { margin-bottom: 24px; }
|
|
223
|
-
.section-header {
|
|
224
|
-
display: flex;
|
|
225
|
-
align-items: center;
|
|
226
|
-
justify-content: space-between;
|
|
227
|
-
margin-bottom: 16px;
|
|
228
|
-
}
|
|
229
|
-
.section-title { font-size: 16px; font-weight: 600; }
|
|
230
|
-
.filter-group { display: flex; gap: 8px; }
|
|
231
|
-
.filter-btn {
|
|
232
|
-
background: #262626;
|
|
233
|
-
border: 1px solid #333;
|
|
234
|
-
color: #a3a3a3;
|
|
235
|
-
padding: 6px 12px;
|
|
236
|
-
border-radius: 4px;
|
|
237
|
-
cursor: pointer;
|
|
238
|
-
font-size: 12px;
|
|
239
|
-
}
|
|
240
|
-
.filter-btn:hover, .filter-btn.active { background: #333; color: #e5e5e5; }
|
|
241
|
-
.table { width: 100%; border-collapse: collapse; }
|
|
242
|
-
.table th, .table td { text-align: left; padding: 12px 16px; border-bottom: 1px solid #262626; }
|
|
243
|
-
.table th { color: #525252; font-weight: 500; font-size: 11px; text-transform: uppercase; background: #0f0f0f; position: sticky; top: 0; }
|
|
244
|
-
.table tr { cursor: pointer; transition: background 0.1s; }
|
|
245
|
-
.table tr:hover td { background: #1a1a1a; }
|
|
246
|
-
.table-wrapper { max-height: 500px; overflow-y: auto; border-radius: 8px; border: 1px solid #262626; }
|
|
247
|
-
.loading, .empty { text-align: center; padding: 60px 20px; color: #525252; }
|
|
248
|
-
.empty h2 { color: #737373; margin-bottom: 12px; }
|
|
249
|
-
.empty code { background: #262626; padding: 4px 12px; border-radius: 4px; font-family: monospace; color: #22c55e; }
|
|
250
|
-
.file-path { font-family: 'SF Mono', Monaco, monospace; font-size: 12px; color: #a3a3a3; }
|
|
251
|
-
.code-snippet { font-family: 'SF Mono', Monaco, monospace; font-size: 11px; color: #525252; max-width: 300px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
252
|
-
.detail-panel {
|
|
253
|
-
position: fixed;
|
|
254
|
-
top: 0;
|
|
255
|
-
right: 0;
|
|
256
|
-
width: 480px;
|
|
257
|
-
height: 100vh;
|
|
258
|
-
background: #171717;
|
|
259
|
-
border-left: 1px solid #262626;
|
|
260
|
-
transform: translateX(100%);
|
|
261
|
-
transition: transform 0.2s ease;
|
|
262
|
-
z-index: 200;
|
|
263
|
-
overflow-y: auto;
|
|
264
|
-
}
|
|
265
|
-
.detail-panel.open { transform: translateX(0); }
|
|
266
|
-
.detail-header {
|
|
267
|
-
padding: 20px;
|
|
268
|
-
border-bottom: 1px solid #262626;
|
|
269
|
-
display: flex;
|
|
270
|
-
align-items: center;
|
|
271
|
-
justify-content: space-between;
|
|
272
|
-
position: sticky;
|
|
273
|
-
top: 0;
|
|
274
|
-
background: #171717;
|
|
275
|
-
}
|
|
276
|
-
.detail-header h3 { font-size: 16px; font-weight: 600; }
|
|
277
|
-
.close-btn {
|
|
278
|
-
background: none;
|
|
279
|
-
border: none;
|
|
280
|
-
color: #737373;
|
|
281
|
-
font-size: 24px;
|
|
282
|
-
cursor: pointer;
|
|
283
|
-
padding: 4px 8px;
|
|
284
|
-
}
|
|
285
|
-
.close-btn:hover { color: #e5e5e5; }
|
|
286
|
-
.detail-content { padding: 20px; }
|
|
287
|
-
.detail-section { margin-bottom: 24px; }
|
|
288
|
-
.detail-section h4 { font-size: 12px; color: #525252; text-transform: uppercase; margin-bottom: 12px; }
|
|
289
|
-
.detail-item { padding: 12px; background: #0f0f0f; border-radius: 6px; margin-bottom: 8px; }
|
|
290
|
-
.detail-item .label { font-size: 11px; color: #525252; margin-bottom: 4px; }
|
|
291
|
-
.detail-item .value { font-size: 14px; color: #e5e5e5; }
|
|
292
|
-
.connection-item {
|
|
293
|
-
padding: 12px;
|
|
294
|
-
background: #0f0f0f;
|
|
295
|
-
border-radius: 6px;
|
|
296
|
-
margin-bottom: 8px;
|
|
297
|
-
border-left: 3px solid #22c55e;
|
|
298
|
-
}
|
|
299
|
-
.connection-item.incoming { border-left-color: #3b82f6; }
|
|
300
|
-
.connection-item.llm { border-left-color: #f472b6; }
|
|
301
|
-
.connection-item .file { font-family: monospace; font-size: 12px; color: #a3a3a3; }
|
|
302
|
-
.connection-item .type { font-size: 11px; color: #525252; margin-top: 4px; }
|
|
303
|
-
/* Code block styling for showing actual code */
|
|
304
|
-
.code-block {
|
|
305
|
-
background: #0a0a0a;
|
|
306
|
-
border: 1px solid #262626;
|
|
307
|
-
border-radius: 4px;
|
|
308
|
-
padding: 8px 12px;
|
|
309
|
-
margin-top: 8px;
|
|
310
|
-
font-family: 'SF Mono', Monaco, 'Fira Code', monospace;
|
|
311
|
-
font-size: 11px;
|
|
312
|
-
line-height: 1.5;
|
|
313
|
-
color: #a3a3a3;
|
|
314
|
-
overflow-x: auto;
|
|
315
|
-
white-space: pre-wrap;
|
|
316
|
-
word-break: break-word;
|
|
317
|
-
}
|
|
318
|
-
.code-block .line-num { color: #525252; margin-right: 12px; user-select: none; }
|
|
319
|
-
.code-block .keyword { color: #c678dd; }
|
|
320
|
-
.code-block .string { color: #98c379; }
|
|
321
|
-
.code-block .function { color: #61afef; }
|
|
322
|
-
.hidden { display: none; }
|
|
323
|
-
.project-path { font-size: 12px; color: #525252; margin-left: 8px; font-family: monospace; }
|
|
324
|
-
@media (max-width: 768px) {
|
|
325
|
-
.nav { display: none; }
|
|
326
|
-
.search-box { width: 160px; }
|
|
327
|
-
.detail-panel { width: 100%; }
|
|
328
|
-
}
|
|
329
|
-
</style>
|
|
330
|
-
</head>
|
|
331
|
-
<body>
|
|
332
|
-
<div class="header">
|
|
333
|
-
<h1>๐ NavGator</h1>
|
|
334
|
-
<span class="project-path">${projectPath}</span>
|
|
335
|
-
<nav class="nav">
|
|
336
|
-
<button class="nav-btn active" data-view="overview">Overview</button>
|
|
337
|
-
<button class="nav-btn" data-view="components">Components</button>
|
|
338
|
-
<button class="nav-btn" data-view="connections">Connections</button>
|
|
339
|
-
<button class="nav-btn" data-view="impact">Impact</button>
|
|
340
|
-
</nav>
|
|
341
|
-
<div class="header-right">
|
|
342
|
-
<input type="text" class="search-box" placeholder="Search components..." id="searchInput">
|
|
343
|
-
<button class="refresh-btn" onclick="loadData()">โป Refresh</button>
|
|
344
|
-
</div>
|
|
345
|
-
</div>
|
|
346
|
-
|
|
347
|
-
<div class="container">
|
|
348
|
-
<div id="content"><div class="loading">Loading architecture data...</div></div>
|
|
349
|
-
</div>
|
|
350
|
-
|
|
351
|
-
<div class="detail-panel" id="detailPanel">
|
|
352
|
-
<div class="detail-header">
|
|
353
|
-
<h3 id="detailTitle">Component Details</h3>
|
|
354
|
-
<button class="close-btn" onclick="closeDetail()">ร</button>
|
|
355
|
-
</div>
|
|
356
|
-
<div class="detail-content" id="detailContent"></div>
|
|
357
|
-
</div>
|
|
358
|
-
|
|
359
|
-
<script>
|
|
360
|
-
let components = [];
|
|
361
|
-
let connections = [];
|
|
362
|
-
let status = {};
|
|
363
|
-
let currentView = 'overview';
|
|
364
|
-
let selectedComponent = null;
|
|
365
|
-
let searchQuery = '';
|
|
366
|
-
let typeFilter = 'all';
|
|
367
|
-
|
|
368
|
-
// Navigation
|
|
369
|
-
document.querySelectorAll('.nav-btn').forEach(btn => {
|
|
370
|
-
btn.addEventListener('click', () => {
|
|
371
|
-
document.querySelectorAll('.nav-btn').forEach(b => b.classList.remove('active'));
|
|
372
|
-
btn.classList.add('active');
|
|
373
|
-
currentView = btn.dataset.view;
|
|
374
|
-
render();
|
|
375
|
-
});
|
|
376
|
-
});
|
|
377
|
-
|
|
378
|
-
// Search
|
|
379
|
-
document.getElementById('searchInput').addEventListener('input', (e) => {
|
|
380
|
-
searchQuery = e.target.value.toLowerCase();
|
|
381
|
-
render();
|
|
382
|
-
});
|
|
383
|
-
|
|
384
|
-
// Load data from API (REAL data only)
|
|
385
|
-
async function loadData() {
|
|
386
|
-
const content = document.getElementById('content');
|
|
387
|
-
content.innerHTML = '<div class="loading">Loading...</div>';
|
|
388
|
-
|
|
389
|
-
try {
|
|
390
|
-
const [statusRes, componentsRes, connectionsRes] = await Promise.all([
|
|
391
|
-
fetch('/api/status'),
|
|
392
|
-
fetch('/api/components'),
|
|
393
|
-
fetch('/api/connections'),
|
|
394
|
-
]);
|
|
395
|
-
|
|
396
|
-
status = await statusRes.json();
|
|
397
|
-
components = await componentsRes.json();
|
|
398
|
-
connections = await connectionsRes.json();
|
|
399
20
|
|
|
400
|
-
|
|
401
|
-
content.innerHTML = \`
|
|
402
|
-
<div class="empty">
|
|
403
|
-
<h2>No Architecture Data</h2>
|
|
404
|
-
<p>Run <code>navgator setup</code> to scan this project.</p>
|
|
405
|
-
</div>
|
|
406
|
-
\`;
|
|
407
|
-
return;
|
|
408
|
-
}
|
|
21
|
+
const DEFAULT_PORT = 3333;
|
|
409
22
|
|
|
410
|
-
|
|
411
|
-
|
|
412
|
-
|
|
23
|
+
export async function startUIServer(options: {
|
|
24
|
+
port?: number;
|
|
25
|
+
projectPath?: string;
|
|
26
|
+
open?: boolean;
|
|
27
|
+
}): Promise<{ port: number; close: () => void }> {
|
|
28
|
+
const port = options.port || DEFAULT_PORT;
|
|
29
|
+
const projectPath = options.projectPath || process.cwd();
|
|
30
|
+
const config = getConfig();
|
|
31
|
+
|
|
32
|
+
const server = http.createServer(async (req, res) => {
|
|
33
|
+
const url = new URL(req.url || '/', `http://localhost:${port}`);
|
|
34
|
+
|
|
35
|
+
res.setHeader('Access-Control-Allow-Origin', '*');
|
|
36
|
+
res.setHeader('Access-Control-Allow-Methods', 'GET, OPTIONS');
|
|
37
|
+
res.setHeader('Access-Control-Allow-Headers', 'Content-Type');
|
|
38
|
+
|
|
39
|
+
if (req.method === 'OPTIONS') {
|
|
40
|
+
res.writeHead(200);
|
|
41
|
+
res.end();
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
try {
|
|
46
|
+
if (url.pathname === '/api/status') {
|
|
47
|
+
const index = await loadIndex(config, projectPath);
|
|
48
|
+
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
49
|
+
res.end(JSON.stringify(index || { error: 'No scan data. Run: navgator setup' }));
|
|
50
|
+
return;
|
|
413
51
|
}
|
|
414
|
-
}
|
|
415
|
-
|
|
416
|
-
// Render current view
|
|
417
|
-
function render() {
|
|
418
|
-
const content = document.getElementById('content');
|
|
419
52
|
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
53
|
+
if (url.pathname === '/api/components') {
|
|
54
|
+
const components = await loadAllComponents(config, projectPath);
|
|
55
|
+
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
56
|
+
res.end(JSON.stringify(components));
|
|
57
|
+
return;
|
|
425
58
|
}
|
|
426
59
|
|
|
427
|
-
|
|
428
|
-
|
|
429
|
-
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
btn.addEventListener('click', () => {
|
|
433
|
-
typeFilter = btn.dataset.type;
|
|
434
|
-
document.querySelectorAll('.filter-btn').forEach(b => b.classList.remove('active'));
|
|
435
|
-
btn.classList.add('active');
|
|
436
|
-
render();
|
|
437
|
-
});
|
|
438
|
-
});
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
// Overview view
|
|
442
|
-
function renderOverview() {
|
|
443
|
-
const byType = {};
|
|
444
|
-
components.forEach(c => { byType[c.type] = (byType[c.type] || 0) + 1; });
|
|
445
|
-
|
|
446
|
-
const connByType = {};
|
|
447
|
-
connections.forEach(c => { connByType[c.connection_type] = (connByType[c.connection_type] || 0) + 1; });
|
|
448
|
-
|
|
449
|
-
const lastScan = status.last_scan ? new Date(status.last_scan).toLocaleString() : 'Never';
|
|
450
|
-
|
|
451
|
-
// Sort types to show LLM prominently
|
|
452
|
-
const typeOrder = ['llm', 'database', 'queue', 'framework', 'infra', 'service', 'npm', 'prompt'];
|
|
453
|
-
const sortedTypes = Object.entries(byType).sort((a, b) => {
|
|
454
|
-
const aIdx = typeOrder.indexOf(a[0]);
|
|
455
|
-
const bIdx = typeOrder.indexOf(b[0]);
|
|
456
|
-
if (aIdx === -1 && bIdx === -1) return b[1] - a[1];
|
|
457
|
-
if (aIdx === -1) return 1;
|
|
458
|
-
if (bIdx === -1) return -1;
|
|
459
|
-
return aIdx - bIdx;
|
|
460
|
-
});
|
|
461
|
-
|
|
462
|
-
return \`
|
|
463
|
-
<div class="grid">
|
|
464
|
-
<div class="card">
|
|
465
|
-
<h2>Components</h2>
|
|
466
|
-
<div class="stat">\${components.length}</div>
|
|
467
|
-
<div class="stat-label">Tracked in this project</div>
|
|
468
|
-
</div>
|
|
469
|
-
<div class="card">
|
|
470
|
-
<h2>Connections</h2>
|
|
471
|
-
<div class="stat">\${connections.length}</div>
|
|
472
|
-
<div class="stat-label">Mapped relationships</div>
|
|
473
|
-
</div>
|
|
474
|
-
<div class="card">
|
|
475
|
-
<h2>Last Scan</h2>
|
|
476
|
-
<div class="stat" style="font-size: 16px; color: #e5e5e5;">\${lastScan}</div>
|
|
477
|
-
<div class="stat-label">Run navgator scan to refresh</div>
|
|
478
|
-
</div>
|
|
479
|
-
</div>
|
|
480
|
-
<div class="grid">
|
|
481
|
-
<div class="card">
|
|
482
|
-
<h2>Components by Type</h2>
|
|
483
|
-
<ul class="list">
|
|
484
|
-
\${sortedTypes.map(([type, count]) => \`
|
|
485
|
-
<li data-filter="\${type}" style="cursor: pointer;">
|
|
486
|
-
<span class="badge \${type}" style="font-size: 14px;">\${type === 'llm' ? '๐ค LLM/AI' : type}</span>
|
|
487
|
-
<span class="badge-count">\${count}</span>
|
|
488
|
-
</li>
|
|
489
|
-
\`).join('')}
|
|
490
|
-
</ul>
|
|
491
|
-
</div>
|
|
492
|
-
<div class="card">
|
|
493
|
-
<h2>Connections by Type</h2>
|
|
494
|
-
<ul class="list">
|
|
495
|
-
\${Object.entries(connByType).sort((a,b) => b[1] - a[1]).map(([type, count]) => \`
|
|
496
|
-
<li><span>\${type.replace(/-/g, ' ')}</span><span class="badge-count">\${count}</span></li>
|
|
497
|
-
\`).join('')}
|
|
498
|
-
</ul>
|
|
499
|
-
</div>
|
|
500
|
-
<div class="card">
|
|
501
|
-
<h2>Quick Actions</h2>
|
|
502
|
-
<ul class="list">
|
|
503
|
-
<li onclick="currentView='components';document.querySelector('[data-view=components]').click()">
|
|
504
|
-
<span>Browse all components</span><span>โ</span>
|
|
505
|
-
</li>
|
|
506
|
-
<li onclick="currentView='connections';document.querySelector('[data-view=connections]').click()">
|
|
507
|
-
<span>View connections</span><span>โ</span>
|
|
508
|
-
</li>
|
|
509
|
-
<li onclick="currentView='impact';document.querySelector('[data-view=impact]').click()">
|
|
510
|
-
<span>Impact analysis</span><span>โ</span>
|
|
511
|
-
</li>
|
|
512
|
-
</ul>
|
|
513
|
-
</div>
|
|
514
|
-
</div>
|
|
515
|
-
\`;
|
|
516
|
-
}
|
|
517
|
-
|
|
518
|
-
// Components view
|
|
519
|
-
function renderComponents() {
|
|
520
|
-
const types = [...new Set(components.map(c => c.type))];
|
|
521
|
-
let filtered = components;
|
|
522
|
-
|
|
523
|
-
if (searchQuery) {
|
|
524
|
-
filtered = filtered.filter(c =>
|
|
525
|
-
c.name.toLowerCase().includes(searchQuery) ||
|
|
526
|
-
c.type.toLowerCase().includes(searchQuery) ||
|
|
527
|
-
(c.role?.purpose || '').toLowerCase().includes(searchQuery)
|
|
528
|
-
);
|
|
529
|
-
}
|
|
530
|
-
if (typeFilter !== 'all') {
|
|
531
|
-
filtered = filtered.filter(c => c.type === typeFilter);
|
|
60
|
+
if (url.pathname === '/api/connections') {
|
|
61
|
+
const connections = await loadAllConnections(config, projectPath);
|
|
62
|
+
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
63
|
+
res.end(JSON.stringify(connections));
|
|
64
|
+
return;
|
|
532
65
|
}
|
|
533
66
|
|
|
534
|
-
|
|
535
|
-
|
|
536
|
-
|
|
537
|
-
|
|
538
|
-
|
|
539
|
-
<button class="filter-btn \${typeFilter === 'all' ? 'active' : ''}" data-type="all">All</button>
|
|
540
|
-
\${types.map(t => \`<button class="filter-btn \${typeFilter === t ? 'active' : ''}" data-type="\${t}">\${t}</button>\`).join('')}
|
|
541
|
-
</div>
|
|
542
|
-
</div>
|
|
543
|
-
<div class="table-wrapper">
|
|
544
|
-
<table class="table">
|
|
545
|
-
<thead>
|
|
546
|
-
<tr>
|
|
547
|
-
<th>Name</th>
|
|
548
|
-
<th>Type</th>
|
|
549
|
-
<th>Layer</th>
|
|
550
|
-
<th>Version</th>
|
|
551
|
-
<th>Purpose</th>
|
|
552
|
-
<th>Connections</th>
|
|
553
|
-
</tr>
|
|
554
|
-
</thead>
|
|
555
|
-
<tbody>
|
|
556
|
-
\${filtered.map(c => {
|
|
557
|
-
const connCount = connections.filter(conn =>
|
|
558
|
-
conn.to?.component_id === c.component_id ||
|
|
559
|
-
conn.from?.component_id === c.component_id
|
|
560
|
-
).length;
|
|
561
|
-
return \`
|
|
562
|
-
<tr data-component="\${c.component_id}">
|
|
563
|
-
<td><strong>\${c.name}</strong></td>
|
|
564
|
-
<td><span class="badge \${c.type}">\${c.type === 'llm' ? '๐ค LLM' : c.type}</span></td>
|
|
565
|
-
<td>\${c.role?.layer || '-'}</td>
|
|
566
|
-
<td>\${c.version || '-'}</td>
|
|
567
|
-
<td style="color: #737373; font-size: 13px;">\${c.role?.purpose || '-'}</td>
|
|
568
|
-
<td><span class="badge-count">\${connCount}</span></td>
|
|
569
|
-
</tr>
|
|
570
|
-
\`;
|
|
571
|
-
}).join('')}
|
|
572
|
-
</tbody>
|
|
573
|
-
</table>
|
|
574
|
-
</div>
|
|
575
|
-
</div>
|
|
576
|
-
\`;
|
|
577
|
-
}
|
|
578
|
-
|
|
579
|
-
// Connections view
|
|
580
|
-
function renderConnections() {
|
|
581
|
-
let filtered = connections;
|
|
582
|
-
|
|
583
|
-
if (searchQuery) {
|
|
584
|
-
filtered = filtered.filter(c =>
|
|
585
|
-
(c.code_reference?.file || '').toLowerCase().includes(searchQuery) ||
|
|
586
|
-
(c.to?.component_id || '').toLowerCase().includes(searchQuery) ||
|
|
587
|
-
(c.connection_type || '').toLowerCase().includes(searchQuery)
|
|
588
|
-
);
|
|
67
|
+
if (url.pathname === '/api/graph') {
|
|
68
|
+
const graph = await loadGraph(config, projectPath);
|
|
69
|
+
res.writeHead(200, { 'Content-Type': 'application/json' });
|
|
70
|
+
res.end(JSON.stringify(graph || { nodes: [], edges: [] }));
|
|
71
|
+
return;
|
|
589
72
|
}
|
|
590
73
|
|
|
591
|
-
|
|
592
|
-
|
|
593
|
-
|
|
594
|
-
|
|
595
|
-
</div>
|
|
596
|
-
<div class="table-wrapper">
|
|
597
|
-
<table class="table">
|
|
598
|
-
<thead>
|
|
599
|
-
<tr>
|
|
600
|
-
<th>File</th>
|
|
601
|
-
<th>Line</th>
|
|
602
|
-
<th>Type</th>
|
|
603
|
-
<th>Target</th>
|
|
604
|
-
<th>Code</th>
|
|
605
|
-
</tr>
|
|
606
|
-
</thead>
|
|
607
|
-
<tbody>
|
|
608
|
-
\${filtered.slice(0, 100).map(c => {
|
|
609
|
-
const target = components.find(comp => comp.component_id === c.to?.component_id);
|
|
610
|
-
return \`
|
|
611
|
-
<tr>
|
|
612
|
-
<td class="file-path">\${c.code_reference?.file || '-'}</td>
|
|
613
|
-
<td>\${c.code_reference?.line_start || '-'}</td>
|
|
614
|
-
<td><span class="badge">\${c.connection_type}</span></td>
|
|
615
|
-
<td>\${target?.name || c.to?.component_id?.replace('COMP_', '') || '-'}</td>
|
|
616
|
-
<td class="code-snippet">\${c.code_reference?.code_snippet || '-'}</td>
|
|
617
|
-
</tr>
|
|
618
|
-
\`;
|
|
619
|
-
}).join('')}
|
|
620
|
-
</tbody>
|
|
621
|
-
</table>
|
|
622
|
-
\${filtered.length > 100 ? '<p style="padding: 16px; color: #525252; text-align: center;">Showing 100 of ' + filtered.length + ' connections</p>' : ''}
|
|
623
|
-
</div>
|
|
624
|
-
</div>
|
|
625
|
-
\`;
|
|
626
|
-
}
|
|
627
|
-
|
|
628
|
-
// Impact view
|
|
629
|
-
function renderImpact() {
|
|
630
|
-
if (!selectedComponent) {
|
|
631
|
-
return \`
|
|
632
|
-
<div class="section">
|
|
633
|
-
<div class="section-header">
|
|
634
|
-
<div class="section-title">Impact Analysis</div>
|
|
635
|
-
</div>
|
|
636
|
-
<div class="card">
|
|
637
|
-
<p style="color: #737373; text-align: center; padding: 40px;">
|
|
638
|
-
Select a component to see what would be affected if you change it.
|
|
639
|
-
</p>
|
|
640
|
-
<div class="grid" style="margin-top: 20px;">
|
|
641
|
-
\${components.slice(0, 12).map(c => \`
|
|
642
|
-
<div class="detail-item" style="cursor: pointer;" onclick="selectForImpact('\${c.component_id}')">
|
|
643
|
-
<div class="value">\${c.name}</div>
|
|
644
|
-
<div class="label">\${c.type} ยท \${c.role?.layer || 'unknown'}</div>
|
|
645
|
-
</div>
|
|
646
|
-
\`).join('')}
|
|
647
|
-
</div>
|
|
648
|
-
</div>
|
|
649
|
-
</div>
|
|
650
|
-
\`;
|
|
74
|
+
if (url.pathname === '/' || url.pathname === '/index.html') {
|
|
75
|
+
res.writeHead(200, { 'Content-Type': 'text/html' });
|
|
76
|
+
res.end(generateDashboardHTML(projectPath));
|
|
77
|
+
return;
|
|
651
78
|
}
|
|
652
79
|
|
|
653
|
-
|
|
654
|
-
|
|
655
|
-
|
|
656
|
-
|
|
657
|
-
|
|
658
|
-
<div class="section">
|
|
659
|
-
<div class="section-header">
|
|
660
|
-
<div class="section-title">Impact Analysis: \${comp?.name || selectedComponent}</div>
|
|
661
|
-
<button class="filter-btn" onclick="selectedComponent=null;render()">โ Back</button>
|
|
662
|
-
</div>
|
|
663
|
-
|
|
664
|
-
<div class="grid">
|
|
665
|
-
<div class="card">
|
|
666
|
-
<h2>Incoming (\${incoming.length})</h2>
|
|
667
|
-
<p style="color: #525252; font-size: 13px; margin-bottom: 16px;">These files USE this component</p>
|
|
668
|
-
\${incoming.length === 0 ? '<p style="color: #404040;">No incoming connections</p>' : ''}
|
|
669
|
-
\${incoming.slice(0, 20).map(c => \`
|
|
670
|
-
<div class="connection-item incoming">
|
|
671
|
-
<div class="file">\${c.code_reference?.file}:\${c.code_reference?.line_start}</div>
|
|
672
|
-
<div class="type">\${c.connection_type} ยท \${c.code_reference?.symbol || ''}</div>
|
|
673
|
-
</div>
|
|
674
|
-
\`).join('')}
|
|
675
|
-
\${incoming.length > 20 ? '<p style="color: #525252; margin-top: 12px;">+ ' + (incoming.length - 20) + ' more</p>' : ''}
|
|
676
|
-
</div>
|
|
677
|
-
|
|
678
|
-
<div class="card">
|
|
679
|
-
<h2>Outgoing (\${outgoing.length})</h2>
|
|
680
|
-
<p style="color: #525252; font-size: 13px; margin-bottom: 16px;">This component DEPENDS on these</p>
|
|
681
|
-
\${outgoing.length === 0 ? '<p style="color: #404040;">No outgoing connections</p>' : ''}
|
|
682
|
-
\${outgoing.slice(0, 20).map(c => {
|
|
683
|
-
const target = components.find(comp => comp.component_id === c.to?.component_id);
|
|
684
|
-
return \`
|
|
685
|
-
<div class="connection-item">
|
|
686
|
-
<div class="file">\${target?.name || c.to?.component_id}</div>
|
|
687
|
-
<div class="type">\${c.connection_type}</div>
|
|
688
|
-
</div>
|
|
689
|
-
\`;
|
|
690
|
-
}).join('')}
|
|
691
|
-
</div>
|
|
692
|
-
</div>
|
|
693
|
-
|
|
694
|
-
<div class="card" style="margin-top: 16px;">
|
|
695
|
-
<h2>Files That May Need Changes</h2>
|
|
696
|
-
<p style="color: #525252; font-size: 13px; margin-bottom: 16px;">If you modify \${comp?.name}, check these files:</p>
|
|
697
|
-
<div class="table-wrapper" style="max-height: 300px;">
|
|
698
|
-
<table class="table">
|
|
699
|
-
<thead><tr><th>File</th><th>Line</th><th>Function</th></tr></thead>
|
|
700
|
-
<tbody>
|
|
701
|
-
\${[...new Map(incoming.map(c => [c.code_reference?.file, c])).values()].map(c => \`
|
|
702
|
-
<tr>
|
|
703
|
-
<td class="file-path">\${c.code_reference?.file}</td>
|
|
704
|
-
<td>\${c.code_reference?.line_start}</td>
|
|
705
|
-
<td>\${c.code_reference?.symbol || '-'}</td>
|
|
706
|
-
</tr>
|
|
707
|
-
\`).join('')}
|
|
708
|
-
</tbody>
|
|
709
|
-
</table>
|
|
710
|
-
</div>
|
|
711
|
-
</div>
|
|
712
|
-
</div>
|
|
713
|
-
\`;
|
|
714
|
-
}
|
|
715
|
-
|
|
716
|
-
function selectForImpact(componentId) {
|
|
717
|
-
selectedComponent = componentId;
|
|
718
|
-
render();
|
|
719
|
-
}
|
|
720
|
-
|
|
721
|
-
// Show component detail panel with code snippets
|
|
722
|
-
function showComponentDetail(componentId) {
|
|
723
|
-
const comp = components.find(c => c.component_id === componentId);
|
|
724
|
-
if (!comp) return;
|
|
725
|
-
|
|
726
|
-
const incoming = connections.filter(c => c.to?.component_id === componentId);
|
|
727
|
-
const outgoing = connections.filter(c => c.from?.component_id === componentId);
|
|
728
|
-
|
|
729
|
-
// Helper to escape HTML
|
|
730
|
-
const escapeHtml = (str) => str?.replace(/&/g, '&').replace(/</g, '<').replace(/>/g, '>') || '';
|
|
731
|
-
|
|
732
|
-
// Helper to highlight code syntax
|
|
733
|
-
const highlightCode = (code) => {
|
|
734
|
-
if (!code) return '';
|
|
735
|
-
return escapeHtml(code)
|
|
736
|
-
.replace(/(const|let|var|function|async|await|import|from|export|new|return)/g, '<span class="keyword">$1</span>')
|
|
737
|
-
.replace(/(['"\`][^'"\`]*['"\`])/g, '<span class="string">$1</span>');
|
|
738
|
-
};
|
|
739
|
-
|
|
740
|
-
document.getElementById('detailTitle').textContent = comp.name;
|
|
741
|
-
document.getElementById('detailContent').innerHTML = \`
|
|
742
|
-
<div class="detail-section">
|
|
743
|
-
<h4>Details</h4>
|
|
744
|
-
<div class="detail-item">
|
|
745
|
-
<div class="label">Type</div>
|
|
746
|
-
<div class="value"><span class="badge \${comp.type}">\${comp.type === 'llm' ? '๐ค LLM/AI' : comp.type}</span></div>
|
|
747
|
-
</div>
|
|
748
|
-
<div class="detail-item">
|
|
749
|
-
<div class="label">Layer</div>
|
|
750
|
-
<div class="value">\${comp.role?.layer || '-'}</div>
|
|
751
|
-
</div>
|
|
752
|
-
\${comp.version ? \`<div class="detail-item"><div class="label">Version</div><div class="value">\${comp.version}</div></div>\` : ''}
|
|
753
|
-
\${comp.role?.purpose ? \`<div class="detail-item"><div class="label">Purpose</div><div class="value">\${comp.role.purpose}</div></div>\` : ''}
|
|
754
|
-
</div>
|
|
755
|
-
|
|
756
|
-
<div class="detail-section">
|
|
757
|
-
<h4>Usage Locations (\${incoming.length})</h4>
|
|
758
|
-
<p style="color: #525252; font-size: 12px; margin-bottom: 12px;">Code that uses this component:</p>
|
|
759
|
-
\${incoming.length === 0 ? '<p style="color: #404040;">No usages detected</p>' : ''}
|
|
760
|
-
\${incoming.slice(0, 8).map(c => \`
|
|
761
|
-
<div class="connection-item incoming \${comp.type}">
|
|
762
|
-
<div class="file">\${c.code_reference?.file}:\${c.code_reference?.line_start}</div>
|
|
763
|
-
<div class="type">\${c.connection_type} ยท \${c.code_reference?.symbol || 'unknown'}</div>
|
|
764
|
-
\${c.code_reference?.code_snippet ? \`
|
|
765
|
-
<div class="code-block">
|
|
766
|
-
<span class="line-num">\${c.code_reference.line_start}</span>\${highlightCode(c.code_reference.code_snippet)}
|
|
767
|
-
</div>
|
|
768
|
-
\` : ''}
|
|
769
|
-
</div>
|
|
770
|
-
\`).join('')}
|
|
771
|
-
\${incoming.length > 8 ? '<p style="color: #525252; margin-top: 12px;">+ ' + (incoming.length - 8) + ' more locations</p>' : ''}
|
|
772
|
-
</div>
|
|
773
|
-
|
|
774
|
-
<div class="detail-section">
|
|
775
|
-
<h4>Dependencies (\${outgoing.length})</h4>
|
|
776
|
-
<p style="color: #525252; font-size: 12px; margin-bottom: 12px;">What this component depends on:</p>
|
|
777
|
-
\${outgoing.length === 0 ? '<p style="color: #404040;">No dependencies detected</p>' : ''}
|
|
778
|
-
\${outgoing.slice(0, 8).map(c => {
|
|
779
|
-
const target = components.find(comp => comp.component_id === c.to?.component_id);
|
|
780
|
-
return \`
|
|
781
|
-
<div class="connection-item">
|
|
782
|
-
<div class="file">\${target?.name || c.to?.component_id}</div>
|
|
783
|
-
<div class="type">\${c.connection_type}</div>
|
|
784
|
-
\${c.code_reference?.code_snippet ? \`
|
|
785
|
-
<div class="code-block">\${highlightCode(c.code_reference.code_snippet)}</div>
|
|
786
|
-
\` : ''}
|
|
787
|
-
</div>
|
|
788
|
-
\`;
|
|
789
|
-
}).join('')}
|
|
790
|
-
</div>
|
|
791
|
-
|
|
792
|
-
<button class="refresh-btn" style="width: 100%; margin-top: 16px; min-height: 44px;" onclick="selectedComponent='\${componentId}';currentView='impact';document.querySelector('[data-view=impact]').click();closeDetail();">
|
|
793
|
-
View Full Impact Analysis โ
|
|
794
|
-
</button>
|
|
795
|
-
\`;
|
|
796
|
-
|
|
797
|
-
document.getElementById('detailPanel').classList.add('open');
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
function closeDetail() {
|
|
801
|
-
document.getElementById('detailPanel').classList.remove('open');
|
|
80
|
+
res.writeHead(404, { 'Content-Type': 'text/plain' });
|
|
81
|
+
res.end('Not Found');
|
|
82
|
+
} catch (error) {
|
|
83
|
+
res.writeHead(500, { 'Content-Type': 'application/json' });
|
|
84
|
+
res.end(JSON.stringify({ error: String(error) }));
|
|
802
85
|
}
|
|
86
|
+
});
|
|
803
87
|
|
|
804
|
-
|
|
805
|
-
|
|
806
|
-
|
|
88
|
+
return new Promise((resolve) => {
|
|
89
|
+
server.listen(port, () => {
|
|
90
|
+
resolve({
|
|
91
|
+
port,
|
|
92
|
+
close: () => server.close(),
|
|
93
|
+
});
|
|
807
94
|
});
|
|
95
|
+
});
|
|
96
|
+
}
|
|
808
97
|
|
|
809
|
-
|
|
810
|
-
|
|
811
|
-
</
|
|
812
|
-
</body>
|
|
813
|
-
</html>`;
|
|
98
|
+
function generateDashboardHTML(projectPath: string): string {
|
|
99
|
+
// ~700 lines of vanilla HTML dashboard omitted
|
|
100
|
+
return '<!DOCTYPE html><html><body>Dashboard disabled</body></html>';
|
|
814
101
|
}
|
|
102
|
+
*/
|
|
815
103
|
//# sourceMappingURL=ui-server.js.map
|