@colbymchenry/codegraph-win32-arm64 1.6.1 → 1.6.2
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/lib/dist/.test-build-engine.json +1 -1
- package/lib/dist/.test-build-viewer.json +1 -1
- package/lib/dist/bin/codegraph.js +9 -3
- package/lib/dist/bin/codegraph.js.map +1 -1
- package/lib/dist/bin/command-supervision.d.ts +7 -0
- package/lib/dist/bin/command-supervision.d.ts.map +1 -1
- package/lib/dist/bin/command-supervision.js +39 -27
- package/lib/dist/bin/command-supervision.js.map +1 -1
- package/lib/dist/db/queries.d.ts +31 -7
- package/lib/dist/db/queries.d.ts.map +1 -1
- package/lib/dist/db/queries.js +56 -10
- package/lib/dist/db/queries.js.map +1 -1
- package/lib/dist/directory.d.ts +30 -0
- package/lib/dist/directory.d.ts.map +1 -1
- package/lib/dist/directory.js +45 -0
- package/lib/dist/directory.js.map +1 -1
- package/lib/dist/extraction/astro-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/astro-extractor.js +7 -35
- package/lib/dist/extraction/astro-extractor.js.map +1 -1
- package/lib/dist/extraction/cfml-extractor.d.ts +76 -10
- package/lib/dist/extraction/cfml-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/cfml-extractor.js +287 -68
- package/lib/dist/extraction/cfml-extractor.js.map +1 -1
- package/lib/dist/extraction/commonjs-requires.d.ts +23 -0
- package/lib/dist/extraction/commonjs-requires.d.ts.map +1 -0
- package/lib/dist/extraction/commonjs-requires.js +68 -0
- package/lib/dist/extraction/commonjs-requires.js.map +1 -0
- package/lib/dist/extraction/generated-detection.d.ts +9 -0
- package/lib/dist/extraction/generated-detection.d.ts.map +1 -1
- package/lib/dist/extraction/generated-detection.js +42 -2
- package/lib/dist/extraction/generated-detection.js.map +1 -1
- package/lib/dist/extraction/grammars.d.ts +2 -0
- package/lib/dist/extraction/grammars.d.ts.map +1 -1
- package/lib/dist/extraction/grammars.js +94 -0
- package/lib/dist/extraction/grammars.js.map +1 -1
- package/lib/dist/extraction/index.d.ts +19 -4
- package/lib/dist/extraction/index.d.ts.map +1 -1
- package/lib/dist/extraction/index.js +227 -64
- package/lib/dist/extraction/index.js.map +1 -1
- package/lib/dist/extraction/kernel/index.d.ts.map +1 -1
- package/lib/dist/extraction/kernel/index.js +6 -0
- package/lib/dist/extraction/kernel/index.js.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.d.ts +15 -0
- package/lib/dist/extraction/languages/c-cpp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/c-cpp.js +122 -2
- package/lib/dist/extraction/languages/c-cpp.js.map +1 -1
- package/lib/dist/extraction/languages/csharp.d.ts.map +1 -1
- package/lib/dist/extraction/languages/csharp.js +14 -5
- package/lib/dist/extraction/languages/csharp.js.map +1 -1
- package/lib/dist/extraction/languages/dart.d.ts.map +1 -1
- package/lib/dist/extraction/languages/dart.js +8 -0
- package/lib/dist/extraction/languages/dart.js.map +1 -1
- package/lib/dist/extraction/languages/kotlin.d.ts +4 -0
- package/lib/dist/extraction/languages/kotlin.d.ts.map +1 -1
- package/lib/dist/extraction/languages/kotlin.js +68 -0
- package/lib/dist/extraction/languages/kotlin.js.map +1 -1
- package/lib/dist/extraction/languages/swift.d.ts +15 -0
- package/lib/dist/extraction/languages/swift.d.ts.map +1 -1
- package/lib/dist/extraction/languages/swift.js +50 -0
- package/lib/dist/extraction/languages/swift.js.map +1 -1
- package/lib/dist/extraction/languages/typescript.d.ts +7 -0
- package/lib/dist/extraction/languages/typescript.d.ts.map +1 -1
- package/lib/dist/extraction/languages/typescript.js +21 -0
- package/lib/dist/extraction/languages/typescript.js.map +1 -1
- package/lib/dist/extraction/parse-budget.d.ts +16 -0
- package/lib/dist/extraction/parse-budget.d.ts.map +1 -0
- package/lib/dist/extraction/parse-budget.js +24 -0
- package/lib/dist/extraction/parse-budget.js.map +1 -0
- package/lib/dist/extraction/parse-pool.d.ts +12 -0
- package/lib/dist/extraction/parse-pool.d.ts.map +1 -1
- package/lib/dist/extraction/parse-pool.js +51 -3
- package/lib/dist/extraction/parse-pool.js.map +1 -1
- package/lib/dist/extraction/parse-worker.js +3 -1
- package/lib/dist/extraction/parse-worker.js.map +1 -1
- package/lib/dist/extraction/sfc-script.d.ts +43 -0
- package/lib/dist/extraction/sfc-script.d.ts.map +1 -0
- package/lib/dist/extraction/sfc-script.js +135 -0
- package/lib/dist/extraction/sfc-script.js.map +1 -0
- package/lib/dist/extraction/store-worker.js +5 -0
- package/lib/dist/extraction/store-worker.js.map +1 -1
- package/lib/dist/extraction/store-writer.d.ts +10 -2
- package/lib/dist/extraction/store-writer.d.ts.map +1 -1
- package/lib/dist/extraction/store-writer.js +12 -4
- package/lib/dist/extraction/store-writer.js.map +1 -1
- package/lib/dist/extraction/svelte-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/svelte-extractor.js +7 -37
- package/lib/dist/extraction/svelte-extractor.js.map +1 -1
- package/lib/dist/extraction/syntax-tokens.d.ts.map +1 -1
- package/lib/dist/extraction/syntax-tokens.js +2 -1
- package/lib/dist/extraction/syntax-tokens.js.map +1 -1
- package/lib/dist/extraction/tree-sitter.d.ts +8 -0
- package/lib/dist/extraction/tree-sitter.d.ts.map +1 -1
- package/lib/dist/extraction/tree-sitter.js +123 -6
- package/lib/dist/extraction/tree-sitter.js.map +1 -1
- package/lib/dist/extraction/vue-extractor.d.ts +7 -0
- package/lib/dist/extraction/vue-extractor.d.ts.map +1 -1
- package/lib/dist/extraction/vue-extractor.js +73 -35
- package/lib/dist/extraction/vue-extractor.js.map +1 -1
- package/lib/dist/extraction/vue-options-api.d.ts +28 -0
- package/lib/dist/extraction/vue-options-api.d.ts.map +1 -0
- package/lib/dist/extraction/vue-options-api.js +196 -0
- package/lib/dist/extraction/vue-options-api.js.map +1 -0
- package/lib/dist/extraction/wasm/tree-sitter-cobol.wasm +0 -0
- package/lib/dist/extraction/wasm/tree-sitter-kotlin.wasm +0 -0
- package/lib/dist/graph/branch-guards.d.ts +17 -0
- package/lib/dist/graph/branch-guards.d.ts.map +1 -1
- package/lib/dist/graph/branch-guards.js +97 -2
- package/lib/dist/graph/branch-guards.js.map +1 -1
- package/lib/dist/graph/named-symbol-flow.d.ts.map +1 -1
- package/lib/dist/graph/named-symbol-flow.js +8 -1
- package/lib/dist/graph/named-symbol-flow.js.map +1 -1
- package/lib/dist/index.d.ts +5 -0
- package/lib/dist/index.d.ts.map +1 -1
- package/lib/dist/index.js +7 -0
- package/lib/dist/index.js.map +1 -1
- package/lib/dist/mcp/daemon-paths.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-paths.js +8 -2
- package/lib/dist/mcp/daemon-paths.js.map +1 -1
- package/lib/dist/mcp/daemon-registry.d.ts +4 -0
- package/lib/dist/mcp/daemon-registry.d.ts.map +1 -1
- package/lib/dist/mcp/daemon-registry.js +46 -12
- package/lib/dist/mcp/daemon-registry.js.map +1 -1
- package/lib/dist/mcp/engine.d.ts +2 -0
- package/lib/dist/mcp/engine.d.ts.map +1 -1
- package/lib/dist/mcp/engine.js +13 -5
- package/lib/dist/mcp/engine.js.map +1 -1
- package/lib/dist/mcp/index-freshness-worker.js +7 -1
- package/lib/dist/mcp/index-freshness-worker.js.map +1 -1
- package/lib/dist/mcp/index-freshness.d.ts +7 -1
- package/lib/dist/mcp/index-freshness.d.ts.map +1 -1
- package/lib/dist/mcp/index-freshness.js +31 -8
- package/lib/dist/mcp/index-freshness.js.map +1 -1
- package/lib/dist/mcp/project-lifecycle.d.ts.map +1 -1
- package/lib/dist/mcp/project-lifecycle.js +5 -4
- package/lib/dist/mcp/project-lifecycle.js.map +1 -1
- package/lib/dist/mcp/proxy.d.ts +9 -2
- package/lib/dist/mcp/proxy.d.ts.map +1 -1
- package/lib/dist/mcp/proxy.js +194 -34
- package/lib/dist/mcp/proxy.js.map +1 -1
- package/lib/dist/mcp/query-pool.d.ts +16 -1
- package/lib/dist/mcp/query-pool.d.ts.map +1 -1
- package/lib/dist/mcp/query-pool.js +58 -4
- package/lib/dist/mcp/query-pool.js.map +1 -1
- package/lib/dist/mcp/tools.d.ts +32 -2
- package/lib/dist/mcp/tools.d.ts.map +1 -1
- package/lib/dist/mcp/tools.js +120 -6
- package/lib/dist/mcp/tools.js.map +1 -1
- package/lib/dist/resolution/alias-binding.d.ts.map +1 -1
- package/lib/dist/resolution/alias-binding.js +16 -0
- package/lib/dist/resolution/alias-binding.js.map +1 -1
- package/lib/dist/resolution/angular-template-synthesizer.d.ts +49 -0
- package/lib/dist/resolution/angular-template-synthesizer.d.ts.map +1 -0
- package/lib/dist/resolution/angular-template-synthesizer.js +359 -0
- package/lib/dist/resolution/angular-template-synthesizer.js.map +1 -0
- package/lib/dist/resolution/callback-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/callback-synthesizer.js +171 -3
- package/lib/dist/resolution/callback-synthesizer.js.map +1 -1
- package/lib/dist/resolution/cpp-macro-visibility.d.ts.map +1 -1
- package/lib/dist/resolution/cpp-macro-visibility.js +57 -7
- package/lib/dist/resolution/cpp-macro-visibility.js.map +1 -1
- package/lib/dist/resolution/frameworks/angular-router.d.ts +142 -0
- package/lib/dist/resolution/frameworks/angular-router.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/angular-router.js +1126 -0
- package/lib/dist/resolution/frameworks/angular-router.js.map +1 -0
- package/lib/dist/resolution/frameworks/astro.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/astro.js +32 -6
- package/lib/dist/resolution/frameworks/astro.js.map +1 -1
- package/lib/dist/resolution/frameworks/csharp.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/csharp.js +127 -59
- package/lib/dist/resolution/frameworks/csharp.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-modules.d.ts +10 -0
- package/lib/dist/resolution/frameworks/expo-modules.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-modules.js +95 -1
- package/lib/dist/resolution/frameworks/expo-modules.js.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.d.ts +6 -0
- package/lib/dist/resolution/frameworks/expo-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/expo-router.js +62 -0
- package/lib/dist/resolution/frameworks/expo-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/express.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/express.js +103 -44
- package/lib/dist/resolution/frameworks/express.js.map +1 -1
- package/lib/dist/resolution/frameworks/fabric.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/fabric.js +13 -11
- package/lib/dist/resolution/frameworks/fabric.js.map +1 -1
- package/lib/dist/resolution/frameworks/go.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/go.js +11 -28
- package/lib/dist/resolution/frameworks/go.js.map +1 -1
- package/lib/dist/resolution/frameworks/index.d.ts +3 -2
- package/lib/dist/resolution/frameworks/index.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/index.js +11 -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 +9 -21
- package/lib/dist/resolution/frameworks/java.js.map +1 -1
- package/lib/dist/resolution/frameworks/laravel.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/laravel.js +369 -26
- package/lib/dist/resolution/frameworks/laravel.js.map +1 -1
- package/lib/dist/resolution/frameworks/name-heuristic.d.ts +35 -0
- package/lib/dist/resolution/frameworks/name-heuristic.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/name-heuristic.js +45 -0
- package/lib/dist/resolution/frameworks/name-heuristic.js.map +1 -0
- package/lib/dist/resolution/frameworks/nestjs.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/nestjs.js +282 -41
- package/lib/dist/resolution/frameworks/nestjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/nextjs.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/nextjs.js +1 -0
- package/lib/dist/resolution/frameworks/nextjs.js.map +1 -1
- package/lib/dist/resolution/frameworks/page-component.d.ts +20 -0
- package/lib/dist/resolution/frameworks/page-component.d.ts.map +1 -0
- package/lib/dist/resolution/frameworks/page-component.js +45 -0
- package/lib/dist/resolution/frameworks/page-component.js.map +1 -0
- package/lib/dist/resolution/frameworks/play.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/play.js +3 -1
- package/lib/dist/resolution/frameworks/play.js.map +1 -1
- package/lib/dist/resolution/frameworks/python.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/python.js +113 -26
- package/lib/dist/resolution/frameworks/python.js.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.d.ts +6 -5
- package/lib/dist/resolution/frameworks/react-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react-router.js +22 -8
- package/lib/dist/resolution/frameworks/react-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/react.d.ts +11 -1
- package/lib/dist/resolution/frameworks/react.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/react.js +367 -18
- package/lib/dist/resolution/frameworks/react.js.map +1 -1
- package/lib/dist/resolution/frameworks/ruby.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/ruby.js +177 -17
- package/lib/dist/resolution/frameworks/ruby.js.map +1 -1
- package/lib/dist/resolution/frameworks/rust.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/rust.js +24 -22
- package/lib/dist/resolution/frameworks/rust.js.map +1 -1
- package/lib/dist/resolution/frameworks/svelte.js +8 -5
- package/lib/dist/resolution/frameworks/svelte.js.map +1 -1
- package/lib/dist/resolution/frameworks/swift.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/swift.js +253 -124
- package/lib/dist/resolution/frameworks/swift.js.map +1 -1
- package/lib/dist/resolution/frameworks/vue-router.d.ts +26 -10
- package/lib/dist/resolution/frameworks/vue-router.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/vue-router.js +176 -53
- package/lib/dist/resolution/frameworks/vue-router.js.map +1 -1
- package/lib/dist/resolution/frameworks/vue.d.ts +9 -2
- package/lib/dist/resolution/frameworks/vue.d.ts.map +1 -1
- package/lib/dist/resolution/frameworks/vue.js +45 -11
- package/lib/dist/resolution/frameworks/vue.js.map +1 -1
- package/lib/dist/resolution/import-resolver.d.ts +28 -0
- package/lib/dist/resolution/import-resolver.d.ts.map +1 -1
- package/lib/dist/resolution/import-resolver.js +269 -37
- package/lib/dist/resolution/import-resolver.js.map +1 -1
- package/lib/dist/resolution/index.d.ts +35 -0
- package/lib/dist/resolution/index.d.ts.map +1 -1
- package/lib/dist/resolution/index.js +224 -14
- package/lib/dist/resolution/index.js.map +1 -1
- package/lib/dist/resolution/js-builtins.d.ts.map +1 -1
- package/lib/dist/resolution/js-builtins.js +2 -0
- package/lib/dist/resolution/js-builtins.js.map +1 -1
- package/lib/dist/resolution/name-matcher.d.ts +33 -1
- package/lib/dist/resolution/name-matcher.d.ts.map +1 -1
- package/lib/dist/resolution/name-matcher.js +6392 -227
- package/lib/dist/resolution/name-matcher.js.map +1 -1
- package/lib/dist/resolution/react-router-synthesizer.d.ts +2 -0
- package/lib/dist/resolution/react-router-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/react-router-synthesizer.js +80 -9
- package/lib/dist/resolution/react-router-synthesizer.js.map +1 -1
- package/lib/dist/resolution/resolver-pool.d.ts +20 -1
- package/lib/dist/resolution/resolver-pool.d.ts.map +1 -1
- package/lib/dist/resolution/resolver-pool.js +31 -5
- package/lib/dist/resolution/resolver-pool.js.map +1 -1
- package/lib/dist/resolution/resolver-worker.js +3 -0
- package/lib/dist/resolution/resolver-worker.js.map +1 -1
- package/lib/dist/resolution/swift-type-visibility.d.ts +68 -0
- package/lib/dist/resolution/swift-type-visibility.d.ts.map +1 -0
- package/lib/dist/resolution/swift-type-visibility.js +454 -0
- package/lib/dist/resolution/swift-type-visibility.js.map +1 -0
- package/lib/dist/resolution/tier-synthesizer.d.ts +7 -2
- package/lib/dist/resolution/tier-synthesizer.d.ts.map +1 -1
- package/lib/dist/resolution/tier-synthesizer.js +365 -2
- package/lib/dist/resolution/tier-synthesizer.js.map +1 -1
- package/lib/dist/resolution/type-parameters.d.ts +11 -0
- package/lib/dist/resolution/type-parameters.d.ts.map +1 -0
- package/lib/dist/resolution/type-parameters.js +287 -0
- package/lib/dist/resolution/type-parameters.js.map +1 -0
- package/lib/dist/resolution/types.d.ts +27 -0
- package/lib/dist/resolution/types.d.ts.map +1 -1
- package/lib/dist/resolution/types.js.map +1 -1
- package/lib/dist/sync/worktree.d.ts +22 -0
- package/lib/dist/sync/worktree.d.ts.map +1 -1
- package/lib/dist/sync/worktree.js +54 -0
- package/lib/dist/sync/worktree.js.map +1 -1
- package/lib/dist/telemetry/index.d.ts.map +1 -1
- package/lib/dist/telemetry/index.js +69 -27
- package/lib/dist/telemetry/index.js.map +1 -1
- package/lib/dist/ui-server/api/effects.d.ts +7 -0
- package/lib/dist/ui-server/api/effects.d.ts.map +1 -1
- package/lib/dist/ui-server/api/effects.js +35 -7
- package/lib/dist/ui-server/api/effects.js.map +1 -1
- package/lib/dist/ui-server/api/entrypoints.d.ts +6 -0
- package/lib/dist/ui-server/api/entrypoints.d.ts.map +1 -1
- package/lib/dist/ui-server/api/entrypoints.js +91 -6
- package/lib/dist/ui-server/api/entrypoints.js.map +1 -1
- package/lib/dist/ui-server/api/map.d.ts +41 -6
- package/lib/dist/ui-server/api/map.d.ts.map +1 -1
- package/lib/dist/ui-server/api/map.js +122 -22
- package/lib/dist/ui-server/api/map.js.map +1 -1
- package/lib/dist/ui-server/api/node.d.ts.map +1 -1
- package/lib/dist/ui-server/api/node.js +8 -2
- package/lib/dist/ui-server/api/node.js.map +1 -1
- package/lib/dist/ui-server/api/route-roots.d.ts +6 -0
- package/lib/dist/ui-server/api/route-roots.d.ts.map +1 -1
- package/lib/dist/ui-server/api/route-roots.js +23 -2
- package/lib/dist/ui-server/api/route-roots.js.map +1 -1
- package/lib/dist/ui-server/api/routes.d.ts +2 -0
- package/lib/dist/ui-server/api/routes.d.ts.map +1 -1
- package/lib/dist/ui-server/api/routes.js +61 -5
- package/lib/dist/ui-server/api/routes.js.map +1 -1
- package/lib/dist/ui-server/api/screens.d.ts.map +1 -1
- package/lib/dist/ui-server/api/screens.js +16 -1
- package/lib/dist/ui-server/api/screens.js.map +1 -1
- package/lib/dist/ui-server/api/steps.d.ts.map +1 -1
- package/lib/dist/ui-server/api/steps.js +124 -16
- package/lib/dist/ui-server/api/steps.js.map +1 -1
- package/lib/dist/ui-server/api/trails.js +1 -0
- package/lib/dist/ui-server/api/trails.js.map +1 -1
- package/lib/dist/ui-server/api/when.d.ts +10 -2
- package/lib/dist/ui-server/api/when.d.ts.map +1 -1
- package/lib/dist/ui-server/api/when.js +34 -10
- package/lib/dist/ui-server/api/when.js.map +1 -1
- package/lib/dist/ui-server/highlight/bounded-tokenize.d.ts +28 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.js +139 -0
- package/lib/dist/ui-server/highlight/bounded-tokenize.js.map +1 -0
- package/lib/dist/ui-server/highlight/index.d.ts.map +1 -1
- package/lib/dist/ui-server/highlight/index.js +6 -1
- package/lib/dist/ui-server/highlight/index.js.map +1 -1
- package/lib/dist/ui-server/highlight/tokenize-worker.d.ts +7 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.d.ts.map +1 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.js +20 -0
- package/lib/dist/ui-server/highlight/tokenize-worker.js.map +1 -0
- package/lib/dist/upgrade/index.d.ts +43 -5
- package/lib/dist/upgrade/index.d.ts.map +1 -1
- package/lib/dist/upgrade/index.js +157 -35
- package/lib/dist/upgrade/index.js.map +1 -1
- package/lib/dist/viewer/assets/{index-D4S7YUPf.js → index-BSGpxBr9.js} +60 -58
- package/lib/dist/viewer/index.html +1 -1
- package/lib/dist/worker-teardown.d.ts +48 -0
- package/lib/dist/worker-teardown.d.ts.map +1 -0
- package/lib/dist/worker-teardown.js +100 -0
- package/lib/dist/worker-teardown.js.map +1 -0
- package/lib/kernel/codegraph-kernel.node +2 -2
- package/lib/node_modules/.package-lock.json +1 -1
- package/lib/package.json +1 -1
- package/package.json +1 -1
|
@@ -71,6 +71,7 @@ const errors_1 = require("../errors");
|
|
|
71
71
|
const utils_1 = require("../utils");
|
|
72
72
|
const ignore_1 = __importDefault(require("ignore"));
|
|
73
73
|
const frameworks_1 = require("../resolution/frameworks");
|
|
74
|
+
const package_deps_1 = require("../resolution/frameworks/package-deps");
|
|
74
75
|
const cooperative_yield_1 = require("../resolution/cooperative-yield");
|
|
75
76
|
const file_limits_1 = require("../file-limits");
|
|
76
77
|
Object.defineProperty(exports, "oversizeStamp", { enumerable: true, get: function () { return file_limits_1.oversizeStamp; } });
|
|
@@ -342,7 +343,7 @@ function readGitExcludeExtraPatterns(rootDir) {
|
|
|
342
343
|
}
|
|
343
344
|
}
|
|
344
345
|
try {
|
|
345
|
-
const configured = (0, child_process_1.execFileSync)('git', ['-C', rootDir, 'config', '--get', 'core.excludesFile'], { encoding: 'utf8', timeout: 5_000, stdio: ['ignore', 'pipe', 'ignore'] }).trim();
|
|
346
|
+
const configured = (0, child_process_1.execFileSync)('git', ['-C', rootDir, 'config', '--get', 'core.excludesFile'], { encoding: 'utf8', timeout: 5_000, stdio: ['ignore', 'pipe', 'ignore'], windowsHide: true }).trim();
|
|
346
347
|
if (configured) {
|
|
347
348
|
const abs = expandUserPath(configured);
|
|
348
349
|
if (fs.existsSync(abs)) {
|
|
@@ -370,6 +371,7 @@ function listGitIgnoredDirectories(rootDir) {
|
|
|
370
371
|
timeout: 60_000,
|
|
371
372
|
maxBuffer: 50 * 1024 * 1024,
|
|
372
373
|
stdio: ['ignore', 'pipe', 'ignore'],
|
|
374
|
+
windowsHide: true,
|
|
373
375
|
});
|
|
374
376
|
const dirs = [];
|
|
375
377
|
for (const entry of out.split('\0')) {
|
|
@@ -743,12 +745,22 @@ function findNestedGitRepos(absDir, relPrefix) {
|
|
|
743
745
|
*/
|
|
744
746
|
function preloadLanguagesForFiles(files, overrides) {
|
|
745
747
|
const languages = [...new Set(files.map((f) => (0, grammars_1.detectLanguage)(f, undefined, overrides)))];
|
|
748
|
+
// A Flow-typed `.js` is read with the TSX grammar (see detectLanguage).
|
|
749
|
+
if ((languages.includes('javascript') || languages.includes('jsx')) && !languages.includes('tsx'))
|
|
750
|
+
languages.push('tsx');
|
|
746
751
|
if (languages.includes('c')) {
|
|
747
752
|
for (const ambiguous of ['cpp', 'objc']) {
|
|
748
753
|
if (!languages.includes(ambiguous))
|
|
749
754
|
languages.push(ambiguous);
|
|
750
755
|
}
|
|
751
756
|
}
|
|
757
|
+
// An `.inc` path-detects as PHP but may read as Pascal (#2279) — unless
|
|
758
|
+
// codegraph.json maps `.inc` explicitly, which detectLanguage never overrides.
|
|
759
|
+
if (!languages.includes('pascal') &&
|
|
760
|
+
!(overrides && overrides['.inc']) &&
|
|
761
|
+
files.some((f) => f.toLowerCase().endsWith('.inc'))) {
|
|
762
|
+
languages.push('pascal');
|
|
763
|
+
}
|
|
752
764
|
return languages;
|
|
753
765
|
}
|
|
754
766
|
class ScopeIgnore {
|
|
@@ -1648,6 +1660,67 @@ function resurrectRefFromDroppedEdge(e) {
|
|
|
1648
1660
|
language: e.sourceLanguage,
|
|
1649
1661
|
};
|
|
1650
1662
|
}
|
|
1663
|
+
/**
|
|
1664
|
+
* What tells a file's nodes apart across a re-index, coarsest first. (kind,
|
|
1665
|
+
* name) is the #899 key and settles every name a file defines once; a name it
|
|
1666
|
+
* defines more than once — the same method on two classes, a method's
|
|
1667
|
+
* overloads — is split further by qualified name, then by signature (#2276).
|
|
1668
|
+
*/
|
|
1669
|
+
const REINDEX_IDENTITY_TIERS = [
|
|
1670
|
+
(n) => `${n.kind}\0${n.name}`,
|
|
1671
|
+
(n) => n.qualifiedName,
|
|
1672
|
+
(n) => n.signature ?? '',
|
|
1673
|
+
];
|
|
1674
|
+
function groupNodeIdentities(nodes, key) {
|
|
1675
|
+
const groups = new Map();
|
|
1676
|
+
for (const n of nodes) {
|
|
1677
|
+
const k = key(n);
|
|
1678
|
+
const group = groups.get(k);
|
|
1679
|
+
if (group)
|
|
1680
|
+
group.push(n);
|
|
1681
|
+
else
|
|
1682
|
+
groups.set(k, [n]);
|
|
1683
|
+
}
|
|
1684
|
+
return groups;
|
|
1685
|
+
}
|
|
1686
|
+
/**
|
|
1687
|
+
* Pair each node a file had before a re-index with the node that replaces it,
|
|
1688
|
+
* old id → new id. Ids embed the start line, so they can't be compared across
|
|
1689
|
+
* an edit. Each tier of {@link REINDEX_IDENTITY_TIERS} splits the groups the
|
|
1690
|
+
* one before left ambiguous, and a group down to one node on each side is a
|
|
1691
|
+
* pair. Nodes still identical after every tier (overloads in a language that
|
|
1692
|
+
* records no signature) pair by position, but only when both sides have the
|
|
1693
|
+
* same number of them. Anything else stays unpaired: the caller re-resolves
|
|
1694
|
+
* its edges from their original reference instead of handing them all to
|
|
1695
|
+
* whichever same-named node happens to come last (#2276).
|
|
1696
|
+
*/
|
|
1697
|
+
function pairReindexedNodes(prior, next) {
|
|
1698
|
+
const pairs = new Map();
|
|
1699
|
+
const byPosition = (a, b) => a.startLine - b.startLine || a.startColumn - b.startColumn;
|
|
1700
|
+
const pairGroups = (before, after, tier) => {
|
|
1701
|
+
const key = REINDEX_IDENTITY_TIERS[tier];
|
|
1702
|
+
const afterGroups = groupNodeIdentities(after, key);
|
|
1703
|
+
for (const [k, group] of groupNodeIdentities(before, key)) {
|
|
1704
|
+
const match = afterGroups.get(k);
|
|
1705
|
+
if (!match)
|
|
1706
|
+
continue;
|
|
1707
|
+
if (group.length === 1 && match.length === 1) {
|
|
1708
|
+
pairs.set(group[0].id, match[0].id);
|
|
1709
|
+
}
|
|
1710
|
+
else if (tier + 1 < REINDEX_IDENTITY_TIERS.length) {
|
|
1711
|
+
pairGroups(group, match, tier + 1);
|
|
1712
|
+
}
|
|
1713
|
+
else if (group.length === match.length) {
|
|
1714
|
+
const a = [...group].sort(byPosition);
|
|
1715
|
+
const b = [...match].sort(byPosition);
|
|
1716
|
+
for (let i = 0; i < a.length; i++)
|
|
1717
|
+
pairs.set(a[i].id, b[i].id);
|
|
1718
|
+
}
|
|
1719
|
+
}
|
|
1720
|
+
};
|
|
1721
|
+
pairGroups(prior, next, 0);
|
|
1722
|
+
return pairs;
|
|
1723
|
+
}
|
|
1651
1724
|
/**
|
|
1652
1725
|
* Extraction orchestrator
|
|
1653
1726
|
*/
|
|
@@ -1784,8 +1857,83 @@ class ExtractionOrchestrator {
|
|
|
1784
1857
|
const fileList = files ?? scanDirectory(this.rootDir);
|
|
1785
1858
|
const context = this.buildDetectionContext(fileList);
|
|
1786
1859
|
this.detectedFrameworkNames = (0, frameworks_1.detectFrameworks)(context).map((r) => r.name);
|
|
1860
|
+
const declared = (0, package_deps_1.declaredDependencies)(context);
|
|
1861
|
+
this.gatedFrameworks = new Map();
|
|
1862
|
+
for (const name of this.detectedFrameworkNames) {
|
|
1863
|
+
const deps = (0, frameworks_1.getFrameworkResolver)(name)?.appDependencies;
|
|
1864
|
+
// Gated only when some manifest names the framework: otherwise detection
|
|
1865
|
+
// found it by other evidence and every file is its app's.
|
|
1866
|
+
if (deps && deps.some((d) => declared.has(d)))
|
|
1867
|
+
this.gatedFrameworks.set(name, deps);
|
|
1868
|
+
}
|
|
1869
|
+
this.appFrameworkMemo.clear();
|
|
1870
|
+
this.manifestDependencies.clear();
|
|
1787
1871
|
return this.detectedFrameworkNames;
|
|
1788
1872
|
}
|
|
1873
|
+
/** Detected frameworks whose extractors run only inside their own apps, with the packages that mark one. */
|
|
1874
|
+
gatedFrameworks = new Map();
|
|
1875
|
+
/** `<dir>|<framework>` → does the package.json at or above `dir` declare the framework. */
|
|
1876
|
+
appFrameworkMemo = new Map();
|
|
1877
|
+
/** Directory → the dependency names its package.json declares, null without one. */
|
|
1878
|
+
manifestDependencies = new Map();
|
|
1879
|
+
/**
|
|
1880
|
+
* The detected frameworks whose extractors apply to `filePath`: all of them,
|
|
1881
|
+
* except one with `appDependencies` when neither the file's package.json nor
|
|
1882
|
+
* an enclosing one declares any of them.
|
|
1883
|
+
*/
|
|
1884
|
+
frameworksForFile(filePath, names) {
|
|
1885
|
+
if (this.gatedFrameworks.size === 0)
|
|
1886
|
+
return names;
|
|
1887
|
+
const slash = filePath.lastIndexOf('/');
|
|
1888
|
+
const dir = slash < 0 ? '' : filePath.slice(0, slash);
|
|
1889
|
+
const kept = names.filter((name) => this.frameworkAppliesIn(dir, name));
|
|
1890
|
+
return kept.length === names.length ? names : kept;
|
|
1891
|
+
}
|
|
1892
|
+
frameworkAppliesIn(dir, name) {
|
|
1893
|
+
const deps = this.gatedFrameworks.get(name);
|
|
1894
|
+
if (!deps)
|
|
1895
|
+
return true;
|
|
1896
|
+
const key = `${dir}|${name}`;
|
|
1897
|
+
const memo = this.appFrameworkMemo.get(key);
|
|
1898
|
+
if (memo !== undefined)
|
|
1899
|
+
return memo;
|
|
1900
|
+
// The nearest manifest that names ANY gated framework decides: true-sheet's
|
|
1901
|
+
// root package.json declares expo-router for its example app, and its
|
|
1902
|
+
// `docs/` Next.js app — whose own package.json declares `next` — is not
|
|
1903
|
+
// an Expo app for it.
|
|
1904
|
+
let applies = false;
|
|
1905
|
+
for (let d = dir; d !== null; d = d === '' ? null : d.includes('/') ? d.slice(0, d.lastIndexOf('/')) : '') {
|
|
1906
|
+
const declared = this.dependenciesDeclaredIn(d);
|
|
1907
|
+
if (!declared)
|
|
1908
|
+
continue;
|
|
1909
|
+
if (deps.some((dep) => declared.has(dep))) {
|
|
1910
|
+
applies = true;
|
|
1911
|
+
break;
|
|
1912
|
+
}
|
|
1913
|
+
if ([...this.gatedFrameworks].some(([other, otherDeps]) => other !== name && otherDeps.some((dep) => declared.has(dep))))
|
|
1914
|
+
break;
|
|
1915
|
+
}
|
|
1916
|
+
this.appFrameworkMemo.set(key, applies);
|
|
1917
|
+
return applies;
|
|
1918
|
+
}
|
|
1919
|
+
dependenciesDeclaredIn(dir) {
|
|
1920
|
+
if (this.manifestDependencies.has(dir))
|
|
1921
|
+
return this.manifestDependencies.get(dir);
|
|
1922
|
+
let declared = null;
|
|
1923
|
+
try {
|
|
1924
|
+
const pkg = JSON.parse(fs.readFileSync(path.join(this.rootDir, dir, 'package.json'), 'utf8'));
|
|
1925
|
+
declared = new Set();
|
|
1926
|
+
for (const field of ['dependencies', 'devDependencies', 'peerDependencies']) {
|
|
1927
|
+
const group = pkg[field];
|
|
1928
|
+
if (group && typeof group === 'object')
|
|
1929
|
+
for (const name of Object.keys(group))
|
|
1930
|
+
declared.add(name);
|
|
1931
|
+
}
|
|
1932
|
+
}
|
|
1933
|
+
catch { /* no or unreadable manifest */ }
|
|
1934
|
+
this.manifestDependencies.set(dir, declared);
|
|
1935
|
+
return declared;
|
|
1936
|
+
}
|
|
1789
1937
|
/**
|
|
1790
1938
|
* Index all files in the project
|
|
1791
1939
|
*/
|
|
@@ -1959,9 +2107,10 @@ class ExtractionOrchestrator {
|
|
|
1959
2107
|
*/
|
|
1960
2108
|
const parseFile = (filePath, content) => {
|
|
1961
2109
|
const language = (0, grammars_1.detectLanguage)(filePath, content, overrides);
|
|
2110
|
+
const names = this.frameworksForFile(filePath, frameworkNames);
|
|
1962
2111
|
if (!pool)
|
|
1963
|
-
return Promise.resolve((0, tree_sitter_1.extractFromSource)(filePath, content, language,
|
|
1964
|
-
return pool.requestParse({ filePath, content, language, frameworkNames });
|
|
2112
|
+
return Promise.resolve((0, tree_sitter_1.extractFromSource)(filePath, content, language, names));
|
|
2113
|
+
return pool.requestParse({ filePath, content, language, frameworkNames: names });
|
|
1965
2114
|
};
|
|
1966
2115
|
// --- Bounded rolling-window dispatch, ordered commit ---
|
|
1967
2116
|
// Reads stay batched/parallel; parses run concurrently across the pool; the
|
|
@@ -2010,6 +2159,7 @@ class ExtractionOrchestrator {
|
|
|
2010
2159
|
language,
|
|
2011
2160
|
buffers: result.kernelBuffers,
|
|
2012
2161
|
file: this.buildFileRecord(filePath, content, language, stats, nodeCount, result.errors),
|
|
2162
|
+
...(result.unresolvedReferences.length > 0 ? { extraRefs: result.unresolvedReferences } : {}),
|
|
2013
2163
|
});
|
|
2014
2164
|
}
|
|
2015
2165
|
else {
|
|
@@ -2558,7 +2708,7 @@ class ExtractionOrchestrator {
|
|
|
2558
2708
|
// Extract from source. Use cached framework names if indexAll has run,
|
|
2559
2709
|
// otherwise detect on the spot so single-file re-index paths still emit
|
|
2560
2710
|
// route nodes / middleware / etc.
|
|
2561
|
-
const frameworkNames = this.ensureDetectedFrameworks();
|
|
2711
|
+
const frameworkNames = this.frameworksForFile(relativePath, this.ensureDetectedFrameworks());
|
|
2562
2712
|
const result = (0, tree_sitter_1.extractFromSource)(relativePath, content, language, frameworkNames);
|
|
2563
2713
|
// Store in database
|
|
2564
2714
|
await this.storeExtractionResult(relativePath, content, language, stats, result, (0, cooperative_yield_1.createYielder)());
|
|
@@ -2601,9 +2751,9 @@ class ExtractionOrchestrator {
|
|
|
2601
2751
|
// Bulk inserts run in bounded sub-transactions with a yield between, so a
|
|
2602
2752
|
// giant generated file (tens of thousands of symbols) can't block the
|
|
2603
2753
|
// event loop — and the #850 watchdog heartbeat — for the whole store.
|
|
2604
|
-
//
|
|
2605
|
-
// own), and the files-table record still lands last, so
|
|
2606
|
-
//
|
|
2754
|
+
// That chunked path is not one atomic transaction (each insert call has
|
|
2755
|
+
// its own), and the files-table record still lands last, so a
|
|
2756
|
+
// partially-stored file has no record and re-indexes.
|
|
2607
2757
|
const STORE_CHUNK = 2000;
|
|
2608
2758
|
const contentHash = hashContent(content);
|
|
2609
2759
|
// Check if file already exists and hasn't changed. A skip/failure MARKER
|
|
@@ -2633,20 +2783,21 @@ class ExtractionOrchestrator {
|
|
|
2633
2783
|
// `references` edges from callers that import it via module-attribute
|
|
2634
2784
|
// access (`pkg.mod.fn(...)`).
|
|
2635
2785
|
//
|
|
2636
|
-
// We snapshot the
|
|
2637
|
-
//
|
|
2638
|
-
// `sha256(filePath:kind:name:line)`, so any line shift in
|
|
2639
|
-
// (e.g. a docstring-only edit above the symbol) changes
|
|
2640
|
-
// a naive re-insert by old id would silently drop
|
|
2641
|
-
// (
|
|
2642
|
-
//
|
|
2786
|
+
// We snapshot the edges plus the identity of every node the file had, so
|
|
2787
|
+
// each edge can follow its old target to the re-indexed node that replaces
|
|
2788
|
+
// it. Node ids are `sha256(filePath:kind:name:line)`, so any line shift in
|
|
2789
|
+
// the callee file (e.g. a docstring-only edit above the symbol) changes
|
|
2790
|
+
// every target id and a naive re-insert by old id would silently drop
|
|
2791
|
+
// every edge. Pairing by (kind, name) — then qualified name, signature and
|
|
2792
|
+
// position when the file defines a name more than once (#2276) — is stable
|
|
2793
|
+
// across line shifts; if the symbol was renamed/removed, no pair is found
|
|
2794
|
+
// and the edge is re-resolved from its original reference (see below).
|
|
2643
2795
|
const crossFileIncomingEdges = existingFile
|
|
2644
2796
|
? this.queries.getCrossFileIncomingEdgesWithTarget(filePath)
|
|
2645
2797
|
: [];
|
|
2646
|
-
|
|
2647
|
-
|
|
2648
|
-
|
|
2649
|
-
}
|
|
2798
|
+
const priorNodes = crossFileIncomingEdges.length > 0
|
|
2799
|
+
? this.queries.getNodeIdentitiesByFile(filePath)
|
|
2800
|
+
: [];
|
|
2650
2801
|
// Filter out nodes with missing required fields before insertion.
|
|
2651
2802
|
// This prevents FK violations when edges reference nodes that would
|
|
2652
2803
|
// be silently skipped by insertNode() (see issue #42).
|
|
@@ -2661,36 +2812,49 @@ class ExtractionOrchestrator {
|
|
|
2661
2812
|
language: ref.language ?? language,
|
|
2662
2813
|
}));
|
|
2663
2814
|
// Fast path for the common case (everything fits one chunk): the whole
|
|
2664
|
-
//
|
|
2665
|
-
//
|
|
2666
|
-
//
|
|
2815
|
+
// re-store — deleting the old rows, the new nodes, edges, refs and file
|
|
2816
|
+
// record, and the re-attached incoming edges — lands in ONE transaction
|
|
2817
|
+
// with no event-loop yields in between. Committed separately, a crash
|
|
2818
|
+
// after the delete left the file looking new (no snapshot next time) and
|
|
2819
|
+
// a crash before the re-attach left it looking current: either way other
|
|
2820
|
+
// files' edges into it were lost for good. Giant generated files keep the
|
|
2821
|
+
// chunked + yielding path below so the #850 watchdog heartbeat stays
|
|
2822
|
+
// serviced.
|
|
2667
2823
|
const fitsOneChunk = validNodes.length <= STORE_CHUNK &&
|
|
2668
2824
|
validEdges.length <= STORE_CHUNK &&
|
|
2669
2825
|
validRefs.length <= STORE_CHUNK;
|
|
2670
2826
|
if (fitsOneChunk) {
|
|
2671
|
-
|
|
2672
|
-
|
|
2673
|
-
|
|
2674
|
-
|
|
2675
|
-
|
|
2676
|
-
|
|
2677
|
-
|
|
2678
|
-
|
|
2679
|
-
|
|
2680
|
-
|
|
2681
|
-
|
|
2682
|
-
|
|
2683
|
-
|
|
2684
|
-
|
|
2685
|
-
|
|
2686
|
-
|
|
2687
|
-
|
|
2827
|
+
this.queries.runInTransaction(() => {
|
|
2828
|
+
if (existingFile) {
|
|
2829
|
+
this.queries.deleteFile(filePath);
|
|
2830
|
+
}
|
|
2831
|
+
this.queries.storeFileBundle({
|
|
2832
|
+
nodes: validNodes,
|
|
2833
|
+
edges: validEdges,
|
|
2834
|
+
refs: validRefs,
|
|
2835
|
+
file: {
|
|
2836
|
+
path: filePath,
|
|
2837
|
+
contentHash,
|
|
2838
|
+
language,
|
|
2839
|
+
size: stats.size,
|
|
2840
|
+
modifiedAt: stats.mtimeMs,
|
|
2841
|
+
indexedAt: Date.now(),
|
|
2842
|
+
nodeCount: result.nodes.length,
|
|
2843
|
+
errors: result.errors.length > 0 ? result.errors : undefined,
|
|
2844
|
+
generated,
|
|
2845
|
+
},
|
|
2846
|
+
});
|
|
2847
|
+
// On a fresh bulk index crossFileIncomingEdges is [].
|
|
2848
|
+
if (crossFileIncomingEdges.length > 0) {
|
|
2849
|
+
this.reattachCrossFileEdges(crossFileIncomingEdges, priorNodes, validNodes);
|
|
2850
|
+
}
|
|
2688
2851
|
});
|
|
2689
|
-
if (crossFileIncomingEdges.length > 0) {
|
|
2690
|
-
this.reattachCrossFileEdges(crossFileIncomingEdges, validNodes);
|
|
2691
|
-
}
|
|
2692
2852
|
return;
|
|
2693
2853
|
}
|
|
2854
|
+
// Delete existing data for this file
|
|
2855
|
+
if (existingFile) {
|
|
2856
|
+
this.queries.deleteFile(filePath);
|
|
2857
|
+
}
|
|
2694
2858
|
// Insert nodes (chunked — see STORE_CHUNK above)
|
|
2695
2859
|
for (let i = 0; i < validNodes.length; i += STORE_CHUNK) {
|
|
2696
2860
|
this.queries.insertNodes(validNodes.slice(i, i + STORE_CHUNK));
|
|
@@ -2704,25 +2868,26 @@ class ExtractionOrchestrator {
|
|
|
2704
2868
|
}
|
|
2705
2869
|
}
|
|
2706
2870
|
// Re-insert cross-file incoming edges snapshotted before the delete,
|
|
2707
|
-
//
|
|
2708
|
-
//
|
|
2871
|
+
// moving each edge's target to the re-indexed node that replaces it (see
|
|
2872
|
+
// pairReindexedNodes). Node ids include the source line, so any line
|
|
2709
2873
|
// shift in the callee file (e.g. a docstring-only edit above the symbol)
|
|
2710
2874
|
// changes every target id and a naive re-insert by old id would drop them
|
|
2711
2875
|
// all. `insertEdges` still filters to endpoints that exist. This closes
|
|
2712
2876
|
// the #899 edge-drop on `sync`.
|
|
2713
2877
|
//
|
|
2714
|
-
// Edges whose callee (target) was renamed/removed during the re-index
|
|
2715
|
-
//
|
|
2716
|
-
//
|
|
2717
|
-
// metadata.refName/refKind at creation) so
|
|
2718
|
-
// sweep can rebind it to
|
|
2719
|
-
//
|
|
2720
|
-
//
|
|
2721
|
-
// the stamp existed, or
|
|
2722
|
-
//
|
|
2723
|
-
//
|
|
2878
|
+
// Edges whose callee (target) was renamed/removed during the re-index, or
|
|
2879
|
+
// can't be told apart from a same-named sibling (#2276), are not silently
|
|
2880
|
+
// dropped or guessed at: each is resurrected as its ORIGINAL unresolved
|
|
2881
|
+
// ref (stamped on the edge as metadata.refName/refKind at creation) so
|
|
2882
|
+
// the same sync's resolution sweep can rebind it to the right definition
|
|
2883
|
+
// here or an alternative one elsewhere, or park it as status='failed' to
|
|
2884
|
+
// be retried when the symbol reappears — the removal-side counterpart of
|
|
2885
|
+
// #1240. Edges without refName (built before the stamp existed, or
|
|
2886
|
+
// synthesized) still drop silently: reconstructing a ref from the
|
|
2887
|
+
// target's plain name would strip receiver/qualifier context and risk a
|
|
2888
|
+
// rebind a full re-index would never make.
|
|
2724
2889
|
if (crossFileIncomingEdges.length > 0) {
|
|
2725
|
-
this.reattachCrossFileEdges(crossFileIncomingEdges, validNodes);
|
|
2890
|
+
this.reattachCrossFileEdges(crossFileIncomingEdges, priorNodes, validNodes);
|
|
2726
2891
|
}
|
|
2727
2892
|
// Insert unresolved references in batch with denormalized filePath/language
|
|
2728
2893
|
for (let i = 0; i < validRefs.length; i += STORE_CHUNK) {
|
|
@@ -2770,20 +2935,18 @@ class ExtractionOrchestrator {
|
|
|
2770
2935
|
}
|
|
2771
2936
|
/**
|
|
2772
2937
|
* Re-attach cross-file incoming edges snapshotted before a re-index delete
|
|
2773
|
-
* (#899):
|
|
2774
|
-
* (
|
|
2775
|
-
*
|
|
2776
|
-
*
|
|
2938
|
+
* (#899): move each edge's target to the re-indexed node that replaces it
|
|
2939
|
+
* ({@link pairReindexedNodes}). Targets that vanished, or that can't be
|
|
2940
|
+
* told apart from a same-named sibling (#2276), are resurrected as their
|
|
2941
|
+
* original unresolved ref (#1240's removal-side counterpart) when the edge
|
|
2942
|
+
* carries its refName stamp, so resolution picks the target afresh.
|
|
2777
2943
|
*/
|
|
2778
|
-
reattachCrossFileEdges(crossFileIncomingEdges, validNodes) {
|
|
2779
|
-
const
|
|
2780
|
-
for (const n of validNodes) {
|
|
2781
|
-
newNodesByKindName.set(`${n.kind}\0${n.name}`, n.id);
|
|
2782
|
-
}
|
|
2944
|
+
reattachCrossFileEdges(crossFileIncomingEdges, priorNodes, validNodes) {
|
|
2945
|
+
const replacementOf = pairReindexedNodes(priorNodes, validNodes);
|
|
2783
2946
|
const reinserted = [];
|
|
2784
2947
|
const resurrected = [];
|
|
2785
2948
|
for (const e of crossFileIncomingEdges) {
|
|
2786
|
-
const newTargetId =
|
|
2949
|
+
const newTargetId = replacementOf.get(e.target);
|
|
2787
2950
|
if (newTargetId) {
|
|
2788
2951
|
reinserted.push({ source: e.source, target: newTargetId, kind: e.kind, metadata: e.metadata, line: e.line, column: e.column, provenance: e.provenance });
|
|
2789
2952
|
}
|