codegraph-java 0.1.0
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/README.md +131 -0
- package/dist/base-graph/index.d.ts +57 -0
- package/dist/base-graph/index.d.ts.map +1 -0
- package/dist/base-graph/index.js +175 -0
- package/dist/base-graph/index.js.map +1 -0
- package/dist/bin/codegraph.d.ts +28 -0
- package/dist/bin/codegraph.d.ts.map +1 -0
- package/dist/bin/codegraph.js +2615 -0
- package/dist/bin/codegraph.js.map +1 -0
- package/dist/bin/command-supervision.d.ts +49 -0
- package/dist/bin/command-supervision.d.ts.map +1 -0
- package/dist/bin/command-supervision.js +95 -0
- package/dist/bin/command-supervision.js.map +1 -0
- package/dist/bin/fatal-handler.d.ts +20 -0
- package/dist/bin/fatal-handler.d.ts.map +1 -0
- package/dist/bin/fatal-handler.js +118 -0
- package/dist/bin/fatal-handler.js.map +1 -0
- package/dist/bin/node-version-check.d.ts +45 -0
- package/dist/bin/node-version-check.d.ts.map +1 -0
- package/dist/bin/node-version-check.js +98 -0
- package/dist/bin/node-version-check.js.map +1 -0
- package/dist/bin/uninstall.d.ts +14 -0
- package/dist/bin/uninstall.d.ts.map +1 -0
- package/dist/bin/uninstall.js +36 -0
- package/dist/bin/uninstall.js.map +1 -0
- package/dist/context/formatter.d.ts +36 -0
- package/dist/context/formatter.d.ts.map +1 -0
- package/dist/context/formatter.js +269 -0
- package/dist/context/formatter.js.map +1 -0
- package/dist/context/index.d.ts +131 -0
- package/dist/context/index.d.ts.map +1 -0
- package/dist/context/index.js +1378 -0
- package/dist/context/index.js.map +1 -0
- package/dist/context/markers.d.ts +19 -0
- package/dist/context/markers.d.ts.map +1 -0
- package/dist/context/markers.js +22 -0
- package/dist/context/markers.js.map +1 -0
- package/dist/db/index.d.ts +380 -0
- package/dist/db/index.d.ts.map +1 -0
- package/dist/db/index.js +854 -0
- package/dist/db/index.js.map +1 -0
- package/dist/db/migrations.d.ts +44 -0
- package/dist/db/migrations.d.ts.map +1 -0
- package/dist/db/migrations.js +255 -0
- package/dist/db/migrations.js.map +1 -0
- package/dist/db/queries.d.ts +1060 -0
- package/dist/db/queries.d.ts.map +1 -0
- package/dist/db/queries.js +3191 -0
- package/dist/db/queries.js.map +1 -0
- package/dist/db/schema.sql +209 -0
- package/dist/db/sqlite-adapter.d.ts +55 -0
- package/dist/db/sqlite-adapter.d.ts.map +1 -0
- package/dist/db/sqlite-adapter.js +135 -0
- package/dist/db/sqlite-adapter.js.map +1 -0
- package/dist/db/wal-valve.d.ts +119 -0
- package/dist/db/wal-valve.d.ts.map +1 -0
- package/dist/db/wal-valve.js +290 -0
- package/dist/db/wal-valve.js.map +1 -0
- package/dist/directory.d.ts +213 -0
- package/dist/directory.d.ts.map +1 -0
- package/dist/directory.js +781 -0
- package/dist/directory.js.map +1 -0
- package/dist/errors.d.ts +150 -0
- package/dist/errors.d.ts.map +1 -0
- package/dist/errors.js +234 -0
- package/dist/errors.js.map +1 -0
- package/dist/extraction/extraction-version.d.ts +25 -0
- package/dist/extraction/extraction-version.d.ts.map +1 -0
- package/dist/extraction/extraction-version.js +28 -0
- package/dist/extraction/extraction-version.js.map +1 -0
- package/dist/extraction/function-ref.d.ts +118 -0
- package/dist/extraction/function-ref.d.ts.map +1 -0
- package/dist/extraction/function-ref.js +746 -0
- package/dist/extraction/function-ref.js.map +1 -0
- package/dist/extraction/generated-detection.d.ts +66 -0
- package/dist/extraction/generated-detection.d.ts.map +1 -0
- package/dist/extraction/generated-detection.js +248 -0
- package/dist/extraction/generated-detection.js.map +1 -0
- package/dist/extraction/grammars.d.ts +148 -0
- package/dist/extraction/grammars.d.ts.map +1 -0
- package/dist/extraction/grammars.js +558 -0
- package/dist/extraction/grammars.js.map +1 -0
- package/dist/extraction/index.d.ts +367 -0
- package/dist/extraction/index.d.ts.map +1 -0
- package/dist/extraction/index.js +2833 -0
- package/dist/extraction/index.js.map +1 -0
- package/dist/extraction/kernel/decode.d.ts +9 -0
- package/dist/extraction/kernel/decode.d.ts.map +1 -0
- package/dist/extraction/kernel/decode.js +162 -0
- package/dist/extraction/kernel/decode.js.map +1 -0
- package/dist/extraction/kernel/index.d.ts +64 -0
- package/dist/extraction/kernel/index.d.ts.map +1 -0
- package/dist/extraction/kernel/index.js +204 -0
- package/dist/extraction/kernel/index.js.map +1 -0
- package/dist/extraction/kernel/layout.d.ts +101 -0
- package/dist/extraction/kernel/layout.d.ts.map +1 -0
- package/dist/extraction/kernel/layout.js +104 -0
- package/dist/extraction/kernel/layout.js.map +1 -0
- package/dist/extraction/kernel/loader.d.ts +103 -0
- package/dist/extraction/kernel/loader.d.ts.map +1 -0
- package/dist/extraction/kernel/loader.js +146 -0
- package/dist/extraction/kernel/loader.js.map +1 -0
- package/dist/extraction/languages/c-cpp.d.ts +124 -0
- package/dist/extraction/languages/c-cpp.d.ts.map +1 -0
- package/dist/extraction/languages/c-cpp.js +1689 -0
- package/dist/extraction/languages/c-cpp.js.map +1 -0
- package/dist/extraction/languages/index.d.ts +11 -0
- package/dist/extraction/languages/index.d.ts.map +1 -0
- package/dist/extraction/languages/index.js +15 -0
- package/dist/extraction/languages/index.js.map +1 -0
- package/dist/extraction/languages/java.d.ts +3 -0
- package/dist/extraction/languages/java.d.ts.map +1 -0
- package/dist/extraction/languages/java.js +315 -0
- package/dist/extraction/languages/java.js.map +1 -0
- package/dist/extraction/languages/rust.d.ts +23 -0
- package/dist/extraction/languages/rust.d.ts.map +1 -0
- package/dist/extraction/languages/rust.js +169 -0
- package/dist/extraction/languages/rust.js.map +1 -0
- package/dist/extraction/parse-pool.d.ts +167 -0
- package/dist/extraction/parse-pool.d.ts.map +1 -0
- package/dist/extraction/parse-pool.js +421 -0
- package/dist/extraction/parse-pool.js.map +1 -0
- package/dist/extraction/parse-worker.d.ts +8 -0
- package/dist/extraction/parse-worker.d.ts.map +1 -0
- package/dist/extraction/parse-worker.js +138 -0
- package/dist/extraction/parse-worker.js.map +1 -0
- package/dist/extraction/store-worker.d.ts +24 -0
- package/dist/extraction/store-worker.d.ts.map +1 -0
- package/dist/extraction/store-worker.js +139 -0
- package/dist/extraction/store-worker.js.map +1 -0
- package/dist/extraction/store-writer.d.ts +63 -0
- package/dist/extraction/store-writer.d.ts.map +1 -0
- package/dist/extraction/store-writer.js +174 -0
- package/dist/extraction/store-writer.js.map +1 -0
- package/dist/extraction/syntax-tokens.d.ts +103 -0
- package/dist/extraction/syntax-tokens.d.ts.map +1 -0
- package/dist/extraction/syntax-tokens.js +381 -0
- package/dist/extraction/syntax-tokens.js.map +1 -0
- package/dist/extraction/tree-sitter-helpers.d.ts +28 -0
- package/dist/extraction/tree-sitter-helpers.d.ts.map +1 -0
- package/dist/extraction/tree-sitter-helpers.js +153 -0
- package/dist/extraction/tree-sitter-helpers.js.map +1 -0
- package/dist/extraction/tree-sitter-types.d.ts +260 -0
- package/dist/extraction/tree-sitter-types.d.ts.map +1 -0
- package/dist/extraction/tree-sitter-types.js +10 -0
- package/dist/extraction/tree-sitter-types.js.map +1 -0
- package/dist/extraction/tree-sitter.d.ts +745 -0
- package/dist/extraction/tree-sitter.d.ts.map +1 -0
- package/dist/extraction/tree-sitter.js +6725 -0
- package/dist/extraction/tree-sitter.js.map +1 -0
- package/dist/extraction/wasm/tree-sitter-java.wasm +0 -0
- package/dist/extraction/wasm-runtime-flags.d.ts +53 -0
- package/dist/extraction/wasm-runtime-flags.d.ts.map +1 -0
- package/dist/extraction/wasm-runtime-flags.js +130 -0
- package/dist/extraction/wasm-runtime-flags.js.map +1 -0
- package/dist/graph/branch-guards.d.ts +248 -0
- package/dist/graph/branch-guards.d.ts.map +1 -0
- package/dist/graph/branch-guards.js +2231 -0
- package/dist/graph/branch-guards.js.map +1 -0
- package/dist/graph/dead-code.d.ts +251 -0
- package/dist/graph/dead-code.d.ts.map +1 -0
- package/dist/graph/dead-code.js +756 -0
- package/dist/graph/dead-code.js.map +1 -0
- package/dist/graph/dynamic-boundary-report.d.ts +121 -0
- package/dist/graph/dynamic-boundary-report.d.ts.map +1 -0
- package/dist/graph/dynamic-boundary-report.js +283 -0
- package/dist/graph/dynamic-boundary-report.js.map +1 -0
- package/dist/graph/index.d.ts +12 -0
- package/dist/graph/index.d.ts.map +1 -0
- package/dist/graph/index.js +28 -0
- package/dist/graph/index.js.map +1 -0
- package/dist/graph/named-symbol-flow.d.ts +153 -0
- package/dist/graph/named-symbol-flow.d.ts.map +1 -0
- package/dist/graph/named-symbol-flow.js +609 -0
- package/dist/graph/named-symbol-flow.js.map +1 -0
- package/dist/graph/queries.d.ts +106 -0
- package/dist/graph/queries.d.ts.map +1 -0
- package/dist/graph/queries.js +341 -0
- package/dist/graph/queries.js.map +1 -0
- package/dist/graph/traversal.d.ts +127 -0
- package/dist/graph/traversal.d.ts.map +1 -0
- package/dist/graph/traversal.js +599 -0
- package/dist/graph/traversal.js.map +1 -0
- package/dist/graph/type-hierarchy.d.ts +155 -0
- package/dist/graph/type-hierarchy.d.ts.map +1 -0
- package/dist/graph/type-hierarchy.js +382 -0
- package/dist/graph/type-hierarchy.js.map +1 -0
- package/dist/index.d.ts +886 -0
- package/dist/index.d.ts.map +1 -0
- package/dist/index.js +2019 -0
- package/dist/index.js.map +1 -0
- package/dist/installer/beta-signup.d.ts +54 -0
- package/dist/installer/beta-signup.d.ts.map +1 -0
- package/dist/installer/beta-signup.js +178 -0
- package/dist/installer/beta-signup.js.map +1 -0
- package/dist/installer/config-writer.d.ts +28 -0
- package/dist/installer/config-writer.d.ts.map +1 -0
- package/dist/installer/config-writer.js +91 -0
- package/dist/installer/config-writer.js.map +1 -0
- package/dist/installer/index.d.ts +143 -0
- package/dist/installer/index.d.ts.map +1 -0
- package/dist/installer/index.js +632 -0
- package/dist/installer/index.js.map +1 -0
- package/dist/installer/instructions-template.d.ts +41 -0
- package/dist/installer/instructions-template.d.ts.map +1 -0
- package/dist/installer/instructions-template.js +53 -0
- package/dist/installer/instructions-template.js.map +1 -0
- package/dist/installer/targets/antigravity.d.ts +57 -0
- package/dist/installer/targets/antigravity.d.ts.map +1 -0
- package/dist/installer/targets/antigravity.js +308 -0
- package/dist/installer/targets/antigravity.js.map +1 -0
- package/dist/installer/targets/claude.d.ts +62 -0
- package/dist/installer/targets/claude.d.ts.map +1 -0
- package/dist/installer/targets/claude.js +486 -0
- package/dist/installer/targets/claude.js.map +1 -0
- package/dist/installer/targets/codex.d.ts +32 -0
- package/dist/installer/targets/codex.d.ts.map +1 -0
- package/dist/installer/targets/codex.js +202 -0
- package/dist/installer/targets/codex.js.map +1 -0
- package/dist/installer/targets/copilot-cli.d.ts +32 -0
- package/dist/installer/targets/copilot-cli.d.ts.map +1 -0
- package/dist/installer/targets/copilot-cli.js +209 -0
- package/dist/installer/targets/copilot-cli.js.map +1 -0
- package/dist/installer/targets/copilot-jetbrains.d.ts +42 -0
- package/dist/installer/targets/copilot-jetbrains.d.ts.map +1 -0
- package/dist/installer/targets/copilot-jetbrains.js +238 -0
- package/dist/installer/targets/copilot-jetbrains.js.map +1 -0
- package/dist/installer/targets/copilot-vscode.d.ts +47 -0
- package/dist/installer/targets/copilot-vscode.d.ts.map +1 -0
- package/dist/installer/targets/copilot-vscode.js +219 -0
- package/dist/installer/targets/copilot-vscode.js.map +1 -0
- package/dist/installer/targets/cursor.d.ts +35 -0
- package/dist/installer/targets/cursor.d.ts.map +1 -0
- package/dist/installer/targets/cursor.js +254 -0
- package/dist/installer/targets/cursor.js.map +1 -0
- package/dist/installer/targets/gemini.d.ts +26 -0
- package/dist/installer/targets/gemini.d.ts.map +1 -0
- package/dist/installer/targets/gemini.js +165 -0
- package/dist/installer/targets/gemini.js.map +1 -0
- package/dist/installer/targets/hermes.d.ts +18 -0
- package/dist/installer/targets/hermes.d.ts.map +1 -0
- package/dist/installer/targets/hermes.js +359 -0
- package/dist/installer/targets/hermes.js.map +1 -0
- package/dist/installer/targets/kiro.d.ts +27 -0
- package/dist/installer/targets/kiro.d.ts.map +1 -0
- package/dist/installer/targets/kiro.js +178 -0
- package/dist/installer/targets/kiro.js.map +1 -0
- package/dist/installer/targets/opencode.d.ts +38 -0
- package/dist/installer/targets/opencode.d.ts.map +1 -0
- package/dist/installer/targets/opencode.js +288 -0
- package/dist/installer/targets/opencode.js.map +1 -0
- package/dist/installer/targets/registry.d.ts +35 -0
- package/dist/installer/targets/registry.d.ts.map +1 -0
- package/dist/installer/targets/registry.js +101 -0
- package/dist/installer/targets/registry.js.map +1 -0
- package/dist/installer/targets/shared.d.ts +101 -0
- package/dist/installer/targets/shared.d.ts.map +1 -0
- package/dist/installer/targets/shared.js +264 -0
- package/dist/installer/targets/shared.js.map +1 -0
- package/dist/installer/targets/toml.d.ts +53 -0
- package/dist/installer/targets/toml.d.ts.map +1 -0
- package/dist/installer/targets/toml.js +226 -0
- package/dist/installer/targets/toml.js.map +1 -0
- package/dist/installer/targets/trae.d.ts +30 -0
- package/dist/installer/targets/trae.d.ts.map +1 -0
- package/dist/installer/targets/trae.js +164 -0
- package/dist/installer/targets/trae.js.map +1 -0
- package/dist/installer/targets/types.d.ts +108 -0
- package/dist/installer/targets/types.d.ts.map +1 -0
- package/dist/installer/targets/types.js +16 -0
- package/dist/installer/targets/types.js.map +1 -0
- package/dist/installer/targets/workbuddy.d.ts +29 -0
- package/dist/installer/targets/workbuddy.d.ts.map +1 -0
- package/dist/installer/targets/workbuddy.js +163 -0
- package/dist/installer/targets/workbuddy.js.map +1 -0
- package/dist/mcp/daemon-manager.d.ts +42 -0
- package/dist/mcp/daemon-manager.d.ts.map +1 -0
- package/dist/mcp/daemon-manager.js +129 -0
- package/dist/mcp/daemon-manager.js.map +1 -0
- package/dist/mcp/daemon-paths.d.ts +79 -0
- package/dist/mcp/daemon-paths.d.ts.map +1 -0
- package/dist/mcp/daemon-paths.js +219 -0
- package/dist/mcp/daemon-paths.js.map +1 -0
- package/dist/mcp/daemon-registry.d.ts +57 -0
- package/dist/mcp/daemon-registry.d.ts.map +1 -0
- package/dist/mcp/daemon-registry.js +281 -0
- package/dist/mcp/daemon-registry.js.map +1 -0
- package/dist/mcp/daemon.d.ts +293 -0
- package/dist/mcp/daemon.d.ts.map +1 -0
- package/dist/mcp/daemon.js +864 -0
- package/dist/mcp/daemon.js.map +1 -0
- package/dist/mcp/dynamic-boundaries.d.ts +41 -0
- package/dist/mcp/dynamic-boundaries.d.ts.map +1 -0
- package/dist/mcp/dynamic-boundaries.js +360 -0
- package/dist/mcp/dynamic-boundaries.js.map +1 -0
- package/dist/mcp/early-ppid.d.ts +26 -0
- package/dist/mcp/early-ppid.d.ts.map +1 -0
- package/dist/mcp/early-ppid.js +29 -0
- package/dist/mcp/early-ppid.js.map +1 -0
- package/dist/mcp/engine.d.ts +125 -0
- package/dist/mcp/engine.d.ts.map +1 -0
- package/dist/mcp/engine.js +392 -0
- package/dist/mcp/engine.js.map +1 -0
- package/dist/mcp/explore-dedup.d.ts +137 -0
- package/dist/mcp/explore-dedup.d.ts.map +1 -0
- package/dist/mcp/explore-dedup.js +236 -0
- package/dist/mcp/explore-dedup.js.map +1 -0
- package/dist/mcp/explore-diagnostics.d.ts +289 -0
- package/dist/mcp/explore-diagnostics.d.ts.map +1 -0
- package/dist/mcp/explore-diagnostics.js +558 -0
- package/dist/mcp/explore-diagnostics.js.map +1 -0
- package/dist/mcp/explore-session-state.d.ts +217 -0
- package/dist/mcp/explore-session-state.d.ts.map +1 -0
- package/dist/mcp/explore-session-state.js +322 -0
- package/dist/mcp/explore-session-state.js.map +1 -0
- package/dist/mcp/index.d.ts +137 -0
- package/dist/mcp/index.d.ts.map +1 -0
- package/dist/mcp/index.js +567 -0
- package/dist/mcp/index.js.map +1 -0
- package/dist/mcp/liveness-watchdog.d.ts +35 -0
- package/dist/mcp/liveness-watchdog.d.ts.map +1 -0
- package/dist/mcp/liveness-watchdog.js +269 -0
- package/dist/mcp/liveness-watchdog.js.map +1 -0
- package/dist/mcp/ppid-watchdog.d.ts +62 -0
- package/dist/mcp/ppid-watchdog.d.ts.map +1 -0
- package/dist/mcp/ppid-watchdog.js +64 -0
- package/dist/mcp/ppid-watchdog.js.map +1 -0
- package/dist/mcp/proxy.d.ts +87 -0
- package/dist/mcp/proxy.d.ts.map +1 -0
- package/dist/mcp/proxy.js +672 -0
- package/dist/mcp/proxy.js.map +1 -0
- package/dist/mcp/query-pool.d.ts +108 -0
- package/dist/mcp/query-pool.d.ts.map +1 -0
- package/dist/mcp/query-pool.js +315 -0
- package/dist/mcp/query-pool.js.map +1 -0
- package/dist/mcp/query-worker.d.ts +24 -0
- package/dist/mcp/query-worker.d.ts.map +1 -0
- package/dist/mcp/query-worker.js +87 -0
- package/dist/mcp/query-worker.js.map +1 -0
- package/dist/mcp/server-instructions.d.ts +34 -0
- package/dist/mcp/server-instructions.d.ts.map +1 -0
- package/dist/mcp/server-instructions.js +111 -0
- package/dist/mcp/server-instructions.js.map +1 -0
- package/dist/mcp/session.d.ts +109 -0
- package/dist/mcp/session.d.ts.map +1 -0
- package/dist/mcp/session.js +380 -0
- package/dist/mcp/session.js.map +1 -0
- package/dist/mcp/startup-handshake.d.ts +44 -0
- package/dist/mcp/startup-handshake.d.ts.map +1 -0
- package/dist/mcp/startup-handshake.js +73 -0
- package/dist/mcp/startup-handshake.js.map +1 -0
- package/dist/mcp/stdin-teardown.d.ts +27 -0
- package/dist/mcp/stdin-teardown.d.ts.map +1 -0
- package/dist/mcp/stdin-teardown.js +49 -0
- package/dist/mcp/stdin-teardown.js.map +1 -0
- package/dist/mcp/tools.d.ts +877 -0
- package/dist/mcp/tools.d.ts.map +1 -0
- package/dist/mcp/tools.js +6371 -0
- package/dist/mcp/tools.js.map +1 -0
- package/dist/mcp/transport.d.ts +188 -0
- package/dist/mcp/transport.d.ts.map +1 -0
- package/dist/mcp/transport.js +377 -0
- package/dist/mcp/transport.js.map +1 -0
- package/dist/mcp/version.d.ts +19 -0
- package/dist/mcp/version.d.ts.map +1 -0
- package/dist/mcp/version.js +71 -0
- package/dist/mcp/version.js.map +1 -0
- package/dist/project-config.d.ts +158 -0
- package/dist/project-config.d.ts.map +1 -0
- package/dist/project-config.js +489 -0
- package/dist/project-config.js.map +1 -0
- package/dist/resolution/c-fnptr-synthesizer.d.ts +6 -0
- package/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -0
- package/dist/resolution/c-fnptr-synthesizer.js +1506 -0
- package/dist/resolution/c-fnptr-synthesizer.js.map +1 -0
- package/dist/resolution/callback-synthesizer.d.ts +59 -0
- package/dist/resolution/callback-synthesizer.d.ts.map +1 -0
- package/dist/resolution/callback-synthesizer.js +4066 -0
- package/dist/resolution/callback-synthesizer.js.map +1 -0
- package/dist/resolution/cooperative-yield.d.ts +40 -0
- package/dist/resolution/cooperative-yield.d.ts.map +1 -0
- package/dist/resolution/cooperative-yield.js +44 -0
- package/dist/resolution/cooperative-yield.js.map +1 -0
- package/dist/resolution/expo-router-synthesizer.d.ts +32 -0
- package/dist/resolution/expo-router-synthesizer.d.ts.map +1 -0
- package/dist/resolution/expo-router-synthesizer.js +189 -0
- package/dist/resolution/expo-router-synthesizer.js.map +1 -0
- package/dist/resolution/frameworks/astro.d.ts +9 -0
- package/dist/resolution/frameworks/astro.d.ts.map +1 -0
- package/dist/resolution/frameworks/astro.js +169 -0
- package/dist/resolution/frameworks/astro.js.map +1 -0
- package/dist/resolution/frameworks/cargo-workspace.d.ts +18 -0
- package/dist/resolution/frameworks/cargo-workspace.d.ts.map +1 -0
- package/dist/resolution/frameworks/cargo-workspace.js +225 -0
- package/dist/resolution/frameworks/cargo-workspace.js.map +1 -0
- package/dist/resolution/frameworks/cics.d.ts +20 -0
- package/dist/resolution/frameworks/cics.d.ts.map +1 -0
- package/dist/resolution/frameworks/cics.js +90 -0
- package/dist/resolution/frameworks/cics.js.map +1 -0
- package/dist/resolution/frameworks/csharp.d.ts +8 -0
- package/dist/resolution/frameworks/csharp.d.ts.map +1 -0
- package/dist/resolution/frameworks/csharp.js +335 -0
- package/dist/resolution/frameworks/csharp.js.map +1 -0
- package/dist/resolution/frameworks/drupal.d.ts +51 -0
- package/dist/resolution/frameworks/drupal.d.ts.map +1 -0
- package/dist/resolution/frameworks/drupal.js +367 -0
- package/dist/resolution/frameworks/drupal.js.map +1 -0
- package/dist/resolution/frameworks/expo-modules.d.ts +3 -0
- package/dist/resolution/frameworks/expo-modules.d.ts.map +1 -0
- package/dist/resolution/frameworks/expo-modules.js +148 -0
- package/dist/resolution/frameworks/expo-modules.js.map +1 -0
- package/dist/resolution/frameworks/expo-router.d.ts +189 -0
- package/dist/resolution/frameworks/expo-router.d.ts.map +1 -0
- package/dist/resolution/frameworks/expo-router.js +785 -0
- package/dist/resolution/frameworks/expo-router.js.map +1 -0
- package/dist/resolution/frameworks/express.d.ts +8 -0
- package/dist/resolution/frameworks/express.d.ts.map +1 -0
- package/dist/resolution/frameworks/express.js +540 -0
- package/dist/resolution/frameworks/express.js.map +1 -0
- package/dist/resolution/frameworks/fabric.d.ts +3 -0
- package/dist/resolution/frameworks/fabric.d.ts.map +1 -0
- package/dist/resolution/frameworks/fabric.js +354 -0
- package/dist/resolution/frameworks/fabric.js.map +1 -0
- package/dist/resolution/frameworks/go.d.ts +8 -0
- package/dist/resolution/frameworks/go.d.ts.map +1 -0
- package/dist/resolution/frameworks/go.js +184 -0
- package/dist/resolution/frameworks/go.js.map +1 -0
- package/dist/resolution/frameworks/goframe.d.ts +41 -0
- package/dist/resolution/frameworks/goframe.d.ts.map +1 -0
- package/dist/resolution/frameworks/goframe.js +112 -0
- package/dist/resolution/frameworks/goframe.js.map +1 -0
- package/dist/resolution/frameworks/index.d.ts +30 -0
- package/dist/resolution/frameworks/index.d.ts.map +1 -0
- package/dist/resolution/frameworks/index.js +72 -0
- package/dist/resolution/frameworks/index.js.map +1 -0
- package/dist/resolution/frameworks/java.d.ts +8 -0
- package/dist/resolution/frameworks/java.d.ts.map +1 -0
- package/dist/resolution/frameworks/java.js +517 -0
- package/dist/resolution/frameworks/java.js.map +1 -0
- package/dist/resolution/frameworks/laravel.d.ts +13 -0
- package/dist/resolution/frameworks/laravel.d.ts.map +1 -0
- package/dist/resolution/frameworks/laravel.js +257 -0
- package/dist/resolution/frameworks/laravel.js.map +1 -0
- package/dist/resolution/frameworks/nestjs.d.ts +26 -0
- package/dist/resolution/frameworks/nestjs.d.ts.map +1 -0
- package/dist/resolution/frameworks/nestjs.js +690 -0
- package/dist/resolution/frameworks/nestjs.js.map +1 -0
- package/dist/resolution/frameworks/nextjs.d.ts +76 -0
- package/dist/resolution/frameworks/nextjs.d.ts.map +1 -0
- package/dist/resolution/frameworks/nextjs.js +328 -0
- package/dist/resolution/frameworks/nextjs.js.map +1 -0
- package/dist/resolution/frameworks/object-literal.d.ts +32 -0
- package/dist/resolution/frameworks/object-literal.d.ts.map +1 -0
- package/dist/resolution/frameworks/object-literal.js +139 -0
- package/dist/resolution/frameworks/object-literal.js.map +1 -0
- package/dist/resolution/frameworks/package-deps.d.ts +14 -0
- package/dist/resolution/frameworks/package-deps.d.ts.map +1 -0
- package/dist/resolution/frameworks/package-deps.js +78 -0
- package/dist/resolution/frameworks/package-deps.js.map +1 -0
- package/dist/resolution/frameworks/play.d.ts +19 -0
- package/dist/resolution/frameworks/play.d.ts.map +1 -0
- package/dist/resolution/frameworks/play.js +111 -0
- package/dist/resolution/frameworks/play.js.map +1 -0
- package/dist/resolution/frameworks/python.d.ts +10 -0
- package/dist/resolution/frameworks/python.d.ts.map +1 -0
- package/dist/resolution/frameworks/python.js +566 -0
- package/dist/resolution/frameworks/python.js.map +1 -0
- package/dist/resolution/frameworks/react-native.d.ts +29 -0
- package/dist/resolution/frameworks/react-native.d.ts.map +1 -0
- package/dist/resolution/frameworks/react-native.js +549 -0
- package/dist/resolution/frameworks/react-native.js.map +1 -0
- package/dist/resolution/frameworks/react-router.d.ts +46 -0
- package/dist/resolution/frameworks/react-router.d.ts.map +1 -0
- package/dist/resolution/frameworks/react-router.js +187 -0
- package/dist/resolution/frameworks/react-router.js.map +1 -0
- package/dist/resolution/frameworks/react.d.ts +9 -0
- package/dist/resolution/frameworks/react.d.ts.map +1 -0
- package/dist/resolution/frameworks/react.js +257 -0
- package/dist/resolution/frameworks/react.js.map +1 -0
- package/dist/resolution/frameworks/ruby.d.ts +8 -0
- package/dist/resolution/frameworks/ruby.d.ts.map +1 -0
- package/dist/resolution/frameworks/ruby.js +302 -0
- package/dist/resolution/frameworks/ruby.js.map +1 -0
- package/dist/resolution/frameworks/rust.d.ts +8 -0
- package/dist/resolution/frameworks/rust.d.ts.map +1 -0
- package/dist/resolution/frameworks/rust.js +304 -0
- package/dist/resolution/frameworks/rust.js.map +1 -0
- package/dist/resolution/frameworks/svelte.d.ts +9 -0
- package/dist/resolution/frameworks/svelte.d.ts.map +1 -0
- package/dist/resolution/frameworks/svelte.js +258 -0
- package/dist/resolution/frameworks/svelte.js.map +1 -0
- package/dist/resolution/frameworks/sveltekit-router.d.ts +36 -0
- package/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -0
- package/dist/resolution/frameworks/sveltekit-router.js +156 -0
- package/dist/resolution/frameworks/sveltekit-router.js.map +1 -0
- package/dist/resolution/frameworks/swift-objc.d.ts +37 -0
- package/dist/resolution/frameworks/swift-objc.d.ts.map +1 -0
- package/dist/resolution/frameworks/swift-objc.js +252 -0
- package/dist/resolution/frameworks/swift-objc.js.map +1 -0
- package/dist/resolution/frameworks/swift.d.ts +10 -0
- package/dist/resolution/frameworks/swift.d.ts.map +1 -0
- package/dist/resolution/frameworks/swift.js +410 -0
- package/dist/resolution/frameworks/swift.js.map +1 -0
- package/dist/resolution/frameworks/tanstack-router.d.ts +84 -0
- package/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -0
- package/dist/resolution/frameworks/tanstack-router.js +437 -0
- package/dist/resolution/frameworks/tanstack-router.js.map +1 -0
- package/dist/resolution/frameworks/terraform.d.ts +38 -0
- package/dist/resolution/frameworks/terraform.d.ts.map +1 -0
- package/dist/resolution/frameworks/terraform.js +277 -0
- package/dist/resolution/frameworks/terraform.js.map +1 -0
- package/dist/resolution/frameworks/vue-router.d.ts +82 -0
- package/dist/resolution/frameworks/vue-router.d.ts.map +1 -0
- package/dist/resolution/frameworks/vue-router.js +377 -0
- package/dist/resolution/frameworks/vue-router.js.map +1 -0
- package/dist/resolution/frameworks/vue.d.ts +9 -0
- package/dist/resolution/frameworks/vue.d.ts.map +1 -0
- package/dist/resolution/frameworks/vue.js +303 -0
- package/dist/resolution/frameworks/vue.js.map +1 -0
- package/dist/resolution/go-module.d.ts +26 -0
- package/dist/resolution/go-module.d.ts.map +1 -0
- package/dist/resolution/go-module.js +78 -0
- package/dist/resolution/go-module.js.map +1 -0
- package/dist/resolution/goframe-synthesizer.d.ts +29 -0
- package/dist/resolution/goframe-synthesizer.d.ts.map +1 -0
- package/dist/resolution/goframe-synthesizer.js +163 -0
- package/dist/resolution/goframe-synthesizer.js.map +1 -0
- package/dist/resolution/import-resolver.d.ts +84 -0
- package/dist/resolution/import-resolver.d.ts.map +1 -0
- package/dist/resolution/import-resolver.js +2240 -0
- package/dist/resolution/import-resolver.js.map +1 -0
- package/dist/resolution/index.d.ts +343 -0
- package/dist/resolution/index.d.ts.map +1 -0
- package/dist/resolution/index.js +2352 -0
- package/dist/resolution/index.js.map +1 -0
- package/dist/resolution/lru-cache.d.ts +24 -0
- package/dist/resolution/lru-cache.d.ts.map +1 -0
- package/dist/resolution/lru-cache.js +62 -0
- package/dist/resolution/lru-cache.js.map +1 -0
- package/dist/resolution/memory-budget.d.ts +48 -0
- package/dist/resolution/memory-budget.d.ts.map +1 -0
- package/dist/resolution/memory-budget.js +162 -0
- package/dist/resolution/memory-budget.js.map +1 -0
- package/dist/resolution/name-matcher.d.ts +153 -0
- package/dist/resolution/name-matcher.d.ts.map +1 -0
- package/dist/resolution/name-matcher.js +2412 -0
- package/dist/resolution/name-matcher.js.map +1 -0
- package/dist/resolution/next-router-synthesizer.d.ts +27 -0
- package/dist/resolution/next-router-synthesizer.d.ts.map +1 -0
- package/dist/resolution/next-router-synthesizer.js +113 -0
- package/dist/resolution/next-router-synthesizer.js.map +1 -0
- package/dist/resolution/path-aliases.d.ts +70 -0
- package/dist/resolution/path-aliases.d.ts.map +1 -0
- package/dist/resolution/path-aliases.js +346 -0
- package/dist/resolution/path-aliases.js.map +1 -0
- package/dist/resolution/react-router-synthesizer.d.ts +33 -0
- package/dist/resolution/react-router-synthesizer.d.ts.map +1 -0
- package/dist/resolution/react-router-synthesizer.js +126 -0
- package/dist/resolution/react-router-synthesizer.js.map +1 -0
- package/dist/resolution/resolver-pool.d.ts +106 -0
- package/dist/resolution/resolver-pool.d.ts.map +1 -0
- package/dist/resolution/resolver-pool.js +344 -0
- package/dist/resolution/resolver-pool.js.map +1 -0
- package/dist/resolution/resolver-worker.d.ts +17 -0
- package/dist/resolution/resolver-worker.d.ts.map +1 -0
- package/dist/resolution/resolver-worker.js +141 -0
- package/dist/resolution/resolver-worker.js.map +1 -0
- package/dist/resolution/strip-comments.d.ts +27 -0
- package/dist/resolution/strip-comments.d.ts.map +1 -0
- package/dist/resolution/strip-comments.js +492 -0
- package/dist/resolution/strip-comments.js.map +1 -0
- package/dist/resolution/sveltekit-synthesizer.d.ts +58 -0
- package/dist/resolution/sveltekit-synthesizer.d.ts.map +1 -0
- package/dist/resolution/sveltekit-synthesizer.js +173 -0
- package/dist/resolution/sveltekit-synthesizer.js.map +1 -0
- package/dist/resolution/swift-objc-bridge.d.ts +134 -0
- package/dist/resolution/swift-objc-bridge.d.ts.map +1 -0
- package/dist/resolution/swift-objc-bridge.js +256 -0
- package/dist/resolution/swift-objc-bridge.js.map +1 -0
- package/dist/resolution/synth-utils.d.ts +26 -0
- package/dist/resolution/synth-utils.d.ts.map +1 -0
- package/dist/resolution/synth-utils.js +75 -0
- package/dist/resolution/synth-utils.js.map +1 -0
- package/dist/resolution/tanstack-router-synthesizer.d.ts +31 -0
- package/dist/resolution/tanstack-router-synthesizer.d.ts.map +1 -0
- package/dist/resolution/tanstack-router-synthesizer.js +114 -0
- package/dist/resolution/tanstack-router-synthesizer.js.map +1 -0
- package/dist/resolution/tier-synthesizer.d.ts +48 -0
- package/dist/resolution/tier-synthesizer.d.ts.map +1 -0
- package/dist/resolution/tier-synthesizer.js +907 -0
- package/dist/resolution/tier-synthesizer.js.map +1 -0
- package/dist/resolution/types.d.ts +290 -0
- package/dist/resolution/types.d.ts.map +1 -0
- package/dist/resolution/types.js +8 -0
- package/dist/resolution/types.js.map +1 -0
- package/dist/resolution/vue-router-synthesizer.d.ts +30 -0
- package/dist/resolution/vue-router-synthesizer.d.ts.map +1 -0
- package/dist/resolution/vue-router-synthesizer.js +115 -0
- package/dist/resolution/vue-router-synthesizer.js.map +1 -0
- package/dist/resolution/workspace-packages.d.ts +58 -0
- package/dist/resolution/workspace-packages.d.ts.map +1 -0
- package/dist/resolution/workspace-packages.js +346 -0
- package/dist/resolution/workspace-packages.js.map +1 -0
- package/dist/search/identifier-segments.d.ts +70 -0
- package/dist/search/identifier-segments.d.ts.map +1 -0
- package/dist/search/identifier-segments.js +205 -0
- package/dist/search/identifier-segments.js.map +1 -0
- package/dist/search/query-parser.d.ts +57 -0
- package/dist/search/query-parser.d.ts.map +1 -0
- package/dist/search/query-parser.js +177 -0
- package/dist/search/query-parser.js.map +1 -0
- package/dist/search/query-paths.d.ts +57 -0
- package/dist/search/query-paths.d.ts.map +1 -0
- package/dist/search/query-paths.js +298 -0
- package/dist/search/query-paths.js.map +1 -0
- package/dist/search/query-utils.d.ts +102 -0
- package/dist/search/query-utils.d.ts.map +1 -0
- package/dist/search/query-utils.js +487 -0
- package/dist/search/query-utils.js.map +1 -0
- package/dist/sync/git-hooks.d.ts +45 -0
- package/dist/sync/git-hooks.d.ts.map +1 -0
- package/dist/sync/git-hooks.js +227 -0
- package/dist/sync/git-hooks.js.map +1 -0
- package/dist/sync/index.d.ts +19 -0
- package/dist/sync/index.d.ts.map +1 -0
- package/dist/sync/index.js +35 -0
- package/dist/sync/index.js.map +1 -0
- package/dist/sync/watch-policy.d.ts +48 -0
- package/dist/sync/watch-policy.d.ts.map +1 -0
- package/dist/sync/watch-policy.js +124 -0
- package/dist/sync/watch-policy.js.map +1 -0
- package/dist/sync/watcher.d.ts +401 -0
- package/dist/sync/watcher.d.ts.map +1 -0
- package/dist/sync/watcher.js +967 -0
- package/dist/sync/watcher.js.map +1 -0
- package/dist/sync/worktree.d.ts +63 -0
- package/dist/sync/worktree.d.ts.map +1 -0
- package/dist/sync/worktree.js +182 -0
- package/dist/sync/worktree.js.map +1 -0
- package/dist/telemetry/index.d.ts +143 -0
- package/dist/telemetry/index.d.ts.map +1 -0
- package/dist/telemetry/index.js +541 -0
- package/dist/telemetry/index.js.map +1 -0
- package/dist/types.d.ts +486 -0
- package/dist/types.d.ts.map +1 -0
- package/dist/types.js +118 -0
- package/dist/types.js.map +1 -0
- package/dist/ui/color.d.ts +21 -0
- package/dist/ui/color.d.ts.map +1 -0
- package/dist/ui/color.js +42 -0
- package/dist/ui/color.js.map +1 -0
- package/dist/ui/glyphs.d.ts +67 -0
- package/dist/ui/glyphs.d.ts.map +1 -0
- package/dist/ui/glyphs.js +125 -0
- package/dist/ui/glyphs.js.map +1 -0
- package/dist/ui/shimmer-progress.d.ts +11 -0
- package/dist/ui/shimmer-progress.d.ts.map +1 -0
- package/dist/ui/shimmer-progress.js +164 -0
- package/dist/ui/shimmer-progress.js.map +1 -0
- package/dist/ui/shimmer-worker.d.ts +2 -0
- package/dist/ui/shimmer-worker.d.ts.map +1 -0
- package/dist/ui/shimmer-worker.js +126 -0
- package/dist/ui/shimmer-worker.js.map +1 -0
- package/dist/ui/types.d.ts +15 -0
- package/dist/ui/types.d.ts.map +1 -0
- package/dist/ui/types.js +3 -0
- package/dist/ui/types.js.map +1 -0
- package/dist/ui-server/api/deadcode.d.ts +84 -0
- package/dist/ui-server/api/deadcode.d.ts.map +1 -0
- package/dist/ui-server/api/deadcode.js +136 -0
- package/dist/ui-server/api/deadcode.js.map +1 -0
- package/dist/ui-server/api/effects.d.ts +87 -0
- package/dist/ui-server/api/effects.d.ts.map +1 -0
- package/dist/ui-server/api/effects.js +499 -0
- package/dist/ui-server/api/effects.js.map +1 -0
- package/dist/ui-server/api/entrypoints.d.ts +86 -0
- package/dist/ui-server/api/entrypoints.d.ts.map +1 -0
- package/dist/ui-server/api/entrypoints.js +279 -0
- package/dist/ui-server/api/entrypoints.js.map +1 -0
- package/dist/ui-server/api/events.d.ts +183 -0
- package/dist/ui-server/api/events.d.ts.map +1 -0
- package/dist/ui-server/api/events.js +430 -0
- package/dist/ui-server/api/events.js.map +1 -0
- package/dist/ui-server/api/file.d.ts +66 -0
- package/dist/ui-server/api/file.d.ts.map +1 -0
- package/dist/ui-server/api/file.js +222 -0
- package/dist/ui-server/api/file.js.map +1 -0
- package/dist/ui-server/api/filecode.d.ts +126 -0
- package/dist/ui-server/api/filecode.d.ts.map +1 -0
- package/dist/ui-server/api/filecode.js +205 -0
- package/dist/ui-server/api/filecode.js.map +1 -0
- package/dist/ui-server/api/flow.d.ts +226 -0
- package/dist/ui-server/api/flow.d.ts.map +1 -0
- package/dist/ui-server/api/flow.js +611 -0
- package/dist/ui-server/api/flow.js.map +1 -0
- package/dist/ui-server/api/hierarchy.d.ts +81 -0
- package/dist/ui-server/api/hierarchy.d.ts.map +1 -0
- package/dist/ui-server/api/hierarchy.js +92 -0
- package/dist/ui-server/api/hierarchy.js.map +1 -0
- package/dist/ui-server/api/index.d.ts +90 -0
- package/dist/ui-server/api/index.d.ts.map +1 -0
- package/dist/ui-server/api/index.js +332 -0
- package/dist/ui-server/api/index.js.map +1 -0
- package/dist/ui-server/api/map.d.ts +187 -0
- package/dist/ui-server/api/map.d.ts.map +1 -0
- package/dist/ui-server/api/map.js +498 -0
- package/dist/ui-server/api/map.js.map +1 -0
- package/dist/ui-server/api/node.d.ts +81 -0
- package/dist/ui-server/api/node.d.ts.map +1 -0
- package/dist/ui-server/api/node.js +388 -0
- package/dist/ui-server/api/node.js.map +1 -0
- package/dist/ui-server/api/nodes.d.ts +25 -0
- package/dist/ui-server/api/nodes.d.ts.map +1 -0
- package/dist/ui-server/api/nodes.js +45 -0
- package/dist/ui-server/api/nodes.js.map +1 -0
- package/dist/ui-server/api/program.d.ts +139 -0
- package/dist/ui-server/api/program.d.ts.map +1 -0
- package/dist/ui-server/api/program.js +315 -0
- package/dist/ui-server/api/program.js.map +1 -0
- package/dist/ui-server/api/respond.d.ts +76 -0
- package/dist/ui-server/api/respond.d.ts.map +1 -0
- package/dist/ui-server/api/respond.js +186 -0
- package/dist/ui-server/api/respond.js.map +1 -0
- package/dist/ui-server/api/route-roots.d.ts +39 -0
- package/dist/ui-server/api/route-roots.d.ts.map +1 -0
- package/dist/ui-server/api/route-roots.js +96 -0
- package/dist/ui-server/api/route-roots.js.map +1 -0
- package/dist/ui-server/api/routes.d.ts +59 -0
- package/dist/ui-server/api/routes.d.ts.map +1 -0
- package/dist/ui-server/api/routes.js +112 -0
- package/dist/ui-server/api/routes.js.map +1 -0
- package/dist/ui-server/api/screens.d.ts +117 -0
- package/dist/ui-server/api/screens.d.ts.map +1 -0
- package/dist/ui-server/api/screens.js +611 -0
- package/dist/ui-server/api/screens.js.map +1 -0
- package/dist/ui-server/api/search.d.ts +29 -0
- package/dist/ui-server/api/search.d.ts.map +1 -0
- package/dist/ui-server/api/search.js +232 -0
- package/dist/ui-server/api/search.js.map +1 -0
- package/dist/ui-server/api/session.d.ts +52 -0
- package/dist/ui-server/api/session.d.ts.map +1 -0
- package/dist/ui-server/api/session.js +196 -0
- package/dist/ui-server/api/session.js.map +1 -0
- package/dist/ui-server/api/source.d.ts +200 -0
- package/dist/ui-server/api/source.d.ts.map +1 -0
- package/dist/ui-server/api/source.js +419 -0
- package/dist/ui-server/api/source.js.map +1 -0
- package/dist/ui-server/api/stats.d.ts +27 -0
- package/dist/ui-server/api/stats.d.ts.map +1 -0
- package/dist/ui-server/api/stats.js +164 -0
- package/dist/ui-server/api/stats.js.map +1 -0
- package/dist/ui-server/api/steps.d.ts +274 -0
- package/dist/ui-server/api/steps.d.ts.map +1 -0
- package/dist/ui-server/api/steps.js +1446 -0
- package/dist/ui-server/api/steps.js.map +1 -0
- package/dist/ui-server/api/trail-store.d.ts +142 -0
- package/dist/ui-server/api/trail-store.d.ts.map +1 -0
- package/dist/ui-server/api/trail-store.js +323 -0
- package/dist/ui-server/api/trail-store.js.map +1 -0
- package/dist/ui-server/api/trails.d.ts +163 -0
- package/dist/ui-server/api/trails.d.ts.map +1 -0
- package/dist/ui-server/api/trails.js +369 -0
- package/dist/ui-server/api/trails.js.map +1 -0
- package/dist/ui-server/api/when.d.ts +125 -0
- package/dist/ui-server/api/when.d.ts.map +1 -0
- package/dist/ui-server/api/when.js +251 -0
- package/dist/ui-server/api/when.js.map +1 -0
- package/dist/ui-server/api/wire.d.ts +179 -0
- package/dist/ui-server/api/wire.d.ts.map +1 -0
- package/dist/ui-server/api/wire.js +231 -0
- package/dist/ui-server/api/wire.js.map +1 -0
- package/dist/ui-server/assets.d.ts +40 -0
- package/dist/ui-server/assets.d.ts.map +1 -0
- package/dist/ui-server/assets.js +110 -0
- package/dist/ui-server/assets.js.map +1 -0
- package/dist/ui-server/constants.d.ts +32 -0
- package/dist/ui-server/constants.d.ts.map +1 -0
- package/dist/ui-server/constants.js +35 -0
- package/dist/ui-server/constants.js.map +1 -0
- package/dist/ui-server/highlight/index.d.ts +113 -0
- package/dist/ui-server/highlight/index.d.ts.map +1 -0
- package/dist/ui-server/highlight/index.js +307 -0
- package/dist/ui-server/highlight/index.js.map +1 -0
- package/dist/ui-server/highlight/languages.d.ts +36 -0
- package/dist/ui-server/highlight/languages.d.ts.map +1 -0
- package/dist/ui-server/highlight/languages.js +50 -0
- package/dist/ui-server/highlight/languages.js.map +1 -0
- package/dist/ui-server/index.d.ts +92 -0
- package/dist/ui-server/index.d.ts.map +1 -0
- package/dist/ui-server/index.js +399 -0
- package/dist/ui-server/index.js.map +1 -0
- package/dist/ui-server/open-browser.d.ts +31 -0
- package/dist/ui-server/open-browser.d.ts.map +1 -0
- package/dist/ui-server/open-browser.js +79 -0
- package/dist/ui-server/open-browser.js.map +1 -0
- package/dist/ui-server/security.d.ts +127 -0
- package/dist/ui-server/security.d.ts.map +1 -0
- package/dist/ui-server/security.js +332 -0
- package/dist/ui-server/security.js.map +1 -0
- package/dist/ui-server/static.d.ts +45 -0
- package/dist/ui-server/static.d.ts.map +1 -0
- package/dist/ui-server/static.js +165 -0
- package/dist/ui-server/static.js.map +1 -0
- package/dist/upgrade/index.d.ts +177 -0
- package/dist/upgrade/index.d.ts.map +1 -0
- package/dist/upgrade/index.js +665 -0
- package/dist/upgrade/index.js.map +1 -0
- package/dist/upgrade/remove-binary.d.ts +87 -0
- package/dist/upgrade/remove-binary.d.ts.map +1 -0
- package/dist/upgrade/remove-binary.js +289 -0
- package/dist/upgrade/remove-binary.js.map +1 -0
- package/dist/upgrade/update-check.d.ts +92 -0
- package/dist/upgrade/update-check.d.ts.map +1 -0
- package/dist/upgrade/update-check.js +258 -0
- package/dist/upgrade/update-check.js.map +1 -0
- package/dist/utils.d.ts +224 -0
- package/dist/utils.d.ts.map +1 -0
- package/dist/utils.js +583 -0
- package/dist/utils.js.map +1 -0
- package/dist/viewer/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
- package/dist/viewer/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
- package/dist/viewer/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-400-italic-66oory27.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
- package/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 +0 -0
- package/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff +0 -0
- package/dist/viewer/assets/index-2IPslW5t.js +13 -0
- package/dist/viewer/assets/index-DSwi2Seu.css +1 -0
- package/dist/viewer/index.html +16 -0
- package/package.json +67 -0
|
@@ -0,0 +1,187 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* `GET /api/map` — the repository at module granularity.
|
|
3
|
+
*
|
|
4
|
+
* The Map answers "what is in here and how is it organised" without anybody
|
|
5
|
+
* having drawn a diagram: modules are directories, the arrows between them are
|
|
6
|
+
* the edges the index already holds, and the vertical order falls out of the
|
|
7
|
+
* dependency direction (design spec §3.6). This module produces the *data*;
|
|
8
|
+
* the layering, cycle-breaking and geometry are pure functions in the viewer
|
|
9
|
+
* (`ui/src/lib/map-model.ts`), so toggling tests or selecting a module never
|
|
10
|
+
* costs a round-trip.
|
|
11
|
+
*
|
|
12
|
+
* Three decisions shape the payload, and all three are about not lying:
|
|
13
|
+
*
|
|
14
|
+
* **A module is a directory, not a guess.** `moduleIdFor` maps each indexed
|
|
15
|
+
* file to the first {@link MapQuery.depth} path segments under the chosen root.
|
|
16
|
+
* A file sitting loose in the root gets folded into one `(root files)` box —
|
|
17
|
+
* except a façade (`index.ts`, `lib.rs`, `__init__.py`), which is its own box
|
|
18
|
+
* because it is the thing everything else imports. No clustering, no
|
|
19
|
+
* heuristics about "what belongs together": if two files are in the same
|
|
20
|
+
* directory the repository already said they belong together.
|
|
21
|
+
*
|
|
22
|
+
* **Weight counts edges; layering counts *declared* edges.** A link's `count`
|
|
23
|
+
* is every confident cross-module edge behind it, which is what the reader
|
|
24
|
+
* sees as thickness. Its `declared` count is the subset resolved through an
|
|
25
|
+
* import, a qualified name, an inheritance clause or a typed receiver — and
|
|
26
|
+
* that is what the layout layers on. The difference is not academic: on this
|
|
27
|
+
* repository, bare name matching resolves calls to `run`, `push` and `finish`
|
|
28
|
+
* across unrelated directories, and layering on raw counts puts the storage
|
|
29
|
+
* layer directly under the CLI. Layering on declared edges reproduces the
|
|
30
|
+
* pipeline the project's own docs describe.
|
|
31
|
+
*
|
|
32
|
+
* **Nothing is dropped silently.** Uncertain edges (confidence below
|
|
33
|
+
* {@link UNCERTAIN_BELOW}) are excluded from every count, and how many were
|
|
34
|
+
* excluded rides on the payload so the side panel can say so.
|
|
35
|
+
*/
|
|
36
|
+
import type { CodeGraph } from '../../index';
|
|
37
|
+
import type { EdgeKind, Language } from '../../types';
|
|
38
|
+
import { type WireList } from './wire';
|
|
39
|
+
/**
|
|
40
|
+
* The edge kinds that count as "module A reaches into module B".
|
|
41
|
+
*
|
|
42
|
+
* `contains` is absent on purpose — a file containing its own symbols is not a
|
|
43
|
+
* dependency, and including it would make every module depend on itself.
|
|
44
|
+
*/
|
|
45
|
+
export declare const MAP_EDGE_KINDS: readonly EdgeKind[];
|
|
46
|
+
/** Id of the bucket loose files fall into. Deliberately not a real directory name. */
|
|
47
|
+
export declare function rootFilesId(root: string): string;
|
|
48
|
+
export interface WireMapModule {
|
|
49
|
+
/** Directory path, or the `(root files)` bucket, or a façade file's own path. */
|
|
50
|
+
id: string;
|
|
51
|
+
/** Last path segment — what the node label shows when the id is long. */
|
|
52
|
+
label: string;
|
|
53
|
+
files: number;
|
|
54
|
+
symbols: number;
|
|
55
|
+
/** File count by language, most files first. */
|
|
56
|
+
languages: Array<{
|
|
57
|
+
language: Language;
|
|
58
|
+
files: number;
|
|
59
|
+
}>;
|
|
60
|
+
/** More than half its files are tests — drawn dashed, hidden by default. */
|
|
61
|
+
test: boolean;
|
|
62
|
+
/**
|
|
63
|
+
* How many of its files are tool-generated. A module whose files are ALL
|
|
64
|
+
* generated is drawn in ink-4 (design spec §2.6): code nobody wrote by hand
|
|
65
|
+
* and nobody deletes by hand.
|
|
66
|
+
*/
|
|
67
|
+
generated: number;
|
|
68
|
+
/** Which of {@link fileList}'s entries are generated, so a row can dim too. */
|
|
69
|
+
generatedFiles: string[];
|
|
70
|
+
/** True when this box is a single file kept out of the root bucket (a façade). */
|
|
71
|
+
facade: boolean;
|
|
72
|
+
/** Its files, capped — what the side panel lists when the module is selected. */
|
|
73
|
+
fileList: WireList<string>;
|
|
74
|
+
}
|
|
75
|
+
export interface WireMapLink {
|
|
76
|
+
source: string;
|
|
77
|
+
target: string;
|
|
78
|
+
/** Every confident cross-module edge behind this link. Drives thickness. */
|
|
79
|
+
count: number;
|
|
80
|
+
/**
|
|
81
|
+
* The subset resolved through an import, a qualified name, an inheritance
|
|
82
|
+
* clause or a typed receiver. Drives the layering — see the module header.
|
|
83
|
+
*/
|
|
84
|
+
declared: number;
|
|
85
|
+
/** `count` broken down by edge kind, biggest first. */
|
|
86
|
+
byKind: Array<{
|
|
87
|
+
kind: EdgeKind;
|
|
88
|
+
count: number;
|
|
89
|
+
}>;
|
|
90
|
+
/**
|
|
91
|
+
* The busiest symbol pairs behind the link, at most
|
|
92
|
+
* {@link TOP_PAIRS_PER_LINK}, declared ones first.
|
|
93
|
+
*/
|
|
94
|
+
topPairs: Array<{
|
|
95
|
+
from: string;
|
|
96
|
+
to: string;
|
|
97
|
+
count: number;
|
|
98
|
+
declared: number;
|
|
99
|
+
}>;
|
|
100
|
+
}
|
|
101
|
+
export interface WireMapCycle {
|
|
102
|
+
/** How many files are in the component. `files` may be shorter. */
|
|
103
|
+
size: number;
|
|
104
|
+
/** The files, capped — a 200-file knot is a fact, not a list anybody reads. */
|
|
105
|
+
files: string[];
|
|
106
|
+
/** The modules the cycle passes through, deduped in order. */
|
|
107
|
+
modules: string[];
|
|
108
|
+
}
|
|
109
|
+
export interface WireMapPayload {
|
|
110
|
+
root: string;
|
|
111
|
+
depth: number;
|
|
112
|
+
/** Every root the selector may offer, this index's own directories. */
|
|
113
|
+
roots: Array<{
|
|
114
|
+
root: string;
|
|
115
|
+
label: string;
|
|
116
|
+
files: number;
|
|
117
|
+
}>;
|
|
118
|
+
modules: WireMapModule[];
|
|
119
|
+
links: WireMapLink[];
|
|
120
|
+
/**
|
|
121
|
+
* File-level circular dependencies — the strongly connected components of
|
|
122
|
+
* the file graph, which is what `findCircularDependencies` reports, computed
|
|
123
|
+
* from one query so it stays affordable on a large index.
|
|
124
|
+
*/
|
|
125
|
+
cycles: {
|
|
126
|
+
total: number;
|
|
127
|
+
shown: number;
|
|
128
|
+
truncated: boolean;
|
|
129
|
+
items: WireMapCycle[];
|
|
130
|
+
};
|
|
131
|
+
excluded: {
|
|
132
|
+
/** Cross-module edges left out for being name-only guesses. */
|
|
133
|
+
uncertainEdges: number;
|
|
134
|
+
/** The confidence floor applied. */
|
|
135
|
+
confidenceBelow: number;
|
|
136
|
+
};
|
|
137
|
+
index: {
|
|
138
|
+
lastIndexedAt: number | null;
|
|
139
|
+
edges: number;
|
|
140
|
+
files: number;
|
|
141
|
+
};
|
|
142
|
+
/** How long the aggregation took, and whether this answer came from the cache. */
|
|
143
|
+
timing: {
|
|
144
|
+
elapsedMs: number;
|
|
145
|
+
cached: boolean;
|
|
146
|
+
};
|
|
147
|
+
}
|
|
148
|
+
export interface MapQuery {
|
|
149
|
+
root: string;
|
|
150
|
+
depth: number;
|
|
151
|
+
}
|
|
152
|
+
/** Strip a trailing slash and any leading `./`, so `src/` and `src` are one root. */
|
|
153
|
+
export declare function normalizeRoot(raw: string | undefined): string;
|
|
154
|
+
/**
|
|
155
|
+
* Which module a file belongs to, or `null` when it is outside the root.
|
|
156
|
+
*
|
|
157
|
+
* `depth` segments under the root name the module. A file with fewer segments
|
|
158
|
+
* than that is loose in the root: a façade keeps its own box, everything else
|
|
159
|
+
* joins the `(root files)` bucket.
|
|
160
|
+
*/
|
|
161
|
+
export declare function moduleIdFor(filePath: string, root: string, depth: number): {
|
|
162
|
+
id: string;
|
|
163
|
+
facade: boolean;
|
|
164
|
+
} | null;
|
|
165
|
+
/**
|
|
166
|
+
* The root the map opens on: the directory holding the most non-test symbols.
|
|
167
|
+
*
|
|
168
|
+
* A repository's source almost always lives under one directory (`src`, `lib`,
|
|
169
|
+
* `pkg`, `app`), and opening there is what keeps the default map about the
|
|
170
|
+
* program rather than about its tests, scripts and sibling packages. The
|
|
171
|
+
* fallback is the repository root, which is correct for a flat project.
|
|
172
|
+
*
|
|
173
|
+
* A directory only wins if it holds a clear majority of the symbols — anything
|
|
174
|
+
* less and the honest answer is "this repository has no single source root".
|
|
175
|
+
*/
|
|
176
|
+
export declare function pickDefaultRoot(files: ReadonlyArray<{
|
|
177
|
+
path: string;
|
|
178
|
+
symbols: number;
|
|
179
|
+
test: boolean;
|
|
180
|
+
}>): string;
|
|
181
|
+
export declare function resetMapCache(): void;
|
|
182
|
+
export declare function parseMapQuery(query: URLSearchParams): {
|
|
183
|
+
root: string | null;
|
|
184
|
+
depth: number;
|
|
185
|
+
};
|
|
186
|
+
export declare function buildMap(cg: CodeGraph, projectRoot: string, query: URLSearchParams): WireMapPayload;
|
|
187
|
+
//# sourceMappingURL=map.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"map.d.ts","sourceRoot":"","sources":["../../../src/ui-server/api/map.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GAkCG;AAEH,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,aAAa,CAAC;AAC7C,OAAO,KAAK,EAAE,QAAQ,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AAGtD,OAAO,EAA0C,KAAK,QAAQ,EAAE,MAAM,QAAQ,CAAC;AAE/E;;;;;GAKG;AACH,eAAO,MAAM,cAAc,EAAE,SAAS,QAAQ,EAQ7C,CAAC;AAwCF,sFAAsF;AACtF,wBAAgB,WAAW,CAAC,IAAI,EAAE,MAAM,GAAG,MAAM,CAEhD;AAMD,MAAM,WAAW,aAAa;IAC5B,iFAAiF;IACjF,EAAE,EAAE,MAAM,CAAC;IACX,yEAAyE;IACzE,KAAK,EAAE,MAAM,CAAC;IACd,KAAK,EAAE,MAAM,CAAC;IACd,OAAO,EAAE,MAAM,CAAC;IAChB,gDAAgD;IAChD,SAAS,EAAE,KAAK,CAAC;QAAE,QAAQ,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACxD,4EAA4E;IAC5E,IAAI,EAAE,OAAO,CAAC;IACd;;;;OAIG;IACH,SAAS,EAAE,MAAM,CAAC;IAClB,+EAA+E;IAC/E,cAAc,EAAE,MAAM,EAAE,CAAC;IACzB,kFAAkF;IAClF,MAAM,EAAE,OAAO,CAAC;IAChB,iFAAiF;IACjF,QAAQ,EAAE,QAAQ,CAAC,MAAM,CAAC,CAAC;CAC5B;AAED,MAAM,WAAW,WAAW;IAC1B,MAAM,EAAE,MAAM,CAAC;IACf,MAAM,EAAE,MAAM,CAAC;IACf,4EAA4E;IAC5E,KAAK,EAAE,MAAM,CAAC;IACd;;;OAGG;IACH,QAAQ,EAAE,MAAM,CAAC;IACjB,uDAAuD;IACvD,MAAM,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,QAAQ,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IACjD;;;OAGG;IACH,QAAQ,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,EAAE,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,QAAQ,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;CAChF;AAED,MAAM,WAAW,YAAY;IAC3B,mEAAmE;IACnE,IAAI,EAAE,MAAM,CAAC;IACb,+EAA+E;IAC/E,KAAK,EAAE,MAAM,EAAE,CAAC;IAChB,8DAA8D;IAC9D,OAAO,EAAE,MAAM,EAAE,CAAC;CACnB;AAED,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;IACd,uEAAuE;IACvE,KAAK,EAAE,KAAK,CAAC;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC,CAAC;IAC7D,OAAO,EAAE,aAAa,EAAE,CAAC;IACzB,KAAK,EAAE,WAAW,EAAE,CAAC;IACrB;;;;OAIG;IACH,MAAM,EAAE;QAAE,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,SAAS,EAAE,OAAO,CAAC;QAAC,KAAK,EAAE,YAAY,EAAE,CAAA;KAAE,CAAC;IACpF,QAAQ,EAAE;QACR,+DAA+D;QAC/D,cAAc,EAAE,MAAM,CAAC;QACvB,oCAAoC;QACpC,eAAe,EAAE,MAAM,CAAC;KACzB,CAAC;IACF,KAAK,EAAE;QAAE,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;QAAC,KAAK,EAAE,MAAM,CAAC;QAAC,KAAK,EAAE,MAAM,CAAA;KAAE,CAAC;IACtE,kFAAkF;IAClF,MAAM,EAAE;QAAE,SAAS,EAAE,MAAM,CAAC;QAAC,MAAM,EAAE,OAAO,CAAA;KAAE,CAAC;CAChD;AAED,MAAM,WAAW,QAAQ;IACvB,IAAI,EAAE,MAAM,CAAC;IACb,KAAK,EAAE,MAAM,CAAC;CACf;AAMD,qFAAqF;AACrF,wBAAgB,aAAa,CAAC,GAAG,EAAE,MAAM,GAAG,SAAS,GAAG,MAAM,CAM7D;AAOD;;;;;;GAMG;AACH,wBAAgB,WAAW,CACzB,QAAQ,EAAE,MAAM,EAChB,IAAI,EAAE,MAAM,EACZ,KAAK,EAAE,MAAM,GACZ;IAAE,EAAE,EAAE,MAAM,CAAC;IAAC,MAAM,EAAE,OAAO,CAAA;CAAE,GAAG,IAAI,CAmBxC;AAED;;;;;;;;;;GAUG;AACH,wBAAgB,eAAe,CAC7B,KAAK,EAAE,aAAa,CAAC;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,OAAO,EAAE,MAAM,CAAC;IAAC,IAAI,EAAE,OAAO,CAAA;CAAE,CAAC,GACrE,MAAM,CA0BR;AAmBD,wBAAgB,aAAa,IAAI,IAAI,CAEpC;AAMD,wBAAgB,aAAa,CAAC,KAAK,EAAE,eAAe,GAAG;IAAE,IAAI,EAAE,MAAM,GAAG,IAAI,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,CAW5F;AAED,wBAAgB,QAAQ,CAAC,EAAE,EAAE,SAAS,EAAE,WAAW,EAAE,MAAM,EAAE,KAAK,EAAE,eAAe,GAAG,cAAc,CA0KnG"}
|
|
@@ -0,0 +1,498 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* `GET /api/map` — the repository at module granularity.
|
|
4
|
+
*
|
|
5
|
+
* The Map answers "what is in here and how is it organised" without anybody
|
|
6
|
+
* having drawn a diagram: modules are directories, the arrows between them are
|
|
7
|
+
* the edges the index already holds, and the vertical order falls out of the
|
|
8
|
+
* dependency direction (design spec §3.6). This module produces the *data*;
|
|
9
|
+
* the layering, cycle-breaking and geometry are pure functions in the viewer
|
|
10
|
+
* (`ui/src/lib/map-model.ts`), so toggling tests or selecting a module never
|
|
11
|
+
* costs a round-trip.
|
|
12
|
+
*
|
|
13
|
+
* Three decisions shape the payload, and all three are about not lying:
|
|
14
|
+
*
|
|
15
|
+
* **A module is a directory, not a guess.** `moduleIdFor` maps each indexed
|
|
16
|
+
* file to the first {@link MapQuery.depth} path segments under the chosen root.
|
|
17
|
+
* A file sitting loose in the root gets folded into one `(root files)` box —
|
|
18
|
+
* except a façade (`index.ts`, `lib.rs`, `__init__.py`), which is its own box
|
|
19
|
+
* because it is the thing everything else imports. No clustering, no
|
|
20
|
+
* heuristics about "what belongs together": if two files are in the same
|
|
21
|
+
* directory the repository already said they belong together.
|
|
22
|
+
*
|
|
23
|
+
* **Weight counts edges; layering counts *declared* edges.** A link's `count`
|
|
24
|
+
* is every confident cross-module edge behind it, which is what the reader
|
|
25
|
+
* sees as thickness. Its `declared` count is the subset resolved through an
|
|
26
|
+
* import, a qualified name, an inheritance clause or a typed receiver — and
|
|
27
|
+
* that is what the layout layers on. The difference is not academic: on this
|
|
28
|
+
* repository, bare name matching resolves calls to `run`, `push` and `finish`
|
|
29
|
+
* across unrelated directories, and layering on raw counts puts the storage
|
|
30
|
+
* layer directly under the CLI. Layering on declared edges reproduces the
|
|
31
|
+
* pipeline the project's own docs describe.
|
|
32
|
+
*
|
|
33
|
+
* **Nothing is dropped silently.** Uncertain edges (confidence below
|
|
34
|
+
* {@link UNCERTAIN_BELOW}) are excluded from every count, and how many were
|
|
35
|
+
* excluded rides on the payload so the side panel can say so.
|
|
36
|
+
*/
|
|
37
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
38
|
+
exports.MAP_EDGE_KINDS = void 0;
|
|
39
|
+
exports.rootFilesId = rootFilesId;
|
|
40
|
+
exports.normalizeRoot = normalizeRoot;
|
|
41
|
+
exports.moduleIdFor = moduleIdFor;
|
|
42
|
+
exports.pickDefaultRoot = pickDefaultRoot;
|
|
43
|
+
exports.resetMapCache = resetMapCache;
|
|
44
|
+
exports.parseMapQuery = parseMapQuery;
|
|
45
|
+
exports.buildMap = buildMap;
|
|
46
|
+
const query_utils_1 = require("../../search/query-utils");
|
|
47
|
+
const respond_1 = require("./respond");
|
|
48
|
+
const wire_1 = require("./wire");
|
|
49
|
+
/**
|
|
50
|
+
* The edge kinds that count as "module A reaches into module B".
|
|
51
|
+
*
|
|
52
|
+
* `contains` is absent on purpose — a file containing its own symbols is not a
|
|
53
|
+
* dependency, and including it would make every module depend on itself.
|
|
54
|
+
*/
|
|
55
|
+
exports.MAP_EDGE_KINDS = [
|
|
56
|
+
'calls',
|
|
57
|
+
'imports',
|
|
58
|
+
'references',
|
|
59
|
+
'instantiates',
|
|
60
|
+
'extends',
|
|
61
|
+
'implements',
|
|
62
|
+
'navigates',
|
|
63
|
+
];
|
|
64
|
+
/**
|
|
65
|
+
* The kinds whose symbol pairs the tooltip names.
|
|
66
|
+
*
|
|
67
|
+
* A `references` edge to a type is real traffic but "Config → Config" is not
|
|
68
|
+
* an interesting row; calls and imports are what a reader wants named.
|
|
69
|
+
*/
|
|
70
|
+
const PAIR_EDGE_KINDS = ['calls', 'imports', 'instantiates', 'navigates'];
|
|
71
|
+
/** Symbol pairs kept per link — the tooltip shows four (design spec §3.6). */
|
|
72
|
+
const TOP_PAIRS_PER_LINK = 4;
|
|
73
|
+
/**
|
|
74
|
+
* File paths listed per module.
|
|
75
|
+
*
|
|
76
|
+
* The panel's file list is a drill-down, not a directory listing, and it rides
|
|
77
|
+
* on this payload so that clicking a module and then one of its files costs no
|
|
78
|
+
* round-trip at all. Capped because a module can hold hundreds of files and the
|
|
79
|
+
* map is not where you read them; `total` stays the real number.
|
|
80
|
+
*/
|
|
81
|
+
const MAX_FILES_PER_MODULE = 40;
|
|
82
|
+
/** Longest cycle reported, and how many. Beyond this a cycle list stops being readable. */
|
|
83
|
+
const MAX_FILE_CYCLES = 40;
|
|
84
|
+
const MAX_CYCLE_LENGTH = 12;
|
|
85
|
+
/** Default segments below the root that name a module. */
|
|
86
|
+
const DEFAULT_DEPTH = 1;
|
|
87
|
+
const MAX_DEPTH = 4;
|
|
88
|
+
/**
|
|
89
|
+
* Basenames that stay their own box when they sit loose in a module root.
|
|
90
|
+
*
|
|
91
|
+
* These are façades — the file every other module imports the directory
|
|
92
|
+
* *through*. Folding `src/index.ts` into a "(root files)" bucket with the type
|
|
93
|
+
* declarations next to it hides the busiest node on the map.
|
|
94
|
+
*/
|
|
95
|
+
const FACADE_STEMS = new Set(['index', 'main', 'lib', 'mod', '__init__', 'init']);
|
|
96
|
+
/** Id of the bucket loose files fall into. Deliberately not a real directory name. */
|
|
97
|
+
function rootFilesId(root) {
|
|
98
|
+
return root ? `${root}/(root files)` : '(root files)';
|
|
99
|
+
}
|
|
100
|
+
// =============================================================================
|
|
101
|
+
// Module naming
|
|
102
|
+
// =============================================================================
|
|
103
|
+
/** Strip a trailing slash and any leading `./`, so `src/` and `src` are one root. */
|
|
104
|
+
function normalizeRoot(raw) {
|
|
105
|
+
let root = (raw ?? '').trim().replace(/\\/g, '/');
|
|
106
|
+
while (root.startsWith('./'))
|
|
107
|
+
root = root.slice(2);
|
|
108
|
+
while (root.endsWith('/'))
|
|
109
|
+
root = root.slice(0, -1);
|
|
110
|
+
if (root === '.' || root === '/')
|
|
111
|
+
return '';
|
|
112
|
+
return root;
|
|
113
|
+
}
|
|
114
|
+
function stemOf(basename) {
|
|
115
|
+
const dot = basename.indexOf('.');
|
|
116
|
+
return dot <= 0 ? basename : basename.slice(0, dot);
|
|
117
|
+
}
|
|
118
|
+
/**
|
|
119
|
+
* Which module a file belongs to, or `null` when it is outside the root.
|
|
120
|
+
*
|
|
121
|
+
* `depth` segments under the root name the module. A file with fewer segments
|
|
122
|
+
* than that is loose in the root: a façade keeps its own box, everything else
|
|
123
|
+
* joins the `(root files)` bucket.
|
|
124
|
+
*/
|
|
125
|
+
function moduleIdFor(filePath, root, depth) {
|
|
126
|
+
const path = (0, wire_1.toPosixPath)(filePath);
|
|
127
|
+
let rel = path;
|
|
128
|
+
if (root) {
|
|
129
|
+
if (!path.startsWith(`${root}/`))
|
|
130
|
+
return null;
|
|
131
|
+
rel = path.slice(root.length + 1);
|
|
132
|
+
}
|
|
133
|
+
const parts = rel.split('/').filter(Boolean);
|
|
134
|
+
if (parts.length === 0)
|
|
135
|
+
return null;
|
|
136
|
+
if (parts.length <= depth) {
|
|
137
|
+
// A loose file. The directories it DOES have still qualify it, so
|
|
138
|
+
// `src/a/b.ts` at depth 2 lands in `src/a/(root files)`, not the top one.
|
|
139
|
+
const dir = [root, ...parts.slice(0, -1)].filter(Boolean).join('/');
|
|
140
|
+
if (FACADE_STEMS.has(stemOf(parts[parts.length - 1] ?? ''))) {
|
|
141
|
+
return { id: [root, ...parts].filter(Boolean).join('/'), facade: true };
|
|
142
|
+
}
|
|
143
|
+
return { id: rootFilesId(dir), facade: false };
|
|
144
|
+
}
|
|
145
|
+
return { id: [root, ...parts.slice(0, depth)].filter(Boolean).join('/'), facade: false };
|
|
146
|
+
}
|
|
147
|
+
/**
|
|
148
|
+
* The root the map opens on: the directory holding the most non-test symbols.
|
|
149
|
+
*
|
|
150
|
+
* A repository's source almost always lives under one directory (`src`, `lib`,
|
|
151
|
+
* `pkg`, `app`), and opening there is what keeps the default map about the
|
|
152
|
+
* program rather than about its tests, scripts and sibling packages. The
|
|
153
|
+
* fallback is the repository root, which is correct for a flat project.
|
|
154
|
+
*
|
|
155
|
+
* A directory only wins if it holds a clear majority of the symbols — anything
|
|
156
|
+
* less and the honest answer is "this repository has no single source root".
|
|
157
|
+
*/
|
|
158
|
+
function pickDefaultRoot(files) {
|
|
159
|
+
const byDir = new Map();
|
|
160
|
+
let total = 0;
|
|
161
|
+
for (const file of files) {
|
|
162
|
+
if (file.test)
|
|
163
|
+
continue;
|
|
164
|
+
const slash = file.path.indexOf('/');
|
|
165
|
+
if (slash <= 0)
|
|
166
|
+
continue;
|
|
167
|
+
const dir = file.path.slice(0, slash);
|
|
168
|
+
byDir.set(dir, (byDir.get(dir) ?? 0) + file.symbols);
|
|
169
|
+
total += file.symbols;
|
|
170
|
+
}
|
|
171
|
+
if (total === 0)
|
|
172
|
+
return '';
|
|
173
|
+
let best = '';
|
|
174
|
+
let bestSymbols = 0;
|
|
175
|
+
let second = 0;
|
|
176
|
+
for (const [dir, symbols] of [...byDir].sort((a, b) => a[0].localeCompare(b[0]))) {
|
|
177
|
+
if (symbols > bestSymbols) {
|
|
178
|
+
second = bestSymbols;
|
|
179
|
+
best = dir;
|
|
180
|
+
bestSymbols = symbols;
|
|
181
|
+
}
|
|
182
|
+
else if (symbols > second)
|
|
183
|
+
second = symbols;
|
|
184
|
+
}
|
|
185
|
+
// A second root holding a fifth of the code (a React Native app's `ios/`
|
|
186
|
+
// beside its `src/`) belongs on the picture: map the whole project.
|
|
187
|
+
if (second * 5 >= total)
|
|
188
|
+
return '';
|
|
189
|
+
return bestSymbols * 2 > total ? best : '';
|
|
190
|
+
}
|
|
191
|
+
// =============================================================================
|
|
192
|
+
// Cache
|
|
193
|
+
// =============================================================================
|
|
194
|
+
/**
|
|
195
|
+
* One aggregation per (project, index build, root, depth).
|
|
196
|
+
*
|
|
197
|
+
* The map is the one screen whose cost is proportional to the whole edge
|
|
198
|
+
* table, so it is also the one screen worth caching. Keyed on the index's
|
|
199
|
+
* stamp AND its edge count, exactly as the blast scale is: a re-index or a
|
|
200
|
+
* sync that only moved edges must invalidate it, or the map draws a shape the
|
|
201
|
+
* code no longer has. A handful of entries, because the root selector is the
|
|
202
|
+
* only thing that varies.
|
|
203
|
+
*/
|
|
204
|
+
const CACHE_LIMIT = 8;
|
|
205
|
+
const cache = new Map();
|
|
206
|
+
function resetMapCache() {
|
|
207
|
+
cache.clear();
|
|
208
|
+
}
|
|
209
|
+
// =============================================================================
|
|
210
|
+
// Build
|
|
211
|
+
// =============================================================================
|
|
212
|
+
function parseMapQuery(query) {
|
|
213
|
+
const rawDepth = query.get('depth');
|
|
214
|
+
let depth = DEFAULT_DEPTH;
|
|
215
|
+
if (rawDepth !== null && rawDepth !== '') {
|
|
216
|
+
depth = Number.parseInt(rawDepth, 10);
|
|
217
|
+
if (!Number.isFinite(depth) || depth < 1 || depth > MAX_DEPTH) {
|
|
218
|
+
throw (0, respond_1.badRequest)(`depth must be a whole number from 1 to ${MAX_DEPTH}.`);
|
|
219
|
+
}
|
|
220
|
+
}
|
|
221
|
+
const rawRoot = query.get('root');
|
|
222
|
+
return { root: rawRoot === null ? null : normalizeRoot(rawRoot), depth };
|
|
223
|
+
}
|
|
224
|
+
function buildMap(cg, projectRoot, query) {
|
|
225
|
+
const started = Date.now();
|
|
226
|
+
let { root: requestedRoot, depth } = parseMapQuery(query);
|
|
227
|
+
const fileRecords = cg.getFiles().map((file) => {
|
|
228
|
+
const path = (0, wire_1.toPosixPath)(file.path);
|
|
229
|
+
return {
|
|
230
|
+
path,
|
|
231
|
+
language: file.language,
|
|
232
|
+
symbols: file.nodeCount ?? 0,
|
|
233
|
+
test: (0, query_utils_1.isTestFile)(path),
|
|
234
|
+
generated: file.generated === true,
|
|
235
|
+
};
|
|
236
|
+
});
|
|
237
|
+
const root = requestedRoot ?? pickDefaultRoot(fileRecords);
|
|
238
|
+
// Left to choose, and choosing the whole project (two substantial roots):
|
|
239
|
+
// one level deeper, so the boxes are `src/app` and `ios/CaptureView`, not
|
|
240
|
+
// `src` and `ios`.
|
|
241
|
+
if (requestedRoot === null && root === '' && !query.has('depth'))
|
|
242
|
+
depth = 2;
|
|
243
|
+
const stats = cg.getStats();
|
|
244
|
+
const key = [
|
|
245
|
+
projectRoot,
|
|
246
|
+
cg.getLastIndexedAt() ?? 0,
|
|
247
|
+
stats.edgeCount,
|
|
248
|
+
stats.fileCount,
|
|
249
|
+
root,
|
|
250
|
+
depth,
|
|
251
|
+
].join('\u0000');
|
|
252
|
+
const hit = cache.get(key);
|
|
253
|
+
if (hit) {
|
|
254
|
+
// Re-stamp rather than mutate: the cached body is shared, and a caller
|
|
255
|
+
// must not see another request's elapsed time.
|
|
256
|
+
return { ...hit, timing: { elapsedMs: Date.now() - started, cached: true } };
|
|
257
|
+
}
|
|
258
|
+
const assignments = [];
|
|
259
|
+
const modules = new Map();
|
|
260
|
+
const moduleOfFile = new Map();
|
|
261
|
+
for (const file of fileRecords) {
|
|
262
|
+
const assigned = moduleIdFor(file.path, root, depth);
|
|
263
|
+
if (assigned === null)
|
|
264
|
+
continue;
|
|
265
|
+
assignments.push({ filePath: file.path, module: assigned.id });
|
|
266
|
+
moduleOfFile.set(file.path, assigned.id);
|
|
267
|
+
let entry = modules.get(assigned.id);
|
|
268
|
+
if (!entry) {
|
|
269
|
+
entry = {
|
|
270
|
+
id: assigned.id,
|
|
271
|
+
facade: assigned.facade,
|
|
272
|
+
files: 0,
|
|
273
|
+
symbols: 0,
|
|
274
|
+
testFiles: 0,
|
|
275
|
+
generatedFiles: 0,
|
|
276
|
+
generatedPaths: new Set(),
|
|
277
|
+
languages: new Map(),
|
|
278
|
+
paths: [],
|
|
279
|
+
};
|
|
280
|
+
modules.set(assigned.id, entry);
|
|
281
|
+
}
|
|
282
|
+
entry.files += 1;
|
|
283
|
+
entry.paths.push(file.path);
|
|
284
|
+
entry.symbols += file.symbols;
|
|
285
|
+
if (file.test)
|
|
286
|
+
entry.testFiles += 1;
|
|
287
|
+
if (file.generated) {
|
|
288
|
+
entry.generatedFiles += 1;
|
|
289
|
+
entry.generatedPaths.add(file.path);
|
|
290
|
+
}
|
|
291
|
+
entry.languages.set(file.language, (entry.languages.get(file.language) ?? 0) + 1);
|
|
292
|
+
}
|
|
293
|
+
const aggregation = cg.getModuleAggregation(assignments, {
|
|
294
|
+
kinds: exports.MAP_EDGE_KINDS,
|
|
295
|
+
minConfidence: wire_1.UNCERTAIN_BELOW,
|
|
296
|
+
topPairsPerLink: TOP_PAIRS_PER_LINK,
|
|
297
|
+
pairKinds: PAIR_EDGE_KINDS,
|
|
298
|
+
});
|
|
299
|
+
const links = new Map();
|
|
300
|
+
let uncertainEdges = 0;
|
|
301
|
+
for (const row of aggregation.links) {
|
|
302
|
+
// The same pass counts what the confidence floor left out, so the "N
|
|
303
|
+
// name-only matches excluded" note reports the number the map actually
|
|
304
|
+
// applied rather than a second query's opinion of it.
|
|
305
|
+
uncertainEdges += row.uncertain;
|
|
306
|
+
if (row.count === 0)
|
|
307
|
+
continue;
|
|
308
|
+
const id = `${row.source}\u0000${row.target}`;
|
|
309
|
+
let link = links.get(id);
|
|
310
|
+
if (!link) {
|
|
311
|
+
link = { source: row.source, target: row.target, count: 0, declared: 0, byKind: [], topPairs: [] };
|
|
312
|
+
links.set(id, link);
|
|
313
|
+
}
|
|
314
|
+
link.count += row.count;
|
|
315
|
+
link.declared += row.declared;
|
|
316
|
+
link.byKind.push({ kind: row.kind, count: row.count });
|
|
317
|
+
}
|
|
318
|
+
for (const link of links.values()) {
|
|
319
|
+
link.byKind.sort((a, b) => b.count - a.count || a.kind.localeCompare(b.kind));
|
|
320
|
+
}
|
|
321
|
+
for (const pair of aggregation.pairs) {
|
|
322
|
+
const link = links.get(`${pair.source}\u0000${pair.target}`);
|
|
323
|
+
if (link && link.topPairs.length < TOP_PAIRS_PER_LINK) {
|
|
324
|
+
link.topPairs.push({
|
|
325
|
+
from: pair.from,
|
|
326
|
+
to: pair.to,
|
|
327
|
+
count: pair.count,
|
|
328
|
+
declared: pair.declared,
|
|
329
|
+
});
|
|
330
|
+
}
|
|
331
|
+
}
|
|
332
|
+
const payload = {
|
|
333
|
+
root,
|
|
334
|
+
depth,
|
|
335
|
+
roots: rootOptions(fileRecords),
|
|
336
|
+
modules: [...modules.values()]
|
|
337
|
+
.map((entry) => {
|
|
338
|
+
const shown = entry.paths.slice().sort().slice(0, MAX_FILES_PER_MODULE);
|
|
339
|
+
return {
|
|
340
|
+
id: entry.id,
|
|
341
|
+
label: entry.id.slice(entry.id.lastIndexOf('/') + 1) || entry.id,
|
|
342
|
+
files: entry.files,
|
|
343
|
+
symbols: entry.symbols,
|
|
344
|
+
languages: [...entry.languages]
|
|
345
|
+
.map(([language, files]) => ({ language, files }))
|
|
346
|
+
.sort((a, b) => b.files - a.files || a.language.localeCompare(b.language)),
|
|
347
|
+
test: entry.testFiles * 2 > entry.files,
|
|
348
|
+
generated: entry.generatedFiles,
|
|
349
|
+
facade: entry.facade,
|
|
350
|
+
// Only the SHOWN paths, so the list the panel dims and the list it
|
|
351
|
+
// draws are the same list — the count-equals-list rule.
|
|
352
|
+
generatedFiles: shown.filter((path) => entry.generatedPaths.has(path)),
|
|
353
|
+
fileList: (0, wire_1.wireList)(shown, entry.files),
|
|
354
|
+
};
|
|
355
|
+
})
|
|
356
|
+
// Sorted so two runs over one index produce byte-identical payloads —
|
|
357
|
+
// the layout is deterministic, and it cannot be if its input is not.
|
|
358
|
+
.sort((a, b) => a.id.localeCompare(b.id)),
|
|
359
|
+
links: [...links.values()].sort((a, b) => a.source.localeCompare(b.source) || a.target.localeCompare(b.target)),
|
|
360
|
+
cycles: fileCycles(cg, moduleOfFile),
|
|
361
|
+
excluded: { uncertainEdges, confidenceBelow: wire_1.UNCERTAIN_BELOW },
|
|
362
|
+
index: {
|
|
363
|
+
lastIndexedAt: cg.getLastIndexedAt(),
|
|
364
|
+
edges: stats.edgeCount,
|
|
365
|
+
files: stats.fileCount,
|
|
366
|
+
},
|
|
367
|
+
timing: { elapsedMs: Date.now() - started, cached: false },
|
|
368
|
+
};
|
|
369
|
+
if (cache.size >= CACHE_LIMIT) {
|
|
370
|
+
const oldest = cache.keys().next();
|
|
371
|
+
if (!oldest.done)
|
|
372
|
+
cache.delete(oldest.value);
|
|
373
|
+
}
|
|
374
|
+
cache.set(key, payload);
|
|
375
|
+
return payload;
|
|
376
|
+
}
|
|
377
|
+
/**
|
|
378
|
+
* File-level circular dependencies, as strongly connected components.
|
|
379
|
+
*
|
|
380
|
+
* Tarjan over the one-query file edge list. Components of size 1 are not
|
|
381
|
+
* cycles (a file depending on itself is a same-file edge, already excluded),
|
|
382
|
+
* and a component longer than {@link MAX_CYCLE_LENGTH} is reported truncated
|
|
383
|
+
* rather than printed — a 200-file knot is a fact about the repository, not a
|
|
384
|
+
* list anybody reads.
|
|
385
|
+
*/
|
|
386
|
+
function fileCycles(cg, moduleOfFile) {
|
|
387
|
+
const adjacency = new Map();
|
|
388
|
+
for (const pair of cg.getFileDependencyPairs(wire_1.UNCERTAIN_BELOW)) {
|
|
389
|
+
if (!moduleOfFile.has(pair.source) || !moduleOfFile.has(pair.target))
|
|
390
|
+
continue;
|
|
391
|
+
let out = adjacency.get(pair.source);
|
|
392
|
+
if (!out)
|
|
393
|
+
adjacency.set(pair.source, (out = []));
|
|
394
|
+
out.push(pair.target);
|
|
395
|
+
}
|
|
396
|
+
// Deterministic iteration: SQLite's DISTINCT ordering is not a contract.
|
|
397
|
+
const nodes = [...new Set([...adjacency.keys(), ...[...adjacency.values()].flat()])].sort();
|
|
398
|
+
for (const list of adjacency.values())
|
|
399
|
+
list.sort();
|
|
400
|
+
const components = tarjan(nodes, (id) => adjacency.get(id) ?? []);
|
|
401
|
+
const cycles = components
|
|
402
|
+
.filter((component) => component.length > 1)
|
|
403
|
+
.map((component) => component.slice().sort())
|
|
404
|
+
.sort((a, b) => a.length - b.length || (a[0] ?? '').localeCompare(b[0] ?? ''));
|
|
405
|
+
const items = cycles.slice(0, MAX_FILE_CYCLES).map((files) => ({
|
|
406
|
+
size: files.length,
|
|
407
|
+
files: files.slice(0, MAX_CYCLE_LENGTH),
|
|
408
|
+
modules: [...new Set(files.map((file) => moduleOfFile.get(file) ?? file))].sort(),
|
|
409
|
+
}));
|
|
410
|
+
return {
|
|
411
|
+
total: cycles.length,
|
|
412
|
+
shown: items.length,
|
|
413
|
+
truncated: cycles.length > items.length,
|
|
414
|
+
items,
|
|
415
|
+
};
|
|
416
|
+
}
|
|
417
|
+
/** Tarjan's strongly connected components, iterative so a deep graph cannot blow the stack. */
|
|
418
|
+
function tarjan(nodes, edgesOf) {
|
|
419
|
+
const index = new Map();
|
|
420
|
+
const low = new Map();
|
|
421
|
+
const onStack = new Set();
|
|
422
|
+
const stack = [];
|
|
423
|
+
const out = [];
|
|
424
|
+
let counter = 0;
|
|
425
|
+
for (const start of nodes) {
|
|
426
|
+
if (index.has(start))
|
|
427
|
+
continue;
|
|
428
|
+
const work = [
|
|
429
|
+
{ id: start, edges: edgesOf(start), at: 0 },
|
|
430
|
+
];
|
|
431
|
+
index.set(start, counter);
|
|
432
|
+
low.set(start, counter);
|
|
433
|
+
counter += 1;
|
|
434
|
+
stack.push(start);
|
|
435
|
+
onStack.add(start);
|
|
436
|
+
while (work.length > 0) {
|
|
437
|
+
const frame = work[work.length - 1];
|
|
438
|
+
if (frame === undefined)
|
|
439
|
+
break;
|
|
440
|
+
if (frame.at < frame.edges.length) {
|
|
441
|
+
const next = frame.edges[frame.at];
|
|
442
|
+
frame.at += 1;
|
|
443
|
+
if (!index.has(next)) {
|
|
444
|
+
index.set(next, counter);
|
|
445
|
+
low.set(next, counter);
|
|
446
|
+
counter += 1;
|
|
447
|
+
stack.push(next);
|
|
448
|
+
onStack.add(next);
|
|
449
|
+
work.push({ id: next, edges: edgesOf(next), at: 0 });
|
|
450
|
+
}
|
|
451
|
+
else if (onStack.has(next)) {
|
|
452
|
+
low.set(frame.id, Math.min(low.get(frame.id) ?? 0, index.get(next) ?? 0));
|
|
453
|
+
}
|
|
454
|
+
continue;
|
|
455
|
+
}
|
|
456
|
+
work.pop();
|
|
457
|
+
if (low.get(frame.id) === index.get(frame.id)) {
|
|
458
|
+
const component = [];
|
|
459
|
+
for (;;) {
|
|
460
|
+
const popped = stack.pop();
|
|
461
|
+
if (popped === undefined)
|
|
462
|
+
break;
|
|
463
|
+
onStack.delete(popped);
|
|
464
|
+
component.push(popped);
|
|
465
|
+
if (popped === frame.id)
|
|
466
|
+
break;
|
|
467
|
+
}
|
|
468
|
+
out.push(component);
|
|
469
|
+
}
|
|
470
|
+
const parent = work[work.length - 1];
|
|
471
|
+
if (parent)
|
|
472
|
+
low.set(parent.id, Math.min(low.get(parent.id) ?? 0, low.get(frame.id) ?? 0));
|
|
473
|
+
}
|
|
474
|
+
}
|
|
475
|
+
return out;
|
|
476
|
+
}
|
|
477
|
+
/**
|
|
478
|
+
* The roots the selector offers: the repository root plus every top-level
|
|
479
|
+
* directory that holds indexed files, biggest first.
|
|
480
|
+
*
|
|
481
|
+
* A monorepo's answer to "which project am I looking at" — and on a single
|
|
482
|
+
* project it is a one-line list nobody has to use.
|
|
483
|
+
*/
|
|
484
|
+
function rootOptions(files) {
|
|
485
|
+
const byDir = new Map();
|
|
486
|
+
for (const file of files) {
|
|
487
|
+
const slash = file.path.indexOf('/');
|
|
488
|
+
if (slash <= 0)
|
|
489
|
+
continue;
|
|
490
|
+
const dir = file.path.slice(0, slash);
|
|
491
|
+
byDir.set(dir, (byDir.get(dir) ?? 0) + 1);
|
|
492
|
+
}
|
|
493
|
+
const dirs = [...byDir]
|
|
494
|
+
.sort((a, b) => b[1] - a[1] || a[0].localeCompare(b[0]))
|
|
495
|
+
.map(([root, count]) => ({ root, label: root, files: count }));
|
|
496
|
+
return [{ root: '', label: 'whole repository', files: files.length }, ...dirs];
|
|
497
|
+
}
|
|
498
|
+
//# sourceMappingURL=map.js.map
|