arceus-s 1.6.4
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 +395 -0
- package/dist/_shared/graph/types.d.ts +81 -0
- package/dist/_shared/graph/types.d.ts.map +1 -0
- package/dist/_shared/graph/types.js +8 -0
- package/dist/_shared/graph/types.js.map +1 -0
- package/dist/_shared/index.d.ts +63 -0
- package/dist/_shared/index.d.ts.map +1 -0
- package/dist/_shared/index.js +48 -0
- package/dist/_shared/index.js.map +1 -0
- package/dist/_shared/integrations/circuit-breaker.d.ts +183 -0
- package/dist/_shared/integrations/circuit-breaker.d.ts.map +1 -0
- package/dist/_shared/integrations/circuit-breaker.js +236 -0
- package/dist/_shared/integrations/circuit-breaker.js.map +1 -0
- package/dist/_shared/integrations/resilient-fetch.d.ts +99 -0
- package/dist/_shared/integrations/resilient-fetch.d.ts.map +1 -0
- package/dist/_shared/integrations/resilient-fetch.js +204 -0
- package/dist/_shared/integrations/resilient-fetch.js.map +1 -0
- package/dist/_shared/integrations/retry.d.ts +60 -0
- package/dist/_shared/integrations/retry.d.ts.map +1 -0
- package/dist/_shared/integrations/retry.js +67 -0
- package/dist/_shared/integrations/retry.js.map +1 -0
- package/dist/_shared/integrations/understand-quickly.d.ts +77 -0
- package/dist/_shared/integrations/understand-quickly.d.ts.map +1 -0
- package/dist/_shared/integrations/understand-quickly.js +176 -0
- package/dist/_shared/integrations/understand-quickly.js.map +1 -0
- package/dist/_shared/language-detection.d.ts +23 -0
- package/dist/_shared/language-detection.d.ts.map +1 -0
- package/dist/_shared/language-detection.js +139 -0
- package/dist/_shared/language-detection.js.map +1 -0
- package/dist/_shared/languages.d.ts +26 -0
- package/dist/_shared/languages.d.ts.map +1 -0
- package/dist/_shared/languages.js +27 -0
- package/dist/_shared/languages.js.map +1 -0
- package/dist/_shared/lbug/schema-constants.d.ts +16 -0
- package/dist/_shared/lbug/schema-constants.d.ts.map +1 -0
- package/dist/_shared/lbug/schema-constants.js +67 -0
- package/dist/_shared/lbug/schema-constants.js.map +1 -0
- package/dist/_shared/mro-strategy.d.ts +41 -0
- package/dist/_shared/mro-strategy.d.ts.map +1 -0
- package/dist/_shared/mro-strategy.js +2 -0
- package/dist/_shared/mro-strategy.js.map +1 -0
- package/dist/_shared/pipeline.d.ts +16 -0
- package/dist/_shared/pipeline.d.ts.map +1 -0
- package/dist/_shared/pipeline.js +5 -0
- package/dist/_shared/pipeline.js.map +1 -0
- package/dist/_shared/scope-resolution/def-index.d.ts +36 -0
- package/dist/_shared/scope-resolution/def-index.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/def-index.js +51 -0
- package/dist/_shared/scope-resolution/def-index.js.map +1 -0
- package/dist/_shared/scope-resolution/evidence-weights.d.ts +69 -0
- package/dist/_shared/scope-resolution/evidence-weights.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/evidence-weights.js +84 -0
- package/dist/_shared/scope-resolution/evidence-weights.js.map +1 -0
- package/dist/_shared/scope-resolution/finalize-algorithm.d.ts +149 -0
- package/dist/_shared/scope-resolution/finalize-algorithm.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/finalize-algorithm.js +795 -0
- package/dist/_shared/scope-resolution/finalize-algorithm.js.map +1 -0
- package/dist/_shared/scope-resolution/language-classification.d.ts +26 -0
- package/dist/_shared/scope-resolution/language-classification.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/language-classification.js +44 -0
- package/dist/_shared/scope-resolution/language-classification.js.map +1 -0
- package/dist/_shared/scope-resolution/method-dispatch-index.d.ts +106 -0
- package/dist/_shared/scope-resolution/method-dispatch-index.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/method-dispatch-index.js +98 -0
- package/dist/_shared/scope-resolution/method-dispatch-index.js.map +1 -0
- package/dist/_shared/scope-resolution/module-scope-index.d.ts +46 -0
- package/dist/_shared/scope-resolution/module-scope-index.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/module-scope-index.js +58 -0
- package/dist/_shared/scope-resolution/module-scope-index.js.map +1 -0
- package/dist/_shared/scope-resolution/origin-priority.d.ts +14 -0
- package/dist/_shared/scope-resolution/origin-priority.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/origin-priority.js +21 -0
- package/dist/_shared/scope-resolution/origin-priority.js.map +1 -0
- package/dist/_shared/scope-resolution/parsed-file.d.ts +76 -0
- package/dist/_shared/scope-resolution/parsed-file.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/parsed-file.js +54 -0
- package/dist/_shared/scope-resolution/parsed-file.js.map +1 -0
- package/dist/_shared/scope-resolution/position-index.d.ts +62 -0
- package/dist/_shared/scope-resolution/position-index.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/position-index.js +134 -0
- package/dist/_shared/scope-resolution/position-index.js.map +1 -0
- package/dist/_shared/scope-resolution/qualified-name-index.d.ts +44 -0
- package/dist/_shared/scope-resolution/qualified-name-index.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/qualified-name-index.js +75 -0
- package/dist/_shared/scope-resolution/qualified-name-index.js.map +1 -0
- package/dist/_shared/scope-resolution/reference-site.d.ts +75 -0
- package/dist/_shared/scope-resolution/reference-site.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/reference-site.js +24 -0
- package/dist/_shared/scope-resolution/reference-site.js.map +1 -0
- package/dist/_shared/scope-resolution/registries/class-registry.d.ts +27 -0
- package/dist/_shared/scope-resolution/registries/class-registry.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/registries/class-registry.js +30 -0
- package/dist/_shared/scope-resolution/registries/class-registry.js.map +1 -0
- package/dist/_shared/scope-resolution/registries/context.d.ts +69 -0
- package/dist/_shared/scope-resolution/registries/context.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/registries/context.js +44 -0
- package/dist/_shared/scope-resolution/registries/context.js.map +1 -0
- package/dist/_shared/scope-resolution/registries/evidence.d.ts +56 -0
- package/dist/_shared/scope-resolution/registries/evidence.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/registries/evidence.js +150 -0
- package/dist/_shared/scope-resolution/registries/evidence.js.map +1 -0
- package/dist/_shared/scope-resolution/registries/field-registry.d.ts +26 -0
- package/dist/_shared/scope-resolution/registries/field-registry.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/registries/field-registry.js +31 -0
- package/dist/_shared/scope-resolution/registries/field-registry.js.map +1 -0
- package/dist/_shared/scope-resolution/registries/lookup-core.d.ts +81 -0
- package/dist/_shared/scope-resolution/registries/lookup-core.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/registries/lookup-core.js +349 -0
- package/dist/_shared/scope-resolution/registries/lookup-core.js.map +1 -0
- package/dist/_shared/scope-resolution/registries/lookup-qualified.d.ts +33 -0
- package/dist/_shared/scope-resolution/registries/lookup-qualified.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/registries/lookup-qualified.js +56 -0
- package/dist/_shared/scope-resolution/registries/lookup-qualified.js.map +1 -0
- package/dist/_shared/scope-resolution/registries/method-registry.d.ts +36 -0
- package/dist/_shared/scope-resolution/registries/method-registry.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/registries/method-registry.js +32 -0
- package/dist/_shared/scope-resolution/registries/method-registry.js.map +1 -0
- package/dist/_shared/scope-resolution/registries/tie-breaks.d.ts +43 -0
- package/dist/_shared/scope-resolution/registries/tie-breaks.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/registries/tie-breaks.js +60 -0
- package/dist/_shared/scope-resolution/registries/tie-breaks.js.map +1 -0
- package/dist/_shared/scope-resolution/resolve-type-ref.d.ts +53 -0
- package/dist/_shared/scope-resolution/resolve-type-ref.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/resolve-type-ref.js +126 -0
- package/dist/_shared/scope-resolution/resolve-type-ref.js.map +1 -0
- package/dist/_shared/scope-resolution/scope-id.d.ts +43 -0
- package/dist/_shared/scope-resolution/scope-id.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/scope-id.js +46 -0
- package/dist/_shared/scope-resolution/scope-id.js.map +1 -0
- package/dist/_shared/scope-resolution/scope-tree.d.ts +83 -0
- package/dist/_shared/scope-resolution/scope-tree.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/scope-tree.js +220 -0
- package/dist/_shared/scope-resolution/scope-tree.js.map +1 -0
- package/dist/_shared/scope-resolution/shadow/aggregate.d.ts +63 -0
- package/dist/_shared/scope-resolution/shadow/aggregate.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/shadow/aggregate.js +122 -0
- package/dist/_shared/scope-resolution/shadow/aggregate.js.map +1 -0
- package/dist/_shared/scope-resolution/shadow/diff.d.ts +59 -0
- package/dist/_shared/scope-resolution/shadow/diff.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/shadow/diff.js +79 -0
- package/dist/_shared/scope-resolution/shadow/diff.js.map +1 -0
- package/dist/_shared/scope-resolution/symbol-definition.d.ts +34 -0
- package/dist/_shared/scope-resolution/symbol-definition.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/symbol-definition.js +12 -0
- package/dist/_shared/scope-resolution/symbol-definition.js.map +1 -0
- package/dist/_shared/scope-resolution/types.d.ts +400 -0
- package/dist/_shared/scope-resolution/types.d.ts.map +1 -0
- package/dist/_shared/scope-resolution/types.js +25 -0
- package/dist/_shared/scope-resolution/types.js.map +1 -0
- package/dist/_shared/test-helpers.d.ts +13 -0
- package/dist/_shared/test-helpers.d.ts.map +1 -0
- package/dist/_shared/test-helpers.js +13 -0
- package/dist/_shared/test-helpers.js.map +1 -0
- package/dist/cli/ai-context.d.ts +28 -0
- package/dist/cli/ai-context.js +289 -0
- package/dist/cli/analyze.d.ts +80 -0
- package/dist/cli/analyze.js +525 -0
- package/dist/cli/augment.d.ts +13 -0
- package/dist/cli/augment.js +33 -0
- package/dist/cli/clean.d.ts +10 -0
- package/dist/cli/clean.js +79 -0
- package/dist/cli/cli-message.d.ts +16 -0
- package/dist/cli/cli-message.js +71 -0
- package/dist/cli/doctor.d.ts +1 -0
- package/dist/cli/doctor.js +31 -0
- package/dist/cli/eval-server.d.ts +37 -0
- package/dist/cli/eval-server.js +423 -0
- package/dist/cli/group.d.ts +1 -0
- package/dist/cli/group.js +323 -0
- package/dist/cli/index-repo.d.ts +15 -0
- package/dist/cli/index-repo.js +120 -0
- package/dist/cli/index.d.ts +2 -0
- package/dist/cli/index.js +492 -0
- package/dist/cli/lazy-action.d.ts +6 -0
- package/dist/cli/lazy-action.js +18 -0
- package/dist/cli/list.d.ts +6 -0
- package/dist/cli/list.js +40 -0
- package/dist/cli/mcp.d.ts +29 -0
- package/dist/cli/mcp.js +73 -0
- package/dist/cli/optional-grammars.d.ts +47 -0
- package/dist/cli/optional-grammars.js +87 -0
- package/dist/cli/publish.d.ts +29 -0
- package/dist/cli/publish.js +174 -0
- package/dist/cli/remove.d.ts +30 -0
- package/dist/cli/remove.js +102 -0
- package/dist/cli/serve.d.ts +4 -0
- package/dist/cli/serve.js +55 -0
- package/dist/cli/setup.d.ts +8 -0
- package/dist/cli/setup.js +642 -0
- package/dist/cli/skill-gen.d.ts +26 -0
- package/dist/cli/skill-gen.js +555 -0
- package/dist/cli/status.d.ts +6 -0
- package/dist/cli/status.js +36 -0
- package/dist/cli/tool.d.ts +43 -0
- package/dist/cli/tool.js +169 -0
- package/dist/cli/wiki.d.ts +23 -0
- package/dist/cli/wiki.js +616 -0
- package/dist/config/ignore-service.d.ts +35 -0
- package/dist/config/ignore-service.js +439 -0
- package/dist/config/supported-languages.d.ts +13 -0
- package/dist/config/supported-languages.js +13 -0
- package/dist/core/augmentation/engine.d.ts +26 -0
- package/dist/core/augmentation/engine.js +272 -0
- package/dist/core/embedding-mode.d.ts +51 -0
- package/dist/core/embedding-mode.js +48 -0
- package/dist/core/embeddings/ast-utils.d.ts +22 -0
- package/dist/core/embeddings/ast-utils.js +106 -0
- package/dist/core/embeddings/character-chunk.d.ts +12 -0
- package/dist/core/embeddings/character-chunk.js +43 -0
- package/dist/core/embeddings/chunker.d.ts +14 -0
- package/dist/core/embeddings/chunker.js +239 -0
- package/dist/core/embeddings/config.d.ts +2 -0
- package/dist/core/embeddings/config.js +36 -0
- package/dist/core/embeddings/embedder.d.ts +65 -0
- package/dist/core/embeddings/embedder.js +349 -0
- package/dist/core/embeddings/embedding-pipeline.d.ts +68 -0
- package/dist/core/embeddings/embedding-pipeline.js +552 -0
- package/dist/core/embeddings/exact-search.d.ts +15 -0
- package/dist/core/embeddings/exact-search.js +27 -0
- package/dist/core/embeddings/hf-env.d.ts +135 -0
- package/dist/core/embeddings/hf-env.js +232 -0
- package/dist/core/embeddings/http-client.d.ts +37 -0
- package/dist/core/embeddings/http-client.js +199 -0
- package/dist/core/embeddings/index.d.ts +10 -0
- package/dist/core/embeddings/index.js +10 -0
- package/dist/core/embeddings/line-index.d.ts +7 -0
- package/dist/core/embeddings/line-index.js +42 -0
- package/dist/core/embeddings/server-mapping.d.ts +15 -0
- package/dist/core/embeddings/server-mapping.js +33 -0
- package/dist/core/embeddings/structural-extractor.d.ts +15 -0
- package/dist/core/embeddings/structural-extractor.js +58 -0
- package/dist/core/embeddings/text-generator.d.ts +31 -0
- package/dist/core/embeddings/text-generator.js +208 -0
- package/dist/core/embeddings/types.d.ts +211 -0
- package/dist/core/embeddings/types.js +202 -0
- package/dist/core/git-staleness.d.ts +37 -0
- package/dist/core/git-staleness.js +167 -0
- package/dist/core/graph/graph.d.ts +2 -0
- package/dist/core/graph/graph.js +173 -0
- package/dist/core/graph/types.d.ts +36 -0
- package/dist/core/graph/types.js +1 -0
- package/dist/core/group/bridge-db.d.ts +82 -0
- package/dist/core/group/bridge-db.js +609 -0
- package/dist/core/group/bridge-schema.d.ts +27 -0
- package/dist/core/group/bridge-schema.js +55 -0
- package/dist/core/group/config-parser.d.ts +7 -0
- package/dist/core/group/config-parser.js +122 -0
- package/dist/core/group/contract-extractor.d.ts +7 -0
- package/dist/core/group/contract-extractor.js +1 -0
- package/dist/core/group/cross-impact.d.ts +85 -0
- package/dist/core/group/cross-impact.js +515 -0
- package/dist/core/group/extractors/elixir-workspace-extractor.d.ts +15 -0
- package/dist/core/group/extractors/elixir-workspace-extractor.js +204 -0
- package/dist/core/group/extractors/fs-utils.d.ts +10 -0
- package/dist/core/group/extractors/fs-utils.js +24 -0
- package/dist/core/group/extractors/go-workspace-extractor.d.ts +14 -0
- package/dist/core/group/extractors/go-workspace-extractor.js +217 -0
- package/dist/core/group/extractors/grpc-extractor.d.ts +25 -0
- package/dist/core/group/extractors/grpc-extractor.js +414 -0
- package/dist/core/group/extractors/grpc-patterns/go.d.ts +2 -0
- package/dist/core/group/extractors/grpc-patterns/go.js +97 -0
- package/dist/core/group/extractors/grpc-patterns/index.d.ts +19 -0
- package/dist/core/group/extractors/grpc-patterns/index.js +46 -0
- package/dist/core/group/extractors/grpc-patterns/java.d.ts +2 -0
- package/dist/core/group/extractors/grpc-patterns/java.js +173 -0
- package/dist/core/group/extractors/grpc-patterns/node.d.ts +4 -0
- package/dist/core/group/extractors/grpc-patterns/node.js +290 -0
- package/dist/core/group/extractors/grpc-patterns/proto.d.ts +9 -0
- package/dist/core/group/extractors/grpc-patterns/proto.js +134 -0
- package/dist/core/group/extractors/grpc-patterns/python.d.ts +2 -0
- package/dist/core/group/extractors/grpc-patterns/python.js +67 -0
- package/dist/core/group/extractors/grpc-patterns/types.d.ts +50 -0
- package/dist/core/group/extractors/grpc-patterns/types.js +1 -0
- package/dist/core/group/extractors/http-patterns/go.d.ts +2 -0
- package/dist/core/group/extractors/http-patterns/go.js +215 -0
- package/dist/core/group/extractors/http-patterns/index.d.ts +17 -0
- package/dist/core/group/extractors/http-patterns/index.js +44 -0
- package/dist/core/group/extractors/http-patterns/java.d.ts +2 -0
- package/dist/core/group/extractors/http-patterns/java.js +253 -0
- package/dist/core/group/extractors/http-patterns/node.d.ts +4 -0
- package/dist/core/group/extractors/http-patterns/node.js +484 -0
- package/dist/core/group/extractors/http-patterns/php.d.ts +2 -0
- package/dist/core/group/extractors/http-patterns/php.js +178 -0
- package/dist/core/group/extractors/http-patterns/python.d.ts +2 -0
- package/dist/core/group/extractors/http-patterns/python.js +308 -0
- package/dist/core/group/extractors/http-patterns/types.d.ts +61 -0
- package/dist/core/group/extractors/http-patterns/types.js +1 -0
- package/dist/core/group/extractors/http-route-extractor.d.ts +21 -0
- package/dist/core/group/extractors/http-route-extractor.js +430 -0
- package/dist/core/group/extractors/include-extractor.d.ts +39 -0
- package/dist/core/group/extractors/include-extractor.js +566 -0
- package/dist/core/group/extractors/java-workspace-extractor.d.ts +16 -0
- package/dist/core/group/extractors/java-workspace-extractor.js +204 -0
- package/dist/core/group/extractors/manifest-extractor.d.ts +54 -0
- package/dist/core/group/extractors/manifest-extractor.js +320 -0
- package/dist/core/group/extractors/node-workspace-extractor.d.ts +14 -0
- package/dist/core/group/extractors/node-workspace-extractor.js +207 -0
- package/dist/core/group/extractors/python-workspace-extractor.d.ts +15 -0
- package/dist/core/group/extractors/python-workspace-extractor.js +205 -0
- package/dist/core/group/extractors/rust-workspace-extractor.d.ts +44 -0
- package/dist/core/group/extractors/rust-workspace-extractor.js +240 -0
- package/dist/core/group/extractors/thrift-extractor.d.ts +22 -0
- package/dist/core/group/extractors/thrift-extractor.js +283 -0
- package/dist/core/group/extractors/thrift-patterns/index.d.ts +4 -0
- package/dist/core/group/extractors/thrift-patterns/index.js +10 -0
- package/dist/core/group/extractors/thrift-patterns/java.d.ts +2 -0
- package/dist/core/group/extractors/thrift-patterns/java.js +220 -0
- package/dist/core/group/extractors/thrift-patterns/types.d.ts +17 -0
- package/dist/core/group/extractors/thrift-patterns/types.js +1 -0
- package/dist/core/group/extractors/topic-extractor.d.ts +8 -0
- package/dist/core/group/extractors/topic-extractor.js +97 -0
- package/dist/core/group/extractors/topic-patterns/go.d.ts +2 -0
- package/dist/core/group/extractors/topic-patterns/go.js +120 -0
- package/dist/core/group/extractors/topic-patterns/index.d.ts +14 -0
- package/dist/core/group/extractors/topic-patterns/index.js +38 -0
- package/dist/core/group/extractors/topic-patterns/java.d.ts +2 -0
- package/dist/core/group/extractors/topic-patterns/java.js +80 -0
- package/dist/core/group/extractors/topic-patterns/node.d.ts +4 -0
- package/dist/core/group/extractors/topic-patterns/node.js +155 -0
- package/dist/core/group/extractors/topic-patterns/python.d.ts +2 -0
- package/dist/core/group/extractors/topic-patterns/python.js +116 -0
- package/dist/core/group/extractors/topic-patterns/types.d.ts +25 -0
- package/dist/core/group/extractors/topic-patterns/types.js +10 -0
- package/dist/core/group/extractors/tree-sitter-scanner.d.ts +113 -0
- package/dist/core/group/extractors/tree-sitter-scanner.js +95 -0
- package/dist/core/group/extractors/workspace-extractor.d.ts +13 -0
- package/dist/core/group/extractors/workspace-extractor.js +65 -0
- package/dist/core/group/group-path-utils.d.ts +17 -0
- package/dist/core/group/group-path-utils.js +40 -0
- package/dist/core/group/matching.d.ts +13 -0
- package/dist/core/group/matching.js +284 -0
- package/dist/core/group/normalization.d.ts +3 -0
- package/dist/core/group/normalization.js +115 -0
- package/dist/core/group/resolve-at-member.d.ts +10 -0
- package/dist/core/group/resolve-at-member.js +31 -0
- package/dist/core/group/service-boundary-detector.d.ts +8 -0
- package/dist/core/group/service-boundary-detector.js +155 -0
- package/dist/core/group/service.d.ts +56 -0
- package/dist/core/group/service.js +395 -0
- package/dist/core/group/storage.d.ts +9 -0
- package/dist/core/group/storage.js +157 -0
- package/dist/core/group/sync.d.ts +21 -0
- package/dist/core/group/sync.js +267 -0
- package/dist/core/group/types.d.ts +181 -0
- package/dist/core/group/types.js +1 -0
- package/dist/core/incremental/shadow-candidates.d.ts +44 -0
- package/dist/core/incremental/shadow-candidates.js +74 -0
- package/dist/core/incremental/subgraph-extract.d.ts +64 -0
- package/dist/core/incremental/subgraph-extract.js +111 -0
- package/dist/core/ingestion/ast-cache.d.ts +26 -0
- package/dist/core/ingestion/ast-cache.js +48 -0
- package/dist/core/ingestion/binding-accumulator.d.ts +212 -0
- package/dist/core/ingestion/binding-accumulator.js +336 -0
- package/dist/core/ingestion/call-extractors/configs/c-cpp.d.ts +3 -0
- package/dist/core/ingestion/call-extractors/configs/c-cpp.js +8 -0
- package/dist/core/ingestion/call-extractors/configs/csharp.d.ts +2 -0
- package/dist/core/ingestion/call-extractors/configs/csharp.js +6 -0
- package/dist/core/ingestion/call-extractors/configs/dart.d.ts +2 -0
- package/dist/core/ingestion/call-extractors/configs/dart.js +5 -0
- package/dist/core/ingestion/call-extractors/configs/go.d.ts +2 -0
- package/dist/core/ingestion/call-extractors/configs/go.js +5 -0
- package/dist/core/ingestion/call-extractors/configs/jvm.d.ts +3 -0
- package/dist/core/ingestion/call-extractors/configs/jvm.js +51 -0
- package/dist/core/ingestion/call-extractors/configs/php.d.ts +2 -0
- package/dist/core/ingestion/call-extractors/configs/php.js +5 -0
- package/dist/core/ingestion/call-extractors/configs/python.d.ts +2 -0
- package/dist/core/ingestion/call-extractors/configs/python.js +5 -0
- package/dist/core/ingestion/call-extractors/configs/ruby.d.ts +2 -0
- package/dist/core/ingestion/call-extractors/configs/ruby.js +5 -0
- package/dist/core/ingestion/call-extractors/configs/rust.d.ts +2 -0
- package/dist/core/ingestion/call-extractors/configs/rust.js +5 -0
- package/dist/core/ingestion/call-extractors/configs/swift.d.ts +2 -0
- package/dist/core/ingestion/call-extractors/configs/swift.js +5 -0
- package/dist/core/ingestion/call-extractors/configs/typescript-javascript.d.ts +3 -0
- package/dist/core/ingestion/call-extractors/configs/typescript-javascript.js +8 -0
- package/dist/core/ingestion/call-extractors/generic.d.ts +5 -0
- package/dist/core/ingestion/call-extractors/generic.js +59 -0
- package/dist/core/ingestion/call-processor.d.ts +235 -0
- package/dist/core/ingestion/call-processor.js +2754 -0
- package/dist/core/ingestion/call-routing.d.ts +55 -0
- package/dist/core/ingestion/call-routing.js +95 -0
- package/dist/core/ingestion/call-types.d.ts +135 -0
- package/dist/core/ingestion/call-types.js +2 -0
- package/dist/core/ingestion/class-extractors/configs/c-cpp.d.ts +3 -0
- package/dist/core/ingestion/class-extractors/configs/c-cpp.js +11 -0
- package/dist/core/ingestion/class-extractors/configs/csharp.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/configs/csharp.js +21 -0
- package/dist/core/ingestion/class-extractors/configs/dart.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/configs/dart.js +7 -0
- package/dist/core/ingestion/class-extractors/configs/go.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/configs/go.js +20 -0
- package/dist/core/ingestion/class-extractors/configs/jvm.d.ts +3 -0
- package/dist/core/ingestion/class-extractors/configs/jvm.js +35 -0
- package/dist/core/ingestion/class-extractors/configs/php.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/configs/php.js +7 -0
- package/dist/core/ingestion/class-extractors/configs/python.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/configs/python.js +7 -0
- package/dist/core/ingestion/class-extractors/configs/ruby.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/configs/ruby.js +7 -0
- package/dist/core/ingestion/class-extractors/configs/rust.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/configs/rust.js +7 -0
- package/dist/core/ingestion/class-extractors/configs/swift.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/configs/swift.js +18 -0
- package/dist/core/ingestion/class-extractors/configs/typescript-javascript.d.ts +4 -0
- package/dist/core/ingestion/class-extractors/configs/typescript-javascript.js +28 -0
- package/dist/core/ingestion/class-extractors/generic.d.ts +2 -0
- package/dist/core/ingestion/class-extractors/generic.js +135 -0
- package/dist/core/ingestion/class-types.d.ts +34 -0
- package/dist/core/ingestion/class-types.js +1 -0
- package/dist/core/ingestion/cluster-enricher.d.ts +38 -0
- package/dist/core/ingestion/cluster-enricher.js +169 -0
- package/dist/core/ingestion/cobol/cobol-copy-expander.d.ts +57 -0
- package/dist/core/ingestion/cobol/cobol-copy-expander.js +376 -0
- package/dist/core/ingestion/cobol/cobol-preprocessor.d.ts +212 -0
- package/dist/core/ingestion/cobol/cobol-preprocessor.js +1727 -0
- package/dist/core/ingestion/cobol/jcl-parser.d.ts +68 -0
- package/dist/core/ingestion/cobol/jcl-parser.js +217 -0
- package/dist/core/ingestion/cobol/jcl-processor.d.ts +33 -0
- package/dist/core/ingestion/cobol/jcl-processor.js +229 -0
- package/dist/core/ingestion/cobol-processor.d.ts +54 -0
- package/dist/core/ingestion/cobol-processor.js +1232 -0
- package/dist/core/ingestion/community-processor.d.ts +39 -0
- package/dist/core/ingestion/community-processor.js +336 -0
- package/dist/core/ingestion/constants.d.ts +17 -0
- package/dist/core/ingestion/constants.js +21 -0
- package/dist/core/ingestion/cpp-ue-preprocessor.d.ts +12 -0
- package/dist/core/ingestion/cpp-ue-preprocessor.js +260 -0
- package/dist/core/ingestion/emit-references.d.ts +88 -0
- package/dist/core/ingestion/emit-references.js +229 -0
- package/dist/core/ingestion/entry-point-scoring.d.ts +40 -0
- package/dist/core/ingestion/entry-point-scoring.js +196 -0
- package/dist/core/ingestion/export-detection.d.ts +57 -0
- package/dist/core/ingestion/export-detection.js +233 -0
- package/dist/core/ingestion/field-extractor.d.ts +29 -0
- package/dist/core/ingestion/field-extractor.js +25 -0
- package/dist/core/ingestion/field-extractors/configs/c-cpp.d.ts +3 -0
- package/dist/core/ingestion/field-extractors/configs/c-cpp.js +104 -0
- package/dist/core/ingestion/field-extractors/configs/csharp.d.ts +8 -0
- package/dist/core/ingestion/field-extractors/configs/csharp.js +121 -0
- package/dist/core/ingestion/field-extractors/configs/dart.d.ts +8 -0
- package/dist/core/ingestion/field-extractors/configs/dart.js +78 -0
- package/dist/core/ingestion/field-extractors/configs/go.d.ts +11 -0
- package/dist/core/ingestion/field-extractors/configs/go.js +60 -0
- package/dist/core/ingestion/field-extractors/configs/helpers.d.ts +53 -0
- package/dist/core/ingestion/field-extractors/configs/helpers.js +158 -0
- package/dist/core/ingestion/field-extractors/configs/jvm.d.ts +3 -0
- package/dist/core/ingestion/field-extractors/configs/jvm.js +118 -0
- package/dist/core/ingestion/field-extractors/configs/php.d.ts +8 -0
- package/dist/core/ingestion/field-extractors/configs/php.js +65 -0
- package/dist/core/ingestion/field-extractors/configs/python.d.ts +12 -0
- package/dist/core/ingestion/field-extractors/configs/python.js +91 -0
- package/dist/core/ingestion/field-extractors/configs/ruby.d.ts +16 -0
- package/dist/core/ingestion/field-extractors/configs/ruby.js +76 -0
- package/dist/core/ingestion/field-extractors/configs/rust.d.ts +9 -0
- package/dist/core/ingestion/field-extractors/configs/rust.js +52 -0
- package/dist/core/ingestion/field-extractors/configs/swift.d.ts +8 -0
- package/dist/core/ingestion/field-extractors/configs/swift.js +65 -0
- package/dist/core/ingestion/field-extractors/configs/typescript-javascript.d.ts +3 -0
- package/dist/core/ingestion/field-extractors/configs/typescript-javascript.js +56 -0
- package/dist/core/ingestion/field-extractors/generic.d.ts +49 -0
- package/dist/core/ingestion/field-extractors/generic.js +117 -0
- package/dist/core/ingestion/field-extractors/typescript.d.ts +77 -0
- package/dist/core/ingestion/field-extractors/typescript.js +291 -0
- package/dist/core/ingestion/field-types.d.ts +61 -0
- package/dist/core/ingestion/field-types.js +2 -0
- package/dist/core/ingestion/filesystem-walker.d.ts +28 -0
- package/dist/core/ingestion/filesystem-walker.js +92 -0
- package/dist/core/ingestion/finalize-orchestrator.d.ts +63 -0
- package/dist/core/ingestion/finalize-orchestrator.js +142 -0
- package/dist/core/ingestion/framework-detection.d.ts +30 -0
- package/dist/core/ingestion/framework-detection.js +428 -0
- package/dist/core/ingestion/heritage-extractors/configs/go.d.ts +13 -0
- package/dist/core/ingestion/heritage-extractors/configs/go.js +20 -0
- package/dist/core/ingestion/heritage-extractors/configs/ruby.d.ts +18 -0
- package/dist/core/ingestion/heritage-extractors/configs/ruby.js +65 -0
- package/dist/core/ingestion/heritage-extractors/generic.d.ts +23 -0
- package/dist/core/ingestion/heritage-extractors/generic.js +47 -0
- package/dist/core/ingestion/heritage-processor.d.ts +54 -0
- package/dist/core/ingestion/heritage-processor.js +367 -0
- package/dist/core/ingestion/heritage-types.d.ts +73 -0
- package/dist/core/ingestion/heritage-types.js +2 -0
- package/dist/core/ingestion/import-processor.d.ts +23 -0
- package/dist/core/ingestion/import-processor.js +377 -0
- package/dist/core/ingestion/import-resolvers/configs/c-cpp.d.ts +7 -0
- package/dist/core/ingestion/import-resolvers/configs/c-cpp.js +14 -0
- package/dist/core/ingestion/import-resolvers/configs/csharp.d.ts +8 -0
- package/dist/core/ingestion/import-resolvers/configs/csharp.js +27 -0
- package/dist/core/ingestion/import-resolvers/configs/dart.d.ts +17 -0
- package/dist/core/ingestion/import-resolvers/configs/dart.js +54 -0
- package/dist/core/ingestion/import-resolvers/configs/go.d.ts +8 -0
- package/dist/core/ingestion/import-resolvers/configs/go.js +26 -0
- package/dist/core/ingestion/import-resolvers/configs/jvm.d.ts +13 -0
- package/dist/core/ingestion/import-resolvers/configs/jvm.js +68 -0
- package/dist/core/ingestion/import-resolvers/configs/php.d.ts +8 -0
- package/dist/core/ingestion/import-resolvers/configs/php.js +15 -0
- package/dist/core/ingestion/import-resolvers/configs/python.d.ts +12 -0
- package/dist/core/ingestion/import-resolvers/configs/python.js +41 -0
- package/dist/core/ingestion/import-resolvers/configs/ruby.d.ts +8 -0
- package/dist/core/ingestion/import-resolvers/configs/ruby.js +16 -0
- package/dist/core/ingestion/import-resolvers/configs/rust.d.ts +8 -0
- package/dist/core/ingestion/import-resolvers/configs/rust.js +54 -0
- package/dist/core/ingestion/import-resolvers/configs/swift.d.ts +8 -0
- package/dist/core/ingestion/import-resolvers/configs/swift.js +29 -0
- package/dist/core/ingestion/import-resolvers/configs/typescript-javascript.d.ts +9 -0
- package/dist/core/ingestion/import-resolvers/configs/typescript-javascript.js +23 -0
- package/dist/core/ingestion/import-resolvers/csharp.d.ts +18 -0
- package/dist/core/ingestion/import-resolvers/csharp.js +115 -0
- package/dist/core/ingestion/import-resolvers/go.d.ts +17 -0
- package/dist/core/ingestion/import-resolvers/go.js +46 -0
- package/dist/core/ingestion/import-resolvers/jvm.d.ts +27 -0
- package/dist/core/ingestion/import-resolvers/jvm.js +106 -0
- package/dist/core/ingestion/import-resolvers/php.d.ts +24 -0
- package/dist/core/ingestion/import-resolvers/php.js +77 -0
- package/dist/core/ingestion/import-resolvers/python.d.ts +22 -0
- package/dist/core/ingestion/import-resolvers/python.js +72 -0
- package/dist/core/ingestion/import-resolvers/resolver-factory.d.ts +24 -0
- package/dist/core/ingestion/import-resolvers/resolver-factory.js +33 -0
- package/dist/core/ingestion/import-resolvers/ruby.d.ts +14 -0
- package/dist/core/ingestion/import-resolvers/ruby.js +17 -0
- package/dist/core/ingestion/import-resolvers/rust.d.ts +17 -0
- package/dist/core/ingestion/import-resolvers/rust.js +75 -0
- package/dist/core/ingestion/import-resolvers/standard.d.ts +35 -0
- package/dist/core/ingestion/import-resolvers/standard.js +168 -0
- package/dist/core/ingestion/import-resolvers/types.d.ts +68 -0
- package/dist/core/ingestion/import-resolvers/types.js +6 -0
- package/dist/core/ingestion/import-resolvers/utils.d.ts +35 -0
- package/dist/core/ingestion/import-resolvers/utils.js +153 -0
- package/dist/core/ingestion/import-target-adapter.d.ts +73 -0
- package/dist/core/ingestion/import-target-adapter.js +95 -0
- package/dist/core/ingestion/language-config.d.ts +52 -0
- package/dist/core/ingestion/language-config.js +182 -0
- package/dist/core/ingestion/language-provider.d.ts +465 -0
- package/dist/core/ingestion/language-provider.js +24 -0
- package/dist/core/ingestion/languages/c/arity-metadata.d.ts +14 -0
- package/dist/core/ingestion/languages/c/arity-metadata.js +94 -0
- package/dist/core/ingestion/languages/c/arity.d.ts +6 -0
- package/dist/core/ingestion/languages/c/arity.js +18 -0
- package/dist/core/ingestion/languages/c/captures.d.ts +2 -0
- package/dist/core/ingestion/languages/c/captures.js +105 -0
- package/dist/core/ingestion/languages/c/header-scan.d.ts +7 -0
- package/dist/core/ingestion/languages/c/header-scan.js +55 -0
- package/dist/core/ingestion/languages/c/import-decomposer.d.ts +8 -0
- package/dist/core/ingestion/languages/c/import-decomposer.js +50 -0
- package/dist/core/ingestion/languages/c/import-target.d.ts +14 -0
- package/dist/core/ingestion/languages/c/import-target.js +57 -0
- package/dist/core/ingestion/languages/c/index.d.ts +11 -0
- package/dist/core/ingestion/languages/c/index.js +11 -0
- package/dist/core/ingestion/languages/c/interpret.d.ts +14 -0
- package/dist/core/ingestion/languages/c/interpret.js +48 -0
- package/dist/core/ingestion/languages/c/merge-bindings.d.ts +7 -0
- package/dist/core/ingestion/languages/c/merge-bindings.js +23 -0
- package/dist/core/ingestion/languages/c/query.d.ts +3 -0
- package/dist/core/ingestion/languages/c/query.js +161 -0
- package/dist/core/ingestion/languages/c/scope-resolver.d.ts +13 -0
- package/dist/core/ingestion/languages/c/scope-resolver.js +60 -0
- package/dist/core/ingestion/languages/c/simple-hooks.d.ts +14 -0
- package/dist/core/ingestion/languages/c/simple-hooks.js +19 -0
- package/dist/core/ingestion/languages/c/static-linkage.d.ts +13 -0
- package/dist/core/ingestion/languages/c/static-linkage.js +57 -0
- package/dist/core/ingestion/languages/c-cpp.d.ts +12 -0
- package/dist/core/ingestion/languages/c-cpp.js +411 -0
- package/dist/core/ingestion/languages/cobol.d.ts +1 -0
- package/dist/core/ingestion/languages/cobol.js +28 -0
- package/dist/core/ingestion/languages/csharp/accessor-unwrap.d.ts +21 -0
- package/dist/core/ingestion/languages/csharp/accessor-unwrap.js +56 -0
- package/dist/core/ingestion/languages/csharp/arity-metadata.d.ts +26 -0
- package/dist/core/ingestion/languages/csharp/arity-metadata.js +46 -0
- package/dist/core/ingestion/languages/csharp/arity.d.ts +23 -0
- package/dist/core/ingestion/languages/csharp/arity.js +37 -0
- package/dist/core/ingestion/languages/csharp/cache-stats.d.ts +15 -0
- package/dist/core/ingestion/languages/csharp/cache-stats.js +26 -0
- package/dist/core/ingestion/languages/csharp/captures.d.ts +19 -0
- package/dist/core/ingestion/languages/csharp/captures.js +346 -0
- package/dist/core/ingestion/languages/csharp/import-decomposer.d.ts +19 -0
- package/dist/core/ingestion/languages/csharp/import-decomposer.js +93 -0
- package/dist/core/ingestion/languages/csharp/import-target.d.ts +25 -0
- package/dist/core/ingestion/languages/csharp/import-target.js +123 -0
- package/dist/core/ingestion/languages/csharp/index.d.ts +82 -0
- package/dist/core/ingestion/languages/csharp/index.js +82 -0
- package/dist/core/ingestion/languages/csharp/interpret.d.ts +15 -0
- package/dist/core/ingestion/languages/csharp/interpret.js +132 -0
- package/dist/core/ingestion/languages/csharp/merge-bindings.d.ts +27 -0
- package/dist/core/ingestion/languages/csharp/merge-bindings.js +55 -0
- package/dist/core/ingestion/languages/csharp/namespace-siblings.d.ts +51 -0
- package/dist/core/ingestion/languages/csharp/namespace-siblings.js +387 -0
- package/dist/core/ingestion/languages/csharp/query.d.ts +35 -0
- package/dist/core/ingestion/languages/csharp/query.js +521 -0
- package/dist/core/ingestion/languages/csharp/receiver-binding.d.ts +31 -0
- package/dist/core/ingestion/languages/csharp/receiver-binding.js +135 -0
- package/dist/core/ingestion/languages/csharp/scope-resolver.d.ts +10 -0
- package/dist/core/ingestion/languages/csharp/scope-resolver.js +63 -0
- package/dist/core/ingestion/languages/csharp/simple-hooks.d.ts +53 -0
- package/dist/core/ingestion/languages/csharp/simple-hooks.js +76 -0
- package/dist/core/ingestion/languages/csharp.d.ts +8 -0
- package/dist/core/ingestion/languages/csharp.js +201 -0
- package/dist/core/ingestion/languages/dart.d.ts +12 -0
- package/dist/core/ingestion/languages/dart.js +138 -0
- package/dist/core/ingestion/languages/go/arity-metadata.d.ts +8 -0
- package/dist/core/ingestion/languages/go/arity-metadata.js +37 -0
- package/dist/core/ingestion/languages/go/arity.d.ts +2 -0
- package/dist/core/ingestion/languages/go/arity.js +14 -0
- package/dist/core/ingestion/languages/go/cache-stats.d.ts +7 -0
- package/dist/core/ingestion/languages/go/cache-stats.js +15 -0
- package/dist/core/ingestion/languages/go/captures.d.ts +2 -0
- package/dist/core/ingestion/languages/go/captures.js +129 -0
- package/dist/core/ingestion/languages/go/expand-wildcards.d.ts +15 -0
- package/dist/core/ingestion/languages/go/expand-wildcards.js +93 -0
- package/dist/core/ingestion/languages/go/import-decomposer.d.ts +3 -0
- package/dist/core/ingestion/languages/go/import-decomposer.js +44 -0
- package/dist/core/ingestion/languages/go/import-target.d.ts +21 -0
- package/dist/core/ingestion/languages/go/import-target.js +67 -0
- package/dist/core/ingestion/languages/go/index.d.ts +17 -0
- package/dist/core/ingestion/languages/go/index.js +17 -0
- package/dist/core/ingestion/languages/go/interface-impls.d.ts +4 -0
- package/dist/core/ingestion/languages/go/interface-impls.js +72 -0
- package/dist/core/ingestion/languages/go/interpret.d.ts +11 -0
- package/dist/core/ingestion/languages/go/interpret.js +146 -0
- package/dist/core/ingestion/languages/go/merge-bindings.d.ts +2 -0
- package/dist/core/ingestion/languages/go/merge-bindings.js +18 -0
- package/dist/core/ingestion/languages/go/method-owners.d.ts +17 -0
- package/dist/core/ingestion/languages/go/method-owners.js +96 -0
- package/dist/core/ingestion/languages/go/namespace-mirror.d.ts +15 -0
- package/dist/core/ingestion/languages/go/namespace-mirror.js +53 -0
- package/dist/core/ingestion/languages/go/package-siblings.d.ts +11 -0
- package/dist/core/ingestion/languages/go/package-siblings.js +84 -0
- package/dist/core/ingestion/languages/go/query.d.ts +3 -0
- package/dist/core/ingestion/languages/go/query.js +207 -0
- package/dist/core/ingestion/languages/go/range-binding.d.ts +8 -0
- package/dist/core/ingestion/languages/go/range-binding.js +109 -0
- package/dist/core/ingestion/languages/go/receiver-binding.d.ts +3 -0
- package/dist/core/ingestion/languages/go/receiver-binding.js +21 -0
- package/dist/core/ingestion/languages/go/scope-resolver.d.ts +2 -0
- package/dist/core/ingestion/languages/go/scope-resolver.js +33 -0
- package/dist/core/ingestion/languages/go/simple-hooks.d.ts +4 -0
- package/dist/core/ingestion/languages/go/simple-hooks.js +21 -0
- package/dist/core/ingestion/languages/go/type-binding.d.ts +3 -0
- package/dist/core/ingestion/languages/go/type-binding.js +237 -0
- package/dist/core/ingestion/languages/go.d.ts +11 -0
- package/dist/core/ingestion/languages/go.js +94 -0
- package/dist/core/ingestion/languages/index.d.ts +39 -0
- package/dist/core/ingestion/languages/index.js +64 -0
- package/dist/core/ingestion/languages/java/arity-metadata.d.ts +18 -0
- package/dist/core/ingestion/languages/java/arity-metadata.js +40 -0
- package/dist/core/ingestion/languages/java/arity.d.ts +10 -0
- package/dist/core/ingestion/languages/java/arity.js +24 -0
- package/dist/core/ingestion/languages/java/cache-stats.d.ts +15 -0
- package/dist/core/ingestion/languages/java/cache-stats.js +26 -0
- package/dist/core/ingestion/languages/java/captures.d.ts +17 -0
- package/dist/core/ingestion/languages/java/captures.js +187 -0
- package/dist/core/ingestion/languages/java/import-decomposer.d.ts +18 -0
- package/dist/core/ingestion/languages/java/import-decomposer.js +85 -0
- package/dist/core/ingestion/languages/java/import-target.d.ts +17 -0
- package/dist/core/ingestion/languages/java/import-target.js +100 -0
- package/dist/core/ingestion/languages/java/index.d.ts +29 -0
- package/dist/core/ingestion/languages/java/index.js +29 -0
- package/dist/core/ingestion/languages/java/interpret.d.ts +13 -0
- package/dist/core/ingestion/languages/java/interpret.js +131 -0
- package/dist/core/ingestion/languages/java/merge-bindings.d.ts +12 -0
- package/dist/core/ingestion/languages/java/merge-bindings.js +40 -0
- package/dist/core/ingestion/languages/java/query.d.ts +30 -0
- package/dist/core/ingestion/languages/java/query.js +192 -0
- package/dist/core/ingestion/languages/java/receiver-binding.d.ts +11 -0
- package/dist/core/ingestion/languages/java/receiver-binding.js +95 -0
- package/dist/core/ingestion/languages/java/scope-resolver.d.ts +50 -0
- package/dist/core/ingestion/languages/java/scope-resolver.js +74 -0
- package/dist/core/ingestion/languages/java/simple-hooks.d.ts +13 -0
- package/dist/core/ingestion/languages/java/simple-hooks.js +34 -0
- package/dist/core/ingestion/languages/java.d.ts +9 -0
- package/dist/core/ingestion/languages/java.js +76 -0
- package/dist/core/ingestion/languages/kotlin.d.ts +9 -0
- package/dist/core/ingestion/languages/kotlin.js +164 -0
- package/dist/core/ingestion/languages/php/arity-metadata.d.ts +28 -0
- package/dist/core/ingestion/languages/php/arity-metadata.js +63 -0
- package/dist/core/ingestion/languages/php/arity.d.ts +25 -0
- package/dist/core/ingestion/languages/php/arity.js +40 -0
- package/dist/core/ingestion/languages/php/cache-stats.d.ts +15 -0
- package/dist/core/ingestion/languages/php/cache-stats.js +26 -0
- package/dist/core/ingestion/languages/php/captures.d.ts +34 -0
- package/dist/core/ingestion/languages/php/captures.js +739 -0
- package/dist/core/ingestion/languages/php/import-decomposer.d.ts +28 -0
- package/dist/core/ingestion/languages/php/import-decomposer.js +265 -0
- package/dist/core/ingestion/languages/php/import-target.d.ts +47 -0
- package/dist/core/ingestion/languages/php/import-target.js +100 -0
- package/dist/core/ingestion/languages/php/index.d.ts +68 -0
- package/dist/core/ingestion/languages/php/index.js +72 -0
- package/dist/core/ingestion/languages/php/interpret.d.ts +36 -0
- package/dist/core/ingestion/languages/php/interpret.js +241 -0
- package/dist/core/ingestion/languages/php/merge-bindings.d.ts +19 -0
- package/dist/core/ingestion/languages/php/merge-bindings.js +47 -0
- package/dist/core/ingestion/languages/php/namespace-siblings.d.ts +51 -0
- package/dist/core/ingestion/languages/php/namespace-siblings.js +288 -0
- package/dist/core/ingestion/languages/php/query.d.ts +32 -0
- package/dist/core/ingestion/languages/php/query.js +326 -0
- package/dist/core/ingestion/languages/php/receiver-binding.d.ts +36 -0
- package/dist/core/ingestion/languages/php/receiver-binding.js +128 -0
- package/dist/core/ingestion/languages/php/scope-resolver.d.ts +23 -0
- package/dist/core/ingestion/languages/php/scope-resolver.js +358 -0
- package/dist/core/ingestion/languages/php/simple-hooks.d.ts +42 -0
- package/dist/core/ingestion/languages/php/simple-hooks.js +111 -0
- package/dist/core/ingestion/languages/php.d.ts +1 -0
- package/dist/core/ingestion/languages/php.js +290 -0
- package/dist/core/ingestion/languages/python/arity-metadata.d.ts +24 -0
- package/dist/core/ingestion/languages/python/arity-metadata.js +45 -0
- package/dist/core/ingestion/languages/python/arity.d.ts +22 -0
- package/dist/core/ingestion/languages/python/arity.js +38 -0
- package/dist/core/ingestion/languages/python/cache-stats.d.ts +17 -0
- package/dist/core/ingestion/languages/python/cache-stats.js +28 -0
- package/dist/core/ingestion/languages/python/captures.d.ts +19 -0
- package/dist/core/ingestion/languages/python/captures.js +130 -0
- package/dist/core/ingestion/languages/python/import-decomposer.d.ts +15 -0
- package/dist/core/ingestion/languages/python/import-decomposer.js +112 -0
- package/dist/core/ingestion/languages/python/import-target.d.ts +21 -0
- package/dist/core/ingestion/languages/python/import-target.js +195 -0
- package/dist/core/ingestion/languages/python/index.d.ts +80 -0
- package/dist/core/ingestion/languages/python/index.js +80 -0
- package/dist/core/ingestion/languages/python/interpret.d.ts +15 -0
- package/dist/core/ingestion/languages/python/interpret.js +191 -0
- package/dist/core/ingestion/languages/python/merge-bindings.d.ts +16 -0
- package/dist/core/ingestion/languages/python/merge-bindings.js +44 -0
- package/dist/core/ingestion/languages/python/query.d.ts +9 -0
- package/dist/core/ingestion/languages/python/query.js +267 -0
- package/dist/core/ingestion/languages/python/receiver-binding.d.ts +21 -0
- package/dist/core/ingestion/languages/python/receiver-binding.js +116 -0
- package/dist/core/ingestion/languages/python/scope-resolver.d.ts +16 -0
- package/dist/core/ingestion/languages/python/scope-resolver.js +53 -0
- package/dist/core/ingestion/languages/python/simple-hooks.d.ts +25 -0
- package/dist/core/ingestion/languages/python/simple-hooks.js +43 -0
- package/dist/core/ingestion/languages/python.d.ts +12 -0
- package/dist/core/ingestion/languages/python.js +133 -0
- package/dist/core/ingestion/languages/ruby.d.ts +9 -0
- package/dist/core/ingestion/languages/ruby.js +235 -0
- package/dist/core/ingestion/languages/rust.d.ts +12 -0
- package/dist/core/ingestion/languages/rust.js +167 -0
- package/dist/core/ingestion/languages/swift.d.ts +12 -0
- package/dist/core/ingestion/languages/swift.js +312 -0
- package/dist/core/ingestion/languages/typescript/arity-metadata.d.ts +59 -0
- package/dist/core/ingestion/languages/typescript/arity-metadata.js +103 -0
- package/dist/core/ingestion/languages/typescript/arity.d.ts +37 -0
- package/dist/core/ingestion/languages/typescript/arity.js +54 -0
- package/dist/core/ingestion/languages/typescript/cache-stats.d.ts +17 -0
- package/dist/core/ingestion/languages/typescript/cache-stats.js +28 -0
- package/dist/core/ingestion/languages/typescript/captures.d.ts +28 -0
- package/dist/core/ingestion/languages/typescript/captures.js +474 -0
- package/dist/core/ingestion/languages/typescript/import-decomposer.d.ts +49 -0
- package/dist/core/ingestion/languages/typescript/import-decomposer.js +371 -0
- package/dist/core/ingestion/languages/typescript/import-target.d.ts +50 -0
- package/dist/core/ingestion/languages/typescript/import-target.js +61 -0
- package/dist/core/ingestion/languages/typescript/index.d.ts +94 -0
- package/dist/core/ingestion/languages/typescript/index.js +94 -0
- package/dist/core/ingestion/languages/typescript/interpret.d.ts +35 -0
- package/dist/core/ingestion/languages/typescript/interpret.js +317 -0
- package/dist/core/ingestion/languages/typescript/merge-bindings.d.ts +62 -0
- package/dist/core/ingestion/languages/typescript/merge-bindings.js +158 -0
- package/dist/core/ingestion/languages/typescript/query.d.ts +84 -0
- package/dist/core/ingestion/languages/typescript/query.js +978 -0
- package/dist/core/ingestion/languages/typescript/receiver-binding.d.ts +59 -0
- package/dist/core/ingestion/languages/typescript/receiver-binding.js +171 -0
- package/dist/core/ingestion/languages/typescript/scope-resolver.d.ts +16 -0
- package/dist/core/ingestion/languages/typescript/scope-resolver.js +113 -0
- package/dist/core/ingestion/languages/typescript/simple-hooks.d.ts +71 -0
- package/dist/core/ingestion/languages/typescript/simple-hooks.js +131 -0
- package/dist/core/ingestion/languages/typescript.d.ts +11 -0
- package/dist/core/ingestion/languages/typescript.js +324 -0
- package/dist/core/ingestion/languages/vue.d.ts +13 -0
- package/dist/core/ingestion/languages/vue.js +79 -0
- package/dist/core/ingestion/markdown-processor.d.ts +17 -0
- package/dist/core/ingestion/markdown-processor.js +124 -0
- package/dist/core/ingestion/method-extractors/configs/c-cpp.d.ts +3 -0
- package/dist/core/ingestion/method-extractors/configs/c-cpp.js +387 -0
- package/dist/core/ingestion/method-extractors/configs/csharp.d.ts +2 -0
- package/dist/core/ingestion/method-extractors/configs/csharp.js +287 -0
- package/dist/core/ingestion/method-extractors/configs/dart.d.ts +2 -0
- package/dist/core/ingestion/method-extractors/configs/dart.js +376 -0
- package/dist/core/ingestion/method-extractors/configs/go.d.ts +2 -0
- package/dist/core/ingestion/method-extractors/configs/go.js +176 -0
- package/dist/core/ingestion/method-extractors/configs/jvm.d.ts +3 -0
- package/dist/core/ingestion/method-extractors/configs/jvm.js +336 -0
- package/dist/core/ingestion/method-extractors/configs/php.d.ts +2 -0
- package/dist/core/ingestion/method-extractors/configs/php.js +304 -0
- package/dist/core/ingestion/method-extractors/configs/python.d.ts +2 -0
- package/dist/core/ingestion/method-extractors/configs/python.js +309 -0
- package/dist/core/ingestion/method-extractors/configs/ruby.d.ts +2 -0
- package/dist/core/ingestion/method-extractors/configs/ruby.js +286 -0
- package/dist/core/ingestion/method-extractors/configs/rust.d.ts +2 -0
- package/dist/core/ingestion/method-extractors/configs/rust.js +195 -0
- package/dist/core/ingestion/method-extractors/configs/swift.d.ts +2 -0
- package/dist/core/ingestion/method-extractors/configs/swift.js +276 -0
- package/dist/core/ingestion/method-extractors/configs/typescript-javascript.d.ts +3 -0
- package/dist/core/ingestion/method-extractors/configs/typescript-javascript.js +338 -0
- package/dist/core/ingestion/method-extractors/generic.d.ts +11 -0
- package/dist/core/ingestion/method-extractors/generic.js +205 -0
- package/dist/core/ingestion/method-types.d.ts +90 -0
- package/dist/core/ingestion/method-types.js +2 -0
- package/dist/core/ingestion/model/field-registry.d.ts +18 -0
- package/dist/core/ingestion/model/field-registry.js +22 -0
- package/dist/core/ingestion/model/heritage-map.d.ts +105 -0
- package/dist/core/ingestion/model/heritage-map.js +260 -0
- package/dist/core/ingestion/model/index.d.ts +20 -0
- package/dist/core/ingestion/model/index.js +43 -0
- package/dist/core/ingestion/model/method-registry.d.ts +71 -0
- package/dist/core/ingestion/model/method-registry.js +134 -0
- package/dist/core/ingestion/model/registration-table.d.ts +138 -0
- package/dist/core/ingestion/model/registration-table.js +224 -0
- package/dist/core/ingestion/model/resolution-context.d.ts +93 -0
- package/dist/core/ingestion/model/resolution-context.js +337 -0
- package/dist/core/ingestion/model/resolve.d.ts +61 -0
- package/dist/core/ingestion/model/resolve.js +401 -0
- package/dist/core/ingestion/model/scope-resolution-indexes.d.ts +72 -0
- package/dist/core/ingestion/model/scope-resolution-indexes.js +42 -0
- package/dist/core/ingestion/model/semantic-model.d.ts +150 -0
- package/dist/core/ingestion/model/semantic-model.js +175 -0
- package/dist/core/ingestion/model/symbol-table.d.ts +200 -0
- package/dist/core/ingestion/model/symbol-table.js +206 -0
- package/dist/core/ingestion/model/type-registry.d.ts +39 -0
- package/dist/core/ingestion/model/type-registry.js +62 -0
- package/dist/core/ingestion/mro-processor.d.ts +46 -0
- package/dist/core/ingestion/mro-processor.js +597 -0
- package/dist/core/ingestion/named-bindings/csharp.d.ts +3 -0
- package/dist/core/ingestion/named-bindings/csharp.js +37 -0
- package/dist/core/ingestion/named-bindings/java.d.ts +3 -0
- package/dist/core/ingestion/named-bindings/java.js +29 -0
- package/dist/core/ingestion/named-bindings/kotlin.d.ts +3 -0
- package/dist/core/ingestion/named-bindings/kotlin.js +36 -0
- package/dist/core/ingestion/named-bindings/php.d.ts +3 -0
- package/dist/core/ingestion/named-bindings/php.js +61 -0
- package/dist/core/ingestion/named-bindings/python.d.ts +3 -0
- package/dist/core/ingestion/named-bindings/python.js +49 -0
- package/dist/core/ingestion/named-bindings/rust.d.ts +3 -0
- package/dist/core/ingestion/named-bindings/rust.js +66 -0
- package/dist/core/ingestion/named-bindings/types.d.ts +16 -0
- package/dist/core/ingestion/named-bindings/types.js +6 -0
- package/dist/core/ingestion/named-bindings/typescript.d.ts +3 -0
- package/dist/core/ingestion/named-bindings/typescript.js +58 -0
- package/dist/core/ingestion/parsing-processor.d.ts +60 -0
- package/dist/core/ingestion/parsing-processor.js +627 -0
- package/dist/core/ingestion/pipeline-phases/cobol.d.ts +16 -0
- package/dist/core/ingestion/pipeline-phases/cobol.js +46 -0
- package/dist/core/ingestion/pipeline-phases/communities.d.ts +16 -0
- package/dist/core/ingestion/pipeline-phases/communities.js +63 -0
- package/dist/core/ingestion/pipeline-phases/cross-file-impl.d.ts +17 -0
- package/dist/core/ingestion/pipeline-phases/cross-file-impl.js +157 -0
- package/dist/core/ingestion/pipeline-phases/cross-file.d.ts +37 -0
- package/dist/core/ingestion/pipeline-phases/cross-file.js +64 -0
- package/dist/core/ingestion/pipeline-phases/index.d.ts +22 -0
- package/dist/core/ingestion/pipeline-phases/index.js +23 -0
- package/dist/core/ingestion/pipeline-phases/markdown.d.ts +17 -0
- package/dist/core/ingestion/pipeline-phases/markdown.js +34 -0
- package/dist/core/ingestion/pipeline-phases/mro.d.ts +18 -0
- package/dist/core/ingestion/pipeline-phases/mro.js +37 -0
- package/dist/core/ingestion/pipeline-phases/orm-extraction.d.ts +22 -0
- package/dist/core/ingestion/pipeline-phases/orm-extraction.js +92 -0
- package/dist/core/ingestion/pipeline-phases/orm.d.ts +15 -0
- package/dist/core/ingestion/pipeline-phases/orm.js +75 -0
- package/dist/core/ingestion/pipeline-phases/parse-impl.d.ts +63 -0
- package/dist/core/ingestion/pipeline-phases/parse-impl.js +567 -0
- package/dist/core/ingestion/pipeline-phases/parse.d.ts +88 -0
- package/dist/core/ingestion/pipeline-phases/parse.js +33 -0
- package/dist/core/ingestion/pipeline-phases/processes.d.ts +16 -0
- package/dist/core/ingestion/pipeline-phases/processes.js +149 -0
- package/dist/core/ingestion/pipeline-phases/routes.d.ts +21 -0
- package/dist/core/ingestion/pipeline-phases/routes.js +244 -0
- package/dist/core/ingestion/pipeline-phases/runner.d.ts +22 -0
- package/dist/core/ingestion/pipeline-phases/runner.js +204 -0
- package/dist/core/ingestion/pipeline-phases/scan.d.ts +21 -0
- package/dist/core/ingestion/pipeline-phases/scan.js +46 -0
- package/dist/core/ingestion/pipeline-phases/structure.d.ts +27 -0
- package/dist/core/ingestion/pipeline-phases/structure.js +35 -0
- package/dist/core/ingestion/pipeline-phases/tools.d.ts +21 -0
- package/dist/core/ingestion/pipeline-phases/tools.js +86 -0
- package/dist/core/ingestion/pipeline-phases/types.d.ts +79 -0
- package/dist/core/ingestion/pipeline-phases/types.js +37 -0
- package/dist/core/ingestion/pipeline-phases/wildcard-synthesis.d.ts +70 -0
- package/dist/core/ingestion/pipeline-phases/wildcard-synthesis.js +312 -0
- package/dist/core/ingestion/pipeline.d.ts +49 -0
- package/dist/core/ingestion/pipeline.js +89 -0
- package/dist/core/ingestion/process-processor.d.ts +51 -0
- package/dist/core/ingestion/process-processor.js +318 -0
- package/dist/core/ingestion/registry-primary-flag.d.ts +88 -0
- package/dist/core/ingestion/registry-primary-flag.js +117 -0
- package/dist/core/ingestion/resolve-references.d.ts +63 -0
- package/dist/core/ingestion/resolve-references.js +175 -0
- package/dist/core/ingestion/route-extractors/expo.d.ts +1 -0
- package/dist/core/ingestion/route-extractors/expo.js +36 -0
- package/dist/core/ingestion/route-extractors/middleware.d.ts +47 -0
- package/dist/core/ingestion/route-extractors/middleware.js +167 -0
- package/dist/core/ingestion/route-extractors/nextjs.d.ts +3 -0
- package/dist/core/ingestion/route-extractors/nextjs.js +76 -0
- package/dist/core/ingestion/route-extractors/php.d.ts +7 -0
- package/dist/core/ingestion/route-extractors/php.js +22 -0
- package/dist/core/ingestion/route-extractors/response-shapes.d.ts +20 -0
- package/dist/core/ingestion/route-extractors/response-shapes.js +294 -0
- package/dist/core/ingestion/scope-extractor-bridge.d.ts +35 -0
- package/dist/core/ingestion/scope-extractor-bridge.js +49 -0
- package/dist/core/ingestion/scope-extractor.d.ts +86 -0
- package/dist/core/ingestion/scope-extractor.js +772 -0
- package/dist/core/ingestion/scope-resolution/contract/scope-resolver.d.ts +558 -0
- package/dist/core/ingestion/scope-resolution/contract/scope-resolver.js +250 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.d.ts +43 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/edges.js +79 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/ids.d.ts +57 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/ids.js +142 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/imports-to-edges.d.ts +17 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/imports-to-edges.js +46 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/method-dispatch.d.ts +19 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/method-dispatch.js +40 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/node-lookup.d.ts +37 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/node-lookup.js +118 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.d.ts +38 -0
- package/dist/core/ingestion/scope-resolution/graph-bridge/references-to-edges.js +73 -0
- package/dist/core/ingestion/scope-resolution/passes/compound-receiver.d.ts +42 -0
- package/dist/core/ingestion/scope-resolution/passes/compound-receiver.js +467 -0
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.d.ts +53 -0
- package/dist/core/ingestion/scope-resolution/passes/free-call-fallback.js +251 -0
- package/dist/core/ingestion/scope-resolution/passes/imported-return-types.d.ts +75 -0
- package/dist/core/ingestion/scope-resolution/passes/imported-return-types.js +202 -0
- package/dist/core/ingestion/scope-resolution/passes/mro.d.ts +42 -0
- package/dist/core/ingestion/scope-resolution/passes/mro.js +102 -0
- package/dist/core/ingestion/scope-resolution/passes/overload-narrowing.d.ts +30 -0
- package/dist/core/ingestion/scope-resolution/passes/overload-narrowing.js +81 -0
- package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.d.ts +46 -0
- package/dist/core/ingestion/scope-resolution/passes/receiver-bound-calls.js +377 -0
- package/dist/core/ingestion/scope-resolution/pipeline/phase.d.ts +47 -0
- package/dist/core/ingestion/scope-resolution/pipeline/phase.js +152 -0
- package/dist/core/ingestion/scope-resolution/pipeline/reconcile-ownership.d.ts +68 -0
- package/dist/core/ingestion/scope-resolution/pipeline/reconcile-ownership.js +125 -0
- package/dist/core/ingestion/scope-resolution/pipeline/registry.d.ts +17 -0
- package/dist/core/ingestion/scope-resolution/pipeline/registry.js +31 -0
- package/dist/core/ingestion/scope-resolution/pipeline/run.d.ts +91 -0
- package/dist/core/ingestion/scope-resolution/pipeline/run.js +218 -0
- package/dist/core/ingestion/scope-resolution/pipeline/validate-bindings-immutability.d.ts +39 -0
- package/dist/core/ingestion/scope-resolution/pipeline/validate-bindings-immutability.js +65 -0
- package/dist/core/ingestion/scope-resolution/scope/namespace-targets.d.ts +36 -0
- package/dist/core/ingestion/scope-resolution/scope/namespace-targets.js +58 -0
- package/dist/core/ingestion/scope-resolution/scope/walkers.d.ts +170 -0
- package/dist/core/ingestion/scope-resolution/scope/walkers.js +447 -0
- package/dist/core/ingestion/scope-resolution/workspace-index.d.ts +52 -0
- package/dist/core/ingestion/scope-resolution/workspace-index.js +61 -0
- package/dist/core/ingestion/shadow-harness.d.ts +113 -0
- package/dist/core/ingestion/shadow-harness.js +148 -0
- package/dist/core/ingestion/structure-processor.d.ts +2 -0
- package/dist/core/ingestion/structure-processor.js +36 -0
- package/dist/core/ingestion/tree-sitter-queries.d.ts +16 -0
- package/dist/core/ingestion/tree-sitter-queries.js +1497 -0
- package/dist/core/ingestion/type-env.d.ts +86 -0
- package/dist/core/ingestion/type-env.js +1129 -0
- package/dist/core/ingestion/type-extractors/c-cpp.d.ts +7 -0
- package/dist/core/ingestion/type-extractors/c-cpp.js +532 -0
- package/dist/core/ingestion/type-extractors/csharp.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/csharp.js +583 -0
- package/dist/core/ingestion/type-extractors/dart.d.ts +15 -0
- package/dist/core/ingestion/type-extractors/dart.js +369 -0
- package/dist/core/ingestion/type-extractors/go.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/go.js +513 -0
- package/dist/core/ingestion/type-extractors/jvm.d.ts +3 -0
- package/dist/core/ingestion/type-extractors/jvm.js +856 -0
- package/dist/core/ingestion/type-extractors/php.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/php.js +534 -0
- package/dist/core/ingestion/type-extractors/python.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/python.js +474 -0
- package/dist/core/ingestion/type-extractors/ruby.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/ruby.js +377 -0
- package/dist/core/ingestion/type-extractors/rust.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/rust.js +515 -0
- package/dist/core/ingestion/type-extractors/shared.d.ts +131 -0
- package/dist/core/ingestion/type-extractors/shared.js +796 -0
- package/dist/core/ingestion/type-extractors/swift.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/swift.js +487 -0
- package/dist/core/ingestion/type-extractors/types.d.ts +172 -0
- package/dist/core/ingestion/type-extractors/types.js +1 -0
- package/dist/core/ingestion/type-extractors/typescript.d.ts +2 -0
- package/dist/core/ingestion/type-extractors/typescript.js +661 -0
- package/dist/core/ingestion/utils/ast-helpers.d.ts +102 -0
- package/dist/core/ingestion/utils/ast-helpers.js +561 -0
- package/dist/core/ingestion/utils/call-analysis.d.ts +75 -0
- package/dist/core/ingestion/utils/call-analysis.js +574 -0
- package/dist/core/ingestion/utils/env.d.ts +20 -0
- package/dist/core/ingestion/utils/env.js +24 -0
- package/dist/core/ingestion/utils/event-loop.d.ts +5 -0
- package/dist/core/ingestion/utils/event-loop.js +5 -0
- package/dist/core/ingestion/utils/graph-sort.d.ts +58 -0
- package/dist/core/ingestion/utils/graph-sort.js +100 -0
- package/dist/core/ingestion/utils/max-file-size.d.ts +20 -0
- package/dist/core/ingestion/utils/max-file-size.js +53 -0
- package/dist/core/ingestion/utils/method-props.d.ts +32 -0
- package/dist/core/ingestion/utils/method-props.js +147 -0
- package/dist/core/ingestion/utils/ruby-self-call.d.ts +52 -0
- package/dist/core/ingestion/utils/ruby-self-call.js +59 -0
- package/dist/core/ingestion/utils/verbose.d.ts +1 -0
- package/dist/core/ingestion/utils/verbose.js +7 -0
- package/dist/core/ingestion/variable-extractors/configs/c-cpp.d.ts +3 -0
- package/dist/core/ingestion/variable-extractors/configs/c-cpp.js +81 -0
- package/dist/core/ingestion/variable-extractors/configs/csharp.d.ts +9 -0
- package/dist/core/ingestion/variable-extractors/configs/csharp.js +63 -0
- package/dist/core/ingestion/variable-extractors/configs/dart.d.ts +2 -0
- package/dist/core/ingestion/variable-extractors/configs/dart.js +94 -0
- package/dist/core/ingestion/variable-extractors/configs/go.d.ts +2 -0
- package/dist/core/ingestion/variable-extractors/configs/go.js +83 -0
- package/dist/core/ingestion/variable-extractors/configs/jvm.d.ts +18 -0
- package/dist/core/ingestion/variable-extractors/configs/jvm.js +115 -0
- package/dist/core/ingestion/variable-extractors/configs/php.d.ts +14 -0
- package/dist/core/ingestion/variable-extractors/configs/php.js +58 -0
- package/dist/core/ingestion/variable-extractors/configs/python.d.ts +2 -0
- package/dist/core/ingestion/variable-extractors/configs/python.js +101 -0
- package/dist/core/ingestion/variable-extractors/configs/ruby.d.ts +11 -0
- package/dist/core/ingestion/variable-extractors/configs/ruby.js +52 -0
- package/dist/core/ingestion/variable-extractors/configs/rust.d.ts +2 -0
- package/dist/core/ingestion/variable-extractors/configs/rust.js +76 -0
- package/dist/core/ingestion/variable-extractors/configs/swift.d.ts +2 -0
- package/dist/core/ingestion/variable-extractors/configs/swift.js +88 -0
- package/dist/core/ingestion/variable-extractors/configs/typescript-javascript.d.ts +3 -0
- package/dist/core/ingestion/variable-extractors/configs/typescript-javascript.js +83 -0
- package/dist/core/ingestion/variable-extractors/generic.d.ts +5 -0
- package/dist/core/ingestion/variable-extractors/generic.js +80 -0
- package/dist/core/ingestion/variable-types.d.ts +82 -0
- package/dist/core/ingestion/variable-types.js +2 -0
- package/dist/core/ingestion/vue-sfc-extractor.d.ts +44 -0
- package/dist/core/ingestion/vue-sfc-extractor.js +111 -0
- package/dist/core/ingestion/workers/parse-worker.d.ts +199 -0
- package/dist/core/ingestion/workers/parse-worker.js +1940 -0
- package/dist/core/ingestion/workers/worker-pool.d.ts +23 -0
- package/dist/core/ingestion/workers/worker-pool.js +380 -0
- package/dist/core/lbug/csv-generator.d.ts +33 -0
- package/dist/core/lbug/csv-generator.js +463 -0
- package/dist/core/lbug/extension-loader.d.ts +86 -0
- package/dist/core/lbug/extension-loader.js +186 -0
- package/dist/core/lbug/lbug-adapter.d.ts +243 -0
- package/dist/core/lbug/lbug-adapter.js +1377 -0
- package/dist/core/lbug/lbug-config.d.ts +102 -0
- package/dist/core/lbug/lbug-config.js +303 -0
- package/dist/core/lbug/pool-adapter.d.ts +90 -0
- package/dist/core/lbug/pool-adapter.js +592 -0
- package/dist/core/lbug/schema.d.ts +62 -0
- package/dist/core/lbug/schema.js +495 -0
- package/dist/core/logger.d.ts +125 -0
- package/dist/core/logger.js +323 -0
- package/dist/core/platform/capabilities.d.ts +24 -0
- package/dist/core/platform/capabilities.js +54 -0
- package/dist/core/run-analyze.d.ts +92 -0
- package/dist/core/run-analyze.js +672 -0
- package/dist/core/search/bm25-index.d.ts +29 -0
- package/dist/core/search/bm25-index.js +118 -0
- package/dist/core/search/fts-indexes.d.ts +1 -0
- package/dist/core/search/fts-indexes.js +7 -0
- package/dist/core/search/fts-schema.d.ts +6 -0
- package/dist/core/search/fts-schema.js +7 -0
- package/dist/core/search/hybrid-search.d.ts +53 -0
- package/dist/core/search/hybrid-search.js +136 -0
- package/dist/core/search/phase-timer.d.ts +72 -0
- package/dist/core/search/phase-timer.js +106 -0
- package/dist/core/tree-sitter/parser-loader.d.ts +8 -0
- package/dist/core/tree-sitter/parser-loader.js +189 -0
- package/dist/core/tree-sitter/safe-parse.d.ts +6 -0
- package/dist/core/tree-sitter/safe-parse.js +32 -0
- package/dist/core/wiki/cursor-client.d.ts +31 -0
- package/dist/core/wiki/cursor-client.js +123 -0
- package/dist/core/wiki/generator.d.ts +129 -0
- package/dist/core/wiki/generator.js +899 -0
- package/dist/core/wiki/graph-queries.d.ts +84 -0
- package/dist/core/wiki/graph-queries.js +244 -0
- package/dist/core/wiki/html-viewer.d.ts +10 -0
- package/dist/core/wiki/html-viewer.js +304 -0
- package/dist/core/wiki/llm-client.d.ts +83 -0
- package/dist/core/wiki/llm-client.js +267 -0
- package/dist/core/wiki/mermaid-sanitizer.d.ts +2 -0
- package/dist/core/wiki/mermaid-sanitizer.js +100 -0
- package/dist/core/wiki/prompts.d.ts +53 -0
- package/dist/core/wiki/prompts.js +181 -0
- package/dist/lib/utils.d.ts +1 -0
- package/dist/lib/utils.js +3 -0
- package/dist/mcp/compatible-stdio-transport.d.ts +25 -0
- package/dist/mcp/compatible-stdio-transport.js +206 -0
- package/dist/mcp/core/embedder.d.ts +27 -0
- package/dist/mcp/core/embedder.js +145 -0
- package/dist/mcp/core/lbug-adapter.d.ts +11 -0
- package/dist/mcp/core/lbug-adapter.js +11 -0
- package/dist/mcp/local/local-backend.d.ts +356 -0
- package/dist/mcp/local/local-backend.js +3251 -0
- package/dist/mcp/resources.d.ts +62 -0
- package/dist/mcp/resources.js +512 -0
- package/dist/mcp/server.d.ts +23 -0
- package/dist/mcp/server.js +314 -0
- package/dist/mcp/staleness.d.ts +5 -0
- package/dist/mcp/staleness.js +4 -0
- package/dist/mcp/stdio-capture.d.ts +40 -0
- package/dist/mcp/stdio-capture.js +53 -0
- package/dist/mcp/stdio-context.d.ts +47 -0
- package/dist/mcp/stdio-context.js +145 -0
- package/dist/mcp/tools.d.ts +29 -0
- package/dist/mcp/tools.js +506 -0
- package/dist/server/analyze-job.d.ts +55 -0
- package/dist/server/analyze-job.js +150 -0
- package/dist/server/analyze-worker.d.ts +13 -0
- package/dist/server/analyze-worker.js +59 -0
- package/dist/server/api.d.ts +72 -0
- package/dist/server/api.js +1638 -0
- package/dist/server/git-clone.d.ts +99 -0
- package/dist/server/git-clone.js +397 -0
- package/dist/server/mcp-http.d.ts +13 -0
- package/dist/server/mcp-http.js +101 -0
- package/dist/server/validation.d.ts +98 -0
- package/dist/server/validation.js +142 -0
- package/dist/storage/file-hash.d.ts +47 -0
- package/dist/storage/file-hash.js +86 -0
- package/dist/storage/git.d.ts +148 -0
- package/dist/storage/git.js +346 -0
- package/dist/storage/parse-cache.d.ts +67 -0
- package/dist/storage/parse-cache.js +182 -0
- package/dist/storage/repo-manager.d.ts +467 -0
- package/dist/storage/repo-manager.js +804 -0
- package/dist/types/pipeline.d.ts +18 -0
- package/dist/types/pipeline.js +1 -0
- package/hooks/claude/arc-hook.cjs +334 -0
- package/hooks/claude/hook-lock.cjs +119 -0
- package/hooks/claude/pre-tool-use.sh +79 -0
- package/hooks/claude/session-start.sh +42 -0
- package/package.json +122 -0
- package/scripts/bench-scope-resolution.ts +134 -0
- package/scripts/build-tree-sitter-dart.cjs +53 -0
- package/scripts/build-tree-sitter-proto.cjs +93 -0
- package/scripts/build.js +99 -0
- package/scripts/ci-list-migrated-languages.ts +24 -0
- package/scripts/install-duckdb-extension.mjs +48 -0
- package/skills/arc-cli.md +83 -0
- package/skills/arc-debugging.md +89 -0
- package/skills/arc-exploring.md +78 -0
- package/skills/arc-guide.md +64 -0
- package/skills/arc-impact-analysis.md +97 -0
- package/skills/arc-pr-review.md +163 -0
- package/skills/arc-refactoring.md +121 -0
- package/vendor/leiden/index.cjs +355 -0
- package/vendor/leiden/utils.cjs +392 -0
- package/vendor/tree-sitter-dart/README.md +18 -0
- package/vendor/tree-sitter-dart/binding.gyp +31 -0
- package/vendor/tree-sitter-dart/bindings/node/binding.cc +20 -0
- package/vendor/tree-sitter-dart/bindings/node/index.d.ts +28 -0
- package/vendor/tree-sitter-dart/bindings/node/index.js +7 -0
- package/vendor/tree-sitter-dart/grammar.js +2895 -0
- package/vendor/tree-sitter-dart/package.json +18 -0
- package/vendor/tree-sitter-dart/queries/highlights.scm +246 -0
- package/vendor/tree-sitter-dart/queries/tags.scm +92 -0
- package/vendor/tree-sitter-dart/queries/test.scm +1 -0
- package/vendor/tree-sitter-dart/src/grammar.json +12459 -0
- package/vendor/tree-sitter-dart/src/node-types.json +15055 -0
- package/vendor/tree-sitter-dart/src/parser.c +196127 -0
- package/vendor/tree-sitter-dart/src/scanner.c +130 -0
- package/vendor/tree-sitter-dart/src/tree_sitter/alloc.h +54 -0
- package/vendor/tree-sitter-dart/src/tree_sitter/array.h +290 -0
- package/vendor/tree-sitter-dart/src/tree_sitter/parser.h +265 -0
- package/vendor/tree-sitter-proto/binding.gyp +30 -0
- package/vendor/tree-sitter-proto/bindings/node/binding.cc +20 -0
- package/vendor/tree-sitter-proto/bindings/node/index.d.ts +28 -0
- package/vendor/tree-sitter-proto/bindings/node/index.js +7 -0
- package/vendor/tree-sitter-proto/package.json +12 -0
- package/vendor/tree-sitter-proto/src/node-types.json +1145 -0
- package/vendor/tree-sitter-proto/src/parser.c +10149 -0
- package/vendor/tree-sitter-proto/src/tree_sitter/alloc.h +54 -0
- package/vendor/tree-sitter-proto/src/tree_sitter/array.h +291 -0
- package/vendor/tree-sitter-proto/src/tree_sitter/parser.h +266 -0
- package/vendor/tree-sitter-swift/LICENSE +21 -0
- package/vendor/tree-sitter-swift/README.md +139 -0
- package/vendor/tree-sitter-swift/bindings/node/index.d.ts +28 -0
- package/vendor/tree-sitter-swift/bindings/node/index.js +7 -0
- package/vendor/tree-sitter-swift/package.json +28 -0
- package/vendor/tree-sitter-swift/prebuilds/darwin-arm64/tree-sitter-swift.node +0 -0
- package/vendor/tree-sitter-swift/prebuilds/darwin-x64/tree-sitter-swift.node +0 -0
- package/vendor/tree-sitter-swift/prebuilds/linux-arm64/tree-sitter-swift.node +0 -0
- package/vendor/tree-sitter-swift/prebuilds/linux-x64/tree-sitter-swift.node +0 -0
- package/vendor/tree-sitter-swift/prebuilds/win32-arm64/tree-sitter-swift.node +0 -0
- package/vendor/tree-sitter-swift/prebuilds/win32-x64/tree-sitter-swift.node +0 -0
- package/vendor/tree-sitter-swift/src/node-types.json +30694 -0
- package/web/assets/__vite-browser-external-CLwMvL_q.js +1 -0
- package/web/assets/agent-DaYmiVrk.js +601 -0
- package/web/assets/architecture-7EHR7CIX-6QZW5X65-aGTGQQQG.js +1 -0
- package/web/assets/architectureDiagram-UL44E2DR-613o-OfM.js +36 -0
- package/web/assets/blockDiagram-7IZFK4PR-BBJRt4vF.js +132 -0
- package/web/assets/c4Diagram-Y2BXMSZH-BhR2CErx.js +10 -0
- package/web/assets/chunk-3SSMPTDK-DWfEAoKy.js +321 -0
- package/web/assets/chunk-6764PJDD-NOXEgi3n.js +1 -0
- package/web/assets/chunk-AZZRMDJM-DVvcxwI7.js +15 -0
- package/web/assets/chunk-JQRUD6KW-CQgkrimK.js +1 -0
- package/web/assets/chunk-KGYTTC2M-DxOdSoAJ.js +161 -0
- package/web/assets/chunk-KRXBNO2N-BlnQTnxv.js +1 -0
- package/web/assets/chunk-LCXTWHL2-Dhf_u-1F.js +231 -0
- package/web/assets/chunk-LII3EMHJ-Cb3HLCZX.js +1 -0
- package/web/assets/chunk-RG4AUYOV-DLCfNede.js +206 -0
- package/web/assets/chunk-T5OCTHI4-B0CGAG7q.js +1 -0
- package/web/assets/chunk-W44A43WB-ZyrAMwtT.js +1 -0
- package/web/assets/chunk-ZXARS5L4-B0TJPmj5.js +1 -0
- package/web/assets/classDiagram-KGZ6W3CR-CvSnsfJD.js +1 -0
- package/web/assets/classDiagram-v2-72OJOZXJ-CvSnsfJD.js +1 -0
- package/web/assets/context-builder-BREgwful.js +15 -0
- package/web/assets/cose-bilkent-UX7MHV2Q-BsPIaeag.js +1 -0
- package/web/assets/dagre-ND4H6XIP-CV4l9vOZ.js +4 -0
- package/web/assets/diagram-3NCE3AQN-9kSzEbS8.js +43 -0
- package/web/assets/diagram-GF46GFSD-qRvqbex6.js +24 -0
- package/web/assets/diagram-HNR7UZ2L-Dj_ye4Ua.js +3 -0
- package/web/assets/diagram-QXG6HAR7-COwBV6B0.js +24 -0
- package/web/assets/diagram-WEQXMOUZ-C9xjn5dU.js +10 -0
- package/web/assets/erDiagram-L5TCEMPS-fRp0t1Yd.js +85 -0
- package/web/assets/eventmodeling-FCH6USID-MREXMVOE-BR0Ygfrw.js +1 -0
- package/web/assets/flowDiagram-H6V6AXG4-Ccr8FDLD.js +162 -0
- package/web/assets/ganttDiagram-JCBTUEKG-DfBPqAGN.js +292 -0
- package/web/assets/gitGraph-WXDBUCRP-R675I2BI-CYihBz6Z.js +1 -0
- package/web/assets/gitGraphDiagram-S2ZK5IYY-CHvG_UQ0.js +106 -0
- package/web/assets/index-B7cw1L6-.css +2 -0
- package/web/assets/index-CJJQgfSH.js +886 -0
- package/web/assets/info-J43DQDTF-KCYPFFUO-BmmoeX4D.js +1 -0
- package/web/assets/infoDiagram-3YFTVSEB-C7cMy-GP.js +2 -0
- package/web/assets/ishikawaDiagram-BNXS4ZKH-C80yCPYi.js +70 -0
- package/web/assets/journeyDiagram-M6C3CM3L-BHxH1zjE.js +139 -0
- package/web/assets/kanban-definition-75IXJCU3-DNZo1hOE.js +89 -0
- package/web/assets/katex-K3KEBU37-CbyuvTf1.js +261 -0
- package/web/assets/mindmap-definition-2TDM6QVE-Dpgl3Elt.js +96 -0
- package/web/assets/packet-YPE3B663-LP52Z2RK-7JAqDnUy.js +1 -0
- package/web/assets/pie-LRSECV5Y-TCRJHUBD-Bv9vE7io.js +1 -0
- package/web/assets/pieDiagram-CU6KROY3-BW0mr0ek.js +30 -0
- package/web/assets/quadrantDiagram-VICAPDV7-C1dCMBbk.js +7 -0
- package/web/assets/radar-GUYGQ44K-RDLRG3WG-dtZpcOZd.js +1 -0
- package/web/assets/requirementDiagram-JXO7QTGE-Dyqqny4j.js +84 -0
- package/web/assets/sankeyDiagram-URQDO5SZ-B3FGr5SL.js +40 -0
- package/web/assets/sequenceDiagram-VS2MUI6T-B4LlGP9C.js +162 -0
- package/web/assets/stateDiagram-7D4R322I-V9F-klBP.js +1 -0
- package/web/assets/stateDiagram-v2-36443NZ5-CKDYYzqR.js +1 -0
- package/web/assets/timeline-definition-O6YCAMPW-CX2WjkZA.js +120 -0
- package/web/assets/treeView-BLDUP644-QA4HXRO3-BQaKTdhr.js +1 -0
- package/web/assets/treemap-LRROVOQU-LLAWBHMP-Bqlxdyrq.js +1 -0
- package/web/assets/vennDiagram-MWXL3ELB-BxZPYqOF.js +34 -0
- package/web/assets/wardley-L42UT6IY-5TKZOOLJ-dofeprUr.js +1 -0
- package/web/assets/wardleyDiagram-CUQ6CDDI-BLdJJYkV.js +78 -0
- package/web/assets/xychartDiagram-N2JHSOCM-DqDgigLa.js +7 -0
- package/web/index.html +19 -0
|
@@ -0,0 +1,978 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Tree-sitter query for TypeScript scope captures (RFC §5.1).
|
|
3
|
+
*
|
|
4
|
+
* Captures the structural skeleton the generic scope-resolution pipeline
|
|
5
|
+
* consumes: scopes (module/namespace/class/function), declarations (class-
|
|
6
|
+
* likes, method-likes, properties, variables), imports (one anchor per
|
|
7
|
+
* statement — decomposed in `import-decomposer.ts`), type bindings
|
|
8
|
+
* (parameter annotations, variable annotations, constructor inference,
|
|
9
|
+
* return types), and references (call sites, member writes).
|
|
10
|
+
*
|
|
11
|
+
* TypeScript specifics that shape this query:
|
|
12
|
+
*
|
|
13
|
+
* - **Namespaces** (`namespace Foo { }`) use `internal_module` with a
|
|
14
|
+
* `namespace` anon keyword + `identifier` or `nested_identifier` name +
|
|
15
|
+
* `statement_block` body. Verified via Unit 1 probe.
|
|
16
|
+
* - **`this` / `super`** are NAMED nodes `(this)` / `(super)` — unlike
|
|
17
|
+
* C#'s `this`/`base` which are anonymous tokens. `(_)` wildcard matches
|
|
18
|
+
* them as the receiver child of `member_expression`, so we don't need
|
|
19
|
+
* explicit string patterns.
|
|
20
|
+
* - **Optional chaining** (`obj?.m()`) still matches the regular
|
|
21
|
+
* `member_expression > object: (_) / property: (property_identifier)`
|
|
22
|
+
* pattern; the `(optional_chain)` child sits between them but doesn't
|
|
23
|
+
* occupy a named field. Same query handles both.
|
|
24
|
+
* - **Dynamic imports** (`import('./mod')`) are `call_expression` whose
|
|
25
|
+
* `function` field is a named `import` node (not a regular identifier).
|
|
26
|
+
* Captured via a dedicated pattern.
|
|
27
|
+
* - **Function overloads** — `function f(x:string); function f(x:number);
|
|
28
|
+
* function f(x) { … }` emits two `function_signature` nodes plus one
|
|
29
|
+
* `function_declaration`. All three emit `@declaration.function`;
|
|
30
|
+
* arity metadata synthesis merges parameterTypes.
|
|
31
|
+
* - **Parameter properties** (`constructor(public name: string)`) — each
|
|
32
|
+
* parameter emits `@declaration.property` on the enclosing class; the
|
|
33
|
+
* same identifier also binds as a parameter in the constructor scope
|
|
34
|
+
* via the normal `required_parameter` → `@type-binding.parameter` path.
|
|
35
|
+
* - **Enum** — dual type+value. Emits `@scope.class` (enum body contains
|
|
36
|
+
* member declarations) + `@declaration.enum`. Members are captured as
|
|
37
|
+
* `@declaration.property` via the generic property_identifier pattern
|
|
38
|
+
* inside enum_body.
|
|
39
|
+
*
|
|
40
|
+
* Node types pinned via `scripts/_probe_typescript_grammar.ts`:
|
|
41
|
+
* internal_module, namespace_export, namespace_import, import_specifier,
|
|
42
|
+
* export_specifier, enum_declaration, type_alias_declaration,
|
|
43
|
+
* abstract_class_declaration, abstract_method_signature, method_signature,
|
|
44
|
+
* generator_function_declaration, optional_parameter, rest_parameter,
|
|
45
|
+
* required_parameter, public_field_definition, private_property_identifier,
|
|
46
|
+
* new_expression (constructor field), call_expression with (import) fn.
|
|
47
|
+
*
|
|
48
|
+
* Grammar version: tree-sitter-typescript pinned in arc/package.json.
|
|
49
|
+
*
|
|
50
|
+
* Exposes lazy `Parser` and `Query` singletons so callers don't pay tree-
|
|
51
|
+
* sitter init cost per file.
|
|
52
|
+
*/
|
|
53
|
+
import Parser from 'tree-sitter';
|
|
54
|
+
import TS from 'tree-sitter-typescript';
|
|
55
|
+
// tree-sitter-typescript exports both `typescript` and `tsx` grammars on
|
|
56
|
+
// the default export. The package's `.d.ts` types the default export
|
|
57
|
+
// loosely; we narrow at the use site. The two grammars are NOT
|
|
58
|
+
// interchangeable: feeding a `.tsx` source to the `typescript` grammar
|
|
59
|
+
// mis-parses JSX as a sequence of less-than/greater-than expressions
|
|
60
|
+
// and silently drops every capture inside JSX elements. We therefore
|
|
61
|
+
// pick the grammar by file extension.
|
|
62
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
63
|
+
const TS_GRAMMAR = TS.typescript;
|
|
64
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
65
|
+
const TSX_GRAMMAR = TS.tsx;
|
|
66
|
+
/** True when the file should be parsed with the TSX grammar. The TSX
|
|
67
|
+
* grammar is a superset of TypeScript that adds JSX productions; it
|
|
68
|
+
* parses plain `.ts` files correctly too, but we keep `.ts` on the
|
|
69
|
+
* `typescript` grammar so the parser cache stays small and so any
|
|
70
|
+
* subtle TSX-only mis-parses don't bleed into non-TSX files. */
|
|
71
|
+
function isTsxFile(filePath) {
|
|
72
|
+
return filePath.endsWith('.tsx');
|
|
73
|
+
}
|
|
74
|
+
const TYPESCRIPT_SCOPE_QUERY = `
|
|
75
|
+
;; Scopes — module / namespace / class-likes / function-likes
|
|
76
|
+
(program) @scope.module
|
|
77
|
+
|
|
78
|
+
(internal_module) @scope.namespace
|
|
79
|
+
|
|
80
|
+
(class_declaration) @scope.class
|
|
81
|
+
(abstract_class_declaration) @scope.class
|
|
82
|
+
(interface_declaration) @scope.class
|
|
83
|
+
(enum_declaration) @scope.class
|
|
84
|
+
|
|
85
|
+
(function_declaration) @scope.function
|
|
86
|
+
(generator_function_declaration) @scope.function
|
|
87
|
+
(function_signature) @scope.function
|
|
88
|
+
(method_definition) @scope.function
|
|
89
|
+
(method_signature) @scope.function
|
|
90
|
+
(abstract_method_signature) @scope.function
|
|
91
|
+
(arrow_function) @scope.function
|
|
92
|
+
(function_expression) @scope.function
|
|
93
|
+
|
|
94
|
+
;; Type aliases that contain an object_type are structurally class-like —
|
|
95
|
+
;; they define a shape with named members. Emit @scope.class so the
|
|
96
|
+
;; field-extractor's type-alias-with-object-type handling (in
|
|
97
|
+
;; field-extractors/typescript.ts) finds a scope for its members.
|
|
98
|
+
(type_alias_declaration
|
|
99
|
+
value: (object_type)) @scope.class
|
|
100
|
+
|
|
101
|
+
;; Declarations — types
|
|
102
|
+
(class_declaration
|
|
103
|
+
name: (type_identifier) @declaration.name) @declaration.class
|
|
104
|
+
|
|
105
|
+
(abstract_class_declaration
|
|
106
|
+
name: (type_identifier) @declaration.name) @declaration.class
|
|
107
|
+
|
|
108
|
+
(interface_declaration
|
|
109
|
+
name: (type_identifier) @declaration.name) @declaration.interface
|
|
110
|
+
|
|
111
|
+
(enum_declaration
|
|
112
|
+
name: (identifier) @declaration.name) @declaration.enum
|
|
113
|
+
|
|
114
|
+
(type_alias_declaration
|
|
115
|
+
name: (type_identifier) @declaration.name) @declaration.type
|
|
116
|
+
|
|
117
|
+
(internal_module
|
|
118
|
+
name: (identifier) @declaration.name) @declaration.namespace
|
|
119
|
+
|
|
120
|
+
;; Declarations — methods / functions / constructors
|
|
121
|
+
(function_declaration
|
|
122
|
+
name: (identifier) @declaration.name) @declaration.function
|
|
123
|
+
|
|
124
|
+
(generator_function_declaration
|
|
125
|
+
name: (identifier) @declaration.name) @declaration.function
|
|
126
|
+
|
|
127
|
+
;; Function overload signatures (declaration-only; body in a separate
|
|
128
|
+
;; function_declaration). Extractors dedup by (name, parameterTypes).
|
|
129
|
+
(function_signature
|
|
130
|
+
name: (identifier) @declaration.name) @declaration.function
|
|
131
|
+
|
|
132
|
+
;; Arrow/function-expression assigned to a const/let/var — named by the
|
|
133
|
+
;; variable_declarator. Covers \`const fn = () => {}\` and its export
|
|
134
|
+
;; variant. Matches the legacy TYPESCRIPT_QUERIES pattern.
|
|
135
|
+
;;
|
|
136
|
+
;; The \`@declaration.function\` anchor sits on the INNER arrow_function /
|
|
137
|
+
;; function_expression node (NOT the wrapping lexical_declaration), so
|
|
138
|
+
;; \`anchor.range\` aligns with the corresponding \`@scope.function\` scope
|
|
139
|
+
;; range. \`pass2AttachDeclarations\` then resolves \`innermost\` to the
|
|
140
|
+
;; arrow's own scope (instead of the module scope) and the def is owned
|
|
141
|
+
;; by the arrow itself. Without this alignment, calls inside the arrow
|
|
142
|
+
;; body lose caller attribution: \`resolveCallerGraphId\` walks up past
|
|
143
|
+
;; the empty arrow scope into the module scope and grabs whichever
|
|
144
|
+
;; Function-like def appears first there — silently mis-attributing
|
|
145
|
+
;; every nested call (Zustand stores, TanStack hooks, Promise-all/map,
|
|
146
|
+
;; etc.). See \`typescript-hof-callbacks.test.ts\`.
|
|
147
|
+
(lexical_declaration
|
|
148
|
+
(variable_declarator
|
|
149
|
+
name: (identifier) @declaration.name
|
|
150
|
+
value: (arrow_function) @declaration.function))
|
|
151
|
+
|
|
152
|
+
(lexical_declaration
|
|
153
|
+
(variable_declarator
|
|
154
|
+
name: (identifier) @declaration.name
|
|
155
|
+
value: (function_expression) @declaration.function))
|
|
156
|
+
|
|
157
|
+
(variable_declaration
|
|
158
|
+
(variable_declarator
|
|
159
|
+
name: (identifier) @declaration.name
|
|
160
|
+
value: (arrow_function) @declaration.function))
|
|
161
|
+
|
|
162
|
+
(variable_declaration
|
|
163
|
+
(variable_declarator
|
|
164
|
+
name: (identifier) @declaration.name
|
|
165
|
+
value: (function_expression) @declaration.function))
|
|
166
|
+
|
|
167
|
+
;; Object-property arrows / function expressions named by their pair key:
|
|
168
|
+
;; \`{ addItem: (item) => ..., removeItem: (item) => ... }\`. The legacy
|
|
169
|
+
;; TYPESCRIPT_QUERIES emits the same shape; mirroring it here keeps
|
|
170
|
+
;; scope-resolution declarations in sync (issue #1166). Computed keys
|
|
171
|
+
;; (\`[K]: () => ...\`) intentionally fall through anonymous.
|
|
172
|
+
;;
|
|
173
|
+
;; Same anchor discipline as the \`lexical_declaration\` block above: the
|
|
174
|
+
;; \`@declaration.function\` capture must sit on the INNER \`arrow_function\`
|
|
175
|
+
;; / \`function_expression\` node — NOT the outer \`pair\`. The pair node
|
|
176
|
+
;; starts at the property-key token, BEFORE the arrow's
|
|
177
|
+
;; \`@scope.function\` range. \`pass2AttachDeclarations.atPosition(pair.startLine,
|
|
178
|
+
;; pair.startCol)\` therefore resolves to the PARENT scope (the enclosing
|
|
179
|
+
;; function-like, e.g. the \`(set) => ({...})\` callback in
|
|
180
|
+
;; \`persist((set) => ({...}))\`), not the inner arrow's own scope.
|
|
181
|
+
;;
|
|
182
|
+
;; With the anchor on \`pair\`, ALL pair-function defs from the same object
|
|
183
|
+
;; literal land in the same parent scope's \`ownedDefs\`. \`resolveCallerGraphId\`
|
|
184
|
+
;; walking up from a call inside any of those arrows then matches the
|
|
185
|
+
;; FIRST Function-like def via \`ownedDefs.find()\` — silently mis-attributing
|
|
186
|
+
;; every call to the first sibling. Multi-action Zustand stores
|
|
187
|
+
;; (\`{ addItem, removeItem, fetchData, … }\`) — the dominant 0%-capture
|
|
188
|
+
;; pattern in the bug report — would land all calls on \`addItem\`.
|
|
189
|
+
;;
|
|
190
|
+
;; With the anchor on the inner \`arrow_function\` / \`function_expression\`,
|
|
191
|
+
;; \`anchor.range\` matches the arrow's own \`@scope.function\` range; the
|
|
192
|
+
;; def lands in the arrow scope's own \`ownedDefs\` and \`pass2AttachDeclarations\`'s
|
|
193
|
+
;; auto-hoist (\`rangesEqual(anchor.range, innermost.range)\`) promotes
|
|
194
|
+
;; the BINDING to the parent scope (so importers and lookups still find
|
|
195
|
+
;; the name in the object's surrounding scope). Each pair-arrow becomes
|
|
196
|
+
;; an independent caller anchor in the walk.
|
|
197
|
+
(pair
|
|
198
|
+
key: (property_identifier) @declaration.name
|
|
199
|
+
value: (arrow_function) @declaration.function)
|
|
200
|
+
|
|
201
|
+
(pair
|
|
202
|
+
key: (property_identifier) @declaration.name
|
|
203
|
+
value: (function_expression) @declaration.function)
|
|
204
|
+
|
|
205
|
+
(pair
|
|
206
|
+
key: (string (string_fragment) @declaration.name)
|
|
207
|
+
value: (arrow_function) @declaration.function)
|
|
208
|
+
|
|
209
|
+
(pair
|
|
210
|
+
key: (string (string_fragment) @declaration.name)
|
|
211
|
+
value: (function_expression) @declaration.function)
|
|
212
|
+
|
|
213
|
+
;; HOC-wrapped variable declarations: \`const X = HOC((args) => { ... })\`.
|
|
214
|
+
;;
|
|
215
|
+
;; Covers the dominant React UI idiom (\`React.forwardRef\`, \`React.memo\`,
|
|
216
|
+
;; bare \`forwardRef\` / \`memo\` / \`observer\`), Hook callbacks
|
|
217
|
+
;; (\`useCallback\`, \`useMemo\`), and library-wrapper factories (\`debounce\`,
|
|
218
|
+
;; \`throttle\`, user-defined \`withErrorBoundary\` / \`createHook\`, etc.).
|
|
219
|
+
;; All produce the same AST shape:
|
|
220
|
+
;;
|
|
221
|
+
;; lexical_declaration
|
|
222
|
+
;; variable_declarator
|
|
223
|
+
;; name: identifier "X" ← we want this name
|
|
224
|
+
;; value: call_expression
|
|
225
|
+
;; function: identifier | member_expression ← any callee
|
|
226
|
+
;; arguments: arguments
|
|
227
|
+
;; arrow_function | function_expression ← the actual code
|
|
228
|
+
;;
|
|
229
|
+
;; The pre-fix \`tsExtractFunctionName\` only handled \`variable_declarator\`
|
|
230
|
+
;; and \`pair\` parents, so HOC-wrapped arrows fell through anonymous. The
|
|
231
|
+
;; registry-primary \`query.ts\` had no pattern for this shape either —
|
|
232
|
+
;; \`const Button = forwardRef((p, r) => { ... })\` registered as a
|
|
233
|
+
;; \`Variable\` with no \`Function\` def, and every call inside the arrow
|
|
234
|
+
;; body lost caller attribution: \`resolveCallerGraphId\` walked up past
|
|
235
|
+
;; the empty arrow scope to the module's File fallback. Sourcerer-fe alone
|
|
236
|
+
;; has ~296 such declarations (57 forwardRef + 21 memo + 161 useCallback
|
|
237
|
+
;; + 57 useMemo) — all invisible to \`arc_context\` /
|
|
238
|
+
;; \`arc_impact\` for outgoing edges before this fix.
|
|
239
|
+
;;
|
|
240
|
+
;; Anchor discipline: same as the \`lexical_declaration\` / \`pair\` blocks
|
|
241
|
+
;; above — on the INNER \`arrow_function\` / \`function_expression\`, NOT
|
|
242
|
+
;; the outer \`call_expression\`. The arrow's range matches its own
|
|
243
|
+
;; \`@scope.function\` range, so \`pass2AttachDeclarations.atPosition\`
|
|
244
|
+
;; resolves \`innermost\` to the arrow's own scope and
|
|
245
|
+
;; \`rangesEqual(anchor.range, innermost.range)\` triggers the auto-hoist
|
|
246
|
+
;; that promotes the binding to the parent scope (where \`const X\`
|
|
247
|
+
;; lives).
|
|
248
|
+
;;
|
|
249
|
+
;; Trade-off — chained array-method form: \`const x = arr.find((y) => p(y))\`
|
|
250
|
+
;; has the same syntactic shape and would also match, naming the
|
|
251
|
+
;; \`.find\` callback as \`x\`. The resulting \`Function:x\` is mostly
|
|
252
|
+
;; harmless: \`x\` is consumed as a value (\`if (x) { ... }\`), never
|
|
253
|
+
;; invoked as a function, so it gets zero incoming \`CALLS\` edges. The
|
|
254
|
+
;; one outgoing edge \`Function:x → p\` is a minor mis-attribution that
|
|
255
|
+
;; could in principle be fixed by adding a \`function: [(identifier)
|
|
256
|
+
;; (member_expression)]\` predicate that excludes property-identifiers
|
|
257
|
+
;; matching a known array-method blocklist (\`map\` / \`filter\` / \`find\`
|
|
258
|
+
;; / \`reduce\` / \`forEach\` / \`some\` / \`every\`). We don't do that here
|
|
259
|
+
;; because (a) the false-positive cost is negligible, (b) the blocklist
|
|
260
|
+
;; would need maintenance, and (c) any user-defined fluent-API method
|
|
261
|
+
;; with a callback argument would still false-positive — there's no
|
|
262
|
+
;; clean syntactic line.
|
|
263
|
+
;;
|
|
264
|
+
;; Trade-off — multi-arrow arguments: \`const x = call(arrow1, arrow2)\`
|
|
265
|
+
;; would emit TWO matches with the same name \`x\`. tree-sitter-query
|
|
266
|
+
;; iterates all arrow_function direct children of \`arguments\`, so each
|
|
267
|
+
;; emits its own \`(name=x, function=...)\` pair. \`pass2AttachDeclarations\`
|
|
268
|
+
;; pushes both \`Function:x\` defs into the same arrow scopes (each in
|
|
269
|
+
;; its own arrow's \`ownedDefs\`) and hoists both bindings to the parent.
|
|
270
|
+
;; The downstream registry's qualified-name dedup then collapses them
|
|
271
|
+
;; via \`(filePath, type, qualifiedName)\` — second wins. Acceptable;
|
|
272
|
+
;; multi-arrow-callback APIs are rare (\`new Promise(executor)\` is the
|
|
273
|
+
;; main one and takes a single executor).
|
|
274
|
+
(lexical_declaration
|
|
275
|
+
(variable_declarator
|
|
276
|
+
name: (identifier) @declaration.name
|
|
277
|
+
value: (call_expression
|
|
278
|
+
arguments: (arguments
|
|
279
|
+
(arrow_function) @declaration.function))))
|
|
280
|
+
|
|
281
|
+
(lexical_declaration
|
|
282
|
+
(variable_declarator
|
|
283
|
+
name: (identifier) @declaration.name
|
|
284
|
+
value: (call_expression
|
|
285
|
+
arguments: (arguments
|
|
286
|
+
(function_expression) @declaration.function))))
|
|
287
|
+
|
|
288
|
+
(variable_declaration
|
|
289
|
+
(variable_declarator
|
|
290
|
+
name: (identifier) @declaration.name
|
|
291
|
+
value: (call_expression
|
|
292
|
+
arguments: (arguments
|
|
293
|
+
(arrow_function) @declaration.function))))
|
|
294
|
+
|
|
295
|
+
(variable_declaration
|
|
296
|
+
(variable_declarator
|
|
297
|
+
name: (identifier) @declaration.name
|
|
298
|
+
value: (call_expression
|
|
299
|
+
arguments: (arguments
|
|
300
|
+
(function_expression) @declaration.function))))
|
|
301
|
+
|
|
302
|
+
;; Method definitions — regular + private (#field) methods.
|
|
303
|
+
(method_definition
|
|
304
|
+
name: (property_identifier) @declaration.name) @declaration.method
|
|
305
|
+
|
|
306
|
+
(method_definition
|
|
307
|
+
name: (private_property_identifier) @declaration.name) @declaration.method
|
|
308
|
+
|
|
309
|
+
;; Abstract method signatures in abstract classes.
|
|
310
|
+
(abstract_method_signature
|
|
311
|
+
name: (property_identifier) @declaration.name) @declaration.method
|
|
312
|
+
|
|
313
|
+
;; Interface method signatures.
|
|
314
|
+
(method_signature
|
|
315
|
+
name: (property_identifier) @declaration.name) @declaration.method
|
|
316
|
+
|
|
317
|
+
;; Declarations — class fields
|
|
318
|
+
(public_field_definition
|
|
319
|
+
name: (property_identifier) @declaration.name) @declaration.property
|
|
320
|
+
|
|
321
|
+
(public_field_definition
|
|
322
|
+
name: (private_property_identifier) @declaration.name) @declaration.property
|
|
323
|
+
|
|
324
|
+
;; Declarations — parameter properties: \`constructor(public name: string)\`.
|
|
325
|
+
;; The accessibility_modifier presence distinguishes these from regular
|
|
326
|
+
;; parameters. The identifier is also bound as a parameter in the
|
|
327
|
+
;; constructor's scope via @type-binding.parameter below (dual binding).
|
|
328
|
+
(required_parameter
|
|
329
|
+
(accessibility_modifier)
|
|
330
|
+
pattern: (identifier) @declaration.name) @declaration.property
|
|
331
|
+
|
|
332
|
+
;; Declarations — variables (let / const / var)
|
|
333
|
+
(lexical_declaration
|
|
334
|
+
(variable_declarator
|
|
335
|
+
name: (identifier) @declaration.name)) @declaration.variable
|
|
336
|
+
|
|
337
|
+
(variable_declaration
|
|
338
|
+
(variable_declarator
|
|
339
|
+
name: (identifier) @declaration.name)) @declaration.variable
|
|
340
|
+
|
|
341
|
+
;; Imports — single anchor per statement; decomposer emits per-specifier markers.
|
|
342
|
+
(import_statement) @import.statement
|
|
343
|
+
|
|
344
|
+
;; Re-exports: \`export { X } from './y'\` / \`export * from './y'\` /
|
|
345
|
+
;; \`export * as ns from './y'\` / \`export type { X } from './y'\`.
|
|
346
|
+
;; Only re-exports (those with a \`from\` clause) emit @import.statement;
|
|
347
|
+
;; local \`export { X }\` (no source) is just visibility metadata, not an
|
|
348
|
+
;; import. The decomposer filters by source presence.
|
|
349
|
+
(export_statement
|
|
350
|
+
source: (string)) @import.statement
|
|
351
|
+
|
|
352
|
+
;; Dynamic imports: \`import('./m')\` / \`await import(x)\`. tree-sitter-
|
|
353
|
+
;; typescript represents \`import\` as a named leaf node; the call_expression's
|
|
354
|
+
;; function field points at it.
|
|
355
|
+
(call_expression
|
|
356
|
+
function: (import)) @import.dynamic
|
|
357
|
+
|
|
358
|
+
;; Type bindings — parameter annotations: \`function f(u: User)\`
|
|
359
|
+
(required_parameter
|
|
360
|
+
pattern: (identifier) @type-binding.name
|
|
361
|
+
type: (type_annotation
|
|
362
|
+
(type_identifier) @type-binding.type)) @type-binding.parameter
|
|
363
|
+
|
|
364
|
+
(required_parameter
|
|
365
|
+
pattern: (identifier) @type-binding.name
|
|
366
|
+
type: (type_annotation
|
|
367
|
+
(generic_type) @type-binding.type)) @type-binding.parameter
|
|
368
|
+
|
|
369
|
+
(required_parameter
|
|
370
|
+
pattern: (identifier) @type-binding.name
|
|
371
|
+
type: (type_annotation
|
|
372
|
+
(predefined_type) @type-binding.type)) @type-binding.parameter
|
|
373
|
+
|
|
374
|
+
;; Parameter with union / array / readonly wrappers: \`users: readonly User[]\`,
|
|
375
|
+
;; \`x: User | null\`, \`xs: User[]\`. interpret strips wrappers to the
|
|
376
|
+
;; discriminating type.
|
|
377
|
+
(required_parameter
|
|
378
|
+
pattern: (identifier) @type-binding.name
|
|
379
|
+
type: (type_annotation
|
|
380
|
+
(union_type) @type-binding.type)) @type-binding.parameter
|
|
381
|
+
|
|
382
|
+
(required_parameter
|
|
383
|
+
pattern: (identifier) @type-binding.name
|
|
384
|
+
type: (type_annotation
|
|
385
|
+
(array_type) @type-binding.type)) @type-binding.parameter
|
|
386
|
+
|
|
387
|
+
(required_parameter
|
|
388
|
+
pattern: (identifier) @type-binding.name
|
|
389
|
+
type: (type_annotation
|
|
390
|
+
(readonly_type) @type-binding.type)) @type-binding.parameter
|
|
391
|
+
|
|
392
|
+
;; Type bindings — parameter properties:
|
|
393
|
+
;; \`constructor(public address: Address)\` — each parameter with an
|
|
394
|
+
;; accessibility modifier is ALSO a class field. We emit a second
|
|
395
|
+
;; capture so \`tsBindingScopeFor\` can hoist these to the Class scope,
|
|
396
|
+
;; enabling \`user.address\` field access resolution. The regular
|
|
397
|
+
;; @type-binding.parameter above still fires for the constructor
|
|
398
|
+
;; scope binding — both bindings coexist, which is correct.
|
|
399
|
+
(required_parameter
|
|
400
|
+
(accessibility_modifier)
|
|
401
|
+
pattern: (identifier) @type-binding.name
|
|
402
|
+
type: (type_annotation
|
|
403
|
+
(type_identifier) @type-binding.type)) @type-binding.parameter-property
|
|
404
|
+
|
|
405
|
+
(required_parameter
|
|
406
|
+
(accessibility_modifier)
|
|
407
|
+
pattern: (identifier) @type-binding.name
|
|
408
|
+
type: (type_annotation
|
|
409
|
+
(generic_type) @type-binding.type)) @type-binding.parameter-property
|
|
410
|
+
|
|
411
|
+
(required_parameter
|
|
412
|
+
(accessibility_modifier)
|
|
413
|
+
pattern: (identifier) @type-binding.name
|
|
414
|
+
type: (type_annotation
|
|
415
|
+
(predefined_type) @type-binding.type)) @type-binding.parameter-property
|
|
416
|
+
|
|
417
|
+
(required_parameter
|
|
418
|
+
(accessibility_modifier)
|
|
419
|
+
pattern: (identifier) @type-binding.name
|
|
420
|
+
type: (type_annotation
|
|
421
|
+
(union_type) @type-binding.type)) @type-binding.parameter-property
|
|
422
|
+
|
|
423
|
+
(required_parameter
|
|
424
|
+
(accessibility_modifier)
|
|
425
|
+
pattern: (identifier) @type-binding.name
|
|
426
|
+
type: (type_annotation
|
|
427
|
+
(array_type) @type-binding.type)) @type-binding.parameter-property
|
|
428
|
+
|
|
429
|
+
(required_parameter
|
|
430
|
+
(accessibility_modifier)
|
|
431
|
+
pattern: (identifier) @type-binding.name
|
|
432
|
+
type: (type_annotation
|
|
433
|
+
(readonly_type) @type-binding.type)) @type-binding.parameter-property
|
|
434
|
+
|
|
435
|
+
(optional_parameter
|
|
436
|
+
pattern: (identifier) @type-binding.name
|
|
437
|
+
type: (type_annotation
|
|
438
|
+
(type_identifier) @type-binding.type)) @type-binding.parameter
|
|
439
|
+
|
|
440
|
+
(optional_parameter
|
|
441
|
+
pattern: (identifier) @type-binding.name
|
|
442
|
+
type: (type_annotation
|
|
443
|
+
(generic_type) @type-binding.type)) @type-binding.parameter
|
|
444
|
+
|
|
445
|
+
;; Type bindings — variable annotations: \`let u: User = ...\` / \`const u: User\`.
|
|
446
|
+
(variable_declarator
|
|
447
|
+
name: (identifier) @type-binding.name
|
|
448
|
+
type: (type_annotation
|
|
449
|
+
(type_identifier) @type-binding.type)) @type-binding.annotation
|
|
450
|
+
|
|
451
|
+
(variable_declarator
|
|
452
|
+
name: (identifier) @type-binding.name
|
|
453
|
+
type: (type_annotation
|
|
454
|
+
(generic_type) @type-binding.type)) @type-binding.annotation
|
|
455
|
+
|
|
456
|
+
(variable_declarator
|
|
457
|
+
name: (identifier) @type-binding.name
|
|
458
|
+
type: (type_annotation
|
|
459
|
+
(predefined_type) @type-binding.type)) @type-binding.annotation
|
|
460
|
+
|
|
461
|
+
;; Union types like \`User | null\` / \`User | undefined\` — interpret's
|
|
462
|
+
;; stripNullableUnion collapses to the discriminating arm.
|
|
463
|
+
(variable_declarator
|
|
464
|
+
name: (identifier) @type-binding.name
|
|
465
|
+
type: (type_annotation
|
|
466
|
+
(union_type) @type-binding.type)) @type-binding.annotation
|
|
467
|
+
|
|
468
|
+
;; Array types: \`User[]\` / \`readonly User[]\` — stripArraySuffix unwraps.
|
|
469
|
+
(variable_declarator
|
|
470
|
+
name: (identifier) @type-binding.name
|
|
471
|
+
type: (type_annotation
|
|
472
|
+
(array_type) @type-binding.type)) @type-binding.annotation
|
|
473
|
+
|
|
474
|
+
(variable_declarator
|
|
475
|
+
name: (identifier) @type-binding.name
|
|
476
|
+
type: (type_annotation
|
|
477
|
+
(readonly_type) @type-binding.type)) @type-binding.annotation
|
|
478
|
+
|
|
479
|
+
;; Type bindings — constructor-inferred: \`const u = new User()\`.
|
|
480
|
+
;; The variable_declarator's \`value\` field carries the new_expression; its
|
|
481
|
+
;; \`constructor\` field is the type identifier. Covers both typed (\`:User = \`)
|
|
482
|
+
;; and untyped declarations — the annotation pattern above wins if both
|
|
483
|
+
;; fire, via the scope-extractor's source-strength tie-break in
|
|
484
|
+
;; pass4CollectTypeBindings.
|
|
485
|
+
(variable_declarator
|
|
486
|
+
name: (identifier) @type-binding.name
|
|
487
|
+
value: (new_expression
|
|
488
|
+
constructor: (identifier) @type-binding.type)) @type-binding.constructor
|
|
489
|
+
|
|
490
|
+
;; Qualified constructor: \`const u = new models.User()\`. Captures the
|
|
491
|
+
;; member_expression's text as the type — resolver's QualifiedNameIndex
|
|
492
|
+
;; handles the dotted lookup.
|
|
493
|
+
(variable_declarator
|
|
494
|
+
name: (identifier) @type-binding.name
|
|
495
|
+
value: (new_expression
|
|
496
|
+
constructor: (member_expression) @type-binding.type)) @type-binding.constructor
|
|
497
|
+
|
|
498
|
+
;; Cast-wrapped constructor: \`const u = new User() as any\` /
|
|
499
|
+
;; \`const u = new User()!\`. The \`as T\` pattern also captures T itself
|
|
500
|
+
;; via the assertion clause above, but T is usually a non-discriminating
|
|
501
|
+
;; type (\`any\`, \`unknown\`) in these idioms; interpretTsTypeBinding
|
|
502
|
+
;; drops those so the constructor-inferred binding survives.
|
|
503
|
+
(variable_declarator
|
|
504
|
+
name: (identifier) @type-binding.name
|
|
505
|
+
value: (as_expression
|
|
506
|
+
(new_expression
|
|
507
|
+
constructor: (identifier) @type-binding.type))) @type-binding.constructor
|
|
508
|
+
|
|
509
|
+
(variable_declarator
|
|
510
|
+
name: (identifier) @type-binding.name
|
|
511
|
+
value: (non_null_expression
|
|
512
|
+
(new_expression
|
|
513
|
+
constructor: (identifier) @type-binding.type))) @type-binding.constructor
|
|
514
|
+
|
|
515
|
+
;; Double-cast: \`const u = new User() as unknown as any\` — as_expression
|
|
516
|
+
;; nested inside as_expression, with new_expression at the core.
|
|
517
|
+
(variable_declarator
|
|
518
|
+
name: (identifier) @type-binding.name
|
|
519
|
+
value: (as_expression
|
|
520
|
+
(as_expression
|
|
521
|
+
(new_expression
|
|
522
|
+
constructor: (identifier) @type-binding.type)))) @type-binding.constructor
|
|
523
|
+
|
|
524
|
+
;; Type bindings — call-result alias: \`const u = find()\`. Chain-follow
|
|
525
|
+
;; walks \`find\`'s return type via propagateImportedReturnTypes for cross-
|
|
526
|
+
;; file; same-file covered by explicit return annotations.
|
|
527
|
+
(variable_declarator
|
|
528
|
+
name: (identifier) @type-binding.name
|
|
529
|
+
value: (call_expression
|
|
530
|
+
function: (identifier) @type-binding.type)) @type-binding.alias
|
|
531
|
+
|
|
532
|
+
;; Type bindings — member-call alias: \`const u = svc.getUser()\`. The
|
|
533
|
+
;; callee is captured as a full \`member_expression\` text (\`svc.getUser\`)
|
|
534
|
+
;; so compound-receiver can resolve the receiver object before looking up
|
|
535
|
+
;; the method's hoisted return-type binding.
|
|
536
|
+
(variable_declarator
|
|
537
|
+
name: (identifier) @type-binding.name
|
|
538
|
+
value: (call_expression
|
|
539
|
+
function: (member_expression) @type-binding.type)) @type-binding.alias
|
|
540
|
+
|
|
541
|
+
;; Type bindings — await chain: \`const u = await find()\` / \`await svc.m()\`.
|
|
542
|
+
(variable_declarator
|
|
543
|
+
name: (identifier) @type-binding.name
|
|
544
|
+
value: (await_expression
|
|
545
|
+
(call_expression
|
|
546
|
+
function: (identifier) @type-binding.type))) @type-binding.alias
|
|
547
|
+
|
|
548
|
+
(variable_declarator
|
|
549
|
+
name: (identifier) @type-binding.name
|
|
550
|
+
value: (await_expression
|
|
551
|
+
(call_expression
|
|
552
|
+
function: (member_expression) @type-binding.type))) @type-binding.alias
|
|
553
|
+
|
|
554
|
+
;; Awaited generic calls re-associate: \`await fn<T>(...)\` parses as
|
|
555
|
+
;; \`call_expression(function: await_expression(identifier), type_arguments, arguments)\`
|
|
556
|
+
;; — NOT as an await_expression wrapping a call_expression. Handle both
|
|
557
|
+
;; free and member forms so the chain-follow picks up the inner callee.
|
|
558
|
+
(variable_declarator
|
|
559
|
+
name: (identifier) @type-binding.name
|
|
560
|
+
value: (call_expression
|
|
561
|
+
function: (await_expression
|
|
562
|
+
(identifier) @type-binding.type))) @type-binding.alias
|
|
563
|
+
|
|
564
|
+
(variable_declarator
|
|
565
|
+
name: (identifier) @type-binding.name
|
|
566
|
+
value: (call_expression
|
|
567
|
+
function: (await_expression
|
|
568
|
+
(member_expression) @type-binding.type))) @type-binding.alias
|
|
569
|
+
|
|
570
|
+
;; Type bindings — member-access alias: \`const addr = user.address\`.
|
|
571
|
+
;; Full \`member_expression\` text feeds compound-receiver Case 3b.
|
|
572
|
+
(variable_declarator
|
|
573
|
+
name: (identifier) @type-binding.name
|
|
574
|
+
value: (member_expression) @type-binding.type) @type-binding.member-alias
|
|
575
|
+
|
|
576
|
+
;; Type bindings — identifier alias: \`const alias = user\`. Chain-follow
|
|
577
|
+
;; resolves alias via user's binding.
|
|
578
|
+
(variable_declarator
|
|
579
|
+
name: (identifier) @type-binding.name
|
|
580
|
+
value: (identifier) @type-binding.type) @type-binding.alias
|
|
581
|
+
|
|
582
|
+
;; Type bindings — \`as\` assertion: \`const u = x as User\`. Prefer
|
|
583
|
+
;; the assertion's target type over RHS inference. as_expression's right
|
|
584
|
+
;; child is the target type (positional; no field name).
|
|
585
|
+
(variable_declarator
|
|
586
|
+
name: (identifier) @type-binding.name
|
|
587
|
+
value: (as_expression
|
|
588
|
+
(_)
|
|
589
|
+
(type_identifier) @type-binding.type)) @type-binding.assertion
|
|
590
|
+
|
|
591
|
+
(variable_declarator
|
|
592
|
+
name: (identifier) @type-binding.name
|
|
593
|
+
value: (as_expression
|
|
594
|
+
(_)
|
|
595
|
+
(generic_type) @type-binding.type)) @type-binding.assertion
|
|
596
|
+
|
|
597
|
+
;; Type bindings — non-null assertion: \`const u = find()!\`. Unwrap to the
|
|
598
|
+
;; underlying call's function identifier (matches the call-alias pattern).
|
|
599
|
+
(variable_declarator
|
|
600
|
+
name: (identifier) @type-binding.name
|
|
601
|
+
value: (non_null_expression
|
|
602
|
+
(call_expression
|
|
603
|
+
function: (identifier) @type-binding.type))) @type-binding.alias
|
|
604
|
+
|
|
605
|
+
;; Type bindings — for-of element: \`for (const u of users)\` — bind u to
|
|
606
|
+
;; users (chain-follow unwraps to element type via stripGeneric).
|
|
607
|
+
(for_in_statement
|
|
608
|
+
left: (identifier) @type-binding.name
|
|
609
|
+
right: (identifier) @type-binding.type) @type-binding.alias
|
|
610
|
+
|
|
611
|
+
;; Type bindings — for-of call iterable: \`for (const u of getUsers())\`.
|
|
612
|
+
(for_in_statement
|
|
613
|
+
left: (identifier) @type-binding.name
|
|
614
|
+
right: (call_expression
|
|
615
|
+
function: (identifier) @type-binding.type)) @type-binding.alias
|
|
616
|
+
|
|
617
|
+
;; Type bindings — for-of member-call iterable: \`for (const u of svc.getUsers())\`.
|
|
618
|
+
(for_in_statement
|
|
619
|
+
left: (identifier) @type-binding.name
|
|
620
|
+
right: (call_expression
|
|
621
|
+
function: (member_expression) @type-binding.type)) @type-binding.alias
|
|
622
|
+
|
|
623
|
+
;; Type bindings — for-of member-access iterable: \`for (const u of this.users)\`.
|
|
624
|
+
;; Bind u to \`users\` (the attribute name); chain-follow resolves users
|
|
625
|
+
;; via the enclosing class's field binding.
|
|
626
|
+
(for_in_statement
|
|
627
|
+
left: (identifier) @type-binding.name
|
|
628
|
+
right: (member_expression
|
|
629
|
+
property: (property_identifier) @type-binding.type)) @type-binding.alias
|
|
630
|
+
|
|
631
|
+
;; Type bindings — class field annotation: \`private city: City\`.
|
|
632
|
+
(public_field_definition
|
|
633
|
+
name: (property_identifier) @type-binding.name
|
|
634
|
+
type: (type_annotation
|
|
635
|
+
(type_identifier) @type-binding.type)) @type-binding.annotation
|
|
636
|
+
|
|
637
|
+
(public_field_definition
|
|
638
|
+
name: (property_identifier) @type-binding.name
|
|
639
|
+
type: (type_annotation
|
|
640
|
+
(generic_type) @type-binding.type)) @type-binding.annotation
|
|
641
|
+
|
|
642
|
+
(public_field_definition
|
|
643
|
+
name: (property_identifier) @type-binding.name
|
|
644
|
+
type: (type_annotation
|
|
645
|
+
(predefined_type) @type-binding.type)) @type-binding.annotation
|
|
646
|
+
|
|
647
|
+
;; Class field with union / array / readonly wrappers:
|
|
648
|
+
;; \`private users: User[]\`, \`private repos: readonly Repo[]\`,
|
|
649
|
+
;; \`private x: City | null\`. interpret strips wrappers to the
|
|
650
|
+
;; discriminating type so chain-follow unwraps to the element.
|
|
651
|
+
(public_field_definition
|
|
652
|
+
name: (property_identifier) @type-binding.name
|
|
653
|
+
type: (type_annotation
|
|
654
|
+
(union_type) @type-binding.type)) @type-binding.annotation
|
|
655
|
+
|
|
656
|
+
(public_field_definition
|
|
657
|
+
name: (property_identifier) @type-binding.name
|
|
658
|
+
type: (type_annotation
|
|
659
|
+
(array_type) @type-binding.type)) @type-binding.annotation
|
|
660
|
+
|
|
661
|
+
(public_field_definition
|
|
662
|
+
name: (property_identifier) @type-binding.name
|
|
663
|
+
type: (type_annotation
|
|
664
|
+
(readonly_type) @type-binding.type)) @type-binding.annotation
|
|
665
|
+
|
|
666
|
+
;; Private class field annotation: \`#city: City\`.
|
|
667
|
+
(public_field_definition
|
|
668
|
+
name: (private_property_identifier) @type-binding.name
|
|
669
|
+
type: (type_annotation
|
|
670
|
+
(type_identifier) @type-binding.type)) @type-binding.annotation
|
|
671
|
+
|
|
672
|
+
;; Type bindings — method return type: \`save(): User { … }\` / \`function f(): User { … }\`.
|
|
673
|
+
;; Function/method return-type is the type_annotation that is a direct
|
|
674
|
+
;; child of the function node (not the parameter's annotation). Anchor on
|
|
675
|
+
;; the function node so bindingScopeFor can hoist if the language requests
|
|
676
|
+
;; (TS keeps it on the method scope; we emit here and let the resolver
|
|
677
|
+
;; decide via hoistTypeBindingsToModule).
|
|
678
|
+
;;
|
|
679
|
+
;; Wrapper forms covered: plain \`User\`, generic \`Promise<User>\`,
|
|
680
|
+
;; array \`User[]\`, readonly \`readonly User[]\`, union \`User | null\`.
|
|
681
|
+
;; \`stripArraySuffix\` / \`stripReadonly\` / \`stripNullableUnion\` in
|
|
682
|
+
;; interpret reduce these to the discriminating element so chain-follow
|
|
683
|
+
;; can unwrap iterators returned from \`getUsers(): User[]\`.
|
|
684
|
+
(function_declaration
|
|
685
|
+
name: (identifier) @type-binding.name
|
|
686
|
+
return_type: (type_annotation
|
|
687
|
+
(type_identifier) @type-binding.type)) @type-binding.return
|
|
688
|
+
|
|
689
|
+
(function_declaration
|
|
690
|
+
name: (identifier) @type-binding.name
|
|
691
|
+
return_type: (type_annotation
|
|
692
|
+
(generic_type) @type-binding.type)) @type-binding.return
|
|
693
|
+
|
|
694
|
+
(function_declaration
|
|
695
|
+
name: (identifier) @type-binding.name
|
|
696
|
+
return_type: (type_annotation
|
|
697
|
+
(array_type) @type-binding.type)) @type-binding.return
|
|
698
|
+
|
|
699
|
+
(function_declaration
|
|
700
|
+
name: (identifier) @type-binding.name
|
|
701
|
+
return_type: (type_annotation
|
|
702
|
+
(readonly_type) @type-binding.type)) @type-binding.return
|
|
703
|
+
|
|
704
|
+
(function_declaration
|
|
705
|
+
name: (identifier) @type-binding.name
|
|
706
|
+
return_type: (type_annotation
|
|
707
|
+
(union_type) @type-binding.type)) @type-binding.return
|
|
708
|
+
|
|
709
|
+
(function_signature
|
|
710
|
+
name: (identifier) @type-binding.name
|
|
711
|
+
return_type: (type_annotation
|
|
712
|
+
(type_identifier) @type-binding.type)) @type-binding.return
|
|
713
|
+
|
|
714
|
+
(function_signature
|
|
715
|
+
name: (identifier) @type-binding.name
|
|
716
|
+
return_type: (type_annotation
|
|
717
|
+
(generic_type) @type-binding.type)) @type-binding.return
|
|
718
|
+
|
|
719
|
+
(function_signature
|
|
720
|
+
name: (identifier) @type-binding.name
|
|
721
|
+
return_type: (type_annotation
|
|
722
|
+
(array_type) @type-binding.type)) @type-binding.return
|
|
723
|
+
|
|
724
|
+
(function_signature
|
|
725
|
+
name: (identifier) @type-binding.name
|
|
726
|
+
return_type: (type_annotation
|
|
727
|
+
(readonly_type) @type-binding.type)) @type-binding.return
|
|
728
|
+
|
|
729
|
+
(function_signature
|
|
730
|
+
name: (identifier) @type-binding.name
|
|
731
|
+
return_type: (type_annotation
|
|
732
|
+
(union_type) @type-binding.type)) @type-binding.return
|
|
733
|
+
|
|
734
|
+
(method_definition
|
|
735
|
+
name: (property_identifier) @type-binding.name
|
|
736
|
+
return_type: (type_annotation
|
|
737
|
+
(type_identifier) @type-binding.type)) @type-binding.return
|
|
738
|
+
|
|
739
|
+
(method_definition
|
|
740
|
+
name: (property_identifier) @type-binding.name
|
|
741
|
+
return_type: (type_annotation
|
|
742
|
+
(generic_type) @type-binding.type)) @type-binding.return
|
|
743
|
+
|
|
744
|
+
(method_definition
|
|
745
|
+
name: (property_identifier) @type-binding.name
|
|
746
|
+
return_type: (type_annotation
|
|
747
|
+
(array_type) @type-binding.type)) @type-binding.return
|
|
748
|
+
|
|
749
|
+
(method_definition
|
|
750
|
+
name: (property_identifier) @type-binding.name
|
|
751
|
+
return_type: (type_annotation
|
|
752
|
+
(readonly_type) @type-binding.type)) @type-binding.return
|
|
753
|
+
|
|
754
|
+
(method_definition
|
|
755
|
+
name: (property_identifier) @type-binding.name
|
|
756
|
+
return_type: (type_annotation
|
|
757
|
+
(union_type) @type-binding.type)) @type-binding.return
|
|
758
|
+
|
|
759
|
+
(method_signature
|
|
760
|
+
name: (property_identifier) @type-binding.name
|
|
761
|
+
return_type: (type_annotation
|
|
762
|
+
(type_identifier) @type-binding.type)) @type-binding.return
|
|
763
|
+
|
|
764
|
+
(method_signature
|
|
765
|
+
name: (property_identifier) @type-binding.name
|
|
766
|
+
return_type: (type_annotation
|
|
767
|
+
(generic_type) @type-binding.type)) @type-binding.return
|
|
768
|
+
|
|
769
|
+
(method_signature
|
|
770
|
+
name: (property_identifier) @type-binding.name
|
|
771
|
+
return_type: (type_annotation
|
|
772
|
+
(array_type) @type-binding.type)) @type-binding.return
|
|
773
|
+
|
|
774
|
+
(method_signature
|
|
775
|
+
name: (property_identifier) @type-binding.name
|
|
776
|
+
return_type: (type_annotation
|
|
777
|
+
(readonly_type) @type-binding.type)) @type-binding.return
|
|
778
|
+
|
|
779
|
+
(method_signature
|
|
780
|
+
name: (property_identifier) @type-binding.name
|
|
781
|
+
return_type: (type_annotation
|
|
782
|
+
(union_type) @type-binding.type)) @type-binding.return
|
|
783
|
+
|
|
784
|
+
(abstract_method_signature
|
|
785
|
+
name: (property_identifier) @type-binding.name
|
|
786
|
+
return_type: (type_annotation
|
|
787
|
+
(type_identifier) @type-binding.type)) @type-binding.return
|
|
788
|
+
|
|
789
|
+
(abstract_method_signature
|
|
790
|
+
name: (property_identifier) @type-binding.name
|
|
791
|
+
return_type: (type_annotation
|
|
792
|
+
(generic_type) @type-binding.type)) @type-binding.return
|
|
793
|
+
|
|
794
|
+
;; Type bindings — assignment rebind: \`u = new User()\` (no \`const\`).
|
|
795
|
+
(assignment_expression
|
|
796
|
+
left: (identifier) @type-binding.name
|
|
797
|
+
right: (new_expression
|
|
798
|
+
constructor: (identifier) @type-binding.type)) @type-binding.constructor
|
|
799
|
+
|
|
800
|
+
(assignment_expression
|
|
801
|
+
left: (identifier) @type-binding.name
|
|
802
|
+
right: (call_expression
|
|
803
|
+
function: (identifier) @type-binding.type)) @type-binding.alias
|
|
804
|
+
|
|
805
|
+
(assignment_expression
|
|
806
|
+
left: (identifier) @type-binding.name
|
|
807
|
+
right: (identifier) @type-binding.type) @type-binding.alias
|
|
808
|
+
|
|
809
|
+
;; References — free calls: \`fn(args)\`. Exclude the dynamic-import form,
|
|
810
|
+
;; which would otherwise double-classify as a call to a built-in \`import\`.
|
|
811
|
+
;; tree-sitter can't negate (import) with #not-eq?; the captures.ts layer
|
|
812
|
+
;; filters dynamic-imports BEFORE the free-call is consumed.
|
|
813
|
+
(call_expression
|
|
814
|
+
function: (identifier) @reference.name) @reference.call.free
|
|
815
|
+
|
|
816
|
+
;; Awaited free call with generics: \`await fn<T>(...)\` — re-associated
|
|
817
|
+
;; by tree-sitter as \`call_expression(function: await_expression(identifier))\`.
|
|
818
|
+
(call_expression
|
|
819
|
+
function: (await_expression
|
|
820
|
+
(identifier) @reference.name)) @reference.call.free
|
|
821
|
+
|
|
822
|
+
;; References — member calls: \`obj.method()\` (includes optional chain).
|
|
823
|
+
;; The (_) wildcard matches any named receiver including \`this\` /
|
|
824
|
+
;; \`super\` (both are named nodes in tree-sitter-typescript, unlike C#'s
|
|
825
|
+
;; anonymous tokens).
|
|
826
|
+
(call_expression
|
|
827
|
+
function: (member_expression
|
|
828
|
+
object: (_) @reference.receiver
|
|
829
|
+
property: (property_identifier) @reference.name)) @reference.call.member
|
|
830
|
+
|
|
831
|
+
;; Awaited member call with generics: \`await svc.m<T>(...)\` — re-associated
|
|
832
|
+
;; as \`call_expression(function: await_expression(member_expression))\`.
|
|
833
|
+
(call_expression
|
|
834
|
+
function: (await_expression
|
|
835
|
+
(member_expression
|
|
836
|
+
object: (_) @reference.receiver
|
|
837
|
+
property: (property_identifier) @reference.name))) @reference.call.member
|
|
838
|
+
|
|
839
|
+
;; References — constructor calls: \`new User()\` / \`new ns.User()\`.
|
|
840
|
+
(new_expression
|
|
841
|
+
constructor: (identifier) @reference.name) @reference.call.constructor
|
|
842
|
+
|
|
843
|
+
(new_expression
|
|
844
|
+
constructor: (member_expression) @reference.call.constructor.qualified) @reference.call.constructor
|
|
845
|
+
|
|
846
|
+
;; References — write access: \`obj.field = value\`.
|
|
847
|
+
(assignment_expression
|
|
848
|
+
left: (member_expression
|
|
849
|
+
object: (_) @reference.receiver
|
|
850
|
+
property: (property_identifier) @reference.name)) @reference.write.member
|
|
851
|
+
|
|
852
|
+
(augmented_assignment_expression
|
|
853
|
+
left: (member_expression
|
|
854
|
+
object: (_) @reference.receiver
|
|
855
|
+
property: (property_identifier) @reference.name)) @reference.write.member
|
|
856
|
+
|
|
857
|
+
;; References — read access: \`obj.field\` used in a read context.
|
|
858
|
+
;; Fires on EVERY member_expression; \`emitTsScopeCaptures\` filters out
|
|
859
|
+
;; contexts that shouldn't emit a read ACCESSES edge (LHS of assignment,
|
|
860
|
+
;; the \`function:\` of a call_expression, property_identifier inside a
|
|
861
|
+
;; computed member name, etc.). Keeping the filter on the emit side lets
|
|
862
|
+
;; tree-sitter's pattern stay simple and we don't replicate AST-context
|
|
863
|
+
;; predicates in the query itself.
|
|
864
|
+
(member_expression
|
|
865
|
+
object: (_) @reference.receiver
|
|
866
|
+
property: (property_identifier) @reference.name) @reference.read.member
|
|
867
|
+
`;
|
|
868
|
+
/**
|
|
869
|
+
* JSX-only query suffix. Appended to the base query when compiling
|
|
870
|
+
* against the TSX grammar; NOT compiled against the plain TS grammar
|
|
871
|
+
* (which has no \`jsx_*\` node types and would reject these patterns).
|
|
872
|
+
*
|
|
873
|
+
* Why JSX as a CALLS edge: \`<Foo />\` is syntactic sugar for \`Foo(props)\`
|
|
874
|
+
* and the React component is invoked by the renderer, so for blast-radius
|
|
875
|
+
* (\`arc_impact("Badge", direction: "upstream")\`) and call-graph
|
|
876
|
+
* (\`arc_context("Foo")\`) purposes JSX usage IS a call. Routing
|
|
877
|
+
* through \`@reference.call.free\` / \`@reference.call.member\` makes the
|
|
878
|
+
* downstream caller-walk + edge-emission paths handle JSX uniformly with
|
|
879
|
+
* ordinary call expressions — no new edge type, no schema changes.
|
|
880
|
+
*
|
|
881
|
+
* Identifier-only JSX is filtered to PascalCase via \`(#match? ... "^[A-Z]")\`
|
|
882
|
+
* so \`<div>\`, \`<span>\`, \`<button>\` and other native HTML elements (which
|
|
883
|
+
* by JSX convention start lowercase) don't emit edges to nonexistent
|
|
884
|
+
* "div" / "span" symbols. Member-form JSX (\`<Foo.Bar />\`) is always a
|
|
885
|
+
* component (HTML element names can't contain dots), so no predicate
|
|
886
|
+
* filter is applied there.
|
|
887
|
+
*
|
|
888
|
+
* Both \`jsx_self_closing_element\` (\`<Foo />\`) and \`jsx_opening_element\`
|
|
889
|
+
* (\`<Foo>...</Foo>\`) emit; the closing tag is intentionally NOT captured —
|
|
890
|
+
* each JSX element should emit exactly one CALLS edge per use site.
|
|
891
|
+
*/
|
|
892
|
+
const TSX_JSX_QUERY_SUFFIX = `
|
|
893
|
+
;; <Foo />
|
|
894
|
+
((jsx_self_closing_element
|
|
895
|
+
name: (identifier) @reference.name) @reference.call.free
|
|
896
|
+
(#match? @reference.name "^[A-Z]"))
|
|
897
|
+
|
|
898
|
+
;; <Foo> ... </Foo> (paired form — match the opening tag only)
|
|
899
|
+
((jsx_opening_element
|
|
900
|
+
name: (identifier) @reference.name) @reference.call.free
|
|
901
|
+
(#match? @reference.name "^[A-Z]"))
|
|
902
|
+
|
|
903
|
+
;; <Foo.Bar /> / <Container.Section.Title /> — namespaced JSX
|
|
904
|
+
(jsx_self_closing_element
|
|
905
|
+
name: (member_expression
|
|
906
|
+
object: (_) @reference.receiver
|
|
907
|
+
property: (property_identifier) @reference.name)) @reference.call.member
|
|
908
|
+
|
|
909
|
+
(jsx_opening_element
|
|
910
|
+
name: (member_expression
|
|
911
|
+
object: (_) @reference.receiver
|
|
912
|
+
property: (property_identifier) @reference.name)) @reference.call.member
|
|
913
|
+
`;
|
|
914
|
+
let _tsParser = null;
|
|
915
|
+
let _tsxParser = null;
|
|
916
|
+
let _tsQuery = null;
|
|
917
|
+
let _tsxQuery = null;
|
|
918
|
+
/**
|
|
919
|
+
* Return the right tree-sitter parser for `filePath` (or the TS parser
|
|
920
|
+
* when no path is given — the legacy callsite shape).
|
|
921
|
+
*/
|
|
922
|
+
export function getTsParser(filePath) {
|
|
923
|
+
if (filePath !== undefined && isTsxFile(filePath)) {
|
|
924
|
+
if (_tsxParser === null) {
|
|
925
|
+
_tsxParser = new Parser();
|
|
926
|
+
_tsxParser.setLanguage(TSX_GRAMMAR);
|
|
927
|
+
}
|
|
928
|
+
return _tsxParser;
|
|
929
|
+
}
|
|
930
|
+
if (_tsParser === null) {
|
|
931
|
+
_tsParser = new Parser();
|
|
932
|
+
_tsParser.setLanguage(TS_GRAMMAR);
|
|
933
|
+
}
|
|
934
|
+
return _tsParser;
|
|
935
|
+
}
|
|
936
|
+
/**
|
|
937
|
+
* Return the right tree-sitter Query (compiled against the same grammar
|
|
938
|
+
* as the parser). A Query bound to the `typescript` grammar can NOT be
|
|
939
|
+
* executed against a Tree produced by the `tsx` grammar — tree-sitter
|
|
940
|
+
* matches by node-type id, and the two grammars have separate id
|
|
941
|
+
* spaces.
|
|
942
|
+
*
|
|
943
|
+
* The TSX query is compiled with the JSX-as-call patterns appended.
|
|
944
|
+
* Those patterns reference `jsx_self_closing_element` /
|
|
945
|
+
* `jsx_opening_element` which exist only in the TSX grammar — embedding
|
|
946
|
+
* them in the plain TS query would throw `Query.InvalidNodeType` at
|
|
947
|
+
* compile time (and even if it didn't, the patterns would never fire on
|
|
948
|
+
* `.ts` source).
|
|
949
|
+
*/
|
|
950
|
+
export function getTsScopeQuery(filePath) {
|
|
951
|
+
if (filePath !== undefined && isTsxFile(filePath)) {
|
|
952
|
+
if (_tsxQuery === null) {
|
|
953
|
+
_tsxQuery = new Parser.Query(TSX_GRAMMAR, TYPESCRIPT_SCOPE_QUERY + TSX_JSX_QUERY_SUFFIX);
|
|
954
|
+
}
|
|
955
|
+
return _tsxQuery;
|
|
956
|
+
}
|
|
957
|
+
if (_tsQuery === null) {
|
|
958
|
+
_tsQuery = new Parser.Query(TS_GRAMMAR, TYPESCRIPT_SCOPE_QUERY);
|
|
959
|
+
}
|
|
960
|
+
return _tsQuery;
|
|
961
|
+
}
|
|
962
|
+
/**
|
|
963
|
+
* Validate that a cached `Tree` was produced by the grammar matching
|
|
964
|
+
* `filePath` (TSX vs TypeScript). The runtime tree-sitter `Tree` exposes
|
|
965
|
+
* `getLanguage()` (returning the grammar object the parser was bound
|
|
966
|
+
* to); the .d.ts is incomplete, so we reach via a cast. Identity
|
|
967
|
+
* comparison against `TSX_GRAMMAR` / `TS_GRAMMAR` is exact: the same
|
|
968
|
+
* module instance produces both. If `getLanguage` is unavailable for
|
|
969
|
+
* any reason, return true to keep behavior backwards-compatible (the
|
|
970
|
+
* original code never validated grammar at all).
|
|
971
|
+
*/
|
|
972
|
+
export function tsCachedTreeMatchesGrammar(tree, filePath) {
|
|
973
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
974
|
+
const lang = tree?.getLanguage?.();
|
|
975
|
+
if (lang === undefined || lang === null)
|
|
976
|
+
return true;
|
|
977
|
+
return isTsxFile(filePath) ? lang === TSX_GRAMMAR : lang === TS_GRAMMAR;
|
|
978
|
+
}
|