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,756 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
/**
|
|
3
|
+
* Dead code and islands — one derivation of "nothing in this repository
|
|
4
|
+
* reaches here".
|
|
5
|
+
*
|
|
6
|
+
* The graph can answer that question exactly, and that is the problem: the
|
|
7
|
+
* exact answer is *no incoming edge*, and a symbol with no incoming edge is not
|
|
8
|
+
* the same thing as a symbol nobody uses. Reflection calls it. A framework
|
|
9
|
+
* registers it by name. A test file that was never indexed imports it. The
|
|
10
|
+
* resolver saw the name and could not follow it. So the honest product of this
|
|
11
|
+
* module is two things at once — a list, and everything the list could not see.
|
|
12
|
+
*
|
|
13
|
+
* ## The shape of the claim
|
|
14
|
+
*
|
|
15
|
+
* `unreferenced` is a fact: no edge in the index, other than the `contains`
|
|
16
|
+
* edge from whatever holds it, points at this symbol. `dead` is an inference on
|
|
17
|
+
* top of that fact, and every step of the inference is subtractive — a
|
|
18
|
+
* candidate is dropped from the list the moment there is any reason to believe
|
|
19
|
+
* something outside the graph reaches it:
|
|
20
|
+
*
|
|
21
|
+
* - it is **exported** (something outside this repository may import it);
|
|
22
|
+
* - it lives in a **test** or a **generated** file (not code anyone deletes by
|
|
23
|
+
* hand);
|
|
24
|
+
* - it is **abstract** or declared on an interface (a declaration is dispatched
|
|
25
|
+
* to, never called);
|
|
26
|
+
* - it is **decorated** (`@app.route`, `@Component`, `@EventHandler`) — a
|
|
27
|
+
* decorator is a registration, and the framework that reads it is not in the
|
|
28
|
+
* graph. Seen as the symbol's own outgoing `decorates` edge, which is where
|
|
29
|
+
* the engine records it; `node.decorators` is only populated by a couple of
|
|
30
|
+
* languages and is checked as well rather than instead;
|
|
31
|
+
* - it **overrides** a member an ancestor declares (calls land on the ancestor;
|
|
32
|
+
* see {@link overrideCandidates} for why an ancestor we cannot read counts
|
|
33
|
+
* the same way);
|
|
34
|
+
* - it has a name the language calls by itself (`constructor`, `__enter__`,
|
|
35
|
+
* `main`);
|
|
36
|
+
* - it sits in a **vendored** directory (`vendor/`, `third_party/`,
|
|
37
|
+
* `node_modules/` — code the repository carries but does not own);
|
|
38
|
+
* - it is in a **test scope** the path does not reveal — a Rust
|
|
39
|
+
* `#[cfg(test)] mod tests`, a nested `Tests` namespace;
|
|
40
|
+
* - it is in a **component file** whose markup the index reads for calls but
|
|
41
|
+
* not for references, so a handler passed as `{onkeydown}` is invisible;
|
|
42
|
+
* - it is in a file **nothing in the index reaches**. Then "nothing references
|
|
43
|
+
* this symbol" is a restatement of "we cannot see how this file is wired",
|
|
44
|
+
* not a finding about the symbol — and it is the map, not this list, that
|
|
45
|
+
* says so: a file no one reaches is an island, and islands are drawn there;
|
|
46
|
+
* - the index holds an **unresolved reference** to its name. A `failed` row in
|
|
47
|
+
* `unresolved_refs` is the resolver's own record of a reference it could not
|
|
48
|
+
* follow, and a symbol whose name we failed to follow cannot be called
|
|
49
|
+
* unreferenced.
|
|
50
|
+
* - **another symbol of the same name IS referenced.** This is the one that
|
|
51
|
+
* matters most and the one nothing else would catch. `CodeGraph.getTopRouteFile`
|
|
52
|
+
* calls `this.queries.getTopRouteFile()`; the resolver prefers a same-name
|
|
53
|
+
* definition in the call site's own file, so the edge lands on the caller
|
|
54
|
+
* itself and the real target is left with nothing. From the edge table,
|
|
55
|
+
* "nobody calls this" and "the resolver picked the twin" are the same
|
|
56
|
+
* picture — so the claim is not made about either;
|
|
57
|
+
* - it is declared in a **header** (`.h`, `.hpp`, `.d.ts`, `.pyi`): a header IS
|
|
58
|
+
* the export surface, and the reference to it is an `#include` the resolver
|
|
59
|
+
* does not follow to the declaration;
|
|
60
|
+
* - it is in a language this index records **no export marker** for. The
|
|
61
|
+
* exported filter is the strongest one here, and for Rust (`pub` is not
|
|
62
|
+
* recorded) or Python and C (no such concept at all) it silently does
|
|
63
|
+
* nothing — so the index is asked, per language, whether it ran;
|
|
64
|
+
* - **its own file writes the name more than once.** The last rule, and the
|
|
65
|
+
* only one that is not a graph query. Everything above assumes the edge
|
|
66
|
+
* table is complete; it is not, and the gaps do not announce themselves —
|
|
67
|
+
* `this.handleMessage.bind(this)` is a value reference the extractor does not
|
|
68
|
+
* record, and a call inside an object-literal initialiser is another. Both
|
|
69
|
+
* leave the name written twice in one file and no edge at all. So before the
|
|
70
|
+
* claim is made, the identifier is counted in the file itself AND in every
|
|
71
|
+
* file the index says depends on it — written once, in its own declaration,
|
|
72
|
+
* nothing that can reach it writes it down; written twice, we simply did not
|
|
73
|
+
* see the second one.
|
|
74
|
+
*
|
|
75
|
+
* Every subtraction is counted. {@link DeadCodeReport.excluded} is not
|
|
76
|
+
* diagnostics — it is the sentence under the list ("47 exported, 12 overriding
|
|
77
|
+
* an ancestor…"), because a list of eight rows drawn from four thousand
|
|
78
|
+
* candidates means something different from a list of eight drawn from nine.
|
|
79
|
+
*
|
|
80
|
+
* ## Islands
|
|
81
|
+
*
|
|
82
|
+
* The other half of the task, a *module* nothing depends on, is not computed
|
|
83
|
+
* here: it falls straight out of the map's own link set (a module with no
|
|
84
|
+
* incoming link), and the map's layout is already a pure function in the
|
|
85
|
+
* viewer. Computing it a second time on this side would be a second answer to
|
|
86
|
+
* a question the map has already answered. See `ui/src/lib/map-model.ts`.
|
|
87
|
+
*
|
|
88
|
+
* Everything here is query-time and read-only.
|
|
89
|
+
*/
|
|
90
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
91
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
92
|
+
};
|
|
93
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
94
|
+
exports.MAX_CORROBORATION_BYTES = exports.MAX_CORROBORATION_FILES = exports.MAX_OVERRIDE_ANCESTOR_DEPTH = exports.MAX_DEAD_CODE_CANDIDATES = exports.DEAD_CODE_ALLOWED_KINDS = exports.DEAD_CODE_KINDS = void 0;
|
|
95
|
+
exports.buildDeadCodeReport = buildDeadCodeReport;
|
|
96
|
+
exports.mentionCount = mentionCount;
|
|
97
|
+
exports.isHeaderFile = isHeaderFile;
|
|
98
|
+
exports.isTestScope = isTestScope;
|
|
99
|
+
exports.isVendoredPath = isVendoredPath;
|
|
100
|
+
exports.isImplicitEntryName = isImplicitEntryName;
|
|
101
|
+
const fs_1 = __importDefault(require("fs"));
|
|
102
|
+
const path_1 = __importDefault(require("path"));
|
|
103
|
+
const query_utils_1 = require("../search/query-utils");
|
|
104
|
+
// =============================================================================
|
|
105
|
+
// Caps and defaults
|
|
106
|
+
// =============================================================================
|
|
107
|
+
/**
|
|
108
|
+
* Kinds asked about by default.
|
|
109
|
+
*
|
|
110
|
+
* Callables and types, and nothing else. `variable`/`constant`/`field` are out
|
|
111
|
+
* deliberately: a value's uses are recorded as `references` edges, and that
|
|
112
|
+
* coverage is the most language-dependent thing in the resolver — a default
|
|
113
|
+
* that included them would produce a list whose truthfulness varied by which
|
|
114
|
+
* language the reader happened to be looking at.
|
|
115
|
+
*/
|
|
116
|
+
exports.DEAD_CODE_KINDS = [
|
|
117
|
+
'function',
|
|
118
|
+
'method',
|
|
119
|
+
'class',
|
|
120
|
+
'component',
|
|
121
|
+
'interface',
|
|
122
|
+
'struct',
|
|
123
|
+
'trait',
|
|
124
|
+
'protocol',
|
|
125
|
+
'enum',
|
|
126
|
+
'union',
|
|
127
|
+
'type_alias',
|
|
128
|
+
];
|
|
129
|
+
/** Kinds a `kinds=` request may ask for. Anything else is a caller bug. */
|
|
130
|
+
exports.DEAD_CODE_ALLOWED_KINDS = new Set([
|
|
131
|
+
...exports.DEAD_CODE_KINDS,
|
|
132
|
+
'variable',
|
|
133
|
+
'constant',
|
|
134
|
+
'property',
|
|
135
|
+
'field',
|
|
136
|
+
'enum_member',
|
|
137
|
+
'namespace',
|
|
138
|
+
'module',
|
|
139
|
+
]);
|
|
140
|
+
/**
|
|
141
|
+
* Candidates pulled out of SQL before any exclusion runs.
|
|
142
|
+
*
|
|
143
|
+
* High enough that no real repository reaches it with the default kinds (this
|
|
144
|
+
* index produces ~1 400), and bounded so that a half-indexed monorepo cannot
|
|
145
|
+
* turn one screen into a scan of a million rows. When it bites,
|
|
146
|
+
* {@link DeadCodeReport.bounded} says so.
|
|
147
|
+
*/
|
|
148
|
+
exports.MAX_DEAD_CODE_CANDIDATES = 20000;
|
|
149
|
+
/** Levels walked up looking for an ancestor that declares the same member. */
|
|
150
|
+
exports.MAX_OVERRIDE_ANCESTOR_DEPTH = 8;
|
|
151
|
+
/**
|
|
152
|
+
* Files read for the corroboration pass, and the biggest one read.
|
|
153
|
+
*
|
|
154
|
+
* The pass runs over the survivors only — everything cheap has already fired —
|
|
155
|
+
* so on this index it reads a few dozen files. The caps are a backstop against
|
|
156
|
+
* a repository whose survivors span a thousand files or include a generated
|
|
157
|
+
* megabyte. A file skipped for either reason counts as NOT corroborated, which
|
|
158
|
+
* drops the row: the safe direction is always the one that says less.
|
|
159
|
+
*/
|
|
160
|
+
exports.MAX_CORROBORATION_FILES = 600;
|
|
161
|
+
exports.MAX_CORROBORATION_BYTES = 2_000_000;
|
|
162
|
+
/** Kinds that can carry members, i.e. whose ancestors are worth walking. */
|
|
163
|
+
const CONTAINER_KINDS = new Set([
|
|
164
|
+
'class',
|
|
165
|
+
'interface',
|
|
166
|
+
'struct',
|
|
167
|
+
'trait',
|
|
168
|
+
'protocol',
|
|
169
|
+
'enum',
|
|
170
|
+
'union',
|
|
171
|
+
'type_alias',
|
|
172
|
+
]);
|
|
173
|
+
/** Container kinds whose members are declarations, never call targets. */
|
|
174
|
+
const DECLARATION_CONTAINER_KINDS = new Set([
|
|
175
|
+
'interface',
|
|
176
|
+
'trait',
|
|
177
|
+
'protocol',
|
|
178
|
+
]);
|
|
179
|
+
/** Member kinds an override can be declared on. */
|
|
180
|
+
const OVERRIDABLE_KINDS = new Set([
|
|
181
|
+
'method',
|
|
182
|
+
'function',
|
|
183
|
+
'property',
|
|
184
|
+
'field',
|
|
185
|
+
]);
|
|
186
|
+
/**
|
|
187
|
+
* Names a language or a runtime calls without anything in the source naming
|
|
188
|
+
* them.
|
|
189
|
+
*
|
|
190
|
+
* Kept short on purpose. The temptation is a per-language table of every
|
|
191
|
+
* lifecycle hook ever written, which would be wrong twice over — it would go
|
|
192
|
+
* stale, and it would hide real dead code behind a name coincidence. The
|
|
193
|
+
* entries below are the ones where the *language itself* does the calling, so
|
|
194
|
+
* no source file could name them even in principle. Framework hooks are caught
|
|
195
|
+
* by the decorator and override rules instead, which are structural.
|
|
196
|
+
*/
|
|
197
|
+
const IMPLICIT_ENTRY_NAMES = new Set([
|
|
198
|
+
'constructor',
|
|
199
|
+
'main',
|
|
200
|
+
'init',
|
|
201
|
+
'deinit',
|
|
202
|
+
'finalize',
|
|
203
|
+
'destructor',
|
|
204
|
+
'dispose',
|
|
205
|
+
'drop',
|
|
206
|
+
'default',
|
|
207
|
+
'tostring',
|
|
208
|
+
'equals',
|
|
209
|
+
'gethashcode',
|
|
210
|
+
'hashcode',
|
|
211
|
+
]);
|
|
212
|
+
/**
|
|
213
|
+
* Qualified-name segments that mean "inside a test scope the file path does not
|
|
214
|
+
* reveal" — a Rust `#[cfg(test)] mod tests`, a nested `Tests` class in C#, a
|
|
215
|
+
* Go `TestMain` helper block. `isTestFile` only reads paths, and an in-file test
|
|
216
|
+
* module is invisible to it.
|
|
217
|
+
*/
|
|
218
|
+
const TEST_SCOPE_SEGMENTS = new Set([
|
|
219
|
+
'test',
|
|
220
|
+
'tests',
|
|
221
|
+
'__tests__',
|
|
222
|
+
'spec',
|
|
223
|
+
'specs',
|
|
224
|
+
'testing',
|
|
225
|
+
]);
|
|
226
|
+
/**
|
|
227
|
+
* Languages whose files are markup with a script block inside them.
|
|
228
|
+
*
|
|
229
|
+
* The extractors for these read the `<script>` region properly and scan the
|
|
230
|
+
* template for CALLS — but a handler passed by reference (`{onkeydown}`,
|
|
231
|
+
* `@click="submit"`) is a reference, not a call, and it is not extracted. Every
|
|
232
|
+
* event handler in every component would therefore head this list. The index
|
|
233
|
+
* cannot tell a handler wired in markup from one nobody uses, so it does not
|
|
234
|
+
* guess.
|
|
235
|
+
*/
|
|
236
|
+
const MARKUP_HOST_LANGUAGES = new Set([
|
|
237
|
+
'svelte',
|
|
238
|
+
'vue',
|
|
239
|
+
'astro',
|
|
240
|
+
'liquid',
|
|
241
|
+
'html',
|
|
242
|
+
'razor',
|
|
243
|
+
'twig',
|
|
244
|
+
'blade',
|
|
245
|
+
'erb',
|
|
246
|
+
'handlebars',
|
|
247
|
+
]);
|
|
248
|
+
/**
|
|
249
|
+
* Extensions whose contents are declarations for somebody else.
|
|
250
|
+
*
|
|
251
|
+
* A C header is the translation unit's export surface: everything in it exists
|
|
252
|
+
* to be `#include`d, and the resolver does not follow an include to the
|
|
253
|
+
* declaration it lands on. `.d.ts` and `.pyi` are the same idea in TypeScript
|
|
254
|
+
* and Python. Treating these as exported is not a heuristic — it is what the
|
|
255
|
+
* file is for.
|
|
256
|
+
*/
|
|
257
|
+
const HEADER_EXTENSIONS = [
|
|
258
|
+
'.h',
|
|
259
|
+
'.hh',
|
|
260
|
+
'.hpp',
|
|
261
|
+
'.hxx',
|
|
262
|
+
'.h++',
|
|
263
|
+
'.inc',
|
|
264
|
+
'.d.ts',
|
|
265
|
+
'.d.mts',
|
|
266
|
+
'.d.cts',
|
|
267
|
+
'.pyi',
|
|
268
|
+
'.pxd',
|
|
269
|
+
];
|
|
270
|
+
/** Python and Ruby call these by protocol: `__enter__`, `__iter__`, `__init__`. */
|
|
271
|
+
const DUNDER = /^__[a-z0-9_]+__$/i;
|
|
272
|
+
/**
|
|
273
|
+
* Directory names that mean "this code is carried, not written here".
|
|
274
|
+
*
|
|
275
|
+
* Vendored third-party source is the second-largest source of noise after name
|
|
276
|
+
* ambiguity, and it is noise of a particular kind: the code IS reached, by a
|
|
277
|
+
* build system or a runtime that is not in the index at all (a tree-sitter
|
|
278
|
+
* scanner is called through a generated symbol table; a vendored library is
|
|
279
|
+
* called by whatever links it). Matched as a whole path segment, so
|
|
280
|
+
* `src/vendored-parser.ts` is not caught by `vendor`.
|
|
281
|
+
*/
|
|
282
|
+
const VENDOR_SEGMENTS = new Set([
|
|
283
|
+
'vendor',
|
|
284
|
+
'vendored',
|
|
285
|
+
'third_party',
|
|
286
|
+
'third-party',
|
|
287
|
+
'thirdparty',
|
|
288
|
+
'external',
|
|
289
|
+
'externals',
|
|
290
|
+
'node_modules',
|
|
291
|
+
'bower_components',
|
|
292
|
+
'site-packages',
|
|
293
|
+
'godeps',
|
|
294
|
+
'pods',
|
|
295
|
+
'.venv',
|
|
296
|
+
'venv',
|
|
297
|
+
]);
|
|
298
|
+
// =============================================================================
|
|
299
|
+
// The report
|
|
300
|
+
// =============================================================================
|
|
301
|
+
/**
|
|
302
|
+
* The dead code report: unreferenced symbols, minus every reason to doubt it,
|
|
303
|
+
* plus a count of every doubt.
|
|
304
|
+
*/
|
|
305
|
+
function buildDeadCodeReport(cg, query = {}) {
|
|
306
|
+
const kinds = normalizeKinds(query.kinds);
|
|
307
|
+
const includeExported = query.includeExported === true;
|
|
308
|
+
const includeTests = query.includeTests === true;
|
|
309
|
+
const includeGenerated = query.includeGenerated === true;
|
|
310
|
+
const limit = Math.max(1, query.limit ?? 200);
|
|
311
|
+
const readSource = query.readSource === undefined ? defaultSourceReader(cg) : query.readSource;
|
|
312
|
+
const excluded = {
|
|
313
|
+
tests: 0,
|
|
314
|
+
generated: 0,
|
|
315
|
+
exported: 0,
|
|
316
|
+
exportsUnknown: 0,
|
|
317
|
+
declarations: 0,
|
|
318
|
+
decorated: 0,
|
|
319
|
+
overriding: 0,
|
|
320
|
+
implicit: 0,
|
|
321
|
+
vendored: 0,
|
|
322
|
+
testScope: 0,
|
|
323
|
+
markup: 0,
|
|
324
|
+
unreachableFile: 0,
|
|
325
|
+
unresolvedName: 0,
|
|
326
|
+
ambiguousName: 0,
|
|
327
|
+
mentioned: 0,
|
|
328
|
+
unreadable: 0,
|
|
329
|
+
nested: 0,
|
|
330
|
+
};
|
|
331
|
+
const raw = cg.getUnreferencedNodes(kinds, exports.MAX_DEAD_CODE_CANDIDATES + 1);
|
|
332
|
+
const bounded = raw.length > exports.MAX_DEAD_CODE_CANDIDATES;
|
|
333
|
+
const candidates = bounded ? raw.slice(0, exports.MAX_DEAD_CODE_CANDIDATES) : raw;
|
|
334
|
+
// Asking the index whether the exported filter can run at all, per language,
|
|
335
|
+
// over the handful of languages the candidates are actually in. Skipped when
|
|
336
|
+
// the caller has already accepted outside-reachability by asking for exported
|
|
337
|
+
// symbols.
|
|
338
|
+
const languagesWithExports = includeExported
|
|
339
|
+
? new Set()
|
|
340
|
+
: cg.getLanguagesWithExports(candidates.map((row) => row.node.language));
|
|
341
|
+
// ---- the cheap, per-row rules -------------------------------------------
|
|
342
|
+
const surviving = [];
|
|
343
|
+
for (const row of candidates) {
|
|
344
|
+
const { node } = row;
|
|
345
|
+
if (!includeTests && (0, query_utils_1.isTestFile)(node.filePath)) {
|
|
346
|
+
excluded.tests += 1;
|
|
347
|
+
continue;
|
|
348
|
+
}
|
|
349
|
+
if (!includeGenerated && row.generated) {
|
|
350
|
+
excluded.generated += 1;
|
|
351
|
+
continue;
|
|
352
|
+
}
|
|
353
|
+
if (!includeExported && (node.isExported || isHeaderFile(node.filePath))) {
|
|
354
|
+
excluded.exported += 1;
|
|
355
|
+
continue;
|
|
356
|
+
}
|
|
357
|
+
if (!includeExported && !languagesWithExports.has(node.language)) {
|
|
358
|
+
excluded.exportsUnknown += 1;
|
|
359
|
+
continue;
|
|
360
|
+
}
|
|
361
|
+
if (node.isAbstract) {
|
|
362
|
+
excluded.declarations += 1;
|
|
363
|
+
continue;
|
|
364
|
+
}
|
|
365
|
+
if (isImplicitEntryName(node.name)) {
|
|
366
|
+
excluded.implicit += 1;
|
|
367
|
+
continue;
|
|
368
|
+
}
|
|
369
|
+
if (isVendoredPath(node.filePath)) {
|
|
370
|
+
excluded.vendored += 1;
|
|
371
|
+
continue;
|
|
372
|
+
}
|
|
373
|
+
if (!includeTests && isTestScope(node.qualifiedName)) {
|
|
374
|
+
excluded.testScope += 1;
|
|
375
|
+
continue;
|
|
376
|
+
}
|
|
377
|
+
if (MARKUP_HOST_LANGUAGES.has(node.language)) {
|
|
378
|
+
excluded.markup += 1;
|
|
379
|
+
continue;
|
|
380
|
+
}
|
|
381
|
+
surviving.push(row);
|
|
382
|
+
}
|
|
383
|
+
// ---- the rules that need the graph --------------------------------------
|
|
384
|
+
// A `decorates` edge runs FROM the decorated symbol to the decorator, so
|
|
385
|
+
// this is an outgoing-edge question, not something the candidate query could
|
|
386
|
+
// have answered.
|
|
387
|
+
const decorated = new Set(cg
|
|
388
|
+
.getOutgoingEdgesFrom(surviving.map((row) => row.node.id), ['decorates'])
|
|
389
|
+
.map((edge) => edge.source));
|
|
390
|
+
const containers = containersOf(cg, surviving.map((row) => row.node));
|
|
391
|
+
const overriding = overrideCandidates(cg, surviving.map((row) => row.node), containers);
|
|
392
|
+
// One batched count for every file still in play. A file nothing reaches is
|
|
393
|
+
// an island: its symbols' zero fan-in describes the file, not the symbol.
|
|
394
|
+
const unreachableFiles = filesNothingReaches(cg, surviving.map((row) => row.node.filePath));
|
|
395
|
+
const reachable = surviving.filter((row) => {
|
|
396
|
+
if (!unreachableFiles.has(row.node.filePath))
|
|
397
|
+
return true;
|
|
398
|
+
excluded.unreachableFile += 1;
|
|
399
|
+
return false;
|
|
400
|
+
});
|
|
401
|
+
surviving.length = 0;
|
|
402
|
+
surviving.push(...reachable);
|
|
403
|
+
const names = surviving.map((row) => row.node.name);
|
|
404
|
+
const unresolved = cg.getUnresolvedNamesAmong(names);
|
|
405
|
+
const ambiguousNames = cg.getAmbiguousReferencedNames(names);
|
|
406
|
+
const kept = [];
|
|
407
|
+
for (const row of surviving) {
|
|
408
|
+
if (decorated.has(row.node.id) || (row.node.decorators?.length ?? 0) > 0) {
|
|
409
|
+
excluded.decorated += 1;
|
|
410
|
+
continue;
|
|
411
|
+
}
|
|
412
|
+
const container = containers.get(row.node.id);
|
|
413
|
+
if (container && DECLARATION_CONTAINER_KINDS.has(container.kind)) {
|
|
414
|
+
excluded.declarations += 1;
|
|
415
|
+
continue;
|
|
416
|
+
}
|
|
417
|
+
if (overriding.has(row.node.id)) {
|
|
418
|
+
excluded.overriding += 1;
|
|
419
|
+
continue;
|
|
420
|
+
}
|
|
421
|
+
if (unresolved.has(row.node.name)) {
|
|
422
|
+
excluded.unresolvedName += 1;
|
|
423
|
+
continue;
|
|
424
|
+
}
|
|
425
|
+
if (ambiguousNames.has(row.node.name)) {
|
|
426
|
+
excluded.ambiguousName += 1;
|
|
427
|
+
continue;
|
|
428
|
+
}
|
|
429
|
+
kept.push(row);
|
|
430
|
+
}
|
|
431
|
+
// ---- the file's own text has the last word -------------------------------
|
|
432
|
+
// Everything above is a graph query, and the graph is what has the gaps. This
|
|
433
|
+
// is the only rule that can see a reference the extractor never recorded.
|
|
434
|
+
const confirmed = [];
|
|
435
|
+
if (readSource) {
|
|
436
|
+
const sources = new Map();
|
|
437
|
+
const read = (file) => {
|
|
438
|
+
if (!sources.has(file)) {
|
|
439
|
+
sources.set(file, sources.size >= exports.MAX_CORROBORATION_FILES ? null : readSource(file));
|
|
440
|
+
}
|
|
441
|
+
return sources.get(file) ?? null;
|
|
442
|
+
};
|
|
443
|
+
// The set to search is the declaring file plus everything the index says
|
|
444
|
+
// reaches into it — the same set a call could have come from. Computed once
|
|
445
|
+
// per file, not once per candidate.
|
|
446
|
+
const scopes = new Map();
|
|
447
|
+
for (const row of kept) {
|
|
448
|
+
const file = row.node.filePath;
|
|
449
|
+
if (!scopes.has(file))
|
|
450
|
+
scopes.set(file, [file, ...cg.getFileDependents(file)]);
|
|
451
|
+
}
|
|
452
|
+
for (const row of kept) {
|
|
453
|
+
const scope = scopes.get(row.node.filePath) ?? [row.node.filePath];
|
|
454
|
+
let own = null;
|
|
455
|
+
let mentions = 0;
|
|
456
|
+
for (const file of scope) {
|
|
457
|
+
const source = read(file);
|
|
458
|
+
if (file === row.node.filePath)
|
|
459
|
+
own = source;
|
|
460
|
+
if (source === null)
|
|
461
|
+
continue;
|
|
462
|
+
mentions += mentionCount(source, row.node.name, 2 - mentions);
|
|
463
|
+
if (mentions >= 2)
|
|
464
|
+
break;
|
|
465
|
+
}
|
|
466
|
+
// Its OWN file has to be readable: the declaration itself is one of the
|
|
467
|
+
// two mentions, so an unreadable declaring file makes the count meaningless.
|
|
468
|
+
if (own === null) {
|
|
469
|
+
excluded.unreadable += 1;
|
|
470
|
+
continue;
|
|
471
|
+
}
|
|
472
|
+
if (mentions >= 2) {
|
|
473
|
+
excluded.mentioned += 1;
|
|
474
|
+
continue;
|
|
475
|
+
}
|
|
476
|
+
confirmed.push(row);
|
|
477
|
+
}
|
|
478
|
+
}
|
|
479
|
+
else {
|
|
480
|
+
confirmed.push(...kept);
|
|
481
|
+
}
|
|
482
|
+
// ---- fold members into a container that is itself dead -------------------
|
|
483
|
+
const keptIds = new Set(confirmed.map((row) => row.node.id));
|
|
484
|
+
const entries = new Map();
|
|
485
|
+
const pending = [];
|
|
486
|
+
for (const row of confirmed) {
|
|
487
|
+
const container = containers.get(row.node.id);
|
|
488
|
+
if (container && keptIds.has(container.id)) {
|
|
489
|
+
pending.push({ node: row.node, containerId: container.id });
|
|
490
|
+
excluded.nested += 1;
|
|
491
|
+
continue;
|
|
492
|
+
}
|
|
493
|
+
entries.set(row.node.id, {
|
|
494
|
+
node: row.node,
|
|
495
|
+
members: [],
|
|
496
|
+
lines: Math.max(1, row.node.endLine - row.node.startLine + 1),
|
|
497
|
+
exported: row.node.isExported === true,
|
|
498
|
+
});
|
|
499
|
+
}
|
|
500
|
+
for (const member of pending) {
|
|
501
|
+
// A member whose container was itself folded away (a dead class inside a
|
|
502
|
+
// dead class) has no entry to hang off; it was still counted as nested, so
|
|
503
|
+
// it is not silently missing from the totals.
|
|
504
|
+
entries.get(member.containerId)?.members.push(member.node);
|
|
505
|
+
}
|
|
506
|
+
for (const entry of entries.values()) {
|
|
507
|
+
entry.members.sort((a, b) => a.startLine - b.startLine || a.name.localeCompare(b.name));
|
|
508
|
+
}
|
|
509
|
+
// Biggest first: the list is read to decide what to delete, and a 200-line
|
|
510
|
+
// unreachable class is a different finding from a three-line helper. File and
|
|
511
|
+
// line break the tie so the order is stable across runs.
|
|
512
|
+
const ranked = [...entries.values()].sort((a, b) => b.lines - a.lines ||
|
|
513
|
+
a.node.filePath.localeCompare(b.node.filePath) ||
|
|
514
|
+
a.node.startLine - b.node.startLine);
|
|
515
|
+
return {
|
|
516
|
+
entries: ranked.slice(0, limit),
|
|
517
|
+
total: ranked.length,
|
|
518
|
+
candidates: candidates.length,
|
|
519
|
+
excluded,
|
|
520
|
+
kinds,
|
|
521
|
+
includeExported,
|
|
522
|
+
bounded,
|
|
523
|
+
corroborated: readSource !== null,
|
|
524
|
+
};
|
|
525
|
+
}
|
|
526
|
+
/**
|
|
527
|
+
* Reads a project-relative file off disk, for callers with no chokepoint of
|
|
528
|
+
* their own (the CLI, a library user). Refuses anything that escapes the
|
|
529
|
+
* project root — a `filePath` comes out of the index, but the index is a file
|
|
530
|
+
* on disk and this module should not be the thing that trusts it.
|
|
531
|
+
*/
|
|
532
|
+
function defaultSourceReader(cg) {
|
|
533
|
+
const root = path_1.default.resolve(cg.getProjectRoot());
|
|
534
|
+
return (filePath) => {
|
|
535
|
+
try {
|
|
536
|
+
const absolute = path_1.default.resolve(root, filePath);
|
|
537
|
+
if (absolute !== root && !absolute.startsWith(root + path_1.default.sep))
|
|
538
|
+
return null;
|
|
539
|
+
const stat = fs_1.default.statSync(absolute);
|
|
540
|
+
if (!stat.isFile() || stat.size > exports.MAX_CORROBORATION_BYTES)
|
|
541
|
+
return null;
|
|
542
|
+
return fs_1.default.readFileSync(absolute, 'utf8');
|
|
543
|
+
}
|
|
544
|
+
catch {
|
|
545
|
+
return null;
|
|
546
|
+
}
|
|
547
|
+
};
|
|
548
|
+
}
|
|
549
|
+
/**
|
|
550
|
+
* How many times `name` is written in `source` as a whole identifier, counting
|
|
551
|
+
* no further than `stopAt`.
|
|
552
|
+
*
|
|
553
|
+
* Deliberately dumb: no parsing, no comment or string stripping. A mention in a
|
|
554
|
+
* comment or in a string is exactly the kind of thing that turns out to be a
|
|
555
|
+
* reflective call or a registration key, and the rule this serves only ever
|
|
556
|
+
* uses the count to say LESS. `\b` is not used because it is ASCII-only in
|
|
557
|
+
* JavaScript and an identifier may not be.
|
|
558
|
+
*/
|
|
559
|
+
function mentionCount(source, name, stopAt = Number.MAX_SAFE_INTEGER) {
|
|
560
|
+
if (name.length === 0)
|
|
561
|
+
return 0;
|
|
562
|
+
let count = 0;
|
|
563
|
+
let from = 0;
|
|
564
|
+
for (;;) {
|
|
565
|
+
const at = source.indexOf(name, from);
|
|
566
|
+
if (at < 0)
|
|
567
|
+
return count;
|
|
568
|
+
from = at + name.length;
|
|
569
|
+
if (!isIdentifierChar(source[at - 1]) && !isIdentifierChar(source[from])) {
|
|
570
|
+
count += 1;
|
|
571
|
+
if (count >= stopAt)
|
|
572
|
+
return count;
|
|
573
|
+
}
|
|
574
|
+
}
|
|
575
|
+
}
|
|
576
|
+
function isIdentifierChar(char) {
|
|
577
|
+
if (char === undefined)
|
|
578
|
+
return false;
|
|
579
|
+
return char === '_' || char === '$' || /[\p{L}\p{N}]/u.test(char);
|
|
580
|
+
}
|
|
581
|
+
/**
|
|
582
|
+
* Files in the candidate set that nothing else in the index reaches.
|
|
583
|
+
*
|
|
584
|
+
* One batched query for the whole set (`getFileDependentCounts` counts through
|
|
585
|
+
* the symbols, because an `imports` edge points at the imported symbol and a
|
|
586
|
+
* file node almost never receives one). Zero means nothing else in the index
|
|
587
|
+
* reaches into this file at all.
|
|
588
|
+
*/
|
|
589
|
+
function filesNothingReaches(cg, filePaths) {
|
|
590
|
+
const unique = [...new Set(filePaths)];
|
|
591
|
+
if (unique.length === 0)
|
|
592
|
+
return new Set();
|
|
593
|
+
const dependents = cg.getFileDependentCounts(unique);
|
|
594
|
+
return new Set(unique.filter((path) => (dependents.get(path) ?? 0) === 0));
|
|
595
|
+
}
|
|
596
|
+
/** A file whose contents are declarations for somebody else — see {@link HEADER_EXTENSIONS}. */
|
|
597
|
+
function isHeaderFile(filePath) {
|
|
598
|
+
const lower = filePath.toLowerCase();
|
|
599
|
+
return HEADER_EXTENSIONS.some((ext) => lower.endsWith(ext));
|
|
600
|
+
}
|
|
601
|
+
/** A qualified name that runs through a test scope — see {@link TEST_SCOPE_SEGMENTS}. */
|
|
602
|
+
function isTestScope(qualifiedName) {
|
|
603
|
+
for (const segment of qualifiedName.split(/[.:/\\#>]+/)) {
|
|
604
|
+
if (TEST_SCOPE_SEGMENTS.has(segment.toLowerCase()))
|
|
605
|
+
return true;
|
|
606
|
+
}
|
|
607
|
+
return false;
|
|
608
|
+
}
|
|
609
|
+
/** Code the repository carries rather than owns — see {@link VENDOR_SEGMENTS}. */
|
|
610
|
+
function isVendoredPath(filePath) {
|
|
611
|
+
for (const segment of filePath.replace(/\\/g, '/').split('/')) {
|
|
612
|
+
if (VENDOR_SEGMENTS.has(segment.toLowerCase()))
|
|
613
|
+
return true;
|
|
614
|
+
}
|
|
615
|
+
return false;
|
|
616
|
+
}
|
|
617
|
+
/** A name the language calls by itself, so no source file could name it. */
|
|
618
|
+
function isImplicitEntryName(name) {
|
|
619
|
+
return DUNDER.test(name) || IMPLICIT_ENTRY_NAMES.has(name.toLowerCase());
|
|
620
|
+
}
|
|
621
|
+
function normalizeKinds(requested) {
|
|
622
|
+
if (!requested || requested.length === 0)
|
|
623
|
+
return [...exports.DEAD_CODE_KINDS];
|
|
624
|
+
const kinds = requested.filter((kind) => exports.DEAD_CODE_ALLOWED_KINDS.has(kind));
|
|
625
|
+
return kinds.length > 0 ? [...new Set(kinds)] : [...exports.DEAD_CODE_KINDS];
|
|
626
|
+
}
|
|
627
|
+
/**
|
|
628
|
+
* The type each candidate is declared in, for the candidates that are members.
|
|
629
|
+
*
|
|
630
|
+
* One batched query for the whole candidate set, then one for the containers
|
|
631
|
+
* themselves — never a lookup per row. Only type-ish containers are returned: a
|
|
632
|
+
* function's container is the file, which tells us nothing.
|
|
633
|
+
*/
|
|
634
|
+
function containersOf(cg, nodes) {
|
|
635
|
+
const memberIds = nodes.filter((node) => OVERRIDABLE_KINDS.has(node.kind)).map((n) => n.id);
|
|
636
|
+
const out = new Map();
|
|
637
|
+
if (memberIds.length === 0)
|
|
638
|
+
return out;
|
|
639
|
+
const edges = cg.getIncomingEdgesTo(memberIds, ['contains']);
|
|
640
|
+
const byMember = new Map();
|
|
641
|
+
for (const edge of edges)
|
|
642
|
+
if (!byMember.has(edge.target))
|
|
643
|
+
byMember.set(edge.target, edge.source);
|
|
644
|
+
const containerNodes = cg.getNodesByIds([...new Set(byMember.values())]);
|
|
645
|
+
for (const [memberId, containerId] of byMember) {
|
|
646
|
+
const container = containerNodes.get(containerId);
|
|
647
|
+
if (container && CONTAINER_KINDS.has(container.kind))
|
|
648
|
+
out.set(memberId, container);
|
|
649
|
+
}
|
|
650
|
+
return out;
|
|
651
|
+
}
|
|
652
|
+
/**
|
|
653
|
+
* Which candidates override something — the ids to drop.
|
|
654
|
+
*
|
|
655
|
+
* A method that overrides `Base.run` is reached through `Base.run`; the call
|
|
656
|
+
* site names the base, so the override carries no incoming edge of its own and
|
|
657
|
+
* would otherwise head the list. It is matched by NAME within a chain the graph
|
|
658
|
+
* already links (nothing in the engine emits an `overrides` edge), exactly as
|
|
659
|
+
* the type-hierarchy block does.
|
|
660
|
+
*
|
|
661
|
+
* The second rule is the one that looks wrong and is not: **an ancestor with no
|
|
662
|
+
* extracted members counts as a match.** A TypeScript interface of pure method
|
|
663
|
+
* signatures produces no `contains` edges at all, so `class X implements Y`
|
|
664
|
+
* with every member of `Y` implemented reads, structurally, as a class whose
|
|
665
|
+
* members override nothing. Answering "cannot tell" with an exclusion is the
|
|
666
|
+
* only choice that keeps the list's promise; the alternative puts every
|
|
667
|
+
* implementation of every signature-only interface at the top of a screen that
|
|
668
|
+
* says "nothing reaches this".
|
|
669
|
+
*/
|
|
670
|
+
function overrideCandidates(cg, nodes, containers) {
|
|
671
|
+
const dropped = new Set();
|
|
672
|
+
const containerIds = [...new Set([...containers.values()].map((node) => node.id))];
|
|
673
|
+
if (containerIds.length === 0)
|
|
674
|
+
return dropped;
|
|
675
|
+
// Level-by-level upward walk over EVERY container at once: one query per
|
|
676
|
+
// level rather than one per container. `reach` maps an ancestor back to the
|
|
677
|
+
// containers it is an ancestor of.
|
|
678
|
+
const reach = new Map();
|
|
679
|
+
const seen = new Set(containerIds);
|
|
680
|
+
let frontier = containerIds.map((id) => ({ id, roots: new Set([id]) }));
|
|
681
|
+
for (let depth = 0; depth < exports.MAX_OVERRIDE_ANCESTOR_DEPTH && frontier.length > 0; depth++) {
|
|
682
|
+
const rootsOf = new Map(frontier.map((item) => [item.id, item.roots]));
|
|
683
|
+
const edges = cg.getOutgoingEdgesFrom(frontier.map((item) => item.id), ['extends', 'implements']);
|
|
684
|
+
const next = new Map();
|
|
685
|
+
for (const edge of edges) {
|
|
686
|
+
if (edge.target === edge.source)
|
|
687
|
+
continue;
|
|
688
|
+
const roots = rootsOf.get(edge.source);
|
|
689
|
+
if (!roots)
|
|
690
|
+
continue;
|
|
691
|
+
const merged = next.get(edge.target) ?? new Set();
|
|
692
|
+
for (const root of roots)
|
|
693
|
+
merged.add(root);
|
|
694
|
+
next.set(edge.target, merged);
|
|
695
|
+
const known = reach.get(edge.target) ?? new Set();
|
|
696
|
+
for (const root of roots)
|
|
697
|
+
known.add(root);
|
|
698
|
+
reach.set(edge.target, known);
|
|
699
|
+
}
|
|
700
|
+
frontier = [];
|
|
701
|
+
for (const [id, roots] of next) {
|
|
702
|
+
if (seen.has(id))
|
|
703
|
+
continue;
|
|
704
|
+
seen.add(id);
|
|
705
|
+
frontier.push({ id, roots });
|
|
706
|
+
}
|
|
707
|
+
}
|
|
708
|
+
if (reach.size === 0)
|
|
709
|
+
return dropped;
|
|
710
|
+
// What each ancestor declares, and whether it declares anything at all.
|
|
711
|
+
const ancestorIds = [...reach.keys()];
|
|
712
|
+
const memberEdges = cg.getOutgoingEdgesFrom(ancestorIds, ['contains']);
|
|
713
|
+
const memberIdsByAncestor = new Map();
|
|
714
|
+
for (const edge of memberEdges) {
|
|
715
|
+
const bucket = memberIdsByAncestor.get(edge.source);
|
|
716
|
+
if (bucket)
|
|
717
|
+
bucket.push(edge.target);
|
|
718
|
+
else
|
|
719
|
+
memberIdsByAncestor.set(edge.source, [edge.target]);
|
|
720
|
+
}
|
|
721
|
+
const memberNodes = cg.getNodesByIds(memberEdges.map((edge) => edge.target));
|
|
722
|
+
/** Member names an ancestor declares, and whether it declares none we can read. */
|
|
723
|
+
const namesByContainer = new Map();
|
|
724
|
+
const opaqueContainers = new Set();
|
|
725
|
+
for (const [ancestorId, roots] of reach) {
|
|
726
|
+
const names = [];
|
|
727
|
+
for (const memberId of memberIdsByAncestor.get(ancestorId) ?? []) {
|
|
728
|
+
const member = memberNodes.get(memberId);
|
|
729
|
+
if (member && OVERRIDABLE_KINDS.has(member.kind))
|
|
730
|
+
names.push(member.name);
|
|
731
|
+
}
|
|
732
|
+
for (const root of roots) {
|
|
733
|
+
if (names.length === 0) {
|
|
734
|
+
opaqueContainers.add(root);
|
|
735
|
+
continue;
|
|
736
|
+
}
|
|
737
|
+
const bucket = namesByContainer.get(root) ?? new Set();
|
|
738
|
+
for (const name of names)
|
|
739
|
+
bucket.add(name);
|
|
740
|
+
namesByContainer.set(root, bucket);
|
|
741
|
+
}
|
|
742
|
+
}
|
|
743
|
+
for (const node of nodes) {
|
|
744
|
+
const container = containers.get(node.id);
|
|
745
|
+
if (!container)
|
|
746
|
+
continue;
|
|
747
|
+
if (opaqueContainers.has(container.id)) {
|
|
748
|
+
dropped.add(node.id);
|
|
749
|
+
continue;
|
|
750
|
+
}
|
|
751
|
+
if (namesByContainer.get(container.id)?.has(node.name))
|
|
752
|
+
dropped.add(node.id);
|
|
753
|
+
}
|
|
754
|
+
return dropped;
|
|
755
|
+
}
|
|
756
|
+
//# sourceMappingURL=dead-code.js.map
|