@lzehrung/codegraph 2.3.31 → 3.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +33 -141
- package/codegraph-skill/codegraph/SKILL.md +8 -6
- package/dist/agent/artifact.d.ts +2 -0
- package/dist/agent/artifact.d.ts.map +1 -1
- package/dist/agent/artifact.js.map +1 -1
- package/dist/agent/call-hierarchy.js +2 -4
- package/dist/agent/call-hierarchy.js.map +1 -1
- package/dist/agent/explore.d.ts +1 -1
- package/dist/agent/explore.d.ts.map +1 -1
- package/dist/agent/explore.js +3 -2
- package/dist/agent/explore.js.map +1 -1
- package/dist/agent/refactor-plan.js +2 -4
- package/dist/agent/refactor-plan.js.map +1 -1
- package/dist/agent/rename-preview.d.ts.map +1 -1
- package/dist/agent/rename-preview.js +4 -3
- package/dist/agent/rename-preview.js.map +1 -1
- package/dist/agent/search.d.ts.map +1 -1
- package/dist/agent/search.js +5 -3
- package/dist/agent/search.js.map +1 -1
- package/dist/agent/semantic-symbols.d.ts.map +1 -1
- package/dist/agent/semantic-symbols.js +2 -3
- package/dist/agent/semantic-symbols.js.map +1 -1
- package/dist/agent/session.d.ts +3 -0
- package/dist/agent/session.d.ts.map +1 -1
- package/dist/agent/session.js +10 -2
- package/dist/agent/session.js.map +1 -1
- package/dist/agent/type-hierarchy.js +2 -4
- package/dist/agent/type-hierarchy.js.map +1 -1
- package/dist/agent/workspace-symbols.d.ts.map +1 -1
- package/dist/agent/workspace-symbols.js +2 -3
- package/dist/agent/workspace-symbols.js.map +1 -1
- package/dist/agent-tools.d.ts +0 -4
- package/dist/agent-tools.d.ts.map +1 -1
- package/dist/agent-tools.js +3 -6
- package/dist/agent-tools.js.map +1 -1
- package/dist/analysis-summary.d.ts +8 -4
- package/dist/analysis-summary.d.ts.map +1 -1
- package/dist/analysis-summary.js +15 -66
- package/dist/analysis-summary.js.map +1 -1
- package/dist/bin/cli.js +51145 -41770
- package/dist/bin/query-index-worker.js +122 -82
- package/dist/cli/affected.d.ts.map +1 -1
- package/dist/cli/affected.js +4 -1
- package/dist/cli/affected.js.map +1 -1
- package/dist/cli/command-catalog.js +1 -1
- package/dist/cli/command-catalog.js.map +1 -1
- package/dist/cli/command-table.d.ts.map +1 -1
- package/dist/cli/command-table.js +9 -17
- package/dist/cli/command-table.js.map +1 -1
- package/dist/cli/context.js +10 -10
- package/dist/cli/context.js.map +1 -1
- package/dist/cli/drift.d.ts +0 -2
- package/dist/cli/drift.d.ts.map +1 -1
- package/dist/cli/drift.js +0 -1
- package/dist/cli/drift.js.map +1 -1
- package/dist/cli/graph-delta.d.ts +0 -2
- package/dist/cli/graph-delta.d.ts.map +1 -1
- package/dist/cli/graph-delta.js +0 -4
- package/dist/cli/graph-delta.js.map +1 -1
- package/dist/cli/graph-queries.d.ts.map +1 -1
- package/dist/cli/graph-queries.js +27 -1
- package/dist/cli/graph-queries.js.map +1 -1
- package/dist/cli/graph.d.ts +0 -3
- package/dist/cli/graph.d.ts.map +1 -1
- package/dist/cli/graph.js +4 -14
- package/dist/cli/graph.js.map +1 -1
- package/dist/cli/help.d.ts +34 -34
- package/dist/cli/help.d.ts.map +1 -1
- package/dist/cli/help.js +9 -14
- package/dist/cli/help.js.map +1 -1
- package/dist/cli/impact.d.ts +0 -2
- package/dist/cli/impact.d.ts.map +1 -1
- package/dist/cli/impact.js +0 -1
- package/dist/cli/impact.js.map +1 -1
- package/dist/cli/index.d.ts +0 -2
- package/dist/cli/index.d.ts.map +1 -1
- package/dist/cli/index.js +5 -6
- package/dist/cli/index.js.map +1 -1
- package/dist/cli/inspect.d.ts +0 -2
- package/dist/cli/inspect.d.ts.map +1 -1
- package/dist/cli/inspect.js +5 -8
- package/dist/cli/inspect.js.map +1 -1
- package/dist/cli/invocation-context.d.ts +0 -3
- package/dist/cli/invocation-context.d.ts.map +1 -1
- package/dist/cli/invocation-context.js +4 -16
- package/dist/cli/invocation-context.js.map +1 -1
- package/dist/cli/navigation.d.ts +0 -2
- package/dist/cli/navigation.d.ts.map +1 -1
- package/dist/cli/navigation.js +0 -1
- package/dist/cli/navigation.js.map +1 -1
- package/dist/cli/options.d.ts.map +1 -1
- package/dist/cli/options.js +4 -14
- package/dist/cli/options.js.map +1 -1
- package/dist/cli/review.d.ts +0 -2
- package/dist/cli/review.d.ts.map +1 -1
- package/dist/cli/review.js +0 -5
- package/dist/cli/review.js.map +1 -1
- package/dist/cli/root-policy.d.ts +0 -2
- package/dist/cli/root-policy.d.ts.map +1 -1
- package/dist/cli/root-policy.js +0 -8
- package/dist/cli/root-policy.js.map +1 -1
- package/dist/cli/server.d.ts.map +1 -1
- package/dist/cli/server.js +0 -2
- package/dist/cli/server.js.map +1 -1
- package/dist/drift/artifact.d.ts.map +1 -1
- package/dist/drift/artifact.js +15 -18
- package/dist/drift/artifact.js.map +1 -1
- package/dist/drift/compare.js +1 -1
- package/dist/drift/compare.js.map +1 -1
- package/dist/drift/git.d.ts.map +1 -1
- package/dist/drift/git.js +0 -1
- package/dist/drift/git.js.map +1 -1
- package/dist/drift/snapshot.d.ts.map +1 -1
- package/dist/drift/snapshot.js +5 -7
- package/dist/drift/snapshot.js.map +1 -1
- package/dist/drift/types.d.ts +2 -2
- package/dist/drift/types.d.ts.map +1 -1
- package/dist/drift/types.js.map +1 -1
- package/dist/duplicates/unit-cache.d.ts +0 -1
- package/dist/duplicates/unit-cache.d.ts.map +1 -1
- package/dist/duplicates/unit-cache.js +3 -11
- package/dist/duplicates/unit-cache.js.map +1 -1
- package/dist/duplicates/units.d.ts +5 -5
- package/dist/duplicates/units.d.ts.map +1 -1
- package/dist/duplicates/units.js +25 -88
- package/dist/duplicates/units.js.map +1 -1
- package/dist/graph-builder.d.ts +0 -6
- package/dist/graph-builder.d.ts.map +1 -1
- package/dist/graph-builder.js +6 -11
- package/dist/graph-builder.js.map +1 -1
- package/dist/graph-edge-collector.d.ts +4 -6
- package/dist/graph-edge-collector.d.ts.map +1 -1
- package/dist/graph-edge-collector.js +31 -26
- package/dist/graph-edge-collector.js.map +1 -1
- package/dist/graphs/angularjs.d.ts.map +1 -1
- package/dist/graphs/angularjs.js +2 -1
- package/dist/graphs/angularjs.js.map +1 -1
- package/dist/graphs/edge-resolution.d.ts +4 -1
- package/dist/graphs/edge-resolution.d.ts.map +1 -1
- package/dist/graphs/edge-resolution.js +24 -76
- package/dist/graphs/edge-resolution.js.map +1 -1
- package/dist/graphs/specifiers.d.ts +4 -13
- package/dist/graphs/specifiers.d.ts.map +1 -1
- package/dist/graphs/specifiers.js +80 -173
- package/dist/graphs/specifiers.js.map +1 -1
- package/dist/graphs/symbol-graph-detailed/ast.d.ts +20 -0
- package/dist/graphs/symbol-graph-detailed/ast.d.ts.map +1 -1
- package/dist/graphs/symbol-graph-detailed/ast.js +154 -15
- package/dist/graphs/symbol-graph-detailed/ast.js.map +1 -1
- package/dist/graphs/symbol-graph-detailed/edge-passes.d.ts +60 -8
- package/dist/graphs/symbol-graph-detailed/edge-passes.d.ts.map +1 -1
- package/dist/graphs/symbol-graph-detailed/edge-passes.js +997 -168
- package/dist/graphs/symbol-graph-detailed/edge-passes.js.map +1 -1
- package/dist/graphs/symbol-graph-detailed/import-aliases.d.ts +2 -1
- package/dist/graphs/symbol-graph-detailed/import-aliases.d.ts.map +1 -1
- package/dist/graphs/symbol-graph-detailed/import-aliases.js +150 -7
- package/dist/graphs/symbol-graph-detailed/import-aliases.js.map +1 -1
- package/dist/graphs/symbol-graph-detailed/member-chains.d.ts +1 -0
- package/dist/graphs/symbol-graph-detailed/member-chains.d.ts.map +1 -1
- package/dist/graphs/symbol-graph-detailed/member-chains.js +3 -1
- package/dist/graphs/symbol-graph-detailed/member-chains.js.map +1 -1
- package/dist/graphs/symbol-graph-detailed/receiver-calls.d.ts +141 -25
- package/dist/graphs/symbol-graph-detailed/receiver-calls.d.ts.map +1 -1
- package/dist/graphs/symbol-graph-detailed/receiver-calls.js +1015 -166
- package/dist/graphs/symbol-graph-detailed/receiver-calls.js.map +1 -1
- package/dist/graphs/symbol-graph-detailed.d.ts.map +1 -1
- package/dist/graphs/symbol-graph-detailed.js +449 -46
- package/dist/graphs/symbol-graph-detailed.js.map +1 -1
- package/dist/graphs/symbol-graph.d.ts +2 -0
- package/dist/graphs/symbol-graph.d.ts.map +1 -1
- package/dist/graphs/symbol-graph.js +34 -16
- package/dist/graphs/symbol-graph.js.map +1 -1
- package/dist/graphs/types.d.ts +0 -4
- package/dist/graphs/types.d.ts.map +1 -1
- package/dist/graphs.d.ts +1 -1
- package/dist/graphs.d.ts.map +1 -1
- package/dist/impact/call-compatibility/providers/index.d.ts +4 -4
- package/dist/impact/call-compatibility/providers/index.d.ts.map +1 -1
- package/dist/impact/call-compatibility/providers/index.js +6 -6
- package/dist/impact/call-compatibility/providers/index.js.map +1 -1
- package/dist/impact/call-compatibility/providers/types.d.ts +2 -0
- package/dist/impact/call-compatibility/providers/types.d.ts.map +1 -1
- package/dist/impact/call-compatibility/types.d.ts +6 -0
- package/dist/impact/call-compatibility/types.d.ts.map +1 -1
- package/dist/impact/call-compatibility.d.ts.map +1 -1
- package/dist/impact/call-compatibility.js +316 -526
- package/dist/impact/call-compatibility.js.map +1 -1
- package/dist/impact/map.js +1 -0
- package/dist/impact/map.js.map +1 -1
- package/dist/impact/reference-cache.d.ts.map +1 -1
- package/dist/impact/reference-cache.js +2 -2
- package/dist/impact/reference-cache.js.map +1 -1
- package/dist/index.d.ts +2 -2
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +1 -1
- package/dist/indexer/ambiguous-resolution.d.ts +11 -0
- package/dist/indexer/ambiguous-resolution.d.ts.map +1 -0
- package/dist/indexer/ambiguous-resolution.js +19 -0
- package/dist/indexer/ambiguous-resolution.js.map +1 -0
- package/dist/indexer/build-cache/module-cache.d.ts +39 -1
- package/dist/indexer/build-cache/module-cache.d.ts.map +1 -1
- package/dist/indexer/build-cache/module-cache.js +218 -21
- package/dist/indexer/build-cache/module-cache.js.map +1 -1
- package/dist/indexer/build-cache/options.d.ts +30 -44
- package/dist/indexer/build-cache/options.d.ts.map +1 -1
- package/dist/indexer/build-cache/options.js +32 -71
- package/dist/indexer/build-cache/options.js.map +1 -1
- package/dist/indexer/build-cache/project-snapshot.d.ts +3 -3
- package/dist/indexer/build-cache/project-snapshot.d.ts.map +1 -1
- package/dist/indexer/build-cache/project-snapshot.js +164 -84
- package/dist/indexer/build-cache/project-snapshot.js.map +1 -1
- package/dist/indexer/build-cache/reports.d.ts +0 -2
- package/dist/indexer/build-cache/reports.d.ts.map +1 -1
- package/dist/indexer/build-cache/reports.js +0 -97
- package/dist/indexer/build-cache/reports.js.map +1 -1
- package/dist/indexer/build-cache/resolver-environment.d.ts.map +1 -1
- package/dist/indexer/build-cache/resolver-environment.js +32 -2
- package/dist/indexer/build-cache/resolver-environment.js.map +1 -1
- package/dist/indexer/build-cache.d.ts +2 -2
- package/dist/indexer/build-cache.d.ts.map +1 -1
- package/dist/indexer/build-cache.js +2 -2
- package/dist/indexer/build-cache.js.map +1 -1
- package/dist/indexer/build-index.d.ts.map +1 -1
- package/dist/indexer/build-index.js +656 -71
- package/dist/indexer/build-index.js.map +1 -1
- package/dist/indexer/build-workers.d.ts.map +1 -1
- package/dist/indexer/build-workers.js +9 -9
- package/dist/indexer/build-workers.js.map +1 -1
- package/dist/indexer/call-hierarchy.js +1 -1
- package/dist/indexer/call-hierarchy.js.map +1 -1
- package/dist/indexer/callable-identity.d.ts +24 -0
- package/dist/indexer/callable-identity.d.ts.map +1 -0
- package/dist/indexer/callable-identity.js +111 -0
- package/dist/indexer/callable-identity.js.map +1 -0
- package/dist/indexer/compilation-units.d.ts +103 -0
- package/dist/indexer/compilation-units.d.ts.map +1 -0
- package/dist/indexer/compilation-units.js +607 -0
- package/dist/indexer/compilation-units.js.map +1 -0
- package/dist/indexer/cpp-callables.d.ts +25 -0
- package/dist/indexer/cpp-callables.d.ts.map +1 -0
- package/dist/indexer/cpp-callables.js +562 -0
- package/dist/indexer/cpp-callables.js.map +1 -0
- package/dist/indexer/declaration-visibility.d.ts +43 -2
- package/dist/indexer/declaration-visibility.d.ts.map +1 -1
- package/dist/indexer/declaration-visibility.js +158 -2
- package/dist/indexer/declaration-visibility.js.map +1 -1
- package/dist/indexer/expand-star-imports.d.ts +6 -1
- package/dist/indexer/expand-star-imports.d.ts.map +1 -1
- package/dist/indexer/expand-star-imports.js +131 -37
- package/dist/indexer/expand-star-imports.js.map +1 -1
- package/dist/indexer/finalize.d.ts.map +1 -1
- package/dist/indexer/finalize.js +0 -1
- package/dist/indexer/finalize.js.map +1 -1
- package/dist/indexer/import-resolution-tables.d.ts +72 -0
- package/dist/indexer/import-resolution-tables.d.ts.map +1 -0
- package/dist/indexer/import-resolution-tables.js +137 -0
- package/dist/indexer/import-resolution-tables.js.map +1 -0
- package/dist/indexer/import-types.d.ts +54 -0
- package/dist/indexer/import-types.d.ts.map +1 -1
- package/dist/indexer/import-types.js +24 -1
- package/dist/indexer/import-types.js.map +1 -1
- package/dist/indexer/imports/context.d.ts +16 -1
- package/dist/indexer/imports/context.d.ts.map +1 -1
- package/dist/indexer/imports/import-binding-tables.d.ts +13 -1
- package/dist/indexer/imports/import-binding-tables.d.ts.map +1 -1
- package/dist/indexer/imports/import-binding-tables.js +149 -30
- package/dist/indexer/imports/import-binding-tables.js.map +1 -1
- package/dist/indexer/imports/js-text-imports.js +4 -4
- package/dist/indexer/imports/js-text-imports.js.map +1 -1
- package/dist/indexer/imports/native-captures.d.ts.map +1 -1
- package/dist/indexer/imports/native-captures.js +24 -6
- package/dist/indexer/imports/native-captures.js.map +1 -1
- package/dist/indexer/imports/python.d.ts +10 -2
- package/dist/indexer/imports/python.d.ts.map +1 -1
- package/dist/indexer/imports/python.js +128 -112
- package/dist/indexer/imports/python.js.map +1 -1
- package/dist/indexer/imports/text-import-extractors.d.ts.map +1 -1
- package/dist/indexer/imports/text-import-extractors.js +68 -19
- package/dist/indexer/imports/text-import-extractors.js.map +1 -1
- package/dist/indexer/imports.d.ts +3 -4
- package/dist/indexer/imports.d.ts.map +1 -1
- package/dist/indexer/imports.js +116 -72
- package/dist/indexer/imports.js.map +1 -1
- package/dist/indexer/incremental-plan.d.ts +33 -0
- package/dist/indexer/incremental-plan.d.ts.map +1 -1
- package/dist/indexer/incremental-plan.js +203 -1
- package/dist/indexer/incremental-plan.js.map +1 -1
- package/dist/indexer/locals-and-exports.d.ts +3 -2
- package/dist/indexer/locals-and-exports.d.ts.map +1 -1
- package/dist/indexer/locals-and-exports.js +659 -78
- package/dist/indexer/locals-and-exports.js.map +1 -1
- package/dist/indexer/member-selection.d.ts +46 -0
- package/dist/indexer/member-selection.d.ts.map +1 -0
- package/dist/indexer/member-selection.js +169 -0
- package/dist/indexer/member-selection.js.map +1 -0
- package/dist/indexer/name-lookup-policies/c-family.d.ts +7 -0
- package/dist/indexer/name-lookup-policies/c-family.d.ts.map +1 -0
- package/dist/indexer/name-lookup-policies/c-family.js +137 -0
- package/dist/indexer/name-lookup-policies/c-family.js.map +1 -0
- package/dist/indexer/name-lookup-policies/csharp-using-static.d.ts +11 -0
- package/dist/indexer/name-lookup-policies/csharp-using-static.d.ts.map +1 -0
- package/dist/indexer/name-lookup-policies/csharp-using-static.js +136 -0
- package/dist/indexer/name-lookup-policies/csharp-using-static.js.map +1 -0
- package/dist/indexer/name-lookup-policies/implicit-self.d.ts +10 -0
- package/dist/indexer/name-lookup-policies/implicit-self.d.ts.map +1 -0
- package/dist/indexer/name-lookup-policies/implicit-self.js +119 -0
- package/dist/indexer/name-lookup-policies/implicit-self.js.map +1 -0
- package/dist/indexer/name-lookup-policies/index.d.ts +3 -0
- package/dist/indexer/name-lookup-policies/index.d.ts.map +1 -0
- package/dist/indexer/name-lookup-policies/index.js +132 -0
- package/dist/indexer/name-lookup-policies/index.js.map +1 -0
- package/dist/indexer/name-lookup-policies/php.d.ts +3 -0
- package/dist/indexer/name-lookup-policies/php.d.ts.map +1 -0
- package/dist/indexer/name-lookup-policies/php.js +82 -0
- package/dist/indexer/name-lookup-policies/php.js.map +1 -0
- package/dist/indexer/name-resolution-types.d.ts +101 -0
- package/dist/indexer/name-resolution-types.d.ts.map +1 -0
- package/dist/indexer/name-resolution-types.js +2 -0
- package/dist/indexer/name-resolution-types.js.map +1 -0
- package/dist/indexer/name-resolution.d.ts +57 -0
- package/dist/indexer/name-resolution.d.ts.map +1 -0
- package/dist/indexer/name-resolution.js +204 -0
- package/dist/indexer/name-resolution.js.map +1 -0
- package/dist/indexer/navigation-cpp.d.ts +58 -0
- package/dist/indexer/navigation-cpp.d.ts.map +1 -0
- package/dist/indexer/navigation-cpp.js +935 -0
- package/dist/indexer/navigation-cpp.js.map +1 -0
- package/dist/indexer/navigation-goto.d.ts +115 -3
- package/dist/indexer/navigation-goto.d.ts.map +1 -1
- package/dist/indexer/navigation-goto.js +2469 -190
- package/dist/indexer/navigation-goto.js.map +1 -1
- package/dist/indexer/navigation-local.d.ts +21 -2
- package/dist/indexer/navigation-local.d.ts.map +1 -1
- package/dist/indexer/navigation-local.js +520 -63
- package/dist/indexer/navigation-local.js.map +1 -1
- package/dist/indexer/navigation-php.d.ts +66 -0
- package/dist/indexer/navigation-php.d.ts.map +1 -1
- package/dist/indexer/navigation-php.js +287 -4
- package/dist/indexer/navigation-php.js.map +1 -1
- package/dist/indexer/navigation-provenance.d.ts +1 -1
- package/dist/indexer/navigation-provenance.d.ts.map +1 -1
- package/dist/indexer/navigation-provenance.js +4 -13
- package/dist/indexer/navigation-provenance.js.map +1 -1
- package/dist/indexer/navigation-references.d.ts +73 -6
- package/dist/indexer/navigation-references.d.ts.map +1 -1
- package/dist/indexer/navigation-references.js +661 -67
- package/dist/indexer/navigation-references.js.map +1 -1
- package/dist/indexer/navigation-resolve.d.ts +46 -2
- package/dist/indexer/navigation-resolve.d.ts.map +1 -1
- package/dist/indexer/navigation-resolve.js +599 -193
- package/dist/indexer/navigation-resolve.js.map +1 -1
- package/dist/indexer/navigation.d.ts +29 -2
- package/dist/indexer/navigation.d.ts.map +1 -1
- package/dist/indexer/navigation.js +1092 -153
- package/dist/indexer/navigation.js.map +1 -1
- package/dist/indexer/parse-context.d.ts +2 -3
- package/dist/indexer/parse-context.d.ts.map +1 -1
- package/dist/indexer/parse-context.js +8 -21
- package/dist/indexer/parse-context.js.map +1 -1
- package/dist/indexer/php-namespace-symbols.d.ts +66 -0
- package/dist/indexer/php-namespace-symbols.d.ts.map +1 -0
- package/dist/indexer/php-namespace-symbols.js +342 -0
- package/dist/indexer/php-namespace-symbols.js.map +1 -0
- package/dist/indexer/reference-candidates.d.ts.map +1 -1
- package/dist/indexer/reference-candidates.js +13 -7
- package/dist/indexer/reference-candidates.js.map +1 -1
- package/dist/indexer/reference-context.d.ts +2 -0
- package/dist/indexer/reference-context.d.ts.map +1 -1
- package/dist/indexer/reference-context.js +4 -0
- package/dist/indexer/reference-context.js.map +1 -1
- package/dist/indexer/scope-nodes.d.ts +92 -13
- package/dist/indexer/scope-nodes.d.ts.map +1 -1
- package/dist/indexer/scope-nodes.js +212 -20
- package/dist/indexer/scope-nodes.js.map +1 -1
- package/dist/indexer/scope-types.d.ts +29 -1
- package/dist/indexer/scope-types.d.ts.map +1 -1
- package/dist/indexer/scope.d.ts +2 -3
- package/dist/indexer/scope.d.ts.map +1 -1
- package/dist/indexer/scope.js +968 -47
- package/dist/indexer/scope.js.map +1 -1
- package/dist/indexer/shared-owner-identity.d.ts +53 -0
- package/dist/indexer/shared-owner-identity.d.ts.map +1 -0
- package/dist/indexer/shared-owner-identity.js +460 -0
- package/dist/indexer/shared-owner-identity.js.map +1 -0
- package/dist/indexer/shared.d.ts +1 -1
- package/dist/indexer/shared.d.ts.map +1 -1
- package/dist/indexer/shared.js +1 -1
- package/dist/indexer/shared.js.map +1 -1
- package/dist/indexer/star-import-precedence.d.ts +113 -0
- package/dist/indexer/star-import-precedence.d.ts.map +1 -0
- package/dist/indexer/star-import-precedence.js +402 -0
- package/dist/indexer/star-import-precedence.js.map +1 -0
- package/dist/indexer/symbols.d.ts +3 -1
- package/dist/indexer/symbols.d.ts.map +1 -1
- package/dist/indexer/symbols.js +58 -18
- package/dist/indexer/symbols.js.map +1 -1
- package/dist/indexer/ts-callables.d.ts +42 -0
- package/dist/indexer/ts-callables.d.ts.map +1 -0
- package/dist/indexer/ts-callables.js +233 -0
- package/dist/indexer/ts-callables.js.map +1 -0
- package/dist/indexer/types.d.ts +41 -26
- package/dist/indexer/types.d.ts.map +1 -1
- package/dist/indexer/unused-exports.d.ts +13 -0
- package/dist/indexer/unused-exports.d.ts.map +1 -0
- package/dist/indexer/unused-exports.js +159 -0
- package/dist/indexer/unused-exports.js.map +1 -0
- package/dist/indexer/workspace-symbols.d.ts.map +1 -1
- package/dist/indexer/workspace-symbols.js +3 -2
- package/dist/indexer/workspace-symbols.js.map +1 -1
- package/dist/indexer.d.ts +3 -8
- package/dist/indexer.d.ts.map +1 -1
- package/dist/indexer.js +1 -1
- package/dist/indexer.js.map +1 -1
- package/dist/languages/callable-arity.d.ts +223 -0
- package/dist/languages/callable-arity.d.ts.map +1 -0
- package/dist/languages/callable-arity.js +1199 -0
- package/dist/languages/callable-arity.js.map +1 -0
- package/dist/languages/definitions/c-family.d.ts.map +1 -1
- package/dist/languages/definitions/c-family.js +30 -1
- package/dist/languages/definitions/c-family.js.map +1 -1
- package/dist/languages/definitions/c.d.ts +4 -0
- package/dist/languages/definitions/c.d.ts.map +1 -1
- package/dist/languages/definitions/c.js +19 -0
- package/dist/languages/definitions/c.js.map +1 -1
- package/dist/languages/definitions/cpp.d.ts.map +1 -1
- package/dist/languages/definitions/cpp.js +12 -0
- package/dist/languages/definitions/cpp.js.map +1 -1
- package/dist/languages/definitions/csharp.d.ts.map +1 -1
- package/dist/languages/definitions/csharp.js +2 -8
- package/dist/languages/definitions/csharp.js.map +1 -1
- package/dist/languages/definitions/go.d.ts.map +1 -1
- package/dist/languages/definitions/go.js +3 -0
- package/dist/languages/definitions/go.js.map +1 -1
- package/dist/languages/definitions/javascript.d.ts.map +1 -1
- package/dist/languages/definitions/javascript.js +10 -1
- package/dist/languages/definitions/javascript.js.map +1 -1
- package/dist/languages/definitions/js-family.d.ts +1 -1
- package/dist/languages/definitions/js-family.d.ts.map +1 -1
- package/dist/languages/definitions/js-family.js +7 -1
- package/dist/languages/definitions/js-family.js.map +1 -1
- package/dist/languages/definitions/php.d.ts.map +1 -1
- package/dist/languages/definitions/php.js +5 -1
- package/dist/languages/definitions/php.js.map +1 -1
- package/dist/languages/definitions/typescript.d.ts.map +1 -1
- package/dist/languages/definitions/typescript.js +8 -1
- package/dist/languages/definitions/typescript.js.map +1 -1
- package/dist/languages/definitions/zig.d.ts.map +1 -1
- package/dist/languages/definitions/zig.js +8 -0
- package/dist/languages/definitions/zig.js.map +1 -1
- package/dist/lifecycle/manifest.d.ts.map +1 -1
- package/dist/lifecycle/manifest.js +0 -1
- package/dist/lifecycle/manifest.js.map +1 -1
- package/dist/mcp/handlers.js +14 -7
- package/dist/mcp/handlers.js.map +1 -1
- package/dist/native/byte-index.d.ts +6 -0
- package/dist/native/byte-index.d.ts.map +1 -1
- package/dist/native/byte-index.js +11 -6
- package/dist/native/byte-index.js.map +1 -1
- package/dist/native/contracts.d.ts +2 -3
- package/dist/native/contracts.d.ts.map +1 -1
- package/dist/native/execution.d.ts +9 -9
- package/dist/native/execution.d.ts.map +1 -1
- package/dist/native/execution.js +37 -77
- package/dist/native/execution.js.map +1 -1
- package/dist/native/js-bridge.d.ts +2 -15
- package/dist/native/js-bridge.d.ts.map +1 -1
- package/dist/native/js-bridge.js +2 -15
- package/dist/native/js-bridge.js.map +1 -1
- package/dist/native/query-results.js +2 -2
- package/dist/native/query-results.js.map +1 -1
- package/dist/native/runtime.d.ts +12 -12
- package/dist/native/runtime.d.ts.map +1 -1
- package/dist/native/runtime.js +24 -69
- package/dist/native/runtime.js.map +1 -1
- package/dist/native/tree-sitter-native.d.ts +3 -3
- package/dist/native/tree-sitter-native.d.ts.map +1 -1
- package/dist/native/tree-sitter-native.js +2 -2
- package/dist/native/tree-sitter-native.js.map +1 -1
- package/dist/presets.d.ts.map +1 -1
- package/dist/presets.js +0 -4
- package/dist/presets.js.map +1 -1
- package/dist/review/candidates.d.ts.map +1 -1
- package/dist/review/candidates.js +1 -1
- package/dist/review/candidates.js.map +1 -1
- package/dist/review/deleted.d.ts +3 -3
- package/dist/review/deleted.d.ts.map +1 -1
- package/dist/review/deleted.js +82 -32
- package/dist/review/deleted.js.map +1 -1
- package/dist/review/report.d.ts +1 -0
- package/dist/review/report.d.ts.map +1 -1
- package/dist/review/report.js +1 -1
- package/dist/review/report.js.map +1 -1
- package/dist/review.d.ts.map +1 -1
- package/dist/review.js +3 -20
- package/dist/review.js.map +1 -1
- package/dist/session.d.ts.map +1 -1
- package/dist/session.js +0 -5
- package/dist/session.js.map +1 -1
- package/dist/sql/navigation.d.ts.map +1 -1
- package/dist/sql/navigation.js +2 -1
- package/dist/sql/navigation.js.map +1 -1
- package/dist/sql/source-graph.d.ts.map +1 -1
- package/dist/sql/source-graph.js +2 -2
- package/dist/sql/source-graph.js.map +1 -1
- package/dist/sqlite/schema.d.ts +1 -1
- package/dist/sqlite/schema.d.ts.map +1 -1
- package/dist/sqlite/schema.js +8 -2
- package/dist/sqlite/schema.js.map +1 -1
- package/dist/sqlite/write.js +2 -2
- package/dist/sqlite/write.js.map +1 -1
- package/dist/types.d.ts +2 -0
- package/dist/types.d.ts.map +1 -1
- package/dist/util/bloom-filter.d.ts +8 -1
- package/dist/util/bloom-filter.d.ts.map +1 -1
- package/dist/util/bloom-filter.js +15 -2
- package/dist/util/bloom-filter.js.map +1 -1
- package/dist/util/glob.d.ts +32 -0
- package/dist/util/glob.d.ts.map +1 -0
- package/dist/util/glob.js +137 -0
- package/dist/util/glob.js.map +1 -0
- package/dist/util/graph-edges.d.ts +19 -1
- package/dist/util/graph-edges.d.ts.map +1 -1
- package/dist/util/graph-edges.js +30 -4
- package/dist/util/graph-edges.js.map +1 -1
- package/dist/util/identifiers.d.ts +15 -0
- package/dist/util/identifiers.d.ts.map +1 -1
- package/dist/util/identifiers.js +35 -0
- package/dist/util/identifiers.js.map +1 -1
- package/dist/util/member-access-tables.d.ts +61 -4
- package/dist/util/member-access-tables.d.ts.map +1 -1
- package/dist/util/member-access-tables.js +139 -19
- package/dist/util/member-access-tables.js.map +1 -1
- package/dist/util/member-access.d.ts +17 -0
- package/dist/util/member-access.d.ts.map +1 -1
- package/dist/util/member-access.js +98 -3
- package/dist/util/member-access.js.map +1 -1
- package/dist/util/project-files.d.ts +2 -10
- package/dist/util/project-files.d.ts.map +1 -1
- package/dist/util/project-files.js +29 -51
- package/dist/util/project-files.js.map +1 -1
- package/dist/util/python-type-checking.d.ts +18 -0
- package/dist/util/python-type-checking.d.ts.map +1 -0
- package/dist/util/python-type-checking.js +160 -0
- package/dist/util/python-type-checking.js.map +1 -0
- package/dist/util/resolution/cargo-targets.d.ts +11 -0
- package/dist/util/resolution/cargo-targets.d.ts.map +1 -1
- package/dist/util/resolution/cargo-targets.js +174 -13
- package/dist/util/resolution/cargo-targets.js.map +1 -1
- package/dist/util/resolution/csharp.d.ts +33 -1
- package/dist/util/resolution/csharp.d.ts.map +1 -1
- package/dist/util/resolution/csharp.js +145 -30
- package/dist/util/resolution/csharp.js.map +1 -1
- package/dist/util/resolution/jvm.d.ts +7 -3
- package/dist/util/resolution/jvm.d.ts.map +1 -1
- package/dist/util/resolution/jvm.js +56 -38
- package/dist/util/resolution/jvm.js.map +1 -1
- package/dist/util/resolution/php.d.ts.map +1 -1
- package/dist/util/resolution/php.js +35 -8
- package/dist/util/resolution/php.js.map +1 -1
- package/dist/util/resolution/python.d.ts +9 -0
- package/dist/util/resolution/python.d.ts.map +1 -1
- package/dist/util/resolution/python.js +46 -0
- package/dist/util/resolution/python.js.map +1 -1
- package/dist/util/resolution/rust.d.ts +0 -1
- package/dist/util/resolution/rust.d.ts.map +1 -1
- package/dist/util/resolution/rust.js +95 -35
- package/dist/util/resolution/rust.js.map +1 -1
- package/dist/util/resolution/specifier-targets.d.ts +44 -0
- package/dist/util/resolution/specifier-targets.d.ts.map +1 -0
- package/dist/util/resolution/specifier-targets.js +152 -0
- package/dist/util/resolution/specifier-targets.js.map +1 -0
- package/dist/util/resolution-candidates.d.ts +5 -0
- package/dist/util/resolution-candidates.d.ts.map +1 -1
- package/dist/util/resolution-candidates.js +16 -3
- package/dist/util/resolution-candidates.js.map +1 -1
- package/dist/util/resolution.d.ts +2 -1
- package/dist/util/resolution.d.ts.map +1 -1
- package/dist/util/resolution.js +101 -15
- package/dist/util/resolution.js.map +1 -1
- package/dist/util/specifiers.d.ts +29 -1
- package/dist/util/specifiers.d.ts.map +1 -1
- package/dist/util/specifiers.js +56 -8
- package/dist/util/specifiers.js.map +1 -1
- package/dist/util/trivia.d.ts.map +1 -1
- package/dist/util/trivia.js +49 -30
- package/dist/util/trivia.js.map +1 -1
- package/dist/util/workspace.d.ts.map +1 -1
- package/dist/util/workspace.js +32 -4
- package/dist/util/workspace.js.map +1 -1
- package/docs/mcp.md +3 -2
- package/package.json +5 -7
- package/dist/impact/call-compatibility/providers/profiles.d.ts +0 -80
- package/dist/impact/call-compatibility/providers/profiles.d.ts.map +0 -1
- package/dist/impact/call-compatibility/providers/profiles.js +0 -164
- package/dist/impact/call-compatibility/providers/profiles.js.map +0 -1
|
@@ -1,5 +1,6 @@
|
|
|
1
1
|
import fsp from "node:fs/promises";
|
|
2
2
|
import { createHash, randomUUID } from "node:crypto";
|
|
3
|
+
import { isRubyLoadForm } from "../../util/specifiers.js";
|
|
3
4
|
import { brotliCompressSync, brotliDecompressSync, constants as zlibConstants } from "node:zlib";
|
|
4
5
|
import path from "node:path";
|
|
5
6
|
import { buildGraphAdjacency } from "../../graphs/adjacency.js";
|
|
@@ -10,13 +11,15 @@ import { assertFilePathWithinRoot, fileIdentityKey, isFilePathWithinRoot, normal
|
|
|
10
11
|
import { getNativeRuntimeFingerprint } from "../../native/tree-sitter-native.js";
|
|
11
12
|
import { logWithLevel } from "../../logging.js";
|
|
12
13
|
import { SymbolKind } from "../types.js";
|
|
14
|
+
import { callableIdentityWithFile, isCallableIdentity } from "../callable-identity.js";
|
|
15
|
+
import { importNodeId } from "../import-types.js";
|
|
13
16
|
import { buildSymbolGraph, defNodeId, } from "../../graphs/symbol-graph.js";
|
|
14
17
|
import { getImplementationFingerprint, normalizeGraphOptions } from "./options.js";
|
|
15
18
|
import { cacheAbsolutePath, cacheRelativePath, listDiskCachedModuleFiles, loadAllCachedModules, transformPersistedExportFromModule, } from "./module-cache.js";
|
|
16
19
|
import { cacheRoot } from "./location.js";
|
|
17
20
|
import { expandStarImports } from "../expand-star-imports.js";
|
|
18
21
|
const SNAPSHOT_SYMBOL_KINDS = new Set(Object.values(SymbolKind));
|
|
19
|
-
export const PROJECT_SNAPSHOT_VERSION =
|
|
22
|
+
export const PROJECT_SNAPSHOT_VERSION = 13;
|
|
20
23
|
const LEGACY_EMBEDDED_MODULE_SNAPSHOT_VERSION = 10;
|
|
21
24
|
export const BLOOM_FILTER_SNAPSHOT_VERSION = 4;
|
|
22
25
|
export const BLOOM_FILTER_SNAPSHOT_FILENAME = "bloom-filters.json";
|
|
@@ -24,7 +27,33 @@ const BLOOM_FILTER_MIN_SIZE = 1_000;
|
|
|
24
27
|
const BLOOM_FILTER_MAX_SIZE = 1_000_000;
|
|
25
28
|
const BLOOM_FILTER_MIN_HASH_COUNT = 1;
|
|
26
29
|
const BLOOM_FILTER_MAX_HASH_COUNT = 10;
|
|
27
|
-
|
|
30
|
+
// v5: nodes carry Kotlin and Swift memberArity plus the proven-callable marker.
|
|
31
|
+
// v6: Swift ownership/arity fixes change persisted detailed-graph edges and memberArity.
|
|
32
|
+
// v7: callable-binding proof corrections change persisted callable flags and call edges.
|
|
33
|
+
// v8: receiver edge reconciliation, Kotlin ancestry, and static receiver scope change persisted graph edges.
|
|
34
|
+
// v9: exact C++ qualified ownership changes persisted member ownership and receiver call edges.
|
|
35
|
+
// v10: C/C++ void-parameter arity changes persisted memberArity and call edges.
|
|
36
|
+
// v11: canonical C/C++ declaration aliases preserve base-graph compatibility across cache loads.
|
|
37
|
+
// v12: shared callable ranges, cross-file ownership, and Zig visibility change detailed call edges.
|
|
38
|
+
// v13: same-file C# constructor edges respect namespace visibility instead of file-wide names.
|
|
39
|
+
// v14: C# alias-qualified targets and shared partial-type identity change persisted edges.
|
|
40
|
+
// v15: trivia-safe package peers can change cross-file detailed call edges.
|
|
41
|
+
// v16: Swift extension visibility and nested C# partial owner identity change persisted call edges.
|
|
42
|
+
// v17: qualified C# generic type uses can change persisted constructor/type edges.
|
|
43
|
+
// v18: constrained Swift extensions no longer donate members to unproven nominal owners.
|
|
44
|
+
// v19: Swift constraint-token equivalence can restore peer call edges across formatting.
|
|
45
|
+
// v20: C# verbatim namespace/type identifiers can merge shared-owner identities and call edges.
|
|
46
|
+
// v21: C# `file` types lose cross-file edges; extension receivers change persisted member arity.
|
|
47
|
+
// v22: C# verbatim namespace aliases (`@X` vs `X`) can add alias-qualified type and constructor edges.
|
|
48
|
+
// v23: C# `file partial` owners in different files no longer share member and call edges.
|
|
49
|
+
// v24: C# top-level types beside block namespaces become global-namespace peers with new edges.
|
|
50
|
+
// v25: identical C# aliases in separate namespace blocks each resolve their own scoped uses.
|
|
51
|
+
// v26: accuracy-audit fixes add Go cross-package, Ruby ancestry, TS static, Rust impl, PHP
|
|
52
|
+
// namespace, and same-unit peer edges, and drop invalid cross-file, unexported, and ambiguous ones.
|
|
53
|
+
// v27: C# type aliases in a multi-file namespace can add call edges, or drop a guessed one.
|
|
54
|
+
// A same-named type in another namespace is not the alias target.
|
|
55
|
+
// v28: JVM type-on-demand imports only bind direct nested classifiers.
|
|
56
|
+
export const DETAILED_SYMBOL_GRAPH_SNAPSHOT_VERSION = 28;
|
|
28
57
|
const DETAILED_SYMBOL_GRAPH_SNAPSHOT_FILENAME = "detailed-symbol-graph.json";
|
|
29
58
|
const SNAPSHOT_TEMP_RETENTION_MS = 24 * 60 * 60 * 1_000;
|
|
30
59
|
const SNAPSHOT_TEMP_SUFFIX = ".tmp";
|
|
@@ -34,6 +63,7 @@ const transformedSnapshotCache = new Map();
|
|
|
34
63
|
const transformedSnapshotModulesCache = new Map();
|
|
35
64
|
const hydratedSnapshotModulesCache = new Map();
|
|
36
65
|
const detailedSymbolGraphCache = new Map();
|
|
66
|
+
const EMPTY_DETAILED_SYMBOL_GRAPH_ALIASES = new Map();
|
|
37
67
|
export function projectSnapshotFilesSignature(entries, projectRoot) {
|
|
38
68
|
const hash = createHash("sha256");
|
|
39
69
|
for (const [file, entry] of [...entries.entries()].sort(([left], [right]) => compareSnapshotPath(left, right))) {
|
|
@@ -56,7 +86,7 @@ export function createProjectSnapshotIdentity(filesSignature, opts) {
|
|
|
56
86
|
hash.update("\0");
|
|
57
87
|
hash.update(JSON.stringify(normalizeGraphOptions(opts?.graph)));
|
|
58
88
|
hash.update("\0");
|
|
59
|
-
hash.update(getNativeRuntimeFingerprint(
|
|
89
|
+
hash.update(getNativeRuntimeFingerprint());
|
|
60
90
|
hash.update("\0");
|
|
61
91
|
hash.update(getImplementationFingerprint());
|
|
62
92
|
return hash.digest("hex");
|
|
@@ -79,13 +109,21 @@ function transformHandle(root, value, toRelative) {
|
|
|
79
109
|
}
|
|
80
110
|
function transformModule(root, module, toRelative) {
|
|
81
111
|
const file = (value) => transformPath(root, value, toRelative);
|
|
112
|
+
const symbol = (local) => {
|
|
113
|
+
const nextFile = file(local.file);
|
|
114
|
+
return {
|
|
115
|
+
...local,
|
|
116
|
+
file: nextFile,
|
|
117
|
+
...(local.callable ? { callable: callableIdentityWithFile(local.callable, local.file, nextFile) } : {}),
|
|
118
|
+
};
|
|
119
|
+
};
|
|
82
120
|
return {
|
|
83
121
|
...module,
|
|
84
122
|
file: file(module.file),
|
|
85
|
-
locals: module.locals.map(
|
|
123
|
+
locals: module.locals.map(symbol),
|
|
86
124
|
exports: module.exports.map((entry) => {
|
|
87
125
|
if (entry.type === "local") {
|
|
88
|
-
return { ...entry, target:
|
|
126
|
+
return { ...entry, target: symbol(entry.target) };
|
|
89
127
|
}
|
|
90
128
|
const copy = { ...entry };
|
|
91
129
|
transformPersistedExportFromModule(root, copy, toRelative);
|
|
@@ -94,6 +132,9 @@ function transformModule(root, module, toRelative) {
|
|
|
94
132
|
imports: module.imports.map((binding) => ({
|
|
95
133
|
...binding,
|
|
96
134
|
...(typeof binding.resolved === "string" ? { resolved: file(binding.resolved) } : {}),
|
|
135
|
+
...(binding.kind === "star" && binding.jvmPackageFiles
|
|
136
|
+
? { jvmPackageFiles: binding.jvmPackageFiles.map(file) }
|
|
137
|
+
: {}),
|
|
97
138
|
})),
|
|
98
139
|
};
|
|
99
140
|
}
|
|
@@ -129,15 +170,6 @@ function transformSnapshotAnalysisReport(root, persistedProjectRoot, report, toR
|
|
|
129
170
|
}
|
|
130
171
|
transformed.backend = backend;
|
|
131
172
|
}
|
|
132
|
-
if (report.graph) {
|
|
133
|
-
transformed.graph = {
|
|
134
|
-
...report.graph,
|
|
135
|
-
fallbackImportExtraction: {
|
|
136
|
-
...report.graph.fallbackImportExtraction,
|
|
137
|
-
files: Object.fromEntries(Object.entries(report.graph.fallbackImportExtraction.files).map(([file, entry]) => [reportFile(file), entry])),
|
|
138
|
-
},
|
|
139
|
-
};
|
|
140
|
-
}
|
|
141
173
|
return transformed;
|
|
142
174
|
}
|
|
143
175
|
function transformSnapshotPaths(payload, root, toRelative) {
|
|
@@ -210,6 +242,10 @@ function transformDetailedGraph(graph, root, toRelative) {
|
|
|
210
242
|
}
|
|
211
243
|
: {}),
|
|
212
244
|
})),
|
|
245
|
+
nodeAliases: graph.nodeAliases.map(([aliasId, canonicalId]) => [
|
|
246
|
+
transformHandle(root, aliasId, toRelative),
|
|
247
|
+
transformHandle(root, canonicalId, toRelative),
|
|
248
|
+
]),
|
|
213
249
|
};
|
|
214
250
|
}
|
|
215
251
|
function compareSnapshotPath(left, right) {
|
|
@@ -305,12 +341,19 @@ function freezeSnapshotPayload(value) {
|
|
|
305
341
|
freezeSnapshotPayload(child);
|
|
306
342
|
return value;
|
|
307
343
|
}
|
|
344
|
+
function detailedSymbolGraphAliases(graph) {
|
|
345
|
+
return graph.nodeAliases ?? EMPTY_DETAILED_SYMBOL_GRAPH_ALIASES;
|
|
346
|
+
}
|
|
308
347
|
function materializeDetailedSymbolGraph(payload) {
|
|
309
|
-
const
|
|
310
|
-
|
|
311
|
-
nodes: new Map(
|
|
312
|
-
edges:
|
|
348
|
+
const serialized = structuredClone(payload);
|
|
349
|
+
const graph = {
|
|
350
|
+
nodes: new Map(serialized.nodes.map((node) => [node.id, node])),
|
|
351
|
+
edges: serialized.edges,
|
|
313
352
|
};
|
|
353
|
+
if (serialized.nodeAliases.length) {
|
|
354
|
+
Object.defineProperty(graph, "nodeAliases", { value: new Map(serialized.nodeAliases) });
|
|
355
|
+
}
|
|
356
|
+
return graph;
|
|
314
357
|
}
|
|
315
358
|
function decodeSnapshotPayload(compressed) {
|
|
316
359
|
return JSON.parse(brotliDecompressSync(compressed).toString("utf8"));
|
|
@@ -391,7 +434,6 @@ function transformCachedProjectSnapshotModules(snapshotPath, identity, rawPayloa
|
|
|
391
434
|
version: payload.version ?? PROJECT_SNAPSHOT_VERSION,
|
|
392
435
|
filesSignature: payload.filesSignature ?? "",
|
|
393
436
|
projectRoot: serializedProjectRoot(projectRoot),
|
|
394
|
-
...(payload.nativeMode !== undefined ? { nativeMode: payload.nativeMode } : {}),
|
|
395
437
|
nativeRuntimeFingerprint: payload.nativeRuntimeFingerprint ?? "",
|
|
396
438
|
implementationFingerprint: payload.implementationFingerprint ?? "",
|
|
397
439
|
modules,
|
|
@@ -422,14 +464,13 @@ export async function tryLoadProjectIndexSnapshot(projectRoot, opts, manifestEnt
|
|
|
422
464
|
const snapshotPath = projectSnapshotPath(projectRoot, opts);
|
|
423
465
|
const parsedSnapshot = await readParsedSnapshot(snapshotPath);
|
|
424
466
|
const payload = transformCachedProjectSnapshot(snapshotPath, parsedSnapshot.identity, parsedSnapshot.payload, projectRoot);
|
|
425
|
-
const nativeRuntimeFingerprint = getNativeRuntimeFingerprint(
|
|
467
|
+
const nativeRuntimeFingerprint = getNativeRuntimeFingerprint();
|
|
426
468
|
const implementationFingerprint = getImplementationFingerprint();
|
|
427
469
|
if (!isProjectIndexSnapshotPayload(payload)) {
|
|
428
470
|
recordSnapshotCorruption(report, projectSnapshotPath(projectRoot, opts), "invalid project snapshot payload", opts?.logLevel);
|
|
429
471
|
return null;
|
|
430
472
|
}
|
|
431
473
|
if (payload.filesSignature !== filesSignature ||
|
|
432
|
-
payload.nativeMode !== normalizedSnapshotNativeMode(opts?.native) ||
|
|
433
474
|
payload.nativeRuntimeFingerprint !== nativeRuntimeFingerprint ||
|
|
434
475
|
payload.implementationFingerprint !== implementationFingerprint) {
|
|
435
476
|
recordSnapshotInvalidation(projectSnapshotPath(projectRoot, opts), "project snapshot identity mismatch", opts?.logLevel);
|
|
@@ -452,7 +493,6 @@ export async function tryLoadProjectIndexSnapshot(projectRoot, opts, manifestEnt
|
|
|
452
493
|
byFile: modules,
|
|
453
494
|
projectRoot: serializedProjectRoot(projectRoot),
|
|
454
495
|
...(payload.languageExtensions ? { languageExtensions: payload.languageExtensions } : {}),
|
|
455
|
-
...(payload.nativeMode ? { nativeMode: payload.nativeMode } : {}),
|
|
456
496
|
exportCache: new Map(),
|
|
457
497
|
scopeCache: new Map(),
|
|
458
498
|
...(shouldHydrateBloomFilters && payload.bloomFilters
|
|
@@ -485,14 +525,13 @@ export async function tryLoadProjectSnapshotModules(projectRoot, opts, fileSigna
|
|
|
485
525
|
try {
|
|
486
526
|
const parsedSnapshot = await readParsedSnapshot(projectSnapshotPath(projectRoot, opts));
|
|
487
527
|
const payload = transformCachedProjectSnapshotModules(projectSnapshotPath(projectRoot, opts), parsedSnapshot.identity, parsedSnapshot.payload, projectRoot);
|
|
488
|
-
const nativeRuntimeFingerprint = getNativeRuntimeFingerprint(
|
|
528
|
+
const nativeRuntimeFingerprint = getNativeRuntimeFingerprint();
|
|
489
529
|
const implementationFingerprint = getImplementationFingerprint();
|
|
490
530
|
if (!isProjectSnapshotModulesPayload(payload)) {
|
|
491
531
|
recordSnapshotCorruption(report, projectSnapshotPath(projectRoot, opts), "invalid project snapshot payload", opts?.logLevel);
|
|
492
532
|
return null;
|
|
493
533
|
}
|
|
494
|
-
if (payload.
|
|
495
|
-
payload.nativeRuntimeFingerprint !== nativeRuntimeFingerprint ||
|
|
534
|
+
if (payload.nativeRuntimeFingerprint !== nativeRuntimeFingerprint ||
|
|
496
535
|
payload.implementationFingerprint !== implementationFingerprint) {
|
|
497
536
|
recordSnapshotInvalidation(projectSnapshotPath(projectRoot, opts), "project snapshot identity mismatch", opts?.logLevel);
|
|
498
537
|
return null;
|
|
@@ -632,6 +671,7 @@ function mutableModuleIndex(mod) {
|
|
|
632
671
|
exports: [...mod.exports],
|
|
633
672
|
imports: [...mod.imports],
|
|
634
673
|
locals: [...mod.locals],
|
|
674
|
+
...(mod.docstringsChecked ? { docstringsChecked: true } : {}),
|
|
635
675
|
...(mod.declaredContainers ? { declaredContainers: [...mod.declaredContainers] } : {}),
|
|
636
676
|
};
|
|
637
677
|
}
|
|
@@ -716,7 +756,7 @@ export async function writeProjectIndexSnapshot(projectRoot, opts, index, filesS
|
|
|
716
756
|
version: PROJECT_SNAPSHOT_VERSION,
|
|
717
757
|
filesSignature,
|
|
718
758
|
projectRoot: serializedProjectRoot(projectRoot),
|
|
719
|
-
nativeRuntimeFingerprint: getNativeRuntimeFingerprint(
|
|
759
|
+
nativeRuntimeFingerprint: getNativeRuntimeFingerprint(),
|
|
720
760
|
implementationFingerprint: getImplementationFingerprint(),
|
|
721
761
|
graph: {
|
|
722
762
|
nodes: [...index.graph.nodes],
|
|
@@ -725,9 +765,6 @@ export async function writeProjectIndexSnapshot(projectRoot, opts, index, filesS
|
|
|
725
765
|
modules: modulesForThinSnapshot(index, projectRoot, opts),
|
|
726
766
|
fileSignatures,
|
|
727
767
|
...(index.languageExtensions ? { languageExtensions: index.languageExtensions } : {}),
|
|
728
|
-
...(normalizedSnapshotNativeMode(index.nativeMode)
|
|
729
|
-
? { nativeMode: normalizedSnapshotNativeMode(index.nativeMode) }
|
|
730
|
-
: {}),
|
|
731
768
|
...(index.projectFiles ? { projectFiles: index.projectFiles } : {}),
|
|
732
769
|
...(serializedBloomFilters ? { bloomFilters: serializedBloomFilters } : {}),
|
|
733
770
|
...(snapshotAnalysis ? { analysis: snapshotAnalysis } : {}),
|
|
@@ -791,6 +828,7 @@ function bloomFilterSnapshotPath(projectRoot, opts) {
|
|
|
791
828
|
export async function writeDetailedSymbolGraphSnapshot(projectRoot, opts, index, graph) {
|
|
792
829
|
if ((opts?.cache ?? "off") !== "disk" || !index.projectSnapshotIdentity)
|
|
793
830
|
return;
|
|
831
|
+
const nodeAliases = [...detailedSymbolGraphAliases(graph)];
|
|
794
832
|
const payload = {
|
|
795
833
|
version: DETAILED_SYMBOL_GRAPH_SNAPSHOT_VERSION,
|
|
796
834
|
projectRoot: serializedProjectRoot(projectRoot),
|
|
@@ -800,6 +838,7 @@ export async function writeDetailedSymbolGraphSnapshot(projectRoot, opts, index,
|
|
|
800
838
|
graph: transformDetailedGraph({
|
|
801
839
|
nodes: [...graph.nodes.values()],
|
|
802
840
|
edges: graph.edges,
|
|
841
|
+
nodeAliases,
|
|
803
842
|
}, projectRoot, true),
|
|
804
843
|
};
|
|
805
844
|
try {
|
|
@@ -819,6 +858,7 @@ export async function writeDetailedSymbolGraphSnapshot(projectRoot, opts, index,
|
|
|
819
858
|
graph: {
|
|
820
859
|
nodes: [...graph.nodes.values()],
|
|
821
860
|
edges: graph.edges,
|
|
861
|
+
nodeAliases,
|
|
822
862
|
},
|
|
823
863
|
});
|
|
824
864
|
}
|
|
@@ -909,6 +949,7 @@ function detailedSymbolGraphContentHash(projectSnapshotIdentity, graph) {
|
|
|
909
949
|
hash.update(JSON.stringify({
|
|
910
950
|
nodes: [...graph.nodes.values()],
|
|
911
951
|
edges: graph.edges,
|
|
952
|
+
nodeAliases: [...detailedSymbolGraphAliases(graph)],
|
|
912
953
|
}));
|
|
913
954
|
return hash.digest("hex");
|
|
914
955
|
}
|
|
@@ -928,20 +969,24 @@ function isDetailedSymbolGraphSnapshotPayload(value) {
|
|
|
928
969
|
!Array.isArray(payload.graph.nodes) ||
|
|
929
970
|
!payload.graph.nodes.every(isSymbolNode) ||
|
|
930
971
|
!Array.isArray(payload.graph.edges) ||
|
|
931
|
-
!payload.graph.edges.every(isSymbolEdge)
|
|
972
|
+
!payload.graph.edges.every(isSymbolEdge) ||
|
|
973
|
+
!Array.isArray(payload.graph.nodeAliases) ||
|
|
974
|
+
!payload.graph.nodeAliases.every(isDetailedSymbolGraphAlias)) {
|
|
932
975
|
return false;
|
|
933
976
|
}
|
|
934
|
-
// `graphHash`
|
|
935
|
-
//
|
|
936
|
-
//
|
|
937
|
-
|
|
938
|
-
|
|
939
|
-
|
|
940
|
-
|
|
941
|
-
|
|
942
|
-
|
|
943
|
-
|
|
944
|
-
|
|
977
|
+
// `graphHash` remains serialized and shape-validated, but load does not re-stringify and
|
|
978
|
+
// re-hash the full graph. The atomic write prevents partial data, and compatibility with the
|
|
979
|
+
// current project is re-derived structurally below.
|
|
980
|
+
return (new Set(payload.graph.nodes.map((node) => node.id)).size === payload.graph.nodes.length &&
|
|
981
|
+
new Set(payload.graph.nodeAliases.map(([aliasId]) => aliasId)).size === payload.graph.nodeAliases.length);
|
|
982
|
+
}
|
|
983
|
+
function isDetailedSymbolGraphAlias(value) {
|
|
984
|
+
return (Array.isArray(value) &&
|
|
985
|
+
value.length === 2 &&
|
|
986
|
+
typeof value[0] === "string" &&
|
|
987
|
+
!!value[0] &&
|
|
988
|
+
typeof value[1] === "string" &&
|
|
989
|
+
!!value[1]);
|
|
945
990
|
}
|
|
946
991
|
function isSymbolNode(value) {
|
|
947
992
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
@@ -959,7 +1004,8 @@ function isSymbolNode(value) {
|
|
|
959
1004
|
isOptionalNonnegativeFiniteNumber(node.complexity) &&
|
|
960
1005
|
(node.visibility === undefined || isSymbolVisibility(node.visibility)) &&
|
|
961
1006
|
(node.implementationTarget === undefined || typeof node.implementationTarget === "boolean") &&
|
|
962
|
-
isOptionalNonnegativeInteger(node.memberArity)
|
|
1007
|
+
isOptionalNonnegativeInteger(node.memberArity) &&
|
|
1008
|
+
(node.callable === undefined || (typeof node.callable === "boolean" && node.callable)));
|
|
963
1009
|
}
|
|
964
1010
|
function isSymbolNodeKind(value) {
|
|
965
1011
|
return (value === "function" ||
|
|
@@ -1033,18 +1079,25 @@ function sameSymbolNodeSemantics(actual, expected) {
|
|
|
1033
1079
|
actual.lineSpan === expected.lineSpan &&
|
|
1034
1080
|
actual.complexity === expected.complexity);
|
|
1035
1081
|
}
|
|
1082
|
+
function mergeCanonicalSymbolNode(canonical, alias) {
|
|
1083
|
+
const merged = { ...canonical };
|
|
1084
|
+
if (!merged.docstring && alias.docstring)
|
|
1085
|
+
merged.docstring = alias.docstring;
|
|
1086
|
+
merged.lineSpan = Math.max(merged.lineSpan ?? 0, alias.lineSpan ?? 0);
|
|
1087
|
+
merged.complexity = Math.max(merged.complexity ?? 0, alias.complexity ?? 0);
|
|
1088
|
+
return merged;
|
|
1089
|
+
}
|
|
1036
1090
|
function indexDefinesSymbolNode(index, node) {
|
|
1037
1091
|
const moduleEntry = index.byFile.get(fileIdentityKey(node.file));
|
|
1038
1092
|
if (!moduleEntry)
|
|
1039
1093
|
return false;
|
|
1040
1094
|
if (moduleEntry.locals.some((local) => defNodeId(local) === node.id))
|
|
1041
1095
|
return true;
|
|
1042
|
-
const
|
|
1096
|
+
const displayFile = normalizePath(moduleEntry.file);
|
|
1043
1097
|
return moduleEntry.imports.some((imp) => {
|
|
1044
1098
|
if (imp.kind === "star")
|
|
1045
1099
|
return false;
|
|
1046
|
-
|
|
1047
|
-
return node.id === `${filePrefix}${local}::import`;
|
|
1100
|
+
return node.id === importNodeId(displayFile, imp);
|
|
1048
1101
|
});
|
|
1049
1102
|
}
|
|
1050
1103
|
async function isDetailedSymbolGraphCompatibleWithProject(projectRoot, index, graph) {
|
|
@@ -1070,7 +1123,28 @@ async function isDetailedSymbolGraphCompatibleWithProject(projectRoot, index, gr
|
|
|
1070
1123
|
}
|
|
1071
1124
|
}
|
|
1072
1125
|
const base = await buildSymbolGraph(index);
|
|
1073
|
-
|
|
1126
|
+
const nodeAliases = detailedSymbolGraphAliases(graph);
|
|
1127
|
+
const expectedNodes = nodeAliases.size ? new Map(base.nodes) : base.nodes;
|
|
1128
|
+
for (const [aliasId, canonicalId] of nodeAliases) {
|
|
1129
|
+
if (aliasId === canonicalId ||
|
|
1130
|
+
graph.nodes.has(aliasId) ||
|
|
1131
|
+
nodeAliases.has(canonicalId) ||
|
|
1132
|
+
!graph.nodes.has(canonicalId)) {
|
|
1133
|
+
return false;
|
|
1134
|
+
}
|
|
1135
|
+
const aliasNode = base.nodes.get(aliasId);
|
|
1136
|
+
const canonicalNode = expectedNodes.get(canonicalId);
|
|
1137
|
+
if (!aliasNode ||
|
|
1138
|
+
!canonicalNode ||
|
|
1139
|
+
aliasNode.name !== canonicalNode.name ||
|
|
1140
|
+
aliasNode.kind !== canonicalNode.kind) {
|
|
1141
|
+
return false;
|
|
1142
|
+
}
|
|
1143
|
+
expectedNodes.set(canonicalId, mergeCanonicalSymbolNode(canonicalNode, aliasNode));
|
|
1144
|
+
}
|
|
1145
|
+
for (const [id, expected] of expectedNodes) {
|
|
1146
|
+
if (nodeAliases.has(id))
|
|
1147
|
+
continue;
|
|
1074
1148
|
const actual = graph.nodes.get(id);
|
|
1075
1149
|
if (!actual || !sameSymbolNodeSemantics(actual, expected))
|
|
1076
1150
|
return false;
|
|
@@ -1081,7 +1155,18 @@ async function isDetailedSymbolGraphCompatibleWithProject(projectRoot, index, gr
|
|
|
1081
1155
|
if (!indexDefinesSymbolNode(index, node))
|
|
1082
1156
|
return false;
|
|
1083
1157
|
}
|
|
1084
|
-
|
|
1158
|
+
if (!nodeAliases.size)
|
|
1159
|
+
return symbolEdgeMultisetContains(graph.edges, base.edges);
|
|
1160
|
+
const canonicalBaseEdges = new Map();
|
|
1161
|
+
for (const edge of base.edges) {
|
|
1162
|
+
const canonicalEdge = {
|
|
1163
|
+
...edge,
|
|
1164
|
+
from: nodeAliases.get(edge.from) ?? edge.from,
|
|
1165
|
+
to: nodeAliases.get(edge.to) ?? edge.to,
|
|
1166
|
+
};
|
|
1167
|
+
canonicalBaseEdges.set(symbolEdgeKey(canonicalEdge), canonicalEdge);
|
|
1168
|
+
}
|
|
1169
|
+
return symbolEdgeMultisetContains(graph.edges, [...canonicalBaseEdges.values()]);
|
|
1085
1170
|
}
|
|
1086
1171
|
function symbolEdgeMultisetContains(haystack, needles) {
|
|
1087
1172
|
const counts = new Map();
|
|
@@ -1126,14 +1211,6 @@ function symbolEdgeKey(edge) {
|
|
|
1126
1211
|
function lengthPrefixedSymbolEdgeField(value) {
|
|
1127
1212
|
return `${value.length}:${value}`;
|
|
1128
1213
|
}
|
|
1129
|
-
function normalizedSnapshotNativeMode(nativeMode) {
|
|
1130
|
-
if (nativeMode === undefined || nativeMode === "auto")
|
|
1131
|
-
return undefined;
|
|
1132
|
-
return nativeMode;
|
|
1133
|
-
}
|
|
1134
|
-
function isSnapshotNativeMode(value) {
|
|
1135
|
-
return value === "auto" || value === "on" || value === "off";
|
|
1136
|
-
}
|
|
1137
1214
|
function isProjectFileInfo(value) {
|
|
1138
1215
|
if (!value || typeof value !== "object")
|
|
1139
1216
|
return false;
|
|
@@ -1175,8 +1252,7 @@ function isProjectSnapshotModulesPayload(value) {
|
|
|
1175
1252
|
/^[a-f0-9]{64}$/.test(payload.implementationFingerprint) &&
|
|
1176
1253
|
Array.isArray(payload.modules) &&
|
|
1177
1254
|
payload.modules.every(isModuleIndex) &&
|
|
1178
|
-
isSnapshotFileSignatureRecord(payload.fileSignatures)
|
|
1179
|
-
(payload.nativeMode === undefined || isSnapshotNativeMode(payload.nativeMode)));
|
|
1255
|
+
isSnapshotFileSignatureRecord(payload.fileSignatures));
|
|
1180
1256
|
}
|
|
1181
1257
|
function isProjectIndexSnapshotPayload(value) {
|
|
1182
1258
|
if (!value || typeof value !== "object")
|
|
@@ -1196,7 +1272,6 @@ function isProjectIndexSnapshotPayload(value) {
|
|
|
1196
1272
|
Array.isArray(payload.modules) &&
|
|
1197
1273
|
payload.modules.every(isModuleIndex) &&
|
|
1198
1274
|
isSnapshotFileSignatureRecord(payload.fileSignatures) &&
|
|
1199
|
-
(payload.nativeMode === undefined || isSnapshotNativeMode(payload.nativeMode)) &&
|
|
1200
1275
|
(payload.languageExtensions === undefined || isLanguageExtensionMap(payload.languageExtensions)) &&
|
|
1201
1276
|
(payload.bloomFilters === undefined || isSerializedBloomFilterRecord(payload.bloomFilters)) &&
|
|
1202
1277
|
(payload.analysis === undefined || isAnalysisSummary(payload.analysis)) &&
|
|
@@ -1205,20 +1280,18 @@ function isProjectIndexSnapshotPayload(value) {
|
|
|
1205
1280
|
(Array.isArray(payload.projectFiles) && payload.projectFiles.every(isProjectFileInfo))));
|
|
1206
1281
|
}
|
|
1207
1282
|
function analysisReportFromBuildReport(report) {
|
|
1208
|
-
if (!report?.backend
|
|
1283
|
+
if (!report?.backend) {
|
|
1209
1284
|
return undefined;
|
|
1210
1285
|
}
|
|
1211
1286
|
return {
|
|
1212
1287
|
...(report.backend ? { backend: report.backend } : {}),
|
|
1213
|
-
...(report.graph ? { graph: report.graph } : {}),
|
|
1214
1288
|
};
|
|
1215
1289
|
}
|
|
1216
1290
|
function isSnapshotAnalysisReport(value) {
|
|
1217
1291
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
1218
1292
|
return false;
|
|
1219
1293
|
const report = value;
|
|
1220
|
-
return
|
|
1221
|
-
(report.graph === undefined || isGraphReport(report.graph)));
|
|
1294
|
+
return report.backend === undefined || isBackendReport(report.backend);
|
|
1222
1295
|
}
|
|
1223
1296
|
function isBackendReport(value) {
|
|
1224
1297
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
@@ -1248,21 +1321,6 @@ function isParserBackendDegradationReport(value) {
|
|
|
1248
1321
|
const report = value;
|
|
1249
1322
|
return typeof report.total === "number" && isNumberRecord(report.byLanguage) && Array.isArray(report.files);
|
|
1250
1323
|
}
|
|
1251
|
-
function isGraphReport(value) {
|
|
1252
|
-
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
1253
|
-
return false;
|
|
1254
|
-
const report = value;
|
|
1255
|
-
return !!report.fallbackImportExtraction && isFallbackImportExtractionReport(report.fallbackImportExtraction);
|
|
1256
|
-
}
|
|
1257
|
-
function isFallbackImportExtractionReport(value) {
|
|
1258
|
-
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
1259
|
-
return false;
|
|
1260
|
-
const report = value;
|
|
1261
|
-
return (typeof report.total === "number" &&
|
|
1262
|
-
isNumberRecord(report.byLanguage) &&
|
|
1263
|
-
isUnknownRecord(report.files) &&
|
|
1264
|
-
(report.byReason === undefined || isNumberRecord(report.byReason)));
|
|
1265
|
-
}
|
|
1266
1324
|
function isUnknownRecord(value) {
|
|
1267
1325
|
return !!value && typeof value === "object" && !Array.isArray(value);
|
|
1268
1326
|
}
|
|
@@ -1273,13 +1331,9 @@ function isAnalysisSummary(value) {
|
|
|
1273
1331
|
if (!value || typeof value !== "object" || Array.isArray(value))
|
|
1274
1332
|
return false;
|
|
1275
1333
|
const summary = value;
|
|
1276
|
-
return (
|
|
1277
|
-
(summary.backend === "native" ||
|
|
1278
|
-
summary.backend === "mixed" ||
|
|
1279
|
-
summary.backend === "graph-only" ||
|
|
1280
|
-
summary.backend === "unknown") &&
|
|
1334
|
+
return (summary.mode === "semantic" &&
|
|
1335
|
+
(summary.backend === "native" || summary.backend === "unknown") &&
|
|
1281
1336
|
typeof summary.parserDegradedFiles === "number" &&
|
|
1282
|
-
typeof summary.fallbackImportExtractionFiles === "number" &&
|
|
1283
1337
|
typeof summary.nativeFilesUsed === "number" &&
|
|
1284
1338
|
typeof summary.nativeFilesFellBack === "number" &&
|
|
1285
1339
|
typeof summary.label === "string");
|
|
@@ -1371,6 +1425,7 @@ function isModuleIndex(value) {
|
|
|
1371
1425
|
return false;
|
|
1372
1426
|
const moduleIndex = value;
|
|
1373
1427
|
return (typeof moduleIndex.file === "string" &&
|
|
1428
|
+
isOptionalBoolean(moduleIndex.docstringsChecked) &&
|
|
1374
1429
|
Array.isArray(moduleIndex.locals) &&
|
|
1375
1430
|
moduleIndex.locals.every(isSymbolDef) &&
|
|
1376
1431
|
Array.isArray(moduleIndex.imports) &&
|
|
@@ -1386,6 +1441,17 @@ function isSymbolDef(value) {
|
|
|
1386
1441
|
typeof symbol.localName === "string" &&
|
|
1387
1442
|
isSymbolKind(symbol.kind) &&
|
|
1388
1443
|
isRange(symbol.range) &&
|
|
1444
|
+
(symbol.kind === SymbolKind.Function
|
|
1445
|
+
? isCallableIdentity(symbol.callable)
|
|
1446
|
+
: symbol.callable === undefined || isCallableIdentity(symbol.callable)) &&
|
|
1447
|
+
(symbol.cTag === undefined ||
|
|
1448
|
+
symbol.cTag === "declaration" ||
|
|
1449
|
+
symbol.cTag === "forward" ||
|
|
1450
|
+
symbol.cTag === "reference") &&
|
|
1451
|
+
isOptionalBoolean(symbol.javaPackagePrivate) &&
|
|
1452
|
+
isOptionalBoolean(symbol.javaProtectedMember) &&
|
|
1453
|
+
(symbol.jvmTypeOwnerStartIndex === undefined || typeof symbol.jvmTypeOwnerStartIndex === "number") &&
|
|
1454
|
+
isOptionalBoolean(symbol.jvmStaticMember) &&
|
|
1389
1455
|
(symbol.docstring === undefined || typeof symbol.docstring === "string") &&
|
|
1390
1456
|
(symbol.lineSpan === undefined || typeof symbol.lineSpan === "number") &&
|
|
1391
1457
|
(symbol.complexity === undefined || typeof symbol.complexity === "number"));
|
|
@@ -1411,6 +1477,10 @@ function isImportBinding(value) {
|
|
|
1411
1477
|
isOptionalBoolean(binding.explicitAlias) &&
|
|
1412
1478
|
isOptionalRange(binding.importedRange) &&
|
|
1413
1479
|
isOptionalRange(binding.localRange) &&
|
|
1480
|
+
(binding.jvmTypeOwnerStartIndex === undefined || typeof binding.jvmTypeOwnerStartIndex === "number") &&
|
|
1481
|
+
(binding.jvmStaticWildcardName === undefined || typeof binding.jvmStaticWildcardName === "string") &&
|
|
1482
|
+
isOptionalBoolean(binding.jvmSamePackage) &&
|
|
1483
|
+
(binding.cNamespace === undefined || binding.cNamespace === "tag" || binding.cNamespace === "ordinary") &&
|
|
1414
1484
|
(binding.phpImportType === undefined ||
|
|
1415
1485
|
binding.phpImportType === "class" ||
|
|
1416
1486
|
binding.phpImportType === "function" ||
|
|
@@ -1419,7 +1489,17 @@ function isImportBinding(value) {
|
|
|
1419
1489
|
if (binding.kind === "namespace") {
|
|
1420
1490
|
return typeof binding.localNS === "string" && isOptionalRange(binding.localRange);
|
|
1421
1491
|
}
|
|
1422
|
-
return binding.kind === "star"
|
|
1492
|
+
return (binding.kind === "star" &&
|
|
1493
|
+
(binding.staticMembersOf === undefined || typeof binding.staticMembersOf === "string") &&
|
|
1494
|
+
(binding.jvmTypeWildcardName === undefined || typeof binding.jvmTypeWildcardName === "string") &&
|
|
1495
|
+
(binding.jvmStaticWildcardName === undefined || typeof binding.jvmStaticWildcardName === "string") &&
|
|
1496
|
+
(binding.jvmPackageFiles === undefined ||
|
|
1497
|
+
(Array.isArray(binding.jvmPackageFiles) && binding.jvmPackageFiles.every((file) => typeof file === "string"))) &&
|
|
1498
|
+
(binding.jvmPackageLanguageId === undefined ||
|
|
1499
|
+
binding.jvmPackageLanguageId === "java" ||
|
|
1500
|
+
binding.jvmPackageLanguageId === "kotlin") &&
|
|
1501
|
+
isOptionalBoolean(binding.jvmSamePackage) &&
|
|
1502
|
+
(binding.rubyLoadForm === undefined || isRubyLoadForm(binding.rubyLoadForm)));
|
|
1423
1503
|
}
|
|
1424
1504
|
function isExportEntry(value) {
|
|
1425
1505
|
if (!value || typeof value !== "object")
|