@colbymchenry/codegraph-win32-arm64 1.5.0 → 1.6.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/codegraph +5 -0
- package/lib/dist/.test-build-engine.json +1 -0
- package/lib/dist/.test-build-viewer.json +1 -0
- package/lib/dist/bin/codegraph.d.ts +1 -0
- package/lib/dist/bin/codegraph.d.ts.map +1 -1
- package/lib/dist/bin/codegraph.js +744 -320
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/bin/viewer-gate.d.ts +17 -0
- package/lib/dist/bin/viewer-gate.d.ts.map +1 -0
- package/lib/dist/bin/viewer-gate.js +31 -0
- package/lib/dist/bin/viewer-gate.js.map +1 -0
- package/lib/dist/context/formatter.d.ts +7 -1
- package/lib/dist/context/formatter.d.ts.map +1 -1
- package/lib/dist/context/formatter.js +12 -6
- package/lib/dist/context/formatter.js.map +1 -1
- package/lib/dist/context/index.d.ts +12 -0
- package/lib/dist/context/index.d.ts.map +1 -1
- package/lib/dist/context/index.js +103 -16
- package/lib/dist/context/index.js.map +1 -1
- package/lib/dist/db/index.d.ts +58 -2
- package/lib/dist/db/index.d.ts.map +1 -1
- package/lib/dist/db/index.js +187 -32
- package/lib/dist/db/index.js.map +1 -1
- package/lib/dist/db/migrations.d.ts +1 -1
- package/lib/dist/db/migrations.d.ts.map +1 -1
- package/lib/dist/db/migrations.js +64 -1
- package/lib/dist/db/migrations.js.map +1 -1
- package/lib/dist/db/queries.d.ts +583 -6
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +1417 -57
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/db/schema.sql +27 -4
- package/lib/dist/db/sqlite-adapter.d.ts +2 -0
- package/lib/dist/db/sqlite-adapter.d.ts.map +1 -1
- package/lib/dist/db/sqlite-adapter.js +56 -7
- package/lib/dist/db/sqlite-adapter.js.map +1 -1
- package/lib/dist/db/synthesis-stage.d.ts +12 -0
- package/lib/dist/db/synthesis-stage.d.ts.map +1 -0
- package/lib/dist/db/synthesis-stage.js +89 -0
- package/lib/dist/db/synthesis-stage.js.map +1 -0
- package/lib/dist/db/wal-valve.d.ts +32 -12
- package/lib/dist/db/wal-valve.d.ts.map +1 -1
- package/lib/dist/db/wal-valve.js +65 -22
- package/lib/dist/db/wal-valve.js.map +1 -1
- package/lib/dist/db/wsl-shared-index.d.ts +53 -0
- package/lib/dist/db/wsl-shared-index.d.ts.map +1 -0
- package/lib/dist/db/wsl-shared-index.js +121 -0
- package/lib/dist/db/wsl-shared-index.js.map +1 -0
- package/lib/dist/directory.d.ts +130 -2
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +306 -23
- package/lib/dist/directory.js.map +1 -1
- package/lib/dist/errors.d.ts +14 -0
- package/lib/dist/errors.d.ts.map +1 -1
- package/lib/dist/errors.js +16 -1
- package/lib/dist/errors.js.map +1 -1
- package/lib/dist/extraction/cfml-extractor.d.ts +1 -0
- package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/cfml-extractor.js +15 -3
- package/lib/dist/extraction/cfml-extractor.js.map +1 -1
- package/lib/dist/extraction/dfm-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/dfm-extractor.js +14 -10
- package/lib/dist/extraction/dfm-extractor.js.map +1 -1
- package/lib/dist/extraction/extraction-version.d.ts +1 -1
- package/lib/dist/extraction/extraction-version.js +1 -1
- package/lib/dist/extraction/function-ref.d.ts +6 -4
- package/lib/dist/extraction/function-ref.d.ts.map +1 -1
- package/lib/dist/extraction/function-ref.js +41 -14
- package/lib/dist/extraction/function-ref.js.map +1 -1
- package/lib/dist/extraction/generated-detection.d.ts +48 -12
- package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
- package/lib/dist/extraction/generated-detection.js +176 -11
- package/lib/dist/extraction/generated-detection.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts +38 -0
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +115 -3
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +218 -14
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +874 -176
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.d.ts +58 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +310 -19
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
- package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
- package/lib/dist/extraction/languages/dart.js +8 -3
- package/lib/dist/extraction/languages/dart.js.map +1 -1
- package/lib/dist/extraction/languages/erlang.d.ts.map +1 -1
- package/lib/dist/extraction/languages/erlang.js +58 -22
- package/lib/dist/extraction/languages/erlang.js.map +1 -1
- package/lib/dist/extraction/languages/javascript.js +1 -1
- package/lib/dist/extraction/languages/javascript.js.map +1 -1
- package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
- package/lib/dist/extraction/languages/kotlin.js +169 -36
- package/lib/dist/extraction/languages/kotlin.js.map +1 -1
- package/lib/dist/extraction/languages/lua.d.ts.map +1 -1
- package/lib/dist/extraction/languages/lua.js +4 -1
- package/lib/dist/extraction/languages/lua.js.map +1 -1
- package/lib/dist/extraction/languages/objc.d.ts.map +1 -1
- package/lib/dist/extraction/languages/objc.js +4 -0
- package/lib/dist/extraction/languages/objc.js.map +1 -1
- package/lib/dist/extraction/languages/python.d.ts.map +1 -1
- package/lib/dist/extraction/languages/python.js +71 -0
- package/lib/dist/extraction/languages/python.js.map +1 -1
- package/lib/dist/extraction/languages/rust.d.ts +20 -0
- package/lib/dist/extraction/languages/rust.d.ts.map +1 -1
- package/lib/dist/extraction/languages/rust.js +50 -20
- package/lib/dist/extraction/languages/rust.js.map +1 -1
- package/lib/dist/extraction/languages/scala.d.ts.map +1 -1
- package/lib/dist/extraction/languages/scala.js +18 -3
- package/lib/dist/extraction/languages/scala.js.map +1 -1
- package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/typescript.js +9 -2
- package/lib/dist/extraction/languages/typescript.js.map +1 -1
- package/lib/dist/extraction/liquid-extractor.d.ts +18 -0
- package/lib/dist/extraction/liquid-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/liquid-extractor.js +98 -22
- package/lib/dist/extraction/liquid-extractor.js.map +1 -1
- package/lib/dist/extraction/mybatis-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/mybatis-extractor.js +6 -4
- package/lib/dist/extraction/mybatis-extractor.js.map +1 -1
- package/lib/dist/extraction/parse-pool.d.ts +7 -0
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +20 -1
- package/lib/dist/extraction/parse-pool.js.map +1 -1
- package/lib/dist/extraction/syntax-tokens.d.ts +103 -0
- package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -0
- package/lib/dist/extraction/syntax-tokens.js +381 -0
- package/lib/dist/extraction/syntax-tokens.js.map +1 -0
- package/lib/dist/extraction/tree-sitter-helpers.d.ts +5 -0
- package/lib/dist/extraction/tree-sitter-helpers.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter-helpers.js +17 -0
- package/lib/dist/extraction/tree-sitter-helpers.js.map +1 -1
- package/lib/dist/extraction/tree-sitter-types.d.ts +31 -3
- package/lib/dist/extraction/tree-sitter-types.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +101 -18
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +926 -132
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/wasm/tree-sitter-scala.wasm +0 -0
- package/lib/dist/file-limits.d.ts +40 -0
- package/lib/dist/file-limits.d.ts.map +1 -0
- package/lib/dist/file-limits.js +147 -0
- package/lib/dist/file-limits.js.map +1 -0
- package/lib/dist/graph/branch-guards.d.ts +248 -0
- package/lib/dist/graph/branch-guards.d.ts.map +1 -0
- package/lib/dist/graph/branch-guards.js +2231 -0
- package/lib/dist/graph/branch-guards.js.map +1 -0
- package/lib/dist/graph/dead-code.d.ts +251 -0
- package/lib/dist/graph/dead-code.d.ts.map +1 -0
- package/lib/dist/graph/dead-code.js +776 -0
- package/lib/dist/graph/dead-code.js.map +1 -0
- package/lib/dist/graph/dynamic-boundary-report.d.ts +121 -0
- package/lib/dist/graph/dynamic-boundary-report.d.ts.map +1 -0
- package/lib/dist/graph/dynamic-boundary-report.js +283 -0
- package/lib/dist/graph/dynamic-boundary-report.js.map +1 -0
- package/lib/dist/graph/index.d.ts +4 -0
- package/lib/dist/graph/index.d.ts.map +1 -1
- package/lib/dist/graph/index.js +16 -1
- package/lib/dist/graph/index.js.map +1 -1
- package/lib/dist/graph/named-symbol-flow.d.ts +125 -0
- package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -0
- package/lib/dist/graph/named-symbol-flow.js +552 -0
- package/lib/dist/graph/named-symbol-flow.js.map +1 -0
- package/lib/dist/graph/queries.d.ts.map +1 -1
- package/lib/dist/graph/queries.js +2 -0
- package/lib/dist/graph/queries.js.map +1 -1
- package/lib/dist/graph/symbol-lookup.d.ts +83 -0
- package/lib/dist/graph/symbol-lookup.d.ts.map +1 -0
- package/lib/dist/graph/symbol-lookup.js +181 -0
- package/lib/dist/graph/symbol-lookup.js.map +1 -0
- package/lib/dist/graph/traversal.d.ts +9 -0
- package/lib/dist/graph/traversal.d.ts.map +1 -1
- package/lib/dist/graph/traversal.js +62 -36
- package/lib/dist/graph/traversal.js.map +1 -1
- package/lib/dist/graph/type-hierarchy.d.ts +155 -0
- package/lib/dist/graph/type-hierarchy.d.ts.map +1 -0
- package/lib/dist/graph/type-hierarchy.js +382 -0
- package/lib/dist/graph/type-hierarchy.js.map +1 -0
- package/lib/dist/index.d.ts +273 -11
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +511 -34
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/installer/index.d.ts +4 -3
- package/lib/dist/installer/index.d.ts.map +1 -1
- package/lib/dist/installer/index.js +11 -8
- package/lib/dist/installer/index.js.map +1 -1
- package/lib/dist/installer/targets/antigravity.d.ts.map +1 -1
- package/lib/dist/installer/targets/antigravity.js +14 -2
- package/lib/dist/installer/targets/antigravity.js.map +1 -1
- package/lib/dist/installer/targets/claude.d.ts +3 -0
- package/lib/dist/installer/targets/claude.d.ts.map +1 -1
- package/lib/dist/installer/targets/claude.js +72 -12
- package/lib/dist/installer/targets/claude.js.map +1 -1
- package/lib/dist/installer/targets/codex.d.ts +23 -8
- package/lib/dist/installer/targets/codex.d.ts.map +1 -1
- package/lib/dist/installer/targets/codex.js +74 -47
- package/lib/dist/installer/targets/codex.js.map +1 -1
- package/lib/dist/installer/targets/copilot-cli.d.ts +32 -0
- package/lib/dist/installer/targets/copilot-cli.d.ts.map +1 -0
- package/lib/dist/installer/targets/copilot-cli.js +215 -0
- package/lib/dist/installer/targets/copilot-cli.js.map +1 -0
- package/lib/dist/installer/targets/copilot-jetbrains.d.ts +42 -0
- package/lib/dist/installer/targets/copilot-jetbrains.d.ts.map +1 -0
- package/lib/dist/installer/targets/copilot-jetbrains.js +238 -0
- package/lib/dist/installer/targets/copilot-jetbrains.js.map +1 -0
- package/lib/dist/installer/targets/copilot-vscode.d.ts +47 -0
- package/lib/dist/installer/targets/copilot-vscode.d.ts.map +1 -0
- package/lib/dist/installer/targets/copilot-vscode.js +219 -0
- package/lib/dist/installer/targets/copilot-vscode.js.map +1 -0
- package/lib/dist/installer/targets/opencode.d.ts +16 -5
- package/lib/dist/installer/targets/opencode.d.ts.map +1 -1
- package/lib/dist/installer/targets/opencode.js +73 -22
- package/lib/dist/installer/targets/opencode.js.map +1 -1
- package/lib/dist/installer/targets/registry.d.ts.map +1 -1
- package/lib/dist/installer/targets/registry.js +6 -0
- package/lib/dist/installer/targets/registry.js.map +1 -1
- package/lib/dist/installer/targets/shared.d.ts +14 -3
- package/lib/dist/installer/targets/shared.d.ts.map +1 -1
- package/lib/dist/installer/targets/shared.js +39 -11
- package/lib/dist/installer/targets/shared.js.map +1 -1
- package/lib/dist/installer/targets/toml.d.ts +6 -5
- package/lib/dist/installer/targets/toml.d.ts.map +1 -1
- package/lib/dist/installer/targets/toml.js +99 -20
- package/lib/dist/installer/targets/toml.js.map +1 -1
- package/lib/dist/installer/targets/types.d.ts +12 -5
- package/lib/dist/installer/targets/types.d.ts.map +1 -1
- package/lib/dist/mcp/answer-freshness.d.ts +10 -0
- package/lib/dist/mcp/answer-freshness.d.ts.map +1 -0
- package/lib/dist/mcp/answer-freshness.js +68 -0
- package/lib/dist/mcp/answer-freshness.js.map +1 -0
- package/lib/dist/mcp/daemon-manager.d.ts +1 -1
- package/lib/dist/mcp/daemon-manager.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-manager.js +17 -1
- package/lib/dist/mcp/daemon-manager.js.map +1 -1
- package/lib/dist/mcp/daemon-paths.d.ts +8 -0
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-paths.js +65 -2
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-registry.d.ts +17 -4
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +133 -23
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/daemon.d.ts +26 -13
- package/lib/dist/mcp/daemon.d.ts.map +1 -1
- package/lib/dist/mcp/daemon.js +126 -32
- package/lib/dist/mcp/daemon.js.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.d.ts +1 -10
- package/lib/dist/mcp/dynamic-boundaries.d.ts.map +1 -1
- package/lib/dist/mcp/dynamic-boundaries.js +46 -42
- package/lib/dist/mcp/dynamic-boundaries.js.map +1 -1
- package/lib/dist/mcp/engine.d.ts +31 -9
- package/lib/dist/mcp/engine.d.ts.map +1 -1
- package/lib/dist/mcp/engine.js +190 -64
- package/lib/dist/mcp/engine.js.map +1 -1
- package/lib/dist/mcp/explore-dedup.d.ts +140 -0
- package/lib/dist/mcp/explore-dedup.d.ts.map +1 -0
- package/lib/dist/mcp/explore-dedup.js +239 -0
- package/lib/dist/mcp/explore-dedup.js.map +1 -0
- package/lib/dist/mcp/explore-diagnostics.d.ts +289 -0
- package/lib/dist/mcp/explore-diagnostics.d.ts.map +1 -0
- package/lib/dist/mcp/explore-diagnostics.js +558 -0
- package/lib/dist/mcp/explore-diagnostics.js.map +1 -0
- package/lib/dist/mcp/explore-session-state.d.ts +217 -0
- package/lib/dist/mcp/explore-session-state.d.ts.map +1 -0
- package/lib/dist/mcp/explore-session-state.js +322 -0
- package/lib/dist/mcp/explore-session-state.js.map +1 -0
- package/lib/dist/mcp/index-freshness-worker.d.ts +2 -0
- package/lib/dist/mcp/index-freshness-worker.d.ts.map +1 -0
- package/lib/dist/mcp/index-freshness-worker.js +30 -0
- package/lib/dist/mcp/index-freshness-worker.js.map +1 -0
- package/lib/dist/mcp/index-freshness.d.ts +7 -0
- package/lib/dist/mcp/index-freshness.d.ts.map +1 -0
- package/lib/dist/mcp/index-freshness.js +94 -0
- package/lib/dist/mcp/index-freshness.js.map +1 -0
- package/lib/dist/mcp/index.d.ts +27 -1
- package/lib/dist/mcp/index.d.ts.map +1 -1
- package/lib/dist/mcp/index.js +159 -14
- package/lib/dist/mcp/index.js.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts +4 -1
- package/lib/dist/mcp/liveness-watchdog.d.ts.map +1 -1
- package/lib/dist/mcp/liveness-watchdog.js +14 -3
- package/lib/dist/mcp/liveness-watchdog.js.map +1 -1
- package/lib/dist/mcp/project-lifecycle.d.ts +9 -0
- package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -0
- package/lib/dist/mcp/project-lifecycle.js +181 -0
- package/lib/dist/mcp/project-lifecycle.js.map +1 -0
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +15 -1
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/query-pool.d.ts +2 -2
- package/lib/dist/mcp/query-pool.d.ts.map +1 -1
- package/lib/dist/mcp/query-pool.js +9 -7
- package/lib/dist/mcp/query-pool.js.map +1 -1
- package/lib/dist/mcp/query-worker.js +2 -2
- package/lib/dist/mcp/query-worker.js.map +1 -1
- package/lib/dist/mcp/server-instructions.d.ts +2 -2
- package/lib/dist/mcp/server-instructions.d.ts.map +1 -1
- package/lib/dist/mcp/server-instructions.js +13 -5
- package/lib/dist/mcp/server-instructions.js.map +1 -1
- package/lib/dist/mcp/session.d.ts +16 -0
- package/lib/dist/mcp/session.d.ts.map +1 -1
- package/lib/dist/mcp/session.js +36 -13
- package/lib/dist/mcp/session.js.map +1 -1
- package/lib/dist/mcp/startup-handshake.d.ts +3 -1
- package/lib/dist/mcp/startup-handshake.d.ts.map +1 -1
- package/lib/dist/mcp/startup-handshake.js +10 -2
- package/lib/dist/mcp/startup-handshake.js.map +1 -1
- package/lib/dist/mcp/tools.d.ts +544 -38
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +4246 -770
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/mcp/writer-lock.d.ts +61 -0
- package/lib/dist/mcp/writer-lock.d.ts.map +1 -0
- package/lib/dist/mcp/writer-lock.js +260 -0
- package/lib/dist/mcp/writer-lock.js.map +1 -0
- package/lib/dist/project-config.d.ts +23 -0
- package/lib/dist/project-config.d.ts.map +1 -1
- package/lib/dist/project-config.js +39 -2
- package/lib/dist/project-config.js.map +1 -1
- package/lib/dist/resolution/alias-binding.d.ts +56 -0
- package/lib/dist/resolution/alias-binding.d.ts.map +1 -0
- package/lib/dist/resolution/alias-binding.js +127 -0
- package/lib/dist/resolution/alias-binding.js.map +1 -0
- package/lib/dist/resolution/c-fnptr-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/c-fnptr-synthesizer.js +21 -19
- package/lib/dist/resolution/c-fnptr-synthesizer.js.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts +23 -1
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +330 -154
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
- package/lib/dist/resolution/cpp-constructor.d.ts +4 -0
- package/lib/dist/resolution/cpp-constructor.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-constructor.js +123 -0
- package/lib/dist/resolution/cpp-constructor.js.map +1 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts +12 -0
- package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -0
- package/lib/dist/resolution/cpp-macro-visibility.js +342 -0
- package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -0
- package/lib/dist/resolution/expo-router-synthesizer.d.ts +32 -0
- package/lib/dist/resolution/expo-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/expo-router-synthesizer.js +189 -0
- package/lib/dist/resolution/expo-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/csharp.js +96 -2
- package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.d.ts +189 -0
- package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/expo-router.js +785 -0
- package/lib/dist/resolution/frameworks/expo-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/express.js +251 -16
- package/lib/dist/resolution/frameworks/express.js.map +1 -1
- package/lib/dist/resolution/frameworks/index.d.ts +5 -0
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/index.js +29 -1
- package/lib/dist/resolution/frameworks/index.js.map +1 -1
- package/lib/dist/resolution/frameworks/java.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/java.js +79 -47
- package/lib/dist/resolution/frameworks/java.js.map +1 -1
- package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/nestjs.js +6 -14
- package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/nextjs.d.ts +76 -0
- package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/nextjs.js +328 -0
- package/lib/dist/resolution/frameworks/nextjs.js.map +1 -0
- package/lib/dist/resolution/frameworks/object-literal.d.ts +32 -0
- package/lib/dist/resolution/frameworks/object-literal.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/object-literal.js +139 -0
- package/lib/dist/resolution/frameworks/object-literal.js.map +1 -0
- package/lib/dist/resolution/frameworks/package-deps.d.ts +14 -0
- package/lib/dist/resolution/frameworks/package-deps.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/package-deps.js +78 -0
- package/lib/dist/resolution/frameworks/package-deps.js.map +1 -0
- package/lib/dist/resolution/frameworks/python.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/python.js +166 -0
- package/lib/dist/resolution/frameworks/python.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.d.ts +26 -0
- package/lib/dist/resolution/frameworks/react-native.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-native.js +153 -14
- package/lib/dist/resolution/frameworks/react-native.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.d.ts +46 -0
- package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/react-router.js +187 -0
- package/lib/dist/resolution/frameworks/react-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/react.d.ts +2 -1
- package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react.js +188 -139
- package/lib/dist/resolution/frameworks/react.js.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.js +6 -1
- package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
- package/lib/dist/resolution/frameworks/sveltekit-router.d.ts +36 -0
- package/lib/dist/resolution/frameworks/sveltekit-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/sveltekit-router.js +156 -0
- package/lib/dist/resolution/frameworks/sveltekit-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/swift.js +11 -1
- package/lib/dist/resolution/frameworks/swift.js.map +1 -1
- package/lib/dist/resolution/frameworks/tanstack-router.d.ts +84 -0
- package/lib/dist/resolution/frameworks/tanstack-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/tanstack-router.js +437 -0
- package/lib/dist/resolution/frameworks/tanstack-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/vue-router.d.ts +82 -0
- package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/vue-router.js +377 -0
- package/lib/dist/resolution/frameworks/vue-router.js.map +1 -0
- package/lib/dist/resolution/import-resolver.d.ts +38 -0
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +394 -28
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +89 -25
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +567 -149
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/js-builtins.d.ts +13 -0
- package/lib/dist/resolution/js-builtins.d.ts.map +1 -0
- package/lib/dist/resolution/js-builtins.js +46 -0
- package/lib/dist/resolution/js-builtins.js.map +1 -0
- package/lib/dist/resolution/name-matcher.d.ts +99 -22
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +2192 -87
- package/lib/dist/resolution/name-matcher.js.map +1 -1
- package/lib/dist/resolution/next-router-synthesizer.d.ts +27 -0
- package/lib/dist/resolution/next-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/next-router-synthesizer.js +113 -0
- package/lib/dist/resolution/next-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/path-aliases.d.ts +6 -4
- package/lib/dist/resolution/path-aliases.d.ts.map +1 -1
- package/lib/dist/resolution/path-aliases.js +125 -17
- package/lib/dist/resolution/path-aliases.js.map +1 -1
- package/lib/dist/resolution/react-router-synthesizer.d.ts +33 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/react-router-synthesizer.js +126 -0
- package/lib/dist/resolution/react-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/resolver-pool.d.ts +2 -0
- package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-pool.js +4 -0
- package/lib/dist/resolution/resolver-pool.js.map +1 -1
- package/lib/dist/resolution/strip-comments.d.ts +6 -0
- package/lib/dist/resolution/strip-comments.d.ts.map +1 -1
- package/lib/dist/resolution/strip-comments.js +58 -0
- package/lib/dist/resolution/strip-comments.js.map +1 -1
- package/lib/dist/resolution/sveltekit-synthesizer.d.ts +58 -0
- package/lib/dist/resolution/sveltekit-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/sveltekit-synthesizer.js +173 -0
- package/lib/dist/resolution/sveltekit-synthesizer.js.map +1 -0
- package/lib/dist/resolution/synth-utils.d.ts +26 -0
- package/lib/dist/resolution/synth-utils.d.ts.map +1 -0
- package/lib/dist/resolution/synth-utils.js +75 -0
- package/lib/dist/resolution/synth-utils.js.map +1 -0
- package/lib/dist/resolution/tanstack-router-synthesizer.d.ts +31 -0
- package/lib/dist/resolution/tanstack-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/tanstack-router-synthesizer.js +114 -0
- package/lib/dist/resolution/tanstack-router-synthesizer.js.map +1 -0
- package/lib/dist/resolution/tier-synthesizer.d.ts +49 -0
- package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/tier-synthesizer.js +931 -0
- package/lib/dist/resolution/tier-synthesizer.js.map +1 -0
- package/lib/dist/resolution/types.d.ts +78 -2
- package/lib/dist/resolution/types.d.ts.map +1 -1
- package/lib/dist/resolution/types.js +64 -0
- package/lib/dist/resolution/types.js.map +1 -1
- package/lib/dist/resolution/vue-router-synthesizer.d.ts +30 -0
- package/lib/dist/resolution/vue-router-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/vue-router-synthesizer.js +115 -0
- package/lib/dist/resolution/vue-router-synthesizer.js.map +1 -0
- package/lib/dist/search/identifier-segments.d.ts +10 -0
- package/lib/dist/search/identifier-segments.d.ts.map +1 -1
- package/lib/dist/search/identifier-segments.js +29 -0
- package/lib/dist/search/identifier-segments.js.map +1 -1
- package/lib/dist/search/query-paths.d.ts +106 -0
- package/lib/dist/search/query-paths.d.ts.map +1 -0
- package/lib/dist/search/query-paths.js +513 -0
- package/lib/dist/search/query-paths.js.map +1 -0
- package/lib/dist/search/query-utils.d.ts +16 -1
- package/lib/dist/search/query-utils.d.ts.map +1 -1
- package/lib/dist/search/query-utils.js +48 -10
- package/lib/dist/search/query-utils.js.map +1 -1
- package/lib/dist/sync/watch-policy.d.ts +14 -0
- package/lib/dist/sync/watch-policy.d.ts.map +1 -1
- package/lib/dist/sync/watch-policy.js +19 -0
- package/lib/dist/sync/watch-policy.js.map +1 -1
- package/lib/dist/sync/watcher.d.ts +74 -35
- package/lib/dist/sync/watcher.d.ts.map +1 -1
- package/lib/dist/sync/watcher.js +281 -99
- package/lib/dist/sync/watcher.js.map +1 -1
- package/lib/dist/telemetry/index.d.ts +4 -2
- package/lib/dist/telemetry/index.d.ts.map +1 -1
- package/lib/dist/telemetry/index.js +92 -41
- package/lib/dist/telemetry/index.js.map +1 -1
- package/lib/dist/types.d.ts +21 -2
- package/lib/dist/types.d.ts.map +1 -1
- package/lib/dist/types.js +2 -0
- package/lib/dist/types.js.map +1 -1
- package/lib/dist/ui-server/api/deadcode.d.ts +84 -0
- package/lib/dist/ui-server/api/deadcode.d.ts.map +1 -0
- package/lib/dist/ui-server/api/deadcode.js +136 -0
- package/lib/dist/ui-server/api/deadcode.js.map +1 -0
- package/lib/dist/ui-server/api/effects.d.ts +87 -0
- package/lib/dist/ui-server/api/effects.d.ts.map +1 -0
- package/lib/dist/ui-server/api/effects.js +499 -0
- package/lib/dist/ui-server/api/effects.js.map +1 -0
- package/lib/dist/ui-server/api/entrypoints.d.ts +86 -0
- package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -0
- package/lib/dist/ui-server/api/entrypoints.js +279 -0
- package/lib/dist/ui-server/api/entrypoints.js.map +1 -0
- package/lib/dist/ui-server/api/events.d.ts +183 -0
- package/lib/dist/ui-server/api/events.d.ts.map +1 -0
- package/lib/dist/ui-server/api/events.js +430 -0
- package/lib/dist/ui-server/api/events.js.map +1 -0
- package/lib/dist/ui-server/api/file.d.ts +66 -0
- package/lib/dist/ui-server/api/file.d.ts.map +1 -0
- package/lib/dist/ui-server/api/file.js +235 -0
- package/lib/dist/ui-server/api/file.js.map +1 -0
- package/lib/dist/ui-server/api/filecode.d.ts +126 -0
- package/lib/dist/ui-server/api/filecode.d.ts.map +1 -0
- package/lib/dist/ui-server/api/filecode.js +205 -0
- package/lib/dist/ui-server/api/filecode.js.map +1 -0
- package/lib/dist/ui-server/api/flow.d.ts +226 -0
- package/lib/dist/ui-server/api/flow.d.ts.map +1 -0
- package/lib/dist/ui-server/api/flow.js +612 -0
- package/lib/dist/ui-server/api/flow.js.map +1 -0
- package/lib/dist/ui-server/api/hierarchy.d.ts +81 -0
- package/lib/dist/ui-server/api/hierarchy.d.ts.map +1 -0
- package/lib/dist/ui-server/api/hierarchy.js +92 -0
- package/lib/dist/ui-server/api/hierarchy.js.map +1 -0
- package/lib/dist/ui-server/api/index.d.ts +90 -0
- package/lib/dist/ui-server/api/index.d.ts.map +1 -0
- package/lib/dist/ui-server/api/index.js +332 -0
- package/lib/dist/ui-server/api/index.js.map +1 -0
- package/lib/dist/ui-server/api/map.d.ts +238 -0
- package/lib/dist/ui-server/api/map.d.ts.map +1 -0
- package/lib/dist/ui-server/api/map.js +681 -0
- package/lib/dist/ui-server/api/map.js.map +1 -0
- package/lib/dist/ui-server/api/node.d.ts +81 -0
- package/lib/dist/ui-server/api/node.d.ts.map +1 -0
- package/lib/dist/ui-server/api/node.js +388 -0
- package/lib/dist/ui-server/api/node.js.map +1 -0
- package/lib/dist/ui-server/api/nodes.d.ts +25 -0
- package/lib/dist/ui-server/api/nodes.d.ts.map +1 -0
- package/lib/dist/ui-server/api/nodes.js +45 -0
- package/lib/dist/ui-server/api/nodes.js.map +1 -0
- package/lib/dist/ui-server/api/program.d.ts +139 -0
- package/lib/dist/ui-server/api/program.d.ts.map +1 -0
- package/lib/dist/ui-server/api/program.js +315 -0
- package/lib/dist/ui-server/api/program.js.map +1 -0
- package/lib/dist/ui-server/api/respond.d.ts +76 -0
- package/lib/dist/ui-server/api/respond.d.ts.map +1 -0
- package/lib/dist/ui-server/api/respond.js +186 -0
- package/lib/dist/ui-server/api/respond.js.map +1 -0
- package/lib/dist/ui-server/api/route-roots.d.ts +39 -0
- package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -0
- package/lib/dist/ui-server/api/route-roots.js +96 -0
- package/lib/dist/ui-server/api/route-roots.js.map +1 -0
- package/lib/dist/ui-server/api/routes.d.ts +59 -0
- package/lib/dist/ui-server/api/routes.d.ts.map +1 -0
- package/lib/dist/ui-server/api/routes.js +108 -0
- package/lib/dist/ui-server/api/routes.js.map +1 -0
- package/lib/dist/ui-server/api/screens.d.ts +117 -0
- package/lib/dist/ui-server/api/screens.d.ts.map +1 -0
- package/lib/dist/ui-server/api/screens.js +611 -0
- package/lib/dist/ui-server/api/screens.js.map +1 -0
- package/lib/dist/ui-server/api/search.d.ts +29 -0
- package/lib/dist/ui-server/api/search.d.ts.map +1 -0
- package/lib/dist/ui-server/api/search.js +232 -0
- package/lib/dist/ui-server/api/search.js.map +1 -0
- package/lib/dist/ui-server/api/session.d.ts +52 -0
- package/lib/dist/ui-server/api/session.d.ts.map +1 -0
- package/lib/dist/ui-server/api/session.js +196 -0
- package/lib/dist/ui-server/api/session.js.map +1 -0
- package/lib/dist/ui-server/api/source.d.ts +200 -0
- package/lib/dist/ui-server/api/source.d.ts.map +1 -0
- package/lib/dist/ui-server/api/source.js +422 -0
- package/lib/dist/ui-server/api/source.js.map +1 -0
- package/lib/dist/ui-server/api/stats.d.ts +27 -0
- package/lib/dist/ui-server/api/stats.d.ts.map +1 -0
- package/lib/dist/ui-server/api/stats.js +164 -0
- package/lib/dist/ui-server/api/stats.js.map +1 -0
- package/lib/dist/ui-server/api/steps.d.ts +274 -0
- package/lib/dist/ui-server/api/steps.d.ts.map +1 -0
- package/lib/dist/ui-server/api/steps.js +1446 -0
- package/lib/dist/ui-server/api/steps.js.map +1 -0
- package/lib/dist/ui-server/api/trail-store.d.ts +142 -0
- package/lib/dist/ui-server/api/trail-store.d.ts.map +1 -0
- package/lib/dist/ui-server/api/trail-store.js +323 -0
- package/lib/dist/ui-server/api/trail-store.js.map +1 -0
- package/lib/dist/ui-server/api/trails.d.ts +163 -0
- package/lib/dist/ui-server/api/trails.d.ts.map +1 -0
- package/lib/dist/ui-server/api/trails.js +369 -0
- package/lib/dist/ui-server/api/trails.js.map +1 -0
- package/lib/dist/ui-server/api/when.d.ts +125 -0
- package/lib/dist/ui-server/api/when.d.ts.map +1 -0
- package/lib/dist/ui-server/api/when.js +251 -0
- package/lib/dist/ui-server/api/when.js.map +1 -0
- package/lib/dist/ui-server/api/wire.d.ts +179 -0
- package/lib/dist/ui-server/api/wire.d.ts.map +1 -0
- package/lib/dist/ui-server/api/wire.js +231 -0
- package/lib/dist/ui-server/api/wire.js.map +1 -0
- package/lib/dist/ui-server/assets.d.ts +40 -0
- package/lib/dist/ui-server/assets.d.ts.map +1 -0
- package/lib/dist/ui-server/assets.js +110 -0
- package/lib/dist/ui-server/assets.js.map +1 -0
- package/lib/dist/ui-server/constants.d.ts +32 -0
- package/lib/dist/ui-server/constants.d.ts.map +1 -0
- package/lib/dist/ui-server/constants.js +35 -0
- package/lib/dist/ui-server/constants.js.map +1 -0
- package/lib/dist/ui-server/highlight/index.d.ts +113 -0
- package/lib/dist/ui-server/highlight/index.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/index.js +307 -0
- package/lib/dist/ui-server/highlight/index.js.map +1 -0
- package/lib/dist/ui-server/highlight/languages.d.ts +36 -0
- package/lib/dist/ui-server/highlight/languages.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/languages.js +50 -0
- package/lib/dist/ui-server/highlight/languages.js.map +1 -0
- package/lib/dist/ui-server/index.d.ts +92 -0
- package/lib/dist/ui-server/index.d.ts.map +1 -0
- package/lib/dist/ui-server/index.js +399 -0
- package/lib/dist/ui-server/index.js.map +1 -0
- package/lib/dist/ui-server/open-browser.d.ts +31 -0
- package/lib/dist/ui-server/open-browser.d.ts.map +1 -0
- package/lib/dist/ui-server/open-browser.js +79 -0
- package/lib/dist/ui-server/open-browser.js.map +1 -0
- package/lib/dist/ui-server/security.d.ts +127 -0
- package/lib/dist/ui-server/security.d.ts.map +1 -0
- package/lib/dist/ui-server/security.js +332 -0
- package/lib/dist/ui-server/security.js.map +1 -0
- package/lib/dist/ui-server/static.d.ts +45 -0
- package/lib/dist/ui-server/static.d.ts.map +1 -0
- package/lib/dist/ui-server/static.js +165 -0
- package/lib/dist/ui-server/static.js.map +1 -0
- package/lib/dist/utils.d.ts +14 -2
- package/lib/dist/utils.d.ts.map +1 -1
- package/lib/dist/utils.js +25 -10
- package/lib/dist/utils.js.map +1 -1
- package/lib/dist/viewer/assets/archivo-latin-ext-wght-normal-C4zznr8T.woff2 +0 -0
- package/lib/dist/viewer/assets/archivo-latin-wght-normal-E0tuGl4L.woff2 +0 -0
- package/lib/dist/viewer/assets/archivo-vietnamese-wght-normal-XAtsl5Q_.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-2syK4fUT.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-italic-CBJ8pzag.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-BSMlKf0J.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-400-normal-CEL4l2ZJ.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Ael50iVv.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-500-normal-Bq9vWWag.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-CTOM6hUh.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-600-normal-fLZuRloM.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-B4oTjJdl.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-italic-CBjNughH.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-DMdlQ8Kv.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-400-normal-xuaO2J-f.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BIfNGwUT.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-500-normal-BqneJy0T.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-9HEixskS.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-cyrillic-ext-600-normal-V-xxqcpd.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-66oory27.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-italic-BqAiT5Ww.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-CvHOgSBP.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-400-normal-DMJ8VG8y.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-CB9ihrfo.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-500-normal-DSY6xOcd.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-BgSNZQsw.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-600-normal-DWFSQ4vo.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-B7_fu1kp.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-italic-Bg0ZHwF4.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-BmRBH3aV.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-400-normal-D3D2R8hC.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CAhNIIs5.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-500-normal-CZ70TYgx.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-D38SheWl.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-latin-ext-600-normal-DmB0ttJJ.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-D6eaYXMU.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-italic-DRuN92E5.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-BulugwFq.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-400-normal-DDuiU_S-.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-C8zxqsMH.woff +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-500-normal-DZ4AoWbu.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-D2EvbN8M.woff2 +0 -0
- package/lib/dist/viewer/assets/ibm-plex-mono-vietnamese-600-normal-iLQfcSjf.woff +0 -0
- package/lib/dist/viewer/assets/index-CF9yvio6.css +1 -0
- package/lib/dist/viewer/assets/index-D4S7YUPf.js +97 -0
- package/lib/dist/viewer/index.html +16 -0
- package/lib/kernel/codegraph-kernel.node +2 -2
- package/lib/node_modules/.package-lock.json +4 -4
- package/lib/node_modules/picomatch/README.md +56 -51
- package/lib/node_modules/picomatch/lib/constants.js +4 -0
- package/lib/node_modules/picomatch/lib/parse.js +341 -1
- package/lib/node_modules/picomatch/lib/picomatch.js +25 -5
- package/lib/node_modules/picomatch/lib/scan.js +30 -18
- package/lib/node_modules/picomatch/package.json +4 -4
- package/lib/package.json +9 -2
- package/package.json +1 -1
|
@@ -1,12 +1,23 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.SYNTH_PROGRESS_STEPS = exports.SYNTH_PASSES = void 0;
|
|
4
|
+
exports.hasSynthesisPattern = hasSynthesisPattern;
|
|
4
5
|
exports.synthesizeCallbackEdges = synthesizeCallbackEdges;
|
|
5
6
|
const generated_detection_1 = require("../extraction/generated-detection");
|
|
6
7
|
const strip_comments_1 = require("./strip-comments");
|
|
7
8
|
const c_fnptr_synthesizer_1 = require("./c-fnptr-synthesizer");
|
|
8
9
|
const goframe_synthesizer_1 = require("./goframe-synthesizer");
|
|
10
|
+
const expo_router_synthesizer_1 = require("./expo-router-synthesizer");
|
|
11
|
+
const next_router_synthesizer_1 = require("./next-router-synthesizer");
|
|
12
|
+
const react_router_synthesizer_1 = require("./react-router-synthesizer");
|
|
13
|
+
const tanstack_router_synthesizer_1 = require("./tanstack-router-synthesizer");
|
|
14
|
+
const vue_router_synthesizer_1 = require("./vue-router-synthesizer");
|
|
15
|
+
const sveltekit_synthesizer_1 = require("./sveltekit-synthesizer");
|
|
9
16
|
const cooperative_yield_1 = require("./cooperative-yield");
|
|
17
|
+
const tier_synthesizer_1 = require("./tier-synthesizer");
|
|
18
|
+
const synth_utils_1 = require("./synth-utils");
|
|
19
|
+
const import_resolver_1 = require("./import-resolver");
|
|
20
|
+
const name_matcher_1 = require("./name-matcher");
|
|
10
21
|
const REGISTRAR_NAME = /^(on[A-Z]\w*|subscribe|addListener|addEventListener|register|watch|listen|addCallback)$/;
|
|
11
22
|
const DISPATCHER_NAME = /(emit|trigger|notify|dispatch|fire|publish|flush)/i;
|
|
12
23
|
const MAX_CALLBACKS_PER_CHANNEL = 40;
|
|
@@ -15,6 +26,7 @@ const ON_RE = /\.(?:on|once|addListener)\(\s*['"]([^'"]+)['"]\s*,\s*(?:function\
|
|
|
15
26
|
const EMIT_RE = /\.(?:emit|fire|dispatchEvent)\(\s*['"]([^'"]+)['"]/g;
|
|
16
27
|
const SETSTATE_RE = /this\.setState\s*\(/;
|
|
17
28
|
const FLUTTER_SETSTATE_RE = /\bsetState\s*\(/; // Flutter: setState((){…}) / this.setState
|
|
29
|
+
const JS_FAMILY = ['typescript', 'javascript', 'tsx', 'jsx'];
|
|
18
30
|
const JSX_TAG_RE = /<([A-Z][A-Za-z0-9_]*)[\s/>]/g;
|
|
19
31
|
const MAX_JSX_CHILDREN = 30;
|
|
20
32
|
// Vue SFC templates: kebab-case child components (<el-button> → ElButton) and
|
|
@@ -85,35 +97,6 @@ function sliceLines(content, startLine, endLine) {
|
|
|
85
97
|
return null;
|
|
86
98
|
return content.split('\n').slice(startLine - 1, endLine).join('\n');
|
|
87
99
|
}
|
|
88
|
-
/**
|
|
89
|
-
* Per-match line resolver over `src`, 1-based at `baseLine`. The inline
|
|
90
|
-
* `src.slice(0, idx).split('\n').length` idiom is O(source-length) PER MATCH,
|
|
91
|
-
* which goes quadratic on a match-dense source (a generated function full of
|
|
92
|
-
* `.push(` calls re-scanned tens of thousands of times was most of the #1235
|
|
93
|
-
* indexing wedge). Builds the newline index once — lazily, since most sources
|
|
94
|
-
* never produce a match — then answers each call with a binary search.
|
|
95
|
-
*/
|
|
96
|
-
function makeLineAt(src, baseLine) {
|
|
97
|
-
let nl = null;
|
|
98
|
-
return (idx) => {
|
|
99
|
-
if (!nl) {
|
|
100
|
-
nl = [];
|
|
101
|
-
for (let i = src.indexOf('\n'); i !== -1; i = src.indexOf('\n', i + 1))
|
|
102
|
-
nl.push(i);
|
|
103
|
-
}
|
|
104
|
-
// Count newlines strictly before idx.
|
|
105
|
-
let lo = 0;
|
|
106
|
-
let hi = nl.length;
|
|
107
|
-
while (lo < hi) {
|
|
108
|
-
const mid = (lo + hi) >> 1;
|
|
109
|
-
if (nl[mid] < idx)
|
|
110
|
-
lo = mid + 1;
|
|
111
|
-
else
|
|
112
|
-
hi = mid;
|
|
113
|
-
}
|
|
114
|
-
return baseLine + lo;
|
|
115
|
-
};
|
|
116
|
-
}
|
|
117
100
|
function registrarField(src) {
|
|
118
101
|
const m = src.match(/this\.(\w+)\.(?:add|push|set)\(/);
|
|
119
102
|
return m ? m[1] : null;
|
|
@@ -127,21 +110,6 @@ function dispatcherField(src) {
|
|
|
127
110
|
return forEach[1];
|
|
128
111
|
return null;
|
|
129
112
|
}
|
|
130
|
-
const FN_KINDS = new Set(['method', 'function', 'component']);
|
|
131
|
-
/** Innermost function/method node whose line range contains `line`. */
|
|
132
|
-
function enclosingFn(nodesInFile, line) {
|
|
133
|
-
let best = null;
|
|
134
|
-
for (const n of nodesInFile) {
|
|
135
|
-
if (!FN_KINDS.has(n.kind))
|
|
136
|
-
continue;
|
|
137
|
-
const end = n.endLine ?? n.startLine;
|
|
138
|
-
if (n.startLine <= line && end >= line) {
|
|
139
|
-
if (!best || n.startLine >= best.startLine)
|
|
140
|
-
best = n; // prefer the tightest (latest-starting) encloser
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
return best;
|
|
144
|
-
}
|
|
145
113
|
/**
|
|
146
114
|
* Stream method + function nodes lazily. The synthesizers only scan-and-filter
|
|
147
115
|
* down to a tiny matched subset, so materializing every function/method (which
|
|
@@ -185,7 +153,7 @@ async function fieldChannelEdges(queries, ctx, onYield) {
|
|
|
185
153
|
const chDispatchers = dispatchers.filter((d) => d.node.filePath === reg.node.filePath && d.field === reg.field);
|
|
186
154
|
if (chDispatchers.length === 0)
|
|
187
155
|
continue;
|
|
188
|
-
const argRe = new RegExp(`${reg.node.name}\\s*\\(\\s*(
|
|
156
|
+
const argRe = new RegExp(`${reg.node.name}\\s*\\(\\s*(this\\.\\w+|\\w+)\\s*(?=[,)])`);
|
|
189
157
|
let added = 0;
|
|
190
158
|
for (const e of queries.getIncomingEdges(reg.node.id, ['calls'])) {
|
|
191
159
|
if (added >= MAX_CALLBACKS_PER_CHANNEL)
|
|
@@ -199,8 +167,15 @@ async function fieldChannelEdges(queries, ctx, onYield) {
|
|
|
199
167
|
const am = line?.match(argRe);
|
|
200
168
|
if (!am)
|
|
201
169
|
continue;
|
|
202
|
-
|
|
203
|
-
|
|
170
|
+
// Reuse the resolved value at this registration site: it retains the
|
|
171
|
+
// receiver's class/inheritance and import binding, unlike a name lookup.
|
|
172
|
+
const refs = queries.getOutgoingEdges(caller.id, ['references']).filter((r) => r.line === e.line && r.metadata?.fnRef === true && r.metadata.refName === am[1]);
|
|
173
|
+
if (refs.length !== 1)
|
|
174
|
+
continue;
|
|
175
|
+
const fn = queries.getNodeById(refs[0].target);
|
|
176
|
+
if (!fn || (fn.kind !== 'method' && fn.kind !== 'function'))
|
|
177
|
+
continue;
|
|
178
|
+
if (!am[1].startsWith('this.') && fn.filePath !== caller.filePath && refs[0].metadata?.resolvedBy !== 'import')
|
|
204
179
|
continue;
|
|
205
180
|
for (const disp of chDispatchers) {
|
|
206
181
|
if (disp.node.id === fn.id)
|
|
@@ -271,7 +246,7 @@ async function closureCollectionEdges(queries, ctx, onYield) {
|
|
|
271
246
|
const hasAppend = src.includes('.append(') || src.includes('.add(') || src.includes('.push(') || src.includes('.insert(');
|
|
272
247
|
if (!hasForEach && !hasAppend)
|
|
273
248
|
continue;
|
|
274
|
-
const lineAt = makeLineAt(src, m.startLine ?? 1);
|
|
249
|
+
const lineAt = (0, synth_utils_1.makeLineAt)(src, m.startLine ?? 1);
|
|
275
250
|
if (hasForEach) {
|
|
276
251
|
CC_DISPATCH_RE.lastIndex = 0;
|
|
277
252
|
let d;
|
|
@@ -345,12 +320,12 @@ async function eventEmitterEdges(ctx, onYield) {
|
|
|
345
320
|
if (!hasEmit && !hasOn)
|
|
346
321
|
continue;
|
|
347
322
|
const nodesInFile = ctx.getNodesInFile(file);
|
|
348
|
-
const lineOf = makeLineAt(content, 1);
|
|
323
|
+
const lineOf = (0, synth_utils_1.makeLineAt)(content, 1);
|
|
349
324
|
if (hasEmit) {
|
|
350
325
|
EMIT_RE.lastIndex = 0;
|
|
351
326
|
let m;
|
|
352
327
|
while ((m = EMIT_RE.exec(content))) {
|
|
353
|
-
const disp = enclosingFn(nodesInFile, lineOf(m.index));
|
|
328
|
+
const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, lineOf(m.index));
|
|
354
329
|
if (!disp)
|
|
355
330
|
continue;
|
|
356
331
|
const set = emitsByEvent.get(m[1]) ?? new Set();
|
|
@@ -542,11 +517,9 @@ async function arkuiStateBuildEdges(queries, ctx, onYield) {
|
|
|
542
517
|
let scanned255 = 0;
|
|
543
518
|
const edges = [];
|
|
544
519
|
const seen = new Set();
|
|
545
|
-
for (const struct of queries.
|
|
520
|
+
for (const struct of queries.iterateNodesByKindIn('struct', ['arkts'])) {
|
|
546
521
|
if ((++scanned255 & 63) === 0)
|
|
547
522
|
await onYield();
|
|
548
|
-
if (struct.language !== 'arkts')
|
|
549
|
-
continue;
|
|
550
523
|
const children = queries.getOutgoingEdges(struct.id, ['contains'])
|
|
551
524
|
.map((e) => queries.getNodeById(e.target))
|
|
552
525
|
.filter((n) => !!n);
|
|
@@ -884,22 +857,17 @@ async function goImplementsEdges(queries, onYield) {
|
|
|
884
857
|
// never the whole struct kind — that array is O(nodes) on struct-heavy
|
|
885
858
|
// repos like the Linux kernel (#1212).
|
|
886
859
|
const goStructs = [];
|
|
887
|
-
for (const s of queries.
|
|
860
|
+
for (const s of queries.iterateNodesByKindIn('struct', ['go'])) {
|
|
888
861
|
if ((++scanned255 & 63) === 0)
|
|
889
862
|
await onYield();
|
|
890
|
-
|
|
891
|
-
goStructs.push(s);
|
|
863
|
+
goStructs.push(s);
|
|
892
864
|
}
|
|
893
865
|
const structMethods = new Map();
|
|
894
866
|
for (const s of goStructs)
|
|
895
867
|
structMethods.set(s.id, methodNameSet(s.id));
|
|
896
|
-
for (const iface of queries.
|
|
868
|
+
for (const iface of queries.iterateNodesByKindIn('interface', ['go'])) {
|
|
897
869
|
if ((++scanned255 & 63) === 0)
|
|
898
870
|
await onYield();
|
|
899
|
-
if ((++scanned255 & 63) === 0)
|
|
900
|
-
await onYield();
|
|
901
|
-
if (iface.language !== 'go')
|
|
902
|
-
continue;
|
|
903
871
|
const want = methodNameSet(iface.id);
|
|
904
872
|
if (want.size === 0)
|
|
905
873
|
continue; // empty interface (`any`) — would match everything
|
|
@@ -952,9 +920,10 @@ async function goImplementsEdges(queries, onYield) {
|
|
|
952
920
|
*
|
|
953
921
|
* Go guarantees a method's receiver type is declared in the SAME PACKAGE as the
|
|
954
922
|
* method, and a Go package is a single directory — so this is a deterministic
|
|
955
|
-
* structural link, not a heuristic: find the same-named type in the method's
|
|
956
|
-
* directory and add the missing `contains` edge
|
|
957
|
-
*
|
|
923
|
+
* structural link, not a heuristic: find the same-named type in the method's
|
|
924
|
+
* own directory and add the missing `contains` edge with no provenance, matching
|
|
925
|
+
* same-file extraction. Tag synthesis ownership so an incremental
|
|
926
|
+
* refresh can replace it alongside implicit `implements`. Skips methods that
|
|
958
927
|
* already have a type parent (the same-file case). (#583, cross-file half)
|
|
959
928
|
*/
|
|
960
929
|
async function goCrossFileMethodContainsEdges(queries, onYield) {
|
|
@@ -966,13 +935,9 @@ async function goCrossFileMethodContainsEdges(queries, onYield) {
|
|
|
966
935
|
const i = p.replace(/\\/g, '/').lastIndexOf('/');
|
|
967
936
|
return i >= 0 ? p.slice(0, i) : '';
|
|
968
937
|
};
|
|
969
|
-
for (const method of queries.
|
|
938
|
+
for (const method of queries.iterateNodesByKindIn('method', ['go'])) {
|
|
970
939
|
if ((++scanned255 & 63) === 0)
|
|
971
940
|
await onYield();
|
|
972
|
-
if ((++scanned255 & 63) === 0)
|
|
973
|
-
await onYield();
|
|
974
|
-
if (method.language !== 'go')
|
|
975
|
-
continue;
|
|
976
941
|
// The receiver type is encoded in the method's qualifiedName as `Recv::name`
|
|
977
942
|
// (extraction sets `${receiverType}::${name}` for receiver methods).
|
|
978
943
|
const qn = method.qualifiedName;
|
|
@@ -1007,7 +972,8 @@ async function goCrossFileMethodContainsEdges(queries, onYield) {
|
|
|
1007
972
|
if (seen.has(key))
|
|
1008
973
|
continue;
|
|
1009
974
|
seen.add(key);
|
|
1010
|
-
edges.push({ source: owner.id, target: method.id, kind: 'contains', line: method.startLine
|
|
975
|
+
edges.push({ source: owner.id, target: method.id, kind: 'contains', line: method.startLine,
|
|
976
|
+
metadata: { synthesizedBy: 'go-method-contains' } });
|
|
1011
977
|
}
|
|
1012
978
|
return edges;
|
|
1013
979
|
}
|
|
@@ -1109,7 +1075,7 @@ async function interfaceOverrideEdges(queries, onYield) {
|
|
|
1109
1075
|
// Concrete-side kinds vary by language: `class` covers Java / Kotlin /
|
|
1110
1076
|
// C# / TS / Swift-classes / Scala-classes; `struct` covers Swift value
|
|
1111
1077
|
// types that conform to protocols. Iterate both.
|
|
1112
|
-
const concreteKinds = ['class', 'struct'];
|
|
1078
|
+
const concreteKinds = ['class', 'struct', 'union'];
|
|
1113
1079
|
for (const kind of concreteKinds) {
|
|
1114
1080
|
for (const cls of queries.iterateNodesByKind(kind)) {
|
|
1115
1081
|
if ((++scanned255 & 63) === 0)
|
|
@@ -1206,11 +1172,9 @@ async function goGrpcStubImplEdges(queries, onYield) {
|
|
|
1206
1172
|
const methodNamesByStruct = new Map();
|
|
1207
1173
|
const methodNodesByStruct = new Map();
|
|
1208
1174
|
const goStructs = [];
|
|
1209
|
-
for (const s of queries.
|
|
1175
|
+
for (const s of queries.iterateNodesByKindIn('struct', ['go'])) {
|
|
1210
1176
|
if ((++scanned255 & 63) === 0)
|
|
1211
1177
|
await onYield();
|
|
1212
|
-
if (s.language !== 'go')
|
|
1213
|
-
continue;
|
|
1214
1178
|
goStructs.push(s);
|
|
1215
1179
|
const ms = queries
|
|
1216
1180
|
.getOutgoingEdges(s.id, ['contains'])
|
|
@@ -1282,6 +1246,60 @@ async function goGrpcStubImplEdges(queries, onYield) {
|
|
|
1282
1246
|
}
|
|
1283
1247
|
return edges;
|
|
1284
1248
|
}
|
|
1249
|
+
/** Kinds a JSX tag can name. A tag that resolves only to a type is markup we drop. */
|
|
1250
|
+
const JSX_CHILD_KINDS = new Set(['component', 'function', 'class']);
|
|
1251
|
+
/**
|
|
1252
|
+
* The languages a JSX tag can plausibly name a component in. Preferred over a
|
|
1253
|
+
* same-named symbol in another language, never required — a React Native tag
|
|
1254
|
+
* whose only match is the native class it bridges to (`requireNativeComponent`)
|
|
1255
|
+
* still links there.
|
|
1256
|
+
*/
|
|
1257
|
+
const JSX_CHILD_LANGUAGES = [...JS_FAMILY, 'vue', 'svelte'];
|
|
1258
|
+
/** `localName` → the project file it is imported from, for one file's imports. */
|
|
1259
|
+
function importedFrom(ctx, file, language) {
|
|
1260
|
+
const out = new Map();
|
|
1261
|
+
for (const im of ctx.getImportMappings(file, language)) {
|
|
1262
|
+
// The mappings name the module as written; the file it is comes from the
|
|
1263
|
+
// same resolution the import resolver uses (aliases, extensions, index files).
|
|
1264
|
+
const resolved = im.resolvedPath ?? (0, import_resolver_1.resolveImportPath)(im.source, file, language, ctx);
|
|
1265
|
+
if (resolved)
|
|
1266
|
+
out.set(im.localName, resolved);
|
|
1267
|
+
}
|
|
1268
|
+
return out;
|
|
1269
|
+
}
|
|
1270
|
+
/**
|
|
1271
|
+
* The component a JSX tag names, among every node that shares the name.
|
|
1272
|
+
*
|
|
1273
|
+
* A tag is written in one file, and that file already says which `FrameCard` it
|
|
1274
|
+
* means: the one it declares, or the one it imports. Taking the FIRST node of
|
|
1275
|
+
* that name — which is what this did — is a coin flip once a name repeats, and
|
|
1276
|
+
* it costs twice over. The parent gets an edge to a component it never renders,
|
|
1277
|
+
* and the component it does render is left with no caller at all, so every walk
|
|
1278
|
+
* back from that subtree dead-ends: on an Expo app whose `<FrameCard/>` was one
|
|
1279
|
+
* of two, the folder sheet's `openBackgroundNoiseDetail` stood alone on Screens
|
|
1280
|
+
* with no screen behind it, while the edge pointed at an unrelated card in
|
|
1281
|
+
* another sheet.
|
|
1282
|
+
*
|
|
1283
|
+
* Same file first — a small component declared beside its use is the commonest
|
|
1284
|
+
* shape, and the one an import can never disambiguate. Then the file the name
|
|
1285
|
+
* is imported from. Then the language, which only decides a tie: a `.tsx` tag
|
|
1286
|
+
* naming both a TS component and a same-named Swift class means the TS one.
|
|
1287
|
+
*/
|
|
1288
|
+
function jsxChild(ctx, name, file, importsOf) {
|
|
1289
|
+
const candidates = ctx.getNodesByName(name).filter((n) => JSX_CHILD_KINDS.has(n.kind));
|
|
1290
|
+
if (candidates.length <= 1)
|
|
1291
|
+
return candidates[0];
|
|
1292
|
+
const local = candidates.find((n) => n.filePath === file);
|
|
1293
|
+
if (local)
|
|
1294
|
+
return local;
|
|
1295
|
+
const from = importsOf().get(name);
|
|
1296
|
+
if (from) {
|
|
1297
|
+
const imported = candidates.find((n) => n.filePath === from);
|
|
1298
|
+
if (imported)
|
|
1299
|
+
return imported;
|
|
1300
|
+
}
|
|
1301
|
+
return candidates.find((n) => JSX_CHILD_LANGUAGES.includes(n.language)) ?? candidates[0];
|
|
1302
|
+
}
|
|
1285
1303
|
/**
|
|
1286
1304
|
* Phase 5: React JSX child rendering. A component that returns `<Child .../>`
|
|
1287
1305
|
* mounts Child — React calls it — but JSX instantiation isn't a static call edge,
|
|
@@ -1305,7 +1323,14 @@ async function reactJsxChildEdges(ctx, onYield) {
|
|
|
1305
1323
|
const content = ctx.readFile(file);
|
|
1306
1324
|
if (!content || (!content.includes('</') && !content.includes('/>')))
|
|
1307
1325
|
continue; // JSX-file gate
|
|
1308
|
-
|
|
1326
|
+
// File-level language gate, not merely a project-level one: mixed C/JS
|
|
1327
|
+
// monorepos must not interpret `"<Foo/>"` inside C as JSX (#1560).
|
|
1328
|
+
const parents = ctx.getNodesInFile(file).filter((n) => PARENT_KINDS.has(n.kind) && JS_FAMILY.includes(n.language));
|
|
1329
|
+
if (parents.length === 0)
|
|
1330
|
+
continue;
|
|
1331
|
+
// Read once per file, and only when a name actually turns out ambiguous.
|
|
1332
|
+
let imports = null;
|
|
1333
|
+
const importsOf = () => (imports ??= importedFrom(ctx, file, parents[0].language));
|
|
1309
1334
|
for (const parent of parents) {
|
|
1310
1335
|
const src = sliceLines(content, parent.startLine, parent.endLine);
|
|
1311
1336
|
if (!src || (!src.includes('</') && !src.includes('/>')))
|
|
@@ -1319,8 +1344,8 @@ async function reactJsxChildEdges(ctx, onYield) {
|
|
|
1319
1344
|
for (const name of names) {
|
|
1320
1345
|
if (added >= MAX_JSX_CHILDREN)
|
|
1321
1346
|
break;
|
|
1322
|
-
const child = ctx
|
|
1323
|
-
if (!child || child.id === parent.id)
|
|
1347
|
+
const child = jsxChild(ctx, name, file, importsOf);
|
|
1348
|
+
if (!child || child.id === parent.id || (0, name_matcher_1.crossesCodeBoundary)(parent.language, child.language))
|
|
1324
1349
|
continue;
|
|
1325
1350
|
const key = `${parent.id}>${child.id}`;
|
|
1326
1351
|
if (seen.has(key))
|
|
@@ -1402,7 +1427,8 @@ async function vueTemplateEdges(ctx, onYield) {
|
|
|
1402
1427
|
}
|
|
1403
1428
|
let added = 0;
|
|
1404
1429
|
const addEdge = (target, meta) => {
|
|
1405
|
-
if (added >= MAX_JSX_CHILDREN || !target || target.id === comp.id
|
|
1430
|
+
if (added >= MAX_JSX_CHILDREN || !target || target.id === comp.id ||
|
|
1431
|
+
(0, name_matcher_1.crossesCodeBoundary)(comp.language, target.language))
|
|
1406
1432
|
return;
|
|
1407
1433
|
const k = `${comp.id}>${target.id}>${meta.synthesizedBy}`;
|
|
1408
1434
|
if (seen.has(k))
|
|
@@ -1479,10 +1505,13 @@ async function vueTemplateEdges(ctx, onYield) {
|
|
|
1479
1505
|
* DeviceEventEmitter.addListener("locationUpdate", handler);
|
|
1480
1506
|
*
|
|
1481
1507
|
* Synthesize: native dispatch site → JS handler, keyed by the literal
|
|
1482
|
-
* event name.
|
|
1483
|
-
*
|
|
1484
|
-
*
|
|
1485
|
-
*
|
|
1508
|
+
* event name. A NAMED handler (`addListener('x', handleX)`) is the target
|
|
1509
|
+
* when it is a node; an unnamed one — a parameter passed through, or an
|
|
1510
|
+
* inline `(data) => {…}` written in a `useEffect` — is attributed to the
|
|
1511
|
+
* enclosing function, where the event demonstrably lands. (The in-language
|
|
1512
|
+
* synthesizer stays named-only; this channel pairs across a language
|
|
1513
|
+
* boundary on a literal, which is the evidence that makes the wider
|
|
1514
|
+
* attribution safe.)
|
|
1486
1515
|
*
|
|
1487
1516
|
* Provenance `'heuristic'`, synthesizedBy `'rn-event-channel'`.
|
|
1488
1517
|
*/
|
|
@@ -1522,9 +1551,9 @@ async function rnEventEdges(ctx, onYield) {
|
|
|
1522
1551
|
if (!content)
|
|
1523
1552
|
continue;
|
|
1524
1553
|
const nodesInFile = ctx.getNodesInFile(file);
|
|
1525
|
-
const lineOf = makeLineAt(content, 1);
|
|
1554
|
+
const lineOf = (0, synth_utils_1.makeLineAt)(content, 1);
|
|
1526
1555
|
const addDispatcher = (event, line) => {
|
|
1527
|
-
const disp = enclosingFn(nodesInFile, line);
|
|
1556
|
+
const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, line);
|
|
1528
1557
|
if (!disp)
|
|
1529
1558
|
return;
|
|
1530
1559
|
const set = nativeDispatchersByEvent.get(event) ?? new Set();
|
|
@@ -1590,6 +1619,8 @@ async function rnEventEdges(ctx, onYield) {
|
|
|
1590
1619
|
// function (the abstraction layer), giving a reachability-correct
|
|
1591
1620
|
// hop even when the actual user-side handler lives one call up.
|
|
1592
1621
|
const ADDLISTENER_ANY = /\.(?:on|once|addListener)\(\s*['"]([^'"]+)['"]\s*,\s*([A-Za-z_][\w.]*)/g;
|
|
1622
|
+
// The inline form: `.addListener('x', (data) => {…})` / `function () {…}`.
|
|
1623
|
+
const ADDLISTENER_INLINE = /\.(?:on|once|addListener)\(\s*['"]([^'"]+)['"]\s*,\s*(?:async\s*)?(?:\([^)]*\)\s*=>|[A-Za-z_$][\w$]*\s*=>|function\s*\()/g;
|
|
1593
1624
|
ADDLISTENER_ANY.lastIndex = 0;
|
|
1594
1625
|
let m;
|
|
1595
1626
|
while ((m = ADDLISTENER_ANY.exec(content))) {
|
|
@@ -1607,7 +1638,7 @@ async function rnEventEdges(ctx, onYield) {
|
|
|
1607
1638
|
// Fall back to the enclosing function — the subscribe-wrapper
|
|
1608
1639
|
// pattern means the event fires THROUGH this function on its
|
|
1609
1640
|
// way to user code. Reachability-correct attribution.
|
|
1610
|
-
const enclosing = enclosingFn(nodesInFile, lineOf(m.index));
|
|
1641
|
+
const enclosing = (0, synth_utils_1.enclosingFn)(nodesInFile, lineOf(m.index));
|
|
1611
1642
|
targetId = enclosing?.id ?? null;
|
|
1612
1643
|
}
|
|
1613
1644
|
if (!targetId) {
|
|
@@ -1637,6 +1668,26 @@ async function rnEventEdges(ctx, onYield) {
|
|
|
1637
1668
|
map.set(targetId, `${file}:${lineOf(m.index)}`);
|
|
1638
1669
|
jsHandlersByEvent.set(event, map);
|
|
1639
1670
|
}
|
|
1671
|
+
// Inline listeners — the shape a React component registers inside a
|
|
1672
|
+
// `useEffect`: `nativeEmitter.addListener('onCaptureComplete', (data) =>
|
|
1673
|
+
// { … router.push('/review') })`. There is no handler symbol to name,
|
|
1674
|
+
// so the subscription is attributed to the enclosing function exactly
|
|
1675
|
+
// as the unnamed-argument form above is: the native event lands in that
|
|
1676
|
+
// component, and its body is where a reader looks next. This channel
|
|
1677
|
+
// only — the in-language synthesizer keeps its named-handler policy.
|
|
1678
|
+
ADDLISTENER_INLINE.lastIndex = 0;
|
|
1679
|
+
while ((m = ADDLISTENER_INLINE.exec(content))) {
|
|
1680
|
+
const event = m[1];
|
|
1681
|
+
if (!event)
|
|
1682
|
+
continue;
|
|
1683
|
+
const enclosing = (0, synth_utils_1.enclosingFn)(nodesInFile, lineOf(m.index));
|
|
1684
|
+
if (!enclosing)
|
|
1685
|
+
continue;
|
|
1686
|
+
const map = jsHandlersByEvent.get(event) ?? new Map();
|
|
1687
|
+
if (!map.has(enclosing.id))
|
|
1688
|
+
map.set(enclosing.id, `${file}:${lineOf(m.index)}`);
|
|
1689
|
+
jsHandlersByEvent.set(event, map);
|
|
1690
|
+
}
|
|
1640
1691
|
}
|
|
1641
1692
|
}
|
|
1642
1693
|
const edges = [];
|
|
@@ -1783,11 +1834,9 @@ async function rnCrossPlatformEdges(queries, onYield) {
|
|
|
1783
1834
|
// impls in ≥2 native languages can pair, so the per-method JS-caller check
|
|
1784
1835
|
// below only runs for genuine cross-platform candidates.
|
|
1785
1836
|
const byName = new Map();
|
|
1786
|
-
for (const m of queries.
|
|
1837
|
+
for (const m of queries.iterateNodesByKindIn('method', [...NATIVE])) {
|
|
1787
1838
|
if ((++scanned255 & 63) === 0)
|
|
1788
1839
|
await onYield();
|
|
1789
|
-
if (!NATIVE.has(m.language))
|
|
1790
|
-
continue;
|
|
1791
1840
|
const key = norm(m.name);
|
|
1792
1841
|
const arr = byName.get(key);
|
|
1793
1842
|
if (arr)
|
|
@@ -1919,21 +1968,18 @@ async function mybatisJavaXmlEdges(queries, onYield) {
|
|
|
1919
1968
|
// stream below. Same rowid stream order as matching inline, so the edge
|
|
1920
1969
|
// output is byte-identical when mappers do exist.
|
|
1921
1970
|
const xmlMethods = [];
|
|
1922
|
-
for (const m of queries.
|
|
1971
|
+
for (const m of queries.iterateNodesByKindIn('method', ['xml'])) {
|
|
1923
1972
|
if ((++scanned255 & 63) === 0)
|
|
1924
1973
|
await onYield();
|
|
1925
|
-
|
|
1926
|
-
xmlMethods.push(m);
|
|
1974
|
+
xmlMethods.push(m);
|
|
1927
1975
|
}
|
|
1928
1976
|
if (xmlMethods.length === 0)
|
|
1929
1977
|
return edges;
|
|
1930
1978
|
// Index Java methods by `<ClassName>::<methodName>` for O(1) lookup.
|
|
1931
1979
|
const javaIndex = new Map();
|
|
1932
|
-
for (const m of queries.
|
|
1980
|
+
for (const m of queries.iterateNodesByKindIn('method', ['java', 'kotlin'])) {
|
|
1933
1981
|
if ((++scanned255 & 63) === 0)
|
|
1934
1982
|
await onYield();
|
|
1935
|
-
if (m.language !== 'java' && m.language !== 'kotlin')
|
|
1936
|
-
continue;
|
|
1937
1983
|
const parts = m.qualifiedName.split('::');
|
|
1938
1984
|
const last = parts[parts.length - 1];
|
|
1939
1985
|
const cls = parts[parts.length - 2];
|
|
@@ -2065,11 +2111,9 @@ async function ginMiddlewareChainEdges(queries, ctx, onYield) {
|
|
|
2065
2111
|
let scannedFiles = 0;
|
|
2066
2112
|
// 1. Find the chain dispatcher(s): a Go method that invokes a `handlers` slice by index.
|
|
2067
2113
|
const dispatchers = [];
|
|
2068
|
-
for (const n of queries.
|
|
2114
|
+
for (const n of queries.iterateNodesByKindIn('method', ['go'])) {
|
|
2069
2115
|
if ((++scanned255 & 63) === 0)
|
|
2070
2116
|
await onYield();
|
|
2071
|
-
if (n.language !== 'go')
|
|
2072
|
-
continue;
|
|
2073
2117
|
const content = ctx.readFile(n.filePath);
|
|
2074
2118
|
const src = content && sliceLines(content, n.startLine, n.endLine);
|
|
2075
2119
|
if (src && GIN_DISPATCH_RE.test(src))
|
|
@@ -2203,12 +2247,17 @@ async function svelteKitLoadEdges(ctx, onYield) {
|
|
|
2203
2247
|
if (!allFiles.has(loaderFile))
|
|
2204
2248
|
continue;
|
|
2205
2249
|
for (const hook of ctx.getNodesInFile(loaderFile)) {
|
|
2206
|
-
|
|
2250
|
+
// `load` and `actions` by name, and every function the loader file
|
|
2251
|
+
// declares — a form action is an arrow inside `actions`, and it is a
|
|
2252
|
+
// node of its own (`default`, `logout`), where the redirect that ends
|
|
2253
|
+
// the submission is actually written.
|
|
2254
|
+
const named = HOOK_KINDS.has(hook.kind) && HOOKS.has(hook.name);
|
|
2255
|
+
if (!named && hook.kind !== 'function' && hook.kind !== 'method')
|
|
2207
2256
|
continue;
|
|
2208
2257
|
edges.push({
|
|
2209
2258
|
source: page.id,
|
|
2210
2259
|
target: hook.id,
|
|
2211
|
-
kind: '
|
|
2260
|
+
kind: 'calls',
|
|
2212
2261
|
line: page.startLine,
|
|
2213
2262
|
provenance: 'heuristic',
|
|
2214
2263
|
metadata: {
|
|
@@ -2306,12 +2355,38 @@ async function reduxThunkEdges(queries, ctx, onYield) {
|
|
|
2306
2355
|
// the SAME file (the cross-file barrel-namespace variant, e.g. trezor's getMethod, is
|
|
2307
2356
|
// deferred). Gated on a real object literal with ≥2 entries that RESOLVE to callables (a
|
|
2308
2357
|
// `{ width: 5 }` literal resolves to nothing → no edges); fan-out capped.
|
|
2309
|
-
|
|
2310
|
-
|
|
2358
|
+
// Both scans only START a name at an identifier's first character (or at a `this.`): the
|
|
2359
|
+
// engine otherwise retries the greedy name at every later character of every identifier in
|
|
2360
|
+
// the file. A match found from inside an identifier always has one from the identifier's
|
|
2361
|
+
// start (same name tail, same continuation), so the result is unchanged — except where the
|
|
2362
|
+
// scan itself resumes mid-identifier after a dispatch ending in `.method`, which
|
|
2363
|
+
// `nextRegistryDispatch` covers with the unguarded pattern.
|
|
2364
|
+
const REGISTRY_NAME_START = String.raw `(?:(?<![A-Za-z_$])(?<![A-Za-z_$][\w$]+)|(?=this\.))`;
|
|
2365
|
+
const REGISTRY_ASSIGN_RE = new RegExp(String.raw `(?:(?:const|let|var)\s+([A-Za-z_$][\w$]*)|${REGISTRY_NAME_START}((?:this\.)?[A-Za-z_$][\w$]*))\s*=\s*\{`, 'g');
|
|
2366
|
+
const REGISTRY_DISPATCH_SRC = String.raw `(?:\bnew\s+)?((?:this\.)?[A-Za-z_$][\w$]*)\s*\[\s*([A-Za-z_$][\w$.]*)\s*\]\s*(?:\(|\.[A-Za-z_$])`;
|
|
2367
|
+
const REGISTRY_DISPATCH_AT = new RegExp(REGISTRY_DISPATCH_SRC, 'y');
|
|
2368
|
+
// `\bnew` can follow a `$` inside an identifier run, hence the extra `(?<!\w)` start.
|
|
2369
|
+
const REGISTRY_DISPATCH_RE = new RegExp(String.raw `(?:(?<!\w)|${REGISTRY_NAME_START})${REGISTRY_DISPATCH_SRC}`, 'g');
|
|
2370
|
+
const IDENT_RUN_CHAR = /[\w$]/;
|
|
2311
2371
|
const REGISTRY_MIN_ENTRIES = 2;
|
|
2312
2372
|
const REGISTRY_FANOUT_CAP = 40;
|
|
2313
2373
|
const REGISTRY_CLASS_ENTRY = new Set(['execute', 'run', 'handle', 'perform', 'process', 'call', 'apply', 'dispatch']);
|
|
2314
2374
|
const REGISTRY_JS_EXT = /\.(?:ts|tsx|js|jsx|mjs|cjs)$/;
|
|
2375
|
+
/** The first registry dispatch at or after `from`, exactly as a `g` scan of the unguarded
|
|
2376
|
+
* pattern resuming at `from` would find it. */
|
|
2377
|
+
function nextRegistryDispatch(src, from) {
|
|
2378
|
+
let at = from;
|
|
2379
|
+
if (at > 0 && at < src.length && IDENT_RUN_CHAR.test(src[at - 1]) && IDENT_RUN_CHAR.test(src[at])) {
|
|
2380
|
+
for (; at < src.length && IDENT_RUN_CHAR.test(src[at]); at++) {
|
|
2381
|
+
REGISTRY_DISPATCH_AT.lastIndex = at;
|
|
2382
|
+
const m = REGISTRY_DISPATCH_AT.exec(src);
|
|
2383
|
+
if (m)
|
|
2384
|
+
return m;
|
|
2385
|
+
}
|
|
2386
|
+
}
|
|
2387
|
+
REGISTRY_DISPATCH_RE.lastIndex = at;
|
|
2388
|
+
return REGISTRY_DISPATCH_RE.exec(src);
|
|
2389
|
+
}
|
|
2315
2390
|
/** From the index of an opening `{`, return the brace-balanced body up to its matching `}`. */
|
|
2316
2391
|
function braceBody(src, openIdx) {
|
|
2317
2392
|
let depth = 0;
|
|
@@ -2400,13 +2475,12 @@ async function objectRegistryEdges(ctx, onYield) {
|
|
|
2400
2475
|
const safe = (0, strip_comments_1.stripCommentsForRegex)(content, /\.(?:jsx?|mjs|cjs)$/.test(file) ? 'javascript' : 'typescript');
|
|
2401
2476
|
// 1. Dispatch sites: `(new )?<ref>[<ident-key>]` followed by a call or a chained method.
|
|
2402
2477
|
// A quoted-string key (`['save']`) does NOT match — that's a static access, not dispatch.
|
|
2403
|
-
|
|
2478
|
+
const lineOf = (0, synth_utils_1.makeLineAt)(safe, 1);
|
|
2404
2479
|
const dispatches = [];
|
|
2405
|
-
let dm;
|
|
2406
|
-
while ((dm = REGISTRY_DISPATCH_RE.exec(safe))) {
|
|
2480
|
+
for (let dm = nextRegistryDispatch(safe, 0); dm; dm = nextRegistryDispatch(safe, dm.index + dm[0].length)) {
|
|
2407
2481
|
const win = safe.slice(dm.index, dm.index + 160);
|
|
2408
2482
|
const cm = /\]\s*\([^)]*\)\s*\.\s*([A-Za-z_$][\w$]*)/.exec(win) || /\]\s*\.\s*([A-Za-z_$][\w$]*)/.exec(win);
|
|
2409
|
-
dispatches.push({ ref: dm[1], line:
|
|
2483
|
+
dispatches.push({ ref: dm[1], line: lineOf(dm.index), chained: cm ? cm[1] : null });
|
|
2410
2484
|
}
|
|
2411
2485
|
if (!dispatches.length)
|
|
2412
2486
|
continue;
|
|
@@ -2427,7 +2501,7 @@ async function objectRegistryEdges(ctx, onYield) {
|
|
|
2427
2501
|
continue;
|
|
2428
2502
|
const names = registryEntryNames(body); // depth-0 `key: Identifier` entries only
|
|
2429
2503
|
if (names.length >= REGISTRY_MIN_ENTRIES) {
|
|
2430
|
-
registries.set(lhs, { names, line:
|
|
2504
|
+
registries.set(lhs, { names, line: lineOf(am.index) });
|
|
2431
2505
|
}
|
|
2432
2506
|
}
|
|
2433
2507
|
if (!registries.size)
|
|
@@ -2438,7 +2512,7 @@ async function objectRegistryEdges(ctx, onYield) {
|
|
|
2438
2512
|
const reg = registries.get(norm(d.ref));
|
|
2439
2513
|
if (!reg)
|
|
2440
2514
|
continue;
|
|
2441
|
-
const disp = enclosingFn(nodesInFile, d.line);
|
|
2515
|
+
const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, d.line);
|
|
2442
2516
|
if (!disp)
|
|
2443
2517
|
continue;
|
|
2444
2518
|
let added = 0;
|
|
@@ -2597,7 +2671,7 @@ async function piniaStoreEdges(ctx, onYield) {
|
|
|
2597
2671
|
continue;
|
|
2598
2672
|
const method = cm[2];
|
|
2599
2673
|
const line = safe.slice(0, cm.index).split('\n').length;
|
|
2600
|
-
const disp = enclosingFn(nodesInFile, line) ?? fallbackDispatcher;
|
|
2674
|
+
const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, line) ?? fallbackDispatcher;
|
|
2601
2675
|
if (!disp)
|
|
2602
2676
|
continue;
|
|
2603
2677
|
const target = ctx
|
|
@@ -2695,7 +2769,7 @@ async function vuexDispatchEdges(ctx, onYield) {
|
|
|
2695
2769
|
while ((m = VUEX_DISPATCH_RE.exec(safe)) && added < VUEX_FANOUT_CAP) {
|
|
2696
2770
|
const key = m[1];
|
|
2697
2771
|
const line = safe.slice(0, m.index).split('\n').length;
|
|
2698
|
-
const disp = enclosingFn(nodesInFile, line) ?? fallback;
|
|
2772
|
+
const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, line) ?? fallback;
|
|
2699
2773
|
if (!disp)
|
|
2700
2774
|
continue;
|
|
2701
2775
|
const target = resolve(key, file);
|
|
@@ -2800,7 +2874,7 @@ async function celeryDispatchEdges(ctx, onYield) {
|
|
|
2800
2874
|
while ((m = CELERY_DISPATCH_RE.exec(safe)) && added < CELERY_FANOUT_CAP) {
|
|
2801
2875
|
const name = m[1];
|
|
2802
2876
|
const line = safe.slice(0, m.index).split('\n').length;
|
|
2803
|
-
const disp = enclosingFn(nodesInFile, line);
|
|
2877
|
+
const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, line);
|
|
2804
2878
|
if (!disp)
|
|
2805
2879
|
continue; // module-level dispatch — no source symbol to attribute
|
|
2806
2880
|
const target = resolve(name, file);
|
|
@@ -2942,7 +3016,7 @@ async function springEventEdges(ctx, onYield) {
|
|
|
2942
3016
|
if (!targets || !targets.length)
|
|
2943
3017
|
continue;
|
|
2944
3018
|
const line = safe.slice(0, m.index).split('\n').length;
|
|
2945
|
-
const disp = enclosingFn(nodesInFile, line);
|
|
3019
|
+
const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, line);
|
|
2946
3020
|
if (!disp)
|
|
2947
3021
|
continue;
|
|
2948
3022
|
for (const target of targets) {
|
|
@@ -3070,7 +3144,7 @@ async function mediatrDispatchEdges(ctx, onYield) {
|
|
|
3070
3144
|
if (!MEDIATR_RECEIVER_RE.test(m[1]))
|
|
3071
3145
|
continue; // not a mediator (MessagingCenter, HttpClient, …)
|
|
3072
3146
|
const line = safe.slice(0, m.index).split('\n').length;
|
|
3073
|
-
const disp = enclosingFn(nodesInFile, line);
|
|
3147
|
+
const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, line);
|
|
3074
3148
|
if (!disp)
|
|
3075
3149
|
continue;
|
|
3076
3150
|
const type = resolveMediatrArgType(m[2], safeLines, disp.startLine, line);
|
|
@@ -3170,7 +3244,7 @@ async function sidekiqDispatchEdges(ctx, onYield) {
|
|
|
3170
3244
|
let added = 0;
|
|
3171
3245
|
while ((m = SIDEKIQ_DISPATCH_RE.exec(safe)) && added < SIDEKIQ_FANOUT_CAP) {
|
|
3172
3246
|
const line = safe.slice(0, m.index).split('\n').length;
|
|
3173
|
-
const disp = enclosingFn(nodesInFile, line);
|
|
3247
|
+
const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, line);
|
|
3174
3248
|
if (!disp)
|
|
3175
3249
|
continue;
|
|
3176
3250
|
const target = resolve(m[1]);
|
|
@@ -3230,6 +3304,10 @@ const ERLANG_BEHAVIOUR_FANOUT_CAP = 24;
|
|
|
3230
3304
|
*/
|
|
3231
3305
|
function erlangArityAt(src, openIdx) {
|
|
3232
3306
|
let depth = 1;
|
|
3307
|
+
// `<<1,2,3>>` binary literals: commas inside are element separators, not
|
|
3308
|
+
// argument separators. Tracked separately from bracket depth because the
|
|
3309
|
+
// single-char `<`/`>` comparison operators must stay inert (#1358).
|
|
3310
|
+
let binDepth = 0;
|
|
3233
3311
|
let commas = 0;
|
|
3234
3312
|
let sawArg = false;
|
|
3235
3313
|
const limit = Math.min(src.length, openIdx + 4000);
|
|
@@ -3252,6 +3330,17 @@ function erlangArityAt(src, openIdx) {
|
|
|
3252
3330
|
sawArg = true;
|
|
3253
3331
|
continue;
|
|
3254
3332
|
}
|
|
3333
|
+
if (ch === '<' && src[i + 1] === '<') {
|
|
3334
|
+
binDepth++;
|
|
3335
|
+
i++;
|
|
3336
|
+
sawArg = true;
|
|
3337
|
+
continue;
|
|
3338
|
+
}
|
|
3339
|
+
if (ch === '>' && src[i + 1] === '>' && binDepth > 0) {
|
|
3340
|
+
binDepth--;
|
|
3341
|
+
i++;
|
|
3342
|
+
continue;
|
|
3343
|
+
}
|
|
3255
3344
|
if (ch === '(' || ch === '[' || ch === '{') {
|
|
3256
3345
|
depth++;
|
|
3257
3346
|
sawArg = true;
|
|
@@ -3263,7 +3352,7 @@ function erlangArityAt(src, openIdx) {
|
|
|
3263
3352
|
return sawArg ? commas + 1 : 0;
|
|
3264
3353
|
continue;
|
|
3265
3354
|
}
|
|
3266
|
-
if (ch === ',' && depth === 1) {
|
|
3355
|
+
if (ch === ',' && depth === 1 && binDepth === 0) {
|
|
3267
3356
|
commas++;
|
|
3268
3357
|
continue;
|
|
3269
3358
|
}
|
|
@@ -3347,13 +3436,11 @@ async function nixOptionPathEdges(queries, onYield) {
|
|
|
3347
3436
|
const byFile = new Map();
|
|
3348
3437
|
let scanned = 0;
|
|
3349
3438
|
for (const kind of ['variable', 'function']) {
|
|
3350
|
-
for (const node of queries.
|
|
3439
|
+
for (const node of queries.iterateNodesByKindIn(kind, ['nix'])) {
|
|
3351
3440
|
if ((++scanned255 & 63) === 0)
|
|
3352
3441
|
await onYield();
|
|
3353
3442
|
if ((++scanned & 0x3fff) === 0 && onYield)
|
|
3354
3443
|
await onYield();
|
|
3355
|
-
if (node.language !== 'nix')
|
|
3356
|
-
continue;
|
|
3357
3444
|
const segs = nixLeadingPlainSegments(node.name);
|
|
3358
3445
|
if (segs.length === 0)
|
|
3359
3446
|
continue;
|
|
@@ -3378,7 +3465,7 @@ async function nixOptionPathEdges(queries, onYield) {
|
|
|
3378
3465
|
// own namespace (`attrsOf (submodule { options = ...; })`) — its internals
|
|
3379
3466
|
// are not globally addressable, so the sentinel blocks registration below it
|
|
3380
3467
|
// while still excluding the region from write candidates.
|
|
3381
|
-
const SUBMODULE = '
|
|
3468
|
+
const SUBMODULE = '\u0000submodule';
|
|
3382
3469
|
const decls = new Map();
|
|
3383
3470
|
const writes = [];
|
|
3384
3471
|
const register = (path, rec) => {
|
|
@@ -3468,11 +3555,10 @@ async function erlangBehaviourDispatchEdges(queries, ctx, onYield) {
|
|
|
3468
3555
|
// Cheap language gate: no Erlang modules → no cost beyond one streamed
|
|
3469
3556
|
// kind scan (never a materialized array of every namespace — #1212).
|
|
3470
3557
|
const erlangModules = [];
|
|
3471
|
-
for (const n of queries.
|
|
3558
|
+
for (const n of queries.iterateNodesByKindIn('namespace', ['erlang'])) {
|
|
3472
3559
|
if ((++scanned255 & 63) === 0)
|
|
3473
3560
|
await onYield();
|
|
3474
|
-
|
|
3475
|
-
erlangModules.push(n);
|
|
3561
|
+
erlangModules.push(n);
|
|
3476
3562
|
}
|
|
3477
3563
|
if (erlangModules.length === 0)
|
|
3478
3564
|
return [];
|
|
@@ -3519,12 +3605,18 @@ async function erlangBehaviourDispatchEdges(queries, ctx, onYield) {
|
|
|
3519
3605
|
}
|
|
3520
3606
|
if (declaringBehaviours.size === 0)
|
|
3521
3607
|
return [];
|
|
3522
|
-
// Implementer target lookup, lazy per (behaviour, fn): implementers
|
|
3523
|
-
// from the `implements` edges extraction resolved, and the target is
|
|
3524
|
-
// implementer module's own exported `fn`
|
|
3608
|
+
// Implementer target lookup, lazy per (behaviour, fn, arity): implementers
|
|
3609
|
+
// come from the `implements` edges extraction resolved, and the target is
|
|
3610
|
+
// the implementer module's own exported `fn` node OF THE SITE'S ARITY —
|
|
3611
|
+
// function qualifiedNames carry arity (`mod::fn/2`, #1610), so the arity the
|
|
3612
|
+
// dispatch site used selects among same-named definitions.
|
|
3525
3613
|
const targetCache = new Map();
|
|
3526
|
-
const
|
|
3527
|
-
const
|
|
3614
|
+
const qnArity = (qn) => {
|
|
3615
|
+
const m = /\/(\d{1,3})$/.exec(qn);
|
|
3616
|
+
return m ? Number(m[1]) : -1;
|
|
3617
|
+
};
|
|
3618
|
+
const targetsOf = (behaviour, fn, arity) => {
|
|
3619
|
+
const cacheKey = `${behaviour.id}#${fn}/${arity}`;
|
|
3528
3620
|
let targets = targetCache.get(cacheKey);
|
|
3529
3621
|
if (targets)
|
|
3530
3622
|
return targets;
|
|
@@ -3535,7 +3627,10 @@ async function erlangBehaviourDispatchEdges(queries, ctx, onYield) {
|
|
|
3535
3627
|
continue;
|
|
3536
3628
|
const fnNode = ctx
|
|
3537
3629
|
.getNodesInFile(impl.filePath)
|
|
3538
|
-
.find((n) => n.kind === 'function' &&
|
|
3630
|
+
.find((n) => n.kind === 'function' &&
|
|
3631
|
+
n.name === fn &&
|
|
3632
|
+
qnArity(n.qualifiedName) === arity &&
|
|
3633
|
+
n.isExported !== false);
|
|
3539
3634
|
if (fnNode)
|
|
3540
3635
|
targets.push(fnNode);
|
|
3541
3636
|
}
|
|
@@ -3570,11 +3665,11 @@ async function erlangBehaviourDispatchEdges(queries, ctx, onYield) {
|
|
|
3570
3665
|
if (!behaviours || behaviours.length !== 1)
|
|
3571
3666
|
continue; // unknown or ambiguous
|
|
3572
3667
|
const behaviour = behaviours[0];
|
|
3573
|
-
const targets = targetsOf(behaviour, fn);
|
|
3668
|
+
const targets = targetsOf(behaviour, fn, arity);
|
|
3574
3669
|
if (targets.length === 0 || targets.length > ERLANG_BEHAVIOUR_FANOUT_CAP)
|
|
3575
3670
|
continue;
|
|
3576
3671
|
const line = safe.slice(0, m.index).split('\n').length;
|
|
3577
|
-
const disp = enclosingFn(nodesInFile, line);
|
|
3672
|
+
const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, line);
|
|
3578
3673
|
if (!disp)
|
|
3579
3674
|
continue;
|
|
3580
3675
|
for (const target of targets) {
|
|
@@ -3729,7 +3824,7 @@ async function laravelEventEdges(ctx, onYield) {
|
|
|
3729
3824
|
if (!targets)
|
|
3730
3825
|
continue;
|
|
3731
3826
|
const line = safe.slice(0, m.index).split('\n').length;
|
|
3732
|
-
const disp = enclosingFn(nodesInFile, line);
|
|
3827
|
+
const disp = (0, synth_utils_1.enclosingFn)(nodesInFile, line);
|
|
3733
3828
|
if (!disp)
|
|
3734
3829
|
continue;
|
|
3735
3830
|
for (const target of targets.values()) {
|
|
@@ -3753,27 +3848,43 @@ async function laravelEventEdges(ctx, onYield) {
|
|
|
3753
3848
|
}
|
|
3754
3849
|
return edges;
|
|
3755
3850
|
}
|
|
3756
|
-
/**
|
|
3757
|
-
* Synthesize dispatcher→callback edges (field observers + EventEmitters +
|
|
3758
|
-
* React re-render + JSX children + Vue templates + SvelteKit load + RN event
|
|
3759
|
-
* channel + Fabric native-impl + MyBatis Java↔XML + Gin middleware chain +
|
|
3760
|
-
* Redux-thunk dispatch chain + object-literal registry dispatch + RTK Query
|
|
3761
|
-
* generated-hook → endpoint + Pinia useStore().action() + Vuex string dispatch +
|
|
3762
|
-
* Celery task .delay()/.apply_async() → task body + Spring publishEvent → @EventListener +
|
|
3763
|
-
* MediatR Send/Publish → IRequestHandler/INotificationHandler +
|
|
3764
|
-
* Sidekiq Worker.perform_async → #perform + Laravel event(new X) → listener handle).
|
|
3765
|
-
* Returns the count added. Never throws into indexing — callers wrap in try/catch.
|
|
3766
|
-
*/
|
|
3767
|
-
/**
|
|
3768
|
-
* Number of progress steps synthesizeCallbackEdges reports: one per `__mark()`
|
|
3769
|
-
* call (every synthesis pass, plus the dedupe-merge and edge-insert steps).
|
|
3770
|
-
* Cosmetic only — drift just makes the progress bar end early or jump — and a
|
|
3771
|
-
* test pins it to the actual step count (registry passes + the fixed
|
|
3772
|
-
* pre/post marks) so adding a pass without bumping this fails loudly instead
|
|
3773
|
-
* of silently skewing the bar.
|
|
3774
|
-
*/
|
|
3775
|
-
const JS_FAMILY = ['typescript', 'javascript', 'tsx', 'jsx'];
|
|
3776
3851
|
const ALWAYS = () => true;
|
|
3852
|
+
/** Conservative input gates for SYNTH_PASSES; keep these in sync when adding a pass. */
|
|
3853
|
+
function hasSynthesisPattern(filePath, content) {
|
|
3854
|
+
// These passes consume declarations/layouts as well as dispatch sites. A
|
|
3855
|
+
// header or markup edit can change a channel whose endpoints live elsewhere.
|
|
3856
|
+
if (/\.(?:vue|svelte|dfm|fmx|nix|xml)$/.test(filePath))
|
|
3857
|
+
return true;
|
|
3858
|
+
if (/\.(?:c|h|cc|cpp|cxx|hpp|hh|hxx|cppm|ipp|inl|tcc|def|inc|tbl)$/i.test(filePath) &&
|
|
3859
|
+
/\b(?:struct|union|typedef|virtual|override)\b|#\s*(?:include|define|if)|=|->|\[/.test(content))
|
|
3860
|
+
return true;
|
|
3861
|
+
if (/\b(?:class|interface|protocol|trait|impl|extends|implements|expect|actual)\b/.test(content))
|
|
3862
|
+
return true;
|
|
3863
|
+
if (/\.go$/.test(filePath) && /\b(?:struct|interface)\b|\bfunc\s*\(/.test(content))
|
|
3864
|
+
return true;
|
|
3865
|
+
if ((0, tier_synthesizer_1.hasCrossTierPattern)(content))
|
|
3866
|
+
return true;
|
|
3867
|
+
if (/\b(?:render|build|setState|defineStore|createStore|createApi|Store|href|sendEvent|sendEventWithName)\b|<\/|\/>/.test(content))
|
|
3868
|
+
return true;
|
|
3869
|
+
if (/\.(?:forEach|append|add|push|insert|fire|dispatchEvent|addListener|Use|GET|POST|PUT|PATCH|DELETE|OPTIONS|HEAD|Any|Handle)\s*\(/.test(content))
|
|
3870
|
+
return true;
|
|
3871
|
+
if (/[\w$]\s*\[\s*[A-Za-z_$]/.test(content) || /\b(?:dispatch|commit)\s*\(/.test(content))
|
|
3872
|
+
return true;
|
|
3873
|
+
const patterns = [THUNK_DECL_RE, CELERY_TASK_DECORATOR_RE, CELERY_DISPATCH_RE,
|
|
3874
|
+
SPRING_LISTENER_ANNO_RE, SPRING_APP_LISTENER_RE, SPRING_PUBLISH_RE,
|
|
3875
|
+
MEDIATR_HANDLER_BASE_RE, MEDIATR_DISPATCH_RE, SIDEKIQ_WORKER_RE, SIDEKIQ_DISPATCH_RE,
|
|
3876
|
+
ERLANG_CALLBACK_DECL_RE, ERLANG_DISPATCH_RE, LARAVEL_DISPATCH_RE, ARKUI_EMITTER_CALL_RE,
|
|
3877
|
+
ARKUI_ROUTER_RE];
|
|
3878
|
+
for (const re of patterns) {
|
|
3879
|
+
re.lastIndex = 0;
|
|
3880
|
+
const matches = re.test(content);
|
|
3881
|
+
re.lastIndex = 0;
|
|
3882
|
+
if (matches)
|
|
3883
|
+
return true;
|
|
3884
|
+
}
|
|
3885
|
+
// Field-backed observers use method-name gates rather than fixed call names.
|
|
3886
|
+
return (content.match(/[A-Za-z_$][\w$]*/g) ?? []).some((name) => REGISTRAR_NAME.test(name) || DISPATCHER_NAME.test(name));
|
|
3887
|
+
}
|
|
3777
3888
|
/**
|
|
3778
3889
|
* The independent passes, in MERGE ORDER — the first-seen dedup in
|
|
3779
3890
|
* synthesizeCallbackEdges follows this array, so reordering entries changes
|
|
@@ -3784,9 +3895,14 @@ const ALWAYS = () => true;
|
|
|
3784
3895
|
exports.SYNTH_PASSES = [
|
|
3785
3896
|
{ name: 'fieldEdges', gate: ALWAYS, run: (q, c, y) => fieldChannelEdges(q, c, y) },
|
|
3786
3897
|
{ name: 'closureCollEdges', gate: ALWAYS, run: (q, c, y) => closureCollectionEdges(q, c, y) },
|
|
3898
|
+
// Cross-tier channels — a client's `fetch('/api/x')` onto its own route,
|
|
3899
|
+
// a queue job onto its consumer, a bus / socket event onto its handler.
|
|
3900
|
+
// Before the in-process emitter pass: the same (source, target) pair
|
|
3901
|
+
// keeps the more specific edge — the one that says which tier it crosses.
|
|
3902
|
+
{ name: 'tierEdges', gate: (has) => has(...JS_FAMILY), run: (_q, c, y) => (0, tier_synthesizer_1.crossTierEdges)(c, y) },
|
|
3787
3903
|
{ name: 'emitterEdges', gate: ALWAYS, run: (_q, c, y) => eventEmitterEdges(c, y) },
|
|
3788
3904
|
{ name: 'renderEdges', gate: ALWAYS, run: (q, c, y) => reactRenderEdges(q, c, y) },
|
|
3789
|
-
{ name: 'jsxEdges', gate:
|
|
3905
|
+
{ name: 'jsxEdges', gate: (has) => has(...JS_FAMILY), run: (_q, c, y) => reactJsxChildEdges(c, y) },
|
|
3790
3906
|
{ name: 'vueEdges', gate: (has) => has('vue'), run: (_q, c, y) => vueTemplateEdges(c, y) },
|
|
3791
3907
|
{ name: 'svelteKitEdges', gate: (has) => has('svelte'), run: (_q, c, y) => svelteKitLoadEdges(c, y) },
|
|
3792
3908
|
{ name: 'pascalEdges', gate: ALWAYS, run: (_q, c, y) => pascalFormEdges(c, y) },
|
|
@@ -3840,8 +3956,31 @@ exports.SYNTH_PASSES = [
|
|
|
3840
3956
|
run: (q, c, y, sub) => (0, c_fnptr_synthesizer_1.cFnPointerDispatchEdges)(q, c, y, sub),
|
|
3841
3957
|
},
|
|
3842
3958
|
{ name: 'goframeEdges', gate: (has) => has('go'), run: (_q, c, y) => (0, goframe_synthesizer_1.goframeRouteEdges)(c, y) },
|
|
3959
|
+
// `router.push(await helper())` — the helper's return literals are the screens.
|
|
3960
|
+
{ name: 'expoRouterReturnEdges', gate: (has) => has(...JS_FAMILY), run: (_q, c, y) => (0, expo_router_synthesizer_1.expoRouterReturnEdges)(c, y) },
|
|
3961
|
+
// `<Link href="/x">` / an internal `<a href>` — markup, not a call; the component navigates.
|
|
3962
|
+
{ name: 'nextLinkEdges', gate: (has) => has(...JS_FAMILY), run: (_q, c, y) => (0, next_router_synthesizer_1.nextLinkEdges)(c, y) },
|
|
3963
|
+
{ name: 'reactRouterLinkEdges', gate: (has) => has(...JS_FAMILY), run: (_q, c, y) => (0, react_router_synthesizer_1.reactRouterLinkEdges)(c, y) },
|
|
3964
|
+
{ name: 'tanstackLinkEdges', gate: (has) => has(...JS_FAMILY), run: (_q, c, y) => (0, tanstack_router_synthesizer_1.tanstackLinkEdges)(c, y) },
|
|
3965
|
+
{ name: 'vueRouterLinkEdges', gate: (has) => has('vue', ...JS_FAMILY), run: (_q, c, y) => (0, vue_router_synthesizer_1.vueRouterLinkEdges)(c, y) },
|
|
3966
|
+
{ name: 'svelteKitPageEdges', gate: (has) => has('svelte'), run: (_q, c, y) => (0, sveltekit_synthesizer_1.svelteKitPageComponentEdges)(c, y) },
|
|
3967
|
+
{ name: 'svelteKitLinkEdges', gate: (has) => has('svelte'), run: (_q, c, y) => (0, sveltekit_synthesizer_1.svelteKitLinkEdges)(c, y) },
|
|
3843
3968
|
{ name: 'nixOptionEdges', gate: (has) => has('nix'), run: (q, _c, y) => nixOptionPathEdges(q, y) },
|
|
3844
3969
|
];
|
|
3970
|
+
/**
|
|
3971
|
+
* Rough relative cost of the passes that run longest on large repos. Only
|
|
3972
|
+
* the pooled dispatch ORDER reads it — heaviest first, so the longest passes
|
|
3973
|
+
* start before the short ones fill the workers; unlisted passes keep registry
|
|
3974
|
+
* order after these. A wrong hint costs wall time, never edges.
|
|
3975
|
+
*/
|
|
3976
|
+
const SYNTH_PASS_COST_HINT = {
|
|
3977
|
+
cFnPtrEdges: 100, registryEdges: 60, tierEdges: 55, jsxEdges: 25, rnEventEdgesList: 24,
|
|
3978
|
+
ifaceEdges: 18, flutterEdges: 16, cppEdges: 15, emitterEdges: 12, fieldEdges: 11,
|
|
3979
|
+
mybatisEdges: 10, vuexEdges: 8, closureCollEdges: 6, piniaEdges: 5, renderEdges: 4,
|
|
3980
|
+
};
|
|
3981
|
+
function synthPassCostHint(name) {
|
|
3982
|
+
return SYNTH_PASS_COST_HINT[name] ?? 0;
|
|
3983
|
+
}
|
|
3845
3984
|
/** Fixed non-registry steps: goMethodContains, goImplements, dedupe-merge, insertMergedEdges. */
|
|
3846
3985
|
const FIXED_SYNTH_STEPS = 4;
|
|
3847
3986
|
exports.SYNTH_PROGRESS_STEPS = exports.SYNTH_PASSES.length + FIXED_SYNTH_STEPS;
|
|
@@ -3853,7 +3992,10 @@ pool,
|
|
|
3853
3992
|
// WAL-valve writer backstop (WalCheckpointValve.backpressure), called at
|
|
3854
3993
|
// pool-idle points in the edge-insert loops below — the passes themselves
|
|
3855
3994
|
// only read; every write in this function happens with the pool idle.
|
|
3856
|
-
backpressure
|
|
3995
|
+
backpressure,
|
|
3996
|
+
// Main-thread work to run while the pool computes the passes (the main
|
|
3997
|
+
// thread otherwise only waits there) — e.g. building a deferred index.
|
|
3998
|
+
whilePoolBusy) {
|
|
3857
3999
|
// Each sub-pass below is a whole-graph scan, and there are ~30 of them, all
|
|
3858
4000
|
// running synchronously on the indexer's main thread. Their AGGREGATE can run
|
|
3859
4001
|
// for well over a minute on a large repo — long enough for the #850 liveness
|
|
@@ -3979,8 +4121,23 @@ backpressure) {
|
|
|
3979
4121
|
// synthesized edges; the index still completes.
|
|
3980
4122
|
const MAIN_RETRY_MAX_NODES = 1_500_000;
|
|
3981
4123
|
const graphNodes = queries.getNodeAndEdgeCount().nodes;
|
|
4124
|
+
// Files whose text could feed a pass (inputs that produce NO edges included,
|
|
4125
|
+
// e.g. an over-cap channel: deleting one may make the full pass viable). It
|
|
4126
|
+
// depends only on the files, so with a pool the main thread reads them while
|
|
4127
|
+
// the workers run the passes instead of after.
|
|
4128
|
+
const collectInputs = async () => {
|
|
4129
|
+
const found = [];
|
|
4130
|
+
for (const file of ctx.getAllFiles()) {
|
|
4131
|
+
const content = ctx.readFile(file);
|
|
4132
|
+
if (content !== null && hasSynthesisPattern(file, content))
|
|
4133
|
+
found.push(file);
|
|
4134
|
+
await yieldToLoop();
|
|
4135
|
+
}
|
|
4136
|
+
return found;
|
|
4137
|
+
};
|
|
4138
|
+
let inputs = null;
|
|
3982
4139
|
if (pool && gatedIn.length > 1) {
|
|
3983
|
-
|
|
4140
|
+
const runPooled = async (i) => {
|
|
3984
4141
|
const pass = exports.SYNTH_PASSES[i];
|
|
3985
4142
|
try {
|
|
3986
4143
|
const out = await pool.runSynthPass(pass.name);
|
|
@@ -3999,7 +4156,25 @@ backpressure) {
|
|
|
3999
4156
|
// mismatch): retry this one pass on the main thread.
|
|
4000
4157
|
await runPassOnMain(i);
|
|
4001
4158
|
}
|
|
4002
|
-
}
|
|
4159
|
+
};
|
|
4160
|
+
// One pass per worker at a time, heaviest first. Handing every pass out
|
|
4161
|
+
// at once split them by count, and a worker interleaves what it holds, so
|
|
4162
|
+
// a heavy pass finished only with its worker's whole share: on vscode the
|
|
4163
|
+
// 6s registry pass ended ~16s in. Pulling keeps workers busy until the
|
|
4164
|
+
// queue drains. Edges merge by registry index below, so order is free.
|
|
4165
|
+
const lanes = Math.min(pool.size ?? gatedIn.length, gatedIn.length);
|
|
4166
|
+
const queue = [...gatedIn].sort((a, b) => synthPassCostHint(exports.SYNTH_PASSES[b].name) - synthPassCostHint(exports.SYNTH_PASSES[a].name) || a - b);
|
|
4167
|
+
const lane = async () => {
|
|
4168
|
+
for (let i = queue.shift(); i !== undefined; i = queue.shift())
|
|
4169
|
+
await runPooled(i);
|
|
4170
|
+
};
|
|
4171
|
+
const fanOut = Promise.all(Array.from({ length: lanes }, lane));
|
|
4172
|
+
// Observed now, awaited below: a rejection while the scan runs must not
|
|
4173
|
+
// surface as an unhandled one.
|
|
4174
|
+
fanOut.catch(() => undefined);
|
|
4175
|
+
whilePoolBusy?.();
|
|
4176
|
+
inputs = await collectInputs();
|
|
4177
|
+
await fanOut;
|
|
4003
4178
|
}
|
|
4004
4179
|
else {
|
|
4005
4180
|
for (const i of gatedIn) {
|
|
@@ -4024,6 +4199,7 @@ backpressure) {
|
|
|
4024
4199
|
await yieldToLoop();
|
|
4025
4200
|
await foldIfOver();
|
|
4026
4201
|
}
|
|
4202
|
+
queries.replaceSynthesisInputs(inputs ?? await collectInputs());
|
|
4027
4203
|
__mark('insertMergedEdges');
|
|
4028
4204
|
return merged.length + goImpl.length + goMethodContains.length;
|
|
4029
4205
|
}
|